mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-11 14:38:38 -04:00
Match mDoExt_McaMorf::isStop inline regalloc
This commit is contained in:
@@ -819,7 +819,7 @@ public:
|
||||
u8 getAttribute() const { return mAttribute; }
|
||||
void setAttribute(u8 attr) { mAttribute = attr; }
|
||||
u8 getState() const { return mState; }
|
||||
bool checkState(u8 state) const { return mState & state; }
|
||||
bool checkState(u8 state) const { return mState & state ? true : false; }
|
||||
s16 getStart() const { return mStart; }
|
||||
void setStart(s16 start) {
|
||||
mStart = start;
|
||||
|
||||
+5
-17
@@ -34,11 +34,7 @@ public:
|
||||
void setPlayMode(int i_mode) { mFrameCtrl->setAttribute(i_mode); }
|
||||
void setLoopFrame(f32 i_frame) { mFrameCtrl->setLoop(i_frame); }
|
||||
BOOL isStop() {
|
||||
bool stopped = true;
|
||||
if (!mFrameCtrl->checkState(J3DFrameCtrl::STATE_STOP_E) && mFrameCtrl->getRate() != 0.0f) {
|
||||
stopped = false;
|
||||
}
|
||||
return stopped;
|
||||
return mFrameCtrl->checkState(J3DFrameCtrl::STATE_STOP_E) || mFrameCtrl->getRate() == 0.0f;
|
||||
}
|
||||
BOOL isLoop() { return mFrameCtrl->checkState(J3DFrameCtrl::STATE_LOOP_E); }
|
||||
|
||||
@@ -351,12 +347,8 @@ public:
|
||||
void setPlaySpeed(f32 speed) { mFrameCtrl.setRate(speed); }
|
||||
f32 getFrame() { return mFrameCtrl.getFrame(); }
|
||||
void setFrame(f32 frame) { mFrameCtrl.setFrame((s16)frame); }
|
||||
BOOL isStop() { //regswap somewhere here
|
||||
bool stopped = true;
|
||||
if (!mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && mFrameCtrl.getRate() != 0.0f) {
|
||||
stopped = false;
|
||||
}
|
||||
return stopped;
|
||||
BOOL isStop() {
|
||||
return mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) || mFrameCtrl.getRate() == 0.0f;
|
||||
}
|
||||
BOOL checkFrame(f32 frame) {
|
||||
return mFrameCtrl.checkPass(frame);
|
||||
@@ -411,12 +403,8 @@ public:
|
||||
void setPlaySpeed(f32 speed) { mFrameCtrl.setRate(speed); }
|
||||
f32 getFrame() { return mFrameCtrl.getFrame(); }
|
||||
void setFrame(f32 frame) { mFrameCtrl.setFrame((s16)frame); }
|
||||
BOOL isStop() { //regswap somewhere here
|
||||
bool stopped = true;
|
||||
if (!mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && mFrameCtrl.getRate() != 0.0f) {
|
||||
stopped = false;
|
||||
}
|
||||
return stopped;
|
||||
BOOL isStop() {
|
||||
return mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) || mFrameCtrl.getRate() == 0.0f;
|
||||
}
|
||||
BOOL checkFrame(f32 frame) {
|
||||
return mFrameCtrl.checkPass(frame);
|
||||
|
||||
+7
-42
@@ -538,12 +538,7 @@ static void action_dousa(am_class* i_this) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!i_this->mpMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = i_this->mpMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (!stopped) {
|
||||
if (!i_this->mpMorf->isStop()) {
|
||||
break;
|
||||
}
|
||||
i_this->mState += 1;
|
||||
@@ -609,12 +604,7 @@ static void action_dousa(am_class* i_this) {
|
||||
break;
|
||||
case 6:
|
||||
if (i_this->mCurrBckIdx == AM_BCK_CLOSE) {
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (i_this->mpMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = i_this->mpMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (stopped) {
|
||||
if (i_this->mpMorf->isStop()) {
|
||||
anm_init(i_this, AM_BCK_CLOSE_LOOP, 1.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, -1);
|
||||
}
|
||||
}
|
||||
@@ -684,12 +674,7 @@ static void action_dousa(am_class* i_this) {
|
||||
i_this->mState += 1;
|
||||
break;
|
||||
case 10:
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (i_this->mpMorf->isStop()) {
|
||||
morf = i_this->mpMorf;
|
||||
stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (stopped) {
|
||||
if (i_this->mpMorf->isStop()) {
|
||||
i_this->mState = 0;
|
||||
}
|
||||
break;
|
||||
@@ -812,12 +797,7 @@ static void action_itai_move(am_class* i_this) {
|
||||
// Fall-through
|
||||
case 0x29:
|
||||
cLib_addCalc0(&i_this->speedF, 0.8f, 2.0f);
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!i_this->mpMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = i_this->mpMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (!stopped) {
|
||||
if (!i_this->mpMorf->isStop()) {
|
||||
break;
|
||||
}
|
||||
i_this->mCountDownTimers[0] = 100;
|
||||
@@ -838,12 +818,7 @@ static void action_itai_move(am_class* i_this) {
|
||||
i_this->mState += 1;
|
||||
break;
|
||||
case 0x2B:
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!i_this->mpMorf->isStop()) {
|
||||
morf = i_this->mpMorf;
|
||||
stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (!stopped) {
|
||||
if (!i_this->mpMorf->isStop()) {
|
||||
break;
|
||||
}
|
||||
i_this->mNeedleCyl.OnAtSetBit();
|
||||
@@ -888,12 +863,7 @@ static void action_itai_move(am_class* i_this) {
|
||||
i_this->m0340 = dComIfGp_particle_set(0x8156, &i_this->mJawPos);
|
||||
}
|
||||
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!i_this->mpMorf->isStop()) {
|
||||
morf = i_this->mpMorf;
|
||||
stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (!stopped) {
|
||||
if (!i_this->mpMorf->isStop()) {
|
||||
break;
|
||||
}
|
||||
i_this->mCountDownTimers[0] = 100;
|
||||
@@ -947,12 +917,7 @@ static void action_itai_move(am_class* i_this) {
|
||||
break;
|
||||
case 0x2F:
|
||||
bomb_move_set(i_this, 1);
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!i_this->mpMorf->isStop()) {
|
||||
morf = i_this->mpMorf;
|
||||
stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (!stopped) {
|
||||
if (!i_this->mpMorf->isStop()) {
|
||||
break;
|
||||
}
|
||||
cXyz centerPos = i_this->current.pos;
|
||||
|
||||
+5
-30
@@ -514,12 +514,7 @@ static void action_dousa(am2_class* i_this) {
|
||||
if (i_this->mpMorf->checkFrame(24.0f)) {
|
||||
fopAcM_seStart(i_this, JA_SE_CM_AM2_SPIKE_OUT, 0);
|
||||
}
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!i_this->mpMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = i_this->mpMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (!stopped) {
|
||||
if (!i_this->mpMorf->isStop()) {
|
||||
break;
|
||||
}
|
||||
i_this->mState++;
|
||||
@@ -603,12 +598,7 @@ static void action_dousa(am2_class* i_this) {
|
||||
i_this->mState++;
|
||||
// Fall-through
|
||||
case 7:
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!i_this->mpMorf->isStop()) {
|
||||
morf = i_this->mpMorf;
|
||||
stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (stopped) {
|
||||
if (i_this->mpMorf->isStop()) {
|
||||
for (int i = 0; i < ARRAY_SIZE(i_this->mCountUpTimers); i++) {
|
||||
i_this->mCountUpTimers[i] = 0;
|
||||
}
|
||||
@@ -671,12 +661,7 @@ static void action_mahi(am2_class* i_this) {
|
||||
case 0xB:
|
||||
cLib_addCalc0(&actor->speedF, 0.5f, 1.0f);
|
||||
if (actor->speedF < 0.2f) {
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!i_this->mpMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = i_this->mpMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (stopped) {
|
||||
if (i_this->mpMorf->isStop()) {
|
||||
actor->speedF = 0.0f;
|
||||
i_this->mCountDownTimers[2] = 20*30;
|
||||
anm_init(i_this, AM2_BCK_MAHI, 1.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, -1);
|
||||
@@ -916,12 +901,7 @@ static void action_itai(am2_class* i_this) {
|
||||
i_this->mState++;
|
||||
break;
|
||||
case 0x17:
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!i_this->mpMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = i_this->mpMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (!stopped) {
|
||||
if (!i_this->mpMorf->isStop()) {
|
||||
break;
|
||||
}
|
||||
i_this->mNeedleCyl.OnAtSetBit();
|
||||
@@ -972,12 +952,7 @@ static void action_itai(am2_class* i_this) {
|
||||
}
|
||||
break;
|
||||
case 0x19:
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!i_this->mpMorf->isStop()) {
|
||||
morf = i_this->mpMorf;
|
||||
stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (!stopped) {
|
||||
if (!i_this->mpMorf->isStop()) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+3
-18
@@ -92,12 +92,7 @@ static void move(dr_class* i_this) {
|
||||
break;
|
||||
case 2:
|
||||
isIdle = true;
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (i_this->mpMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = i_this->mpMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (stopped) {
|
||||
if (i_this->mpMorf->isStop()) {
|
||||
i_this->mState = 0;
|
||||
}
|
||||
break;
|
||||
@@ -113,12 +108,7 @@ static void move(dr_class* i_this) {
|
||||
i_this->mCountDownTimers[1] = 5;
|
||||
}
|
||||
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (i_this->mpMorf->isStop()) {
|
||||
morf = i_this->mpMorf;
|
||||
stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (stopped) {
|
||||
if (i_this->mpMorf->isStop()) {
|
||||
i_this->m2C9 = 1;
|
||||
if (i_this->mpBreathEmitter) {
|
||||
i_this->mpBreathEmitter->becomeInvalidEmitter();
|
||||
@@ -165,12 +155,7 @@ static void move(dr_class* i_this) {
|
||||
i_this->mCountDownTimers[1] = 5;
|
||||
}
|
||||
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (i_this->mpMorf->isStop()) {
|
||||
morf = i_this->mpMorf;
|
||||
stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (stopped) {
|
||||
if (i_this->mpMorf->isStop()) {
|
||||
i_this->mState = 0;
|
||||
if (i_this->mpBreathEmitter) {
|
||||
i_this->mpBreathEmitter->becomeInvalidEmitter();
|
||||
|
||||
@@ -189,12 +189,7 @@ void daObjTpost_c::cutSetAnmStart(int staffIdx) {
|
||||
|
||||
/* 00000500-00000560 .text cutSetAnmProc__12daObjTpost_cFi */
|
||||
void daObjTpost_c::cutSetAnmProc(int staffIdx) {
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if(mMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = mMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (stopped) {
|
||||
if(mMorf->isStop()) {
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
}
|
||||
}
|
||||
@@ -746,12 +741,7 @@ void daObjTpost_c::modeTalkXY() {
|
||||
}
|
||||
|
||||
if(field_0x6C9 == 2 || field_0x6C9 == 3) {
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if(mMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = mMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (stopped) {
|
||||
if(mMorf->isStop()) {
|
||||
if(cLib_calcTimer(&field_0x8DC) == 0 && talk(1) == fopMsgStts_BOX_CLOSED_e) {
|
||||
modeProc(PROC_INIT, 0);
|
||||
dComIfGp_event_reset();
|
||||
|
||||
+2
-13
@@ -827,12 +827,7 @@ void daRd_c::modeDeathInit() {
|
||||
|
||||
/* 00001E68-00001F14 .text modeDeath__6daRd_cFv */
|
||||
void daRd_c::modeDeath() {
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!mpMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = mpMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (!stopped) {
|
||||
if (!mpMorf->isStop()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -860,12 +855,7 @@ void daRd_c::modeDamage() {
|
||||
return;
|
||||
}
|
||||
fopAc_ac_c* player = dComIfGp_getLinkPlayer();
|
||||
// Using the mDoExt_McaMorf::isStop inline causes regswap.
|
||||
// if (!mpMorf->isStop()) {
|
||||
mDoExt_McaMorf* morf = mpMorf;
|
||||
bool stopped = true;
|
||||
if (!morf->mFrameCtrl.checkState(J3DFrameCtrl::STATE_STOP_E) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
|
||||
if (!stopped) {
|
||||
if (!mpMorf->isStop()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -887,7 +877,6 @@ void daRd_c::modeParalysisInit() {
|
||||
|
||||
/* 000020EC-000021F0 .text modeParalysis__6daRd_cFv */
|
||||
void daRd_c::modeParalysis() {
|
||||
/* Nonmatching: isStop inline regalloc */
|
||||
if (isAnm(AnmPrm_BEAM_HIT) && mpMorf->isStop()) {
|
||||
setAnm(AnmPrm_BEAM, false);
|
||||
} else if (isAnm(AnmPrm_BEAM)) {
|
||||
|
||||
Reference in New Issue
Block a user