mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-29 16:44:40 -04:00
Misc matches, including dComIfGp_event_runCheck fixes
This commit is contained in:
@@ -2383,7 +2383,7 @@ inline void dComIfGp_setButtonActionMode(u8 mode) {
|
||||
* === EVENT ===
|
||||
*/
|
||||
|
||||
inline bool dComIfGp_event_runCheck() {
|
||||
inline BOOL dComIfGp_event_runCheck() {
|
||||
return g_dComIfG_gameInfo.play.getEvent().runCheck();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ public:
|
||||
void offEventFlag(u16 flag) { mEventFlag &= ~flag; }
|
||||
void reset() { onEventFlag(8); }
|
||||
|
||||
bool runCheck() { return mMode != dEvtMode_NONE_e; }
|
||||
BOOL runCheck() { return mMode != dEvtMode_NONE_e; }
|
||||
u32 getMode() { return mMode & 0xFF; } // &0xFF added to fix dEvt_control_c::moveApproval, probably fakematch
|
||||
|
||||
void checkHind(u16) {}
|
||||
|
||||
@@ -1554,15 +1554,14 @@ int daAgb_c::createHeap() {
|
||||
}
|
||||
|
||||
/* 800D3B58-800D3D2C .text daAgb_Create__FP10fopAc_ac_c */
|
||||
// NONMATCHING - dBgS_CrrPos::Set needs works
|
||||
static int daAgb_Create(fopAc_ac_c* i_this) {
|
||||
fopAcM_SetupActor(i_this, daAgb_c);
|
||||
daAgb_c* a_this = (daAgb_c*)i_this;
|
||||
fopAcM_SetupActor(i_this, daAgb_c);
|
||||
|
||||
int phase = dComIfG_resLoad(&a_this->mPhase, "Agb");
|
||||
if (phase == cPhs_COMPLEATE_e) {
|
||||
dComIfGp_setAgb(a_this);
|
||||
if (!fopAcM_entrySolidHeap(a_this, createHeap_CB, 0x500)) {
|
||||
if (!fopAcM_entrySolidHeap(i_this, createHeap_CB, 0x500)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
@@ -1570,7 +1569,7 @@ static int daAgb_Create(fopAc_ac_c* i_this) {
|
||||
a_this->mCrrPos.SetWall(171.0f, 50.0f);
|
||||
a_this->mCrrPos.SetGndUpY(170.0f);
|
||||
a_this->mCrrPos.ClrNoRoof();
|
||||
a_this->mAcch.Set(fopAcM_GetPosition_p(a_this), fopAcM_GetOldPosition_p(a_this), a_this, 1, &a_this->mAcchCir);
|
||||
a_this->mAcch.Set(fopAcM_GetPosition_p(i_this), fopAcM_GetOldPosition_p(i_this), i_this, 1, &a_this->mAcchCir);
|
||||
a_this->mAcch.OnLineCheck();
|
||||
a_this->mAcch.SetGrndNone();
|
||||
a_this->mAcchCir.SetWall(171.0f, 40.0f);
|
||||
|
||||
@@ -857,7 +857,6 @@ bool daObjTpost_c::_execute() {
|
||||
setAttention();
|
||||
setCollision(40.0f, 140.0f);
|
||||
modeProc(PROC_EXEC, 5);
|
||||
dBgS* bgs = dComIfG_Bgsp();
|
||||
|
||||
if(dComIfGp_event_runCheck() && !mEventCut.cutProc()) {
|
||||
cutProc();
|
||||
@@ -865,7 +864,7 @@ bool daObjTpost_c::_execute() {
|
||||
eventOrder();
|
||||
|
||||
fopAcM_posMoveF(this, 0);
|
||||
mAcch.CrrPos(*bgs);
|
||||
mAcch.CrrPos(*dComIfG_Bgsp());
|
||||
mStts.Move();
|
||||
if(mCyl.ChkTgHit()) {
|
||||
daObj::HitSeStart(&mEyePos, current.roomNo, &mCyl, 0x0B);
|
||||
|
||||
@@ -40,7 +40,7 @@ BOOL daPy_lk_c::procFoodThrow_init() {
|
||||
|
||||
dBgS* bgs = dComIfG_Bgsp(); // This is kinda weird, maybe fakematch
|
||||
|
||||
if (!dComIfGp_event_runCheck()) {
|
||||
if (dComIfGp_event_runCheck() == FALSE) {
|
||||
if (!dComIfGp_event_compulsory(this)) {
|
||||
return FALSE;
|
||||
} else {
|
||||
@@ -169,7 +169,7 @@ BOOL daPy_lk_c::procFoodSet_init() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!dComIfGp_event_runCheck()) {
|
||||
if (dComIfGp_event_runCheck() == FALSE) {
|
||||
if (!dComIfGp_event_compulsory(this)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -589,15 +589,13 @@ void daPy_lk_c::setPriTextureAnime(u16 r4, int r30) {
|
||||
if (m_tex_anm_heap.field_0x2 != btpIdx) {
|
||||
m_tex_anm_heap.field_0x2 = btpIdx;
|
||||
if (m_tex_anm_heap.field_0x4 == 0xFFFF) {
|
||||
J3DAnmTexPattern* btp = loadTextureAnimeResource(btpIdx, FALSE);
|
||||
setTextureAnimeResource(btp, r30);
|
||||
setTextureAnimeResource(loadTextureAnimeResource(btpIdx, FALSE), r30);
|
||||
}
|
||||
}
|
||||
if (m_tex_scroll_heap.field_0x2 != btkIdx) {
|
||||
m_tex_scroll_heap.field_0x2 = btkIdx;
|
||||
if (m_tex_scroll_heap.field_0x4 == 0xFFFF) {
|
||||
J3DAnmTextureSRTKey* btk = loadTextureScrollResource(btkIdx, FALSE);
|
||||
setTextureScrollResource(btk, r30);
|
||||
setTextureScrollResource(loadTextureScrollResource(btkIdx, FALSE), r30);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -607,15 +605,13 @@ void daPy_lk_c::resetPriTextureAnime() {
|
||||
if (m_tex_anm_heap.field_0x2 != 0xFFFF) {
|
||||
m_tex_anm_heap.field_0x2 = 0xFFFF;
|
||||
if (m_tex_anm_heap.field_0x4 == 0xFFFF) {
|
||||
J3DAnmTexPattern* btp = loadTextureAnimeResource(m_tex_anm_heap.mIdx, FALSE);
|
||||
setTextureAnimeResource(btp, 0);
|
||||
setTextureAnimeResource(loadTextureAnimeResource(m_tex_anm_heap.mIdx, FALSE), 0);
|
||||
}
|
||||
}
|
||||
if (m_tex_scroll_heap.field_0x2 != 0xFFFF) {
|
||||
m_tex_scroll_heap.field_0x2 = 0xFFFF;
|
||||
if (m_tex_scroll_heap.field_0x4 == 0xFFFF) {
|
||||
J3DAnmTextureSRTKey* btk = loadTextureScrollResource(m_tex_scroll_heap.mIdx, FALSE);
|
||||
setTextureScrollResource(btk, 0);
|
||||
setTextureScrollResource(loadTextureScrollResource(m_tex_scroll_heap.mIdx, FALSE), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -625,14 +621,12 @@ void daPy_lk_c::setDemoTextureAnime(u16 btpIdx, u16 btkIdx, int r30, u16 r31) {
|
||||
if (m_tex_anm_heap.field_0x4 != btpIdx || m_tex_anm_heap.field_0x6 != r31) {
|
||||
m_tex_anm_heap.field_0x4 = btpIdx;
|
||||
m_tex_anm_heap.field_0x6 = r31;
|
||||
J3DAnmTexPattern* btp = loadTextureAnimeResource(btpIdx, TRUE);
|
||||
setTextureAnimeResource(btp, r30);
|
||||
setTextureAnimeResource(loadTextureAnimeResource(btpIdx, TRUE), r30);
|
||||
}
|
||||
if (m_tex_scroll_heap.field_0x4 != btkIdx || m_tex_scroll_heap.field_0x6 != r31) {
|
||||
m_tex_scroll_heap.field_0x4 = btkIdx;
|
||||
m_tex_scroll_heap.field_0x6 = r31;
|
||||
J3DAnmTextureSRTKey* btk = loadTextureScrollResource(btkIdx, TRUE);
|
||||
setTextureScrollResource(btk, r30);
|
||||
setTextureScrollResource(loadTextureScrollResource(btkIdx, TRUE), r30);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4556,7 +4550,6 @@ void daPy_lk_c::onDekuSpReturnFlg(u8 i_point) {
|
||||
|
||||
/* 801289A8-80128AA4 .text changeTextureAnime__9daPy_lk_cFUsUsi */
|
||||
void daPy_lk_c::changeTextureAnime(u16 btpIdx, u16 btkIdx, int r7) {
|
||||
/* Nonmatching - regalloc */
|
||||
if (!dComIfGp_event_runCheck()) {
|
||||
return;
|
||||
}
|
||||
@@ -4564,14 +4557,12 @@ void daPy_lk_c::changeTextureAnime(u16 btpIdx, u16 btkIdx, int r7) {
|
||||
if (m_tex_anm_heap.field_0x4 != btpIdx || m_tex_anm_heap.field_0x6 != 0xFFFE) {
|
||||
m_tex_anm_heap.field_0x4 = btpIdx;
|
||||
m_tex_anm_heap.field_0x6 = 0xFFFE;
|
||||
J3DAnmTexPattern* btp = loadTextureAnimeResource(btpIdx, FALSE);
|
||||
setTextureAnimeResource(btp, 0);
|
||||
setTextureAnimeResource(loadTextureAnimeResource(btpIdx, FALSE), 0);
|
||||
}
|
||||
if (m_tex_scroll_heap.field_0x4 != btkIdx || m_tex_scroll_heap.field_0x6 != 0xFFFE) {
|
||||
m_tex_scroll_heap.field_0x4 = btkIdx;
|
||||
m_tex_scroll_heap.field_0x6 = 0xFFFE;
|
||||
J3DAnmTextureSRTKey* btk = loadTextureScrollResource(btkIdx, FALSE);
|
||||
setTextureScrollResource(btk, 0);
|
||||
setTextureScrollResource(loadTextureScrollResource(btkIdx, FALSE), 0);
|
||||
}
|
||||
} else {
|
||||
setDemoTextureAnime(btpIdx, btkIdx, 0, r7);
|
||||
|
||||
+1
-1
@@ -511,7 +511,7 @@ void dScnKy_env_light_c::setDaytime() {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!dKy_checkEventNightStop() && dComIfGs_isGetItem(2, 0) && !dComIfGp_event_runCheck() &&
|
||||
if (!dKy_checkEventNightStop() && dComIfGs_isGetItem(2, 0) && dComIfGp_event_runCheck() == FALSE &&
|
||||
!var_r30)
|
||||
{
|
||||
if (dComIfGp_roomControl_getTimePass()) {
|
||||
|
||||
Reference in New Issue
Block a user