Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_shop_system.h
Go to the documentation of this file.
1#ifndef D_SHOP_D_SHOP_SYSTEM_H
2#define D_SHOP_D_SHOP_SYSTEM_H
3
4#include "d/actor/d_a_npc.h"
6#include "d/d_shop_camera.h"
7
9class STControl;
10
11class dShopSystem_c : public daNpcT_c {
12public:
13 enum {
14 /* 0x0 */ SEQ_WAIT,
15 /* 0x1 */ SEQ_START,
16 /* 0x2 */ SEQ_SELECT_WAIT,
18 /* 0x4 */ SEQ_SELECT,
19 /* 0x5 */ SEQ_MOVING,
20 /* 0x6 */ SEQ_DECIDE,
21 /* 0x7 */ SEQ_CHOOSE,
22 /* 0x8 */ SEQ_DECIDE_YES,
23 /* 0x9 */ SEQ_DECIDE_NO,
24 /* 0xA */ SEQ_FINISH,
25 };
26
27 enum {
29 };
30
68
69 /* 80197338 */ void initShopSystem();
70 /* 801975C0 */ void onFlag(int);
71 /* 801975DC */ void offFlag(int);
72 /* 801975F8 */ BOOL isFlag(int);
73 /* 80197618 */ void onSoldOutItemFlag(int);
74 /* 80197634 */ void offSoldOutItemFlag(int);
75 /* 80197650 */ BOOL isSoldOutItemFlag(int);
76 /* 80197670 */ int checkController(u8, dMsgFlow_c*);
77 /* 80197808 */ int chooseItem3(u8);
78 /* 80197DD0 */ int chooseItem5(u8);
79 /* 80198250 */ int chooseItem4(u8);
80 /* 80198444 */ int moveCursor(int, u8);
81 /* 80198488 */ int moveCursor0(int, u8);
82 /* 80198708 */ int moveCursor1(int, u8);
83 /* 80198878 */ int drawCursor();
84 /* 80198950 */ int itemRotate();
85 /* 80198A2C */ int itemZoom(cXyz*);
86 /* 801990B0 */ int seq_wait(fopAc_ac_c*, dMsgFlow_c*);
87 /* 801990B8 */ int seq_start(fopAc_ac_c*, dMsgFlow_c*);
88 /* 8019936C */ int seq_select_wait(fopAc_ac_c*, dMsgFlow_c*);
89 /* 801993C4 */ int seq_select_start(fopAc_ac_c*, dMsgFlow_c*);
90 /* 8019959C */ int seq_select(fopAc_ac_c*, dMsgFlow_c*);
91 /* 80199A18 */ int seq_moving(fopAc_ac_c*, dMsgFlow_c*);
92 /* 80199BF8 */ int seq_decide(fopAc_ac_c*, dMsgFlow_c*);
93 /* 80199D14 */ int seq_choose(fopAc_ac_c*, dMsgFlow_c*);
94 /* 80199E28 */ int seq_decide_yes(fopAc_ac_c*, dMsgFlow_c*);
95 /* 80199FA4 */ int seq_decide_no(fopAc_ac_c*, dMsgFlow_c*);
96 /* 8019A020 */ int seq_finish(fopAc_ac_c*, dMsgFlow_c*);
97 /* 8019A0C0 */ bool seq_event(fopAc_ac_c*, dMsgFlow_c*);
98 /* 8019A0D0 */ int shop_init(bool);
99 /* 8019A158 */ int shop_process(fopAc_ac_c*, dMsgFlow_c*);
100 /* 8019A238 */ void createShopItem(int);
101 /* 8019A344 */ void setSeq(u8);
102 /* 8019A354 */ void setSoldOutFlag();
103 /* 8019A364 */ void setSoldOut();
104 /* 8019A4F4 */ void setSoldOutItemHide();
105 /* 8019A564 */ void deleteObject();
106 /* 8019A5D0 */ int searchItemActor();
107 /* 8019AB00 */ int getFlowNodeNum();
108 /* 8019AB1C */ void setSellItemMax(u8);
109 /* 8019AB24 */ bool checkShopOpen();
110 /* 8019AB60 */ bool checkLeftTrigger(STControl*);
111 /* 8019AB84 */ bool checkRightTrigger(STControl*);
112 /* 8019ABA8 */ bool dpdMove();
113
114 void dummyWeakOrder(); // fake, used to fix weak function order in d_shop_system.cpp
115
116 /* 801974E4 */ virtual ~dShopSystem_c();
117 /* 8019ACF0 */ virtual bool getResName2(int) { return false; }
118 /* 8019ACE0 */ virtual int beforeStartSeqAction(dMsgFlow_c*, int) { return 1; }
119 /* 8019ACE8 */ virtual int beforeSelectSeqAction(dMsgFlow_c*, int) { return 1; }
120
121 bool chkSpMode() { return mSpMode == 1; }
122 void offSpMode() { mSpMode = 0; }
123 u8 getEventParamU8(int param_0) { return (mEventParam >> (3 - param_0) * 8) & 0xFF; }
124 void setEventParam(u32 param) { mEventParam = param; }
125
126private:
127 /* 0xE40 */ STControl* mpStick;
131 /* 0xF54 */ u32 mEventParam;
132 /* 0xF58 */ int field_0xf58;
133 /* 0xF5C */ int field_0xf5c;
134 /* 0xF60 */ int field_0xf60;
135 /* 0xF64 */ int field_0xf64;
136 /* 0xF68 */ s16 field_0xf68;
137 /* 0xF6A */ u16 mFlag;
138 /* 0xF6C */ u16 field_0xf6c;
139 /* 0xF6E */ u8 mCursorPos;
140 /* 0xF6F */ u8 mLastCursorPos;
141 /* 0xF70 */ u8 mSeq;
142 /* 0xF71 */ u8 field_0xf71;
143 /* 0xF72 */ u8 mWaitTimer;
144 /* 0xF73 */ u8 mSoldOutFlag;
146 /* 0xF75 */ u8 mSpMode;
147 /* 0xF76 */ u8 field_0xf76;
148 /* 0xF77 */ u8 field_0xf77;
149 /* 0xF78 */ u8 field_0xf78;
150 /* 0xF79 */ u8 field_0xf79;
151 /* 0xF7A */ u8 field_0xf7a;
152};
153
155
156#endif /* D_SHOP_D_SHOP_SYSTEM_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition d_lib.h:16
Definition d_select_cursor.h:26
Definition d_shop_item_ctrl.h:6
Definition d_shop_system.h:11
u8 mSeq
Definition d_shop_system.h:141
void dummyWeakOrder()
Definition d_shop_system.cpp:1621
int shop_process(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:1327
int seq_start(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:897
void setSoldOut()
Definition d_shop_system.cpp:1403
int checkController(u8, dMsgFlow_c *)
Definition d_shop_system.cpp:241
BOOL isFlag(int)
Definition d_shop_system.cpp:220
virtual ~dShopSystem_c()
Definition d_shop_system.cpp:192
bool checkShopOpen()
Definition d_shop_system.cpp:1636
u8 mSoldOutFlag
Definition d_shop_system.h:144
int chooseItem5(u8)
Definition d_shop_system.cpp:432
u8 mSoldOutItemFlags
Definition d_shop_system.h:145
int chooseItem4(u8)
Definition d_shop_system.cpp:547
u8 getEventParamU8(int param_0)
Definition d_shop_system.h:123
u8 field_0xf77
Definition d_shop_system.h:148
void offSpMode()
Definition d_shop_system.h:122
int seq_select_wait(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:967
u8 field_0xf71
Definition d_shop_system.h:142
STControl * mpStick
Definition d_shop_system.h:127
void offFlag(int)
Definition d_shop_system.cpp:215
u8 field_0xf79
Definition d_shop_system.h:150
int seq_finish(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:1292
int searchItemActor()
Definition d_shop_system.cpp:1472
int field_0xf5c
Definition d_shop_system.h:133
int chooseItem3(u8)
Definition d_shop_system.cpp:294
u8 mSpMode
Definition d_shop_system.h:146
u8 field_0xf78
Definition d_shop_system.h:149
dSelect_cursor_c * mpDrawCursor
Definition d_shop_system.h:128
bool checkRightTrigger(STControl *)
Definition d_shop_system.cpp:1654
bool seq_event(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:1305
int seq_select_start(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:978
virtual int beforeStartSeqAction(dMsgFlow_c *, int)
Definition d_shop_system.h:118
u16 mFlag
Definition d_shop_system.h:137
BOOL isSoldOutItemFlag(int)
Definition d_shop_system.cpp:235
int field_0xf58
Definition d_shop_system.h:132
bool dpdMove()
Definition d_shop_system.cpp:1659
bool chkSpMode()
Definition d_shop_system.h:121
u8 field_0xf7a
Definition d_shop_system.h:151
void createShopItem(int)
Definition d_shop_system.cpp:1360
void onFlag(int)
Definition d_shop_system.cpp:210
void setSoldOutFlag()
Definition d_shop_system.cpp:1398
void deleteObject()
Definition d_shop_system.cpp:1458
void setSellItemMax(u8)
Definition d_shop_system.cpp:1631
u8 mLastCursorPos
Definition d_shop_system.h:140
int seq_select(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:1030
u8 mWaitTimer
Definition d_shop_system.h:143
virtual bool getResName2(int)
Definition d_shop_system.h:117
int seq_moving(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:1137
void initShopSystem()
Definition d_shop_system.cpp:123
ShopCam_action_c mShopCamAction
Definition d_shop_system.h:130
int seq_choose(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:1212
int getFlowNodeNum()
Definition d_shop_system.cpp:1611
dShopItemCtrl_c mItemCtrl
Definition d_shop_system.h:129
u8 mCursorPos
Definition d_shop_system.h:139
int field_0xf64
Definition d_shop_system.h:135
u32 mEventParam
Definition d_shop_system.h:131
bool checkLeftTrigger(STControl *)
Definition d_shop_system.cpp:1648
int itemRotate()
Definition d_shop_system.cpp:719
void setSeq(u8)
Definition d_shop_system.cpp:1391
@ ITEM_MAX_e
Definition d_shop_system.h:28
void offSoldOutItemFlag(int)
Definition d_shop_system.cpp:230
s16 field_0xf68
Definition d_shop_system.h:136
int seq_wait(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:887
int itemZoom(cXyz *)
Definition d_shop_system.cpp:753
int seq_decide_no(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:1281
void onSoldOutItemFlag(int)
Definition d_shop_system.cpp:225
int shop_init(bool)
Definition d_shop_system.cpp:1310
void setSoldOutItemHide()
Definition d_shop_system.cpp:1444
u8 field_0xf76
Definition d_shop_system.h:147
u16 field_0xf6c
Definition d_shop_system.h:138
int seq_decide_yes(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:1238
void setEventParam(u32 param)
Definition d_shop_system.h:124
dShopSystem_c(daNpcT_faceMotionAnmData_c const *param_1, daNpcT_motionAnmData_c const *param_2, daNpcT_MotionSeqMngr_c::sequenceStepData_c const *param_3, int param_4, daNpcT_MotionSeqMngr_c::sequenceStepData_c const *param_5, int param_6, daNpcT_evtData_c const *param_7, char **param_8)
Definition d_shop_system.h:31
virtual int beforeSelectSeqAction(dMsgFlow_c *, int)
Definition d_shop_system.h:119
int drawCursor()
Definition d_shop_system.cpp:700
int moveCursor0(int, u8)
Definition d_shop_system.cpp:603
int moveCursor1(int, u8)
Definition d_shop_system.cpp:658
@ SEQ_WAIT
Definition d_shop_system.h:14
@ SEQ_MOVING
Definition d_shop_system.h:19
@ SEQ_SELECT_START
Definition d_shop_system.h:17
@ SEQ_DECIDE_NO
Definition d_shop_system.h:23
@ SEQ_SELECT
Definition d_shop_system.h:18
@ SEQ_SELECT_WAIT
Definition d_shop_system.h:16
@ SEQ_CHOOSE
Definition d_shop_system.h:21
@ SEQ_START
Definition d_shop_system.h:15
@ SEQ_DECIDE_YES
Definition d_shop_system.h:22
@ SEQ_FINISH
Definition d_shop_system.h:24
@ SEQ_DECIDE
Definition d_shop_system.h:20
int field_0xf60
Definition d_shop_system.h:134
int moveCursor(int, u8)
Definition d_shop_system.cpp:590
int seq_decide(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.cpp:1183
int(dShopSystem_c::* processFunc)(fopAc_ac_c *, dMsgFlow_c *)
Definition d_shop_system.h:154
Definition d_shop_camera.h:7
f32 field_0xcc
Definition d_shop_camera.h:66
s16 field_0xd8
Definition d_shop_camera.h:71
cXyz field_0xb0
Definition d_shop_camera.h:61
s16 field_0xd4
Definition d_shop_camera.h:69
fopAc_ac_c * field_0x28
Definition d_shop_camera.h:45
s16 field_0xd6
Definition d_shop_camera.h:70
ShopCamFunc mCamAction
Definition d_shop_camera.h:39
f32 field_0xc4
Definition d_shop_camera.h:64
s16 field_0xd0
Definition d_shop_camera.h:67
cXyz field_0x7c
Definition d_shop_camera.h:56
fopAc_ac_c * field_0x20
Definition d_shop_camera.h:43
f32 field_0x94
Definition d_shop_camera.h:58
fopAc_ac_c * field_0x34
Definition d_shop_camera.h:48
fopAc_ac_c * field_0x2c
Definition d_shop_camera.h:46
s16 field_0xd2
Definition d_shop_camera.h:68
cXyz field_0x88
Definition d_shop_camera.h:57
fopAc_ac_c * field_0x24
Definition d_shop_camera.h:44
fopAc_ac_c * field_0x1c
Definition d_shop_camera.h:42
f32 field_0xc0
Definition d_shop_camera.h:63
fopAc_ac_c * field_0x30
Definition d_shop_camera.h:47
bool field_0xda
Definition d_shop_camera.h:72
f32 field_0xc8
Definition d_shop_camera.h:65
fopAc_ac_c * field_0x18
Definition d_shop_camera.h:41
f32 z
Definition vec.h:11
f32 x
Definition vec.h:11
f32 y
Definition vec.h:11
Definition d_a_hozelda.cpp:20
Definition d_a_obj_sekizoa.cpp:318
Definition d_a_obj_sekizoa.cpp:98
Definition d_a_obj_sekizoa.cpp:195
Definition d_a_obj_sekizoa.cpp:105
Definition d_a_obj_sekizoa.cpp:95
Definition d_a_obj_sekizoa.cpp:107
Definition d_a_ep.cpp:19
int BOOL
Definition types.h:27
unsigned long u32
Definition types.h:10
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8