mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-11 14:38:38 -04:00
D_a_obj_apzl matching (#923)
* bit too difficult for me for now, might go back later * progress * getmsg * logic matching data isnt * data section matches * mathubcg 100% * cleanup * revert this change * final cleanup and configure.py * nevermind cleanup * Equivalent onstead of matching * removed padding * cleanup code comments and a bit more * matching * cleanup * matching for retail * matching * documentation * changed field name * matching for GZLE01, GZLP01 * GZLJ01 and D44J01 * verion select for jutassert * tiny bit of cleanup and moving enums to header * feedback from pr * itemNo renamed to enum
This commit is contained in:
+1
-1
@@ -1682,7 +1682,7 @@ config.libs = [
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_Yboil"),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_adnno"),
|
||||
ActorRel(Matching, "d_a_obj_ajav"),
|
||||
ActorRel(NonMatching, "d_a_obj_apzl"),
|
||||
ActorRel(Matching, "d_a_obj_apzl"),
|
||||
ActorRel(NonMatching, "d_a_obj_ashut"),
|
||||
ActorRel(Matching, "d_a_obj_auzu"),
|
||||
ActorRel(NonMatching, "d_a_obj_buoyflag"),
|
||||
|
||||
@@ -2,32 +2,82 @@
|
||||
#define D_A_OBJ_APZL_H
|
||||
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "d/d_lib.h"
|
||||
|
||||
class daObjApzl_c : public fopAc_ac_c {
|
||||
public:
|
||||
|
||||
enum EventIdx {
|
||||
EVENT_TALK,
|
||||
EVENT_GAME,
|
||||
EVENT_RUPEE,
|
||||
};
|
||||
|
||||
enum States {
|
||||
STATE_IDLE,
|
||||
STATE_TALK,
|
||||
STATE_START,
|
||||
STATE_PLAYING,
|
||||
STATE_END,
|
||||
STATE_RUPEE,
|
||||
};
|
||||
|
||||
inline cPhs_State _create();
|
||||
inline bool _delete();
|
||||
inline bool _draw();
|
||||
inline bool _execute();
|
||||
void getblank() {}
|
||||
u8 getblank() { return mPiecePos[mBlankIdx]; }
|
||||
|
||||
void move_piece();
|
||||
bool move_piece();
|
||||
void check_arrow_draw();
|
||||
void search_piece(unsigned char);
|
||||
void swap_piece(unsigned char, unsigned char);
|
||||
u8 search_piece(u8);
|
||||
void swap_piece(u8, u8);
|
||||
void randamize_piece();
|
||||
void save_piece();
|
||||
void check_clear();
|
||||
void next_msgStatus(unsigned long*);
|
||||
void getMsg();
|
||||
void talk(int);
|
||||
bool check_clear();
|
||||
u16 next_msgStatus(u32*);
|
||||
u32 getMsg();
|
||||
u16 talk(int);
|
||||
void privateCut();
|
||||
void CreateHeap();
|
||||
BOOL CreateHeap();
|
||||
void CreateInit();
|
||||
void set_mtx();
|
||||
|
||||
|
||||
public:
|
||||
/* Place member variables here */
|
||||
};
|
||||
/* 0x290 */ request_of_phase_process_class mPhs;
|
||||
/* 0x298 */ J3DModel* mpPieceModel[16];
|
||||
/* 0x2D8 */ J3DModel* mpArrowModel[4];
|
||||
/* 0x2E8 */ J3DModel* mpScoreboardModel[16];
|
||||
/* 0x328 */ mDoExt_btpAnm mScoreboardBtpAnm[16];
|
||||
/* 0x468 */ u8 mPuzzleNo;
|
||||
/* 0x46C */ STControl* stick;
|
||||
/* 0x470 */ u8 mType;
|
||||
/* 0x471 */ u8 mBlankIdx;
|
||||
/* 0x472 */ u8 mSwappedPieceIdx;
|
||||
/* 0x473 */ u8 mMoveTimer;
|
||||
/* 0x474 */ u8 mMoveDirection;
|
||||
/* 0x475 */ bool mShowBlankPiece;
|
||||
/* 0x476 */ u8 mPiecePos[16];
|
||||
/* 0x486 */ u8 mState;
|
||||
/* 0x487 */ bool mDrawArrow[4];
|
||||
/* 0x48C */ s16 mEventIdx[3];
|
||||
/* 0x492 */ s8 mActIdx;
|
||||
/* 0x493 */ bool mQuitGame;
|
||||
/* 0x494 */ bool mGameStarted;
|
||||
/* 0x495 */ bool mGameCleared;
|
||||
/* 0x496 */ bool mGaveReward;
|
||||
/* 0x497 */ bool mShownRewardMessage;
|
||||
/* 0x498 */ bool mPlayedStartSound;
|
||||
/* 0x49C */ fpc_ProcID mRupeeIds[30];
|
||||
/* 0x514 */ int mGivenRupeeCount;
|
||||
/* 0x518 */ u32 mMsgNo;
|
||||
/* 0x51C */ u32 mCurrMsgId;
|
||||
/* 0x520 */ msg_class* mpCurrMsg;
|
||||
/* 0x524 */ int mRewardTimer;
|
||||
}; // Size: 0x528
|
||||
|
||||
namespace daObjApzl_prm {
|
||||
inline u8 getType(daObjApzl_c* i_this) { return (fopAcM_GetParam(i_this) >> 8); }
|
||||
}
|
||||
|
||||
#endif /* D_A_OBJ_APZL_H */
|
||||
|
||||
@@ -1843,6 +1843,18 @@ inline void dComIfGs_setRandomSalvagePoint(u8 point) {
|
||||
g_dComIfG_gameInfo.save.getPlayer().getPlayerInfo().setRandomSalvage(point);
|
||||
}
|
||||
|
||||
inline void dComIfGs_setPuzzleData(int i_idx, u8 i_puzzlePieceData) {
|
||||
g_dComIfG_gameInfo.save.getPlayer().getPlayerInfo().setPuzzleData(i_idx, i_puzzlePieceData);
|
||||
}
|
||||
|
||||
inline u8 dComIfGs_getPuzzleInfo() {
|
||||
return g_dComIfG_gameInfo.save.getPlayer().getPlayerInfo().getPuzzleInfo();
|
||||
}
|
||||
|
||||
inline void dComIfGs_setPuzzleInfo(int i_idx) {
|
||||
return g_dComIfG_gameInfo.save.getPlayer().getPlayerInfo().setPuzzleInfo(i_idx);
|
||||
}
|
||||
|
||||
inline u8 dComIfGs_getGbaRupeeCount() {
|
||||
return g_dComIfG_gameInfo.save.getDan().getGbaRupeeCount();
|
||||
}
|
||||
|
||||
+4
-4
@@ -439,9 +439,9 @@ public:
|
||||
if (mDeathCount < 9999)
|
||||
mDeathCount++;
|
||||
}
|
||||
void getPuzzleInfo() {}
|
||||
void setPuzzleInfo(u8) {}
|
||||
void setPuzzleData(int, u8) {}
|
||||
u8 getPuzzleInfo() { return mPuzzleData[16]; }
|
||||
void setPuzzleInfo(u8 clearCount) { mPuzzleData[16] = clearCount; }
|
||||
void setPuzzleData(int idx, u8 puzzlePiecePos) { mPuzzleData[idx] = puzzlePiecePos; }
|
||||
u8 getRandomSalvage() { return mRandomSalvagePoint; }
|
||||
void setRandomSalvage(u8 point) { mRandomSalvagePoint = point; }
|
||||
|
||||
@@ -451,7 +451,7 @@ public:
|
||||
/* 0x14 */ char mPlayerName[17];
|
||||
/* 0x25 */ char field_0x25[17];
|
||||
/* 0x36 */ char field_0x36[17];
|
||||
/* 0x47 */ char field_0x47[17];
|
||||
/* 0x47 */ u8 mPuzzleData[17];
|
||||
/* 0x58 */ u8 mClearCount;
|
||||
/* 0x59 */ u8 mRandomSalvagePoint;
|
||||
/* 0x5A */ u8 field_0x5a[0x5c - 0x5a];
|
||||
|
||||
@@ -432,7 +432,9 @@ inline void mDoAud_talkOut() {
|
||||
mDoAud_zelAudio_c::getInterface()->talkOut();
|
||||
}
|
||||
|
||||
inline void mDoAud_checkSePlaying(u32 param_0) {}
|
||||
inline BOOL mDoAud_checkSePlaying(u32 param_0) {
|
||||
return mDoAud_zelAudio_c::getInterface()->checkSePlaying(param_0);
|
||||
}
|
||||
inline void mDoAud_heartGaugeOn() {
|
||||
mDoAud_zelAudio_c::getInterface()->heartGaugeOn();
|
||||
}
|
||||
|
||||
+1022
-30
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -960,8 +960,8 @@ void dSv_player_info_c::init() {
|
||||
mDeathCount = 0;
|
||||
mClearCount = 0;
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(field_0x47); i++) {
|
||||
field_0x47[i] = 0;
|
||||
for (int i = 0; i < ARRAY_SIZE(mPuzzleData); i++) {
|
||||
mPuzzleData[i] = 0;
|
||||
}
|
||||
|
||||
mRandomSalvagePoint = cM_rndF(3.0f);
|
||||
|
||||
Reference in New Issue
Block a user