diff options
| author | Noah McQueen <67965519+Yotona@users.noreply.github.com> | 2023-09-16 08:23:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-16 10:23:36 -0400 |
| commit | a321031cb2683eec3ace7918a30a6d45db9cdd04 (patch) | |
| tree | 6e0ed674db59afee06f1b34fffc8a7ebc4c95f1f /src/JSystem/J2DGraph/J2DPane.cpp | |
| parent | f67a9d94116f11f8874bf2213924aa0926e2f76d (diff) | |
Progress on J2DPane, JUTResFont (#39)
Diffstat (limited to 'src/JSystem/J2DGraph/J2DPane.cpp')
| -rw-r--r-- | src/JSystem/J2DGraph/J2DPane.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/JSystem/J2DGraph/J2DPane.cpp b/src/JSystem/J2DGraph/J2DPane.cpp index 09f06091..66b9a60d 100644 --- a/src/JSystem/J2DGraph/J2DPane.cpp +++ b/src/JSystem/J2DGraph/J2DPane.cpp @@ -5,6 +5,7 @@ #include "JSystem/J2DGraph/J2DPane.h" #include "JSystem/JSupport/JSURandomInputStream.h" +#include "dolphin/gx/GXEnum.h" #include "dolphin/types.h" /* 802CF8F4-802CF984 .text __ct__7J2DPaneFv */ @@ -180,8 +181,18 @@ J2DPane* J2DPane::search(u32 tag) { } /* 802D0714-802D0800 .text makeMatrix__7J2DPaneFff */ -void J2DPane::makeMatrix(float, float) { - /* Nonmatching */ +void J2DPane::makeMatrix(f32 x, f32 y) { + Mtx stack1, stack2, stack3; + if (mRotation != 0.0f) { + MTXTrans(stack1, -mBasePosition.x, -mBasePosition.y, 0.0f); + f32 rot = mRotationAxis == ROTATE_Z ? -mRotation : mRotation; + MTXRotRad(stack2, mRotationAxis, rot * 0.017445329f); + MTXTrans(stack3, mBasePosition.x + x, mBasePosition.y + y, 0.0f); + MTXConcat(stack2, stack1, mMtx); + MTXConcat(stack3, mMtx, mMtx); + } else { + MTXTrans(mMtx, x, y, 0.0f); + } } /* 802D0800-802D08D8 .text setBasePosition__7J2DPaneF15J2DBasePosition */ @@ -209,13 +220,3 @@ void J2DPane::setBasePosition(J2DBasePosition pos) { mRotationAxis = ROTATE_Z; calcMtx(); } - -/* 802D08D8-802D08DC .text drawSelf__7J2DPaneFffPA3_A4_f */ -// void J2DPane::drawSelf(float, float, float (*)[3][4]) { -// /* Nonmatching */ -// } - -/* 802D08DC-802D08E4 .text getTypeID__7J2DPaneFv */ -// u16 J2DPane::getTypeID() { -// /* Nonmatching */ -// } |
