mirror of https://github.com/zeldaret/tp.git
2279 lines
70 KiB
C++
2279 lines
70 KiB
C++
//
|
|
// Generated By: dol2asm
|
|
// Translation Unit: d/shop/d_shop_system
|
|
//
|
|
|
|
#include "d/shop/d_shop_system.h"
|
|
#include "rel/d/a/tag/d_a_tag_shop_item/d_a_tag_shop_item.h"
|
|
#include "SSystem/SComponent/c_math.h"
|
|
#include "d/a/d_a_shop_item_static.h"
|
|
#include "d/com/d_com_inf_game.h"
|
|
#include "d/d_item.h"
|
|
#include "d/d_lib.h"
|
|
#include "d/d_procname.h"
|
|
#include "d/d_select_cursor.h"
|
|
#include "d/meter/d_meter2_info.h"
|
|
#include "d/meter/d_meter_HIO.h"
|
|
#include "d/msg/d_msg_object.h"
|
|
#include "dol2asm.h"
|
|
#include "dolphin/types.h"
|
|
#include "f_op/f_op_actor_mng.h"
|
|
#include "m_Do/m_Do_audio.h"
|
|
#include "m_Do/m_Do_controller_pad.h"
|
|
#include "m_Do/m_Do_lib.h"
|
|
|
|
//
|
|
// Forward References:
|
|
//
|
|
|
|
extern "C" static void dShopSystem_searchItemActor__FPvPv();
|
|
extern "C" static void dShopSystem_searchCameraActor__FPvPv();
|
|
extern "C" void initShopSystem__13dShopSystem_cFv();
|
|
extern "C" void __dt__13dShopSystem_cFv();
|
|
extern "C" void onFlag__13dShopSystem_cFi();
|
|
extern "C" void offFlag__13dShopSystem_cFi();
|
|
extern "C" void isFlag__13dShopSystem_cFi();
|
|
extern "C" void onSoldOutItemFlag__13dShopSystem_cFi();
|
|
extern "C" void offSoldOutItemFlag__13dShopSystem_cFi();
|
|
extern "C" void isSoldOutItemFlag__13dShopSystem_cFi();
|
|
extern "C" void checkController__13dShopSystem_cFUcP10dMsgFlow_c();
|
|
extern "C" void chooseItem3__13dShopSystem_cFUc();
|
|
extern "C" void chooseItem5__13dShopSystem_cFUc();
|
|
extern "C" void chooseItem4__13dShopSystem_cFUc();
|
|
extern "C" void moveCursor__13dShopSystem_cFiUc();
|
|
extern "C" void moveCursor0__13dShopSystem_cFiUc();
|
|
extern "C" void moveCursor1__13dShopSystem_cFiUc();
|
|
extern "C" void drawCursor__13dShopSystem_cFv();
|
|
extern "C" void itemRotate__13dShopSystem_cFv();
|
|
extern "C" void itemZoom__13dShopSystem_cFP4cXyz();
|
|
extern "C" bool seq_wait__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_start__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_select_wait__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_select_start__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_select__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_moving__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_decide__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_choose__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_decide_yes__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_decide_no__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_finish__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void seq_event__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void shop_init__13dShopSystem_cFb();
|
|
extern "C" void shop_process__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c();
|
|
extern "C" void createShopItem__13dShopSystem_cFi();
|
|
extern "C" void setSeq__13dShopSystem_cFUc();
|
|
extern "C" void setSoldOutFlag__13dShopSystem_cFv();
|
|
extern "C" void setSoldOut__13dShopSystem_cFv();
|
|
extern "C" void setSoldOutItemHide__13dShopSystem_cFv();
|
|
extern "C" void deleteObject__13dShopSystem_cFv();
|
|
extern "C" void searchItemActor__13dShopSystem_cFv();
|
|
extern "C" void getFlowNodeNum__13dShopSystem_cFv();
|
|
extern "C" void setSellItemMax__13dShopSystem_cFUc();
|
|
extern "C" void checkShopOpen__13dShopSystem_cFv();
|
|
extern "C" void checkLeftTrigger__13dShopSystem_cFP9STControl();
|
|
extern "C" void checkRightTrigger__13dShopSystem_cFP9STControl();
|
|
extern "C" bool dpdMove__13dShopSystem_cFv();
|
|
extern "C" void __sinit_d_shop_system_cpp();
|
|
extern "C" bool beforeStartSeqAction__13dShopSystem_cFP10dMsgFlow_ci();
|
|
extern "C" bool beforeSelectSeqAction__13dShopSystem_cFP10dMsgFlow_ci();
|
|
extern "C" bool getResName2__13dShopSystem_cFi();
|
|
extern "C" extern char const* const d_shop_d_shop_system__stringBase0;
|
|
|
|
//
|
|
// External References:
|
|
//
|
|
|
|
extern "C" void mDoLib_project__FP3VecP3Vec();
|
|
extern "C" void fopAc_IsActor__FPv();
|
|
extern "C" void fopAcIt_Judge__FPFPvPv_PvPv();
|
|
extern "C" void fopAcM_delete__FUi();
|
|
extern "C" void fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc();
|
|
extern "C" void fopAcM_searchActorDistance__FPC10fopAc_ac_cPC10fopAc_ac_c();
|
|
extern "C" void fopAcM_createItemForPresentDemo__FPC4cXyziUciiPC5csXyzPC4cXyz();
|
|
extern "C" void fpcEx_Search__FPFPvPv_PvPv();
|
|
extern "C" void fpcEx_IsExist__FUi();
|
|
extern "C" void fpcSch_JudgeByID__FPvPv();
|
|
extern "C" void setWaitParm__9STControlFssssffss();
|
|
extern "C" void init__9STControlFv();
|
|
extern "C" void checkTrigger__9STControlFv();
|
|
extern "C" void checkLeftTrigger__9STControlFv();
|
|
extern "C" void checkRightTrigger__9STControlFv();
|
|
extern "C" void checkUpTrigger__9STControlFv();
|
|
extern "C" void checkDownTrigger__9STControlFv();
|
|
extern "C" void onSwitch__12dSv_memBit_cFi();
|
|
extern "C" void isSwitch__12dSv_memBit_cCFi();
|
|
extern "C" void hide__12daItemBase_cFv();
|
|
extern "C" void set__12dDlst_list_cFRPP12dDlst_base_cRPP12dDlst_base_cP12dDlst_base_c();
|
|
extern "C" void checkItemGet__FUci();
|
|
extern "C" void ctrlBtk__8daNpcT_cFv();
|
|
extern "C" void ctrlJoint__8daNpcT_cFP8J3DJointP8J3DModel();
|
|
extern "C" void evtProc__8daNpcT_cFv();
|
|
extern "C" void setFootPos__8daNpcT_cFv();
|
|
extern "C" void setFootPrtcl__8daNpcT_cFP4cXyzff();
|
|
extern "C" bool checkCullDraw__8daNpcT_cFv();
|
|
extern "C" void twilight__8daNpcT_cFv();
|
|
extern "C" void evtOrder__8daNpcT_cFv();
|
|
extern "C" void evtChange__8daNpcT_cFv();
|
|
extern "C" void clrParam__8daNpcT_cFv();
|
|
extern "C" void setMotionAnm__8daNpcT_cFifi();
|
|
extern "C" void initTalk__8daNpcT_cFiPP10fopAc_ac_c();
|
|
extern "C" void decTmr__8daNpcT_cFv();
|
|
extern "C" void setCollision__8daNpcT_cFv();
|
|
extern "C" void setAttnPos__8daNpcT_cFv();
|
|
extern "C" void ctrlSubFaceMotion__8daNpcT_cFi();
|
|
extern "C" void afterMoved__8daNpcT_cFv();
|
|
extern "C" void beforeMove__8daNpcT_cFv();
|
|
extern "C" void action__8daNpcT_cFv();
|
|
extern "C" void setParam__8daNpcT_cFv();
|
|
extern "C" void drawOtherMdl__8daNpcT_cFv();
|
|
extern "C" void drawGhost__8daNpcT_cFv();
|
|
extern "C" bool drawDbgInfo__8daNpcT_cFv();
|
|
extern "C" bool checkRemoveJoint__8daNpcT_cFi();
|
|
extern "C" bool checkChangeJoint__8daNpcT_cFi();
|
|
extern "C" void afterJntAnm__8daNpcT_cFi();
|
|
extern "C" s32 getHeadJointNo__8daNpcT_cFv();
|
|
extern "C" s32 getNeckJointNo__8daNpcT_cFv();
|
|
extern "C" s32 getBackboneJointNo__8daNpcT_cFv();
|
|
extern "C" void setAfterTalkMotion__8daNpcT_cFv();
|
|
extern "C" bool evtCutProc__8daNpcT_cFv();
|
|
extern "C" bool evtEndProc__8daNpcT_cFv();
|
|
extern "C" bool evtTalk__8daNpcT_cFv();
|
|
extern "C" bool checkChangeEvt__8daNpcT_cFv();
|
|
extern "C" s32 getFootRJointNo__8daNpcT_cFv();
|
|
extern "C" s32 getFootLJointNo__8daNpcT_cFv();
|
|
extern "C" bool chkXYItems__8daNpcT_cFv();
|
|
extern "C" bool afterSetFaceMotionAnm__8daNpcT_cFiifi();
|
|
extern "C" void changeBtp__8daNpcT_cFPiPi();
|
|
extern "C" void changeBck__8daNpcT_cFPiPi();
|
|
extern "C" void getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c();
|
|
extern "C" bool afterSetMotionAnm__8daNpcT_cFiifi();
|
|
extern "C" void changeBtk__8daNpcT_cFPiPi();
|
|
extern "C" void changeAnm__8daNpcT_cFPiPi();
|
|
extern "C" void getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c();
|
|
extern "C" void __dt__8daNpcT_cFv();
|
|
extern "C" bool getEyeballLMaterialNo__8daNpcT_cFv();
|
|
extern "C" bool getEyeballRMaterialNo__8daNpcT_cFv();
|
|
extern "C" bool getEyeballMaterialNo__8daNpcT_cFv();
|
|
extern "C" void __ct__16dSelect_cursor_cFUcfP10JKRArchive();
|
|
extern "C" void setParam__16dSelect_cursor_cFfffff();
|
|
extern "C" void setScale__16dSelect_cursor_cFf();
|
|
extern "C" void addAlpha__16dSelect_cursor_cFv();
|
|
extern "C" void decAlpha__16dSelect_cursor_cFv();
|
|
extern "C" void
|
|
setCamDataIdx__16ShopCam_action_cFP10fopAc_ac_cP10fopAc_ac_cP10fopAc_ac_cP10fopAc_ac_cP4cXyzP4cXyz();
|
|
extern "C" void
|
|
setCamDataIdx2__16ShopCam_action_cFP10fopAc_ac_cP10fopAc_ac_cP10fopAc_ac_cP10fopAc_ac_cP10fopAc_ac_cP10fopAc_ac_cP10fopAc_ac_cP4cXyzP4cXyz();
|
|
extern "C" void setMasterCamCtrPos__16ShopCam_action_cFP4cXyz();
|
|
extern "C" void __dt__15dShopItemCtrl_cFv();
|
|
extern "C" void getCurrentPos__15dShopItemCtrl_cFi();
|
|
extern "C" void isHomePos__15dShopItemCtrl_cFi();
|
|
extern "C" void setRotateAnime__15dShopItemCtrl_cFi();
|
|
extern "C" void setZoomAnime__15dShopItemCtrl_cFiP4cXyzsb();
|
|
extern "C" void dMeter2Info_set2DVibration__Fv();
|
|
extern "C" void dMeter2Info_set2DVibrationM__Fv();
|
|
extern "C" void setShopWaitTimer__12dMsgObject_cFUc();
|
|
extern "C" void getStatus__12dMsgObject_cFv();
|
|
extern "C" void isMsgSendControl__12dMsgObject_cFv();
|
|
extern "C" void onMsgSend__12dMsgObject_cFv();
|
|
extern "C" void getMessageID__12dMsgObject_cFv();
|
|
extern "C" void doFlow__10dMsgFlow_cFP10fopAc_ac_cPP10fopAc_ac_ci();
|
|
extern "C" void getEventId__10dMsgFlow_cFPi();
|
|
extern "C" void query005__10dMsgFlow_cFP21mesg_flow_node_branchP10fopAc_ac_ci();
|
|
extern "C" void __mi__4cXyzCFRC3Vec();
|
|
extern "C" void cM_atan2s__Fff();
|
|
extern "C" void cLib_offsetPos__FP4cXyzPC4cXyzsPC4cXyz();
|
|
extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc();
|
|
extern "C" void* __nw__FUl();
|
|
extern "C" void __dl__FPv();
|
|
extern "C" void __ptmf_scall();
|
|
extern "C" void _savegpr_21();
|
|
extern "C" void _savegpr_27();
|
|
extern "C" void _savegpr_28();
|
|
extern "C" void _savegpr_29();
|
|
extern "C" void _restgpr_21();
|
|
extern "C" void _restgpr_27();
|
|
extern "C" void _restgpr_28();
|
|
extern "C" void _restgpr_29();
|
|
extern "C" extern void* __vt__9STControl[4];
|
|
extern "C" u8 m_cpadInfo__8mDoCPd_c[256];
|
|
extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
|
|
|
|
//
|
|
// Declarations:
|
|
//
|
|
|
|
/* ############################################################################################## */
|
|
/* 803BB898-803BB8A4 0189B8 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
|
|
SECTION_DATA static u8 cNullVec__6Z2Calc[12] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
|
|
/* 803BB8A4-803BB8C0 0189C4 001C+00 6/6 0/0 0/0 .data dShopSystem_itemActor */
|
|
SECTION_DATA static daTag_ShopItem_c* dShopSystem_itemActor[7] = {
|
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
|
};
|
|
|
|
/* 804506E8-804506F0 000168 0007+01 7/7 0/0 0/0 .sdata dShopSystem_itemNo */
|
|
SECTION_SDATA static u8 dShopSystem_itemNo[7] = {
|
|
NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM,
|
|
};
|
|
|
|
/* 80451058-8045105C 000558 0004+00 9/9 0/0 0/0 .sbss None */
|
|
static u8 data_80451058; // sSellItemMax
|
|
|
|
/* 8045105C-80451060 00055C 0004+00 6/6 0/0 0/0 .sbss dShopSystem_item_count */
|
|
static int dShopSystem_item_count;
|
|
|
|
/* 80451060-80451064 000560 0004+00 4/4 0/0 0/0 .sbss None */
|
|
static u8 data_80451060;
|
|
|
|
/* 80197098-80197270 1919D8 01D8+00 1/1 0/0 0/0 .text dShopSystem_searchItemActor__FPvPv
|
|
*/
|
|
static int dShopSystem_searchItemActor(void* param_0, void* param_1) {
|
|
if (fopAcM_IsActor(param_0) && fopAcM_GetName(param_0) == PROC_TAG_SHOPITM) {
|
|
if ((fopAcM_GetParam(param_1) & 0xF0000000) == (fopAcM_GetParam(param_0) & 0xF0000000) &&
|
|
dShopSystem_item_count < data_80451058) {
|
|
u8 param2 = (fopAcM_GetParam(param_0) >> 0x18) & 0xF;
|
|
|
|
if (dShopSystem_itemActor[0] != param_0 && dShopSystem_itemActor[1] != param_0 &&
|
|
dShopSystem_itemActor[2] != param_0 && dShopSystem_itemActor[3] != param_0 &&
|
|
dShopSystem_itemActor[4] != param_0 && dShopSystem_itemActor[5] != param_0 &&
|
|
dShopSystem_itemActor[6] != param_0) {
|
|
u8 sw = static_cast<fopAc_ac_c*>(param_0)->orig.angle.z;
|
|
u8 sw2 = ((u16)static_cast<fopAc_ac_c*>(param_0)->orig.angle.z) >> 8;
|
|
u8 item_no = fopAcM_GetParam(param_0) & 0xff;
|
|
|
|
if ((sw == 0xFF || !dComIfGs_isSaveSwitch(sw)) &&
|
|
(sw2 == 0xFF || dComIfGs_isSaveSwitch(sw2))) {
|
|
if (sw != 0xFF && item_no == HYLIA_SHIELD && checkItemGet(item_no, true)) {
|
|
dComIfGs_onSaveSwitch(sw);
|
|
} else {
|
|
if (param2 == 0) {
|
|
data_80451060 = 1;
|
|
dShopSystem_itemActor[dShopSystem_item_count] = (daTag_ShopItem_c*) param_0;
|
|
dShopSystem_itemNo[dShopSystem_item_count] = item_no;
|
|
} else if (dShopSystem_itemActor[param2 - 1] == NULL) {
|
|
dShopSystem_itemActor[param2 - 1] = (daTag_ShopItem_c*) param_0;
|
|
dShopSystem_itemNo[param2 - 1] = item_no;
|
|
}
|
|
dShopSystem_item_count++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 804506F0-804506F8 000170 0008+00 6/6 0/0 0/0 .sdata dShopSystem_cameraActor */
|
|
SECTION_SDATA static fopAc_ac_c* dShopSystem_cameraActor[2] = {NULL, NULL};
|
|
|
|
/* 80451064-80451068 000564 0004+00 5/5 0/0 0/0 .sbss dShopSystem_camera_count */
|
|
static int dShopSystem_camera_count;
|
|
|
|
/* 80197270-80197338 191BB0 00C8+00 1/1 0/0 0/0 .text dShopSystem_searchCameraActor__FPvPv */
|
|
static int dShopSystem_searchCameraActor(void* param_0, void* param_1) {
|
|
if (fopAcM_IsActor(param_0) && fopAcM_GetName(param_0) == PROC_TAG_SHOPCAM) {
|
|
if ((fopAcM_GetParam(param_1) & 0xf0000000) == (fopAcM_GetParam(param_0) & 0xf0000000) && dShopSystem_camera_count < 2) {
|
|
switch (fopAcM_GetParam(param_0) & 0xf) {
|
|
case 0:
|
|
if (dShopSystem_cameraActor[0] == NULL) {
|
|
dShopSystem_cameraActor[0] = (fopAc_ac_c*)param_0;
|
|
dShopSystem_camera_count++;
|
|
}
|
|
break;
|
|
case 1:
|
|
if (dShopSystem_cameraActor[1] == NULL) {
|
|
dShopSystem_cameraActor[1] = (fopAc_ac_c*)param_0;
|
|
dShopSystem_camera_count++;
|
|
}
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
|
|
/* 80197338-801974E4 191C78 01AC+00 0/0 0/0 19/19 .text initShopSystem__13dShopSystem_cFv
|
|
*/
|
|
void dShopSystem_c::initShopSystem() {
|
|
data_80451058 = 3;
|
|
data_80451060 = 0;
|
|
|
|
for (int i = 0; i < 7; i++) {
|
|
dShopSystem_itemActor[i] = NULL;
|
|
dShopSystem_itemNo[i] = NO_ITEM;
|
|
}
|
|
dShopSystem_item_count = 0;
|
|
|
|
for (int i = 0; i < 2; i++) {
|
|
dShopSystem_cameraActor[i] = NULL;
|
|
}
|
|
dShopSystem_camera_count = 0;
|
|
|
|
if (mpStick == NULL) {
|
|
mpStick = new STControl();
|
|
}
|
|
|
|
if (mpDrawCursor == NULL) {
|
|
mpDrawCursor = new dSelect_cursor_c(1, 1.0f, NULL);
|
|
mpDrawCursor->setParam(1.0f, 1.0f, 0.1f, 0.7f, 0.7f);
|
|
}
|
|
|
|
field_0xf64 = -1;
|
|
mEventParam = 0;
|
|
field_0xf58 = 0;
|
|
mFlag = 0;
|
|
mCursorPos = 0;
|
|
mLastCursorPos = 0;
|
|
field_0xf68 = 0;
|
|
mSeq = 0;
|
|
field_0xf71 = mSeq;
|
|
field_0xf79 = 0;
|
|
field_0xf7a = 0;
|
|
mWaitTimer = 0;
|
|
mSoldOutFlag = -1;
|
|
mSoldOutItemFlags = 0;
|
|
offSpMode();
|
|
field_0xf6c = 0;
|
|
field_0xf76 = 0;
|
|
field_0xf77 = 9;
|
|
field_0xf78 = -1;
|
|
mFlow.onNonStopJunpFlowFlag();
|
|
}
|
|
|
|
struct shop_item_data {
|
|
Vec mItemPos[3];
|
|
};
|
|
|
|
/* ############################################################################################## */
|
|
/* 803BB8C0-803BB8E4 0189E0 0024+00 1/0 0/0 0/0 .data item_seira_shop */
|
|
SECTION_DATA static shop_item_data item_seira_shop = {
|
|
{{110.0f, 150.0f, -115.0f}, {160.0f, 150.0f, -115.0f}, {210.0f, 150.0f, -115.0f}}};
|
|
|
|
#ifdef NONMATCHING
|
|
static processFunc process[22] = {
|
|
&dShopSystem_c::seq_wait,
|
|
&dShopSystem_c::seq_start,
|
|
&dShopSystem_c::seq_select_wait,
|
|
&dShopSystem_c::seq_select_start,
|
|
&dShopSystem_c::seq_select,
|
|
&dShopSystem_c::seq_moving,
|
|
&dShopSystem_c::seq_decide,
|
|
&dShopSystem_c::seq_choose,
|
|
&dShopSystem_c::seq_decide_yes,
|
|
&dShopSystem_c::seq_decide_no,
|
|
&dShopSystem_c::seq_finish,
|
|
(processFunc)&dShopSystem_c::seq_event,
|
|
};
|
|
#else
|
|
/* 803BB8E4-803BB8F0 -00001 000C+00 0/1 0/0 0/0 .data @4056 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4056[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_wait__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB8F0-803BB8FC -00001 000C+00 0/1 0/0 0/0 .data @4057 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4057[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_start__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB8FC-803BB908 -00001 000C+00 0/1 0/0 0/0 .data @4058 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4058[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_select_wait__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB908-803BB914 -00001 000C+00 0/1 0/0 0/0 .data @4059 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4059[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_select_start__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB914-803BB920 -00001 000C+00 0/1 0/0 0/0 .data @4060 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4060[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_select__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB920-803BB92C -00001 000C+00 0/1 0/0 0/0 .data @4061 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4061[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_moving__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB92C-803BB938 -00001 000C+00 0/1 0/0 0/0 .data @4062 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4062[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_decide__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB938-803BB944 -00001 000C+00 0/1 0/0 0/0 .data @4063 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4063[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_choose__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB944-803BB950 -00001 000C+00 0/1 0/0 0/0 .data @4064 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4064[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_decide_yes__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB950-803BB95C -00001 000C+00 0/1 0/0 0/0 .data @4065 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4065[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_decide_no__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB95C-803BB968 -00001 000C+00 0/1 0/0 0/0 .data @4066 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4066[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_finish__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB968-803BB974 -00001 000C+00 0/1 0/0 0/0 .data @4067 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DATA static void* lit_4067[3] = {
|
|
(void*)NULL,
|
|
(void*)0xFFFFFFFF,
|
|
(void*)seq_event__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c,
|
|
};
|
|
#pragma pop
|
|
|
|
/* 803BB974-803BBA7C 018A94 0090+78 1/2 0/0 0/0 .data process */
|
|
SECTION_DATA static u8 process[144 + 120 /* padding */] = {
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
/* padding */
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
};
|
|
#endif
|
|
|
|
/* 801974E4-801975C0 191E24 00DC+00 1/0 0/0 10/10 .text __dt__13dShopSystem_cFv */
|
|
dShopSystem_c::~dShopSystem_c() {
|
|
deleteObject();
|
|
data_80451058 = 0;
|
|
data_80451060 = 0;
|
|
|
|
for (int i = 0; i < 7; i++) {
|
|
dShopSystem_itemActor[i] = NULL;
|
|
dShopSystem_itemNo[i] = NO_ITEM;
|
|
}
|
|
dShopSystem_item_count = 0;
|
|
|
|
for (int i = 0; i < 2; i++) {
|
|
dShopSystem_cameraActor[i] = NULL;
|
|
}
|
|
dShopSystem_camera_count = 0;
|
|
}
|
|
|
|
/* 801975C0-801975DC 191F00 001C+00 6/6 0/0 0/0 .text onFlag__13dShopSystem_cFi */
|
|
void dShopSystem_c::onFlag(int flag) {
|
|
mFlag |= (u16)(1 << flag);
|
|
}
|
|
|
|
/* 801975DC-801975F8 191F1C 001C+00 7/7 0/0 0/0 .text offFlag__13dShopSystem_cFi */
|
|
void dShopSystem_c::offFlag(int flag) {
|
|
mFlag &= ~(u16)(1 << flag);
|
|
}
|
|
|
|
/* 801975F8-80197618 191F38 0020+00 8/8 1/1 0/0 .text isFlag__13dShopSystem_cFi */
|
|
BOOL dShopSystem_c::isFlag(int flag) {
|
|
return mFlag & (u16)(1 << flag) ? TRUE : FALSE;
|
|
}
|
|
|
|
/* 80197618-80197634 191F58 001C+00 1/1 0/0 0/0 .text onSoldOutItemFlag__13dShopSystem_cFi */
|
|
void dShopSystem_c::onSoldOutItemFlag(int flag) {
|
|
mSoldOutItemFlags |= (u8)(1 << flag);
|
|
}
|
|
|
|
/* 80197634-80197650 191F74 001C+00 1/1 0/0 0/0 .text offSoldOutItemFlag__13dShopSystem_cFi */
|
|
void dShopSystem_c::offSoldOutItemFlag(int flag) {
|
|
mSoldOutItemFlags &= ~(u8)(1 << flag);
|
|
}
|
|
|
|
/* 80197650-80197670 191F90 0020+00 2/2 0/0 0/0 .text isSoldOutItemFlag__13dShopSystem_cFi */
|
|
BOOL dShopSystem_c::isSoldOutItemFlag(int flag) {
|
|
return mSoldOutItemFlags & (u8)(1 << flag) ? TRUE : FALSE;
|
|
}
|
|
|
|
/* 80197670-80197808 191FB0 0198+00 3/3 0/0 0/0 .text
|
|
* checkController__13dShopSystem_cFUcP10dMsgFlow_c */
|
|
int dShopSystem_c::checkController(u8 seq, dMsgFlow_c* p_flow) {
|
|
if (mWaitTimer != 0) {
|
|
if (mDoCPd_c::getTrigA(0)) {
|
|
dMsgObject_setShopWaitTimer(1);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
if (!dpdMove()) {
|
|
mpStick->checkTrigger();
|
|
}
|
|
|
|
int control_status;
|
|
if (data_80451058 == 4) {
|
|
control_status = chooseItem4(seq);
|
|
} else if (data_80451058 == 5) {
|
|
control_status = chooseItem5(seq);
|
|
} else {
|
|
control_status = chooseItem3(seq);
|
|
}
|
|
|
|
if (control_status != 0) {
|
|
return control_status;
|
|
}
|
|
|
|
dMsgObject_c* msg = dMsgObject_getMsgObjectClass();
|
|
if (msg->getSelectPushFlag() != 0) {
|
|
return msg->getSelectPushFlag() == 2 ? 2 : 1;
|
|
}
|
|
|
|
if (mDoCPd_c::getTrigA(0)) {
|
|
if (msg->getStatus() != 6 && msg->getStatus() != 8 && msg->getStatus() != 9 &&
|
|
msg->getStatus() != 20 && seq != SEQ_WAIT) {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
if (mDoCPd_c::getTrigB(0)) {
|
|
if (seq != SEQ_SELECT_WAIT) {
|
|
mLastCursorPos = mCursorPos;
|
|
mCursorPos = 0;
|
|
}
|
|
|
|
if (!p_flow->isSelectMessage()) {
|
|
return 2;
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
|
|
/* 80197808-80197DD0 192148 05C8+00 1/1 0/0 0/0 .text chooseItem3__13dShopSystem_cFUc */
|
|
int dShopSystem_c::chooseItem3(u8 seq) {
|
|
u8 old_cursor = mLastCursorPos;
|
|
if (checkLeftTrigger(mpStick) && seq != SEQ_SELECT_WAIT) {
|
|
u8 cursor_pos = mCursorPos;
|
|
|
|
if (cursor_pos == 7) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = 7;
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto right;
|
|
} else if (seq != SEQ_START) {
|
|
if (mCursorPos != 0) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
}
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
|
|
return 3;
|
|
} else if (cursor_pos == 4) {
|
|
mLastCursorPos = cursor_pos;
|
|
mCursorPos = 0;
|
|
|
|
if (seq != SEQ_START) {
|
|
if (mCursorPos != 0) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
}
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
|
|
return 3;
|
|
} else if (cursor_pos != 0) {
|
|
mLastCursorPos = cursor_pos;
|
|
mCursorPos--;
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto right;
|
|
} else if (seq != SEQ_START) {
|
|
if (mCursorPos != 0) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
}
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
return 3;
|
|
}
|
|
}
|
|
|
|
right:
|
|
if (checkRightTrigger(mpStick) && seq != SEQ_SELECT_WAIT) {
|
|
u8 cursor_pos = mCursorPos;
|
|
|
|
if (cursor_pos != 7) {
|
|
if (cursor_pos != 3 && cursor_pos != 6) {
|
|
mLastCursorPos = cursor_pos;
|
|
mCursorPos++;
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto up;
|
|
} else if (seq != SEQ_START) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
return 4;
|
|
}
|
|
|
|
if (data_80451058 == 7) {
|
|
mLastCursorPos = cursor_pos;
|
|
mCursorPos = 7;
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto up;
|
|
} else if (seq != SEQ_START) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
return 4;
|
|
}
|
|
}
|
|
}
|
|
|
|
up:
|
|
if (data_80451058 >= 6) {
|
|
if (mpStick->checkUpTrigger() && seq != SEQ_SELECT_WAIT && mCursorPos <= 3) {
|
|
mLastCursorPos = mCursorPos;
|
|
mCursorPos += 3;
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto down;
|
|
} else if (seq != SEQ_START) {
|
|
if (mCursorPos != 0) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
}
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
|
|
return 5;
|
|
}
|
|
|
|
down:
|
|
if (mpStick->checkDownTrigger() && seq != SEQ_SELECT_WAIT) {
|
|
u8 cursor_pos = mCursorPos;
|
|
|
|
if (cursor_pos > 3 && cursor_pos <= 6) {
|
|
mLastCursorPos = cursor_pos;
|
|
mCursorPos -= 3;
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto ret;
|
|
} else if (seq != SEQ_START) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
return 6;
|
|
}
|
|
}
|
|
}
|
|
|
|
ret:
|
|
return 0;
|
|
}
|
|
|
|
/* 80197DD0-80198250 192710 0480+00 1/1 0/0 0/0 .text chooseItem5__13dShopSystem_cFUc */
|
|
int dShopSystem_c::chooseItem5(u8 seq) {
|
|
u8 old_cursor = mLastCursorPos;
|
|
if (checkLeftTrigger(mpStick) && seq != SEQ_SELECT_WAIT) {
|
|
u8 cursor_pos = mCursorPos;
|
|
|
|
if (cursor_pos == 3) {
|
|
mLastCursorPos = cursor_pos;
|
|
mCursorPos = 0;
|
|
if (seq != SEQ_START) {
|
|
if (mCursorPos != 0) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
}
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
return 3;
|
|
}
|
|
|
|
if (cursor_pos != 0) {
|
|
mLastCursorPos = cursor_pos;
|
|
mCursorPos--;
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto right;
|
|
} else if (seq != SEQ_START) {
|
|
if (mCursorPos != 0) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
}
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
return 3;
|
|
}
|
|
}
|
|
|
|
right:
|
|
if (checkRightTrigger(mpStick) && seq != SEQ_SELECT_WAIT) {
|
|
u8 cursor_pos = mCursorPos;
|
|
|
|
if (cursor_pos != 2 && cursor_pos != 5) {
|
|
mLastCursorPos = cursor_pos;
|
|
mCursorPos++;
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto up;
|
|
} else if (seq != SEQ_START) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
return 4;
|
|
}
|
|
}
|
|
|
|
up:
|
|
if (mpStick->checkUpTrigger() && seq != SEQ_SELECT_WAIT) {
|
|
u8 cursor_pos = mCursorPos;
|
|
|
|
if (cursor_pos == 3 || cursor_pos == 5) {
|
|
mLastCursorPos = cursor_pos;
|
|
|
|
if (mCursorPos == 3) {
|
|
mCursorPos = 1;
|
|
} else if (mCursorPos == 5) {
|
|
mCursorPos = 2;
|
|
}
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto down;
|
|
} else if (seq != SEQ_START) {
|
|
if (mCursorPos != 0) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
}
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
return 5;
|
|
}
|
|
}
|
|
|
|
down:
|
|
if (mpStick->checkDownTrigger() && seq != SEQ_SELECT_WAIT) {
|
|
u8 cursor_pos = mCursorPos;
|
|
|
|
if (cursor_pos == 1 || cursor_pos == 2) {
|
|
mLastCursorPos = cursor_pos;
|
|
|
|
if (mCursorPos == 1) {
|
|
mCursorPos = 3;
|
|
} else if (mCursorPos == 2) {
|
|
mCursorPos = 5;
|
|
}
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto ret;
|
|
} else if (seq != SEQ_START) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
return 6;
|
|
}
|
|
}
|
|
|
|
ret:
|
|
return 0;
|
|
}
|
|
|
|
/* 80198250-80198444 192B90 01F4+00 1/1 0/0 0/0 .text chooseItem4__13dShopSystem_cFUc */
|
|
int dShopSystem_c::chooseItem4(u8 seq) {
|
|
u8 old_cursor = mLastCursorPos;
|
|
if (checkLeftTrigger(mpStick) && seq != SEQ_SELECT_WAIT && mCursorPos != 0) {
|
|
mLastCursorPos = mCursorPos;
|
|
mCursorPos--;
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto right;
|
|
} else if (seq != SEQ_START) {
|
|
if (mCursorPos != 0) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
}
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
|
|
return 3;
|
|
}
|
|
|
|
right:
|
|
if (checkRightTrigger(mpStick) && seq != SEQ_SELECT_WAIT && mCursorPos < 4) {
|
|
mLastCursorPos = mCursorPos;
|
|
mCursorPos++;
|
|
|
|
if (mCursorPos != 0 && isFlag(mCursorPos - 1)) {
|
|
mCursorPos = mLastCursorPos;
|
|
mLastCursorPos = old_cursor;
|
|
goto ret;
|
|
} else if (seq != SEQ_START) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
|
|
return 4;
|
|
}
|
|
|
|
ret:
|
|
return 0;
|
|
}
|
|
|
|
/* 80198444-80198488 192D84 0044+00 5/5 0/0 0/0 .text moveCursor__13dShopSystem_cFiUc */
|
|
int dShopSystem_c::moveCursor(int control_status, u8 param_1) {
|
|
int cursor_status;
|
|
if (field_0xf60 >= 0) {
|
|
cursor_status = moveCursor0(control_status, param_1);
|
|
} else {
|
|
cursor_status = moveCursor1(control_status, param_1);
|
|
}
|
|
|
|
field_0xf6c = cursor_status;
|
|
return cursor_status;
|
|
}
|
|
|
|
/* 80198488-80198708 192DC8 0280+00 1/1 0/0 0/0 .text moveCursor0__13dShopSystem_cFiUc */
|
|
int dShopSystem_c::moveCursor0(int control_status, u8 param_1) {
|
|
offFlag(7);
|
|
|
|
switch (control_status) {
|
|
case 3:
|
|
if (mCursorPos == 0) {
|
|
return getEventParamU8(mCursorPos) + 0x52;
|
|
}
|
|
|
|
return (getEventParamU8(mCursorPos) - 1) * 2 + 0x66;
|
|
|
|
case 4:
|
|
if (mCursorPos == 0) {
|
|
return getEventParamU8(mCursorPos) + 0x52;
|
|
}
|
|
|
|
return (getEventParamU8(mCursorPos) - 1) * 2 + 0x66;
|
|
|
|
case 7:
|
|
if (mCursorPos == 0) {
|
|
return getEventParamU8(mCursorPos) + 0x52;
|
|
}
|
|
|
|
return (getEventParamU8(mCursorPos) - 1) * 2 + 0x66;
|
|
|
|
case 1:
|
|
if (mCursorPos == 0) {
|
|
return getEventParamU8(mCursorPos) + 0x52;
|
|
}
|
|
|
|
if (param_1 != 2) {
|
|
return (getEventParamU8(mCursorPos) - 1) * 2 + 0x65;
|
|
}
|
|
|
|
return (getEventParamU8(mCursorPos) - 1) * 2 + 0x66;
|
|
|
|
case 2:
|
|
onFlag(7);
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
|
|
if (mCursorPos == 0) {
|
|
return getEventParamU8(mCursorPos) + 0x52;
|
|
}
|
|
|
|
if (param_1 != 2) {
|
|
return (getEventParamU8(mCursorPos) - 1) * 2 + 0x65;
|
|
}
|
|
|
|
return (getEventParamU8(mCursorPos) - 1) * 2 + 0x66;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* 80198708-80198878 193048 0170+00 1/1 0/0 0/0 .text moveCursor1__13dShopSystem_cFiUc */
|
|
int dShopSystem_c::moveCursor1(int control_status, u8 param_1) {
|
|
offFlag(7);
|
|
|
|
switch (control_status) {
|
|
case 3:
|
|
case 4:
|
|
case 5:
|
|
case 6:
|
|
case 7:
|
|
if (mCursorPos == 0) {
|
|
return getFlowNodeNum() + 1;
|
|
}
|
|
|
|
return mItemCtrl.getMessageIndex(mCursorPos - 1) + 1;
|
|
|
|
case 1:
|
|
if (mCursorPos == 0) {
|
|
return getFlowNodeNum() + 1;
|
|
} else if (param_1 != 2) {
|
|
return mItemCtrl.getMessageIndex(mCursorPos - 1);
|
|
}
|
|
|
|
return mItemCtrl.getMessageIndex(mCursorPos - 1) + 1;
|
|
|
|
case 2:
|
|
onFlag(7);
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
|
|
if (mCursorPos == 0) {
|
|
return getFlowNodeNum() + 1;
|
|
} else if (param_1 != 2) {
|
|
return mItemCtrl.getMessageIndex(mCursorPos - 1);
|
|
}
|
|
|
|
return mItemCtrl.getMessageIndex(mCursorPos - 1) + 1;
|
|
|
|
default:
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
/* 80198878-80198950 1931B8 00D8+00 0/0 0/0 9/9 .text drawCursor__13dShopSystem_cFv */
|
|
int dShopSystem_c::drawCursor() {
|
|
if ((mSeq == 4 || mSeq == 5 ||
|
|
((mSeq == 6 || mSeq == SEQ_SELECT_WAIT) && isFlag(mCursorPos - 1))) &&
|
|
mCursorPos != 0 && mItemCtrl.isHomePos(mCursorPos - 1)) {
|
|
mpDrawCursor->addAlpha();
|
|
} else {
|
|
mpDrawCursor->decAlpha();
|
|
}
|
|
|
|
mpDrawCursor->setScale(g_cursorHIO.mShopCursorScale);
|
|
if (mCursorPos != 0) {
|
|
dComIfGd_set2DOpa(mpDrawCursor);
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
/* 80198950-80198A2C 193290 00DC+00 0/0 0/0 9/9 .text itemRotate__13dShopSystem_cFv */
|
|
int dShopSystem_c::itemRotate() {
|
|
u8 item_index = 0;
|
|
u8 cursor_pos = mCursorPos;
|
|
|
|
if (cursor_pos != 0 && mSeq != SEQ_WAIT) {
|
|
if (dShopSystem_itemNo[cursor_pos - 1] == ARMOR) {
|
|
int tmp_index;
|
|
if (isFlag(8) == false) {
|
|
tmp_index = 0;
|
|
} else {
|
|
tmp_index = mCursorPos;
|
|
}
|
|
item_index = tmp_index;
|
|
} else {
|
|
bool no_rotate = false;
|
|
int tmp_index;
|
|
if (isFlag(cursor_pos - 1) || isSoldOutItemFlag(mCursorPos - 1)) {
|
|
no_rotate = true;
|
|
}
|
|
|
|
if (no_rotate) {
|
|
tmp_index = 0;
|
|
} else {
|
|
tmp_index = mCursorPos;
|
|
}
|
|
item_index = tmp_index;
|
|
}
|
|
}
|
|
|
|
mItemCtrl.setRotateAnime(item_index);
|
|
return 1;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
|
|
/* 80198A2C-801990B0 19336C 0684+00 0/0 0/0 9/9 .text itemZoom__13dShopSystem_cFP4cXyz */
|
|
int dShopSystem_c::itemZoom(cXyz* param_0) {
|
|
cXyz local_1c;
|
|
|
|
if (field_0xf60 >= 0) {
|
|
local_1c.set(*param_0);
|
|
|
|
if (dShopSystem_itemNo[mCursorPos - 1] == OIL_BOTTLE) {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c,
|
|
g_cursorHIO.mSeraShopObjZoomAngleX + -5000,
|
|
isFlag(8) ? true : false);
|
|
} else {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c, g_cursorHIO.mSeraShopObjZoomAngleX,
|
|
isFlag(8) ? true : false);
|
|
}
|
|
} else {
|
|
cXyz local_28;
|
|
cXyz local_34;
|
|
|
|
if (dShopSystem_itemActor[1] != NULL && dShopSystem_cameraActor[1] != NULL) {
|
|
cXyz local_40;
|
|
local_40.set(dShopSystem_itemActor[1]->orig.pos);
|
|
|
|
f32 tmp_05 = 0.5f;
|
|
if (data_80451058 == 4) {
|
|
if (dShopSystem_itemActor[2] != NULL) {
|
|
f32 tmp = (dShopSystem_itemActor[2]->orig.pos.x +
|
|
dShopSystem_itemActor[1]->orig.pos.x);
|
|
local_40.x = tmp * tmp_05;
|
|
|
|
f32 tmp2 = (dShopSystem_itemActor[2]->orig.pos.y +
|
|
dShopSystem_itemActor[1]->orig.pos.y);
|
|
local_40.y = tmp2 * tmp_05;
|
|
|
|
f32 tmp3 = (dShopSystem_itemActor[2]->orig.pos.z +
|
|
dShopSystem_itemActor[1]->orig.pos.z);
|
|
local_40.z = tmp3 * tmp_05;
|
|
}
|
|
} else if (data_80451058 == 5) {
|
|
f32 tmp = (dShopSystem_itemActor[2]->orig.pos.x +
|
|
dShopSystem_itemActor[3]->orig.pos.x);
|
|
local_40.x = tmp * tmp_05;
|
|
|
|
local_40.y = dShopSystem_itemActor[0]->orig.pos.y;
|
|
|
|
f32 tmp3 = (dShopSystem_itemActor[2]->orig.pos.z +
|
|
dShopSystem_itemActor[3]->orig.pos.z);
|
|
local_40.z = tmp3 * tmp_05;
|
|
}
|
|
|
|
cXyz local_4c = local_40 - dShopSystem_cameraActor[1]->current.pos;
|
|
s16 atan = cM_atan2s(local_4c.x, local_4c.z);
|
|
|
|
if (!strcmp("R_SP01", dComIfGp_getStartStageName())) {
|
|
local_34.set(g_cursorHIO.mObjZoom.x, g_cursorHIO.mObjZoom.y + -25.0f,
|
|
g_cursorHIO.mObjZoom.z + 150.0f);
|
|
} else {
|
|
if (field_0xf77 == 5) {
|
|
if (dShopSystem_itemNo[mCursorPos - 1] == ARROW_10 ||
|
|
dShopSystem_itemNo[mCursorPos - 1] == ARROW_20 ||
|
|
dShopSystem_itemNo[mCursorPos - 1] == ARROW_30) {
|
|
local_34.set(g_cursorHIO.mObjZoom.x, -50.0f + g_cursorHIO.mObjZoom.y + 5.0f,
|
|
(g_cursorHIO.mObjZoom.z + 250.0f) - 60.0f);
|
|
} else {
|
|
local_34.set(g_cursorHIO.mObjZoom.x,
|
|
-50.0f + g_cursorHIO.mObjZoom.y + 20.0f,
|
|
(g_cursorHIO.mObjZoom.z + 250.0f) - 60.0f);
|
|
}
|
|
} else if (mCursorPos == 7) {
|
|
local_34.set(g_cursorHIO.mMagicArmorObjZoom.x,
|
|
g_cursorHIO.mMagicArmorObjZoom.y + -130.0f,
|
|
g_cursorHIO.mMagicArmorObjZoom.z + 215.0f);
|
|
} else {
|
|
local_34.set(g_cursorHIO.mObjZoom.x, g_cursorHIO.mObjZoom.y + -50.0f,
|
|
g_cursorHIO.mObjZoom.z + 250.0f);
|
|
}
|
|
}
|
|
|
|
cLib_offsetPos(&local_28, &dShopSystem_cameraActor[1]->current.pos, atan,
|
|
&local_34);
|
|
if (data_80451058 == 6 || data_80451058 == 5) {
|
|
param_0->y += 15.0f;
|
|
}
|
|
local_1c.set(local_28.x + param_0->x, local_28.y + param_0->y, local_28.z + param_0->z);
|
|
} else {
|
|
local_28.set(*param_0);
|
|
local_1c.set(*param_0);
|
|
}
|
|
|
|
u8 dvar1 = field_0xf77;
|
|
if (dvar1 == 1) {
|
|
if (dShopSystem_itemNo[mCursorPos - 1] == OIL_BOTTLE) {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c,
|
|
g_cursorHIO.mShopObjZoomAngleX + -7000,
|
|
isFlag(8) ? true : false);
|
|
} else {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c, g_cursorHIO.mShopObjZoomAngleX,
|
|
isFlag(8) ? true : false);
|
|
}
|
|
} else if (dvar1 == 2) {
|
|
if (dShopSystem_itemNo[mCursorPos - 1] == RED_BOTTLE) {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c, g_cursorHIO.mShopObjZoomAngleX - 3000,
|
|
isFlag(8) ? true : false);
|
|
} else {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c, g_cursorHIO.mShopObjZoomAngleX,
|
|
isFlag(8) ? true : false);
|
|
}
|
|
} else if (dvar1 == 5) {
|
|
if (dShopSystem_itemNo[mCursorPos - 1] == ARROW_10 ||
|
|
dShopSystem_itemNo[mCursorPos - 1] == ARROW_20 ||
|
|
dShopSystem_itemNo[mCursorPos - 1] == ARROW_30) {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c, g_cursorHIO.mShopObjZoomAngleX - 4000,
|
|
isFlag(8) ? true : false);
|
|
} else {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c, g_cursorHIO.mShopObjZoomAngleX - 2000,
|
|
isFlag(8) ? true : false);
|
|
}
|
|
} else if (mCursorPos == 7) {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c, g_cursorHIO.mMagicArmorObjZoomAngleX,
|
|
isFlag(8) ? true : false);
|
|
} else if (data_80451058 == 7) {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c, g_cursorHIO.mShopObjZoomAngleX - 3000,
|
|
isFlag(8) ? true : false);
|
|
} else {
|
|
mItemCtrl.setZoomAnime(mCursorPos, &local_1c, g_cursorHIO.mShopObjZoomAngleX,
|
|
isFlag(8) ? true : false);
|
|
}
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
/* 801990B0-801990B8 1939F0 0008+00 1/0 0/0 0/0 .text
|
|
* seq_wait__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_wait(fopAc_ac_c* param_0, dMsgFlow_c* param_1) {
|
|
return 0;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
|
|
inline void pos3Dto2D(Vec* a, Vec* b) {
|
|
mDoLib_project(a, b);
|
|
}
|
|
|
|
/* 801990B8-8019936C 1939F8 02B4+00 1/0 0/0 0/0 .text
|
|
* seq_start__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_start(fopAc_ac_c* actor, dMsgFlow_c* p_flow) {
|
|
if (field_0xf79 != 0) {
|
|
dComIfGp_setDoStatusForce(0, 0);
|
|
dComIfGp_setAStatusForce(0, 0);
|
|
field_0xf79 = 0;
|
|
}
|
|
|
|
cXyz pos3d;
|
|
cXyz pos2d;
|
|
pos3d.set(mItemCtrl.getCurrentPos(0));
|
|
pos3Dto2D(&pos3d, &pos2d);
|
|
mpDrawCursor->setPos(pos2d.x, pos2d.y + g_cursorHIO.mShopCursorOffsetY);
|
|
|
|
if (chkSpMode() && !beforeStartSeqAction(p_flow, field_0xf5c)) {
|
|
return 0;
|
|
} else {
|
|
if (dMsgObject_c::isMsgSendControl()) {
|
|
dComIfGp_setDoStatusForce(0, 0);
|
|
dComIfGp_setAStatusForce(0x2A, 0);
|
|
|
|
int control_status = checkController(SEQ_WAIT, p_flow);
|
|
if (control_status != 0) {
|
|
dMsgObject_c::onMsgSend();
|
|
int cursor_status = moveCursor(control_status, 0);
|
|
|
|
if (chkSpMode()) {
|
|
if (mCursorPos != 0) {
|
|
field_0xf5c = cursor_status;
|
|
mShopCamAction.setCameraSpeed(0.0f, 0.0f, 0.0f, 0.0f);
|
|
setSeq(SEQ_SELECT);
|
|
} else if (p_flow->doFlow(actor, NULL, cursor_status)) {
|
|
mShopCamAction.setCameraSpeed(0.0f, 0.0f, 0.0f, 0.0f);
|
|
setSeq(SEQ_FINISH);
|
|
}
|
|
} else if (p_flow->doFlow(actor, NULL, cursor_status)) {
|
|
if (mCursorPos == 0) {
|
|
setSeq(SEQ_FINISH);
|
|
} else {
|
|
setSeq(SEQ_SELECT);
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
if (p_flow->doFlow(actor, NULL, 0)) {
|
|
int itemNo;
|
|
if (mFlow.getEventId(&itemNo) == 1) {
|
|
if (field_0xd90 == -1) {
|
|
field_0xd90 = fopAcM_createItemForPresentDemo(¤t.pos, itemNo,
|
|
0, -1, -1, NULL, NULL);
|
|
}
|
|
|
|
if (fpcEx_IsExist(field_0xd90)) {
|
|
field_0xe30 = 1;
|
|
evtChange();
|
|
return 1;
|
|
} else {
|
|
return 0;
|
|
}
|
|
} else {
|
|
return 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* 8019936C-801993C4 193CAC 0058+00 1/0 0/0 0/0 .text
|
|
* seq_select_wait__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_select_wait(fopAc_ac_c*, dMsgFlow_c*) {
|
|
if (mItemCtrl.isHomePos(mCursorPos - 1)) {
|
|
setSoldOut();
|
|
setSeq(SEQ_SELECT);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* 801993C4-8019959C 193D04 01D8+00 1/0 0/0 0/0 .text
|
|
* seq_select_start__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_select_start(fopAc_ac_c*, dMsgFlow_c*) {
|
|
if (field_0xf60 < 0 && field_0xf76 == 0 && dShopSystem_item_count != -1) {
|
|
if (dShopSystem_item_count != data_80451058) {
|
|
return 0;
|
|
}
|
|
searchItemActor();
|
|
}
|
|
|
|
if (isFlag(mCursorPos - 1)) {
|
|
switch (mCursorPos) {
|
|
case 1:
|
|
mCursorPos = 2;
|
|
if (isFlag(mCursorPos - 1)) {
|
|
mCursorPos = 3;
|
|
if (isFlag(mCursorPos - 1)) {
|
|
mCursorPos = 0;
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 2:
|
|
mCursorPos = 1;
|
|
if (isFlag(mCursorPos - 1)) {
|
|
mCursorPos = 3;
|
|
if (isFlag(mCursorPos - 1)) {
|
|
mCursorPos = 0;
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 3:
|
|
mCursorPos = 2;
|
|
if (isFlag(mCursorPos - 1)) {
|
|
mCursorPos = 1;
|
|
if (isFlag(mCursorPos - 1)) {
|
|
mCursorPos = 0;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
int cursor_status = moveCursor(4, 0);
|
|
initTalk(cursor_status, NULL);
|
|
setSeq(SEQ_SELECT);
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* 8019959C-80199A18 193EDC 047C+00 1/0 0/0 0/0 .text
|
|
* seq_select__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_select(fopAc_ac_c* actor, dMsgFlow_c* p_flow) {
|
|
if (chkSpMode() && !beforeSelectSeqAction(p_flow, field_0xf5c)) {
|
|
return 0;
|
|
}
|
|
|
|
if (field_0xf76 != 0) {
|
|
field_0xf76 = 0;
|
|
}
|
|
|
|
int control_status = checkController(SEQ_START, p_flow);
|
|
dComIfGp_setDoStatusForce(0x22, 0);
|
|
dComIfGp_setAStatusForce(0x2A, 0);
|
|
|
|
if (control_status != 0) {
|
|
int cursor_status = moveCursor(control_status, 1);
|
|
|
|
int spMode = chkSpMode();
|
|
if (spMode && control_status == 2) {
|
|
field_0xf5c = cursor_status;
|
|
mShopCamAction.setCameraSpeed(0.0f, 0.0f, 0.0f, 0.0f);
|
|
setSeq(SEQ_FINISH);
|
|
} else if (spMode && mCursorPos == 0) {
|
|
field_0xf5c = cursor_status;
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
mShopCamAction.setCameraSpeed(0.0f, 0.0f, 0.0f, 0.0f);
|
|
setSeq(SEQ_START);
|
|
} else if (p_flow->doFlow(actor, NULL, cursor_status)) {
|
|
if (control_status == 3) {
|
|
if (mCursorPos != 0) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
}
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
} else if (control_status == 4 || control_status == 5 || control_status == 6) {
|
|
mDoAud_seStart(Z2SE_SY_TALK_NEXT, NULL, 0, 0);
|
|
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
|
|
dComIfGp_setMesgCancelButton(1);
|
|
|
|
if (control_status == 1) {
|
|
if (!isFlag(mCursorPos - 1) && !isSoldOutItemFlag(mCursorPos - 1)) {
|
|
onFlag(8);
|
|
}
|
|
dMeter2Info_set2DVibrationM();
|
|
setSeq(SEQ_DECIDE);
|
|
} else if (control_status == 2) {
|
|
setSeq(SEQ_FINISH);
|
|
} else if (mCursorPos == 0) {
|
|
setSeq(SEQ_START);
|
|
} else {
|
|
field_0xf68 = 0;
|
|
setSeq(SEQ_MOVING);
|
|
|
|
if (mLastCursorPos != 0) {
|
|
return 0;
|
|
}
|
|
}
|
|
} else if (control_status == 3 || control_status == 4 || control_status == 5 ||
|
|
control_status == 6 || control_status == 7 || control_status == 2) {
|
|
if (mLastCursorPos == 7) {
|
|
mLastCursorPos = mCursorPos;
|
|
mCursorPos = 7;
|
|
} else {
|
|
mCursorPos = mLastCursorPos;
|
|
}
|
|
|
|
field_0xf7a = 0;
|
|
|
|
if (control_status == 2) {
|
|
mShopCamAction.SetSelectIdx(mCursorPos);
|
|
}
|
|
}
|
|
} else {
|
|
p_flow->doFlow(actor, NULL, 0);
|
|
}
|
|
|
|
u8 old_cursor = 0;
|
|
if (mCursorPos != 0) {
|
|
old_cursor = mCursorPos;
|
|
} else if (mLastCursorPos != 0) {
|
|
old_cursor = mLastCursorPos;
|
|
}
|
|
|
|
if (old_cursor != 0) {
|
|
cXyz pos3d;
|
|
cXyz pos2d;
|
|
pos3d.set(mItemCtrl.getCurrentPos(old_cursor - 1));
|
|
pos3Dto2D(&pos3d, &pos2d);
|
|
|
|
if (old_cursor == 7) {
|
|
pos2d.x += g_cursorHIO.mMagicArmorCursorOffsetX;
|
|
pos2d.y += g_cursorHIO.mMagicArmorCursorOffsetY;
|
|
} else {
|
|
pos2d.y += g_cursorHIO.mShopCursorOffsetY;
|
|
}
|
|
|
|
mpDrawCursor->setPos(pos2d.x, pos2d.y);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
|
|
/* 80199A18-80199BF8 194358 01E0+00 1/0 0/0 0/0 .text
|
|
* seq_moving__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_moving(fopAc_ac_c*, dMsgFlow_c*) {
|
|
field_0xf68++;
|
|
|
|
cXyz last_pos3d;
|
|
cXyz pos3d;
|
|
cXyz last_pos2d;
|
|
cXyz pos2d;
|
|
|
|
pos3d.set(mItemCtrl.getCurrentPos(mCursorPos - 1));
|
|
pos3Dto2D(&pos3d, &pos2d);
|
|
|
|
if (mCursorPos == 7) {
|
|
pos2d.x += g_cursorHIO.mMagicArmorCursorOffsetX;
|
|
pos2d.y += g_cursorHIO.mMagicArmorCursorOffsetY;
|
|
} else {
|
|
pos2d.y += g_cursorHIO.mShopCursorOffsetY;
|
|
}
|
|
|
|
if (mLastCursorPos != 0) {
|
|
last_pos3d.set(mItemCtrl.getCurrentPos(mLastCursorPos - 1));
|
|
pos3Dto2D(&last_pos3d, &last_pos2d);
|
|
|
|
if (mLastCursorPos == 7) {
|
|
last_pos2d.x += g_cursorHIO.mMagicArmorCursorOffsetX;
|
|
last_pos2d.y += g_cursorHIO.mMagicArmorCursorOffsetY;
|
|
} else {
|
|
last_pos2d.y += g_cursorHIO.mShopCursorOffsetY;
|
|
}
|
|
|
|
f32 tmp = (f32)(field_0xf68 * field_0xf68) / 9.0f;
|
|
mpDrawCursor->setPos(last_pos2d.x + tmp * (pos2d.x - last_pos2d.x),
|
|
last_pos2d.y + tmp * (pos2d.y - last_pos2d.y));
|
|
|
|
} else {
|
|
mpDrawCursor->setPos(pos2d.x, pos2d.y);
|
|
}
|
|
|
|
if (field_0xf68 >= 3) {
|
|
setSeq(SEQ_SELECT);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* 80199BF8-80199D14 194538 011C+00 1/0 0/0 0/0 .text
|
|
* seq_decide__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_decide(fopAc_ac_c* actor, dMsgFlow_c* p_flow) {
|
|
int control_status = checkController(SEQ_SELECT_WAIT, p_flow);
|
|
|
|
dComIfGp_setDoStatusForce(0x22, 0);
|
|
if (!p_flow->isSelectMessage()) {
|
|
dComIfGp_setAStatusForce(0x2A, 0);
|
|
} else if (dMsgObject_getMsgObjectClass()->getSelectCancelPos() != 0) {
|
|
dComIfGp_setAStatusForce(0x2A, 0);
|
|
}
|
|
|
|
if (control_status != 0) {
|
|
int cursor_status = moveCursor(control_status, 2);
|
|
|
|
if (p_flow->doFlow(actor, NULL, cursor_status)) {
|
|
offFlag(8);
|
|
setSeq(SEQ_SELECT_WAIT);
|
|
} else if (p_flow->isSelectMessage()) {
|
|
field_0xf58 = control_status;
|
|
setSeq(SEQ_CHOOSE);
|
|
}
|
|
} else {
|
|
p_flow->doFlow(actor, NULL, 0);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* 80199D14-80199E28 194654 0114+00 1/0 0/0 0/0 .text
|
|
* seq_choose__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_choose(fopAc_ac_c* actor, dMsgFlow_c* p_flow) {
|
|
dComIfGp_setDoStatusForce(0x22, 0);
|
|
if (!p_flow->isSelectMessage()) {
|
|
dComIfGp_setAStatusForce(0x2A, 0);
|
|
} else if (dMsgObject_getMsgObjectClass()->getSelectCancelPos() != 0) {
|
|
dComIfGp_setAStatusForce(0x2A, 0);
|
|
}
|
|
|
|
p_flow->doFlow(actor, NULL, 0);
|
|
|
|
int select_num = p_flow->getSelectNum();
|
|
if (dMsgObject_c::getStatus() != 6 && dMsgObject_c::getStatus() != 8 &&
|
|
dMsgObject_c::getStatus() != 9 && dMsgObject_c::getStatus() != 20) {
|
|
if ((u16)select_num == 0) {
|
|
setSeq(SEQ_DECIDE_YES);
|
|
} else {
|
|
setSeq(SEQ_DECIDE_NO);
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* 80199E28-80199FA4 194768 017C+00 1/0 0/0 0/0 .text
|
|
* seq_decide_yes__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_decide_yes(fopAc_ac_c* actor, dMsgFlow_c* p_flow) {
|
|
if (dMsgObject_getMessageID() == 0x1B82) {
|
|
mShopCamAction.SetSelectIdx(0);
|
|
field_0xf76 = 1;
|
|
}
|
|
|
|
int itemNo;
|
|
if (mFlow.getEventId(&itemNo) == 1) {
|
|
if (p_flow->doFlow(actor, NULL, 0)) {
|
|
if (field_0xd90 == -1) {
|
|
field_0xd90 = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1,
|
|
-1, NULL, NULL);
|
|
}
|
|
|
|
if (fpcEx_IsExist(field_0xd90)) {
|
|
offFlag(8);
|
|
setSoldOutItemHide();
|
|
field_0xe30 = 1;
|
|
evtChange();
|
|
return 2;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
} else {
|
|
int flow;
|
|
if (field_0xf60 >= 0) {
|
|
flow = 100;
|
|
} else {
|
|
flow = mItemCtrl.getMessageIndex(mCursorPos - 1) + 1;
|
|
}
|
|
|
|
if (p_flow->doFlow(actor, NULL, flow)) {
|
|
offFlag(8);
|
|
setSeq(SEQ_SELECT_WAIT);
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* 80199FA4-8019A020 1948E4 007C+00 1/0 0/0 0/0 .text
|
|
* seq_decide_no__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_decide_no(fopAc_ac_c* actor, dMsgFlow_c* p_flow) {
|
|
if (p_flow->doFlow(actor, NULL, moveCursor(field_0xf58, 2))) {
|
|
offFlag(8);
|
|
setSeq(SEQ_SELECT_WAIT);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* 8019A020-8019A0C0 194960 00A0+00 1/0 0/0 0/0 .text
|
|
* seq_finish__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::seq_finish(fopAc_ac_c* actor, dMsgFlow_c* p_flow) {
|
|
if (chkSpMode() && !beforeStartSeqAction(p_flow, field_0xf5c)) {
|
|
return 0;
|
|
} else if (p_flow->doFlow(actor, NULL, 0)) {
|
|
setSeq(SEQ_WAIT);
|
|
return 1;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* 8019A0C0-8019A0D0 194A00 0010+00 1/0 0/0 0/0 .text
|
|
* seq_event__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
bool dShopSystem_c::seq_event(fopAc_ac_c*, dMsgFlow_c*) {
|
|
return field_0xe30 == 0;
|
|
}
|
|
|
|
/* 8019A0D0-8019A158 194A10 0088+00 0/0 0/0 9/9 .text shop_init__13dShopSystem_cFb */
|
|
int dShopSystem_c::shop_init(bool param_0) {
|
|
if (param_0) {
|
|
setSeq(SEQ_SELECT_START);
|
|
dMeter2Info_onShopTalkFlag();
|
|
setSoldOut();
|
|
return 1;
|
|
} else if (mSeq == SEQ_WAIT) {
|
|
setSeq(SEQ_START);
|
|
dMeter2Info_onShopTalkFlag();
|
|
return 1;
|
|
} else {
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
/* 8019A158-8019A238 194A98 00E0+00 0/0 0/0 9/9 .text
|
|
* shop_process__13dShopSystem_cFP10fopAc_ac_cP10dMsgFlow_c */
|
|
int dShopSystem_c::shop_process(fopAc_ac_c* param_0, dMsgFlow_c* param_1) {
|
|
int iVar1;
|
|
iVar1 = (this->*((processFunc*)process)[mSeq])(param_0, param_1);
|
|
|
|
if (mWaitTimer != 0) {
|
|
mWaitTimer--;
|
|
}
|
|
if (field_0xf7a != 0) {
|
|
dMeter2Info_set2DVibration();
|
|
field_0xf7a = 0;
|
|
}
|
|
if (iVar1 != 0) {
|
|
g_meter2_info.offShopTalkFlag();
|
|
if (mSeq != 0) {
|
|
setSeq(0);
|
|
}
|
|
if (iVar1 != 2) {
|
|
mCursorPos = 0;
|
|
mLastCursorPos = 0;
|
|
}
|
|
}
|
|
if (mSeq != field_0xf71) {
|
|
field_0xf71 = mSeq;
|
|
field_0xf79 = 1;
|
|
}
|
|
return iVar1;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 804506F8-80450700 -00001 0004+04 1/1 0/0 0/0 .sdata shop_item_pos_data_tbl */
|
|
SECTION_SDATA static shop_item_data* shop_item_pos_data_tbl = &item_seira_shop;
|
|
|
|
/* 80453B58-80453B60 002158 0006+02 1/1 0/0 0/0 .sdata2 item_no$5460 */
|
|
SECTION_SDATA2 static u8 item_no[6] = {
|
|
MILK_BOTTLE, BEE_CHILD, PACHINKO, MILK_BOTTLE, BEE_CHILD, NO_ITEM,
|
|
};
|
|
|
|
/* 8019A238-8019A344 194B78 010C+00 0/0 0/0 1/1 .text createShopItem__13dShopSystem_cFi
|
|
*/
|
|
void dShopSystem_c::createShopItem(int itemType) {
|
|
if (itemType != -1) {
|
|
field_0xf60 = itemType;
|
|
mSoldOutFlag = -1;
|
|
|
|
cXyz pos;
|
|
for (int i = 0; i < 3; i++) {
|
|
u8* itemTbl = item_no + (itemType * 3);
|
|
|
|
pos.x = shop_item_pos_data_tbl->mItemPos[i].x + current.pos.x;
|
|
pos.y = shop_item_pos_data_tbl->mItemPos[i].y + current.pos.y;
|
|
pos.z = shop_item_pos_data_tbl->mItemPos[i].z + current.pos.z;
|
|
|
|
if (itemTbl[i] != NO_ITEM) {
|
|
u32 index = fopAcM_create(PROC_ShopItem, itemTbl[i], &pos, fopAcM_GetRoomNo(this),
|
|
¤t.angle, NULL, -1);
|
|
mItemCtrl.setItemIndex(i, index);
|
|
offFlag(i);
|
|
} else {
|
|
mItemCtrl.setItemIndex(i, -1);
|
|
onFlag(i);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 8019A344-8019A354 194C84 0010+00 12/12 0/0 0/0 .text setSeq__13dShopSystem_cFUc */
|
|
void dShopSystem_c::setSeq(u8 seq) {
|
|
mSeq = seq;
|
|
mWaitTimer = 2;
|
|
}
|
|
|
|
/* 8019A354-8019A364 194C94 0010+00 0/0 1/1 0/0 .text setSoldOutFlag__13dShopSystem_cFv
|
|
*/
|
|
void dShopSystem_c::setSoldOutFlag() {
|
|
mSoldOutFlag = mCursorPos - 1;
|
|
}
|
|
|
|
/* 8019A364-8019A4F4 194CA4 0190+00 2/2 0/0 0/0 .text setSoldOut__13dShopSystem_cFv */
|
|
void dShopSystem_c::setSoldOut() {
|
|
if (mSoldOutFlag != 0xFF) {
|
|
if (field_0xf60 < 0) {
|
|
u8 sw = (u8)dShopSystem_itemActor[mSoldOutFlag]->orig.angle.z & 0xFF;
|
|
if (sw != 0xFF && !dComIfGs_isSaveSwitch(sw)) {
|
|
dComIfGs_onSaveSwitch(sw);
|
|
}
|
|
}
|
|
|
|
int index = mSoldOutFlag;
|
|
mSoldOutFlag = -1;
|
|
if (field_0xf60 >= 0) {
|
|
fopAcM_delete(mItemCtrl.getItemIndex(index));
|
|
mItemCtrl.setItemIndex(index, -1);
|
|
onFlag(index);
|
|
return;
|
|
} else if (index == 0) {
|
|
dShopSystem_itemActor[0] = NULL;
|
|
dShopSystem_itemNo[0] = NO_ITEM;
|
|
dShopSystem_item_count = 2;
|
|
} else if (index == 1) {
|
|
dShopSystem_itemActor[1] = NULL;
|
|
dShopSystem_itemNo[1] = NO_ITEM;
|
|
dShopSystem_item_count = 2;
|
|
} else if (index == 2) {
|
|
dShopSystem_itemActor[2] = NULL;
|
|
dShopSystem_itemNo[2] = NO_ITEM;
|
|
dShopSystem_item_count = 2;
|
|
} else if (index == 6) {
|
|
dShopSystem_itemActor[6] = NULL;
|
|
dShopSystem_itemNo[6] = NO_ITEM;
|
|
dShopSystem_item_count = 6;
|
|
}
|
|
|
|
if (field_0xf76 != 0) {
|
|
onFlag(index);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 8019A4F4-8019A564 194E34 0070+00 1/1 0/0 0/0 .text setSoldOutItemHide__13dShopSystem_cFv */
|
|
void dShopSystem_c::setSoldOutItemHide() {
|
|
if (field_0xf60 < 0) {
|
|
fopAcM_delete(mItemCtrl.getItemIndex(mSoldOutFlag));
|
|
} else {
|
|
daShopItem_c* item = (daShopItem_c*)fopAcM_SearchByID(mItemCtrl.getItemIndex(mSoldOutFlag));
|
|
|
|
if (item != NULL) {
|
|
item->hide();
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 8019A564-8019A5D0 194EA4 006C+00 1/1 0/0 10/10 .text deleteObject__13dShopSystem_cFv
|
|
*/
|
|
void dShopSystem_c::deleteObject() {
|
|
if (mpStick != NULL) {
|
|
delete mpStick;
|
|
mpStick = NULL;
|
|
}
|
|
|
|
if (mpDrawCursor != NULL) {
|
|
delete mpDrawCursor;
|
|
mpDrawCursor = NULL;
|
|
}
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
|
|
/* 8019A5D0-8019AB00 194F10 0530+00 1/1 0/0 8/8 .text searchItemActor__13dShopSystem_cFv
|
|
*/
|
|
int dShopSystem_c::searchItemActor() {
|
|
u8 temp_data;
|
|
if ((dShopSystem_item_count != -1 && ((dShopSystem_item_count < (temp_data = data_80451058)) || dShopSystem_camera_count < 2))) {
|
|
if (dShopSystem_item_count < temp_data) {
|
|
fpcEx_Search((fpcLyIt_JudgeFunc)dShopSystem_searchItemActor, this);
|
|
}
|
|
if (dShopSystem_camera_count < 2) {
|
|
fpcEx_Search((fpcLyIt_JudgeFunc)dShopSystem_searchCameraActor, this);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
if (dShopSystem_item_count >= data_80451058 && dShopSystem_camera_count >= 2) {
|
|
mSoldOutFlag = -1;
|
|
if (data_80451060) {
|
|
f32 actorDistArr[7];
|
|
u8 itemNoArr[7];
|
|
f32 arr2[7];
|
|
daTag_ShopItem_c* actorArr[7];
|
|
u8 arr3[7];
|
|
for (int i = 0; i < data_80451058; i++) {
|
|
actorArr[i] = dShopSystem_itemActor[i];
|
|
itemNoArr[i] = dShopSystem_itemNo[i];
|
|
actorDistArr[i] = fopAcM_searchActorDistance(this, actorArr[i]);
|
|
arr2[i] = 0.0f;
|
|
arr3[i] = 0;
|
|
}
|
|
for (int i = 0; i < data_80451058; i++) {
|
|
arr2[i] = actorDistArr[i];
|
|
arr3[i] = i;
|
|
if (i > 0) {
|
|
for (int j = i; j >= 0; j--) {
|
|
if (arr2[j] < arr2[j-1]) {
|
|
f32 temp = arr2[j];
|
|
arr2[j] = arr2[j-1];
|
|
arr2[j-1] = temp;
|
|
u8 temp2 = arr3[j];
|
|
arr3[j] = arr3[j-1];
|
|
arr3[j-1] = temp2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for (int i = 0; i < data_80451058; i++) {
|
|
dShopSystem_itemActor[i] = actorArr[arr3[i]];
|
|
dShopSystem_itemNo[i] = itemNoArr[arr3[i]];
|
|
}
|
|
}
|
|
|
|
for (int i = 0; i < data_80451058; i++) {
|
|
u32 processId = dShopSystem_itemActor[i]->getProcessID();
|
|
mItemCtrl.setItemIndex(i, processId);
|
|
mItemCtrl.setMessageIndex(i, (u16)dShopSystem_itemActor[i]->orig.angle.GetX() != 0xffff ? (u16)dShopSystem_itemActor[i]->orig.angle.GetX() : -1);
|
|
|
|
if (processId + 0x10000 == 0xffff) {
|
|
onFlag(i);
|
|
onSoldOutItemFlag(i);
|
|
} else {
|
|
offFlag(i);
|
|
if ((u8)fopAcM_GetParam(dShopSystem_itemActor[i]) == 0xff) {
|
|
onSoldOutItemFlag(i);
|
|
} else {
|
|
offSoldOutItemFlag(i);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (field_0xf77 == 8) {
|
|
dShopSystem_cameraActor[0]->current.pos.set(-175.0f, 165.0f, 10.0f);
|
|
dShopSystem_cameraActor[1]->current.pos.set(215.0f, 225.0f, 370.0f);
|
|
}
|
|
|
|
if (data_80451058 > 3) {
|
|
mShopCamAction.setCamDataIdx2(
|
|
this, dShopSystem_itemActor[0], dShopSystem_itemActor[1], dShopSystem_itemActor[2],
|
|
dShopSystem_itemActor[3], dShopSystem_itemActor[4], dShopSystem_itemActor[5], &dShopSystem_cameraActor[0]->current.pos,
|
|
&dShopSystem_cameraActor[1]->current.pos
|
|
);
|
|
|
|
if (field_0xf77 == 8) {
|
|
cXyz camCtrPos;
|
|
camCtrPos.set(-180.0f, 245.0f, -380.0f);
|
|
mShopCamAction.setMasterCamCtrPos(&camCtrPos);
|
|
}
|
|
|
|
for (int i = 0; i < 7; i++) {
|
|
if (dShopSystem_itemActor[i] != NULL) {
|
|
u8 cVar8 = dShopSystem_itemActor[i]->orig.angle.GetZ();
|
|
u8 cVar4 = ((u16)dShopSystem_itemActor[i]->orig.angle.GetZ()) >> 8;
|
|
if (((cVar8 != 0xff) &&
|
|
(dComIfGs_isSaveSwitch(cVar8) == 0)) &&
|
|
((cVar4 != 0xff &&
|
|
(dComIfGs_isSaveSwitch(cVar4) == 0)))) {
|
|
onFlag(i);
|
|
onSoldOutItemFlag(i);
|
|
}
|
|
}
|
|
}
|
|
dShopSystem_item_count = -1;
|
|
} else {
|
|
mShopCamAction.setCamDataIdx(
|
|
this, dShopSystem_itemActor[0], dShopSystem_itemActor[1], dShopSystem_itemActor[2],
|
|
&dShopSystem_cameraActor[0]->current.pos,
|
|
&dShopSystem_cameraActor[1]->current.pos
|
|
);
|
|
|
|
for (int i = 0; i < 7; i++) {
|
|
if (dShopSystem_itemActor[i] != NULL) {
|
|
u8 cVar8 = dShopSystem_itemActor[i]->orig.angle.GetZ();
|
|
u8 cVar4 = ((u16)dShopSystem_itemActor[i]->orig.angle.GetZ()) >> 8;
|
|
if (((cVar8 != 0xff) &&
|
|
(dComIfGs_isSaveSwitch(cVar8) == 0)) &&
|
|
((cVar4 != 0xff &&
|
|
(dComIfGs_isSaveSwitch(cVar4) == 0)))) {
|
|
onFlag(i);
|
|
onSoldOutItemFlag(i);
|
|
}
|
|
}
|
|
}
|
|
dShopSystem_item_count = -1;
|
|
}
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
/* 8019AB00-8019AB1C 195440 001C+00 1/1 0/0 0/0 .text getFlowNodeNum__13dShopSystem_cFv
|
|
*/
|
|
int dShopSystem_c::getFlowNodeNum() {
|
|
u16 num = orig.angle.x;
|
|
if (num == 0xFFFF) {
|
|
return -1;
|
|
}
|
|
|
|
return num;
|
|
}
|
|
|
|
/* 8019AB1C-8019AB24 19545C 0008+00 0/0 0/0 8/8 .text setSellItemMax__13dShopSystem_cFUc
|
|
*/
|
|
void dShopSystem_c::setSellItemMax(u8 max) {
|
|
data_80451058 = max;
|
|
}
|
|
|
|
/* 8019AB24-8019AB60 195464 003C+00 0/0 0/0 9/9 .text checkShopOpen__13dShopSystem_cFv */
|
|
bool dShopSystem_c::checkShopOpen() {
|
|
for (int i = 0; i < 2; i++) {
|
|
if (dShopSystem_cameraActor[i] != NULL) {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return dShopSystem_camera_count != 0;
|
|
}
|
|
|
|
/* 8019AB60-8019AB84 1954A0 0024+00 3/3 0/0 0/0 .text
|
|
* checkLeftTrigger__13dShopSystem_cFP9STControl */
|
|
bool dShopSystem_c::checkLeftTrigger(STControl* stick) {
|
|
return stick->checkLeftTrigger();
|
|
}
|
|
|
|
/* 8019AB84-8019ABA8 1954C4 0024+00 3/3 0/0 0/0 .text
|
|
* checkRightTrigger__13dShopSystem_cFP9STControl */
|
|
bool dShopSystem_c::checkRightTrigger(STControl* stick) {
|
|
return stick->checkRightTrigger();
|
|
}
|
|
|
|
/* 8019ABA8-8019ABB0 1954E8 0008+00 1/1 0/0 0/0 .text dpdMove__13dShopSystem_cFv */
|
|
bool dShopSystem_c::dpdMove() {
|
|
return false;
|
|
}
|
|
|
|
/* 8019ABB0-8019ACE0 1954F0 0130+00 0/0 1/0 0/0 .text __sinit_d_shop_system_cpp */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void __sinit_d_shop_system_cpp() {
|
|
nofralloc
|
|
#include "asm/d/shop/d_shop_system/__sinit_d_shop_system_cpp.s"
|
|
}
|
|
#pragma pop
|
|
|
|
#pragma push
|
|
#pragma force_active on
|
|
REGISTER_CTORS(0x8019ABB0, __sinit_d_shop_system_cpp);
|
|
#pragma pop
|
|
|
|
/* 8019ACE0-8019ACE8 195620 0008+00 1/0 0/0 0/0 .text
|
|
* beforeStartSeqAction__13dShopSystem_cFP10dMsgFlow_ci */
|
|
int dShopSystem_c::beforeStartSeqAction(dMsgFlow_c* param_0, int param_1) {
|
|
return 1;
|
|
}
|
|
|
|
/* 8019ACE8-8019ACF0 195628 0008+00 1/0 0/0 0/0 .text
|
|
* beforeSelectSeqAction__13dShopSystem_cFP10dMsgFlow_ci */
|
|
int dShopSystem_c::beforeSelectSeqAction(dMsgFlow_c* param_0, int param_1) {
|
|
return 1;
|
|
}
|
|
|
|
/* 8019ACF0-8019ACF8 195630 0008+00 1/0 0/0 0/0 .text getResName2__13dShopSystem_cFi */
|
|
bool dShopSystem_c::getResName2(int param_0) {
|
|
return false;
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 80394C17-80394C1C 021277 0005+00 0/0 0/0 0/0 .rodata None */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DEAD static char const* const stringBase_80394C17 = ".bck";
|
|
#pragma pop
|
|
|
|
/* 80394C1C-80394C21 02127C 0005+00 0/0 0/0 0/0 .rodata None */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DEAD static char const* const stringBase_80394C1C = ".btp";
|
|
#pragma pop
|
|
|
|
/* 80394C21-80394C28 021281 0005+02 0/0 0/0 0/0 .rodata None */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_DEAD static char const* const stringBase_80394C21 = ".btk";
|
|
/* @stringBase0 padding */
|
|
SECTION_DEAD static char const* const pad_80394C26 = "\0";
|
|
#pragma pop
|
|
|
|
/* 80394C10-80394C10 021270 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|