diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2024-01-29 07:39:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-29 17:39:51 +0200 |
| commit | 36a29bc4fe6464d57d693ab24aedd97e4bb59310 (patch) | |
| tree | 7f3b3979a7a4e385e0ef87dc5f6059e4ac5872da /include | |
| parent | 7f0ba98c9f694234bd88cf1263840c5e8aaea390 (diff) | |
various fixes / matches (#2052)
* some fixes in d/s, d_item, d_shop
* fix for dKankyo_DayProc weak generation
* d_cc_uty fix
* some d_name / d_com_inf_game / f_op_actor_mng matches
* fix some player inline virtuals
* remove asm
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/a/d_a_alink.h | 14 | ||||
| -rw-r--r-- | include/d/a/d_a_item_static.h | 7 | ||||
| -rw-r--r-- | include/d/a/d_a_player.h | 50 | ||||
| -rw-r--r-- | include/d/com/d_com_inf_game.h | 18 | ||||
| -rw-r--r-- | include/d/d_item.h | 389 | ||||
| -rw-r--r-- | include/d/d_stage.h | 1 | ||||
| -rw-r--r-- | include/d/kankyo/d_kankyo.h | 1 | ||||
| -rw-r--r-- | include/d/kankyo/d_kankyo_static.h | 18 | ||||
| -rw-r--r-- | include/d/menu/d_menu_fmap.h | 2 | ||||
| -rw-r--r-- | include/d/s/d_s_play.h | 2 | ||||
| -rw-r--r-- | include/d/save/d_save.h | 3 | ||||
| -rw-r--r-- | include/d/shop/d_shop_camera.h | 4 | ||||
| -rw-r--r-- | include/d/shop/d_shop_system.h | 12 | ||||
| -rw-r--r-- | include/m_Do/m_Do_graphic.h | 2 |
14 files changed, 283 insertions, 240 deletions
diff --git a/include/d/a/d_a_alink.h b/include/d/a/d_a_alink.h index 08d73420da..41ba148b0e 100644 --- a/include/d/a/d_a_alink.h +++ b/include/d/a/d_a_alink.h @@ -2971,18 +2971,18 @@ public: /* 80140888 */ void statusWindowExecute(cXyz const*, s16); /* 80140984 */ void statusWindowDraw(); /* 80140AC8 */ void resetStatusWindow(); - /* 8018280C */ void getChainGrabActor(); - /* 80182814 */ void checkCokkoGlide() const; - /* 8018283C */ void checkCameraLargeDamage() const; - /* 80182870 */ void getHsSubChainTopPos() const; - /* 80182888 */ void checkCutHeadProc() const; - /* 8018289C */ void getRideActor(); + /* 8018280C */ fopAc_ac_c* getChainGrabActor() { return field_0x2844.getActor(); } + /* 80182814 */ BOOL checkCokkoGlide() const { return mProcID == PROC_AUTO_JUMP && mProcVar2.field_0x300c != 0; } + /* 8018283C */ BOOL checkCameraLargeDamage() const { return mProcID == PROC_LARGE_DAMAGE || mProcID == PROC_LARGE_DAMAGE_WALL || mProcID == PROC_LARGE_DAMAGE_UP || mProcID == PROC_WOLF_LARGE_DAMAGE_UP; } + /* 80182870 */ const cXyz& getHsSubChainTopPos() const { return mIronBallBgChkPos; } + /* 80182888 */ BOOL checkCutHeadProc() const { return mProcID == PROC_CUT_HEAD; } + /* 8018289C */ fopAc_ac_c* getRideActor() { return mRideAcKeep.getActor(); } virtual cXyz* getMidnaAtnPos() const; virtual void setMidnaMsgNum(fopAc_ac_c*, u16); virtual MtxP getModelMtx(); virtual MtxP getInvMtx(); - virtual cXyz* getShadowTalkAtnPos(); + virtual cXyz* getShadowTalkAtnPos() { return &field_0x375c; } virtual f32 getGroundY(); virtual MtxP getLeftItemMatrix(); virtual MtxP getRightItemMatrix(); diff --git a/include/d/a/d_a_item_static.h b/include/d/a/d_a_item_static.h index 5b1c508483..2cf89231dd 100644 --- a/include/d/a/d_a_item_static.h +++ b/include/d/a/d_a_item_static.h @@ -19,7 +19,7 @@ public: /* 8015B3D8 */ void CreateInit(); /* 8015B7BC */ void setCullInfo(); /* 8015B7D4 */ int _daItem_create(); - /* 8015BA9C */ void _daItem_execute(); + /* 8015BA9C */ int _daItem_execute(); /* 8015BD84 */ int _daItem_draw(); /* 8015BDE8 */ int _daItem_delete(); /* 8015BE60 */ void procInitNormal(); @@ -109,8 +109,11 @@ public: bool checkFlag(u8 flag) { return cLib_checkBit(mFlag, flag); } void clrFlag(u8 flag) { cLib_offBit(mFlag, flag); } +#ifdef NONMATCHING + static procFunc mFuncPtr[9]; +#else static u8 mFuncPtr[120]; - //static procFunc mFuncPtr[9]; +#endif static dCcD_SrcCyl m_cyl_src; static s32 m_timer_max; diff --git a/include/d/a/d_a_player.h b/include/d/a/d_a_player.h index f453b76aac..c3511a4a69 100644 --- a/include/d/a/d_a_player.h +++ b/include/d/a/d_a_player.h @@ -540,25 +540,17 @@ public: void cancelOriginalDemo(); void changeOriginalDemo(); cXyz getHeadTopPos() const; - /* 801829E0 */ void checkThrowDamage() const; - /* 80182A10 */ void checkGoronSideMove() const; - /* 80182AAC */ void getRightFootPosP(); - /* 80182AB4 */ void getLeftFootPosP(); - /* 80182ABC */ // u32 getMidnaActor(); - /* 80182AC4 */ void checkCopyRodThrowAfter() const; - /* 80182AD8 */ void checkRide() const; - /* 80182B9C */ void getRightHandPos() const; - /* 8015DFD8 */ const cXyz getItemPos() const; - /* 8015DFF4 */ const cXyz& getLeftHandPos() const; + /* 801829E0 */ BOOL checkThrowDamage() const { return i_checkNoResetFlg1(FLG1_THROW_DAMAGE); } + /* 80182A10 */ BOOL checkGoronSideMove() const { return mSpecialMode == 0x2B; } + /* 80182AAC */ cXyz* getRightFootPosP() { return &mRightFootPos; } + /* 80182AB4 */ cXyz* getLeftFootPosP() { return &mLeftFootPos; } + /* 80182AC4 */ BOOL checkCopyRodThrowAfter() const { return i_checkNoResetFlg3(FLG3_COPY_ROD_THROW_AFTER); } + /* 80182AD8 */ BOOL checkRide() const { return checkHorseRide() || checkBoarRide() || checkSpinnerRide() || checkCanoeRide() || checkBoardRide(); } + /* 80182B9C */ const cXyz& getRightHandPos() const { return mRightHandPos; } + /* 8015DFD8 */ const cXyz* getItemPos() const { return &mItemPos; } + /* 8015DFF4 */ const cXyz* getLeftHandPos() const { return &mLeftHandPos; } /* 800977B4 */ bool checkMidnaRide() const; - /* const cXyz* getItemPos() const { - return &mItemPos; - } - const cXyz* getLeftHandPos() const { - return &mLeftHandPos; - } */ - virtual cXyz* getMidnaAtnPos() const; virtual void setMidnaMsgNum(fopAc_ac_c*, u16); virtual MtxP getModelMtx(); @@ -574,9 +566,9 @@ public: virtual MtxP getWolfBackbone2Matrix(); virtual MtxP getBottleMtx(); virtual BOOL checkPlayerGuard() const; - virtual u32 checkPlayerFly() const; - virtual BOOL checkFrontRoll() const; - virtual BOOL checkWolfDash() const; + virtual u32 checkPlayerFly() const { return 0; } + virtual BOOL checkFrontRoll() const { return false; } + virtual BOOL checkWolfDash() const { return false; } virtual BOOL checkAutoJump() const; virtual bool checkSideStep() const; virtual bool checkWolfTriggerJump() const; @@ -618,9 +610,9 @@ public: virtual void setAnimeFrame(f32); virtual bool checkWolfLock(fopAc_ac_c*) const; virtual bool cancelWolfLock(fopAc_ac_c*); - virtual s32 getAtnActorID() const; + virtual s32 getAtnActorID() const { return -1; } virtual s32 getItemID() const; - virtual s32 getGrabActorID() const; + virtual s32 getGrabActorID() const { return -1; } virtual bool exchangeGrabActor(fopAc_ac_c*); virtual bool setForceGrab(fopAc_ac_c*, int, int); virtual void setForcePutPos(cXyz const&); @@ -632,11 +624,11 @@ public: virtual void setOutPower(f32, short, int); virtual void setGrabCollisionOffset(f32, f32, cBgS_PolyInfo*); virtual void onMagneGrab(f32, f32); - virtual void onFrollCrashFlg(u8, int); + virtual void onFrollCrashFlg(u8, int) {} virtual MtxP getModelJointMtx(u16); virtual MtxP getHeadMtx(); virtual bool setHookshotCarryOffset(unsigned int, cXyz const*); - virtual BOOL checkCutJumpCancelTurn() const; + virtual BOOL checkCutJumpCancelTurn() const { return FALSE; } virtual bool checkIronBallReturn() const; virtual bool checkIronBallGroundStop() const; virtual BOOL checkSingleBoarBattleSecondBowReady() const; @@ -655,11 +647,11 @@ public: virtual void onSceneChangeArea(u8, u8, fopAc_ac_c*); virtual void onSceneChangeAreaJump(u8, u8, fopAc_ac_c*); virtual void onSceneChangeDead(u8, int); - virtual u32 checkHorseRide() const; - virtual u32 checkBoarRide() const; - virtual u32 checkCanoeRide() const; - virtual u32 checkBoardRide() const; - virtual u32 checkSpinnerRide() const; + virtual u32 checkHorseRide() const { return false; } + virtual u32 checkBoarRide() const { return 0; } + virtual u32 checkCanoeRide() const { return 0; } + virtual u32 checkBoardRide() const { return 0; } + virtual u32 checkSpinnerRide() const { return 0; } virtual fopAc_ac_c* getSpinnerActor(); virtual BOOL checkHorseRideNotReady() const; virtual bool checkArrowChargeEnd() const; diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h index 2848f26ea5..27d6f06136 100644 --- a/include/d/com/d_com_inf_game.h +++ b/include/d/com/d_com_inf_game.h @@ -72,9 +72,9 @@ public: /* 8002F3B4 */ int load(char const**, JKRHeap*); private: - /* 0x0 */ const char** field_0x0; - /* 0x4 */ request_of_phase_process_class field_0x4; - /* 0xC */ u8 field_0xc; + /* 0x0 */ const char** mResNameTable; + /* 0x4 */ request_of_phase_process_class mPhase; + /* 0xC */ u8 mLoadIndex; }; enum PlayerPtr { LINK_PTR, HORSE_PTR }; @@ -1840,6 +1840,18 @@ inline void dComIfGs_offPlayerFieldLastStayFieldDataExistFlag() { g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().offFieldDataExistFlag(); } +inline void dComIfGs_onPlayerFieldLastStayFieldDataExistFlag() { + g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().onFieldDataExistFlag(); +} + +inline cXyz& dComIfGs_getPlayerFieldLastStayPos() { + return g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().getPos(); +} + +inline u8 dComIfGs_getPlayerFieldLastStayRegionNo() { + return g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().getRegionNo(); +} + void dComIfGp_setSelectItem(int index); s32 dComIfGp_offHeapLockFlag(int flag); void dComIfGp_createSubExpHeap2D(); diff --git a/include/d/d_item.h b/include/d/d_item.h index 3984a02f6b..fc8a203535 100644 --- a/include/d/d_item.h +++ b/include/d/d_item.h @@ -3,6 +3,13 @@ #include "dolphin/types.h" +class dEnemyItem_c { +public: + static void setItemData(u8* data) { mData = data; } + + static u8* mData; +}; + void execItemGet(u8 item_id); void item_func_HEART(); @@ -194,199 +201,199 @@ void item_func_LV2_BOSS_KEY(); void item_func_KEY_OF_FILONE(); void item_func_noentry(); -s32 item_getcheck_func_HEART(); -s32 item_getcheck_func_GREEN_RUPEE(); -s32 item_getcheck_func_BLUE_RUPEE(); -s32 item_getcheck_func_YELLOW_RUPEE(); -s32 item_getcheck_func_RED_RUPEE(); -s32 item_getcheck_func_PURPLE_RUPEE(); -s32 item_getcheck_func_ORANGE_RUPEE(); -s32 item_getcheck_func_SILVER_RUPEE(); -s32 item_getcheck_func_S_MAGIC(); -s32 item_getcheck_func_L_MAGIC(); -s32 item_getcheck_func_BOMB_5(); -s32 item_getcheck_func_BOMB_10(); -s32 item_getcheck_func_BOMB_20(); -s32 item_getcheck_func_BOMB_30(); -s32 item_getcheck_func_ARROW_10(); -s32 item_getcheck_func_ARROW_20(); -s32 item_getcheck_func_ARROW_30(); -s32 item_getcheck_func_ARROW_1(); -s32 item_getcheck_func_PACHINKO_SHOT(); -s32 item_getcheck_func_WATER_BOMB_5(); -s32 item_getcheck_func_WATER_BOMB_10(); -s32 item_getcheck_func_WATER_BOMB_20(); -s32 item_getcheck_func_WATER_BOMB_30(); -s32 item_getcheck_func_BOMB_INSECT_5(); -s32 item_getcheck_func_BOMB_INSECT_10(); -s32 item_getcheck_func_BOMB_INSECT_20(); -s32 item_getcheck_func_BOMB_INSECT_30(); -s32 item_getcheck_func_RECOVER_FAILY(); -s32 item_getcheck_func_TRIPLE_HEART(); -s32 item_getcheck_func_SMALL_KEY(); -s32 item_getcheck_func_KAKERA_HEART(); -s32 item_getcheck_func_UTUWA_HEART(); -s32 item_getcheck_func_MAP(); -s32 item_getcheck_func_COMPUS(); -s32 item_getcheck_func_DUNGEON_EXIT(); -s32 item_getcheck_func_BOSS_KEY(); -s32 item_getcheck_func_DUNGEON_BACK(); -s32 item_getcheck_func_SWORD(); -s32 item_getcheck_func_MASTER_SWORD(); -s32 item_getcheck_func_WOOD_SHIELD(); -s32 item_getcheck_func_SHIELD(); -s32 item_getcheck_func_HYLIA_SHIELD(); -s32 item_getcheck_func_TKS_LETTER(); -s32 item_getcheck_func_WEAR_CASUAL(); -s32 item_getcheck_func_WEAR_KOKIRI(); -s32 item_getcheck_func_ARMOR(); -s32 item_getcheck_func_WEAR_ZORA(); -s32 item_getcheck_func_MAGIC_LV1(); -s32 item_getcheck_func_DUNGEON_EXIT_2(); -s32 item_getcheck_func_WALLET_LV1(); -s32 item_getcheck_func_WALLET_LV2(); -s32 item_getcheck_func_WALLET_LV3(); -s32 item_getcheck_func_ZORAS_JEWEL(); -s32 item_getcheck_func_HAWK_EYE(); -s32 item_getcheck_func_WOOD_STICK(); -s32 item_getcheck_func_BOOMERANG(); -s32 item_getcheck_func_SPINNER(); -s32 item_getcheck_func_IRONBALL(); -s32 item_getcheck_func_BOW(); -s32 item_getcheck_func_HOOKSHOT(); -s32 item_getcheck_func_HVY_BOOTS(); -s32 item_getcheck_func_COPY_ROD(); -s32 item_getcheck_func_W_HOOKSHOT(); -s32 item_getcheck_func_KANTERA(); -s32 item_getcheck_func_LIGHT_SWORD(); -s32 item_getcheck_func_FISHING_ROD_1(); -s32 item_getcheck_func_PACHINKO(); -s32 item_getcheck_func_COPY_ROD_2(); -s32 item_getcheck_func_BOMB_BAG_LV2(); -s32 item_getcheck_func_BOMB_BAG_LV1(); -s32 item_getcheck_func_BOMB_IN_BAG(); -s32 item_getcheck_func_LIGHT_ARROW(); -s32 item_getcheck_func_ARROW_LV1(); -s32 item_getcheck_func_ARROW_LV2(); -s32 item_getcheck_func_ARROW_LV3(); -s32 item_getcheck_func_LURE_ROD(); -s32 item_getcheck_func_BOMB_ARROW(); -s32 item_getcheck_func_HAWK_ARROW(); -s32 item_getcheck_func_BEE_ROD(); -s32 item_getcheck_func_JEWEL_ROD(); -s32 item_getcheck_func_WORM_ROD(); -s32 item_getcheck_func_JEWEL_BEE_ROD(); -s32 item_getcheck_func_JEWEL_WORM_ROD(); -s32 item_getcheck_func_EMPTY_BOTTLE(); -s32 item_getcheck_func_RED_BOTTLE(); -s32 item_getcheck_func_GREEN_BOTTLE(); -s32 item_getcheck_func_BLUE_BOTTLE(); -s32 item_getcheck_func_MILK_BOTTLE(); -s32 item_getcheck_func_HALF_MILK_BOTTLE(); -s32 item_getcheck_func_OIL_BOTTLE(); -s32 item_getcheck_func_WATER_BOTTLE(); -s32 item_getcheck_func_OIL_BOTTLE2(); -s32 item_getcheck_func_RED_BOTTLE2(); -s32 item_getcheck_func_UGLY_SOUP(); -s32 item_getcheck_func_HOT_SPRING(); -s32 item_getcheck_func_FAIRY_BOTTLE(); -s32 item_getcheck_func_HOT_SPRING2(); -s32 item_getcheck_func_OIL2(); -s32 item_getcheck_func_OIL(); -s32 item_getcheck_func_NORMAL_BOMB(); -s32 item_getcheck_func_WATER_BOMB(); -s32 item_getcheck_func_POKE_BOMB(); -s32 item_getcheck_func_FAIRY_DROP(); -s32 item_getcheck_func_WORM(); -s32 item_getcheck_func_DROP_BOTTLE(); -s32 item_getcheck_func_BEE_CHILD(); -s32 item_getcheck_func_CHUCHU_RARE(); -s32 item_getcheck_func_CHUCHU_RED(); -s32 item_getcheck_func_CHUCHU_BLUE(); -s32 item_getcheck_func_CHUCHU_GREEN(); -s32 item_getcheck_func_CHUCHU_YELLOW(); -s32 item_getcheck_func_CHUCHU_PURPLE(); -s32 item_getcheck_func_LV1_SOUP(); -s32 item_getcheck_func_LV2_SOUP(); -s32 item_getcheck_func_LV3_SOUP(); -s32 item_getcheck_func_LETTER(); -s32 item_getcheck_func_BILL(); -s32 item_getcheck_func_WOOD_STATUE(); -s32 item_getcheck_func_IRIAS_PENDANT(); -s32 item_getcheck_func_HORSE_FLUTE(); -s32 item_getcheck_func_RAFRELS_MEMO(); -s32 item_getcheck_func_ASHS_SCRIBBLING(); -s32 item_getcheck_func_CHUCHU_YELLOW2(); -s32 item_getcheck_func_OIL_BOTTLE3(); -s32 item_getcheck_func_SHOP_BEE_CHILD(); -s32 item_getcheck_func_CHUCHU_BLACK(); -s32 item_getcheck_func_LIGHT_DROP(); -s32 item_getcheck_func_DROP_CONTAINER(); -s32 item_getcheck_func_DROP_CONTAINER02(); -s32 item_getcheck_func_DROP_CONTAINER03(); -s32 item_getcheck_func_FILLED_CONTAINER(); -s32 item_getcheck_func_MIRROR_PIECE_2(); -s32 item_getcheck_func_MIRROR_PIECE_3(); -s32 item_getcheck_func_MIRROR_PIECE_4(); -s32 item_getcheck_func_SMELL_YELIA_POUCH(); -s32 item_getcheck_func_SMELL_PUMPKIN(); -s32 item_getcheck_func_SMELL_POH(); -s32 item_getcheck_func_SMELL_FISH(); -s32 item_getcheck_func_SMELL_CHILDREN(); -s32 item_getcheck_func_SMELL_MEDICINE(); -s32 item_getcheck_func_M_BEETLE(); -s32 item_getcheck_func_F_BEETLE(); -s32 item_getcheck_func_M_BUTTERFLY(); -s32 item_getcheck_func_F_BUTTERFLY(); -s32 item_getcheck_func_M_STAG_BEETLE(); -s32 item_getcheck_func_F_STAG_BEETLE(); -s32 item_getcheck_func_M_GRASSHOPPER(); -s32 item_getcheck_func_F_GRASSHOPPER(); -s32 item_getcheck_func_M_NANAFUSHI(); -s32 item_getcheck_func_F_NANAFUSHI(); -s32 item_getcheck_func_M_DANGOMUSHI(); -s32 item_getcheck_func_F_DANGOMUSHI(); -s32 item_getcheck_func_M_MANTIS(); -s32 item_getcheck_func_F_MANTIS(); -s32 item_getcheck_func_M_LADYBUG(); -s32 item_getcheck_func_F_LADYBUG(); -s32 item_getcheck_func_M_SNAIL(); -s32 item_getcheck_func_F_SNAIL(); -s32 item_getcheck_func_M_DRAGONFLY(); -s32 item_getcheck_func_F_DRAGONFLY(); -s32 item_getcheck_func_M_ANT(); -s32 item_getcheck_func_F_ANT(); -s32 item_getcheck_func_M_MAYFLY(); -s32 item_getcheck_func_F_MAYFLY(); -s32 item_getcheck_func_POU_SPIRIT(); -s32 item_getcheck_func_ANCIENT_DOCUMENT(); -s32 item_getcheck_func_AIR_LETTER(); -s32 item_getcheck_func_ANCIENT_DOCUMENT2(); -s32 item_getcheck_func_LV7_DUNGEON_EXIT(); -s32 item_getcheck_func_LINKS_SAVINGS(); -s32 item_getcheck_func_SMALL_KEY2(); -s32 item_getcheck_func_POU_FIRE1(); -s32 item_getcheck_func_POU_FIRE2(); -s32 item_getcheck_func_POU_FIRE3(); -s32 item_getcheck_func_POU_FIRE4(); -s32 item_getcheck_func_BOSSRIDER_KEY(); -s32 item_getcheck_func_TOMATO_PUREE(); -s32 item_getcheck_func_TASTE(); -s32 item_getcheck_func_LV5_BOSS_KEY(); -s32 item_getcheck_func_SURFBOARD(); -s32 item_getcheck_func_KANTERA2(); -s32 item_getcheck_func_L2_KEY_PIECES1(); -s32 item_getcheck_func_L2_KEY_PIECES2(); -s32 item_getcheck_func_L2_KEY_PIECES3(); -s32 item_getcheck_func_KEY_OF_CARAVAN(); -s32 item_getcheck_func_LV2_BOSS_KEY(); -s32 item_getcheck_func_KEY_OF_FILONE(); -s32 item_getcheck_func_noentry(); +int item_getcheck_func_HEART(); +int item_getcheck_func_GREEN_RUPEE(); +int item_getcheck_func_BLUE_RUPEE(); +int item_getcheck_func_YELLOW_RUPEE(); +int item_getcheck_func_RED_RUPEE(); +int item_getcheck_func_PURPLE_RUPEE(); +int item_getcheck_func_ORANGE_RUPEE(); +int item_getcheck_func_SILVER_RUPEE(); +int item_getcheck_func_S_MAGIC(); +int item_getcheck_func_L_MAGIC(); +int item_getcheck_func_BOMB_5(); +int item_getcheck_func_BOMB_10(); +int item_getcheck_func_BOMB_20(); +int item_getcheck_func_BOMB_30(); +int item_getcheck_func_ARROW_10(); +int item_getcheck_func_ARROW_20(); +int item_getcheck_func_ARROW_30(); +int item_getcheck_func_ARROW_1(); +int item_getcheck_func_PACHINKO_SHOT(); +int item_getcheck_func_WATER_BOMB_5(); +int item_getcheck_func_WATER_BOMB_10(); +int item_getcheck_func_WATER_BOMB_20(); +int item_getcheck_func_WATER_BOMB_30(); +int item_getcheck_func_BOMB_INSECT_5(); +int item_getcheck_func_BOMB_INSECT_10(); +int item_getcheck_func_BOMB_INSECT_20(); +int item_getcheck_func_BOMB_INSECT_30(); +int item_getcheck_func_RECOVER_FAILY(); +int item_getcheck_func_TRIPLE_HEART(); +int item_getcheck_func_SMALL_KEY(); +int item_getcheck_func_KAKERA_HEART(); +int item_getcheck_func_UTUWA_HEART(); +int item_getcheck_func_MAP(); +int item_getcheck_func_COMPUS(); +int item_getcheck_func_DUNGEON_EXIT(); +int item_getcheck_func_BOSS_KEY(); +int item_getcheck_func_DUNGEON_BACK(); +int item_getcheck_func_SWORD(); +int item_getcheck_func_MASTER_SWORD(); +int item_getcheck_func_WOOD_SHIELD(); +int item_getcheck_func_SHIELD(); +int item_getcheck_func_HYLIA_SHIELD(); +int item_getcheck_func_TKS_LETTER(); +int item_getcheck_func_WEAR_CASUAL(); +int item_getcheck_func_WEAR_KOKIRI(); +int item_getcheck_func_ARMOR(); +int item_getcheck_func_WEAR_ZORA(); +int item_getcheck_func_MAGIC_LV1(); +int item_getcheck_func_DUNGEON_EXIT_2(); +int item_getcheck_func_WALLET_LV1(); +int item_getcheck_func_WALLET_LV2(); +int item_getcheck_func_WALLET_LV3(); +int item_getcheck_func_ZORAS_JEWEL(); +int item_getcheck_func_HAWK_EYE(); +int item_getcheck_func_WOOD_STICK(); +int item_getcheck_func_BOOMERANG(); +int item_getcheck_func_SPINNER(); +int item_getcheck_func_IRONBALL(); +int item_getcheck_func_BOW(); +int item_getcheck_func_HOOKSHOT(); +int item_getcheck_func_HVY_BOOTS(); +int item_getcheck_func_COPY_ROD(); +int item_getcheck_func_W_HOOKSHOT(); +int item_getcheck_func_KANTERA(); +int item_getcheck_func_LIGHT_SWORD(); +int item_getcheck_func_FISHING_ROD_1(); +int item_getcheck_func_PACHINKO(); +int item_getcheck_func_COPY_ROD_2(); +int item_getcheck_func_BOMB_BAG_LV2(); +int item_getcheck_func_BOMB_BAG_LV1(); +int item_getcheck_func_BOMB_IN_BAG(); +int item_getcheck_func_LIGHT_ARROW(); +int item_getcheck_func_ARROW_LV1(); +int item_getcheck_func_ARROW_LV2(); +int item_getcheck_func_ARROW_LV3(); +int item_getcheck_func_LURE_ROD(); +int item_getcheck_func_BOMB_ARROW(); +int item_getcheck_func_HAWK_ARROW(); +int item_getcheck_func_BEE_ROD(); +int item_getcheck_func_JEWEL_ROD(); +int item_getcheck_func_WORM_ROD(); +int item_getcheck_func_JEWEL_BEE_ROD(); +int item_getcheck_func_JEWEL_WORM_ROD(); +int item_getcheck_func_EMPTY_BOTTLE(); +int item_getcheck_func_RED_BOTTLE(); +int item_getcheck_func_GREEN_BOTTLE(); +int item_getcheck_func_BLUE_BOTTLE(); +int item_getcheck_func_MILK_BOTTLE(); +int item_getcheck_func_HALF_MILK_BOTTLE(); +int item_getcheck_func_OIL_BOTTLE(); +int item_getcheck_func_WATER_BOTTLE(); +int item_getcheck_func_OIL_BOTTLE2(); +int item_getcheck_func_RED_BOTTLE2(); +int item_getcheck_func_UGLY_SOUP(); +int item_getcheck_func_HOT_SPRING(); +int item_getcheck_func_FAIRY_BOTTLE(); +int item_getcheck_func_HOT_SPRING2(); +int item_getcheck_func_OIL2(); +int item_getcheck_func_OIL(); +int item_getcheck_func_NORMAL_BOMB(); +int item_getcheck_func_WATER_BOMB(); +int item_getcheck_func_POKE_BOMB(); +int item_getcheck_func_FAIRY_DROP(); +int item_getcheck_func_WORM(); +int item_getcheck_func_DROP_BOTTLE(); +int item_getcheck_func_BEE_CHILD(); +int item_getcheck_func_CHUCHU_RARE(); +int item_getcheck_func_CHUCHU_RED(); +int item_getcheck_func_CHUCHU_BLUE(); +int item_getcheck_func_CHUCHU_GREEN(); +int item_getcheck_func_CHUCHU_YELLOW(); +int item_getcheck_func_CHUCHU_PURPLE(); +int item_getcheck_func_LV1_SOUP(); +int item_getcheck_func_LV2_SOUP(); +int item_getcheck_func_LV3_SOUP(); +int item_getcheck_func_LETTER(); +int item_getcheck_func_BILL(); +int item_getcheck_func_WOOD_STATUE(); +int item_getcheck_func_IRIAS_PENDANT(); +int item_getcheck_func_HORSE_FLUTE(); +int item_getcheck_func_RAFRELS_MEMO(); +int item_getcheck_func_ASHS_SCRIBBLING(); +int item_getcheck_func_CHUCHU_YELLOW2(); +int item_getcheck_func_OIL_BOTTLE3(); +int item_getcheck_func_SHOP_BEE_CHILD(); +int item_getcheck_func_CHUCHU_BLACK(); +int item_getcheck_func_LIGHT_DROP(); +int item_getcheck_func_DROP_CONTAINER(); +int item_getcheck_func_DROP_CONTAINER02(); +int item_getcheck_func_DROP_CONTAINER03(); +int item_getcheck_func_FILLED_CONTAINER(); +int item_getcheck_func_MIRROR_PIECE_2(); +int item_getcheck_func_MIRROR_PIECE_3(); +int item_getcheck_func_MIRROR_PIECE_4(); +int item_getcheck_func_SMELL_YELIA_POUCH(); +int item_getcheck_func_SMELL_PUMPKIN(); +int item_getcheck_func_SMELL_POH(); +int item_getcheck_func_SMELL_FISH(); +int item_getcheck_func_SMELL_CHILDREN(); +int item_getcheck_func_SMELL_MEDICINE(); +int item_getcheck_func_M_BEETLE(); +int item_getcheck_func_F_BEETLE(); +int item_getcheck_func_M_BUTTERFLY(); +int item_getcheck_func_F_BUTTERFLY(); +int item_getcheck_func_M_STAG_BEETLE(); +int item_getcheck_func_F_STAG_BEETLE(); +int item_getcheck_func_M_GRASSHOPPER(); +int item_getcheck_func_F_GRASSHOPPER(); +int item_getcheck_func_M_NANAFUSHI(); +int item_getcheck_func_F_NANAFUSHI(); +int item_getcheck_func_M_DANGOMUSHI(); +int item_getcheck_func_F_DANGOMUSHI(); +int item_getcheck_func_M_MANTIS(); +int item_getcheck_func_F_MANTIS(); +int item_getcheck_func_M_LADYBUG(); +int item_getcheck_func_F_LADYBUG(); +int item_getcheck_func_M_SNAIL(); +int item_getcheck_func_F_SNAIL(); +int item_getcheck_func_M_DRAGONFLY(); +int item_getcheck_func_F_DRAGONFLY(); +int item_getcheck_func_M_ANT(); +int item_getcheck_func_F_ANT(); +int item_getcheck_func_M_MAYFLY(); +int item_getcheck_func_F_MAYFLY(); +int item_getcheck_func_POU_SPIRIT(); +int item_getcheck_func_ANCIENT_DOCUMENT(); +int item_getcheck_func_AIR_LETTER(); +int item_getcheck_func_ANCIENT_DOCUMENT2(); +int item_getcheck_func_LV7_DUNGEON_EXIT(); +int item_getcheck_func_LINKS_SAVINGS(); +int item_getcheck_func_SMALL_KEY2(); +int item_getcheck_func_POU_FIRE1(); +int item_getcheck_func_POU_FIRE2(); +int item_getcheck_func_POU_FIRE3(); +int item_getcheck_func_POU_FIRE4(); +int item_getcheck_func_BOSSRIDER_KEY(); +int item_getcheck_func_TOMATO_PUREE(); +int item_getcheck_func_TASTE(); +int item_getcheck_func_LV5_BOSS_KEY(); +int item_getcheck_func_SURFBOARD(); +int item_getcheck_func_KANTERA2(); +int item_getcheck_func_L2_KEY_PIECES1(); +int item_getcheck_func_L2_KEY_PIECES2(); +int item_getcheck_func_L2_KEY_PIECES3(); +int item_getcheck_func_KEY_OF_CARAVAN(); +int item_getcheck_func_LV2_BOSS_KEY(); +int item_getcheck_func_KEY_OF_FILONE(); +int item_getcheck_func_noentry(); -s32 checkItemGet(u8, int); +int checkItemGet(u8, int); BOOL isHeart(u8 item_no); -s32 isBomb(u8); -s32 isArrow(u8); +int isBomb(u8); +int isArrow(u8); int addBombCount(u8, u8); BOOL isBottleItem(u8 item_no); diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 128e6dcfdb..3d128e15ba 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -834,6 +834,7 @@ public: static u32 getProcID() { return mProcID; } static void setStatusProcID(int i_roomNo, unsigned int i_id) { mStatus[i_roomNo].mProcID = i_id; } static int getStatusProcID(int i_roomNo) { return mStatus[i_roomNo].mProcID; } + static void setRegionNo(int i_roomNo, u8 i_regionNo) { mStatus[i_roomNo].mRegionNo = i_regionNo; } static void setMemoryBlockID(int i_roomNo, int i_blockID) { mStatus[i_roomNo].mMemBlockID = i_blockID; diff --git a/include/d/kankyo/d_kankyo.h b/include/d/kankyo/d_kankyo.h index 8c48817384..91b9fd243f 100644 --- a/include/d/kankyo/d_kankyo.h +++ b/include/d/kankyo/d_kankyo.h @@ -11,7 +11,6 @@ class JPABaseEmitter; class cBgS_PolyInfo; class color_RGB_class; -void dKankyo_DayProc(); void dKy_set_nexttime(f32); void dKy_itudemo_se(); BOOL dKy_darkworld_spot_check(char const* stageName, int roomNo); diff --git a/include/d/kankyo/d_kankyo_static.h b/include/d/kankyo/d_kankyo_static.h new file mode 100644 index 0000000000..66af53ef6e --- /dev/null +++ b/include/d/kankyo/d_kankyo_static.h @@ -0,0 +1,18 @@ +#ifndef D_KANKYO_STATIC_H +#define D_KANKYO_STATIC_H + +#include "d/com/d_com_inf_game.h" + +/** + * This is a made-up file to help matching weak function generation. + * + * `dKankyo_DayProc` is supposed to be weakly generated at the end of TUs where it's called, + * but it'll generate in every TU where the header it's defined in is included. So only include this + * header in TUs where `dKankyo_DayProc` needs to be generated. + */ + +static void dKankyo_DayProc() { + dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[91]); +} + +#endif /* D_KANKYO_STATIC_H */
\ No newline at end of file diff --git a/include/d/menu/d_menu_fmap.h b/include/d/menu/d_menu_fmap.h index 2d72cfd22b..6010022c69 100644 --- a/include/d/menu/d_menu_fmap.h +++ b/include/d/menu/d_menu_fmap.h @@ -217,4 +217,6 @@ private: /* 0x313 */ u8 field_0x313; }; +const char* dMenuFmap_getStartStageName(void* param_0); + #endif /* D_MENU_D_MENU_FMAP_H */ diff --git a/include/d/s/d_s_play.h b/include/d/s/d_s_play.h index f81d367e50..ad40e0da74 100644 --- a/include/d/s/d_s_play.h +++ b/include/d/s/d_s_play.h @@ -79,7 +79,7 @@ public: /* 80259BFC */ void offReset(); static bool isPause() { return pauseTimer == 0; } - static void setPauseTimer(s8 time) { pauseTimer = time; } + static void setPauseTimer(s8 time) { nextPauseTimer = time; } static s8 pauseTimer; static s8 nextPauseTimer; diff --git a/include/d/save/d_save.h b/include/d/save/d_save.h index 31569a7e42..b1b7aabaf8 100644 --- a/include/d/save/d_save.h +++ b/include/d/save/d_save.h @@ -510,6 +510,9 @@ public: bool isFieldDataExistFlag() const { return mFieldDataExistFlag; } void offFieldDataExistFlag() { mFieldDataExistFlag = false; } + void onFieldDataExistFlag() { mFieldDataExistFlag = true; } + cXyz& getPos() { return mPos; } + u8 getRegionNo() const { return mRegionNo; } private: /* 0x00 */ cXyz mPos; diff --git a/include/d/shop/d_shop_camera.h b/include/d/shop/d_shop_camera.h index 08aafa7d79..b0023ac8e4 100644 --- a/include/d/shop/d_shop_camera.h +++ b/include/d/shop/d_shop_camera.h @@ -22,7 +22,7 @@ struct ShopCam_action_c { /* 801968B8 */ void setMasterCamCtrPos(cXyz*); void setCamAction(ShopCamFunc func) { - field_0x0 = func; + mCamAction = func; } void setCameraSpeed(f32 param_0, f32 param_1, f32 param_2, f32 param_3) { @@ -37,7 +37,7 @@ struct ShopCam_action_c { setCameraSpeed(0.25f, 20.0f, 0.25f, 5.0f); } - /* 0x00 */ ShopCamFunc field_0x0; + /* 0x00 */ ShopCamFunc mCamAction; /* 0x0c */ u8 field_0xc[0x18 - 0xc]; /* 0x18 */ fopAc_ac_c* field_0x18; /* 0x1c */ fopAc_ac_c* field_0x1c; diff --git a/include/d/shop/d_shop_system.h b/include/d/shop/d_shop_system.h index d6ec19e23d..ed3e679fd9 100644 --- a/include/d/shop/d_shop_system.h +++ b/include/d/shop/d_shop_system.h @@ -82,6 +82,10 @@ public: /* 0xA */ SEQ_FINISH, }; + enum { + ITEM_MAX_e = 7, + }; + /* 80197338 */ void initShopSystem(); /* 801975C0 */ void onFlag(int); /* 801975DC */ void offFlag(int); @@ -127,10 +131,12 @@ public: /* 8019AB84 */ bool checkRightTrigger(STControl*); /* 8019ABA8 */ bool dpdMove(); + void dummyWeakOrder(); // fake, used to fix weak function order in d_shop_system.cpp + /* 801974E4 */ virtual ~dShopSystem_c(); - /* 8019ACF0 */ virtual bool getResName2(int); - /* 8019ACE0 */ virtual int beforeStartSeqAction(dMsgFlow_c*, int); - /* 8019ACE8 */ virtual int beforeSelectSeqAction(dMsgFlow_c*, int); + /* 8019ACF0 */ virtual bool getResName2(int) { return false; } + /* 8019ACE0 */ virtual int beforeStartSeqAction(dMsgFlow_c*, int) { return 1; } + /* 8019ACE8 */ virtual int beforeSelectSeqAction(dMsgFlow_c*, int) { return 1; } bool chkSpMode() { return mSpMode == 1; } void offSpMode() { mSpMode = 0; } diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h index e4ca3a0b47..2d3850756f 100644 --- a/include/m_Do/m_Do_graphic.h +++ b/include/m_Do/m_Do_graphic.h @@ -72,7 +72,7 @@ public: static u8 getBlureRate() { return mBlureRate; } static MtxP getBlureMtx() { return mBlureMtx; } static void offAutoForcus() { data_80450BE7 = 0; } - static bool isAutoForcus() { return data_80450BE7; } + static BOOL isAutoForcus() { return data_80450BE7; } static void setTickRate(u32 rate) { JFWDisplay::getManager()->setTickRate(rate); } static void waitBlanking(int wait) { JFWDisplay::getManager()->waitBlanking(wait); } static f32 getWidthF() { return 608.0f; } |
