Skip to content

Commit c99241a

Browse files
committed
fix withdraw functionality
1 parent 7f503c9 commit c99241a

2 files changed

Lines changed: 55 additions & 4 deletions

File tree

include/d/d_msg_flow.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,15 @@ class dMsgFlow_c {
172172
int event041(mesg_flow_node_event*, fopAc_ac_c*);
173173
int event042(mesg_flow_node_event*, fopAc_ac_c*);
174174

175+
#if TARGET_PC
176+
// HD additions
177+
u16 query054(mesg_flow_node_branch*, fopAc_ac_c*, int);
178+
u16 query055(mesg_flow_node_branch*, fopAc_ac_c*, int);
179+
int event043(mesg_flow_node_event*, fopAc_ac_c*);
180+
int event044(mesg_flow_node_event*, fopAc_ac_c*);
181+
int event045(mesg_flow_node_event*, fopAc_ac_c*);
182+
#endif
183+
175184
void initWord(fopAc_ac_c*, const char*, u8, int, fopAc_ac_c**);
176185

177186
#if DEBUG
@@ -185,8 +194,8 @@ class dMsgFlow_c {
185194
void setMsg(u32 msg) { mMsg = msg; }
186195
bool checkEndFlow() { return (u32)field_0x26 == 1; }
187196

188-
static queryFunc mQueryList[53];
189-
static eventFunc mEventList[43];
197+
static queryFunc mQueryList[DUSK_IF_ELSE(55, 53)];
198+
static eventFunc mEventList[DUSK_IF_ELSE(46, 43)];
190199

191200
private:
192201
/* 0x04 */ u8* mFlow_p;

src/d/d_msg_flow.cpp

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ int dMsgFlow_c::getParam(u8* params) {
745745
return *(BE(int)*)params;
746746
}
747747

748-
queryFunc dMsgFlow_c::mQueryList[53] = {
748+
queryFunc dMsgFlow_c::mQueryList[DUSK_IF_ELSE(55, 53)] = {
749749
&dMsgFlow_c::query005, &dMsgFlow_c::query001, &dMsgFlow_c::query002, &dMsgFlow_c::query003,
750750
&dMsgFlow_c::query006, &dMsgFlow_c::query007, &dMsgFlow_c::query004, &dMsgFlow_c::query008,
751751
&dMsgFlow_c::query009, &dMsgFlow_c::query010, &dMsgFlow_c::query011, &dMsgFlow_c::query012,
@@ -760,6 +760,11 @@ queryFunc dMsgFlow_c::mQueryList[53] = {
760760
&dMsgFlow_c::query045, &dMsgFlow_c::query046, &dMsgFlow_c::query047, &dMsgFlow_c::query048,
761761
&dMsgFlow_c::query049, &dMsgFlow_c::query050, &dMsgFlow_c::query051, &dMsgFlow_c::query052,
762762
&dMsgFlow_c::query053,
763+
764+
#if TARGET_PC
765+
&dMsgFlow_c::query054,
766+
&dMsgFlow_c::query055,
767+
#endif
763768
};
764769

765770
#if DEBUG
@@ -1730,7 +1735,7 @@ u16 dMsgFlow_c::query053(mesg_flow_node_branch* i_flowNode_p, fopAc_ac_c* i_spea
17301735
return ret;
17311736
}
17321737

1733-
eventFunc dMsgFlow_c::mEventList[43] = {
1738+
eventFunc dMsgFlow_c::mEventList[DUSK_IF_ELSE(46, 43)] = {
17341739
&dMsgFlow_c::event000, &dMsgFlow_c::event001, &dMsgFlow_c::event002, &dMsgFlow_c::event003,
17351740
&dMsgFlow_c::event004, &dMsgFlow_c::event005, &dMsgFlow_c::event006, &dMsgFlow_c::event007,
17361741
&dMsgFlow_c::event008, &dMsgFlow_c::event009, &dMsgFlow_c::event010, &dMsgFlow_c::event011,
@@ -1742,6 +1747,12 @@ eventFunc dMsgFlow_c::mEventList[43] = {
17421747
&dMsgFlow_c::event032, &dMsgFlow_c::event033, &dMsgFlow_c::event034, &dMsgFlow_c::event035,
17431748
&dMsgFlow_c::event036, &dMsgFlow_c::event037, &dMsgFlow_c::event038, &dMsgFlow_c::event039,
17441749
&dMsgFlow_c::event040, &dMsgFlow_c::event041, &dMsgFlow_c::event042,
1750+
1751+
#if TARGET_PC
1752+
&dMsgFlow_c::event043,
1753+
&dMsgFlow_c::event044,
1754+
&dMsgFlow_c::event045,
1755+
#endif
17451756
};
17461757

17471758
int dMsgFlow_c::event000(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
@@ -2587,3 +2598,34 @@ int dMsgFlow_c::event041(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speak
25872598
int dMsgFlow_c::event042(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
25882599
return 1;
25892600
}
2601+
2602+
#if TARGET_PC
2603+
// HD additions
2604+
u16 dMsgFlow_c::query054(mesg_flow_node_branch* i_flowNode_p, fopAc_ac_c* i_speaker_p, int param_2) {
2605+
// stub
2606+
return 1;
2607+
}
2608+
2609+
u16 dMsgFlow_c::query055(mesg_flow_node_branch* i_flowNode_p, fopAc_ac_c* i_speaker_p, int param_2) {
2610+
// stub
2611+
return 1;
2612+
}
2613+
2614+
int dMsgFlow_c::event043(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
2615+
// stub
2616+
return 1;
2617+
}
2618+
2619+
int dMsgFlow_c::event044(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
2620+
// stub
2621+
// runs when choosing to "withdraw" from cave of shadows
2622+
// for now just have it reset to title, similar to original
2623+
JUTGamePad::C3ButtonReset::sResetSwitchPushing = true;
2624+
return 1;
2625+
}
2626+
2627+
int dMsgFlow_c::event045(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
2628+
// stub
2629+
return 1;
2630+
}
2631+
#endif

0 commit comments

Comments
 (0)