Merge pull request #545 from SuperDude88/main

daRaceItem_c 100%, not OK
This commit is contained in:
LagoLunatic
2023-12-03 13:59:50 -05:00
committed by GitHub
4 changed files with 401 additions and 63 deletions
+16 -9
View File
@@ -1,24 +1,31 @@
#ifndef D_A_RACE_ITEM_H
#define D_A_RACE_ITEM_H
#include "f_op/f_op_actor.h"
#include "d/actor/d_a_itembase.h"
class daRaceItem_c : public fopAc_ac_c {
class daRaceItem_c : public daItemBase_c {
public:
inline BOOL draw();
inline BOOL execute();
void setListStart() {}
void set_mtx();
BOOL Delete();
s32 create();
void CreateInit();
BOOL CreateInit();
void checkGet();
inline BOOL execute();
void setListStart() {}
// race_item_static functions
void raceItemForceGet();
void raceItemGet();
void normalItemGet();
BOOL startOffsetPos();
BOOL endOffsetPos(f32, cXyz*, f32, f32, csXyz*);
BOOL checkOffsetPos();
void set_mtx(cXyz*);
public:
/* 0x000 */ daItemBase_c parent;
/* 0x63C */ u8 m63C[0x648 - 0x63C];
/* 0x63C */ s32 field_0x63C;
/* 0x640 */ u32 field_0x640;
/* 0x644 */ u8 field_0x644;
/* 0x645 */ u8 field_0x645;
};
#endif /* D_A_RACE_ITEM_H */
+20 -1
View File
@@ -361,6 +361,16 @@ public:
void setItemRupeeCount(s32 count) { mItemRupeeCount += count; }
void setMessageCountNumber(s16 num) { mMsgCountNumber = num; }
s16 getMiniGameRupee() { return mMiniGameRupee; }
void plusMiniGameRupee(s16 count) {
if(mMiniGameRupee + count > 0) {
mMiniGameRupee += count;
}
else {
mMiniGameRupee = 0;
}
}
void setLkDemoAnmArchive(JKRArchive* i_arc) { mpLkDArc = i_arc; }
void setStatus(u16 status) { mStatus = status; }
void onStatus(u16 status) { mStatus |= status; }
@@ -647,7 +657,8 @@ public:
/* 0x4A28 */ u32 mPlayerStatus[2][2];
/* 0x4A38 */ u8 field_0x4A38[0x4A3A - 0x4A38];
/* 0x4A3A */ u8 mMiniGameType;
/* 0x4A3B */ u8 field_0x4A3B[0x4A40 - 0x4A3B];
/* 0x4A3C */ s16 mMiniGameRupee;
/* 0x4A3D */ u8 field_0x4A3E[0x4A40 - 0x4A3E];
/* 0x4A40 */ __d_timer_info_c mTimerInfo;
/* 0x4A54 */ dDlst_window_c* mCurrentWindow;
/* 0x4A58 */ view_class* mCurrentView;
@@ -2089,6 +2100,14 @@ inline void dComIfGp_setRStatusForce(u8 status) {
g_dComIfG_gameInfo.play.setRStatusForce(status);
}
inline s16 dComIfGp_getMiniGameRupee() {
return g_dComIfG_gameInfo.play.getMiniGameRupee();
}
inline void dComIfGp_plusMiniGameRupee(s16 count) {
g_dComIfG_gameInfo.play.plusMiniGameRupee(count);
}
inline s32 dComIfGp_getWindowNum() { return g_dComIfG_gameInfo.play.getWindowNum(); }
inline void dComIfGp_setWindowNum(u8 num) { g_dComIfG_gameInfo.play.setWindowNum(num); }
inline dDlst_window_c * dComIfGp_getWindow(int idx) { return g_dComIfG_gameInfo.play.getWindow(idx); }