Add developer-specific macros for g_regHIO child registers

This commit is contained in:
LagoLunatic
2024-07-04 00:57:17 -04:00
parent d71ff64d2d
commit 5778c31aed
20 changed files with 258 additions and 189 deletions
+69
View File
@@ -144,4 +144,73 @@ public:
extern dScnPly_reg_HIO_c g_regHIO;
extern dScnPly_env_HIO_c g_envHIO;
// Based on Twilight Princess debug, each g_envHIO child here was likely named after a specific developer.
// However, the developer name for each child isn't known here, so the below macro names are all unofficial.
#define REG0_F(i) g_regHIO.mChild[0].mFloatRegs[i]
#define REG0_S(i) g_regHIO.mChild[0].mShortRegs[i]
#define REG1_F(i) g_regHIO.mChild[1].mFloatRegs[i]
#define REG1_S(i) g_regHIO.mChild[1].mShortRegs[i]
#define REG2_F(i) g_regHIO.mChild[2].mFloatRegs[i]
#define REG2_S(i) g_regHIO.mChild[2].mShortRegs[i]
#define REG3_F(i) g_regHIO.mChild[3].mFloatRegs[i]
#define REG3_S(i) g_regHIO.mChild[3].mShortRegs[i]
#define REG4_F(i) g_regHIO.mChild[4].mFloatRegs[i]
#define REG4_S(i) g_regHIO.mChild[4].mShortRegs[i]
#define REG5_F(i) g_regHIO.mChild[5].mFloatRegs[i]
#define REG5_S(i) g_regHIO.mChild[5].mShortRegs[i]
#define REG6_F(i) g_regHIO.mChild[6].mFloatRegs[i]
#define REG6_S(i) g_regHIO.mChild[6].mShortRegs[i]
#define REG7_F(i) g_regHIO.mChild[7].mFloatRegs[i]
#define REG7_S(i) g_regHIO.mChild[7].mShortRegs[i]
#define REG8_F(i) g_regHIO.mChild[8].mFloatRegs[i]
#define REG8_S(i) g_regHIO.mChild[8].mShortRegs[i]
#define REG9_F(i) g_regHIO.mChild[9].mFloatRegs[i]
#define REG9_S(i) g_regHIO.mChild[9].mShortRegs[i]
#define REG10_F(i) g_regHIO.mChild[10].mFloatRegs[i]
#define REG10_S(i) g_regHIO.mChild[10].mShortRegs[i]
#define REG11_F(i) g_regHIO.mChild[11].mFloatRegs[i]
#define REG11_S(i) g_regHIO.mChild[11].mShortRegs[i]
#define REG12_F(i) g_regHIO.mChild[12].mFloatRegs[i]
#define REG12_S(i) g_regHIO.mChild[12].mShortRegs[i]
#define REG13_F(i) g_regHIO.mChild[13].mFloatRegs[i]
#define REG13_S(i) g_regHIO.mChild[13].mShortRegs[i]
#define REG14_F(i) g_regHIO.mChild[14].mFloatRegs[i]
#define REG14_S(i) g_regHIO.mChild[14].mShortRegs[i]
#define REG15_F(i) g_regHIO.mChild[15].mFloatRegs[i]
#define REG15_S(i) g_regHIO.mChild[15].mShortRegs[i]
#define REG16_F(i) g_regHIO.mChild[16].mFloatRegs[i]
#define REG16_S(i) g_regHIO.mChild[16].mShortRegs[i]
#define REG17_F(i) g_regHIO.mChild[17].mFloatRegs[i]
#define REG17_S(i) g_regHIO.mChild[17].mShortRegs[i]
#define REG18_F(i) g_regHIO.mChild[18].mFloatRegs[i]
#define REG18_S(i) g_regHIO.mChild[18].mShortRegs[i]
#define REG19_F(i) g_regHIO.mChild[19].mFloatRegs[i]
#define REG19_S(i) g_regHIO.mChild[19].mShortRegs[i]
#define REG20_F(i) g_regHIO.mChild[20].mFloatRegs[i]
#define REG20_S(i) g_regHIO.mChild[20].mShortRegs[i]
#define REG21_F(i) g_regHIO.mChild[21].mFloatRegs[i]
#define REG21_S(i) g_regHIO.mChild[21].mShortRegs[i]
#endif /* D_S_PLAY */
+16 -16
View File
@@ -38,7 +38,7 @@ BOOL ice_bg_check(enemyice* ei) {
}
} else if (ei->mBgAcch.ChkGroundHit()) {
ei->mSpeedF *= 0.5f;
if (ac->health <= 0 || speedY < -40.0f + g_regHIO.mChild[0].mFloatRegs[14]) {
if (ac->health <= 0 || speedY < -40.0f + REG0_F(14)) {
ret = TRUE;
}
if (speedY < -20.0f) {
@@ -141,18 +141,18 @@ BOOL enemy_ice(enemyice* ei) {
mDoMtx_stack_c::ZrotM(ac->shape_angle.z);
mDoMtx_stack_c::scaleM(ac->scale);
if (ei->mLightShrinkTimer < (s8)(70 + g_regHIO.mChild[14].mShortRegs[1])) {
cLib_addCalc0(&ei->mScaleXZ, 0.1f, 0.01f + g_regHIO.mChild[14].mFloatRegs[0]);
cLib_addCalc0(&ei->mScaleY, 0.1f, 0.01f + g_regHIO.mChild[14].mFloatRegs[0]);
if (ei->mLightShrinkTimer < (s8)(70 + REG14_S(1))) {
cLib_addCalc0(&ei->mScaleXZ, 0.1f, 0.01f + REG14_F(0));
cLib_addCalc0(&ei->mScaleY, 0.1f, 0.01f + REG14_F(0));
} else {
if (ei->mLightShrinkTimer == (s8)(70 + g_regHIO.mChild[14].mShortRegs[1])) {
if (ei->mLightShrinkTimer == (s8)(70 + REG14_S(1))) {
fopAcM_seStart(ac, JA_SE_CM_L_ARROW_PASS_AWAY, 0);
}
cLib_addCalc2(&ei->mScaleY, 5.0f + g_regHIO.mChild[14].mFloatRegs[1], 0.1f, 1.0f + g_regHIO.mChild[14].mFloatRegs[2]);
cLib_addCalc0(&ei->mScaleXZ, 0.1f + g_regHIO.mChild[14].mFloatRegs[3], 0.05f + g_regHIO.mChild[14].mFloatRegs[4]);
cLib_addCalc2(&ei->mScaleY, 5.0f + REG14_F(1), 0.1f, 1.0f + REG14_F(2));
cLib_addCalc0(&ei->mScaleXZ, 0.1f + REG14_F(3), 0.05f + REG14_F(4));
if (ei->mLightShrinkTimer > (s8)(90 + g_regHIO.mChild[14].mShortRegs[2])) {
if (ei->mLightShrinkTimer > (s8)(90 + REG14_S(2))) {
fopAcM_delete(ac);
fopAcM_onActor(ac);
if (fopAcM_GetName(ac) != PROC_PZ) {
@@ -241,8 +241,8 @@ BOOL enemy_ice(enemyice* ei) {
frozen = TRUE;
if (!fopAcM_CheckStatus(ac, fopAcStts_CARRY_e)) {
if (fopAcM_GetSpeedF(ac) > 0.0f) {
ei->mSpeedF = 25.0f + g_regHIO.mChild[0].mFloatRegs[5];
ei->mSpeed.y = 20.0f + g_regHIO.mChild[0].mFloatRegs[6];
ei->mSpeedF = 25.0f + REG0_F(5);
ei->mSpeed.y = 20.0f + REG0_F(6);
} else {
ei->mSpeedF = 5.0f;
ei->mSpeed.y = -15.0f;
@@ -486,14 +486,14 @@ void enemy_fire(enemyfire* ef) {
ef->mPrevPos = ac->current.pos;
f32 dirX = vel.x * (-0.02f + g_regHIO.mChild[0].mFloatRegs[4]);
f32 dirX = vel.x * (-0.02f + REG0_F(4));
if (dirX > 1.0f) {
dirX = 1.0f;
} else if (dirX < -1.0f) {
dirX = -1.0f;
}
f32 dirZ = vel.z * (-0.02f + g_regHIO.mChild[0].mFloatRegs[4]);
f32 dirZ = vel.z * (-0.02f + REG0_F(4));
if (dirZ > 1.0f) {
dirZ = 1.0f;
} else if (dirZ < -1.0f) {
@@ -503,12 +503,12 @@ void enemy_fire(enemyfire* ef) {
cLib_addCalc2(&ef->mDirection.x, dirX, 0.5f, 0.05f);
cLib_addCalc2(&ef->mDirection.z, dirZ, 0.5f, 0.05f);
ef->mDirection.y = 0.2f + g_regHIO.mChild[0].mFloatRegs[11];
ef->mDirection.y = 0.2f + REG0_F(11);
f32 speed = sqrtf(vel.x * vel.x + vel.y * vel.y + vel.z * vel.z);
speed = (0.03f + g_regHIO.mChild[0].mFloatRegs[12]) * speed + 1.0f;
if (speed > 1.5f + g_regHIO.mChild[0].mFloatRegs[13]) {
speed = 1.5f + g_regHIO.mChild[0].mFloatRegs[13];
speed = (0.03f + REG0_F(12)) * speed + 1.0f;
if (speed > 1.5f + REG0_F(13)) {
speed = 1.5f + REG0_F(13);
}
cLib_addCalc2(&ef->mFlameScaleY, speed, 0.5f, 0.05f);
+5 -5
View File
@@ -376,7 +376,7 @@ static BOOL bomb_nomi_check(am_class* i_this) {
if (fpcM_GetName(hitActor) == PROC_BOMB) {
daBomb_c* bomb = (daBomb_c*)hitActor;
if (!bomb->getBombCheck_Flag() && bomb->getBombRestTime() > 1) {
f32 offsetY = 20.0f + g_regHIO.mChild[8].mFloatRegs[1];
f32 offsetY = 20.0f + REG8_F(1);
if (i_this->mMouthPos.y - offsetY < bomb->current.pos.y) {
// Swallow the bomb.
bomb->setBombCheck_Flag();
@@ -392,7 +392,7 @@ static BOOL bomb_nomi_check(am_class* i_this) {
} else if (fpcM_GetName(hitActor) == PROC_Bomb2) {
daBomb2::Act_c* bomb2 = (daBomb2::Act_c*)hitActor;
if (!bomb2->chk_eat() && bomb2->get_time() > 1) {
f32 offsetY = 20.0f + g_regHIO.mChild[8].mFloatRegs[1];
f32 offsetY = 20.0f + REG8_F(1);
if (i_this->mMouthPos.y - offsetY < bomb2->current.pos.y) {
// Swallow the bomb.
bomb2->set_eat();
@@ -414,8 +414,8 @@ static BOOL bomb_nomi_check(am_class* i_this) {
/* 00001138-000011E4 .text BG_check__FP8am_class */
static void BG_check(am_class* i_this) {
f32 halfHeight = 30.0f + g_regHIO.mChild[12].mFloatRegs[3];
f32 radius = 150.0f + g_regHIO.mChild[12].mFloatRegs[4];
f32 halfHeight = 30.0f + REG12_F(3);
f32 radius = 150.0f + REG12_F(4);
i_this->mAcchCir.SetWall(halfHeight, radius);
i_this->current.pos.y -= i_this->mCorrectionOffsetY;
@@ -1131,7 +1131,7 @@ static s32 daAM_Create(fopAc_ac_c* i_actor) {
if (i_this->mStartsInactive == 0xFF) {
i_this->mStartsInactive = 0;
}
if (g_regHIO.mChild[8].mShortRegs[9] != 0) {
if (REG8_S(9) != 0) {
i_this->mType = 1;
}
if (i_this->mPrmAreaRadius == 0xFF || i_this->mPrmAreaRadius == 0) {
+13 -13
View File
@@ -363,7 +363,7 @@ static BOOL body_atari_check(am2_class* i_this) {
/* 00000F54-00000FF4 .text BG_check__FP9am2_class */
static void BG_check(am2_class* i_this) {
f32 halfHeight = 40.0f + g_regHIO.mChild[8].mFloatRegs[12];
f32 halfHeight = 40.0f + REG8_F(12);
i_this->mAcchCir.SetWall(halfHeight, i_this->mAcchRadius);
i_this->current.pos.y -= i_this->mCorrectionOffsetY;
@@ -378,7 +378,7 @@ static BOOL Line_check(am2_class* i_this, cXyz destPos) {
fopAc_ac_c* actor = i_this;
dBgS_LinChk linChk;
cXyz centerPos = actor->current.pos;
centerPos.y += 100.0f + g_regHIO.mChild[12].mFloatRegs[19];
centerPos.y += 100.0f + REG12_F(19);
i_this->mLinChkCenter = centerPos;
i_this->mLinChkDest = destPos;
linChk.Set(&centerPos, &destPos, actor);
@@ -413,7 +413,7 @@ static BOOL naraku_check(am2_class* i_this) {
i_this->mCountDownTimers[4] = 1*30;
waterPillarPos.y = i_this->mAcch.m_wtr.GetHeight();
f32 centerY = i_this->current.pos.y + 80.0f;
f32 scaleY = (0.1f + g_regHIO.mChild[8].mFloatRegs[1]) * (waterPillarPos.y - centerY);
f32 scaleY = (0.1f + REG8_F(1)) * (waterPillarPos.y - centerY);
if (scaleY < 0.0f) {
scaleY = 0.3f;
} else if (scaleY > 1.0f) {
@@ -431,7 +431,7 @@ static BOOL naraku_check(am2_class* i_this) {
}
}
f32 waterSinkDepth = 80.0f + g_regHIO.mChild[12].mFloatRegs[0];
f32 waterSinkDepth = 80.0f + REG12_F(0);
if (i_this->current.pos.y < i_this->mAcch.m_wtr.GetHeight() - waterSinkDepth) {
i_this->speedF = 0.0f;
i_this->speed.setall(0.0f);
@@ -457,7 +457,7 @@ static void action_dousa(am2_class* i_this) {
offset.set(0.0f, 0.0f, 200.0f);
MtxPosition(&offset, &rotOffset);
rotOffset += i_this->current.pos;
rotOffset.y += 100.0f + g_regHIO.mChild[12].mFloatRegs[19];
rotOffset.y += 100.0f + REG12_F(19);
}
switch (i_this->mState) {
@@ -465,7 +465,7 @@ static void action_dousa(am2_class* i_this) {
for (int i = 0; i < ARRAY_SIZE(i_this->mCountUpTimers); i++) {
i_this->mCountUpTimers[i] = 0;
}
i_this->mAcchRadius = 80.0f + g_regHIO.mChild[8].mFloatRegs[11];
i_this->mAcchRadius = 80.0f + REG8_F(11);
if (i_this->mCurrBckIdx != AM2_BCK_WAIT) {
anm_init(i_this, AM2_BCK_WAIT, 10.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1);
}
@@ -475,7 +475,7 @@ static void action_dousa(am2_class* i_this) {
f32 playerDist = fopAcM_searchPlayerDistance(i_this);
if (playerDist < i_this->mAreaRadius) {
cXyz centerPos = player->current.pos;
centerPos.y += 100.0f + g_regHIO.mChild[12].mFloatRegs[19];
centerPos.y += 100.0f + REG12_F(19);
if (Line_check(i_this, centerPos)) {
i_this->attention_info.flags = fopAc_Attn_LOCKON_BATTLE_e;
fopAcM_OnStatus(i_this, fopAcStts_SHOWMAP_e);
@@ -663,7 +663,7 @@ static void action_mahi(am2_class* i_this) {
i_this->mCountUpTimers[1] = 0;
}
if (fopAcM_CheckStatus(actor, fopAcStts_CARRY_e)) {
i_this->mAcchRadius = 40.0f + g_regHIO.mChild[8].mFloatRegs[10];
i_this->mAcchRadius = 40.0f + REG8_F(10);
i_this->mbMadeWaterSplash = false;
i_this->mRippleCb.end();
i_this->mPickedUpYPos = actor->current.pos.y;
@@ -687,7 +687,7 @@ static void action_mahi(am2_class* i_this) {
cLib_addCalcAngleS2(&actor->shape_angle.y, actor->current.angle.y, 1, 0x1000);
}
if (!fopAcM_CheckStatus(actor, fopAcStts_CARRY_e)) {
i_this->mAcchRadius = 40.0f + g_regHIO.mChild[8].mFloatRegs[10];
i_this->mAcchRadius = 40.0f + REG8_F(10);
i_this->mBodyCyl.OnCoSetBit();
if (actor->speedF > 0.0f) {
actor->gravity = -5.0f;
@@ -1129,7 +1129,7 @@ static BOOL daAM2_Execute(am2_class* i_this) {
actor->attention_info.position = actor->current.pos;
actor->attention_info.position.y += 120.0f;
actor->eyePos = i_this->mEyeballPos;
actor->eyePos.y -= 15.0f + g_regHIO.mChild[8].mFloatRegs[2];
actor->eyePos.y -= 15.0f + REG8_F(2);
i_this->mBodyCyl.SetC(i_this->current.pos);
i_this->mBodyCyl.SetH(150.0f);
@@ -1138,7 +1138,7 @@ static BOOL daAM2_Execute(am2_class* i_this) {
i_this->mNeedleCyl.SetC(i_this->mNeedlePos);
i_this->mNeedleCyl.SetH(20.0f);
i_this->mNeedleCyl.SetR(55.0f + g_regHIO.mChild[8].mFloatRegs[3]);
i_this->mNeedleCyl.SetR(55.0f + REG8_F(3));
dComIfG_Ccsp()->Set(&i_this->mNeedleCyl);
i_this->mEyeSph.SetC(i_this->mEyeballPos);
@@ -1272,7 +1272,7 @@ static s32 daAM2_Create(fopAc_ac_c* i_actor) {
if (i_this->mStartsInactive == 0xFF) {
i_this->mStartsInactive = 0;
}
if (g_regHIO.mChild[8].mShortRegs[9] != 0) {
if (REG8_S(9) != 0) {
i_this->mType = 1;
}
if (i_this->mPrmAreaRadius == 0xFF || i_this->mPrmAreaRadius == 0) {
@@ -1459,7 +1459,7 @@ static s32 daAM2_Create(fopAc_ac_c* i_actor) {
i_this->mState = 0xC;
}
i_this->mAcchRadius = 40.0f + g_regHIO.mChild[8].mFloatRegs[10];
i_this->mAcchRadius = 40.0f + REG8_F(10);
}
return phase_state;
+2 -2
View File
@@ -355,10 +355,10 @@ void daArrow_c::ShieldReflect() {
fopAc_ac_c* ganondorf;
if (fopAcM_SearchByName(PROC_GND, &ganondorf) && dComIfGp_getAttention().LockonTruth() && dComIfGp_getAttention().LockonTarget(0) == ganondorf) {
cXyz ganondorfChestPos = ganondorf->current.pos;
ganondorfChestPos.y = 130.0f + g_regHIO.mChild[8].mFloatRegs[0];
ganondorfChestPos.y = 130.0f + REG8_F(0);
targetAngleX = -cLib_targetAngleX(&link->current.pos, &ganondorfChestPos);
fpcM_SetParam(ganondorf, 0x23);
mSparkleTimer = 15 + g_regHIO.mChild[0].mShortRegs[3];
mSparkleTimer = 15 + REG0_S(3);
mpSparkleEmitter = dComIfGp_particle_set(0x3EE, &link->current.pos);
}
+59 -59
View File
@@ -178,7 +178,7 @@ static void smoke_set_s(bk_class* i_this, f32 rate) {
JGeometry::TVec3<f32> scale;
scale.x = scale.y = scale.z = 1.2f;
emitter1->setGlobalScale(scale);
scale.x = scale.y = scale.z = 1.5f + g_regHIO.mChild[0].mFloatRegs[16];
scale.x = scale.y = scale.z = 1.5f + REG0_F(16);
emitter1->setGlobalParticleScale(scale);
}
break;
@@ -213,7 +213,7 @@ static void ground_smoke_set(bk_class* i_this) {
MtxPosition(&sp8, &i_this->m0338);
i_this->m0344.y = i_this->m034A;
smoke_set_s(i_this, 6.0f);
i_this->m034A = i_this->m034A + 2000 + g_regHIO.mChild[0].mShortRegs[7];
i_this->m034A = i_this->m034A + 2000 + REG0_S(7);
} else if (i_this->m034E == 1) {
cMtx_YrotM(*calc_mtx, i_this->current.angle.y);
cMtx_YrotM(*calc_mtx, i_this->m034A);
@@ -441,7 +441,7 @@ static void br_draw(bk_class* i_this) {
if (i_this->m02F0 == 0) {
return;
}
if (g_regHIO.mChild[6].mShortRegs[3] != 0) {
if (REG6_S(3) != 0) {
return;
}
@@ -468,10 +468,10 @@ static void br_draw(bk_class* i_this) {
}
MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(0x2C), *calc_mtx);
MtxTrans(150.0f + l_bkHIO.m100, g_regHIO.mChild[8].mFloatRegs[1], g_regHIO.mChild[8].mFloatRegs[2], 1);
s16 angleX = g_regHIO.mChild[8].mShortRegs[6] + 0x4000;
MtxTrans(150.0f + l_bkHIO.m100, REG8_F(1), REG8_F(2), 1);
s16 angleX = REG8_S(6) + 0x4000;
cMtx_XrotM(*calc_mtx, angleX);
s16 angleZ = g_regHIO.mChild[8].mShortRegs[7] + 0x4000;
s16 angleZ = REG8_S(7) + 0x4000;
cMtx_ZrotM(*calc_mtx, angleZ);
MtxScale(l_bkHIO.m018 * i_this->m02EC, l_bkHIO.m018, l_bkHIO.m018, 1);
model->setBaseTRMtx(*calc_mtx);
@@ -486,11 +486,11 @@ static void daBk_shadowDraw(bk_class* i_this) {
if (!fopAcM_checkCarryNow(i_this)) {
cXyz shadowPos(
i_this->current.pos.x,
i_this->current.pos.y + 150.0f + g_regHIO.mChild[8].mFloatRegs[18],
i_this->current.pos.y + 150.0f + REG8_F(18),
i_this->current.pos.z
);
f32 temp = 800.0f + g_regHIO.mChild[8].mFloatRegs[19];
f32 shadowSize = 40.0f + g_regHIO.mChild[8].mFloatRegs[17];
f32 temp = 800.0f + REG8_F(19);
f32 shadowSize = 40.0f + REG8_F(17);
i_this->mShadowId = dComIfGd_setShadow(
i_this->mShadowId, 1, model, &shadowPos, temp, shadowSize,
i_this->current.pos.y, i_this->dr.mAcch.GetGroundH(),
@@ -1344,7 +1344,7 @@ static void stand(bk_class* i_this) {
break;
}
i_this->speed.y = 100.0f + g_regHIO.mChild[0].mFloatRegs[16];
i_this->speed.y = 100.0f + REG0_F(16);
anm_init(i_this, BK_BCK_BK_JUMP1, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, BK_BAS_BK_JUMP1);
fopAcM_monsSeStart(i_this, JA_SE_CV_BK_JUMP, 0);
i_this->dr.m004 = 0x35;
@@ -1445,12 +1445,12 @@ static void stand2(bk_class* i_this) {
cXyz sp24;
if (i_this->mpSearchLight != NULL) {
cMtx_YrotS(*calc_mtx, i_this->mpSearchLight->current.angle.y);
sp24.x = g_regHIO.mChild[8].mFloatRegs[11] + 320.0f;
sp24.y = g_regHIO.mChild[8].mFloatRegs[12] + 114.0f;
sp24.z = g_regHIO.mChild[8].mFloatRegs[13] + -55.0f;
sp24.x = REG8_F(11) + 320.0f;
sp24.y = REG8_F(12) + 114.0f;
sp24.z = REG8_F(13) + -55.0f;
MtxPosition(&sp24, &i_this->home.pos);
i_this->home.pos += i_this->mpSearchLight->current.pos;
i_this->home.angle.y = i_this->mpSearchLight->current.angle.y + g_regHIO.mChild[8].mShortRegs[4];
i_this->home.angle.y = i_this->mpSearchLight->current.angle.y + REG8_S(4);
}
switch (i_this->dr.m004) {
@@ -1619,7 +1619,7 @@ static void attack_set(bk_class* i_this, u8 r28) {
i_this->m0B64 = 0.0f;
i_this->m0300[4] = 0;
cM_rndF(100.0f);
i_this->m1040.SetR(60.0f + g_regHIO.mChild[8].mFloatRegs[3]);
i_this->m1040.SetR(60.0f + REG8_F(3));
if (r28 == 2) {
i_this->m1040.SetAtType(AT_TYPE_UNK2000);
@@ -1634,23 +1634,23 @@ static void attack_set(bk_class* i_this, u8 r28) {
if (r28 == 0) {
i_this->m0B5C = 0;
i_this->m0B68 = 23.0f + g_regHIO.mChild[6].mFloatRegs[4];
i_this->m0B6C = 26.0f + g_regHIO.mChild[6].mFloatRegs[5];
i_this->m0B68 = 23.0f + REG6_F(4);
i_this->m0B6C = 26.0f + REG6_F(5);
i_this->m0B70 = 45.0f;
i_this->m0B74 = l_bkHIO.m09C;
} else if (r28 == 1) {
i_this->m0B5C = 1;
i_this->m0B68 = 3.0f + g_regHIO.mChild[6].mFloatRegs[8];
i_this->m0B6C = 9.0f + g_regHIO.mChild[6].mFloatRegs[9];
i_this->m0B68 = 3.0f + REG6_F(8);
i_this->m0B6C = 9.0f + REG6_F(9);
i_this->m0B70 = 45.0f;
i_this->m0B74 = 0.0f;
} else if (r28 == 2) {
i_this->m0B5C = 2;
i_this->m0B68 = g_regHIO.mChild[6].mFloatRegs[4];
i_this->m0B6C = 20.0f + g_regHIO.mChild[6].mFloatRegs[5];
i_this->m0B68 = REG6_F(4);
i_this->m0B6C = 20.0f + REG6_F(5);
i_this->m0B70 = 45.0f;
i_this->m0B74 = 0.0f;
i_this->m1040.SetR(25.0f + g_regHIO.mChild[8].mFloatRegs[3]);
i_this->m1040.SetR(25.0f + REG8_F(3));
}
i_this->m0B7A = 1;
@@ -1755,9 +1755,9 @@ static void fight_run(bk_class* i_this) {
if (i_this->dr.mAcch.ChkGroundHit() && i_this->mpMorf->isStop()) {
i_this->m1210 = 1;
anm_init(i_this, BK_BCK_BK_JUMP1, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, BK_BAS_BK_JUMP1);
i_this->speed.y = 65.0f + cM_rndF(10.0f + g_regHIO.mChild[8].mFloatRegs[7]) + g_regHIO.mChild[8].mFloatRegs[8];
i_this->speed.y = 65.0f + cM_rndF(10.0f + REG8_F(7)) + REG8_F(8);
if ((i_this->m02DD & 0xC) == 0) {
s16 temp = cM_rndFX(3000.0f + g_regHIO.mChild[6].mFloatRegs[13]);;
s16 temp = cM_rndFX(3000.0f + REG6_F(13));;
i_this->current.angle.y += temp;
}
fopAcM_monsSeStart(i_this, JA_SE_CV_BK_JUMP, 0);
@@ -1813,7 +1813,7 @@ static void fight_run(bk_class* i_this) {
case 0x03:
cLib_addCalc2(&i_this->speedF, l_bkHIO.m060, 1.0f, 20.0f);
if (r29) {
i_this->speed.y = 100.0f + g_regHIO.mChild[0].mFloatRegs[16];
i_this->speed.y = 100.0f + REG0_F(16);
anm_init(i_this, BK_BCK_BK_JUMP1, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, BK_BAS_BK_JUMP1);
fopAcM_monsSeStart(i_this, JA_SE_CV_BK_JUMP, 0);
i_this->dr.m004 = 0x21;
@@ -1934,8 +1934,8 @@ static void fight_run(bk_class* i_this) {
attack_set(i_this, 1);
anm_init(i_this, BK_BCK_BK_JUMP1, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, BK_BAS_BK_JUMP1);
i_this->dr.m004 = -0xA;
i_this->speedF = -60.0f + g_regHIO.mChild[0].mFloatRegs[3];
i_this->speed.y = 80.0f + g_regHIO.mChild[0].mFloatRegs[4];
i_this->speedF = -60.0f + REG0_F(3);
i_this->speed.y = 80.0f + REG0_F(4);
fopAcM_monsSeStart(i_this, JA_SE_CV_BK_JUMP, 0);
}
}
@@ -1947,9 +1947,9 @@ static void fight_run(bk_class* i_this) {
daBk_player_view_check(i_this, &i_this->dr.m714->current.pos, i_this->m0332, l_bkHIO.m034)
) {
i_this->m02FC++;
s16 temp = 0x19 + g_regHIO.mChild[0].mShortRegs[0];
s16 temp = 0x19 + REG0_S(0);
if (i_this->m02FC >= temp) {
if (cM_rndF(1.0f) < 0.5f + g_regHIO.mChild[0].mFloatRegs[0] &&
if (cM_rndF(1.0f) < 0.5f + REG0_F(0) &&
(ground_4_check(i_this, 4, i_this->current.angle.y, 200.0f) & 0xD) == 0
) {
i_this->dr.mState = 7;
@@ -1973,7 +1973,7 @@ static void fight_run(bk_class* i_this) {
i_this->dr.mState = 9;
i_this->dr.m004 = 0;
}
i_this->m02DD = ground_4_check(i_this, 4, i_this->current.angle.y, 90.0f + g_regHIO.mChild[6].mFloatRegs[7]);
i_this->m02DD = ground_4_check(i_this, 4, i_this->current.angle.y, 90.0f + REG6_F(7));
if (i_this->m0314 != 0) {
if (fabsf(i_this->speedF) < 30.0f) {
if (i_this->m0318 == 0) {
@@ -2038,8 +2038,8 @@ static void oshi(bk_class* i_this) {
attack_set(i_this, 1);
anm_init(i_this, BK_BCK_BK_JUMP1, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, BK_BAS_BK_JUMP1);
i_this->dr.m004 = -0xA;
i_this->speedF = -90.0f + g_regHIO.mChild[6].mFloatRegs[10];
i_this->speed.y = 85.0f + g_regHIO.mChild[6].mFloatRegs[11];
i_this->speedF = -90.0f + REG6_F(10);
i_this->speed.y = 85.0f + REG6_F(11);
fopAcM_monsSeStart(i_this, JA_SE_CV_BK_JUMP, 0);
}
@@ -2052,7 +2052,7 @@ static void hukki(bk_class* i_this) {
static void aite_miru(bk_class* i_this) {
switch (i_this->dr.m004) {
case 0:
i_this->m0300[1] = 20 + g_regHIO.mChild[0].mShortRegs[8];
i_this->m0300[1] = 20 + REG0_S(8);
i_this->speedF = 0.0f;
i_this->dr.m004 = 1;
// Fall-through
@@ -2195,9 +2195,9 @@ static void tate_mtx_set(bk_class* i_this) {
MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(jointIdx), *calc_mtx);
i_this->m02D0->setBaseTRMtx(*calc_mtx);
cXyz sp08;
sp08.x = g_regHIO.mChild[8].mFloatRegs[12];
sp08.y = g_regHIO.mChild[8].mFloatRegs[13];
sp08.z = g_regHIO.mChild[8].mFloatRegs[14];
sp08.x = REG8_F(12);
sp08.y = REG8_F(13);
sp08.z = REG8_F(14);
MtxPosition(&sp08, &i_this->m11CC);
}
}
@@ -2205,18 +2205,18 @@ static void tate_mtx_set(bk_class* i_this) {
/* 0000CD00-0000CE18 .text bou_mtx_set__FP8bk_class */
static void bou_mtx_set(bk_class* i_this) {
if (i_this->m02DC != 0) {
int jointIdx = 0x2C + g_regHIO.mChild[7].mShortRegs[4]; // buki joint
int jointIdx = 0x2C + REG7_S(4); // buki joint
MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(jointIdx), *calc_mtx);
s16 angleY = 0x4000 + g_regHIO.mChild[7].mShortRegs[0];
s16 angleY = 0x4000 + REG7_S(0);
cMtx_YrotM(*calc_mtx, angleY);
s16 angleX = g_regHIO.mChild[7].mShortRegs[1];
s16 angleX = REG7_S(1);
cMtx_XrotM(*calc_mtx, angleX);
s16 angleZ = g_regHIO.mChild[7].mShortRegs[2];
s16 angleZ = REG7_S(2);
cMtx_ZrotM(*calc_mtx, angleZ);
MtxTrans(
0.01f * g_regHIO.mChild[7].mFloatRegs[9],
0.01f * g_regHIO.mChild[7].mFloatRegs[10],
0.01f * g_regHIO.mChild[7].mFloatRegs[11] + 50.0f,
0.01f * REG7_F(9),
0.01f * REG7_F(10),
0.01f * REG7_F(11) + 50.0f,
1
);
i_this->m02D8->setBaseTRMtx(*calc_mtx);
@@ -2460,16 +2460,16 @@ static BOOL daBk_Execute(bk_class* i_this) {
if (i_this->m0B7B == 0) {
int jointIdx = 0x2C; // buki joint
MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(jointIdx), *calc_mtx);
s16 angleY = 0x3E80 + g_regHIO.mChild[8].mShortRegs[1];
s16 angleY = 0x3E80 + REG8_S(1);
cMtx_YrotM(*calc_mtx, angleY);
s16 angleX = g_regHIO.mChild[8].mShortRegs[2];
s16 angleX = REG8_S(2);
cMtx_XrotM(*calc_mtx, angleX);
s16 angleZ = g_regHIO.mChild[8].mShortRegs[3];
s16 angleZ = REG8_S(3);
cMtx_ZrotM(*calc_mtx, angleZ);
MtxTrans(
g_regHIO.mChild[8].mFloatRegs[9],
g_regHIO.mChild[8].mFloatRegs[10],
g_regHIO.mChild[8].mFloatRegs[11] + 65.0f,
REG8_F(9),
REG8_F(10),
REG8_F(11) + 65.0f,
1
);
} else {
@@ -2481,19 +2481,19 @@ static BOOL daBk_Execute(bk_class* i_this) {
);
cMtx_YrotM(*calc_mtx, i_this->shape_angle.y);
MtxTrans(
g_regHIO.mChild[6].mFloatRegs[7] - 40.0f,
g_regHIO.mChild[6].mFloatRegs[8] + 68.0f,
g_regHIO.mChild[6].mFloatRegs[9] + 82.0f,
REG6_F(7) - 40.0f,
REG6_F(8) + 68.0f,
REG6_F(9) + 82.0f,
1
);
s16 angleX = 0x5B1B + g_regHIO.mChild[8].mShortRegs[5];
s16 angleX = 0x5B1B + REG8_S(5);
cMtx_XrotM(*calc_mtx, angleX);
}
r29->setMatrix(*calc_mtx);
cXyz sp64;
sp64.x = g_regHIO.mChild[8].mFloatRegs[12];
sp64.y = g_regHIO.mChild[8].mFloatRegs[13];
sp64.z = g_regHIO.mChild[8].mFloatRegs[14];
sp64.x = REG8_F(12);
sp64.y = REG8_F(13);
sp64.z = REG8_F(14);
MtxPosition(&sp64, &i_this->m1178);
}
} else {
@@ -2975,7 +2975,7 @@ static s32 daBk_Create(fopAc_ac_c* i_actor) {
);
i_this->dr.mAcchCir.SetWall(40.0f, 40.0f);
i_this->dr.mAcch.ClrRoofNone();
i_this->dr.mAcch.SetRoofCrrHeight(80.0f + g_regHIO.mChild[0].mFloatRegs[7]);
i_this->dr.mAcch.SetRoofCrrHeight(80.0f + REG0_F(7));
i_this->dr.mAcch.OnLineCheck();
i_this->dr.mInvincibleTimer = 5;
@@ -3143,8 +3143,8 @@ static s32 daBk_Create(fopAc_ac_c* i_actor) {
i_this->model = i_this->mpMorf->getModel();
i_this->mEnemyIce.mpActor = i_this;
i_this->mEnemyIce.mWallRadius = 50.0f + g_regHIO.mChild[0].mFloatRegs[4];
i_this->mEnemyIce.mCylHeight = 180.0f + g_regHIO.mChild[0].mFloatRegs[5];
i_this->mEnemyIce.mWallRadius = 50.0f + REG0_F(4);
i_this->mEnemyIce.mCylHeight = 180.0f + REG0_F(5);
i_this->mEnemyIce.mDeathSwitch = i_this->m02B8;
i_this->mEnemyFire.mpMcaMorf = i_this->mpMorf;
+4 -4
View File
@@ -352,10 +352,10 @@ void daStandItem_c::set_mtx() {
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
if (mpCloth != NULL) {
cXyz offs[4];
offs[0] = cXyz(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 180.0f, 0.0f);
offs[1] = cXyz(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 180.0f, 0.0f);
offs[2] = cXyz(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 195.0f, 0.0f);
offs[3] = cXyz(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 180.0f, 0.0f);
offs[0] = cXyz(0.0f, REG10_F(15) + 180.0f, 0.0f);
offs[1] = cXyz(0.0f, REG10_F(15) + 180.0f, 0.0f);
offs[2] = cXyz(0.0f, REG10_F(15) + 195.0f, 0.0f);
offs[3] = cXyz(0.0f, REG10_F(15) + 180.0f, 0.0f);
cXyz wind;
cXyz pt = current.pos + offs[mClothType];
+1 -1
View File
@@ -68,7 +68,7 @@ void set_disappear(disappear_class* i_this, float scale) {
fopAcM_seStart(i_this, JA_SE_CM_MONS_EXPLODE, 0);
cXyz particleScale(scale, scale, scale);
i_this->mTimer = 58 + g_regHIO.mChild[8].mShortRegs[0];
i_this->mTimer = 58 + REG8_S(0);
switch (i_this->health) {
case 0x0:
+8 -8
View File
@@ -86,7 +86,7 @@ daGhostship_HIO_c::daGhostship_HIO_c() {
void daGhostship_c::pathMove() {
cLib_addCalc2(&speedF, mPathSpeed, 0.1f, 2.0f);
dLib_pathMove(&mPathPos, &mPathPntNo, mPath, speedF, &pathMove_CB, this);
cLib_addCalcPosXZ2(&current.pos, mPathPos, g_regHIO.mChild[12].mFloatRegs[0] + 0.01f, speedF);
cLib_addCalcPosXZ2(&current.pos, mPathPos, REG12_F(0) + 0.01f, speedF);
if(speedF != 0.0f && mPathSpeed != 0.0f) {
cLib_addCalcAngleS2(&shape_angle.y, cLib_targetAngleY(&current.pos, &mPathPos), 8, 0x100);
}
@@ -123,7 +123,7 @@ BOOL daGhostship_c::_pathMove(cXyz* curPos, cXyz* p_curPntPos, cXyz* p_nextPntPo
s16 angleLeftToTarget = cLib_addCalcAngleS(&current.angle.y, targetAngleY, 8, 0x200, 8);
f32 step = speedF * fabsf(cM_scos(angleLeftToTarget));
cLib_chasePosXZ(curPos, mNextPntPos, step);
if((*curPos - mNextPntPos).absXZ() < step * (g_regHIO.mChild[12].mFloatRegs[5] + 1.0f) || (*curPos - mNextPntPos).absXZ() == 0.0f) {
if((*curPos - mNextPntPos).absXZ() < step * (REG12_F(5) + 1.0f) || (*curPos - mNextPntPos).absXZ() == 0.0f) {
return TRUE;
}
@@ -188,9 +188,9 @@ void daGhostship_c::createInit() {
mPaths[i].mRadius = 100.0f * i;
f32 temp4 = 500.0f + g_regHIO.mChild[12].mFloatRegs[10];
mPaths[i].mWobbleAmplitude = 300.0f + g_regHIO.mChild[12].mFloatRegs[1];
mPaths[i].mAngleSpeed = temp2 * (0x100 + g_regHIO.mChild[12].mShortRegs[0] + 0x10 * i + cM_rndF(100.0f));
f32 temp4 = 500.0f + REG12_F(10);
mPaths[i].mWobbleAmplitude = 300.0f + REG12_F(1);
mPaths[i].mAngleSpeed = temp2 * (0x100 + REG12_S(0) + 0x10 * i + cM_rndF(100.0f));
mPaths[i].mTranslation.x = current.pos.x + temp4 * cM_ssin(shape_angle.y);
mPaths[i].mTranslation.y = 600.0f + current.pos.y + temp3 + cM_rndF(100.0f);
mPaths[i].mTranslation.z = current.pos.z + temp4 * cM_scos(shape_angle.y);
@@ -338,10 +338,10 @@ bool daGhostship_c::_execute() {
cLib_addCalc2(&mPaths[i].mRadius, field_0x6C4[i], 0.1f, 10.0f);
f32 temp = (500.0f + g_regHIO.mChild[12].mFloatRegs[10]);
f32 temp = (500.0f + REG12_F(10));
mPaths[i].mWobbleAmplitude = 300.0f + g_regHIO.mChild[12].mFloatRegs[1];
mPaths[i].mAngleSpeed = (5 + g_regHIO.mChild[12].mShortRegs[0] + i * 2 + cM_rndF(20.0f)) * temp2;
mPaths[i].mWobbleAmplitude = 300.0f + REG12_F(1);
mPaths[i].mAngleSpeed = (5 + REG12_S(0) + i * 2 + cM_rndF(20.0f)) * temp2;
mPaths[i].mTranslation.x = current.pos.x + temp * cM_ssin(shape_angle.y);
mPaths[i].mTranslation.y = 600.0f + current.pos.y + temp3;
+1 -1
View File
@@ -77,7 +77,7 @@ void daIball_c::setPointLight() {
mLight.mColor.r = light_color[color_idx][0];
mLight.mColor.g = light_color[color_idx][1];
mLight.mColor.b = light_color[color_idx][2];
s16 power = (80.0f + g_regHIO.mChild[12].mFloatRegs[0]) * mLightFlickerMult;
s16 power = (80.0f + REG12_F(0)) * mLightFlickerMult;
mLight.mPower = power;
mLight.mFluctuation = 250.0f;
}
+1 -1
View File
@@ -88,7 +88,7 @@ bool daIkari_c::_execute() {
f32 rotX = *windPow * 10000.0f * l_HIO.mWindPowerScale;
current.angle.x =
rotX + rotX * JMASSin(mTimer * (g_regHIO.mChild[0].mShortRegs[5] + 500) & 0xffff);
rotX + rotX * JMASSin(mTimer * (REG0_S(5) + 500) & 0xffff);
setMtx();
+2 -2
View File
@@ -73,8 +73,8 @@ BOOL daKaji_c::_delete() {
BOOL daKaji_c::_execute() {
// Copy the ship's transform (plus an offset) to the helm.
cXyz* offset = &cXyz(0.0f, 740.0f, -858.0f);
offset->y += g_regHIO.mChild[10].mFloatRegs[10];
offset->z += g_regHIO.mChild[10].mFloatRegs[11];
offset->y += REG10_F(10);
offset->z += REG10_F(11);
cMtx_multVec(l_p_ship->mpModel->getBaseTRMtx(), offset, &current.pos);
daObjPirateship::Act_c* ship = l_p_ship;
+30 -30
View File
@@ -18,7 +18,7 @@ static f32 kt_scale = 1.5f;
/* 00000078-000001BC .text kotori_draw__FP8kt_class */
void kotori_draw(kt_class* i_this) {
kt_scale = g_regHIO.mChild[0].mFloatRegs[0] + 1.0f;
kt_scale = REG0_F(0) + 1.0f;
MtxTrans(i_this->current.pos.x, i_this->current.pos.y + i_this->mLiftY, i_this->current.pos.z, false);
cMtx_YrotM(*calc_mtx, i_this->current.angle.y);
cMtx_XrotM(*calc_mtx, i_this->mAngleRoll);
@@ -57,7 +57,7 @@ void kotori_move(kt_class* i_this) {
f32 dx = player->current.pos.x - *(r28 = &i_this->current.pos.x);
f32 dz = player->current.pos.z - *(r27 = &i_this->current.pos.z);
f32 dist_xz = sqrtf(dx*dx + dz*dz);
cLib_addCalcAngleS2(&i_this->mAngleRoll, 0, 2, g_regHIO.mChild[0].mShortRegs[4] + 0x1000);
cLib_addCalcAngleS2(&i_this->mAngleRoll, 0, 2, REG0_S(4) + 0x1000);
f32 vx = i_this->mTargetPos.x - *r28;
f32 vy = i_this->mTargetPos.y - *(r26 = &i_this->current.pos.y);
@@ -90,13 +90,13 @@ void kotori_move(kt_class* i_this) {
i_this->mState = 1;
offs.x = 0.0f;
offs.y = 0.0f;
offs.z = g_regHIO.mChild[0].mFloatRegs[13] * 100.0f + 3000.0f;
offs.z = REG0_F(13) * 100.0f + 3000.0f;
cMtx_YrotS(*calc_mtx, player->shape_angle.y);
MtxPosition(&offs, &pt);
i_this->mTargetPosHome.x = player->current.pos.x + pt.x + cM_rndFX(g_regHIO.mChild[0].mFloatRegs[14] + 200.0f);
i_this->mTargetPosHome.x = player->current.pos.x + pt.x + cM_rndFX(REG0_F(14) + 200.0f);
i_this->mTargetPosHome.y = player->current.pos.y + 1000.0f;
i_this->mTargetPosHome.z = player->current.pos.z + pt.z + cM_rndFX(g_regHIO.mChild[0].mFloatRegs[14] + 200.0f);
i_this->mTargetPosHome.z = player->current.pos.z + pt.z + cM_rndFX(REG0_F(14) + 200.0f);
gndChk.SetPos(&i_this->mTargetPosHome);
i_this->mTargetPosHome.y = dComIfG_Bgsp()->GroundCross(&gndChk);
@@ -116,15 +116,15 @@ void kotori_move(kt_class* i_this) {
goto calc_012;
case 1:
dist = sqrtf(vx*vx + vy*vy + vz*vz);
if (dist < g_regHIO.mChild[0].mFloatRegs[1] * 10.0f + 800.0f) {
if (dist < REG0_F(1) * 10.0f + 800.0f) {
i_this->mState = 8;
}
cLib_addCalc2(&i_this->mSpeedLerp, 3.0f, 1.0f, 0.1f);
calc_012:
r18 = &i_this->current.angle.y;
cLib_addCalcAngleS2(r18, angleX, 10, (s16)((g_regHIO.mChild[0].mFloatRegs[2] * 10.0f + 500.0f) * i_this->mSpeedLerp));
cLib_addCalcAngleS2(r18, angleX, 10, (s16)((REG0_F(2) * 10.0f + 500.0f) * i_this->mSpeedLerp));
r17 = &i_this->current.angle.x;
cLib_addCalcAngleS2(r17, angleY, 10, (s16)((g_regHIO.mChild[0].mFloatRegs[2] * 10.0f + 500.0f) * i_this->mSpeedLerp));
cLib_addCalcAngleS2(r17, angleY, 10, (s16)((REG0_F(2) * 10.0f + 500.0f) * i_this->mSpeedLerp));
offs.x = 0.0f;
offs.y = 0.0f;
offs.z = i_this->mSpeedFwd;
@@ -140,9 +140,9 @@ calc_012:
break;
case 8:
r16 = &i_this->current.angle.y;
cLib_addCalcAngleS2(&i_this->current.angle.y, angleX, 10, (s16)((g_regHIO.mChild[0].mFloatRegs[3] * 10.0f + 1500.0f) * i_this->mSpeedLerp));
cLib_addCalc0(&i_this->mSpeedLerp, 1.0f, g_regHIO.mChild[0].mFloatRegs[4] + 0.05f);
cLib_addCalc0(&i_this->mSpeedFwd, 1.0f, g_regHIO.mChild[0].mFloatRegs[5] + 1.0f);
cLib_addCalcAngleS2(&i_this->current.angle.y, angleX, 10, (s16)((REG0_F(3) * 10.0f + 1500.0f) * i_this->mSpeedLerp));
cLib_addCalc0(&i_this->mSpeedLerp, 1.0f, REG0_F(4) + 0.05f);
cLib_addCalc0(&i_this->mSpeedFwd, 1.0f, REG0_F(5) + 1.0f);
offs.x = 0.0f;
offs.y = 0.0f;
offs.z = i_this->mSpeedFwd;
@@ -150,7 +150,7 @@ calc_012:
MtxPosition(&offs, &pt);
*r28 += pt.x;
*r27 += pt.z;
cLib_addCalc2(&*r26, i_this->mGroundY, g_regHIO.mChild[0].mFloatRegs[6] + 0.3f, g_regHIO.mChild[0].mFloatRegs[7] + 20.0f);
cLib_addCalc2(&*r26, i_this->mGroundY, REG0_F(6) + 0.3f, REG0_F(7) + 20.0f);
if (fabsf(*r26 - i_this->mGroundY) < 1.0f) {
*r26 = i_this->mGroundY;
i_this->mState = 10;
@@ -162,7 +162,7 @@ calc_012:
i_this->mTargetPos = headTopPos;
i_this->mTargetPos.y += 200.0f;
dist = sqrtf(vx*vx + vy*vy + vz*vz);
if (dist < g_regHIO.mChild[0].mFloatRegs[1] * 10.0f + 800.0f) {
if (dist < REG0_F(1) * 10.0f + 800.0f) {
i_this->mState = 9;
}
cLib_addCalc2(&i_this->mSpeedLerp, 3.0f, 1.0f, 0.1f);
@@ -172,9 +172,9 @@ calc_012:
i_this->mTargetPos = headTopPos;
i_this->mTargetPos.y += 100.0f;
r16 = &i_this->current.angle.y;
cLib_addCalcAngleS2(&i_this->current.angle.y, angleX, 10, (s16)((g_regHIO.mChild[0].mFloatRegs[3] * 10.0f + 1500.0f) * i_this->mSpeedLerp));
cLib_addCalc0(&i_this->mSpeedLerp, 1.0f, g_regHIO.mChild[0].mFloatRegs[4] + 0.05f);
cLib_addCalc0(&i_this->mSpeedFwd, 1.0f, g_regHIO.mChild[0].mFloatRegs[5] + 1.0f);
cLib_addCalcAngleS2(&i_this->current.angle.y, angleX, 10, (s16)((REG0_F(3) * 10.0f + 1500.0f) * i_this->mSpeedLerp));
cLib_addCalc0(&i_this->mSpeedLerp, 1.0f, REG0_F(4) + 0.05f);
cLib_addCalc0(&i_this->mSpeedFwd, 1.0f, REG0_F(5) + 1.0f);
offs.x = 0.0f;
offs.y = 0.0f;
offs.z = i_this->mSpeedFwd;
@@ -182,7 +182,7 @@ calc_012:
MtxPosition(&offs, &pt);
*r28 += pt.x;
*r27 += pt.z;
cLib_addCalc2(&*r26, i_this->mTargetPos.y, g_regHIO.mChild[0].mFloatRegs[6] + 0.5f, g_regHIO.mChild[0].mFloatRegs[7] + 20.0f);
cLib_addCalc2(&*r26, i_this->mTargetPos.y, REG0_F(6) + 0.5f, REG0_F(7) + 20.0f);
if (fabsf(*r26 - i_this->mTargetPos.y) < 1.0f) {
i_this->mState = 20;
i_this->mSpeedLerp = 0.0f;
@@ -195,7 +195,7 @@ calc_012:
cLib_addCalc2(&*r28, i_this->mTargetPos.x, 1.0f, i_this->mSpeedLerp);
cLib_addCalc2(&*r26, i_this->mTargetPos.y, 1.0f, i_this->mSpeedLerp * 0.5f);
cLib_addCalc2(&*r27, i_this->mTargetPos.z, 1.0f, i_this->mSpeedLerp);
cLib_addCalc2(&i_this->mSpeedLerp, 1000.0f, 1.0f, g_regHIO.mChild[0].mFloatRegs[16] + 10.0f);
cLib_addCalc2(&i_this->mSpeedLerp, 1000.0f, 1.0f, REG0_F(16) + 10.0f);
cLib_addCalcAngleS2(&i_this->current.angle.y, player->shape_angle.y, 2, 0x1000);
if (fabsf(*r26 - i_this->mTargetPos.y) > 1.0f)
dispWing = true;
@@ -205,25 +205,25 @@ calc_012:
i_this->mLiftYTimer = cM_rndFX(10.0f) + 10.0f;
i_this->mTargetPosHome.y += 2000.0f;
i_this->current.angle.x = -0x2000;
i_this->mTimer[2] = g_regHIO.mChild[0].mShortRegs[5] + 300;
i_this->mTimer[2] = REG0_S(5) + 300;
}
break;
case 10:
i_this->mLiftY += i_this->mLiftYTimer;
i_this->mLiftYTimer -= g_regHIO.mChild[0].mFloatRegs[8] * 0.1f + 5.0f;
i_this->mLiftYTimer -= REG0_F(8) * 0.1f + 5.0f;
if (i_this->mLiftY <= 0.0f) {
i_this->mLiftYTimer = g_regHIO.mChild[0].mFloatRegs[9] + 15.0f;
i_this->mLiftYTimer = REG0_F(9) + 15.0f;
i_this->mLiftY = 0.0f;
}
s16* r16_2 = &i_this->current.angle.y;
cLib_addCalcAngleS2(&i_this->current.angle.y, angleX, 10, (s16)(g_regHIO.mChild[0].mFloatRegs[10] * 10.0f + 500.0f));
cLib_addCalcAngleS2(&i_this->current.angle.y, angleX, 10, (s16)(REG0_F(10) * 10.0f + 500.0f));
if (i_this->mTimer[1] == 0 && i_this->mLiftY <= 0.0f) {
i_this->mTimer[1] = 20.0f + cM_rndF(20.0f);
i_this->mState = 11;
}
offs.x = 0.0f;
offs.y = 0.0f;
offs.z = g_regHIO.mChild[0].mFloatRegs[11] + 10.0f;
offs.z = REG0_F(11) + 10.0f;
mDoMtx_YrotS(*calc_mtx, *r16_2);
MtxPosition(&offs, &i_this->mSpeedVel);
*r28 += i_this->mSpeedVel.x;
@@ -232,9 +232,9 @@ calc_012:
break;
case 11:
if (i_this->mTimer[0] == 0) {
i_this->mTimer[0] = cM_rndF(2.0f) + 10.0f + g_regHIO.mChild[0].mFloatRegs[12];
i_this->mTimer[0] = cM_rndF(2.0f) + 10.0f + REG0_F(12);
}
if (i_this->mTimer[0] > (s16)(g_regHIO.mChild[0].mShortRegs[1] + 8)) {
if (i_this->mTimer[0] > (s16)(REG0_S(1) + 8)) {
cLib_addCalcAngleS2(&i_this->mAngleRoll, g_regHIO.mChild->mShortRegs[2] + 0x3000, 2, g_regHIO.mChild->mShortRegs[3] + 0x2000);
}
if (i_this->mTimer[1] == 0) {
@@ -245,13 +245,13 @@ calc_012:
}
calc_11:
*r26 -= 5.0f;
if (!i_this->mHitGround || dist_xz < (g_regHIO.mChild[0].mFloatRegs[15] * 100.0f + 1500.0f)) {
if (!i_this->mHitGround || dist_xz < (REG0_F(15) * 100.0f + 1500.0f)) {
i_this->mState = 0;
i_this->mTimer[0] = 0;
i_this->mLiftYTimer = 10.0f + cM_rndFX(10.0f);
i_this->mTargetPosHome.y += 2000.0f;
i_this->current.angle.x = -0x2000;
i_this->mTimer[2] = g_regHIO.mChild[0].mShortRegs[5] + 300;
i_this->mTimer[2] = REG0_S(5) + 300;
}
break;
}
@@ -291,7 +291,7 @@ calc_11:
/* 000011D4-00001240 .text daKt_Execute__FP8kt_class */
static BOOL daKt_Execute(kt_class* i_this) {
i_this->mWingTimer = i_this->mWingTimer + 0x5e76 + g_regHIO.mChild[0].mShortRegs[0];
i_this->mWingTimer = i_this->mWingTimer + 0x5e76 + REG0_S(0);
for (s32 i = 0; i < (s32)ARRAY_SIZE(i_this->mTimer); i++)
if (i_this->mTimer[i] != 0)
--i_this->mTimer[i];
@@ -334,7 +334,7 @@ static s32 daKt_Create(fopAc_ac_c* i_ac) {
if (fopAcM_entrySolidHeap(i_this, daKt_solidHeapCB, 0)) {
s32 num = fopAcM_GetParam(i_this);
if (num < 1000) {
i_this->current.pos.y = g_regHIO.mChild[0].mFloatRegs[0] * 10.0f + 2500.0f;
i_this->current.pos.y = REG0_F(0) * 10.0f + 2500.0f;
fopAcM_SetParam(i_this, 1000);
for (s32 i = 0; i < num; i++) {
fopAcM_prm_class* appen = fopAcM_CreateAppend();
@@ -349,7 +349,7 @@ static s32 daKt_Create(fopAc_ac_c* i_ac) {
i_this->mpModelWing->setBaseScale(i_this->scale);
i_this->current.pos.y += 2500.0f;
i_this->mTargetPosHome = i_this->mHomePos = i_this->current.pos;
i_this->mTimer[2] = g_regHIO.mChild[0].mShortRegs[5] + 500;
i_this->mTimer[2] = REG0_S(5) + 500;
} else {
rt = cPhs_ERROR_e;
}
+16 -16
View File
@@ -25,30 +25,30 @@ void ride_call_back(dBgW* bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) {
tmp = i_pt->old.pos - i_ac->current.pos;
MtxPosition(&tmp, &pos2);
s16 z = pos1.z * ((g_regHIO.mChild[0].mFloatRegs[0] + 20.0f) / i_ac->scale.z);
s16 x = -pos1.x * ((g_regHIO.mChild[0].mFloatRegs[0] + 20.0f) / i_ac->scale.x);
s16 z = pos1.z * ((REG0_F(0) + 20.0f) / i_ac->scale.z);
s16 x = -pos1.x * ((REG0_F(0) + 20.0f) / i_ac->scale.x);
cLib_addCalcAngleS2(&i_ac->current.angle.x, z, 10, 0x800);
cLib_addCalcAngleS2(&i_ac->current.angle.z, x, 10, 0x800);
f32 dist = (g_regHIO.mChild[0].mFloatRegs[4] + 50.0f) * fabsf(pos1.z - pos2.z);
f32 dist = (REG0_F(4) + 50.0f) * fabsf(pos1.z - pos2.z);
if (pActor->m2BC.x < dist) {
pActor->m2BC.x = dist;
}
dist = (g_regHIO.mChild[0].mFloatRegs[4] + 50.0f) * fabsf(pos1.x - pos2.x);
dist = (REG0_F(4) + 50.0f) * fabsf(pos1.x - pos2.x);
if (pActor->m2BC.z < dist) {
pActor->m2BC.z = dist;
}
dist = (g_regHIO.mChild[0].mFloatRegs[8] + 5.0f) * fabsf(pos1.x - pos2.x);
dist = (REG0_F(8) + 5.0f) * fabsf(pos1.x - pos2.x);
if (dist > 10.0f && pActor->m2B0.x < dist) {
cLib_addCalc2(&pActor->m2B0.x, dist, 1.0f, g_regHIO.mChild[0].mFloatRegs[7] + 1.2f);
cLib_addCalc2(&pActor->m2B0.x, dist, 1.0f, REG0_F(7) + 1.2f);
}
dist = (g_regHIO.mChild[0].mFloatRegs[8] + 5.0f) * fabsf(pos1.z - pos2.z);
dist = (REG0_F(8) + 5.0f) * fabsf(pos1.z - pos2.z);
if (dist > 10.0f && pActor->m2B0.z < dist) {
cLib_addCalc2(&pActor->m2B0.z, dist, 1.0f, g_regHIO.mChild[0].mFloatRegs[7] + 1.2f);
cLib_addCalc2(&pActor->m2B0.z, dist, 1.0f, REG0_F(7) + 1.2f);
}
}
@@ -71,7 +71,7 @@ void chain_Draw(msw_class* i_this) {
s32 var_r20;
if (i_this->m83C[i] != 0) {
var_r20 = i_this->m83C[i] * cM_ssin(i_this->m298 * 18000) * (g_regHIO.mChild[6].mFloatRegs[6] + 100.0f);
var_r20 = i_this->m83C[i] * cM_ssin(i_this->m298 * 18000) * (REG6_F(6) + 100.0f);
var_r4 = i_this->m298 * 3000;
} else {
var_r4 = 0;
@@ -119,14 +119,14 @@ void msw_move(msw_class* i_this) {
i_this->m2C8.x = i_this->m2BC.x * cM_ssin(i_this->m298 * 1500);
i_this->m2C8.z = i_this->m2BC.z * cM_ssin(i_this->m298 * 1300);
cLib_addCalc2(&i_this->m2BC.x, g_regHIO.mChild[0].mFloatRegs[9], 1.0f, g_regHIO.mChild[0].mFloatRegs[3] + 20.0f);
cLib_addCalc2(&i_this->m2BC.z, g_regHIO.mChild[0].mFloatRegs[9], 1.0f, g_regHIO.mChild[0].mFloatRegs[3] + 20.0f);
cLib_addCalc2(&i_this->m2BC.x, REG0_F(9), 1.0f, REG0_F(3) + 20.0f);
cLib_addCalc2(&i_this->m2BC.z, REG0_F(9), 1.0f, REG0_F(3) + 20.0f);
i_this->m2A4.x = i_this->m2B0.x * cM_ssin(i_this->m298 * 750);
i_this->m2A4.z = i_this->m2B0.z * cM_ssin(i_this->m298 * 900);
cLib_addCalc0(&i_this->m2B0.x, 1.0f, g_regHIO.mChild[0].mFloatRegs[6] + 0.25f);
cLib_addCalc0(&i_this->m2B0.z, 1.0f, g_regHIO.mChild[0].mFloatRegs[6] + 0.25f);
cLib_addCalc0(&i_this->m2B0.x, 1.0f, REG0_F(6) + 0.25f);
cLib_addCalc0(&i_this->m2B0.z, 1.0f, REG0_F(6) + 0.25f);
i_this->shape_angle = i_this->current.angle + i_this->m2C8;
i_this->current.pos = i_this->home.pos + i_this->m2A4;
@@ -152,9 +152,9 @@ static BOOL daMsw_Execute(msw_class* i_this) {
for (int chainIdx = 0; chainIdx < 4; chainIdx++) {
cXyz src;
src.x = (200.0f + g_regHIO.mChild[0].mFloatRegs[10]) * xd[chainIdx];
src.x = (200.0f + REG0_F(10)) * xd[chainIdx];
src.y = 0.0f;
src.z = (200.0f + g_regHIO.mChild[0].mFloatRegs[10]) * zd[chainIdx];
src.z = (200.0f + REG0_F(10)) * zd[chainIdx];
MtxPosition(&src, &i_this->m2E0[chainIdx]);
if (i_this->m844 != 0) {
@@ -168,7 +168,7 @@ static BOOL daMsw_Execute(msw_class* i_this) {
}
if (i_this->mChainCyls[chainIdx].ChkTgHit() && i_this->m83C[chainIdx] < 10) {
i_this->m83C[chainIdx] = g_regHIO.mChild[6].mShortRegs[3] + 0xF;
i_this->m83C[chainIdx] = REG6_S(3) + 0xF;
mDoAud_seStart(JA_SE_LK_HIT_SBRIDGE_CHAIN, &i_this->m2E0[chainIdx], 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
+4 -4
View File
@@ -329,16 +329,16 @@ u8 daObjTpost_c::checkSendPrice() {
int daObjTpost_c::getMsgXY() {
s32 msgId;
GXColor col = {0x00, 0x00, 0x00, 0x80};
cXyz pos(g_regHIO.mChild[12].mFloatRegs[0], g_regHIO.mChild[12].mFloatRegs[1], g_regHIO.mChild[12].mFloatRegs[2]);
cXyz pos(REG12_F(0), REG12_F(1), REG12_F(2));
cXyz scale(2.0f, 2.0f, 2.0f);
switch(mPreItemNo) {
case dItem_NOTE_TO_MOM_e:
case MAGYS_LETTER:
msgId = 0xCE8;
col.r = g_regHIO.mChild[12].mShortRegs[0] + 0x80;
col.g = g_regHIO.mChild[12].mShortRegs[1] + 0x80;
col.b = g_regHIO.mChild[12].mShortRegs[2] + 0x80;
col.r = REG12_S(0) + 0x80;
col.g = REG12_S(1) + 0x80;
col.b = REG12_S(2) + 0x80;
mDoMtx_stack_c::copy(mMorf->getModel()->mpNodeMtx[2]);
mDoMtx_stack_c::multVec(&pos, &pos);
dComIfGp_particle_set(0x57, &pos, &shape_angle, &scale, 0xFF, NULL, -1, &col);
+15 -15
View File
@@ -674,11 +674,11 @@ void daRd_c::setCollision() {
}
if (isAnm(AnmPrm_SUWARIP)) {
mCyl.SetR(80.0f + g_regHIO.mChild[8].mFloatRegs[1]);
mCyl.SetH(170.0f + g_regHIO.mChild[8].mFloatRegs[0]);
mCyl.SetR(80.0f + REG8_F(1));
mCyl.SetH(170.0f + REG8_F(0));
} else {
mCyl.SetR(80.0f + g_regHIO.mChild[8].mFloatRegs[1]);
mCyl.SetH(250.0f + g_regHIO.mChild[8].mFloatRegs[0]);
mCyl.SetR(80.0f + REG8_F(1));
mCyl.SetH(250.0f + REG8_F(0));
}
mCyl.SetC(current.pos);
@@ -751,7 +751,7 @@ void daRd_c::modeWait() {
// Bug: If the ReDead spawned high up in the air, its spawn point will remain there even after the ReDead
// itself has fallen down to ground level. This means it will not be able to notice the player properly.
if (dLib_checkActorInCircle(mSpawnPos, player, mAreaRadius, 100.0f)) {
if ((dLib_checkActorInCircle(mSpawnPos, player, mAreaRadius, 100.0f) && player->speedF > 10.0f + g_regHIO.mChild[12].mFloatRegs[4]) ||
if ((dLib_checkActorInCircle(mSpawnPos, player, mAreaRadius, 100.0f) && player->speedF > 10.0f + REG12_F(4)) ||
isOto ||
dLib_checkActorInFan(current.pos, player, shape_angle.y, l_HIO.m40, l_HIO.m34, 100.0f)
) {
@@ -883,7 +883,7 @@ void daRd_c::modeMove() {
int angle = cLib_distanceAngleS(fopAcM_searchPlayerAngleY(this), mHeadAngle);
if (angle < 0x50) {
f32 dist = fopAcM_searchPlayerDistanceXZ(this);
f32 temp = (dist / 100.0f) + g_regHIO.mChild[12].mFloatRegs[3];
f32 temp = (dist / 100.0f) + REG12_F(3);
if (temp > 1.0f) {
temp = 1.0f;
}
@@ -894,9 +894,9 @@ void daRd_c::modeMove() {
if (mEnemyFire.mState != 0) {
temp2 *= 2.0f;
}
cLib_addCalc2(&speedF, temp2*temp, 0.1f, 0.1f + g_regHIO.mChild[12].mFloatRegs[0]);
cLib_addCalc2(&speedF, temp2*temp, 0.1f, 0.1f + REG12_F(0));
} else {
cLib_addCalc2(&speedF, 0.0f, 0.1f, 0.1f + g_regHIO.mChild[12].mFloatRegs[0]);
cLib_addCalc2(&speedF, 0.0f, 0.1f, 0.1f + REG12_F(0));
}
if (speedF < 0.1f) {
setAnm(AnmPrm_TACHIP1, false);
@@ -939,7 +939,7 @@ void daRd_c::modeCry() {
} else {
s16 targetY = fopAcM_searchPlayerAngleY(this);
f32 dist = fopAcM_searchPlayerDistanceXZ(this);
f32 temp = (dist / 100.0f) + g_regHIO.mChild[12].mFloatRegs[3];
f32 temp = (dist / 100.0f) + REG12_F(3);
if (temp > 1.0f) {
temp = 1.0f;
}
@@ -950,7 +950,7 @@ void daRd_c::modeCry() {
if (mEnemyFire.mState != 0) {
temp2 *= 2.0f;
}
cLib_addCalc2(&speedF, temp2*temp, 0.1f, 0.1f + g_regHIO.mChild[12].mFloatRegs[0]);
cLib_addCalc2(&speedF, temp2*temp, 0.1f, 0.1f + REG12_F(0));
if (mD3C > 0 && stickPosX < 0.0f) {
mD3C = -1;
@@ -1055,11 +1055,11 @@ void daRd_c::modeAttack() {
return;
}
f32 dist = fopAcM_searchPlayerDistanceXZ(this);
if (dist <= 50.0f + g_regHIO.mChild[12].mFloatRegs[5] && !isAnm(AnmPrm_ATACK)) {
if (dist <= 50.0f + REG12_F(5) && !isAnm(AnmPrm_ATACK)) {
offIkari();
setAnm(AnmPrm_WALK2ATACK, false);
}
if (dist <= 20.0f + g_regHIO.mChild[12].mFloatRegs[2]) {
if (dist <= 20.0f + REG12_F(2)) {
cLib_addCalcPosXZ2(&current.pos, player->current.pos, 0.3f, 1.0f);
if (cLib_calcTimer(&mTimer2) == 0) {
if (!daPy_getPlayerLinkActorClass()->checkNoDamageMode()) {
@@ -1134,7 +1134,7 @@ void daRd_c::modeReturn() {
return;
}
} else {
cLib_addCalc2(&speedF, l_HIO.mReturnWalkSpeed, 0.1f, 0.1f + g_regHIO.mChild[12].mFloatRegs[0]);
cLib_addCalc2(&speedF, l_HIO.mReturnWalkSpeed, 0.1f, 0.1f + REG12_F(0));
}
if (dComIfGp_evmng_startCheck("DEFAULT_RD_ATTACK")) {
@@ -1146,7 +1146,7 @@ void daRd_c::modeReturn() {
if (!isLinkControl()) {
if (dLib_checkActorInCircle(mSpawnPos, this, mAreaRadius, 1000.0f)) {
if (dLib_checkActorInCircle(mSpawnPos, player, mAreaRadius, 100.0f)) {
if ((dLib_checkActorInCircle(mSpawnPos, player, mAreaRadius, 100.0f) && player->speedF > 10.0f + g_regHIO.mChild[12].mFloatRegs[4]) ||
if ((dLib_checkActorInCircle(mSpawnPos, player, mAreaRadius, 100.0f) && player->speedF > 10.0f + REG12_F(4)) ||
isOto ||
dLib_checkActorInFan(current.pos, player, shape_angle.y, l_HIO.m40, l_HIO.m34, 100.0f)
) {
@@ -1178,7 +1178,7 @@ void daRd_c::modeSilentPray() {
setAnm(AnmPrm_TACHIP1, false);
speedF = 0.0f;
} else {
cLib_addCalc2(&speedF, l_HIO.mReturnWalkSpeed, 0.1f, 0.1f + g_regHIO.mChild[12].mFloatRegs[0]);
cLib_addCalc2(&speedF, l_HIO.mReturnWalkSpeed, 0.1f, 0.1f + REG12_F(0));
}
} else if (!isLinkControl()) {
if (dLib_checkActorInCircle(mSpawnPos, player, mAreaRadius, 100.0f)) {
+8 -8
View File
@@ -128,14 +128,14 @@ void daShopItem_c::set_mtx() {
cXyz local[4];
cXyz local2[4];
local2[3].set(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 94.0f, 0.0f);
local[0].set(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 94.0f, 0.0f);
local2[2].set(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 94.0f, 0.0f);
local[1].set(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 94.0f, 0.0f);
local2[1].set(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 97.5f, 0.0f);
local[2].set(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 97.5f, 0.0f);
local2[0].set(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 94.0f, 0.0f);
local[3].set(0.0f, g_regHIO.mChild[10].mFloatRegs[15] + 94.0f, 0.0f);
local2[3].set(0.0f, REG10_F(15) + 94.0f, 0.0f);
local[0].set(0.0f, REG10_F(15) + 94.0f, 0.0f);
local2[2].set(0.0f, REG10_F(15) + 94.0f, 0.0f);
local[1].set(0.0f, REG10_F(15) + 94.0f, 0.0f);
local2[1].set(0.0f, REG10_F(15) + 97.5f, 0.0f);
local[2].set(0.0f, REG10_F(15) + 97.5f, 0.0f);
local2[0].set(0.0f, REG10_F(15) + 94.0f, 0.0f);
local[3].set(0.0f, REG10_F(15) + 94.0f, 0.0f);
mDoMtx_stack_c::transM(local[field_0x648]);
mDoMtx_stack_c::YrotM(0x4000);
+1 -1
View File
@@ -33,7 +33,7 @@ dAttParam_c::~dAttParam_c() {
/* 8009D2B0-8009D2E0 .text execute__19dAttDraw_CallBack_cFUsP16J3DTransformInfo */
bool dAttDraw_CallBack_c::execute(u16 timing, J3DTransformInfo* xform) {
if (timing == 0) {
xform->mTranslate.y *= g_regHIO.mChild[6].mFloatRegs[17] + 0.6f;
xform->mTranslate.y *= REG6_F(17) + 0.6f;
}
return true;
}
+1 -1
View File
@@ -127,7 +127,7 @@ void dChain_packet_c::draw() {
GXSetCurrentMtx(GX_PNMTX0);
cXyz* points = mPt;
f32 segmentLen = (g_regHIO.mChild[10].mFloatRegs[11] + 6.75f) * mScale.z;
f32 segmentLen = (REG10_F(11) + 6.75f) * mScale.z;
s16 angle = 0;
cXyz pos = *points;
for (s32 i = 0; i < mNum - 1; i++) {
+2 -2
View File
@@ -483,7 +483,7 @@ void mDoExt_modelUpdateDL(J3DModel* i_model) {
i_model->calc();
mDoExt_modelDiff(i_model);
} else {
if (g_regHIO.mChild[2].mShortRegs[9] == 0) {
if (REG2_S(9) == 0) {
i_model->unlock();
}
i_model->update();
@@ -514,7 +514,7 @@ void mDoExt_modelEntryDL(J3DModel* i_model) {
if (model_data->getModelDataType() == 1 && !model_data->isLocked()) {
mDoExt_modelDiff(i_model);
} else {
if (g_regHIO.mChild[2].mShortRegs[9] == 0) {
if (REG2_S(9) == 0) {
i_model->unlock();
}
i_model->entry();