Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d_a_auction #654

Merged
merged 57 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
d0e7487
Started working on d_a_auction
DanTGL Apr 29, 2024
6a9ce34
daAuction_c Updated member variables
DanTGL May 13, 2024
87700b8
daAuction_c Refactored class
DanTGL May 15, 2024
1436ff9
daAuction_c::getRand matching
DanTGL May 15, 2024
99ebbf1
daAuction_c constructor matching
DanTGL May 15, 2024
3c1b745
d_a_auction CheckCreateHeap matching
DanTGL May 15, 2024
c7077de
daAuction_c::_create matching
DanTGL May 15, 2024
ffd4566
d_a_auction l_item_dat matching
DanTGL May 16, 2024
e35946a
daAuction_c::createHeap matching
DanTGL May 16, 2024
fb8108c
d_a_auction Added HIO classes
DanTGL May 16, 2024
4dd0d30
daAuction_c::createInit WIP
DanTGL May 17, 2024
f8d49e2
daAuction_c::_delete matching
DanTGL May 17, 2024
035eb51
daAuction_c::_draw matching
DanTGL May 17, 2024
2d5324c
daAuction_c::_execute matching
DanTGL May 17, 2024
bda3c1d
d_a_auction Fixed procfunc arrays
DanTGL May 18, 2024
4984327
daAuction_c moveProc funcs matching
DanTGL May 18, 2024
bb643dd
daAuction_c::checkOrder matching
DanTGL May 18, 2024
05cda63
daAuction_c::eventOrder WIP
DanTGL May 18, 2024
6171c5b
daAuction_c::eventMove matching
DanTGL May 18, 2024
320d55a
daAuction_c::privateCut WIP
DanTGL May 19, 2024
93f0762
daAuction_c::eventTalkInit matching
DanTGL May 19, 2024
b0ef2f7
daAuction_c::eventMesSet matching
DanTGL May 19, 2024
0ee7851
daAuction_c::eventMesEnd matching
DanTGL May 19, 2024
7999ffe
daAuction_c::eventStartInit matching
DanTGL May 19, 2024
1f1a17f
daAuction_c::eventStart matching
DanTGL May 20, 2024
2dcc6e4
daAuction_c::eventMainInit matching
DanTGL May 20, 2024
b7eb11d
daAuction_c::eventMain matching
DanTGL May 21, 2024
1f35439
daAuction_c::eventMainKai matching
DanTGL May 22, 2024
0b73be9
daAuction_c::eventMainKai Fixed formatting
DanTGL May 23, 2024
08b56cc
daAuction_c::eventMainUri matching
DanTGL May 24, 2024
f55a106
d_a_auction matching fixes
DanTGL May 24, 2024
7f01577
daAuction_c::eventMainMsgSet matching
DanTGL May 24, 2024
5097f67
daAuction_c::eventMainMsgEnd matching
DanTGL May 24, 2024
bddb37b
daAuction_c::setMtx matching
DanTGL May 24, 2024
11f8e4a
daAuction_c::getItemNo matching
DanTGL May 24, 2024
57d077a
daAuction_c::setLinkAnm matching
DanTGL May 24, 2024
3616e1f
d_a_auction matched some functions
DanTGL May 25, 2024
9f7b33a
d_a_auction matched SetMessage functions
DanTGL May 25, 2024
9102a3e
daAuction_c::getNpcActorP matching
DanTGL May 25, 2024
f2df5d8
daAuction_c::eventMainMsgBikonC matching
DanTGL May 25, 2024
d84c2f3
daAuction_c::eventMainMsgBikonW matching
DanTGL May 25, 2024
22db65e
daAuction_c::eventGetItemInit matching
DanTGL May 25, 2024
2f6452e
daAuction_c::eventGetItemNpcInit matching
DanTGL May 25, 2024
e782399
daAuction_c::eventGetItemMesInit matching
DanTGL May 25, 2024
cafde19
d_a_auction matched some functions
DanTGL May 26, 2024
2bac7a8
daAuction_c::setCameraNpc matching
DanTGL May 26, 2024
d5ac935
daAuction_c::nextBet matching
DanTGL May 26, 2024
156b37b
daAuction_c::privateCut Fixed matching
DanTGL May 28, 2024
352ef96
d_a_auction .data section matching
DanTGL May 28, 2024
5aeeac8
daAuction_c::next_msgStatus WIP
DanTGL May 28, 2024
ce3fb4f
daAuction_c::next_msgStatus matching
DanTGL May 28, 2024
6f4b2d4
Fixed variable names
DanTGL May 29, 2024
f22a159
d_a_auction cleanup
DanTGL May 31, 2024
02f6de4
d_a_auction more cleanup
DanTGL May 31, 2024
ea64b22
Merge remote-tracking branch 'upstream/main' into d_a_auction
DanTGL May 31, 2024
934e949
d_a_auction non-matching
DanTGL May 31, 2024
ff36ec2
d_a_auction minor tweak
DanTGL Jun 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ def DolphinLib(lib_name, objects):
ActorRel(NonMatching, "d_a_wind_tag"),
ActorRel(NonMatching, "d_a_acorn_leaf"),
ActorRel(NonMatching, "d_a_atdoor"),
ActorRel(NonMatching, "d_a_auction"),
ActorRel(NonMatching, "d_a_auction", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_bb"),
ActorRel(NonMatching, "d_a_bdk"),
ActorRel(NonMatching, "d_a_bdkobj"),
Expand Down
152 changes: 107 additions & 45 deletions include/d/actor/d_a_auction.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,26 @@

#include "f_op/f_op_actor.h"
#include "SSystem/SComponent/c_phase.h"
#include "d/d_com_inf_game.h"
#include "d/d_npc.h"
#include "m_Do/m_Do_hostIO.h"

class daAuction_c : public fopAc_ac_c {
class daAuction_c : public fopNpc_npc_c {
public:
typedef void(daAuction_c::*ProcFunc_t)();

struct ItemData {
/* 0x00 */ s16 mItemID;
/* 0x02 */ s16 mNameMsgID;
/* 0x04 */ s16 mStartingBid;
/* 0x06 */ u16 mObtainedEventBit;
}; // Size: 0x08

daAuction_c();

void chkNpcExec(int) {}
void getAnmNpcNo() {}
void getAucMdlNo(unsigned char) {}
u8 getAucMdlNo(u8 idx) { return mAucMdlNo[idx]; }
void getAucNpcNo(unsigned char) {}
void getBetNpcNo() {}
void getKind(unsigned char) {}
Expand All @@ -21,18 +32,21 @@ class daAuction_c : public fopAc_ac_c {
void isAucBetA() {}
void isAucGet() {}
void isAucJikkyou() {}
void offCamera() {}
void offCamera() { // Might be incorrect
m835 |= 2;
m835 &= 0xFE;
}
void onCamera(unsigned char) {}
void onCameraOld(unsigned char) {}
void setAucMdlNo(unsigned char, unsigned char) {}
void setAucMdlNo(u8 idx, u8 mdlNo) { mAucMdlNo[idx] = mdlNo; }
void setItemNo(unsigned char) {}
void setKind(unsigned char, unsigned char) {}
void setNpcID(int, uint) {}
void setStart(unsigned char) {}

s32 _create();
void createHeap();
void createInit();
BOOL createHeap();
s32 createInit();
BOOL _delete();
BOOL _draw();
BOOL _execute();
Expand All @@ -44,78 +58,126 @@ class daAuction_c : public fopAc_ac_c {
void eventMove();
void privateCut();
void eventTalkInit(int);
void eventMesSet();
void eventMesEnd();
bool eventMesSet();
bool eventMesEnd();
void eventStartInit();
void eventStart();
bool eventStart();
void eventMainInit();
void eventMain();
bool eventMain();
void eventMainKai();
void eventMainUri();
void eventMainMsgSet();
void eventMainMsgEnd();
void eventMainMsgBikonC();
void eventMainMsgBikonW();
void eventGetItemInit();
void eventGetItem();
bool eventGetItem();
void eventCameraOffInit();
void eventGetItemNpcInit(int);
void eventGetItemNpcInit(int staffIdx);
void eventGetItemMesInit();
void eventCameraOffNpc();
bool eventCameraOffNpc();
void eventEndInit();
void eventEnd();
bool eventEnd();
void eventCameraTestInit();
void eventCameraTest();
void next_msgStatus(unsigned long*);
void setMessage(unsigned long);
void setMessage2(unsigned long);
bool eventCameraTest();
u16 next_msgStatus(u32* pMsgNo);
void setMessage(u32);
void setMessage2(u32);
void setMtx();
void getItemNo();
void getNpcActorP(int);
void setCameraNpc(int, short);
void setLinkAnm(unsigned char);
void getPiconDispOfs(unsigned char);
u8 getItemNo();
fopAc_ac_c* getNpcActorP(int idx);
void setCameraNpc(int, s16);
void setLinkAnm(u8 linkAnm);
f32 getPiconDispOfs(u8 param);
void nextBet();
void getRand(int);
int getRand(int);

public:
/* 0x290 */ u8 m290[0x6C4 - 0x290];
/* 0x6C4 */ request_of_phase_process_class mPhs;
/* 0x6CC */ dNpc_EventCut_c mNpcEvtInfo;
/* 0x730 */ u8 m730[0x788 - 0x730];
/* 0x738 */ u32 m738[8];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be actor PIDs, so it should be using uint

/* 0x758 */ uint mCurrAuctionItemPID;
/* 0x75C */ uint mTimerID;
/* 0x760 */ uint mGaugeID;
/* 0x764 */ dTimer_c* mpTimer;
/* 0x768 */ LIGHT_INFLUENCE mLight;
/* 0x788 */ J3DModel* mpModel;
/* 0x78C */ u8 m78C[0x7A4 - 0x78C];
/* 0x7A4 */ int m7A4;
/* 0x7A8 */ u8 m7A8[0x7EC - 0x7A8];
/* 0x78C */ cXyz m78C;
/* 0x798 */ cXyz m798;
/* 0x7A4 */ JPABaseEmitter* mpEmitter;
/* 0x7A8 */ cXyz m7A8;
/* 0x7B4 */ u8 m7B4[0x7BC - 0x7B4];
/* 0x7BC */ f32 mAlpha;
/* 0x7C0 */ f32 mBlend;
/* 0x7C4 */ f32 m7C4[7]; // Npc wait timer?
/* 0x7E0 */ f32 m7E0;
/* 0x7E4 */ f32 m7E4;
/* 0x7E8 */ u8 m7E8[0x7EC - 0x7E8];
/* 0x7EC */ int m7EC;
/* 0x7F0 */ int m7F0;
/* 0x7F4 */ u16 mEvtStartIdx;
/* 0x7F6 */ u16 mEvtGetItemIdx;
/* 0x7F8 */ u16 mEvtNoItemIdx;
/* 0x7FA */ u16 mEvtStart2Idx;
/* 0x7FC */ u16 mEvtEnd2Idx;
/* 0x7FE */ u16 mCurrItemNameMsgNo;
/* 0x800 */ u8 m800[0x81C - 0x800];
/* 0x7F4 */ s16 mEvtStartIdx;
/* 0x7F6 */ s16 mEvtGetItemIdx;
/* 0x7F8 */ s16 mEvtNoItemIdx;
/* 0x7FA */ s16 mEvtStart2Idx;
/* 0x7FC */ s16 mEvtEnd2Idx;
/* 0x7FE */ s16 mCurrBid;
/* 0x800 */ s16 m800;
/* 0x802 */ s16 mTimer;
/* 0x804 */ u16 m804;
/* 0x806 */ s16 m806;
/* 0x808 */ s16 m808;
/* 0x80A */ s16 m80A;
/* 0x80C */ u8 m80C[8];
/* 0x814 */ u8 mAucMdlNo[8];
/* 0x81C */ u8 m81C;
/* 0x81D */ u8 m81D;
/* 0x81E */ u8 m81E;
/* 0x81F */ u8 m81F[0x820 - 0x81F];
/* 0x81E */ u8 mMoveState;
/* 0x81F */ u8 m81F;
/* 0x820 */ u8 m820;
/* 0x821 */ u8 m821;
/* 0x822 */ u8 m822;
/* 0x823 */ u8 mCurrAuctionItemIndex;
/* 0x824 */ u8 m824;
/* 0x825 */ u8 m825[0x826 - 0x825];
/* 0x825 */ u8 m825;
/* 0x826 */ u8 m826;
/* 0x827 */ u8 m827[0x82D - 0x827];
/* 0x827 */ u8 m827;
/* 0x828 */ u8 m828;
/* 0x829 */ u8 m829;
/* 0x82A */ u8 m82A;
/* 0x82B */ u8 m82B;
/* 0x82C */ u8 m82C;
/* 0x82D */ u8 mCurLinkAnm;
/* 0x82E */ u8 m82E[0x832 - 0x82E];
/* 0x82E */ u8 m82E;
/* 0x82F */ u8 m82F;
/* 0x830 */ u8 m830;
/* 0x831 */ u8 m831;
/* 0x832 */ u8 m832;
/* 0x833 */ u8 m833[0x836 - 0x833];
/* 0x833 */ u8 mFace;
/* 0x834 */ u8 m834;
/* 0x835 */ u8 m835;
/* 0x836 */ u8 m836;
/* 0x837 */ u8 m837[0x838 - 0x837];
/* 0x838 */ u8 m838;
/* 0x839 */ u8 m839[0x83C - 0x839];
/* 0x837 */ u8 mFlags; /* Just a guess */
/* 0x838 */ s8 m838;
/* 0x839 */ s8 mAction;
/* 0x83A */ u8 field_83A[0x83C - 0x83A];
};

/* Inferred from debug map */
class daAuction_HIO_c : public JORReflexible {
public:
daAuction_HIO_c() {}

public:
/* Place member variables here */
};

/* Inferred from debug map */
class daAuction_Npc_HIO_c {
public:
daAuction_Npc_HIO_c() {}

public:
/* Place member variables here */
};

#endif /* D_A_AUCTION_H */
31 changes: 16 additions & 15 deletions include/d/actor/d_a_npc_auction.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
#define D_A_NPC_AUCTION_H

#include "f_op/f_op_actor.h"
#include "d/d_npc.h"

struct sAnmDat {

};

class daNpcAuction_c : public fopAc_ac_c {
class daNpcAuction_c : public fopNpc_npc_c {
public:
daNpcAuction_c();

Expand All @@ -17,7 +18,7 @@ class daNpcAuction_c : public fopAc_ac_c {
inline BOOL _execute();
void getMdlNo() {}
void getPhaseP() {}
void getPiconOfsY() {}
f32 getPiconOfsY() { return mPiconOfsY; }
void setAction(void (daNpcAuction_c::*)()) {}
void setBmtNo(int) {}
void setBtpNo(int) {}
Expand All @@ -38,8 +39,8 @@ class daNpcAuction_c : public fopAc_ac_c {
void eventMesSet();
void XyCheckCB(int);
void XyEventCB(int);
void next_msgStatus(unsigned long*);
void getMsg();
u16 next_msgStatus(u32*);
u32 getMsg();
void setAnmFromMsgTag();
void getPrmNpcNo();
void setMtx();
Expand All @@ -55,19 +56,19 @@ class daNpcAuction_c : public fopAc_ac_c {
void clrEmitter();

public:
/* 0x290 */ u8 m290[0x6B0 - 0x290];
/* 0x6B0 */ u8 m6B0;
/* 0x6B1 */ u8 m6B1[0x73C - 0x6B1];
/* 0x6C4 */ u8 m6C4[0x724 - 0x6C4];
/* 0x724 */ f32 mPiconOfsY;
/* 0x728 */ u8 m728[0x73B - 0x728];
/* 0x73B */ u8 m73B;
/* 0x73C */ u8 m73C;
/* 0x73D */ u8 m73D;
/* 0x73E */ u8 m73E;
/* 0x73F */ u8 m73F[0x740 - 0x73F];
/* 0x740 */ u8 m740;
/* 0x741 */ u8 m741[0x743 - 0x741];
/* 0x743 */ u8 m743;
/* 0x744 */ u8 m744[0x745 - 0x744];
/* 0x745 */ u8 m745;
/* 0x746 */ u8 m746[0x74C - 0x746];
/* 0x73E */ u8 m73E[0x73F - 0x73E];
/* 0x73F */ u8 m73F;
/* 0x740 */ u8 m740[0x742 - 0x740];
/* 0x742 */ u8 m742;
/* 0x743 */ u8 m743[0x744 - 0x743];
/* 0x744 */ u8 m744;
/* 0x745 */ u8 field_745[0x74B - 0x745];
};

#endif /* D_A_NPC_AUCTION_H */
9 changes: 6 additions & 3 deletions include/d/actor/d_a_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,17 @@ class daPy_py_c : public fopAc_ac_c {
cXyz getRopePos() const { return mRopePos; }
void getYPos() const {}

void changeDemoMode(u32) {}
void changeDemoMode(u32 mode) { mDemo.setDemoMode(mode); }
void changeDemoMoveAngle(s16 angle) { mDemo.setMoveAngle(angle); }
void changeDemoParam0(int) {}
void changeDemoParam0(int param0) { mDemo.setParam0(param0); }
void changeOriginalDemo() {
mDemo.setOriginalDemoType();
mDemo.setParam0(0);
}
void cancelOriginalDemo() {}
void cancelOriginalDemo() {
mDemo.setSystemDemoType();
mDemo.setDemoMode(1);
}

void onNoResetFlg0(daPy_FLG0 flag) { mNoResetFlg0 |= flag; }
void offNoResetFlg0(daPy_FLG0 flag) { mNoResetFlg0 &= ~flag; }
Expand Down
30 changes: 26 additions & 4 deletions include/d/d_com_inf_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ class dComIfG_play_c {

int getMessageRupee() { return mMessageRupee; }

void setAuctionRupee(s16 count) { mAuctionRupee = count; }
void setAuctionGauge(s16 gauge) { mAuctionGauge = gauge; }

int getItemRupeeCount() { return mItemRupeeCount; }
void setItemRupeeCount(s32 count) { mItemRupeeCount += count; }
void setMessageCountNumber(s16 num) { mMsgCountNumber = num; }
Expand Down Expand Up @@ -354,6 +357,9 @@ class dComIfG_play_c {
s16 getItemArrowNumCount() { return mItemArrowNumCount; }
void setItemArrowNumCount(s16 num) { mItemArrowNumCount += num; }

void setNpcNameMessageID(u32 id) { mNpcNameMessageID = id; }
void setItemNameMessageID(u32 id) { mItemNameMessageID = id; }

void setItemKeyNumCount(s16 num) { mItemKeyNumCount += num; }

void setItemBeastNumCount(int i_idx, s16 num) { mItemBeastNumCounts[i_idx] += num; }
Expand Down Expand Up @@ -580,8 +586,8 @@ class dComIfG_play_c {
/* 0x48C0 */ int mItemRupeeCount;
/* 0x48C4 */ int mAirMeter;
/* 0x48C8 */ int field_0x48c8;
/* 0x48CC */ int mNpcNameMessageID;
/* 0x48D0 */ int mItemNameMessageID;
/* 0x48CC */ u32 mNpcNameMessageID;
/* 0x48D0 */ u32 mItemNameMessageID;
/* 0x48D4 */ s16 mItemKeyNumCount;
/* 0x48D6 */ s16 mItemMaxLifeCount;
/* 0x48D8 */ s16 mItemMagicCount;
Expand All @@ -597,8 +603,8 @@ class dComIfG_play_c {
/* 0x4918 */ u16 mMsgCountNumber;
/* 0x491A */ s16 mMsgSetNumber;
/* 0x491C */ s16 mMessageRupee;
/* 0x491E */ s16 field_0x491e;
/* 0x4920 */ s16 field_0x4920;
/* 0x491E */ s16 mAuctionRupee;
/* 0x4920 */ s16 mAuctionGauge;
/* 0x4922 */ s16 field_0x4922;
/* 0x4924 */ s16 mCurrHP;
/* 0x4926 */ s16 mRupyCountDisplay;
Expand Down Expand Up @@ -763,6 +769,14 @@ inline int dComIfGp_getMessageRupee() {
return g_dComIfG_gameInfo.play.getMessageRupee();
}

inline void dComIfGp_setAuctionRupee(s16 count) {
g_dComIfG_gameInfo.play.setAuctionRupee(count);
}

inline void dComIfGp_setAuctionGauge(s16 gauge) {
g_dComIfG_gameInfo.play.setAuctionGauge(gauge);
}

inline void dComIfGs_setRupee(u16 rupee) {
g_dComIfG_gameInfo.save.getPlayer().getPlayerStatusA().setRupee(rupee);
}
Expand Down Expand Up @@ -2187,6 +2201,14 @@ inline void dComIfGp_setItemMaxLifeCount(s16 num) {
g_dComIfG_gameInfo.play.setItemMaxLifeCount(num);
}

inline void dComIfGp_setNpcNameMessageID(u32 id) {
g_dComIfG_gameInfo.play.setNpcNameMessageID(id);
}

inline void dComIfGp_setItemNameMessageID(u32 id) {
g_dComIfG_gameInfo.play.setItemNameMessageID(id);
}

inline void dComIfGp_setItemKeyNumCount(s16 num) {
g_dComIfG_gameInfo.play.setItemKeyNumCount(num);
}
Expand Down
Loading
Loading