J2DOrthoGraph: improved parameter names

This commit is contained in:
Jcw87 2023-07-09 22:35:49 -07:00
parent 66b3dc12ae
commit ec4df7f8db
2 changed files with 27 additions and 28 deletions

View File

@ -7,8 +7,8 @@
class J2DOrthoGraph : public J2DGrafContext { class J2DOrthoGraph : public J2DGrafContext {
public: public:
/* 802E9670 */ J2DOrthoGraph(); /* 802E9670 */ J2DOrthoGraph();
/* 802E96D0 */ J2DOrthoGraph(f32, f32, f32, f32, f32, f32); /* 802E96D0 */ J2DOrthoGraph(f32 x, f32 y, f32 width, f32 height, f32 far, f32 near);
/* 802E980C */ void setOrtho(JGeometry::TBox2<f32> const&, f32, f32); /* 802E980C */ void setOrtho(JGeometry::TBox2<f32> const& bounds, f32 far, f32 near);
/* 802E987C */ void scissorBounds(JGeometry::TBox2<f32>*, JGeometry::TBox2<f32> const*); /* 802E987C */ void scissorBounds(JGeometry::TBox2<f32>*, JGeometry::TBox2<f32> const*);
/* 8000B118 */ virtual ~J2DOrthoGraph() {} /* 8000B118 */ virtual ~J2DOrthoGraph() {}
@ -19,9 +19,9 @@ public:
f32 getWidthPower() const { return mBounds.getWidth() / mOrtho.getWidth(); } f32 getWidthPower() const { return mBounds.getWidth() / mOrtho.getWidth(); }
f32 getHeightPower() const { return mBounds.getHeight() / mOrtho.getHeight(); } f32 getHeightPower() const { return mBounds.getHeight() / mOrtho.getHeight(); }
void setOrtho(f32 param_0, f32 param_1, f32 param_2, f32 param_3, f32 param_4, f32 param_5) { void setOrtho(f32 x, f32 y, f32 width, f32 height, f32 far, f32 near) {
JGeometry::TBox2<f32> ortho(param_0, param_1, param_0 + param_2, param_1 + param_3); JGeometry::TBox2<f32> ortho(x, y, x + width, y + height);
setOrtho(ortho, param_4, param_5); setOrtho(ortho, far, near);
} }
private: private:
@ -30,12 +30,11 @@ private:
/* 0xD0 */ f32 mFar; /* 0xD0 */ f32 mFar;
}; };
void J2DDrawLine(f32 param_0, f32 param_1, f32 param_2, f32 param_3, JUtility::TColor color, void J2DDrawLine(f32 x1, f32 y1, f32 x2, f32 y2, JUtility::TColor color,
int line_width); int line_width);
void J2DFillBox(f32 param_0, f32 param_1, f32 param_2, f32 param_3, JUtility::TColor color); void J2DFillBox(f32 x, f32 y, f32 width, f32 height, JUtility::TColor color);
void J2DFillBox(JGeometry::TBox2<f32> const& param_0, JUtility::TColor param_1); void J2DFillBox(JGeometry::TBox2<f32> const& box, JUtility::TColor color);
void J2DDrawFrame(f32 param_0, f32 param_1, f32 param_2, f32 param_3, JUtility::TColor param_4, void J2DDrawFrame(f32 x, f32 y, f32 width, f32 height, JUtility::TColor color, u8 line_width);
u8 param_5); void J2DDrawFrame(JGeometry::TBox2<f32> const& box, JUtility::TColor color, u8 line_width);
void J2DDrawFrame(JGeometry::TBox2<f32> const& param_0, JUtility::TColor param_1, u8 param_2);
#endif /* J2DORTHOGRAPH_H */ #endif /* J2DORTHOGRAPH_H */

View File

