move inlines

This commit is contained in:
lepelog 2022-06-30 23:24:35 +02:00
parent 046d178003
commit e71aa4578d
60 changed files with 620 additions and 952 deletions

View File

@ -2,5 +2,12 @@
#define J3DGD_H
#include "dolphin/types.h"
#include "dolphin/gx/GX.h"
static inline void J3DFifoLoadIndx(u8 cmd, u16 indx, u16 addr) {
GFX_FIFO(u8) = cmd;
GFX_FIFO(u16) = indx;
GFX_FIFO(u16) = addr;
}
#endif /* J3DGD_H */

View File

@ -363,4 +363,9 @@ public:
/* 0x2D */ u8 mResMax;
};
// not sure where this belongs
static inline u32 COLOR_MULTI(u32 a, u32 b) {
return ((a * (b + 1)) * 0x10000) >> 24;
}
#endif /* JPAPARTICLE_H */

View File

@ -93,6 +93,10 @@ private:
/* 0xCC */ u8 mFlags2;
}; // Size: 0xD0
inline Z2CreatureLink* Z2GetLink() {
return Z2CreatureLink::mLinkPtr;
}
class Z2CreatureRide;
struct Z2RideSoundStarter : public Z2SoundStarter {
/* 802C5234 */ Z2RideSoundStarter(Z2CreatureRide*);

View File

@ -162,4 +162,6 @@ struct Z2EnvSeMgr {
STATIC_ASSERT(sizeof(Z2EnvSeMgr) == 0x30C);
extern Z2EnvSeMgr g_mEnvSeMgr;
#endif /* Z2ENVSEMGR_H */

View File

@ -36,4 +36,10 @@ private:
STATIC_ASSERT(sizeof(Z2SoundMgr) == 0x810);
extern Z2SoundMgr* data_80450B60;
inline Z2SoundMgr* Z2GetSoundMgr() {
return data_80450B60;
}
#endif /* Z2SOUNDMGR_H */

View File

@ -21,6 +21,8 @@
#include "dolphin/types.h"
#include "rel/d/a/kytag/d_a_kytag05/d_a_kytag05.h"
#include "rel/d/a/tag/d_a_tag_mmsg/d_a_tag_mmsg.h"
#include "f_op/f_op_scene.h"
#include "f_op/f_op_actor_mng.h"
class fopEn_enemy_c;
class daAlinkHIO_anm_c;
@ -4801,4 +4803,4 @@ static void* daAlink_searchCanoe(fopAc_ac_c* param_0, void* param_1);
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);
#endif /* D_A_D_A_ALINK_H */
#endif /* D_A_D_A_ALINK_H */

View File

@ -2,6 +2,7 @@
#define A_OBJ_D_A_OBJ_ITEM_H
#include "d/a/d_a_item_static.h"
#include "f_op/f_op_actor_mng.h"
namespace daItem_prm {
static inline u8 getItemNo(daItem_c* item) {

View File

@ -3,7 +3,7 @@
#include "d/com/d_com_inf_game.h"
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
#include "f_op/f_op_actor.h"
struct dCcU_AtInfo {
/* 0x00 */ cCcD_Obj* mpCollider;

View File

@ -774,8 +774,13 @@ u16 dComIfGs_getMaxLifeGauge();
void dComIfGs_setWarpMarkFlag(u8);
void dComIfGs_setSelectEquipSword(u8 i_itemNo);
void dComIfGs_setSelectEquipShield(u8 i_itemNo);
int dComIfGs_isItemFirstBit(u8 i_itemNo);
u16 dComIfGs_getRupee();
inline int i_dComIfGs_isItemFirstBit(u8 i_no) {
return g_dComIfG_gameInfo.info.getPlayer().getGetItem().isFirstBit(i_no);
}
inline u16 i_dComIfGs_getRupee() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getRupee();
}
BOOL dComIfGs_isVisitedRoom(int i_roomNo);
void dComIfGs_onZoneSwitch(int swBit, int roomNo);
void dComIfGs_onOneZoneSwitch(int param_0, int param_1);
@ -920,6 +925,10 @@ inline void dComIfGs_onEventBit(u16 id) {
g_dComIfG_gameInfo.info.getSavedata().getEvent().onEventBit(id);
}
inline BOOL i_dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getEvent().isEventBit(id);
}
inline void dComIfGs_onLightDropFlag(u8 i_nowLevel) {
g_dComIfG_gameInfo.info.getPlayer().getLightDrop().onLightDropGetFlag(i_nowLevel);
}
@ -936,6 +945,10 @@ inline BOOL dComIfGs_isSwitch(int i_no, int i_roomNo) {
return g_dComIfG_gameInfo.info.isSwitch(i_no, i_roomNo);
}
inline void dComIfGs_onSvZoneSwitch(int zoneNo, int swBit) {
g_dComIfG_gameInfo.info.getZone(zoneNo).getZoneBit().onSwitch(swBit);
}
inline s32 dComIfGs_isDungeonItemMap() {
return g_dComIfG_gameInfo.info.getMemory().getBit().isDungeonItemMap();
}
@ -993,6 +1006,10 @@ inline u16 dComIfGs_getMaxLife() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getMaxLife();
}
inline u16 i_dComIfGs_getLife() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getLife();
}
inline void dComIfGs_offEventBit(u16 event) {
g_dComIfG_gameInfo.info.getSavedata().getEvent().offEventBit(event);
}
@ -1093,6 +1110,10 @@ inline void dComIfGs_setKeyNum(u8 keyNum) {
g_dComIfG_gameInfo.info.getMemory().getBit().setKeyNum(keyNum);
}
inline BOOL dComIfGs_isSaveVisitedRoom(int param_0, int param_1) {
return g_dComIfG_gameInfo.info.getSavedata().getSave2(param_0)->isVisitedRoom(param_1);
}
inline s16 dComIfGs_getOil() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getOil();
}
@ -1387,6 +1408,14 @@ inline u8 dComIfGs_checkBombBag(u8 i_itemNo) {
return g_dComIfG_gameInfo.info.getPlayer().getItem().checkBombBag(i_itemNo);
}
inline bool i_dComIfGp_checkPlayerStatus0(int param_0, u32 flag) {
return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 0, flag);
}
inline bool i_dComIfGp_checkPlayerStatus1(int param_0, u32 flag) {
return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 1, flag);
}
inline s64 dComIfGs_getTotalTime() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerInfo().getTotalTime();
}
@ -1439,8 +1468,13 @@ inline void dComIfGs_setMemoryToCard(u8* p_saveData, int dataNum) {
g_dComIfG_gameInfo.info.memory_to_card((char*)p_saveData, dataNum);
}
void dComIfGp_setItemLifeCount(f32 amount, u8 type);
void dComIfGp_setItemRupeeCount(long amount);
inline void i_dComIfGp_setItemLifeCount(float amount, u8 type) {
g_dComIfG_gameInfo.play.setItemLifeCount(amount, type);
}
inline void i_dComIfGp_setItemRupeeCount(int amount) {
g_dComIfG_gameInfo.play.setItemRupeeCount(amount);
}
void dComIfGp_setSelectItem(int index);
s32 dComIfGp_offHeapLockFlag(int flag);
void dComIfGp_createSubExpHeap2D();
@ -1496,6 +1530,14 @@ inline void* dComIfGp_getPlayer(int idx) {
return g_dComIfG_gameInfo.play.getPlayer(idx);
}
inline s8 i_dComIfGp_getPlayerCameraID(int idx) {
return g_dComIfG_gameInfo.play.getPlayerCameraID(idx);
}
inline daHorse_c* i_dComIfGp_getHorseActor() {
return (daHorse_c*)g_dComIfG_gameInfo.play.getPlayerPtr(1);
}
inline dMsgObject_c* dComIfGp_getMsgObjectClass() {
return g_dComIfG_gameInfo.play.getMsgObjectClass();
}
@ -1952,6 +1994,10 @@ inline void dComIfGp_clearPlayerStatus0(int param_0, u32 flag) {
g_dComIfG_gameInfo.play.clearPlayerStatus(param_0, 0, flag);
}
inline dStage_stageDt_c* i_dComIfGp_getStage() {
return &g_dComIfG_gameInfo.play.getStage();
}
inline stage_scls_info_dummy_class* dComIfGp_getStageSclsInfo() {
return g_dComIfG_gameInfo.play.getStage().getSclsInfo();
}
@ -2174,6 +2220,26 @@ inline void dComIfGp_roomControl_zoneCountCheck(int i_roomNo) {
g_dComIfG_gameInfo.play.mRoomControl.zoneCountCheck(i_roomNo);
}
inline u8 i_dComIfGp_getRStatus() {
return g_dComIfG_gameInfo.play.getRStatus();
}
inline void i_dComIfGp_setBottleStatus(u8 param_0, u8 param_1) {
g_dComIfG_gameInfo.play.setBottleStatus(param_0, param_1);
}
inline u8 i_dComIfGp_getDoStatus() {
return g_dComIfG_gameInfo.play.getDoStatus();
}
inline dEvt_control_c& i_dComIfGp_getEvent() {
return g_dComIfG_gameInfo.play.getEvent();
}
inline dEvent_manager_c& i_dComIfGp_getEventManager() {
return g_dComIfG_gameInfo.play.getEvtManager();
}
inline BOOL dComIfGp_event_compulsory(void* param_0, const char* param_1, u16 param_2) {
return g_dComIfG_gameInfo.play.getEvent().compulsory(param_0, param_1, param_2);
}
@ -2227,6 +2293,25 @@ inline void* dComIfGp_event_getPt2() {
return g_dComIfG_gameInfo.play.getEvent().convPId(pt2);
}
inline BOOL i_dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
inline u16 dComIfGp_event_checkHind(u16 flag) {
if (!i_dComIfGp_event_runCheck()) {
return false;
}
return g_dComIfG_gameInfo.play.getEvent().checkHind(flag);
}
inline u16 i_dComIfGp_event_chkEventFlag(u16 flag) {
return g_dComIfG_gameInfo.play.getEvent().chkEventFlag(flag);
}
inline void dComIfGp_event_setCullRate(f32 f) {
g_dComIfG_gameInfo.play.getEvent().setCullRate(f);
}
inline int i_dComIfGp_evmng_getMyStaffId(const char* pName, fopAc_ac_c* pActor, int param_2) {
return dComIfGp_getPEvtManager()->getMyStaffId(pName, pActor, param_2);
}
@ -2369,6 +2454,19 @@ int dComIfGd_setShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3
f32 param_5, f32 param_6, f32 param_7, cBgS_PolyInfo& param_8,
dKy_tevstr_c* param_9, s16 param_10, f32 param_11, _GXTexObj* param_12);
inline int dComIfGd_setRealShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3,
f32 param_4, f32 param_5, dKy_tevstr_c* param_6) {
return g_dComIfG_gameInfo.drawlist.setRealShadow(param_0, param_1, param_2, param_3, param_4,
param_5, param_6);
}
inline int dComIfGd_setSimpleShadow(cXyz* pos, f32 param_1, f32 param_2, cXyz* param_3, s16 angle,
f32 param_5, _GXTexObj* tex) {
return g_dComIfG_gameInfo.drawlist.setSimpleShadow(pos, param_1, param_2, param_3, angle,
param_5, tex);
}
inline void dComIfGd_drawListItem3d() {
g_dComIfG_gameInfo.drawlist.drawOpaListItem3d();
g_dComIfG_gameInfo.drawlist.drawXluListItem3d();

View File

@ -5,7 +5,7 @@
#include "d/bg/d_bg_s_acch.h"
#include "d/cc/d_cc_d.h"
#include "d/kankyo/d_kankyo.h"
#include "f_op/f_op_actor.h"
#include "f_op/f_op_actor_mng.h"
class daNbomb_c {
public:

View File

@ -7,7 +7,6 @@
#include "d/save/d_save.h"
#include "dolphin/types.h"
#include "f_op/f_op_actor.h"
#include "f_op/f_op_actor_mng.h"
struct stage_vrboxcol_info_class {
// VRB
@ -908,6 +907,10 @@ inline int dStage_stagInfo_GetMsgGroup(stage_stag_info_class* p_info) {
return p_info->mMsgGroup;
}
inline s32 i_dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
return param_0->field_0x09 >> 1 & 0x1f;
}
inline u32 dStage_sclsInfo_getSceneLayer(stage_scls_info_class* p_info) {
return p_info->field_0xb & 0xF;
}

View File

@ -490,7 +490,6 @@ public:
}; // Size: 0x1310
extern dScnKy_env_light_c g_env_light;
extern Z2EnvSeMgr g_mEnvSeMgr;
STATIC_ASSERT(sizeof(dScnKy_env_light_c) == 4880);

View File

@ -327,6 +327,10 @@ inline void dMeter2Info_allUseButton() {
g_meter2_info.allUseButton();
}
inline void i_dMeter2Info_offUseButton(int flag) {
g_meter2_info.offUseButton(flag);
}
inline void dMeter2Info_resetGameStatus() {
g_meter2_info.resetGameStatus();
}

View File

@ -244,6 +244,68 @@ inline BOOL fopAcM_IsExecuting(unsigned int id) {
return fpcM_IsExecuting(id);
}
inline f32 fopAcM_GetSpeedF(const fopAc_ac_c* p_actor) {
return p_actor->mSpeedF;
}
inline f32 fopAcM_GetGravity(const fopAc_ac_c* p_actor) {
return p_actor->mGravity;
}
inline f32 fopAcM_GetMaxFallSpeed(const fopAc_ac_c* p_actor) {
return p_actor->mMaxFallSpeed;
}
inline const cXyz& fopAcM_GetSpeed_p(const fopAc_ac_c* p_actor) {
return p_actor->mSpeed;
}
inline const cXyz& fopAcM_GetPosition_p(const fopAc_ac_c* p_actor) {
return p_actor->mCurrent.mPosition;
}
inline void dComIfGs_onSwitch(int i_no, int i_roomNo);
inline void dComIfGs_offSwitch(int i_no, int i_roomNo);
inline BOOL dComIfGs_isSwitch(int i_no, int i_roomNo);
inline void i_fopAcM_onSwitch(const fopAc_ac_c* pActor, int sw) {
return dComIfGs_onSwitch(sw, fopAcM_GetHomeRoomNo(pActor));
}
inline void i_fopAcM_offSwitch(const fopAc_ac_c* pActor, int sw) {
return dComIfGs_offSwitch(sw, fopAcM_GetHomeRoomNo(pActor));
}
inline bool i_fopAcM_isSwitch(const fopAc_ac_c* item, int sw) {
return dComIfGs_isSwitch(sw, fopAcM_GetHomeRoomNo(item));
}
inline void dComIfGs_onItem(int bitNo, int roomNo);
inline void fopAcM_onItem(const fopAc_ac_c* item, int bitNo) {
dComIfGs_onItem(bitNo, fopAcM_GetHomeRoomNo(item));
}
inline bool dComIfGs_isItem(int bitNo, int roomNo);
inline bool fopAcM_isItem(const fopAc_ac_c* item, int bitNo) {
return dComIfGs_isItem(bitNo, fopAcM_GetHomeRoomNo(item));
}
inline f32 fopAcM_searchActorDistanceY(const fopAc_ac_c* actorA, const fopAc_ac_c* actorB) {
return actorB->mCurrent.mPosition.y - actorA->mCurrent.mPosition.y;
}
inline u16 fopAcM_GetSetId(const fopAc_ac_c* p_actor) {
return p_actor->mSetID;
}
inline void dComIfGs_onActor(int bitNo, int roomNo);
inline void fopAcM_onActor(const fopAc_ac_c* p_actor) {
int setId = fopAcM_GetSetId(p_actor);
dComIfGs_onActor(setId, fopAcM_GetHomeRoomNo(p_actor));
}
void* fopAcM_FastCreate(s16 pProcTypeID, FastCreateReqFunc param_2, void* param_3, void* pData);
void fopAcM_setStageLayer(void* p_proc);
@ -428,6 +490,39 @@ s32 fopAcM_getWaterStream(const cXyz*, const cBgS_PolyInfo&, cXyz*, int*, int);
s16 fopAcM_getPolygonAngle(const cBgS_PolyInfo&, s16);
s16 fopAcM_getPolygonAngle(cM3dGPla const* param_0, s16 param_1);
inline void make_prm_warp_hole(u32* actorParams, u8 p1, u8 p2, u8 p3) {
u32 pp1 = (p3 << 0x8);
u32 pp2 = (p2 << 0x10);
u32 pp3 = (p1 << 0x1B) | 0x170000FF;
*actorParams = pp2 | pp3 | pp1;
}
inline void make_prm_bokkuri(u32* pActorParams, csXyz* p_angle, u8 param_2, u8 param_3, u8 param_4,
u8 param_5, u8 param_6) {
p_angle->x = (param_4 << 0x8) | (param_3 & 0xFF);
p_angle->z = (param_6 << 0xD) | (param_2 << 0x1) | param_5;
}
inline void* dComIfGp_getPlayer(int);
inline s16 fopAcM_searchPlayerAngleY(const fopAc_ac_c* actor) {
return fopAcM_searchActorAngleY(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
inline f32 fopAcM_searchPlayerDistanceY(const fopAc_ac_c* actor) {
return fopAcM_searchActorDistanceY(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
inline f32 fopAcM_searchPlayerDistanceXZ2(const fopAc_ac_c* actor) {
return fopAcM_searchActorDistanceXZ2(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
inline f32 fopAcM_searchPlayerDistance(const fopAc_ac_c* actor) {
return fopAcM_searchActorDistance(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
extern "C" {
void fopAcM_initManager__Fv(void);
void fopAcM_CreateAppend__Fv(void);

View File

@ -1,7 +1,7 @@
#ifndef F_F_OP_SCENE_MNG_H_
#define F_F_OP_SCENE_MNG_H_
#include "f_op/f_op_actor_mng.h"
#include "f_pc/f_pc_manager.h"
#include "f_op/f_op_scene_pause.h"
scene_class* fopScnM_SearchByID(unsigned int id);
@ -26,4 +26,4 @@ inline int fopScnM_LayerID(void* proc) {
return fpcM_LayerID(proc);
}
#endif
#endif

View File

@ -2,6 +2,7 @@
#define M_DO_M_DO_AUDIO_H
#include "Z2AudioLib/Z2AudioMgr.h"
#include "Z2AudioLib/Z2EnvSeMgr.h"
#include "dolphin/types.h"
// move/fix later
@ -79,6 +80,11 @@ inline void mDoAud_seStart(u32 sfx_id, const Vec* param_1, u32 param_2, s8 param
-1.0f, 0);
}
inline void i_mDoAud_seStartLevel(u32 sfx_id, const Vec* param_1, u32 param_2, s8 param_3) {
Z2AudioMgr::getInterface()->mSeMgr.seStartLevel(sfx_id, param_1, param_2, param_3, 1.0f, 1.0f,
-1.0f, -1.0f, 0);
}
inline void mDoAud_messageSePlay(u16 param_0, Vec* position, s8 param_2) {
Z2AudioMgr::getInterface()->mSeMgr.messageSePlay(param_0, position, param_2);
}
@ -99,4 +105,12 @@ inline void mDoAud_bgmStop(u32 param_0) {
Z2AudioMgr::getInterface()->mSeqMgr.bgmStop(param_0, 0);
}
inline void mDoAud_rainPlay(s32 enable) {
g_mEnvSeMgr.startRainSe(enable, 0);
}
inline void mDoAud_mEnvse_framework() {
g_mEnvSeMgr.framework();
}
#endif /* M_DO_M_DO_AUDIO_H */

View File

@ -11,58 +11,8 @@
// Types:
//
struct _GXVtxFmt {};
struct _GXVtxAttrFmtList {};
struct _GXTlutSize {};
struct _GXTlutFmt {};
struct _GXTexWrapMode {};
struct _GXTexMapID {};
struct _GXTexGenType {};
struct _GXTexGenSrc {};
struct _GXTexFmt {};
struct _GXTexFilter {};
struct _GXTexCoordID {};
struct _GXTexCacheSize {};
struct _GXTevStageID {};
struct _GXTevRegID {};
struct _GXTevKColorID {};
struct _GXLightID {};
struct _GXIndTexStageID {};
struct _GXIndTexScale {};
struct _GXIndTexMtxID {};
struct _GXFogType {};
struct _GXFogAdjTable {};
struct _GXCullMode {};
struct _GXColorS10 {};
struct _GXColor {};
struct _GXChannelID {};
struct _GXAnisotropy {};
//
// Forward References:
//

View File

@ -8,6 +8,7 @@
#include "JSystem/J3DGraphAnimator/J3DModelData.h"
#include "JSystem/J3DGraphBase/J3DPacket.h"
#include "JSystem/J3DGraphBase/J3DSys.h"
#include "JSystem/J3DGraphBase/J3DGD.h"
#include "dol2asm.h"
#include "dolphin/types.h"
@ -131,12 +132,6 @@ void J3DShapeMtx::resetMtxLoadCache() {
sMtxLoadCache[0] = 0xFFFF;
}
static inline void J3DFifoLoadIndx(u8 cmd, u16 indx, u16 addr) {
GFX_FIFO(u8) = cmd;
GFX_FIFO(u16) = indx;
GFX_FIFO(u16) = addr;
}
/* 803130E4-80313128 30DA24 0044+00 1/0 0/0 0/0 .text loadMtxIndx_PNGP__11J3DShapeMtxCFiUs */
void J3DShapeMtx::loadMtxIndx_PNGP(int slot, u16 indx) const {
// inlined J3DFifoLoadPosMtxIndx

View File

@ -13,6 +13,7 @@
#include "JSystem/J3DGraphBase/J3DTevs.h"
#include "JSystem/J3DGraphBase/J3DTexture.h"
#include "JSystem/J3DGraphBase/J3DGD.h"
//
// Forward References:
@ -83,12 +84,6 @@ J3DSys::J3DSys() {
}
}
static inline void J3DFifoLoadIndx(u8 cmd, u16 indx, u16 addr) {
GFX_FIFO(u8) = cmd;
GFX_FIFO(u16) = indx;
GFX_FIFO(u16) = addr;
}
/* 8030FEC0-8030FEE4 30A800 0024+00 0/0 1/1 0/0 .text loadPosMtxIndx__6J3DSysCFiUs */
void J3DSys::loadPosMtxIndx(int addr, u16 indx) const {
J3DFifoLoadIndx(GX_CMD_LOAD_INDX_A, indx, 0xB000 | ((u16)(addr * 0x0C)));

View File

@ -159,10 +159,6 @@ void JPASetLineWidth(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
GXSetLineWidth((u8)(lit_2262[0] * work->mGlobalPtclScl.x * ptcl->mParticleScaleX), GX_TO_ONE);
}
static inline u8 COLOR_MULTI(u32 a, u32 b) {
return ((a * (b + 1)) * 0x10000) >> 24;
}
/* 80276B90-80276C2C 2714D0 009C+00 0/0 1/1 0/0 .text JPARegistPrm__FP18JPAEmitterWorkData */
void JPARegistPrm(JPAEmitterWorkData* work) {
JPABaseEmitter* emtr = work->mpEmtr;

View File

@ -21,10 +21,6 @@
// Declarations:
//
static inline u32 COLOR_MULTI(u32 a, u32 b) {
return ((a * (b + 1)) * 0x10000) >> 24;
}
/* 8027AEBC-8027AFDC 2757FC 0120+00 0/0 1/1 0/0 .text JPARegistChildPrmEnv__FP18JPAEmitterWorkData
*/
void JPARegistChildPrmEnv(JPAEmitterWorkData* work) {

View File

@ -110,7 +110,6 @@ extern "C" void _restgpr_28();
extern "C" void sprintf();
extern "C" u8 const CUTOFF_TO_IIR_TABLE__7JASCalc[1024];
extern "C" extern u8 data_80450B4C[4];
extern "C" extern u8 data_80450B60[4];
extern "C" extern u8 data_80450B70[4];
extern "C" extern u8 data_80450B80[4];
extern "C" extern u8 data_80450B84[4];

View File

@ -40,37 +40,25 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
inline bool fopAcM_isSwitch(const fopAc_ac_c* item, int sw) {
return dComIfGs_isSwitch(sw, fopAcM_GetHomeRoomNo(item));
}
inline void fopAcM_onSwitch(const fopAc_ac_c* pActor, int sw) {
return dComIfGs_onSwitch(sw, fopAcM_GetHomeRoomNo(pActor));
}
inline BOOL dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getEvent().isEventBit(id);
}
/* 80485838-80485974 000078 013C+00 1/1 0/0 0/0 .text checkWork__8daScex_cFv */
int daScex_c::checkWork() {
if (getArg1() == 0xFF || getArg1() == 0 || getArg1() == 3) {
if (fopAcM_isSwitch(this, getSwNo())) {
if (i_fopAcM_isSwitch(this, getSwNo())) {
return 0;
}
} else if ((getArg1() == 1 || getArg1() == 2 || getArg1() == 4) && getSwNo() != 0xFF) {
if (!fopAcM_isSwitch(this, getSwNo())) {
if (!i_fopAcM_isSwitch(this, getSwNo())) {
return 0;
}
}
u16 offBit = getOffEventBit();
if (offBit != 0x0FFF && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[offBit])) {
if (offBit != 0x0FFF && i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[offBit])) {
return 0;
}
u16 onBit = getOnEventBit();
if (onBit != 0x0FFF && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[onBit])) {
if (onBit != 0x0FFF && !i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[onBit])) {
return 0;
}
@ -190,7 +178,7 @@ int daScex_c::execute() {
if (getArg1() == 0xFF || getArg1() == 0 || getArg1() == 3) {
if (getSwNo() != 0xFF) {
fopAcM_onSwitch(this, getSwNo());
i_fopAcM_onSwitch(this, getSwNo());
}
}
}

View File

@ -4794,7 +4794,8 @@ asm void dEvt_info_c::onCondition(u16 param_0) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm bool dEvt_info_c::checkCommandDemoAccrpt() {
// asm bool dEvt_info_c::checkCommandDemoAccrpt() {
extern "C" asm void checkCommandDemoAccrpt__11dEvt_info_cFv() {
nofralloc
#include "asm/rel/d/a/e/d_a_e_wb/d_a_e_wb/checkCommandDemoAccrpt__11dEvt_info_cFv.s"
}

View File

@ -3335,58 +3335,10 @@ extern "C" u8 sOldVcdVatCmd__8J3DShape[4];
// Declarations:
//
inline Z2CreatureLink* Z2GetLink() {
return Z2CreatureLink::mLinkPtr;
}
inline u16 i_dComIfGs_getLife() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getLife();
}
inline BOOL i_dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getEvent().isEventBit(id);
}
inline bool i_dComIfGp_checkPlayerStatus1(int param_0, u32 flag) {
return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 1, flag);
}
inline dStage_stageDt_c* i_dComIfGp_getStage() {
return &g_dComIfG_gameInfo.play.getStage();
}
inline dEvt_control_c& i_dComIfGp_getEvent() {
return g_dComIfG_gameInfo.play.getEvent();
}
inline dEvent_manager_c& i_dComIfGp_getEventManager() {
return g_dComIfG_gameInfo.play.getEvtManager();
}
inline s8 i_dComIfGp_getPlayerCameraID(int idx) {
return g_dComIfG_gameInfo.play.getPlayerCameraID(idx);
}
inline daHorse_c* i_dComIfGp_getHorseActor() {
return (daHorse_c*)g_dComIfG_gameInfo.play.getPlayerPtr(1);
}
inline s32 i_dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
return param_0->field_0x09 >> 1 & 0x1f;
}
inline void i_fopAcM_onSwitch(const fopAc_ac_c* pActor, int sw) {
return dComIfGs_onSwitch(sw, fopAcM_GetHomeRoomNo(pActor));
}
inline void i_fopAcM_offSwitch(const fopAc_ac_c* pActor, int sw) {
return dComIfGs_offSwitch(sw, fopAcM_GetHomeRoomNo(pActor));
}
inline int i_dComIfGs_isItemFirstBit(u8 i_no) {
return g_dComIfG_gameInfo.info.getPlayer().getGetItem().isFirstBit(i_no);
}
/* 8009D87C-8009D884 0981BC 0008+00 0/0 1/1 0/0 .text getE3Zhint__9daAlink_cFv */
bool daAlink_c::getE3Zhint() {
return false;
@ -16808,10 +16760,6 @@ asm void daAlink_c::checkItemChangeAutoAction() {
}
#pragma pop
inline bool i_dComIfGp_checkPlayerStatus0(int param_0, u32 flag) {
return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 0, flag);
}
/* 800B7168-800B7190 0B1AA8 0028+00 7/7 0/0 0/0 .text setFastShotTimer__9daAlink_cFv */
void daAlink_c::setFastShotTimer() {
if (!i_dComIfGp_checkPlayerStatus0(0, 0x2000)) {
@ -17295,10 +17243,6 @@ asm void daAlink_c::setMagicArmorBrk(int param_0) {
}
#pragma pop
inline u16 i_dComIfGs_getRupee() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getRupee();
}
/* 800BB408-800BB458 0B5D48 0050+00 6/6 0/0 0/0 .text checkMagicArmorHeavy__9daAlink_cCFv
*/
BOOL daAlink_c::checkMagicArmorHeavy() const {
@ -21218,10 +21162,6 @@ BOOL daAlink_c::checkComboReserb() {
return i_checkNoResetFlg2(UNK_FLG2_2) && !checkEventRun();
}
inline u8 i_dComIfGp_getDoStatus() {
return g_dComIfG_gameInfo.play.getDoStatus();
}
/* 800D21D0-800D2284 0CCB10 00B4+00 1/1 0/0 0/0 .text commonCutAction__9daAlink_cFv */
bool daAlink_c::commonCutAction() {
if (mComboCutCount == 4) {
@ -30642,10 +30582,6 @@ asm void daAlink_c::procIronBallReturn() {
}
#pragma pop
inline BOOL i_dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
/* 80115C20-80115C50 110560 0030+00 72/72 0/0 0/0 .text checkEventRun__9daAlink_cCFv */
BOOL daAlink_c::checkEventRun() const {
return i_dComIfGp_event_runCheck() || checkPlayerDemoMode();

View File

@ -1689,14 +1689,6 @@ void daNpcT_c::deleteRes(s8 const* resNoList, char const** resNameList) {
/* 80453440-80453444 001A40 0004+00 3/3 0/0 0/0 .sdata2 @5667 */
SECTION_SDATA2 static f32 lit_5667 = -1000000000.0f;
inline dEvt_control_c& dComIfGp_getEvent() {
return g_dComIfG_gameInfo.play.getEvent();
}
inline BOOL dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
/* 8014852C-8014886C 142E6C 0340+00 0/0 0/0 59/59 .text execute__8daNpcT_cFv */
// matches with literals
#ifdef NONMATCHING
@ -1746,7 +1738,7 @@ int daNpcT_c::execute() {
setCollision();
if (!field_0xe2c) {
if ((field_0xe33 && dComIfGp_getEvent().i_isOrderOK()) || !dComIfGp_event_runCheck()) {
if ((field_0xe33 && dComIfGp_getEvent().i_isOrderOK()) || !i_dComIfGp_event_runCheck()) {
evtOrder();
}
}

View File

@ -631,10 +631,6 @@ SECTION_DATA extern void* __vt__8daItem_c[17 + 36 /* padding */] = {
NULL,
};
inline bool fopAcM_isItem(const fopAc_ac_c* item, int bitNo) {
return dComIfGs_isItem(bitNo, fopAcM_GetHomeRoomNo(item));
}
/* 8015B7D4-8015BA3C 156114 0268+00 1/1 0/0 0/0 .text _daItem_create__8daItem_cFv */
// matches, but issues with vtable
#ifdef NONMATCHING
@ -711,10 +707,6 @@ SECTION_SDATA2 static f32 lit_4320 = 300.0f;
/* 80453594-80453598 001B94 0004+00 1/1 0/0 0/0 .sdata2 @4321 */
SECTION_SDATA2 static f32 lit_4321 = 18.0f;
inline f32 fopAcM_searchPlayerDistance(const fopAc_ac_c* actor) {
return fopAcM_searchActorDistance(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
/* 8015BA9C-8015BD84 1563DC 02E8+00 1/1 0/0 0/0 .text _daItem_execute__8daItem_cFv */
// eyepos.y issue / need sinit for mFuncPtr
#ifdef NONMATCHING
@ -1009,13 +1001,9 @@ void daItem_c::procInitSwOnWait() {
setStatus(6);
}
inline bool fopAcM_isSwitch(const fopAc_ac_c* item, int sw) {
return dComIfGs_isSwitch(sw, fopAcM_GetHomeRoomNo(item));
}
/* 8015C648-8015C708 156F88 00C0+00 1/0 0/0 0/0 .text procMainSwOnWait__8daItem_cFv */
void daItem_c::procMainSwOnWait() {
if (fopAcM_isSwitch(this, field_0x93c)) {
if (i_fopAcM_isSwitch(this, field_0x93c)) {
mAcch.CrrPos(dComIfG_Bgsp());
if (mAcch.ChkWaterHit() && mAcch.m_wtr.GetHeight() > lit_4070[0] + mOrig.mPosition.y) {
@ -1192,10 +1180,6 @@ void daItem_c::setTevStr() {
g_env_light.setLightTevColorType_MAJI(mpModel, &mTevStr);
}
inline void fopAcM_onItem(const fopAc_ac_c* item, int bitNo) {
dComIfGs_onItem(bitNo, fopAcM_GetHomeRoomNo(item));
}
/* 8015CEEC-8015D0A8 15782C 01BC+00 6/6 0/0 0/0 .text itemGetNextExecute__8daItem_cFv */
void daItem_c::itemGetNextExecute() {
if (!checkFlag(0x20) && !checkFlag(0x10)) {
@ -1307,10 +1291,6 @@ asm void daItem_c::itemGet() {
#pragma pop
#endif
inline BOOL dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
/* 8015D370-8015D3CC 157CB0 005C+00 1/1 0/0 0/0 .text checkCountTimer__8daItem_cFv */
BOOL daItem_c::checkCountTimer() {
BOOL count = true;
@ -1323,7 +1303,7 @@ BOOL daItem_c::checkCountTimer() {
count = false;
}
if (dComIfGp_event_runCheck()) {
if (i_dComIfGp_event_runCheck()) {
count = false;
}

View File

@ -131,10 +131,6 @@ extern "C" u8 sOldVcdVatCmd__8J3DShape[4];
// Declarations:
//
inline s8 dComIfGp_getPlayerCameraID(int idx) {
return g_dComIfG_gameInfo.play.getPlayerCameraID(idx);
}
/* ############################################################################################## */
/* 80453600-80453608 001C00 0004+04 6/6 0/0 0/0 .sdata2 @4215 */
SECTION_SDATA2 static f32 lit_4215[1 + 1 /* padding */] = {
@ -656,10 +652,6 @@ s16 daPy_py_c::checkNowWolfEyeUp() {
/* 8015F438-8015F478 159D78 0040+00 0/0 0/0 1/1 .text forceRestartRoom__9daPy_py_cFiUli
*/
// move these inlines?
inline BOOL i_dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
void daAlink_c::startRestartRoomFromOut(int param_0, u32 param_1, int param_2) {
startRestartRoom(param_1, param_2, param_0, i_dComIfGp_event_runCheck());
@ -694,10 +686,6 @@ void daPy_py_c::setPlayerSe(u32 se_id) {
* linkGrabSubjectNoDraw__9daPy_py_cFP10fopAc_ac_c */
// regalloc
#ifdef NONMATCHING
inline daPy_py_c* daPy_getPlayerActorClass() {
return (daPy_py_c*)dComIfGp_getPlayer(0);
}
bool daPy_py_c::linkGrabSubjectNoDraw(fopAc_ac_c* p_ac) {
bool check_carry = false;
bool ret = false;
@ -708,7 +696,7 @@ bool daPy_py_c::linkGrabSubjectNoDraw(fopAc_ac_c* p_ac) {
}
}
if (check_carry && dComIfGp_checkCameraAttentionStatus(dComIfGp_getPlayerCameraID(0), 2) != 0) {
if (check_carry && dComIfGp_checkCameraAttentionStatus(i_dComIfGp_getPlayerCameraID(0), 2) != 0) {
ret = true;
}
@ -752,18 +740,10 @@ bool daPy_py_c::checkRoomRestartStart() {
}
}
inline dStage_stageDt_c* dComIfGp_getStage() {
return &g_dComIfG_gameInfo.play.getStage();
}
inline s32 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
return param_0->field_0x09 >> 1 & 0x1f;
}
/* 8015F698-8015F730 159FD8 0098+00 0/0 2/2 1/1 .text checkCarryStartLightBallA__9daPy_py_cFv */
u32 daPy_py_c::checkCarryStartLightBallA() {
if (checkRoomRestartStart() || !dComIfGp_getStage() || !dComIfGp_getStage()->getStagInfo() ||
dStage_stagInfo_GetSaveTbl(dComIfGp_getStage()->getStagInfo()) != 0x17) {
if (checkRoomRestartStart() || !i_dComIfGp_getStage() || !i_dComIfGp_getStage()->getStagInfo() ||
i_dStage_stagInfo_GetSaveTbl(i_dComIfGp_getStage()->getStagInfo()) != 0x17) {
return FALSE;
}
return dComIfGs_getLastSceneMode() & 0x100000;
@ -771,8 +751,8 @@ u32 daPy_py_c::checkCarryStartLightBallA() {
/* 8015F730-8015F7C8 15A070 0098+00 0/0 2/2 1/1 .text checkCarryStartLightBallB__9daPy_py_cFv */
u32 daPy_py_c::checkCarryStartLightBallB() {
if (checkRoomRestartStart() || !dComIfGp_getStage() || !dComIfGp_getStage()->getStagInfo() ||
dStage_stagInfo_GetSaveTbl(dComIfGp_getStage()->getStagInfo()) != 0x17) {
if (checkRoomRestartStart() || !i_dComIfGp_getStage() || !i_dComIfGp_getStage()->getStagInfo() ||
i_dStage_stagInfo_GetSaveTbl(i_dComIfGp_getStage()->getStagInfo()) != 0x17) {
return FALSE;
}
return dComIfGs_getLastSceneMode() & 0x80000;

View File

@ -7,6 +7,7 @@
#include "d/bg/d_bg_s.h"
#include "dol2asm.h"
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
//
// Forward References:

View File

@ -358,18 +358,6 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
inline s32 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
return param_0->field_0x09 >> 1 & 0x1f;
}
inline BOOL dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getEvent().isEventBit(id);
}
inline int dComIfGs_isItemFirstBit(u8 i_no) {
return g_dComIfG_gameInfo.info.getPlayer().getGetItem().isFirstBit(i_no);
}
void dComIfG_play_c::ct() {
mWindowNum = 0;
mParticle = NULL;
@ -513,17 +501,17 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Snowpeak Ruins or Snowpeak
if (!strcmp(stageName, "D_MN11") || !strcmp(stageName, "F_SP114")) {
// Cleared Snowpeak Ruins
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[266])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[266])) {
layer = 3;
}
// Talked with Yeta after giving Cheese
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[163])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[163])) {
layer = 2;
}
// Talked with Yeta after giving Pumpkin
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[162])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[162])) {
layer = 1;
}
}
@ -531,22 +519,22 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Faron Woods
else if (!strcmp(stageName, "F_SP108")) {
// Cleared Snowpeak Ruins
if (dComIfGs_isEventBit(0x2008)) {
if (i_dComIfGs_isEventBit(0x2008)) {
layer = 5;
}
// Completed Midna's Desperate Hour
else if (dComIfGs_isEventBit(0x1E08)) {
else if (i_dComIfGs_isEventBit(0x1E08)) {
layer = 3;
}
// Cleared Forest Temple
else if (dComIfGs_isEventBit(0x0602)) {
else if (i_dComIfGs_isEventBit(0x0602)) {
layer = 2;
}
// Haven't finished Ordon Day 2
else if (!dComIfGs_isEventBit(0x4510)) {
else if (!i_dComIfGs_isEventBit(0x4510)) {
layer = 1;
}
}
@ -554,12 +542,12 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Faron Woods Interiors
else if (!strcmp(stageName, "R_SP108")) {
// Cleared Forest Temple
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[55])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[55])) {
layer = 2;
}
// Haven't finished Ordon Day 2
else if (!dComIfGs_isEventBit(0x4510)) {
else if (!i_dComIfGs_isEventBit(0x4510)) {
layer = 1;
}
}
@ -567,35 +555,35 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Kakariko Village or Kakariko Graveyard
else if (!strcmp(stageName, "F_SP109") || !strcmp(stageName, "F_SP111")) {
// Obtained Zora's Armor
if (dComIfGs_isEventBit(0x0804)) {
if (i_dComIfGs_isEventBit(0x0804)) {
layer = 2;
dComIfG_get_timelayer(&layer);
}
// Finished Telma Wagon Escort
else if (dComIfGs_isEventBit(0x0810)) {
else if (i_dComIfGs_isEventBit(0x0810)) {
layer = 4;
}
// Watched cutscene after leaving Goron Mines
else if (dComIfGs_isEventBit(0x1320)) {
else if (i_dComIfGs_isEventBit(0x1320)) {
layer = 2;
dComIfG_get_timelayer(&layer);
}
// Cleared Goron Mines
else if (dComIfGs_isEventBit(0x0701)) {
else if (i_dComIfGs_isEventBit(0x0701)) {
layer = 12;
}
// Defeated King Bulblin 1
else if (dComIfGs_isEventBit(0x0A08)) {
else if (i_dComIfGs_isEventBit(0x0A08)) {
layer = 2;
dComIfG_get_timelayer(&layer);
}
// King Bulblin 1 trigger activated
else if (dComIfGs_isEventBit(0x0608)) {
else if (i_dComIfGs_isEventBit(0x0608)) {
layer = 1;
}
}
@ -603,19 +591,19 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Kakariko Village Interiors or Graveyard Interiors
else if (!strcmp(stageName, "R_SP109") || !strcmp(stageName, "R_SP209")) {
// Stage is Kakariko Interiors and room is Barnes shop and Cleared Lakebed Temple
if (!strcmp(stageName, "R_SP109") && roomId == 1 && dComIfGs_isEventBit(0x0904)) {
if (!strcmp(stageName, "R_SP109") && roomId == 1 && i_dComIfGs_isEventBit(0x0904)) {
layer = 4;
dComIfG_get_timelayer(&layer);
} else {
// Defeated King Bulblin 1
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[85])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[85])) {
layer = 2;
dComIfG_get_timelayer(&layer);
}
// King Bulblin 1 trigger activated
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[53])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[53])) {
layer = 1;
}
}
@ -624,7 +612,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Death Mountain
else if (!strcmp(stageName, "F_SP110")) {
// Cleared Goron Mines
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[64])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[64])) {
layer = 2;
}
}
@ -632,22 +620,22 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Death Mountain Interiors
else if (!strcmp(stageName, "R_SP110")) {
// Returned Wood Statue to Ilia
if (dComIfGs_isEventBit(0x2320)) {
if (i_dComIfGs_isEventBit(0x2320)) {
layer = 3;
}
// Cleared Temple of Time
else if (dComIfGs_isEventBit(0x2004)) {
else if (i_dComIfGs_isEventBit(0x2004)) {
layer = 4;
}
// Obtained Master Sword
else if (dComIfGs_isEventBit(0x2020)) {
else if (i_dComIfGs_isEventBit(0x2020)) {
layer = 2;
}
// Cleared Goron Mines
else if (dComIfGs_isEventBit(0x0701)) {
else if (i_dComIfGs_isEventBit(0x0701)) {
layer = 1;
}
}
@ -659,29 +647,29 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Lake Hylia and room is Lake
if (!strcmp(stageName, "F_SP115") && roomId == 0) {
// Repaired Sky Cannon
if (dComIfGs_isEventBit(0x3B08)) {
if (i_dComIfGs_isEventBit(0x3B08)) {
layer = 3;
}
// Warped Sky Cannon to Lake Hylia
else if (dComIfGs_isEventBit(0x3120)) {
else if (i_dComIfGs_isEventBit(0x3120)) {
layer = 1;
}
// Cleared Lakebed Temple
else if (dComIfGs_isEventBit(0x0904)) {
else if (i_dComIfGs_isEventBit(0x0904)) {
layer = 2;
}
}
// Stage is Telma's Bar and room is Bar and Obtained Master Sword
else if (!strcmp(stageName, "R_SP116") && roomId == 5 &&
dComIfGs_isEventBit(0x2020)) {
i_dComIfGs_isEventBit(0x2020)) {
layer = 4;
}
// Completed Midna's Desperate Hour and Stage is Castle Town
else if (dComIfGs_isEventBit(0x1E08) && !strcmp(stageName, "F_SP116")) {
else if (i_dComIfGs_isEventBit(0x1E08) && !strcmp(stageName, "F_SP116")) {
// Room is not East, South, or North Castle Town
if (roomId != 4 && roomId != 3 && roomId != 1) {
layer = 0;
@ -690,11 +678,11 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
}
} else {
// Cleared Lakebed Temple
if (dComIfGs_isEventBit(0x0904)) {
if (i_dComIfGs_isEventBit(0x0904)) {
// Stage is Lake Hylia and room is Fountain and haven't started Midna's
// Desperate Hour
if ((!strcmp(stageName, "F_SP115") && roomId == 1) &&
!dComIfGs_isEventBit(0x0C01)) {
!i_dComIfGs_isEventBit(0x0C01)) {
layer = 9;
} else {
layer = 2;
@ -703,7 +691,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Castle Town and room is South Castle Town and Finished Telma
// Wagon Escort
if ((!strcmp(stageName, "F_SP116") && roomId == 3) &&
dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[68])) {
i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[68])) {
layer = 1;
}
}
@ -713,7 +701,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Zora's Domain
else if (!strcmp(stageName, "F_SP113")) {
// Cleared Snowpeak Ruins
if (dComIfGs_isEventBit(0x2008)) {
if (i_dComIfGs_isEventBit(0x2008)) {
layer = 2;
}
}
@ -721,7 +709,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Upper Zora's River
else if (!strcmp(stageName, "F_SP126")) {
// Unlocked Iza's River Ride (1)
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[95])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[95])) {
layer = 1;
}
}
@ -731,7 +719,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
layer = 8;
// Used Sky Cannon to go to Desert
if (dComIfGs_isEventBit(0x4008)) {
if (i_dComIfGs_isEventBit(0x4008)) {
layer = 0;
}
}
@ -739,12 +727,12 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Zora's River
else if (!strcmp(stageName, "F_SP112")) {
// Unlocked Iza's River Ride (1)
if (dComIfGs_isEventBit(0x0B01)) {
if (i_dComIfGs_isEventBit(0x0B01)) {
layer = 1;
}
// Started Iza's River Ride (1)
else if (dComIfGs_isEventBit(0x0902)) {
else if (i_dComIfGs_isEventBit(0x0902)) {
layer = 2;
}
}
@ -754,7 +742,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Room is Main Village
if (roomId == 0) {
// Tamed Epona
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[56])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[56])) {
layer = 4;
dComIfG_get_timelayer(&layer);
}
@ -766,17 +754,17 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
}
// Escaped Hyrule Castle Sewers (1st Time)
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
layer = 1;
}
// Finished Ordon Day 2
else if (dComIfGs_isEventBit(0x4510)) {
else if (i_dComIfGs_isEventBit(0x4510)) {
layer = 7;
}
// Finished Ordon Day 1
else if (dComIfGs_isEventBit(0x4A40)) {
else if (i_dComIfGs_isEventBit(0x4A40)) {
layer = 0;
} else {
layer = 6;
@ -791,17 +779,17 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
}
// Escaped Hyrule Castle Sewers (1st Time)
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
layer = 1;
}
// Finished Ordon Day 2
else if (dComIfGs_isEventBit(0x4510)) {
else if (i_dComIfGs_isEventBit(0x4510)) {
layer = 0;
}
// Finished Ordon Day 1
else if (dComIfGs_isEventBit(0x4A40)) {
else if (i_dComIfGs_isEventBit(0x4A40)) {
layer = 4;
} else {
layer = 3;
@ -822,7 +810,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Room is Shield house
else if (roomId == 2) {
// Watched cutscene after defeating King Bulblin 1
if (dComIfGs_isEventBit(0x0780)) {
if (i_dComIfGs_isEventBit(0x0780)) {
layer = 3;
}
@ -832,7 +820,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
}
// Escaped Hyrule Castle Sewers (1st Time)
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
layer = 1;
}
}
@ -840,7 +828,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Room is Rusl and Uli's house
else if (roomId == 5) {
// Tamed Epona
if (dComIfGs_isEventBit(0x0601)) {
if (i_dComIfGs_isEventBit(0x0601)) {
layer = 4;
}
@ -861,17 +849,17 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
}
// Escaped Hyrule Castle Sewers (1st Time)
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
layer = 4;
}
// Finished Ordon Day 2
else if (dComIfGs_isEventBit(0x4510)) {
else if (i_dComIfGs_isEventBit(0x4510)) {
layer = 0;
}
// Finished Ordon Day 1
else if (dComIfGs_isEventBit(0x4A20)) {
else if (i_dComIfGs_isEventBit(0x4A20)) {
layer = 3;
} else {
layer = 1;
@ -884,7 +872,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
}
// Escaped Hyrule Castle Sewers (1st Time)
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
layer = 4;
}
}
@ -898,22 +886,22 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
}
// Escaped Hyrule Castle Sewers (1st Time)
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[47])) {
layer = 1;
}
// Watched cutscene after herding goats on Ordon Day 3
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[169])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[169])) {
layer = 10;
}
// Finished Ordon Day 2
else if (dComIfGs_isEventBit(0x4510)) {
else if (i_dComIfGs_isEventBit(0x4510)) {
layer = 9;
}
// Finished Ordon Day 1
else if (dComIfGs_isEventBit(0x4A40)) {
else if (i_dComIfGs_isEventBit(0x4A40)) {
layer = 11;
} else {
layer = 12;
@ -923,17 +911,17 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Hyrule Field
else if (!strcmp(stageName, "F_SP121")) {
// Completed Midna's Desperate Hour
if (dComIfGs_isEventBit(0x1E08)) {
if (i_dComIfGs_isEventBit(0x1E08)) {
layer = 6;
}
// Started Midna's Desperate Hour
else if (dComIfGs_isEventBit(0x0C01)) {
else if (i_dComIfGs_isEventBit(0x0C01)) {
layer = 4;
}
// Finished Telma Wagon Escort
else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[68])) {
else if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[68])) {
layer = 0;
}
@ -951,12 +939,12 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Room is Outside Castle Town - West
if (roomId == 8) {
// Completed Midna's Desperate Hour
if (dComIfGs_isEventBit(0x1E08)) {
if (i_dComIfGs_isEventBit(0x1E08)) {
layer = 6;
}
// Started Midna's Desperate Hour
else if (dComIfGs_isEventBit(0x0C01)) {
else if (i_dComIfGs_isEventBit(0x0C01)) {
layer = 4;
}
}
@ -964,22 +952,22 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Room is Outside Castle Town - South
else if (roomId == 16) {
// Obtained Wood Statue
if (dComIfGs_isEventBit(0x2204)) {
if (i_dComIfGs_isEventBit(0x2204)) {
layer = 6;
}
// Talked to Louise after getting Medicine Scent
else if (dComIfGs_isEventBit(0x2102)) {
else if (i_dComIfGs_isEventBit(0x2102)) {
layer = 1;
}
// Completed Midna's Desperate Hour
else if (dComIfGs_isEventBit(0x1E08)) {
else if (i_dComIfGs_isEventBit(0x1E08)) {
layer = 6;
}
// Started Midna's Desperate Hour
else if (dComIfGs_isEventBit(0x0C01)) {
else if (i_dComIfGs_isEventBit(0x0C01)) {
layer = 4;
}
}
@ -987,12 +975,12 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Room is Outside Castle Town - East
else if (roomId == 17) {
// Completed Midna's Desperate Hour
if (dComIfGs_isEventBit(0x1E08)) {
if (i_dComIfGs_isEventBit(0x1E08)) {
layer = 0;
}
// Started Midna's Desperate Hour
else if (dComIfGs_isEventBit(0x0C01)) {
else if (i_dComIfGs_isEventBit(0x0C01)) {
layer = 4;
}
}
@ -1000,7 +988,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Hidden Village
else if (!strcmp(stageName, "F_SP128")) {
if (dComIfGs_isEventBit(0x2320)) {
if (i_dComIfGs_isEventBit(0x2320)) {
layer = 1;
}
}
@ -1010,7 +998,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Room is Jovani's house
if (roomId == 5) {
// Completed Midna's Desperate Hour
if (dComIfGs_isEventBit(0x1E08)) {
if (i_dComIfGs_isEventBit(0x1E08)) {
layer = 0;
} else {
layer = 1;
@ -1018,7 +1006,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
}
// Fundraised Malo Mart Castle Town branch
else if (dComIfGs_isEventBit(0x2210)) {
else if (i_dComIfGs_isEventBit(0x2210)) {
layer = 1;
}
}
@ -1026,7 +1014,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Sacred Grove
else if (!strcmp(stageName, "F_SP117")) {
// Cleared Snowpeak Ruins
if (dComIfGs_isEventBit(0x2008)) {
if (i_dComIfGs_isEventBit(0x2008)) {
layer = 2;
}
}
@ -1034,17 +1022,17 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Bulblin Camp
else if (!strcmp(stageName, "F_SP118")) {
// Fixed the Mirror of Twilight
if (dComIfGs_isEventBit(0x2B08)) {
if (i_dComIfGs_isEventBit(0x2B08)) {
layer = 3;
}
// Cleared Arbiter's Grounds
else if (dComIfGs_isEventBit(0x2010)) {
else if (i_dComIfGs_isEventBit(0x2010)) {
layer = 2;
}
// Escaped the burning tent
else if (dComIfGs_isEventBit(0x0B40)) {
else if (i_dComIfGs_isEventBit(0x0B40)) {
layer = 1;
}
}
@ -1052,7 +1040,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Faron Woods Cave
else if (!strcmp(stageName, "D_SB10")) {
// Finished Ordon Day 2
if (dComIfGs_isEventBit(0x4510)) {
if (i_dComIfGs_isEventBit(0x4510)) {
layer = 1;
}
}
@ -1095,7 +1083,7 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
if (layer == 14) {
int tmp = layer;
// Warped meteor to Zora's Domain
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[65])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[65])) {
// Stage is Zora's River, Zora's Domain, Lake Hylia, Castle Town, Telma's Bar, R_SP115,
// Hyrule Field, Upper Zora's River, or Outside Castle Town
if (!strcmp(stageName, "F_SP112") || !strcmp(stageName, "F_SP113") ||
@ -1117,14 +1105,14 @@ int dComIfG_play_c::getLayerNo_common_common(const char* stageName, int roomId,
// Stage is Hyrule Castle Sewers and room is Prison Cell
if (!strcmp(stageName, "R_SP107") && roomId == 0) {
// Haven't been to Hyrule Castle Sewers
if (!dComIfGs_isEventBit(0x4D08)) {
if (!i_dComIfGs_isEventBit(0x4D08)) {
layer = 11;
}
}
// Stage and room is Zant Throne Room
else if (!strcmp(stageName, "D_MN08A") && roomId == 10) {
// Defeated Zant
if (dComIfGs_isEventBit(0x5410)) {
if (i_dComIfGs_isEventBit(0x5410)) {
layer = 1;
} else {
layer = 0;
@ -1416,12 +1404,6 @@ s8 dComIfGp_getReverb(int roomNo) {
return dStage_roomRead_dt_c_GetReverbStage(*dComIfGp_getStageRoom(), roomNo);
}
inline int dComIfGd_setSimpleShadow(cXyz* pos, f32 param_1, f32 param_2, cXyz* param_3, s16 angle,
f32 param_5, _GXTexObj* tex) {
return g_dComIfG_gameInfo.drawlist.setSimpleShadow(pos, param_1, param_2, param_3, angle,
param_5, tex);
}
/* 8002D0B4-8002D1AC 0279F4 00F8+00 0/0 3/3 34/34 .text
* dComIfGd_setSimpleShadow__FP4cXyzffR13cBgS_PolyInfosfP9_GXTexObj */
int dComIfGd_setSimpleShadow(cXyz* pos, f32 param_1, f32 param_2, cBgS_PolyInfo& param_3, s16 angle,
@ -1546,7 +1528,7 @@ void dComIfGp_setNextStage(char const* stage, s16 point, s8 roomNo, s8 layer) {
BOOL dComIfGs_isStageTbox(int i_stageNo, int i_no) {
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
if (i_stageNo == dStage_stagInfo_GetSaveTbl(stag_info)) {
if (i_stageNo == i_dStage_stagInfo_GetSaveTbl(stag_info)) {
return dComIfGs_isTbox(i_no);
} else {
return dComIfGs_isSaveTbox(i_stageNo, i_no);
@ -1556,7 +1538,7 @@ BOOL dComIfGs_isStageTbox(int i_stageNo, int i_no) {
void dComIfGs_onStageSwitch(int i_stageNo, int i_no) {
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
if (i_stageNo == dStage_stagInfo_GetSaveTbl(stag_info)) {
if (i_stageNo == i_dStage_stagInfo_GetSaveTbl(stag_info)) {
dComIfGs_onSwitch(i_no, -1);
}
@ -1566,7 +1548,7 @@ void dComIfGs_onStageSwitch(int i_stageNo, int i_no) {
void dComIfGs_offStageSwitch(int i_stageNo, int i_no) {
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
if (i_stageNo == dStage_stagInfo_GetSaveTbl(stag_info)) {
if (i_stageNo == i_dStage_stagInfo_GetSaveTbl(stag_info)) {
dComIfGs_offSwitch(i_no, -1);
}
@ -1576,7 +1558,7 @@ void dComIfGs_offStageSwitch(int i_stageNo, int i_no) {
BOOL dComIfGs_isStageSwitch(int i_stageNo, int i_no) {
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
if (i_stageNo == dStage_stagInfo_GetSaveTbl(stag_info)) {
if (i_stageNo == i_dStage_stagInfo_GetSaveTbl(stag_info)) {
return dComIfGs_isSwitch(i_no, -1);
} else {
return dComIfGs_isSaveSwitch(i_stageNo, i_no);
@ -1586,7 +1568,7 @@ BOOL dComIfGs_isStageSwitch(int i_stageNo, int i_no) {
void dComIfGs_onStageBossEnemy(int i_stageNo) {
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
if (i_stageNo == dStage_stagInfo_GetSaveTbl(stag_info)) {
if (i_stageNo == i_dStage_stagInfo_GetSaveTbl(stag_info)) {
dComIfGs_onStageBossEnemy();
}
@ -1596,7 +1578,7 @@ void dComIfGs_onStageBossEnemy(int i_stageNo) {
s32 dComIfGs_isDungeonItemWarp(int i_stageNo) {
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
if (i_stageNo == dStage_stagInfo_GetSaveTbl(stag_info)) {
if (i_stageNo == i_dStage_stagInfo_GetSaveTbl(stag_info)) {
return dComIfGs_isDungeonItemWarp();
} else {
return g_dComIfG_gameInfo.info.getSavedata()
@ -1622,10 +1604,6 @@ s8 dComIfGs_sense_type_change_Get() {
return g_dComIfG_gameInfo.field_0x1ddfa;
}
inline void dComIfGs_onSvZoneSwitch(int zoneNo, int swBit) {
g_dComIfG_gameInfo.info.getZone(zoneNo).getZoneBit().onSwitch(swBit);
}
/* 8002D94C-8002D9B0 02828C 0064+00 0/0 1/1 17/17 .text dComIfGs_onZoneSwitch__Fii */
#ifdef NONMATCHING
void dComIfGs_onZoneSwitch(int swBit, int roomNo) {
@ -1835,7 +1813,7 @@ void dComIfGp_mapHide() {
}
bool dComIfGp_checkMapShow() {
return !dComIfGs_isEventBit(0x1D01);
return !i_dComIfGs_isEventBit(0x1D01);
}
/* 8002E0E0-8002E188 028A20 00A8+00 0/0 9/9 0/0 .text dComIfGp_setHeapLockFlag__FUc */
@ -1947,8 +1925,8 @@ int dComIfGs_checkGetInsectNum() {
for (int i = 0; i < ARRAY_SIZE(l_itemno); i++) {
u8 insectId = *insectList;
insectList++;
if (dComIfGs_isItemFirstBit(insectId) &&
dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x191 + i])) {
if (i_dComIfGs_isItemFirstBit(insectId) &&
i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x191 + i])) {
insectCount++;
}
}
@ -2061,12 +2039,6 @@ void dComIfGp_addSelectItemNum(int index, s16 num) {
}
}
inline int dComIfGd_setRealShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3,
f32 param_4, f32 param_5, dKy_tevstr_c* param_6) {
return g_dComIfG_gameInfo.drawlist.setRealShadow(param_0, param_1, param_2, param_3, param_4,
param_5, param_6);
}
/* 8002E910-8002E974 029250 0064+00 0/0 5/5 137/137 .text
* dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj */
int dComIfGd_setShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3, f32 param_4,
@ -2198,7 +2170,7 @@ void dComIfGs_setKeyNum(int i_stageNo, u8 keyNum) {
if (dComIfGp_getStageStagInfo()) {
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
if (i_stageNo == dStage_stagInfo_GetSaveTbl(stag_info)) {
if (i_stageNo == i_dStage_stagInfo_GetSaveTbl(stag_info)) {
dComIfGs_setKeyNum(keyNum);
}
}
@ -2415,7 +2387,7 @@ BOOL dComIfGs_Wolf_Change_Check() {
BOOL is_wolf = false;
// Transforming Unlocked
if (dComIfGs_isEventBit(0x0D04)) {
if (i_dComIfGs_isEventBit(0x0D04)) {
is_wolf = dComIfGs_getTransformStatus();
} else if (dComIfGs_isTransformLV(0) && !dComIfGs_isDarkClearLV(0)) {
is_wolf = true;
@ -2553,10 +2525,6 @@ asm void dComIfGs_offVisitedRoom(int param_0) {
}
#pragma pop
inline BOOL dComIfGs_isSaveVisitedRoom(int param_0, int param_1) {
return g_dComIfG_gameInfo.info.getSavedata().getSave2(param_0)->isVisitedRoom(param_1);
}
/* 8002FC98-8002FCF4 02A5D8 005C+00 0/0 1/1 0/0 .text dComIfGs_isVisitedRoom__Fi */
// instructions swapped
#ifdef NONMATCHING

View File

@ -680,13 +680,9 @@ int daTagMagne_c::checkMagnetCode(cBgS_PolyInfo& poly) {
return 0;
}
inline bool fopAcM_isSwitch(const fopAc_ac_c* item, int sw) {
return dComIfGs_isSwitch(sw, fopAcM_GetHomeRoomNo(item));
}
/* 80031BF4-80031C48 02C534 0054+00 1/1 0/0 0/0 .text checkMagneA__12daTagMagne_cFv */
int daTagMagne_c::checkMagneA() {
if (mSwNo1 == 0xFF || fopAcM_isSwitch(this, mSwNo1)) {
if (mSwNo1 == 0xFF || i_fopAcM_isSwitch(this, mSwNo1)) {
return 1;
}
@ -695,7 +691,7 @@ int daTagMagne_c::checkMagneA() {
/* 80031C48-80031C9C 02C588 0054+00 1/1 0/0 0/0 .text checkMagneB__12daTagMagne_cFv */
int daTagMagne_c::checkMagneB() {
if (mSwNo2 == 0xFF || fopAcM_isSwitch(this, mSwNo2)) {
if (mSwNo2 == 0xFF || i_fopAcM_isSwitch(this, mSwNo2)) {
return 1;
}
@ -704,7 +700,7 @@ int daTagMagne_c::checkMagneB() {
/* 80031C9C-80031CF0 02C5DC 0054+00 1/1 0/0 0/0 .text checkMagneC__12daTagMagne_cFv */
int daTagMagne_c::checkMagneC() {
if (mSwNo3 == 0xFF || fopAcM_isSwitch(this, mSwNo3)) {
if (mSwNo3 == 0xFF || i_fopAcM_isSwitch(this, mSwNo3)) {
return 1;
}

View File

@ -6,6 +6,7 @@
#include "d/d_camera.h"
#include "dol2asm.h"
#include "dolphin/types.h"
#include "SSystem/SComponent/c_m3d_g_pla.h"
//
// Types:

View File

@ -75,17 +75,13 @@ SECTION_SDATA2 static f32 lit_3862 = 2.0f;
/* 80452C14-80452C18 001214 0004+00 1/1 0/0 0/0 .sdata2 @3863 */
SECTION_SDATA2 static f32 lit_3863 = 45.0f;
inline BOOL dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
/* 8009CA48-8009CB14 097388 00CC+00 0/0 1/1 0/0 .text update__12dEyeHL_mng_cFv */
// small issue with cLib_minMaxLimit
#ifdef NONMATCHING
void dEyeHL_mng_c::update() {
dEyeHL_mng_c* obj = m_obj;
if (g_envHIO[0x10] == 0 || !dComIfGp_event_runCheck()) {
if (g_envHIO[0x10] == 0 || !i_dComIfGp_event_runCheck()) {
for (; obj != NULL; obj = obj->m_next) {
obj->m_timg->LODBias = obj->m_lodBias;
}

View File

@ -456,16 +456,6 @@ extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */];
// Declarations:
//
inline void dComIfGp_setItemLifeCount(float amount, u8 type) {
g_dComIfG_gameInfo.play.setItemLifeCount(amount, type);
}
inline void dComIfGp_setItemRupeeCount(int amount) {
g_dComIfG_gameInfo.play.setItemRupeeCount(amount);
}
inline int dComIfGs_isItemFirstBit(u8 i_no) {
return g_dComIfG_gameInfo.info.getPlayer().getGetItem().isFirstBit(i_no);
}
static void (*item_func_ptr[256])() = {
item_func_HEART,
item_func_GREEN_RUPEE,
@ -725,10 +715,6 @@ static void (*item_func_ptr[256])() = {
item_func_noentry,
};
inline u8 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
return param_0->field_0x09 >> 1 & 0x1f;
}
inline void getItemFunc(u8 i_no) {
dComIfGs_onItemFirstBit(i_no);
item_func_ptr[i_no]();
@ -1010,35 +996,35 @@ s32 checkItemGet(u8 item_id, int param_2) {
}
void item_func_HEART() {
dComIfGp_setItemLifeCount(4.0f, 0);
i_dComIfGp_setItemLifeCount(4.0f, 0);
}
void item_func_GREEN_RUPEE() {
dComIfGp_setItemRupeeCount(1);
i_dComIfGp_setItemRupeeCount(1);
}
void item_func_BLUE_RUPEE() {
dComIfGp_setItemRupeeCount(5);
i_dComIfGp_setItemRupeeCount(5);
}
void item_func_YELLOW_RUPEE() {
dComIfGp_setItemRupeeCount(10);
i_dComIfGp_setItemRupeeCount(10);
}
void item_func_RED_RUPEE() {
dComIfGp_setItemRupeeCount(20);
i_dComIfGp_setItemRupeeCount(20);
}
void item_func_PURPLE_RUPEE() {
dComIfGp_setItemRupeeCount(50);
i_dComIfGp_setItemRupeeCount(50);
}
void item_func_ORANGE_RUPEE() {
dComIfGp_setItemRupeeCount(100);
i_dComIfGp_setItemRupeeCount(100);
}
void item_func_SILVER_RUPEE() {
dComIfGp_setItemRupeeCount(200);
i_dComIfGp_setItemRupeeCount(200);
}
void item_func_S_MAGIC() {
@ -1116,7 +1102,7 @@ void item_func_BOMB_INSECT_20() {
void item_func_BOMB_INSECT_30() {}
void item_func_RECOVER_FAILY() {
dComIfGp_setItemLifeCount(32.0f, 0);
i_dComIfGp_setItemLifeCount(32.0f, 0);
}
void item_func_TRIPLE_HEART() {}
@ -1133,10 +1119,10 @@ void item_func_UTUWA_HEART() {
dComIfGp_setItemMaxLifeCount(5);
f32 max_life = dComIfGs_getMaxLifeGauge();
dComIfGp_setItemLifeCount(max_life, 0);
i_dComIfGp_setItemLifeCount(max_life, 0);
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
int tmp = dStage_stagInfo_GetSaveTbl(stag_info);
int tmp = i_dStage_stagInfo_GetSaveTbl(stag_info);
dComIfGs_onStageLife();
}
@ -1643,7 +1629,7 @@ void item_func_LV7_DUNGEON_EXIT() {
}
void item_func_LINKS_SAVINGS() {
dComIfGp_setItemRupeeCount(50);
i_dComIfGp_setItemRupeeCount(50);
}
void item_func_SMALL_KEY2() {
@ -1699,31 +1685,31 @@ s32 item_getcheck_func_HEART() {
}
s32 item_getcheck_func_GREEN_RUPEE() {
return dComIfGs_isItemFirstBit(GREEN_RUPEE);
return i_dComIfGs_isItemFirstBit(GREEN_RUPEE);
}
s32 item_getcheck_func_BLUE_RUPEE() {
return dComIfGs_isItemFirstBit(BLUE_RUPEE);
return i_dComIfGs_isItemFirstBit(BLUE_RUPEE);
}
s32 item_getcheck_func_YELLOW_RUPEE() {
return dComIfGs_isItemFirstBit(YELLOW_RUPEE);
return i_dComIfGs_isItemFirstBit(YELLOW_RUPEE);
}
s32 item_getcheck_func_RED_RUPEE() {
return dComIfGs_isItemFirstBit(RED_RUPEE);
return i_dComIfGs_isItemFirstBit(RED_RUPEE);
}
s32 item_getcheck_func_PURPLE_RUPEE() {
return dComIfGs_isItemFirstBit(PURPLE_RUPEE);
return i_dComIfGs_isItemFirstBit(PURPLE_RUPEE);
}
s32 item_getcheck_func_ORANGE_RUPEE() {
return dComIfGs_isItemFirstBit(ORANGE_RUPEE);
return i_dComIfGs_isItemFirstBit(ORANGE_RUPEE);
}
s32 item_getcheck_func_SILVER_RUPEE() {
return dComIfGs_isItemFirstBit(SILVER_RUPEE);
return i_dComIfGs_isItemFirstBit(SILVER_RUPEE);
}
s32 item_getcheck_func_S_MAGIC() {
@ -1735,39 +1721,39 @@ s32 item_getcheck_func_L_MAGIC() {
}
s32 item_getcheck_func_BOMB_5() {
return dComIfGs_isItemFirstBit(BOMB_5);
return i_dComIfGs_isItemFirstBit(BOMB_5);
}
s32 item_getcheck_func_BOMB_10() {
return dComIfGs_isItemFirstBit(BOMB_10);
return i_dComIfGs_isItemFirstBit(BOMB_10);
}
s32 item_getcheck_func_BOMB_20() {
return dComIfGs_isItemFirstBit(BOMB_20);
return i_dComIfGs_isItemFirstBit(BOMB_20);
}
s32 item_getcheck_func_BOMB_30() {
return dComIfGs_isItemFirstBit(BOMB_30);
return i_dComIfGs_isItemFirstBit(BOMB_30);
}
s32 item_getcheck_func_ARROW_10() {
return dComIfGs_isItemFirstBit(ARROW_10);
return i_dComIfGs_isItemFirstBit(ARROW_10);
}
s32 item_getcheck_func_ARROW_20() {
return dComIfGs_isItemFirstBit(ARROW_20);
return i_dComIfGs_isItemFirstBit(ARROW_20);
}
s32 item_getcheck_func_ARROW_30() {
return dComIfGs_isItemFirstBit(ARROW_30);
return i_dComIfGs_isItemFirstBit(ARROW_30);
}
s32 item_getcheck_func_ARROW_1() {
return dComIfGs_isItemFirstBit(ARROW_1);
return i_dComIfGs_isItemFirstBit(ARROW_1);
}
s32 item_getcheck_func_PACHINKO_SHOT() {
return dComIfGs_isItemFirstBit(PACHINKO_SHOT);
return i_dComIfGs_isItemFirstBit(PACHINKO_SHOT);
}
s32 item_getcheck_func_WATER_BOMB_5() {
@ -1791,15 +1777,15 @@ s32 item_getcheck_func_BOMB_INSECT_5() {
}
s32 item_getcheck_func_BOMB_INSECT_10() {
return dComIfGs_isItemFirstBit(BOMB_INSECT_10);
return i_dComIfGs_isItemFirstBit(BOMB_INSECT_10);
}
s32 item_getcheck_func_BOMB_INSECT_20() {
return dComIfGs_isItemFirstBit(BOMB_INSECT_20);
return i_dComIfGs_isItemFirstBit(BOMB_INSECT_20);
}
s32 item_getcheck_func_BOMB_INSECT_30() {
return dComIfGs_isItemFirstBit(BOMB_INSECT_30);
return i_dComIfGs_isItemFirstBit(BOMB_INSECT_30);
}
s32 item_getcheck_func_RECOVER_FAILY() {
@ -1851,15 +1837,15 @@ s32 item_getcheck_func_MASTER_SWORD() {
}
s32 item_getcheck_func_WOOD_SHIELD() {
return dComIfGs_isItemFirstBit(WOOD_SHIELD);
return i_dComIfGs_isItemFirstBit(WOOD_SHIELD);
}
s32 item_getcheck_func_SHIELD() {
return dComIfGs_isItemFirstBit(SHIELD);
return i_dComIfGs_isItemFirstBit(SHIELD);
}
s32 item_getcheck_func_HYLIA_SHIELD() {
return dComIfGs_isItemFirstBit(HYLIA_SHIELD);
return i_dComIfGs_isItemFirstBit(HYLIA_SHIELD);
}
s32 item_getcheck_func_TKS_LETTER() {
@ -1867,7 +1853,7 @@ s32 item_getcheck_func_TKS_LETTER() {
}
s32 item_getcheck_func_WEAR_CASUAL() {
return dComIfGs_isItemFirstBit(WEAR_CASUAL);
return i_dComIfGs_isItemFirstBit(WEAR_CASUAL);
}
s32 item_getcheck_func_WEAR_KOKIRI() {
@ -1875,11 +1861,11 @@ s32 item_getcheck_func_WEAR_KOKIRI() {
}
s32 item_getcheck_func_ARMOR() {
return dComIfGs_isItemFirstBit(ARMOR);
return i_dComIfGs_isItemFirstBit(ARMOR);
}
s32 item_getcheck_func_WEAR_ZORA() {
return dComIfGs_isItemFirstBit(WEAR_ZORA);
return i_dComIfGs_isItemFirstBit(WEAR_ZORA);
}
s32 item_getcheck_func_MAGIC_LV1() {
@ -1907,11 +1893,11 @@ s32 item_getcheck_func_ZORAS_JEWEL() {
}
s32 item_getcheck_func_HAWK_EYE() {
return dComIfGs_isItemFirstBit(HAWK_EYE);
return i_dComIfGs_isItemFirstBit(HAWK_EYE);
}
s32 item_getcheck_func_WOOD_STICK() {
return dComIfGs_isItemFirstBit(WOOD_STICK);
return i_dComIfGs_isItemFirstBit(WOOD_STICK);
}
s32 item_getcheck_func_BOOMERANG() {
@ -1973,19 +1959,19 @@ s32 item_getcheck_func_COPY_ROD_2() {
}
s32 item_getcheck_func_BOMB_BAG_LV2() {
return dComIfGs_isItemFirstBit(BOMB_BAG_LV2);
return i_dComIfGs_isItemFirstBit(BOMB_BAG_LV2);
}
s32 item_getcheck_func_BOMB_BAG_LV1() {
return dComIfGs_isItemFirstBit(BOMB_BAG_LV1);
return i_dComIfGs_isItemFirstBit(BOMB_BAG_LV1);
}
s32 item_getcheck_func_BOMB_IN_BAG() {
return dComIfGs_isItemFirstBit(BOMB_IN_BAG);
return i_dComIfGs_isItemFirstBit(BOMB_IN_BAG);
}
s32 item_getcheck_func_LIGHT_ARROW() {
return dComIfGs_isItemFirstBit(LIGHT_ARROW);
return i_dComIfGs_isItemFirstBit(LIGHT_ARROW);
}
s32 item_getcheck_func_ARROW_LV1() {
@ -2097,15 +2083,15 @@ s32 item_getcheck_func_OIL() {
}
s32 item_getcheck_func_NORMAL_BOMB() {
return dComIfGs_isItemFirstBit(NORMAL_BOMB);
return i_dComIfGs_isItemFirstBit(NORMAL_BOMB);
}
s32 item_getcheck_func_WATER_BOMB() {
return dComIfGs_isItemFirstBit(WATER_BOMB);
return i_dComIfGs_isItemFirstBit(WATER_BOMB);
}
s32 item_getcheck_func_POKE_BOMB() {
return dComIfGs_isItemFirstBit(POKE_BOMB);
return i_dComIfGs_isItemFirstBit(POKE_BOMB);
}
s32 item_getcheck_func_FAIRY_DROP() {
@ -2117,7 +2103,7 @@ s32 item_getcheck_func_WORM() {
}
s32 item_getcheck_func_DROP_BOTTLE() {
return dComIfGs_isItemFirstBit(DROP_BOTTLE);
return i_dComIfGs_isItemFirstBit(DROP_BOTTLE);
}
s32 item_getcheck_func_BEE_CHILD() {
@ -2149,15 +2135,15 @@ s32 item_getcheck_func_CHUCHU_PURPLE() {
}
s32 item_getcheck_func_LV1_SOUP() {
return dComIfGs_isItemFirstBit(LV1_SOUP);
return i_dComIfGs_isItemFirstBit(LV1_SOUP);
}
s32 item_getcheck_func_LV2_SOUP() {
return dComIfGs_isItemFirstBit(LV2_SOUP);
return i_dComIfGs_isItemFirstBit(LV2_SOUP);
}
s32 item_getcheck_func_LV3_SOUP() {
return dComIfGs_isItemFirstBit(LV3_SOUP);
return i_dComIfGs_isItemFirstBit(LV3_SOUP);
}
s32 item_getcheck_func_LETTER() {
@ -2205,7 +2191,7 @@ s32 item_getcheck_func_CHUCHU_BLACK() {
}
s32 item_getcheck_func_LIGHT_DROP() {
return dComIfGs_isItemFirstBit(LIGHT_DROP);
return i_dComIfGs_isItemFirstBit(LIGHT_DROP);
}
s32 item_getcheck_func_DROP_CONTAINER() {
@ -2261,99 +2247,99 @@ s32 item_getcheck_func_SMELL_MEDICINE() {
}
s32 item_getcheck_func_M_BEETLE() {
return dComIfGs_isItemFirstBit(M_BEETLE);
return i_dComIfGs_isItemFirstBit(M_BEETLE);
}
s32 item_getcheck_func_F_BEETLE() {
return dComIfGs_isItemFirstBit(F_BEETLE);
return i_dComIfGs_isItemFirstBit(F_BEETLE);
}
s32 item_getcheck_func_M_BUTTERFLY() {
return dComIfGs_isItemFirstBit(M_BUTTERFLY);
return i_dComIfGs_isItemFirstBit(M_BUTTERFLY);
}
s32 item_getcheck_func_F_BUTTERFLY() {
return dComIfGs_isItemFirstBit(F_BUTTERFLY);
return i_dComIfGs_isItemFirstBit(F_BUTTERFLY);
}
s32 item_getcheck_func_M_STAG_BEETLE() {
return dComIfGs_isItemFirstBit(M_STAG_BEETLE);
return i_dComIfGs_isItemFirstBit(M_STAG_BEETLE);
}
s32 item_getcheck_func_F_STAG_BEETLE() {
return dComIfGs_isItemFirstBit(F_STAG_BEETLE);
return i_dComIfGs_isItemFirstBit(F_STAG_BEETLE);
}
s32 item_getcheck_func_M_GRASSHOPPER() {
return dComIfGs_isItemFirstBit(M_GRASSHOPPER);
return i_dComIfGs_isItemFirstBit(M_GRASSHOPPER);
}
s32 item_getcheck_func_F_GRASSHOPPER() {
return dComIfGs_isItemFirstBit(F_GRASSHOPPER);
return i_dComIfGs_isItemFirstBit(F_GRASSHOPPER);
}
s32 item_getcheck_func_M_NANAFUSHI() {
return dComIfGs_isItemFirstBit(M_NANAFUSHI);
return i_dComIfGs_isItemFirstBit(M_NANAFUSHI);
}
s32 item_getcheck_func_F_NANAFUSHI() {
return dComIfGs_isItemFirstBit(F_NANAFUSHI);
return i_dComIfGs_isItemFirstBit(F_NANAFUSHI);
}
s32 item_getcheck_func_M_DANGOMUSHI() {
return dComIfGs_isItemFirstBit(M_DANGOMUSHI);
return i_dComIfGs_isItemFirstBit(M_DANGOMUSHI);
}
s32 item_getcheck_func_F_DANGOMUSHI() {
return dComIfGs_isItemFirstBit(F_DANGOMUSHI);
return i_dComIfGs_isItemFirstBit(F_DANGOMUSHI);
}
s32 item_getcheck_func_M_MANTIS() {
return dComIfGs_isItemFirstBit(M_MANTIS);
return i_dComIfGs_isItemFirstBit(M_MANTIS);
}
s32 item_getcheck_func_F_MANTIS() {
return dComIfGs_isItemFirstBit(F_MANTIS);
return i_dComIfGs_isItemFirstBit(F_MANTIS);
}
s32 item_getcheck_func_M_LADYBUG() {
return dComIfGs_isItemFirstBit(M_LADYBUG);
return i_dComIfGs_isItemFirstBit(M_LADYBUG);
}
s32 item_getcheck_func_F_LADYBUG() {
return dComIfGs_isItemFirstBit(F_LADYBUG);
return i_dComIfGs_isItemFirstBit(F_LADYBUG);
}
s32 item_getcheck_func_M_SNAIL() {
return dComIfGs_isItemFirstBit(M_SNAIL);
return i_dComIfGs_isItemFirstBit(M_SNAIL);
}
s32 item_getcheck_func_F_SNAIL() {
return dComIfGs_isItemFirstBit(F_SNAIL);
return i_dComIfGs_isItemFirstBit(F_SNAIL);
}
s32 item_getcheck_func_M_DRAGONFLY() {
return dComIfGs_isItemFirstBit(M_DRAGONFLY);
return i_dComIfGs_isItemFirstBit(M_DRAGONFLY);
}
s32 item_getcheck_func_F_DRAGONFLY() {
return dComIfGs_isItemFirstBit(F_DRAGONFLY);
return i_dComIfGs_isItemFirstBit(F_DRAGONFLY);
}
s32 item_getcheck_func_M_ANT() {
return dComIfGs_isItemFirstBit(M_ANT);
return i_dComIfGs_isItemFirstBit(M_ANT);
}
s32 item_getcheck_func_F_ANT() {
return dComIfGs_isItemFirstBit(F_ANT);
return i_dComIfGs_isItemFirstBit(F_ANT);
}
s32 item_getcheck_func_M_MAYFLY() {
return dComIfGs_isItemFirstBit(M_MAYFLY);
return i_dComIfGs_isItemFirstBit(M_MAYFLY);
}
s32 item_getcheck_func_F_MAYFLY() {
return dComIfGs_isItemFirstBit(F_MAYFLY);
return i_dComIfGs_isItemFirstBit(F_MAYFLY);
}
s32 item_getcheck_func_POU_SPIRIT() {
@ -2405,11 +2391,11 @@ s32 item_getcheck_func_BOSSRIDER_KEY() {
}
s32 item_getcheck_func_TOMATO_PUREE() {
return dComIfGs_isItemFirstBit(TOMATO_PUREE);
return i_dComIfGs_isItemFirstBit(TOMATO_PUREE);
}
s32 item_getcheck_func_TASTE() {
return dComIfGs_isItemFirstBit(TASTE);
return i_dComIfGs_isItemFirstBit(TASTE);
}
s32 item_getcheck_func_LV5_BOSS_KEY() {
@ -2425,19 +2411,19 @@ s32 item_getcheck_func_KANTERA2() {
}
s32 item_getcheck_func_L2_KEY_PIECES1() {
return dComIfGs_isItemFirstBit(L2_KEY_PIECES1);
return i_dComIfGs_isItemFirstBit(L2_KEY_PIECES1);
}
s32 item_getcheck_func_L2_KEY_PIECES2() {
return dComIfGs_isItemFirstBit(L2_KEY_PIECES2);
return i_dComIfGs_isItemFirstBit(L2_KEY_PIECES2);
}
s32 item_getcheck_func_L2_KEY_PIECES3() {
return dComIfGs_isItemFirstBit(L2_KEY_PIECES3);
return i_dComIfGs_isItemFirstBit(L2_KEY_PIECES3);
}
s32 item_getcheck_func_KEY_OF_CARAVAN() {
return dComIfGs_isItemFirstBit(KEY_OF_CARAVAN);
return i_dComIfGs_isItemFirstBit(KEY_OF_CARAVAN);
}
s32 item_getcheck_func_LV2_BOSS_KEY() {
@ -2559,12 +2545,12 @@ u8 check_itemno(int i_itemId) {
}
if (i_itemId == ARROW_1) {
if (!dComIfGs_isItemFirstBit(BOW)) {
if (!i_dComIfGs_isItemFirstBit(BOW)) {
return GREEN_RUPEE;
}
} else {
if (isArrow(i_itemId)) {
if (!dComIfGs_isItemFirstBit(BOW)) {
if (!i_dComIfGs_isItemFirstBit(BOW)) {
return GREEN_RUPEE;
}
@ -2579,7 +2565,7 @@ u8 check_itemno(int i_itemId) {
}
}
if (!dComIfGs_isItemFirstBit(BOMB_BAG_LV1) && isBomb(i_itemId)) {
if (!i_dComIfGs_isItemFirstBit(BOMB_BAG_LV1) && isBomb(i_itemId)) {
return GREEN_RUPEE;
} else {
if (i_itemId == TRIPLE_HEART) {

View File

@ -48,11 +48,6 @@ extern "C" extern Z2EnvSeMgr g_mEnvSeMgr;
// Declarations:
//
// move later
inline void mDoAud_mEnvse_framework() {
g_mEnvSeMgr.framework();
}
/* 801ADD00-801ADD38 1A8640 0038+00 2/2 0/0 0/0 .text dKankyo_DayProc__Fv */
void dKankyo_DayProc() {
dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[91]);

View File

@ -405,14 +405,6 @@ extern "C" u8 mResetData__6mDoRst[4 + 4 /* padding */];
// Declarations:
//
inline u8 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
return param_0->field_0x09 >> 1 & 0x1f;
}
inline dStage_stageDt_c* dComIfGp_getStage() {
return &g_dComIfG_gameInfo.play.getStage();
}
void dStage_nextStage_c::set(const char* i_stage, s8 i_roomId, s16 i_point, s8 i_layer, s8 i_wipe,
u8 i_speed) {
if (!enabled) {
@ -1687,7 +1679,7 @@ void dStage_roomControl_c::zoneCountCheck(int stayNo) const {
dComIfGs_clearRoomSwitch(status->mZoneNo);
dComIfGs_clearRoomItem(status->mZoneNo);
if (dStage_stagInfo_GetSTType(dComIfGp_getStage()->getStagInfo()) != 0 &&
if (dStage_stagInfo_GetSTType(i_dComIfGp_getStage()->getStagInfo()) != 0 &&
stayNo != gLastStayNo) {
if (--status->mZoneCount == 0) {
dComIfGs_removeZone(status->mZoneNo);
@ -2282,7 +2274,7 @@ static int dStage_stagInfoInit(dStage_dt_c* stageDt, void* i_data, int entryNum,
dComIfGp_resetOldMulti();
}
int stageNo = dStage_stagInfo_GetSaveTbl(stageDt->getStagInfo());
int stageNo = i_dStage_stagInfo_GetSaveTbl(stageDt->getStagInfo());
dComIfGs_getSave(stageNo);
g_save_bit_HIO.init();
dComIfGs_initDan(stageNo);
@ -2694,8 +2686,8 @@ static void readMult(dStage_dt_c* stageDt, dStage_Multi_c* multi, bool useOldRes
if (multi != NULL) {
dStage_Mult_info* info = multi->mInfo;
if (dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 0 ||
dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 6) {
if (dStage_stagInfo_GetUpButton(i_dComIfGp_getStage()->getStagInfo()) == 0 ||
dStage_stagInfo_GetUpButton(i_dComIfGp_getStage()->getStagInfo()) == 6) {
dStage_roomControl_c::m_roomDzs.create(multi->field_0x0);
}
@ -2833,7 +2825,7 @@ static void layerTableLoader(void* i_data, dStage_dt_c* stageDt, int roomNo) {
dComIfG_play_c::getLayerNo(0));
dStage_dt_c_decode(i_data, stageDt, l_layerFuncTableA, ARRAY_SIZE(l_layerFuncTableA));
dStage_Elst_c* elst = dComIfGp_getStage()->getElst();
dStage_Elst_c* elst = i_dComIfGp_getStage()->getElst();
if (elst != NULL && newRoomNo >= 0 && elst->field_0x0 > newRoomNo) {
dStage_Elst_c::unkData* d = elst->field_0x4;
int layer = dComIfG_play_c::getLayerNo(0);
@ -2893,7 +2885,7 @@ void dStage_infoCreate() {
void* stageRsrc = dComIfG_getStageRes("stage.dzs");
dComIfGp_roomControl_init();
dStage_dt_c_stageInitLoader(stageRsrc, dComIfGp_getStage());
dStage_dt_c_stageInitLoader(stageRsrc, i_dComIfGp_getStage());
}
/* 80406194-804061A0 032EB4 000A+02 2/2 14/14 7/7 .bss mDemoArcName__20dStage_roomControl_c */
@ -2902,7 +2894,7 @@ char dStage_roomControl_c::mDemoArcName[10];
/* 80026D38-80026DF8 021678 00C0+00 0/0 1/1 0/0 .text dStage_Create__Fv */
void dStage_Create() {
void* stageRsrc = dComIfG_getStageRes("stage.dzs");
dStage_dt_c_stageLoader(stageRsrc, dComIfGp_getStage());
dStage_dt_c_stageLoader(stageRsrc, i_dComIfGp_getStage());
daSus_c::execute();
if (dComIfGp_getStartStageRoomNo() >= 0) {
@ -2926,7 +2918,7 @@ void dStage_Delete() {
dComIfG_deleteObjectResMain(dStage_roomControl_c::getDemoArcName());
}
int stageNo = dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
int stageNo = i_dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
dComIfGs_putSave(stageNo);
dStage_roomControl_c::removeRoomDzs();
@ -2948,7 +2940,7 @@ void dStage_Delete() {
dComIfG_deleteObjectResMain("Event");
dComIfG_deleteObjectResMain(dComIfGp_getCameraParamFileName(0));
dComIfGp_evmng_remove();
dComIfGp_getStage()->init();
i_dComIfGp_getStage()->init();
}
/* 80026FDC-80026FE8 02191C 000C+00 1/0 0/0 0/0 .text setOldMulti__16dStage_stageDt_cFv

View File

@ -65,10 +65,6 @@ extern "C" extern bool data_80450680;
// Declarations:
//
inline dStage_stageDt_c* dComIfGp_getStage() {
return &g_dComIfG_gameInfo.play.getStage();
}
/* ############################################################################################## */
/* 80450F98-80450F9C 000498 0004+00 2/2 0/0 0/0 .sbss mTypeGroupData__7dTres_c */
dTres_c::typeGroupData_c* dTres_c::mTypeGroupData;
@ -85,7 +81,7 @@ asm int dTres_c::createWork() {
/* 8009BC18-8009BC60 096558 0048+00 0/0 1/1 0/0 .text create__7dTres_cFv */
void dTres_c::create() {
if (dStage_stagInfo_GetSTType(dComIfGp_getStage()->getStagInfo()) != 3) {
if (dStage_stagInfo_GetSTType(i_dComIfGp_getStage()->getStagInfo()) != 3) {
reset();
}
}
@ -120,7 +116,7 @@ void dTres_c::reset() {
*/
#ifdef NONMATCHING
void dTres_c::addData(dTres_c::list_class* p_list, s8 roomNo) {
if (dStage_stagInfo_GetSTType(dComIfGp_getStage()->getStagInfo()) != 3) {
if (dStage_stagInfo_GetSTType(i_dComIfGp_getStage()->getStagInfo()) != 3) {
reset();
typeGroupData_c* listData = p_list->field_0x4;

View File

@ -143,22 +143,6 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
inline dEvent_manager_c& dComIfGp_getEventManager() {
return g_dComIfG_gameInfo.play.getEvtManager();
}
inline dEvt_control_c& dComIfGp_getEvent() {
return g_dComIfG_gameInfo.play.getEvent();
}
inline u16 dComIfGs_getLife() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getLife();
}
inline dStage_stageDt_c* dComIfGp_getStage() {
return &g_dComIfG_gameInfo.play.getStage();
}
/* 80041480-80041488 03BDC0 0008+00 1/1 0/0 0/0 .text event_debug_evnt__21@unnamed@d_event_cpp@Fv
*/
static bool func_80041480() {
@ -192,7 +176,7 @@ dEvt_order_c::dEvt_order_c() {
*/
s32 dEvt_control_c::orderOld(u16 param_0, u16 param_1, u16 param_2, u16 param_3, void* param_4,
void* param_5, void const* param_6) {
int eventIdx = dComIfGp_getEventManager().getEventIdx((char*)param_6, -1, -1);
int eventIdx = i_dComIfGp_getEventManager().getEventIdx((char*)param_6, -1, -1);
return order(param_0, param_1, param_2, param_3, param_4, param_5, eventIdx, -1);
}
@ -335,7 +319,7 @@ SECTION_DEAD static char const* const stringBase_80379D80 = "";
* afterFlagProc__14dEvt_control_cFP12dEvt_order_c */
void dEvt_control_c::afterFlagProc(dEvt_order_c* p_order) {
if (p_order->mFlag & 2) {
dComIfGp_getEventManager().issueStaff("ALL");
i_dComIfGp_getEventManager().issueStaff("ALL");
}
}
@ -481,8 +465,8 @@ int dEvt_control_c::itemCheck(dEvt_order_c* p_order) {
if (commonCheck(p_order, 8, 4)) {
mMode = 2;
mSpecifiedEvent = dComIfGp_getEventManager().getEventIdx(event, -1, -1);
dComIfGp_getEventManager().order(mSpecifiedEvent);
mSpecifiedEvent = i_dComIfGp_getEventManager().getEventIdx(event, -1, -1);
i_dComIfGp_getEventManager().order(mSpecifiedEvent);
return 1;
} else {
return 0;
@ -510,7 +494,7 @@ int dEvt_control_c::endProc() {
field_0xed = 0;
field_0xe0 = 255;
mPreItemNo = 255;
dComIfGp_getEventManager().setStartDemo(-2);
i_dComIfGp_getEventManager().setStartDemo(-2);
return 1;
}
#else
@ -570,18 +554,18 @@ int dEvt_control_c::entry() {
switch (order->mEventType) {
case 0:
if (dComIfGs_getLife() != 0 && talkCheck(order) != 0) {
if (i_dComIfGs_getLife() != 0 && talkCheck(order) != 0) {
return 1;
}
break;
case 2:
if (dComIfGs_getLife() != 0 && demoCheck(order) != 0) {
if (i_dComIfGs_getLife() != 0 && demoCheck(order) != 0) {
return 1;
}
break;
case 1:
case 11:
if (dComIfGs_getLife() != 0 && doorCheck(order) != 0) {
if (i_dComIfGs_getLife() != 0 && doorCheck(order) != 0) {
return 1;
}
break;
@ -590,23 +574,23 @@ int dEvt_control_c::entry() {
setParam(order);
return 1;
case 4:
if (dComIfGs_getLife() != 0 && potentialCheck(order) != 0) {
if (i_dComIfGs_getLife() != 0 && potentialCheck(order) != 0) {
return 1;
}
break;
case 5:
if (dComIfGs_getLife() != 0 && itemCheck(order) != 0) {
if (i_dComIfGs_getLife() != 0 && itemCheck(order) != 0) {
return 1;
}
break;
case 6:
case 7:
if (dComIfGs_getLife() != 0 && talkXyCheck(order) != 0) {
if (i_dComIfGs_getLife() != 0 && talkXyCheck(order) != 0) {
return 1;
}
break;
case 10:
if (dComIfGs_getLife() != 0 && catchCheck(order) != 0) {
if (i_dComIfGs_getLife() != 0 && catchCheck(order) != 0) {
return 1;
}
break;
@ -623,7 +607,7 @@ int dEvt_control_c::entry() {
void dEvt_control_c::reset() {
if (field_0xec != 0xFF) {
void* pt1 = getPt1();
s16 eventIdx = dComIfGp_getEventManager().getEventIdx(NULL, field_0xec, -1);
s16 eventIdx = i_dComIfGp_getEventManager().getEventIdx(NULL, field_0xec, -1);
void* pt2 = getPt2();
order(2, 3, 0x201, mHindFlag, pt1, pt2, eventIdx, field_0xec);
@ -636,7 +620,7 @@ void dEvt_control_c::reset() {
/* 80042518-800425B4 03CE58 009C+00 3/3 3/3 46/46 .text reset__14dEvt_control_cFPv */
void dEvt_control_c::reset(void* param_0) {
if (field_0xec != 0xFF) {
s16 eventIdx = dComIfGp_getEventManager().getEventIdx((fopAc_ac_c*)param_0, field_0xec);
s16 eventIdx = i_dComIfGp_getEventManager().getEventIdx((fopAc_ac_c*)param_0, field_0xec);
void* pt2 = getPt2();
order(2, 3, 0x201, mHindFlag, param_0, pt2, eventIdx, field_0xec);
}
@ -659,13 +643,13 @@ void dEvt_control_c::clearSkipSystem() {
/* 800425E8-8004261C 03CF28 0034+00 0/0 2/2 5/5 .text dEv_defaultSkipProc__FPvi */
int dEv_defaultSkipProc(void* param_0, int) {
dComIfGp_getEvent().reset(param_0);
i_dComIfGp_getEvent().reset(param_0);
return 1;
}
/* 8004261C-80042778 03CF5C 015C+00 1/1 1/1 0/0 .text dEv_defaultSkipZev__FPvi */
int dEv_defaultSkipZev(void* param_0, int param_1) {
dEvt_control_c* evControl = &dComIfGp_getEvent();
dEvt_control_c* evControl = &i_dComIfGp_getEvent();
s16 eventID = -1;
dStage_MapEvent_dt_c* data = evControl->getStageEventDt();
@ -684,11 +668,11 @@ int dEv_defaultSkipZev(void* param_0, int param_1) {
char eventName[32];
strcpy(eventName, data->mName);
strcat(eventName, "$0");
eventID = dComIfGp_getEventManager().getEventIdx(eventName, 0xFF, -1);
eventID = i_dComIfGp_getEventManager().getEventIdx(eventName, 0xFF, -1);
break;
case 1:
char* skipName = dComIfGp_getEvent().getSkipEventName();
eventID = dComIfGp_getEventManager().getEventIdx(skipName, 0xFF, -1);
char* skipName = i_dComIfGp_getEvent().getSkipEventName();
eventID = i_dComIfGp_getEventManager().getEventIdx(skipName, 0xFF, -1);
break;
}
@ -707,7 +691,7 @@ int dEv_defaultSkipZev(void* param_0, int param_1) {
/* 80042778-800428DC 03D0B8 0164+00 0/0 1/1 0/0 .text dEv_defaultSkipStb__FPvi */
int dEv_defaultSkipStb(void* param_0, int param_1) {
dEvt_control_c* evControl = &dComIfGp_getEvent();
dEvt_control_c* evControl = &i_dComIfGp_getEvent();
s16 eventID = -1;
dStage_MapEvent_dt_c* data = evControl->getStageEventDt();
@ -726,11 +710,11 @@ int dEv_defaultSkipStb(void* param_0, int param_1) {
char eventName[32];
strcpy(eventName, data->mName);
strcat(eventName, "$0");
eventID = dComIfGp_getEventManager().getEventIdx(eventName, 0xFF, -1);
eventID = i_dComIfGp_getEventManager().getEventIdx(eventName, 0xFF, -1);
break;
case 1:
char* skipName = dComIfGp_getEvent().getSkipEventName();
eventID = dComIfGp_getEventManager().getEventIdx(skipName, 0xFF, -1);
char* skipName = i_dComIfGp_getEvent().getSkipEventName();
eventID = i_dComIfGp_getEventManager().getEventIdx(skipName, 0xFF, -1);
break;
}
@ -751,7 +735,7 @@ int dEv_defaultSkipStb(void* param_0, int param_1) {
/* 800428DC-8004290C 03D21C 0030+00 0/0 1/1 33/33 .text dEv_noFinishSkipProc__FPvi */
int dEv_noFinishSkipProc(void*, int) {
dComIfGp_getEvent().offSkipFade();
i_dComIfGp_getEvent().offSkipFade();
return 0;
}
@ -867,7 +851,7 @@ SECTION_SDATA2 static f32 lit_5013 = -1.0f / 20.0f;
// small regalloc in checkFishingCastMode
#ifdef NONMATCHING
int dEvt_control_c::Step() {
dEvent_manager_c* evtMng = &dComIfGp_getEventManager();
dEvent_manager_c* evtMng = &i_dComIfGp_getEventManager();
field_0xe7 = 0;
field_0xe8 = mNum;
@ -1103,7 +1087,7 @@ void dEvt_info_c::setEventName(char* name) {
if (name == NULL) {
mEventId = -1;
} else {
mEventId = dComIfGp_getEventManager().getEventIdx(name, -1, -1);
mEventId = i_dComIfGp_getEventManager().getEventIdx(name, -1, -1);
}
}
@ -1112,7 +1096,7 @@ char* dEvt_info_c::getEventName() {
if (mEventId == -1) {
return 0;
} else {
dEvDtEvent_c* data = dComIfGp_getEventManager().getEventData(mEventId);
dEvDtEvent_c* data = i_dComIfGp_getEventManager().getEventData(mEventId);
if (data == NULL) {
return 0;
} else {
@ -1149,7 +1133,7 @@ dStage_MapEvent_dt_c* dEvt_control_c::searchMapEventData(u8 mapToolID, s32 roomN
}
}
dStage_MapEventInfo_c* stageDt = dComIfGp_getStage()->getMapEventInfo();
dStage_MapEventInfo_c* stageDt = i_dComIfGp_getStage()->getMapEventInfo();
if (stageDt != NULL) {
for (int i = 0; i < stageDt->mCount; i++) {
if (mapToolID == stageDt->mData[i].field_0x4) {

View File

@ -128,28 +128,12 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
inline dEvent_manager_c& dComIfGp_getEventManager() {
return g_dComIfG_gameInfo.play.getEvtManager();
}
inline BOOL dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getEvent().isEventBit(id);
}
inline s32 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
return param_0->field_0x09 >> 1 & 0x1f;
}
inline BOOL dEvDtFlagCheck(int flag) {
return dComIfGp_getEventManager().flagCheck(flag);
return i_dComIfGp_getEventManager().flagCheck(flag);
}
inline void dEvDtFlagSet(int flag) {
dComIfGp_getEventManager().setFlag(flag);
}
inline dEvt_control_c& dComIfGp_getEvent() {
return g_dComIfG_gameInfo.play.getEvent();
i_dComIfGp_getEventManager().setFlag(flag);
}
struct TelopDataStruct {
@ -221,7 +205,7 @@ static u16 getStartTelopNo() {
if (telopData == NULL || telopData->_8 == 0) {
return 0xFFFF;
} else if (telopData->_8 == 2 && telopData->_6 != 0xFFFF &&
!dComIfGs_isEventBit(telopData->_6)) {
!i_dComIfGs_isEventBit(telopData->_6)) {
return 0xFFFF;
} else if (telopData->_8 == 3 && telopData->_6 != 0xFFFF &&
!dComIfGs_isStageSwitch(telopData->_6 >> 8, telopData->_6 & 0xFF)) {
@ -442,7 +426,7 @@ int dEvDtEvent_c::finishCheck() {
if (tmp == -1) {
return 1;
}
if (!dComIfGp_getEventManager().flagCheck(tmp)) {
if (!i_dComIfGp_getEventManager().flagCheck(tmp)) {
return 0;
}
}
@ -456,7 +440,7 @@ int dEvDtEvent_c::forceFinish() {
if (tmp == -1) {
return 1;
}
dComIfGp_getEventManager().setFlag(tmp);
i_dComIfGp_getEventManager().setFlag(tmp);
}
return 1;
}
@ -536,7 +520,7 @@ void dEvDtStaff_c::init() {
field_0x41 = false;
field_0x3c = -1;
if (mType == TYPE_CAMERA) {
dComIfGp_getEventManager().setCameraPlay(1);
i_dComIfGp_getEventManager().setCameraPlay(1);
}
}
@ -573,7 +557,7 @@ SECTION_SDATA2 static f64 lit_4461 = 24.0;
void dEvDtStaff_c::specialProcLight() {
int staffId = i_dComIfGp_evmng_getMyStaffId("LIGHT", NULL, 0);
if (staffId != -1) {
char* nowCutName = dComIfGp_getEventManager().getMyNowCutName(staffId);
char* nowCutName = i_dComIfGp_getEventManager().getMyNowCutName(staffId);
if (dComIfGp_evmng_getIsAddvance(staffId)) {
f32* hourP;
switch (*(int*)nowCutName) {
@ -625,7 +609,7 @@ void dEvDtStaff_c::specialProcMessage() {
if (staffId == -1) {
return;
}
char* nowCutName = dComIfGp_getEventManager().getMyNowCutName(staffId);
char* nowCutName = i_dComIfGp_getEventManager().getMyNowCutName(staffId);
if (dComIfGp_evmng_getIsAddvance(staffId)) {
switch (*(int*)nowCutName) {
case 'WAIT':
@ -816,7 +800,7 @@ void dEvDtStaff_c::specialProcSound() {
if (staffId == -1) {
return;
}
char* nowCutName = dComIfGp_getEventManager().getMyNowCutName(staffId);
char* nowCutName = i_dComIfGp_getEventManager().getMyNowCutName(staffId);
if (dComIfGp_evmng_getIsAddvance(staffId)) {
switch (*(int*)nowCutName) {
case 'WAIT':
@ -894,7 +878,7 @@ void dEvDtStaff_c::specialProcCreate() {
if (staffId == -1) {
return;
}
char* nowCutName = dComIfGp_getEventManager().getMyNowCutName(staffId);
char* nowCutName = i_dComIfGp_getEventManager().getMyNowCutName(staffId);
if (dComIfGp_evmng_getIsAddvance(staffId)) {
switch (*(int*)nowCutName) {
case 'WAIT':
@ -973,12 +957,12 @@ SECTION_DEAD static char const* const stringBase_80379EF9 = "PtD";
void dEvDtStaff_c::specialProcDirector() {
DirectorData* data = (DirectorData*)mData;
daPy_py_c* player = dComIfGp_getLinkPlayer();
dEvt_control_c& evtControl = dComIfGp_getEvent();
dEvt_control_c& evtControl = i_dComIfGp_getEvent();
int staffId = i_dComIfGp_evmng_getMyStaffId("DIRECTOR", NULL, 0);
if (staffId == -1) {
return;
}
char* nowCutName = dComIfGp_getEventManager().getMyNowCutName(staffId);
char* nowCutName = i_dComIfGp_getEventManager().getMyNowCutName(staffId);
if (dComIfGp_evmng_getIsAddvance(staffId)) {
int* eventFlagP = dComIfGp_evmng_getMyIntegerP(staffId, "EventFlag");
if (eventFlagP != NULL) {
@ -993,7 +977,7 @@ void dEvDtStaff_c::specialProcDirector() {
if (switchTableP != NULL) {
switchTable = *switchTableP;
} else {
switchTable = dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
switchTable = i_dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
}
int* switchBitP = dComIfGp_evmng_getMyIntegerP(staffId, "SwitchBit");
if (switchBitP != NULL) {
@ -1126,10 +1110,10 @@ void dEvDtStaff_c::specialProcDirector() {
if (specTypeP != NULL) {
switch (*specTypeP) {
case 8:
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[506])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[506])) {
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[566]);
}
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[507])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[507])) {
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[567]);
}
}
@ -1211,10 +1195,6 @@ SECTION_DEAD static char const* const stringBase_80379F18 = "OffsetAngY";
/* 80451EF8-80451EFC 0004F8 0004+00 1/1 0/0 0/0 .sdata2 @5057 */
SECTION_SDATA2 static f32 lit_5057 = 10.0f;
inline void dComIfGp_event_setCullRate(f32 f) {
g_dComIfG_gameInfo.play.getEvent().setCullRate(f);
}
/* 80045878-80045AFC 0401B8 0284+00 1/1 0/0 0/0 .text specialProcPackage__12dEvDtStaff_cFv */
#ifdef NONMATCHING
void dEvDtStaff_c::specialProcPackage() {
@ -1226,7 +1206,7 @@ void dEvDtStaff_c::specialProcPackage() {
if (staffId == -1) {
return;
}
char* nowCutName = dComIfGp_getEventManager().getMyNowCutName(staffId);
char* nowCutName = i_dComIfGp_getEventManager().getMyNowCutName(staffId);
if (dComIfGp_evmng_getIsAddvance(staffId)) {
switch (*(int*)nowCutName) {
case 'WAIT':
@ -1243,7 +1223,7 @@ void dEvDtStaff_c::specialProcPackage() {
offsetAngY = 0.0f;
}
// should not save event from g_dComIfG_gameInfo to register
u8* demoData = (u8*)dComIfGp_getEvent().getStbDemoData(fileName);
u8* demoData = (u8*)i_dComIfGp_getEvent().getStbDemoData(fileName);
dDemo_c::start(demoData, offsetPos, offsetAngY);
dComIfGp_event_setCullRate(10.0f);
int* eventFlagP = dComIfGp_evmng_getMyIntegerP(staffId, "EventFlag");
@ -1258,7 +1238,7 @@ void dEvDtStaff_c::specialProcPackage() {
specialProc_WaitProc(staffId);
break;
case 'PLAY':
dEvt_control_c& evtControl = dComIfGp_getEvent();
dEvt_control_c& evtControl = i_dComIfGp_getEvent();
if (dDemo_c::getMode() == 2) {
dStage_MapEvent_dt_c* event = evtControl.getStageEventDt();
if (event != NULL && event->field_0x7 != 0xFF && !evtControl.chkFlag2(1)) {
@ -1302,7 +1282,7 @@ void dEvDtStaff_c::specialProcTimekeeper() {
if (staffId == -1) {
return;
}
char* nowCutName = dComIfGp_getEventManager().getMyNowCutName(staffId);
char* nowCutName = i_dComIfGp_getEventManager().getMyNowCutName(staffId);
if (dComIfGp_evmng_getIsAddvance(staffId)) {
switch (*(int*)nowCutName) {
case 'COUN':
@ -1352,7 +1332,7 @@ void dEvDtStaff_c::specialProcEffect() {
if (staffId == -1) {
return;
}
char* nowCutName = dComIfGp_getEventManager().getMyNowCutName(staffId);
char* nowCutName = i_dComIfGp_getEventManager().getMyNowCutName(staffId);
if (dComIfGp_evmng_getIsAddvance(staffId)) {
data->unk = 0;
switch (*(int*)nowCutName) {

View File

@ -14,14 +14,6 @@
// Declarations:
//
inline dEvent_manager_c& dComIfGp_getEventManager() {
return g_dComIfG_gameInfo.play.getEvtManager();
}
inline dEvt_control_c& dComIfGp_getEvent() {
return g_dComIfG_gameInfo.play.getEvent();
}
/* ############################################################################################## */
/* 803A82B8-803A82C4 0053D8 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
SECTION_DATA static u8 cNullVec__6Z2Calc[12] = {
@ -54,7 +46,7 @@ BOOL dEvLib_callback_c::setEvent(int mapToolId, int eventIdx, int param_2) {
} else {
mActor->mEvtInfo.setMapToolId(mapToolId);
if (mapToolId != 0xFF && eventIdx == 0xFF) {
eventIdx = dComIfGp_getEventManager().getEventIdx(mActor, mapToolId);
eventIdx = i_dComIfGp_getEventManager().getEventIdx(mActor, mapToolId);
}
mActor->mEvtInfo.setEventId(eventIdx);
_C = param_2;
@ -128,10 +120,10 @@ BOOL dEvLib_callback_c::initRun() {
/* 80048B48-80048BD8 043488 0090+00 1/0 0/0 0/0 .text executeRun__17dEvLib_callback_cFv
*/
BOOL dEvLib_callback_c::executeRun() {
if (!dComIfGp_getEventManager().endCheck(mActor->mEvtInfo.getEventId())) {
if (!i_dComIfGp_getEventManager().endCheck(mActor->mEvtInfo.getEventId())) {
return eventRun();
} else {
dComIfGp_getEvent().reset();
i_dComIfGp_getEvent().reset();
setAction(NULL);
return eventEnd();
}

View File

@ -134,14 +134,6 @@ extern "C" u8 mDemoArcName__20dStage_roomControl_c[10 + 2 /* padding */];
extern "C" u8 sincosTable___5JMath[65536];
extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
inline dEvent_manager_c& dComIfGp_getEventManager() {
return g_dComIfG_gameInfo.play.getEvtManager();
}
inline dEvt_control_c& dComIfGp_getEvent() {
return g_dComIfG_gameInfo.play.getEvent();
}
BOOL daPy_py_c::checkNowWolf() {
return dComIfGp_getLinkPlayer()->i_checkWolf();
}
@ -433,15 +425,15 @@ void dEvent_manager_c::endProc(s16 param_0, int param_1) {
event->mEventState = 0;
mCurrentEventType = 0;
mCurrentEventCompositId = -1;
dComIfGp_getEvent().setPtD(NULL);
dComIfGp_getEvent().setPtI(NULL);
i_dComIfGp_getEvent().setPtD(NULL);
i_dComIfGp_getEvent().setPtI(NULL);
}
}
}
/* 80046E64-800473FC 0417A4 0598+00 0/0 1/1 0/0 .text Sequencer__16dEvent_manager_cFv */
void dEvent_manager_c::Sequencer() {
dEvt_control_c& evtControl = dComIfGp_getEvent();
dEvt_control_c& evtControl = i_dComIfGp_getEvent();
dEvDtEvent_c* event = this->getEventData(mCurrentEventCompositId);
dStage_MapEvent_dt_c* mapEvent = evtControl.getStageEventDt();
if (event != NULL) {
@ -804,7 +796,7 @@ int dEvent_manager_c::startCheckOld(char const* pName) {
/* 80047A78-80047ADC 0423B8 0064+00 1/1 2/2 122/122 .text endCheck__16dEvent_manager_cFs
*/
int dEvent_manager_c::endCheck(s16 param_0) {
dEvDtEvent_c* event = this->getEventData(dComIfGp_getEvent().runningEventID(param_0));
dEvDtEvent_c* event = this->getEventData(i_dComIfGp_getEvent().runningEventID(param_0));
if (event == NULL) {
return 0;
} else {
@ -827,7 +819,7 @@ int dEvent_manager_c::getMyStaffId(char const* pStaffName, fopAc_ac_c* pActor, i
int staffNum;
int i;
int evtIdx = -1;
if (dComIfGp_getEvent().getMode() == 0) {
if (i_dComIfGp_getEvent().getMode() == 0) {
return -1;
} else {
if (pActor != NULL) {
@ -895,7 +887,7 @@ int dEvent_manager_c::getMyStaffId(char const* pStaffName, fopAc_ac_c* pActor, i
/* 80047D4C-80047DAC 04268C 0060+00 0/0 9/9 417/417 .text getIsAddvance__16dEvent_manager_cFi */
int dEvent_manager_c::getIsAddvance(int param_0) {
if (dComIfGp_getEvent().getMode() == 0) {
if (i_dComIfGp_getEvent().getMode() == 0) {
return 0;
} else if (param_0 == -1) {
return 0;
@ -930,7 +922,7 @@ static int dEvmng_strcmp(char const* param_0, char* param_1) {
* getMyActIdx__16dEvent_manager_cFiPCPCciii */
int dEvent_manager_c::getMyActIdx(int param_0, char const* const* param_1, int param_2, int param_3,
int param_4) {
if (dComIfGp_getEvent().getMode() == 0) {
if (i_dComIfGp_getEvent().getMode() == 0) {
return 0;
} else if (param_0 == -1) {
return -1;
@ -974,7 +966,7 @@ int dEvent_manager_c::getMyActIdx(int param_0, char const* const* param_1, int p
/* 80047F5C-80047FC8 04289C 006C+00 1/1 9/9 62/62 .text getMyNowCutName__16dEvent_manager_cFi */
char* dEvent_manager_c::getMyNowCutName(int index) {
if (dComIfGp_getEvent().getMode() == 0) {
if (i_dComIfGp_getEvent().getMode() == 0) {
return NULL;
} else if (index == -1) {
return NULL;
@ -987,7 +979,7 @@ char* dEvent_manager_c::getMyNowCutName(int index) {
/* 80047FC8-800480EC 042908 0124+00 2/2 0/0 0/0 .text getMyDataP__16dEvent_manager_cFiPCci */
dEvDtData_c* dEvent_manager_c::getMyDataP(int index, char const* name, int type) {
if (dComIfGp_getEvent().getMode() == 0) {
if (i_dComIfGp_getEvent().getMode() == 0) {
return NULL;
} else if (index == -1) {
return NULL;
@ -1039,7 +1031,7 @@ int dEvent_manager_c::getMySubstanceNum(int index, char const* name) {
*/
#ifdef NONMATCHING
void dEvent_manager_c::cutEnd(int index) {
if (dComIfGp_getEvent().getMode() == 0) {
if (i_dComIfGp_getEvent().getMode() == 0) {
return;
} else if (index == -1) {
return;
@ -1170,8 +1162,8 @@ fopAc_ac_c* dEvent_manager_c::specialCast_Shutter(s16 bsTypeId, int param_1) {
goal.x += cM_ssin(angle) * 100;
goal.z += cM_scos(angle) * 100;
this->setGoal(&goal);
dComIfGp_getEvent().setPt2(shutterActor);
dComIfGp_getEvent().setPtD(shutterActor);
i_dComIfGp_getEvent().setPt2(shutterActor);
i_dComIfGp_getEvent().setPtD(shutterActor);
}
return shutterActor;
}
@ -1198,7 +1190,7 @@ fopAc_ac_c* dEvent_manager_c::specialCast(char const* pName, int param_1) {
shutterActor = specialCast_Shutter(0x22B, param_1);
}
if (shutterActor != NULL) {
dComIfGp_getEvent().onEventFlag(0x10);
i_dComIfGp_getEvent().onEventFlag(0x10);
}
}
@ -1214,7 +1206,7 @@ fopAc_ac_c* dEvent_manager_c::specialCast(char const* pName, int param_1) {
/* 80048748-800487F0 043088 00A8+00 1/1 0/0 0/0 .text dEv_talkman_get_action__Fi */
static int dEv_talkman_get_action(int param_0) {
int staffId = dComIfGp_getEventManager().getMyStaffId("TALKMAN", NULL, -1);
int staffId = i_dComIfGp_getEventManager().getMyStaffId("TALKMAN", NULL, -1);
if (staffId == -1) {
return -1;
} else {
@ -1224,10 +1216,10 @@ static int dEv_talkman_get_action(int param_0) {
"TALK0",
"TALK1",
};
int actIdx = dComIfGp_getEventManager().getMyActIdx(staffId, action_table,
int actIdx = i_dComIfGp_getEventManager().getMyActIdx(staffId, action_table,
ARRAY_SIZE(action_table), 0, 0);
if (actIdx == param_0) {
dComIfGp_getEventManager().cutEnd(staffId);
i_dComIfGp_getEventManager().cutEnd(staffId);
}
return actIdx;
}
@ -1240,7 +1232,7 @@ int dEvent_manager_c::ChkPresentEnd() {
/* 8004882C-8004886C 04316C 0040+00 0/0 2/2 2/2 .text checkStartDemo__16dEvent_manager_cFv */
int dEvent_manager_c::checkStartDemo() {
if (!dComIfGp_getEvent().runCheck()) {
if (!i_dComIfGp_getEvent().runCheck()) {
return 0;
}

View File

@ -222,10 +222,6 @@ void dFile_info_c::screenSet() {
mPlayTime = tboxs[3]->getStringPtr();
}
inline u16 dComIfGs_getLife() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getLife();
}
/* 80192954-80192AA0 18D294 014C+00 0/0 3/3 0/0 .text setSaveData__12dFile_info_cFP10dSv_save_ciUc
*/
int dFile_info_c::setSaveData(dSv_save_c* save, int checksumValid, u8 data_num) {
@ -233,7 +229,7 @@ int dFile_info_c::setSaveData(dSv_save_c* save, int checksumValid, u8 data_num)
char* player_name = save->getPlayer().getPlayerInfo().getLinkName();
if (*player_name == NULL) {
if (field_0x22 == 1 && data_num == dComIfGs_getDataNum()) {
save->getPlayer().getPlayerStatusA().setLife(dComIfGs_getLife());
save->getPlayer().getPlayerStatusA().setLife(i_dComIfGs_getLife());
setHeartCnt(save);
save->getPlayer().getPlayerStatusA().setLife(12);
strcpy(mPlayerName, dComIfGs_getPlayerName());

View File

@ -350,12 +350,6 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
// TODO: Temporarily putting here. There is said to be some issues in `d_com_inf_game.h` which need
// to be sorted out before we can correctly use this function from there.
inline BOOL dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getSavedata().getEvent().isEventBit(id);
}
/* 8019C388-8019C3A4 196CC8 001C+00 2/2 0/0 0/0 .text dKy_WolfPowerup_AmbCol__FP11_GXColorS10 */
static void dKy_WolfPowerup_AmbCol(GXColorS10* in_col_p) {
in_col_p->r = 40;
@ -1528,10 +1522,6 @@ SECTION_SDATA2 static f32 lit_5555 = 150.0f;
/* 80453CC4-80453CC8 0022C4 0004+00 1/1 0/0 0/0 .sdata2 @5556 */
SECTION_SDATA2 static f32 lit_5556 = 195.0f;
inline BOOL dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
/* 8019F4FC-8019F780 199E3C 0284+00 1/1 0/0 0/0 .text setDaytime__18dScnKy_env_light_cFv
*/
// matches with literals
@ -1542,7 +1532,7 @@ void dScnKy_env_light_c::setDaytime() {
if (field_0x12fb == 0) {
if (!dKy_darkworld_check()) {
if (!dComIfGp_event_runCheck()) {
if (!i_dComIfGp_event_runCheck()) {
fopAc_ac_c* ac = dMsgObject_c::getActor();
bool tmp = true;
@ -3350,7 +3340,7 @@ static int dKy_F_SP121Check(char const* stageName, int roomNo, u8* out_darkLv, i
// Prevent twilight if stage depends on Faron Twilight cleared status (Faron Woods, Coro's
// Lantern Shop, Faron Woods Cave) but haven't finished Ordon Day 2.
if (darkworldTbl[tblIndex].darkLv == FARON && !dComIfGs_isEventBit(0x4510)) {
if (darkworldTbl[tblIndex].darkLv == FARON && !i_dComIfGs_isEventBit(0x4510)) {
result = -1;
}

View File

@ -222,11 +222,6 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
// move these later
inline void mDoAud_rainPlay(s32 enable) {
g_mEnvSeMgr.startRainSe(enable, 0);
}
/* 80056AA8-80056AF8 0513E8 0050+00 3/3 0/0 0/0 .text dKyw_setDrawPacketList__FP9J3DPacketi */
static J3DPacket* dKyw_setDrawPacketList(J3DPacket* p_packet, int param_1) {
if (p_packet == NULL) {

View File

@ -265,15 +265,6 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
inline u8 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
return param_0->field_0x09 >> 1 & 0x1f;
}
inline void mDoAud_seStartLevel(u32 sfx_id, const Vec* param_1, u32 param_2, s8 param_3) {
Z2AudioMgr::getInterface()->mSeMgr.seStartLevel(sfx_id, param_1, param_2, param_3, 1.0f, 1.0f,
-1.0f, -1.0f, 0);
}
/* ############################################################################################## */
/* 803BDF78-803BDF84 01B098 000C+00 2/2 0/0 0/0 .data cNullVec__6Z2Calc */
SECTION_DATA static u8 cNullVec__6Z2Calc[12] = {
@ -1675,7 +1666,7 @@ asm void dMenu_save_c::memCardDataLoadWait() {
/* 801F2840-801F28E4 1ED180 00A4+00 2/2 0/0 0/0 .text dataWrite__12dMenu_save_cFv */
void dMenu_save_c::dataWrite() {
int stageNo = dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
int stageNo = i_dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
dComIfGs_putSave(stageNo);
dComIfGs_setMemoryToCard(mSaveBuffer, field_0x54);
@ -1701,7 +1692,7 @@ SECTION_DEAD static char const* const stringBase_80397A06 = "save cmdState %d\n"
// matches with literals
#ifdef NONMATCHING
void dMenu_save_c::memCardDataSaveWait() {
mDoAud_seStartLevel(Z2SE_SY_FILE_SAVE_LEVEL, NULL, 0, 0);
i_mDoAud_seStartLevel(Z2SE_SY_FILE_SAVE_LEVEL, NULL, 0, 0);
if (mWaitTimer != 0) {
mWaitTimer--;

View File

@ -271,10 +271,6 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
inline BOOL dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
BOOL dMw_UP_TRIGGER() {
return (bool)mDoCPd_c::getTrigUp(PAD_1);
}
@ -2343,17 +2339,9 @@ BOOL dMw_c::dMw_isPush_S_Button() {
return false;
}
inline dEvt_control_c& dComIfGp_getEvent() {
return g_dComIfG_gameInfo.play.getEvent();
}
inline u16 dComIfGs_getLife() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getLife();
}
/* 801FCDD8-801FCE08 1F7718 0030+00 1/1 0/0 0/0 .text isPauseReady__5dMw_cFv */
bool dMw_c::isPauseReady() {
if (dComIfGp_getEvent().checkCompulsory() || dComIfGs_getLife() == 0) {
if (i_dComIfGp_getEvent().checkCompulsory() || i_dComIfGs_getLife() == 0) {
return false;
}
return true;
@ -2420,7 +2408,7 @@ bool dMw_c::isEventCheck() {
field_0x148 = 0;
}
if (dComIfGp_event_runCheck()) {
if (i_dComIfGp_event_runCheck()) {
if (!dMsgObject_isTalkNowCheck() &&
(dMeter2Info_getMapStatus() == 4 || dMeter2Info_getMapStatus() == 5 ||
dMeter2Info_getMapStatus() == 7 || dMeter2Info_getMapStatus() == 8 ||

View File

@ -12,10 +12,6 @@
// Declarations:
//
inline int dComIfGs_isItemFirstBit(u8 i_no) {
return g_dComIfG_gameInfo.info.getPlayer().getGetItem().isFirstBit(i_no);
}
/* 801F9AFC-801F9B38 1F443C 003C+00 1/1 0/0 0/0 .text __ct__9dMw_HIO_cFv */
dMw_HIO_c::dMw_HIO_c() {
init();
@ -108,17 +104,17 @@ void dMw_HIO_c::init() {
field_0xea = 0;
for (int i = 0; i < 4; i++) {
bool swordBit = dComIfGs_isItemFirstBit(m_sword_item[i]);
bool swordBit = i_dComIfGs_isItemFirstBit(m_sword_item[i]);
mSwordsCopy[i] = swordBit;
mSwords[i] = swordBit;
}
for (int i = 0; i < 3; i++) {
bool shieldBit = dComIfGs_isItemFirstBit(m_shield_item[i]);
bool shieldBit = i_dComIfGs_isItemFirstBit(m_shield_item[i]);
mShieldsCopy[i] = shieldBit;
mShields[i] = shieldBit;
bool clothesBit = dComIfGs_isItemFirstBit(m_cloth_item[i]);
bool clothesBit = i_dComIfGs_isItemFirstBit(m_cloth_item[i]);
mClothesCopy[i] = clothesBit;
mClothes[i] = clothesBit;
}

View File

@ -261,30 +261,6 @@ SECTION_SDATA2 static u8 lit_4662[4] = {
/* 804549CC-804549D0 002FCC 0004+00 13/13 0/0 0/0 .sdata2 @4663 */
SECTION_SDATA2 static f32 lit_4663 = 1.0f;
inline u16 dComIfGs_getLife() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getLife();
}
inline u16 i_dComIfGs_getRupee() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getRupee();
}
inline u8 dComIfGp_getRStatus() {
return g_dComIfG_gameInfo.play.getRStatus();
}
inline void dComIfGp_setBottleStatus(u8 param_0, u8 param_1) {
g_dComIfG_gameInfo.play.setBottleStatus(param_0, param_1);
}
inline u8 dComIfGp_getDoStatus() {
return g_dComIfG_gameInfo.play.getDoStatus();
}
inline void dMeter2Info_offUseButton(int flag) {
g_meter2_info.offUseButton(flag);
}
/* 8021EA14-8021F128 219354 0714+00 1/1 0/0 0/0 .text _create__9dMeter2_cFv */
// this can be cleaned up with float literals when everything else is decompiled
int dMeter2_c::_create() {
@ -342,7 +318,7 @@ int dMeter2_c::_create() {
field_0x1ed = 0;
field_0x1ee = 0;
mNowLifeGauge = dComIfGs_getLife();
mNowLifeGauge = i_dComIfGs_getLife();
dComIfGp_setItemNowLife((u8)mNowLifeGauge);
mMaxLife = dComIfGs_getMaxLife();
@ -372,7 +348,7 @@ int dMeter2_c::_create() {
mRupeeNum = i_dComIfGs_getRupee();
mKeyNum = dComIfGs_getKeyNum();
mDoStatus = dComIfGp_getDoStatus();
mDoStatus = i_dComIfGp_getDoStatus();
mDoSetFlag = dComIfGp_isDoSetFlag(2);
int i = 0;
@ -406,7 +382,7 @@ int dMeter2_c::_create() {
field_0x201 = 0;
mCollectSmell = dComIfGs_getCollectSmell();
mRStatus = dComIfGp_getRStatus();
mRStatus = i_dComIfGp_getRStatus();
mRSetFlag = dComIfGp_isRSetFlag(2);
mXSetFlag = dComIfGp_isXSetFlag(2);
mYSetFlag = dComIfGp_isYSetFlag(2);
@ -511,23 +487,15 @@ int dMeter2_c::_create() {
return 4;
}
inline BOOL dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getSavedata().getEvent().isEventBit(id);
}
inline BOOL dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
/* 8021F128-8021F370 219A68 0248+00 1/1 0/0 0/0 .text _execute__9dMeter2_cFv */
int dMeter2_c::_execute() {
JKRHeap* heap = mDoExt_setCurrentHeap(mpHeap);
if (!dComIfGs_isCollectMirror(0) && dComIfGs_isEventBit(0x5420)) {
if (!dComIfGs_isCollectMirror(0) && i_dComIfGs_isEventBit(0x5420)) {
dComIfGs_onCollectMirror(0);
}
if (!dComIfGs_isCollectCrystal(3) && dComIfGs_isEventBit(0x5410)) {
if (!dComIfGs_isCollectCrystal(3) && i_dComIfGs_isEventBit(0x5410)) {
dComIfGs_onCollectCrystal(3);
}
@ -564,18 +532,18 @@ int dMeter2_c::_execute() {
moveSubContents();
move2DContents();
if (!dComIfGp_isPauseFlag() && !dComIfGp_event_runCheck()) {
if (!dComIfGp_isPauseFlag() && !i_dComIfGp_event_runCheck()) {
dMeter2Info_decHotSpringTimer();
}
dMeter2Info_allUseButton();
dMeter2Info_offUseButton(0x800);
i_dMeter2Info_offUseButton(0x800);
dMeter2Info_resetGameStatus();
dComIfGp_setNunStatus(0, 0, 0);
dComIfGp_setRemoConStatus(0, 0, 0);
dComIfGp_setNunZStatus(0, 0);
dComIfGp_setNunCStatus(0, 0);
dComIfGp_setBottleStatus(0, 0);
i_dComIfGp_setBottleStatus(0, 0);
dComIfGp_setCStickStatus(0, 0, 0);
mDoExt_setCurrentHeap(heap);
@ -703,10 +671,6 @@ int dMeter2_c::emphasisButtonDelete() {
return 1;
}
inline void i_dComIfGp_setItemLifeCount(f32 amount, u8 type) {
g_dComIfG_gameInfo.play.setItemLifeCount(amount, type);
}
/* 8021F780-8021F7B0 21A0C0 0030+00 0/0 0/0 1/1 .text setLifeZero__9dMeter2_cFv */
void dMeter2_c::setLifeZero() {
dComIfGs_setLife(1);
@ -747,18 +711,6 @@ SECTION_SDATA2 static f64 lit_5267 = 4503601774854144.0 /* cast s32 to float */;
/* 804549E0-804549E8 002FE0 0008+00 2/2 0/0 0/0 .sdata2 @5268 */
SECTION_SDATA2 static f64 lit_5268 = 4503599627370496.0 /* cast u32 to float */;
inline bool i_dComIfGp_checkPlayerStatus1(int param_0, u32 flag) {
return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 1, flag);
}
inline bool dComIfGp_checkPlayerStatus0(int param_0, u32 param_1) {
return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 0, param_1);
}
inline void dComIfGp_setItemLifeCount(float amount, u8 type) {
g_dComIfG_gameInfo.play.setItemLifeCount(amount, type);
}
/* 8021FD60-80220180 21A6A0 0420+00 1/1 0/0 0/0 .text moveLife__9dMeter2_cFv */
// small type issue
#ifdef NONMATCHING
@ -779,8 +731,8 @@ void dMeter2_c::moveLife() {
life_count = (max_count / 5) * 4;
dComIfGs_setMaxLife(max_count);
s16 current_life = life_count - dComIfGs_getLife();
dComIfGp_setItemLifeCount(current_life, 0);
s16 current_life = life_count - i_dComIfGs_getLife();
i_dComIfGp_setItemLifeCount(current_life, 0);
dComIfGp_clearItemMaxLifeCount();
setDraw = true;
}
@ -792,7 +744,7 @@ void dMeter2_c::moveLife() {
life_count = (dComIfGs_getMaxLife() / 5) * 4;
}
s16 tmp = dComIfGs_getLife() + dComIfGp_getItemLifeCount();
s16 tmp = i_dComIfGs_getLife() + dComIfGp_getItemLifeCount();
if (tmp > life_count) {
tmp = life_count;
} else if (tmp < 0) {
@ -821,12 +773,12 @@ void dMeter2_c::moveLife() {
}
}
u16 current_life = dComIfGs_getLife();
u16 current_life = i_dComIfGs_getLife();
if (mNowLifeGauge != current_life) {
if (mNowLifeGauge < current_life) {
mNowLifeGauge++;
if (i_dComIfGp_checkPlayerStatus1(0, 0x2000) ||
dComIfGp_checkPlayerStatus0(0, 0x20000000) || dMeter2Info_getLifeGaugeSE()) {
i_dComIfGp_checkPlayerStatus0(0, 0x20000000) || dMeter2Info_getLifeGaugeSE()) {
if (mNowLifeGauge % 4 == 0) {
mDoAud_seStart(Z2SE_HP_GAUGE_INC, 0, 0, 0);
}
@ -836,7 +788,7 @@ void dMeter2_c::moveLife() {
}
}
u16 life = dComIfGs_getLife();
u16 life = i_dComIfGs_getLife();
if (mNowLifeGauge == life && field_0x1ee != 0) {
field_0x1ee = 0;
}
@ -1351,13 +1303,6 @@ asm void dMeter2_c::alphaAnimeButtonCross() {
}
#pragma pop
inline u16 dComIfGp_event_checkHind(u16 flag) {
if (!dComIfGp_event_runCheck()) {
return false;
}
return g_dComIfG_gameInfo.play.getEvent().checkHind(flag);
}
/* 802256DC-802258A0 22001C 01C4+00 3/3 0/0 0/0 .text isShowLightDrop__9dMeter2_cFv */
bool dMeter2_c::isShowLightDrop() {
if (!g_drawHIO.mLightDrop.mAnimDebug) {

View File

@ -212,10 +212,6 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
inline bool dComIfGp_checkPlayerStatus0(int param_0, u32 param_1) {
return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 0, param_1);
}
/* ############################################################################################## */
/* 80398258-80398280 0248B8 0028+00 4/4 0/0 0/0 .rodata a_tag$3949 */
static u64 const a_tag[5] = {
@ -2474,7 +2470,7 @@ asm void dMeter2Draw_c::getItemSubject() {
/* 8021BCAC-8021BCC0 2165EC 0014+00 0/0 1/1 0/0 .text getPlayerSubject__13dMeter2Draw_cFv
*/
bool dMeter2Draw_c::getPlayerSubject() {
return dComIfGp_checkPlayerStatus0(0, 0x8000000);
return i_dComIfGp_checkPlayerStatus0(0, 0x8000000);
}
/* 8021BCC0-8021BDD0 216600 0110+00 2/2 2/2 0/0 .text isBButtonShow__13dMeter2Draw_cFb */

View File

@ -132,18 +132,6 @@ extern "C" void* item_resource__10dItem_data[1530];
// Declarations:
//
inline BOOL dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getSavedata().getEvent().isEventBit(id);
}
inline s8 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
return param_0->field_0x09 >> 1 & 0x1f;
}
inline BOOL dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
/* ############################################################################################## */
/* 80399168-80399168 0257C8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
@ -306,7 +294,7 @@ asm void dMeter2Info_c::init() {
/* 8021C0E0-8021C11C 216A20 003C+00 0/0 1/1 2/2 .text setFloatingMessage__13dMeter2Info_cFUssb */
int dMeter2Info_c::setFloatingMessage(u16 msgID, s16 msgTimer, bool wakuVisible) {
if (dComIfGp_event_runCheck()) {
if (i_dComIfGp_event_runCheck()) {
return 0;
}
@ -319,7 +307,7 @@ int dMeter2Info_c::setFloatingMessage(u16 msgID, s16 msgTimer, bool wakuVisible)
/* 8021C11C-8021C1DC 216A5C 00C0+00 0/0 0/0 1/1 .text setFloatingFlow__13dMeter2Info_cFUssb */
int dMeter2Info_c::setFloatingFlow(u16 flowID, s16 msgTimer, bool wakuVisible) {
if (dComIfGp_event_runCheck()) {
if (i_dComIfGp_event_runCheck()) {
return 0;
}
@ -567,7 +555,7 @@ void dMeter2Info_c::warpInProc() {
/* 8021CA70-8021CC00 2173B0 0190+00 0/0 1/1 0/0 .text warpOutProc__13dMeter2Info_cFv */
void dMeter2Info_c::warpOutProc() {
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
s8 saveTbl = dStage_stagInfo_GetSaveTbl(stag_info);
s32 saveTbl = i_dStage_stagInfo_GetSaveTbl(stag_info);
dComIfGs_setLastWarpAcceptStage(saveTbl);
cXyz warpPos(dComIfGs_getRestartRoomPos());
@ -1543,7 +1531,7 @@ u8 dMeter2Info_getNewLetterNum() {
for (int i = 0; i < 0x40; i++) {
if (!dComIfGs_isLetterGetFlag(i) && dMenu_Letter::getLetterName(i) != 0) {
u16 letterEvent = dMenu_Letter::getLetterEventFlag(i);
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[letterEvent])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[letterEvent])) {
letterNum++;
}
}
@ -1561,7 +1549,7 @@ int dMeter2Info_setNewLetterSender() {
for (int i = 0; i < 0x40; i++) {
if (!dComIfGs_isLetterGetFlag(i) && dMenu_Letter::getLetterName(i) != 0) {
u16 letterEvent = dMenu_Letter::getLetterEventFlag(i);
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[letterEvent])) {
if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[letterEvent])) {
if (check == 0) {
u16 letterName = dMenu_Letter::getLetterName(i);
dMsgObject_c::setLetterNameID(letterName);

View File

@ -87,33 +87,10 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
inline BOOL dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
inline u16 dComIfGp_event_checkHind(u16 flag) {
if (!dComIfGp_event_runCheck()) {
return false;
}
return g_dComIfG_gameInfo.play.getEvent().checkHind(flag);
}
inline u16 dComIfGp_event_chkEventFlag(u16 flag) {
return g_dComIfG_gameInfo.play.getEvent().chkEventFlag(flag);
}
inline dStage_stageDt_c* dComIfGp_getStage() {
return &g_dComIfG_gameInfo.play.getStage();
}
inline BOOL dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getEvent().isEventBit(id);
}
/* 8020D49C-8020D528 207DDC 008C+00 1/1 0/0 0/0 .text isEnableDispMap__11dMeterMap_cFv */
bool dMeterMap_c::isEnableDispMap() {
bool minimapEnable = false;
stage_stag_info_class* pstag = dComIfGp_getStage()->getStagInfo();
stage_stag_info_class* pstag = i_dComIfGp_getStage()->getStagInfo();
if (pstag != NULL && getMapDispSizeTypeNo() != 0) {
minimapEnable = dStage_stagInfo_GetMiniMap(pstag) != 0;
@ -139,8 +116,8 @@ int dMeterMap_c::getMapDispSizeTypeNo() {
uvar6 = dStage_FileList_dt_getMiniMap(fList);
}
u32 stageMapSizeTypeNo = dStage_stagInfo_GetMiniMap(dComIfGp_getStage()->getStagInfo());
s32 mapDispType = dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo());
u32 stageMapSizeTypeNo = dStage_stagInfo_GetMiniMap(i_dComIfGp_getStage()->getStagInfo());
s32 mapDispType = dStage_stagInfo_GetUpButton(i_dComIfGp_getStage()->getStagInfo());
if (mapDispType == 1) {
uvar6 = 1;
@ -206,13 +183,13 @@ f32 dMeterMap_c::getMapDispEdgeBottomY_Layout() {
// missing gameinfo load
#ifdef NONMATCHING
bool dMeterMap_c::isEventRunCheck() {
if (dComIfGp_event_runCheck()) {
if (i_dComIfGp_event_runCheck()) {
return true;
} else if (dMsgObject_isTalkNowCheck()) {
return true;
}
return dComIfGp_event_runCheck() != field_0x30 ? 1 : 0;
return i_dComIfGp_event_runCheck() != field_0x30 ? 1 : 0;
}
#else
#pragma push
@ -345,7 +322,7 @@ void dMeterMap_c::setMapAlpha(u8 alpha) {
/* 8020D900-8020D948 208240 0048+00 3/3 1/1 0/0 .text isMapOpenCheck__11dMeterMap_cFv */
bool dMeterMap_c::isMapOpenCheck() {
return dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 7 ? false : true;
return dStage_stagInfo_GetUpButton(i_dComIfGp_getStage()->getStagInfo()) == 7 ? false : true;
}
/* ############################################################################################## */
@ -454,7 +431,7 @@ void dMeterMap_c::_create(J2DScreen* param_0) {
field_0x2e = 0;
field_0x28 = 0;
field_0x30 = 0;
field_0x2b = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118]);
field_0x2b = i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118]);
}
#else
#pragma push
@ -497,11 +474,11 @@ SECTION_DEAD static char const* const stringBase_80398208 = "F_SP115";
// just regalloc
#ifdef NONMATCHING
void dMeterMap_c::_move(u32 param_0) {
if (!field_0x2b && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118])) {
if (!field_0x2b && i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118])) {
if (strcmp(dComIfGp_getStartStageName(), "F_SP115") == 0) {
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[119]);
} else {
field_0x2b = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118]);
field_0x2b = i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118]);
dMeter2Info_setPauseStatus(2);
}
}
@ -531,7 +508,7 @@ void dMeterMap_c::_move(u32 param_0) {
field_0x1c = getMapDispEdgeBottomY_Layout() - mSizeH;
mMap->_move(map_pos.x, map_pos.z, stayNo, map_pos.y);
field_0x30 = dComIfGp_event_runCheck();
field_0x30 = i_dComIfGp_event_runCheck();
}
#else
#pragma push
@ -705,7 +682,7 @@ asm u8 dMeterMap_c::checkMoveStatus() {
bool dMeterMap_c::isShow(u32 param_0) {
if ((param_0 & 0x4000) || fopOvlpM_IsDoingReq() ||
((param_0 & 0x40) && dComIfGp_event_checkHind(0x100) &&
!dComIfGp_event_chkEventFlag(0x40)) ||
!i_dComIfGp_event_chkEventFlag(0x40)) ||
daPy_getPlayerActorClass()->i_getSumouMode() || (param_0 & 0x200000) || (param_0 & 0x100) ||
(param_0 & 0x80) || (param_0 & 0x40000000) || (param_0 & 0x1000) || (param_0 & 0x100000) ||
(param_0 & 0x20000) || (param_0 & 8) || (param_0 & 0x10) || (param_0 & 0x1000000) ||
@ -729,11 +706,11 @@ asm bool dMeterMap_c::isShow(u32 param_0) {
/* 8020E620-8020E70C 208F60 00EC+00 3/3 0/0 0/0 .text isFmapScreen__11dMeterMap_cFv */
bool dMeterMap_c::isFmapScreen() {
if (dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 0 ||
dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 5 ||
dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 3 ||
dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 4 ||
dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 6) {
if (dStage_stagInfo_GetUpButton(i_dComIfGp_getStage()->getStagInfo()) == 0 ||
dStage_stagInfo_GetUpButton(i_dComIfGp_getStage()->getStagInfo()) == 5 ||
dStage_stagInfo_GetUpButton(i_dComIfGp_getStage()->getStagInfo()) == 3 ||
dStage_stagInfo_GetUpButton(i_dComIfGp_getStage()->getStagInfo()) == 4 ||
dStage_stagInfo_GetUpButton(i_dComIfGp_getStage()->getStagInfo()) == 6) {
return true;
}
return false;
@ -741,7 +718,7 @@ bool dMeterMap_c::isFmapScreen() {
/* 8020E70C-8020E754 20904C 0048+00 3/3 0/0 0/0 .text isDmapScreen__11dMeterMap_cFv */
bool dMeterMap_c::isDmapScreen() {
return dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 1 ? 1 : 0;
return dStage_stagInfo_GetUpButton(i_dComIfGp_getStage()->getStagInfo()) == 1 ? 1 : 0;
}
/* 8020E754-8020E9CC 209094 0278+00 0/0 1/1 0/0 .text meter_map_move__11dMeterMap_cFUl */
@ -759,7 +736,7 @@ void dMeterMap_c::meter_map_move(u32 param_0) {
}
dMeter2Info_resetPauseStatus();
} else {
if (dMw_LEFT_TRIGGER() && !dComIfGp_event_runCheck() && !dMsgObject_isTalkNowCheck() &&
if (dMw_LEFT_TRIGGER() && !i_dComIfGp_event_runCheck() && !dMsgObject_isTalkNowCheck() &&
(dMeter2Info_getMapStatus() == 0 || dMeter2Info_getMapStatus() == 1)) {
if (dMeter2Info_getMapStatus() == 0 && !dMeter2Info_isSub2DStatus(1)) {
if (isFmapScreen() || isDmapScreen()) {
@ -770,7 +747,7 @@ void dMeterMap_c::meter_map_move(u32 param_0) {
dMeter2Info_set2DVibration();
}
}
} else if (dMw_RIGHT_TRIGGER() && !dComIfGp_event_runCheck() &&
} else if (dMw_RIGHT_TRIGGER() && !i_dComIfGp_event_runCheck() &&
!dMsgObject_isTalkNowCheck() &&
(dMeter2Info_getMapStatus() == 0 || dMeter2Info_getMapStatus() == 1)) {
if (!dMeter2Info_isSub2DStatus(1)) {

View File

@ -266,14 +266,6 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
// Declarations:
//
inline void dComIfGp_setItemRupeeCount(s32 amount) {
g_dComIfG_gameInfo.play.setItemRupeeCount(amount);
}
inline void dComIfGp_setItemLifeCount(float amount, u8 type) {
g_dComIfG_gameInfo.play.setItemLifeCount(amount, type);
}
/* ############################################################################################## */
/* 803C14B8-803C14C4 01E5D8 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
SECTION_DATA static u8 cNullVec__6Z2Calc[12] = {
@ -888,15 +880,11 @@ int dMsgFlow_c::getParam(u8* params) {
return *(int*)params;
}
inline BOOL dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getSavedata().getEvent().isEventBit(id);
}
/* 8024B138-8024B180 245A78 0048+00 1/0 0/0 0/0 .text
* query001__10dMsgFlow_cFP21mesg_flow_node_branchP10fopAc_ac_ci */
int dMsgFlow_c::query001(mesg_flow_node_branch* flow_node, fopAc_ac_c*, int) {
u16 prm0 = *(u16*)flow_node->params & 0xFFFF;
return dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[prm0]) == false;
return i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[prm0]) == false;
}
BOOL daPy_py_c::checkNowWolf() {
@ -938,10 +926,6 @@ asm int dMsgFlow_c::query003(mesg_flow_node_branch* param_0, fopAc_ac_c* param_1
#pragma pop
#endif
inline u16 dComIfGs_getRupee() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getRupee();
}
/* 8024B250-8024B2C0 245B90 0070+00 1/0 0/0 0/0 .text
* query004__10dMsgFlow_cFP21mesg_flow_node_branchP10fopAc_ac_ci */
#pragma push
@ -1485,16 +1469,12 @@ int dMsgFlow_c::query051(mesg_flow_node_branch*, fopAc_ac_c*, int) {
return ret;
}
inline bool dComIfGp_checkPlayerStatus0(int param_0, u32 param_1) {
return g_dComIfG_gameInfo.play.checkPlayerStatus(param_0, 0, param_1);
}
/* 8024C3A0-8024C3D4 246CE0 0034+00 1/0 0/0 0/0 .text
* query052__10dMsgFlow_cFP21mesg_flow_node_branchP10fopAc_ac_ci */
int dMsgFlow_c::query052(mesg_flow_node_branch*, fopAc_ac_c*, int) {
bool phi_r4 = false;
if (daPy_getPlayerActorClass()->checkWaterInMove() ||
dComIfGp_checkPlayerStatus0(0, 0x100000)) {
i_dComIfGp_checkPlayerStatus0(0, 0x100000)) {
phi_r4 = true;
}
@ -1549,7 +1529,7 @@ int dMsgFlow_c::event001(mesg_flow_node_event* flow_node, fopAc_ac_c*) {
int dMsgFlow_c::event002(mesg_flow_node_event* flow_node, fopAc_ac_c*) {
int prm0 = getParam(flow_node->params);
dComIfGp_setItemRupeeCount(prm0);
i_dComIfGp_setItemRupeeCount(prm0);
return 1;
}
@ -1558,7 +1538,7 @@ int dMsgFlow_c::event002(mesg_flow_node_event* flow_node, fopAc_ac_c*) {
int dMsgFlow_c::event003(mesg_flow_node_event* flow_node, fopAc_ac_c*) {
int prm0 = getParam(flow_node->params);
dComIfGp_setItemRupeeCount(-prm0);
i_dComIfGp_setItemRupeeCount(-prm0);
return 1;
}
@ -1573,7 +1553,7 @@ SECTION_SDATA2 static f64 lit_6040 = 4503601774854144.0 /* cast s32 to float */;
int dMsgFlow_c::event004(mesg_flow_node_event* flow_node, fopAc_ac_c*) {
f32 prm0 = getParam(flow_node->params);
dComIfGp_setItemLifeCount(prm0, 0);
i_dComIfGp_setItemLifeCount(prm0, 0);
return 1;
}
#else
@ -1593,7 +1573,7 @@ asm int dMsgFlow_c::event004(mesg_flow_node_event* param_0, fopAc_ac_c* param_1)
int dMsgFlow_c::event005(mesg_flow_node_event* flow_node, fopAc_ac_c*) {
f32 prm0 = getParam(flow_node->params);
dComIfGp_setItemLifeCount(-prm0, 0);
i_dComIfGp_setItemLifeCount(-prm0, 0);
return 1;
}
#else
@ -2097,7 +2077,7 @@ int dMsgFlow_c::event028(mesg_flow_node_event* param_0, fopAc_ac_c* param_1) {
u8 bagID = dMsgObject_c::getSelectBombBagID();
s16 bombPrice = dMsgObject_c::getSelectBombPrice();
dComIfGp_setItemRupeeCount(bombPrice);
i_dComIfGp_setItemRupeeCount(bombPrice);
dComIfGs_setBombNum(bagID, 0);
if (dComIfGs_getItem((u8)(SLOT_15 + bagID), true) != BOMB_ARROW) {

View File

@ -932,16 +932,12 @@ asm void dMsgObject_c::isSend() {
}
#pragma pop
inline dStage_stageDt_c* dComIfGp_getStage() {
return &g_dComIfG_gameInfo.play.getStage();
}
/* 80236BF8-80236C90 231538 0098+00 1/1 0/0 0/0 .text
* readMessageGroupLocal__12dMsgObject_cFPP25mDoDvdThd_mountXArchive_c */
void dMsgObject_c::readMessageGroupLocal(mDoDvdThd_mountXArchive_c** p_arcMount) {
static char arcName[22];
int msgGroup = dStage_stagInfo_GetMsgGroup(dComIfGp_getStage()->getStagInfo());
int msgGroup = dStage_stagInfo_GetMsgGroup(i_dComIfGp_getStage()->getStagInfo());
sprintf(arcName, "/res/Msgus/bmgres%d.arc", msgGroup);
*p_arcMount = mDoDvdThd_mountXArchive_c::create(arcName, 0, JKRArchive::MOUNT_MEM, NULL);

View File

@ -207,10 +207,6 @@ extern "C" u8 sCallbackArg__Q210JUTGamePad13C3ButtonReset[4 + 4 /* padding */];
// Declarations:
//
inline dEvt_control_c& dComIfGp_getEvent() {
return g_dComIfG_gameInfo.play.getEvent();
}
/* ############################################################################################## */
/* 804510F8-80451100 0005F8 0008+00 2/2 0/0 0/0 .sbss resPhase */
static request_of_phase_process_class resPhase;
@ -485,7 +481,7 @@ static int dScnPly_Execute(dScnPly_c* scnPly) {
dKy_itudemo_se();
if (!dComIfGp_isPauseFlag()) {
dDemo_c::update();
dComIfGp_getEvent().Step();
i_dComIfGp_getEvent().Step();
dComIfGp_getAttention().Run();
}
return 1;
@ -774,10 +770,6 @@ static int phase_1_0(dScnPly_c* param_0) {
}
}
inline dStage_stageDt_c* dComIfGp_getStage() {
return &g_dComIfG_gameInfo.play.getStage();
}
/* 8025A4F8-8025A5D4 254E38 00DC+00 1/0 0/0 0/0 .text phase_2__FP9dScnPly_c */
// extra mr
#ifdef NONMATCHING
@ -787,11 +779,11 @@ static int phase_2(dScnPly_c* scn) {
return 0;
}
int layer = dComIfG_play_c::getLayerNo(0);
stage_stag_info_class* stag_info = dComIfGp_getStage()->getStagInfo();
stage_stag_info_class* stag_info = i_dComIfGp_getStage()->getStagInfo();
u8 particle_no = dStage_stagInfo_GetParticleNo(stag_info, layer);
if (particle_no == 255) {
particle_no = dStage_stagInfo_GetParticleNo(dComIfGp_getStage()->getStagInfo());
particle_no = dStage_stagInfo_GetParticleNo(i_dComIfGp_getStage()->getStagInfo());
}
dComIfGp_particle_readScene(particle_no, &scn->sceneCommand);

View File

@ -220,14 +220,6 @@ extern "C" u8 sRumbleSupported__10JUTGamePad[4];
// Declarations:
//
inline int dComIfGs_isItemFirstBit(u8 i_no) {
return g_dComIfG_gameInfo.info.getPlayer().getGetItem().isFirstBit(i_no);
}
inline BOOL dComIfGs_isEventBit(u16 id) {
return g_dComIfG_gameInfo.info.getSavedata().getEvent().isEventBit(id);
}
static u8 dSv_item_rename(u8 i_itemNo) {
switch (i_itemNo) {
case OIL_BOTTLE_2:
@ -318,7 +310,7 @@ u16 dSv_player_status_a_c::getRupeeMax() const {
BOOL dSv_player_status_a_c::isMagicFlag(u8 i_magic) const {
if (i_magic == 0) {
return dComIfGs_isEventBit(0x2304); // Magic Unlocked
return i_dComIfGs_isEventBit(0x2304); // Magic Unlocked
}
return (mMagicFlag & (u8)(1 << i_magic)) ? TRUE : FALSE;
}
@ -760,8 +752,8 @@ u16 dSv_event_flag_c::saveBitLabels[822] = {
BOOL dSv_player_item_c::checkInsectBottle() {
for (int i = 0; i < 24; i++) {
if (dComIfGs_isItemFirstBit(M_BEETLE + i) &&
!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x191 + i])) {
if (i_dComIfGs_isItemFirstBit(M_BEETLE + i) &&
!i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x191 + i])) {
return TRUE;
}
}
@ -902,17 +894,17 @@ void dSv_player_item_c::setRodTypeLevelUp() {
void dSv_player_item_c::setBaitItem(u8 i_itemNo) {
switch (i_itemNo) {
case BEE_CHILD: {
dComIfGs_isItemFirstBit(ZORAS_JEWEL) ? mItems[SLOT_20] = JEWEL_BEE_ROD :
i_dComIfGs_isItemFirstBit(ZORAS_JEWEL) ? mItems[SLOT_20] = JEWEL_BEE_ROD :
mItems[SLOT_20] = BEE_ROD;
break;
}
case WORM: {
dComIfGs_isItemFirstBit(ZORAS_JEWEL) ? mItems[SLOT_20] = JEWEL_WORM_ROD :
i_dComIfGs_isItemFirstBit(ZORAS_JEWEL) ? mItems[SLOT_20] = JEWEL_WORM_ROD :
mItems[SLOT_20] = WORM_ROD;
break;
}
case NO_ITEM: {
dComIfGs_isItemFirstBit(ZORAS_JEWEL) ? mItems[SLOT_20] = JEWEL_ROD :
i_dComIfGs_isItemFirstBit(ZORAS_JEWEL) ? mItems[SLOT_20] = JEWEL_ROD :
mItems[SLOT_20] = FISHING_ROD_1;
break;
}
@ -1042,7 +1034,7 @@ void dSv_player_item_max_c::setBombNum(u8 bomb_id, u8 bomb_max) {
u8 dSv_player_item_max_c::getBombNum(u8 bombId) const {
u8 lv_multiplier = 1;
if (dComIfGs_isItemFirstBit(BOMB_BAG_LV2)) {
if (i_dComIfGs_isItemFirstBit(BOMB_BAG_LV2)) {
lv_multiplier = 2;
}
@ -1783,15 +1775,15 @@ int dSv_info_c::memory_to_card(char* card_ptr, int dataNum) {
bool phi_r30 = false;
u16 current_lantern_oil = 0;
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[226])) {
lantern_stolen = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[224]);
lantern_dropped = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[225]);
if (!i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[226])) {
lantern_stolen = i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[224]);
lantern_dropped = i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[225]);
dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[224]);
dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[225]);
lantern_not_recovered = true;
}
if (dComIfGs_isItemFirstBit(KANTERA) && dComIfGs_getItem(SLOT_1, 1) == NO_ITEM) {
if (i_dComIfGs_isItemFirstBit(KANTERA) && dComIfGs_getItem(SLOT_1, 1) == NO_ITEM) {
dComIfGs_setItem(SLOT_1, KANTERA);
current_lantern_oil = dComIfGs_getOil();
dComIfGs_setOil(dMeter2Info_getOilGaugeBackUp());

View File

@ -6,6 +6,7 @@
#include "d/shop/d_shop_item_ctrl.h"
#include "dol2asm.h"
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
//
// Forward References:

View File

@ -732,26 +732,6 @@ bool fopAcM_addAngleY(fopAc_ac_c* p_actor, s16 target, s16 step) {
return cLib_chaseAngleS(&fopAcM_GetAngle_p(p_actor).y, target, step);
}
inline f32 fopAcM_GetSpeedF(const fopAc_ac_c* p_actor) {
return p_actor->mSpeedF;
}
inline f32 fopAcM_GetGravity(const fopAc_ac_c* p_actor) {
return p_actor->mGravity;
}
inline f32 fopAcM_GetMaxFallSpeed(const fopAc_ac_c* p_actor) {
return p_actor->mMaxFallSpeed;
}
inline const cXyz& fopAcM_GetSpeed_p(const fopAc_ac_c* p_actor) {
return p_actor->mSpeed;
}
inline const cXyz& fopAcM_GetPosition_p(const fopAc_ac_c* p_actor) {
return p_actor->mCurrent.mPosition;
}
inline void clampMin(f32& val, f32 min) {
if (val < min) {
val = min;
@ -924,22 +904,6 @@ BOOL daPy_py_c::checkNowWolf() {
return dComIfGp_getLinkPlayer()->i_checkWolf();
}
inline f32 fopAcM_searchActorDistanceY(const fopAc_ac_c* actorA, const fopAc_ac_c* actorB) {
return actorB->mCurrent.mPosition.y - actorA->mCurrent.mPosition.y;
}
inline s16 fopAcM_searchPlayerAngleY(const fopAc_ac_c* actor) {
return fopAcM_searchActorAngleY(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
inline f32 fopAcM_searchPlayerDistanceY(const fopAc_ac_c* actor) {
return fopAcM_searchActorDistanceY(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
inline f32 fopAcM_searchPlayerDistanceXZ2(const fopAc_ac_c* actor) {
return fopAcM_searchActorDistanceXZ2(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
}
/* 8001AAE0-8001AC40 015420 0160+00 0/0 0/0 2/2 .text
* fopAcM_rollPlayerCrash__FPC10fopAc_ac_cfUlffif */
s32 fopAcM_rollPlayerCrash(fopAc_ac_c const* actor, f32 param_1, u32 param_2, f32 param_3,
@ -1032,14 +996,10 @@ void* event_second_actor(u16) {
return dComIfGp_getPlayer(0);
}
inline dEvt_control_c& dComIfGp_getEvent() {
return g_dComIfG_gameInfo.play.getEvent();
}
/* 8001B068-8001B0FC 0159A8 0094+00 0/0 3/3 0/0 .text
* fopAcM_orderTalkEvent__FP10fopAc_ac_cP10fopAc_ac_cUsUs */
s32 fopAcM_orderTalkEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, u16 flag) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actorA))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) {
return 0;
}
@ -1054,7 +1014,7 @@ s32 fopAcM_orderTalkEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority,
* fopAcM_orderTalkItemBtnEvent__FUsP10fopAc_ac_cP10fopAc_ac_cUsUs */
s32 fopAcM_orderTalkItemBtnEvent(u16 eventType, fopAc_ac_c* actorA, fopAc_ac_c* actorB,
u16 priority, u16 flag) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actorA))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) {
return 0;
}
@ -1070,7 +1030,7 @@ s32 fopAcM_orderTalkItemBtnEvent(u16 eventType, fopAc_ac_c* actorA, fopAc_ac_c*
// wrong load order
#ifdef NONMATCHING
s32 fopAcM_orderSpeakEvent(fopAc_ac_c* actor, u16 priority, u16 flag) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actor))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) {
return 0;
}
@ -1091,14 +1051,10 @@ asm s32 fopAcM_orderSpeakEvent(fopAc_ac_c* param_0, u16 param_1, u16 param_2) {
#pragma pop
#endif
inline dEvent_manager_c& dComIfGp_getEventManager() {
return g_dComIfG_gameInfo.play.getEvtManager();
}
/* 8001B244-8001B334 015B84 00F0+00 0/0 2/2 0/0 .text
* fopAcM_orderDoorEvent__FP10fopAc_ac_cP10fopAc_ac_cUsUs */
s32 fopAcM_orderDoorEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, u16 flag) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actorA))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) {
return 0;
}
@ -1110,7 +1066,7 @@ s32 fopAcM_orderDoorEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority,
u8 toolID = actorB->mEvtInfo.getMapToolId();
if (fopAcM_GetProfName(actorB) == 0x55 && toolID != 0xFF) {
eventID = dComIfGp_getEventManager().getEventIdx(actorA, NULL, toolID);
eventID = i_dComIfGp_getEventManager().getEventIdx(actorA, NULL, toolID);
}
return dComIfGp_event_order(1, priority, flag, -1, actorA, actorB, eventID, toolID);
@ -1119,7 +1075,7 @@ s32 fopAcM_orderDoorEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority,
/* 8001B334-8001B3CC 015C74 0098+00 0/0 1/1 0/0 .text
* fopAcM_orderCatchEvent__FP10fopAc_ac_cP10fopAc_ac_cUsUs */
s32 fopAcM_orderCatchEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, u16 flag) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actorA))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) {
return 0;
}
@ -1134,16 +1090,16 @@ s32 fopAcM_orderCatchEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority,
* fopAcM_orderOtherEvent__FP10fopAc_ac_cPCcUsUsUs */
s32 fopAcM_orderOtherEvent(fopAc_ac_c* actor, char const* param_1, u16 param_2, u16 flag,
u16 priority) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actor))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) {
return 0;
}
s16 eventIdx = dComIfGp_getEventManager().getEventIdx(actor, param_1, -1);
s16 eventIdx = i_dComIfGp_getEventManager().getEventIdx(actor, param_1, -1);
if (eventIdx < 0) {
return 0;
}
u16 eventPrio = dComIfGp_getEventManager().getEventPrio(actor, eventIdx);
u16 eventPrio = i_dComIfGp_getEventManager().getEventPrio(actor, eventIdx);
if (eventPrio == 0) {
eventPrio = 0xFF;
}
@ -1159,16 +1115,16 @@ s32 fopAcM_orderOtherEvent(fopAc_ac_c* actor, char const* param_1, u16 param_2,
* fopAcM_orderOtherEvent__FP10fopAc_ac_cP10fopAc_ac_cPCcUsUsUs */
s32 fopAcM_orderOtherEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, char const* param_2,
u16 param_3, u16 flag, u16 priority) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actorA))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) {
return 0;
}
s16 eventIdx = dComIfGp_getEventManager().getEventIdx(actorA, param_2, -1);
s16 eventIdx = i_dComIfGp_getEventManager().getEventIdx(actorA, param_2, -1);
if (eventIdx < 0) {
return 0;
}
u16 eventPrio = dComIfGp_getEventManager().getEventPrio(actorA, eventIdx);
u16 eventPrio = i_dComIfGp_getEventManager().getEventPrio(actorA, eventIdx);
if (eventPrio == 0) {
eventPrio = 0xFF;
}
@ -1183,7 +1139,7 @@ s32 fopAcM_orderOtherEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, char const* p
/* 8001B5E4-8001B67C 015F24 0098+00 0/0 2/2 41/41 .text
* fopAcM_orderChangeEventId__FP10fopAc_ac_csUsUs */
s32 fopAcM_orderChangeEventId(fopAc_ac_c* actor, s16 eventID, u16 flag, u16 param_3) {
u16 eventPrio = dComIfGp_getEventManager().getEventPrio(actor, eventID);
u16 eventPrio = i_dComIfGp_getEventManager().getEventPrio(actor, eventID);
if (eventPrio == 0) {
eventPrio = 0xFF;
}
@ -1195,7 +1151,7 @@ s32 fopAcM_orderChangeEventId(fopAc_ac_c* actor, s16 eventID, u16 flag, u16 para
* fopAcM_orderOtherEventId__FP10fopAc_ac_csUcUsUsUs */
s32 fopAcM_orderOtherEventId(fopAc_ac_c* actor, s16 eventID, u8 param_2, u16 param_3,
u16 priority, u16 flag) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actor))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) {
return 0;
}
@ -1208,7 +1164,7 @@ s32 fopAcM_orderOtherEventId(fopAc_ac_c* actor, s16 eventID, u8 param_2, u16 par
if (priority != 0) {
newPriority = priority;
} else if (actor != NULL) {
u16 eventPrio = dComIfGp_getEventManager().getEventPrio(actor, eventID);
u16 eventPrio = i_dComIfGp_getEventManager().getEventPrio(actor, eventID);
if (eventPrio != 0) {
newPriority = eventPrio;
@ -1228,7 +1184,7 @@ s32 fopAcM_orderOtherEventId(fopAc_ac_c* actor, s16 eventID, u8 param_2, u16 par
* fopAcM_orderMapToolEvent__FP10fopAc_ac_cUcsUsUsUs */
s32 fopAcM_orderMapToolEvent(fopAc_ac_c* actor, u8 param_1, s16 eventID, u16 param_3,
u16 flag, u16 param_5) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actor))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) {
return 0;
}
@ -1243,7 +1199,7 @@ s32 fopAcM_orderMapToolEvent(fopAc_ac_c* actor, u8 param_1, s16 eventID, u16 par
newPriority = dt->field_0x6;
if (eventID == 0xFF) {
eventID = dComIfGp_getEventManager().getEventIdx(actor, param_1);
eventID = i_dComIfGp_getEventManager().getEventIdx(actor, param_1);
}
}
@ -1268,7 +1224,7 @@ s32 fopAcM_orderMapToolAutoNextEvent(fopAc_ac_c* actor, u8 param_1, s16 eventID,
/* 8001B908-8001B9D0 016248 00C8+00 0/0 0/0 106/106 .text
* fopAcM_orderPotentialEvent__FP10fopAc_ac_cUsUsUs */
s32 fopAcM_orderPotentialEvent(fopAc_ac_c* actor, u16 flag, u16 param_2, u16 priority) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actor))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) {
return 0;
}
@ -1284,7 +1240,7 @@ s32 fopAcM_orderPotentialEvent(fopAc_ac_c* actor, u16 flag, u16 param_2, u16 pri
// load order
#ifdef NONMATCHING
s32 fopAcM_orderItemEvent(fopAc_ac_c* actor, u16 priority, u16 flag) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actor))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) {
return 0;
}
@ -1309,7 +1265,7 @@ asm s32 fopAcM_orderItemEvent(fopAc_ac_c* param_0, u16 param_1, u16 param_2) {
* fopAcM_orderTreasureEvent__FP10fopAc_ac_cP10fopAc_ac_cUsUs */
s32 fopAcM_orderTreasureEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority,
u16 flag) {
if (!dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !dComIfGp_getEvent().isChangeOK(actorA))) {
if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) {
return 0;
}
@ -1378,10 +1334,6 @@ struct ItemTableList {
/* 0x10 */ u8 mTables[255][16];
};
inline u16 dComIfGs_getLife() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getLife();
}
/* 8001BCFC-8001BE14 01663C 0118+00 2/2 0/0 0/0 .text fopAcM_getItemNoFromTableNo__FUc */
// out of order instructions / regalloc
#ifdef NONMATCHING
@ -1393,7 +1345,7 @@ u8 fopAcM_getItemNoFromTableNo(u8 i_tableNo) {
return i_tableNo;
}
u8 hp_percent = (dComIfGs_getLife() * 100) / (((dComIfGs_getMaxLife() / 5) * 4) & 0xFC);
u8 hp_percent = (i_dComIfGs_getLife() * 100) / (((dComIfGs_getMaxLife() / 5) * 4) & 0xFC);
switch (i_tableNo) {
case 150:
@ -1755,12 +1707,6 @@ asm void* fopAcM_fastCreateItem(const cXyz* p_pos, int i_itemNo, int i_roomNo, c
#pragma pop
#endif
inline void make_prm_bokkuri(u32* pActorParams, csXyz* p_angle, u8 param_2, u8 param_3, u8 param_4,
u8 param_5, u8 param_6) {
p_angle->x = (param_4 << 0x8) | (param_3 & 0xFF);
p_angle->z = (param_6 << 0xD) | (param_2 << 0x1) | param_5;
}
/* 8001C870-8001C95C 0171B0 00EC+00 0/0 0/0 1/1 .text fopAcM_createBokkuri__FUsPC4cXyziiiPC4cXyzii
*/
s32 fopAcM_createBokkuri(u16 enemyNo, const cXyz* p_pos, int param_3, int param_4, int roomNo,
@ -1776,13 +1722,6 @@ s32 fopAcM_createBokkuri(u16 enemyNo, const cXyz* p_pos, int param_3, int param_
return fopAcM_create(PROC_Obj_Carry, enemyNo, actorParams, p_pos, roomNo, &angle, NULL, -1, NULL);
}
inline void make_prm_warp_hole(u32* actorParams, u8 p1, u8 p2, u8 p3) {
u32 pp1 = (p3 << 0x8);
u32 pp2 = (p2 << 0x10);
u32 pp3 = (p1 << 0x1B) | 0x170000FF;
*actorParams = pp2 | pp3 | pp1;
}
/* 8001C95C-8001C9CC 01729C 0070+00 0/0 0/0 12/12 .text
* fopAcM_createWarpHole__FPC4cXyzPC5csXyziUcUcUc */
s32 fopAcM_createWarpHole(const cXyz* p_pos, const csXyz* p_angle, int roomNo, u8 param_4, u8 param_5,
@ -1842,15 +1781,6 @@ s32 fopAcM_createDisappear(const fopAc_ac_c* p_actor, const cXyz* p_pos, u8 para
NULL));
}
inline u16 fopAcM_GetSetId(const fopAc_ac_c* p_actor) {
return p_actor->mSetID;
}
inline void fopAcM_onActor(const fopAc_ac_c* p_actor) {
int setId = fopAcM_GetSetId(p_actor);
dComIfGs_onActor(setId, fopAcM_GetHomeRoomNo(p_actor));
}
/* 8001CB48-8001CBA0 017488 0058+00 0/0 6/6 7/7 .text fopAcM_setCarryNow__FP10fopAc_ac_ci
*/
void fopAcM_setCarryNow(fopAc_ac_c* p_actor, int param_1) {
@ -1862,10 +1792,6 @@ void fopAcM_setCarryNow(fopAc_ac_c* p_actor, int param_1) {
}
}
inline BOOL dComIfGp_event_runCheck() {
return g_dComIfG_gameInfo.play.getEvent().runCheck();
}
/* 8001CBA0-8001CC5C 0174E0 00BC+00 0/0 5/5 21/21 .text fopAcM_cancelCarryNow__FP10fopAc_ac_c */
void fopAcM_cancelCarryNow(fopAc_ac_c* p_actor) {
if (fopAcM_checkCarryNow(p_actor)) {
@ -1884,7 +1810,7 @@ void fopAcM_cancelCarryNow(fopAc_ac_c* p_actor) {
p_actor->mCollisionRot.z = 0;
p_actor->mCollisionRot.x = 0;
if (dComIfGp_event_runCheck() && fopAcM_GetGroup(p_actor) != 2) {
if (i_dComIfGp_event_runCheck() && fopAcM_GetGroup(p_actor) != 2) {
p_actor->mStatus |= 0x800;
}
}

View File

@ -97,18 +97,12 @@ extern "C" void stopPatternedRumble__Q210JUTGamePad7CRumbleFs();
extern "C" void _savegpr_28();
extern "C" void _restgpr_28();
extern "C" extern u8 m_gamePad__8mDoCPd_c[16];
extern "C" extern Z2SoundMgr* data_80450B60;
extern "C" extern u8 struct_80450D38;
//
// Declarations:
//
// move / fix for JASGlobalInstance eventually
inline Z2SoundMgr* Z2GetSoundMgr() {
return data_80450B60;
}
/* 80450D38-80450D40 0008+00 s=0 e=1 z=0 None .sbss None */
u8 struct_80450D38;

View File

@ -91,7 +91,6 @@ extern "C" extern u8 data_80450B40[4];
extern "C" extern u8 data_80450B48[4];
extern "C" extern u8 data_80450B4C[4];
extern "C" extern u8 data_80450B50[4];
extern "C" extern u8 data_80450B60[4];
extern "C" extern u8 data_80450B64[4];
extern "C" extern u8 data_80450B68[4];
extern "C" extern u8 data_80450B6C[4];

View File

@ -53,7 +53,6 @@ extern "C" extern u8 data_80450B50[4];
extern "C" extern u8 data_80450B54[4];
extern "C" extern u8 data_80450B58[4];
extern "C" extern u8 data_80450B5C[4];
extern "C" extern u8 data_80450B60[4];
extern "C" extern u8 data_80450B64[4];
extern "C" extern u8 data_80450B68[4];
extern "C" extern u8 data_80450B6C[4];
@ -787,8 +786,8 @@ u8 data_80450B5C[4];
/* 80450B60-80450B64 000060 0004+00 0/0 29/29 0/0 .sbss
* sInstance__31JASGlobalInstance<10Z2SoundMgr> */
extern u8 data_80450B60[4];
u8 data_80450B60[4];
// TODO: fix type
Z2SoundMgr* data_80450B60;
/* 80450B64-80450B68 000064 0004+00 0/0 2/2 0/0 .sbss
* sInstance__33JASGlobalInstance<12JAIStreamMgr> */