A few small matches for 2dnumber/meter

This commit is contained in:
LagoLunatic
2025-02-11 17:08:48 -05:00
parent 458c40ede8
commit f51b9b65df
6 changed files with 36 additions and 23 deletions
+7
View File
@@ -97,6 +97,13 @@ public:
void outFontStickAnimePiece(u8, u8);
void move();
void setAlpha(u8);
/* 0x00 */ u8 m00[0x08 - 0x00];
/* 0x08 */ J2DPane* m08[3];
/* 0x14 */ J2DPane* m14;
/* 0x18 */ J2DPane* m18;
/* 0x1C */ u8 m1C[0x20 - 0x1C];
/* 0x20 */ JUTFont* m20;
};
#endif /* D_2DNUMBER_H */
+1 -1
View File
@@ -480,7 +480,7 @@ fpc_ProcID fopAcM_createChild(s16 procName, fpc_ProcID parentPId, u32 parameters
createFunc p_createFunc = NULL);
fpc_ProcID fopAcM_createChild(char* pProcNameString, fpc_ProcID parentPcId, u32 parameter, cXyz* pPos,
int roomNo, csXyz* pAngle, cXyz* pScale, createFunc createFunc);
int roomNo, csXyz* pAngle, cXyz* pScale = NULL, createFunc createFunc = NULL);
fpc_ProcID fopAcM_createChildFromOffset(s16 procName, fpc_ProcID parentProcID, u32 actorParams,
cXyz* p_pos, int roomNo, csXyz* p_angle,
-1
View File
@@ -11,7 +11,6 @@
#include "m_Do/m_Do_mtx.h"
#include "d/d_kankyo.h"
#include "JSystem/J3DGraphBase/J3DMaterial.h"
#include "dolphin/mtx/mtx.h"
static u16 anim_table[] = {
KWOOD_00_BCK_SWING02, KWOOD_00_BAS_SWING02,
+1 -1
View File
@@ -3283,7 +3283,7 @@ BOOL daNpc_Ji1_c::CreateInit() {
cXyz temp(190.0f, 230.0f, -1100.0f);
csXyz temp2(0, 0, 0);
fopAcM_createChild("Kmon", fopAcM_GetID(this), 0, &temp, fopAcM_GetRoomNo(this), &temp2, 0, (createFunc)0);
fopAcM_createChild("Kmon", fopAcM_GetID(this), 0, &temp, fopAcM_GetRoomNo(this), &temp2);
fopAcM_SetMtx(this, field_0x330->getModel()->getBaseTRMtx());
fopAcM_setCullSizeBox(this, -70.0f, 0.0f, -70.0f, 70.0f, 200.0f, 70.0f);
gravity = -30.0f;
+23 -17
View File
@@ -17,7 +17,7 @@ dDlst_2DNumber_c::~dDlst_2DNumber_c() {
}
/* 800C8510-800C8644 .text init__16dDlst_2DNumber_cFissssUc */
bool dDlst_2DNumber_c::init(int digitNum, s16 x, s16 y, s16 w, s16 h, u8 flag) { /* Nonmatching */
bool dDlst_2DNumber_c::init(int digitNum, s16 x, s16 y, s16 w, s16 h, u8 flag) {
mDigitNum = digitNum;
mFlag = flag;
mWidth = w;
@@ -159,28 +159,25 @@ bool dDlst_2DBattery_c::init(ResTIMG* rule, ResTIMG* battery, ResTIMG* batteryBa
/* 800C8FAC-800C90F0 .text setRotate__17dDlst_2DBattery_cFf */
void dDlst_2DBattery_c::setRotate(f32 rot) {
/* Nonmatching */
// calculate the angle text
int angle = ((rot - 22.5f) / 22.5f) * 35.0f + 15.0f + 0.5f;
f32 angle = ((rot - 22.5f) / 22.5f) * 35.0f + 15.0f;
char buf[16];
sprintf(buf, "rupy_num_%02d.bti", angle / 10);
sprintf(buf, "rupy_num_%02d.bti", (int)(angle + 0.5f) / 10);
mNum[2][0]->changeTexture(buf, 0);
mNum[2][1]->changeTexture(buf, 0);
sprintf(buf, "rupy_num_%02d.bti", angle % 10);
sprintf(buf, "rupy_num_%02d.bti", (int)(angle + 0.5f) % 10);
mNum[1][0]->changeTexture(buf, 0);
mNum[1][1]->changeTexture(buf, 0);
// calculate the visual angle
f32 deg;
if (rot < 20.0f) {
deg = 345.0f;
rot = 345.0f;
} else if (rot > 45.0f) {
deg = 310.0f;
rot = 310.0f;
} else {
deg = 360.0f - ((rot - 20.0f) * 1.4f + 15.0f);
rot = 360.0f - ((rot - 20.0f) * 1.4f + 15.0f);
}
mRotation = deg;
mRotation = rot;
}
/* 800C90F0-800C9348 .text draw__17dDlst_2DBattery_cFv */
@@ -252,13 +249,15 @@ void dDlst_2DOutFont_c::setPaneEx(JUTFont*, fopMsgM_pane_class*, fopMsgM_pane_cl
}
/* 800C9844-800C9854 .text setRuby__17dDlst_2DOutFont_cFP7JUTFontP18fopMsgM_pane_class */
void dDlst_2DOutFont_c::setRuby(JUTFont*, fopMsgM_pane_class*) {
/* Nonmatching */
void dDlst_2DOutFont_c::setRuby(JUTFont* font, fopMsgM_pane_class* pane) {
m20 = font;
m18 = pane->pane;
}
/* 800C9854-800C9864 .text setRubyEx__17dDlst_2DOutFont_cFP7JUTFontP18fopMsgM_pane_classPc */
void dDlst_2DOutFont_c::setRubyEx(JUTFont*, fopMsgM_pane_class*, char*) {
/* Nonmatching */
void dDlst_2DOutFont_c::setRubyEx(JUTFont* font, fopMsgM_pane_class* pane, char*) {
m20 = font;
m18 = pane->pane;
}
/* 800C9864-800C9908 .text charWidth__17dDlst_2DOutFont_cFi */
@@ -307,6 +306,13 @@ void dDlst_2DOutFont_c::move() {
}
/* 800CB474-800CB4B0 .text setAlpha__17dDlst_2DOutFont_cFUc */
void dDlst_2DOutFont_c::setAlpha(u8) {
/* Nonmatching */
void dDlst_2DOutFont_c::setAlpha(u8 alpha) {
for (int i = 0; i < ARRAY_SIZE(m08); i++) {
if (m08[i] != NULL) {
m08[i]->setAlpha(alpha);
}
}
if (m14 != NULL) {
m14->setAlpha(alpha);
}
}
+4 -3
View File
@@ -901,9 +901,10 @@ void dMeter_parentPaneTrans(fopMsgM_pane_class* pane, f32 scale) {
/* 801F08DC-801F09D8 .text dMeter_childPaneTrans__FP18fopMsgM_pane_classP18fopMsgM_pane_classf */
void dMeter_childPaneTrans(fopMsgM_pane_class* pane, fopMsgM_pane_class* parent, f32 scale) {
/* Nonmatching */
pane->mPosCenter.x += (pane->mPosCenterOrig.x - parent->mPosCenterOrig.x) * (scale - 1.0f);
pane->mPosCenter.y += (pane->mPosCenterOrig.y - parent->mPosCenterOrig.y) * (scale - 1.0f);
f32 x = pane->mPosCenterOrig.x - parent->mPosCenterOrig.x;
f32 y = pane->mPosCenterOrig.y - parent->mPosCenterOrig.y;
pane->mPosCenter.x += x * (scale - 1.0f);
pane->mPosCenter.y += y * (scale - 1.0f);
pane->mPosCenter.x += g_meterHIO.field_0x50;
pane->mPosCenter.y += g_meterHIO.field_0x52;
fopMsgM_paneScaleXY(pane, scale);