@ -26,11 +26,11 @@ J2DOrthoGraph::J2DOrthoGraph() : J2DGrafContext(0, 0, 0, 0) {
} }
/* 802E96D0-802E97B4 2E4010 00E4+00 0/0 7/7 0/0 .text __ct__13J2DOrthoGraphFffffff */ /* 802E96D0-802E97B4 2E4010 00E4+00 0/0 7/7 0/0 .text __ct__13J2DOrthoGraphFffffff */
J2DOrthoGraph::J2DOrthoGraph(f32 left, f32 top, f32 right, f32 bottom, f32 param_4, f32 param_5) J2DOrthoGraph::J2DOrthoGraph(f32 x, f32 y, f32 width, f32 height, f32 far, f32 near)
: J2DGrafContext(left, top, right, bottom) { : J2DGrafContext(x, y, width, height) {
mOrtho = JGeometry::TBox2<f32>(0, 0, right, bottom); mOrtho = JGeometry::TBox2<f32>(0, 0, width, height);
mNear = -param_5; mNear = -near;
mFar = -param_4; mFar = -far;
this->setLookat(); this->setLookat();
} }
@ -72,41 +72,41 @@ void J2DOrthoGraph::scissorBounds(JGeometry::TBox2<f32>* param_0,
} }
/* 802E9998-802E9AC4 2E42D8 012C+00 0/0 6/6 0/0 .text J2DDrawLine__FffffQ28JUtility6TColori */ /* 802E9998-802E9AC4 2E42D8 012C+00 0/0 6/6 0/0 .text J2DDrawLine__FffffQ28JUtility6TColori */
void J2DDrawLine(f32 param_0, f32 param_1, f32 param_2, f32 param_3, JUtility::TColor color, void J2DDrawLine(f32 x1, f32 y1, f32 x2, f32 y2, JUtility::TColor color,
int line_width) { int line_width) {
J2DOrthoGraph oGrph; J2DOrthoGraph oGrph;
oGrph.setLineWidth(line_width); oGrph.setLineWidth(line_width);
oGrph.setColor(color); oGrph.setColor(color);
oGrph.moveTo(param_0, param_1); oGrph.moveTo(x1, y1);
oGrph.lineTo(param_2, param_3); oGrph.lineTo(x2, y2);
} }
/* 802E9AC4-802E9B0C 2E4404 0048+00 0/0 10/10 0/0 .text J2DFillBox__FffffQ28JUtility6TColor */ /* 802E9AC4-802E9B0C 2E4404 0048+00 0/0 10/10 0/0 .text J2DFillBox__FffffQ28JUtility6TColor */
void J2DFillBox(f32 param_0, f32 param_1, f32 param_2, f32 param_3, JUtility::TColor color) { void J2DFillBox(f32 x, f32 y, f32 width, f32 height, JUtility::TColor color) {
J2DFillBox(JGeometry::TBox2<f32>(param_0, param_1, param_0 + param_2, param_1 + param_3), J2DFillBox(JGeometry::TBox2<f32>(x, y, x + width, y + height),
color); color);
} }
/* 802E9B0C-802E9B9C 2E444C 0090+00 1/1 0/0 0/0 .text /* 802E9B0C-802E9B9C 2E444C 0090+00 1/1 0/0 0/0 .text
* J2DFillBox__FRCQ29JGeometry8TBox2<f>Q28JUtility6TColor */ * J2DFillBox__FRCQ29JGeometry8TBox2<f>Q28JUtility6TColor */
void J2DFillBox(JGeometry::TBox2<f32> const& param_0, JUtility::TColor param_1) { void J2DFillBox(JGeometry::TBox2<f32> const& box, JUtility::TColor color) {
J2DOrthoGraph oGrph; J2DOrthoGraph oGrph;
oGrph.setColor(param_1); oGrph.setColor(color);
oGrph.fillBox(param_0); oGrph.fillBox(box);
} }
/* 802E9B9C-802E9BE8 2E44DC 004C+00 0/0 5/5 0/0 .text J2DDrawFrame__FffffQ28JUtility6TColorUc */ /* 802E9B9C-802E9BE8 2E44DC 004C+00 0/0 5/5 0/0 .text J2DDrawFrame__FffffQ28JUtility6TColorUc */
void J2DDrawFrame(f32 param_0, f32 param_1, f32 param_2, f32 param_3, JUtility::TColor color, void J2DDrawFrame(f32 x, f32 y, f32 width, f32 height, JUtility::TColor color,
u8 line_width) { u8 line_width) {
J2DDrawFrame(JGeometry::TBox2<f32>(param_0, param_1, param_0 + param_2, param_1 + param_3), J2DDrawFrame(JGeometry::TBox2<f32>(x, y, x + width, y + height),
color, line_width); color, line_width);
} }
/* 802E9BE8-802E9C88 2E4528 00A0+00 1/1 0/0 0/0 .text /* 802E9BE8-802E9C88 2E4528 00A0+00 1/1 0/0 0/0 .text
* J2DDrawFrame__FRCQ29JGeometry8TBox2<f>Q28JUtility6TColorUc */ * J2DDrawFrame__FRCQ29JGeometry8TBox2<f>Q28JUtility6TColorUc */
void J2DDrawFrame(JGeometry::TBox2<f32> const& param_0, JUtility::TColor color, u8 line_width) { void J2DDrawFrame(JGeometry::TBox2<f32> const& box, JUtility::TColor color, u8 line_width) {
J2DOrthoGraph oGrph; J2DOrthoGraph oGrph;
oGrph.setColor(color); oGrph.setColor(color);
oGrph.setLineWidth(line_width); oGrph.setLineWidth(line_width);
oGrph.drawFrame(param_0); oGrph.drawFrame(box);
} }