diff --git a/include/d/actor/d_a_alink.h b/include/d/actor/d_a_alink.h index ff727effba6..418aec0e84b 100644 --- a/include/d/actor/d_a_alink.h +++ b/include/d/actor/d_a_alink.h @@ -8271,7 +8271,7 @@ static void* daAlink_searchBoar(fopAc_ac_c* param_0, void* param_1); static fopAc_ac_c* daAlink_searchLightBall(fopAc_ac_c* p_actor, void* param_1); inline daAlink_c* daAlink_getAlinkActorClass() { - return (daAlink_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR); + return (daAlink_c*)dComIfGp_getLinkPlayer(); } #endif /* D_A_D_A_ALINK_H */ diff --git a/include/d/actor/d_a_obj_table.h b/include/d/actor/d_a_obj_table.h index a52b90081dd..cea036783c1 100644 --- a/include/d/actor/d_a_obj_table.h +++ b/include/d/actor/d_a_obj_table.h @@ -15,17 +15,17 @@ */ class daObjTable_c : public dBgS_MoveBgActor { public: - int CreateHeap(); - int Create(); - int Execute(Mtx**); - int Draw(); - int Delete(); + inline int CreateHeap(); + inline int Create(); + inline int Execute(Mtx**); + inline int Draw(); + inline int Delete(); inline void initBaseMtx(); inline void setBaseMtx(); inline int create(); - s16 getMessageNo() { return (s16)fopAcM_GetParamBit(this, 0, 16); } + s16 getMessageNo() { return fopAcM_GetParam(this) & 0xFFFF; } private: /* 0x5A0 */ J3DModel* mpModel; diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index df64a28249d..c4e922971e4 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -285,7 +285,7 @@ public: dMsgObject_c* getMsgObjectClass() { return mItemInfo.mMsgObjectClass; } dStage_roomControl_c* getRoomControl() { return &mRoomControl; } dStage_dt_c& getStage() { return mStageData; } - dEvt_control_c& getEvent() { return mEvent; } + dEvt_control_c* getEvent() { return &mEvent; } daHorse_c* getHorseActor() { return (daHorse_c*)mPlayerPtr[1]; } J2DGrafContext* getCurrentGrafPort() { return (J2DGrafContext*)mCurrentGrafPort; } dVibration_c& getVibration() { return mVibration; } @@ -566,7 +566,7 @@ public: void setStartStageLayer(s8 layer) { mStartStage.setLayer(layer); } const char* getNextStageName() { return mNextStage.getName(); } - dStage_startStage_c* getNextStartStage() { return &mNextStage; } + dStage_startStage_c* getNextStartStage() { return mNextStage.getStartStage(); } s8 getNextStageRoomNo() { return mNextStage.getRoomNo(); } s8 getNextStageLayer() { return mNextStage.getLayer(); } s16 getNextStagePoint() { return mNextStage.getPoint(); } @@ -840,7 +840,6 @@ public: ~dComIfG_inf_c() {} void ct(); void createBaseCsr(); - dComIfG_play_c& getPlay() { return play; } // fake inline #if PLATFORM_WII || VERSION == VERSION_SHIELD_DEBUG class baseCsr_c : public mDoGph_gInf_c::csr_c { @@ -1462,27 +1461,63 @@ inline u8 dComIfGs_getSelectItemIndex(int i_no) { return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getSelectItemIndex(i_no); } -//TODO: actual name is unknown -inline u8 dComIfGs_getOptUnk0() { - return g_dComIfG_gameInfo.info.getPlayer().getConfig().getUnk0(); +// Ruby inline names are from TWW debug. +inline u8 dComIfGs_getOptRuby() { + return g_dComIfG_gameInfo.info.getPlayer().getConfig().getRuby(); +} + +inline void dComIfGs_setOptRuby(u8 i_ruby) { + g_dComIfG_gameInfo.info.getPlayer().getConfig().setRuby(i_ruby); } inline u8 dComIfGs_getOptVibration() { return g_dComIfG_gameInfo.info.getPlayer().getConfig().getVibration(); } +inline void dComIfGs_setOptVibration(u8 i_status) { + g_dComIfG_gameInfo.info.getPlayer().getConfig().setVibration(i_status); +} + inline u8 dComIfGs_getOptAttentionType() { return g_dComIfG_gameInfo.info.getPlayer().getConfig().getAttentionType(); } +inline void dComIfGs_setOptAttentionType(u8 i_attentionType) { + g_dComIfG_gameInfo.info.getPlayer().getConfig().setAttentionType(i_attentionType); +} + inline u8 dComIfGs_getOptCameraControl() { return g_dComIfG_gameInfo.info.getPlayer().getConfig().getCameraControl(); } +inline void dComIfGs_setOptCameraControl(u8 i_cameraControl) { + g_dComIfG_gameInfo.info.getPlayer().getConfig().setCameraControl(i_cameraControl); +} + inline u8 dComIfGs_getOptSound() { return g_dComIfG_gameInfo.info.getPlayer().getConfig().getSound(); } +inline void dComIfGs_setOptSound(u8 i_mode) { + g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(i_mode); +} + +inline void dComIfGs_setOptCalValue(s8 i_calValue) { + g_dComIfG_gameInfo.info.getPlayer().getConfig().setCalValue(i_calValue); +} + +inline void dComIfGs_setOptCalibrateDist(u16 i_calibrateDist) { + g_dComIfG_gameInfo.info.getPlayer().getConfig().setCalibrateDist(i_calibrateDist); +} + +inline u8 dComIfGs_getOptPointer() { + return g_dComIfG_gameInfo.info.getPlayer().getConfig().getPointer(); +} + +inline void dComIfGs_setOptPointer(u8 i_pointer) { + g_dComIfG_gameInfo.info.getPlayer().getConfig().setPointer(i_pointer); +} + inline BOOL dComIfGs_isTbox(int i_no) { return g_dComIfG_gameInfo.info.getMemory().getBit().isTbox(i_no); } @@ -2034,35 +2069,6 @@ inline void dComIfGs_setLastWarpAcceptStage(s8 param_0) { g_dComIfG_gameInfo.info.getPlayer().getPlayerLastMarkInfo().setWarpAcceptStage(param_0); } -//TODO: actual name is unknown -inline void dComIfGs_setOptUnk0(u8 i_unk0) { - g_dComIfG_gameInfo.info.getPlayer().getConfig().setUnk0(i_unk0); -} - -inline void dComIfGs_setOptSound(u8 i_mode) { - g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(i_mode); -} - -inline void dComIfGs_setOptVibration(u8 i_status) { - g_dComIfG_gameInfo.info.getPlayer().getConfig().setVibration(i_status); -} - -inline void dComIfGs_setOptAttentionType(u8 i_attentionType) { - g_dComIfG_gameInfo.info.getPlayer().getConfig().setAttentionType(i_attentionType); -} - -inline void dComIfGs_setOptCameraControl(u8 i_cameraControl) { - g_dComIfG_gameInfo.info.getPlayer().getConfig().setCameraControl(i_cameraControl); -} - -inline void dComIfGs_setOptPointer(u8 i_pointer) { - g_dComIfG_gameInfo.info.getPlayer().getConfig().setPointer(i_pointer); -} - -inline u8 dComIfGs_getOptPointer() { - return g_dComIfG_gameInfo.info.getPlayer().getConfig().getPointer(); -} - inline u8 dComIfGs_getNewFile() { return g_dComIfG_gameInfo.info.getNewFile(); } @@ -2091,14 +2097,6 @@ inline u8 dComIfGs_getWalletSize() { return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getWalletSize(); } -inline void dComIfGs_setOptCalValue(s8 i_calValue) { - g_dComIfG_gameInfo.info.getPlayer().getConfig().setCalValue(i_calValue); -} - -inline void dComIfGs_setOptCalibrateDist(u16 i_calibrateDist) { - g_dComIfG_gameInfo.info.getPlayer().getConfig().setCalibrateDist(i_calibrateDist); -} - inline u16 dComIfGs_getFishNum(u8 param_0) { return g_dComIfG_gameInfo.info.getPlayer().getFishingInfo().getFishCount(param_0); } @@ -2572,7 +2570,7 @@ inline s8 dComIfGp_getNextStageLayer() { return g_dComIfG_gameInfo.play.getNextStageLayer(); } -inline s32 dComIfGp_getNextStageWipe() { +inline s8 dComIfGp_getNextStageWipe() { return g_dComIfG_gameInfo.play.getNextStageWipe(); } @@ -3582,7 +3580,7 @@ inline u8 dComIfGp_getAdvanceDirection() { return g_dComIfG_gameInfo.play.getDirection(); } -inline dEvt_control_c& dComIfGp_getEvent() { +inline dEvt_control_c* dComIfGp_getEvent() { return g_dComIfG_gameInfo.play.getEvent(); } @@ -3611,41 +3609,41 @@ inline s16 dComIfGp_getItemMaxBombNumCount() { } inline BOOL dComIfGp_event_compulsory(void* i_actor, const char* i_eventname, u16 i_hindFlag) { - return g_dComIfG_gameInfo.play.getEvent().compulsory(i_actor, i_eventname, i_hindFlag); + return g_dComIfG_gameInfo.play.getEvent()->compulsory(i_actor, i_eventname, i_hindFlag); } inline int dComIfGp_event_moveApproval(void* i_actor) { - return g_dComIfG_gameInfo.play.getEvent().moveApproval(i_actor); + return g_dComIfG_gameInfo.play.getEvent()->moveApproval(i_actor); } inline int dComIfGp_event_order(u16 i_type, u16 i_prio, u16 i_flags, u16 i_hindFlags, void* i_requestActor, void* i_targetActor, s16 i_eventID, u8 i_mapToolId) { - return g_dComIfG_gameInfo.play.getEvent().order(i_type, i_prio, i_flags, i_hindFlags, i_requestActor, + return g_dComIfG_gameInfo.play.getEvent()->order(i_type, i_prio, i_flags, i_hindFlags, i_requestActor, i_targetActor, i_eventID, i_mapToolId); } inline void dComIfGp_event_setGtItm(int i_itemNo) { - g_dComIfG_gameInfo.play.getEvent().setGtItm(i_itemNo); + g_dComIfG_gameInfo.play.getEvent()->setGtItm(i_itemNo); } inline void dComIfGp_event_reset() { - g_dComIfG_gameInfo.play.getEvent().reset(); + g_dComIfG_gameInfo.play.getEvent()->reset(); } inline void dComIfGp_event_remove() { - g_dComIfG_gameInfo.play.getEvent().remove(); + g_dComIfG_gameInfo.play.getEvent()->remove(); } inline void dComIfGp_event_onEventFlag(u16 i_flag) { - g_dComIfG_gameInfo.play.getEvent().onEventFlag(i_flag); + g_dComIfG_gameInfo.play.getEvent()->onEventFlag(i_flag); } inline void dComIfGp_event_onHindFlag(u16 i_flag) { - g_dComIfG_gameInfo.play.getEvent().onHindFlag(i_flag); + g_dComIfG_gameInfo.play.getEvent()->onHindFlag(i_flag); } inline void dComIfGp_event_offHindFlag(u16 i_flag) { - g_dComIfG_gameInfo.play.getEvent().offHindFlag(i_flag); + g_dComIfG_gameInfo.play.getEvent()->offHindFlag(i_flag); } inline void dComIfGp_evmng_cutEnd(int i_staffId) { @@ -3677,19 +3675,19 @@ inline int dComIfGp_evmng_cameraPlay() { } inline u8 dComIfGp_event_getPreItemNo() { - return g_dComIfG_gameInfo.play.getEvent().getPreItemNo(); + return g_dComIfG_gameInfo.play.getEvent()->getPreItemNo(); } inline void dComIfGp_event_setItemPartner(void* i_actor) { - g_dComIfG_gameInfo.play.getEvent().setPtI(i_actor); + g_dComIfG_gameInfo.play.getEvent()->setPtI(i_actor); } inline void dComIfGp_event_setItemPartnerId(fpc_ProcID i_id) { - g_dComIfG_gameInfo.play.getEvent().setPtI_Id(i_id); + g_dComIfG_gameInfo.play.getEvent()->setPtI_Id(i_id); } inline u8 dComIfGp_event_getGtItm() { - return g_dComIfG_gameInfo.play.getEvent().getGtItm(); + return g_dComIfG_gameInfo.play.getEvent()->getGtItm(); } inline int dComIfGp_evmng_startDemo(int i_mapToolId) { @@ -3697,58 +3695,58 @@ inline int dComIfGp_evmng_startDemo(int i_mapToolId) { } inline void dComIfGp_event_setTalkPartner(void* i_actor) { - g_dComIfG_gameInfo.play.getEvent().setPtT(i_actor); + g_dComIfG_gameInfo.play.getEvent()->setPtT(i_actor); } inline fopAc_ac_c* dComIfGp_event_getTalkPartner() { - return g_dComIfG_gameInfo.play.getEvent().getPtT(); + return g_dComIfG_gameInfo.play.getEvent()->getPtT(); } inline fopAc_ac_c* dComIfGp_event_getItemPartner() { - return g_dComIfG_gameInfo.play.getEvent().getPtI(); + return g_dComIfG_gameInfo.play.getEvent()->getPtI(); } inline fopAc_ac_c* dComIfGp_event_getPt1() { - return g_dComIfG_gameInfo.play.getEvent().getPt1(); + return g_dComIfG_gameInfo.play.getEvent()->getPt1(); } inline fopAc_ac_c* dComIfGp_event_getPt2() { - return g_dComIfG_gameInfo.play.getEvent().getPt2(); + return g_dComIfG_gameInfo.play.getEvent()->getPt2(); } inline BOOL dComIfGp_event_runCheck() { - return g_dComIfG_gameInfo.play.getEvent().runCheck(); + return g_dComIfG_gameInfo.play.getEvent()->runCheck(); } inline f32 dComIfGp_event_getCullRate() { - return g_dComIfG_gameInfo.play.getEvent().getCullRate(); + return g_dComIfG_gameInfo.play.getEvent()->getCullRate(); } inline u16 dComIfGp_event_checkHind(u16 i_hindFlag) { if (!dComIfGp_event_runCheck()) { return false; } - return g_dComIfG_gameInfo.play.getEvent().checkHind(i_hindFlag); + return g_dComIfG_gameInfo.play.getEvent()->checkHind(i_hindFlag); } inline u16 dComIfGp_event_chkEventFlag(u16 i_flag) { - return g_dComIfG_gameInfo.play.getEvent().chkEventFlag(i_flag); + return g_dComIfG_gameInfo.play.getEvent()->chkEventFlag(i_flag); } inline BOOL dComIfGp_event_chkTalkXY() { - return g_dComIfG_gameInfo.play.getEvent().chkTalkXY(); + return g_dComIfG_gameInfo.play.getEvent()->chkTalkXY(); } inline void dComIfGp_event_setCullRate(f32 i_rate) { - g_dComIfG_gameInfo.play.getEvent().setCullRate(i_rate); + g_dComIfG_gameInfo.play.getEvent()->setCullRate(i_rate); } inline u8 dComIfGp_event_getMode() { - return g_dComIfG_gameInfo.play.getEvent().getMode(); + return g_dComIfG_gameInfo.play.getEvent()->getMode(); } inline fopAc_ac_c* dComIfGp_event_getDoorPartner() { - return g_dComIfG_gameInfo.play.getEvent().getPtD(); + return g_dComIfG_gameInfo.play.getEvent()->getPtD(); } inline int dComIfGp_evmng_getMyStaffId(const char* i_staffname, fopAc_ac_c* i_actor, int i_tagId) { diff --git a/include/d/d_save.h b/include/d/d_save.h index e8eccb9d1b0..fff3db0a7a6 100644 --- a/include/d/d_save.h +++ b/include/d/d_save.h @@ -506,10 +506,9 @@ public: void setVibration(u8 i_status); u8 getPalLanguage() const; - //TODO: placeholder name, actual name is not known - u8 getUnk0() { return unk0; } - void setUnk0(u8 i_unk0) { unk0 = i_unk0; } - + // Ruby inline names are from TWW debug. + u8 getRuby() { return mRuby; } + void setRuby(u8 i_ruby) { mRuby = i_ruby; } u8 getAttentionType() { return mAttentionType; } void setAttentionType(u8 i_mAttentionType) { mAttentionType = i_mAttentionType; } u16 getCalibrateDist() { return mCalibrateDist; } @@ -532,7 +531,7 @@ public: }; private: - /* 0x0 */ u8 unk0; + /* 0x0 */ u8 mRuby; /* 0x1 */ u8 mSoundMode; /* 0x2 */ u8 mAttentionType; // Lock-On Type; 0 : hold, 1 : switch /* 0x3 */ u8 mVibration; // Rumble status diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 4afb1e9afb7..2838afa6a70 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -1100,7 +1100,7 @@ public: static void setZoneNo(int, int); static dBgp_c* getBgp(int i_roomNo) { #if DEBUG - // NONMATCHING + // DEBUG NONMATCHING #else return NULL; #endif @@ -1230,6 +1230,7 @@ public: BOOL isEnable() const { return enabled; } s8 getWipe() const { return wipe; } u8 getWipeSpeed() const { return wipe_speed; } + dStage_startStage_c* getStartStage() { return this; } private: s8 enabled; diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index 02bd952e3e7..c603ce2755f 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -4608,7 +4608,7 @@ int daAlink_c::create() { } if (var_r24 != NULL) { - dComIfGp_getEvent().setPtD(var_r24); + dComIfGp_getEvent()->setPtD(var_r24); } bgWaitFlg = 0; @@ -16597,7 +16597,7 @@ int daAlink_c::procCrouch() { int daAlink_c::procCoMetamorphoseInit() { int var_r29 = 0; - if (dComIfGp_getEvent().isOrderOK()) { + if (dComIfGp_getEvent()->isOrderOK()) { if (!dComIfGp_event_compulsory(this, NULL, 0xFFFF)) { return 0; } @@ -17275,7 +17275,7 @@ int daAlink_c::execute() { mWolfEyeUp = mpHIO->mWolf.m.mSensesLingerTime; } else if (mTargetedActor != NULL || dComIfGp_checkPlayerStatus0(0, 0x2000)) { mWolfEyeUp = mpHIO->mWolf.m.mSensesLingerTime - 1; - } else if (!dComIfGp_getEvent().isOrderOK() && mProcID != PROC_GET_ITEM && + } else if (!dComIfGp_getEvent()->isOrderOK() && mProcID != PROC_GET_ITEM && mWolfEyeUp <= mpHIO->mWolf.m.mSensesLingerTime) { offWolfEyeUp(); diff --git a/src/d/actor/d_a_alink_HIO.inc b/src/d/actor/d_a_alink_HIO.inc index 51748331281..52392eec137 100644 --- a/src/d/actor/d_a_alink_HIO.inc +++ b/src/d/actor/d_a_alink_HIO.inc @@ -77,7 +77,7 @@ static void daAlinkHIO_setReverseAnmGenMessage(daAlinkHIO_anm_c* i_anmP, JORMCon 0x18); } -// NONMATCHING - regalloc + extra mr instruction +// DEBUG NONMATCHING - regalloc + extra mr instruction void daAlinkHIO_data_c::setStructData(char* param_1) { u8* pfVar2; u8* pfVar4; @@ -146,7 +146,7 @@ void daAlinkHIO_data_c::baseCopy() { cLib_memCpy(mp_data, mp_src_data, m_len); } -// NONMATCHING +// DEBUG NONMATCHING void daAlinkHIO_data_c::update() { baseCopy(); JORMContext* ctx = attachJORMContext(8); @@ -5764,7 +5764,6 @@ void daAlinkHIO_wolf_c::genMessage(JORMContext* ctx) { ctx->genSlider("光雫B", &m.mLightDropB, -0x40, 0x40, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); } -// NONMATCHING daAlinkHIO_wolf_c::daAlinkHIO_wolf_c() : mWlMove(), mWlMoveNoP(), mWlAtnMove(), mWlSideStep(), mWlBackJump(), mWlHowl(), mWlAutoJump(), mWlPush(), mWlLie(), mLight(1), mWlWallHang(), mWlDamage(), mWlSlide(), mWlRope(), diff --git a/src/d/actor/d_a_alink_demo.inc b/src/d/actor/d_a_alink_demo.inc index f524aada1d5..a8557992048 100644 --- a/src/d/actor/d_a_alink_demo.inc +++ b/src/d/actor/d_a_alink_demo.inc @@ -70,7 +70,7 @@ bool daAlink_c::checkSetNpcTks(cXyz* i_basePos, int i_roomNo, int param_2) { } int daAlink_c::checkDemoAction() { - if (dComIfGp_getEvent().isOrderOK()) { + if (dComIfGp_getEvent()->isOrderOK()) { if (!dComIfGp_event_runCheck()) { offNoResetFlg0(FLG0_UNK_200000); } @@ -566,7 +566,7 @@ void daAlink_c::setNoDrawSwordShield(int param_0, u16 param_1) { } void daAlink_c::setDemoData() { - if (dComIfGp_getEvent().isOrderOK()) { + if (dComIfGp_getEvent()->isOrderOK()) { if (checkPlayerDemoMode() && mClothesChangeWaitTimer == 0) { endDemoMode(); } diff --git a/src/d/actor/d_a_alink_wolf.inc b/src/d/actor/d_a_alink_wolf.inc index d11ad1f6015..77e4b67d456 100644 --- a/src/d/actor/d_a_alink_wolf.inc +++ b/src/d/actor/d_a_alink_wolf.inc @@ -3967,7 +3967,7 @@ int daAlink_c::procWolfHowlDemo() { daPy_frameCtrl_c* frameCtrl_p = mUnderFrameCtrl; daNpc_GWolf_c* gwolf_p = (daNpc_GWolf_c*)field_0x280c.getActor(); - BOOL skip_edge = dComIfGp_getEvent().checkSkipEdge(); + BOOL skip_edge = dComIfGp_getEvent()->checkSkipEdge(); if (skip_edge) { mZ2WolfHowlMgr.skipCorrectDemo(); } @@ -4012,11 +4012,11 @@ int daAlink_c::procWolfHowlDemo() { if (checkUnderMove0BckNoArcWolf(WANM_HOWL_SUCCESS)) { if (gwolf_p == NULL) { - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); } } else if (checkUnderMove0BckNoArcWolf(WANM_HOWL_END)) { if (gwolf_p == NULL) { - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); } } else if ((var_r26 || mZ2WolfHowlMgr.getTimer() != 0) && mZ2WolfHowlMgr.getReleaseTimer() != 30) @@ -4143,7 +4143,7 @@ int daAlink_c::procWolfHowlDemo() { dCam_getBody()->EndEventCamera(fopAcM_GetID(this)); } else { - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); } } @@ -9281,7 +9281,7 @@ int daAlink_c::procWolfGetSmell() { if (field_0x319c >= 0) { if (checkSpecialDemoMode()) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); dComIfGp_clearPlayerStatus1(0, 0x4000000); if (mProcVar5.field_0x3012 == fpcNm_ITEM_SMELL_YELIA_POUCH) { diff --git a/src/d/actor/d_a_alldie.cpp b/src/d/actor/d_a_alldie.cpp index 9ad4e41b03d..376f439561d 100644 --- a/src/d/actor/d_a_alldie.cpp +++ b/src/d/actor/d_a_alldie.cpp @@ -62,7 +62,7 @@ int daAlldie_c::actionOrder() { int daAlldie_c::actionEvent() { if (dComIfGp_evmng_endCheck(mEventIdx)) { - dComIfGp_getEvent().reset(); + dComIfGp_getEvent()->reset(); if (mNextEventIdx != -1) { mAction = ACT_NEXT; diff --git a/src/d/actor/d_a_b_bq.cpp b/src/d/actor/d_a_b_bq.cpp index 9339260a1ca..6513781efe5 100644 --- a/src/d/actor/d_a_b_bq.cpp +++ b/src/d/actor/d_a_b_bq.cpp @@ -1423,7 +1423,7 @@ static void demo_camera(b_bq_class* i_this) { i_this->mDemoCamEye = camera0->lookat.eye; i_this->mDemoCamCenter = camera0->lookat.center; - dComIfGp_getEvent().startCheckSkipEdge(a_this); + dComIfGp_getEvent()->startCheckSkipEdge(a_this); // fallthrough case 11: if (i_this->mDemoModeTimer == (s16)(VREG_S(0) + 8)) { @@ -2136,7 +2136,7 @@ static void demo_camera(b_bq_class* i_this) { } if (i_this->mDemoMode >= 11 && i_this->mDemoMode < 20) { - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { cDmr_SkipInfo = 20; Z2GetAudioMgr()->subBgmStop(); OS_REPORT("//////////////B_BQ SKIP 11\n"); diff --git a/src/d/actor/d_a_b_dr.cpp b/src/d/actor/d_a_b_dr.cpp index bad67723690..cdf3befcb70 100644 --- a/src/d/actor/d_a_b_dr.cpp +++ b/src/d/actor/d_a_b_dr.cpp @@ -3859,7 +3859,7 @@ int daB_DR_c::execute() { fopAc_ac_c* parent; if (fopAcM_SearchByID(parentActorID, &parent) != 0 && parent != NULL && parent->argument != 1) { if (dComIfGs_isZoneSwitch(20, fopAcM_GetRoomNo(this))) { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); } } else if (!dComIfGs_isZoneSwitch(0, fopAcM_GetRoomNo(this)) && cLib_calcTimer(&mTimer[0]) == 0) { dComIfGs_onZoneSwitch(0, fopAcM_GetRoomNo(this)); diff --git a/src/d/actor/d_a_b_ds.cpp b/src/d/actor/d_a_b_ds.cpp index 5335844544b..fefbedbbd03 100644 --- a/src/d/actor/d_a_b_ds.cpp +++ b/src/d/actor/d_a_b_ds.cpp @@ -1234,7 +1234,7 @@ void daB_DS_c::executeOpeningDemo() { Z2GetAudioMgr()->setDemoName("force_start"); if (mMode == 10) { - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); sp298.set(mOpPlayerDt[1]); daPy_getPlayerActorClass()->changeDemoMode(4, 2, 0, 0); @@ -1713,7 +1713,7 @@ void daB_DS_c::executeOpeningDemo() { } } - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { cDmr_SkipInfo = 1; dStage_changeScene(2, 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1); dComIfGs_onZoneSwitch(5, fopAcM_GetRoomNo(this)); diff --git a/src/d/actor/d_a_b_gg.cpp b/src/d/actor/d_a_b_gg.cpp index 013ed52d620..243b415ac33 100644 --- a/src/d/actor/d_a_b_gg.cpp +++ b/src/d/actor/d_a_b_gg.cpp @@ -935,8 +935,8 @@ void daB_GG_c::St_CamAction() { } if (mCamMode != 0) { - dComIfGp_getEvent().onSkipFade(); - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); } } @@ -1373,8 +1373,8 @@ void daB_GG_c::Gn_CamAction() { } if (mCamMode > 1) { - dComIfGp_getEvent().onSkipFade(); - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); } } diff --git a/src/d/actor/d_a_b_gm.cpp b/src/d/actor/d_a_b_gm.cpp index 7228df2ca5f..4f911c8a90e 100644 --- a/src/d/actor/d_a_b_gm.cpp +++ b/src/d/actor/d_a_b_gm.cpp @@ -1038,7 +1038,7 @@ static void demo_camera(b_gm_class* i_this) { spBC.set(0.0f, 0.0f, 2418.0f); daPy_getPlayerActorClass()->setPlayerPosAndAngle(&spBC, 0x8000, 0); - dComIfGp_getEvent().startCheckSkipEdge(i_this); + dComIfGp_getEvent()->startCheckSkipEdge(i_this); camera->mCamera.SetTrimSize(3); mDoAud_seStart(Z2SE_EN_GO_DEMO_OP, NULL, 0, 0); @@ -1563,7 +1563,7 @@ static void demo_camera(b_gm_class* i_this) { } if (i_this->mDemoMode != 0 && i_this->mDemoMode < 10) { - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { i_this->mMode = 4; i_this->mTimers[2] = cM_rndF(100.0f) + 200.0f; sp10 = 1; diff --git a/src/d/actor/d_a_b_gnd.cpp b/src/d/actor/d_a_b_gnd.cpp index 2fb9403d8d5..dbba9255772 100644 --- a/src/d/actor/d_a_b_gnd.cpp +++ b/src/d/actor/d_a_b_gnd.cpp @@ -2878,6 +2878,7 @@ static void demo_camera(b_gnd_class* i_this) { if (i_this->mDemoCamMode != 0) { // fakematch - dComIfGp_getHorseActor() isn't getting inlined for some reason horse = (daHorse_c*)g_dComIfG_gameInfo.play.getPlayerPtr(1); + // horse = (daHorse_c*)dComIfGp_getHorseActor(); } cXyz sp114; @@ -3483,8 +3484,7 @@ static void demo_camera(b_gnd_class* i_this) { a_this->current.pos.set(0.0f, 1100.0f, 0.0f); a_this->old.pos = a_this->current.pos; - a_this->shape_angle.y = -0x2000; - a_this->current.angle.y = -0x2000; + a_this->current.angle.y = a_this->shape_angle.y = -0x2000; cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); sp114.x = -300.0f; @@ -3653,8 +3653,7 @@ static void demo_camera(b_gnd_class* i_this) { player->setPlayerPosAndAngle(&sp108, -0x4802, 0); a_this->current.pos.set(-600.0f, 1100.0f, 0.0f); a_this->old.pos = a_this->current.pos; - a_this->current.angle.y = 0x37FE; - a_this->shape_angle.y = 0x37FE; + a_this->shape_angle.y = a_this->current.angle.y = 0x37FE; sp8 = TRUE; } break; @@ -3679,8 +3678,7 @@ static void demo_camera(b_gnd_class* i_this) { a_this->current.pos.set(-600.0f, 1100.0f, 0.0f); a_this->old.pos = a_this->current.pos; - a_this->current.angle.y = 0x37FE; - a_this->shape_angle.y = 0x37FE; + a_this->shape_angle.y = a_this->current.angle.y = 0x37FE; sp108.set(0.0f, 1100.0f, 0.0f); fopAcM_create(PROC_OBJ_GB, 0xF0069600, &sp108, fopAcM_GetRoomNo(a_this), NULL, NULL, -1); diff --git a/src/d/actor/d_a_b_mgn.cpp b/src/d/actor/d_a_b_mgn.cpp index 97575825d3b..51c8fe8684e 100644 --- a/src/d/actor/d_a_b_mgn.cpp +++ b/src/d/actor/d_a_b_mgn.cpp @@ -2814,8 +2814,8 @@ void daB_MGN_c::executeOpening() { } camera->mCamera.Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); - dComIfGp_getEvent().onSkipFade(); - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); mSound.startCreatureVoiceLevel(Z2SE_EN_MGN_DEMO_OP, -1); } diff --git a/src/d/actor/d_a_b_ob.cpp b/src/d/actor/d_a_b_ob.cpp index 9c34171caec..8b4c5eedb6f 100644 --- a/src/d/actor/d_a_b_ob.cpp +++ b/src/d/actor/d_a_b_ob.cpp @@ -2369,7 +2369,7 @@ static void demo_camera(b_ob_class* i_this) { } if (i_this->mDemoActionTimer == 30) { - dComIfGp_getEvent().startCheckSkipEdge(a_this); + dComIfGp_getEvent()->startCheckSkipEdge(a_this); } sp88 = a_this->current.pos; @@ -2975,7 +2975,7 @@ static void demo_camera(b_ob_class* i_this) { cLib_addCalcAngleS2(&i_this->mBlureRate, i_this->mBlureRateTarget, 1, 8); if (i_this->mDemoAction >= 31 && i_this->mDemoAction < 40) { - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { cDmr_SkipInfo = JREG_S(8) + 30; dStage_changeScene(1, 0.0f, 0, fopAcM_GetRoomNo(a_this), 0, -1); } diff --git a/src/d/actor/d_a_b_tn.cpp b/src/d/actor/d_a_b_tn.cpp index f768a4f875e..09b761d6373 100644 --- a/src/d/actor/d_a_b_tn.cpp +++ b/src/d/actor/d_a_b_tn.cpp @@ -1817,8 +1817,8 @@ void daB_TN_c::executeRoomDemo() { } camera->mCamera.Set(mCamCenter, mCamEye, mCamFovY, 0); - dComIfGp_getEvent().onSkipFade(); - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); } void daB_TN_c::executeOpening() { @@ -2014,8 +2014,8 @@ void daB_TN_c::executeOpening() { } camera->mCamera.Set(mCamCenter, mCamEye, mCamFovY, 0); - dComIfGp_getEvent().onSkipFade(); - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); } void daB_TN_c::executeWaitH() { diff --git a/src/d/actor/d_a_b_yo.cpp b/src/d/actor/d_a_b_yo.cpp index ccb33ce32d0..ee926cd7173 100644 --- a/src/d/actor/d_a_b_yo.cpp +++ b/src/d/actor/d_a_b_yo.cpp @@ -1241,8 +1241,8 @@ void daB_YO_c::executeOpening() { } camera->mCamera.Set(mCamCenter, mCamEye, mCamFovY, 0); - dComIfGp_getEvent().onSkipFade(); - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); } static f32 yo_max_bound_speed[8] = {10.0f, 12.0f, 15.0f, 18.0f, 21.0f, 24.0f, 27.0f, 30.0f}; diff --git a/src/d/actor/d_a_door_shutter.cpp b/src/d/actor/d_a_door_shutter.cpp index 06be94937c0..4bf468af08f 100644 --- a/src/d/actor/d_a_door_shutter.cpp +++ b/src/d/actor/d_a_door_shutter.cpp @@ -2015,7 +2015,7 @@ int daDoor20_c::chkStopOpen() { roomNo = door_param2_c::getBRoomNo(this); } if ((field_0x68c == 0 && frontOption == 3) || (field_0x68c == 1 && backOption == 3)) { - if (dComIfGp_event_runCheck() == 0 || (field_0x68d == 0)) { + if (dComIfGp_event_runCheck() == FALSE || (field_0x68d == 0)) { if (dComIfGp_roomControl_checkRoomDisp(roomNo) && fopAcM_myRoomSearchEnemy(roomNo) == NULL) { @@ -2024,7 +2024,7 @@ int daDoor20_c::chkStopOpen() { return 0; } if (swBit != 0xff) { - g_dComIfG_gameInfo.info.onSwitch(swBit, roomNo); + dComIfGs_onSwitch(swBit, roomNo); } return 1; } diff --git a/src/d/actor/d_a_e_dt.cpp b/src/d/actor/d_a_e_dt.cpp index 7411529a634..76034bb66d3 100644 --- a/src/d/actor/d_a_e_dt.cpp +++ b/src/d/actor/d_a_e_dt.cpp @@ -1933,8 +1933,8 @@ void daE_DT_c::executeOpening() { } camera->Set(mCamCenter, mCamEye, mCamFovy, mCamBank); - dComIfGp_getEvent().onSkipFade(); - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); } void daE_DT_c::calcCamera() { diff --git a/src/d/actor/d_a_e_fb.cpp b/src/d/actor/d_a_e_fb.cpp index a17e1f024f6..73bebf54edf 100644 --- a/src/d/actor/d_a_e_fb.cpp +++ b/src/d/actor/d_a_e_fb.cpp @@ -461,7 +461,7 @@ void daE_FB_c::executeAttack() { } } - if (dComIfGp_event_runCheck() == FALSE) { + if (!dComIfGp_event_runCheck()) { cMtx_YrotS(*calc_mtx, current.angle.y); cMtx_XrotM(*calc_mtx, sp_0x28.x); sp_0x48.x = 0.0f; diff --git a/src/d/actor/d_a_e_fm.cpp b/src/d/actor/d_a_e_fm.cpp index b6386d3f001..3dae088fbdf 100644 --- a/src/d/actor/d_a_e_fm.cpp +++ b/src/d/actor/d_a_e_fm.cpp @@ -1284,7 +1284,7 @@ static void demo_camera(e_fm_class* i_this) { i_this->mDemoCamCenter = camera0->lookat.center; i_this->field_0x778 = 0.0f; camera->mCamera.SetTrimSize(3); - dComIfGp_getEvent().startCheckSkipEdge(actor); + dComIfGp_getEvent()->startCheckSkipEdge(actor); case 11: if (i_this->mDemoCamTimer == (s16)(VREG_S(0) + 8)) { daPy_getPlayerActorClass()->changeDemoMode(0x19, 0, 0, 0); @@ -1974,7 +1974,7 @@ static s8 e_fm_start(e_fm_class* i_this) { i_this->mDamageInvulnerabilityTimer = 5; int var_r26 = 0; - if (i_this->mDemoCamMode >= 11 && dComIfGp_getEvent().checkSkipEdge()) { + if (i_this->mDemoCamMode >= 11 && dComIfGp_getEvent()->checkSkipEdge()) { cDmr_SkipInfo = 1; i_this->mDemoCamMode = 1000; dComIfGp_event_reset(); diff --git a/src/d/actor/d_a_e_gb.cpp b/src/d/actor/d_a_e_gb.cpp index a7cd49b80f4..83e265b3eba 100644 --- a/src/d/actor/d_a_e_gb.cpp +++ b/src/d/actor/d_a_e_gb.cpp @@ -1137,7 +1137,7 @@ static void demo_camera(e_gb_class* i_this) { i_this->demoCamStepScale = 0.0; Z2GetAudioMgr()->setBattleBgmOff(true); - dComIfGp_getEvent().startCheckSkipEdge(actor); + dComIfGp_getEvent()->startCheckSkipEdge(actor); swBit = (fopAcM_GetParam(actor) & 0xFF00) >> 8; dComIfGs_onSwitch(swBit, fopAcM_GetRoomNo(actor)); // fallthrough @@ -1290,8 +1290,8 @@ static void demo_camera(e_gb_class* i_this) { i_this->demoCounter++; if (i_this->demoMode < 10) { - dComIfGp_getEvent().setSkipProc(i_this, dEv_defaultSkipProc, 0); - if (dComIfGp_getEvent().checkSkipEdge()) { + dComIfGp_getEvent()->setSkipProc(i_this, dEv_defaultSkipProc, 0); + if (dComIfGp_getEvent()->checkSkipEdge()) { i_this->demoMode = 100; cMtx_YrotS(*calc_mtx, player->shape_angle.y); work.x = 0.0; diff --git a/src/d/actor/d_a_e_gob.cpp b/src/d/actor/d_a_e_gob.cpp index f70008fd832..724c4ff83e2 100644 --- a/src/d/actor/d_a_e_gob.cpp +++ b/src/d/actor/d_a_e_gob.cpp @@ -1670,7 +1670,7 @@ static void demo_camera(e_gob_class* i_this) { player->changeOriginalDemo(); Z2GetAudioMgr()->subBgmStart(Z2BGM_MAGNE_GORON_D01); - dComIfGp_getEvent().startCheckSkipEdge(i_this); + dComIfGp_getEvent()->startCheckSkipEdge(i_this); // fallthrough case 2: if (i_this->mDemoCamTimer < 20) { @@ -1993,7 +1993,7 @@ static void demo_camera(e_gob_class* i_this) { i_this->mDemoCamTimer = 10000; } - if (i_this->mDemoCamMode >= 2 && i_this->mDemoCamMode < 10 && dComIfGp_getEvent().checkSkipEdge()) { + if (i_this->mDemoCamMode >= 2 && i_this->mDemoCamMode < 10 && dComIfGp_getEvent()->checkSkipEdge()) { cDmr_SkipInfo = 20; i_this->mDemoCamMode = 1000; dStage_changeScene(2, 0.0f, 0, fopAcM_GetRoomNo(actor), 0, -1); diff --git a/src/d/actor/d_a_e_hp.cpp b/src/d/actor/d_a_e_hp.cpp index 90338615e62..4eb42024378 100644 --- a/src/d/actor/d_a_e_hp.cpp +++ b/src/d/actor/d_a_e_hp.cpp @@ -705,7 +705,6 @@ void daE_HP_c::executeDown() { } } -// NONMATCHING - g_dComIfG_gameInfo loading void daE_HP_c::executeDead() { if (field_0x78d == 0 && field_0x71c == 1) { mSound1.startCreatureSound(Z2SE_EN_PO_SOUL_PULLOUT, 0, -1); @@ -735,21 +734,10 @@ void daE_HP_c::executeDead() { movemode++; } case 1: { -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandDemoAccrpt()) { if (dComIfGp_getEventManager().endCheck(field_0x778)) { -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif } else if (strcmp(dComIfGp_getEventManager().getRunEventName(), "DEFAULT_GETITEM") == 0 && field_0x784 != -1) diff --git a/src/d/actor/d_a_e_mk.cpp b/src/d/actor/d_a_e_mk.cpp index 50a598f172a..47e68003e41 100644 --- a/src/d/actor/d_a_e_mk.cpp +++ b/src/d/actor/d_a_e_mk.cpp @@ -1288,7 +1288,7 @@ static void demo_camera_start(e_mk_class* i_this) { i_this->distToCamCenterTarget.y = fabsf(i_this->camCenterTarget.y - i_this->camCenter.y); i_this->distToCamCenterTarget.z = fabsf(i_this->camCenterTarget.z - i_this->camCenter.z); - dComIfGp_getEvent().startCheckSkipEdge(actor); + dComIfGp_getEvent()->startCheckSkipEdge(actor); // fallthrough case 2: if (i_this->demoCamCounter == (s16)(8 + VREG_S(0))) { @@ -1532,7 +1532,7 @@ static void demo_camera_start(e_mk_class* i_this) { break; } - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { u8 sw_bit = (fopAcM_GetParam(actor) & 0xff0000) >> 16; if (sw_bit != 0xff) { dComIfGs_onSwitch(sw_bit, fopAcM_GetRoomNo(actor)); @@ -1850,7 +1850,7 @@ static void demo_camera_end(e_mk_class* i_this) { if (i_this->demoCamCounter == 200) { player->changeDemoMode(1, 3, 0, 0); player->changeDemoParam0(3); - dComIfGp_getEvent().setPtT(boomerang_p); + dComIfGp_getEvent()->setPtT(boomerang_p); } if (i_this->demoCamCounter != (s16)(KREG_S(9) + 250)) { @@ -2011,7 +2011,7 @@ static void demo_camera_r04(e_mk_class* i_this) { i_this->distToCamEyeTarget.y = fabsf(i_this->camEyeTarget.y - i_this->camEye.y) * 0.02f; i_this->distToCamEyeTarget.z = fabsf(i_this->camEyeTarget.z - i_this->camEye.z) * 0.02f; - dComIfGp_getEvent().startCheckSkipEdge(i_this); + dComIfGp_getEvent()->startCheckSkipEdge(i_this); // fallthrough case 2: if (i_this->demoCamCounter > 60) { @@ -2308,7 +2308,7 @@ static void demo_camera(e_mk_class* i_this) { case e_mk_class::DEMO_MODE_R04: demo_camera_r04(i_this); - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { npc_ks_class* monkey_p = (npc_ks_class*)fpcM_Search(s_ks_sub, i_this); if (monkey_p != NULL) { u8 sw_bit = (fopAcM_GetParam(actor) & 0xFF0000) >> 16; diff --git a/src/d/actor/d_a_e_oc.cpp b/src/d/actor/d_a_e_oc.cpp index 6a266cb87a5..e8bb8c8f3e0 100644 --- a/src/d/actor/d_a_e_oc.cpp +++ b/src/d/actor/d_a_e_oc.cpp @@ -1127,7 +1127,7 @@ void daE_OC_c::executeFind() { s16 pl_ang = fopAcM_searchPlayerAngleY(this); f32 pl_dist = fopAcM_searchPlayerDistance(this); if (mOcState < 3 || !setWatchMode()) { - if (field_0x6b4 == 2 && dComIfGp_event_runCheck() == FALSE) { + if (field_0x6b4 == 2 && !dComIfGp_event_runCheck()) { fopAcM_OffStatus(this, 0x4000); field_0x6b4 = 0; } @@ -2255,7 +2255,7 @@ void daE_OC_c::executeFindStay() { current.angle.y = shape_angle.y; if (target_dist < 400.0f && target_dist > 200.0f) { if (abs(shape_angle.y - fopAcM_searchPlayerAngleY(this)) < 0x1000 && checkBeforeFloorBg(100.0f) - && dComIfGp_event_runCheck() == FALSE) { + && !dComIfGp_event_runCheck()) { setActionMode(E_OC_ACTION_ATTACK, 0); } @@ -2353,7 +2353,7 @@ void daE_OC_c::executeMoveOut() { if (player_distance < 400.0f && player_distance > 200.0f) { if (abs(shape_angle.y - fopAcM_searchPlayerAngleY(this)) < 0x1000 - && dComIfGp_event_runCheck() == FALSE) { + && !dComIfGp_event_runCheck()) { setActionMode(E_OC_ACTION_ATTACK, 0); } diff --git a/src/d/actor/d_a_e_oct_bg.cpp b/src/d/actor/d_a_e_oct_bg.cpp index b2edcdea7e2..f4dde1c3cc9 100644 --- a/src/d/actor/d_a_e_oct_bg.cpp +++ b/src/d/actor/d_a_e_oct_bg.cpp @@ -220,7 +220,7 @@ void daE_OctBg_c::mtx_set() { bool daE_OctBg_c::checkNormalAttack() { daPy_py_c* player = daPy_getPlayerActorClass(); - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { return false; } if (unk_bss_7A < l_HIO.field_0x20 && diff --git a/src/d/actor/d_a_e_pm.cpp b/src/d/actor/d_a_e_pm.cpp index aa134b28201..9fe29edb9b5 100644 --- a/src/d/actor/d_a_e_pm.cpp +++ b/src/d/actor/d_a_e_pm.cpp @@ -788,8 +788,8 @@ void daE_PM_c::AppearAction() { cLib_addCalcAngleS2(¤t.angle.y, mTargetAngleY, 5, 0x1000); cLib_addCalcAngleS2(&mHeadAngleX, mTargetHeadAngleX, 4, 0x1000); if (mAction != ACT_START || mMode != 0) { - dComIfGp_getEvent().onSkipFade(); - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); } } @@ -2039,8 +2039,8 @@ void daE_PM_c::BossAction() { } else { DemoBossStart(); } - dComIfGp_getEvent().onSkipFade(); - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); } if (mSecondEncounter && daPy_getPlayerActorClass()->checkWolfLock(this)) { diff --git a/src/d/actor/d_a_e_po.cpp b/src/d/actor/d_a_e_po.cpp index cd6099ef046..6db6e2b4b77 100644 --- a/src/d/actor/d_a_e_po.cpp +++ b/src/d/actor/d_a_e_po.cpp @@ -1231,21 +1231,10 @@ static void e_po_dead(e_po_class* i_this) { i_this->mType += 1; case 51: -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (a_this->eventInfo.checkCommandDemoAccrpt()) { if (dComIfGp_getEventManager().endCheck(i_this->field_0x762) != 0) { -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif } else { if (strcmp(dComIfGp_getEventManager().getRunEventName(), "DEFAULT_GETITEM") == 0 && @@ -1259,7 +1248,7 @@ static void e_po_dead(e_po_class* i_this) { } } } else if (i_this->field_0x75B != 0) { - if (dComIfGp_getEvent().isOrderOK()) { + if (dComIfGp_getEvent()->isOrderOK()) { if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, -1, 0); a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); diff --git a/src/d/actor/d_a_e_pz.cpp b/src/d/actor/d_a_e_pz.cpp index 2cf270e6940..389f550e1c1 100644 --- a/src/d/actor/d_a_e_pz.cpp +++ b/src/d/actor/d_a_e_pz.cpp @@ -503,7 +503,7 @@ void daE_PZ_c::executeOpeningDemo() { field_0x7d0 = 2; setBck(8, 0, 3.0f, -1.0f); mpModelMorf->setFrame(0.0f); - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); dComIfGs_onSaveDunSwitch(41); mMoveMode++; break; @@ -717,7 +717,7 @@ void daE_PZ_c::executeOpeningDemo() { mMoveMode = 130; } - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 3); } break; @@ -1146,7 +1146,7 @@ void daE_PZ_c::executeOpeningDemo() { camera->mCamera.Set(mDemoCameraCenter, mDemoCameraEye); } - if (((mMoveMode >= 2 && mMoveMode <= 17) || (mMoveMode >= 102 && mMoveMode <= 125)) && dComIfGp_getEvent().checkSkipEdge()) { + if (((mMoveMode >= 2 && mMoveMode <= 17) || (mMoveMode >= 102 && mMoveMode <= 125)) && dComIfGp_getEvent()->checkSkipEdge()) { cDmr_SkipInfo = 1; dStage_changeScene(1, 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1); Z2GetAudioMgr()->bgmStreamStop(0x1E); diff --git a/src/d/actor/d_a_e_rdb.cpp b/src/d/actor/d_a_e_rdb.cpp index c3a8b87d775..ce2532cb502 100644 --- a/src/d/actor/d_a_e_rdb.cpp +++ b/src/d/actor/d_a_e_rdb.cpp @@ -1105,7 +1105,7 @@ static void demo_camera(e_rdb_class* i_this) { i_this->mDemoCamFovy = 55.0f; camera->mCamera.SetTrimSize(3); player->changeOriginalDemo(); - dComIfGp_getEvent().startCheckSkipEdge(i_this); + dComIfGp_getEvent()->startCheckSkipEdge(i_this); Z2GetAudioMgr()->setDemoName("force_start"); // [[fallthrough]] case 2: @@ -1352,7 +1352,7 @@ static void demo_camera(e_rdb_class* i_this) { } if (i_this->mDemoMode > 0 && i_this->mDemoMode < 10) { - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { sVar1 = 1; i_this->mAction = ACTION_WAIT; i_this->mMode = 10; diff --git a/src/d/actor/d_a_e_rdy.cpp b/src/d/actor/d_a_e_rdy.cpp index 4227cae2596..9958da84463 100644 --- a/src/d/actor/d_a_e_rdy.cpp +++ b/src/d/actor/d_a_e_rdy.cpp @@ -3838,7 +3838,7 @@ static void demo_camera(e_rdy_class* i_this) { daPy_getPlayerActorClass()->changeOriginalDemo(); daPy_getPlayerActorClass()->changeDemoMode(0x17, 0, 0, 0); i_this->mCamDist = 300.0f; - dComIfGp_getEvent().startCheckSkipEdge(a_this); + dComIfGp_getEvent()->startCheckSkipEdge(a_this); i_this->mTargetAngleY = i_this->mPlayerAngle; a_this->current.angle.y = -0x3384; a_this->shape_angle.y = a_this->current.angle.y; @@ -3996,7 +3996,7 @@ static void demo_camera(e_rdy_class* i_this) { daPy_getPlayerActorClass()->changeOriginalDemo(); daPy_getPlayerActorClass()->changeDemoMode(4, 0, 0, 0); Z2GetAudioMgr()->bgmStop(70, 0); - dComIfGp_getEvent().offFlag2(8); + dComIfGp_getEvent()->offFlag2(8); dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[11] & 0xffff); // fallthrough @@ -4008,7 +4008,7 @@ static void demo_camera(e_rdy_class* i_this) { i_this->mMsgFlow.init(a_this, 0x7d1, 0, NULL); } if (i_this->mDemoTimer == 50) { - dComIfGp_getEvent().startCheckSkipEdge(a_this); + dComIfGp_getEvent()->startCheckSkipEdge(a_this); } if (i_this->mDemoTimer == 55) { daPy_getPlayerActorClass()->changeDemoMode(1, 4, 0, 0); @@ -4197,7 +4197,7 @@ static void demo_camera(e_rdy_class* i_this) { } if (i_this->mDemoMode >= 11 && i_this->mDemoMode < 20) { - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { a_this->current.pos.set(-103242.0f, -22894.0f, 38097.0f); a_this->current.angle.y = 0x44a3; a_karg->current.pos.set(-103242.0f, -22894.0f, 38097.0f); @@ -4213,7 +4213,7 @@ static void demo_camera(e_rdy_class* i_this) { Z2GetAudioMgr()->setBattleBgmOff(false); } } else if (i_this->mDemoMode >= 20 && i_this->mDemoMode < 29) { - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { cVar13 = 2; vec2.set(-93666.0f, -5951.0f, 39000.0f); player->setPlayerPosAndAngle(&vec2, 0, 0); diff --git a/src/d/actor/d_a_e_sf.cpp b/src/d/actor/d_a_e_sf.cpp index 7fb4012ee7d..45bf84f63ce 100644 --- a/src/d/actor/d_a_e_sf.cpp +++ b/src/d/actor/d_a_e_sf.cpp @@ -847,7 +847,7 @@ static s16 e_sf_sitwait(e_sf_class* i_this) { rv = 0xFF; i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_SF_V_FIRST_DEMO, -1); - if (dComIfGp_getEvent().checkSkipEdge() || i_this->mpModelMorf->isStop()) { + if (dComIfGp_getEvent()->checkSkipEdge() || i_this->mpModelMorf->isStop()) { i_this->mAction = ACTION_FIGHT_RUN; i_this->mActionPhase = FIGHT_RUN_PHASE_NEG_10; i_this->mTimers[0] = 60; @@ -1384,7 +1384,7 @@ static void demo_camera(e_sf_class* i_this) { i_this->field_0xfda = 0; i_this->mDemoCamFovy = 75.0f; camera->mCamera.SetTrimSize(3); - dComIfGp_getEvent().startCheckSkipEdge(a_this); + dComIfGp_getEvent()->startCheckSkipEdge(a_this); daPy_getPlayerActorClass()->changeOriginalDemo(); daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); // fallthrough diff --git a/src/d/actor/d_a_e_th.cpp b/src/d/actor/d_a_e_th.cpp index 896a465ea19..cb9caf6fa0f 100644 --- a/src/d/actor/d_a_e_th.cpp +++ b/src/d/actor/d_a_e_th.cpp @@ -708,7 +708,7 @@ static void demo_camera(e_th_class* i_this) { daPy_getPlayerActorClass()->changeOriginalDemo(); daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); - dComIfGp_getEvent().startCheckSkipEdge(i_this); + dComIfGp_getEvent()->startCheckSkipEdge(i_this); case 2: sp80.set(1.9f, 0.0f, -1127.0f); player->setPlayerPosAndAngle(&sp80, -0x8000, 0); @@ -993,7 +993,7 @@ static void demo_camera(e_th_class* i_this) { camera->mCamera.Set(i_this->mDemoCamCenter, i_this->mDemoCamEye, i_this->mDemoCamFovy, 0); i_this->mDemoCamTimer++; - if (i_this->mDemoCamMode >= 2 && i_this->mDemoCamMode < 10 && dComIfGp_getEvent().checkSkipEdge()) { + if (i_this->mDemoCamMode >= 2 && i_this->mDemoCamMode < 10 && dComIfGp_getEvent()->checkSkipEdge()) { Z2GetAudioMgr()->subBgmStop(); cDmr_SkipInfo = 30; dStage_changeScene(4, 0.0f, 0, fopAcM_GetRoomNo(i_this), 0, -1); diff --git a/src/d/actor/d_a_e_vt.cpp b/src/d/actor/d_a_e_vt.cpp index 98edc800bc7..b131638ec9b 100644 --- a/src/d/actor/d_a_e_vt.cpp +++ b/src/d/actor/d_a_e_vt.cpp @@ -1728,8 +1728,8 @@ void daE_VA_c::executeDemoOp() { calcTagAngle(); camera->mCamera.Set(mDemoCamCenter, mDemoCamEye, mDemoCamBank, 0); - dComIfGp_getEvent().onSkipFade(); - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); } void daE_VA_c::executeClearWait() { diff --git a/src/d/actor/d_a_e_warpappear.cpp b/src/d/actor/d_a_e_warpappear.cpp index 07a7b71d114..7157621c62b 100644 --- a/src/d/actor/d_a_e_warpappear.cpp +++ b/src/d/actor/d_a_e_warpappear.cpp @@ -274,10 +274,11 @@ static void demo_camera(e_warpappear_class* i_this) { daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera_class* camera0 = dComIfGp_getCamera(0); daHorse_c* horseActor = (daHorse_c*)dComIfGp_getHorseActor(); cXyz sp48, sp54; - dComIfG_play_c* play; + cXyz temp1, temp2; switch (i_this->field_0x59e) { case 1: if (!i_this->eventInfo.checkCommandDemoAccrpt()) { @@ -464,9 +465,7 @@ static void demo_camera(e_warpappear_class* i_this) { i_this->field_0x5f8 = 0.0f; } - // TODO: gameInfo fake match to force reuse of pointer - play = &g_dComIfG_gameInfo.play; - play->getEvent().onHindFlag(15); + dComIfGp_event_onHindFlag(15); if (i_this->field_0x59e == 5) { if (i_this->field_0x5a0 >= 310) { @@ -496,7 +495,7 @@ static void demo_camera(e_warpappear_class* i_this) { camera->mCamera.Reset(i_this->field_0x5b0, i_this->field_0x5a4, i_this->field_0x5f4, 0); camera->mCamera.Start(); camera->mCamera.SetTrimSize(0); - play->getEvent().reset(); + dComIfGp_event_reset(); daPy_getPlayerActorClass()->cancelOriginalDemo(); fopAcM_delete(i_this); fpcM_Search(s_s1fight_sub, i_this); diff --git a/src/d/actor/d_a_e_wb.cpp b/src/d/actor/d_a_e_wb.cpp index 055e882782e..b8415ed5de1 100644 --- a/src/d/actor/d_a_e_wb.cpp +++ b/src/d/actor/d_a_e_wb.cpp @@ -3409,7 +3409,6 @@ static s8 e_wb_c_run(e_wb_class* i_this) { return return_value; } -// NONMATCHING - regalloc / conditional pathing static void action(e_wb_class* i_this) { fopEn_enemy_c* a_this = (fopEn_enemy_c*)i_this; cXyz pos1; @@ -3740,7 +3739,7 @@ static void demo_camera(e_wb_class* i_this) { daPy_getPlayerActorClass()->changeOriginalDemo(); horse->changeOriginalDemo(); fpcM_Search(s_wbdel_sub, a_this); - dComIfGp_getEvent().startCheckSkipEdge(a_this); + dComIfGp_getEvent()->startCheckSkipEdge(a_this); // fallthrough case 2: if (i_this->field_0x16a0 == 0xa0) { @@ -4085,7 +4084,7 @@ static void demo_camera(e_wb_class* i_this) { } if (i_this->field_0x16a0 == 40) { horse->changeDemoMode(8, 0); - dComIfGp_getEvent().startCheckSkipEdge(a_this); + dComIfGp_getEvent()->startCheckSkipEdge(a_this); } if (i_this->field_0x16a0 == 80) { horse->changeDemoMode(9, 0); @@ -4305,7 +4304,7 @@ static void demo_camera(e_wb_class* i_this) { horse->changeDemoPos0(&cStack_48); dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[87]); Z2GetAudioMgr()->bgmStart(Z2BGM_HORSE_BATTLE_D02, 0, 0); - dComIfGp_getEvent().startCheckSkipEdge(i_this); + dComIfGp_getEvent()->startCheckSkipEdge(i_this); // fallthrough case 0x29: if (i_this->field_0x16a0 == 30) { @@ -4428,7 +4427,7 @@ static void demo_camera(e_wb_class* i_this) { i_this->field_0x16bc.set(1679.0, 100.0, 852.0); i_this->field_0x16a4.set(1873.0, 64.0, 527.0); daPy_getPlayerActorClass()->changeOriginalDemo(); - dComIfGp_getEvent().startCheckSkipEdge(i_this); + dComIfGp_getEvent()->startCheckSkipEdge(i_this); dComIfGs_onOneZoneSwitch(4, -1); case 0x33: if (i_this->field_0x16a0 < 30) { @@ -4956,7 +4955,7 @@ static void demo_camera(e_wb_class* i_this) { } if (i_this->field_0x169e < 10 || (i_this->field_0x169e >= 30 && i_this->field_0x169e < 60)) { - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { cDmr_SkipInfo = 0x28; Z2GetAudioMgr()->bgmStop(0, 0); if (i_this->field_0x169e < 10 || dComIfG_play_c::getLayerNo(0) == 4) { diff --git a/src/d/actor/d_a_e_ym.cpp b/src/d/actor/d_a_e_ym.cpp index 81a24edf3a5..536754f7cfe 100644 --- a/src/d/actor/d_a_e_ym.cpp +++ b/src/d/actor/d_a_e_ym.cpp @@ -780,7 +780,7 @@ void daE_YM_c::executeEscape() { field_0x6dc = 0.0f; } } - if (dComIfGp_event_runCheck() == 0) { + if (!dComIfGp_event_runCheck()) { fopAcM_OffStatus(this, 0x4000); } switch (mMode) { @@ -2517,7 +2517,7 @@ void daE_YM_c::executeFire() { shape_angle.y = current.angle.y; break; case 3: - if (dComIfGp_event_runCheck() == 0) { + if (!dComIfGp_event_runCheck()) { mSphCc.OnCoSetBit(); } else { mSphCc.OffCoSetBit(); diff --git a/src/d/actor/d_a_e_ymb.cpp b/src/d/actor/d_a_e_ymb.cpp index 0bbc2842038..750a6ea4066 100644 --- a/src/d/actor/d_a_e_ymb.cpp +++ b/src/d/actor/d_a_e_ymb.cpp @@ -2302,7 +2302,7 @@ void daE_YMB_c::executeLakeDemo() { break; case 2: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); field_0x760 += field_0x762; mDemoCamCenter.set(-81000.0f, -17000.0f, 33000.0f); sp24.set(0.0f, 0.0f, 1000.0f); @@ -2320,7 +2320,7 @@ void daE_YMB_c::executeLakeDemo() { break; case 3: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); cLib_chaseF(&field_0x75c, 300.0f, 10.0f); cLib_chaseAngleS(&field_0x762, 0, 0x10); field_0x760 += field_0x762; @@ -2344,7 +2344,7 @@ void daE_YMB_c::executeLakeDemo() { break; case 5: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); if (field_0x6fc != 0) { cXyz sp30(mDemoCamCenter); @@ -2438,7 +2438,7 @@ void daE_YMB_c::executeStartDemo() { break; case 2: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); setBoilEffect(0); sp34.set(-89100.0f, player->current.pos.y, 39410.0f); player->setPlayerPosAndAngle(&sp34, 0x5400, 0); @@ -2455,7 +2455,7 @@ void daE_YMB_c::executeStartDemo() { break; case 3: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); setBoilEffect(0); sp34.set(current.pos.x, field_0x6cc - 120.0f, current.pos.z); cLib_chasePos(&mDemoCamCenter, sp34, 1.5f); @@ -2471,7 +2471,7 @@ void daE_YMB_c::executeStartDemo() { break; case 4: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); if (field_0x6fc >= 95) { setBoilEffect(1); @@ -2498,7 +2498,7 @@ void daE_YMB_c::executeStartDemo() { break; case 8: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); if (field_0x6f0 == 0) { if (current.pos.y >= field_0x6cc) { @@ -2531,7 +2531,7 @@ void daE_YMB_c::executeStartDemo() { break; case 9: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); mSound.startCreatureSoundLevel(Z2SE_EN_YB_FLY, 0, -1); sp34.set(-89000.0f, -18583.0f, 39350.0f); cLib_chasePos(&mDemoCamEye, sp34, 10.0f); @@ -2545,7 +2545,7 @@ void daE_YMB_c::executeStartDemo() { break; case 10: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); mSound.startCreatureSoundLevel(Z2SE_EN_YB_FLY, 0, -1); sp34.set(-89260.0f, -18650.0f, 39500.0f); cLib_chasePos(&mDemoCamEye, sp34, 10.0f); @@ -2559,7 +2559,7 @@ void daE_YMB_c::executeStartDemo() { break; case 11: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); mSound.startCreatureSoundLevel(Z2SE_EN_YB_FLY, 0, -1); setElecEffect2(); @@ -2633,7 +2633,7 @@ void daE_YMB_c::executeBattleDemo() { break; case 2: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 3); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 3); if (mpModelMorf->checkFrame(30.0f)) { dComIfGp_getVibration().StopQuake(31); @@ -2675,7 +2675,7 @@ void daE_YMB_c::executeBattleDemo() { // fallthrough case 4: case 5: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 2); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2); cLib_chaseF(&mDemoCamCenter.y, current.pos.y - 200.0f, 3.0f); sp34.set(current.pos.x, mDemoCamCenter.y, current.pos.z); cLib_chasePosXZ(&mDemoCamCenter, sp34, 5.0f); diff --git a/src/d/actor/d_a_e_zh.cpp b/src/d/actor/d_a_e_zh.cpp index 6451a2ac38a..5ce16590e1d 100644 --- a/src/d/actor/d_a_e_zh.cpp +++ b/src/d/actor/d_a_e_zh.cpp @@ -747,7 +747,7 @@ void daE_ZH_c::executeStartDemo() { switch (mMoveMode) { case 0: if (startDemoCheck()) { - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); mDemoCamCenter.set(-30.0f, 650.0f, 1955.0f); mDemoCamEye.set(-25.0f, 720.0f, 2330.0f); field_0x794[0] = 60; @@ -792,7 +792,7 @@ void daE_ZH_c::executeStartDemo() { } if (mMoveMode != 0 && mActionMode != ACTION_EXECUTE_WAIT) { - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { fopAcM_onSwitch(this, 0x12); dStage_changeScene(2, 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1); } @@ -895,11 +895,11 @@ void daE_ZH_c::executeBallWait() { } dCam_getBody()->StartBlure(100, this, 0.8f, 1.4f); - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); mMoveMode++; // fallthrough case 12: - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { dCam_getBody()->ResetBlure(); field_0x794[2] = 2; camera->mCamera.Start(); diff --git a/src/d/actor/d_a_econt.cpp b/src/d/actor/d_a_econt.cpp index cdfe48bc512..1e0b69a82d9 100644 --- a/src/d/actor/d_a_econt.cpp +++ b/src/d/actor/d_a_econt.cpp @@ -24,7 +24,7 @@ static void* s_rd_sub(void* i_this, void* param_1) { } static void rider_game(econt_class* i_this) { - if (dComIfGs_isSwitch(0x2e,fopAcM_GetRoomNo(i_this)) && dComIfGp_event_runCheck() == 0) { + if (dComIfGs_isSwitch(0x2e,fopAcM_GetRoomNo(i_this)) && !dComIfGp_event_runCheck()) { data_805197E0[0] = 0; fpcM_Search(s_rd_sub,i_this); diff --git a/src/d/actor/d_a_horse.cpp b/src/d/actor/d_a_horse.cpp index 688e997f13b..5e5784216fc 100644 --- a/src/d/actor/d_a_horse.cpp +++ b/src/d/actor/d_a_horse.cpp @@ -1002,7 +1002,7 @@ int daHorse_c::checkDemoAction() { return procMoveInit(); } - if (dComIfGp_getEvent().isOrderOK()) { + if (dComIfGp_getEvent()->isOrderOK()) { return 0; } @@ -1200,7 +1200,7 @@ void daHorse_c::setDemoData() { offStateFlg0(FLG0_UNK_2000000); } - if (dComIfGp_getEvent().isOrderOK()) { + if (dComIfGp_getEvent()->isOrderOK()) { u32 unused; if (checkHorseDemoMode()) { u32 old_demoMode = m_demoMode; diff --git a/src/d/actor/d_a_kago.cpp b/src/d/actor/d_a_kago.cpp index 494f85bd724..b863c19ba9d 100644 --- a/src/d/actor/d_a_kago.cpp +++ b/src/d/actor/d_a_kago.cpp @@ -218,7 +218,7 @@ int daKago_c::executeBalloonMenu() { switch (field_0x6eb) { case 0: if (field_0x6e7 == 1 && (mCurrentAction == 0 || mCurrentAction == 5) && - dComIfGp_event_runCheck() == 0 && mDoCPd_c::getTrigB(0)) + !dComIfGp_event_runCheck() && mDoCPd_c::getTrigB(0)) { field_0x6eb = 1; return 1; @@ -1917,7 +1917,7 @@ bool daKago_c::executePerchDemo() { return true; } - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); break; } @@ -1940,16 +1940,16 @@ bool daKago_c::executePerchDemo() { return true; } - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); break; } case 2: { if (field_0x6e4 == 0) { if (field_0x73c == 0) { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 4); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 4); } else if (field_0x73c == 2) { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 5); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 5); } } @@ -2020,9 +2020,9 @@ bool daKago_c::executePerchDemo() { case 3: { if (field_0x6e4 == 0) { if (field_0x73c == 0) { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 4); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 4); } else if (field_0x73c == 2) { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 5); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 5); } } @@ -2056,9 +2056,9 @@ bool daKago_c::executePerchDemo() { case 4: { if (field_0x6e4 == 0) { if (field_0x73c == 0) { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 4); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 4); } else if (field_0x73c == 2) { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 6); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 6); } } @@ -2497,7 +2497,7 @@ bool daKago_c::executeFirstDemo() { int switchVal = field_0x748; switch (switchVal) { case 0: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 2); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2); cLib_chaseAngleS(&field_0x6bc, 0x1400, 0x40); cLib_chaseF(&field_0x6cc, 1250.0f, 6.7f); @@ -2524,7 +2524,7 @@ bool daKago_c::executeFirstDemo() { break; case 1: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 2); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2); cLib_chaseAngleS(&field_0x6bc, 0x1000, 0x20); @@ -2571,7 +2571,7 @@ bool daKago_c::executeFirstDemo() { } break; case 2: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 3); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 3); setMidnaTagPos(); cLib_addCalcPos(&field_0x68c, midnaPos, 0.5f, 10.0f, 10.0f); @@ -2598,7 +2598,7 @@ bool daKago_c::executeFirstDemo() { break; case 3: { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 3); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 3); setMidnaTagPos(); cLib_addCalcAngleS( @@ -2620,7 +2620,7 @@ bool daKago_c::executeFirstDemo() { break; } case 4: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 2); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2); cLib_addCalcAngleS(&field_0x718, 0, 8, 0x100, 0x10); cLib_addCalcAngleS(&field_0x71a, 0, 8, 0x100, 0x10); @@ -2663,7 +2663,7 @@ bool daKago_c::executeFirstDemo() { break; case 5: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 2); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2); cLib_addCalcAngleS(¤t.angle.y, cLib_targetAngleY(¤t.pos, &field_0x6a4), 4, 0x800, 0x100); cLib_addCalcAngleS(¤t.angle.x, -cLib_targetAngleX(¤t.pos, &field_0x6a4), 4, 0x400, 0x100); @@ -2696,7 +2696,7 @@ bool daKago_c::executeFirstDemo() { } break; case 6: - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 2); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2); cLib_addCalcAngleS(¤t.angle.x, 0xffffe000, 8, 0x100, 0x40); shape_angle.x = current.angle.x; @@ -2758,7 +2758,7 @@ bool daKago_c::executeFirstDemo() { } if (field_0x728 != 0) { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 1); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); } else { if (field_0x73c == 0 && setSceneChange(0)) { field_0x748 = 9; @@ -2864,7 +2864,7 @@ void daKago_c::executeLandingLakeHairia() { field_0x744 = 3; } - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 7); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 7); break; case 3: @@ -2897,7 +2897,7 @@ void daKago_c::executeLandingLakeHairia() { field_0x728 = 0x28; } - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 7); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 7); break; case 5: @@ -2917,7 +2917,7 @@ void daKago_c::executeLandingLakeHairia() { setBck(0xf, 0x02, 10.0f, 1.0f); } else { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 7); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 7); } field_0x6cc = 50.0f; @@ -2968,7 +2968,7 @@ void daKago_c::executeLandingLakeHairia() { return; } - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 8); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 8); } camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); @@ -3033,7 +3033,7 @@ void daKago_c::executeLandingBoartHouse() { field_0x728 = 0x28; } - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 9); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 9); break; } @@ -3051,7 +3051,7 @@ void daKago_c::executeLandingBoartHouse() { field_0x744 = 3; field_0x728 = 90; } else { - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 9); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 9); } field_0x6cc = 40.0f; @@ -3106,7 +3106,7 @@ void daKago_c::executeLandingBoartHouse() { return; } - dComIfGp_getEvent().setSkipProc(this, DemoSkipCallBack, 10); + dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 10); break; } diff --git a/src/d/actor/d_a_kytag04.cpp b/src/d/actor/d_a_kytag04.cpp index 173564854a4..353bb396b5b 100644 --- a/src/d/actor/d_a_kytag04.cpp +++ b/src/d/actor/d_a_kytag04.cpp @@ -116,7 +116,7 @@ static int daKytag04_Execute(kytag04_class* i_this) { s32 room_no = dComIfGp_roomControl_getStayNo(); if (dComIfGs_isSwitch(i_this->field_0x5b5, room_no) && i_this->field_0x5d0 == 0) { - if (dComIfGp_getEvent().isOrderOK() && + if (dComIfGp_getEvent()->isOrderOK() && fopAcM_orderOtherEvent(i_this, "WITHWARP_OPEN", 0xFFFF, 1, 0)) { i_this->field_0x5d1 = 1; @@ -168,7 +168,7 @@ static int daKytag04_Execute(kytag04_class* i_this) { switch (i_this->field_0x5c4) { case 0: if (!a_this->eventInfo.checkCommandDemoAccrpt()) { - dComIfGp_getEvent().reset(a_this); + dComIfGp_getEvent()->reset(a_this); fopAcM_orderPotentialEvent(a_this, 0x400, 0xFFFF, 0); } else { i_this->field_0x5c5 = 1; diff --git a/src/d/actor/d_a_mg_fish.cpp b/src/d/actor/d_a_mg_fish.cpp index e7b76bc428d..4ab9b65da03 100644 --- a/src/d/actor/d_a_mg_fish.cpp +++ b/src/d/actor/d_a_mg_fish.cpp @@ -1842,7 +1842,7 @@ static void mf_hit(mg_fish_class* i_this) { i_this->mCurAction = ACTION_MG_FISH_MF_CATCH; i_this->mActionPhase = 0; g_dComIfG_gameInfo.play.mVibration.StartShock(4, 1, cXyz(0.0f, 1.0f, 0.0f)); - Z2AudioMgr::getInterface()->changeBgmStatus(4); + Z2GetAudioMgr()->changeBgmStatus(4); pvVar5->action = 6; pvVar5->play_cam_mode = 10; pvVar5->play_cam_timer = 0; @@ -1853,11 +1853,11 @@ static void mf_hit(mg_fish_class* i_this) { daPy_py_c* player = daPy_getLinkPlayerActorClass(); player->onFishingRodGetFish(); if (pvVar5->lure_type == MG_LURE_SP) { - u8 bVar7 = g_dComIfG_gameInfo.info.mSavedata.mEvent.getEventReg(0xf11f); + u8 bVar7 = dComIfGs_getEventReg(0xf11f); if (bVar7 < 0x1f) { bVar7++; } - g_dComIfG_gameInfo.info.mSavedata.mEvent.setEventReg(0xf11f, bVar7); + dComIfGs_setEventReg(0xf11f, bVar7); } } else if (iVar1 != 0) { if (iVar1 == 2) { @@ -2015,7 +2015,7 @@ static void mf_jump(mg_fish_class* i_this) { fopAcM_effSmokeSet1(&i_this->field_0xc34, &i_this->field_0xc38, &i_this->actor.current.pos, NULL, 0.6f * i_this->mJointScale, &i_this->actor.tevStr, 1); - Z2AudioMgr::getInterface()->seStart(Z2SE_OBJ_NIOIMASU_BOUND, (Vec*)&i_this->actor.current, + Z2GetAudioMgr()->seStart(Z2SE_OBJ_NIOIMASU_BOUND, &i_this->actor.current.pos, 0x14, 0,1.0f, 1.0f, -1.0f, -1.0f, 0); } @@ -2041,8 +2041,7 @@ static void mf_jump(mg_fish_class* i_this) { commonXyz2.z += i_this->actor.current.pos.z; commonXyz2.y = 10.0f + i_this->mSurfaceY; fopAcM_createItem(&commonXyz2, 0, -1, -1, NULL, NULL, 0); - g_dComIfG_gameInfo.info.mSavedata.mEvent.onEventBit( - dSv_event_flag_c::saveBitLabels[0x1d6]); + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1d6]); } break; } @@ -2460,7 +2459,7 @@ static s32 mf_esa_catch(mg_fish_class* i_this) { position = i_this->actor.current.pos; position.y = i_this->mSurfaceY; fopKyM_createWpillar(&position, 0.7f, 0); - Z2AudioMgr::getInterface()->changeFishingBgm(4); + Z2GetAudioMgr()->changeFishingBgm(4); i_this->mActionPhase = 1; i_this->mBobAmp = 50.0f; i_this->mSound.startCreatureSound(Z2SE_AL_FISH_CATCH, 0, -1); @@ -3859,7 +3858,7 @@ static int daMg_Fish_Create(fopAc_ac_c* i_this) { if (phase == cPhs_COMPLEATE_e) { s32 params_0 = fopAcM_GetParam(i_this) >> 24; if (params_0 != 0 && params_0 != 0xff && - g_dComIfG_gameInfo.info.isSwitch(params_0, fopAcM_GetRoomNo(i_this))) + dComIfGs_isSwitch(params_0, fopAcM_GetRoomNo(i_this))) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_mg_rod.cpp b/src/d/actor/d_a_mg_rod.cpp index bd7899194ff..bdac3c86c49 100644 --- a/src/d/actor/d_a_mg_rod.cpp +++ b/src/d/actor/d_a_mg_rod.cpp @@ -3545,7 +3545,7 @@ static void uki_ready(dmg_rod_class* i_this) { cLib_addCalc2(&i_this->field_0xf64, -30.0f + ZREG_F(1), 1.0f, 0.5f + BREG_F(14)); cLib_addCalc2(&i_this->field_0xf68, -(20.0f + AREG_F(10)), 1.0f, 0.02f * (20.0f + AREG_F(10))); - if (i_this->timers[0] != 0 || dComIfGp_event_runCheck() != 0 || i_this->play_cam_mode >= 1000 || (henna != NULL && henna->cam_mode != 0) || dComIfGp_checkPlayerStatus0(0, 0x100000)) { + if (i_this->timers[0] != 0 || dComIfGp_event_runCheck() || i_this->play_cam_mode >= 1000 || (henna != NULL && henna->cam_mode != 0) || dComIfGp_checkPlayerStatus0(0, 0x100000)) { return; } @@ -3758,7 +3758,7 @@ static void uki_standby(dmg_rod_class* i_this) { Z2GetAudioMgr()->changeFishingBgm(0); } - if (i_this->timers[0] == 0 && (dComIfGp_checkPlayerStatus0(0, 0x100000) || i_this->ccSph.ChkCoHit() || dComIfGp_event_runCheck() != 0 || uki_rod_bg_check(i_this) || (i_this->is_hook_in_water == 0 && player->current.pos.y - actor->current.pos.y > (350.0f + nREG_F(11))) || i_this->field_0x102e != 0)) { + if (i_this->timers[0] == 0 && (dComIfGp_checkPlayerStatus0(0, 0x100000) || i_this->ccSph.ChkCoHit() || dComIfGp_event_runCheck() || uki_rod_bg_check(i_this) || (i_this->is_hook_in_water == 0 && player->current.pos.y - actor->current.pos.y > (350.0f + nREG_F(11))) || i_this->field_0x102e != 0)) { i_this->play_cam_mode = 90; } @@ -4492,7 +4492,7 @@ static void play_camera(dmg_rod_class* i_this) { camera_class* sp58; switch (i_this->play_cam_mode) { case 0: - if (dComIfGp_checkPlayerStatus0(0, 0x2000) || dComIfGp_event_runCheck() != 0) { + if (dComIfGp_checkPlayerStatus0(0, 0x2000) || dComIfGp_event_runCheck()) { i_this->input_cooldown = 20; } diff --git a/src/d/actor/d_a_midna.cpp b/src/d/actor/d_a_midna.cpp index a906af3f978..dd09eff5131 100644 --- a/src/d/actor/d_a_midna.cpp +++ b/src/d/actor/d_a_midna.cpp @@ -2778,7 +2778,7 @@ void daMidna_c::setDemoData() { mStaffID = dComIfGp_evmng_getMyStaffId("Midna", this, 0); } - if (dComIfGp_getEvent().isOrderOK()) { + if (dComIfGp_getEvent()->isOrderOK()) { if (mDemoType != 0) { mDemoType = 0; mDemoMode = 0; @@ -3256,7 +3256,7 @@ int daMidna_c::execute() { } if (event_id == 4 || event_id == 5) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); offStateFlg0(FLG0_UNK_8000); fopAcM_orderPotentialEvent(this, 0x400, 0xffff, 1); link->changeOriginalDemo(); @@ -3283,13 +3283,13 @@ int daMidna_c::execute() { link->onMidnaTalkPolySpeed(); } - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); offStateFlg0(FLG0_UNK_8000); } } } } else if (eventInfo.checkCommandDemoAccrpt() && !link->checkMetamorphose()) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); } if (link->checkMidnaRide()) { diff --git a/src/d/actor/d_a_myna.cpp b/src/d/actor/d_a_myna.cpp index 4289833173c..067a544d41a 100644 --- a/src/d/actor/d_a_myna.cpp +++ b/src/d/actor/d_a_myna.cpp @@ -1240,7 +1240,7 @@ void daMyna_c::talkAnime(msg_class* param_0) { int daMyna_c::chkEvent() { int retVal = 1; if (daPy_py_c::checkNowWolf()) { - if (!dComIfGp_getEvent().isOrderOK()) { + if (!dComIfGp_getEvent()->isOrderOK()) { retVal = 0; if (eventInfo.checkCommandTalk()) { if (field_0x92C == 0x10) { diff --git a/src/d/actor/d_a_npc.cpp b/src/d/actor/d_a_npc.cpp index 727d7259be0..56dca96b1ec 100644 --- a/src/d/actor/d_a_npc.cpp +++ b/src/d/actor/d_a_npc.cpp @@ -1426,7 +1426,7 @@ int daNpcT_c::execute() { setCollision(); if (!field_0xe2c) { - if ((field_0xe33 && dComIfGp_getEvent().isOrderOK()) || dComIfGp_event_runCheck() == FALSE) { + if ((field_0xe33 && dComIfGp_getEvent()->isOrderOK()) || dComIfGp_event_runCheck() == FALSE) { evtOrder(); } } @@ -1899,15 +1899,7 @@ int daNpcT_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) { BOOL daNpcT_c::evtProc() { BOOL ret = FALSE; - -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (!checkChangeEvt()) { evtTalk(); @@ -1916,11 +1908,7 @@ BOOL daNpcT_c::evtProc() { } else if (eventInfo.checkCommandDemoAccrpt() && dComIfGp_getEventManager().endCheck(mEvtId)) { if (evtEndProc()) { -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif mEvtId = -1; } } else { @@ -2088,7 +2076,7 @@ void daNpcT_c::evtChange() { } mEvtId = dComIfGp_getEventManager().getEventIdx(this, mpEvtData[mEvtNo].eventName, 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEvtId, 1, 0xFFFF); } } diff --git a/src/d/actor/d_a_npc4.cpp b/src/d/actor/d_a_npc4.cpp index 0ce78f03052..4b873a8db6c 100644 --- a/src/d/actor/d_a_npc4.cpp +++ b/src/d/actor/d_a_npc4.cpp @@ -1308,7 +1308,7 @@ void daNpcF_c::changeEvent(char* i_arcName, char* i_evtName, u16 param_2, u16 pa JUT_ASSERT(2887, NULL != i_evtName); mEventIdx = dComIfGp_getEventManager().getEventIdx(this, i_evtName, 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventIdx, param_2, param_3); } diff --git a/src/d/actor/d_a_npc_ash.cpp b/src/d/actor/d_a_npc_ash.cpp index 423817b1aca..6cbd2c6a460 100644 --- a/src/d/actor/d_a_npc_ash.cpp +++ b/src/d/actor/d_a_npc_ash.cpp @@ -963,7 +963,7 @@ bool daNpcAsh_c::demo(void* param_0) { // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staff_id = eventManager.getMyStaffId(l_myName, NULL, 0); if (staff_id != -1) { @@ -1244,7 +1244,7 @@ BOOL daNpcAsh_c::main() { if (mpActionFn != NULL) { (this->*mpActionFn)(NULL); } - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk() && mItemPartnerId != -1) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk() && mItemPartnerId != -1) { dComIfGp_event_setItemPartnerId(mItemPartnerId); mItemPartnerId = -1; } diff --git a/src/d/actor/d_a_npc_ashB.cpp b/src/d/actor/d_a_npc_ashB.cpp index 75421ce2e08..2073b86fa9c 100644 --- a/src/d/actor/d_a_npc_ashB.cpp +++ b/src/d/actor/d_a_npc_ashB.cpp @@ -752,7 +752,7 @@ bool daNpcAshB_c::wait(void* param_0) { } } - if (dComIfGp_event_runCheck() != false) { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (dComIfGp_event_chkTalkXY()) { if (!dComIfGp_evmng_ChkPresentEnd()) { @@ -765,7 +765,7 @@ bool daNpcAshB_c::wait(void* param_0) { } else { s16 evt_idx = dComIfGp_getEventManager().getEventIdx(this, "NO_RESPONSE", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, evt_idx, 1, -1); } } @@ -878,7 +878,7 @@ bool daNpcAshB_c::talk(void* param_0) { if (mItemPartnerId != 0xffffffff) { s16 evt_idx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, evt_idx, 1, -1); field_0x9ec = 1; setAction(&daNpcAshB_c::wait); @@ -939,14 +939,7 @@ bool daNpcAshB_c::demo(void* param_0) { // fallthrough case 2: -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck() && !eventInfo.checkCommandTalk()) -#else - if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) -#endif - { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { s32 staff_id = evtmgr.getMyStaffId(l_myName, NULL, 0); if (staff_id != -1) { mStaffID = staff_id; @@ -957,13 +950,8 @@ bool daNpcAshB_c::demo(void* param_0) { r26 = TRUE; } - if (eventInfo.checkCommandDemoAccrpt() && mEventIdx != -1 && evtmgr.endCheck(mEventIdx)) - { -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else + if (eventInfo.checkCommandDemoAccrpt() && mEventIdx != -1 && evtmgr.endCheck(mEventIdx)) { dComIfGp_event_reset(); -#endif mOrderEvtNo = 0; mEventIdx = -1; setAction(&daNpcAshB_c::wait); @@ -1113,7 +1101,7 @@ BOOL daNpcAshB_c::main() { (this->*mpActionFn)(NULL); } - if (mItemPartnerId != -1 && dComIfGp_event_runCheck() != 0 && + if (mItemPartnerId != -1 && dComIfGp_event_runCheck() && !strcmp(dComIfGp_getEventManager().getRunEventName(), "DEFAULT_GETITEM")) { dComIfGp_event_setItemPartnerId(mItemPartnerId); diff --git a/src/d/actor/d_a_npc_besu.cpp b/src/d/actor/d_a_npc_besu.cpp index 5fd697742da..4948bd9aef1 100644 --- a/src/d/actor/d_a_npc_besu.cpp +++ b/src/d/actor/d_a_npc_besu.cpp @@ -1419,8 +1419,7 @@ void daNpc_Besu_c::setCollision() { mCyl1.SetR(wallR); mCyl1.SetC(cStack_48); dComIfG_Ccsp()->Set(&mCyl1); - if ((mType == 11 && !dComIfGp_event_runCheck()) || mType == 3) - { + if ((mType == 11 && !dComIfGp_event_runCheck()) || mType == 3) { switch (mType) { case 3: wallR = 100.0f; @@ -2623,7 +2622,7 @@ int daNpc_Besu_c::wait(void* param_0) { } /* dSv_event_flag_c::M_027 - Cutscene - [cutscene: 13] kids in the church (beast eyes) */ - if (field_0x112f && daNpcT_chkEvtBit(0x3C) && dComIfGp_event_runCheck() == 0) { + if (field_0x112f && daNpcT_chkEvtBit(0x3C) && !dComIfGp_event_runCheck()) { field_0x112f = 0; } diff --git a/src/d/actor/d_a_npc_blue_ns.cpp b/src/d/actor/d_a_npc_blue_ns.cpp index d214ade475e..4d046c03b62 100644 --- a/src/d/actor/d_a_npc_blue_ns.cpp +++ b/src/d/actor/d_a_npc_blue_ns.cpp @@ -842,7 +842,7 @@ int daNpcBlueNS_c::wait(int param_0) { break; case 2: chkFindPlayer(); - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (!dComIfGp_event_chkTalkXY() || dComIfGp_evmng_ChkPresentEnd() != 0) { setAction(&daNpcBlueNS_c::talk); @@ -939,7 +939,7 @@ int daNpcBlueNS_c::demo(int param_0) { field_0xdc0 = 2; break; case 2: - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { evtmgr = &dComIfGp_getEventManager(); int staffId = evtmgr->getMyStaffId(l_myName, this, 0); diff --git a/src/d/actor/d_a_npc_bou.cpp b/src/d/actor/d_a_npc_bou.cpp index 9e0a753c102..629f5f6ab5d 100644 --- a/src/d/actor/d_a_npc_bou.cpp +++ b/src/d/actor/d_a_npc_bou.cpp @@ -784,7 +784,7 @@ int daNpc_Bou_c::cutWildGoat(int arg) { case 2: { actor_p = mActorMngr[0].getActorP(); JUT_ASSERT(0x811, NULL != actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); Z2GetAudioMgr()->subBgmStart(0x1000011); break; } @@ -1160,7 +1160,7 @@ int daNpc_Bou_c::cutFindWolf(int arg) { case 0: { mFaceMotionSeqMngr.setNo(1, -1.0f, 0, 0); mMotionSeqMngr.setNo(3, -1.0f, 0, 0); - dComIfGp_getEvent().setPtT(this); + dComIfGp_getEvent()->setPtT(this); initTalk(0xD4, NULL); break; } diff --git a/src/d/actor/d_a_npc_bouS.cpp b/src/d/actor/d_a_npc_bouS.cpp index e1e2a1e7267..7bc24323171 100644 --- a/src/d/actor/d_a_npc_bouS.cpp +++ b/src/d/actor/d_a_npc_bouS.cpp @@ -714,7 +714,7 @@ BOOL daNpcBouS_c::main() { (this->*mAction)(NULL); } - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk() && mItemPartnerId != fpcM_ERROR_PROCESS_ID_e) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk() && mItemPartnerId != fpcM_ERROR_PROCESS_ID_e) { dComIfGp_event_setItemPartnerId(mItemPartnerId); mItemPartnerId = fpcM_ERROR_PROCESS_ID_e; } @@ -1183,7 +1183,7 @@ bool daNpcBouS_c::demo(void* param_1) { mMode = 2; // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); staffId = eventManager.getMyStaffId(l_myName, NULL, 0); if (staffId != -1) { diff --git a/src/d/actor/d_a_npc_chat.cpp b/src/d/actor/d_a_npc_chat.cpp index f4e73ffa9eb..f650a01ffef 100644 --- a/src/d/actor/d_a_npc_chat.cpp +++ b/src/d/actor/d_a_npc_chat.cpp @@ -3869,10 +3869,9 @@ bool daNpcChat_c::wait(void* param_1) { } } } else { - dComIfG_play_c& play = g_dComIfG_gameInfo.play; // fakematch - if (play.getEvent().runCheck()) { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { - if (!play.getEvent().chkTalkXY() || dComIfGp_evmng_ChkPresentEnd()) { + if (!dComIfGp_event_chkTalkXY() || dComIfGp_evmng_ChkPresentEnd()) { setAction(&daNpcChat_c::talk); } } else { @@ -4060,7 +4059,7 @@ bool daNpcChat_c::demo(void* param_1) { break; case 2: - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk() == false) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); diff --git a/src/d/actor/d_a_npc_chin.cpp b/src/d/actor/d_a_npc_chin.cpp index 553a6e8abb9..b871c8d6358 100644 --- a/src/d/actor/d_a_npc_chin.cpp +++ b/src/d/actor/d_a_npc_chin.cpp @@ -485,7 +485,7 @@ void daNpcChin_c::setParam() { int daNpcChin_c::main() { Action(); - if (dComIfGp_event_runCheck() != FALSE && eventInfo.checkCommandTalk() == FALSE && + if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk() == FALSE && field_0xdf4 != fpcM_ERROR_PROCESS_ID_e) { dComIfGp_event_setItemPartnerId(field_0xdf4); @@ -1214,7 +1214,7 @@ bool daNpcChin_c::wait(void* param_0) { eventInfo.setArchiveName(l_arcNames[4]); } - if (!dComIfGp_getEvent().isOrderOK()) { + if (!dComIfGp_getEvent()->isOrderOK()) { return true; } diff --git a/src/d/actor/d_a_npc_doorboy.cpp b/src/d/actor/d_a_npc_doorboy.cpp index 550f03aea67..f8b48b07a0c 100644 --- a/src/d/actor/d_a_npc_doorboy.cpp +++ b/src/d/actor/d_a_npc_doorboy.cpp @@ -658,7 +658,7 @@ bool daNpcDoorBoy_c::talk(void* param_1) { field_0xdf0 = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1, -1, NULL, NULL); if (field_0xdf0 != fpcM_ERROR_PROCESS_ID_e) { s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, eventIdx, 1, 0xFFFF); field_0x9ec = true; setAction(&daNpcDoorBoy_c::wait); @@ -699,7 +699,7 @@ bool daNpcDoorBoy_c::demo(void* param_1) { break; case 2: - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); if (staffId != -1) { diff --git a/src/d/actor/d_a_npc_drainSol.cpp b/src/d/actor/d_a_npc_drainSol.cpp index f7f8d8469a9..d66a99b13a2 100644 --- a/src/d/actor/d_a_npc_drainSol.cpp +++ b/src/d/actor/d_a_npc_drainSol.cpp @@ -279,7 +279,7 @@ bool daNpcDrSol_c::wait(void* param_0) { mMode = 2; break; case 2: - if (dComIfGp_event_runCheck() != 0 && eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk()) { if (!dComIfGp_event_chkTalkXY() || dComIfGp_evmng_ChkPresentEnd()) { setAction(&daNpcDrSol_c::talk); } diff --git a/src/d/actor/d_a_npc_du.cpp b/src/d/actor/d_a_npc_du.cpp index 591d594adce..edc0f1d3861 100644 --- a/src/d/actor/d_a_npc_du.cpp +++ b/src/d/actor/d_a_npc_du.cpp @@ -347,7 +347,7 @@ static void npc_du_message(npc_du_class* i_this) { cLib_addCalcAngleS2(&actor->current.angle.y, i_this->mPlayerAngleY, 2, maxStep); - if (dComIfGp_event_runCheck() == FALSE && i_this->mPlayerDist > 220.0f) { + if (!dComIfGp_event_runCheck() && i_this->mPlayerDist > 220.0f) { if (i_this->mSwimFlag == 0) { i_this->mAction = ACTION_NORMAL; } else { diff --git a/src/d/actor/d_a_npc_gra.cpp b/src/d/actor/d_a_npc_gra.cpp index aa00f9cf7d3..246aa4c9b5a 100644 --- a/src/d/actor/d_a_npc_gra.cpp +++ b/src/d/actor/d_a_npc_gra.cpp @@ -784,7 +784,7 @@ BOOL daNpc_grA_c::main() { attention_info.flags = 0; } if (GET_HIO(mNpcFParams.debug_mode_ON) == 0 && - (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) + (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { u16 j = 1; if (mOrderEvtNo != 0) { @@ -1795,7 +1795,7 @@ enum Event_Cut_Nums { BOOL daNpc_grA_c::doEvent() { dEvent_manager_c* manager = NULL; BOOL ret = FALSE; - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { manager = &dComIfGp_getEventManager(); if (field_0x1691 == 0) { mOrderNewEvt = 0; @@ -4024,7 +4024,7 @@ BOOL daNpc_grA_c::talk(void*) { fopAcM_createItemForPresentDemo(¤t.pos, sp8, 0, -1, -1, NULL, NULL); if (field_0x1480 != fpcM_ERROR_PROCESS_ID_e) { s16 r25 = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, r25, 1, -1); field_0x9ec = 1; r29 = 1; @@ -4035,7 +4035,7 @@ BOOL daNpc_grA_c::talk(void*) { } } else { if (mType == 0xa && field_0x1486 == 0 && daNpcF_chkEvtBit(0x187)) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); field_0x9ec = 1; mOrderNewEvt = 1; mOrderEvtNo = 0xa; diff --git a/src/d/actor/d_a_npc_grc.cpp b/src/d/actor/d_a_npc_grc.cpp index 577763adab1..7b72766233f 100644 --- a/src/d/actor/d_a_npc_grc.cpp +++ b/src/d/actor/d_a_npc_grc.cpp @@ -500,7 +500,7 @@ BOOL daNpc_grC_c::main() { attention_info.flags = 0; } - if (!daNpc_grC_Param_c::m.common.debug_mode_ON && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) { + if (!daNpc_grC_Param_c::m.common.debug_mode_ON && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { if (mOrderEvtNo != 0) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); } @@ -1066,7 +1066,7 @@ void daNpc_grC_c::doNormalAction(int param_1) { BOOL daNpc_grC_c::doEvent() { BOOL rv = FALSE; - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); if (!field_0xe51) { @@ -1451,7 +1451,7 @@ BOOL daNpc_grC_c::talk(void* param_1) { if (mItemID != fpcM_ERROR_PROCESS_ID_e) { s16 i_eventID = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, i_eventID, 1, 0xFFFF); field_0x9ec = true; rv = TRUE; diff --git a/src/d/actor/d_a_npc_grd.cpp b/src/d/actor/d_a_npc_grd.cpp index f81e422472c..351e05b4431 100644 --- a/src/d/actor/d_a_npc_grd.cpp +++ b/src/d/actor/d_a_npc_grd.cpp @@ -382,7 +382,7 @@ BOOL daNpc_Grd_c::main() { } if (!mpHIO->m.common.debug_mode_ON && - (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) + (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { if (mOrderEvtNo != 0) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); @@ -843,7 +843,7 @@ void daNpc_Grd_c::doNormalAction(int param_1) { BOOL daNpc_Grd_c::doEvent() { BOOL rv = FALSE; - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); if (eventInfo.mCommand == 1 || eventInfo.mCommand == 2) { diff --git a/src/d/actor/d_a_npc_grm.cpp b/src/d/actor/d_a_npc_grm.cpp index f0a53d4428e..f0f2270f754 100644 --- a/src/d/actor/d_a_npc_grm.cpp +++ b/src/d/actor/d_a_npc_grm.cpp @@ -392,13 +392,7 @@ void daNpc_grM_c::srchActors() { BOOL daNpc_grM_c::evtProc() { BOOL ret = FALSE; -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) { -#else if (dComIfGp_event_runCheck()) { -#endif if (eventInfo.checkCommandTalk()) { if (!checkChangeEvt()) { evtTalk(); @@ -408,11 +402,7 @@ BOOL daNpc_grM_c::evtProc() { dComIfGp_getEventManager().endCheck(mEvtId)) { if (evtEndProc()) { -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif mEvtId = -1; } } else { diff --git a/src/d/actor/d_a_npc_gro.cpp b/src/d/actor/d_a_npc_gro.cpp index 71e5f7367a0..6dd71c0900c 100644 --- a/src/d/actor/d_a_npc_gro.cpp +++ b/src/d/actor/d_a_npc_gro.cpp @@ -639,7 +639,7 @@ BOOL daNpc_grO_c::main() { attention_info.flags = 0; } - if (!mpHIO->m.common.debug_mode_ON && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) { + if (!mpHIO->m.common.debug_mode_ON && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { if (mOrderEvtNo != EVT_NONE) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); } @@ -1289,7 +1289,7 @@ BOOL daNpc_grO_c::doEvent() { int evtCutNo = 0; BOOL rv = FALSE; - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); if ((eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) && !mUnkFlag) { @@ -1672,7 +1672,7 @@ int daNpc_grO_c::talk(void* param_1) { mItemID = fopAcM_createItemForPresentDemo(¤t.pos, itemId, 0, -1, -1, NULL, NULL); if (mItemID != fpcM_ERROR_PROCESS_ID_e) { s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, eventIdx, 1, 0xFFFF); mUnkFlag = 1; field_0x9ec = true; @@ -1684,7 +1684,7 @@ int daNpc_grO_c::talk(void* param_1) { // dSv_event_tmp_flag_c::T_0081 - Kakariko Village - For use in fundraiser event completion cutscene daNpcF_chkTmpBit(81) ) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); field_0x9ec = true; mOrderNewEvt = true; mOrderEvtNo = EVT_BOKIN_FINISH; diff --git a/src/d/actor/d_a_npc_grr.cpp b/src/d/actor/d_a_npc_grr.cpp index c8eb2daf26a..76f2c743fbc 100644 --- a/src/d/actor/d_a_npc_grr.cpp +++ b/src/d/actor/d_a_npc_grr.cpp @@ -489,7 +489,7 @@ BOOL daNpc_grR_c::main() { attention_info.flags = 0; } - if (!daNpc_grR_Param_c::m.common.debug_mode_ON && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) { + if (!daNpc_grR_Param_c::m.common.debug_mode_ON && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { if (mOrderEvtNo != 0) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); } @@ -1048,7 +1048,7 @@ void daNpc_grR_c::doNormalAction(int param_1) { BOOL daNpc_grR_c::doEvent() { BOOL rv = FALSE; - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); if ((eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) && !field_0xe18) { @@ -1333,7 +1333,7 @@ int daNpc_grR_c::talk(void* param_1) { if (mItemID != fpcM_ERROR_PROCESS_ID_e) { s16 i_eventID = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, i_eventID, 1, 0xFFFF); field_0xe18 = true; field_0x9ec = true; diff --git a/src/d/actor/d_a_npc_grs.cpp b/src/d/actor/d_a_npc_grs.cpp index 06e9bf36b16..727a26a15b8 100644 --- a/src/d/actor/d_a_npc_grs.cpp +++ b/src/d/actor/d_a_npc_grs.cpp @@ -385,7 +385,7 @@ int daNpc_grS_c::main() { } if (!mpHIO->m.common.debug_mode_ON) { - if (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK())) { + if (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK())) { if (mOrderEvtNo != 0) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); } @@ -896,7 +896,7 @@ int daNpc_grS_c::doEvent() { int evtCutNo; int staffId; - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { eventManager = &dComIfGp_getEventManager(); if ((eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) && !mIsSpeaking) @@ -1187,7 +1187,7 @@ int daNpc_grS_c::talk(void* param_0) { if (mPresentItemId != fpcM_ERROR_PROCESS_ID_e) { s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, eventIdx, 1, 0xffff); mIsSpeaking = true; field_0x9ec = true; diff --git a/src/d/actor/d_a_npc_grz.cpp b/src/d/actor/d_a_npc_grz.cpp index 39fb6961060..bc1d19c0d82 100644 --- a/src/d/actor/d_a_npc_grz.cpp +++ b/src/d/actor/d_a_npc_grz.cpp @@ -711,7 +711,7 @@ BOOL daNpc_Grz_c::main() { } if (!daNpc_Grz_Param_c::m.common.debug_mode_ON) { - if (!dComIfGp_event_runCheck() || mOrderNewEvt && dComIfGp_getEvent().isOrderOK()) { + if (!dComIfGp_event_runCheck() || mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()) { if (mOrderEvtNo != EVT_NONE) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); } @@ -1500,7 +1500,7 @@ void daNpc_Grz_c::doNormalAction(int param_1) { BOOL daNpc_Grz_c::doEvent() { BOOL rv = FALSE; - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); if (eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) { @@ -1601,8 +1601,8 @@ bool daNpc_Grz_c::setSkipZev(int param_1, int param_2) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); if (strcmp(eventManager.getRunEventName(), l_evtNames[param_1]) == 0) { - dComIfGp_getEvent().setSkipZev(this, l_evtNames[param_2]); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->setSkipZev(this, l_evtNames[param_2]); + dComIfGp_getEvent()->onSkipFade(); return true; } diff --git a/src/d/actor/d_a_npc_gwolf.cpp b/src/d/actor/d_a_npc_gwolf.cpp index cc4395c1c12..e97fb66ff4c 100644 --- a/src/d/actor/d_a_npc_gwolf.cpp +++ b/src/d/actor/d_a_npc_gwolf.cpp @@ -558,7 +558,7 @@ BOOL daNpc_GWolf_c::main() { attention_info.flags = 0; } - if (!daNpc_GWolf_Param_c::m.common.debug_mode_ON && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) { + if (!daNpc_GWolf_Param_c::m.common.debug_mode_ON && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { if (mOrderEvtNo != EVT_NONE) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); } @@ -1057,7 +1057,7 @@ void daNpc_GWolf_c::doNormalAction(int param_1) { BOOL daNpc_GWolf_c::doEvent() { BOOL rv = FALSE; - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); if (eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) { @@ -1636,8 +1636,8 @@ BOOL daNpc_GWolf_c::ECut_meetGWolf(int i_staffId) { case 0: setMotion(MOT_WAITSIT, -1.0f, 0); setLookMode(LOOK_PLAYER); - dComIfGp_getEvent().setSkipProc(this, callback_proc, 0); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, callback_proc, 0); + dComIfGp_getEvent()->onSkipFade(); break; } } diff --git a/src/d/actor/d_a_npc_hanjo.cpp b/src/d/actor/d_a_npc_hanjo.cpp index b5522ac0fa1..9d644e90176 100644 --- a/src/d/actor/d_a_npc_hanjo.cpp +++ b/src/d/actor/d_a_npc_hanjo.cpp @@ -1102,7 +1102,7 @@ int daNpc_Hanjo_c::cutConversation(int param_1) { if (iVar6 == 1) { fopAc_ac_c* actor_p =field_0x10c8[0].getActorP(); JUT_ASSERT(2650, NULL != actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); } break; } @@ -1163,7 +1163,7 @@ int daNpc_Hanjo_c::cutPursuitBee(int param_1) { setAngle(home.angle.y); actor_p = field_0x10c8[0].getActorP(); JUT_ASSERT(2748, NULL != actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); for (int i = 0; i < 4; i++) { if (mStones[i].chkActive()) { mStones[i].initialize(); @@ -1309,8 +1309,8 @@ int daNpc_Hanjo_c::cutAppearHawker(int param_1) { initTalk(0xcf, NULL); strcpy(acStack_98, l_evtList[9].eventName); strcat(acStack_98, "@"); - dComIfGp_getEvent().setSkipZev(this, acStack_98); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->setSkipZev(this, acStack_98); + dComIfGp_getEvent()->onSkipFade(); dComIfGp_getVibration().StartShock( 9, 15, cXyz(0.0f, 1.0f, 0.0f)); break; case 1: @@ -1747,9 +1747,8 @@ int daNpc_Hanjo_c::takayose(void* param_0) { } case 2: { field_0xe2d = 0; - dComIfG_play_c& play = g_dComIfG_gameInfo.play; - if (play.getEvent().runCheck()) { - if (strcmp("toal_enter01", play.getEvtManager().getRunEventName()) == 0) { + if (dComIfGp_event_runCheck() != FALSE) { + if (strcmp("toal_enter01", dComIfGp_getEventManager().getRunEventName()) == 0) { dComIfGp_event_setTalkPartner(this); field_0xe2d = 1; } @@ -1835,7 +1834,7 @@ int daNpc_Hanjo_c::takayose(void* param_0) { } } } else { - if (!g_dComIfG_gameInfo.play.getEvent().mEventStatus && + if (!dComIfGp_event_runCheck() && cLib_calcTimer(&field_0x1710) == 0) { field_0x1714++; diff --git a/src/d/actor/d_a_npc_henna.cpp b/src/d/actor/d_a_npc_henna.cpp index b2c0a8e4508..b9cb555a426 100644 --- a/src/d/actor/d_a_npc_henna.cpp +++ b/src/d/actor/d_a_npc_henna.cpp @@ -274,7 +274,7 @@ static void message_shop(npc_henna_class* i_this) { i_this->actor.attention_info.distances[1] = 4; i_this->actor.attention_info.distances[3] = 4; i_this->actor.eventInfo.onCondition(1); - if (dComIfGp_event_runCheck() != 0 && i_this->cam_mode == 0 && + if (dComIfGp_event_runCheck() && i_this->cam_mode == 0 && i_this->actor.eventInfo.checkCommandTalk() != 0) { dComIfGp_event_reset(); @@ -450,7 +450,7 @@ static void henna_ride(npc_henna_class* i_this) { i_this->field_0x70e = 1300; i_this->field_0x720 = player->eyePos; - if (dComIfGp_checkPlayerStatus0(0, 0x2000) != 0 || dComIfGp_event_runCheck() != 0) { + if (dComIfGp_checkPlayerStatus0(0, 0x2000) != 0 || dComIfGp_event_runCheck()) { stickX = stickY = 0.0f; } stickMag = JMAFastSqrt(stickX * stickX + stickY * stickY); @@ -1015,7 +1015,7 @@ static void demo_camera_shop(npc_henna_class* i_this) { switch (i_this->cam_mode) { case 0: { - if (dComIfGp_event_runCheck() == FALSE) { + if (!dComIfGp_event_runCheck()) { if (i_this->field_0x7b5 != 0) { if (i_this->field_0x7b5 == 1 || i_this->field_0x7b5 == 21 || i_this->field_0x7b5 == 41) @@ -2197,14 +2197,7 @@ static void message_guide(npc_henna_class* i_this) { return; } -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (!actor->eventInfo.checkCommandTalk()) { return; } @@ -2234,11 +2227,7 @@ static void message_guide(npc_henna_class* i_this) { } if (i_this->mMsgFlow.doFlow(actor, NULL, 0) != 0) { -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif i_this->mIsTalking = 0; } } else { diff --git a/src/d/actor/d_a_npc_hoz.cpp b/src/d/actor/d_a_npc_hoz.cpp index 081b3980988..3463b27cdee 100644 --- a/src/d/actor/d_a_npc_hoz.cpp +++ b/src/d/actor/d_a_npc_hoz.cpp @@ -660,14 +660,7 @@ BOOL daNpc_Hoz_c::evtCutProc() { int daNpc_Hoz_c::evtProc() { BOOL ret = FALSE; -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (!checkChangeEvt()) { evtTalk(); @@ -676,11 +669,7 @@ int daNpc_Hoz_c::evtProc() { } else if (eventInfo.checkCommandDemoAccrpt() && dComIfGp_getEventManager().endCheck(mEvtId)) { if (evtEndProc()) { -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif mEvtId = -1; } } else { diff --git a/src/d/actor/d_a_npc_impal.cpp b/src/d/actor/d_a_npc_impal.cpp index b3449f43037..9052798b038 100644 --- a/src/d/actor/d_a_npc_impal.cpp +++ b/src/d/actor/d_a_npc_impal.cpp @@ -727,7 +727,7 @@ bool daNpcImpal_c::wait(void* param_0) { } } - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (dComIfGp_event_chkTalkXY()) { if (dComIfGp_evmng_ChkPresentEnd() == FALSE) { @@ -740,7 +740,7 @@ bool daNpcImpal_c::wait(void* param_0) { } else { s16 evt_idx = dComIfGp_getEventManager().getEventIdx(this, "NO_RESPONSE", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, evt_idx, 1, -1); } } else { @@ -814,7 +814,7 @@ bool daNpcImpal_c::talk(void* param_0) { if (mItemPartnerId != 0xffffffff) { s16 evt_idx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, evt_idx, 1, -1); field_0x9ec = 1; } @@ -864,7 +864,7 @@ bool daNpcImpal_c::demo(void* param_0) { setMotion(MOT_0, -1.0f, false); mMode = 2; case 2: { - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& event_manager = dComIfGp_getEventManager(); s32 staff_id = dComIfGp_evmng_getMyStaffId(l_myName, NULL, 0); @@ -975,7 +975,7 @@ BOOL daNpcImpal_c::EvCut_ImpalAppear1(int i_cut_index) { if (mItemPartnerId != 0xffffffff) { s16 evt_idx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, evt_idx, 1, -1); field_0x9ec = 1; mOrderEvtNo = 2; @@ -1153,7 +1153,7 @@ BOOL daNpcImpal_c::main() { (this->*mpActionFn)(NULL); } - if (mItemPartnerId != -1 && dComIfGp_event_runCheck() != 0 && + if (mItemPartnerId != -1 && dComIfGp_event_runCheck() && !strcmp(dComIfGp_getEventManager().getRunEventName(), "DEFAULT_GETITEM")) { dComIfGp_event_setItemPartnerId(mItemPartnerId); diff --git a/src/d/actor/d_a_npc_ins.cpp b/src/d/actor/d_a_npc_ins.cpp index 3ef01d3cf54..0badcf95dd9 100644 --- a/src/d/actor/d_a_npc_ins.cpp +++ b/src/d/actor/d_a_npc_ins.cpp @@ -710,7 +710,7 @@ BOOL daNpcIns_c::main() { (this->*mAction)(NULL); } - if (mItemID != fpcM_ERROR_PROCESS_ID_e && dComIfGp_event_runCheck() != FALSE) { + if (mItemID != fpcM_ERROR_PROCESS_ID_e && dComIfGp_event_runCheck()) { if (strcmp(dComIfGp_getEventManager().getRunEventName(), "DEFAULT_GETITEM") == 0) { dComIfGp_event_setItemPartnerId(mItemID); mItemID = fpcM_ERROR_PROCESS_ID_e; @@ -1053,7 +1053,7 @@ BOOL daNpcIns_c::setAction(actionFunc action) { } void daNpcIns_c::waitEventMng() { - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { setAction(&daNpcIns_c::talk); } else if (dComIfGp_getEventManager().getMyStaffId(l_myName, NULL, 0) != -1) { @@ -1469,7 +1469,7 @@ int daNpcIns_c::talk(void* param_1) { if (mItemID != fpcM_ERROR_PROCESS_ID_e) { daPy_getPlayerActorClass()->cancelOriginalDemo(); s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, eventIdx, 1, 0xFFFF); field_0x9ec = true; mOrderSpeakEvent = 1; @@ -1533,7 +1533,7 @@ int daNpcIns_c::demo(void* param_1) { mMode = 2; // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { eventManager = &dComIfGp_getEventManager(); s32 staffId = eventManager->getMyStaffId(l_myName, NULL, 0); if (staffId != -1) { diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 240203087a3..7fd3a5aad56 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -954,7 +954,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int i_cutIndex) { if (dComIfGp_getEventManager().getIsAddvance(i_cutIndex)) { switch(prm) { case 0: - dComIfGp_getEvent().setPt2(mActorMngr[0].getActorP()); + dComIfGp_getEvent()->setPt2(mActorMngr[0].getActorP()); break; case 1: @@ -964,7 +964,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int i_cutIndex) { case 7: { fopAc_ac_c* iVar6 = mActorMngr[1].getActorP(); if (iVar6) { - dComIfGp_getEvent().setPt2(iVar6); + dComIfGp_getEvent()->setPt2(iVar6); } break; } @@ -1170,7 +1170,7 @@ int daNpc_Jagar_c::cutConfidentialConversation(int i_cutIndex) { break; case 1: - dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); + dComIfGp_getEvent()->setPt2(mActorMngr[1].getActorP()); break; case 2: diff --git a/src/d/actor/d_a_npc_kasi_hana.cpp b/src/d/actor/d_a_npc_kasi_hana.cpp index 011f504abee..fdd6f52e938 100644 --- a/src/d/actor/d_a_npc_kasi_hana.cpp +++ b/src/d/actor/d_a_npc_kasi_hana.cpp @@ -1591,7 +1591,7 @@ int daNpcKasiHana_c::demo(int param_1) { break; case 1: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = dComIfGp_getEventManager().getMyStaffId(l_myName, NULL, 0); if (staffId != -1) { @@ -1721,22 +1721,11 @@ int daNpcKasiHana_c::cheer(int param_1) { field_0x1440 = 1; } -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { - if (!dComIfGp_event_chkTalkXY() || dComIfGp_evmng_ChkPresentEnd()) { + if (dComIfGp_event_chkTalkXY() == FALSE || dComIfGp_evmng_ChkPresentEnd()) { mTalked = true; -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif } } } else { diff --git a/src/d/actor/d_a_npc_kasi_kyu.cpp b/src/d/actor/d_a_npc_kasi_kyu.cpp index 64ce7ef0278..ebda0254dab 100644 --- a/src/d/actor/d_a_npc_kasi_kyu.cpp +++ b/src/d/actor/d_a_npc_kasi_kyu.cpp @@ -771,24 +771,13 @@ int daNpcKasiKyu_c::wait(int param_1) { } } -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { - if (!dComIfGp_event_chkTalkXY() || dComIfGp_evmng_ChkPresentEnd()) { + if (dComIfGp_event_chkTalkXY() == FALSE || dComIfGp_evmng_ChkPresentEnd()) { OS_REPORT("------------------kyu talk reset!!\n"); mTalked = true; -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif } } } else { @@ -1335,22 +1324,11 @@ int daNpcKasiKyu_c::cheer(int param_1) { current.angle.y = mCurAngle.y; shape_angle.y = mCurAngle.y; -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { - if (!dComIfGp_event_chkTalkXY() || dComIfGp_evmng_ChkPresentEnd()) { + if (dComIfGp_event_chkTalkXY() == FALSE || dComIfGp_evmng_ChkPresentEnd()) { mTalked = true; -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif } } } else { diff --git a/src/d/actor/d_a_npc_kasi_mich.cpp b/src/d/actor/d_a_npc_kasi_mich.cpp index 5b15b658345..fdef4db8c34 100644 --- a/src/d/actor/d_a_npc_kasi_mich.cpp +++ b/src/d/actor/d_a_npc_kasi_mich.cpp @@ -770,24 +770,13 @@ int daNpcKasiMich_c::wait(int param_1) { } } -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { - if (!dComIfGp_event_chkTalkXY() || dComIfGp_evmng_ChkPresentEnd()) { + if (dComIfGp_event_chkTalkXY() == FALSE || dComIfGp_evmng_ChkPresentEnd()) { OS_REPORT("------------------mich talk reset!!\n"); mTalked = true; -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif } } } else { @@ -1321,22 +1310,11 @@ int daNpcKasiMich_c::cheer(int param_1) { current.angle.y = mCurAngle.y; shape_angle.y = mCurAngle.y; -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { - if (!dComIfGp_event_chkTalkXY() || dComIfGp_evmng_ChkPresentEnd()) { + if (dComIfGp_event_chkTalkXY() == FALSE || dComIfGp_evmng_ChkPresentEnd()) { mTalked = true; -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif } } } else { diff --git a/src/d/actor/d_a_npc_kkri.cpp b/src/d/actor/d_a_npc_kkri.cpp index bdd4b635a07..edfd036138e 100644 --- a/src/d/actor/d_a_npc_kkri.cpp +++ b/src/d/actor/d_a_npc_kkri.cpp @@ -722,7 +722,7 @@ void daNpc_Kkri_c::setCollision() { if (!mHide) { u32 tg_type = 0xD8FBFDFF; u32 tg_sprm = 0x1F; - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { tg_type = 0; tg_sprm = 0; } else if (mTwilight) { diff --git a/src/d/actor/d_a_npc_kn_base.inc b/src/d/actor/d_a_npc_kn_base.inc index e8ff2bb1c0e..0ee3bb6e337 100644 --- a/src/d/actor/d_a_npc_kn_base.inc +++ b/src/d/actor/d_a_npc_kn_base.inc @@ -140,7 +140,7 @@ int daNpc_Kn_c::execute() { setCollision(); if (field_0xe33 == 0) { - if ((field_0xe39 != 0 && dComIfGp_getEvent().isOrderOK()) || dComIfGp_event_runCheck() == FALSE) + if ((field_0xe39 != 0 && dComIfGp_getEvent()->isOrderOK()) || dComIfGp_event_runCheck() == FALSE) { evtOrder(); } @@ -603,14 +603,7 @@ int daNpc_Kn_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) { int daNpc_Kn_c::evtProc() { BOOL ret = FALSE; -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (!checkChangeEvt()) { evtTalk(); @@ -618,11 +611,7 @@ int daNpc_Kn_c::evtProc() { ret = TRUE; } else if (eventInfo.checkCommandDemoAccrpt() && dComIfGp_getEventManager().endCheck(mEvtId)) { if (evtEndProc()) { -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif mEvtId = -1; } } else { @@ -789,7 +778,7 @@ void daNpc_Kn_c::evtChange() { } mEvtId = dComIfGp_getEventManager().getEventIdx(this, mpEventData[mEvtNo].eventName, 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEvtId, 1, 0xffff); } } diff --git a/src/d/actor/d_a_npc_ks.cpp b/src/d/actor/d_a_npc_ks.cpp index 5e6e00844ac..3d65fb561d4 100644 --- a/src/d/actor/d_a_npc_ks.cpp +++ b/src/d/actor/d_a_npc_ks.cpp @@ -5811,7 +5811,6 @@ static int npc_ks_fsdemo(npc_ks_class* i_this) { int frame = i_this->model->getFrame(); int iVar1 = 0; s16 sVar1 = 0x1000; - s16 range; i_this->field_0x5fc = 0; i_this->field_0xaec = 1; @@ -5936,7 +5935,7 @@ static int npc_ks_fsdemo(npc_ks_class* i_this) { } iVar1 = 1; - range = actor->current.angle.y - i_this->target_angle; + s16 range = actor->current.angle.y - i_this->target_angle; if ((range > 0x3000 || range < -0x3000) && i_this->mode < 22) { anm_init(i_this, 28, 3.0f, 0, 1.0f); i_this->mode = 22; @@ -6000,9 +5999,7 @@ static int npc_ks_fsdemo(npc_ks_class* i_this) { fopAcM_OnStatus(actor, 0); cLib_onBit(actor->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); actor->eventInfo.onCondition(dEvtCnd_CANTALK_e); - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) { + if (dComIfGp_event_runCheck()) { if (actor->eventInfo.checkCommandTalk()) { if (i_this->field_0xaee == 0) { i_this->msg_flow.init(actor, 0x74, 0, NULL); @@ -6010,7 +6007,7 @@ static int npc_ks_fsdemo(npc_ks_class* i_this) { } if (i_this->msg_flow.doFlow(actor, NULL, 0)) { - play->getEvent().reset(); + dComIfGp_event_reset(); i_this->field_0xaee = 0; } } diff --git a/src/d/actor/d_a_npc_kyury.cpp b/src/d/actor/d_a_npc_kyury.cpp index 4a94648eb49..329ccdfea62 100644 --- a/src/d/actor/d_a_npc_kyury.cpp +++ b/src/d/actor/d_a_npc_kyury.cpp @@ -667,7 +667,7 @@ int daNpc_Kyury_c::cutConversation(int param_0) { switch (local_34) { case 0: actor_p = mActorMngr[0].getActorP(); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); mPlayerAngle = fopAcM_searchPlayerAngleY(this); if (checkStep()) { mStepMode = 0; diff --git a/src/d/actor/d_a_npc_maro.cpp b/src/d/actor/d_a_npc_maro.cpp index 2576375bbc7..8c1f861d882 100644 --- a/src/d/actor/d_a_npc_maro.cpp +++ b/src/d/actor/d_a_npc_maro.cpp @@ -923,7 +923,7 @@ void daNpc_Maro_c::action() { mMode = 1; } - if (dComIfGp_event_runCheck() == 0) { + if (!dComIfGp_event_runCheck()) { field_0x1138 = 0; if (daNpcT_chkTmpBit(0x3C)) { if (dComIfGs_getArrowNum() == 0) { @@ -1770,7 +1770,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { mActorMngr[4].entry(getItaMatoP(1)); actor_p = mActorMngr[4].getActorP(); JUT_ASSERT(0xCC3, NULL != actor_p); - dComIfGp_getEvent().setPtI(actor_p); + dComIfGp_getEvent()->setPtI(actor_p); break; } @@ -1783,7 +1783,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { case 4: { actor_p = mActorMngr[4].getActorP(); JUT_ASSERT(0xCCE, NULL != actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); break; } @@ -1835,11 +1835,11 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { mFaceMotionSeqMngr.setNo(9, 0.0f, 0, 0); mMotionSeqMngr.setNo(0, 0.0f, 0, 0); mEventTimer = timer_val; - dComIfGp_getEvent().setPtT(this); + dComIfGp_getEvent()->setPtT(this); mActorMngr[4].entry(getItaMatoP(1)); actor_p = mActorMngr[4].getActorP(); JUT_ASSERT(0xD0B, NULL != actor_p); - dComIfGp_getEvent().setPtI(actor_p); + dComIfGp_getEvent()->setPtI(actor_p); break; } @@ -1850,7 +1850,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { setAngle(mPlayerAngle); mHide = false; mEventTimer = timer_val; - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); break; } @@ -1858,8 +1858,8 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { mActorMngr[4].entry(getItaMatoP(2)); actor_p = mActorMngr[4].getActorP(); JUT_ASSERT(0xD1E, NULL != actor_p); - dComIfGp_getEvent().setPtI(actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPtI(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); } // fallthrough intentional. case 33: { @@ -1874,8 +1874,8 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { mActorMngr[4].entry(getItaMatoP(2)); actor_p = mActorMngr[4].getActorP(); JUT_ASSERT(0xD2E, NULL != actor_p); - dComIfGp_getEvent().setPtI(actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPtI(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); break; } @@ -1910,7 +1910,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { case 65: { actor_p = mActorMngr[1].getActorP(); JUT_ASSERT(0xD2E, NULL != actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); break; } @@ -1962,12 +1962,12 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { setAngle(fopAcM_searchPlayerAngleY(this)); mHide = false; initTalk(mFlowNodeNo, local_4c); - dComIfGp_getEvent().setPtT(this); + dComIfGp_getEvent()->setPtT(this); break; } case 7: { - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); break; } @@ -1990,8 +1990,8 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { mActorMngr[4].entry(getItaMatoP(2)); actor_p = mActorMngr[4].getActorP(); JUT_ASSERT(0xDB3, NULL != actor_p); - dComIfGp_getEvent().setPtI(actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPtI(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); } // fallthrough intentional. case 35: { @@ -2002,7 +2002,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { case 44: { actor_p = mActorMngr[1].getActorP(); JUT_ASSERT(0xDBD, NULL != actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); break; } @@ -2045,7 +2045,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { if (prm_val == 1 && retval != 0) { actor_p = mActorMngr[4].getActorP(); JUT_ASSERT(0xDF0, NULL != actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); } break; @@ -2088,7 +2088,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { switch (prm_val) { case 2: case 4: { - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); break; } } @@ -2208,7 +2208,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { if (retval != 0) { actor_p = mActorMngr[1].getActorP(); JUT_ASSERT(0xE48, NULL != actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); } break; @@ -2284,7 +2284,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) { my_s_vec.y = fopAcM_searchActorAngleY(daPy_getPlayerActorClass(), this); daPy_getPlayerActorClass()->setPlayerPosAndAngle(&daPy_getPlayerActorClass()->current.pos, my_s_vec.y, 0); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); setAngle(fopAcM_searchPlayerAngleY(this)); } else if (prm_val == 63) { if (!daNpcT_chkEvtBit(0x4B)) { @@ -2555,8 +2555,8 @@ int daNpc_Maro_c::cutMarosWhisper(int arg0) { mDoMtx_stack_c::multVec(&my_vec_0, &field_0xd6c); mJntAnm.sorasu2(&field_0xd6c, 1); initTalk(22, NULL); - dComIfGp_getEvent().setPtT(this); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPtT(this); + dComIfGp_getEvent()->setPt2(this); } } } @@ -2870,7 +2870,7 @@ int daNpc_Maro_c::wait(void* param_0) { field_0x1133 = 1; } - if (field_0x1133 && daNpcT_chkEvtBit(0x3C) && dComIfGp_event_runCheck() == 0) { + if (field_0x1133 && daNpcT_chkEvtBit(0x3C) && !dComIfGp_event_runCheck()) { field_0x1133 = 0; } diff --git a/src/d/actor/d_a_npc_moi.cpp b/src/d/actor/d_a_npc_moi.cpp index 13f2e9749b6..a7bbec2aefa 100644 --- a/src/d/actor/d_a_npc_moi.cpp +++ b/src/d/actor/d_a_npc_moi.cpp @@ -1477,7 +1477,7 @@ int daNpc_Moi_c::cutAppearanceMoi(int param_1) { case 2: mFaceMotionSeqMngr.setNo(MOT_UNK_21, -1.0f, 0, 0); mMotionSeqMngr.setNo(MOT_UNK_45, -1.0f, 0, 0); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); mEventTimer = local_78; break; case 3: diff --git a/src/d/actor/d_a_npc_moir.cpp b/src/d/actor/d_a_npc_moir.cpp index de4fcee8dc6..c6720091455 100644 --- a/src/d/actor/d_a_npc_moir.cpp +++ b/src/d/actor/d_a_npc_moir.cpp @@ -1336,7 +1336,7 @@ bool daNpcMoiR_c::talk(void* param_1) { if (field_0xdf8 != -1) { s16 i_eventID = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, i_eventID, 1, 0xFFFF); field_0x9ec = true; } @@ -1513,7 +1513,7 @@ bool daNpcMoiR_c::demo(void* param_1) { field_0xe08 = 2; // fallthrough case 2: - if (dComIfGp_event_runCheck() != 0 && eventInfo.checkCommandTalk() == 0) { + if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk() == 0) { evt_mng = &dComIfGp_getEventManager(); s32 staffIdx = evt_mng->getMyStaffId(l_myName, NULL, 0); if (staffIdx != -1) { @@ -1860,7 +1860,7 @@ BOOL daNpcMoiR_c::main() { (this->*mAction)(NULL); } - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk() && field_0xdf8 != -1) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk() && field_0xdf8 != -1) { dComIfGp_event_setItemPartnerId(field_0xdf8); field_0xdf8 = -1; } diff --git a/src/d/actor/d_a_npc_myna2.cpp b/src/d/actor/d_a_npc_myna2.cpp index 96b0e67bf11..86fd8dbec7c 100644 --- a/src/d/actor/d_a_npc_myna2.cpp +++ b/src/d/actor/d_a_npc_myna2.cpp @@ -307,7 +307,7 @@ BOOL daNpc_myna2_c::main() { attention_info.flags = 0; } - if (!daNpc_myna2_Param_c::m.common.debug_mode_ON && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) { + if (!daNpc_myna2_Param_c::m.common.debug_mode_ON && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { if (mOrderEvtNo != 0) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); } @@ -687,7 +687,7 @@ void daNpc_myna2_c::doNormalAction(int param_0) { BOOL daNpc_myna2_c::doEvent() { BOOL rv = FALSE; - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); if (eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) { @@ -854,7 +854,7 @@ int daNpc_myna2_c::waitFailure(void* param_0) { fopAcM_delete(myna); } - if (dComIfGp_getEvent().isOrderOK()) { + if (dComIfGp_getEvent()->isOrderOK()) { mOrderEvtNo = 2; mOrderNewEvt = 1; } @@ -878,7 +878,7 @@ int daNpc_myna2_c::waitGoal(void* param_0) { case 2: mSound.playSumomoBgm(0); - if (!daPy_getPlayerActorClass()->checkCargoCarry() && dComIfGp_getEvent().isOrderOK()) { + if (!daPy_getPlayerActorClass()->checkCargoCarry() && dComIfGp_getEvent()->isOrderOK()) { if (dComIfGp_getMessageCountNumber() >= 10000 && (!daNpcF_chkEvtBit(0x11E) || dComIfGp_getMessageCountNumber() > dComIfGs_getBalloonScore() || (dComIfGp_getMessageCountNumber() >= 0xF00E))) { mOrderEvtNo = 4; } else { diff --git a/src/d/actor/d_a_npc_pachi_taro.cpp b/src/d/actor/d_a_npc_pachi_taro.cpp index 9ca34144e4d..bd27296dc27 100644 --- a/src/d/actor/d_a_npc_pachi_taro.cpp +++ b/src/d/actor/d_a_npc_pachi_taro.cpp @@ -1471,7 +1471,7 @@ int daNpc_Pachi_Taro_c::wait(void* param_1) { if (field_0x1004 == 0) { mEvtNo = EVT_TUTRIAL_BEGIN; mPrevEvtNo = mEvtNo; - dComIfGp_getEvent().setSkipProc(this, dEv_defaultSkipProc, 0); + dComIfGp_getEvent()->setSkipProc(this, dEv_defaultSkipProc, 0); } else if (field_0x1004 == 1) { watch_tutrial(); } @@ -1801,7 +1801,7 @@ BOOL daNpc_Pachi_Taro_c::evtEndProc() { BOOL daNpc_Pachi_Taro_c::cutTutrialBegin(int i_staffId) { field_0x1004 = 1; - dComIfGp_getEvent().setSkipZev(this, "TUTRIAL_BEGIN_SKIP"); + dComIfGp_getEvent()->setSkipZev(this, "TUTRIAL_BEGIN_SKIP"); dEvent_manager_c& eventManager = dComIfGp_getEventManager(); int* cutId = NULL; cutId = dComIfGp_evmng_getMyIntegerP(i_staffId, "cutId"); diff --git a/src/d/actor/d_a_npc_prayer.cpp b/src/d/actor/d_a_npc_prayer.cpp index 57fcebbc697..13b39e0bbbf 100644 --- a/src/d/actor/d_a_npc_prayer.cpp +++ b/src/d/actor/d_a_npc_prayer.cpp @@ -651,7 +651,7 @@ bool daNpcPray_c::demo(void*) { mActionMode = 2; break; case 2: - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& evtmgr = dComIfGp_getEventManager(); const int staffID = evtmgr.getMyStaffId(l_myName, NULL, 0); if (staffID != -1) { diff --git a/src/d/actor/d_a_npc_rafrel.cpp b/src/d/actor/d_a_npc_rafrel.cpp index e35c843276c..a3576806d46 100644 --- a/src/d/actor/d_a_npc_rafrel.cpp +++ b/src/d/actor/d_a_npc_rafrel.cpp @@ -439,7 +439,7 @@ BOOL daNpcRafrel_c::main() { (this->*field_0xde0)(NULL); } - if (field_0xe00 != fpcM_ERROR_PROCESS_ID_e && dComIfGp_event_runCheck() != 0) { + if (field_0xe00 != fpcM_ERROR_PROCESS_ID_e && dComIfGp_event_runCheck()) { if (strcmp(dComIfGp_getEventManager().getRunEventName(), "DEFAULT_GETITEM") == 0) { dComIfGp_event_setItemPartnerId(field_0xe00); field_0xe00 = -1; @@ -1065,7 +1065,6 @@ BOOL daNpcRafrel_c::chkFindPlayer() { return ret; } -// NONMATCHING - gameinfo event load stuff bool daNpcRafrel_c::wait_type01(void* param_0) { switch (field_0xe10) { case 0: @@ -1130,26 +1129,13 @@ bool daNpcRafrel_c::wait_type01(void* param_0) { field_0xe15 = 1; } -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck() != 0) -#endif - { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (isSneaking()) { mOrderEvtNo = 6; changeEvent(l_arcNames[0], l_evtNames[mOrderEvtNo], 1, 0xFFFF); } else if (dComIfGp_event_chkTalkXY()) { -#if VERSION != VERSION_SHIELD_DEBUG - dEvent_manager_c* evtmng_p = &play->getEvtManager(); - if (evtmng_p->ChkPresentEnd() == 0) -#else - if (dComIfGp_evmng_ChkPresentEnd() == 0) -#endif - { + if (dComIfGp_evmng_ChkPresentEnd() == 0) { return 1; } @@ -1157,12 +1143,8 @@ bool daNpcRafrel_c::wait_type01(void* param_0) { field_0xe0c = 0x21; setAction(&daNpcRafrel_c::talk); } else { -#if VERSION != VERSION_SHIELD_DEBUG - s16 sp8 = evtmng_p->getEventIdx(this, "NO_RESPONSE", 0xFF); -#else s16 sp8 = dComIfGp_getEventManager().getEventIdx(this, "NO_RESPONSE", 0xFF); -#endif - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, sp8, 1, 0xFFFF); } } else { @@ -1332,7 +1314,7 @@ bool daNpcRafrel_c::talk(void* param_0) { field_0xe00 = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1, -1, NULL, NULL); if (field_0xe00 != fpcM_ERROR_PROCESS_ID_e) { s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, eventIdx, 1, 0xFFFF); field_0xe16 = 1; field_0x9ec = 1; @@ -1382,7 +1364,7 @@ bool daNpcRafrel_c::demo(void* param_0) { field_0xe10 = 2; /* fallthrough */ case 2: - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { evtmgr = &dComIfGp_getEventManager(); const int staffId = evtmgr->getMyStaffId(l_myName, NULL, 0); @@ -1611,7 +1593,7 @@ int daNpcRafrel_c::EvCut_Appear(int i_staffId) { OS_REPORT("二択分岐 %s\n", choiceNo == 0 ? "はい" : "いいえ"); if (choiceNo > 0) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); } return 1; diff --git a/src/d/actor/d_a_npc_saru.cpp b/src/d/actor/d_a_npc_saru.cpp index 60962244066..dc0dddaf085 100644 --- a/src/d/actor/d_a_npc_saru.cpp +++ b/src/d/actor/d_a_npc_saru.cpp @@ -935,8 +935,8 @@ int daNpc_Saru_c::cutYmLook(int param_1) { case 0: strcpy(acStack_88, l_evtList[2].eventName); strcat(acStack_88, "@"); - dComIfGp_getEvent().setSkipZev(this, acStack_88); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->setSkipZev(this, acStack_88); + dComIfGp_getEvent()->onSkipFade(); field_0xfd9 = 1; case 1: diff --git a/src/d/actor/d_a_npc_seira.cpp b/src/d/actor/d_a_npc_seira.cpp index 7bf59cff964..81e3f10ed3e 100644 --- a/src/d/actor/d_a_npc_seira.cpp +++ b/src/d/actor/d_a_npc_seira.cpp @@ -670,7 +670,7 @@ void daNpc_Seira_c::setCollision() { cXyz cStack_48; f32 cylH, wallR; if (!mHide) { - if (mTwilight == 1 && dComIfGp_event_runCheck() == FALSE) { + if (mTwilight == 1 && !dComIfGp_event_runCheck()) { mCyl1.SetCoSPrm(0x69); } else { mCyl1.SetCoSPrm(0x79); diff --git a/src/d/actor/d_a_npc_seira2.cpp b/src/d/actor/d_a_npc_seira2.cpp index 692d74d1cff..b02408954e2 100644 --- a/src/d/actor/d_a_npc_seira2.cpp +++ b/src/d/actor/d_a_npc_seira2.cpp @@ -579,7 +579,7 @@ void daNpc_Seira2_c::setCollision() { cXyz cStack_48; f32 cylH, wallR; if (!mHide) { - if (mTwilight == 1 && dComIfGp_event_runCheck() == FALSE) { + if (mTwilight == 1 && !dComIfGp_event_runCheck()) { mCyl1.SetCoSPrm(0x69); } else { mCyl1.SetCoSPrm(0x79); diff --git a/src/d/actor/d_a_npc_shad.cpp b/src/d/actor/d_a_npc_shad.cpp index 9ee4e084869..b08ed46f8be 100644 --- a/src/d/actor/d_a_npc_shad.cpp +++ b/src/d/actor/d_a_npc_shad.cpp @@ -1327,7 +1327,7 @@ bool daNpcShad_c::wait_type1(void* param_1) { } } - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (dComIfGp_event_chkTalkXY()) { if (!dComIfGp_evmng_ChkPresentEnd()) { @@ -1352,7 +1352,7 @@ bool daNpcShad_c::wait_type1(void* param_1) { changeEvent(l_evtArcs[mOrderEvtNo], l_evtNames[mOrderEvtNo], 1, 0xFFFF); } else { s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "NO_RESPONSE", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, eventIdx, 1, 0xFFFF); } } else if (daNpcF_chkEvtBit(0x313)) { @@ -1493,7 +1493,7 @@ bool daNpcShad_c::talk(void* param_1) { if (mItemPartnerId != fpcM_ERROR_PROCESS_ID_e) { eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, eventIdx, 1, 0xFFFF); field_0x9ec = true; setWaitAction(); @@ -1546,7 +1546,7 @@ bool daNpcShad_c::demo(void* param_1) { field_0xe1a = 2; // fallthrough case 2: - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 iVar1 = eventManager.getMyStaffId(l_myName, NULL, 0); if (iVar1 != -1) { @@ -1859,8 +1859,8 @@ BOOL daNpcShad_c::EvCut_ToChantSpell2(int i_cutIndex) { fopAcM_OnStatus(actor, fopAcM_STATUS_UNK_0x800); } - dComIfGp_getEvent().startCheckSkipEdge(this); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->startCheckSkipEdge(this); + dComIfGp_getEvent()->onSkipFade(); // fallthrough case '0003': setLookMode(LOOK_NONE, NULL, NULL); @@ -1913,7 +1913,7 @@ BOOL daNpcShad_c::EvCut_ToChantSpell2(int i_cutIndex) { } } - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { Z2GetAudioMgr()->unMuteSceneBgm(70); daNpcF_clearMessageTmpBit(); daNpcF_onEvtBit(0x12F); @@ -2046,7 +2046,7 @@ BOOL daNpcShad_c::EvCut_DiscoveryCannon(int i_cutIndex) { if (eventManager->getIsAddvance(i_cutIndex)) { switch (*cutName) { case '0001': - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); Z2GetAudioMgr()->bgmStreamPrepare(0x200007C); Z2GetAudioMgr()->bgmStreamPlay(); setExpression(EXPR_NONE, 0.0f); @@ -2097,7 +2097,7 @@ BOOL daNpcShad_c::EvCut_DiscoveryCannon(int i_cutIndex) { } } - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { Z2GetAudioMgr()->bgmStreamStop(30); daNpcF_clearMessageTmpBit(); daNpcF_onEvtBit(0x312); @@ -2201,7 +2201,7 @@ BOOL daNpcShad_c::EvCut_Disappear(int i_cutIndex) { if (eventManager->getIsAddvance(i_cutIndex)) { switch (*cutName) { case '0001': - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); // fallthrough case '0004': setExpression(EXPR_NONE, -1.0f); @@ -2264,7 +2264,7 @@ BOOL daNpcShad_c::EvCut_Disappear(int i_cutIndex) { setExpressionTalkAfter(); } - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { daNpcF_clearMessageTmpBit(); daNpcF_onEvtBit(0x311); mOrderEvtNo = 9; @@ -2553,7 +2553,7 @@ BOOL daNpcShad_c::main() { (this->*mActionFn)(NULL); } - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk() && mItemPartnerId != fpcM_ERROR_PROCESS_ID_e) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk() && mItemPartnerId != fpcM_ERROR_PROCESS_ID_e) { dComIfGp_event_setItemPartnerId(mItemPartnerId); mItemPartnerId = fpcM_ERROR_PROCESS_ID_e; } diff --git a/src/d/actor/d_a_npc_shoe.cpp b/src/d/actor/d_a_npc_shoe.cpp index 40d70575c3d..c8e825cd098 100644 --- a/src/d/actor/d_a_npc_shoe.cpp +++ b/src/d/actor/d_a_npc_shoe.cpp @@ -602,7 +602,7 @@ bool daNpcShoe_c::demo(void* param_0) { case 1: break; case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staff_id = eventManager.getMyStaffId(l_myName, NULL, 0); if (staff_id != -1) { @@ -674,7 +674,7 @@ BOOL daNpcShoe_c::main() { if (mpActionFn != NULL) { (this->*mpActionFn)(0); } - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk() && field_0xe00 != -1) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk() && field_0xe00 != -1) { dComIfGp_event_setItemPartnerId(field_0xe00); field_0xe00 = -1; } diff --git a/src/d/actor/d_a_npc_soldierA.cpp b/src/d/actor/d_a_npc_soldierA.cpp index 80dabacb74d..ddfc2441759 100644 --- a/src/d/actor/d_a_npc_soldierA.cpp +++ b/src/d/actor/d_a_npc_soldierA.cpp @@ -427,7 +427,7 @@ BOOL daNpc_SoldierA_c::main() { } if (!mHIO->m.common.debug_mode_ON) { - if (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK())) { + if (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK())) { if (mOrderEvtNo != EVT_NONE) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); } @@ -766,7 +766,7 @@ BOOL daNpc_SoldierA_c::doEvent() { int unused = 0; BOOL rv = FALSE; - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& event_manager = dComIfGp_getEventManager(); if (eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) { diff --git a/src/d/actor/d_a_npc_soldierB.cpp b/src/d/actor/d_a_npc_soldierB.cpp index deacd75f6ae..d26caca468d 100644 --- a/src/d/actor/d_a_npc_soldierB.cpp +++ b/src/d/actor/d_a_npc_soldierB.cpp @@ -386,7 +386,7 @@ BOOL daNpc_SoldierB_c::main() { } if (!mHIO->m.common.debug_mode_ON) { - if (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK())) { + if (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK())) { if (mOrderEvtNo != EVT_NONE) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); } @@ -661,7 +661,7 @@ void daNpc_SoldierB_c::doNormalAction(int param_1) { BOOL daNpc_SoldierB_c::doEvent() { BOOL rv = FALSE; - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& event_manager = dComIfGp_getEventManager(); if (eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) { diff --git a/src/d/actor/d_a_npc_taro.cpp b/src/d/actor/d_a_npc_taro.cpp index 6585bbd22c2..8c1f7d95255 100644 --- a/src/d/actor/d_a_npc_taro.cpp +++ b/src/d/actor/d_a_npc_taro.cpp @@ -2608,14 +2608,14 @@ int daNpc_Taro_c::cutNotGonnaLet(int param_1) { fopAc_ac_c* actor_p = mActors[0].getActorP(); JUT_ASSERT(5464, NULL != actor_p); mJntAnm.lookActor(actor_p, -40.0f, 0); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); break; } case 7: { fopAc_ac_c* actor_p = mActors[2].getActorP(); JUT_ASSERT(5473, NULL != actor_p); mJntAnm.lookActor(actor_p, -40.0f, 0); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); break; } case 9: @@ -2648,12 +2648,12 @@ int daNpc_Taro_c::cutNotGonnaLet(int param_1) { case 21: { fopAc_ac_c* actor_p = mActors[0].getActorP(); JUT_ASSERT(5517, NULL != actor_p); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); break; } case 22: mJntAnm.lookPlayer(0); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); break; case 30: daNpcT_getPlayerInfoFromPlayerList(7, fopAcM_GetRoomNo(this), &cStack_30, &cStack_50); diff --git a/src/d/actor/d_a_npc_the.cpp b/src/d/actor/d_a_npc_the.cpp index c02974579df..d6145414274 100644 --- a/src/d/actor/d_a_npc_the.cpp +++ b/src/d/actor/d_a_npc_the.cpp @@ -827,7 +827,7 @@ BOOL daNpcThe_c::talk(void* param_0) { if (mItemID != -1) { s16 event_id = dComIfGp_getEventManager().getEventIdx( this, "DEFAULT_GETITEM", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, event_id, 1, 0xffff); field_0x9ec = true; } @@ -1126,17 +1126,13 @@ BOOL daNpcThe_c::main() { attention_info.flags = 0; } - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_inf_c* gameInfo = &g_dComIfG_gameInfo; if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk() && mItemID != -1) { - // Fakematch, should be: - // dComIfGp_event_setItemPartnerId(mItemID); - gameInfo->play.getEvent().setPtI_Id(mItemID); + dComIfGp_event_setItemPartnerId(mItemID); mItemID = -1; } if (!mpHIO->m.common.debug_mode_ON && - (dComIfGp_event_runCheck() == FALSE || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) + (dComIfGp_event_runCheck() == FALSE || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { if (mOrderEvtNo != 0 && l_resNames[l_evtGetParamList[mOrderEvtNo]] != NULL) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo]]); @@ -1180,7 +1176,7 @@ void daNpcThe_c::setExpressionTalkAfter() { BOOL daNpcThe_c::doEvent() { BOOL ret = false; - if (dComIfGp_event_runCheck() != false) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& event_manager = dComIfGp_getEventManager(); if (eventInfo.checkCommandTalk()) { if (mTwilight) { @@ -1195,7 +1191,7 @@ BOOL daNpcThe_c::doEvent() { event_manager.setObjectArchive(eventInfo.getArchiveName()); mEventIdx = event_manager.getEventIdx(this, l_evtNames[mOrderEvtNo], 0xff); if (mEventIdx != -1) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventIdx, 1, 0xffff); } } else if (dComIfGp_event_chkTalkXY()) { @@ -1220,7 +1216,7 @@ BOOL daNpcThe_c::doEvent() { } else { s16 event_idx = dComIfGp_getEventManager().getEventIdx(this, "NO_RESPONSE", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, event_idx, 1, 0xffff); } } else { diff --git a/src/d/actor/d_a_npc_theB.cpp b/src/d/actor/d_a_npc_theB.cpp index 31261fd91ac..29df164a3f6 100644 --- a/src/d/actor/d_a_npc_theB.cpp +++ b/src/d/actor/d_a_npc_theB.cpp @@ -452,7 +452,7 @@ BOOL daNpcTheB_c::main() { field_0x9ee = false; } - if (dComIfGp_event_runCheck() == FALSE || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK())) { + if (dComIfGp_event_runCheck() == FALSE || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK())) { mOrderEvtNo = EVT_NONE; if (strcmp(dComIfGp_getStartStageName(), "F_SP121") == 0) { @@ -880,8 +880,7 @@ BOOL daNpcTheB_c::doEvent() { BOOL rv = FALSE; s32 staffId; - dComIfG_play_c& play = g_dComIfG_gameInfo.play; // Fakematch - if (play.getEvent().runCheck()) { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (chkAction(&daNpcTheB_c::talk)) { (this->*mAction)(NULL); @@ -896,8 +895,8 @@ BOOL daNpcTheB_c::doEvent() { rv = TRUE; } else { - dEvent_manager_c& eventManager = play.getEvtManager(); - staffId = eventManager.getMyStaffId(l_myName, NULL, 0); + dEvent_manager_c* eventManager = &dComIfGp_getEventManager(); + staffId = eventManager->getMyStaffId(l_myName, NULL, 0); if (staffId != -1) { mStaffID = staffId; JUT_ASSERT(1357, NULL != mEvtSeqList[mOrderEvtNo]); @@ -908,7 +907,7 @@ BOOL daNpcTheB_c::doEvent() { } if ((this->*mEvtSeqList[mOrderEvtNo])(staffId)) { - eventManager.cutEnd(staffId); + eventManager->cutEnd(staffId); } rv = TRUE; @@ -926,7 +925,7 @@ BOOL daNpcTheB_c::doEvent() { } } - if (eventInfo.checkCommandDemoAccrpt() && mEventIdx != -1 && eventManager.endCheck(mEventIdx)) { + if (eventInfo.checkCommandDemoAccrpt() && mEventIdx != -1 && eventManager->endCheck(mEventIdx)) { switch (mOrderEvtNo) { default: break; @@ -1245,7 +1244,7 @@ int daNpcTheB_c::EvCut_PersonalCombatRevenge(int i_staffId) { } } - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); break; } @@ -1264,9 +1263,9 @@ int daNpcTheB_c::EvCut_PersonalCombatRevenge(int i_staffId) { } } - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { daNpcF_clearMessageTmpBit(); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->onSkipFade(); dComIfGp_setNextStage("F_SP123", 0, 13, 0); } diff --git a/src/d/actor/d_a_npc_tk.cpp b/src/d/actor/d_a_npc_tk.cpp index 61e4884bdf9..3e98247b201 100644 --- a/src/d/actor/d_a_npc_tk.cpp +++ b/src/d/actor/d_a_npc_tk.cpp @@ -1920,7 +1920,7 @@ void daNPC_TK_c::executeBackHanjoDemo() { void daNPC_TK_c::executeWolfEvent() { mIsExecutingAction = false; if (eventInfo.checkCommandDemoAccrpt() != 0) { - dComIfGp_getEvent().setSkipProc(this, dEv_defaultSkipProc, 0); + dComIfGp_getEvent()->setSkipProc(this, dEv_defaultSkipProc, 0); setActionMode(12); executePerch(); } else { @@ -2896,7 +2896,7 @@ void daNPC_TK_c::action() { case 1: mIsExecutingAction = false; if (eventInfo.checkCommandDemoAccrpt()) { - dComIfGp_getEvent().setSkipZev(this, "TAKAYOSE@"); + dComIfGp_getEvent()->setSkipZev(this, "TAKAYOSE@"); setActionMode(2); executePerch(); } else { diff --git a/src/d/actor/d_a_npc_tkc.cpp b/src/d/actor/d_a_npc_tkc.cpp index 91ba23f7144..45ca1dad165 100644 --- a/src/d/actor/d_a_npc_tkc.cpp +++ b/src/d/actor/d_a_npc_tkc.cpp @@ -1031,7 +1031,7 @@ void daNpcTkc_c::warpTalk() { if (choice == 0) { dCam_getBody()->EndEventCamera(fopAcM_GetID(this)); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); eventInfo.setArchiveName(l_arcName); dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); mEventIdx = dComIfGp_getEventManager().getEventIdx(this, "TKC_WARP", 0xFF); @@ -1122,7 +1122,7 @@ int daNpcTkc_c::EvCut_TksSecretChild(int i_staffId) { break; case 2: - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); eventInfo.setArchiveName(l_arcName); dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); mEventIdx = dComIfGp_getEventManager().getEventIdx(this, "TKS_WARP", 0xFF); diff --git a/src/d/actor/d_a_npc_tks.cpp b/src/d/actor/d_a_npc_tks.cpp index b60efb4595b..1a104cb9ddc 100644 --- a/src/d/actor/d_a_npc_tks.cpp +++ b/src/d/actor/d_a_npc_tks.cpp @@ -575,7 +575,7 @@ BOOL daNpcTks_c::main() { setAction(&daNpcTks_c::demo_appear); } - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk() && mItemID != fpcM_ERROR_PROCESS_ID_e) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk() && mItemID != fpcM_ERROR_PROCESS_ID_e) { dComIfGp_event_setItemPartnerId(mItemID); mItemID = fpcM_ERROR_PROCESS_ID_e; fopAcM_delete(this); @@ -1177,7 +1177,7 @@ void daNpcTks_c::talk() { if (mItemID != fpcM_ERROR_PROCESS_ID_e) { const char* eventName = daPy_py_c::checkNowWolf() ? "WOLF_GET_TKS" : "DEFAULT_GETITEM"; s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, eventName, 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, eventIdx, 1, 0xFFFF); } } @@ -1531,7 +1531,7 @@ void daNpcTks_c::demo_appear() { mMode = 2; // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); if (staffId != -1) { @@ -1648,7 +1648,7 @@ void daNpcTks_c::demo_appear() { if (mItemID != fpcM_ERROR_PROCESS_ID_e) { s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, eventIdx, 1, 0xFFFF); field_0x9ec = true; } @@ -1694,7 +1694,7 @@ void daNpcTks_c::demo_scannon() { mMode = 2; // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); @@ -1800,7 +1800,7 @@ void daNpcTks_c::demo_Lv6Gate() { mMode = 2; // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); @@ -1858,7 +1858,7 @@ void daNpcTks_c::demo_Lv6Gate() { void daNpcTks_c::demo_farewell() { switch (mMode) { case 0: - if (cLib_calcTimer(&field_0x1370) > 0 || dComIfGp_event_runCheck() != FALSE) { + if (cLib_calcTimer(&field_0x1370) > 0 || dComIfGp_event_runCheck()) { return; } @@ -1875,7 +1875,7 @@ void daNpcTks_c::demo_farewell() { mMode = 2; // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); @@ -1885,7 +1885,7 @@ void daNpcTks_c::demo_farewell() { if (eventManager.getIsAddvance(staffId)) { switch (*cutName) { case '0001': - dComIfGp_getEvent().setSkipZev(this, "TKS_FAREWELL_SKIP"); + dComIfGp_getEvent()->setSkipZev(this, "TKS_FAREWELL_SKIP"); // fallthrough case '0006': case '0007': @@ -2059,7 +2059,7 @@ void daNpcTks_c::demo_warpBack() { mMode = 2; // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); @@ -2187,7 +2187,7 @@ void daNpcTks_c::demo_walkBack() { } // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); @@ -2292,7 +2292,7 @@ void daNpcTks_c::demo_Lv7Start() { mMode = 2; // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); @@ -2627,7 +2627,7 @@ void daNpcTks_c::demo_Lv3PickUp() { break; case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); @@ -2758,7 +2758,7 @@ void daNpcTks_c::demo_Lv6PickUp() { } // fallthrough case 2: - if (dComIfGp_event_runCheck() != FALSE && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 staffId = eventManager.getMyStaffId(l_myName, NULL, 0); diff --git a/src/d/actor/d_a_npc_toby.cpp b/src/d/actor/d_a_npc_toby.cpp index c47fd622e33..11b0bd59898 100644 --- a/src/d/actor/d_a_npc_toby.cpp +++ b/src/d/actor/d_a_npc_toby.cpp @@ -795,7 +795,7 @@ void daNpc_Toby_c::action() { } } - if (dComIfGp_event_runCheck() == FALSE && field_0x1001) { + if (!dComIfGp_event_runCheck() && field_0x1001) { fopAcM_delete(this); } } @@ -1688,7 +1688,7 @@ int daNpc_Toby_c::cutConversationAboutSCannon(int arg0) { actor_p = mActorMngr[2].getActorP(); if (actor_p != NULL) { mJntAnm.lookPos(&actor_p->current.pos, 0); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); } else { mJntAnm.lookNone(0); } @@ -1726,7 +1726,7 @@ int daNpc_Toby_c::cutConversationAboutSCannon(int arg0) { field_0xd6c = actor_p->current.pos; field_0xd6c.y += 600.0f; mJntAnm.lookPos(&field_0xd6c, 0); - dComIfGp_getEvent().setPt2(actor_p); + dComIfGp_getEvent()->setPt2(actor_p); } else { mJntAnm.lookNone(0); } diff --git a/src/d/actor/d_a_npc_uri.cpp b/src/d/actor/d_a_npc_uri.cpp index 0482eeeb794..0392c6fa4be 100644 --- a/src/d/actor/d_a_npc_uri.cpp +++ b/src/d/actor/d_a_npc_uri.cpp @@ -1261,7 +1261,7 @@ int daNpc_Uri_c::cutFindWolf(int param_1) { case 1: fopAc_ac_c* actor = mActorMngr[0].getActorP(); if (actor) { - dComIfGp_getEvent().setPt2(actor); + dComIfGp_getEvent()->setPt2(actor); } break; } diff --git a/src/d/actor/d_a_npc_wrestler.cpp b/src/d/actor/d_a_npc_wrestler.cpp index 008133fc49d..d10c22aa094 100644 --- a/src/d/actor/d_a_npc_wrestler.cpp +++ b/src/d/actor/d_a_npc_wrestler.cpp @@ -1739,7 +1739,7 @@ bool daNpcWrestler_c::wait(void* param_1) { } case 2: { - if (dComIfGp_event_runCheck() && (mOrderNewEvt == 0 || !dComIfGp_getEvent().isOrderOK())) { + if (dComIfGp_event_runCheck() && (mOrderNewEvt == 0 || !dComIfGp_getEvent()->isOrderOK())) { actionFunc action; if (eventInfo.checkCommandTalk()) { if (dComIfGp_event_chkTalkXY() == 0 || dComIfGp_evmng_ChkPresentEnd()) { @@ -1898,7 +1898,7 @@ bool daNpcWrestler_c::talk(void* param_1) { field_0xe78 = fopAcM_createItemForPresentDemo(¤t.pos, mItemNo, 0, -1, -1, NULL, NULL); if (field_0xe78 != -1) { s16 sVar1 = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, sVar1, 1, 0xFFFF); field_0x9ec = true; field_0xe8c = field_0xbd8->common.morf_frame; @@ -3682,12 +3682,12 @@ bool daNpcWrestler_c::demoSumouReady(void* param_1) { field_0xe80 = 0; } - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); field_0xe96 = 2; break; case 2: - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { field_0xe84 = 10; } @@ -3895,7 +3895,7 @@ bool daNpcWrestler_c::demoSumouReady(void* param_1) { break; case 10: - dComIfGp_getEvent().setSkipProc(this, NULL, 0); + dComIfGp_getEvent()->setSkipProc(this, NULL, 0); field_0x9ec = true; mItemNo = 3; setAction(&daNpcWrestler_c::gotoArena); @@ -5173,7 +5173,7 @@ BOOL daNpcWrestler_c::main() { (this->*field_0xdcc)(NULL); } - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk() && field_0xe78 != -1) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk() && field_0xe78 != -1) { dComIfGp_event_setItemPartnerId(field_0xe78); field_0xe78 = -1; } diff --git a/src/d/actor/d_a_npc_yelia.cpp b/src/d/actor/d_a_npc_yelia.cpp index ecb987c996b..100b20b170d 100644 --- a/src/d/actor/d_a_npc_yelia.cpp +++ b/src/d/actor/d_a_npc_yelia.cpp @@ -1107,8 +1107,8 @@ BOOL daNpc_Yelia_c::cutTakeWoodStatue(int i_staffId) { Z2GetAudioMgr()->muteSceneBgm(90, 0.0f); strcpy(name, l_evtList[EVENT_TAKE_WOODSTATUE].eventName); strcat(name, "@"); - dComIfGp_getEvent().setSkipZev(this, name); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->setSkipZev(this, name); + dComIfGp_getEvent()->onSkipFade(); break; } @@ -1455,7 +1455,7 @@ BOOL daNpc_Yelia_c::reminiscence(void* param_0) { case MODE_RUN: field_0xe2d = false; - if (dComIfGp_event_runCheck() != FALSE + if (dComIfGp_event_runCheck() && !strcmp("SMELL_1st", dComIfGp_getEventManager().getRunEventName())) { dComIfGp_event_setTalkPartner(this); diff --git a/src/d/actor/d_a_npc_ykm.cpp b/src/d/actor/d_a_npc_ykm.cpp index 44793b7c8f7..ad6cff2179a 100644 --- a/src/d/actor/d_a_npc_ykm.cpp +++ b/src/d/actor/d_a_npc_ykm.cpp @@ -979,7 +979,6 @@ BOOL daNpc_ykM_c::isDelete() { } } -// NONMATCHING - m_nextID load issue, regalloc void daNpc_ykM_c::reset() { csXyz angle; int iVar1 = (u8*)&field_0x1588 - (u8*)&mpNextAction; @@ -2553,7 +2552,7 @@ int daNpc_ykM_c::cutLv5DungeonClear(int i_cutIndex) { mEventTimer = timer; angleY = fopAcM_searchActorAngleY(player, this); ((daPy_py_c*)daPy_getPlayerActorClass())->setPlayerPosAndAngle(&player->current.pos, angleY, 0); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); break; case 2: diff --git a/src/d/actor/d_a_npc_ykw.cpp b/src/d/actor/d_a_npc_ykw.cpp index 24dcf7a925b..8694e2bf994 100644 --- a/src/d/actor/d_a_npc_ykw.cpp +++ b/src/d/actor/d_a_npc_ykw.cpp @@ -1023,7 +1023,7 @@ void daNpc_ykW_c::setCollision() { u32 type = 0xd8fbfdff; u32 unkInt1 = 31; u32 unkInt2 = 0; - if (dComIfGp_event_runCheck() != FALSE || field_0x1069 != 0) { + if (dComIfGp_event_runCheck() || field_0x1069 != 0) { type = 0; unkInt1 = 0; } else if (mTwilight) { @@ -1431,7 +1431,7 @@ int daNpc_ykW_c::cutGoIntoBossRoom(int param_0) { strcpy(unkStrBuf1, l_evtList[5].eventName); } strcat(unkStrBuf1, "@"); - dComIfGp_getEvent().setSkipZev(this, unkStrBuf1); + dComIfGp_getEvent()->setSkipZev(this, unkStrBuf1); } } @@ -1458,7 +1458,7 @@ int daNpc_ykW_c::cutGoIntoBossRoom(int param_0) { bossDoor = mActorMngrs[2].getActorP(); JUT_ASSERT(0xb9e, bossDoor != NULL); - dComIfGp_getEvent().setPt2(bossDoor); + dComIfGp_getEvent()->setPt2(bossDoor); retval = 1; break; @@ -1786,7 +1786,7 @@ BOOL daNpc_ykW_c::cutLv5DungeonClear(int param_0) { itemPos += *fopCamM_GetCenter_p(camera); unkActor1 = putUtuwaHeart(&itemPos, 22.0f, 40.0f, 0x5000, 0); if (unkActor1 != NULL) { - dComIfGp_getEvent().setPt2(unkActor1); + dComIfGp_getEvent()->setPt2(unkActor1); mDoAud_seStart(Z2SE_OBJ_YO_HEART_L, &itemPos, 0, 0); retval = 1; } @@ -2663,7 +2663,7 @@ int daNpc_ykW_c::walk(void* param_0) { } dstPos2 = dstPos; - if (dComIfGp_event_runCheck() != 0 && mStaffId == -1) { + if (dComIfGp_event_runCheck() && mStaffId == -1) { dstPos2 = 1; } diff --git a/src/d/actor/d_a_npc_zra.cpp b/src/d/actor/d_a_npc_zra.cpp index 9631856f8a6..2f262464da7 100644 --- a/src/d/actor/d_a_npc_zra.cpp +++ b/src/d/actor/d_a_npc_zra.cpp @@ -910,7 +910,7 @@ BOOL daNpc_zrA_c::main() { } if (!daNpc_zrA_Param_c::m.mTest - && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) + && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { if (mOrderEvtNo != EVT_NONE) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); @@ -1983,7 +1983,7 @@ BOOL daNpc_zrA_c::doEvent() { BOOL ret = false; int staff_id; - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { event_manager = &dComIfGp_getEventManager(); if (eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) { mOrderNewEvt = false; @@ -2031,7 +2031,7 @@ BOOL daNpc_zrA_c::doEvent() { } else { s16 event_idx = dComIfGp_getEventManager().getEventIdx(this, "NO_RESPONSE", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, event_idx, 1, 0xffff); field_0x9ec = true; } @@ -2131,7 +2131,7 @@ BOOL daNpc_zrA_c::doEvent() { BOOL daNpc_zrA_c::setSkipZev(int i_idx1, int i_idx2) { if (!strcmp(dComIfGp_getEventManager().getRunEventName(), l_evtNames[i_idx1])) { - dComIfGp_getEvent().setSkipZev(this, l_evtNames[i_idx2]); + dComIfGp_getEvent()->setSkipZev(this, l_evtNames[i_idx2]); return true; } return false; diff --git a/src/d/actor/d_a_npc_zra.inc b/src/d/actor/d_a_npc_zra.inc index 4fa5b46b874..4ef98c107bc 100644 --- a/src/d/actor/d_a_npc_zra.inc +++ b/src/d/actor/d_a_npc_zra.inc @@ -1406,7 +1406,7 @@ BOOL daNpc_zrA_c::ECut_carryWaterfall(int i_staffID) { if (event_manager.getIsAddvance(i_staffID)) { switch (prm) { case 0: - dComIfGp_getEvent().setSkipProc(this, dEv_defaultSkipProc, 0); + dComIfGp_getEvent()->setSkipProc(this, dEv_defaultSkipProc, 0); Z2GetAudioMgr()->subBgmStart(Z2BGM_ZORA_D01); break; diff --git a/src/d/actor/d_a_npc_zrc.cpp b/src/d/actor/d_a_npc_zrc.cpp index c6245ebae99..da829e33d75 100644 --- a/src/d/actor/d_a_npc_zrc.cpp +++ b/src/d/actor/d_a_npc_zrc.cpp @@ -451,7 +451,7 @@ BOOL daNpc_zrC_c::main() { } if (!daNpc_zrC_Param_c::m.mTest - && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) + && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { if (mOrderEvtNo != EVT_NONE) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); @@ -1099,7 +1099,7 @@ BOOL daNpc_zrC_c::doEvent() { BOOL ret = 0; int staff_id; - if (dComIfGp_event_runCheck() != FALSE) { + if (dComIfGp_event_runCheck()) { event_mgr = &dComIfGp_getEventManager(); if ((eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) && !mSpeakEvent) { @@ -1118,7 +1118,7 @@ BOOL daNpc_zrC_c::doEvent() { l_evtNames[l_evtGetParamList[mOrderEvtNo].fileIdx], 2, 0xffff); } else { s16 idx = dComIfGp_getEventManager().getEventIdx(this, "NO_RESPONSE", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, idx, 1, 0xffff); field_0x9ec = true; } diff --git a/src/d/actor/d_a_npc_zrz.cpp b/src/d/actor/d_a_npc_zrz.cpp index 62cf3a6b8f9..dbd5f675d80 100644 --- a/src/d/actor/d_a_npc_zrz.cpp +++ b/src/d/actor/d_a_npc_zrz.cpp @@ -525,7 +525,7 @@ BOOL daNpc_zrZ_c::main() { attention_info.flags = 0; if (!daNpc_zrZ_Param_c::m.mTest - && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent().isOrderOK()))) + && (!dComIfGp_event_runCheck() || (mOrderNewEvt && dComIfGp_getEvent()->isOrderOK()))) { if (mOrderEvtNo != EVT_NONE) { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx]); @@ -1030,7 +1030,7 @@ void daNpc_zrZ_c::doNormalAction(BOOL param_0) { BOOL daNpc_zrZ_c::doEvent() { BOOL ret = false; - if (dComIfGp_event_runCheck() != false) { + if (dComIfGp_event_runCheck()) { dEvent_manager_c& event_manager = dComIfGp_getEventManager(); if (eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) { @@ -1107,7 +1107,7 @@ BOOL daNpc_zrZ_c::doEvent() { switch (mOrderEvtNo) { case EVT_SEAL_RELEASE: setSkipZev(EVT_SEAL_RELEASE, EVT_SR_SKIP); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->onSkipFade(); break; } } @@ -1137,7 +1137,7 @@ BOOL daNpc_zrZ_c::doEvent() { BOOL daNpc_zrZ_c::setSkipZev(int i_idx1, int i_idx2) { if (!strcmp(dComIfGp_getEventManager().getRunEventName(), l_evtNames[i_idx1])) { - dComIfGp_getEvent().setSkipZev(this, l_evtNames[i_idx2]); + dComIfGp_getEvent()->setSkipZev(this, l_evtNames[i_idx2]); return true; } return false; @@ -1559,7 +1559,7 @@ BOOL daNpc_zrZ_c::ECut_comeHere(int i_staffID) { angle = player->current.angle; angle.y = fopAcM_searchPlayerAngleY(this) + 0x8000; player->setPlayerPosAndAngle(&player->current.pos, &angle); - dComIfGp_getEvent().setPtT(this); + dComIfGp_getEvent()->setPtT(this); initTalk(8, NULL); mIsLeading = true; break; @@ -1659,8 +1659,8 @@ BOOL daNpc_zrZ_c::ECut_clothesGet(int i_staffID) { case 10: initTalk(9, NULL); if (mpGravestoneActor != NULL) { - dComIfGp_getEvent().setPtT(mpGravestoneActor); - dComIfGp_getEvent().setPt2(mpGravestoneActor); + dComIfGp_getEvent()->setPtT(mpGravestoneActor); + dComIfGp_getEvent()->setPt2(mpGravestoneActor); } break; @@ -1687,7 +1687,7 @@ BOOL daNpc_zrZ_c::ECut_clothesGet(int i_staffID) { case 50: if (mpClothActor != NULL) { - dComIfGp_getEvent().setPtT(mpClothActor); + dComIfGp_getEvent()->setPtT(mpClothActor); } mEventTimer = 20; break; @@ -1708,7 +1708,7 @@ BOOL daNpc_zrZ_c::ECut_clothesGet(int i_staffID) { break; case 70: - dComIfGp_getEvent().setPtT(this); + dComIfGp_getEvent()->setPtT(this); break; case 71: @@ -1925,7 +1925,7 @@ BOOL daNpc_zrZ_c::ECut_sealRelease(int i_staffID) { case 0: mEventTimer = 20; mSealReleased = true; - dComIfGp_getEvent().setSkipProc(this, dEv_defaultSkipProc, 0); + dComIfGp_getEvent()->setSkipProc(this, dEv_defaultSkipProc, 0); mpRockActor->setDemoStart(); break; diff --git a/src/d/actor/d_a_obj_bmWindow.cpp b/src/d/actor/d_a_obj_bmWindow.cpp index f913dfecbfa..aa9a59c5b2a 100644 --- a/src/d/actor/d_a_obj_bmWindow.cpp +++ b/src/d/actor/d_a_obj_bmWindow.cpp @@ -150,7 +150,7 @@ void daBmWindow_c::init_modeWait() { } void daBmWindow_c::modeWait() { - daPy_py_c* player = (daPy_py_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR); + daPy_py_c* player = (daPy_py_c*)dComIfGp_getLinkPlayer(); cXyz cStack_2c; cXyz cStack_38; cStack_2c = l_check_area[0]; diff --git a/src/d/actor/d_a_obj_boumato.cpp b/src/d/actor/d_a_obj_boumato.cpp index df2ecc9a703..b16c183506e 100644 --- a/src/d/actor/d_a_obj_boumato.cpp +++ b/src/d/actor/d_a_obj_boumato.cpp @@ -119,10 +119,9 @@ int daObj_BouMato_c::Execute() { if (field_0xa38 == 1 && dVar1 == 0) { deleteStuckArrow(); } - dComIfG_play_c& play = g_dComIfG_gameInfo.play; - if (play.getEvent().runCheck() && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { if (eventInfo.checkCommandDemoAccrpt() && dComIfGp_getEventManager().endCheck(field_0xa30)) { - play.getEvent().reset(); + dComIfGp_event_reset(); field_0xa30 = -1; } else { int staffId = dComIfGp_getEventManager().getMyStaffId("BouMato", this, -1); diff --git a/src/d/actor/d_a_obj_crvgate.cpp b/src/d/actor/d_a_obj_crvgate.cpp index f8ac63adfe1..ccd8030230a 100644 --- a/src/d/actor/d_a_obj_crvgate.cpp +++ b/src/d/actor/d_a_obj_crvgate.cpp @@ -352,7 +352,7 @@ void daObjCRVGATE_c::CloseAction() { daPy_py_c* player = daPy_getPlayerActorClass(); cXyz* player_pos = &fopAcM_GetPosition(player); - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { cXyz* boar_speed = &fopAcM_GetSpeed(boar_ac); daPy_py_c* player = daPy_getPlayerActorClass(); cXyz* player_pos = &fopAcM_GetPosition(player); diff --git a/src/d/actor/d_a_obj_crvhahen.cpp b/src/d/actor/d_a_obj_crvhahen.cpp index abc9aef6aa7..fc5b5ee82bc 100644 --- a/src/d/actor/d_a_obj_crvhahen.cpp +++ b/src/d/actor/d_a_obj_crvhahen.cpp @@ -161,9 +161,8 @@ int daObjCRVHAHEN_c::Execute() { int daObjCRVHAHEN_c::Delete() { if (mInitialized) { - J3DModelData* model_data = (J3DModelData*)dRes_control_c::getRes( - l_arcName, "CaravanPiece.bmd", g_dComIfG_gameInfo.mResControl.mObjectInfo, 0x80); - dComIfGp_removeSimpleModel(model_data, (int)(char)current.roomNo); + J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "CaravanPiece.bmd"); + dComIfGp_removeSimpleModel(model_data, fopAcM_GetRoomNo(this)); } dComIfG_resDelete(&mPhase, l_arcName); @@ -222,9 +221,8 @@ int daObjCRVHAHEN_c::create() { } mDrawHahen = 0; gravity = -9.0f; - J3DModelData* model_data = (J3DModelData*)dRes_control_c::getRes( - l_arcName, "CaravanPiece.bmd", g_dComIfG_gameInfo.mResControl.mObjectInfo, 0x80); - dComIfGp_addSimpleModel(model_data, (int)(char)current.roomNo, '\0'); + J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "CaravanPiece.bmd"); + dComIfGp_addSimpleModel(model_data, fopAcM_GetRoomNo(this), '\0'); mInitialized = true; mGroundHeight = current.pos.y; fopAcM_setCullSizeBox(this, -1000.0, -500.0, -1000.0, 1000.0, 500.0, 1000.0); diff --git a/src/d/actor/d_a_obj_dmelevator.cpp b/src/d/actor/d_a_obj_dmelevator.cpp index 3f9a1bdb127..69123a477a4 100644 --- a/src/d/actor/d_a_obj_dmelevator.cpp +++ b/src/d/actor/d_a_obj_dmelevator.cpp @@ -360,7 +360,7 @@ void daObjDmElevator_c::actionSwPause() { daPy_getPlayerActorClass()->mEndResetFlg1 = daPy_getPlayerActorClass()->mEndResetFlg1 | 0x200; field_0x62a += -1; if (field_0x62a == 0) { - g_dComIfG_gameInfo.play.mEvent.reset(); + dComIfGp_event_reset(); actionSwPauseNoneInit(); } } @@ -589,10 +589,7 @@ int daObjDmElevator_c::demoProc() { void daObjDmElevator_c::moveInit() { speedF = 0.0f; if (field_0x5e0 == 0) { - s8 i_reverb = dComIfGp_getReverb(fopAcM_GetRoomNo(this)); - - Z2AudioMgr::mAudioMgrPtr->seStart(Z2SE_OBJ_ELEVATOR_START, (Vec*)&eyePos, 0, i_reverb, 1.0, - 1.0, -1.0, -1.0, 0); + fopAcM_seStart(this, Z2SE_OBJ_ELEVATOR_START, 0); } } diff --git a/src/d/actor/d_a_obj_geyser.cpp b/src/d/actor/d_a_obj_geyser.cpp index ee0a774e4a4..465ce1807ae 100644 --- a/src/d/actor/d_a_obj_geyser.cpp +++ b/src/d/actor/d_a_obj_geyser.cpp @@ -138,7 +138,7 @@ static const Vec l_scale[] = { }; int daObjGeyser_c::Execute(Mtx** param_0) { - if (dComIfGp_event_runCheck() == 0) { + if (!dComIfGp_event_runCheck()) { f32 range = 5000.0f; if (fopAcM_searchPlayerDistance(this) > range) { stopEmitterPre00(); diff --git a/src/d/actor/d_a_obj_gra2.cpp b/src/d/actor/d_a_obj_gra2.cpp index 06ae7700c7f..3db1110cfb4 100644 --- a/src/d/actor/d_a_obj_gra2.cpp +++ b/src/d/actor/d_a_obj_gra2.cpp @@ -980,10 +980,6 @@ void daObj_GrA_c::setParam() { BOOL daObj_GrA_c::checkEvent() { BOOL rv = TRUE; -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; -#endif if (dComIfGp_event_runCheck()) { rv = FALSE; if (eventInfo.checkCommandTalk()) { @@ -994,11 +990,7 @@ BOOL daObj_GrA_c::checkEvent() { } } else if (eventInfo.checkCommandDemoAccrpt()) { if (dComIfGp_getEventManager().endCheck(mEvtIdx) != 0) { -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif field_0x1520 = 0; mEvtIdx = -1; rv = TRUE; diff --git a/src/d/actor/d_a_obj_gra2_base.inc b/src/d/actor/d_a_obj_gra2_base.inc index e6972610160..9af48bb8961 100644 --- a/src/d/actor/d_a_obj_gra2_base.inc +++ b/src/d/actor/d_a_obj_gra2_base.inc @@ -152,8 +152,8 @@ int daObj_GrA_c::startDemo(void* param_1) { gra_p->setProcess(&daObj_GrA_c::soldierDemo); fopAcM_OnStatus(gra_p, fopAcM_STATUS_UNK_0x8000); field_0x2056 = 0; - dComIfGp_getEvent().setSkipProc(this, skipCallBack, 0); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->setSkipProc(this, skipCallBack, 0); + dComIfGp_getEvent()->onSkipFade(); } // fallthrough case 2: { diff --git a/src/d/actor/d_a_obj_gra2_soldier.inc b/src/d/actor/d_a_obj_gra2_soldier.inc index 36b2da6d0e2..f8b1870f679 100644 --- a/src/d/actor/d_a_obj_gra2_soldier.inc +++ b/src/d/actor/d_a_obj_gra2_soldier.inc @@ -1289,7 +1289,7 @@ int daObj_GrA_c::rollEscape(void* param_1) { } rollLanding(); - if (!dComIfGp_event_runCheck() || dComIfGp_getEvent().isOrderOK()) { + if (!dComIfGp_event_runCheck() || dComIfGp_getEvent()->isOrderOK()) { if (dComIfGoat_GetThrow() == this) { dComIfGoat_SetThrow(0); if (isFirstGra()) { diff --git a/src/d/actor/d_a_obj_kanban2.cpp b/src/d/actor/d_a_obj_kanban2.cpp index 7621643c098..e2a5a08b3c9 100644 --- a/src/d/actor/d_a_obj_kanban2.cpp +++ b/src/d/actor/d_a_obj_kanban2.cpp @@ -909,7 +909,6 @@ void daObj_Kanban2_c::calcNormalSwing() { field_0x626 = sp8; } -// NONMATCHING - gameinfo mEvent load, equivalent void daObj_Kanban2_c::executeNormal() { calcNormalSwing(); mCcSph.OffAtSetBit(); @@ -953,20 +952,9 @@ void daObj_Kanban2_c::executeNormal() { break; case 1: mInvulnerabilityTimer = 3; -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck() && eventInfo.checkCommandTalk()) -#else - if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk()) -#endif - { + if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk()) { if (mMsgFlow.doFlow(this, NULL, 0)) { -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif field_0x9fe = 0; } } else { diff --git a/src/d/actor/d_a_obj_kiPot.cpp b/src/d/actor/d_a_obj_kiPot.cpp index e7964f2b528..eb0ddc56a09 100644 --- a/src/d/actor/d_a_obj_kiPot.cpp +++ b/src/d/actor/d_a_obj_kiPot.cpp @@ -74,7 +74,7 @@ void daKiPot_c::modeWait() { s32 daKiPot_c::chkEvent() { s32 result = 1; - if (!dComIfGp_getEvent().isOrderOK()) { + if (!dComIfGp_getEvent()->isOrderOK()) { result = 0; if (eventInfo.checkCommandCatch()) { diff --git a/src/d/actor/d_a_obj_lv7bridge.cpp b/src/d/actor/d_a_obj_lv7bridge.cpp index 08e6f62d1da..6c861719f9f 100644 --- a/src/d/actor/d_a_obj_lv7bridge.cpp +++ b/src/d/actor/d_a_obj_lv7bridge.cpp @@ -324,7 +324,6 @@ void daObjLv7Brg_c::action() { } } -// NONMATCHING - small regalloc void daObjLv7Brg_c::mode_action() { f32 var_f31; f32 temp_f30 = field_0xa78; diff --git a/src/d/actor/d_a_obj_mirror_screw.cpp b/src/d/actor/d_a_obj_mirror_screw.cpp index a261c08cce8..13a0c64eb5f 100644 --- a/src/d/actor/d_a_obj_mirror_screw.cpp +++ b/src/d/actor/d_a_obj_mirror_screw.cpp @@ -75,7 +75,6 @@ void daObjMirrorScrew_c::initDown() { } void daObjMirrorScrew_c::executeDown() { - dComIfG_inf_c* gameinfo = &g_dComIfG_gameInfo; if (dComIfGp_event_runCheck()) { daPy_py_c* player = daPy_getPlayerActorClass(); player->changeOriginalDemo(); @@ -112,9 +111,8 @@ void daObjMirrorScrew_c::executeDown() { if (current.pos.y <= home.pos.y + M_attr.mDownDist) { current.pos.y = home.pos.y + M_attr.mDownDist; - // fake match: these should be dComIfGp_getVibration() - gameinfo->play.getVibration().StartShock(8, 0xf, cXyz(0.0f, 1.0f, 0.0f)); - gameinfo->play.getVibration().StopQuake(0x1f); + dComIfGp_getVibration().StartShock(8, 0xf, cXyz(0.0f, 1.0f, 0.0f)); + dComIfGp_getVibration().StopQuake(0x1f); Z2GetAudioMgr()->seStart(Z2SE_OBJ_MR_SCRW_OFF, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); diff --git a/src/d/actor/d_a_obj_nameplate.cpp b/src/d/actor/d_a_obj_nameplate.cpp index 9c8a043a872..eede848e44e 100644 --- a/src/d/actor/d_a_obj_nameplate.cpp +++ b/src/d/actor/d_a_obj_nameplate.cpp @@ -218,11 +218,10 @@ void daObjNameplate_c::messageProc() { break; case 1: - dComIfG_play_c& play = g_dComIfG_gameInfo.play; - if (play.getEvent().runCheck() && eventInfo.checkCommandTalk() != 0 && + if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk() != 0 && mMsgFlow.doFlow(this, NULL, 0) != 0) { - play.getEvent().reset(); + dComIfGp_event_reset(); mShowMessage = 0; } break; diff --git a/src/d/actor/d_a_obj_oiltubo.cpp b/src/d/actor/d_a_obj_oiltubo.cpp index 1d8873d4623..99639641d0b 100644 --- a/src/d/actor/d_a_obj_oiltubo.cpp +++ b/src/d/actor/d_a_obj_oiltubo.cpp @@ -235,7 +235,7 @@ void daObj_Oiltubo_c::setAttnPos() { BOOL daObj_Oiltubo_c::chkEvent() { BOOL var_r5 = 1; - if (!dComIfGp_getEvent().isOrderOK()) { + if (!dComIfGp_getEvent()->isOrderOK()) { var_r5 = 0; if (eventInfo.checkCommandCatch()) { diff --git a/src/d/actor/d_a_obj_onsenFire.cpp b/src/d/actor/d_a_obj_onsenFire.cpp index f9540a3681d..44e0937896d 100644 --- a/src/d/actor/d_a_obj_onsenFire.cpp +++ b/src/d/actor/d_a_obj_onsenFire.cpp @@ -21,7 +21,7 @@ int daObjOnsenFire_c::execute() { dComIfGp_particle_setSimple(0x100,¤t.pos,0xff,g_whiteColor,g_whiteColor,0,0.0f); dComIfGp_particle_setSimple(0x101,¤t.pos,0xff,g_whiteColor,g_whiteColor,0,0.0f); dComIfGp_particle_setSimple(0x103,¤t.pos,0xff,g_whiteColor,g_whiteColor,0,0.0f); - Z2AudioMgr::getInterface()->seStartLevel(Z2SE_OBJ_ONSEN_WARM_FIRE,¤t.pos,0,0,1.0f,1.0f,-1.0f,-1.0f,0); + Z2GetAudioMgr()->seStartLevel(Z2SE_OBJ_ONSEN_WARM_FIRE,¤t.pos,0,0,1.0f,1.0f,-1.0f,-1.0f,0); return 1; } diff --git a/src/d/actor/d_a_obj_onsenTaru.cpp b/src/d/actor/d_a_obj_onsenTaru.cpp index 32da9d72fab..a8aef7325e9 100644 --- a/src/d/actor/d_a_obj_onsenTaru.cpp +++ b/src/d/actor/d_a_obj_onsenTaru.cpp @@ -206,7 +206,7 @@ int daOnsTaru_c::Execute() { if (mStartTimer) { if (mTimer < (s16)(l_HIO.mCoolTime * 30)) { - if (!g_dComIfG_gameInfo.play.mEvent.runCheck()) { + if (dComIfGp_event_runCheck() == FALSE) { mTimer++; } diff --git a/src/d/actor/d_a_obj_scannon.cpp b/src/d/actor/d_a_obj_scannon.cpp index 362d5408506..475dddbe5df 100644 --- a/src/d/actor/d_a_obj_scannon.cpp +++ b/src/d/actor/d_a_obj_scannon.cpp @@ -516,7 +516,7 @@ void daSCannon_c::exeModeActionEvt() { } } else { if ((mLayerNo == 3 || mLayerNo == 10) && fopAcM_isSwitch(this, getSw2())) { - dComIfGp_getEvent().setSkipProc(this, eventCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, eventCallBack, 0); } demoExe(); } diff --git a/src/d/actor/d_a_obj_scannon_crs.cpp b/src/d/actor/d_a_obj_scannon_crs.cpp index 27b0e805330..c4e3a81cb37 100644 --- a/src/d/actor/d_a_obj_scannon_crs.cpp +++ b/src/d/actor/d_a_obj_scannon_crs.cpp @@ -160,7 +160,7 @@ void daSCannonCrs_c::middleExe(daMidna_c* i_midna_p) { void daSCannonCrs_c::exeModeWait(daMidna_c* i_midna_p) { if (dComIfGp_evmng_startCheck(mEvtIdx) != 0) { if (strcmp(dComIfGp_getEventManager().getRunEventName(), "SKY_CANNON_WARP_START") == 0) { - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); daPy_py_c* player_p = (daPy_py_c*)dComIfGp_getPlayer(0); if (player_p != NULL) { @@ -211,7 +211,7 @@ void daSCannonCrs_c::exeModeOrderEvt(daMidna_c* i_midna_p) { } } else { if (dComIfGp_evmng_startCheck(mEvtIdx) != 0) { - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); daPy_py_c* player_p = (daPy_py_c*)dComIfGp_getPlayer(0); if (player_p != NULL) { @@ -259,7 +259,7 @@ void daSCannonCrs_c::exeModeWarpEvt(daMidna_c* i_midna_p) { if (dComIfGp_evmng_endCheck(mEvtIdx) != 0) { mMode = MODE_END; } else { - dComIfGp_getEvent().setSkipProc(this, eventCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, eventCallBack, 0); demoExe(); } } diff --git a/src/d/actor/d_a_obj_scannon_ten.cpp b/src/d/actor/d_a_obj_scannon_ten.cpp index 560fe149480..6d9025f0792 100644 --- a/src/d/actor/d_a_obj_scannon_ten.cpp +++ b/src/d/actor/d_a_obj_scannon_ten.cpp @@ -207,7 +207,7 @@ void daObjSCannonTen_c::exeModeActionEvt() { dComIfGp_event_reset(); mMode = MODE_END; } else { - dComIfGp_getEvent().setSkipProc(this, eventCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, eventCallBack, 0); demoExe(); } } diff --git a/src/d/actor/d_a_obj_sekizoa.cpp b/src/d/actor/d_a_obj_sekizoa.cpp index edf15095fd8..e944baca105 100644 --- a/src/d/actor/d_a_obj_sekizoa.cpp +++ b/src/d/actor/d_a_obj_sekizoa.cpp @@ -1320,11 +1320,11 @@ int daObj_Sekizoa_c::cutStart(int i_staffIdx) { if (mType == TYPE_0) { daObj_SMTile_c* actor_4 = (daObj_SMTile_c*)mActorMngrs[4].getActorP(); actor_4->reset(); - dComIfGp_getEvent().setPt2(actor_4); + dComIfGp_getEvent()->setPt2(actor_4); strcpy(acStack_90, l_evtList[2].eventName); strcat(acStack_90, "@"); - dComIfGp_getEvent().setSkipZev(this, acStack_90); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->setSkipZev(this, acStack_90); + dComIfGp_getEvent()->onSkipFade(); if (daNpcT_getPlayerInfoFromPlayerList(1, fopAcM_GetRoomNo(this), &c_stack_9c, &c_stack_c8)) { @@ -1434,7 +1434,7 @@ int daObj_Sekizoa_c::cutStart(int i_staffIdx) { if (prm == 13) { daObj_SMTile_c* actor_4 = (daObj_SMTile_c*)mActorMngrs[4].getActorP(); actor_4->reset(); - dComIfGp_getEvent().setPt2(actor_4); + dComIfGp_getEvent()->setPt2(actor_4); mDoAud_seStart(Z2SE_SY_MG_SEKI_WHITE_OUT, 0, 0, 0); } } @@ -1815,8 +1815,8 @@ int daObj_Sekizoa_c::cutGoal(int i_staffIdx) { if (mType == TYPE_0) { strcpy(acStack_9c, l_evtList[6].eventName); strcat(acStack_9c, "@"); - dComIfGp_getEvent().setSkipZev(this, acStack_9c); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->setSkipZev(this, acStack_9c); + dComIfGp_getEvent()->onSkipFade(); } mEventTimer = timer; break; @@ -2181,10 +2181,10 @@ int daObj_Sekizoa_c::cutExtinction(int i_staffIdx) { actor_0->shape_angle.y - -0x8000, 0); strcpy(acStack_a4, l_evtList[9].eventName); strcat(acStack_a4, "@"); - dComIfGp_getEvent().setSkipZev(actor_0, acStack_a4); - dComIfGp_getEvent().onSkipFade(); + dComIfGp_getEvent()->setSkipZev(actor_0, acStack_a4); + dComIfGp_getEvent()->onSkipFade(); actor_0->pullMasterSword(); - dComIfGp_getEvent().setPt2(actor_0); + dComIfGp_getEvent()->setPt2(actor_0); break; case 1: diff --git a/src/d/actor/d_a_obj_smgdoor.cpp b/src/d/actor/d_a_obj_smgdoor.cpp index 2bd117f1ea8..7df8c9e12f1 100644 --- a/src/d/actor/d_a_obj_smgdoor.cpp +++ b/src/d/actor/d_a_obj_smgdoor.cpp @@ -319,7 +319,7 @@ void daObjSmgDoor_c::actionWaitEvent() { void daObjSmgDoor_c::actionEvent() { dMeter2Info_onGameStatus(2); - dComIfGp_getEvent().setSkipProc(this, eventCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, eventCallBack, 0); demoProc(); } diff --git a/src/d/actor/d_a_obj_ss_drink.cpp b/src/d/actor/d_a_obj_ss_drink.cpp index 9230868e47c..601e09e3cab 100644 --- a/src/d/actor/d_a_obj_ss_drink.cpp +++ b/src/d/actor/d_a_obj_ss_drink.cpp @@ -370,7 +370,7 @@ int daObj_SSDrink_c::chkEvent() { return 1; } - if (dComIfGp_getEvent().isOrderOK() == 0) { + if (dComIfGp_getEvent()->isOrderOK() == 0) { if (getParentPtr() != NULL) { fopAc_ac_c* parent = (fopAc_ac_c*)getParentPtr(); attention_info.position.set(parent->attention_info.position); diff --git a/src/d/actor/d_a_obj_table.cpp b/src/d/actor/d_a_obj_table.cpp index fdd92a010a4..6ebb9f556d2 100644 --- a/src/d/actor/d_a_obj_table.cpp +++ b/src/d/actor/d_a_obj_table.cpp @@ -42,7 +42,7 @@ int daObjTable_c::create() { } static int daObjTable_Draw(daObjTable_c* i_this) { - return i_this->Draw(); + return i_this->MoveBGDraw(); } static int daObjTable_Execute(daObjTable_c* i_this) { @@ -64,6 +64,7 @@ static int daObjTable_Create(fopAc_ac_c* i_this) { int daObjTable_c::CreateHeap() { J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 5); + JUT_ASSERT(76, modelData != NULL); mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); if (mpModel == NULL) { @@ -140,23 +141,26 @@ int daObjTable_c::Create() { int daObjTable_c::Execute(Mtx** i_mtx) { eventInfo.onCondition(1); - dComIfG_inf_c& gameInfo = g_dComIfG_gameInfo; if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (mMsgFlow.doFlow(this, NULL, 0) != 0) { - gameInfo.play.getEvent().reset(this); // Fake match? + dComIfGp_getEvent()->reset(this); eventInfo.setArchiveName("Table"); dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); mEventID = dComIfGp_getEventManager().getEventIdx(this, "TABLE_MAP", -1); - fopAcM_orderChangeEventId(this, mEventID, 1, -1); + int r27 = fopAcM_orderChangeEventId(this, mEventID, 1, -1); + } + } else { + dEvent_manager_c& evtMgr = dComIfGp_getEventManager(); + int staffId = evtMgr.getMyStaffId(l_arcName, NULL, 0); + if (staffId != -1 && + eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && + evtMgr.endCheck(mEventID)) + { + mEventID = -1; + dMeter2Info_setPauseStatus(7); } - } else if (dComIfGp_getEventManager().getMyStaffId(l_arcName, NULL, 0) != -1 && - eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && - dComIfGp_getEventManager().endCheck(mEventID)) - { - mEventID = -1; - dMeter2Info_setPauseStatus(7); } } else { mMsgFlow.init(this, getMessageNo(), 0, NULL); diff --git a/src/d/actor/d_a_obj_tks.cpp b/src/d/actor/d_a_obj_tks.cpp index 942ad5b3f0d..92ebccbca10 100644 --- a/src/d/actor/d_a_obj_tks.cpp +++ b/src/d/actor/d_a_obj_tks.cpp @@ -573,7 +573,7 @@ void daObjTks_c::demo() { switch (field_0xdde) { case 0: dCam_getBody()->EndEventCamera(fopAcM_GetID(this)); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); eventInfo.setArchiveName(l_arcName); dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); mEventIdx = dComIfGp_getEventManager().getEventIdx(this, "TKS_SECRET", 0xFF); @@ -702,7 +702,7 @@ void daObjTks_c::warp() { switch (field_0xdde) { case 0: dCam_getBody()->EndEventCamera(fopAcM_GetID(this)); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); eventInfo.setArchiveName(l_arcName); dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); mEventIdx = dComIfGp_getEventManager().getEventIdx(this, "TKS_WARP", 0xFF); @@ -714,7 +714,7 @@ void daObjTks_c::warp() { field_0xdde = 2; return; case 2: - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventMgr = dComIfGp_getEventManager(); int staff_id = eventMgr.getMyStaffId(l_myName, NULL, 0); diff --git a/src/d/actor/d_a_obj_tobyhouse.cpp b/src/d/actor/d_a_obj_tobyhouse.cpp index 3c7540b5301..2c9738b6bb4 100644 --- a/src/d/actor/d_a_obj_tobyhouse.cpp +++ b/src/d/actor/d_a_obj_tobyhouse.cpp @@ -306,7 +306,7 @@ void daObjTobyHouse_c::actionEvent() { dComIfGs_offOneZoneSwitch(6, 0xffffffff); setAction(ACTION_WAIT); } else { - dComIfGp_getEvent().setSkipProc(this, eventCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, eventCallBack, 0); demoProc(); } } diff --git a/src/d/actor/d_a_obj_volcbom.cpp b/src/d/actor/d_a_obj_volcbom.cpp index 7711aefa25b..7b5ee2f6af7 100644 --- a/src/d/actor/d_a_obj_volcbom.cpp +++ b/src/d/actor/d_a_obj_volcbom.cpp @@ -603,7 +603,7 @@ void daObjVolcBom_c::actionWait() { if (dComIfGp_evmng_startCheck(mEventId)) { if (strcmp(dComIfGp_getEventManager().getRunEventName(), "PORTAL_WARP_BIGVOLC") == 0) { player->onWarpObjDemo(); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); mStaffId = dComIfGp_evmng_getMyStaffId(l_staff_name, 0, 0); setAction(ACTION_WARP_EVENT); demoProc(); @@ -636,7 +636,7 @@ void daObjVolcBom_c::actionOrderATalkEvent() { } else { if (dComIfGp_evmng_startCheck(mEventId)) { player->onWarpObjDemo(); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); mStaffId = dComIfGp_evmng_getMyStaffId(l_staff_name, 0, 0); setAction(ACTION_WARP_EVENT); demoProc(); @@ -668,7 +668,7 @@ void daObjVolcBom_c::actionTalkEvent() { void daObjVolcBom_c::actionWarpEvent() { if (!dComIfGp_evmng_endCheck(mEventId)) { - dComIfGp_getEvent().setSkipProc(this, eventCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, eventCallBack, 0); demoProc(); } } diff --git a/src/d/actor/d_a_obj_warp_kbrg.cpp b/src/d/actor/d_a_obj_warp_kbrg.cpp index e3c20eb359b..7532b31a0af 100644 --- a/src/d/actor/d_a_obj_warp_kbrg.cpp +++ b/src/d/actor/d_a_obj_warp_kbrg.cpp @@ -333,7 +333,7 @@ void daObjWarpKBrg_c::actionWait() { if (dComIfGp_evmng_startCheck(mEventId[mEventType])) { if (strcmp(dComIfGp_getEventManager().getRunEventName(), "PORTAL_WARP_KBRIDGE") == 0) { midna_p->onTagWaitPosPortalObj(&mMidnaWaitPos); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); mStaffId = dComIfGp_evmng_getMyStaffId(l_staff_name, NULL, 0); setAction(ACTION_WARP_EVENT_e); demoProc(); @@ -360,7 +360,7 @@ void daObjWarpKBrg_c::actionWaitWarpEvent() { if (dComIfGp_evmng_startCheck(mEventId[mEventType])) { midna_p->onTagWaitPosPortalObj(&mMidnaWaitPos); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); mStaffId = dComIfGp_evmng_getMyStaffId(l_staff_name, NULL, 0); setAction(ACTION_WARP_EVENT_e); demoProc(); @@ -375,7 +375,7 @@ void daObjWarpKBrg_c::actionOrderATalkEvent() { mMsgFlow.init(this, getMsgID(), 0, NULL); } else if (dComIfGp_evmng_startCheck(mEventId[mEventType])) { midna_p->onTagWaitPosPortalObj(&mMidnaWaitPos); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); mStaffId = dComIfGp_evmng_getMyStaffId(l_staff_name, NULL, 0); setAction(ACTION_WARP_EVENT_e); demoProc(); @@ -408,7 +408,7 @@ void daObjWarpKBrg_c::actionTalkEvent() { void daObjWarpKBrg_c::actionWarpEvent() { if (!dComIfGp_evmng_endCheck(mEventId[mEventType])) { - dComIfGp_getEvent().setSkipProc(this, eventCallBack, 0); + dComIfGp_getEvent()->setSkipProc(this, eventCallBack, 0); demoProc(); } } diff --git a/src/d/actor/d_a_obj_warp_obrg.cpp b/src/d/actor/d_a_obj_warp_obrg.cpp index 38773c9e919..c040f6b6b5f 100644 --- a/src/d/actor/d_a_obj_warp_obrg.cpp +++ b/src/d/actor/d_a_obj_warp_obrg.cpp @@ -215,7 +215,6 @@ void daObjWarpOBrg_c::actionWait() { daMidna_c* midna_p = daPy_py_c::getMidnaActor(); if (midna_p != NULL) { - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; // fakematch if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk()) { midna_p->onTagWaitPosPortalObj(&mMidnaWaitPos); if (midna_p->current.pos.abs(mMidnaWaitPos) < 5.0f) { @@ -243,10 +242,9 @@ void daObjWarpOBrg_c::actionWait() { if (strcmp(dComIfGp_getEventManager().getRunEventName(), "PORTAL_WARP_OBRIDGE") == 0) { mStaffId = dComIfGp_evmng_getMyStaffId(l_staff_name[getNameArg()], NULL, 0); setAction(ACTION_WARP_EVENT_e); - dEvt_control_c* event = &play->getEvent(); // fakematch - event->startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); midna_p->offTagWaitPos(); - event->setPt2(this); + dComIfGp_getEvent()->setPt2(this); } } } @@ -265,9 +263,9 @@ void daObjWarpOBrg_c::actionOrderEvent() { } else if (dComIfGp_evmng_startCheck(mEventId)) { mStaffId = dComIfGp_evmng_getMyStaffId(l_staff_name[getNameArg()], NULL, 0); setAction(ACTION_WARP_EVENT_e); - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); midna_p->offTagWaitPos(); - dComIfGp_getEvent().setPt2(this); + dComIfGp_getEvent()->setPt2(this); } else { eventInfo.onCondition(1); if (checkTalkDistance()) { @@ -295,7 +293,7 @@ void daObjWarpOBrg_c::actionWarpEvent() { if (!dComIfGp_evmng_endCheck(mEventId)) { demoProc(); - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { /* dSv_event_tmp_flag_c::T_0010 - General use - General use temporary flag (flow control) A */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[11]); /* dSv_event_tmp_flag_c::T_0011 - General use - General use temporary flag (flow control) B */ diff --git a/src/d/actor/d_a_obj_wind_stone.cpp b/src/d/actor/d_a_obj_wind_stone.cpp index cd055d895fb..51afb231739 100644 --- a/src/d/actor/d_a_obj_wind_stone.cpp +++ b/src/d/actor/d_a_obj_wind_stone.cpp @@ -172,7 +172,7 @@ void daWindStone_c::exeModeHowl() { } void daWindStone_c::exeModeMapDisp() { - if (dComIfGp_getEvent().isOrderOK() || !dComIfGp_event_runCheck()) { + if (dComIfGp_getEvent()->isOrderOK() || !dComIfGp_event_runCheck()) { dMeter2Info_setGoldWolfMapType(getGoldWolfIdx()); dMeter2Info_setPauseStatus(5); fopAcM_onSwitch(this, getSwBit2()); diff --git a/src/d/actor/d_a_obj_wood_statue.cpp b/src/d/actor/d_a_obj_wood_statue.cpp index eb03316072a..bc694977391 100644 --- a/src/d/actor/d_a_obj_wood_statue.cpp +++ b/src/d/actor/d_a_obj_wood_statue.cpp @@ -239,7 +239,7 @@ int daObjWStatue_c::initActionOrderGetDemo() { mCcCyl.OffCoSPrmBit(1); hide(); s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xff); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, eventIdx, 1, 0xffff); mItemId = fopAcM_createItemForTrBoxDemo(¤t.pos, m_itemNo, 0xffffffff, fopAcM_GetRoomNo(this), 0, 0); diff --git a/src/d/actor/d_a_obj_zdoor.cpp b/src/d/actor/d_a_obj_zdoor.cpp index bd616d5be4c..d612506c0c2 100644 --- a/src/d/actor/d_a_obj_zdoor.cpp +++ b/src/d/actor/d_a_obj_zdoor.cpp @@ -273,10 +273,11 @@ int daZdoor_c::create1st() { mDoorType = getType(); int phase_state = dComIfG_resLoad(&mPhaseReq, l_arcName[mDoorType]); if (phase_state == cPhs_COMPLEATE_e) { - int res_name_index = g_dComIfG_gameInfo.mResControl.getObjectResName2Index(l_arcName[mDoorType], l_dzbName[mDoorType]); + int dzb_id = dComIfG_getObjctResName2Index(l_arcName[mDoorType], l_dzbName[mDoorType]); + JUT_ASSERT(604, dzb_id != -1); u16 estimate_size = estimateSizeTbl[mDoorType]; - phase_state = MoveBGCreate(l_arcName[mDoorType], res_name_index, 0x0, estimate_size, 0x0); + phase_state = MoveBGCreate(l_arcName[mDoorType], dzb_id, 0x0, estimate_size, 0x0); if (phase_state == cPhs_ERROR_e) { return phase_state; diff --git a/src/d/actor/d_a_peru.cpp b/src/d/actor/d_a_peru.cpp index 764901c3a9f..3875e0a95f1 100644 --- a/src/d/actor/d_a_peru.cpp +++ b/src/d/actor/d_a_peru.cpp @@ -386,7 +386,7 @@ void daPeru_c::srchActors() { int daPeru_c::evtTalk() { if (chkAction(&daPeru_c::talk)) { (this->*(mActionFunc))(0); - } else if (!g_dComIfG_gameInfo.play.mEvent.chkTalkXY() || g_dComIfG_gameInfo.play.mEvtManager.ChkPresentEnd()) { + } else if (dComIfGp_event_chkTalkXY() == FALSE || dComIfGp_evmng_ChkPresentEnd()) { setAction(&daPeru_c::talk, 0); } return 1; diff --git a/src/d/actor/d_a_tag_Lv6Gate.cpp b/src/d/actor/d_a_tag_Lv6Gate.cpp index d2b2b729a58..041a1dab909 100644 --- a/src/d/actor/d_a_tag_Lv6Gate.cpp +++ b/src/d/actor/d_a_tag_Lv6Gate.cpp @@ -116,9 +116,7 @@ inline bool daTagLv6Gate_c::checkOpenArea() { } inline int daTagLv6Gate_c::execute() { - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_inf_c& game_info = g_dComIfG_gameInfo; - if (game_info.getPlay().getEvent().runCheck() && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 cut_index = eventManager.getMyStaffId(l_arcName, NULL, 0); if (cut_index != -1) { @@ -129,7 +127,7 @@ inline int daTagLv6Gate_c::execute() { if (eventManager.getIsAddvance(cut_index)) { switch (*cut_name) { case '0001': { - dComIfGp_getEvent().setSkipZev(this, "LV6_GATE_APPEAR_SKIP"); + dComIfGp_getEvent()->setSkipZev(this, "LV6_GATE_APPEAR_SKIP"); cXyz pos(0.0f, 0.0f, 78.0f); diff --git a/src/d/actor/d_a_tag_Lv7Gate.cpp b/src/d/actor/d_a_tag_Lv7Gate.cpp index 4ef355cc28d..a31bcefaceb 100644 --- a/src/d/actor/d_a_tag_Lv7Gate.cpp +++ b/src/d/actor/d_a_tag_Lv7Gate.cpp @@ -218,9 +218,7 @@ void daTagLv7Gate_c::flyAnime() { } int daTagLv7Gate_c::execute() { - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c& play = g_dComIfG_gameInfo.play; - if (dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk()) { + if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { dEvent_manager_c& evtMgr = dComIfGp_getEventManager(); s32 cut_index = evtMgr.getMyStaffId(l_arcName, NULL, 0); if (cut_index != -1) { @@ -263,8 +261,7 @@ int daTagLv7Gate_c::execute() { if (eventInfo.checkCommandDemoAccrpt() && mEvtId != -1 && evtMgr.endCheck(mEvtId)) { - // dComIfGp_event_reset(); - play.getEvent().reset(); // Fakematch + dComIfGp_event_reset(); mEvtId = -1; fopAcM_delete(this); } diff --git a/src/d/actor/d_a_tag_Lv8Gate.cpp b/src/d/actor/d_a_tag_Lv8Gate.cpp index 4bed7e7b614..be0e766c7d5 100644 --- a/src/d/actor/d_a_tag_Lv8Gate.cpp +++ b/src/d/actor/d_a_tag_Lv8Gate.cpp @@ -114,13 +114,7 @@ static int daTagLv8Gate_Execute(daTagLv8Gate_c* i_this) { } inline int daTagLv8Gate_c::execute() { - #if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck() && !eventInfo.checkCommandTalk()) { - #else if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) { - #endif dEvent_manager_c& eventManager = dComIfGp_getEventManager(); s32 cut_index = eventManager.getMyStaffId(l_arcName, NULL, 0); @@ -130,7 +124,7 @@ inline int daTagLv8Gate_c::execute() { if (eventManager.getIsAddvance(cut_index)) { switch (*cut_name) { case '0001': { - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); daPy_getPlayerActorClass()->setPlayerPosAndAngle(¤t.pos, shape_angle.y, 0); @@ -149,12 +143,9 @@ inline int daTagLv8Gate_c::execute() { } } - #if VERSION != VERSION_SHIELD_DEBUG - dEvt_control_c& eventControl = play->getEvent(); - #endif - if (dComIfGp_getEvent().checkSkipEdge()) { + if (dComIfGp_getEvent()->checkSkipEdge()) { #if VERSION != VERSION_SHIELD_DEBUG - dComIfGp_getEvent().reset(); + dComIfGp_getEvent()->reset(); #else dComIfGp_event_reset(); #endif diff --git a/src/d/actor/d_a_tag_TWgate.cpp b/src/d/actor/d_a_tag_TWgate.cpp index 62e8d72bf27..2d90b9bef33 100644 --- a/src/d/actor/d_a_tag_TWgate.cpp +++ b/src/d/actor/d_a_tag_TWgate.cpp @@ -172,15 +172,15 @@ void daTagTWGate_c::executeDemoFilone1() { if (event_manager.getIsAddvance(staffId)) { switch (*cutName) { case 0x30303031: - dComIfGp_getEvent().setSkipProc(this, dEv_noFinishSkipProc, 0); + dComIfGp_getEvent()->setSkipProc(this, dEv_noFinishSkipProc, 0); break; } } switch (*cutName) { case 0x30303031: - if (dComIfGp_getEvent().chkFlag2(8)) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->chkFlag2(8)) { + dComIfGp_getEvent()->onSkipFade(); mActionID = ACT_DEMO_FILONE_2; mAction = ActionTable[mActionID]; (this->**mAction)(); @@ -201,14 +201,11 @@ void daTagTWGate_c::executeDemoFilone1() { void daTagTWGate_c::initDemoFilone2() { fopAcM_onSwitch(this, getSwitch()); eventInfo.setArchiveName(l_zevParamTbl[mType].mArcName); - dComIfG_play_c& play = g_dComIfG_gameInfo.play; - dEvent_manager_c& mng = play.getEvtManager(); - mng.setObjectArchive(eventInfo.getArchiveName()); - mEventID = - mng.getEventIdx(this, l_zevParamTbl[mType].mTalkEventName, -1); + dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); + mEventID = dComIfGp_getEventManager().getEventIdx(this, l_zevParamTbl[mType].mTalkEventName, -1); - if (play.getEvent().mEventStatus != 0) { - dComIfGp_getEvent().reset(this); + if (dComIfGp_event_runCheck()) { + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventID, 1, -1); } else { fopAcM_orderOtherEventId(this, mEventID, -1, -1, 4, 1); @@ -251,7 +248,7 @@ void daTagTWGate_c::executeDemoFilone2() { if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && dComIfGp_evmng_endCheck(mEventID)) { - dComIfGp_getEvent().reset(); + dComIfGp_getEvent()->reset(); field_0x5e0 = 0; mActionID = ACT_WAIT; mAction = ActionTable[mActionID]; @@ -267,7 +264,7 @@ void daTagTWGate_c::initDemoFilone3() { dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); mEventID = dComIfGp_getEventManager().getEventIdx(this, l_zevParamTbl[mType].mInEventName, -1); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventID, 1, -1); } @@ -282,7 +279,7 @@ void daTagTWGate_c::executeDemoFilone3() { case 0x30303031: break; case 0x30303032: - dComIfGp_getEvent().setSkipProc(this, dEv_noFinishSkipProc, 0); + dComIfGp_getEvent()->setSkipProc(this, dEv_noFinishSkipProc, 0); field_0x5e1 = 0; break; case 0x30303033: @@ -305,8 +302,8 @@ void daTagTWGate_c::executeDemoFilone3() { break; } case 0x30303032: { - if (dComIfGp_getEvent().chkFlag2(8)) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->chkFlag2(8)) { + dComIfGp_getEvent()->onSkipFade(); dComIfGp_setNextStage(l_zevParamTbl[mType].mStage, l_zevParamTbl[mType].mPoint, l_zevParamTbl[mType].mRoomNo, l_zevParamTbl[mType].mLayer); } @@ -333,8 +330,8 @@ void daTagTWGate_c::executeDemoFilone3() { break; } case 0x30303033: - if (dComIfGp_getEvent().chkFlag2(8)) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->chkFlag2(8)) { + dComIfGp_getEvent()->onSkipFade(); dComIfGp_setNextStage(l_zevParamTbl[mType].mStage, l_zevParamTbl[mType].mPoint, l_zevParamTbl[mType].mRoomNo, @@ -349,7 +346,7 @@ void daTagTWGate_c::executeDemoFilone3() { if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && dComIfGp_evmng_endCheck(mEventID)) { - dComIfGp_getEvent().reset(); + dComIfGp_getEvent()->reset(); field_0x5e0 = 0; mActionID = ACT_WAIT; mAction = ActionTable[mActionID]; @@ -372,14 +369,14 @@ void daTagTWGate_c::executeDemoOrdin1() { if (evtMng.getIsAddvance(staffId)) { switch (*cutName) { case '0001': - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); break; } } switch (*cutName) { case '0001': - if (dComIfGp_getEvent().checkSkipEdge()) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->checkSkipEdge()) { + dComIfGp_getEvent()->onSkipFade(); setAction(ACT_DEMO_ORDIN_2); } evtMng.cutEnd(staffId); @@ -394,12 +391,10 @@ void daTagTWGate_c::executeDemoOrdin1() { void daTagTWGate_c::initDemoOrdin2() { fopAcM_onSwitch(this, getSwitch()); eventInfo.setArchiveName(l_zevParamTbl[mType].mArcName); - dComIfG_play_c& play = g_dComIfG_gameInfo.play; - dEvent_manager_c& mng = play.getEvtManager(); - mng.setObjectArchive(eventInfo.getArchiveName()); - mEventID = mng.getEventIdx(this, l_zevParamTbl[mType].mTalkEventName, 0xff); - if (play.getEvent().mEventStatus != 0) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); + mEventID = dComIfGp_getEventManager().getEventIdx(this, l_zevParamTbl[mType].mTalkEventName, 0xff); + if (dComIfGp_event_runCheck()) { + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventID, 1, 0xffff); } else { fopAcM_orderOtherEventId(this, mEventID, 0xff, 0xffff, 4, 1); @@ -457,7 +452,7 @@ void daTagTWGate_c::initDemoOrdin3() { dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); mEventID = dComIfGp_getEventManager().getEventIdx(this, l_zevParamTbl[mType].mInEventName, -1); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventID, 1, -1); } @@ -473,7 +468,7 @@ void daTagTWGate_c::executeDemoOrdin3() { case '0001': break; case '0002': - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); field_0x5e1 = 0; break; case '0003': @@ -499,8 +494,8 @@ void daTagTWGate_c::executeDemoOrdin3() { } break; case '0002': - if (dComIfGp_getEvent().checkSkipEdge()) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->checkSkipEdge()) { + dComIfGp_getEvent()->onSkipFade(); dComIfGp_setNextStage(l_zevParamTbl[mType].mStage, l_zevParamTbl[mType].mPoint, l_zevParamTbl[mType].mRoomNo, l_zevParamTbl[mType].mLayer); } @@ -519,8 +514,8 @@ void daTagTWGate_c::executeDemoOrdin3() { } break; case '0003': - if (dComIfGp_getEvent().checkSkipEdge()) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->checkSkipEdge()) { + dComIfGp_getEvent()->onSkipFade(); dComIfGp_setNextStage( l_zevParamTbl[mType].mStage, l_zevParamTbl[mType].mPoint, @@ -557,14 +552,14 @@ void daTagTWGate_c::executeDemoRanail1() { if (evtMng.getIsAddvance(staffId)) { switch (*cutName) { case '0001': - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); break; } } switch (*cutName) { case '0001': - if (dComIfGp_getEvent().checkSkipEdge()) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->checkSkipEdge()) { + dComIfGp_getEvent()->onSkipFade(); setAction(ACT_DEMO_RANAIL_2); } evtMng.cutEnd(staffId); @@ -579,12 +574,10 @@ void daTagTWGate_c::executeDemoRanail1() { void daTagTWGate_c::initDemoRanail2() { fopAcM_onSwitch(this, getSwitch()); eventInfo.setArchiveName(l_zevParamTbl[mType].mArcName); - dComIfG_play_c& play = g_dComIfG_gameInfo.play; - dEvent_manager_c& mng = play.getEvtManager(); - mng.setObjectArchive(eventInfo.getArchiveName()); - mEventID = mng.getEventIdx(this, l_zevParamTbl[mType].mTalkEventName, 0xff); - if (play.getEvent().mEventStatus != 0) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); + mEventID = dComIfGp_getEventManager().getEventIdx(this, l_zevParamTbl[mType].mTalkEventName, 0xff); + if (dComIfGp_event_runCheck()) { + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventID, 1, 0xffff); } else { fopAcM_orderOtherEventId(this, mEventID, 0xff, 0xffff, 4, 1); @@ -642,7 +635,7 @@ void daTagTWGate_c::initDemoRanail3() { dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); mEventID = dComIfGp_getEventManager().getEventIdx(this, l_zevParamTbl[mType].mInEventName, -1); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventID, 1, -1); /* dSv_event_flag_c::F_0071 - Twilight Hyrule Field - Cannot warp to Lanayru */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[170]); @@ -660,7 +653,7 @@ void daTagTWGate_c::executeDemoRanail3() { case '0001': break; case '0002': - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); field_0x5e1 = 0; break; case '0003': @@ -685,8 +678,8 @@ void daTagTWGate_c::executeDemoRanail3() { } break; case '0002': - if (dComIfGp_getEvent().checkSkipEdge()) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->checkSkipEdge()) { + dComIfGp_getEvent()->onSkipFade(); dComIfGp_setNextStage(l_zevParamTbl[mType].mStage, l_zevParamTbl[mType].mPoint, l_zevParamTbl[mType].mRoomNo, l_zevParamTbl[mType].mLayer); } @@ -705,8 +698,8 @@ void daTagTWGate_c::executeDemoRanail3() { } break; case '0003': - if (dComIfGp_getEvent().checkSkipEdge()) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->checkSkipEdge()) { + dComIfGp_getEvent()->onSkipFade(); dComIfGp_setNextStage( l_zevParamTbl[mType].mStage, l_zevParamTbl[mType].mPoint, @@ -743,14 +736,14 @@ void daTagTWGate_c::executeDemoHyral1() { if (evtMng.getIsAddvance(staffId)) { switch (*cutName) { case '0001': - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); break; } } switch (*cutName) { case '0001': - if (dComIfGp_getEvent().checkSkipEdge()) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->checkSkipEdge()) { + dComIfGp_getEvent()->onSkipFade(); setAction(ACT_DEMO_HYRAL_2); } evtMng.cutEnd(staffId); @@ -765,12 +758,10 @@ void daTagTWGate_c::executeDemoHyral1() { void daTagTWGate_c::initDemoHyral2() { fopAcM_onSwitch(this, getSwitch()); eventInfo.setArchiveName(l_zevParamTbl[mType].mArcName); - dComIfG_play_c& play = g_dComIfG_gameInfo.play; - dEvent_manager_c& mng = play.getEvtManager(); - mng.setObjectArchive(eventInfo.getArchiveName()); - mEventID = mng.getEventIdx(this, l_zevParamTbl[mType].mTalkEventName, 0xff); - if (play.getEvent().mEventStatus != 0) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); + mEventID = dComIfGp_getEventManager().getEventIdx(this, l_zevParamTbl[mType].mTalkEventName, 0xff); + if (dComIfGp_event_runCheck()) { + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventID, 1, 0xffff); } else { fopAcM_orderOtherEventId(this, mEventID, 0xff, 0xffff, 4, 1); @@ -826,7 +817,7 @@ void daTagTWGate_c::initDemoHyral3() { dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); mEventID = dComIfGp_getEventManager().getEventIdx(this, l_zevParamTbl[mType].mInEventName, -1); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventID, 1, -1); } @@ -842,7 +833,7 @@ void daTagTWGate_c::executeDemoHyral3() { case '0001': break; case '0002': - dComIfGp_getEvent().startCheckSkipEdge(this); + dComIfGp_getEvent()->startCheckSkipEdge(this); field_0x5e1 = 0x0; break; case '0003': @@ -864,8 +855,8 @@ void daTagTWGate_c::executeDemoHyral3() { } break; case '0002': - if (dComIfGp_getEvent().checkSkipEdge()) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->checkSkipEdge()) { + dComIfGp_getEvent()->onSkipFade(); dComIfGp_setNextStage(l_zevParamTbl[mType].mStage, l_zevParamTbl[mType].mPoint, l_zevParamTbl[mType].mRoomNo, l_zevParamTbl[mType].mLayer); } @@ -883,8 +874,8 @@ void daTagTWGate_c::executeDemoHyral3() { } break; case '0003': - if (dComIfGp_getEvent().checkSkipEdge()) { - dComIfGp_getEvent().onSkipFade(); + if (dComIfGp_getEvent()->checkSkipEdge()) { + dComIfGp_getEvent()->onSkipFade(); dComIfGp_setNextStage(l_zevParamTbl[mType].mStage, l_zevParamTbl[mType].mPoint, l_zevParamTbl[mType].mRoomNo, l_zevParamTbl[mType].mLayer); } diff --git a/src/d/actor/d_a_tag_allmato.cpp b/src/d/actor/d_a_tag_allmato.cpp index 27a4533eabc..9bb94d22f96 100644 --- a/src/d/actor/d_a_tag_allmato.cpp +++ b/src/d/actor/d_a_tag_allmato.cpp @@ -74,14 +74,7 @@ int daTag_AllMato_c::Execute() { return 1; } -#if VERSION != VERSION_SHIELD_DEBUG - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) -#else - if (dComIfGp_event_runCheck()) -#endif - { + if (dComIfGp_event_runCheck()) { if (!eventInfo.checkCommandTalk()) { if (eventInfo.checkCommandDemoAccrpt() && dComIfGp_getEventManager().endCheck(mEventIdx)) { u16 evt_action = EVT_NONE; @@ -121,11 +114,7 @@ int daTag_AllMato_c::Execute() { } dCam_getBody()->CorrectCenter(); -#if VERSION != VERSION_SHIELD_DEBUG - play->getEvent().reset(); -#else dComIfGp_event_reset(); -#endif mEventIdx = -1; } } else { @@ -146,7 +135,7 @@ int daTag_AllMato_c::Execute() { actor_p = mBrkMatoActorMngr.getActorP(); JUT_ASSERT(218, NULL != actor_p); - dComIfGp_getEvent().setPt2(mBrkMatoActorMngr.getActorP()); + dComIfGp_getEvent()->setPt2(mBrkMatoActorMngr.getActorP()); if (field_0x1d08 != 0) { switch (field_0x1d08) { @@ -552,7 +541,7 @@ void daTag_AllMato_c::evtChange(u16 i_action) { } mEventIdx = dComIfGp_getEventManager().getEventIdx(this, l_evtList[i_action].eventName, 0xFF); - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventIdx, 1, 0xFFFF); } diff --git a/src/d/actor/d_a_tag_bottle_item.cpp b/src/d/actor/d_a_tag_bottle_item.cpp index c876ce85883..20dce2e1022 100644 --- a/src/d/actor/d_a_tag_bottle_item.cpp +++ b/src/d/actor/d_a_tag_bottle_item.cpp @@ -102,7 +102,7 @@ void daTag_BottleItem_c::setAttnPos() { s32 daTag_BottleItem_c::chkEvent() { s32 uVar2 = 1; - if (!dComIfGp_getEvent().isOrderOK()) { + if (!dComIfGp_getEvent()->isOrderOK()) { uVar2 = 0; if (eventInfo.checkCommandCatch()) { diff --git a/src/d/actor/d_a_tag_evt.cpp b/src/d/actor/d_a_tag_evt.cpp index 131bde5f2a7..a41258bebbb 100644 --- a/src/d/actor/d_a_tag_evt.cpp +++ b/src/d/actor/d_a_tag_evt.cpp @@ -43,8 +43,7 @@ int daTag_Evt_c::execute() { attention_info.position = eyePos; fopAcM_SetRoomNo(this, dComIfGp_roomControl_getStayNo()); if (field_0x5E4 == 0 || field_0x5E4 == 1) { - dComIfG_inf_c* pGameInfo = &g_dComIfG_gameInfo; - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { bVar = false; int iVar1 = dComIfGp_evmng_getMyStaffId(field_0x568, 0, 0); if (!eventInfo.checkCommandTalk()) { @@ -99,8 +98,7 @@ int daTag_Evt_c::execute() { } } if (bVar != 0 && field_0x570 != 0) { - field_0x572 = - pGameInfo->play.getEvtManager().getEventIdx(this, l_evtNameList[field_0x570], -1); + field_0x572 = dComIfGp_getEventManager().getEventIdx(this, l_evtNameList[field_0x570], -1); fopAcM_orderOtherEventId(this, field_0x572, -1, -1, 0, 1); } } else if (field_0x5E4 == 2 && isDelete()) { diff --git a/src/d/actor/d_a_tag_evtmsg.cpp b/src/d/actor/d_a_tag_evtmsg.cpp index 5b18a10ef8f..73d516eacbd 100644 --- a/src/d/actor/d_a_tag_evtmsg.cpp +++ b/src/d/actor/d_a_tag_evtmsg.cpp @@ -47,7 +47,7 @@ int daTag_EvtMsg_c::Execute() { dEvent_manager_c& evt_mng = dComIfGp_getEventManager(); if (home.roomNo == dComIfGp_roomControl_getStayNo()) { - if (dComIfGp_event_runCheck() != 0) { + if (dComIfGp_event_runCheck()) { int staff_id; BOOL reset = false; if (eventInfo.checkCommandTalk()) { diff --git a/src/d/actor/d_a_tag_hstop.cpp b/src/d/actor/d_a_tag_hstop.cpp index 5692f6fa5f4..eb5179b751e 100644 --- a/src/d/actor/d_a_tag_hstop.cpp +++ b/src/d/actor/d_a_tag_hstop.cpp @@ -105,7 +105,7 @@ int daTagHstop_c::execute() { m_msgFlow.init(this, (u16)shape_angle.z, 0, NULL); field_0x573 = 3; } else if (m_msgFlow.doFlow(this, NULL, 0)) { - dComIfGp_getEvent().reset(); + dComIfGp_getEvent()->reset(); field_0x573 = 0; s16 arrow_num = dComIfGp_getItemMaxArrowNumCount(); diff --git a/src/d/actor/d_a_tag_kmsg.cpp b/src/d/actor/d_a_tag_kmsg.cpp index 6e51a28c7fe..7e0681ec523 100644 --- a/src/d/actor/d_a_tag_kmsg.cpp +++ b/src/d/actor/d_a_tag_kmsg.cpp @@ -101,9 +101,7 @@ int daTag_KMsg_c::Execute() { attention_info.flags = 0; } - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; - if (play->getEvent().runCheck()) { + if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { u16 iVar10 = 0; switch (getType()) { @@ -119,7 +117,7 @@ int daTag_KMsg_c::Execute() { } mEventIdx = dComIfGp_getEventManager().getEventIdx(this, l_evtList[iVar10].mEventName, 0xff); - play->getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderChangeEventId(this, mEventIdx, 1, 0xffff); } diff --git a/src/d/actor/d_a_tag_lantern.cpp b/src/d/actor/d_a_tag_lantern.cpp index e04fe2ecd35..9960d5886c8 100644 --- a/src/d/actor/d_a_tag_lantern.cpp +++ b/src/d/actor/d_a_tag_lantern.cpp @@ -22,16 +22,13 @@ int daTag_Lantern_c::Delete() { } int daTag_Lantern_c::Execute() { - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c& play = g_dComIfG_gameInfo.play; - if (dComIfGp_event_runCheck()) { if (eventInfo.checkCommandTalk()) { if (!field_0x604) { mMsgFlow.init(this, mFlowIndex, 0, NULL); field_0x604++; } else if (field_0x604 == 1 && mMsgFlow.doFlow(this, NULL, 0)) { - play.getEvent().reset(); + dComIfGp_event_reset(); field_0x604 = 0; field_0x5f8 = 0; } diff --git a/src/d/actor/d_a_tag_msg.cpp b/src/d/actor/d_a_tag_msg.cpp index 25e2469c8ea..734635ec745 100644 --- a/src/d/actor/d_a_tag_msg.cpp +++ b/src/d/actor/d_a_tag_msg.cpp @@ -66,9 +66,7 @@ int daTag_Msg_c::execute() { eyePos.set(current.pos.x, current.pos.y + 150.0f, current.pos.z); attention_info.position = eyePos; - // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c& play = g_dComIfG_gameInfo.play; - if (play.getEvent().runCheck()) { + if (dComIfGp_event_runCheck()) { set_event = false; if (eventInfo.checkCommandTalk()) { @@ -77,7 +75,7 @@ int daTag_Msg_c::execute() { dComIfGs_onSwitch(mOffSwitch, fopAcM_GetRoomNo(this)); } - play.getEvent().reset(); + dComIfGp_event_reset(); set_event = true; } @@ -91,7 +89,7 @@ int daTag_Msg_c::execute() { dComIfGs_onSwitch(mOffSwitch, fopAcM_GetRoomNo(this)); } - play.getEvent().reset(); + dComIfGp_event_reset(); set_event = true; } else { int staff_id = dComIfGp_evmng_getMyStaffId(mStaffName, NULL, 0); diff --git a/src/d/actor/d_a_tag_mstop.cpp b/src/d/actor/d_a_tag_mstop.cpp index 377f5ee39cc..83f41a46783 100644 --- a/src/d/actor/d_a_tag_mstop.cpp +++ b/src/d/actor/d_a_tag_mstop.cpp @@ -126,7 +126,7 @@ int daTagMstop_c::execute() { } else if (eventInfo.checkCommandTalk()) { if (field_0x56e == 2) { if (!midna_p->checkShadowModelDraw() || midna_p->checkShadowReturnEnd()) { - dComIfGp_getEvent().reset(this); + dComIfGp_getEvent()->reset(this); fopAcM_orderPotentialEvent(this, 0x400, 0x14f, 1); field_0x56e = 3; } diff --git a/src/d/actor/d_a_tag_ss_drink.cpp b/src/d/actor/d_a_tag_ss_drink.cpp index b41ef6e33d4..3126e8c0003 100644 --- a/src/d/actor/d_a_tag_ss_drink.cpp +++ b/src/d/actor/d_a_tag_ss_drink.cpp @@ -141,7 +141,7 @@ void daTag_SSDrink_c::setAttnPos() { int daTag_SSDrink_c::chkEvent() { int retVal = 1; - if (!dComIfGp_getEvent().isOrderOK()) { + if (!dComIfGp_getEvent()->isOrderOK()) { retVal = 0; if (eventInfo.checkCommandTalk()) { if (!checkProcess(&daTag_SSDrink_c::talk) == 0) { diff --git a/src/d/actor/d_a_tag_wljump.cpp b/src/d/actor/d_a_tag_wljump.cpp index 0c229719ac0..d5d374deec2 100644 --- a/src/d/actor/d_a_tag_wljump.cpp +++ b/src/d/actor/d_a_tag_wljump.cpp @@ -105,7 +105,7 @@ int daTagWljump_c::execute() { if (field_0x571 != 0xff) { fopAcM_onSwitch(this, field_0x571); } - } else if (!dComIfGp_getEvent().isOrderOK()) { + } else if (!dComIfGp_getEvent()->isOrderOK()) { field_0x572 = 0; } else { if (!midna->checkWolfNoPos()) { diff --git a/src/d/actor/d_a_talk.cpp b/src/d/actor/d_a_talk.cpp index 071f53ba746..b77a7069ebf 100644 --- a/src/d/actor/d_a_talk.cpp +++ b/src/d/actor/d_a_talk.cpp @@ -26,8 +26,7 @@ int daTalk_c::create() { } int daTalk_c::execute() { - dComIfG_inf_c& dcomif = g_dComIfG_gameInfo; - if (dcomif.play.getEvent().runCheck()) { + if (dComIfGp_event_runCheck()) { if (!eventInfo.checkCommandTalk()) { fopAcM_delete(this); } @@ -49,7 +48,7 @@ int daTalk_c::execute() { } else if (getStatus() == 14) { setStatus(16); } else if (getStatus() == 18) { - dcomif.play.getEvent().reset(); + dComIfGp_event_reset(); setStatus(19); mMessageID = -1; fopAcM_delete(this); @@ -58,7 +57,7 @@ int daTalk_c::execute() { mMsgFlow.init(this, dMsgObject_getMsgObjectClass()->getNodeIdx(), 0, NULL); mMessageID = 2; } else if (mMsgFlow.doFlow(dMsgObject_getMsgObjectClass()->getpTalkActor(), NULL, 0)) { - dcomif.play.getEvent().reset(); + dComIfGp_event_reset(); mMessageID = -1; fopAcM_delete(this); } diff --git a/src/d/actor/d_a_vrbox2.cpp b/src/d/actor/d_a_vrbox2.cpp index 94cd1510de1..5fb12400e4e 100644 --- a/src/d/actor/d_a_vrbox2.cpp +++ b/src/d/actor/d_a_vrbox2.cpp @@ -23,7 +23,6 @@ static void texScrollCheck(f32& param_0) { param_0 -= 1.0f; } -// NONMATCHING - reg alloc static int daVrbox2_Draw(vrbox2_class* i_this) { camera_class* camera_p; dKankyo_sunlenz_Packet* lenz_p; diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index 9425cfdde48..894c0507f77 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -1028,7 +1028,7 @@ bool dCamera_c::Run() { mCamSetup.mCStick.Shift(mPadID); } - if (dComIfGp_getEvent().runCheck()) { + if (dComIfGp_getEvent()->runCheck()) { mPadInfo.mMainStick.mLastValue = 0.0f; mPadInfo.mMainStick.mLastPosY = 0.0f; mPadInfo.mMainStick.mLastPosX = 0.0f; @@ -1318,7 +1318,7 @@ void dCamera_c::CalcTrimSize() { if (mCurState == 1) { mCurState = 0; } else if (mCurState == 2) { - if (dComIfGp_getEvent().isOrderOK()) { + if (dComIfGp_getEvent()->isOrderOK()) { mCurState = 0; } } @@ -1707,7 +1707,7 @@ s32 dCamera_c::nextType(s32 i_curType) { dComIfGp_getAttention()->LockSoundOff(); } else { clrFlag(0x40000000); - if (dComIfGp_getEvent().runCheck()) { + if (dComIfGp_getEvent()->runCheck()) { setComStat(4); dComIfGp_getAttention()->LockSoundOff(); } @@ -9069,7 +9069,7 @@ bool dCamera_c::eventCamera(s32 param_0) { pushInfo(mSavedViewStack + 1, 0); mEventData.field_0x0 = 0; mEventData.field_0xec = NULL; - int sp2C = dComIfGp_getEvent().getMapToolId(); + int sp2C = dComIfGp_getEvent()->getMapToolId(); if (sp2C != -1) { mEventData.field_0xec = dEvt_control_c::searchMapEventData(sp2C); } diff --git a/src/d/d_debug_camera.cpp b/src/d/d_debug_camera.cpp index be40eadb3bd..2d54283bf1b 100644 --- a/src/d/d_debug_camera.cpp +++ b/src/d/d_debug_camera.cpp @@ -707,7 +707,7 @@ int dDbgCamera_c::cmdTool() { default: return 1; } - } else if (dComIfGp_event_runCheck() == 0) { + } else if (!dComIfGp_event_runCheck()) { mIsPlaying = false; } diff --git a/src/d/d_demo.cpp b/src/d/d_demo.cpp index e324a222722..d3332240bfe 100644 --- a/src/d/d_demo.cpp +++ b/src/d/d_demo.cpp @@ -92,7 +92,7 @@ dDemo_actor_c::~dDemo_actor_c() { #if DEBUG if(dComIfGp_event_getMode() == 0) { - g_dComIfG_gameInfo.play.getEvent().setDebugStb(0); + g_dComIfG_gameInfo.play.getEvent()->setDebugStb(0); } #endif } diff --git a/src/d/d_ev_camera.cpp b/src/d/d_ev_camera.cpp index a961562f808..ac2d2ca32f4 100644 --- a/src/d/d_ev_camera.cpp +++ b/src/d/d_ev_camera.cpp @@ -64,7 +64,7 @@ int dCamera_c::EndEventCamera(int param_1) { clrFlag(0x20000000); mEventData.field_0x0 = 1; - if (dComIfGp_getEvent().runCheck()) { + if (dComIfGp_getEvent()->runCheck()) { dComIfGp_getEventManager().setCameraPlay(2); } @@ -1845,7 +1845,7 @@ bool dCamera_c::talktoEvCamera() { bool dCamera_c::maptoolIdEvCamera() { if (mCurCamStyleTimer == 0) { int id; - getEvIntData(&id, "ID", g_dComIfG_gameInfo.play.getEvent().getMapToolId()); + getEvIntData(&id, "ID", g_dComIfG_gameInfo.play.getEvent()->getMapToolId()); mEventData.field_0x8 = 0; field_0x160 = 0; diff --git a/src/d/d_event.cpp b/src/d/d_event.cpp index 458dc0c59f9..7958ea5fad3 100644 --- a/src/d/d_event.cpp +++ b/src/d/d_event.cpp @@ -728,16 +728,16 @@ void dEvt_control_c::clearSkipSystem() { int dEv_defaultSkipProc(void* actor, int parameter) { // "%06d: event: skip event!!!" OS_REPORT("\x1b[34m%06d: event: スキップ event!!!\n\x1b[m", g_Counter.mCounter0); - dEvt_control_c& event = dComIfGp_getEvent(); + dEvt_control_c* event = dComIfGp_getEvent(); - event.reset(actor); + event->reset(actor); return 1; } int dEv_defaultSkipZev(void* actor, int parameter) { // "%06d: event: skip ZEV event!!!" OS_REPORT("\x1b[34m%06d: event: スキップ ZEV event!!!\n\x1b[m", g_Counter.mCounter0); - dEvt_control_c* event = &dComIfGp_getEvent(); + dEvt_control_c* event = dComIfGp_getEvent(); s16 eventID = -1; dStage_MapEvent_dt_c* data = event->getStageEventDt(); @@ -761,9 +761,9 @@ int dEv_defaultSkipZev(void* actor, int parameter) { OS_REPORT("%06d: event: [%d] %s!\n", g_Counter.mCounter0, eventID, eventName); break; case 1: - skipName = dComIfGp_getEvent().getSkipEventName(); + skipName = dComIfGp_getEvent()->getSkipEventName(); eventID = dComIfGp_getEventManager().getEventIdx(skipName, 0xFF, -1); - OS_REPORT("%06d: event: [%d] %s!\n", g_Counter.mCounter0, eventID, dComIfGp_getEvent().getSkipEventName()); + OS_REPORT("%06d: event: [%d] %s!\n", g_Counter.mCounter0, eventID, dComIfGp_getEvent()->getSkipEventName()); break; default: OS_REPORT("%06d: event: ERROR: illegal prameter!\n", g_Counter.mCounter0); @@ -785,7 +785,7 @@ int dEv_defaultSkipZev(void* actor, int parameter) { int dEv_defaultSkipStb(void* actor, int parameter) { OS_REPORT("\x1b[34m%06d: event: スキップ STB event!!!\n\x1b[m", g_Counter.mCounter0); - dEvt_control_c* event = &dComIfGp_getEvent(); + dEvt_control_c* event = dComIfGp_getEvent(); s16 eventID = -1; dStage_MapEvent_dt_c* data = event->getStageEventDt(); @@ -809,9 +809,9 @@ int dEv_defaultSkipStb(void* actor, int parameter) { OS_REPORT("%06d: event: [%d] %s!\n", g_Counter.mCounter0, eventID, eventName); break; case 1: - skipName = dComIfGp_getEvent().getSkipEventName(); + skipName = dComIfGp_getEvent()->getSkipEventName(); eventID = dComIfGp_getEventManager().getEventIdx(skipName, 0xFF, -1); - OS_REPORT("%06d: event: [%d] %s!\n", g_Counter.mCounter0, eventID, dComIfGp_getEvent().getSkipEventName()); + OS_REPORT("%06d: event: [%d] %s!\n", g_Counter.mCounter0, eventID, dComIfGp_getEvent()->getSkipEventName()); break; default: OS_REPORT("%06d: event: ERROR: illegal prameter!\n", g_Counter.mCounter0); @@ -834,7 +834,7 @@ int dEv_defaultSkipStb(void* actor, int parameter) { } int dEv_noFinishSkipProc(void* actor, int parameter) { - dComIfGp_getEvent().offSkipFade(); + dComIfGp_getEvent()->offSkipFade(); return 0; } diff --git a/src/d/d_event_data.cpp b/src/d/d_event_data.cpp index 1286c63dea9..c0e34a0c50b 100644 --- a/src/d/d_event_data.cpp +++ b/src/d/d_event_data.cpp @@ -870,7 +870,7 @@ void dEvDtStaff_c::specialProcDirector() { f32* rate; daPy_py_c* player = dComIfGp_getLinkPlayer(); - dEvt_control_c& evtControl = dComIfGp_getEvent(); + dEvt_control_c* evtControl = dComIfGp_getEvent(); GXColor color; int staffId = dComIfGp_evmng_getMyStaffId("DIRECTOR", NULL, 0); @@ -979,15 +979,15 @@ void dEvDtStaff_c::specialProcDirector() { break; case 'SKIP': { char* zev = dComIfGp_evmng_getMyStringP(staffId, "Zev"); - void* pt = (void*)evtControl.getPt1(); + void* pt = (void*)evtControl->getPt1(); if (NULL == pt) { - pt = evtControl.getPt2(); + pt = evtControl->getPt2(); } if (zev != NULL) { - evtControl.setSkipZev(pt, zev); + evtControl->setSkipZev(pt, zev); } else { - evtControl.setSkipProc(pt, dEv_defaultSkipProc, 0); + evtControl->setSkipProc(pt, dEv_defaultSkipProc, 0); } break; } @@ -1090,7 +1090,7 @@ void dEvDtStaff_c::specialProcDirector() { if (sdata != NULL) { evt_actor_p = fopAcM_searchFromName4Event(sdata, -1); if (evt_actor_p != NULL) { - evtControl.setPt2(evt_actor_p); + evtControl->setPt2(evt_actor_p); OS_REPORT("%06d: event: derector: set %s as Pt2!\n", g_Counter.mCounter0, sdata); } else { OS_REPORT("%06d: event: derector: casting: %s not found!\n", g_Counter.mCounter0, sdata); @@ -1101,7 +1101,7 @@ void dEvDtStaff_c::specialProcDirector() { if (sdata != NULL) { evt_actor_p = fopAcM_searchFromName4Event(sdata, -1); if (evt_actor_p != NULL) { - evtControl.setPtT(evt_actor_p); + evtControl->setPtT(evt_actor_p); OS_REPORT("%06d: event: derector: set %s as PtT!\n", g_Counter.mCounter0, sdata); } else { OS_REPORT("%06d: event: derector: casting: %s not found!\n", g_Counter.mCounter0, sdata); @@ -1112,7 +1112,7 @@ void dEvDtStaff_c::specialProcDirector() { if (sdata != NULL) { evt_actor_p = fopAcM_searchFromName4Event(sdata, -1); if (evt_actor_p != NULL) { - evtControl.setPtI(evt_actor_p); + evtControl->setPtI(evt_actor_p); OS_REPORT("%06d: event: derector: set %s as PtI!\n", g_Counter.mCounter0, sdata); } else { OS_REPORT("%06d: event: derector: casting: %s not found!\n", g_Counter.mCounter0, sdata); @@ -1123,7 +1123,7 @@ void dEvDtStaff_c::specialProcDirector() { if (sdata != NULL) { evt_actor_p = fopAcM_searchFromName4Event(sdata, -1); if (evt_actor_p != NULL) { - evtControl.setPtD(evt_actor_p); + evtControl->setPtD(evt_actor_p); OS_REPORT("%06d: event: derector: set %s as PtD!\n", g_Counter.mCounter0, sdata); } else { OS_REPORT("%06d: event: derector: casting: %s not found!\n", g_Counter.mCounter0, sdata); @@ -1267,13 +1267,11 @@ void dEvDtStaff_c::specialProcPackage() { offsetAngY = 0.0f; } - // fake match: should not save event from g_dComIfG_gameInfo to register - dComIfG_play_c& info = g_dComIfG_gameInfo.play; - demo_data = (u8*)info.getEvent().getStbDemoData(sdata); + demo_data = (u8*)dComIfGp_getEvent()->getStbDemoData(sdata); JUT_ASSERT(1571, demo_data); dDemo_c::start(demo_data, xyzdata, offsetAngY); - info.getEvent().setCullRate(10.0f); // fake match: suppoed to be dComIfGp_event_setCullRate + dComIfGp_event_setCullRate(10.0f); idata = dComIfGp_evmng_getMyIntegerP(staffId, "EventFlag"); if (idata != NULL) { @@ -1287,10 +1285,10 @@ void dEvDtStaff_c::specialProcPackage() { specialProc_WaitProc(staffId); break; case 'PLAY': { - dEvt_control_c& evtControl = dComIfGp_getEvent(); + dEvt_control_c* evtControl = dComIfGp_getEvent(); if (dDemo_c::getMode() == 2) { - dStage_MapEvent_dt_c* event = dComIfGp_getEvent().getStageEventDt(); - if (event != NULL && event->field_0x7 != 0xFF && !evtControl.chkFlag2(1)) { + dStage_MapEvent_dt_c* event = dComIfGp_getEvent()->getStageEventDt(); + if (event != NULL && event->field_0x7 != 0xFF && !evtControl->chkFlag2(1)) { dDemo_c::getControl()->suspend(100); dComIfGp_evmng_cutEnd(staffId); } else { diff --git a/src/d/d_event_debug.cpp b/src/d/d_event_debug.cpp index 774e9399661..6c0f72667bc 100644 --- a/src/d/d_event_debug.cpp +++ b/src/d/d_event_debug.cpp @@ -174,7 +174,7 @@ void dEvM_HIO_c::listenPropertyEvent(const JORPropertyEvent* param_0) { break; case BTN_FORCED_TERMINATION: // "Forced termination" button - dComIfGp_getEvent().reset(); + dComIfGp_getEvent()->reset(); break; } } diff --git a/src/d/d_event_lib.cpp b/src/d/d_event_lib.cpp index 76b7547c48b..a0785690520 100644 --- a/src/d/d_event_lib.cpp +++ b/src/d/d_event_lib.cpp @@ -94,7 +94,7 @@ bool dEvLib_callback_c::executeRun() { if (!dComIfGp_evmng_endCheck(mActor->eventInfo.getEventId())) { return eventRun(); } else { - dComIfGp_getEvent().reset(); + dComIfGp_getEvent()->reset(); setAction(NULL); return eventEnd(); } diff --git a/src/d/d_event_manager.cpp b/src/d/d_event_manager.cpp index abe589b4c46..ab346a899d3 100644 --- a/src/d/d_event_manager.cpp +++ b/src/d/d_event_manager.cpp @@ -145,13 +145,13 @@ void dEvent_manager_c::debugBfProc() { break; case 2: if (endCheck(id)) { - dComIfGp_getEvent().reset(); + dComIfGp_getEvent()->reset(); l_HIO.m_playtest.field_0xA = 0; } break; case 3: if (endCheck(id)) { - dComIfGp_getEvent().reset(); + dComIfGp_getEvent()->reset(); l_HIO.m_playtest.field_0xA = 0; } break; @@ -617,17 +617,17 @@ void dEvent_manager_c::endProc(s16 evId, BOOL isClose) { event->mEventState = 0; mCurrentEvType = 0; mCurrentEvId = -1; - dComIfGp_getEvent().setPtD(NULL); - dComIfGp_getEvent().setPtI(NULL); + dComIfGp_getEvent()->setPtD(NULL); + dComIfGp_getEvent()->setPtI(NULL); } void dEvent_manager_c::Sequencer() { - dEvt_control_c& evtControl = dComIfGp_getEvent(); + dEvt_control_c* evtControl = dComIfGp_getEvent(); dEvDtEvent_c* event = getEventData(mCurrentEvId); - dStage_MapEvent_dt_c* mapdata = evtControl.getStageEventDt(); + dStage_MapEvent_dt_c* mapdata = evtControl->getStageEventDt(); if (event != NULL) { - if (evtControl.chkEventFlag(0x100)) { + if (evtControl->chkEventFlag(0x100)) { char* name = NULL; if (mapdata != NULL) { switch (mapdata->type) { @@ -645,15 +645,15 @@ void dEvent_manager_c::Sequencer() { || l_HIO.m_enable_skip #endif ) && - !evtControl.chkFlag2(2)) { + !evtControl->chkFlag2(2)) { int scut_type = dStage_MapEvent_dt_c_getEventSCutType(mapdata); if (scut_type == 2) { - evtControl.onSkipFade(); + evtControl->onSkipFade(); } - fopAc_ac_c* actor = evtControl.getPt1(); + fopAc_ac_c* actor = evtControl->getPt1(); if (actor == NULL) { - actor = evtControl.getPt2(); + actor = evtControl->getPt2(); } if (actor == NULL) { @@ -663,13 +663,13 @@ void dEvent_manager_c::Sequencer() { if (actor != NULL) { switch (mapdata->type) { case dStage_MapEvent_dt_TYPE_STB: - evtControl.setSkipProc(actor, dEv_defaultSkipStb, 0); + evtControl->setSkipProc(actor, dEv_defaultSkipStb, 0); break; case dStage_MapEvent_dt_TYPE_ZEV: - evtControl.setSkipProc(actor, dEv_defaultSkipZev, 0); + evtControl->setSkipProc(actor, dEv_defaultSkipZev, 0); break; case dStage_MapEvent_dt_TYPE_MAPTOOLCAMERA: - evtControl.setSkipProc(actor, dEv_defaultSkipProc, 0); + evtControl->setSkipProc(actor, dEv_defaultSkipProc, 0); break; } } @@ -681,12 +681,12 @@ void dEvent_manager_c::Sequencer() { if (event->finishCheck()) { bool bVar1 = false; - if (evtControl.chkFlag2(1)) { + if (evtControl->chkFlag2(1)) { bVar1 = true; } int exitId = -1; - bool iVar5 = evtControl.chkFlag2(2) != 0; + bool iVar5 = evtControl->chkFlag2(2) != 0; if (mapdata != NULL) { int scut_type = dStage_MapEvent_dt_c_getEventSCutType(mapdata); @@ -731,10 +731,10 @@ void dEvent_manager_c::Sequencer() { if (!bVar1) { if (iVar5 && mapdata->field_0x9 != 0xFF) { exitId = mapdata->field_0x9; - evtControl.sceneChange(exitId); + evtControl->sceneChange(exitId); } else if (mapdata->data.maptool.field_0x17 != 0xFF) { exitId = mapdata->data.maptool.field_0x17; - evtControl.sceneChange(exitId); + evtControl->sceneChange(exitId); } } @@ -744,10 +744,10 @@ void dEvent_manager_c::Sequencer() { if (!bVar1) { if (iVar5 && mapdata->field_0x9 != 0xFF) { exitId = mapdata->field_0x9; - evtControl.sceneChange(exitId); + evtControl->sceneChange(exitId); } else if (mapdata->field_0x7 != 0xFF) { exitId = mapdata->field_0x7; - evtControl.sceneChange(exitId); + evtControl->sceneChange(exitId); } } break; @@ -755,10 +755,10 @@ void dEvent_manager_c::Sequencer() { if (!bVar1) { if (iVar5 && mapdata->field_0x9 != 0xFF) { exitId = mapdata->field_0x9; - evtControl.sceneChange(exitId); + evtControl->sceneChange(exitId); } else if (mapdata->field_0x7 != 0xFF) { exitId = mapdata->field_0x7; - evtControl.sceneChange(exitId); + evtControl->sceneChange(exitId); } } break; @@ -768,7 +768,7 @@ void dEvent_manager_c::Sequencer() { if (exitId == -1) { getBase().advanceCut(event); closeProc(event); - evtControl.reset(); + evtControl->reset(); } } else { if (event->mEventState == dEvDt_State_START_e) { @@ -780,7 +780,7 @@ void dEvent_manager_c::Sequencer() { unk_0x1b8--; } } else { - if (evtControl.chkEventFlag(0x100)) { + if (evtControl->chkEventFlag(0x100)) { Z2GetAudioMgr()->setDemoName(NULL); } } @@ -990,7 +990,7 @@ int dEvent_manager_c::startCheckOld(const char* eventname) { } int dEvent_manager_c::endCheck(s16 eventID) { - s16 compositId = dComIfGp_getEvent().runningEventID(eventID); + s16 compositId = dComIfGp_getEvent()->runningEventID(eventID); dEvDtEvent_c* event = getEventData(compositId); if (event == NULL) { return 0; @@ -1014,7 +1014,7 @@ int dEvent_manager_c::getMyStaffId(const char* staffName, fopAc_ac_c* actor, int int n_staff; int evtIdx = -1; - if (dComIfGp_getEvent().getMode() == dEvt_mode_WAIT_e) { + if (dComIfGp_getEvent()->getMode() == dEvt_mode_WAIT_e) { return -1; } @@ -1084,7 +1084,7 @@ int dEvent_manager_c::getMyStaffId(const char* staffName, fopAc_ac_c* actor, int } int dEvent_manager_c::getIsAddvance(int staffId) { - if (dComIfGp_getEvent().getMode() == dEvt_mode_WAIT_e) { + if (dComIfGp_getEvent()->getMode() == dEvt_mode_WAIT_e) { if (OREG_F(8)) { // "%s: %d: events not running so don't call." OS_REPORT("%s: %d: イベント走ってないので呼ばないでください。\n", __FILE__, 1672); @@ -1122,7 +1122,7 @@ static int dEvmng_strcmp(const char* strA, char* strB) { int dEvent_manager_c::getMyActIdx(int staffId, const char* const* action, int n_action, BOOL param_3, BOOL param_4) { - if (dComIfGp_getEvent().getMode() == dEvt_mode_WAIT_e) { + if (dComIfGp_getEvent()->getMode() == dEvt_mode_WAIT_e) { if (OREG_F(8)) { // "%s: %d: events not running so don't call." OS_REPORT("%s: %d: イベント走ってないので呼ばないでください。\n", __FILE__, 1733); @@ -1182,7 +1182,7 @@ int dEvent_manager_c::getMyActIdx(int staffId, const char* const* action, int n_ char* dEvent_manager_c::getMyNowCutName(int staffId) { dEvDtCut_c* cut; - if (dComIfGp_getEvent().getMode() == dEvt_mode_WAIT_e) { + if (dComIfGp_getEvent()->getMode() == dEvt_mode_WAIT_e) { if (OREG_F(8)) { // "%s: %d: events not running so don't call." OS_REPORT("%s: %d: イベント走ってないので呼ばないでください。\n", __FILE__, 1856); @@ -1203,7 +1203,7 @@ dEvDtData_c* dEvent_manager_c::getMyDataP(int staffId, const char* dataname, BOO int index; dEvDtCut_c* cut; - if (dComIfGp_getEvent().getMode() == dEvt_mode_WAIT_e) { + if (dComIfGp_getEvent()->getMode() == dEvt_mode_WAIT_e) { if (OREG_F(8)) { // "%s: %d: events not running so don't call." OS_REPORT("%s: %d: イベント走ってないので呼ばないでください。\n", __FILE__, 1886); @@ -1253,7 +1253,7 @@ int dEvent_manager_c::getMySubstanceNum(int staffId, const char* dataname) { void dEvent_manager_c::cutEnd(int staffId) { dEvDtCut_c* cut; - if (dComIfGp_getEvent().getMode() == dEvt_mode_WAIT_e) { + if (dComIfGp_getEvent()->getMode() == dEvt_mode_WAIT_e) { if (OREG_F(8)) { // "%s: %d: events not running so don't call." OS_REPORT("%s: %d: イベント走ってないので呼ばないでください。\n", __FILE__, 1984); @@ -1388,8 +1388,8 @@ fopAc_ac_c* dEvent_manager_c::specialCast_Shutter(s16 actorName, BOOL param_1) { goal.z += cM_scos(angle) * 100; setGoal(&goal); - dComIfGp_getEvent().setPt2(shutterActor); - dComIfGp_getEvent().setPtD(shutterActor); + dComIfGp_getEvent()->setPt2(shutterActor); + dComIfGp_getEvent()->setPtD(shutterActor); } return shutterActor; @@ -1416,7 +1416,7 @@ fopAc_ac_c* dEvent_manager_c::specialCast(const char* staffname, BOOL param_1) { shutterActor = specialCast_Shutter(PROC_L5BOSS_DOOR, param_1); } if (shutterActor != NULL) { - dComIfGp_getEvent().onEventFlag(0x10); + dComIfGp_getEvent()->onEventFlag(0x10); } } @@ -1457,7 +1457,7 @@ int dEvent_manager_c::ChkPresentEnd() { } int dEvent_manager_c::checkStartDemo() { - if (!dComIfGp_getEvent().runCheck()) { + if (!dComIfGp_getEvent()->runCheck()) { return FALSE; } diff --git a/src/d/d_kankyo.cpp b/src/d/d_kankyo.cpp index 47a72be75f7..4a5233faa42 100644 --- a/src/d/d_kankyo.cpp +++ b/src/d/d_kankyo.cpp @@ -4661,7 +4661,7 @@ void dScnKy_env_light_c::exeKankyo() { g_env_light.mColPatMode = g_env_light.mColPatModeGather; - if (dComIfGp_event_runCheck() == false && g_env_light.mColPatModeGather != 0) { + if (dComIfGp_event_runCheck() == FALSE && g_env_light.mColPatModeGather != 0) { if (g_env_light.mColPatModeGather >= 3) { g_env_light.mColPatModeGather = 0; } else { diff --git a/src/d/d_kankyo_rain.cpp b/src/d/d_kankyo_rain.cpp index 4b740c66524..ae2cfd0210f 100644 --- a/src/d/d_kankyo_rain.cpp +++ b/src/d/d_kankyo_rain.cpp @@ -415,7 +415,7 @@ void dKyr_sun_move() { } void dKyr_rain_init() { - camera_class* camera = g_dComIfG_gameInfo.play.mCameraInfo[0].mCamera; + camera_class* camera = (camera_class*)dComIfGp_getCamera(0); g_env_light.mpRainPacket->mpTex = (u8*)dComIfG_getObjectRes("Always", 0x4a); g_env_light.mpRainPacket->mpTex2 = (u8*)dComIfG_getObjectRes("Always", 0x57); g_env_light.mpRainPacket->mCamEyePos = camera->lookat.eye; @@ -1224,7 +1224,7 @@ void dKyr_housi_move() { } void dKyr_snow_init() { - camera_class* camera = g_dComIfG_gameInfo.play.mCameraInfo[0].mCamera; + camera_class* camera = (camera_class*)dComIfGp_getCamera(0); g_env_light.mpSnowPacket = new (32) dKankyo_snow_Packet(); if (g_env_light.mpSnowPacket == NULL) { @@ -1518,7 +1518,7 @@ void dKyr_snow_move() { } void dKyr_star_init() { - camera_class* camera = g_dComIfG_gameInfo.play.mCameraInfo[0].mCamera; + camera_class* camera = (camera_class*)dComIfGp_getCamera(0); g_env_light.mpStarPacket = new (32) dKankyo_star_Packet(); if (g_env_light.mpStarPacket == NULL) { diff --git a/src/d/d_map.cpp b/src/d/d_map.cpp index 11c62f37c97..922a0aea393 100644 --- a/src/d/d_map.cpp +++ b/src/d/d_map.cpp @@ -36,7 +36,7 @@ dMap_HIO_c::dMap_HIO_c() { } void dMap_HIO_c::listenPropertyEvent(const JORPropertyEvent* evt) { - // NONMATCHING + // DEBUG NONMATCHING JORReflexible::listenPropertyEvent(evt); if (dMap_HIO_prm_res_dst_s::m_res != NULL) { @@ -117,7 +117,7 @@ void dMap_HIO_c::listenPropertyEvent(const JORPropertyEvent* evt) { } void dMap_HIO_list_c::copySrcToHio() { - // NONMATCHING + // DEBUG NONMATCHING if (dMap_HIO_c::m_res_src_p != NULL) { dMpath_RGBA_c color; for (int i = 0; i < 51; i++) { diff --git a/src/d/d_menu_letter.cpp b/src/d/d_menu_letter.cpp index 65abead0630..7e45500dc9d 100644 --- a/src/d/d_menu_letter.cpp +++ b/src/d/d_menu_letter.cpp @@ -981,7 +981,7 @@ void dMenu_Letter_c::screenSetLetter() { dPaneClass_showNullPane(mpLetterScreen[0]); #if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptUnk0() == 0) { + if (dComIfGs_getOptRuby() == 0) { field_0x2ec[0] = new CPaneMgr(mpLetterScreen[0], 't3f_s', 0, NULL); field_0x2ec[1] = new CPaneMgr(mpLetterScreen[0], 'mg_3flin', 0, NULL); field_0x2f4[0] = new CPaneMgr(mpLetterScreen[0], 'mg_3f_s', 0, NULL); diff --git a/src/d/d_menu_option.cpp b/src/d/d_menu_option.cpp index 1e2226db891..e0bf6c87149 100644 --- a/src/d/d_menu_option.cpp +++ b/src/d/d_menu_option.cpp @@ -899,7 +899,7 @@ void dMenu_Option_c::sound_move() { -1.0f, 0); break; } - Z2AudioMgr::mAudioMgrPtr->setOutputMode(dMo_soundMode[field_0x3e9]); + mDoAud_setOutputMode(dMo_soundMode[field_0x3e9]); setSoundMode(dMo_soundMode[field_0x3e9]); field_0x3ef = SelectType3; field_0x3f5 = SelectType2; @@ -925,7 +925,7 @@ void dMenu_Option_c::sound_move() { -1.0f, 0); break; } - Z2AudioMgr::mAudioMgrPtr->setOutputMode(dMo_soundMode[field_0x3e9]); + mDoAud_setOutputMode(dMo_soundMode[field_0x3e9]); setSoundMode(dMo_soundMode[field_0x3e9]); field_0x3ef = SelectType3; field_0x3f5 = SelectType2; @@ -1128,9 +1128,9 @@ void dMenu_Option_c::confirm_close_move() { dComIfGs_setOptAttentionType(field_0x3e4); #if VERSION == VERSION_GCN_JPN if (field_0x3e5_JPN == 0) { - dComIfGs_setOptUnk0(1); + dComIfGs_setOptRuby(1); } else { - dComIfGs_setOptUnk0(0); + dComIfGs_setOptRuby(0); } #endif if (isRumbleSupported()) { @@ -2144,7 +2144,7 @@ void dMenu_Option_c::paneResize(u64 i_tag) { void dMenu_Option_c::initialize() { field_0x3e4 = dComIfGs_getOptAttentionType(); #if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptUnk0() == 0) { + if (dComIfGs_getOptRuby() == 0) { field_0x3e5_JPN = 1; } else { field_0x3e5_JPN = 0; diff --git a/src/d/d_menu_window.cpp b/src/d/d_menu_window.cpp index 8542d0eac93..860bb57323a 100644 --- a/src/d/d_menu_window.cpp +++ b/src/d/d_menu_window.cpp @@ -1417,7 +1417,7 @@ BOOL dMw_c::dMw_isPush_S_Button() { } bool dMw_c::isPauseReady() { - if (dComIfGp_getEvent().checkCompulsory() || dComIfGs_getLife() == 0) { + if (dComIfGp_getEvent()->checkCompulsory() || dComIfGs_getLife() == 0) { return false; } diff --git a/src/d/d_meter2.cpp b/src/d/d_meter2.cpp index 14efe0fc346..e4261c8d3e6 100644 --- a/src/d/d_meter2.cpp +++ b/src/d/d_meter2.cpp @@ -418,8 +418,7 @@ void dMeter2_c::checkStatus() { mStatus = 0; field_0x12c = field_0x128; - // supposed to be daPy_py_c::checkNowWolf, but it messes with reg alloc? - field_0x128 = ((daPy_py_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR))->checkWolf(); + field_0x128 = daPy_py_c::checkNowWolf(); if (!dComIfGp_2dShowCheck() || dMsgObject_getMsgObjectClass()->isPlaceMessage()) { mStatus |= 0x4000; @@ -1008,33 +1007,30 @@ void dMeter2_c::moveLightDrop() { void dMeter2_c::moveRupee() { s16 temp_r5; - s16 var_r6; s32 temp_r0; - bool draw_rupee; temp_r5 = dComIfGs_getRupeeMax(); - draw_rupee = false; + s16 r29 = 0; + bool draw_rupee = false; - // using dComIfGp_getItemRupeeCount() here swaps r3/r4 reg alloc? - if (g_dComIfG_gameInfo.play.mItemInfo.mItemRupeeCount != 0) { - var_r6 = dComIfGs_getRupee() + dComIfGp_getItemRupeeCount(); - if (var_r6 > temp_r5) { - var_r6 = temp_r5; - } else if (var_r6 < 0) { - var_r6 = 0; + if (dComIfGp_getItemRupeeCount() != 0) { + r29 = dComIfGs_getRupee() + dComIfGp_getItemRupeeCount(); + if (r29 > temp_r5) { + r29 = temp_r5; + } else if (r29 < 0) { + r29 = 0; } - dComIfGs_setRupee(var_r6); + dComIfGs_setRupee(r29); dComIfGp_clearItemRupeeCount(); - temp_r0 = (u16)var_r6 - mRupeeNum; - if (temp_r0 >= 5) { + if (dComIfGs_getRupee() - mRupeeNum >= 5) { onRupeeSoundBit(2); if (isRupeeSoundBit(3)) { offRupeeSoundBit(3); offRupeeSoundBit(1); } - } else if (temp_r0 <= -5) { + } else if (dComIfGs_getRupee() - mRupeeNum <= -5) { onRupeeSoundBit(3); if (isRupeeSoundBit(2)) { offRupeeSoundBit(2); diff --git a/src/d/d_meter_button.cpp b/src/d/d_meter_button.cpp index 2995517ef0a..7147e97bc33 100644 --- a/src/d/d_meter_button.cpp +++ b/src/d/d_meter_button.cpp @@ -1444,7 +1444,7 @@ void dMeterButton_c::screenInitText() { JUT_ASSERT(2499, mpTmRoot_c != NULL); #if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptUnk0() == 0) { + if (dComIfGs_getOptRuby() == 0) { mpTm_c[0] = new CPaneMgr(mpTextScreen, 'mg_3flin', 0, NULL); mpTm_c[1] = new CPaneMgr(mpTextScreen, 't3f_s', 0, NULL); diff --git a/src/d/d_msg_scrn_3select.cpp b/src/d/d_msg_scrn_3select.cpp index bfd268aab6a..834919ff1d6 100644 --- a/src/d/d_msg_scrn_3select.cpp +++ b/src/d/d_msg_scrn_3select.cpp @@ -108,7 +108,7 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() { } #if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptUnk0() == 0) { + if (dComIfGs_getOptRuby() == 0) { mpTmSel_c[0] = new CPaneMgr(mpScreen, 'a_tf', 0, NULL); mpTmSel_c[1] = new CPaneMgr(mpScreen, 'b_tf', 0, NULL); @@ -911,7 +911,7 @@ void dMsgScrn3Select_c::selectTrans() { f32 sp68[3]; for (int i = 0; i < 3; i++) { #if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptUnk0() == 0 && (field_0x112 & (u8)(1 << i)) != 0) { + if (dComIfGs_getOptRuby() == 0 && (field_0x112 & (u8)(1 << i)) != 0) { sp68[i] = 0.0f; } else { f32 temp = mpTmSel_c[i]->getInitPosY(); diff --git a/src/d/d_msg_scrn_explain.cpp b/src/d/d_msg_scrn_explain.cpp index 8ffd59b5ded..01794f419e9 100644 --- a/src/d/d_msg_scrn_explain.cpp +++ b/src/d/d_msg_scrn_explain.cpp @@ -90,7 +90,7 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ #if VERSION == VERSION_GCN_JPN field_0x50 = 0.0f; - if (dComIfGs_getOptUnk0() == 0) { + if (dComIfGs_getOptRuby() == 0) { mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL); mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3f_s', 0, NULL); diff --git a/src/d/d_msg_scrn_item.cpp b/src/d/d_msg_scrn_item.cpp index 02943d326c8..e6cd7f582af 100644 --- a/src/d/d_msg_scrn_item.cpp +++ b/src/d/d_msg_scrn_item.cpp @@ -198,7 +198,7 @@ dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { mpPmP_c->scale(g_MsgObject_HIO_c.mBoxItemScaleX, g_MsgObject_HIO_c.mBoxItemScaleY); #if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptUnk0() == 0) { + if (dComIfGs_getOptRuby() == 0) { mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL); JUT_ASSERT(407, mpTm_c[0] != NULL); diff --git a/src/d/d_msg_scrn_jimaku.cpp b/src/d/d_msg_scrn_jimaku.cpp index 0d921528e96..53d83df3207 100644 --- a/src/d/d_msg_scrn_jimaku.cpp +++ b/src/d/d_msg_scrn_jimaku.cpp @@ -46,7 +46,7 @@ dMsgScrnJimaku_c::dMsgScrnJimaku_c(u8 param_0, JKRExpHeap* i_heap) { mpPmP_c->paneTrans(0.0f, field_0xcc); #if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptUnk0() == 0) { + if (dComIfGs_getOptRuby() == 0) { mpTm_c[0] = new CPaneMgr(mpScreen, 'mg_3flin', 0, NULL); mpTm_c[1] = new CPaneMgr(mpScreen, 't3f_s', 0, NULL); diff --git a/src/d/d_msg_scrn_kanban.cpp b/src/d/d_msg_scrn_kanban.cpp index 4a84e0f9e3e..864d533bff5 100644 --- a/src/d/d_msg_scrn_kanban.cpp +++ b/src/d/d_msg_scrn_kanban.cpp @@ -58,7 +58,7 @@ dMsgScrnKanban_c::dMsgScrnKanban_c(JKRExpHeap* param_0) { #if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptUnk0() != 0) { + if (dComIfGs_getOptRuby() != 0) { static u64 const t_tag[3] = {'mg_3line', 't3_w', 't3_s'}; for (int i = 0; i < 3; i++) { mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], 0, NULL); diff --git a/src/d/d_msg_scrn_talk.cpp b/src/d/d_msg_scrn_talk.cpp index d45b67c2199..5324728edcc 100644 --- a/src/d/d_msg_scrn_talk.cpp +++ b/src/d/d_msg_scrn_talk.cpp @@ -106,7 +106,7 @@ dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { mpPmP_c->scale(g_MsgObject_HIO_c.mBoxTalkScaleX, g_MsgObject_HIO_c.mBoxTalkScaleY); #if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptUnk0() == 0) { + if (dComIfGs_getOptRuby() == 0) { mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL); mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3f_s', 0, NULL); diff --git a/src/d/d_msg_scrn_tree.cpp b/src/d/d_msg_scrn_tree.cpp index 15403b83b90..6165a62b8f3 100644 --- a/src/d/d_msg_scrn_tree.cpp +++ b/src/d/d_msg_scrn_tree.cpp @@ -58,7 +58,7 @@ dMsgScrnTree_c::dMsgScrnTree_c(JUTFont* param_0, JKRExpHeap* param_1) { mpScreen->search('white_m')->setAnimation(field_0xd4); #if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptUnk0() != 0) { + if (dComIfGs_getOptRuby() != 0) { for (int i = 0; i < 3; i++) { static u64 const t_tag[3] = {'mg_3line', 't3_w', 't3_s'}; diff --git a/src/d/d_s_play.cpp b/src/d/d_s_play.cpp index 1a9932d5026..5e6e97467d4 100644 --- a/src/d/d_s_play.cpp +++ b/src/d/d_s_play.cpp @@ -189,7 +189,7 @@ static int dScnPly_Execute(dScnPly_c* i_this) { dKy_itudemo_se(); if (!dComIfGp_isPauseFlag()) { dDemo_c::update(); - dComIfGp_getEvent().Step(); + dComIfGp_getEvent()->Step(); dComIfGp_getAttention()->Run(); } return 1; diff --git a/src/d/d_s_room.cpp b/src/d/d_s_room.cpp index d74a86ab9a5..9c4bb22f2d1 100644 --- a/src/d/d_s_room.cpp +++ b/src/d/d_s_room.cpp @@ -225,9 +225,8 @@ static bool objectSetCheck(room_of_scene_class* i_this) { static int dScnRoom_Execute(room_of_scene_class* i_this) { int roomNo = fopScnM_GetParam(i_this); - u32 flag = g_dComIfG_gameInfo.play.getRoomControl()->mStatus[roomNo].mFlag; - if (flag & 2) { - dComIfGp_roomControl_setStatusFlag(roomNo, flag & ~2); + if (dComIfGp_roomControl_checkStatusFlag(roomNo, 2)) { + dComIfGp_roomControl_offStatusFlag(roomNo, 2); dComIfGp_roomControl_onStatusFlag(roomNo, 1); } else if (objectSetCheck(i_this)) { if (dComIfGp_roomControl_checkStatusFlag(roomNo, 4)) { diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index 0395d351dc8..9b8f2d18053 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -973,18 +973,18 @@ void dSv_player_info_c::init() { void dSv_player_config_c::init() { #if VERSION == VERSION_GCN_JPN - unk0 = 0; + mRuby = 0; #else - unk0 = 1; + mRuby = 1; #endif #if PLATFORM_GCN if (OSGetSoundMode() == OS_SOUND_MODE_MONO) { mSoundMode = OS_SOUND_MODE_MONO; - Z2AudioMgr::mAudioMgrPtr->setOutputMode(OS_SOUND_MODE_MONO); + mDoAud_setOutputMode(OS_SOUND_MODE_MONO); } else { mSoundMode = OS_SOUND_MODE_STEREO; - Z2AudioMgr::mAudioMgrPtr->setOutputMode(OS_SOUND_MODE_STEREO); + mDoAud_setOutputMode(OS_SOUND_MODE_STEREO); } #endif @@ -1798,13 +1798,13 @@ int dSv_info_c::card_to_memory(char* i_cardPtr, int i_dataNum) { #if PLATFORM_GCN if (OSGetSoundMode() == OS_SOUND_MODE_MONO) { - g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(OS_SOUND_MODE_MONO); - Z2AudioMgr::mAudioMgrPtr->setOutputMode(OS_SOUND_MODE_MONO); - } else if (g_dComIfG_gameInfo.info.getPlayer().getConfig().getSound() == 2) { - Z2AudioMgr::mAudioMgrPtr->setOutputMode(2); + dComIfGs_setOptSound(OS_SOUND_MODE_MONO); + mDoAud_setOutputMode(OS_SOUND_MODE_MONO); + } else if (dComIfGs_getOptSound() == 2) { + mDoAud_setOutputMode(2); } else { - g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(OS_SOUND_MODE_STEREO); - Z2AudioMgr::mAudioMgrPtr->setOutputMode(OS_SOUND_MODE_STEREO); + dComIfGs_setOptSound(OS_SOUND_MODE_STEREO); + mDoAud_setOutputMode(OS_SOUND_MODE_STEREO); } #endif diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index e1d986fb65f..3d10b12fdc5 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -825,8 +825,8 @@ void* event_second_actor(u16) { } s32 fopAcM_orderTalkEvent(fopAc_ac_c* i_actorA, fopAc_ac_c* i_actorB, u16 i_priority, u16 i_flag) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actorA))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actorA))) { return 0; } @@ -841,8 +841,8 @@ s32 fopAcM_orderTalkEvent(fopAc_ac_c* i_actorA, fopAc_ac_c* i_actorB, u16 i_prio s32 fopAcM_orderTalkItemBtnEvent(u16 i_eventType, fopAc_ac_c* i_actorA, fopAc_ac_c* i_actorB, u16 i_priority, u16 i_flag) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actorA))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actorA))) { return 0; } @@ -855,8 +855,8 @@ s32 fopAcM_orderTalkItemBtnEvent(u16 i_eventType, fopAc_ac_c* i_actorA, fopAc_ac } s32 fopAcM_orderSpeakEvent(fopAc_ac_c* i_actor, u16 i_priority, u16 i_flag) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actor))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actor))) { return 0; } @@ -870,8 +870,8 @@ s32 fopAcM_orderSpeakEvent(fopAc_ac_c* i_actor, u16 i_priority, u16 i_flag) { } s32 fopAcM_orderDoorEvent(fopAc_ac_c* i_actorA, fopAc_ac_c* i_actorB, u16 i_priority, u16 i_flag) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actorA))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actorA))) { return 0; } @@ -892,8 +892,8 @@ s32 fopAcM_orderDoorEvent(fopAc_ac_c* i_actorA, fopAc_ac_c* i_actorB, u16 i_prio } s32 fopAcM_orderCatchEvent(fopAc_ac_c* i_actorA, fopAc_ac_c* i_actorB, u16 i_priority, u16 i_flag) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actorA))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actorA))) { return 0; } @@ -907,8 +907,8 @@ s32 fopAcM_orderCatchEvent(fopAc_ac_c* i_actorA, fopAc_ac_c* i_actorB, u16 i_pri s32 fopAcM_orderOtherEvent(fopAc_ac_c* i_actor, char const* i_eventName, u16 param_2, u16 i_flag, u16 i_priority) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actor))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actor))) { return 0; } @@ -933,8 +933,8 @@ s32 fopAcM_orderOtherEvent(fopAc_ac_c* i_actor, char const* i_eventName, u16 par s32 fopAcM_orderOtherEvent(fopAc_ac_c* i_actorA, fopAc_ac_c* i_actorB, char const* i_eventName, u16 param_3, u16 i_flag, u16 i_priority) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actorA))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actorA))) { return 0; } @@ -969,8 +969,8 @@ s32 fopAcM_orderChangeEventId(fopAc_ac_c* i_actor, s16 i_eventID, u16 i_flag, u1 s32 fopAcM_orderOtherEventId(fopAc_ac_c* i_actor, s16 i_eventID, u8 i_mapToolID, u16 param_3, u16 i_priority, u16 i_flag) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actor))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actor))) { return 0; } @@ -1003,8 +1003,8 @@ s32 fopAcM_orderOtherEventId(fopAc_ac_c* i_actor, s16 i_eventID, u8 i_mapToolID, s32 fopAcM_orderMapToolEvent(fopAc_ac_c* i_actor, u8 param_1, s16 i_eventID, u16 param_3, u16 i_flag, u16 param_5) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actor))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actor))) { return 0; } @@ -1042,8 +1042,8 @@ s32 fopAcM_orderMapToolAutoNextEvent(fopAc_ac_c* i_actor, u8 param_1, s16 i_even } s32 fopAcM_orderPotentialEvent(fopAc_ac_c* i_actor, u16 i_flag, u16 param_2, u16 i_priority) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actor))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actor))) { return 0; } @@ -1057,8 +1057,8 @@ s32 fopAcM_orderPotentialEvent(fopAc_ac_c* i_actor, u16 i_flag, u16 param_2, u16 } s32 fopAcM_orderItemEvent(fopAc_ac_c* i_actor, u16 i_priority, u16 i_flag) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actor))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actor))) { return 0; } @@ -1073,8 +1073,8 @@ s32 fopAcM_orderItemEvent(fopAc_ac_c* i_actor, u16 i_priority, u16 i_flag) { s32 fopAcM_orderTreasureEvent(fopAc_ac_c* i_actorA, fopAc_ac_c* i_actorB, u16 i_priority, u16 i_flag) { - if (!dComIfGp_getEvent().isOrderOK() && - (!(i_flag & 0x400) || !dComIfGp_getEvent().isChangeOK(i_actorA))) + if (!dComIfGp_getEvent()->isOrderOK() && + (!(i_flag & 0x400) || !dComIfGp_getEvent()->isChangeOK(i_actorA))) { return 0; }