diff --git a/include/d/actor/d_a_midna.h b/include/d/actor/d_a_midna.h index d78bbb8097d..6db22ec5c25 100644 --- a/include/d/actor/d_a_midna.h +++ b/include/d/actor/d_a_midna.h @@ -363,6 +363,7 @@ public: } static bool checkMidnaTired() { + /* dSv_event_flag_c::F_0250 - Cutscene - [cutscene: 21] reunion with Zelda / Midna revived (Hyrule Castle barrier appears) */ return dComIfGs_isTransformLV(3) && !dComIfGs_isEventBit(0x1E08); } diff --git a/include/d/actor/d_a_npc_ash.h b/include/d/actor/d_a_npc_ash.h index b113910ef42..dc6adcf7b90 100644 --- a/include/d/actor/d_a_npc_ash.h +++ b/include/d/actor/d_a_npc_ash.h @@ -125,7 +125,10 @@ public: /* 8095CC8C */ BOOL drawDbgInfo(); s16 getMessageNo() { return shape_angle.x; } - bool isMap() { return !(daNpcF_chkEvtBit(0x10c) || !daNpcF_chkEvtBit(0x108)); } + /* dSv_event_flag_c::F_0268 - City in the Sky - City in the Sky clear */ + bool isMap() { return !(daNpcF_chkEvtBit(0x10c) + /* dSv_event_flag_c::F_0264 - Cutscene - Get master sword */ + || !daNpcF_chkEvtBit(0x108)); } inline void setExpressionTalkAfter() { setExpression(7, -1.0f); } inline void setLookMode(int i_lookMode, fopAc_ac_c* i_talkPartner); inline void searchActors(); diff --git a/include/d/actor/d_a_npc_besu.h b/include/d/actor/d_a_npc_besu.h index b335ac69070..ceee412bb8f 100644 --- a/include/d/actor/d_a_npc_besu.h +++ b/include/d/actor/d_a_npc_besu.h @@ -115,9 +115,9 @@ public: static cutFunc mCutList[15]; private: - /* 0x0E40 */ mDoExt_McaMorfSO* mpBesuMorf; + /* 0x0E40 */ mDoExt_McaMorfSO* mpCupModelMorf; /* 0x0E44 */ u8 field_0xe44[0x0E48 - 0xE44]; - /* 0x0E48 */ J3DModel* mpModel[1]; + /* 0x0E48 */ J3DModel* mpClothModel[1]; /* 0x0E4C */ dCcD_Cyl mCyl1; /* 0x0F88 */ dCcD_Cyl mCyl2; /* 0x10C4 */ u8 mType; diff --git a/include/d/actor/d_a_npc_cdn3.h b/include/d/actor/d_a_npc_cdn3.h index d263de516be..8edf9b36868 100644 --- a/include/d/actor/d_a_npc_cdn3.h +++ b/include/d/actor/d_a_npc_cdn3.h @@ -211,6 +211,7 @@ public: rv = 0; break; } + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[281]) && rv == 9) { rv = 0xb; } @@ -244,6 +245,7 @@ public: rv = 0; break; } + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[281]) && rv == 10) { rv = 12; } diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 9ab96dbc614..c548104028e 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -67,29 +67,6 @@ class daNpc_Jagar_Param_c { class daNpc_Jagar_c : public daNpcT_c { public: - enum JAGAR2_RES_FILE_ID { - /* BCK */ - /* 0x05 */ BCK_JAGA_F_SURPRISE = 5, - /* 0x06 */ BCK_JAGA_F_SURPRISE_WAIT, - /* 0x07 */ BCK_JAGA_F_WORRY_TALK, - /* 0x08 */ BCK_JAGA_RUN_A, - /* 0x09 */ BCK_JAGA_SURPRISE, - /* 0x0A */ BCK_JAGA_SURPRISE_WAIT, - /* 0x0B */ BCK_JAGA_UNADUKI, - /* 0x0C */ BCK_JAGA_WORRY_TALK, - /* 0x0D */ BCK_JAGA_WORRY_WAIT, - /* 0x0E */ BCK_JAGA_WORRY_WALK, - - /* BTP */ - /* 0x11 */ BTP_JAGA_BLINK = 0x11, - /* 0x12 */ BTP_JAGA_F_SURPRISE, - /* 0x13 */ BTP_JAGA_F_SURPRISE_WAIT, - /* 0x14 */ BTP_JAGA_F_WORRY_TALK, - - /* EVT */ - /* 0x17 */ EVT_EVENT_LIST = 0x17, - }; - typedef int (daNpc_Jagar_c::*cutFunc)(int); typedef int (daNpc_Jagar_c::*actionFunc)(void*); @@ -100,6 +77,45 @@ public: TYPE_3, }; + enum Joint { + /* 0x00 */ JNT_CENTER, + /* 0x01 */ JNT_BACKBONE1, + /* 0x02 */ JNT_BACKBONE2, + /* 0x03 */ JNT_NECK, + /* 0x04 */ JNT_HEAD, + /* 0x05 */ JNT_CHIN, + /* 0x06 */ JNT_MAYU_L, + /* 0x07 */ JNT_MAYU_R, + /* 0x08 */ JNT_MOUTH, + /* 0x09 */ JNT_SHOULDERL, + /* 0x0A */ JNT_ARML1, + /* 0x0B */ JNT_ARML2_1, + /* 0x0C */ JNT_HANDL_1, + /* 0x0D */ JNT_FINGERL, + /* 0x0E */ JNT_SHOULDERR, + /* 0x0F */ JNT_ARMR1, + /* 0x10 */ JNT_ARMR2_1, + /* 0x11 */ JNT_HANDR_1, + /* 0x12 */ JNT_FINGERR, + /* 0x13 */ JNT_WAIST, + /* 0x14 */ JNT_LEGL1, + /* 0x15 */ JNT_LEGL2, + /* 0x16 */ JNT_FOOTL, + /* 0x17 */ JNT_SKIRTL, + /* 0x18 */ JNT_LEGR1, + /* 0x19 */ JNT_LEGR2, + /* 0x1A */ JNT_FOOTR, + /* 0x1B */ JNT_SKIRTR, + /* 0x1C */ JNT_SKIRT1, + /* 0x1D */ JNT_SKIRT2, + }; + + enum Material { + /* 0x1 */ MAT_JAGA_EYEBALL = 0x1, + /* 0x2 */ MAT_JAGA_FACE_M, + /* 0x3 */ MAT_JAGA_M, + }; + /* 80A1470C */ ~daNpc_Jagar_c(); /* 80A14858 */ int create(); /* 80A14B20 */ int CreateHeap(); @@ -146,14 +162,14 @@ public: daNpcT_evtData_c const* param_7, char** param_8) : daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8) {} - /* 80A1A274 */ u16 getEyeballMaterialNo() { return 1; } - /* 80A1A27C */ s32 getHeadJointNo() { return 4; } - /* 80A1A284 */ s32 getNeckJointNo() { return 3; } - /* 80A1A28C */ s32 getBackboneJointNo() { return 1; } - /* 80A1A294 */ BOOL checkChangeJoint(int param_1) { return param_1 == 4; } - /* 80A1A2A4 */ BOOL checkRemoveJoint(int param_1) { return param_1 == 8; } - /* 80A1A2B4 */ s32 getFootLJointNo() { return 22; } - /* 80A1A2BC */ s32 getFootRJointNo() { return 26; } + /* 80A1A274 */ u16 getEyeballMaterialNo() { return MAT_JAGA_EYEBALL; } + /* 80A1A27C */ s32 getHeadJointNo() { return JNT_HEAD; } + /* 80A1A284 */ s32 getNeckJointNo() { return JNT_NECK; } + /* 80A1A28C */ s32 getBackboneJointNo() { return JNT_BACKBONE1; } + /* 80A1A294 */ BOOL checkChangeJoint(int param_1) { return param_1 == JNT_HEAD; } + /* 80A1A2A4 */ BOOL checkRemoveJoint(int param_1) { return param_1 == JNT_MOUTH; } + /* 80A1A2B4 */ s32 getFootLJointNo() { return JNT_FOOTL; } + /* 80A1A2BC */ s32 getFootRJointNo() { return JNT_FOOTR; } int getFlowNodeNo() { u16 nodeNo = home.angle.x; diff --git a/include/d/actor/d_a_npc_ks.h b/include/d/actor/d_a_npc_ks.h index 963fc2c4875..bdfe7bd9518 100644 --- a/include/d/actor/d_a_npc_ks.h +++ b/include/d/actor/d_a_npc_ks.h @@ -16,6 +16,71 @@ */ class npc_ks_class { public: + enum Npc_ks_RES_File_ID { + /* BCK */ + /* 0x05 */ BCK_SARU_BAKUCHU = 0x5, + /* 0x06 */ BCK_SARU_BIKKURI, + /* 0x07 */ BCK_SARU_CALL, + /* 0x08 */ BCK_SARU_CALLBACK, + /* 0x09 */ BCK_SARU_CALLBACK_K, + /* 0x0A */ BCK_SARU_CALL_K, + /* 0x0B */ BCK_SARU_CLAP_WAIT, + /* 0x0C */ BCK_SARU_CLIMB, + /* 0x0D */ BCK_SARU_FALL, + /* 0x0E */ BCK_SARU_FIRE_K, + /* 0x0F */ BCK_SARU_GODOWN, + /* 0x10 */ BCK_SARU_HANGCALL, + /* 0x11 */ BCK_SARU_HANGWAIT_A, + /* 0x12 */ BCK_SARU_HANGWAIT_B, + /* 0x13 */ BCK_SARU_HANGWAIT_C, + /* 0x14 */ BCK_SARU_HELP, + /* 0x15 */ BCK_SARU_HELP_B, + /* 0x16 */ BCK_SARU_HELP_C, + /* 0x17 */ BCK_SARU_HOLDING, + /* 0x18 */ BCK_SARU_HUNGING, + /* 0x19 */ BCK_SARU_INDICATE, + /* 0x1A */ BCK_SARU_JUMPRUN, + /* 0x1B */ BCK_SARU_JUMPRUN_K, + /* 0x1C */ BCK_SARU_JUMPWALK, + /* 0x1D */ BCK_SARU_JUMPWALK_K, + /* 0x1E */ BCK_SARU_JUMP_ATTN, + /* 0x1F */ BCK_SARU_JUMP_L, + /* 0x20 */ BCK_SARU_JUMP_S, + /* 0x21 */ BCK_SARU_JUMP_T, + /* 0x22 */ BCK_SARU_KAGO_JUMP, + /* 0x23 */ BCK_SARU_LAND, + /* 0x24 */ BCK_SARU_RECOVER, + /* 0x25 */ BCK_SARU_RELIEF, + /* 0x26 */ BCK_SARU_ROTATE, + /* 0x27 */ BCK_SARU_SCARED, + /* 0x28 */ BCK_SARU_SCAREDLOOK_K, + /* 0x29 */ BCK_SARU_SCARED_B, + /* 0x2A */ BCK_SARU_SCARED_K, + /* 0x2B */ BCK_SARU_SCARED_LOOK, + /* 0x2C */ BCK_SARU_SHAKE_K, + /* 0x2D */ BCK_SARU_STOPCALL, + /* 0x2E */ BCK_SARU_SURPRISE_K, + /* 0x2F */ BCK_SARU_SWIM, + /* 0x30 */ BCK_SARU_SWINGPOSE, + /* 0x31 */ BCK_SARU_TO_ROTATE, + /* 0x32 */ BCK_SARU_WAITSTAND, + /* 0x33 */ BCK_SARU_WAIT_A, + /* 0x34 */ BCK_SARU_WAIT_A_K, + /* 0x35 */ BCK_SARU_WAIT_B, + /* 0x36 */ BCK_SARU_WAIT_C, + /* 0x37 */ BCK_SARU_WALKCLAP, + /* 0x38 */ BCK_SARU_YOROKOBI, + + /* BMDR */ + /* 0x3B */ BMDR_SARU = 0x3B, + /* 0x3C */ BMDR_SARU_BARA, + /* 0x3D */ BMDR_SARU_STICK, + + /* BTP */ + /* 0x40 */ BTP_SARU = 0x40, + /* 0x41 */ BTP_SARU_RELIEF, + }; + /* 0x000 */ fopEn_enemy_c actor; /* 0x5AC */ request_of_phase_process_class mPhase; /* 0x5B4 */ u8 mRoomMonkeyID; @@ -124,8 +189,8 @@ public: /* 0xBE4 */ u32 field_0xbe4[4]; /* 0xBF4 */ u32 field_0xbf4; /* 0xBF8 */ u8 field_0xbf8[0xbfc - 0xbf8]; - /* 0xBFC */ J3DModel* field_0xbfc; - /* 0xC00 */ J3DModel* field_0xc00; + /* 0xBFC */ J3DModel* mpRoseModel; + /* 0xC00 */ J3DModel* mpStickModel; /* 0xC04 */ cXyz field_0xc04; /* 0xC10 */ f32 field_0xc10; /* 0xC14 */ s16 field_0xc14; diff --git a/include/d/actor/d_a_npc_saru.h b/include/d/actor/d_a_npc_saru.h index 2c879f996c2..66a2a517835 100644 --- a/include/d/actor/d_a_npc_saru.h +++ b/include/d/actor/d_a_npc_saru.h @@ -12,60 +12,26 @@ * */ +struct daNpc_Saru_HIO_c #ifdef DEBUG -class daNpc_Saru_HIO_c : public mDoHIO_entry_c { - +: public mDoHIO_entry_c +#endif +{ +public: + /* 0x00 */ daNpcT_HIOParam common; + /* 0x8C */ s16 scared_time; // 怯える時間 - Scared Time + /* 0x8E */ s16 field_0x8e; }; + +class daNpc_Saru_Param_c : public JORReflexible { +public: + /* 80AC448C */ virtual ~daNpc_Saru_Param_c() {} + +#ifdef DEBUG + void genMessage(JORMContext*); #endif -class daNpc_Saru_Param_c { -public: - /* 80AC448C */ virtual ~daNpc_Saru_Param_c() {}; - - struct Data { - /* 0x00 */ f32 field_0x00; - /* 0x04 */ f32 mGravity; - /* 0x08 */ f32 field_0x08; - /* 0x0C */ f32 field_0x0c; - /* 0x10 */ f32 mWeight; - /* 0x14 */ f32 mCylH; - /* 0x18 */ f32 mWallH; - /* 0x1C */ f32 mWallR; - /* 0x20 */ f32 mBodyDownAngle; - /* 0x24 */ f32 mBodyUpAngle; - /* 0x28 */ f32 mBodyRightAngle; - /* 0x2C */ f32 mBodyLeftAngle; - /* 0x30 */ f32 mHeadDownAngle; - /* 0x34 */ f32 mHeadUpAngle; - /* 0x38 */ f32 mHeadRightAngle; - /* 0x3C */ f32 mHeadLeftAngle; - /* 0x40 */ f32 field_0x40; - /* 0x44 */ f32 mMorfFrames; - /* 0x48 */ s16 field_0x48; - /* 0x4A */ s16 field_0x4a; - /* 0x4C */ s16 field_0x4c; - /* 0x4E */ s16 field_0x4e; - /* 0x50 */ f32 mAttnFovy; - /* 0x54 */ f32 field_0x54; - /* 0x58 */ f32 field_0x58; - /* 0x5C */ f32 field_0x5c; - /* 0x60 */ s16 field_0x60; - /* 0x62 */ s16 field_0x62; - /* 0x64 */ f32 field_0x64; - /* 0x68 */ f32 field_0x68; - /* 0x6C */ f32 field_0x6c; - /* 0x70 */ f32 field_0x70; - /* 0x74 */ f32 field_0x74; - /* 0x78 */ f32 field_0x78; - /* 0x7C */ f32 field_0x7c; - /* 0x80 */ f32 field_0x80; - /* 0x84 */ f32 field_0x84; - /* 0x88 */ f32 field_0x88; - /* 0x8C */ s16 field_0x8c; - /* 0x8E */ s16 field_0x8e; - }; - - static const Data m; + static const daNpc_Saru_HIO_c m; }; class daNpc_Saru_c : public daNpcT_c { @@ -80,6 +46,31 @@ public: TYPE_3, }; + enum Joint { + /* 0x00 */ JNT_CENTER, + /* 0x01 */ JNT_BACKBONE_1, + /* 0x02 */ JNT_BACKBONE_2, + /* 0x03 */ JNT_NECK, + /* 0x04 */ JNT_HEAD, + /* 0x05 */ JNT_CHIN, + /* 0x06 */ JNT_MOUTH, + /* 0x07 */ JNT_SHOULDER_L, + /* 0x08 */ JNT_ARM_L_1, + /* 0x09 */ JNT_ARM_L_2, + /* 0x0A */ JNT_HAND_L, + /* 0x0B */ JNT_SHOULDER_R, + /* 0x0C */ JNT_ARM_R_1, + /* 0x0D */ JNT_ARM_R_2, + /* 0x0E */ JNT_HAND_R, + /* 0x0F */ JNT_WAIST, + /* 0x10 */ JNT_LEG_L_1, + /* 0x11 */ JNT_LEG_L_2, + /* 0x12 */ JNT_FOOT_L, + /* 0x13 */ JNT_LEG_R_1, + /* 0x14 */ JNT_LEG_R_2, + /* 0x15 */ JNT_FOOR_R, + }; + /* 80AC042C */ ~daNpc_Saru_c(); /* 80AC0578 */ int create(); /* 80AC082C */ int CreateHeap(); @@ -120,9 +111,9 @@ public: daNpcT_evtData_c const* param_7, char** param_8) : daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8) {} - /* 80AC4474 */ s32 getHeadJointNo(); - /* 80AC447C */ s32 getNeckJointNo(); - /* 80AC4484 */ s32 getBackboneJointNo(); + /* 80AC4474 */ s32 getHeadJointNo() { return JNT_HEAD; } + /* 80AC447C */ s32 getNeckJointNo() { return JNT_NECK; } + /* 80AC4484 */ s32 getBackboneJointNo() { return JNT_BACKBONE_1; } u32 getFlowNodeNo() { u16 rv = home.angle.x; @@ -137,13 +128,12 @@ public: static char* mCutNameList[4]; static cutFunc mCutList[4]; - private: #ifdef DEBUG /* 0xE90 */ daNpc_Saru_HIO_c* field_0xe90; #endif /* 0xE40 */ u8 field_0xe40[0xe44 - 0xe40]; - /* 0xE44 */ J3DModel* field_0xe44[2]; + /* 0xE44 */ J3DModel* mpRoseModels[2]; /* 0xE4C */ dCcD_Cyl field_0xe4c; /* 0xF88 */ u8 mType; /* 0xF8C */ daNpcT_ActorMngr_c mActrMngr[1]; diff --git a/include/d/actor/d_a_npc_shad.h b/include/d/actor/d_a_npc_shad.h index b3f811991fd..594a3307be3 100644 --- a/include/d/actor/d_a_npc_shad.h +++ b/include/d/actor/d_a_npc_shad.h @@ -218,7 +218,9 @@ public: if (mActorMngr[4].getActorP() == NULL) { mActorMngr[4].entry(getEvtAreaTagP(17, 0)); } - } else if (mMode == 1 && daNpcF_chkEvtBit(0x12E) && mActorMngr[4].getActorP() == NULL) { + } else if (mMode == 1 + /* dSv_event_flag_c::F_0302 - Kakariko Village - Saw cutscene of Shad casting spells underneat Kakariko Village */ + && daNpcF_chkEvtBit(0x12E) && mActorMngr[4].getActorP() == NULL) { mActorMngr[4].entry(getEvtAreaTagP(18, 0)); } } diff --git a/include/d/actor/d_a_obj_mirror_6pole.h b/include/d/actor/d_a_obj_mirror_6pole.h index 594c6ca6fc1..b02aa94e200 100644 --- a/include/d/actor/d_a_obj_mirror_6pole.h +++ b/include/d/actor/d_a_obj_mirror_6pole.h @@ -44,7 +44,9 @@ public: bool isSwitch() { return fopAcM_isSwitch(this, getSwitchNo()) || + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) || + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]); } diff --git a/include/d/actor/d_a_obj_mirror_sand.h b/include/d/actor/d_a_obj_mirror_sand.h index 4bc78b6a60b..07e065c046a 100644 --- a/include/d/actor/d_a_obj_mirror_sand.h +++ b/include/d/actor/d_a_obj_mirror_sand.h @@ -31,7 +31,9 @@ public: bool isSwitch() { return fopAcM_isSwitch(this, getSwitchNo()) || + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) || + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]); } diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index 03fa2109cf6..667cfbeeb56 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -1138,6 +1138,7 @@ public: return dComIfGs_getSelectEquipClothes() == fpcNm_ITEM_ARMOR; } + /* dSv_event_flag_c::M_067 - Main Event - Midna riding / not riding (ON == riding) */ static BOOL checkFirstMidnaDemo() { return dComIfGs_isEventBit(0xc10); } static int checkNowWolfPowerUp() { return checkNowWolfEyeUp(); } diff --git a/src/Z2AudioLib/Z2EnvSeMgr.cpp b/src/Z2AudioLib/Z2EnvSeMgr.cpp index 16bca211b30..7d7004897ae 100644 --- a/src/Z2AudioLib/Z2EnvSeMgr.cpp +++ b/src/Z2AudioLib/Z2EnvSeMgr.cpp @@ -240,7 +240,10 @@ void Z2EnvSeMgr::framework() { int sceneNum = Z2GetSceneMgr()->getCurrentSceneNum(); if (field_0x64.getPosCount() >= 0) { if (field_0x214 == 0x12 || - (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[104]) && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[250]))) + /* dSv_event_flag_c::M_071 - Cutscene - [cutscene: 20] Zant appears (during Midna's desperate hour) */ + (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[104]) + /* dSv_event_flag_c::F_0250 - Cutscene - [cutscene: 21] reunion with Zelda / Midna revived (Hyrule Castle barrier appears) */ + && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[250]))) { int lVar12 = 0; if (sceneNum == 0x17 || sceneNum == 0x18 || (sceneNum == 0x19)) { diff --git a/src/Z2AudioLib/Z2LinkMgr.cpp b/src/Z2AudioLib/Z2LinkMgr.cpp index 4367cde681f..a63446a0a8a 100644 --- a/src/Z2AudioLib/Z2LinkMgr.cpp +++ b/src/Z2AudioLib/Z2LinkMgr.cpp @@ -333,7 +333,9 @@ JAISoundHandle* Z2CreatureLink::startLinkSoundLevel(JAISoundID i_soundID, u32 pa break; case Z2SE_AL_SNOBO_RIDE: case Z2SE_AL_SNOBO_BREAK: - if (dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[266]) && Z2GetSeqMgr()->getSubBgmID() != Z2BGM_SNOW_BOARD) { + /* dSv_event_flag_c::F_0266 - Snowpeak Ruins - Snowpeak Ruins clear */ + if (dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[266]) + && Z2GetSeqMgr()->getSubBgmID() != Z2BGM_SNOW_BOARD) { var_f31 = 0.0f; var_r30 = 0; } else if (mMoveSpeed == 0) { diff --git a/src/Z2AudioLib/Z2SceneMgr.cpp b/src/Z2AudioLib/Z2SceneMgr.cpp index 46909a28cc9..37ed2979d41 100644 --- a/src/Z2AudioLib/Z2SceneMgr.cpp +++ b/src/Z2AudioLib/Z2SceneMgr.cpp @@ -316,10 +316,13 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { } // fallthrough case 4: + /* dSv_event_flag_c::F_0014 - Ordon Village - sword tutorial ends */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[18]) + /* dSv_event_flag_c::F_0625 - Faron Woods - Saved Talo and a monkey */ && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[625])) { bgm_wave1 = 0x55; + /* dSv_event_flag_c::F_0094 - Ordon Village - Talo went after the monkey */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[194])) { bgm_id = Z2BGM_EVENT05; } @@ -346,6 +349,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { break; case 1: if (layer == 0) { + /* dSv_event_flag_c::F_0038 - Ordon Village - Opening (2nd day) cat returns home */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[136])) { bgm_id = Z2BGM_SHOP01; } else { @@ -353,6 +357,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { } bgm_wave1 = 7; } else if (layer == 2) { + /* dSv_event_flag_c::M_020 - Cutscene - [cutscene: ] Colin kidnapped : ON once watched */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[53])) { bgm_id = Z2BGM_SHOP01; bgm_wave1 = 7; @@ -372,6 +377,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { bgm_wave1 = 6; Z2GetSeqMgr()->changeBgmStatus(1); } else if (layer == 2) { + /* dSv_event_flag_c::M_020 - Cutscene - [cutscene: ] Colin kidnapped : ON once watched */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[53])) { bgm_id = Z2BGM_INDOOR; bgm_wave1 = 8; @@ -399,6 +405,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { bgm_wave1 = 8; } } else { + /* dSv_event_flag_c::M_020 - Cutscene - [cutscene: ] Colin kidnapped : ON once watched */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[53])) { bgm_id = Z2BGM_INDOOR; bgm_wave1 = 8; @@ -448,7 +455,9 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { demo_wave = 0x5c; break; case 3: + /* dSv_event_flag_c::F_0014 - Ordon Village - sword tutorial ends */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[18]) + /* dSv_event_flag_c::F_0625 - Faron Woods - Saved Talo and a monkey */ && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[625])) { bgm_id = Z2BGM_EVENT05; @@ -472,6 +481,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { } else if (layer == 7 || layer == 10) { demo_wave = 0x67; } else { + /* dSv_event_flag_c::M_009 - Cutscene - [cutscene: 6B] Prison escape - Midna rides on back */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[42])) { bgm_id = Z2BGM_TWILIGHT; bgm_wave1 = 0xe; @@ -562,7 +572,9 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { demo_wave = 0x5c; break; case 1: + /* dSv_event_flag_c::F_0014 - Ordon Village - sword tutorial ends */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[18]) + /* dSv_event_flag_c::F_0625 - Faron Woods - Saved Talo and a monkey */ && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[625])) { bgm_id = Z2BGM_EVENT05; @@ -662,6 +674,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { } else { switch (room) { case 1: + /* dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[64])) { bgm_id = Z2BGM_SHOP01; } else { @@ -673,6 +686,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { if (layer == 13) { demo_wave = 0x83; } else { + /* dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[64])) { bgm_id = Z2BGM_INDOOR; bgm_wave1 = 8; @@ -680,9 +694,11 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { } break; case 3: + /* dSv_event_flag_c::M_076 - Misc. - First conversation with Castle Town Malo Mart shop clerk */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[109])) { bgm_id = Z2BGM_SHOP_MARO; bgm_wave1 = 0x33; + /* dSv_event_flag_c::M_052 - Main Event - Horseback battle clear */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[85])) { bgm_id = Z2BGM_SHOP01; bgm_wave1 = 7; @@ -937,6 +953,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { se_wave2 = 0; demo_wave = 0x7f; } else if (!(layer == 1 && room == 1 + /* dSv_event_flag_c::F_0542 - Cutscene - [Cutscene] Hyrule Castle barrier disappears (Midna goes crazy) */ && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[542]))) { bgm_id = Z2BGM_CASTLE_TOWN; @@ -1015,6 +1032,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { case SPOT_STAR_TENT: se_wave1 = 0x42; se_wave2 = 0x87; + /* dSv_event_flag_c::F_289 - Castle Town - Heard conversation about entering Star Game 1 */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[289])) { bgm_id = Z2BGM_MINIGAME_ROOM; } @@ -1317,6 +1335,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { if (dComIfGs_isStageSwitch(2, 1)) { bgm_id = Z2BGM_DUNGEON_FOREST; bgm_wave1 = 0xa; + /* dSv_event_flag_c::M_022 - Forest Temple - Forest Temple clear (Midna creates warp hole) */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[55])) { bgm_id = 0x200005b; } else { @@ -1352,6 +1371,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { if (dComIfGs_isStageSwitch(3, 0x7c)) { bgm_id = Z2BGM_DUNGEON_LV2; bgm_wave1 = 0x13; + /* dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[64])) { bgm_id = 0x200005b; } else { @@ -1385,6 +1405,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { if (dComIfGs_isStageSwitch(4, 0xe)) { bgm_id = Z2BGM_DUNGEON_LV3; bgm_wave1 = 0x15; + /* dSv_event_flag_c::M_045 - Lakebed Temple - Lakebed Temple clear */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[78])) { bgm_id = 0x200005b; } else { @@ -1421,6 +1442,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { if (dComIfGs_isStageSwitch(0xa, 0xa)) { bgm_id = Z2BGM_DUNGEON_LV4; bgm_wave1 = 0x1a; + /* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[265])) { bgm_id = 0x200005b; } else { @@ -1457,6 +1479,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { if (dComIfGs_isStageSwitch(8, 0x19)) { bgm_id = Z2BGM_DUNGEON_LV5; bgm_wave1 = 0x1d; + /* dSv_event_flag_c::F_0266 - Snowpeak Ruins - Snowpeak Ruins clear */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[266])) { bgm_id = 0x200005b; } else { @@ -1490,6 +1513,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { if (dComIfGs_isStageSwitch(7, 0x18)) { bgm_id = Z2BGM_DUNGEON_LV6; bgm_wave1 = 0x26; + /* dSv_event_flag_c::F_0267 - Temple of Time - Temple of Time clear */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[267])) { bgm_id = 0x200005b; } else { @@ -1527,6 +1551,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { if (dComIfGs_isStageSwitch(0x16, 0x25)) { bgm_id = Z2BGM_DUNGEON_LV7; bgm_wave1 = 0x27; + /* dSv_event_flag_c::F_0268 - City in the Sky - City in the Sky clear */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[268])) { bgm_id = 0x200005b; } else { @@ -1575,6 +1600,7 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { } else if (dComIfGs_isStageSwitch(0x17, 0x16)) { bgm_id = Z2BGM_DUNGEON_LV8; bgm_wave1 = 0x28; + /* dSv_event_flag_c::F_0570 - Palace of Twilight - Cleared Palace of Twilight */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[570])) { bgm_id = 0x200005b; JSUList* stream_list = Z2GetSoundMgr()->getStreamMgr()->getStreamList(); @@ -1714,7 +1740,9 @@ void Z2SceneMgr::setSceneName(char* spotName, s32 room, s32 layer) { break; } + /*dSv_event_flag_c::M_071 - Cutscene - [cutscene: 20] Zant appears (during Midna's desperate hour) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[104]) + /* dSv_event_flag_c::F_0250 - Cutscene - [cutscene: 21] reunion with Zelda / Midna revived (Hyrule Castle barrier appears) */ && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[250]) && demo_wave == 0 && spot != SPOT_ELDIN_BRIDGE_BATTLE) { @@ -1835,11 +1863,11 @@ void Z2SceneMgr::load1stDynamicWave() { } } -/* 802B9D98-802B9FC8 2B46D8 0230+00 2/2 0/0 0/0 .text _load1stWaveInner_1__10Z2SceneMgrFv - */ +/* 802B9D98-802B9FC8 2B46D8 0230+00 2/2 0/0 0/0 .text _load1stWaveInner_1__10Z2SceneMgrFv */ void Z2SceneMgr::_load1stWaveInner_1() { Z2GetSeMgr()->seStopAll(0); Z2GetEnvSeMgr()->resetSceneInner(); + /* dSv_event_flag_c::M_071 - Cutscene - [cutscene: 20] Zant appears (during Midna's desperate hour) */ field_0x18 = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[104]) ? 0x59 : 0x58; if (loadedSeWave_2 != 0 && requestSeWave_2 != loadedSeWave_2) { diff --git a/src/d/actor/d_a_L7low_dr.cpp b/src/d/actor/d_a_L7low_dr.cpp index bdc08d8ddf7..fb77472dd57 100644 --- a/src/d/actor/d_a_L7low_dr.cpp +++ b/src/d/actor/d_a_L7low_dr.cpp @@ -183,6 +183,7 @@ static int daL7lowDr_Create(daL7lowDr_c* i_this) { /* 805AAEA8-805AAF44 000928 009C+00 1/1 0/0 0/0 .text draw__11daL7lowDr_cFv */ int daL7lowDr_c::draw() { + /* dSv_event_flag_c::F_0510 - City in the Sky - Watched City in the Sky start cutscene */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[510])) { return 1; } diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index e9ac90b4403..b18d30ba56f 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -11238,7 +11238,16 @@ static void* daAlink_searchKolin(fopAc_ac_c* i_actor, void* i_data) { /* 800B80C4-800B8374 0B2A04 02B0+00 2/2 0/0 0/0 .text orderZTalk__9daAlink_cFv */ int daAlink_c::orderZTalk() { - if ((!checkReinRide() && !checkModeFlg(0x40000) && !checkMagneBootsOn() && (!mLinkAcch.ChkGroundHit() || checkModeFlg(0x70C52))) || mThrowBoomerangAcKeep.getActor() != NULL || dComIfGp_checkPlayerStatus0(0, 0x8000000) || mProcID == PROC_CRAWL_END || checkHorseZelda() || checkCloudSea() || checkStageName("D_MN08A") || (checkStageName("D_MN09A") && ((fopAcM_GetRoomNo(this) == 50 && dComIfG_play_c::getLayerNo(0) == 0) || fopAcM_GetRoomNo(this) == 51)) || (checkMagneBootsOn() && (!checkStageName("D_MN04B") || !cBgW_CheckBGround(mMagneBootsTopVec.y))) || dComIfGs_isEventBit(0x6140)) { + if ((!checkReinRide() && !checkModeFlg(0x40000) && !checkMagneBootsOn() + && (!mLinkAcch.ChkGroundHit() || checkModeFlg(0x70C52))) || mThrowBoomerangAcKeep.getActor() != NULL + || dComIfGp_checkPlayerStatus0(0, 0x8000000) || mProcID == PROC_CRAWL_END || checkHorseZelda() + || checkCloudSea() || checkStageName("D_MN08A") || (checkStageName("D_MN09A") + && ((fopAcM_GetRoomNo(this) == 50 && dComIfG_play_c::getLayerNo(0) == 0) + || fopAcM_GetRoomNo(this) == 51)) || (checkMagneBootsOn() && (!checkStageName("D_MN04B") + || !cBgW_CheckBGround(mMagneBootsTopVec.y))) + /* dSv_event_flag_c::F_0800 - Cutscene - After returning to Ordon Woods, until Midna comes out of the shadows + (If 800 is ON, Midna can't be called) */ + || dComIfGs_isEventBit(0x6140)) { return 0; } @@ -11608,7 +11617,11 @@ BOOL daAlink_c::checkItemAction() { } } - if (((dComIfGs_isEventBit(0x2908) || checkNoResetFlg3(FLG3_UNK_8)) && checkGuardActionChange() && !checkUpperReadyThrowAnime() && !checkModeFlg(0x70C52) && checkShieldGet() && !checkNotBattleStage()) && ((mLinkAcch.ChkGroundHit() || checkMagneBootsOn()) && dComIfGp_getRStatus() == 0)) { + /* dSv_event_flag_c::F_0338 - Secret techniques - Obtained 1 secret techinques - Shield attack */ + if (((dComIfGs_isEventBit(0x2908) + || checkNoResetFlg3(FLG3_UNK_8)) && checkGuardActionChange() && !checkUpperReadyThrowAnime() + && !checkModeFlg(0x70C52) && checkShieldGet() && !checkNotBattleStage()) + && ((mLinkAcch.ChkGroundHit() || checkMagneBootsOn()) && dComIfGp_getRStatus() == 0)) { setRStatus(0x3A); if (spActionTrigger()) { @@ -17361,6 +17374,7 @@ int daAlink_c::procCoMetamorphose() { mProcVar0.field_0x3008 = 1; if (mProcVar4.field_0x3010 != 0) { + /* dSv_event_flag_c::F_0776 - Palace of Twilight - Link first turned to wolf due to fog in Palace of Twilight */ dComIfGs_onEventBit(0x5E40); } } @@ -18673,14 +18687,18 @@ void daAlink_c::setDrawHand() { bool daAlink_c::checkSwordDraw() { return ((checkSwordGet() && mSwordChangeWaitTimer == 0) && !checkNoResetFlg2(FLG2_UNK_2080000)) && - (!checkWolf() || !dComIfGs_isEventBit(0x0C08)); + (!checkWolf() + /* dSv_event_flag_c::M_068 - Main Event - when OFF, wolf carries sword and shield on back */ + || !dComIfGs_isEventBit(0x0C08)); } /* 800CB53C-800CB5F8 0C5E7C 00BC+00 3/3 0/0 0/0 .text checkShieldDraw__9daAlink_cFv */ bool daAlink_c::checkShieldDraw() { return ((checkShieldGet() && mShieldChangeWaitTimer == 0) && !checkNoResetFlg2(FLG2_UNK_4080000)) && - (!checkWolf() || !dComIfGs_isEventBit(0x0C08)); + (!checkWolf() + /* dSv_event_flag_c::M_068 - Main Event - when OFF, wolf carries sword and shield on back */ + || !dComIfGs_isEventBit(0x0C08)); } /* 800CB5F8-800CB694 0C5F38 009C+00 2/2 0/0 0/0 .text checkItemDraw__9daAlink_cFv */ @@ -19198,6 +19216,7 @@ int daAlink_c::draw() { dComIfGd_setListDark(); modelDraw(mpLinkModel, temp_r30); + /* dSv_event_flag_c::M_011 - Inside Hyrule Castle - Midna removes wolf's chains in prison */ if (dComIfGs_isEventBit(0x510)) { for (int i = 0; i < 4; i++) { modelDraw(mpWlChainModels[i], temp_r30); diff --git a/src/d/actor/d_a_b_dr.cpp b/src/d/actor/d_a_b_dr.cpp index c3d5cbe3764..d17b0da120f 100644 --- a/src/d/actor/d_a_b_dr.cpp +++ b/src/d/actor/d_a_b_dr.cpp @@ -1939,6 +1939,7 @@ void daB_DR_c::executeWeekHit() { break; case 1000: if (cLib_calcTimer(&mTimer[0]) == 0) { + /* City in the Sky - City in the Sky clear */ dComIfGs_onEventBit(dSv_event_flag_c::F_0268); dComIfGs_onStageBossEnemy(0x16); fopAcM_onSwitch(this, 0x38); diff --git a/src/d/actor/d_a_b_ds.cpp b/src/d/actor/d_a_b_ds.cpp index 34e98953a77..1e3334a0205 100644 --- a/src/d/actor/d_a_b_ds.cpp +++ b/src/d/actor/d_a_b_ds.cpp @@ -4240,6 +4240,7 @@ void daB_DS_c::executeBattle2Dead() { camera->mCamera.SetTrimSize(0); dComIfGp_event_reset(); dComIfGs_onStageBossEnemy(0x13); + /* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */ dComIfGs_onEventBit(0x2010); fopAcM_delete(this); } diff --git a/src/d/actor/d_a_bg.cpp b/src/d/actor/d_a_bg.cpp index 2432823e98b..32aeb1786b1 100644 --- a/src/d/actor/d_a_bg.cpp +++ b/src/d/actor/d_a_bg.cpp @@ -358,6 +358,7 @@ int daBg_c::draw() { field_0x5f0 = 0; } + /* Main Event - Get shadow crystal (can now transform) */ if (dComIfGs_isEventBit(dSv_event_flag_c::M_077)) { field_0x5f0 = 9; } diff --git a/src/d/actor/d_a_canoe.cpp b/src/d/actor/d_a_canoe.cpp index ad8b805dce7..c2d71c0782f 100644 --- a/src/d/actor/d_a_canoe.cpp +++ b/src/d/actor/d_a_canoe.cpp @@ -100,10 +100,12 @@ int daCanoe_c::create() { fopAcM_SetupActor(this, daCanoe_c); if (strcmp(dComIfGp_getStartStageName(), "F_SP127") == 0) { + /* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[463])) { return cPhs_ERROR_e; } + /* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[464])) { fopAcM_SetParam(this, 2); } else { diff --git a/src/d/actor/d_a_cstaF.cpp b/src/d/actor/d_a_cstaF.cpp index 9520e9fffb4..96b50c741ce 100644 --- a/src/d/actor/d_a_cstaF.cpp +++ b/src/d/actor/d_a_cstaF.cpp @@ -86,7 +86,9 @@ int daCstaF_c::CreateHeap() { /* 804DDB48-804DDBB4 000268 006C+00 2/2 0/0 0/0 .text checkCoverModel__9daCstaF_cFv */ BOOL daCstaF_c::checkCoverModel() { - return !dComIfGs_isEventBit(0x2540) && strcmp(dComIfGp_getStartStageName(), l_spStageName) == 0; + /* dSv_event_flag_c::F_0303 - Kakariko Village - Saw Shad's spell 2 */ + return !dComIfGs_isEventBit(0x2540) + && strcmp(dComIfGp_getStartStageName(), l_spStageName) == 0; } /* 804DF9A0-804DF9E4 000000 0044+00 1/1 0/0 0/0 .data l_cylSrc */ @@ -508,7 +510,9 @@ int daCstaF_c::Execute(f32 (**param_0)[3][4]) { fopAcM_seStartCurrentLevel(this, Z2SE_CSTATUE_SEAL_VANISH, 0); } - if (hide_cover || dComIfGs_isEventBit(0x2540)) { + if (hide_cover + /* dSv_event_flag_c::F_0303 - Kakariko Village - Saw Shad's spell 2 */ + || dComIfGs_isEventBit(0x2540)) { mp_coverModel = NULL; m_coverVanishFlg = FALSE; } diff --git a/src/d/actor/d_a_cstatue.cpp b/src/d/actor/d_a_cstatue.cpp index 73ef0cdb583..365b07434db 100644 --- a/src/d/actor/d_a_cstatue.cpp +++ b/src/d/actor/d_a_cstatue.cpp @@ -1122,6 +1122,7 @@ int daCstatue_c::execute() { !fopAcM_CheckCondition(this, 4)) { if (!fopAcM_lc_c::lineCheck(&eyePos, &link->eyePos, this)) { + /* dSv_event_flag_c::F_0684 - Temple of Time - Look at R00 statue using sense */ dComIfGs_onEventBit(0x5440); } } diff --git a/src/d/actor/d_a_e_fm.cpp b/src/d/actor/d_a_e_fm.cpp index 3776e33593e..51e4d3e8921 100644 --- a/src/d/actor/d_a_e_fm.cpp +++ b/src/d/actor/d_a_e_fm.cpp @@ -1729,7 +1729,8 @@ static void demo_camera(e_fm_class* i_this) { if (i_this->mDemoCamTimer == VREG_S(3) + 110) { i_this->mDemoCamMode = 100; dComIfGs_onStageBossEnemy(); - dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[64]); + /* dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear */ + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[64]); } break; } @@ -1810,10 +1811,12 @@ static s8 e_fm_down(e_fm_class* i_this) { i_this->mMode = 2; i_this->mTimers[0] = 33; i_this->mTimers[1] = l_HIO.field_0x9c; + /* dSv_event_flag_c::F_0256 - For E3 2006 - Knocked down boss at leased once */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[256]); } break; case 2: + /* dSv_event_flag_c::F_0257 - For E3 2006 - Only ON when boss is in hollow state (normally off, changes in real time) */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[257]); if (i_this->mAnm == BCK_FM_DOWNDAMAGE && i_this->mpFmModelMorf->isStop()) { @@ -2142,9 +2145,11 @@ static void damage_check(e_fm_class* i_this) { } i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_DAMAGE, -1); + /* dSv_event_flag_c::F_0670 - Goron Mines - Hitting knocked-down Fyrus */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[670]); } else { i_this->field_0x804++; + /* dSv_event_flag_c::F_0254 - For E3 2006 - Hit boss's weak spot at least once */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[254]); if (i_this->field_0x804 >= 10) { @@ -2508,6 +2513,7 @@ static void chain_control3(e_fm_class* i_this, chain_s* i_chain_s, int param_2) } i_chain_s->field_0x617e = 0; + /* dSv_event_flag_c::F_0669 - Goron Mines - Pulled on Fyrus chains at least once */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[669]); } } @@ -2579,8 +2585,10 @@ static void action(e_fm_class* i_this) { i_this->field_0x1b07c = 1; - dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[255]); - dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[257]); + /* dSv_event_flag_c::F_0255 - For E3 2006 - Boss exhausted (grabbing chains) only on during state (normally off) */ + dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[255]); + /* dSv_event_flag_c::F_0257 - For E3 2006 - Only ON when boss is in hollow state (normally off, changes in real time) */ + dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[257]); switch (i_this->mAction) { case ACTION_NORMAL: @@ -2601,7 +2609,8 @@ static void action(e_fm_class* i_this) { break; case ACTION_DAMAGE_RUN: e_fm_damage_run(i_this); - dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[255]); + /* dSv_event_flag_c::F_0255 - For E3 2006 - Boss exhausted (grabbing chains) only on during state (normally off) */ + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[255]); break; case ACTION_ANIMAL: e_fm_animal(i_this); @@ -3460,7 +3469,8 @@ static int useHeapInit(fopAc_ac_c* i_this) { J3DModelData* modelData; e_fm_class* a_this = (e_fm_class*)i_this; - a_this->mpFmModelMorf = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("E_fm", BMDR_FM), NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_fm", BCK_FM_WAIT01), 0, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000284); + a_this->mpFmModelMorf = new mDoExt_McaMorf(static_cast(dComIfG_getObjectRes("E_fm", BMDR_FM)), NULL, NULL, + static_cast(dComIfG_getObjectRes("E_fm", BCK_FM_WAIT01)), 0, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000284); if (a_this->mpFmModelMorf == NULL || a_this->mpFmModelMorf->getModel() == NULL) { return 0; } @@ -3491,7 +3501,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { BRK_FM, BRK_FM_ATTACK, BRK_FM_PUTOUT, BRK_FM_PUTOUTWAIT, BRK_FM_ANIMAL02, BRK_FM_OPDEMO, BRK_FM_HANGWAIT, BRK_FM_DEMOEND01, BRK_FM_DEMOEND02 }; - if (!a_this->mpFmBrk[i]->init(a_this->mpFmModelMorf->getModel()->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_fm", brk[i]), 1, anm_mode, 1.0f, 0, -1)) { + if (!a_this->mpFmBrk[i]->init(a_this->mpFmModelMorf->getModel()->getModelData(), static_cast(dComIfG_getObjectRes("E_fm", brk[i])), 1, anm_mode, 1.0f, 0, -1)) { return 0; } @@ -3504,12 +3514,13 @@ static int useHeapInit(fopAc_ac_c* i_this) { BTK_FM, BTK_FM_ATTACK, BTK_FM_PUTOUT, BTK_FM_PUTOUTWAIT, BTK_FM_ANIMAL02, BTK_FM_OPDEMO, BTK_FM_HANGWAIT, BTK_FM_DEMOEND01, BTK_FM_DEMOEND02 }; - if (!a_this->mpFmBtk[i]->init(a_this->mpFmModelMorf->getModel()->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("E_fm", btk[i]), 1, anm_mode, 1.0f, 0, -1)) { + if (!a_this->mpFmBtk[i]->init(a_this->mpFmModelMorf->getModel()->getModelData(), static_cast(dComIfG_getObjectRes("E_fm", btk[i])), 1, anm_mode, 1.0f, 0, -1)) { return 0; } } - a_this->mpDemoFmModelMorf = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("E_fm", BMDR_FM), NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_fm", BCK_FM_DEMOEND03), 0, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000284); + a_this->mpDemoFmModelMorf = new mDoExt_McaMorf(static_cast(dComIfG_getObjectRes("E_fm", BMDR_FM)), NULL, NULL, + static_cast(dComIfG_getObjectRes("E_fm", BCK_FM_DEMOEND03)), 0, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000284); if (a_this->mpDemoFmModelMorf == NULL || a_this->mpDemoFmModelMorf->getModel() == NULL) { return 0; } @@ -3519,11 +3530,11 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 0; } - if (!a_this->mpDemoFmBrk->init(a_this->mpFmModelMorf->getModel()->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_fm", BRK_FM_DEMOEND03), 1, 0, 1.0f, 0, -1)) { + if (!a_this->mpDemoFmBrk->init(a_this->mpFmModelMorf->getModel()->getModelData(), static_cast(dComIfG_getObjectRes("E_fm", BRK_FM_DEMOEND03)), 1, 0, 1.0f, 0, -1)) { return 0; } - modelData = (J3DModelData*)dComIfG_getObjectRes("E_fm", BMDE_FM_CORE); + modelData = static_cast(dComIfG_getObjectRes("E_fm", BMDE_FM_CORE)); JUT_ASSERT(7257, modelData != 0); a_this->mpCoreModel = mDoExt_J3DModel__create(modelData, 0, 0x11020203); if (a_this->mpCoreModel == NULL) { @@ -3535,7 +3546,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 0; } - if (!a_this->mpCoreBrk->init(a_this->mpCoreModel->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_fm", BRK_CORE_LIGHTON), 1, 2, 1.0f, 0, -1)) { + if (!a_this->mpCoreBrk->init(a_this->mpCoreModel->getModelData(), static_cast(dComIfG_getObjectRes("E_fm", BRK_CORE_LIGHTON)), 1, 2, 1.0f, 0, -1)) { return 0; } @@ -3544,7 +3555,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 0; } - if (!a_this->mpCoreBtk->init(a_this->mpCoreModel->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("E_fm", BTK_CORE_BEAT), 1, 0, 1.0f, 0, -1)) { + if (!a_this->mpCoreBtk->init(a_this->mpCoreModel->getModelData(), static_cast(dComIfG_getObjectRes("E_fm", BTK_CORE_BEAT)), 1, 0, 1.0f, 0, -1)) { return 0; } @@ -3552,7 +3563,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { for (int i = 0; i < 2; i++) { static int eff_bmd[] = {BMDR_EF_FMATTACK_A, BMDR_EF_FMATTACK_B}; - a_this->mpAttackEfModelMorf[i] = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("E_fm", eff_bmd[i]), NULL, NULL, NULL, 0, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000284); + a_this->mpAttackEfModelMorf[i] = new mDoExt_McaMorf(static_cast(dComIfG_getObjectRes("E_fm", eff_bmd[i])), NULL, NULL, NULL, 0, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000284); if (a_this->mpAttackEfModelMorf[i] == NULL || a_this->mpAttackEfModelMorf[i]->getModel() == NULL) { return 0; } @@ -3563,7 +3574,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 0; } - if (!a_this->mpAttackEfBrk->init(a_this->mpAttackEfModelMorf[i]->getModel()->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_fm", BRK_EF_FMATTACK_B), 1, 2, 1.0f, 0, -1)) { + if (!a_this->mpAttackEfBrk->init(a_this->mpAttackEfModelMorf[i]->getModel()->getModelData(), static_cast(dComIfG_getObjectRes("E_fm", BRK_EF_FMATTACK_B)), 1, 2, 1.0f, 0, -1)) { return 0; } } @@ -3574,7 +3585,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { } static int eff_btk[] = {BTK_EF_FMATTACK_A, BTK_EF_FMATTACK_B}; - if (!a_this->mpAttackEfBtk[i]->init(a_this->mpAttackEfModelMorf[i]->getModel()->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("E_fm", eff_btk[i]), 1, 2, 1.0f, 0, -1)) { + if (!a_this->mpAttackEfBtk[i]->init(a_this->mpAttackEfModelMorf[i]->getModel()->getModelData(), static_cast(dComIfG_getObjectRes("E_fm", eff_btk[i])), 1, 2, 1.0f, 0, -1)) { return 0; } } @@ -3582,7 +3593,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { modelData = (J3DModelData*)dComIfG_getObjectRes("E_fm", BMDR_KUSARI); JUT_ASSERT(7404, modelData != 0); - J3DModelData* modelData2 = (J3DModelData*)dComIfG_getObjectRes("E_fm", BMDR_HANDLE); + J3DModelData* modelData2 = static_cast(dComIfG_getObjectRes("E_fm", BMDR_HANDLE)); JUT_ASSERT(7408, modelData2 != 0); for (int i = 0; i < 4; i++) { @@ -3824,9 +3835,13 @@ static int daE_FM_Create(fopAc_ac_c* i_this) { a_this->field_0x794 = 1.0f; a_this->field_0x778 = 1.0f; + /* dSv_event_flag_c::F_0254 - For E3 2006 - Hit boss's weak spot at least once */ dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[254]); + /* dSv_event_flag_c::F_0256 - For E3 2006 - Knocked down boss at leased once */ dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[256]); + /* dSv_event_flag_c::F_0669 - Goron Mines - Pulled on Fyrus chains at least once */ dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[669]); + /* dSv_event_flag_c::F_0670 - Goron Mines - Hitting knocked-down Fyrus */ dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[670]); demo_stop = 0; diff --git a/src/d/actor/d_a_e_fs.cpp b/src/d/actor/d_a_e_fs.cpp index 65fa5cf6d6c..cfa9dbe398e 100644 --- a/src/d/actor/d_a_e_fs.cpp +++ b/src/d/actor/d_a_e_fs.cpp @@ -738,6 +738,7 @@ static cPhs__Step daE_Fs_Create(fopAc_ac_c* i_this) { _this->field_0x5b5 = (fopAcM_GetParam(_this) >> 8) & 0xff; _this->field_0x5b7 = (fopAcM_GetParam(_this) >> 0x18) & 0xff; + /* dSv_event_flag_c::F_0522 - Faron Woods - Heard about Sacred Grove from saved monkey girl */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[522]) && !strcmp("F_SP108", dComIfGp_getStartStageName())) { diff --git a/src/d/actor/d_a_e_gob.cpp b/src/d/actor/d_a_e_gob.cpp index e6835bcb2b8..6ebd28340fc 100644 --- a/src/d/actor/d_a_e_gob.cpp +++ b/src/d/actor/d_a_e_gob.cpp @@ -14,6 +14,90 @@ #include "c/c_damagereaction.h" #include "Z2AudioLib/Z2Instances.h" +enum E_gob_RES_file_ID { + /* BCK */ + /* 0x04 */ BCK_MG_ATTACK_A_A = 0x4, + /* 0x05 */ BCK_MG_ATTACK_A_B, + /* 0x06 */ BCK_MG_ATTACK_A_C, + /* 0x07 */ BCK_MG_ATTACK_B_A, + /* 0x08 */ BCK_MG_ATTACK_B_B, + /* 0x09 */ BCK_MG_ATTACK_B_C, + /* 0x0A */ BCK_MG_BALL, + /* 0x0B */ BCK_MG_CUR, + /* 0x0C */ BCK_MG_DAMAGE_L, + /* 0x0D */ BCK_MG_DAMAGE_R, + /* 0x0E */ BCK_MG_DEFENSE_A, + /* 0x0F */ BCK_MG_DEFENSE_B, + /* 0x10 */ BCK_MG_DEFENSE_C, + /* 0x11 */ BCK_MG_DE_GETUP, + /* 0x12 */ BCK_MG_DE_GETUPWAIT, + /* 0x13 */ BCK_MG_DE_JUMP_A, + /* 0x14 */ BCK_MG_DE_JUMP_B, + /* 0x15 */ BCK_MG_DE_LANDING, + /* 0x16 */ BCK_MG_DE_SITWAIT, + /* 0x17 */ BCK_MG_DE_STANDUP_ED, + /* 0x18 */ BCK_MG_DE_STANDUP_ST, + /* 0x19 */ BCK_MG_DE_TALK_ST, + /* 0x1A */ BCK_MG_EXCITE, + /* 0x1B */ BCK_MG_FIRE, + /* 0x1C */ BCK_MG_HOLD, + /* 0x1D */ BCK_MG_LANDING, + /* 0x1E */ BCK_MG_N_STEP, + /* 0x1F */ BCK_MG_N_TALK, + /* 0x20 */ BCK_MG_N_WAIT, + /* 0x21 */ BCK_MG_SHIELD, + /* 0x22 */ BCK_MG_STAND, + /* 0x23 */ BCK_MG_ST_WAIT, + /* 0x24 */ BCK_MG_ST_WALK, + /* 0x25 */ BCK_MG_WAIT, + /* 0x26 */ BCK_MG_WALK, + + /* BMDR */ + /* 0x29 */ BMDR_MG = 0x29, + /* 0x2A */ BMDR_MG_MET, +}; + +enum Joint { + /* 0x00 */ JNT_WORLD_ROOT, + /* 0x01 */ JNT_BACK_BONE1, + /* 0x02 */ JNT_BACK_BONE2, + /* 0x03 */ JNT_BACK_BONE3, + /* 0x04 */ JNT_ARM_L1, + /* 0x05 */ JNT_ARM_L2, + /* 0x06 */ JNT_ARM_L3, + /* 0x07 */ JNT_ARM_L4, + /* 0x08 */ JNT_FINGER_L1, + /* 0x09 */ JNT_FINGER_L2, + /* 0x0A */ JNT_FINGER_L3, + /* 0x0B */ JNT_THUMB_L1, + /* 0x0C */ JNT_THUMB_L2, + /* 0x0D */ JNT_ARM_R1, + /* 0x0E */ JNT_ARM_R2, + /* 0x0F */ JNT_ARM_R3, + /* 0x10 */ JNT_ARM_R4, + /* 0x11 */ JNT_FINGER_R1, + /* 0x12 */ JNT_FINGER_R2, + /* 0x13 */ JNT_FINGER_R3, + /* 0x14 */ JNT_THUMB_R1, + /* 0x15 */ JNT_THUMB_R2, + /* 0x16 */ JNT_BACK_BONE4, + /* 0x17 */ JNT_NECK, + /* 0x18 */ JNT_HEAD, + /* 0x19 */ JNT_JAW, + /* 0x1A */ JNT_LIP, + /* 0x1B */ JNT_BUST, + /* 0x1C */ JNT_BODY_1, + /* 0x1D */ JNT_WAIST, + /* 0x1E */ JNT_LEG_L1, + /* 0x1F */ JNT_LEG_L2, + /* 0x20 */ JNT_LEG_L3, + /* 0x21 */ JNT_LEG_L4, + /* 0x22 */ JNT_LEG_R1, + /* 0x23 */ JNT_LEG_R2, + /* 0x24 */ JNT_LEG_R3, + /* 0x25 */ JNT_LEG_R4, +}; + enum daE_GOB_ACTION { ACTION_S_SET, ACTION_START, @@ -42,20 +126,20 @@ daE_GOB_HIO_c::daE_GOB_HIO_c() { } /* 806D80E0-806D842C 000140 034C+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */ -static int nodeCallBack(J3DJoint* i_joint, int param_1) { - if (param_1 == 0) { +static int nodeCallBack(J3DJoint* i_joint, int param_2) { + if (param_2 == 0) { int jnt_no = i_joint->getJntNo(); J3DModel* model = j3dSys.getModel(); e_gob_class* enemy = (e_gob_class*)model->getUserArea(); if (enemy != NULL) { - if (jnt_no == 22 || jnt_no == 23) { + if (jnt_no == JNT_BACK_BONE4 || jnt_no == JNT_NECK) { MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx); cMtx_YrotM(*calc_mtx, enemy->mHeadRotY); cMtx_ZrotM(*calc_mtx, enemy->mHeadRotZ); model->setAnmMtx(jnt_no, *calc_mtx); MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); - } else if (jnt_no == 1 || jnt_no == 2) { + } else if (jnt_no == JNT_BACK_BONE1 || jnt_no == JNT_BACK_BONE2) { MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx); cMtx_YrotM(*calc_mtx, enemy->mBodyRotY); cMtx_ZrotM(*calc_mtx, enemy->mBodyRotZ); @@ -63,7 +147,8 @@ static int nodeCallBack(J3DJoint* i_joint, int param_1) { MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); } - if (jnt_no == 1 || jnt_no == 2 || jnt_no == 3 || jnt_no == 4 || jnt_no == 5 || jnt_no == 6 || jnt_no == 13 || jnt_no == 14 || jnt_no == 15) { + if (jnt_no == JNT_BACK_BONE1 || jnt_no == JNT_BACK_BONE2 || jnt_no == JNT_BACK_BONE3 || jnt_no == JNT_ARM_L1 + || jnt_no == JNT_ARM_L2 || jnt_no == JNT_ARM_L3 || jnt_no == JNT_ARM_R1 || jnt_no == JNT_ARM_R2 || jnt_no == JNT_ARM_R3) { int sp10 = jnt_no & 3; MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx); cMtx_YrotM(*calc_mtx, enemy->field_0x6c6[sp10]); @@ -169,7 +254,7 @@ static void damage_check(e_gob_class* i_this) { } cXyz sp24; - MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(0x1C), mDoMtx_stack_c::get()); + MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(JNT_BODY_1), mDoMtx_stack_c::get()); cXyz sp18(50.0f + VREG_F(17), VREG_F(18), VREG_F(19)); mDoMtx_stack_c::multVec(&sp18, &sp24); dComIfGp_setHitMark(hitmark, actor, &sp24, &actor->shape_angle, NULL, 0); @@ -210,17 +295,18 @@ static void fight(e_gob_class* i_this) { actor->home.pos.y = actor->current.pos.y; /* fallthrough */ case 0: - anm_init(i_this, 0x26, 10.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_WALK, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 1; i_this->mTimers[0] = 20.0f + cM_rndF(20.0f); actor->home.pos.y = actor->current.pos.y; break; + case 1: speed_target = l_HIO.normal_walk_speed; if (i_this->mPlayerDist > 600.0f) { if (i_this->mTimers[2] == 0) { - anm_init(i_this, 0x1A, 10.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_EXCITE, 10.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_PROVOKE_A, -1); i_this->mMode = 5; } @@ -228,6 +314,7 @@ static void fight(e_gob_class* i_this) { i_this->mMode = 2; } break; + case 2: i_this->mTimers[2] = 200.0f + cM_rndF(70.0f); @@ -240,11 +327,11 @@ static void fight(e_gob_class* i_this) { } if (0.0f != speed_target) { - if (i_this->mAnm != 0x24) { - anm_init(i_this, 0x24, 10.0f, 2, 1.0f); + if (i_this->mAnm != BCK_MG_ST_WALK) { + anm_init(i_this, BCK_MG_ST_WALK, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } - } else if (i_this->mAnm != 0x23 && anm_frame == 0) { - anm_init(i_this, 0x23, 10.0f, 2, 1.0f); + } else if (i_this->mAnm != BCK_MG_ST_WAIT && anm_frame == 0) { + anm_init(i_this, BCK_MG_ST_WAIT, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } if (speed_target <= 0.0f) { @@ -264,6 +351,7 @@ static void fight(e_gob_class* i_this) { i_this->mTimers[0] = 20.0f + cM_rndF(20.0f); break; + case 5: if (anm_frame == 102) { i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_PROVOKE_B, -1); @@ -279,22 +367,24 @@ static void fight(e_gob_class* i_this) { i_this->mTimers[2] = 200.0f + cM_rndF(70.0f); } break; + case 10: speed_target = l_HIO.normal_walk_speed; angle_target = i_this->field_0x668; if (i_this->mTimers[0] == 0) { - anm_init(i_this, 0x25, 5.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_WAIT, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 11; i_this->mTimers[0] = 60.0f + cM_rndF(30.0f); } break; + case 11: angle_target = i_this->field_0x668; angle_step = 0; if (i_this->mTimers[0] == 0) { - anm_init(i_this, 0x26, 5.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_WALK, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 10; i_this->mTimers[0] = 90.0f + cM_rndF(30.0f); @@ -330,24 +420,26 @@ static u8 attack(e_gob_class* i_this) { switch (i_this->mMode) { case 0: if (i_this->field_0xd1f == 0) { - anm_init(i_this, 4, 5.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_ATTACK_A_A, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 1; i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_ATK_A_READY, -1); } else { - anm_init(i_this, 7, 5.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_ATTACK_B_A, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 11; i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_ATK_B_READY, -1); } break; + case 1: var_r28 = 1; if (i_this->mpModelMorf->isStop()) { i_this->mMode = 2; - anm_init(i_this, 5, 1.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_ATTACK_A_B, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mTimers[0] = l_HIO.swing_time_a; } break; + case 2: var_r28 = 1; if (anm_frame == 1) { @@ -357,7 +449,7 @@ static u8 attack(e_gob_class* i_this) { i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_GOB_V_ATK_A_WAIT, -1); if (i_this->mTimers[0] == 0) { - anm_init(i_this, 6, 3.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_ATTACK_A_C, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mSound.startCreatureExtraSound(Z2SE_EN_GOB_ARM_SWING_ATTACK, 0, -1); dComIfGp_particle_set(0x8422, &actor->current.pos, &actor->shape_angle, &base_sc); dComIfGp_particle_set(0x8423, &actor->current.pos, &actor->shape_angle, &base_sc); @@ -365,6 +457,7 @@ static u8 attack(e_gob_class* i_this) { i_this->mMode = 3; } break; + case 3: var_r25 = 0; i_this->field_0x6a8 = 0x400; @@ -377,28 +470,31 @@ static u8 attack(e_gob_class* i_this) { var_r26 = 1; } break; + case 11: var_r28 = 1; if (i_this->mpModelMorf->isStop()) { i_this->mMode = 12; - anm_init(i_this, 8, 1.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_ATTACK_B_B, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mTimers[0] = l_HIO.swing_time_b; } break; + case 12: var_r28 = 1; i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_GOB_V_ATK_B_WAIT, -1); if (i_this->mTimers[0] == 0) { i_this->mSound.startCreatureExtraSound(Z2SE_EN_GOB_ARM_DOWN_WIND, 0, -1); - anm_init(i_this, 9, 3.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_ATTACK_B_C, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); dComIfGp_particle_set(0x8424, &actor->current.pos, &actor->shape_angle, &base_sc); dComIfGp_particle_set(0x8425, &actor->current.pos, &actor->shape_angle, &base_sc); i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_ATK_B, -1); i_this->mMode = 13; } break; + case 13: var_r25 = 0; i_this->field_0x6a8 = 0x400; @@ -449,16 +545,17 @@ static void defence(e_gob_class* i_this) { switch (i_this->mMode) { case 0: if (i_this->mPlayerCutLRC == 0) { - anm_init(i_this, 0xE, 3.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_DEFENSE_A, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); } else if (i_this->mPlayerCutLRC == 1) { - anm_init(i_this, 0xF, 3.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_DEFENSE_B, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); } else { - anm_init(i_this, 0x10, 3.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_DEFENSE_C, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); } i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_GUARD, -1); i_this->mMode = 1; break; + case 1: if (i_this->mpModelMorf->isStop()) { anm_finished = TRUE; @@ -491,7 +588,7 @@ static u8 ball(e_gob_class* i_this) { switch (i_this->mMode) { case 0: - anm_init(i_this, 0xB, 5.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_CUR, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 1; i_this->field_0xd1c = 0; /* fallthrough */ @@ -510,7 +607,7 @@ static u8 ball(e_gob_class* i_this) { speed_step = 2.0f + TREG_F(11); if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 0xA, 5.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_BALL, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 2; i_this->mTimers[0] = 60; i_this->mTimers[2] = 300.0f + cM_rndF(100.0f); @@ -525,6 +622,7 @@ static u8 ball(e_gob_class* i_this) { } } break; + case 3: i_this->field_0x6b4 = l_HIO.rotation_speed; speed_target = l_HIO.roll_speed; @@ -539,19 +637,21 @@ static u8 ball(e_gob_class* i_this) { i_this->mMode = 4; } break; + case 4: speed_step = 2.0f; cLib_addCalcAngleS2(&i_this->field_0x6b2, 0, 1, 0x800); cLib_addCalcAngleS2(&actor->current.angle.y, i_this->mPlayerAngleDist, 2, 0x700); if (i_this->field_0x6b2 == 0) { - anm_init(i_this, 0x22, 2.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_STAND, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 5; dComIfGp_particle_set(0x8429, &actor->current.pos, &actor->shape_angle, &base_sc); dComIfGp_particle_set(0x842A, &actor->current.pos, &actor->shape_angle, &base_sc); i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_RECOVER, -1); } break; + case 5: if (anm_frame == 16) { i_this->mSound.startCreatureSound(Z2SE_EN_GOB_KNUCKLE_GROUND, 0, -1); @@ -630,7 +730,7 @@ static void s_damage(e_gob_class* i_this) { switch (i_this->mMode) { case 0: - anm_init(i_this, 0x21, 5.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_SHIELD, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 1; /* fallthrough */ case 1: @@ -658,6 +758,7 @@ static void damage(e_gob_class* i_this) { i_this->mAction = ACTION_BALL; i_this->mMode = 0; i_this->mDamageInvulnerabilityTimer = 30; + /* dSv_event_flag_c::F_0672 - Goron Mines - First time seeing magnet goron tumbling */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[672]); } @@ -705,8 +806,9 @@ static u8 glab(e_gob_class* i_this) { i_this->mMode = 1; spA = 1; actor->speedF = 0.0f; - anm_init(i_this, 0x1C, 5.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_HOLD, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); break; + case 1: if (enemy->checkThrowMode(8)) { enemy->offThrowMode(8); @@ -725,6 +827,7 @@ static u8 glab(e_gob_class* i_this) { spA = 1; actor->speed.y = 0.0f; break; + case 2: if (anm_frame == 1) { i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_CATCHED_ANNOY, -1); @@ -754,6 +857,7 @@ static u8 glab(e_gob_class* i_this) { i_this->speed.y = 0.0f; } break; + case 3: case 4: if (i_this->field_0x6d8 >= 2) { @@ -791,6 +895,7 @@ static u8 glab(e_gob_class* i_this) { } } break; + case 5: { actor->speed.y = 0.0f; cLib_addCalcAngleS2(&i_this->field_0x6b2, 0, 1, 0x800); @@ -827,7 +932,7 @@ static u8 glab(e_gob_class* i_this) { i_this->mAction = ACTION_END; i_this->mMode = 0; } else { - anm_init(i_this, 0x1D, 2.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_LANDING, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_RECOVER, -1); i_this->mMode = 6; @@ -859,6 +964,7 @@ static u8 glab(e_gob_class* i_this) { cLib_addCalcAngleS2(&actor->current.angle.y, i_this->mPlayerAngleDist, 1, 0x200); break; } + // fallthrough case 6: spB = 1; cLib_addCalcAngleS2(&actor->current.angle.y, i_this->mPlayerAngleDist, 1, 0x200); @@ -920,7 +1026,7 @@ static void jump(e_gob_class* i_this) { sp8 = 1; i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_MAGMA, -1); - anm_init(i_this, 0x1B, 3.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_FIRE, 3.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 1; actor->speed.y = 110.0f + KREG_F(2); i_this->field_0x6b6 = cM_rndFX(2000.0f); @@ -950,6 +1056,7 @@ static void jump(e_gob_class* i_this) { } } break; + case 1: actor->current.pos.x += i_this->field_0x6b8.x; actor->current.pos.z += i_this->field_0x6b8.z; @@ -1004,9 +1111,10 @@ static void start(e_gob_class* i_this) { switch (i_this->mMode) { case 0: - anm_init(i_this, 0x16, 0.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_DE_SITWAIT, 0.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 1; break; + case 1: if (!dComIfGp_checkPlayerStatus0(0, 0x100) && ms != NULL && ms->field_0x5c4[0] != 0) { i_this->mDemoCamMode = 1; @@ -1014,23 +1122,26 @@ static void start(e_gob_class* i_this) { i_this->mTimers[0] = 120; } break; + case 2: if (i_this->mTimers[0] == 1) { - anm_init(i_this, 0x18, 10.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_DE_STANDUP_ST, 10.0f, J3DFrameCtrl::EMode_NONE, 1.0f); } - if (i_this->mAnm == 0x18 && i_this->mpModelMorf->isStop()) { - anm_init(i_this, 0x19, 10.0f, 2, 1.0f); + if (i_this->mAnm == BCK_MG_DE_STANDUP_ST && i_this->mpModelMorf->isStop()) { + anm_init(i_this, BCK_MG_DE_TALK_ST, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } break; + case 3: - if (i_this->mAnm == 0x13 && i_this->mpModelMorf->isStop()) { + if (i_this->mAnm == BCK_MG_DE_JUMP_A && i_this->mpModelMorf->isStop()) { actor->speed.y = 150.0f; i_this->mMode = 4; - anm_init(i_this, 0x14, 1.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_DE_JUMP_B, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_JUMP, -1); } break; + case 4: if (actor->speed.y <= 0.0f) { actor->current.pos.z = 0.0f; @@ -1039,19 +1150,21 @@ static void start(e_gob_class* i_this) { i_this->mMode = 5; dComIfGp_getVibration().StartShock(VIBMODE_S_POWER8, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); - anm_init(i_this, 0x1D, 0.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_LANDING, 0.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->field_0xd8c = 15.0f + BREG_F(7); i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_RECOVER, -1); } } break; + case 5: if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 0x23, 5.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_ST_WAIT, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 6; } break; + case 6: break; } @@ -1067,30 +1180,35 @@ static void end(e_gob_class* i_this) { switch (i_this->mMode) { case 0: - anm_init(i_this, 0x15, 0.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_DE_LANDING, 0.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_FALL_LAST, -1); i_this->mSound.startCreatureSound(Z2SE_EN_GOB_HIP_DOWN, 0, -1); i_this->mMode = 1; break; + case 1: break; + case 2: - anm_init(i_this, 0x11, 5.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_DE_GETUP, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mSound.startCreatureVoice(Z2SE_EN_GOB_V_GETUP_LAST, -1); i_this->mMode = 3; break; + case 3: if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 0x12, 5.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_DE_GETUPWAIT, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } break; + case 4: - anm_init(i_this, 0x17, 5.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_DE_STANDUP_ED, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 5; break; + case 5: if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 0x25, 5.0f, 2, 1.0f); + anm_init(i_this, BCK_MG_WAIT, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } } } @@ -1113,8 +1231,8 @@ static void message(e_gob_class* i_this) { i_this->field_0xd90 = 0; } - if (i_this->mAnm != 0x1F) { - anm_init(i_this, 0x1F, 5.0f, 2, 1.0f); + if (i_this->mAnm != BCK_MG_N_TALK) { + anm_init(i_this, BCK_MG_N_TALK, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } return; } @@ -1134,16 +1252,16 @@ static void message(e_gob_class* i_this) { s16 temp_r0 = i_this->current.angle.y - i_this->mPlayerAngleDist; if (temp_r0 > 0x800 || temp_r0 < -0x800) { - if (i_this->mAnm != 0x1E) { - anm_init(i_this, 0x1E, 5.0f, 2, 1.0f); + if (i_this->mAnm != BCK_MG_N_STEP) { + anm_init(i_this, BCK_MG_N_STEP, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mTimers[1] = 15; } cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mPlayerAngleDist, 2, 0x200); - } else if (i_this->mTimers[1] == 0 && i_this->mAnm != 0x20) { - anm_init(i_this, 0x20, 10.0f, 2, 1.0f); + } else if (i_this->mTimers[1] == 0 && i_this->mAnm != BCK_MG_N_WAIT) { + anm_init(i_this, BCK_MG_N_WAIT, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } - } else if (i_this->mAnm != 0x20) { - anm_init(i_this, 0x20, 10.0f, 2, 1.0f); + } else if (i_this->mAnm != BCK_MG_N_WAIT) { + anm_init(i_this, BCK_MG_N_WAIT, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } if (i_this->mTimers[3] != 0 && dComIfGp_event_runCheck()) { @@ -1193,6 +1311,7 @@ static void action(e_gob_class* i_this) { stop_subbgm = FALSE; sp28 = 0; break; + case 1: start(i_this); on_attention = FALSE; @@ -1200,31 +1319,38 @@ static void action(e_gob_class* i_this) { stop_subbgm = FALSE; sp28 = 0; break; + case 2: fight(i_this); i_this->field_0x6ac = 1; spD = 1; break; + case 3: spB = attack(i_this); i_this->field_0x6ac = 1; break; + case 4: defence(i_this); i_this->field_0x6ac = 1; spD = 1; break; + case 5: spC = ball(i_this); spF = 1; sp2C = 1; break; + case 6: s_damage(i_this); break; + case 7: damage(i_this); break; + case 8: sp10 = glab(i_this); on_co_bit = FALSE; @@ -1236,6 +1362,7 @@ static void action(e_gob_class* i_this) { spA = 0; } break; + case 9: jump(i_this); on_attention = FALSE; @@ -1246,12 +1373,14 @@ static void action(e_gob_class* i_this) { spA = 0; sp9 = 0; break; + case 10: end(i_this); on_attention = FALSE; spA = 0; sp9 = 0; break; + case 11: spA = 0; sp9 = 0; @@ -1358,7 +1487,8 @@ static void action(e_gob_class* i_this) { i_this->mAction = ACTION_JUMP; i_this->mMode = 0; i_this->field_0x6d6 = 0; - dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[671]); + /* dSv_event_flag_c::F_0671 - Goron Mines - Through magnet goron into lava once */ + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[671]); i_this->field_0x6d8++; OS_REPORT("//////////////E_GOB DOWN CT %d\n", i_this->field_0x6d8); @@ -1409,6 +1539,7 @@ static void action(e_gob_class* i_this) { } else if (sp1E < -6000) { sp1E = -6000; } + if (sp1C > 6000) { sp1C = 6000; } else if (sp1C < -6000) { @@ -1527,6 +1658,7 @@ static void demo_camera(e_gob_class* i_this) { switch (i_this->mDemoCamMode) { case 0: break; + case 1: if (!actor->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); @@ -1547,6 +1679,7 @@ static void demo_camera(e_gob_class* i_this) { player->changeOriginalDemo(); Z2GetAudioMgr()->subBgmStart(Z2BGM_MAGNE_GORON_D01); dComIfGp_getEvent().startCheckSkipEdge(i_this); + // fallthrough case 2: if (i_this->mDemoCamTimer < 20) { sp88.set(0.0f, player->current.pos.y, 1100.0f); @@ -1566,6 +1699,7 @@ static void demo_camera(e_gob_class* i_this) { i_this->mDemoCamCenterSpd.z = fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z); } break; + case 3: cam_3d_morf(i_this, 0.2f); cLib_addCalc2(&i_this->field_0xd88, 0.1f + VREG_F(1), 1.0f, 0.002f + VREG_F(2)); @@ -1580,13 +1714,14 @@ static void demo_camera(e_gob_class* i_this) { } if (i_this->mMsgFlow.doFlow(i_this, NULL, 0)) { - anm_init(i_this, 0x13, 5.0f, 0, 1.0f); + anm_init(i_this, BCK_MG_DE_JUMP_A, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mDemoCamMode = 4; i_this->mDemoCamTimer = 0; i_this->mMode = 3; } } break; + case 4: if (i_this->mDemoCamTimer > 36) { i_this->mDemoCamMode = 5; @@ -1596,6 +1731,7 @@ static void demo_camera(e_gob_class* i_this) { Z2GetAudioMgr()->subBgmStart(Z2BGM_MAGNE_GORON_D02); } break; + case 5: if (i_this->mDemoCamTimer == 10) { player->changeDemoMode(1, 1, 2, 0); @@ -1641,6 +1777,7 @@ static void demo_camera(e_gob_class* i_this) { i_this->mDemoCamEye.set(-341.0f, 24.0f, 2223.0f); } break; + case 6: if (i_this->mDemoCamTimer == 30) { dComIfGp_getVibration().StartShock(VIBMODE_S_POWER8, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); @@ -1665,6 +1802,7 @@ static void demo_camera(e_gob_class* i_this) { ms->field_0x584 = 0; } break; + case 7: cam_3d_morf(i_this, 0.2f); cLib_addCalc2(&i_this->field_0xd88, 0.05f + VREG_F(1), 1.0f, 0.001f + VREG_F(2)); @@ -1676,9 +1814,11 @@ static void demo_camera(e_gob_class* i_this) { Z2GetAudioMgr()->subBgmStart(Z2BGM_MAGNE_GORON); } break; + case 10: player->cancelGoronThrowEvent(); i_this->mDemoCamMode = 11; + // fallthrough case 11: if (!actor->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); @@ -1702,6 +1842,7 @@ static void demo_camera(e_gob_class* i_this) { camera->mCamera.SetTrimSize(3); sp88.set(0.0f, 500.0f + player->current.pos.y, -400.0f); daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp88, 0, 0); + // fallthrough case 12: if (i_this->mDemoCamTimer == 2) { daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); @@ -1745,6 +1886,7 @@ static void demo_camera(e_gob_class* i_this) { i_this->mDemoCamTimer = 0; i_this->mDemoCamEye.set(306.0f, 1187.0f, -372.0f); i_this->mDemoCamCenter = actor->eyePos; + // fallthrough case 13: sp88.set(0.0f, player->current.pos.y, -200.0f); daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp88, 0, 0); @@ -1772,6 +1914,7 @@ static void demo_camera(e_gob_class* i_this) { i_this->mDemoCamTimer = 0; } } + // fallthrough case 14: cLib_addCalc2(&i_this->mDemoCamCenter.x, actor->eyePos.x + NREG_F(7), 0.1f, 50.0f); cLib_addCalc2(&i_this->mDemoCamCenter.y, actor->eyePos.y + NREG_F(8), 0.1f, 50.0f); @@ -1793,6 +1936,7 @@ static void demo_camera(e_gob_class* i_this) { actor->shape_angle = player->shape_angle; my->current.pos.y = 1000.0f + (ms->field_0x58c - 700.0f) + YREG_F(1); dComIfGp_getVibration().StartQuake(VIBMODE_Q_POWER2, 1, cXyz(0.0f, 1.0f, 0.0f)); + // fallthrough case 15: if (i_this->mDemoCamTimer == 2) { i_this->mDemoCamFovy = 60.0f; @@ -1827,6 +1971,7 @@ static void demo_camera(e_gob_class* i_this) { fopAcM_onSwitch(actor, 14); } break; + case 100: camera->mCamera.Reset(i_this->mDemoCamCenter, i_this->mDemoCamEye, i_this->mDemoCamFovy, 0); camera->mCamera.Start(); @@ -1834,6 +1979,7 @@ static void demo_camera(e_gob_class* i_this) { dComIfGp_event_reset(); daPy_getPlayerActorClass()->cancelOriginalDemo(); i_this->mDemoCamMode = 0; + break; } if (i_this->mDemoCamMode != 0) { @@ -1915,30 +2061,30 @@ static int daE_GOB_Execute(e_gob_class* i_this) { i_this->mpModelMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); - if (i_this->mAnm == 0x1B) { + if (i_this->mAnm == BCK_MG_FIRE) { i_this->field_0xd30 = dComIfGp_particle_set(i_this->field_0xd30, 0x8459, &i_this->current.pos, &i_this->shape_angle, &base_sc); i_this->field_0xd34 = dComIfGp_particle_set(i_this->field_0xd34, 0x845A, &i_this->current.pos, &i_this->shape_angle, &base_sc); dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0xd30); dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0xd34); } - if (i_this->mAnm == 0x26) { + if (i_this->mAnm == BCK_MG_WALK) { if (i_this->mpModelMorf->checkFrame(21.0f) || i_this->mpModelMorf->checkFrame(44.0f)) { i_this->mSound.startCreatureSound(Z2SE_FN_GOB_WALK, 0, -1); } - } else if (i_this->mAnm == 0x22) { + } else if (i_this->mAnm == BCK_MG_STAND) { if (i_this->mpModelMorf->checkFrame(27.0f)) { i_this->mSound.startCreatureSound(Z2SE_FN_GOB_WALK, 0, -1); } - } else if (i_this->mAnm == 4) { + } else if (i_this->mAnm == BCK_MG_ATTACK_A_A) { if (i_this->mpModelMorf->checkFrame(9.0f)) { i_this->mSound.startCreatureSound(Z2SE_FN_GOB_WALK, 0, -1); } - } else if (i_this->mAnm == 0x13) { + } else if (i_this->mAnm == BCK_MG_DE_JUMP_A) { if (i_this->mpModelMorf->checkFrame(18.0f)) { i_this->mSound.startCreatureSound(Z2SE_FN_GOB_WALK, 0, -1); } - } else if (i_this->mAnm == 0x11) { + } else if (i_this->mAnm == BCK_MG_DE_GETUP) { if (i_this->mpModelMorf->checkFrame(32.5f)) { i_this->mSound.startCreatureSound(Z2SE_FN_GOB_WALK, 0, -1); } @@ -1946,30 +2092,30 @@ static int daE_GOB_Execute(e_gob_class* i_this) { if (i_this->mpModelMorf->checkFrame(10.0f) || i_this->mpModelMorf->checkFrame(24.0f)) { i_this->mSound.startCreatureSound(Z2SE_FN_GOB_STEP, 0, -1); } - } else if (i_this->mAnm == 0x24) { + } else if (i_this->mAnm == BCK_MG_ST_WALK) { if (i_this->mpModelMorf->checkFrame(7.5f) || i_this->mpModelMorf->checkFrame(15.0f) || i_this->mpModelMorf->checkFrame(22.5f) || i_this->mpModelMorf->checkFrame(29.5f)) { i_this->mSound.startCreatureSound(Z2SE_FN_GOB_STEP, 0, -1); } - } else if (i_this->mAnm == 0x18 || i_this->mAnm == 0x17) { + } else if (i_this->mAnm == BCK_MG_DE_STANDUP_ST || i_this->mAnm == BCK_MG_DE_STANDUP_ED) { if (i_this->mpModelMorf->checkFrame(24.5f) || i_this->mpModelMorf->checkFrame(41.0f)) { i_this->mSound.startCreatureSound(Z2SE_FN_GOB_STEP, 0, -1); } - } else if (i_this->mAnm == 0x1D) { + } else if (i_this->mAnm == BCK_MG_LANDING) { if (i_this->mpModelMorf->checkFrame(2.5f)) { i_this->mSound.startCreatureSound(Z2SE_FN_GOB_JUMP, 0, -1); } - } else if (i_this->mAnm == 0x19) { + } else if (i_this->mAnm == BCK_MG_DE_TALK_ST) { if (i_this->mpModelMorf->checkFrame(16.0f)) { i_this->mSound.startCreatureSound(Z2SE_EN_GOB_KNUCKLES_FRICTION, 0, -1); } - } else if (i_this->mAnm == 0x1A && i_this->mpModelMorf->checkFrame(60.0f)) { + } else if (i_this->mAnm == BCK_MG_EXCITE && i_this->mpModelMorf->checkFrame(60.0f)) { i_this->mSound.startCreatureSound(Z2SE_EN_GOB_KNUCKLES_FRICTION, 0, -1); } i_this->mpModelMorf->modelCalc(); if (i_this->field_0x6da == 0) { - MTXCopy(sp34->getAnmMtx(0x17), mDoMtx_stack_c::get()); + MTXCopy(sp34->getAnmMtx(JNT_NECK), mDoMtx_stack_c::get()); mDoMtx_stack_c::multVecZero(&i_this->field_0x6dc); } else { i_this->field_0x6dc += i_this->field_0x6e8; @@ -2017,14 +2163,14 @@ static int daE_GOB_Execute(e_gob_class* i_this) { i_this->attention_info.position = i_this->eyePos; i_this->attention_info.position.y += 170.0f + JREG_F(2); } else { - MTXCopy(sp34->getAnmMtx(0x18), *calc_mtx); + MTXCopy(sp34->getAnmMtx(JNT_HEAD), *calc_mtx); sp48.set(0.0f, 0.0f, 0.0f); MtxPosition(&sp48, &i_this->eyePos); i_this->attention_info.position = i_this->eyePos; i_this->attention_info.position.y += 120.0f + JREG_F(0); } - MTXCopy(sp34->getAnmMtx(1), *calc_mtx); + MTXCopy(sp34->getAnmMtx(JNT_BACK_BONE1), *calc_mtx); sp48.set(50.0f + JREG_F(1), JREG_F(2), JREG_F(3)); MtxPosition(&sp48, &sp3C); if (i_this->mDamageInvulnerabilityTimer != 0) { @@ -2043,7 +2189,7 @@ static int daE_GOB_Execute(e_gob_class* i_this) { i_this->mCcSph.SetTgHitMark((CcG_Tg_HitMark)0); } - MTXCopy(sp34->getAnmMtx(0x10), *calc_mtx); + MTXCopy(sp34->getAnmMtx(JNT_ARM_R4), *calc_mtx); sp48.set(0.0f, 0.0f, 0.0f); MtxPosition(&sp48, &i_this->field_0xd24); @@ -2057,7 +2203,7 @@ static int daE_GOB_Execute(e_gob_class* i_this) { } i_this->mAtSph.SetR((100.0f + TREG_F(8)) * l_HIO.size); } else { - MTXCopy(sp34->getAnmMtx(1), *calc_mtx); + MTXCopy(sp34->getAnmMtx(JNT_BACK_BONE1), *calc_mtx); sp48.set(70.0f + NREG_F(1), 50.0f + NREG_F(2), NREG_F(3)); MtxPosition(&sp48, &sp3C); i_this->mAtSph.SetC(sp3C); @@ -2111,7 +2257,7 @@ static int daE_GOB_Delete(e_gob_class* i_this) { static int useHeapInit(fopAc_ac_c* i_this) { e_gob_class* a_this = (e_gob_class*)i_this; - a_this->mpModelMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("E_gob", 0x29), NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_gob", 0x25), 2, 1.0f, 0, -1, &a_this->mSound, 0x80000, 0x11000084); + a_this->mpModelMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("E_gob", BMDR_MG), NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_gob", BCK_MG_WAIT), 2, 1.0f, 0, -1, &a_this->mSound, 0x80000, 0x11000084); if (a_this->mpModelMorf == NULL || a_this->mpModelMorf->getModel() == NULL) { return 0; } @@ -2123,7 +2269,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { model->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBack); } - void* modelData = dComIfG_getObjectRes("E_gob", 0x2A); + void* modelData = dComIfG_getObjectRes("E_gob", BMDR_MG_MET); JUT_ASSERT(3631, modelData != 0); a_this->mpArmorModel = mDoExt_J3DModel__create((J3DModelData*)modelData, 0x80000, 0x11000084); if (a_this->mpArmorModel == NULL) { @@ -2250,7 +2396,9 @@ static int daE_GOB_Create(fopAc_ac_c* i_this) { } dComIfGs_onZoneSwitch(5, -1); + /* dSv_event_flag_c::F_0671 - Goron Mines - Through magnet goron into lava once */ dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[671]); + /* dSv_event_flag_c::F_0672 - Goron Mines - First time seeing magnet goron tumbling */ dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[672]); daE_GOB_Execute(a_this); } diff --git a/src/d/actor/d_a_e_nest.cpp b/src/d/actor/d_a_e_nest.cpp index 245160995a3..83a2fdc99d0 100644 --- a/src/d/actor/d_a_e_nest.cpp +++ b/src/d/actor/d_a_e_nest.cpp @@ -309,6 +309,7 @@ static void e_nest_normal(e_nest_class* i_this) { i_this->mHitActorID = fopAcM_GetID(daPy_getPlayerActorClass()); if (!strcmp(dComIfGp_getStartStageName(), "F_SP103")) { i_this->mDemoStage = 1; + /* dSv_event_flag_c::F_0084 - Ordon Village - Opening days 2&3: knocked down a beehive with slingshot */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[183]); } } @@ -318,12 +319,14 @@ static void e_nest_normal(e_nest_class* i_this) { || i_this->mAtInfo.mHitType == HIT_TYPE_BOOMERANG || i_this->mAtInfo.mHitType == HIT_TYPE_STUN) { i_this->mHitActorID = fopAcM_GetID(daPy_getPlayerActorClass()); + /* dSv_event_flag_c::F_0073 - Ordon Village - Attacked after charging at large beehive */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[172]); } else if (fopAcM_GetName(actor) == PROC_NPC_TK) { daNPC_TK_c* hawk = static_cast(actor); hawk->setBump(); i_this->mHitActorID = fopAcM_GetID(hawk); i_this->mKnockDown = 1; + /* dSv_event_flag_c::F_0072 - Ordon Village - Knocked down large beehive with hawk */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[171]); i_this->mHitTimer = 20; i_this->mHawkHit = true; diff --git a/src/d/actor/d_a_e_po.cpp b/src/d/actor/d_a_e_po.cpp index 5359454aeeb..518fdd88200 100644 --- a/src/d/actor/d_a_e_po.cpp +++ b/src/d/actor/d_a_e_po.cpp @@ -1131,6 +1131,7 @@ static void e_po_dead(e_po_class* i_this) { dComIfGp_event_reset(); dComIfGs_addPohSpiritNum(); if (g_dComIfG_gameInfo.info.getPlayer().getCollect().getPohNum() == 0x14) { + /* dSv_event_flag_c::F_0457 - Castle Town - Revived cat */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[457]); } daPy_getPlayerActorClass()->cancelOriginalDemo(); diff --git a/src/d/actor/d_a_e_rd.cpp b/src/d/actor/d_a_e_rd.cpp index f641ff5fcee..f31360819d9 100644 --- a/src/d/actor/d_a_e_rd.cpp +++ b/src/d/actor/d_a_e_rd.cpp @@ -4225,6 +4225,7 @@ static void damage_check(e_rd_class* i_this) { bullbo->field_0x79e++; if (bullbo->field_0x79e == 1) { a_this->health = 0; + /* dSv_event_flag_c::M_055 - Main Event - Did damage at least once during joust/one-on-one battle */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x58]); part_break(i_this); bullbo->field_0x169e = 20; diff --git a/src/d/actor/d_a_e_rdy.cpp b/src/d/actor/d_a_e_rdy.cpp index cfd86e4f734..a636fdf9b9d 100644 --- a/src/d/actor/d_a_e_rdy.cpp +++ b/src/d/actor/d_a_e_rdy.cpp @@ -348,7 +348,9 @@ static int nodeCallBack_bow(J3DJoint* i_joint, int param_1) { /* 8076C54C-8076C9D0 00086C 0484+00 1/0 0/0 0/0 .text daE_RDY_Draw__FP11e_rdy_class */ static int daE_RDY_Draw(e_rdy_class* i_this) { fopAc_ac_c* a_this = &i_this->actor; - if (i_this->field_0x5b8 == 12 && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[239])) { + if (i_this->field_0x5b8 == 12 + /* dSv_event_flag_c::T_0239 - Lake Hylia - Spoke with Fyer (start dark carge) */ + && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[239])) { return 1; } @@ -4911,6 +4913,8 @@ static cPhs__Step daE_RDY_Create(fopAc_ac_c* i_this) { } else if (_this->field_0x5b8 == 11) { _this->mAction = ACT_BOW_IKKI2; } else if (_this->field_0x5b8 == 12) { + /* dSv_event_flag_c::M_051 - Main Event - Shadow Kargorok (?) (Large) event complete + (Horse grass appears in various places) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[84])) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_e_s1.cpp b/src/d/actor/d_a_e_s1.cpp index 1d159b4379e..3e4125146f4 100644 --- a/src/d/actor/d_a_e_s1.cpp +++ b/src/d/actor/d_a_e_s1.cpp @@ -2272,8 +2272,9 @@ static int daE_S1_Create(fopAc_ac_c* i_this) { a_this->field_0x6aa = 30; - if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[83]) && - strcmp(dComIfGp_getStartStageName(), "F_SP121") == 0 && a_this->mPrm1 == 0xFE) + /* dSv_event_flag_c::M_050 - Main Event - Eldin Bridge disappears */ + if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[83]) + && strcmp(dComIfGp_getStartStageName(), "F_SP121") == 0 && a_this->mPrm1 == 0xFE) { i_this->current.pos.y += 50000.0f; i_this->current.pos.x += 50000.0f; diff --git a/src/d/actor/d_a_e_warpappear.cpp b/src/d/actor/d_a_e_warpappear.cpp index 8b71e1b7ca1..1f6460d14e0 100644 --- a/src/d/actor/d_a_e_warpappear.cpp +++ b/src/d/actor/d_a_e_warpappear.cpp @@ -216,8 +216,9 @@ static void action(e_warpappear_class* i_this) { fpcM_Search(s_s1entry_sub, i_this); } - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x40]) && - dComIfGs_isSwitch(18, fopAcM_GetRoomNo(a_this))) + /* dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x40]) + && dComIfGs_isSwitch(18, fopAcM_GetRoomNo(a_this))) { i_this->field_0x596 = 1; i_this->field_0x59e = 20; @@ -510,6 +511,7 @@ static void demo_camera(e_warpappear_class* i_this) { daPy_getPlayerActorClass()->cancelOriginalDemo(); fopAcM_delete(i_this); fpcM_Search(s_s1fight_sub, i_this); + /* dSv_event_flag_c::F_0053 - Faron Woods - Saw night stalker appearance cutscene */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[151]); } break; @@ -881,6 +883,7 @@ static int daE_Warpappear_Create(fopAc_ac_c* actor) { i_this->field_0x570 = fopAcM_GetParam(i_this); if (i_this->field_0x570 != 53) { if (i_this->field_0x570 == 0xff) { + /* dSv_event_flag_c::F_0053 - Faron Woods - Saw night stalker appearance cutscene */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x97])) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_e_ymb.cpp b/src/d/actor/d_a_e_ymb.cpp index 0523adad32d..f0eef310ecd 100644 --- a/src/d/actor/d_a_e_ymb.cpp +++ b/src/d/actor/d_a_e_ymb.cpp @@ -2290,6 +2290,7 @@ void daE_YMB_c::executeLakeDemo() { field_0x82c[1].OffTgSetBit(); field_0xa9c.OffTgSetBit(); + /* dSv_event_flag_c::F_0005 - Misc. - Gathered 14 Tears of Light in area 4 */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[9])) { return; } @@ -2345,6 +2346,7 @@ void daE_YMB_c::executeLakeDemo() { field_0x6e4 = 0x7FFF; field_0x710 = 0; dComIfGs_onSaveSwitch(15); + /* dSv_event_flag_c::M_086 - Twilight Hyrule Field - Show Boss Bug's Tear of Light on the map */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x77]); break; diff --git a/src/d/actor/d_a_e_zh.cpp b/src/d/actor/d_a_e_zh.cpp index 7536a0e1e11..c19d64b365a 100644 --- a/src/d/actor/d_a_e_zh.cpp +++ b/src/d/actor/d_a_e_zh.cpp @@ -1529,16 +1529,26 @@ void daE_ZH_c::executeCatchFlyMove() { dComIfGs_offOneZoneSwitch(5, fopAcM_GetRoomNo(this)); if (bitSw == 16) { + /* dSv_event_flag_c::F_0311 - Palace of Twilight - Palace of Twilight use 1 */ dComIfGs_offEventBit(0x2640); + /* dSv_event_flag_c::F_0313 - Palace of Twilight - Palace of Twilight use 3 */ dComIfGs_offEventBit(0x2610); + /* dSv_event_flag_c::F_0315 - Palace of Twilight - Palace of Twilight use 5 */ dComIfGs_offEventBit(0x2604); + /* dSv_event_flag_c::F_0317 - Palace of Twilight - Palace of Twilight use 7 */ dComIfGs_offEventBit(0x2601); + /* dSv_event_flag_c::F_0319 - Palace of Twilight - Palace of Twilight use 9 */ dComIfGs_offEventBit(0x2740); } else { + /* dSv_event_flag_c::F_0312 - Palace of Twilight - Palace of Twilight use 2 */ dComIfGs_offEventBit(0x2620); + /* dSv_event_flag_c::F_0314 - Palace of Twilight - Palace of Twilight use 4 */ dComIfGs_offEventBit(0x2608); + /* dSv_event_flag_c::F_0316 - Palace of Twilight - Palace of Twilight use 6 */ dComIfGs_offEventBit(0x2602); + /* dSv_event_flag_c::F_0318 - Palace of Twilight - Palace of Twilight use 8 */ dComIfGs_offEventBit(0x2780); + /* dSv_event_flag_c::F_0320 - Palace of Twilight - Palace of Twilight use 10 */ dComIfGs_offEventBit(0x2720); } diff --git a/src/d/actor/d_a_horse.cpp b/src/d/actor/d_a_horse.cpp index 8a2a483e5c3..ef7ab353df9 100644 --- a/src/d/actor/d_a_horse.cpp +++ b/src/d/actor/d_a_horse.cpp @@ -593,9 +593,15 @@ int daHorse_c::create() { } if (!checkStateFlg0(FLG0_UNK_8000) && - (((dComIfGs_isEventBit(dSv_event_flag_c::M_008) && !dComIfGs_isEventBit(dSv_event_flag_c::M_023)) && - (!daAlink_c::checkStageName("F_SP109") || !dComIfGs_isEventBit(dSv_event_flag_c::F_0066))) || - dComIfGs_isTmpBit(dSv_event_tmp_flag_c::NO_TELOP))) + /* Cutscene - Cutscene - attacked by monsters at Ordon spring */ + (((dComIfGs_isEventBit(dSv_event_flag_c::M_008) + /* Main Event - Epona rescued flag */ + && !dComIfGs_isEventBit(dSv_event_flag_c::M_023)) + && (!daAlink_c::checkStageName("F_SP109") + /* Death Mountain - First saw Goron cutscene on mountain path */ + || !dComIfGs_isEventBit(dSv_event_flag_c::F_0066))) + /* General use - When on (while changing scenes) stage name is not shown */ + || dComIfGs_isTmpBit(dSv_event_tmp_flag_c::NO_TELOP))) { return cPhs_ERROR_e; } @@ -626,7 +632,11 @@ int daHorse_c::create() { m_offRideFlg = &daHorse_c::offRideFlgSubstance; if (!daAlink_getAlinkActorClass()->checkHorseStart() && !checkStateFlg0(FLG0_UNK_8000)) { - if (strcmp(dComIfGs_getHorseRestartStageName(), "") != 0 && (!dComIfGs_isEventBit(0x1580) || dComIfGs_isEventBit(0x601))) { + if (strcmp(dComIfGs_getHorseRestartStageName(), "") != 0 + /* dSv_event_flag_c::M_002 - Cutscene - [cutscene: 2] Met with Ilia (brings horse to spring) */ + && (!dComIfGs_isEventBit(0x1580) + /* dSv_event_flag_c::M_023 - Main Event - Epona rescued flag */ + || dComIfGs_isEventBit(0x601))) { if (daAlink_c::checkStageName(dComIfGs_getHorseRestartStageName()) && (room_no == -1 || fopAcM_GetRoomNo(this) == dComIfGs_getHorseRestartRoomNo())) { current.pos = dComIfGs_getHorseRestartPos(); old.pos = current.pos; diff --git a/src/d/actor/d_a_kago.cpp b/src/d/actor/d_a_kago.cpp index 7c25ce7eaf1..0be0f5fdf28 100644 --- a/src/d/actor/d_a_kago.cpp +++ b/src/d/actor/d_a_kago.cpp @@ -503,6 +503,7 @@ void daKago_c::demo_skip(int param_0) { setMidnaRideOn(); setPlayerRideOn(); field_0x718 = field_0x71a = 0; + /* dSv_event_flag_c::M_051 - Main Event - Shadow Kargorok (?) (Large) event complete (Horse grass appears in various places) */ dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[84]); field_0x748 = 7; field_0x74c = NULL; diff --git a/src/d/actor/d_a_kytag06.cpp b/src/d/actor/d_a_kytag06.cpp index 1f6e07fc752..8d05eead0b8 100644 --- a/src/d/actor/d_a_kytag06.cpp +++ b/src/d/actor/d_a_kytag06.cpp @@ -795,15 +795,13 @@ static void daKytag06_type_08_Execute(kytag06_class* i_this) { daKytag06_lv7_boss_wether_proc(i_this, env_light->field_0x12cc); } -/* 80858D00-80858D2C 001580 002C+00 1/1 0/0 0/0 .text daKytag06_type_09_Execute__FP13kytag06_class - */ +/* 80858D00-80858D2C 001580 002C+00 1/1 0/0 0/0 .text daKytag06_type_09_Execute__FP13kytag06_class */ static void daKytag06_type_09_Execute(kytag06_class* i_this) { dScnKy_env_light_c* env_light = dKy_getEnvlight(); daKytag06_Ganon_wether_proc(i_this, env_light->field_0x12cc); } -/* 80858D2C-8085912C 0015AC 0400+00 1/1 0/0 0/0 .text daKytag06_type_10_Execute__FP13kytag06_class - */ +/* 80858D2C-8085912C 0015AC 0400+00 1/1 0/0 0/0 .text daKytag06_type_10_Execute__FP13kytag06_class */ static void daKytag06_type_10_Execute(kytag06_class* i_this) { u8 tmp = 0; if (dComIfGs_isEventBit(dSv_event_flag_c::F_0266)) { diff --git a/src/d/actor/d_a_midna.cpp b/src/d/actor/d_a_midna.cpp index 451540c3300..8300d3e5c63 100644 --- a/src/d/actor/d_a_midna.cpp +++ b/src/d/actor/d_a_midna.cpp @@ -2949,7 +2949,9 @@ void daMidna_c::setMidnaNoDrawFlg() { BOOL daMidna_c::checkMetamorphoseEnableBase() { BOOL tmp; if (!daAlink_getAlinkActorClass()->checkMidnaRide() || (g_env_light.mEvilInitialized & 0x80) - || !dComIfGs_isEventBit(0xd04) || fopAcIt_Judge((fopAcIt_JudgeFunc)daMidna_searchNpc, &tmp)) + /* dSv_event_flag_c::M_077 - Main Event - Get shadow crystal (can now transform) */ + || !dComIfGs_isEventBit(0xD04) + || fopAcIt_Judge((fopAcIt_JudgeFunc)daMidna_searchNpc, &tmp)) { return FALSE; } diff --git a/src/d/actor/d_a_myna.cpp b/src/d/actor/d_a_myna.cpp index 99478bcda6e..54aadaa2861 100644 --- a/src/d/actor/d_a_myna.cpp +++ b/src/d/actor/d_a_myna.cpp @@ -607,6 +607,7 @@ void daMyna_c::greet_talk_init() { void daMyna_c::greet_talk_move() { if (eventInfo.checkCommandTalk() && mMsgFlow.doFlow(this, NULL, 0) != 0) { dComIfGp_event_reset(); + /* dSv_event_flag_c::F_0802 - Faron Woods - Trill attacks when stealing */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[802])) { field_0x937 = 20; field_0x92C = 19; @@ -624,6 +625,7 @@ void daMyna_c::shopping_wait_init() { /* 809471E8-809475B4 001668 03CC+00 1/0 0/0 0/0 .text shopping_wait_move__8daMyna_cFv */ void daMyna_c::shopping_wait_move() { if (!daPy_py_c::checkNowWolf()) { + /* dSv_event_flag_c::F_0802 - Faron Woods - Trill attacks when stealing */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[802])) { field_0x92C = 17; field_0x937 = 20; @@ -663,8 +665,9 @@ void daMyna_c::shopping_wait_move() { } } - if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[203]) && - daMyna_evtTagActor1 != NULL) + /* dSv_event_flag_c::F_0203 - Shop - First tried to steal from unnmaned shop (Havent checked donation box) */ + if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[203]) + && daMyna_evtTagActor1 != NULL) { cXyz stack_2c(1.0f, 1.0f, 1.0f); if (chkPlayerInEvtArea(daMyna_evtTagActor1, stack_2c)) { @@ -806,6 +809,7 @@ void daMyna_c::byebye_talk_move() { } dComIfGp_event_reset(); + /* dSv_event_flag_c::F_0802 - Faron Woods - Trill attacks when stealing */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[802])) { field_0x92C = 0x11; field_0x937 = 0x14; @@ -969,6 +973,7 @@ void daMyna_c::attack_wait2_move() { if (daMyna_evtTagActor0 != NULL) { cXyz stack_1c(1.0f, 1.0f, 1.0f); + /* dSv_event_flag_c::F_0802 - Faron Woods - Trill attacks when stealing */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[802])) { if (chkPlayerInEvtArea(daMyna_evtTagActor0, stack_1c)) { field_0x937 = 20; @@ -1025,6 +1030,7 @@ void daMyna_c::attack_fly2_move() { if (dMsgObject_getTotalPayment() > field_0x922) { field_0x937 = 0; + /* dSv_event_flag_c::F_0802 - Faron Woods - Trill attacks when stealing */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[802]); field_0x939 = 1; } @@ -1038,6 +1044,7 @@ void daMyna_c::attack_fly2_move() { } } else if (fly_return_move()) { if (field_0x937 == 0) { + /* dSv_event_flag_c::F_0802 - Faron Woods - Trill attacks when stealing */ dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[802]); } field_0x92C = 17; @@ -1064,6 +1071,7 @@ void daMyna_c::attack2_move() { if (field_0x937 != 0) { field_0x937--; if (dComIfGs_getLife() <= 1) { + /* dSv_event_flag_c::F_0802 - Faron Woods - Trill attacks when stealing */ dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[802]); field_0x937 = 0; } @@ -1289,6 +1297,7 @@ void daMyna_c::initiate() { field_0x920 = 0; field_0x922 = 0; + /* dSv_event_flag_c::F_0802 - Faron Woods - Trill attacks when stealing */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[802])) { field_0x932 = 0; field_0x938 = 0; @@ -1585,6 +1594,7 @@ void daMyna_c::checkDead() { if (daMyna_evtTagActor0 == NULL || (daMyna_evtTagActor0 != NULL && !chkPlayerInEvtArea(daMyna_evtTagActor0, var1))) { + /* dSv_event_flag_c::F_0203 - Shop - First tried to steal from unnmaned shop (Havent checked donation box) */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[203])) { dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[203]); } diff --git a/src/d/actor/d_a_ni.cpp b/src/d/actor/d_a_ni.cpp index 54ac266b8f1..b5a8740190a 100644 --- a/src/d/actor/d_a_ni.cpp +++ b/src/d/actor/d_a_ni.cpp @@ -2301,6 +2301,7 @@ static int daNi_Create(fopAc_ac_c* i_this) { } if (strcmp(dComIfGp_getStartStageName(), "F_SP108") == 0 && + /* dSv_event_flag_c::F_0528 - Faron Woods - Resistance Rusl summoned golden cucco */ !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[528])) { a_this->mAction = ACTION_DEMO0_e; diff --git a/src/d/actor/d_a_npc4.cpp b/src/d/actor/d_a_npc4.cpp index 5568e6fc694..9f1a79e95f4 100644 --- a/src/d/actor/d_a_npc4.cpp +++ b/src/d/actor/d_a_npc4.cpp @@ -1886,8 +1886,7 @@ void daNpcF_offTmpBit(u32 i_no) { dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[i_no]); } -/* 80155774-80155854 1500B4 00E0+00 0/0 2/2 5/5 .text - * daNpcF_getPlayerInfoFromPlayerList__FiiR4cXyzR5csXyz */ +/* 80155774-80155854 1500B4 00E0+00 0/0 2/2 5/5 .text daNpcF_getPlayerInfoFromPlayerList__FiiR4cXyzR5csXyz */ int daNpcF_getPlayerInfoFromPlayerList(int param_0, int i_roomNo, cXyz& param_2, csXyz& param_3) { int rv = 0; diff --git a/src/d/actor/d_a_npc_ash.cpp b/src/d/actor/d_a_npc_ash.cpp index 4ca17f80782..aed4efbfb27 100644 --- a/src/d/actor/d_a_npc_ash.cpp +++ b/src/d/actor/d_a_npc_ash.cpp @@ -473,7 +473,10 @@ cPhs__Step daNpcAsh_c::Create() { fopAcM_SetupActor(this, daNpcAsh_c); if (!strcmp(dComIfGp_getStartStageName(), "R_SP116") && dComIfG_play_c::getLayerNo(0) == 4) { - if (daNpcF_chkEvtBit(0x169) && !daNpcF_chkEvtBit(0x10a)) { + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ + if (daNpcF_chkEvtBit(0x169) + /* dSv_event_flag_c::F_0266 - Snowpeak Ruins - Snowpeak Ruins clear */ + && !daNpcF_chkEvtBit(0x10A)) { return cPhs_ERROR_e; } if (dComIfGs_isStageSwitch(0x18, 0x4b)) { @@ -1563,8 +1566,14 @@ void daNpcAsh_c::setAttnPos() { mCcCyl[0].SetR(daNpcAsh_Param_c::m.mWallR); dComIfG_Ccsp()->Set(&mCcCyl[0]); - if (mType == TYPE_BAR && (!daNpcF_chkEvtBit(0x169) || !daNpcF_chkEvtBit(0x10a) - || !daNpcF_chkEvtBit(0x10b) || daNpcF_chkEvtBit(0x10c))) { + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ + if (mType == TYPE_BAR && (!daNpcF_chkEvtBit(0x169) + /* dSv_event_flag_c::F_0266 - Snowpeak Ruins - Snowpeak Ruins clear */ + || !daNpcF_chkEvtBit(0x10A) + /* dSv_event_flag_c::F_0267 - Temple of Time - Temple of Time clear */ + || !daNpcF_chkEvtBit(0x10B) + /* dSv_event_flag_c::F_0268 - City in the Sky - City in the Sky clear */ + || daNpcF_chkEvtBit(0x10C))) { center.set(3070.0f, -1150.0f, 2446.0f); mCcCyl[1].SetC(center); mCcCyl[1].SetH(170.0f); diff --git a/src/d/actor/d_a_npc_ashB.cpp b/src/d/actor/d_a_npc_ashB.cpp index 7ed14acb8b1..7724303179a 100644 --- a/src/d/actor/d_a_npc_ashB.cpp +++ b/src/d/actor/d_a_npc_ashB.cpp @@ -353,7 +353,10 @@ cPhs__Step daNpcAshB_c::Create() { fopAcM_SetupActor(this, daNpcAshB_c); - if (!daNpcF_chkEvtBit(0x169) || daNpcF_chkEvtBit(0x14f)) { + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ + if (!daNpcF_chkEvtBit(0x169) + /* dSv_event_flag_c::F_0335 - Snowpeak mountain - Obtained scribble from Ashei at mountain pass */ + || daNpcF_chkEvtBit(0x14F)) { return cPhs_ERROR_e; } else { mFlowID = getMessageNo(); @@ -836,8 +839,9 @@ bool daNpcAshB_c::wait(void* param_0) { } } } - - if (!daNpcF_chkEvtBit(0x14f) && field_0xded == 0 && !daPy_py_c::checkNowWolf()) { + /* dSv_event_flag_c::F_0335 - Snowpeak mountain - Obtained scribble from Ashei at mountain pass */ + if (!daNpcF_chkEvtBit(0x14F) + && field_0xded == 0 && !daPy_py_c::checkNowWolf()) { f32 res = pow(600.0f, 2.0f); if (fopAcM_searchPlayerDistanceXZ2(this) <= res) { daNpcF_offTmpBit(0xb); @@ -881,7 +885,8 @@ bool daNpcAshB_c::wait(void* param_0) { orderEvent(field_0xdec,l_evtNames[mOrderEvtNo*1],-1, 40, -1, 1); - if (daNpcF_chkEvtBit(0x14f)) { + /* dSv_event_flag_c::F_0335 - Snowpeak mountain - Obtained scribble from Ashei at mountain pass */ + if (daNpcF_chkEvtBit(0x14F)) { eventInfo.onCondition(0x20); } diff --git a/src/d/actor/d_a_npc_besu.cpp b/src/d/actor/d_a_npc_besu.cpp index 29503edf7fa..8e920c8a89a 100644 --- a/src/d/actor/d_a_npc_besu.cpp +++ b/src/d/actor/d_a_npc_besu.cpp @@ -9,6 +9,273 @@ #include "d/d_com_static.h" #include "d/d_item.h" +enum Besu_RES_File_ID { + /* BMDR */ + /* 0x3 */ BMDR_BESU = 0x3, +}; + +enum Besu_TW_RES_File_ID { + /* BCK */ + /* 0x5 */ BCK_BESU_DEMO_FEAR = 0x5, + /* 0x6 */ BCK_BESU_DEMO_WAIT, + /* 0x7 */ BCK_BESU_F_DEMO_FEAR, + /* 0x8 */ BCK_BESU_F_DEMO_WAIT, + + /* BMDR */ + /* 0xB */ BMDR_BESU_TW = 0xB, + + /* BTP */ + /* 0xE */ BTP_BESU_F_DEMO_FEAR = 0xE, + /* 0xF */ BTP_BESU_F_DEMO_WAIT, +}; + +enum Besu0_RES_File_ID { + /* BCK */ + /* 0x05 */ BCK_BESU_BODY_TALK = 0x5, + /* 0x06 */ BCK_BESU_BODY_WAIT, + /* 0x07 */ BCK_BESU_F_TALK_C, + /* 0x08 */ BCK_BESU_F_YOKERU, + /* 0x09 */ BCK_BESU_FH_BIKKURI, + /* 0x0A */ BCK_BESU_MAD, + /* 0x0B */ BCK_BESU_MAD_WAIT, + /* 0x0C */ BCK_BESU_NORMAL_STEP, + /* 0x0D */ BCK_BESU_NORMAL_TALK, + /* 0x0E */ BCK_BESU_NORMAL_TALK_B, + /* 0x0F */ BCK_BESU_NORMAL_WAIT, + /* 0x10 */ BCK_BESU_STEP, + /* 0x11 */ BCK_BESU_WAIT_A, + /* 0x12 */ BCK_BESU_WAIT_C, + /* 0x13 */ BCK_BESU_YOKERU, + + /* BTK */ + /* 0x16 */ BTK_BESU = 0x16, + + /* BTP */ + /* 0x19 */ BTP_BESU = 0x19, + /* 0x1A */ BTP_BESU_F_YOKERU, + /* 0x1B */ BTP_BESU_FH_BIKKURI, +}; + +enum Besu1_RES_File_ID { + /* BCK */ + /* 0x05 */ BCK_BESU_F_MADTALK = 0x5, + /* 0x06 */ BCK_BESU_F_TALK_A, + /* 0x07 */ BCK_BESU_F_TALK_B, + /* 0x08 */ BCK_BESU_F_WAIT_B, + /* 0x09 */ BCK_BESU_FH_MADTALK, + /* 0x0A */ BCK_BESU_FH_TALK_A, + /* 0x0B */ BCK_BESU_FH_TALK_B, + /* 0x0C */ BCK_BESU_RUN, + /* 0x0D */ BCK_BESU_TALK_A, + /* 0x0E */ BCK_BESU_TALK_B, + /* 0x0F */ BCK_BESU_WAIT_B, + + /* BTP */ + /* 0x12 */ BTP_BESU_F_MADTALK = 0x12, + /* 0x13 */ BTP_BESU_F_TALK_A, + /* 0x14 */ BTP_BESU_F_TALK_B, + /* 0x15 */ BTP_BESU_F_WAIT_B, + /* 0x16 */ BTP_BESU_FH_MADTALK, + /* 0x17 */ BTP_BESU_FH_TALK_A, + /* 0x18 */ BTP_BESU_FH_TALK_B, + + /* EVT */ + /* 0x1B */ BESU1_EVT_EVENT_LIST = 0x1B, +}; + +enum Besu2_RES_File_ID { + /* BCK */ + /* 0x06 */ BCK_BESU_AMAZED_A = 0x6, + /* 0x07 */ BCK_BESU_AMAZED_B, + /* 0x08 */ BCK_BESU_AMAZED_C, + /* 0x09 */ BCK_BESU_CUP, + /* 0x0A */ BCK_BESU_CUP_A, + /* 0x0B */ BCK_BESU_CUP_B, + /* 0x0C */ BCK_BESU_F_AMAZED_A, + /* 0x0D */ BCK_BESU_F_AMAZED_B, + /* 0x0E */ BCK_BESU_F_AMAZED_C, + /* 0x0F */ BCK_BESU_F_CUP_A, + /* 0x10 */ BCK_BESU_F_CUP_B, + /* 0x11 */ BCK_BESU_F_GLARE_A, + /* 0x12 */ BCK_BESU_F_GLARE_WAIT, + /* 0x13 */ BCK_BESU_F_MOP_A, + /* 0x14 */ BCK_BESU_F_MOP_B, + /* 0x15 */ BCK_BESU_F_MOP_C, + /* 0x16 */ BCK_BESU_F_NURSE_A, + /* 0x17 */ BCK_BESU_F_TALK_N_A, + /* 0x18 */ BCK_BESU_F_TALK_N_B, + /* 0x19 */ BCK_BESU_F_TALK_N_C, + /* 0x1A */ BCK_BESU_GLARE_A, + /* 0x1B */ BCK_BESU_GLARE_WAIT, + /* 0x1C */ BCK_BESU_MOP_A, + /* 0x1D */ BCK_BESU_MOP_B, + /* 0x1E */ BCK_BESU_MOP_C, + /* 0x1F */ BCK_BESU_NURSE_A, + /* 0x20 */ BCK_BESU_TALK_N_A, + /* 0x21 */ BCK_BESU_TALK_N_B, + /* 0x22 */ BCK_BESU_TALK_N_C, + + /* BMDR */ + /* 0x25 */ BMDR_BESU_CLOTH = 0x25, + /* 0x26 */ BMDR_BESU_CUP, + /* 0x27 */ BMDR_BESUB, + + /* BTP */ + /* 0x2A */ BTP_BESU_F_AMAZED_A = 0x2A, + /* 0x2B */ BTP_BESU_F_AMAZED_B, + /* 0x2C */ BTP_BESU_F_AMAZED_C, + /* 0x2D */ BTP_BESU_F_CUP_A, + /* 0x2E */ BTP_BESU_F_CUP_B, + /* 0x2F */ BTP_BESU_F_GLARE_A, + /* 0x30 */ BTP_BESU_F_GLARE_WAIT, + /* 0x31 */ BTP_BESU_F_MOP_A, + /* 0x32 */ BTP_BESU_F_MOP_B, + /* 0x33 */ BTP_BESU_F_MOP_C, + /* 0x34 */ BTP_BESU_F_NURSE_A, + /* 0x35 */ BTP_BESU_F_TALK_N_A, + /* 0x36 */ BTP_BESU_F_TALK_N_B, + /* 0x37 */ BTP_BESU_F_TALK_N_C, + + /* EVT */ + /* 0x3A */ BESU2_EVT_EVENT_LIST = 0x3A, +}; + +enum Besu3_RES_file_ID { + /* BCK */ + /* 0x07 */ BCK_BESU3_F_WORRY = 0x7, + /* 0x08 */ BCK_BESU3_FH_WORRY, + /* 0x09 */ BCK_BESU_F_SURPRISE, + /* 0x0A */ BCK_BESU_FH_SURPRISE, + /* 0x0B */ BCK_BESU_SURPRISE, + + /* BMDR */ + /* 0x0E */ BMDR_BESU3 = 0xE, + + /* BTK */ + /* 0x11 */ BTK_BESU_SURPRISE = 0x11, + + /* BTP */ + /* 0x14 */ BTP_BESU3 = 0x14, + /* 0x15 */ BTP_BESU3_F_SURPRISE, + /* 0x16 */ BTP_BESU3_F_WORRY, + /* 0x17 */ BTP_BESU3_FH_SURPRISE, + /* 0x18 */ BTP_BESU3_FH_WORRY, + + /* EVT */ + /* 0x1B */ BESU3_EVT_EVENT_LIST = 0x1B, +}; + +enum Besu_p1_RES_File_ID { + /* BCK */ + /* 0x05 */ BESU_P1_BCK_BESU_F_MADTALK = 0x5, + /* 0x06 */ BESU_P1_BCK_BESU_F_TALK_A, + /* 0x07 */ BESU_P1_BCK_BESU_F_TALK_C, + /* 0x08 */ BESU_P1_BCK_BESU_F_YOKERU, + /* 0x09 */ BESU_P1_BCK_BESU_FH_MADTALK, + /* 0x0A */ BESU_P1_BCK_BESU_NORMAL_TALK_B, + /* 0x0B */ BESU_P1_BCK_BESU_STEP, + /* 0x0C */ BESU_P1_BCK_BESU_WAIT_A, + /* 0x0D */ BESU_P1_BCK_BESU_YOKERU, + + /* BTK */ + /* 0x10 */ BESU_P1_BTK_BESU = 0x10, + + /* BTP */ + /* 0x13 */ BESU_P1_BTP_BESU = 0x13, + /* 0x14 */ BESU_P1_BTP_BESU_F_MADTALK, + /* 0x15 */ BESU_P1_BTP_BESU_F_YOKERU, + /* 0x16 */ BESU_P1_BTP_BESU_FH_MADTALK, +}; + +enum RES_Name { + /* 0x1 */ BESU = 0x1, + /* 0x2 */ BESU_TW, + /* 0x3 */ BESU0, + /* 0x4 */ BESU1, + /* 0x5 */ BESU2, + /* 0x6 */ BESU3, +}; + +enum FaceMotion { + /* 0x00 */ FACE_TALK_C, + /* 0x01 */ FACE_TALK_A, + /* 0x02 */ FACE_TALK_B, + /* 0x03 */ FACE_TALK_N_B, + /* 0x04 */ FACE_MOP_A_C, + /* 0x05 */ FACE_MOP_A_B, + /* 0x06 */ FACE_MOP_C, + /* 0x07 */ FACE_NURSE_A, + /* 0x08 */ FACE_MADTALK, + /* 0x09 */ FACE_CUP_A, + /* 0x0A */ FACE_SURPISE, + /* 0x0B */ FACE_WORRY, + /* 0x0C */ FACE_YOKERU, + /* 0x0D */ FACE_H_TALK_A, + /* 0x0E */ FACE_H_TALK_B, + /* 0x0F */ FACE_H_MADTALK, + /* 0x10 */ FACE_TALK_N_A, + /* 0x11 */ FACE_TALK_N_C, + /* 0x12 */ FACE_GLARE_A, + /* 0x13 */ FACE_H_SURPRISE, + /* 0x14 */ FACE_AMAZED_A, + /* 0x15 */ FACE_AMAZED_C, + /* 0x16 */ FACE_CUP_B, + /* 0x17 */ FACE_DEMO_WAIT, + /* 0x18 */ FACE_DEMO_FEAR, + /* 0x19 */ FACE_GLARE_WAIT, + /* 0x1A */ FACE_H_WORRY, + /* 0x1B */ FACE_H_BIKKURI, + /* 0x1C */ FACE_NONE, +}; + +enum Motion { + /* 0x00 */ MOT_WAIT_A, + /* 0x01 */ MOT_WAIT_B, + /* 0x02 */ MOT_TALK_A, + /* 0x03 */ MOT_TALK_A_2, + /* 0x04 */ MOT_TALK_N_B, + /* 0x05 */ MOT_CUP_A, + /* 0x06 */ MOT_SURPRISE, + /* 0x07 */ MOT_WAIT_C, + /* 0x08 */ MOT_NORMAL_WAIT, + /* 0x09 */ MOT_NORMAL_TALK, + /* 0x0A */ MOT_MAD, + /* 0x0B */ MOT_NORMAL_TALK_B, + /* 0x0C */ MOT_BODY_TALK, + /* 0x0D */ MOT_NURSE_A, + /* 0x0E */ MOT_MOP_A_C, + /* 0x0F */ MOT_MOP_A_B, + /* 0x10 */ MOT_MOP_C, + /* 0x11 */ MOT_STEP, + /* 0x12 */ MOT_YOKERU, + /* 0x13 */ MOT_TALK_N_A, + /* 0x14 */ MOT_TALK_N_C, + /* 0x15 */ MOT_GLARE_A, + /* 0x16 */ MOT_AMAZED_A, + /* 0x17 */ MOT_AMAZED_C, + /* 0x18 */ MOT_CUP_B, + /* 0x19 */ MOT_DEMO_WAIT, + /* 0x1A */ MOT_DEMO_FEAR, + /* 0x1B */ MOT_GLARE_WAIT, + /* 0x1C */ MOT_RUN, + /* 0x1D */ MOT_NORMAL_STEP, +}; + +enum Event { + /* 0x0 */ EVENT_NONE, + /* 0x1 */ EVENT_NO_RESPONSE, + /* 0x2 */ EVENT_CONVERSATION_ABOUT_SARU01, + /* 0x3 */ EVENT_CONVERSATION_ABOUT_SARU02, + /* 0x4 */ EVENT_CONVERSATION_ABOUT_PACHINKO1, + /* 0x5 */ EVENT_CONVERSATION_ABOUT_PACHINKO2, + /* 0x6 */ EVENT_CONVERSATION_ABOUT_PACHINKO3, + /* 0x7 */ EVENT_CACARICO_CONVERSATION, + /* 0x8 */ EVENT_DEMO13_STB, + /* 0x9 */ EVENT_SURPRISE, + /* 0xA */ EVENT_CONVERSATION_ABOUT_DEATHMT, + /* 0xB */ EVENT_NURSE, + /* 0xC */ EVENT_CONVERSATION_ABOUT_ZORA, +}; #ifndef DEBUG UNK_REL_DATA; @@ -102,111 +369,140 @@ static s8* l_loadResPtrnList[19] = { /* 8053ECB0-8053EFF8 000154 0348+00 0/1 0/0 0/0 .data l_faceMotionAnmData */ static daNpcT_faceMotionAnmData_c l_faceMotionAnmData[30] = { - {-1, 0, 0, 25, 2, 3, 1}, - {6, 0, 4, 19, 0, 4, 0}, - {7, 0, 4, 20, 0, 4, 0}, - {7, 0, 3, 25, 2, 3, 1}, - {5, 0, 4, 18, 0, 4, 0}, - {10, 2, 4, 23, 2, 4, 0}, - {11, 2, 4, 24, 2, 4, 0}, - {9, 2, 4, 22, 2, 4, 0}, - {8, 0, 3, 26, 0, 3, 0}, - {22, 2, 5, 52, 2, 5, 0}, - {19, 0, 5, 49, 0, 5, 0}, - {20, 2, 5, 50, 2, 5, 0}, - {21, 0, 5, 51, 0, 5, 0}, - {23, 0, 5, 53, 0, 5, 0}, - {24, 2, 5, 54, 2, 5, 0}, - {25, 0, 5, 55, 0, 5, 0}, - {17, 0, 5, 47, 0, 5, 0}, - {15, 2, 5, 45, 2, 5, 0}, - {16, 2, 5, 46, 2, 5, 0}, - {9, 0, 6, 21, 0, 6, 0}, - {10, 2, 6, 23, 2, 6, 0}, - {7, 0, 6, 22, 0, 6, 0}, - {8, 2, 6, 24, 2, 6, 0}, - {12, 0, 5, 42, 0, 5, 0}, - {13, 2, 5, 43, 2, 5, 0}, - {14, 0, 5, 44, 0, 5, 0}, - {8, 2, 2, 15, 2, 2, 0}, - {7, 2, 2, 14, 2, 2, 0}, - {18, 2, 5, 48, 2, 5, 0}, - {9, 2, 3, 27, 2, 3, 0}, + {-1, J3DFrameCtrl::EMode_NONE, 0, BTP_BESU, J3DFrameCtrl::EMode_LOOP, BESU0, 1}, + {BCK_BESU_F_TALK_A, J3DFrameCtrl::EMode_NONE, BESU1, BTP_BESU_F_TALK_A, J3DFrameCtrl::EMode_NONE, BESU1, 0}, + {BCK_BESU_F_TALK_B, J3DFrameCtrl::EMode_NONE, BESU1, BTP_BESU_F_TALK_B, J3DFrameCtrl::EMode_NONE, BESU1, 0}, + {BCK_BESU_F_TALK_C, J3DFrameCtrl::EMode_NONE, BESU0, BTP_BESU, J3DFrameCtrl::EMode_LOOP, BESU0, 1}, + {BCK_BESU_F_MADTALK, J3DFrameCtrl::EMode_NONE, BESU1, BTP_BESU_F_MADTALK, J3DFrameCtrl::EMode_NONE, BESU1, 0}, + {BCK_BESU_FH_TALK_A, J3DFrameCtrl::EMode_LOOP, BESU1, BTP_BESU_FH_TALK_A, J3DFrameCtrl::EMode_LOOP, BESU1, 0}, + {BCK_BESU_FH_TALK_B, J3DFrameCtrl::EMode_LOOP, BESU1, BTP_BESU_FH_TALK_B, J3DFrameCtrl::EMode_LOOP, BESU1, 0}, + {BCK_BESU_FH_MADTALK, J3DFrameCtrl::EMode_LOOP, BESU1, BTP_BESU_FH_MADTALK, J3DFrameCtrl::EMode_LOOP, BESU1, 0}, + {BCK_BESU_F_YOKERU, J3DFrameCtrl::EMode_NONE, BESU0, BTP_BESU_F_YOKERU, J3DFrameCtrl::EMode_NONE, BESU0, 0}, + {BCK_BESU_F_NURSE_A, J3DFrameCtrl::EMode_LOOP, BESU2, BTP_BESU_F_NURSE_A, J3DFrameCtrl::EMode_LOOP, BESU2, 0}, + {BCK_BESU_F_MOP_A, J3DFrameCtrl::EMode_NONE, BESU2, BTP_BESU_F_MOP_A, J3DFrameCtrl::EMode_NONE, BESU2, 0}, + {BCK_BESU_F_MOP_B, J3DFrameCtrl::EMode_LOOP, BESU2, BTP_BESU_F_MOP_B, J3DFrameCtrl::EMode_LOOP, BESU2, 0}, + {BCK_BESU_F_MOP_C, J3DFrameCtrl::EMode_NONE, BESU2, BTP_BESU_F_MOP_C, J3DFrameCtrl::EMode_NONE, BESU2, 0}, + {BCK_BESU_F_TALK_N_A, J3DFrameCtrl::EMode_NONE, BESU2, BTP_BESU_F_TALK_N_A, J3DFrameCtrl::EMode_NONE, BESU2, 0}, + {BCK_BESU_F_TALK_N_B, J3DFrameCtrl::EMode_LOOP, BESU2, BTP_BESU_F_TALK_N_B, J3DFrameCtrl::EMode_LOOP, BESU2, 0}, + {BCK_BESU_F_TALK_N_C, J3DFrameCtrl::EMode_NONE, BESU2, BTP_BESU_F_TALK_N_C, J3DFrameCtrl::EMode_NONE, BESU2, 0}, + {BCK_BESU_F_GLARE_A, J3DFrameCtrl::EMode_NONE, BESU2, BTP_BESU_F_GLARE_A, J3DFrameCtrl::EMode_NONE, BESU2, 0}, + {BCK_BESU_F_CUP_A, J3DFrameCtrl::EMode_LOOP, BESU2, BTP_BESU_F_CUP_A, J3DFrameCtrl::EMode_LOOP, BESU2, 0}, + {BCK_BESU_F_CUP_B, J3DFrameCtrl::EMode_LOOP, BESU2, BTP_BESU_F_CUP_B, J3DFrameCtrl::EMode_LOOP, BESU2, 0}, + {BCK_BESU_F_SURPRISE, J3DFrameCtrl::EMode_NONE, BESU3, BTP_BESU3_F_SURPRISE, J3DFrameCtrl::EMode_NONE, BESU3, 0}, + {BCK_BESU_FH_SURPRISE, J3DFrameCtrl::EMode_LOOP, BESU3, BTP_BESU3_FH_SURPRISE, J3DFrameCtrl::EMode_LOOP, BESU3, 0}, + {BCK_BESU3_F_WORRY, J3DFrameCtrl::EMode_NONE, BESU3, BTP_BESU3_F_WORRY, J3DFrameCtrl::EMode_NONE, BESU3, 0}, + {BCK_BESU3_FH_WORRY, J3DFrameCtrl::EMode_LOOP, BESU3, BTP_BESU3_FH_WORRY, J3DFrameCtrl::EMode_LOOP, BESU3, 0}, + {BCK_BESU_F_AMAZED_A, J3DFrameCtrl::EMode_NONE, BESU2, BTP_BESU_F_AMAZED_A, J3DFrameCtrl::EMode_NONE, BESU2, 0}, + {BCK_BESU_F_AMAZED_B, J3DFrameCtrl::EMode_LOOP, BESU2, BTP_BESU_F_AMAZED_B, J3DFrameCtrl::EMode_LOOP, BESU2, 0}, + {BCK_BESU_F_AMAZED_C, J3DFrameCtrl::EMode_NONE, BESU2, BTP_BESU_F_AMAZED_C, J3DFrameCtrl::EMode_NONE, BESU2, 0}, + {BCK_BESU_F_DEMO_WAIT, J3DFrameCtrl::EMode_LOOP, BESU_TW, BTP_BESU_F_DEMO_WAIT, J3DFrameCtrl::EMode_LOOP, BESU_TW, 0}, + {BCK_BESU_F_DEMO_FEAR, J3DFrameCtrl::EMode_LOOP, BESU_TW, BTP_BESU_F_DEMO_FEAR, J3DFrameCtrl::EMode_LOOP, BESU_TW, 0}, + {BCK_BESU_F_GLARE_WAIT, J3DFrameCtrl::EMode_LOOP, BESU2, BTP_BESU_F_GLARE_WAIT, J3DFrameCtrl::EMode_LOOP, BESU2, 0}, + {BCK_BESU_FH_BIKKURI, J3DFrameCtrl::EMode_LOOP, BESU0, BTP_BESU_FH_BIKKURI, J3DFrameCtrl::EMode_LOOP, BESU0, 0}, }; /* 8053EFF8-8053F394 00049C 039C+00 0/1 0/0 0/0 .data l_motionAnmData */ static daNpcT_motionAnmData_c l_motionAnmData[33] = { - {17, 2, 3, 22, 0, 3, 1, 0}, - {15, 2, 4, 22, 0, 3, 1, 0}, - {18, 2, 3, 22, 0, 3, 1, 0}, - {15, 2, 3, 22, 0, 3, 1, 0}, - {13, 0, 4, 22, 0, 3, 1, 0}, - {14, 0, 4, 22, 0, 3, 1, 0}, - {13, 0, 3, 22, 0, 3, 1, 0}, - {19, 0, 3, 22, 0, 3, 1, 0}, - {16, 0, 3, 22, 0, 3, 1, 0}, - {12, 0, 3, 22, 0, 3, 1, 0}, - {31, 2, 5, 22, 0, 3, 1, 0}, - {28, 0, 5, 22, 0, 3, 0, 0}, - {29, 2, 5, 22, 0, 3, 0, 0}, - {30, 0, 5, 22, 0, 3, 0, 0}, - {32, 0, 5, 22, 0, 3, 0, 0}, - {33, 2, 5, 22, 0, 3, 0, 0}, - {34, 0, 5, 22, 0, 3, 0, 0}, - {26, 0, 5, 22, 0, 3, 0, 0}, - {10, 2, 5, 22, 0, 3, 0, 0}, - {11, 2, 5, 22, 0, 3, 0, 0}, - {11, 2, 6, 17, 2, 6, 0, 0}, - {6, 0, 5, 22, 0, 3, 0, 0}, - {7, 2, 5, 22, 0, 3, 0, 0}, - {8, 0, 5, 22, 0, 3, 0, 0}, - {6, 2, 2, -1, 0, 0, 0, 0}, - {5, 2, 2, -1, 0, 0, 0, 0}, - {27, 2, 5, 22, 0, 3, 0, 0}, - {12, 2, 4, 22, 0, 3, 0, 0}, - {10, 0, 3, 22, 0, 3, 1, 0}, - {11, 2, 3, 22, 0, 3, 1, 0}, - {14, 0, 3, 22, 0, 3, 1, 0}, - {5, 0, 3, 22, 0, 3, 1, 0}, - {6, 2, 3, 22, 0, 3, 1, 0}, + {BCK_BESU_WAIT_A, J3DFrameCtrl::EMode_LOOP, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_WAIT_B, J3DFrameCtrl::EMode_LOOP, BESU1, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_WAIT_C, J3DFrameCtrl::EMode_LOOP, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_NORMAL_WAIT, J3DFrameCtrl::EMode_LOOP, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_TALK_A, J3DFrameCtrl::EMode_NONE, BESU1, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_TALK_B, J3DFrameCtrl::EMode_NONE, BESU1, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_NORMAL_TALK, J3DFrameCtrl::EMode_NONE, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_YOKERU, J3DFrameCtrl::EMode_NONE, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_STEP, J3DFrameCtrl::EMode_NONE, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_NORMAL_STEP, J3DFrameCtrl::EMode_NONE, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_NURSE_A, J3DFrameCtrl::EMode_LOOP, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_MOP_A, J3DFrameCtrl::EMode_NONE, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_MOP_B, J3DFrameCtrl::EMode_LOOP, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_MOP_C, J3DFrameCtrl::EMode_NONE, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_TALK_N_A, J3DFrameCtrl::EMode_NONE, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_TALK_N_B, J3DFrameCtrl::EMode_LOOP, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_TALK_N_C, J3DFrameCtrl::EMode_NONE, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_GLARE_A, J3DFrameCtrl::EMode_NONE, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_CUP_A, J3DFrameCtrl::EMode_LOOP, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_CUP_B, J3DFrameCtrl::EMode_LOOP, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_SURPRISE, J3DFrameCtrl::EMode_LOOP, BESU3, BTK_BESU_SURPRISE, J3DFrameCtrl::EMode_LOOP, BESU3, 0, 0}, + {BCK_BESU_AMAZED_A, J3DFrameCtrl::EMode_NONE, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_AMAZED_B, J3DFrameCtrl::EMode_LOOP, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_AMAZED_C, J3DFrameCtrl::EMode_NONE, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_DEMO_WAIT, J3DFrameCtrl::EMode_LOOP, BESU_TW, -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {BCK_BESU_DEMO_FEAR, J3DFrameCtrl::EMode_LOOP, BESU_TW, -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {BCK_BESU_GLARE_WAIT, J3DFrameCtrl::EMode_LOOP, BESU2, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_RUN, J3DFrameCtrl::EMode_LOOP, BESU1, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 0, 0}, + {BCK_BESU_MAD, J3DFrameCtrl::EMode_NONE, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_MAD_WAIT, J3DFrameCtrl::EMode_LOOP, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_NORMAL_TALK_B, J3DFrameCtrl::EMode_NONE, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_BODY_TALK, J3DFrameCtrl::EMode_NONE, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, + {BCK_BESU_BODY_WAIT, J3DFrameCtrl::EMode_LOOP, BESU0, BTK_BESU, J3DFrameCtrl::EMode_NONE, BESU0, 1, 0}, }; /* 8053F394-8053F564 000838 01D0+00 0/1 0/0 0/0 .data l_faceMotionSequenceData */ static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_faceMotionSequenceData[116] = { - {3, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {1, -1, 1}, {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, - {2, -1, 1}, {6, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {14, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {10, 0, 1}, {12, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {10, 0, 1}, {11, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {12, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {9, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {4, -1, 1}, {7, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {17, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {19, -1, 1}, {20, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {21, -1, 1}, {22, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, - {8, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {6, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {7, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {13, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {15, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {16, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {20, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {23, -1, 1}, {24, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {25, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {18, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {26, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {27, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {28, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {22, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {29, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {3, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {1, -1, 1}, {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, + {2, -1, 1}, {6, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, + {14, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {10, 0, 1}, {12, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, + {10, 0, 1}, {11, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {12, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {9, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {4, -1, 1}, {7, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, + {17, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {19, -1, 1}, {20, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, + {21, -1, 1}, {22, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, + {8, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {6, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {7, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {13, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {15, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {16, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {20, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {23, -1, 1}, {24, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {25, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {18, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {26, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {27, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {28, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {22, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {29, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; /* 8053F564-8053F744 000A08 01E0+00 0/1 0/0 0/0 .data l_motionSequenceData */ static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[120] = { - {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {4, -1, 1}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {4, -1, 1}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, - {15, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {18, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {20, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {6, -1, 1}, {3, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {28, -1, 1}, {29, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {30, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {31, -1, 1}, {32, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {10, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {11, 0, 1}, {13, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {11, 0, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {13, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {8, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {7, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {14, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {16, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {17, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {21, -1, 1}, {22, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {23, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {19, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {24, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {25, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {26, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {27, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {9, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {4, -1, 1}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, + {4, -1, 1}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, + {15, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {18, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {20, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {6, -1, 1}, {3, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {28, -1, 1}, {29, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {30, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {31, -1, 1}, {32, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {10, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {11, 0, 1}, {13, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, + {11, 0, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {13, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {8, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {7, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {14, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {16, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {17, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {21, -1, 1}, {22, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, + {23, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {19, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {24, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {25, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {26, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {27, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {9, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; /* 8053F744-8053F780 -00001 003C+00 1/1 0/0 0/0 .data mCutNameList__12daNpc_Besu_c */ @@ -255,8 +551,8 @@ daNpc_Besu_c::~daNpc_Besu_c() { mpMorf[0]->stopZelAnime(); } - if (mpBesuMorf != NULL) { - mpBesuMorf->stopZelAnime(); + if (mpCupModelMorf != NULL) { + mpCupModelMorf->stopZelAnime(); } // #ifdef DEBUG @@ -268,7 +564,6 @@ daNpc_Besu_c::~daNpc_Besu_c() { deleteRes((l_loadResPtrnList)[mType], (const char**)l_resNameList); } -/* ############################################################################################## */ /* 8053E754-8053E7E4 000000 0090+00 13/13 0/0 0/0 .rodata m__18daNpc_Besu_Param_c */ const daNpc_Besu_HIOParam daNpc_Besu_Param_c::m = { 160.0f, @@ -437,9 +732,9 @@ int daNpc_Besu_c::CreateHeap() { } dbg_0x24 = 0x11000084; - mpBesuMorf = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, + mpCupModelMorf = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, NULL, 0x80000, dbg_0x24); - if (mpBesuMorf == NULL || mpBesuMorf->getModel() == NULL) { + if (mpCupModelMorf == NULL || mpCupModelMorf->getModel() == NULL) { return 0; } } @@ -453,10 +748,10 @@ int daNpc_Besu_c::CreateHeap() { } if (modelData != NULL) { - mpModel[0] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + mpClothModel[0] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); } - if (mpModel[0] == NULL) { + if (mpClothModel[0] == NULL) { return 0; } } @@ -501,14 +796,12 @@ int daNpc_Besu_c::Draw() { return draw(FALSE, 0, mRealShadowSize, NULL, 100.0f, 0, 0, 0); } -/* 805379FC-80537A1C 000C9C 0020+00 1/1 0/0 0/0 .text - * createHeapCallBack__12daNpc_Besu_cFP10fopAc_ac_c */ +/* 805379FC-80537A1C 000C9C 0020+00 1/1 0/0 0/0 .text createHeapCallBack__12daNpc_Besu_cFP10fopAc_ac_c */ int daNpc_Besu_c::createHeapCallBack(fopAc_ac_c* i_this) { return static_cast(i_this)->CreateHeap(); } -/* 80537A1C-80537A74 000CBC 0058+00 1/1 0/0 0/0 .text - * ctrlJointCallBack__12daNpc_Besu_cFP8J3DJointi */ +/* 80537A1C-80537A74 000CBC 0058+00 1/1 0/0 0/0 .text ctrlJointCallBack__12daNpc_Besu_cFP8J3DJointi */ int daNpc_Besu_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) { if (param_1 == 0) { J3DModel* model = j3dSys.getModel(); @@ -569,41 +862,95 @@ u8 daNpc_Besu_c::getType() { BOOL daNpc_Besu_c::isDelete() { switch (mType) { case 0: - return !daNpcT_chkEvtBit(0x12) || daNpcT_chkEvtBit(0x1F); + /* dSv_event_flag_c::F_0014 - Ordon Village - sword tutorial ends */ + return !daNpcT_chkEvtBit(0x12) || + /* dSv_event_flag_c::F_0026 - Ordon Village - gave wooden sword to talo on 3rd day */ + daNpcT_chkEvtBit(0x1F); + case 1: + /* dSv_event_flag_c::F_0014 - Ordon Village - sword tutorial ends */ return daNpcT_chkEvtBit(0x12) == 0; + case 2: return 0; + case 3: - return !daNpcT_chkEvtBit(0x3D) || daNpcT_chkEvtBit(0xA4); + /* dSv_event_flag_c::M_028 - Cutscene - [cutscene: 14] restore mountain spirit - Reuinion with Colin et al. */ + return !daNpcT_chkEvtBit(0x3D) || + /* dSv_event_flag_c::F_0066 - Death Mountain - First saw Goron cutscene on mountain path */ + daNpcT_chkEvtBit(0xA4); + case 4: - return !daNpcT_chkEvtBit(0xA4) || daNpcT_chkEvtBit(0x35); + /* dSv_event_flag_c::F_0066 - Death Mountain - First saw Goron cutscene on mountain path */ + return !daNpcT_chkEvtBit(0xA4) || + /* dSv_event_flag_c::M_020 - Cutscene - [cutscene: ] Colin kidnapped : ON once watched */ + daNpcT_chkEvtBit(0x35); + case 5: - return !daNpcT_chkEvtBit(0x35) || daNpcT_chkEvtBit(0x55); + /* dSv_event_flag_c::M_020 - Cutscene - [cutscene: ] Colin kidnapped : ON once watched */ + return !daNpcT_chkEvtBit(0x35) || + /* dSv_event_flag_c::M_052 - Main Event - Horseback battle clear */ + daNpcT_chkEvtBit(0x55); + case 6: - return !daNpcT_chkEvtBit(0x55) || daNpcT_chkEvtBit(0x40); + /* dSv_event_flag_c::M_052 - Main Event - Horseback battle clear */ + return !daNpcT_chkEvtBit(0x55) || + /* dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear */ + daNpcT_chkEvtBit(0x40); + case 7: - return !daNpcT_chkEvtBit(0x40) || daNpcT_chkEvtBit(0x44); + /* dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear */ + return !daNpcT_chkEvtBit(0x40) || + /* dSv_event_flag_c::M_035 - Cutscene - [cutscene: 35] after carriage guarding event */ + daNpcT_chkEvtBit(0x44); + case 8: - return !daNpcT_chkEvtBit(0x44) || daNpcT_chkEvtBit(0x108); + /* dSv_event_flag_c::M_035 - Cutscene - [cutscene: 35] after carriage guarding event */ + return !daNpcT_chkEvtBit(0x44) || + /* dSv_event_flag_c::F_0264 - Cutscene - Get master sword */ + daNpcT_chkEvtBit(0x108); + case 9: return 0; + case 10: + /* dSv_event_flag_c::F_0264 - Cutscene - Get master sword */ return daNpcT_chkEvtBit(0x108) == 0; + case 11: + /* dSv_event_flag_c::F_0015 - Ordon Village - Slingshot tutorial ends */ return daNpcT_chkEvtBit(0x13); + case 12: - return !daNpcT_chkEvtBit(0x13) || daNpcT_chkEvtBit(0x12); + /* dSv_event_flag_c::F_0015 - Ordon Village - Slingshot tutorial ends */ + return !daNpcT_chkEvtBit(0x13) || + /* dSv_event_flag_c::F_0014 - Ordon Village - sword tutorial ends */ + daNpcT_chkEvtBit(0x12); + case 13: - return !daNpcT_chkEvtBit(0x12) || daNpcT_chkEvtBit(0x25C); + /* dSv_event_flag_c::F_0014 - Ordon Village - sword tutorial ends */ + return !daNpcT_chkEvtBit(0x12) || + /* dSv_event_flag_c::F_0616 - Ordon Village - 3rd Day - Spoke to Talo/Malo after handing over wooden sword (1st time) */ + daNpcT_chkEvtBit(0x25C); + case 14: return 0; + case 15: - return !daNpcT_chkEvtBit(0x25C) || daNpcT_chkEvtBit(0x80); + /* dSv_event_flag_c::F_0616 - Ordon Village - 3rd Day - Spoke to Talo/Malo after handing over wooden sword (1st time) */ + return !daNpcT_chkEvtBit(0x25C) || + /* dSv_event_flag_c::M_095 - Faron Woods - First time meeting Coro (obtain lantern) */ + daNpcT_chkEvtBit(0x80); + case 16: - return !daNpcT_chkEvtBit(0x80) || daNpcT_chkEvtBit(0x235); + /* dSv_event_flag_c::M_095 - Faron Woods - First time meeting Coro (obtain lantern) */ + return !daNpcT_chkEvtBit(0x80) || + /* dSv_event_flag_c::F_0565 - N/A - 2nd Day Complete */ + daNpcT_chkEvtBit(0x235); + case 17: return 0; + default: return 0; } @@ -629,7 +976,8 @@ void daNpc_Besu_c::reset() { eventInfo.setIdx(0); break; case 1: - mHide = daNpcT_chkEvtBit(0x1f) == 0; + /* dSv_event_flag_c::F_0026 - Ordon Village - gave wooden sword to talo on 3rd day */ + mHide = daNpcT_chkEvtBit(0x1F) == 0; eventInfo.setIdx(1); break; case 6: @@ -645,6 +993,7 @@ void daNpc_Besu_c::reset() { break; } + /* dSv_event_tmp_flag_c::T_0100 - Ordon Village - cutscene at start of 2nd day, start focus on kids Flags */ daNpcT_offTmpBit(0x64); setAngle(acStack_20); } @@ -756,7 +1105,7 @@ BOOL daNpc_Besu_c::checkChangeEvt() { mPreItemNo = 0; if (dComIfGp_event_chkTalkXY()) { if (dComIfGp_evmng_ChkPresentEnd()) { - mEvtNo = 1; + mEvtNo = EVENT_NO_RESPONSE; evtChange(); } return 1; @@ -768,36 +1117,38 @@ BOOL daNpc_Besu_c::checkChangeEvt() { case 3: case 4: - mEvtNo = 7; + mEvtNo = EVENT_CACARICO_CONVERSATION; evtChange(); return 1; case 6: - mEvtNo = 0xA; + mEvtNo = EVENT_CONVERSATION_ABOUT_DEATHMT; evtChange(); return 1; case 7: - mEvtNo = 0xB; + mEvtNo = EVENT_NURSE; evtChange(); return 1; case 8: - mEvtNo = 0xC; + mEvtNo = EVENT_CONVERSATION_ABOUT_ZORA; evtChange(); return 1; case 11: if (checkItemGet(0x4B, 1)) { - mEvtNo = 6; + mEvtNo = EVENT_CONVERSATION_ABOUT_PACHINKO3; + /* dSv_event_flag_c::F_0024 - Ordon Village - Spoke with Talo/Malo/Beth (before obtaining slingshot) */ } else if (daNpcT_chkEvtBit(0x1D)) { - mEvtNo = 5; + mEvtNo = EVENT_CONVERSATION_ABOUT_PACHINKO2; } else { - mEvtNo = 4; + mEvtNo = EVENT_CONVERSATION_ABOUT_PACHINKO1; } evtChange(); return 1; case 17: + /* dSv_event_flag_c::F_0601 - Faron Woods - Spoke to imprisoned Talo */ if (daNpcT_chkEvtBit(0x24D)) { - mEvtNo = 3; + mEvtNo = EVENT_CONVERSATION_ABOUT_SARU02; } else { - mEvtNo = 2; + mEvtNo = EVENT_CONVERSATION_ABOUT_SARU01; } evtChange(); return 1; @@ -809,22 +1160,22 @@ BOOL daNpc_Besu_c::checkChangeEvt() { /* 80538490-8053853C 001730 00AC+00 2/0 0/0 0/0 .text setAfterTalkMotion__12daNpc_Besu_cFv */ void daNpc_Besu_c::setAfterTalkMotion() { - int idx = 0x1C; + int idx = FACE_NONE; switch (mFaceMotionSeqMngr.getNo()) { - case 1: - idx = 0xD; + case FACE_TALK_A: + idx = FACE_H_TALK_A; break; - case 2: - idx = 0xE; + case FACE_TALK_B: + idx = FACE_H_TALK_B; break; - case 8: - idx = 0xF; + case FACE_MADTALK: + idx = FACE_H_MADTALK; break; - case 10: - idx = 0x13; + case FACE_SURPISE: + idx = FACE_H_SURPRISE; break; - case 11: - idx = 0x1A; + case FACE_WORRY: + idx = FACE_H_WORRY; break; } @@ -981,7 +1332,7 @@ void daNpc_Besu_c::action() { if (actor_p != NULL) { switch (((daTag_Push_c*) actor_p)->getId()) { case 6: { - mEvtNo = 9; + mEvtNo = EVENT_SURPRISE; } } } @@ -1011,7 +1362,7 @@ void daNpc_Besu_c::setAttnPos() { } BOOL var_r28 = FALSE; - if (mMotionSeqMngr.getNo() == 0x12 && !mMotionSeqMngr.checkEndSequence()) { + if (mMotionSeqMngr.getNo() == MOT_YOKERU && !mMotionSeqMngr.checkEndSequence()) { var_r28 = TRUE; } @@ -1037,13 +1388,13 @@ void daNpc_Besu_c::setAttnPos() { mJntAnm.calcJntRad(0.2f, 1.0f, rad_val); mpMorf[0]->setPlaySpeed(daNpc_Besu_Param_c::m.field_0x8c); setMtx(); - if (mpBesuMorf != NULL) { - mpBesuMorf->play(0, 0); + if (mpCupModelMorf != NULL) { + mpCupModelMorf->play(0, 0); Mtx jointAnmMtx; mDoMtx_stack_c::copy(mpMorf[0]->getModel()->getAnmMtx(10)); cMtx_copy(mDoMtx_stack_c::get(), jointAnmMtx); - mpBesuMorf->getModel()->setBaseTRMtx(jointAnmMtx); - mpBesuMorf->modelCalc(); + mpCupModelMorf->getModel()->setBaseTRMtx(jointAnmMtx); + mpCupModelMorf->modelCalc(); } mDoMtx_stack_c::copy(mpMorf[0]->getModel()->getAnmMtx(getHeadJointNo())); @@ -1153,30 +1504,30 @@ int daNpc_Besu_c::drawDbgInfo() { /* 8053949C-805395F4 00273C 0158+00 1/0 0/0 0/0 .text drawOtherMdl__12daNpc_Besu_cFv */ void daNpc_Besu_c::drawOtherMdl() { J3DModel* model_p = mpMorf[0]->getModel(); - if (mpBesuMorf != NULL) { - g_env_light.setLightTevColorType_MAJI(mpBesuMorf->getModel(), &tevStr); + if (mpCupModelMorf != NULL) { + g_env_light.setLightTevColorType_MAJI(mpCupModelMorf->getModel(), &tevStr); if (field_0x112e == 0) { - mpBesuMorf->getModel()->getModelData()->hide(); + mpCupModelMorf->getModel()->getModelData()->hide(); } else { - mpBesuMorf->getModel()->getModelData()->show(); + mpCupModelMorf->getModel()->getModelData()->show(); } - mpBesuMorf->entryDL(); - dComIfGd_addRealShadow(mShadowKey, mpBesuMorf->getModel()); + mpCupModelMorf->entryDL(); + dComIfGd_addRealShadow(mShadowKey, mpCupModelMorf->getModel()); } for (int i = 0; i < 1; i++) { - if (mpModel[i] != NULL && i == 0 && field_0x112d != 0) { - g_env_light.setLightTevColorType_MAJI(mpModel[i], &tevStr); + if (mpClothModel[i] != NULL && i == 0 && field_0x112d != 0) { + g_env_light.setLightTevColorType_MAJI(mpClothModel[i], &tevStr); static int const jointNo[1] = {14}; mDoMtx_stack_c::copy(model_p->getAnmMtx(jointNo[i])); Mtx jointAnmMtx; cMtx_copy(mDoMtx_stack_c::get(), jointAnmMtx); - mpModel[i]->setBaseTRMtx(jointAnmMtx); - mDoExt_modelUpdateDL(mpModel[i]); - dComIfGd_addRealShadow(mShadowKey, mpModel[i]); + mpClothModel[i]->setBaseTRMtx(jointAnmMtx); + mDoExt_modelUpdateDL(mpClothModel[i]); + dComIfGd_addRealShadow(mShadowKey, mpClothModel[i]); } } } @@ -1192,13 +1543,13 @@ int daNpc_Besu_c::setCupAnm(int arg0, int i_attr, f32 i_morf) { }; J3DAnmTransform* transform_p = NULL; - if (mpBesuMorf != NULL) { + if (mpCupModelMorf != NULL) { if (cupAnmData[arg0][0] > 0) { transform_p = getTrnsfrmKeyAnmP(l_resNameList[cupAnmData[arg0][1]], cupAnmData[arg0][0]); } - if (transform_p != NULL && transform_p != mpBesuMorf->getAnm()) { - mpBesuMorf->setAnm(transform_p, i_attr, i_morf, 1.0f, 0.0f, -1.0f); + if (transform_p != NULL && transform_p != mpCupModelMorf->getAnm()) { + mpCupModelMorf->setAnm(transform_p, i_attr, i_morf, 1.0f, 0.0f, -1.0f); } } @@ -1368,15 +1719,15 @@ void daNpc_Besu_c::mop(int arg0, int arg1) { if (field_0x1120) { action(); if (field_0x1120 == 0) { - mFaceMotionSeqMngr.setNo(7, 4.0f, 0, 0); - mMotionSeqMngr.setNo(0xD, 4.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NURSE_A, 4.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_NURSE_A, 4.0f, 0, 0); field_0x1124 = arg1; } } else if (field_0x1124) { action(); if (field_0x1124 == 0) { - mFaceMotionSeqMngr.setNo(4, 4.0f, 0, 0); - mMotionSeqMngr.setNo(0xE, 4.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_MOP_A_C, 4.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_MOP_A_C, 4.0f, 0, 0); field_0x1120 = arg0; } } @@ -1633,12 +1984,12 @@ int daNpc_Besu_c::cutConversationAboutWoodSwd(int arg0) { if (mPlayerAngle != mCurAngle.y) { if (chkBesu3()) { if (step(mPlayerAngle, 0x1C, 0x1D, 0xF, 0)) { - mFaceMotionSeqMngr.setNo(0x1C, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, 0, 0); } } else if (step(mPlayerAngle, 0x1C, 0x11, 0xF, 0)) { - mFaceMotionSeqMngr.setNo(0x1C, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, 0, 0); } } @@ -1699,8 +2050,8 @@ int daNpc_Besu_c::cutSwdTutorial(int arg0) { } case 71: { - mFaceMotionSeqMngr.setNo(1, 0.0f, 1, 0); - mMotionSeqMngr.setNo(2, 0.0f, 1, 0); + mFaceMotionSeqMngr.setNo(FACE_TALK_A, 0.0f, 1, 0); + mMotionSeqMngr.setNo(MOT_TALK_A, 0.0f, 1, 0); setAngle(home.angle.y); my_vec_0.set(50.0f, 0.0f, 0.0f); mDoMtx_stack_c::YrotS(mCurAngle.y); @@ -1765,7 +2116,7 @@ int daNpc_Besu_c::cutFindMonkey(int arg0) { } case 1: { - mFaceMotionSeqMngr.setNo(27, 0.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_H_BIKKURI, 0.0f, 0, 0); break; } @@ -1778,7 +2129,7 @@ int daNpc_Besu_c::cutFindMonkey(int arg0) { mJntAnm.lookNone(1); mEventTimer = timer_val; if (mEventTimer == 0) { - mMotionSeqMngr.setNo(28, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_RUN, -1.0f, 0, 0); } break; @@ -1827,7 +2178,7 @@ int daNpc_Besu_c::cutFindMonkey(int arg0) { retval = 1; } } else if (cLib_calcTimer(&mEventTimer) == 0) { - mMotionSeqMngr.setNo(28, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_RUN, -1.0f, 0, 0); } break; @@ -1921,8 +2272,8 @@ int daNpc_Besu_c::cutCacaricoConversation(int arg0) { mJntAnm.lookPlayer(0); if (mPlayerAngle != mCurAngle.y) { if (step(mPlayerAngle, 0x1C, 0x11, 0xF, 0)) { - mFaceMotionSeqMngr.setNo(28, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, 0, 0); } } else { retval = 1; @@ -1955,8 +2306,8 @@ int daNpc_Besu_c::cutSurprise(int arg0) { if (dComIfGp_getEventManager().getIsAddvance(arg0)) { switch (prm_val) { case 0: - mFaceMotionSeqMngr.setNo(0x13, 0.0f, 0, 0); - mMotionSeqMngr.setNo(6, 0.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_H_SURPRISE, 0.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_SURPRISE, 0.0f, 0, 0); mJntAnm.lookNone(1); tagpush_p->pushBackPlayer(1); break; @@ -2020,15 +2371,15 @@ int daNpc_Besu_c::cutConversationInHotel(int arg0) { field_0x1124 = 0; break; case 1: - mFaceMotionSeqMngr.setNo(0x15, 0.0f, 1, 0); - mMotionSeqMngr.setNo(0x17, 0.0f, 1, 0); + mFaceMotionSeqMngr.setNo(FACE_AMAZED_C, 0.0f, 1, 0); + mMotionSeqMngr.setNo(MOT_AMAZED_C, 0.0f, 1, 0); break; case 2: mEventTimer = timer_val; break; case 3: - mFaceMotionSeqMngr.setNo(7, 0.0f, 1, 0); - mMotionSeqMngr.setNo(0xD, 0.0f, 1, 0); + mFaceMotionSeqMngr.setNo(FACE_NURSE_A, 0.0f, 1, 0); + mMotionSeqMngr.setNo(MOT_NURSE_A, 0.0f, 1, 0); break; } } @@ -2044,8 +2395,8 @@ int daNpc_Besu_c::cutConversationInHotel(int arg0) { case 2: if (mEventTimer != 0) { if (cLib_calcTimer(&mEventTimer) == 0) { - mFaceMotionSeqMngr.setNo(0x14, 0.0f, 0, 0); - mMotionSeqMngr.setNo(0x16, 0.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_AMAZED_A, 0.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_AMAZED_A, 0.0f, 0, 0); mSound.startCreatureVoice(Z2SE_BESU_V_SHIKARARE, -1); } else { mop(timer1_val, timer2_val); @@ -2076,17 +2427,17 @@ int daNpc_Besu_c::cutConversationAboutDeathMt(int arg0) { if (dComIfGp_getEventManager().getIsAddvance(arg0)) { switch (prm_val) { case 0: - mFaceMotionSeqMngr.setNo(3, -1.0f, 0, 0); - mMotionSeqMngr.setNo(4, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_TALK_N_B, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_TALK_N_B, -1.0f, 0, 0); initTalk(mFlowNodeNo, NULL); break; case 1: - mFaceMotionSeqMngr.setNo(16, -1.0f, 0, 0); - mMotionSeqMngr.setNo(19, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_TALK_N_A, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_TALK_N_A, -1.0f, 0, 0); break; case 2: - mFaceMotionSeqMngr.setNo(17, -1.0f, 0, 0); - mMotionSeqMngr.setNo(20, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_TALK_N_C, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_TALK_N_C, -1.0f, 0, 0); break; } } @@ -2127,21 +2478,21 @@ int daNpc_Besu_c::cutConversationAboutGoron(int arg0) { if (dComIfGp_getEventManager().getIsAddvance(arg0)) { switch (prm_val) { case 0: - mFaceMotionSeqMngr.setNo(5, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0xF, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_MOP_A_B, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_MOP_A_B, -1.0f, 0, 0); break; case 1: - mFaceMotionSeqMngr.setNo(6, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0x10, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_MOP_C, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_MOP_C, -1.0f, 0, 0); field_0x1120 = 0x20; break; case 2: - mFaceMotionSeqMngr.setNo(5, 0.0f, 1, 0); - mMotionSeqMngr.setNo(0xF, 0.0f, 1, 0); + mFaceMotionSeqMngr.setNo(FACE_MOP_A_B, 0.0f, 1, 0); + mMotionSeqMngr.setNo(MOT_MOP_A_B, 0.0f, 1, 0); break; case 3: - mFaceMotionSeqMngr.setNo(6, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0x10, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_MOP_C, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_MOP_C, -1.0f, 0, 0); field_0x1120 = 0x20; break; } @@ -2186,12 +2537,12 @@ int daNpc_Besu_c::cutNurse(int arg0) { case 0: break; case 1: - mFaceMotionSeqMngr.setNo(22, -1.0f, 0, 0); - mMotionSeqMngr.setNo(24, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_CUP_B, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_CUP_B, -1.0f, 0, 0); break; case 2: - mFaceMotionSeqMngr.setNo(9, 0.0f, 1, 0); - mMotionSeqMngr.setNo(5, 0.0f, 1, 0); + mFaceMotionSeqMngr.setNo(FACE_CUP_A, 0.0f, 1, 0); + mMotionSeqMngr.setNo(MOT_CUP_A, 0.0f, 1, 0); break; } } @@ -2259,8 +2610,8 @@ int daNpc_Besu_c::cutThankYou(int arg0) { } case 1: { - mFaceMotionSeqMngr.setNo(25, 0.0f, 0, 0); - mMotionSeqMngr.setNo(27, 0.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_GLARE_WAIT, 0.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_GLARE_WAIT, 0.0f, 0, 0); break; } } @@ -2289,29 +2640,29 @@ int daNpc_Besu_c::wait(void* param_0) { switch (mType) { case 2: { if (getBitSW() != 0xFF && dComIfGs_isSwitch(getBitSW(), fopAcM_GetRoomNo(this))) { - mFaceMotionSeqMngr.setNo(0x18, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0x1A, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_DEMO_FEAR, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_DEMO_FEAR, -1.0f, 0, 0); } else { - mFaceMotionSeqMngr.setNo(0x17, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0x19, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_DEMO_WAIT, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_DEMO_WAIT, -1.0f, 0, 0); } break; } case 5: { - mFaceMotionSeqMngr.setNo(0x13, -1.0f, 0, 0); - mMotionSeqMngr.setNo(6, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_H_SURPRISE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_SURPRISE, -1.0f, 0, 0); break; } default: { if (chkBesu3()) { - mFaceMotionSeqMngr.setNo(28, -1.0f, 0, 0); - mMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_NORMAL_WAIT, -1.0f, 0, 0); } else { - mFaceMotionSeqMngr.setNo(28, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, 0, 0); } break; @@ -2327,6 +2678,7 @@ int daNpc_Besu_c::wait(void* param_0) { case 2: { switch (mType) { case 0: { + /* dSv_event_flag_c::F_0026 - Ordon Village - gave wooden sword to talo on 3rd day */ if (daNpcT_chkEvtBit(0x1F) && mHide) { fopAcM_delete(this); return 1; @@ -2344,10 +2696,11 @@ int daNpc_Besu_c::wait(void* param_0) { daNpc_Besu_Param_c::m.common.box_max_y, daNpc_Besu_Param_c::m.common.box_max_z, daNpc_Besu_Param_c::m.common.box_offset)) { - mEvtNo = 8; + mEvtNo = EVENT_DEMO13_STB; field_0x112f = 1; } + /* dSv_event_flag_c::M_027 - Cutscene - [cutscene: 13] kids in the church (beast eyes) */ if (field_0x112f && daNpcT_chkEvtBit(0x3C) && dComIfGp_event_runCheck() == 0) { field_0x112f = 0; } @@ -2356,6 +2709,7 @@ int daNpc_Besu_c::wait(void* param_0) { } case 13: { + /* dSv_event_flag_c::F_0616 - Ordon Village - 3rd Day - Spoke to Talo/Malo after handing over wooden sword (1st time) */ if (daNpcT_chkEvtBit(0x25C)) { fopAcM_delete(this); return 1; @@ -2370,7 +2724,7 @@ int daNpc_Besu_c::wait(void* param_0) { mJntAnm.lookNone(0); if (getBitSW() != 0xFF) { if (dComIfGs_isSwitch(getBitSW(), fopAcM_GetRoomNo(this)) - && mMotionSeqMngr.getNo() != 26) { + && mMotionSeqMngr.getNo() != MOT_DEMO_FEAR) { mMode = 1; } } @@ -2395,6 +2749,7 @@ int daNpc_Besu_c::wait(void* param_0) { if (mPlayerActorMngr.getActorP() != NULL && mTwilight == 0) { if (mType == 3 || mType == 4) { + /* dSv_event_tmp_flag_c::YKM_ATTN - Snowpeak Mountain - Player focus while Yeto waits for snowboard race */ dComIfGs_onTmpBit(0xD02); } @@ -2414,6 +2769,7 @@ int daNpc_Besu_c::wait(void* param_0) { } } else { if (mType == 3 || mType == 4) { + /* dSv_event_tmp_flag_c::YKM_ATTN - Snowpeak Mountain - Player focus while Yeto waits for snowboard race */ dComIfGs_offTmpBit(0xD02); } @@ -2445,11 +2801,15 @@ int daNpc_Besu_c::wait(void* param_0) { switch (mType) { case 3: case 4: { + /* dSv_event_tmp_flag_c::YKW_ATTN - Snowpeak Mountain - Player focus while Yeta waits for + snowboard race */ dComIfGs_offTmpBit(0xE40); break; } case 11: { + /* dSv_event_tmp_flag_c::T_0100 - Ordon Village - cutscene at start of 2nd day, + start focus on kids Flags */ if (daNpcT_chkTmpBit(0x64)) { field_0x1130 = 1; } @@ -2493,6 +2853,8 @@ int daNpc_Besu_c::wait(void* param_0) { switch (mType) { case 3: case 4: { + /* dSv_event_tmp_flag_c::YKW_ATTN - Snowpeak Mountain - Player focus while Yeta waits for + snowboard race */ dComIfGs_onTmpBit(0xE40); break; } @@ -2524,8 +2886,8 @@ int daNpc_Besu_c::swdTutorial(void* param_0) { case 0: case 1: { if (!mStagger.checkStagger()) { - mFaceMotionSeqMngr.setNo(28, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, 0, 0); mMode = 2; } } @@ -2552,12 +2914,12 @@ int daNpc_Besu_c::nurse(void* param_0) { switch (mMode) { case 0: case 1: { - if (mFaceMotionSeqMngr.getNo() != 0x15) { - mFaceMotionSeqMngr.setNo(7, -1.0f, 0, 0); + if (mFaceMotionSeqMngr.getNo() != FACE_AMAZED_C) { + mFaceMotionSeqMngr.setNo(FACE_NURSE_A, -1.0f, 0, 0); } - if (mMotionSeqMngr.getNo() != 0x17) { - mMotionSeqMngr.setNo(0xD, -1.0f, 0, 0); + if (mMotionSeqMngr.getNo() != MOT_AMAZED_C) { + mMotionSeqMngr.setNo(MOT_NURSE_A, -1.0f, 0, 0); } mMorfLoops = 0; @@ -2573,23 +2935,23 @@ int daNpc_Besu_c::nurse(void* param_0) { mJntAnm.lookNone(0); mAcch.SetWallNone(); switch (mMotionSeqMngr.getNo()) { - case 13: { + case MOT_NURSE_A: { if (0 != strcmp(dComIfGp_getEventManager().getRunEventName(), "EVT_CONVERSATION_IN_HOTEL1_e")) { if (0 != strcmp(dComIfGp_getEventManager().getRunEventName(), "EVT_CONVERSATION_IN_HOTEL2_e") && mType != 8 && mMorfLoops >= 2) { - mFaceMotionSeqMngr.setNo(18, -1.0f, 0, 0); - mMotionSeqMngr.setNo(21, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_GLARE_A, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_GLARE_A, -1.0f, 0, 0); } } break; } - case 21: - case 23: { + case MOT_GLARE_A: + case MOT_AMAZED_C: { if (mMotionSeqMngr.checkEndSequence()) { - mFaceMotionSeqMngr.setNo(7, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0xD, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NURSE_A, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_NURSE_A, -1.0f, 0, 0); } break; @@ -2601,16 +2963,16 @@ int daNpc_Besu_c::nurse(void* param_0) { cLib_calcTimer(&field_0x1120); cLib_calcTimer(&field_0x1124); if (field_0x1120 == 0) { - mFaceMotionSeqMngr.setNo(7, -1.0f, 0, 0); - mMotionSeqMngr.setNo(13, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NURSE_A, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_NURSE_A, -1.0f, 0, 0); field_0x1124 = 92; } } else if (field_0x1124) { cLib_calcTimer(&field_0x1120); cLib_calcTimer(&field_0x1124); if (field_0x1124 == 0) { - mFaceMotionSeqMngr.setNo(4, -1.0f, 0, 0); - mMotionSeqMngr.setNo(14, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_MOP_A_C, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_MOP_A_C, -1.0f, 0, 0); field_0x1120 = 92; } } @@ -2631,8 +2993,8 @@ int daNpc_Besu_c::giveHotWater(void* param_0) { switch (mMode) { case 0: case 1: { - mFaceMotionSeqMngr.setNo(9, -1.0f, 0, 0); - mMotionSeqMngr.setNo(5, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_CUP_A, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_CUP_A, -1.0f, 0, 0); mMode = 2; } /* fallthrough */ diff --git a/src/d/actor/d_a_npc_fish.cpp b/src/d/actor/d_a_npc_fish.cpp index b36a5a3dbdf..efd72414cac 100644 --- a/src/d/actor/d_a_npc_fish.cpp +++ b/src/d/actor/d_a_npc_fish.cpp @@ -156,6 +156,8 @@ static int daNpc_Fish_Create(fopAc_ac_c* i_this) { fopAcM_create(PROC_FR, 0, &pos, fopAcM_GetRoomNo(i_this), &angle, NULL, -1); } } + + /* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[463])) { fish_set(i_this, fish_d127); } else { diff --git a/src/d/actor/d_a_npc_henna.cpp b/src/d/actor/d_a_npc_henna.cpp index d77c89a3696..f219730bb3d 100644 --- a/src/d/actor/d_a_npc_henna.cpp +++ b/src/d/actor/d_a_npc_henna.cpp @@ -366,7 +366,9 @@ static void henna_shop(npc_henna_class* i_this) { i_this->field_0x618 = cM_atan2s(dX, dZ); } cLib_addCalcAngleS2(&i_this->actor.current.angle.y, i_this->field_0x618, 2, unkInt1); - if ((!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[461]) || data_80450C9C != 0) && + /* dSv_event_flag_c::F_0461 - Fishing Pond - First time entered fishing house */ + if ((!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[461]) + || data_80450C9C != 0) && i_this->field_0x7d7 == 0 && i_this->field_0x6a0 == 56 + TREG_S(7)) { dComIfGp_event_reset(); @@ -374,6 +376,7 @@ static void henna_shop(npc_henna_class* i_this) { data_80450C9C = 0; i_this->field_0x752 = 60; } else { + /* dSv_event_flag_c::F_0461 - Fishing Pond - First time entered fishing house */ dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[461]); i_this->field_0x752 = 1; } @@ -878,6 +881,7 @@ static void demo_camera(npc_henna_class* i_this) { dComIfGp_event_reset(); daPy_py_c* player = daPy_getPlayerActorClass(); player->cancelOriginalDemo(); + /* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d0])) { i_this->field_0x70a = 10; i_this->field_0x70b = 0; @@ -885,7 +889,9 @@ static void demo_camera(npc_henna_class* i_this) { } else { i_this->field_0x752 = 0; } + /* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */ dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1cf]); + /* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */ dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1d0]); } } @@ -988,8 +994,9 @@ static void demo_camera_shop(npc_henna_class* i_this) { u32 unkIntArr2[1]; s8 unkBool1 = FALSE; - if (dComIfGp_event_runCheck() == FALSE && - dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1d1]) == FALSE) + if (!dComIfGp_event_runCheck() + /* dSv_event_flag_c::F_0465 - Fishing Pond - Reserved for fishing */ + && !dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1d1])) { i_this->field_0x756++; if (i_this->field_0x756 < 200) { @@ -1178,12 +1185,14 @@ static void demo_camera_shop(npc_henna_class* i_this) { anm_init(i_this, 18, -10.0f, 2, 1.0f); i_this->field_0x5bc++; } else { - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1ce]) == 0) { + /* dSv_event_flag_c::F_0462 - Fishing Pond - Reserved for fishing */ + if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1ce])) { dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1ce]); i_this->field_0x752 = 19; break; } - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d1]) != 0) { + /* dSv_event_flag_c::F_0465 - Fishing Pond - Reserved for fishing */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d1])) { if (i_this->field_0x709 != 0) { i_this->mMsgFlow.init(actor, 0x327, 0, NULL); i_this->field_0x6ba = 90; @@ -1237,15 +1246,19 @@ static void demo_camera_shop(npc_henna_class* i_this) { if (i_this->field_0x754 == 1) { if (i_this->field_0x752 == 12) { if (dComIfGs_getRupee() >= 20) { - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d1]) == 0) { + /* dSv_event_flag_c::F_0465 - Fishing Pond - Reserved for fishing */ + if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d1])) { i_this->mMsgFlow.init(actor, 0x32e, 0, NULL); + /* dSv_event_flag_c::F_0465 - Fishing Pond - Reserved for fishing */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1d1]); + /* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1d0]); data_80450CA0 = 1; } else { i_this->mMsgFlow.init(actor, 0x32f, 0, NULL); } dComIfGp_setItemRupeeCount(0xffffffec); + /* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1cf]); i_this->field_0x5b6 = 1; } else { @@ -1296,7 +1309,9 @@ static void demo_camera_shop(npc_henna_class* i_this) { if (dComIfGs_getRupee() >= 100) { i_this->mMsgFlow.init(actor, 0x330, 0, NULL); dComIfGp_setItemRupeeCount(-100); + /* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1cf]); + /* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1d0]); data_80450CA0 = 1; i_this->field_0x5b6 = 1; @@ -1455,7 +1470,8 @@ static void demo_camera_shop(npc_henna_class* i_this) { } break; case 2: - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d5]) != 0) { + /* dSv_event_flag_c::F_0469 - Fishing Pond - Reserved for fishing */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d5])) { i_this->mMsgFlow.init(actor, 0x338, 0, NULL); } else { i_this->mMsgFlow.init(actor, 0x337, 0, NULL); @@ -1515,7 +1531,8 @@ static void demo_camera_shop(npc_henna_class* i_this) { i_this->mMsgFlow.init(actor, 0x33c, 0, NULL); break; case 0x13: - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335]) != 0) { + /* dSv_event_flag_c::KORO2_ALLCLEAR - Fishing - After all stages (8-8) of roll goal game cleared */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335])) { i_this->mMsgFlow.init(actor, 0x366, 0, NULL); } else { dComIfGp_event_offHindFlag(0x80); @@ -1534,7 +1551,8 @@ static void demo_camera_shop(npc_henna_class* i_this) { if (i_this->mMsgFlow.doFlow(actor, NULL, 0) != 0) { if (i_this->field_0x7b4 == 19) { if (dMsgObject_getSelectCursorPos() == 0) { - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335]) != 0) { + /* dSv_event_flag_c::KORO2_ALLCLEAR - Fishing - After all stages (8-8) of roll goal game cleared */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335])) { i_this->field_0x752 = 0x4d; i_this->field_0x754 = 0; mDoGph_gInf_c::fadeOut(0.1f, g_blackColor); @@ -1872,7 +1890,8 @@ static void demo_camera_shop(npc_henna_class* i_this) { case 74: { if (i_this->mMsgFlow.doFlow(actor, NULL, 0) != 0) { if (dMsgObject_getSelectCursorPos() == 0) { - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335]) != 0) { + /* dSv_event_flag_c::KORO2_ALLCLEAR - Fishing - After all stages (8-8) of roll goal game cleared */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335])) { i_this->field_0x754 = 0; i_this->field_0x752 = 0x4d; mDoGph_gInf_c::fadeOut(0.1f, g_blackColor); @@ -1923,16 +1942,19 @@ static void demo_camera_shop(npc_henna_class* i_this) { Z2GetAudioMgr()->subBgmStop(); } if (i_this->field_0x754 == 10) { - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335]) != 0) { + /* dSv_event_flag_c::KORO2_ALLCLEAR - Fishing - After all stages (8-8) of roll goal game cleared */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335])) { i_this->mMsgFlow.init(actor, 0x36f, 0, NULL); } else { if ((lbl_82_bss_91 & 7) == 0x7) { if (lbl_82_bss_91 == 0x3f) { i_this->mMsgFlow.init(actor, 0x365, 0, NULL); + /* dSv_event_flag_c::KORO2_ALLCLEAR - Fishing - After all stages (8-8) of roll goal game cleared */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x335]); dComIfGp_setItemRupeeCount(1000); } else if ((lbl_82_bss_91 & 0x38) == 0) { i_this->mMsgFlow.init(actor, 0x34f, 0, NULL); + /* dSv_event_flag_c::F_0469 - Fishing Pond - Reserved for fishing */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1d5]); } else { i_this->mMsgFlow.init(actor, 0x34f, 0, NULL); @@ -2713,7 +2735,9 @@ static int daNpc_Henna_Create(fopAc_ac_c* i_this) { } } } + /* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */ dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1cf]); + /* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */ dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1d0]); a_this->field_0x618 = i_this->shape_angle.y = i_this->current.angle.y = newAngle; lbl_82_bss_91 = dComIfGs_getEventReg(0xf63f); @@ -2758,6 +2782,7 @@ static int daNpc_Henna_Create(fopAc_ac_c* i_this) { fopAcM_create(PROC_NPC_TK, 0xffffffff, &npcDfPos, fopAcM_GetRoomNo(i_this), NULL, NULL, -1); data_80450C99 = 0; + /* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */ if (!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1cf])) { a_this->field_0x70a = 4; a_this->field_0x734 = 1; diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 322f56ad6a5..09bbf2f60eb 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -12,7 +12,7 @@ UNK_REL_DATA; -enum JAGAR_RES_FILE_ID { +enum Jagar_RES_File_ID { /* BCK */ /* 0x06 */ BCK_JAGA_F_TALK_A = 6, /* 0x07 */ BCK_JAGA_FH_TALK_A, @@ -32,21 +32,45 @@ enum JAGAR_RES_FILE_ID { /* 0x15 */ BTP_JAGA_FH_TALK_A, }; -enum JAGAR1_RES_FILE_ID { +enum Jagar1_RES_File_ID { /* BCK */ /* 0x04 */ BCK_JAGA_CHU = 4, /* 0x05 */ BCK_JAGA_CHU_TO_SIT, /* 0x06 */ BCK_JAGA_F_SMILETALK, /* 0x07 */ BCK_JAGA_SIT, - /* 0x08 */ BCK_JAGA_TO_CHU, - /* 0x09 */ BCK_JAGA_WAIT_B, - /* 0x0A */ BCK_JAGA_WAIT_TO_SIT, + /* 0x08 */ BCK_JAGA_SIT_TO_WAIT, + /* 0x09 */ BCK_JAGA_TO_CHU, + /* 0x0A */ BCK_JAGA_WAIT_B, + /* 0x0B */ BCK_JAGA_WAIT_TO_SIT, /* EVT */ - /* 0x0E */ EVT_EVENT_LIST = 0xE, + /* 0x0E */ EVT_JAGAR1_EVENT_LIST = 0xE, }; -enum JAGAR3_RES_FILE_ID { +enum Jagar2_RES_File_ID { + /* BCK */ + /* 0x05 */ BCK_JAGA_F_SURPRISE = 0x5, + /* 0x06 */ BCK_JAGA_F_SURPRISE_WAIT, + /* 0x07 */ BCK_JAGA_F_WORRY_TALK, + /* 0x08 */ BCK_JAGA_RUN_A, + /* 0x09 */ BCK_JAGA_SURPRISE, + /* 0x0A */ BCK_JAGA_SURPRISE_WAIT, + /* 0x0B */ BCK_JAGA_UNADUKI, + /* 0x0C */ BCK_JAGA_WORRY_TALK, + /* 0x0D */ BCK_JAGA_WORRY_WAIT, + /* 0x0E */ BCK_JAGA_WORRY_WALK, + + /* BTP */ + /* 0x11 */ BTP_JAGA_BLINK = 0x11, + /* 0x12 */ BTP_JAGA_F_SURPRISE, + /* 0x13 */ BTP_JAGA_F_SURPRISE_WAIT, + /* 0x14 */ BTP_JAGA_F_WORRY_TALK, + + /* EVT */ + /* 0x17 */ EVT_JAGAR2_EVENT_LIST = 0x17, +}; + +enum Jagar3_RES_File_ID { /* BCK */ /* 0x04 */ BCK_JAGA_F_TALK_B = 4, /* 0x05 */ BCK_JAGA_FH_TALK_B, @@ -57,11 +81,63 @@ enum JAGAR3_RES_FILE_ID { /* 0x0A */ BTP_JAGA_FH_TALK_B, }; -enum JAGAR4_RES_FILE_ID { +enum Jagar4_RES_File_ID { /* BMDR */ /* 0x03 */ BMDR_JAGA_NOUGU = 3, }; +enum RES_Name { + /* 0x1 */ Jagar = 0x1, + /* 0x2 */ Jagar1, + /* 0x3 */ Jagar2, + /* 0x4 */ Jagar3, +}; + +enum FaceMotion { + /* 0x00 */ FACE_TALK_A, + /* 0x01 */ FACE_SURPRISE, + /* 0x02 */ FACE_SMILETALK, + /* 0x03 */ FACE_TALK_B, + /* 0x04 */ FACE_WORRY_TALK, + /* 0x05 */ FACE_H_TALK_B, + /* 0x06 */ FACE_H_TALK_A, + /* 0x07 */ FACE_7, + /* 0x08 */ FACE_NONE, +}; + +enum Motion { + /* 0x00 */ MOT_WAIT_A, + /* 0x01 */ MOT_TALK_A, + /* 0x02 */ MOT_CHU, + /* 0x03 */ MOT_SIT, + /* 0x04 */ MOT_TALK_B, + /* 0x05 */ MOT_WORRY_WAIT, + /* 0x06 */ MOT_WORRY_TALK, + /* 0x07 */ MOT_SURPRISE, + /* 0x08 */ MOT_UNADUKI, + /* 0x09 */ MOT_SURPRISE_WAIT, + /* 0x0A */ MOT_SIT_TO_WAIT, + /* 0x0B */ MOT_TO_CHU, + /* 0x0C */ MOT_CHU_TO_SIT, + /* 0x0D */ MOT_WAIT_TO_SIT, + /* 0x0E */ MOT_STEP, + /* 0x0F */ MOT_RUN_A, + /* 0x10 */ MOT_WORRY_WALK, + /* 0x11 */ MOT_WAIT_B, +}; + +enum Event { + /* 0x0 */ EVENT_NONE, + /* 0x1 */ EVENT_NO_RESPONSE, + /* 0x2 */ EVENT_CLIMBUP, + /* 0x3 */ EVENT_NEED_YOUR_HELP, + /* 0x4 */ EVENT_ANGER, + /* 0x5 */ EVENT_CONVERSATION_WITH_BOU, + /* 0x6 */ EVENT_CONFIDENTIAL_CONVERSATION, + /* 0x7 */ EVENT_FIND_WOLF, + /* 0x8 */ EVENT_FIND_WOLF_VER2, +}; + /* 80A1A568-80A1A570 000020 0008+00 1/1 0/0 0/0 .data l_bmdData */ static int l_bmdData[1][2] = { {BMDR_JAGAR, 1}, @@ -114,60 +190,101 @@ static s8* l_loadResPtrnList[4] = { /* 80A1A5EC-80A1A704 0000A4 0118+00 0/1 0/0 0/0 .data l_faceMotionAnmData */ static daNpcT_faceMotionAnmData_c l_faceMotionAnmData[10] = { - {-1, 0, 0, 19, 2, 1, 1}, - {6, 0, 1, 20, 0, 1, 0}, - {6, 0, 2, 19, 2, 1, 1}, - {4, 0, 4, 9, 0, 4, 0}, - {7, 0, 3, 20, 0, 3, 0}, - {5, 2, 4, 10, 2, 4, 0}, - {-1, 0, 0, -1, 0, 0, 0}, - {7, 2, 1, 21, 2, 1, 0}, - {5, 0, 3, 18, 0, 3, 0}, - {6, 2, 3, 19, 2, 3, 0}, + {-1, J3DFrameCtrl::EMode_NONE, 0, + BTP_JAGA, J3DFrameCtrl::EMode_LOOP, Jagar, 1}, + {BCK_JAGA_F_TALK_A, J3DFrameCtrl::EMode_NONE, Jagar, + BTP_JAGA_F_TALK_A, J3DFrameCtrl::EMode_NONE, Jagar, 0}, + {BCK_JAGA_F_SMILETALK, J3DFrameCtrl::EMode_NONE, Jagar1, + BTP_JAGA, J3DFrameCtrl::EMode_LOOP, Jagar, 1}, + {BCK_JAGA_F_TALK_B, J3DFrameCtrl::EMode_NONE, Jagar3, + BTP_JAGA_F_TALK_B, J3DFrameCtrl::EMode_NONE, Jagar3, 0}, + {BCK_JAGA_F_WORRY_TALK, J3DFrameCtrl::EMode_NONE, Jagar2, + BTP_JAGA_F_WORRY_TALK, J3DFrameCtrl::EMode_NONE, Jagar2, 0}, + {BCK_JAGA_FH_TALK_B, J3DFrameCtrl::EMode_LOOP, Jagar3, + BTP_JAGA_FH_TALK_B, J3DFrameCtrl::EMode_LOOP, Jagar3, 0}, + {-1, J3DFrameCtrl::EMode_NONE, 0, + -1, J3DFrameCtrl::EMode_NONE, 0, 0}, + {BCK_JAGA_FH_TALK_A, J3DFrameCtrl::EMode_LOOP, Jagar, + BTP_JAGA_FH_TALK_A, J3DFrameCtrl::EMode_LOOP, Jagar, 0}, + {BCK_JAGA_F_SURPRISE, J3DFrameCtrl::EMode_NONE, Jagar2, + BTP_JAGA_F_SURPRISE, J3DFrameCtrl::EMode_NONE, Jagar2, 0}, + {BCK_JAGA_F_SURPRISE_WAIT, J3DFrameCtrl::EMode_LOOP, Jagar2, + BTP_JAGA_F_SURPRISE_WAIT, J3DFrameCtrl::EMode_LOOP, Jagar2, 0}, }; /* 80A1A704-80A1A8FC 0001BC 01F8+00 0/1 0/0 0/0 .data l_motionAnmData */ daNpcT_motionAnmData_c l_motionAnmData[18] = { - {10, 2, 1, 16, 0, 1, 1, 0}, - {4, 2, 2, 16, 0, 1, 1, 0}, - {7, 2, 2, 16, 0, 1, 1, 0}, - {10, 2, 2, 16, 0, 1, 1, 0}, - {8, 0, 2, 16, 0, 1, 1, 0}, - {9, 0, 2, 16, 0, 1, 1, 0}, - {5, 0, 2, 16, 0, 1, 1, 0}, - {11, 0, 2, 16, 0, 1, 1, 0}, - {6, 0, 4, 16, 0, 1, 1, 0}, - {9, 0, 1, 16, 0, 1, 1, 0}, - {8, 0, 1, 16, 0, 1, 1, 0}, - {8, 2, 3, 16, 0, 1, 1, 0}, - {13, 2, 3, 16, 0, 1, 1, 0}, - {12, 0, 3, 16, 0, 1, 1, 0}, - {14, 2, 3, 16, 0, 1, 1, 0}, - {9, 0, 3, 16, 0, 1, 1, 0}, - {11, 0, 3, 16, 0, 1, 1, 0}, - {10, 2, 3, 16, 0, 1, 1, 0}, + {BCK_JAGAR_WAIT_A, J3DFrameCtrl::EMode_LOOP, Jagar, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_CHU, J3DFrameCtrl::EMode_LOOP, Jagar1, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_SIT, J3DFrameCtrl::EMode_LOOP, Jagar1, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_WAIT_B, J3DFrameCtrl::EMode_LOOP, Jagar1, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_SIT_TO_WAIT, J3DFrameCtrl::EMode_NONE, Jagar1, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_TO_CHU, J3DFrameCtrl::EMode_NONE, Jagar1, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_CHU_TO_SIT, J3DFrameCtrl::EMode_NONE, Jagar1, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_WAIT_TO_SIT, J3DFrameCtrl::EMode_NONE, Jagar1, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_TALK_A, J3DFrameCtrl::EMode_NONE, Jagar3, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_TALK_B, J3DFrameCtrl::EMode_NONE, Jagar, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_STEP, J3DFrameCtrl::EMode_NONE, Jagar, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_RUN_A, J3DFrameCtrl::EMode_LOOP, Jagar2, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_WORRY_WAIT, J3DFrameCtrl::EMode_LOOP, Jagar2, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_WORRY_TALK, J3DFrameCtrl::EMode_NONE, Jagar2, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_WORRY_WALK, J3DFrameCtrl::EMode_LOOP, Jagar2, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_SURPRISE, J3DFrameCtrl::EMode_NONE, Jagar2, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_UNADUKI, J3DFrameCtrl::EMode_NONE, Jagar2, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, + {BCK_JAGA_SURPRISE_WAIT, J3DFrameCtrl::EMode_LOOP, Jagar2, + BTK_JAGA, J3DFrameCtrl::EMode_NONE, Jagar, 1, 0}, }; /* 80A1A8FC-80A1A98C 0003B4 0090+00 0/1 0/0 0/0 .data l_faceMotionSequenceData */ static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_faceMotionSequenceData[36] = { - {1, -1, 1}, {7, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {8, -1, 1}, {9, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {2, -1, 1}, {6, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {3, -1, 1}, {5, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {4, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {7, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {6, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {1, -1, 1}, {7, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {8, -1, 1}, {9, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {2, -1, 1}, {6, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {3, -1, 1}, {5, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {4, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {7, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {6, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; /* 80A1A98C-80A1AABC 000444 0130+00 0/1 0/0 0/0 .data l_motionSequenceData */ static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[76] = { - {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {8, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {9, -1, 1}, {3, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {12, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {13, -1, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {15, -1, 1}, {17, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {16, -1, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {17, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {4, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {5, -1, 1}, {1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {6, -1, 1}, {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {7, -1, 1}, {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {10, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {11, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {14, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {8, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {9, -1, 1}, {3, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {12, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {13, -1, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {15, -1, 1}, {17, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {16, -1, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {17, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {4, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {5, -1, 1}, {1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {6, -1, 1}, {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {7, -1, 1}, {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {10, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {11, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {14, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {13, -1, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; @@ -219,6 +336,7 @@ int daNpc_Jagar_c::create() { (const daNpcT_motionAnmData_c *)l_motionAnmData, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *) l_faceMotionSequenceData, 4, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *)l_motionSequenceData, 4, (const daNpcT_evtData_c *)l_evtList, (char **)l_resNameList ); + mType = getType(); mFlowNodeNo = getFlowNodeNo(); mTwilight = 0; @@ -227,9 +345,11 @@ int daNpc_Jagar_c::create() { if (isDelete()) { return cPhs_ERROR_e; } + if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize[mType])) { return cPhs_ERROR_e; } + J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); @@ -250,6 +370,7 @@ int daNpc_Jagar_c::create() { setEnvTevColor(); setRoomNo(); } + mCreating = 1; Execute(); mCreating = 0; @@ -264,25 +385,26 @@ int daNpc_Jagar_c::CreateHeap() { if (modelData == NULL) { return 0; } - mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound, - 0x80000, 0x11020284); + mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound, 0x80000, 0x11020284); if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) { return 0; } + J3DModel* model = mpMorf[0]->getModel(); for (u16 i = 0; i < modelData->getJointNum(); i++) { modelData->getJointNodePointer(i)->setCallBack(ctrlJointCallBack); } model->setUserArea((u32)this); + mpMatAnm[0] = new daNpcT_MatAnm_c(); if (mpMatAnm[0] == NULL) { return 0; } - if (setFaceMotionAnm(1, false) && setMotionAnm(0, 0.0f, 0)) - { + if (setFaceMotionAnm(1, false) && setMotionAnm(0, 0.0f, 0)) { return 1; } + return 0; } @@ -329,10 +451,13 @@ u8 daNpc_Jagar_c::getType() { switch ((u8)fopAcM_GetParam(this)) { case 0: return TYPE_0; + case 1: return TYPE_1; + case 2: return TYPE_2; + default: return TYPE_3; } @@ -343,18 +468,22 @@ int daNpc_Jagar_c::isDelete() { switch (mType) { case TYPE_0: return FALSE; + case TYPE_1: { bool rv = true; - if (!daNpcT_chkEvtBit(0xd3) && !dComIfGs_isCollectShield(0)) { + if (!daNpcT_chkEvtBit(0xD3) /* dSv_event_flag_c::F_0211 - Ordon Village - Successfully eavesdrop on Bo and Jaggle */ + && !dComIfGs_isCollectShield(0)) { rv = false; } return rv; } + // fallthrough case TYPE_2: return FALSE; + default: return FALSE; - } + } } /* 80A15198-80A15364 000B78 01CC+00 1/1 0/0 0/0 .text reset__13daNpc_Jagar_cFv */ @@ -375,17 +504,18 @@ void daNpc_Jagar_c::reset() { acStack_20.y = home.angle.y; switch (mType) { case TYPE_0: - if (daNpcT_chkEvtBit(0x1c) != 0) { - if (daNpcT_chkEvtBit(0x86) == 0) { + if (daNpcT_chkEvtBit(0x1C) /* dSv_event_flag_c::F_0023 - Ordon Village - Called by Jaggle from below hill */) { + if (!daNpcT_chkEvtBit(0x86) /* dSv_event_flag_c::F_0036 - Ordon Village - Spoke to Jaggle using L-focus before climbing vines? */) { daNpcT_onEvtBit(0x86); } field_0x1001 = 1; } + // fallthrough case TYPE_1: case TYPE_2: default: - daNpcT_offTmpBit(0x1b); - daNpcT_offTmpBit(0x10); + daNpcT_offTmpBit(0x1B); // dSv_event_tmp_flag_c::T_0027 - Ordon Village - Rampaging goats complete + daNpcT_offTmpBit(0x10); // dSv_event_tmp_flag_c::T_0015 - Ordon Village - Link came up the hill afte being called by Jaggle setAngle(acStack_20); } } @@ -410,6 +540,7 @@ void daNpc_Jagar_c::setParam() { s16 sVar9 = daNpc_Jagar_Param_c::m.field_0x4a; s16 sVar8 = daNpc_Jagar_Param_c::m.field_0x4c; s16 sVar7 = daNpc_Jagar_Param_c::m.field_0x4e; + switch (mType) { case TYPE_0: sVar10 = 4; @@ -417,6 +548,7 @@ void daNpc_Jagar_c::setParam() { sVar8 = 5; sVar7 = 6; break; + case TYPE_1: field_0xff0 = 3; field_0xff4 = 6; @@ -425,6 +557,7 @@ void daNpc_Jagar_c::setParam() { sVar8 = 19; sVar7 = 6; break; + case TYPE_2: sVar10 = 3; sVar9 = 6; @@ -432,9 +565,11 @@ void daNpc_Jagar_c::setParam() { sVar7 = 6; break; } - attention_info.distances[0] = daNpcT_getDistTableIdx(sVar8, sVar7); - attention_info.distances[1] = attention_info.distances[0]; - attention_info.distances[3] = daNpcT_getDistTableIdx(sVar10, sVar9); + + attention_info.distances[fopAc_attn_LOCK_e] = daNpcT_getDistTableIdx(sVar8, sVar7); + attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; + attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(sVar10, sVar9); + if (mType == TYPE_1) { uVar7 |= (0x80 << 16); field_0xfec = getActorDistance(daPy_getPlayerActorClass(), @@ -443,14 +578,13 @@ void daNpc_Jagar_c::setParam() { if (field_0xfec < 4) { g_meter2_info.mBlinkButton |= 1; } - } else { - if (chkChuMotion() != 0) { - attention_info.distances[0] = 20; - attention_info.distances[1] = 20; - attention_info.distances[3] = 20; - uVar7 = 2; - } + } else if (chkChuMotion() != 0) { + attention_info.distances[fopAc_attn_LOCK_e] = 20; + attention_info.distances[fopAc_attn_TALK_e] = 20; + attention_info.distances[fopAc_attn_SPEAK_e] = 20; + uVar7 = 2; } + attention_info.flags = uVar7; scale.set(daNpc_Jagar_Param_c::m.field_0x08, daNpc_Jagar_Param_c::m.field_0x08, daNpc_Jagar_Param_c::m.field_0x08); @@ -472,25 +606,30 @@ int daNpc_Jagar_c::checkChangeEvt() { mPreItemNo = 0; if (dComIfGp_event_chkTalkXY()) { if (dComIfGp_evmng_ChkPresentEnd()) { - mEvtNo = 1; + mEvtNo = EVENT_NO_RESPONSE; evtChange(); } return true; } + switch (mType) { case TYPE_0: - if (daNpcT_chkEvtBit(0x1c) && chkChuMotion()) { - mEvtNo = 2; + if (daNpcT_chkEvtBit(0x1C) /* dSv_event_flag_c::F_0023 - Ordon Village - Called by Jaggle from below hill */ + && chkChuMotion()) { + mEvtNo = EVENT_CLIMBUP; evtChange(); return true; } break; + case TYPE_1: if (field_0xfec < 4) { - mEvtNo = 6; + mEvtNo = EVENT_CONFIDENTIAL_CONVERSATION; evtChange(); return true; } + break; + case TYPE_2: break; } @@ -502,18 +641,22 @@ int daNpc_Jagar_c::checkChangeEvt() { void daNpc_Jagar_c::setAfterTalkMotion() { int iVar2 = 8; switch(mFaceMotionSeqMngr.getNo()) { - case 0: + case FACE_TALK_A: iVar2 = 6; break; - case 1: + + case FACE_SURPRISE: break; - case 2: + + case FACE_SMILETALK: iVar2 = 7; break; - case 3: + + case FACE_TALK_B: iVar2 = 5; break; } + mFaceMotionSeqMngr.setNo(iVar2, -1.0f, 0, 0); } @@ -529,6 +672,7 @@ void daNpc_Jagar_c::srchActors() { mActorMngr[0].entry(getNearestActorP(0x10d)); } break; + case TYPE_1: if (!mActorMngr[1].getActorP()) { mActorMngr[1].entry(getNearestActorP(0x15a)); @@ -537,6 +681,8 @@ void daNpc_Jagar_c::srchActors() { if (!mActorMngr[2].getActorP()) { mActorMngr[2].entry(getNearestActorP(0x246)); } + break; + case TYPE_2: break; } @@ -557,7 +703,7 @@ BOOL daNpc_Jagar_c::evtCutProc() { int staffId = dComIfGp_getEventManager().getMyStaffId("Jagar", this, -1); if (staffId != -1) { mStaffId = staffId; - int actIdx = dComIfGp_getEventManager().getMyActIdx(mStaffId, (char**)mCutNameList, 7, 0, 0); + int actIdx = dComIfGp_getEventManager().getMyActIdx(mStaffId, mCutNameList, 7, 0, 0); if ((this->*(mCutList[actIdx]))(mStaffId) != 0) { dComIfGp_getEventManager().cutEnd(mStaffId); } @@ -575,7 +721,7 @@ void daNpc_Jagar_c::action() { if (bo && bo->getType() == TYPE_1) { if (bo->mStagger.checkStagger() ? 0 : 1) { bo->mFaceMotionSeqMngr.setNo(1, -1, 0, 0); - bo->mMotionSeqMngr.setNo(3, -1, 0, 0); + bo->mMotionSeqMngr.setNo(MOT_SIT, -1, 0, 0); field_0xff8 = 0; field_0x1000 = 1; } @@ -608,8 +754,9 @@ void daNpc_Jagar_c::action() { if (uVar4) { switch ((int)uVar4->getId()) { case 2: - mEvtNo = 5; + mEvtNo = EVENT_CONVERSATION_WITH_BOU; break; + default: break; } @@ -656,6 +803,7 @@ void daNpc_Jagar_c::setAttnPos() { if (field_0x1004 == 2) { cStack_3c.set(0.0f, 100.0f, -60.0f); } + mDoMtx_stack_c::YrotS(mCurAngle.y); mDoMtx_stack_c::multVec(&cStack_3c, &cStack_3c); attention_info.position = current.pos + cStack_3c; @@ -675,12 +823,11 @@ void daNpc_Jagar_c::setCollision() { if (mTwilight) { tgType = 0; tgSPrm = 0; - } else { - if (mStagger.checkStagger()) { - tgType = 0; - tgSPrm = 0; - } + } else if (mStagger.checkStagger()) { + tgType = 0; + tgSPrm = 0; } + mCyl1.SetCoSPrm(0x79); mCyl1.SetTgType(tgType); mCyl1.SetTgSPrm(tgSPrm); @@ -692,6 +839,7 @@ void daNpc_Jagar_c::setCollision() { cylHeight = 70.0f; cylRadius = 90.0f; } + mDoMtx_stack_c::YrotS(mCurAngle.y); mDoMtx_stack_c::multVec(&cStack_48, &cStack_48); cStack_48 += current.pos; @@ -700,6 +848,7 @@ void daNpc_Jagar_c::setCollision() { mCyl1.SetC(cStack_48); dComIfG_Ccsp()->Set(&mCyl1); } + mCyl1.ClrCoHit(); mCyl1.ClrTgHit(); } @@ -725,6 +874,7 @@ int daNpc_Jagar_c::selectAction() { case TYPE_1: field_0xfd4 = &daNpc_Jagar_c::talkwithBou; break; + default: field_0xfd4 = &daNpc_Jagar_c::wait; break; @@ -732,56 +882,59 @@ int daNpc_Jagar_c::selectAction() { return 1; } -/* 80A162B0-80A162DC 001C90 002C+00 2/2 0/0 0/0 .text - * chkAction__13daNpc_Jagar_cFM13daNpc_Jagar_cFPCvPvPv_i */ +/* 80A162B0-80A162DC 001C90 002C+00 2/2 0/0 0/0 .text chkAction__13daNpc_Jagar_cFM13daNpc_Jagar_cFPCvPvPv_i */ int daNpc_Jagar_c::chkAction(int (daNpc_Jagar_c::*action)(void*)) { return field_0xfe0 == action; } -/* 80A162DC-80A16384 001CBC 00A8+00 2/2 0/0 0/0 .text - * setAction__13daNpc_Jagar_cFM13daNpc_Jagar_cFPCvPvPv_i */ +/* 80A162DC-80A16384 001CBC 00A8+00 2/2 0/0 0/0 .text setAction__13daNpc_Jagar_cFM13daNpc_Jagar_cFPCvPvPv_i */ int daNpc_Jagar_c::setAction(int (daNpc_Jagar_c::*action)(void*)) { mMode = 3; if (field_0xfe0 != NULL) { (this->*field_0xfe0)(NULL); } + mMode = 0; field_0xfe0 = action; if (field_0xfe0 != NULL) { (this->*field_0xfe0)(NULL); } + return 1; } /* 80A16384-80A16544 001D64 01C0+00 1/0 0/0 0/0 .text cutClimbUp__13daNpc_Jagar_cFi */ -int daNpc_Jagar_c::cutClimbUp(int param_0) { +int daNpc_Jagar_c::cutClimbUp(int i_cutIndex) { int rv = 0; - int iVar4 = -1; - int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + int prm = -1; + int* piVar1 = dComIfGp_evmng_getMyIntegerP(i_cutIndex, "prm"); if (piVar1) { - iVar4 = *piVar1; + prm = *piVar1; } - if (dComIfGp_getEventManager().getIsAddvance(param_0)) { - switch (iVar4) { + if (dComIfGp_getEventManager().getIsAddvance(i_cutIndex)) { + switch (prm) { case 0: - mFaceMotionSeqMngr.setNo(8, 0.0f, 0, 0); - mMotionSeqMngr.setNo(2, 0.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, 0.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_CHU, 0.0f, 0, 0); mJntAnm.lookNone(1); field_0x1003 = 1; setAngle(home.angle.y); initTalk(mFlowNodeNo, NULL); break; + case 2: break; } } - switch (iVar4) { + + switch (prm) { case 0: if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { rv = 1; } break; + case 2: rv = 1; break; @@ -790,37 +943,43 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { } /* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi */ -int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { +int daNpc_Jagar_c::cutNeedYourHelp(int i_cutIndex) { int rv = 0; - int iVar12 = -1; - int local_30 = 0; - int local_34 = 0; - int local_38 = 0; + int prm = -1; + int msgNo = 0; + int msgNo2 = 0; + int send = 0; fopAc_ac_c* actor_p; - int* piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "prm"); + int* piVar5 = dComIfGp_evmng_getMyIntegerP(i_cutIndex, "prm"); if (piVar5) { - iVar12 = *piVar5; + prm = *piVar5; } - piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "msgNo"); + + piVar5 = dComIfGp_evmng_getMyIntegerP(i_cutIndex, "msgNo"); if (piVar5) { - local_30 = *piVar5; + msgNo = *piVar5; } - piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "msgNo2"); + + piVar5 = dComIfGp_evmng_getMyIntegerP(i_cutIndex, "msgNo2"); if (piVar5) { - local_34 = *piVar5; + msgNo2 = *piVar5; } - piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "send"); + + piVar5 = dComIfGp_evmng_getMyIntegerP(i_cutIndex, "send"); if (piVar5) { - local_38 = *piVar5; + send = *piVar5; } - if (dComIfGp_getEventManager().getIsAddvance(param_1)) { - switch(iVar12) { + + if (dComIfGp_getEventManager().getIsAddvance(i_cutIndex)) { + switch(prm) { case 0: dComIfGp_getEvent().setPt2(mActorMngr[0].getActorP()); break; + case 1: initTalk(mFlowNodeNo, NULL); break; + case 7: { fopAc_ac_c* iVar6 = mActorMngr[1].getActorP(); if (iVar6) { @@ -828,44 +987,49 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { } break; } + case 8: field_0x1002 = 0; field_0x1003 = 0; } - } + } + int local_2c[3] = {-1, -1, -1}; - switch (iVar12) { + switch (prm) { case 0: mJntAnm.lookNone(0); - if (mMotionSeqMngr.getNo() == 10) { + if (mMotionSeqMngr.getNo() == MOT_SIT_TO_WAIT) { if (mMotionSeqMngr.getStepNo() <= 0) { break; } - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, 0, 0); rv = 1; break; } - if (!mMotionSeqMngr.getNo()) { + if (mMotionSeqMngr.getNo() == MOT_WAIT_A) { rv = 1; break; } break; + case 1: mJntAnm.lookPlayer(0); if (mPlayerAngle == mCurAngle.y) { rv = 1; break; } - step(mPlayerAngle,8,0xe,0xf,0); + + step(mPlayerAngle, 8, 0xe, 0xf, 0); break; + case 2: case 3: case 4: case 5: case 6: case 7: - switch (iVar12) { + switch (prm) { case 3: case 4: case 5: @@ -879,6 +1043,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { mJntAnm.lookPos(&field_0xd6c, 0); } break; + case 7: { fopAc_ac_c* actor_p = mActorMngr[1].getActorP(); if (actor_p) { @@ -891,13 +1056,15 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { } break; } + default: mJntAnm.lookPlayer(0); } - local_2c[0] = local_30; - local_2c[1] = local_34; - if (talkProc(local_2c, local_38, NULL, 0)) { - if (!local_30 && !local_34) { + + local_2c[0] = msgNo; + local_2c[1] = msgNo2; + if (talkProc(local_2c, send, NULL, 0)) { + if (!msgNo && !msgNo2) { if (mFlow.checkEndFlow() == 1) { rv = 1; } @@ -905,7 +1072,8 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { rv = 1; } } - if (iVar12 == 4) { + + if (prm == 4) { rv = 1; } break; @@ -918,34 +1086,39 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { } /* 80A16CD8-80A16EFC 0026B8 0224+00 1/0 0/0 0/0 .text cutAnger__13daNpc_Jagar_cFi */ -int daNpc_Jagar_c::cutAnger(int param_0) { +int daNpc_Jagar_c::cutAnger(int i_cutIndex) { int rv = 0; - int local_b4 = -1; + int prm = -1; s16 sVar3; - int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + int* piVar1 = dComIfGp_evmng_getMyIntegerP(i_cutIndex, "prm"); if (piVar1 != NULL) { - local_b4 = *piVar1; + prm = *piVar1; } - if (dComIfGp_getEventManager().getIsAddvance(param_0)) { - switch (local_b4) { + + if (dComIfGp_getEventManager().getIsAddvance(i_cutIndex)) { + switch (prm) { case 0: - mFaceMotionSeqMngr.setNo(8, 0.0f, 0, 0); - mMotionSeqMngr.setNo(0, 0.0, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, 0.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, 0.0, 0, 0); field_0x1003 = 0; sVar3 = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)); setAngle(sVar3); initTalk(mFlowNodeNo, NULL); + break; + case 1: break; } } - switch (local_b4) { + + switch (prm) { case 0: mJntAnm.lookPlayer(0); if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow() == 1) { rv = 1; } break; + case 1: mJntAnm.lookNone(0); if (home.angle.y == mCurAngle.y) { @@ -954,83 +1127,95 @@ int daNpc_Jagar_c::cutAnger(int param_0) { step(home.angle.y, 8, 14, 15, 0); } break; + default: break; } + return rv; } /* 80A16EFC-80A1705C 0028DC 0160+00 1/0 0/0 0/0 .text cutConversationWithBou__13daNpc_Jagar_cFi */ -int daNpc_Jagar_c::cutConversationWithBou(int param_0) { +int daNpc_Jagar_c::cutConversationWithBou(int i_cutIndex) { daTag_Push_c* this_00 = (daTag_Push_c*)field_0xba0.getActorP(); int rv = 0; - int iVar5 = -1; - int* piVar2 = (int*)dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + int prm = -1; + int* piVar2 = (int*)dComIfGp_evmng_getMyIntegerP(i_cutIndex, "prm"); if (piVar2) { - iVar5 = *piVar2; + prm = *piVar2; } - fopAc_ac_c* actors[2] = {(fopAc_ac_c *) this, mActorMngr[2].getActorP()}; - dComIfGp_setMesgCameraInfoActor(actors[0], actors[1], 0, 0, 0, 0, 0, 0, 0, 0); - if (dComIfGp_getEventManager().getIsAddvance(param_0)) { - switch (iVar5) { + + fopAc_ac_c* speakers[2] = {(fopAc_ac_c *) this, mActorMngr[2].getActorP()}; + dComIfGp_setMesgCameraInfoActor(speakers[0], speakers[1], 0, 0, 0, 0, 0, 0, 0, 0); + if (dComIfGp_getEventManager().getIsAddvance(i_cutIndex)) { + switch (prm) { case 0: - initTalk(this_00->getFlowNodeNo(), &actors[0]); + initTalk(this_00->getFlowNodeNo(), &speakers[0]); + break; } } - switch (iVar5) { + + switch (prm) { case 0: - iVar5 = talkProc(NULL, 0, &actors[0], 0); - if (iVar5 && mFlow.checkEndFlow() == 1) { + if (talkProc(NULL, 0, &speakers[0], 0) && mFlow.checkEndFlow() == 1) { rv = 1; } + break; } + return rv; } -/* 80A1705C-80A173D8 002A3C 037C+00 1/0 0/0 0/0 .text - * cutConfidentialConversation__13daNpc_Jagar_cFi */ -int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { +/* 80A1705C-80A173D8 002A3C 037C+00 1/0 0/0 0/0 .text cutConfidentialConversation__13daNpc_Jagar_cFi */ +int daNpc_Jagar_c::cutConfidentialConversation(int i_cutIndex) { int rv = 0; - int iVar8 = -1; - int iVar7 = 0; - int* piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + int prm = -1; + int msgNo = 0; + int* piVar2 = dComIfGp_evmng_getMyIntegerP(i_cutIndex, "prm"); if(piVar2) { - iVar8 = *piVar2; + prm = *piVar2; } - piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); + + piVar2 = dComIfGp_evmng_getMyIntegerP(i_cutIndex, "msgNo"); if(piVar2) { - iVar7 = *piVar2; + msgNo = *piVar2; } + fopAc_ac_c* actors[2] = {(fopAc_ac_c *) this, mActorMngr[2].getActorP()}; dComIfGp_setMesgCameraInfoActor(actors[0], actors[1], 0, 0, 0, 0, 0, 0, 0, 0); - if (dComIfGp_getEventManager().getIsAddvance(param_0)) { - switch (iVar8) { + if (dComIfGp_getEventManager().getIsAddvance(i_cutIndex)) { + switch (prm) { case 0: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(5, -1.0f, 0, 0); - initTalk(0xd7, &actors[0]); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WORRY_WAIT, -1.0f, 0, 0); + initTalk(0xD7, &actors[0]); break; + case 1: dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); + break; + case 2: break; } } + int local_30[3] = {-1, -1, -1}; - switch (iVar8) { + switch (prm) { case 0: case 1: case 2: case 3: { - if (iVar8 == 0 || iVar8 == 2) { + if (prm == 0 || prm == 2) { mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); - } else if (iVar8 == 1) { + } else if (prm == 1) { fopAc_ac_c* pfVar3 = mActorMngr[1].getActorP(); mJntAnm.lookActor(pfVar3, 0.0f, 0); } - local_30[0] = iVar7; + + local_30[0] = msgNo; if (talkProc(&local_30[0], 0, &actors[0], 0)) { - if (iVar7 == 0) { + if (msgNo == 0) { if (mFlow.checkEndFlow()) { rv = 1; } @@ -1042,42 +1227,47 @@ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { } case 4: - mEvtNo = 7; + mEvtNo = EVENT_FIND_WOLF; evtChange(); break; } + return rv; } /* 80A173D8-80A17898 002DB8 04C0+00 3/0 0/0 0/0 .text cutFindWolf__13daNpc_Jagar_cFi */ -int daNpc_Jagar_c::cutFindWolf(int param_0) { +int daNpc_Jagar_c::cutFindWolf(int i_cutIndex) { int rv = 0; - int uVar6 = -1; - int iVar4 = 0; - int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + int prm = -1; + int timer = 0; + + int* piVar1 = dComIfGp_evmng_getMyIntegerP(i_cutIndex, "prm"); if (piVar1 != NULL) { - uVar6 = *piVar1; - } - int* puVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "timer"); - if (puVar2 != NULL) { - iVar4 = *puVar2; + prm = *piVar1; } - if (dComIfGp_getEventManager().getIsAddvance(param_0)) { - switch (uVar6) { + int* piVar2 = dComIfGp_evmng_getMyIntegerP(i_cutIndex, "timer"); + if (piVar2 != NULL) { + timer = *piVar2; + } + + if (dComIfGp_getEventManager().getIsAddvance(i_cutIndex)) { + switch (prm) { case 0: - mFaceMotionSeqMngr.setNo(1, -1.0f, 0, 0); - mMotionSeqMngr.setNo(7, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_SURPRISE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_SURPRISE, -1.0f, 0, 0); mSound.startCreatureVoice(Z2SE_JAGA_V_SURPRISE, -1); mPlayerAngle = fopAcM_searchActorAngleY(this, daPy_getPlayerActorClass()); if (checkStep()) { mStepMode = 0; } + dComIfGp_getVibration().StartShock(9, 15, cXyz(0.0f, 1.0f, 0.0f)); break; + case 2: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(15, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_RUN_A, -1.0f, 0, 0); current.angle.y = home.angle.y; if ((s16)(mPlayerAngle - home.angle.y) > 0) { current.angle.y = current.angle.y + -0x4000; @@ -1085,11 +1275,13 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { current.angle.y = current.angle.y + 0x4000; } - mEventTimer = iVar4; + + mEventTimer = timer; break; + case 3: - mFaceMotionSeqMngr.setNo(8, 0.0f, 0, 0); - mMotionSeqMngr.setNo(5, 0.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, 0.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WORRY_WAIT, 0.0f, 0, 0); setPos(home.pos); setAngle(home.angle.y); speedF = 0; @@ -1097,9 +1289,11 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { mAcch.ClrWallNone(); mHide = 1; break; + case 11: - mEventTimer = iVar4; + mEventTimer = timer; break; + case 4: case 5: case 6: @@ -1110,7 +1304,8 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { break; } } - switch (uVar6) { + + switch (prm) { case 0: mJntAnm.lookPlayer(0); if (mPlayerAngle == mCurAngle.y) { @@ -1119,10 +1314,12 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { step(mPlayerAngle, -1, -1, 15, 0); } break; + case 1: mJntAnm.lookPlayer(0); rv = 1; break; + case 2: mJntAnm.lookPlayer(0); cLib_chaseS(&shape_angle.y, current.angle.y, 0x800); @@ -1134,73 +1331,82 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { rv = 1; } break; + case 3: mJntAnm.lookNone(0); rv = 1; break; + case 10: if (mMotionSeqMngr.getStepNo() > 0) { rv = 1; } break; + case 11: if (cLib_calcTimer(&mEventTimer) == 0) { rv = 1; } + break; } + return rv; } /* 80A17898-80A17924 003278 008C+00 1/1 0/0 0/0 .text chkSitMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkSitMotion() { - if ((daNpcT_chkEvtBit(0x235) != 0)) { + if (daNpcT_chkEvtBit(0x235) /* dSv_event_flag_c::F_0565 - N/A - 2nd Day Complete */) { if (field_0x1002) { return 0; } - } else if (daNpcT_chkEvtBit(0x1c) != 0) { - if (daNpcT_chkEvtBit(0x87) != 0) { + } else if (daNpcT_chkEvtBit(0x1C) /* dSv_event_flag_c::F_0023 - Ordon Village - Called by Jaggle from below hill */) { + if (daNpcT_chkEvtBit(0x87) /* dSv_event_flag_c::F_0037 - Ordon Village - Jaggle - Spoke on the hill? */) { return 0; } else if (field_0x1002) { return 0; } } + return 1; } /* 80A17924-80A17984 003304 0060+00 1/1 0/0 0/0 .text chkSitMotion2__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkSitMotion2() { - if (daNpcT_chkEvtBit(0x235) != 0) { - if (daNpcT_chkEvtBit(0x224) != 0) { - return 1; - } - } else { - if (daNpcT_chkEvtBit(0x8a) != 0) { + if (daNpcT_chkEvtBit(0x235) /* dSv_event_flag_c::F_0565 - N/A - 2nd Day Complete */) { + if (daNpcT_chkEvtBit(0x224) /* dSv_event_flag_c::F_0548 - Ordon Village - Opening 3rd day - spoke with Jaggle */) { return 1; } + } else if (daNpcT_chkEvtBit(0x8A) /* dSv_event_flag_c::F_0040 - Ordon Village - 2nd day: Spoke to Jaggle after blowing on whistle */) { + return 1; } + return 0; } /* 80A17984-80A179F8 003364 0074+00 3/3 0/0 0/0 .text chkChuMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkChuMotion() { - if (daNpcT_chkEvtBit(0x235) == 0 && daNpcT_chkEvtBit(0x1c) != 0) { - if (daNpcT_chkEvtBit(0x87) != 0) { - return false; + if (!daNpcT_chkEvtBit(0x235) /* dSv_event_flag_c::F_0565 - N/A - 2nd Day Complete */ + && daNpcT_chkEvtBit(0x1C) /* dSv_event_flag_c::F_0023 - Ordon Village - Called by Jaggle from below hill */) { + if (daNpcT_chkEvtBit(0x87) /* dSv_event_flag_c::F_0037 - Ordon Village - Jaggle - Spoke on the hill? */) { + return 0; } else { return field_0x1001 == 0 ? 1 : 0; } } - return false; + + return 0; } /* 80A179F8-80A17A2C 0033D8 0034+00 1/1 0/0 0/0 .text chkToMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkToMotion() { - return mMotionSeqMngr.getNo() == 10 || mMotionSeqMngr.getNo() == 11 || mMotionSeqMngr.getNo() == 12 || mMotionSeqMngr.getNo() == 13; + return mMotionSeqMngr.getNo() == MOT_SIT_TO_WAIT || mMotionSeqMngr.getNo() == MOT_TO_CHU || + mMotionSeqMngr.getNo() == MOT_CHU_TO_SIT || mMotionSeqMngr.getNo() == MOT_WAIT_TO_SIT; } /* 80A17A2C-80A1856C 00340C 0B40+00 1/0 0/0 0/0 .text wait__13daNpc_Jagar_cFPv */ -int daNpc_Jagar_c::wait(void* param_0) { +int daNpc_Jagar_c::wait(void* param_1) { cXyz cStack_24; + field_0x1004 = 0; if (mType == TYPE_0) { if(chkSitMotion2()) { @@ -1208,7 +1414,7 @@ int daNpc_Jagar_c::wait(void* param_0) { } else if (chkSitMotion()) { if (chkChuMotion()) { field_0x1004 = 1; - }else { + } else { field_0x1004 = 2; } } @@ -1222,81 +1428,94 @@ int daNpc_Jagar_c::wait(void* param_0) { case 0: case 1: if (mCreating) { - switch (field_0x1004) { - case 0: - if (mType == TYPE_2) { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(17, -1.0, 0, 0); - } else { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0, 0, 0); - } - field_0x1003 = 0; - break; - case 1: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(2, -1.0, 0, 0); - field_0x1003 = 1; - break; - case 2: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(3, -1.0, 0, 0); - field_0x1003 = 2; - } - mMode = 2; - - } else { - if (!mStagger.checkStagger()) { - switch (field_0x1004) { - case 0: - switch (field_0x1003) { - case 2: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(10, -1.0, 0, 0); - break; - default: - if (mType == TYPE_2) { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(17, -1.0, 0, 0); - } else { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0, 0, 0); - } - field_0x1003 = 0; - } - break; - case 1: - switch (field_0x1003) { - case 2: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(11, -1.0, 0, 0); - break; - default: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(2, -1.0, 0, 0); - field_0x1003 = 1; - } - break; - case 2: - if (home.angle.y == mCurAngle.y) { - switch (field_0x1003) { - case 0: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(13, -1.0, 0, 0); - break; - case 1: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(12, -1.0, 0, 0); - } - } - } - mMode = 2; + switch (field_0x1004) { + case 0: + if (mType == TYPE_2) { + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_B, -1.0, 0, 0); + } else { + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0, 0, 0); + } + + field_0x1003 = 0; + break; + + case 1: + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_CHU, -1.0, 0, 0); + field_0x1003 = 1; + break; + + case 2: + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_SIT, -1.0, 0, 0); + field_0x1003 = 2; + break; } + + mMode = 2; + } else if (!mStagger.checkStagger()) { + switch (field_0x1004) { + case 0: + switch (field_0x1003) { + case 2: + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_SIT_TO_WAIT, -1.0, 0, 0); + break; + + default: + if (mType == TYPE_2) { + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_B, -1.0, 0, 0); + } else { + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0, 0, 0); + } + + field_0x1003 = 0; + break; + } + break; + + case 1: + switch (field_0x1003) { + case 2: + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_TO_CHU, -1.0, 0, 0); + break; + + default: + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_CHU, -1.0, 0, 0); + field_0x1003 = 1; + break; + } + break; + + case 2: + if (home.angle.y == mCurAngle.y) { + switch (field_0x1003) { + case 0: + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_TO_SIT, -1.0, 0, 0); + break; + + case 1: + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_CHU_TO_SIT, -1.0, 0, 0); + break; + } + } + break; + } + mMode = 2; } + // fallthrough case 2: switch (mType) { case TYPE_0: - daNpcT_offTmpBit(0x10); + daNpcT_offTmpBit(0x10); // dSv_event_tmp_flag_c::T_0015 - Ordon Village - Link came up the hill afte being called by Jaggle cStack_24.set(daNpc_Jagar_Param_c::m.field_0x54, 10.0f, daNpc_Jagar_Param_c::m.field_0x54); if (chkPointInArea(daPy_getPlayerActorClass()->current.pos, current.pos, cStack_24, 0)) { @@ -1305,30 +1524,33 @@ int daNpc_Jagar_c::wait(void* param_0) { field_0x1002 = 1; } } - daNpcT_onTmpBit(0x10); + + daNpcT_onTmpBit(0x10); // dSv_event_tmp_flag_c::T_0015 - Ordon Village - Link came up the hill afte being called by Jaggle } - if (!daNpcT_chkEvtBit(0x235)) { - if (!daNpcT_chkEvtBit(0xae) && daNpcT_chkTmpBit(0x1b)) { - mEvtNo = 4; - } else { - if (chkSitMotion() || field_0x1002 != 0) { - if (!daNpcT_chkEvtBit(0x235) && !daNpcT_chkEvtBit(0x87) && - daNpcT_chkTmpBit(0x10)) { - if (daPy_getPlayerActorClass()->eventInfo.chkCondition(dEvtCnd_CANTALK_e) != 0 ? 1 : 0) { - mEvtNo = 3; - } + + if (!daNpcT_chkEvtBit(0x235) /* dSv_event_flag_c::F_0565 - N/A - 2nd Day Complete */) { + if (!daNpcT_chkEvtBit(0xAE) /* dSv_event_flag_c::F_0075 - Ordon Village - Angered Jaggle by destroying pumpkin */ + && daNpcT_chkTmpBit(0x1B) /* dSv_event_tmp_flag_c::T_0026 - Ordon Village - Destroy pumpkin near Jaggle (Jaggle gets angry) */) { + mEvtNo = EVENT_ANGER; + } else if (chkSitMotion() || field_0x1002 != 0) { + if (!daNpcT_chkEvtBit(0x235) /* dSv_event_flag_c::F_0565 - N/A - 2nd Day Complete */ + && !daNpcT_chkEvtBit(0x87) /* dSv_event_flag_c::F_0037 - Ordon Village - Jaggle - Spoke on the hill? */ + && daNpcT_chkTmpBit(0x10) /* dSv_event_tmp_flag_c::T_0015 - Ordon Village - Link came up the hill afte being called by Jaggle */) { + if (daPy_getPlayerActorClass()->eventInfo.chkCondition(dEvtCnd_CANTALK_e) != 0 ? 1 : 0) { + mEvtNo = EVENT_NEED_YOUR_HELP; } } } } break; + case TYPE_2: if (!mHide) { if (daNpcT_c::chkFindWolf(mCurAngle.y, daNpcT_getDistTableIdx(field_0xff0, field_0xff4), field_0xfec, daNpc_Jagar_Param_c::m.field_0x54, 180.0f, daNpc_Jagar_Param_c::m.field_0x58, daNpc_Jagar_Param_c::m.field_0x5c, 1)) { - mEvtNo = 8; + mEvtNo = EVENT_FIND_WOLF_VER2; } } } @@ -1338,28 +1560,31 @@ int daNpc_Jagar_c::wait(void* param_0) { if (mMotionSeqMngr.getStepNo() > 0) { switch (field_0x1004) { case 0: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, 0, 0); field_0x1003 = 0; break; + case 1: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(2, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_CHU, -1.0f, 0, 0); field_0x1003 = 1; break; + case 2: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(3, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_SIT, -1.0f, 0, 0); field_0x1003 = 2; + break; } - } else { - if (mMotionSeqMngr.getNo() != 11) { - attention_info.flags = 0; - } + } else if (mMotionSeqMngr.getNo() != MOT_TO_CHU) { + attention_info.flags = 0; } + mJntAnm.lookNone(0); break; } + if (field_0x1004 == 2) { mPlayerActorMngr.remove(); } else if (field_0x1004 == 1) { @@ -1368,6 +1593,7 @@ int daNpc_Jagar_c::wait(void* param_0) { if (mPlayerActorMngr.getActorP()) { mJntAnm.lookPlayer(0); + if (!chkActorInSight(mPlayerActorMngr.getActorP(), mAttnFovY, mCurAngle.y)) { mJntAnm.lookNone(0); } @@ -1378,7 +1604,7 @@ int daNpc_Jagar_c::wait(void* param_0) { } if (field_0x1003 == 1) { - if (!daNpcT_chkEvtBit(0x86)) { + if (!daNpcT_chkEvtBit(0x86) /* dSv_event_flag_c::F_0036 - Ordon Village - Spoke to Jaggle using L-focus before climbing vines? */) { daNpcT_onEvtBit(0x86); } field_0x1001 = 1; @@ -1386,11 +1612,12 @@ int daNpc_Jagar_c::wait(void* param_0) { } } else { mJntAnm.lookNone(0); + if (home.angle.y != mCurAngle.y) { if (field_0xe34) { if (step(home.angle.y, 8, 14, 15, 0)) { mMode = 1; - } + } } else { setAngle(home.angle.y); mMode = 1; @@ -1402,26 +1629,29 @@ int daNpc_Jagar_c::wait(void* param_0) { } } break; + case 3: break; } + return 1; } /* 80A1856C-80A18B74 003F4C 0608+00 1/0 0/0 0/0 .text talkwithBou__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::talkwithBou(void* param_0) { daNpc_Bou_c* bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); + switch (mMode) { case 0: case 1: - if (mStagger.checkStagger() == 0) { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(5, -1.0f, 0, 0); + if (!mStagger.checkStagger()) { + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WORRY_WAIT, -1.0f, 0, 0); mMode = 2; } - + // fallthrough case 2: - if (mHide != 0 && daNpcT_chkEvtBit(0xd3) == 0) { + if (mHide != 0 && !daNpcT_chkEvtBit(0xD3) /* dSv_event_flag_c::F_0211 - Ordon Village - Successfully eavesdrop on Bo and Jaggle */) { f32 actor_dist = fopAcM_searchActorDistanceXZ(this, daPy_getPlayerActorClass()); if (daNpc_Jagar_Param_c::m.field_0x9c < actor_dist && field_0xe34 == 0) { if (bo) { @@ -1436,8 +1666,9 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { fopAcM_setCullSizeBox((fopAc_ac_c *)this, -300.0f, -50.0f, -200.0f, 300.0f, 300.0f, 400.0f); } else { if (chkFindWolf() || (bo && bo->chkFindWolf())) { - mEvtNo = 7; + mEvtNo = EVENT_FIND_WOLF; } + if (bo) { if (mListen == 0) { if (cLib_calcTimer(&field_0xff8) == 0) { @@ -1446,23 +1677,26 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { field_0x1000 ^= 1; if ((field_0x1000 & 0x1) == 0) { bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); + f32 zero_f_val = 0.0f; if (0.0f < zero_f_val + (cM_rnd() - 0.5f)) { bo->mMotionSeqMngr.setNo(4, -1.0f, 0, 0); } else { bo->mMotionSeqMngr.setNo(1, -1.0f, 0, 0); } - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(6, -1.0f, 0, 0); + + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WORRY_TALK, -1.0f, 0, 0); } else { bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); bo->mMotionSeqMngr.setNo(2, -1.0f, 0, 0); - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + f32 val = 0.0f; if (0.0f < val + (cM_rnd() - 0.5f)) { - mMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_UNADUKI, -1.0f, 0, 0); } else { - mMotionSeqMngr.setNo(5, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WORRY_WAIT, -1.0f, 0, 0); } } } @@ -1471,6 +1705,7 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { field_0xff8 = 0; } } + fopAcM_setCullSizeBox((fopAc_ac_c *)this,-300.0f,-50.0f,-300.0f,300.0f,450.0f,300.0f); } @@ -1479,7 +1714,6 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { } else { mJntAnm.lookNone(0); } - break; case 3: @@ -1492,35 +1726,39 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { return 1; } -/* REGALLOC ISSUE */ /* 80A18B74-80A18F28 004554 03B4+00 3/0 0/0 0/0 .text talk__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::talk(void* param_0) { switch(mMode) { case 0: case 1: - if (!mStagger.checkStagger()) { - if (mType == TYPE_1) { - daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); - if (bo && bo->getType() == TYPE_1 && ((bo->mStagger.checkStagger()) ? 0 : 1)) { - bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); - if (0.0f < -10.0f + (cM_rnd() - 0.5f)) { - bo->mMotionSeqMngr.setNo(4, -1.0f, 0, 0); - } else { - bo->mMotionSeqMngr.setNo(1, -1.0f, 0, 0); + if (!mStagger.checkStagger()) { + if (mType == TYPE_1) { + daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); + if (bo && bo->getType() == TYPE_1 && ((bo->mStagger.checkStagger()) ? 0 : 1)) { + bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); + + if (0.0f < -10.0f + (cM_rnd() - 0.5f)) { + bo->mMotionSeqMngr.setNo(4, -1.0f, 0, 0); + } else { + bo->mMotionSeqMngr.setNo(1, -1.0f, 0, 0); + } } + + switch (field_0xfec) { + case 4: + initTalk(0xd6, NULL); + break; + + default: + initTalk(0xd5, NULL); + break; + } + } else { + initTalk(mFlowNodeNo, NULL); } - switch (field_0xfec) { - case 4: - initTalk(0xd6, NULL); - break; - default: - initTalk(0xd5, NULL); - } - } else { - initTalk(mFlowNodeNo, NULL); + mMode = 2; } - mMode = 2; - } + // fallthrough case 2: if (!mStagger.checkStagger()) { if (mTwilight != 0 || mPlayerAngle == mCurAngle.y || mType == TYPE_1 || field_0x1003 != 0) { @@ -1534,7 +1772,8 @@ int daNpc_Jagar_c::talk(void* param_0) { mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); } else { mJntAnm.lookPlayer(0); - if (mTwilight != 0 || field_0x1003 == 2) { + + if (mTwilight || field_0x1003 == 2) { mJntAnm.lookNone(0); } } @@ -1544,6 +1783,7 @@ int daNpc_Jagar_c::talk(void* param_0) { } } break; + case 3: default: break; diff --git a/src/d/actor/d_a_npc_ks.cpp b/src/d/actor/d_a_npc_ks.cpp index 0c7c360df85..1c9f8951d82 100644 --- a/src/d/actor/d_a_npc_ks.cpp +++ b/src/d/actor/d_a_npc_ks.cpp @@ -220,13 +220,13 @@ static int daNpc_Ks_Draw(npc_ks_class* npc_ks) { npc_ks->mpModelMorf->entryDL(); if (npc_ks->field_0xc17 != 0) { - g_env_light.setLightTevColorType_MAJI(npc_ks->field_0xc00, &a_this->tevStr); - mDoExt_modelUpdateDL(npc_ks->field_0xc00); + g_env_light.setLightTevColorType_MAJI(npc_ks->mpStickModel, &a_this->tevStr); + mDoExt_modelUpdateDL(npc_ks->mpStickModel); } - if (npc_ks->field_0xbfc != NULL) { - g_env_light.setLightTevColorType_MAJI(npc_ks->field_0xbfc, &a_this->tevStr); - mDoExt_modelUpdateDL(npc_ks->field_0xbfc); + if (npc_ks->mpRoseModel != NULL) { + g_env_light.setLightTevColorType_MAJI(npc_ks->mpRoseModel, &a_this->tevStr); + mDoExt_modelUpdateDL(npc_ks->mpRoseModel); } cXyz sp28; @@ -235,7 +235,7 @@ static int daNpc_Ks_Draw(npc_ks_class* npc_ks) { npc_ks->mObjAcch.GetGroundH(), npc_ks->mObjAcch.m_gnd, &a_this->tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); if (npc_ks->field_0xc17 != 0) { - dComIfGd_addRealShadow(npc_ks->mShadowKey, npc_ks->field_0xc00); + dComIfGd_addRealShadow(npc_ks->mShadowKey, npc_ks->mpStickModel); } return 1; @@ -3052,6 +3052,7 @@ static void demo_camera(npc_ks_class* i_this) { i_this->field_0xb84.y = std::fabsf(i_this->field_0xb6c.y - i_this->field_0xb60.y); i_this->field_0xb84.z = std::fabsf(i_this->field_0xb6c.z - i_this->field_0xb60.z); i_this->field_0xbc4 = 0.0f; + /* dSv_event_flag_c::F_0224 - Faron Woods - Flag for lantern guide monkey cutscene */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0xE0]); // fallthrough case 201: @@ -3208,7 +3209,8 @@ static void demo_camera(npc_ks_class* i_this) { i_this->field_0xb42 = 100; i_this->mMode = 302; anm_init(i_this, 51, 5.0f, 2, 1.0f); - dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0xe1]); + /* dSv_event_flag_c::F_0225 - Faron Woods - Lanter guide monkey doesn't come out a second time */ + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0xE1]); dComIfGs_offSwitch(61, fopAcM_GetRoomNo(a_this)); } break; @@ -3283,6 +3285,7 @@ static void demo_camera(npc_ks_class* i_this) { if (i_this->field_0xb44 == 230) { i_this->field_0xb42 = 100; fpcM_Search(s_fsdown_sub, i_this); + /* dSv_event_flag_c::F_0544 - Faron Woods - Watched cutscene of monkey girl running away after being attacked by puppet */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x220]); } break; @@ -5465,7 +5468,9 @@ static int npc_ks_mori(npc_ks_class* i_this) { switch (i_this->mMode) { case 0: + /* dSv_event_flag_c::F_0225 - Faron Woods - Lanter guide monkey doesn't come out a second time */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[225])) { + /* dSv_event_flag_c::F_0226 - Faron Woods - Get lantern back from monkey */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[226])) { i_this->mMode = 302; i_this->field_0xc17 = 3; @@ -5473,6 +5478,7 @@ static int npc_ks_mori(npc_ks_class* i_this) { } } else { i_this->field_0xaec = 1; + /* dSv_event_flag_c::F_0224 - Faron Woods - Flag for lantern guide monkey cutscene */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[224])) { i_this->mMode = 3; call_pt = 0; @@ -5996,6 +6002,7 @@ static void npc_ks_kago(npc_ks_class* i_this) { cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x5c8, 2, 0x2000); i_this->field_0xaec = 0; + /* dSv_event_flag_c::F_0577 - Ordon Village - 2nd Day - Retrieved basket from monkey (hit hawk) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x241])) { fopAcM_delete(a_this); } @@ -6568,7 +6575,7 @@ static void* s_kago_sub(void* i_actor, void* i_data) { static void kantera_sub(npc_ks_class* i_this) { fopAc_ac_c* a_this = &i_this->actor; MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(14), mDoMtx_stack_c::get()); - i_this->field_0xc00->setBaseTRMtx(mDoMtx_stack_c::get()); + i_this->mpStickModel->setBaseTRMtx(mDoMtx_stack_c::get()); #if VERSION == VERSION_SHIELD_DEBUG #define KANTERA_SUB_BIT 0x80UL @@ -6730,8 +6737,8 @@ static int daNpc_Ks_Execute(npc_ks_class* i_this) { } } - if (i_this->field_0xbfc != NULL) { - i_this->field_0xbfc->setBaseTRMtx(i_this->mpModelMorf->getModel()->getAnmMtx(4)); + if (i_this->mpRoseModel != NULL) { + i_this->mpRoseModel->setBaseTRMtx(i_this->mpModelMorf->getModel()->getAnmMtx(4)); } kantera_sub(i_this); @@ -6856,8 +6863,8 @@ static int daNpc_Ks_Delete(npc_ks_class* i_this) { static int useHeapInit(fopAc_ac_c* a_this) { npc_ks_class* i_this = (npc_ks_class*)a_this; - i_this->mpModelMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes(i_this->mResName, 59), NULL, NULL, - (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mResName, 51), 0, 1.0f, 0, -1, + i_this->mpModelMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes(i_this->mResName, npc_ks_class::BMDR_SARU), NULL, NULL, + (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mResName, npc_ks_class::BCK_SARU_WAIT_A), 0, 1.0f, 0, -1, &i_this->mSound, 0x80000, 0x11020084); if (i_this->mpModelMorf == NULL || i_this->mpModelMorf->getModel() == NULL) { return 0; @@ -6874,7 +6881,7 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 0; } if (i_this->mBtp1->init(i_this->mpModelMorf->getModel()->getModelData(), - (J3DAnmTexPattern*)dComIfG_getObjectRes(i_this->mResName, 64), 1, 0, 1.0f, 0, -1) == 0) { + (J3DAnmTexPattern*)dComIfG_getObjectRes(i_this->mResName, npc_ks_class::BTP_SARU), 1, 0, 1.0f, 0, -1) == 0) { return 0; } @@ -6883,22 +6890,22 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 0; } if (i_this->mBtp2->init(i_this->mpModelMorf->getModel()->getModelData(), - (J3DAnmTexPattern*)dComIfG_getObjectRes(i_this->mResName, 65), 1, 2, 1.0f, 0, -1) == 0) { + (J3DAnmTexPattern*)dComIfG_getObjectRes(i_this->mResName, npc_ks_class::BTP_SARU_RELIEF), 1, 2, 1.0f, 0, -1) == 0) { return 0; } - J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(i_this->mResName, 61); + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(i_this->mResName, npc_ks_class::BMDR_SARU_STICK); JUT_ASSERT(10232, modelData != 0); - i_this->field_0xc00 = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); - if (i_this->field_0xc00 == NULL) { + i_this->mpStickModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->mpStickModel == NULL) { return 0; } if (i_this->mRoomMonkeyID == 0 || i_this->mRoomMonkeyID == 10 || i_this->mRoomMonkeyID == 20 || i_this->mRoomMonkeyID == 21 || i_this->mRoomMonkeyID == 22) { - modelData = (J3DModelData*)dComIfG_getObjectRes(i_this->mResName, 60); + modelData = (J3DModelData*)dComIfG_getObjectRes(i_this->mResName, npc_ks_class::BMDR_SARU_BARA); JUT_ASSERT(10249, modelData != 0); - i_this->field_0xbfc = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); - if (i_this->field_0xbfc == NULL) { + i_this->mpRoseModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->mpRoseModel == NULL) { return 0; } } @@ -7321,7 +7328,11 @@ static int daNpc_Ks_Create(fopAc_ac_c* a_this) { i_this->mRoomMonkeyID = 0; } - if (i_this->mRoomMonkeyID == 20 && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xE1]) && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xE2])) { + if (i_this->mRoomMonkeyID == 20 + /* dSv_event_flag_c::F_0225 - Faron Woods - Lanter guide monkey doesn't come out a second time */ + && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xE1]) + /* dSv_event_flag_c::F_0226 - Faron Woods - Get lantern back from monkey */ + && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xE2])) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_npc_moi.cpp b/src/d/actor/d_a_npc_moi.cpp index aa235df6f08..98074d62728 100644 --- a/src/d/actor/d_a_npc_moi.cpp +++ b/src/d/actor/d_a_npc_moi.cpp @@ -811,6 +811,8 @@ void daNpc_Moi_c::action() { } if (mSph.ChkAtHit() && fopAcM_GetProfName(mSph.GetAtHitAc()) == PROC_ALINK) { + /* dSv_event_tmp_flag_c::T_0047 - Ordon Village - Right after wrestling with Bo + (Used to connect with conversation after wearing clothes) */ daNpcF_onTmpBit(0x47); } } @@ -1108,6 +1110,7 @@ BOOL daNpc_Moi_c::chkPlayerGetWoodShield() { /* 80A766DC-80A76888 00287C 01AC+00 2/2 0/0 0/0 .text setSSlash__11daNpc_Moi_cFi */ void daNpc_Moi_c::setSSlash(int param_1) { mMotionSeqMngr.setNo(43, 0.0f, 1, 0); + /* dSv_event_tmp_flag_c::GUARD_URI - Ordon Village - Rusl is guarding Uli, Ordon village night */ if (dComIfGs_isTmpBit(0x1308)) { mSound.startCreatureVoice(JAISoundID(Z2SE_MOI_V_GUARD_SWING), -1); } else { @@ -1125,6 +1128,8 @@ void daNpc_Moi_c::setSSlash(int param_1) { field_0x1658 = 0; field_0x166b = 1; field_0x166c = 1; + /* dSv_event_tmp_flag_c::T_0047 - Ordon Village - Right after wrestling with Bo + (Used to connect with conversation after wearing clothes) */ daNpcT_onTmpBit(0x47); } @@ -1282,6 +1287,7 @@ int daNpc_Moi_c::injuryTurn(cXyz param_1) { /* 80A76F3C-80A770FC 0030DC 01C0+00 1/1 0/0 0/0 .text injuryWalk__11daNpc_Moi_cFv */ int daNpc_Moi_c::injuryWalk() { + /* dSv_event_tmp_flag_c::GUARD_URI - Ordon Village - Rusl is guarding Uli, Ordon village night */ dComIfGs_offTmpBit(0x1308); cXyz cStack_40; @@ -1367,6 +1373,7 @@ int daNpc_Moi_c::poise() { field_0x1648 = cLib_getRndValue(iVar13 * 0.5f, iVar13 * 1.5f); } else if (!cLib_calcTimer(&field_0x1648)) { mMotionSeqMngr.setNo(43, 0.0f, 1, 0); + /* dSv_event_tmp_flag_c::GUARD_URI - Ordon Village - Rusl is guarding Uli, Ordon village night */ if (dComIfGs_isTmpBit(0x1308)) { mSound.startCreatureVoice(JAISoundID(Z2SE_MOI_V_GUARD_SWING), -1); } else { diff --git a/src/d/actor/d_a_npc_ne.cpp b/src/d/actor/d_a_npc_ne.cpp index 9af4e9eacd0..9df4150c0cb 100644 --- a/src/d/actor/d_a_npc_ne.cpp +++ b/src/d/actor/d_a_npc_ne.cpp @@ -1055,6 +1055,7 @@ static void npc_ne_tame(npc_ne_class* i_this) { i_this->mpMorf->setPlaySpeed(i_this->mAnmSpeed); + /* dSv_event_flag_c::F_0470 - Fishing Pond - Reserved for fishing */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[470])) { if (fpcEx_Search(s_fish_sub, _this) != NULL) { i_this->mAction = npc_ne_class::ACT_HOME; @@ -1715,6 +1716,7 @@ static BOOL npc_ne_home(npc_ne_class* i_this) { i_this->current.pos.set(236.0f, 93.3f, -777.5f); i_this->current.angle.y = 0x5f94; i_this->mAngleYStep = 5000.0f; + /* dSv_event_flag_c::F_0038 - Ordon Village - Opening (2nd day) cat returns home */ dComIfGs_onEventBit(0x1001); } else { i_this->mMode = 13; @@ -2269,6 +2271,7 @@ static void npc_ne_dish(npc_ne_class* i_this) { case 1: default: + /* dSv_event_flag_c::F_0038 - Ordon Village - Opening (2nd day) cat returns home */ if (!dComIfGs_isEventBit(0x1001)) { i_this->current.pos.y = 20000.0f; i_this->speed.y = 0.0f; @@ -3032,6 +3035,7 @@ static int daNpc_Ne_Execute(npc_ne_class* i_this) { i_this->mCounter++; if (i_this->mWantsFish && (i_this->mCounter & 0xf) == 0) { + /* dSv_event_flag_c::F_0470 - Fishing Pond - Reserved for fishing */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[470]) && i_this->mDistToTarget < 1500.0f) { if (fopAcM_SearchByName(PROC_MG_ROD) != NULL) { @@ -3221,6 +3225,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { if (_this->mBehavior == npc_ne_class::BHV_DISH) { static int dish_bck[2] = {npc_ne_class::ANM_EMPTY_DISH, npc_ne_class::ANM_DRINK_DISH}; + /* dSv_event_flag_c::F_0038 - Ordon Village - Opening (2nd day) cat returns home */ s32 dish_flag = dComIfGs_isEventBit(0x1001) ? 1 : 0; _this->mpDishMorf = new mDoExt_McaMorf( static_cast(dComIfG_getObjectRes(_this->mResName, 29)), NULL, NULL, @@ -3254,8 +3259,9 @@ static cPhs__Step daNpc_Ne_Create(fopAc_ac_c* i_this) { _this->mPathIndex = (u8)(fopAcM_GetParam(_this) >> 0x10); _this->mIsGengle = (u8)(fopAcM_GetParam(_this) >> 0x18); - if (_this->mIsGengle == 1 && - !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[457])) { + if (_this->mIsGengle == 1 + /* dSv_event_flag_c::F_0457 - Castle Town - Revived cat */ + && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[457])) { return cPhs_ERROR_e; } @@ -3279,6 +3285,7 @@ static cPhs__Step daNpc_Ne_Create(fopAc_ac_c* i_this) { if (_this->mBehavior == npc_ne_class::BHV_TAME) { _this->mAction = npc_ne_class::ACT_TAME; } else if (_this->mBehavior == npc_ne_class::BHV_PIER) { + /* dSv_event_flag_c::F_0038 - Ordon Village - Opening (2nd day) cat returns home */ if (dComIfGs_isEventBit(0x1001)) { _this->mAction = npc_ne_class::ACT_ROOF; i_this->current.pos.set(1005.0f, 766.0f, -1423.0f); diff --git a/src/d/actor/d_a_npc_saru.cpp b/src/d/actor/d_a_npc_saru.cpp index 1a1bf2e531f..2187d575542 100644 --- a/src/d/actor/d_a_npc_saru.cpp +++ b/src/d/actor/d_a_npc_saru.cpp @@ -4,14 +4,64 @@ */ #include "d/actor/d_a_npc_saru.h" +#include "d/actor/d_a_npc_ks.h" #include "d/actor/d_a_obj_so.h" #include "d/actor/d_a_e_ym.h" +enum saru_TW_RES_File_ID { + /* BMDR */ + /* 0x4 */ BMDR_SARU_BARA_TW = 0x4, + /* 0x5 */ BMDR_SARU_TW, + + /* EVT */ + /* 0x8 */ EVT_SARU_TW_EVENT_LIST = 0x8, +}; + +enum saru_RES_File_ID { + /* BCK */ + /* 0x3 */ BCK_SARU_HELP_E = 0x3, +}; + +enum RES_Name { + /* 0x1 */ NPC_KS = 0x1, + /* 0x2 */ SARU_TW, + /* 0x3 */ SARU, +}; + +enum FaceMotion { + /* 0x0 */ FACE_NONE, +}; + +enum Motion { + /* 0x0 */ MOT_WAIT_A, + /* 0x1 */ MOT_WAIT_B, + /* 0x2 */ MOT_WAIT_C, + /* 0x3 */ MOT_WAITSTAND, + /* 0x4 */ MOT_SCARED, + /* 0x5 */ MOT_SCARED_LOOK, + /* 0x6 */ MOT_RELIEF, + /* 0x7 */ MOT_JUMPRUN, + /* 0x8 */ MOT_HELP_E, + /* 0x9 */ MOT_HELP_C, + /* 0xA */ MOT_CLAP_WAIT, +}; + +enum Event { + /* 0x0 */ EVENT_NONE, + /* 0x1 */ EVENT_NO_RESPONSE, + /* 0x2 */ EVENT_YM_LOOK, +}; + +enum Material { + /* 0x1 */ MAT_SARU_BODY_M = 0x1, + /* 0x2 */ MAT_SARU_FACE_M, +}; + UNK_REL_DATA; /* 80AC46C4-80AC46E4 000020 0020+00 1/1 0/0 0/0 .data l_bmdData */ static int l_bmdData[4][2] = { - { 0x0000003B, 1 }, { 5, 2 }, { 0x0000003C, 1 }, { 4, 2 }, + { npc_ks_class::BMDR_SARU, 1 }, { BMDR_SARU_TW, 2 }, { npc_ks_class::BMDR_SARU_BARA, 1 }, { BMDR_SARU_BARA_TW, 2 }, }; /* 80AC46E4-80AC46FC -00001 0018+00 1/2 0/0 0/0 .data l_evtList */ @@ -28,7 +78,7 @@ static char* l_resNameList[4] = { /* 80AC470C-80AC4710 000068 0004+00 1/0 0/0 0/0 .data l_loadResPtrn0 */ static s8 l_loadResPtrn0[4] = { - 1, 2, 3, 0xFF, + NPC_KS, SARU_TW, SARU, -1, }; /* 80AC4710-80AC4720 -00001 0010+00 1/2 0/0 0/0 .data l_loadResPtrnList */ @@ -41,62 +91,114 @@ static s8* l_loadResPtrnList[4] = { /* 80AC4720-80AC473C 00007C 001C+00 0/1 0/0 0/0 .data l_faceMotionAnmData */ static daNpcT_faceMotionAnmData_c l_faceMotionAnmData[1] = { - {-1, 0, 0, 64, 2, 1, 1}, + {-1, J3DFrameCtrl::EMode_NONE, 0, + npc_ks_class::BTP_SARU, J3DFrameCtrl::EMode_LOOP, NPC_KS, 1}, }; /* 80AC473C-80AC4CD0 000098 0594+00 1/2 0/0 0/0 .data l_motionAnmData */ static daNpcT_motionAnmData_c l_motionAnmData[51] = { - {51, 2, 1, -1, 0, 0, 0, 0}, - {53, 2, 1, -1, 0, 0, 0, 0}, - {54, 2, 1, -1, 0, 0, 0, 0}, - {11, 2, 1, -1, 0, 0, 0, 0}, - {56, 2, 1, -1, 0, 0, 0, 0}, - {50, 2, 1, -1, 0, 0, 0, 0}, - {7, 2, 1, -1, 0, 0, 0, 0}, - {8, 2, 1, -1, 0, 0, 0, 0}, - {45, 0, 1, -1, 0, 0, 0, 0}, - {39, 2, 1, -1, 0, 0, 0, 0}, - {43, 0, 1, -1, 0, 0, 0, 0}, - {41, 2, 1, -1, 0, 0, 0, 0}, - {24, 2, 1, -1, 0, 0, 0, 0}, - {17, 0, 1, -1, 0, 0, 0, 0}, - {18, 0, 1, -1, 0, 0, 0, 0}, - {19, 0, 1, -1, 0, 0, 0, 0}, - {16, 2, 1, -1, 0, 0, 0, 0}, - {48, 2, 1, -1, 0, 0, 0, 0}, - {30, 2, 1, -1, 0, 0, 0, 0}, - {32, 0, 1, -1, 0, 0, 0, 0}, - {33, 0, 1, -1, 0, 0, 0, 0}, - {31, 0, 1, -1, 0, 0, 0, 0}, - {31, 2, 1, -1, 0, 0, 0, 0}, - {5, 2, 1, -1, 0, 0, 0, 0}, - {28, 2, 1, -1, 0, 0, 0, 0}, - {26, 2, 1, -1, 0, 0, 0, 0}, - {55, 2, 1, -1, 0, 0, 0, 0}, - {12, 2, 1, -1, 0, 0, 0, 0}, - {15, 2, 1, -1, 0, 0, 0, 0}, - {47, 2, 1, -1, 0, 0, 0, 0}, - {49, 0, 1, -1, 0, 0, 0, 0}, - {38, 2, 1, -1, 0, 0, 0, 0}, - {6, 0, 1, -1, 0, 0, 0, 0}, - {13, 2, 1, -1, 0, 0, 0, 0}, - {35, 0, 1, -1, 0, 0, 0, 0}, - {36, 0, 1, -1, 0, 0, 0, 0}, - {3, 2, 3, -1, 0, 0, 0, 0}, - {23, 2, 1, -1, 0, 0, 0, 0}, - {22, 2, 1, -1, 0, 0, 0, 0}, - {21, 2, 1, -1, 0, 0, 0, 0}, - {37, 0, 1, -1, 0, 0, 0, 0}, - {29, 2, 1, -1, 0, 0, 0, 0}, - {27, 2, 1, -1, 0, 0, 0, 0}, - {52, 2, 1, -1, 0, 0, 0, 0}, - {10, 2, 1, -1, 0, 0, 0, 0}, - {9, 2, 1, -1, 0, 0, 0, 0}, - {14, 0, 1, -1, 0, 0, 0, 0}, - {44, 2, 1, -1, 0, 0, 0, 0}, - {42, 2, 1, -1, 0, 0, 0, 0}, - {40, 0, 1, -1, 0, 0, 0, 0}, - {46, 0, 1, -1, 0, 0, 0, 0}, + {npc_ks_class::BCK_SARU_WAIT_A, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_WAIT_B, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_WAIT_C, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_CLAP_WAIT, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_YOROKOBI, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_WAITSTAND, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_CALL, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_CALLBACK, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_STOPCALL, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_SCARED, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_SCARED_LOOK, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_SCARED_B, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_HUNGING, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_HANGWAIT_A, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_HANGWAIT_B, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_HANGWAIT_C, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_HANGCALL, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_SWINGPOSE, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_JUMP_ATTN, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_JUMP_S, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_JUMP_T, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_JUMP_L, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_JUMP_L, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_BAKUCHU, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_JUMPWALK, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_JUMPRUN, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_WALKCLAP, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_CLIMB, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_GODOWN, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_SWIM, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_TO_ROTATE, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_ROTATE, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_BIKKURI, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_FALL, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_LAND, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_RECOVER, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {BCK_SARU_HELP_E, J3DFrameCtrl::EMode_LOOP, SARU, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_HOLDING, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_HELP_C, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_HELP_B, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_RELIEF, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_JUMPWALK_K, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_JUMPRUN_K, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_WAIT_A_K, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_CALL_K, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_CALLBACK_K, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_FIRE_K, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_SHAKE_K, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_SCARED_K, J3DFrameCtrl::EMode_LOOP, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_SCAREDLOOK_K, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, + {npc_ks_class::BCK_SARU_SURPRISE_K, J3DFrameCtrl::EMode_NONE, NPC_KS, + -1, J3DFrameCtrl::EMode_NONE, 0, 0, 0}, }; /* 80AC4CD0-80AC4CE0 00062C 0010+00 0/1 0/0 0/0 .data l_faceMotionSequenceData */ @@ -106,11 +208,16 @@ static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_faceMotionSequenceData[4] = /* 80AC4CE0-80AC4D90 00063C 00B0+00 0/1 0/0 0/0 .data l_motionSequenceData */ static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[44] = { - {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {9, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {10, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {40, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {25, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {36, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {38, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {9, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {10, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {40, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {25, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {36, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {38, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; @@ -141,7 +248,7 @@ daNpc_Saru_c::~daNpc_Saru_c() { /* ############################################################################################## */ /* 80AC44F8-80AC4588 000000 0090+00 9/9 0/0 0/0 .rodata m__18daNpc_Saru_Param_c */ -daNpc_Saru_Param_c::Data const daNpc_Saru_Param_c::m = { +daNpc_Saru_HIO_c const daNpc_Saru_Param_c::m = { 140.0f, -3.0f, 1.0f, @@ -170,8 +277,11 @@ daNpc_Saru_Param_c::Data const daNpc_Saru_Param_c::m = { 0.0f, 60, 8, - 0.0f, - 0.0f, + 0, + 0, + 0, + false, + false, 4.0f, -20.0f, 0.0f, @@ -223,7 +333,7 @@ int daNpc_Saru_c::create() { mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), fopAcM_GetShapeAngle_p(this)); - mCcStts.Init(daNpc_Saru_Param_c::m.mWeight, 0, this); + mCcStts.Init(daNpc_Saru_Param_c::m.common.weight, 0, this); field_0xe4c.Set(mCcDCyl); field_0xe4c.SetStts(&mCcStts); field_0xe4c.SetTgHitCallback(tgHitCallBack); @@ -276,9 +386,9 @@ int daNpc_Saru_c::CreateHeap() { } if (modelData != NULL) { - field_0xe44[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + mpRoseModels[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); } else { - field_0xe44[i] = NULL; + mpRoseModels[i] = NULL; } } @@ -359,7 +469,8 @@ int daNpc_Saru_c::isDelete() { case 1: rv = 0; - if (!daNpcT_chkEvtBit(0x12) || daNpcT_chkEvtBit(0x25C)) { + if (!daNpcT_chkEvtBit(0x12) /* dSv_event_flag_c::F_0014 - Ordon Village - sword tutorial ends */ + || daNpcT_chkEvtBit(0x25C) /* dSv_event_flag_c::F_0701 - N/A - Talo discovers monkey in Link's house garden */) { rv = 1; } @@ -419,7 +530,7 @@ BOOL daNpc_Saru_c::checkChangeEvt() { mPreItemNo = 0; if (dComIfGp_event_chkTalkXY()) { if (dComIfGp_evmng_ChkPresentEnd()) { - mEvtNo = 1; + mEvtNo = EVENT_NO_RESPONSE; evtChange(); } @@ -436,10 +547,10 @@ void daNpc_Saru_c::setParam() { srchActors(); u32 uVar1 = 10; - s16 sVar1 = daNpc_Saru_Param_c::m.field_0x48; - s16 sVar2 = daNpc_Saru_Param_c::m.field_0x4a; - s16 sVar3 = daNpc_Saru_Param_c::m.field_0x4c; - s16 sVar4 = daNpc_Saru_Param_c::m.field_0x4e; + s16 sVar1 = daNpc_Saru_Param_c::m.common.talk_distance; + s16 sVar2 = daNpc_Saru_Param_c::m.common.talk_angle; + s16 sVar3 = daNpc_Saru_Param_c::m.common.attention_distance; + s16 sVar4 = daNpc_Saru_Param_c::m.common.attention_angle; attention_info.distances[0] = daNpcT_getDistTableIdx(sVar3, sVar4); attention_info.distances[1] = attention_info.distances[0]; @@ -451,22 +562,22 @@ void daNpc_Saru_c::setParam() { attention_info.flags = uVar1; - scale.set(daNpc_Saru_Param_c::m.field_0x08, daNpc_Saru_Param_c::m.field_0x08, daNpc_Saru_Param_c::m.field_0x08); + scale.set(daNpc_Saru_Param_c::m.common.scale, daNpc_Saru_Param_c::m.common.scale, daNpc_Saru_Param_c::m.common.scale); if (mType != 0) { scale.setall(0.8f); } - mCcStts.SetWeight(daNpc_Saru_Param_c::m.mWeight); - mCylH = daNpc_Saru_Param_c::m.mCylH; - mWallR = daNpc_Saru_Param_c::m.mWallR; - mAttnFovY = daNpc_Saru_Param_c::m.mAttnFovy; + mCcStts.SetWeight(daNpc_Saru_Param_c::m.common.weight); + mCylH = daNpc_Saru_Param_c::m.common.height; + mWallR = daNpc_Saru_Param_c::m.common.width; + mAttnFovY = daNpc_Saru_Param_c::m.common.fov; mAcchCir.SetWallR(mWallR); - mAcchCir.SetWallH(daNpc_Saru_Param_c::m.mWallH); - mRealShadowSize = daNpc_Saru_Param_c::m.field_0x0c; - mExpressionMorfFrame = daNpc_Saru_Param_c::m.field_0x6c; - mMorfFrames = daNpc_Saru_Param_c::m.mMorfFrames; - gravity = daNpc_Saru_Param_c::m.mGravity; + mAcchCir.SetWallH(daNpc_Saru_Param_c::m.common.knee_length); + mRealShadowSize = daNpc_Saru_Param_c::m.common.real_shadow_size; + mExpressionMorfFrame = daNpc_Saru_Param_c::m.common.expression_morf_frame; + mMorfFrames = daNpc_Saru_Param_c::m.common.morf_frame; + gravity = daNpc_Saru_Param_c::m.common.gravity; } /* 80AC1110-80AC1170 000DD0 0060+00 1/0 0/0 0/0 .text setAfterTalkMotion__12daNpc_Saru_cFv */ @@ -474,7 +585,7 @@ void daNpc_Saru_c::setAfterTalkMotion() { #ifdef DEBUG mFaceMotionSeqMngr.getNo(); #endif - mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); } /* 80AC1170-80AC11D4 000E30 0064+00 1/1 0/0 0/0 .text srchActors__12daNpc_Saru_cFv */ @@ -570,11 +681,11 @@ void daNpc_Saru_c::setAttnPos() { mStagger.calc(FALSE); f32 fVar1 = cM_s2rad(mCurAngle.y - field_0xd7e.y); mJntAnm.setParam(this, mpMorf[0]->getModel(), &sp3c, getBackboneJointNo(), getNeckJointNo(), - getHeadJointNo(), daNpc_Saru_Param_c::m.mBodyUpAngle, daNpc_Saru_Param_c::m.mBodyDownAngle, - daNpc_Saru_Param_c::m.mBodyLeftAngle, daNpc_Saru_Param_c::m.mBodyRightAngle, - daNpc_Saru_Param_c::m.mHeadUpAngle, daNpc_Saru_Param_c::m.mHeadDownAngle, - daNpc_Saru_Param_c::m.mHeadLeftAngle, daNpc_Saru_Param_c::m.mHeadRightAngle, - daNpc_Saru_Param_c::m.field_0x40, fVar1, NULL); + getHeadJointNo(), daNpc_Saru_Param_c::m.common.body_angleX_min, daNpc_Saru_Param_c::m.common.body_angleX_max, + daNpc_Saru_Param_c::m.common.body_angleY_min, daNpc_Saru_Param_c::m.common.body_angleY_max, + daNpc_Saru_Param_c::m.common.head_angleX_min, daNpc_Saru_Param_c::m.common.head_angleX_max, + daNpc_Saru_Param_c::m.common.head_angleY_min, daNpc_Saru_Param_c::m.common.head_angleY_max, + daNpc_Saru_Param_c::m.common.neck_rotation_ratio, fVar1, NULL); mJntAnm.calcJntRad(0.2f, 1.0f, fVar1); setMtx(); @@ -588,7 +699,7 @@ void daNpc_Saru_c::setAttnPos() { mJntAnm.setEyeAngleY(eyePos, mCurAngle.y, 0, 1.0f, 0); sp3c.set(0.0f, 0.0f, 60.0f); - sp3c.y = daNpc_Saru_Param_c::m.field_0x00; + sp3c.y = daNpc_Saru_Param_c::m.common.attention_offset; mDoMtx_stack_c::YrotS(mCurAngle.y); mDoMtx_stack_c::multVec(&sp3c, &sp3c); attention_info.position = sp3c + current.pos; @@ -648,13 +759,13 @@ void daNpc_Saru_c::drawOtherMdl() { Mtx mtx; J3DModel* model = mpMorf[0]->getModel(); for (int i = 0; i < 2; i++) { - if (field_0xe44[i] != NULL && ((i == 0 && mTwilight == false) || (i == 1 && mTwilight != false))) { - g_env_light.setLightTevColorType_MAJI(field_0xe44[i], &tevStr); + if (mpRoseModels[i] != NULL && ((i == 0 && mTwilight == false) || (i == 1 && mTwilight != false))) { + g_env_light.setLightTevColorType_MAJI(mpRoseModels[i], &tevStr); mDoMtx_stack_c::copy(model->getAnmMtx(jointNo[i])); cMtx_copy(mDoMtx_stack_c::get(), mtx); - field_0xe44[i]->setBaseTRMtx(mtx); - mDoExt_modelUpdateDL(field_0xe44[i]); - dComIfGd_addRealShadow(mShadowKey, field_0xe44[i]); + mpRoseModels[i]->setBaseTRMtx(mtx); + mDoExt_modelUpdateDL(mpRoseModels[i]); + dComIfGd_addRealShadow(mShadowKey, mpRoseModels[i]); } } } @@ -767,7 +878,7 @@ int daNpc_Saru_c::cutFindMonkey(int param_1) { break; case 1: - mMotionSeqMngr.setNo(7, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_JUMPRUN, -1.0f, 0, 0); mEventTimer = iVar2; break; @@ -818,13 +929,13 @@ int daNpc_Saru_c::cutHelpMe(int param_1) { if (dComIfGp_getEventManager().getIsAddvance(param_1) != 0) { switch (iVar1) { case 0: - mFaceMotionSeqMngr.setNo(0, 0.0f, 0, 0); - mMotionSeqMngr.setNo(9, 0.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, 0.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_HELP_C, 0.0f, 0, 0); break; case 1: - mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); - mMotionSeqMngr.setNo(10, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_CLAP_WAIT, -1.0f, 0, 0); mPlayerAngle = home.angle.y + 0x8000; break; } @@ -879,7 +990,7 @@ int daNpc_Saru_c::cutYmLook(int param_1) { break; case 2: - mMotionSeqMngr.setNo(2, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_C, -1.0f, 0, 0); break; case 3: @@ -887,14 +998,14 @@ int daNpc_Saru_c::cutYmLook(int param_1) { break; case 4: - mMotionSeqMngr.setNo(6, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_RELIEF, -1.0f, 0, 0); break; case 5: break; case 99: - daNpcT_onEvtBit(0x16C); + daNpcT_onEvtBit(0x16C); // dSv_event_flag_c::F_0364 - Faron Woods - Listened to monkey girl's laments (Twilight) mFlow.remove(); } } @@ -940,6 +1051,7 @@ int daNpc_Saru_c::cutYmLook(int param_1) { case 99: rv = 1; + break; } return rv; @@ -955,48 +1067,48 @@ int daNpc_Saru_c::wait(void* param_1) { switch (mType) { case 0: if (field_0xfd9 != 0) { - mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, 0, 0); } else { - mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); - mMotionSeqMngr.setNo(4, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_SCARED, -1.0f, 0, 0); } break; case 2: cage_p = (obj_so_class*)mActrMngr[0].getActorP(); if (cage_p != NULL) { - mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); - mMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_HELP_E, -1.0f, 0, 0); if (cage_p->partBreak() == 1) { - mFaceMotionSeqMngr.setNo(0, -1.0f, 0 ,0); - mMotionSeqMngr.setNo(9, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0 ,0); + mMotionSeqMngr.setNo(MOT_HELP_C, -1.0f, 0, 0); } } else { - mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, 0, 0); } break; default: - mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, 0, 0); } mMode = 2; } // fallthrough case 2: - if (mType == 1 && daNpcT_chkEvtBit(0x25C)) { + if (mType == 1 && daNpcT_chkEvtBit(0x25C) /* dSv_event_flag_c::F_0701 - N/A - Talo discovers monkey in Link's house garden */) { fopAcM_delete(this); return 1; } else { if (mStagger.checkStagger() == 0) { - if (mType == 2 && mMotionSeqMngr.getNo() == 8) { + if (mType == 2 && mMotionSeqMngr.getNo() == MOT_HELP_E) { cage_p = (obj_so_class*)mActrMngr[0].getActorP(); if (cage_p != NULL && cage_p->partBreak() == 1) { - mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); - mMotionSeqMngr.setNo(9, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_HELP_C, -1.0f, 0, 0); } } @@ -1024,17 +1136,17 @@ int daNpc_Saru_c::wait(void* param_1) { attention_info.flags = 0; } else { if (mType == 0) { - if (mMotionSeqMngr.getNo() == 5) { + if (mMotionSeqMngr.getNo() == MOT_SCARED_LOOK) { if (mMotionSeqMngr.checkEndSequence() != 0) { mMode = 1; } } else if (field_0xfd4 != 0 && cLib_calcTimer(&field_0xfd4) == 0 && mType == 0 && field_0xfd9 == 0) { - mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); - mMotionSeqMngr.setNo(5, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); + mMotionSeqMngr.setNo(MOT_SCARED_LOOK, -1.0f, 0, 0); } } - if (mTwilight == false) { + if (!mTwilight) { srchPlayerActor(); } } @@ -1055,7 +1167,7 @@ int daNpc_Saru_c::wait(void* param_1) { } if (mFindCount != 0 && iVar1 == 0) { - mEvtNo = 2; + mEvtNo = EVENT_YM_LOOK; field_0xfd8 = 1; } } else { @@ -1138,23 +1250,6 @@ static int daNpc_Saru_IsDelete(void* param_1) { /* 80AC4FF4-80AC4FF8 000014 0004+00 1/1 0/0 0/0 .bss l_HIO */ static daNpc_Saru_Param_c l_HIO; -/* 80AC4474-80AC447C 004134 0008+00 1/0 0/0 0/0 .text getHeadJointNo__12daNpc_Saru_cFv */ -s32 daNpc_Saru_c::getHeadJointNo() { - return 4; -} - -/* 80AC447C-80AC4484 00413C 0008+00 1/0 0/0 0/0 .text getNeckJointNo__12daNpc_Saru_cFv */ -s32 daNpc_Saru_c::getNeckJointNo() { - return 3; -} - -/* 80AC4484-80AC448C 004144 0008+00 1/0 0/0 0/0 .text getBackboneJointNo__12daNpc_Saru_cFv */ -s32 daNpc_Saru_c::getBackboneJointNo() { - return 1; -} - -/* 80AC4654-80AC4654 00015C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ - /* 80AC4E24-80AC4E44 -00001 0020+00 1/0 0/0 0/0 .data daNpc_Saru_MethodTable */ static actor_method_class daNpc_Saru_MethodTable = { (process_method_func)daNpc_Saru_Create, diff --git a/src/d/actor/d_a_npc_sq.cpp b/src/d/actor/d_a_npc_sq.cpp index 9bf6c27539c..00c9928d908 100644 --- a/src/d/actor/d_a_npc_sq.cpp +++ b/src/d/actor/d_a_npc_sq.cpp @@ -336,6 +336,7 @@ static cPhs__Step daNpc_Sq_Create(fopAc_ac_c* i_this) { cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhaseReq, "Sq"); if (step == cPhs_COMPLEATE_e) { + /* dSv_event_flag_c::D_0001 - Ordon Village - Stopped by squirrel in front of house at night */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[25])) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_npc_the.cpp b/src/d/actor/d_a_npc_the.cpp index 2800560afc9..ca1a7d50e16 100644 --- a/src/d/actor/d_a_npc_the.cpp +++ b/src/d/actor/d_a_npc_the.cpp @@ -1183,8 +1183,11 @@ cPhs__Step daNpcThe_c::create() { mFlowID = -1; } - if (mType == TYPE_KAKARIKO && (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[68]) - || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[78]))) { + if (mType == TYPE_KAKARIKO + /* dSv_event_flag_c::M_035 - Cutscene - [cutscene: 35] after carriage guarding event */ + && (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[68]) + /* dSv_event_flag_c::M_045 - Lakebed Temple - Lakebed Temple clear */ + || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[78]))) { return cPhs_ERROR_e; } @@ -1431,6 +1434,7 @@ BOOL daNpcThe_c::doEvent() { dEvent_manager_c& event_manager = dComIfGp_getEventManager(); if (eventInfo.checkCommandTalk()) { if (mTwilight) { + /* dSv_event_flag_c::F_0277 - Castle Town - Hear conversation between Telma and Ilia in Telma's shop (Twilight) */ if (daNpcF_chkEvtBit(0x115)) { mOrderEvtNo = 2; } else { diff --git a/src/d/actor/d_a_npc_tk.cpp b/src/d/actor/d_a_npc_tk.cpp index 5a6bcc88f20..8519aab5e20 100644 --- a/src/d/actor/d_a_npc_tk.cpp +++ b/src/d/actor/d_a_npc_tk.cpp @@ -352,7 +352,10 @@ void daNPC_TK_c::executeFly() { mpMaster = NULL; } } - if (mpMaster != NULL && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xcf]) != 0) { + + if (mpMaster != NULL + /* dSv_event_flag_c::F_0207 - Ordon Village - Viewed Hanch, the Hawker cutscene */ + && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xCF])) { setActionMode(6); mSphere.OffCoSetBit(); } @@ -1271,6 +1274,7 @@ void daNPC_TK_c::executeBack() { } if (fopAcM_GetName(field_0x634) == PROC_OBJ_KAGO && + /* dSv_event_flag_c::F_0577 - Ordon Village - 2nd Day - Retrieved basket from monkey (hit hawk) */ !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x241])) { Z2GetAudioMgr()->changeBgmStatus(1); @@ -1375,10 +1379,12 @@ void daNPC_TK_c::executeBack() { if (current.pos.absXZ(playerPos) < 200.0f) { field_0x6b4 = 0; if (fopAcM_GetName(field_0x634) == PROC_OBJ_KAGO && + /* dSv_event_flag_c::F_0577 - Ordon Village - 2nd Day - Retrieved basket from monkey (hit hawk) */ !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x241])) { Z2GetAudioMgr()->changeBgmStatus(0); + /* dSv_event_flag_c::F_0577 - Ordon Village - 2nd Day - Retrieved basket from monkey (hit hawk) */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x241]); field_0x6b8 = 0x46; diff --git a/src/d/actor/d_a_npc_uri.cpp b/src/d/actor/d_a_npc_uri.cpp index 43d0cf7fed9..9ec7990b34c 100644 --- a/src/d/actor/d_a_npc_uri.cpp +++ b/src/d/actor/d_a_npc_uri.cpp @@ -433,6 +433,7 @@ void daNpc_Uri_c::reset() { field_0xfd8 = cStack_44; field_0xfe4.setall(0); field_0xfe4.y = cLib_targetAngleY(&acStack_38, &field_0xfd8); + /* dSv_event_flag_c::F_0032 - Ordon Ranch - 3rd day - First convo with fado (before forced goat chase) */ if (daNpcT_chkEvtBit(0x25)) { setPos(cStack_44); cStack_a0.y = cLib_targetAngleY(&acStack_38, &cStack_44); @@ -445,15 +446,23 @@ void daNpc_Uri_c::reset() { cStack_a0.y = cLib_targetAngleY(&acStack_38, &cStack_44); mPath.setNextIdx(mPath.getNumPnts()); } - if (daNpcT_chkEvtBit(0x20) != 0 || daNpcT_chkEvtBit(0x1e) != 0 || - daNpcT_chkEvtBit(0x92) != 0) + /* dSv_event_flag_c::F_0027 - Ordon Village - Uli tutorial ends (same whether pass or fail) */ + if (daNpcT_chkEvtBit(0x20) + /* dSv_event_flag_c::F_0025 - Ordon Village - Pass Uli's pick-up tutorial */ + || daNpcT_chkEvtBit(0x1E) + /* dSv_event_flag_c::F_0048 - Ordon Village - Uli's pick-up tutorial */ + || daNpcT_chkEvtBit(0x92) ) { setPos(home.pos); - if (daNpcT_chkEvtBit(0x20) != 0) { + /* dSv_event_flag_c::F_0027 - Ordon Village - Uli tutorial ends (same whether pass or fail) */ + if (daNpcT_chkEvtBit(0x20)) { field_0x100d = 1; } else { - if (daNpcT_chkEvtBit(0x1e) != 0 || daNpcT_chkEvtBit(0x92) != 0) { + /* dSv_event_flag_c::F_0025 - Ordon Village - Pass Uli's pick-up tutorial */ + if (daNpcT_chkEvtBit(0x1E) + /* dSv_event_flag_c::F_0048 - Ordon Village - Uli's pick-up tutorial */ + || daNpcT_chkEvtBit(0x92)) { field_0x100f = 1; } } @@ -469,7 +478,9 @@ void daNpc_Uri_c::reset() { break; } + /* T_0007 - Ordon Village - During Uli's pick-up tutorial */ daNpcT_offTmpBit(7); + /* dSv_event_tmp_flag_c::GUARD_URI - Ordon Village - Rusl is guarding Uli, Ordon village night */ dComIfGs_offTmpBit(0x1308); setAngle(cStack_a0); } @@ -551,8 +562,13 @@ BOOL daNpc_Uri_c::checkChangeEvt() { switch (mType) { case TYPE_1: - if (!daNpcT_chkEvtBit(0x1E) && !daNpcT_chkEvtBit(0x92)) { + /* dSv_event_flag_c::F_0025 - Ordon Village - Pass Uli's pick-up tutorial */ + if (!daNpcT_chkEvtBit(0x1E) + /* dSv_event_flag_c::F_0048 - Ordon Village - Uli's pick-up tutorial */ + && !daNpcT_chkEvtBit(0x92)) { + /* T_0007 - Ordon Village - During Uli's pick-up tutorial */ if (!daNpcT_chkTmpBit(0x7)) { + /* dSv_event_flag_c::F_0031 - Ordon Village - 2nd day - Spoke to Uli bfore finding basket */ if (daNpcT_chkEvtBit(0x24)) { mEvtNo = 4; } else { @@ -561,6 +577,7 @@ BOOL daNpc_Uri_c::checkChangeEvt() { evtChange(); return TRUE; } + /* dSv_event_flag_c::F_0027 - Ordon Village - Uli tutorial ends (same whether pass or fail) */ } else if (!daNpcT_chkEvtBit(0x20) && field_0x100b == 0) { mEvtNo = 7; evtChange(); @@ -568,7 +585,10 @@ BOOL daNpc_Uri_c::checkChangeEvt() { } break; case TYPE_4: - if (daNpcT_chkEvtBit(0x3D) && !daNpcT_chkEvtBit(0x14A)) { + /* dSv_event_flag_c::M_028 - Cutscene - [cutscene: 14] restore mountain spirit - Reuinion with Colin et al. */ + if (daNpcT_chkEvtBit(0x3D) + /* dSv_event_flag_c::F_0330 - Ordon Village - Meet again with Uli for the first time (first forced conversation) */ + && !daNpcT_chkEvtBit(0x14A)) { mEvtNo = 10; evtChange(); return TRUE; @@ -889,6 +909,7 @@ int daNpc_Uri_c::selectAction() { field_0xfc0[0] = &daNpc_Uri_c::sitWait; } else { if (field_0x100e != NULL) { + /* T_0007 - Ordon Village - During Uli's pick-up tutorial */ if (daNpcT_chkTmpBit(7) && field_0x100f == NULL) { field_0xfc0[0] = &daNpc_Uri_c::walk; } else { @@ -1159,8 +1180,11 @@ int daNpc_Uri_c::cutEndCarryTutorial(int param_1) { fopAcM_createItemForPresentDemo(¤t.pos, local_48, 0, -1, -1, NULL, NULL); } if (fopAcM_IsExecuting(mItemPartnerId)) { + /* T_0007 - Ordon Village - During Uli's pick-up tutorial */ daNpcT_offTmpBit(7); + /* dSv_event_tmp_flag_c::T_0009 - Ordon Village - Walked a bit during Uli's pick-up tutorial */ daNpcT_offTmpBit(10); + /* dSv_event_tmp_flag_c::T_0031 - Ordon Village - Borrow Rusl's sword */ daNpcT_offTmpBit(0x20); field_0x100b = 1; mEvtNo = 1; @@ -1255,7 +1279,7 @@ int daNpc_Uri_c::cutFindWolf(int param_1) { mGndChk.SetPos(&cStack_2c); cStack_2c.y = dComIfG_Bgsp().GroundCross(&mGndChk); daPy_getPlayerActorClass()->setPlayerPosAndAngle(&cStack_2c, sVar9 - (s16)0x8000, 0); - // GUARD_URI + /* dSv_event_tmp_flag_c::GUARD_URI - Ordon Village - Rusl is guarding Uli, Ordon village night */ dComIfGs_onTmpBit(0x1308); break; case 1: @@ -1310,6 +1334,7 @@ int daNpc_Uri_c::cutMeetingAgain(int param_1) { switch (iVar10) { case 0: mJntAnm.lookPlayer(0); + /* dSv_event_tmp_flag_c::T_0010 - General use - General use temporary flag (flow control) A */ daNpcT_offTmpBit(0xB); initTalk(mFlowNodeNo, NULL); break; @@ -1432,7 +1457,10 @@ int daNpc_Uri_c::wait(void* param_0) { mMotionSeqMngr.setNo(0, -1.0f, 0, 0); } else { if (field_0x100f) { - if (!daNpcT_chkEvtBit(0x1e) && !daNpcT_chkEvtBit(0x92)) { + /* dSv_event_flag_c::F_0025 - Ordon Village - Pass Uli's pick-up tutorial */ + if (!daNpcT_chkEvtBit(0x1E) + /* dSv_event_flag_c::F_0048 - Ordon Village - Uli's pick-up tutorial */ + && !daNpcT_chkEvtBit(0x92)) { mFaceMotionSeqMngr.setNo(17, -1.0f, 0, 0); mMotionSeqMngr.setNo(8, -1.0f, 0, 0); } else { @@ -1440,6 +1468,7 @@ int daNpc_Uri_c::wait(void* param_0) { mMotionSeqMngr.setNo(0, -1.0f, 0, 0); } } else { + /* dSv_event_flag_c::F_0031 - Ordon Village - 2nd day - Spoke to Uli bfore finding basket */ if (daNpcT_chkEvtBit(0x24)) { mFaceMotionSeqMngr.setNo(5, -1.0f, 0, 0); mMotionSeqMngr.setNo(12, -1.0f, 0, 0); @@ -1451,6 +1480,7 @@ int daNpc_Uri_c::wait(void* param_0) { } break; case TYPE_3: + /* dSv_event_tmp_flag_c::GUARD_URI - Ordon Village - Rusl is guarding Uli, Ordon village night */ if (dComIfGs_isTmpBit(0x1308)) { mFaceMotionSeqMngr.setNo(12, -1.0f, 0, 0); mMotionSeqMngr.setNo(22, -1.0f, 0, 0); @@ -1468,6 +1498,7 @@ int daNpc_Uri_c::wait(void* param_0) { case MODE_RUN: switch (mType) { case TYPE_1: + /* T_0007 - Ordon Village - During Uli's pick-up tutorial */ if (daNpcT_chkTmpBit(0x7)) { if (chkPlayerCarryBasket()) { switch (getTutorialCond(daPy_getPlayerActorClass()->current.pos)) { @@ -1483,7 +1514,10 @@ int daNpc_Uri_c::wait(void* param_0) { } } } else { - if (!daNpcT_chkEvtBit(0x1e) && !daNpcT_chkEvtBit(0x92)) { + /* dSv_event_flag_c::F_0025 - Ordon Village - Pass Uli's pick-up tutorial */ + if (!daNpcT_chkEvtBit(0x1E) + /* dSv_event_flag_c::F_0048 - Ordon Village - Uli's pick-up tutorial */ + && !daNpcT_chkEvtBit(0x92)) { cXyz acStack_70 = getAttnPos(daPy_getPlayerActorClass()); int dist_index = attention_info.distances[1]; f32 fVar2 = dComIfGp_getAttention()->getDistTable(dist_index).mLowerY * -1.0f; @@ -1504,7 +1538,8 @@ int daNpc_Uri_c::wait(void* param_0) { case TYPE_2: break; case TYPE_3: - if (daNpcT_chkEvtBit(0xcd)) { + /* dSv_event_flag_c::F_0205 - Ordon Village - Heard Rusl and Uli talking in Ordon village at night */ + if (daNpcT_chkEvtBit(0xCD)) { cXyz cStack_7c = getAttnPos(daPy_getPlayerActorClass()); if (chkPointInArea(cStack_7c, attention_info.position, daNpc_Uri_Param_c::m.field_0x54, daNpc_Uri_Param_c::m.field_0x58, @@ -1531,6 +1566,7 @@ int daNpc_Uri_c::wait(void* param_0) { mSpeakEvent = true; field_0xe33 = true; } + /* dSv_event_tmp_flag_c::GUARD_URI - Ordon Village - Rusl is guarding Uli, Ordon village night */ if (dComIfGs_isTmpBit(0x1308)) { mPlayerActorMngr.entry(daPy_getPlayerActorClass()); mJntAnm.lookPlayer(0); @@ -1729,7 +1765,13 @@ int daNpc_Uri_c::sitWait(void* param_0) { } break; case TYPE_4: - if (daNpcT_chkEvtBit(0x3D) && (daNpcT_chkEvtBit(0x14a) || daNpcT_chkEvtBit(0x204))) + /* dSv_event_flag_c::M_028 - Cutscene - [cutscene: 14] restore mountain spirit - Reuinion with Colin et al. */ + if (daNpcT_chkEvtBit(0x3D) + /* dSv_event_flag_c::F_0330 - Ordon Village - Meet again with Uli for the first time + (first forced conversation) */ + && (daNpcT_chkEvtBit(0x14A) + /* dSv_event_flag_c::F_0516 - Ordon Village - Told Uli directly about having found kids */ + || daNpcT_chkEvtBit(0x204))) { mFaceMotionSeqMngr.setNo(17, -1.0f, 0, 0); mMotionSeqMngr.setNo(3, -1.0f, 0, 0); @@ -1742,7 +1784,9 @@ int daNpc_Uri_c::sitWait(void* param_0) { mMode = MODE_RUN; } case MODE_RUN: - if (mType == TYPE_4 && !daNpcT_chkEvtBit(0x14a)) { + /* dSv_event_flag_c::F_0330 - Ordon Village - Meet again with Uli for the first time + (first forced conversation) */ + if (mType == TYPE_4 && !daNpcT_chkEvtBit(0x14A)) { mSpeakEvent = true; field_0xe33 = true; } diff --git a/src/d/actor/d_a_obj_ari.cpp b/src/d/actor/d_a_obj_ari.cpp index 7104407584b..2b96fbeb833 100644 --- a/src/d/actor/d_a_obj_ari.cpp +++ b/src/d/actor/d_a_obj_ari.cpp @@ -592,7 +592,11 @@ static int daObjARI_Execute(daObjARI_c* i_this) { } /* 80BA54F8-80BA54FC 0000F0 0004+00 1/2 0/0 0/0 .rodata l_musiya_num */ -static u16 const l_musiya_num[2] = {0x01A5, 0x01A6}; +static u16 const l_musiya_num[2] = { + 0x01A5, /* dSv_event_flag_c::F_0421 - Misc. - Ant (M) */ + 0x01A6, /* dSv_event_flag_c::F_0422 - Misc. - Ant (F) */ +}; + /* 80BA483C-80BA49E8 00229C 01AC+00 1/1 0/0 0/0 .text CreateChk__10daObjARI_cFv */ bool daObjARI_c::CreateChk() { diff --git a/src/d/actor/d_a_obj_batta.cpp b/src/d/actor/d_a_obj_batta.cpp index db39fc2dacc..e987fbd6f06 100644 --- a/src/d/actor/d_a_obj_batta.cpp +++ b/src/d/actor/d_a_obj_batta.cpp @@ -600,7 +600,10 @@ static int daObjBATTA_Execute(daObjBATTA_c* i_this) { /* ############################################################################################## */ /* 80BACA5C-80BACA60 0000EC 0004+00 0/1 0/0 0/0 .rodata l_musiya_num */ -static u16 const l_musiya_num[2] = { 0x197, 0x198 }; +static u16 const l_musiya_num[2] = { + 0x197, /* dSv_event_flag_c::F_0407 - Misc. - Grasshopper (M) */ + 0x198, /* dSv_event_flag_c::F_0408 - Misc. - Grasshopper (F) */ +}; /* 80BAC194-80BAC6A0 002454 050C+00 1/1 0/0 0/0 .text create__12daObjBATTA_cFv */ int daObjBATTA_c::create() { diff --git a/src/d/actor/d_a_obj_bkdoor.cpp b/src/d/actor/d_a_obj_bkdoor.cpp index 9a73bb0eef5..50be98fae35 100644 --- a/src/d/actor/d_a_obj_bkdoor.cpp +++ b/src/d/actor/d_a_obj_bkdoor.cpp @@ -67,6 +67,7 @@ static Vec const l_roll_crash_check_areaR[] = { /* 80578E14-80578EA0 000174 008C+00 1/0 0/0 0/0 .text Create__13daObjBkDoor_cFv */ int daObjBkDoor_c::Create() { + /* dSv_event_flag_c::F_0011 - Ordon Ranch - Fence jumping complete */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[15])) { shape_angle.y -= 0x8000; } @@ -120,16 +121,16 @@ void daObjBkDoor_c::openCheck() { } } -/* 8057902C-805792E4 00038C 02B8+00 1/0 0/0 0/0 .text Execute__13daObjBkDoor_cFPPA3_A4_f - */ +/* 8057902C-805792E4 00038C 02B8+00 1/0 0/0 0/0 .text Execute__13daObjBkDoor_cFPPA3_A4_f */ int daObjBkDoor_c::Execute(Mtx** i_mtxP) { daPy_py_c* player = dComIfGp_getLinkPlayer(); - BOOL unk_event = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[15]); + /* dSv_event_flag_c::F_0011 - Ordon Ranch - Fence jumping complete */ + BOOL fence_jumping_complete = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[15]); mFrameCounter++; openCheck(); - if (player->checkFrontRollCrash() && !unk_event) { + if (player->checkFrontRollCrash() && !fence_jumping_complete) { cXyz check_area_posA; cXyz check_area_posB; diff --git a/src/d/actor/d_a_obj_bosswarp.cpp b/src/d/actor/d_a_obj_bosswarp.cpp index d01679b7d45..f208a504b95 100644 --- a/src/d/actor/d_a_obj_bosswarp.cpp +++ b/src/d/actor/d_a_obj_bosswarp.cpp @@ -699,7 +699,15 @@ int daObjBossWarp_c::demoProc() { }; static int const l_dangeon_clr_bitNo[9] = { - 0x37, 0x40, 0x4E, 0x109, 0x10A, 0x10B, 0x10C, -1, -1 + 0x37, /* dSv_event_flag_c::M_022 - Forest Temple - Forest Temple clear (Midna creates warp hole) */ + 0x40, /* dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear */ + 0x4E, /* dSv_event_flag_c::M_045 - Lakebed Temple - Lakebed Temple clear */ + 0x109, /* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */ + 0x10A, /* dSv_event_flag_c::F_0266 - Snowpeak Ruins - Snowpeak Ruins clear */ + 0x10B, /* dSv_event_flag_c::F_0267 - Temple of Time - Temple of Time clear */ + 0x10C, + -1, + -1 }; daPy_py_c* player = (daPy_py_c*)daPy_getPlayerActorClass(); diff --git a/src/d/actor/d_a_obj_carry.cpp b/src/d/actor/d_a_obj_carry.cpp index 367e1433c05..d2b526e9256 100644 --- a/src/d/actor/d_a_obj_carry.cpp +++ b/src/d/actor/d_a_obj_carry.cpp @@ -1389,21 +1389,31 @@ int daObjCarry_c::checkCreate_LightBallA() { fopAc_ac_c* var_r29 = NULL; if (daPy_py_c::checkCarryStartLightBallA()) { + /* Palace of Twilight - Palace of Twilight use 1 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0311); + /* Palace of Twilight - Palace of Twilight use 3 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0313); + /* Palace of Twilight - Palace of Twilight use 5 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0315); + /* Palace of Twilight - Palace of Twilight use 7 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0317); + /* Palace of Twilight - Palace of Twilight use 9 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0319); if (dComIfGp_roomControl_getStayNo() == 51) { + /* Palace of Twilight - Palace of Twilight use 5 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0315); } else if (dComIfGp_roomControl_getStayNo() == 52) { + /* Palace of Twilight - Palace of Twilight use 9 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0319); } else if (dComIfGp_roomControl_getStayNo() == 0) { + /* Palace of Twilight - Palace of Twilight use 1 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0311); } else if (dComIfGp_roomControl_getStayNo() == 1 || dComIfGp_roomControl_getStayNo() == 2) { + /* Palace of Twilight - Palace of Twilight use 3 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0313); } else { + /* Palace of Twilight - Palace of Twilight use 7 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0317); } @@ -1415,13 +1425,19 @@ int daObjCarry_c::checkCreate_LightBallA() { return cPhs_INIT_e; } } - } else if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0311) && - !dComIfGs_isEventBit(dSv_event_flag_c::F_0313) && - !dComIfGs_isEventBit(dSv_event_flag_c::F_0315) && - !dComIfGs_isEventBit(dSv_event_flag_c::F_0317) && - !dComIfGs_isEventBit(dSv_event_flag_c::F_0319)) + /* Palace of Twilight - Palace of Twilight use 1 */ + } else if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0311) + /* Palace of Twilight - Palace of Twilight use 3 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0313) + /* Palace of Twilight - Palace of Twilight use 5 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0315) + /* Palace of Twilight - Palace of Twilight use 7 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0317) + /* Palace of Twilight - Palace of Twilight use 9 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0319)) { if (dComIfGp_roomControl_getStayNo() != 51) { + /* Palace of Twilight - Palace of Twilight use 1 */ if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0311)) { resetIconPosForLightBallA(); } @@ -1430,12 +1446,23 @@ int daObjCarry_c::checkCreate_LightBallA() { OS_REPORT("\x1B[33m光球A:玉とリンクの位置が違うので消します<0>\n\x1B[m"); return cPhs_ERROR_e; } - } else if ((dComIfGs_isEventBit(dSv_event_flag_c::F_0311) && dComIfGp_roomControl_getStayNo()) || - (dComIfGs_isEventBit(dSv_event_flag_c::F_0313) && dComIfGp_roomControl_getStayNo() != 1 && dComIfGp_roomControl_getStayNo() != 2) || - (dComIfGs_isEventBit(dSv_event_flag_c::F_0315) && dComIfGp_roomControl_getStayNo() != 51) || - (dComIfGs_isEventBit(dSv_event_flag_c::F_0319) && dComIfGp_roomControl_getStayNo() != 52) || - (dComIfGs_isEventBit(dSv_event_flag_c::F_0317) && dComIfGp_roomControl_getStayNo() != 4 && dComIfGp_roomControl_getStayNo() != 5)) + /* Palace of Twilight - Palace of Twilight use 1 */ + } else if ((dComIfGs_isEventBit(dSv_event_flag_c::F_0311) + && dComIfGp_roomControl_getStayNo()) || + /* Palace of Twilight - Palace of Twilight use 3 */ + (dComIfGs_isEventBit(dSv_event_flag_c::F_0313) + && dComIfGp_roomControl_getStayNo() != 1 && dComIfGp_roomControl_getStayNo() != 2) || + /* Palace of Twilight - Palace of Twilight use 5 */ + (dComIfGs_isEventBit(dSv_event_flag_c::F_0315) + && dComIfGp_roomControl_getStayNo() != 51) || + /* Palace of Twilight - Palace of Twilight use 9 */ + (dComIfGs_isEventBit(dSv_event_flag_c::F_0319) + && dComIfGp_roomControl_getStayNo() != 52) || + /* Palace of Twilight - Palace of Twilight use 7 */ + (dComIfGs_isEventBit(dSv_event_flag_c::F_0317) + && dComIfGp_roomControl_getStayNo() != 4 && dComIfGp_roomControl_getStayNo() != 5)) { + /* Palace of Twilight - Palace of Twilight use 1 */ if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0311)) { resetIconPosForLightBallA(); } else { @@ -1455,12 +1482,12 @@ int daObjCarry_c::checkCreate_LightBallA() { for (int i = 0; i < 6; i++) { static const u16 l_event_bitA[] = { - dSv_event_flag_c::F_0551, - dSv_event_flag_c::F_0552, - dSv_event_flag_c::F_0553, - dSv_event_flag_c::F_0554, - dSv_event_flag_c::F_0555, - dSv_event_flag_c::F_0556 + dSv_event_flag_c::F_0551, /* Palace of Twilight - Palace of Twilight control use 1 */ + dSv_event_flag_c::F_0552, /* Palace of Twilight - Palace of Twilight control use 2 */ + dSv_event_flag_c::F_0553, /* Palace of Twilight - Palace of Twilight control use 3 */ + dSv_event_flag_c::F_0554, /* Palace of Twilight - Palace of Twilight control use 4 */ + dSv_event_flag_c::F_0555, /* Palace of Twilight - Palace of Twilight control use 5 */ + dSv_event_flag_c::F_0556, /* Palace of Twilight - Palace of Twilight control use 6 */ }; if (dComIfGs_isEventBit(l_event_bitA[i])) { @@ -1506,21 +1533,31 @@ BOOL daObjCarry_c::checkCreate_LightBallB() { fopAc_ac_c* var_r29 = NULL; if (daPy_py_c::checkCarryStartLightBallB()) { + /* Palace of Twilight - Palace of Twilight use 2 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0312); + /* Palace of Twilight - Palace of Twilight use 4 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0314); + /* Palace of Twilight - Palace of Twilight use 6 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0316); + /* Palace of Twilight - Palace of Twilight use 8 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0318); + /* Palace of Twilight - Palace of Twilight use 10 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0320); if (dComIfGp_roomControl_getStayNo() == 51) { + /* Palace of Twilight - Palace of Twilight use 6 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0316); } else if (dComIfGp_roomControl_getStayNo() == 52) { + /* Palace of Twilight - Palace of Twilight use 10 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0320); } else if (dComIfGp_roomControl_getStayNo() == 0) { + /* Palace of Twilight - Palace of Twilight use 2 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0312); } else if (dComIfGp_roomControl_getStayNo() == 1 || dComIfGp_roomControl_getStayNo() == 2) { + /* Palace of Twilight - Palace of Twilight use 4 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0314); } else { + /* Palace of Twilight - Palace of Twilight use 8 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0318); } @@ -1532,13 +1569,19 @@ BOOL daObjCarry_c::checkCreate_LightBallB() { return cPhs_INIT_e; } } - } else if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0312) && - !dComIfGs_isEventBit(dSv_event_flag_c::F_0314) && - !dComIfGs_isEventBit(dSv_event_flag_c::F_0316) && - !dComIfGs_isEventBit(dSv_event_flag_c::F_0318) && - !dComIfGs_isEventBit(dSv_event_flag_c::F_0320)) + /* Palace of Twilight - Palace of Twilight use 2 */ + } else if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0312) + /* Palace of Twilight - Palace of Twilight use 4 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0314) + /* Palace of Twilight - Palace of Twilight use 6 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0316) + /* Palace of Twilight - Palace of Twilight use 8 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0318) + /* Palace of Twilight - Palace of Twilight use 10 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0320)) { if (dComIfGp_roomControl_getStayNo() != 52) { + /* Castle Town - Showed reciept to town doctor */ if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0321)) { resetIconPosForLightBallB(); } @@ -1547,12 +1590,23 @@ BOOL daObjCarry_c::checkCreate_LightBallB() { OS_REPORT("\x1B[33m光球B:玉とリンクの位置が違うので消します<2>\n\x1B[m"); return cPhs_ERROR_e; } - } else if ((dComIfGs_isEventBit(dSv_event_flag_c::F_0312) && dComIfGp_roomControl_getStayNo()) || - (dComIfGs_isEventBit(dSv_event_flag_c::F_0314) && dComIfGp_roomControl_getStayNo() != 1 && dComIfGp_roomControl_getStayNo() != 2) || - (dComIfGs_isEventBit(dSv_event_flag_c::F_0316) && dComIfGp_roomControl_getStayNo() != 51) || - (dComIfGs_isEventBit(dSv_event_flag_c::F_0320) && dComIfGp_roomControl_getStayNo() != 52) || - (dComIfGs_isEventBit(dSv_event_flag_c::F_0318) && dComIfGp_roomControl_getStayNo() != 4 && dComIfGp_roomControl_getStayNo() != 5)) + /* Palace of Twilight - Palace of Twilight use 2 */ + } else if ((dComIfGs_isEventBit(dSv_event_flag_c::F_0312) + && dComIfGp_roomControl_getStayNo()) || + /* Palace of Twilight - Palace of Twilight use 4 */ + (dComIfGs_isEventBit(dSv_event_flag_c::F_0314) + && dComIfGp_roomControl_getStayNo() != 1 && dComIfGp_roomControl_getStayNo() != 2) || + /* Palace of Twilight - Palace of Twilight use 6 */ + (dComIfGs_isEventBit(dSv_event_flag_c::F_0316) + && dComIfGp_roomControl_getStayNo() != 51) || + /* Palace of Twilight - Palace of Twilight use 10 */ + (dComIfGs_isEventBit(dSv_event_flag_c::F_0320) + && dComIfGp_roomControl_getStayNo() != 52) || + /* Palace of Twilight - Palace of Twilight use 8 */ + (dComIfGs_isEventBit(dSv_event_flag_c::F_0318) + && dComIfGp_roomControl_getStayNo() != 4 && dComIfGp_roomControl_getStayNo() != 5)) { + /* Palace of Twilight - Palace of Twilight use 2 */ if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0312)) { resetIconPosForLightBallB(); } else { @@ -1572,12 +1626,12 @@ BOOL daObjCarry_c::checkCreate_LightBallB() { for (int i = 0; i < 6; i++) { static const u16 l_event_bitB[] = { - dSv_event_flag_c::F_0557, - dSv_event_flag_c::F_0558, - dSv_event_flag_c::F_0559, - dSv_event_flag_c::F_0560, - dSv_event_flag_c::F_0561, - dSv_event_flag_c::F_0562, + dSv_event_flag_c::F_0557, /* Palace of Twilight - Palace of Twilight control use 7 */ + dSv_event_flag_c::F_0558, /* Palace of Twilight - Palace of Twilight control use 8 */ + dSv_event_flag_c::F_0559, /* Palace of Twilight - Palace of Twilight control use 9 */ + dSv_event_flag_c::F_0560, /* Palace of Twilight - Palace of Twilight control use 10 */ + dSv_event_flag_c::F_0561, /* Palace of Twilight - Palace of Twilight control use 11 */ + dSv_event_flag_c::F_0562, /* Palace of Twilight - Palace of Twilight control use 12 */ }; if (dComIfGs_isEventBit(l_event_bitB[i])) { @@ -1636,15 +1690,13 @@ BOOL daObjCarry_c::checkCreate_Lv8Ball() { return cPhs_NEXT_e; } -/* 80471680-804716D4 002700 0054+00 1/1 0/0 0/0 .text resetIconPosForLightBallA__12daObjCarry_cFv - */ +/* 80471680-804716D4 002700 0054+00 1/1 0/0 0/0 .text resetIconPosForLightBallA__12daObjCarry_cFv */ void daObjCarry_c::resetIconPosForLightBallA() { cXyz pos(0.0f, 100.0f, -3930.0f); dTres_c::setIconPositionOfCarryLight(getTrboxBit(), &pos, 51); } -/* 804716D4-804717B4 002754 00E0+00 1/1 0/0 0/0 .text - * setIconPosForLightBallAAtR00__12daObjCarry_cFv */ +/* 804716D4-804717B4 002754 00E0+00 1/1 0/0 0/0 .text setIconPosForLightBallAAtR00__12daObjCarry_cFv */ void daObjCarry_c::setIconPosForLightBallAAtR00() { cXyz pos; @@ -1659,8 +1711,7 @@ void daObjCarry_c::setIconPosForLightBallAAtR00() { dTres_c::setIconPositionOfCarryLight(getTrboxBit(), &pos, 0); } -/* 804717B4-80471894 002834 00E0+00 1/1 0/0 0/0 .text - * setIconPosForLightBallBAtR00__12daObjCarry_cFv */ +/* 804717B4-80471894 002834 00E0+00 1/1 0/0 0/0 .text setIconPosForLightBallBAtR00__12daObjCarry_cFv */ void daObjCarry_c::setIconPosForLightBallBAtR00() { cXyz pos; @@ -1675,8 +1726,7 @@ void daObjCarry_c::setIconPosForLightBallBAtR00() { dTres_c::setIconPositionOfCarryLight(getTrboxBit(), &pos, 0); } -/* 80471894-804718E8 002914 0054+00 1/1 0/0 0/0 .text resetIconPosForLightBallB__12daObjCarry_cFv - */ +/* 80471894-804718E8 002914 0054+00 1/1 0/0 0/0 .text resetIconPosForLightBallB__12daObjCarry_cFv */ void daObjCarry_c::resetIconPosForLightBallB() { cXyz pos(0.0f, 100.0f, -3930.0f); dTres_c::setIconPositionOfCarryLight(getTrboxBit(), &pos, 52); @@ -2068,31 +2118,48 @@ int daObjCarry_c::_delete() { } if (mType == TYPE_BALL_S) { - if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0311) || (player != NULL && player->getGrabActorID() != fopAcM_GetID(this))) { + /* Palace of Twilight - Palace of Twilight use 1 */ + if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0311) + || (player != NULL && player->getGrabActorID() != fopAcM_GetID(this))) { + /* Palace of Twilight - Palace of Twilight use 3 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0313); + /* Palace of Twilight - Palace of Twilight use 5 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0315); + /* Palace of Twilight - Palace of Twilight use 7 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0317); + /* Palace of Twilight - Palace of Twilight use 9 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0319); + /* Palace of Twilight - Palace of Twilight use 1 */ if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0311)) { cXyz pos(0.0f, 100.0f, -3930.0f); dTres_c::setIconPositionOfCarryLight(getTrboxBit(), &pos, 51); } } - if (fopAcM_isSwitch(this, 90) && !dComIfGs_isEventBit(dSv_event_flag_c::F_0311) && player != NULL) { + if (fopAcM_isSwitch(this, 90) + /* Palace of Twilight - Palace of Twilight use 1 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0311) + && player != NULL) { if (player->getGrabActorID() != fopAcM_GetID(this)) { fopAcM_onSwitch(this, 170); // "Midna Hint Switch set!\n" OSReport_Error("ミドナヒント用スイッチ立てました!\n"); } } - } else if (mType == TYPE_BALL_S_2 && (!dComIfGs_isEventBit(dSv_event_flag_c::F_0312) || (player != NULL && player->getGrabActorID() != fopAcM_GetID(this)))) { + /* Palace of Twilight - Palace of Twilight use 2 */ + } else if (mType == TYPE_BALL_S_2 && (!dComIfGs_isEventBit(dSv_event_flag_c::F_0312) + || (player != NULL && player->getGrabActorID() != fopAcM_GetID(this)))) { + /* Palace of Twilight - Palace of Twilight use 4 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0314); + /* Palace of Twilight - Palace of Twilight use 6 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0316); + /* Palace of Twilight - Palace of Twilight use 8 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0318); + /* Palace of Twilight - Palace of Twilight use 10 */ dComIfGs_offEventBit(dSv_event_flag_c::F_0320); + /* Palace of Twilight - Palace of Twilight use 2 */ if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0312)) { cXyz pos(0.0f, 100.0f, -3930.0f); dTres_c::setIconPositionOfCarryLight(getTrboxBit(), &pos, 52); @@ -2321,8 +2388,7 @@ void daObjCarry_c::mode_proc_call() { } } -/* 804733E8-804734B0 004468 00C8+00 15/15 0/0 0/0 .text mode_init_wait__12daObjCarry_cFv - */ +/* 804733E8-804734B0 004468 00C8+00 15/15 0/0 0/0 .text mode_init_wait__12daObjCarry_cFv */ void daObjCarry_c::mode_init_wait() { mAcch.ClrMoveBGOnly(); mAcch.ClrGrndNone(); @@ -2392,8 +2458,7 @@ int daObjCarry_c::mode_proc_wait() { return 1; } -/* 80473718-804737CC 004798 00B4+00 5/5 0/0 0/0 .text mode_init_walk__12daObjCarry_cFUc - */ +/* 80473718-804737CC 004798 00B4+00 5/5 0/0 0/0 .text mode_init_walk__12daObjCarry_cFUc */ void daObjCarry_c::mode_init_walk(u8 unused) { mAcch.ClrMoveBGOnly(); mAcch.ClrGrndNone(); @@ -2517,8 +2582,7 @@ int daObjCarry_c::mode_proc_walk() { return 1; } -/* 80473ED8-804741A8 004F58 02D0+00 2/2 0/0 0/0 .text mode_init_carry__12daObjCarry_cFv - */ +/* 80473ED8-804741A8 004F58 02D0+00 2/2 0/0 0/0 .text mode_init_carry__12daObjCarry_cFv */ void daObjCarry_c::mode_init_carry() { mAcch.ClrMoveBGOnly(); mAcch.ClrGrndNone(); @@ -2561,10 +2625,30 @@ void daObjCarry_c::mode_init_carry() { daPy_py_c* player = daPy_getPlayerActorClass(); if (player->getGrabActorID() == fopAcM_GetID(this)) { if (mType == TYPE_BALL_S) { - if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0311) && !dComIfGs_isEventBit(dSv_event_flag_c::F_0313) && !dComIfGs_isEventBit(dSv_event_flag_c::F_0315) && !dComIfGs_isEventBit(dSv_event_flag_c::F_0317) && !dComIfGs_isEventBit(dSv_event_flag_c::F_0319)) { + /* Palace of Twilight - Palace of Twilight use 1 */ + if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0311) + /* Palace of Twilight - Palace of Twilight use 3 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0313) + /* Palace of Twilight - Palace of Twilight use 5 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0315) + /* Palace of Twilight - Palace of Twilight use 7 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0317) + /* Palace of Twilight - Palace of Twilight use 9 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0319)) { + /* Palace of Twilight - Palace of Twilight use 5 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0315); } - } else if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0312) && !dComIfGs_isEventBit(dSv_event_flag_c::F_0314) && !dComIfGs_isEventBit(dSv_event_flag_c::F_0316) && !dComIfGs_isEventBit(dSv_event_flag_c::F_0318) && !dComIfGs_isEventBit(dSv_event_flag_c::F_0320)) { + /* Palace of Twilight - Palace of Twilight use 2 */ + } else if (!dComIfGs_isEventBit(dSv_event_flag_c::F_0312) + /* Palace of Twilight - Palace of Twilight use 4 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0314) + /* Palace of Twilight - Palace of Twilight use 6 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0316) + /* Palace of Twilight - Palace of Twilight use 8 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0318) + /* Palace of Twilight - Palace of Twilight use 10 */ + && !dComIfGs_isEventBit(dSv_event_flag_c::F_0320)) { + /* Palace of Twilight - Palace of Twilight use 10 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0320); } } @@ -2646,8 +2730,7 @@ int daObjCarry_c::mode_proc_carry() { return 1; } -/* 80474448-80474540 0054C8 00F8+00 3/3 0/0 1/1 .text mode_init_drop__12daObjCarry_cFUc - */ +/* 80474448-80474540 0054C8 00F8+00 3/3 0/0 1/1 .text mode_init_drop__12daObjCarry_cFUc */ void daObjCarry_c::mode_init_drop(u8 param_0) { mAcch.ClrMoveBGOnly(); mAcch.ClrGrndNone(); @@ -2700,8 +2783,7 @@ int daObjCarry_c::mode_proc_drop() { return 1; } -/* 80474618-80474734 005698 011C+00 2/2 0/0 0/0 .text mode_init_float__12daObjCarry_cFv - */ +/* 80474618-80474734 005698 011C+00 2/2 0/0 0/0 .text mode_init_float__12daObjCarry_cFv */ void daObjCarry_c::mode_init_float() { mAcch.ClrMoveBGOnly(); mAcch.ClrGrndNone(); @@ -2873,8 +2955,7 @@ int daObjCarry_c::mode_proc_sink() { return 1; } -/* 80474D64-80474E08 005DE4 00A4+00 1/1 0/0 0/0 .text mode_init_yogan__12daObjCarry_cFv - */ +/* 80474D64-80474E08 005DE4 00A4+00 1/1 0/0 0/0 .text mode_init_yogan__12daObjCarry_cFv */ void daObjCarry_c::mode_init_yogan() { mAcch.ClrMoveBGOnly(); mAcch.ClrGrndNone(); @@ -2969,8 +3050,7 @@ int daObjCarry_c::mode_proc_boomCarry() { return 1; } -/* 80475014-804750C8 006094 00B4+00 1/1 0/0 0/0 .text mode_init_growth__12daObjCarry_cFv - */ +/* 80475014-804750C8 006094 00B4+00 1/1 0/0 0/0 .text mode_init_growth__12daObjCarry_cFv */ void daObjCarry_c::mode_init_growth() { mAcch.ClrMoveBGOnly(); mAcch.ClrGrndNone(); @@ -3010,8 +3090,7 @@ int daObjCarry_c::mode_proc_end() { return 1; } -/* 80475164-80475210 0061E4 00AC+00 1/1 0/0 0/0 .text mode_init_dbDrop__12daObjCarry_cFUc - */ +/* 80475164-80475210 0061E4 00AC+00 1/1 0/0 0/0 .text mode_init_dbDrop__12daObjCarry_cFUc */ void daObjCarry_c::mode_init_dbDrop(u8 param_0) { mAcch.ClrMoveBGOnly(); mAcch.ClrGrndNone(); @@ -3031,14 +3110,13 @@ void daObjCarry_c::mode_init_dbDrop(u8 param_0) { mMode = MODE_DB_DROP; } -/* 80475210-80475238 006290 0028+00 1/0 0/0 0/0 .text mode_proc_dbDrop__12daObjCarry_cFv - */ +/* 80475210-80475238 006290 0028+00 1/0 0/0 0/0 .text mode_proc_dbDrop__12daObjCarry_cFv */ int daObjCarry_c::mode_proc_dbDrop() { fopAcM_posMoveF(this, mStts.GetCCMoveP()); return 1; } -/* 80475238-80475354 0062B8 011C+00 1/1 0/0 0/0 .text mode_init_hookCarry__12daObjCarry_cFv */ +/* 80475238-80475354 0062B8 011C+00 1/1 0/0 0/0 .text mode_init_hookCarry__12daObjCarry_cFv */ void daObjCarry_c::mode_init_hookCarry() { mAcch.ClrMoveBGOnly(); mAcch.ClrGrndNone(); @@ -3067,7 +3145,7 @@ void daObjCarry_c::mode_init_hookCarry() { mMode = MODE_HOOK_CARRY; } -/* 80475354-80475384 0063D4 0030+00 1/0 0/0 0/0 .text mode_proc_hookCarry__12daObjCarry_cFv */ +/* 80475354-80475384 0063D4 0030+00 1/0 0/0 0/0 .text mode_proc_hookCarry__12daObjCarry_cFv */ int daObjCarry_c::mode_proc_hookCarry() { if (!fopAcM_checkHookCarryNow(this)) { mode_init_wait(); @@ -3107,7 +3185,7 @@ int daObjCarry_c::mode_proc_fit() { return 1; } -/* 80475478-804754D0 0064F8 0058+00 1/0 0/0 0/0 .text mode_proc_controled__12daObjCarry_cFv */ +/* 80475478-804754D0 0064F8 0058+00 1/0 0/0 0/0 .text mode_proc_controled__12daObjCarry_cFv */ int daObjCarry_c::mode_proc_controled() { calc_rot_call(); setBaseMtx(); @@ -3116,8 +3194,7 @@ int daObjCarry_c::mode_proc_controled() { return 1; } -/* 804754D0-80475598 006550 00C8+00 1/1 0/0 0/0 .text mode_init_resetLightBall__12daObjCarry_cFv - */ +/* 804754D0-80475598 006550 00C8+00 1/1 0/0 0/0 .text mode_init_resetLightBall__12daObjCarry_cFv */ void daObjCarry_c::mode_init_resetLightBall() { mAcch.ClrMoveBGOnly(); mAcch.ClrGrndNone(); @@ -3496,13 +3573,13 @@ bool daObjCarry_c::bg_damage_proc_bokkuri() { return rt; } -/* 80476930-80476938 0079B0 0008+00 2/0 0/0 0/0 .text bg_damage_proc_LightBall__12daObjCarry_cFv +/* 80476930-80476938 0079B0 0008+00 2/0 0/0 0/0 .text bg_damage_proc_LightBall__12daObjCarry_cFv */ bool daObjCarry_c::bg_damage_proc_LightBall() { return false; } -/* 80476938-80476940 0079B8 0008+00 1/0 0/0 0/0 .text bg_damage_proc_Lv8Ball__12daObjCarry_cFv */ +/* 80476938-80476940 0079B8 0008+00 1/0 0/0 0/0 .text bg_damage_proc_Lv8Ball__12daObjCarry_cFv */ bool daObjCarry_c::bg_damage_proc_Lv8Ball() { return false; } diff --git a/src/d/actor/d_a_obj_cho.cpp b/src/d/actor/d_a_obj_cho.cpp index bc4e02ec1db..506afc35b03 100644 --- a/src/d/actor/d_a_obj_cho.cpp +++ b/src/d/actor/d_a_obj_cho.cpp @@ -515,7 +515,10 @@ static int daObjCHO_Execute(daObjCHO_c* i_this) { } /* 80BCC670-80BCC674 0000F8 0004+00 1/2 0/0 0/0 .rodata l_musiya_num */ -static u16 const l_musiya_num[2] = {0x0193, 0x0194}; +static u16 const l_musiya_num[2] = { + 0x0193, /* dSv_event_flag_c::F_0403 - Misc. - Butterfly (M) */ + 0x0194, /* dSv_event_flag_c::F_0404 - Misc. - Butterfly (F) */ +}; /* 80BCBE70-80BCC01C 001C50 01AC+00 1/1 0/0 0/0 .text CreateChk__10daObjCHO_cFv */ bool daObjCHO_c::CreateChk() { diff --git a/src/d/actor/d_a_obj_dan.cpp b/src/d/actor/d_a_obj_dan.cpp index e933e876f72..f6acbbd10ff 100644 --- a/src/d/actor/d_a_obj_dan.cpp +++ b/src/d/actor/d_a_obj_dan.cpp @@ -490,7 +490,10 @@ static int daObjDAN_Execute(daObjDAN_c* i_this) { } /* 80BDC460-80BDC464 0000B0 0004+00 1/2 0/0 0/0 .rodata l_musiya_num */ -static u16 const l_musiya_num[2] = {0x019B, 0x019C}; +static u16 const l_musiya_num[2] = { + 0x019B, /* dSv_event_flag_c::F_0411 - Misc. - Pill bug (M) */ + 0x019C, /* dSv_event_flag_c::F_0412 - Misc. - Pill bug (F) */ +}; /* 80BDBB0C-80BDBCB8 00166C 01AC+00 1/1 0/0 0/0 .text CreateChk__10daObjDAN_cFv */ bool daObjDAN_c::CreateChk() { diff --git a/src/d/actor/d_a_obj_drop.cpp b/src/d/actor/d_a_obj_drop.cpp index 4124395448b..9ebda7e50cb 100644 --- a/src/d/actor/d_a_obj_drop.cpp +++ b/src/d/actor/d_a_obj_drop.cpp @@ -124,6 +124,7 @@ void daObjDrop_c::dropGet() { if (dComIfGp_getStartStageDarkArea() == 2 && dComIfGs_getLightDropNum(dComIfGp_getStartStageDarkArea()) == 15) { + /* dSv_event_flag_c::F_0005 - Misc. - Gathered 14 Tears of Light in area 4 */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[9]); } diff --git a/src/d/actor/d_a_obj_fchain.cpp b/src/d/actor/d_a_obj_fchain.cpp index a0ed6318e0b..6e62ef52d95 100644 --- a/src/d/actor/d_a_obj_fchain.cpp +++ b/src/d/actor/d_a_obj_fchain.cpp @@ -154,6 +154,7 @@ int daObjFchain_c::execute() { for (i = 0; i < 22; i++, var_r28++, sp_30++) { sp_12c = (*var_r28 - *sp_38) + *sp_30; sp_12c.y += -1.5f; + /* dSv_event_flag_c::M_011 - Inside Hyrule Castle - Midna removes wolf's chains in prison */ if (dComIfGs_isEventBit(0x510)) { if (isWolf) { checkPlayerFoot(var_r28, player->getLeftHandPosP(), &sp_12c); @@ -171,6 +172,7 @@ int daObjFchain_c::execute() { } sp_38 = var_r28; } + /* dSv_event_flag_c::M_011 - Inside Hyrule Castle - Midna removes wolf's chains in prison */ if (isWolf && !dComIfGs_isEventBit(0x510)) { mDoMtx_multVec( player->getModelJointMtx(17), &wolfChainBaseOffset, @@ -284,6 +286,7 @@ void daObjFchain_shape_c::draw() { dKy_GxFog_tevstr_set(tevStr); GXLoadLightObjImm(&tevStr->mLightObj.mLightObj, GX_LIGHT0); int local_30; + /* dSv_event_flag_c::M_011 - Inside Hyrule Castle - Midna removes wolf's chains in prison */ if (dComIfGs_isEventBit(0x510)) { local_30 = 17; } else { diff --git a/src/d/actor/d_a_obj_graWall.cpp b/src/d/actor/d_a_obj_graWall.cpp index 51ec567096e..1e97d5d6b18 100644 --- a/src/d/actor/d_a_obj_graWall.cpp +++ b/src/d/actor/d_a_obj_graWall.cpp @@ -16,7 +16,8 @@ int daObjGraWall_c::Create() { return cPhs_ERROR_e; } } else { - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[62]) != 0) { + /* dSv_event_flag_c::M_029 - Death Mountain (room) - Win wrestle match against Gor Coron */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[62])) { return cPhs_ERROR_e; } } @@ -33,7 +34,8 @@ int daObjGraWall_c::Execute() { return 1; } } else { - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[62]) != 0) { + /* dSv_event_flag_c::M_029 - Death Mountain (room) - Win wrestle match against Gor Coron */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[62])) { fopAcM_delete(this); return 1; } diff --git a/src/d/actor/d_a_obj_hfuta.cpp b/src/d/actor/d_a_obj_hfuta.cpp index 021f54b7ce5..6889fab886e 100644 --- a/src/d/actor/d_a_obj_hfuta.cpp +++ b/src/d/actor/d_a_obj_hfuta.cpp @@ -27,6 +27,7 @@ void daObjFuta_c::setBaseMtx() { /* 80C1DE94-80C1DF2C 0001F4 0098+00 1/0 0/0 0/0 .text Create__11daObjFuta_cFv */ int daObjFuta_c::Create() { + /* dSv_event_flag_c::F_0070 - Ordon Woods - Colin went deep into the woods */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[168])) { setMode(MODE_2); mode_end(); diff --git a/src/d/actor/d_a_obj_iceleaf.cpp b/src/d/actor/d_a_obj_iceleaf.cpp index 6d9c6427207..5fbcda7452a 100644 --- a/src/d/actor/d_a_obj_iceleaf.cpp +++ b/src/d/actor/d_a_obj_iceleaf.cpp @@ -242,6 +242,7 @@ void daObjIceLeaf_c::action() { void daObjIceLeaf_c::modeDropWait() { daPy_py_c* player = daPy_getPlayerActorClass(); + /* dSv_event_flag_c::F_0308 - Snowpeak mountain - Watched first meeting event with Yeto at top of mountain (human) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x134])) { bool start_drop = false; if (player->current.pos.abs(current.pos) < 250.0f && diff --git a/src/d/actor/d_a_obj_ihasi.cpp b/src/d/actor/d_a_obj_ihasi.cpp index 8123b19254a..5f62a38ee32 100644 --- a/src/d/actor/d_a_obj_ihasi.cpp +++ b/src/d/actor/d_a_obj_ihasi.cpp @@ -75,6 +75,7 @@ static int daObj_Ihasi_Execute(obj_ihasi_class* i_this) { dComIfG_Bgsp().Release(i_this->mpBgW); i_this->mpBgW = NULL; + /* dSv_event_flag_c::M_050 - Main Event - Eldin Bridge disappears */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x53]); } @@ -153,7 +154,8 @@ static int daObj_Ihasi_Create(fopAc_ac_c* i_actor) { csXyz angle; cXyz pos; - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x53]) != 0) { + /* dSv_event_flag_c::M_050 - Main Event - Eldin Bridge disappears */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x53])) { angle.set(0x0, -0x8000, 0x0); pos.set(34750.0f, -300.0f, -44000.0f); diff --git a/src/d/actor/d_a_obj_kabuto.cpp b/src/d/actor/d_a_obj_kabuto.cpp index 937539f2220..5401faf0af3 100644 --- a/src/d/actor/d_a_obj_kabuto.cpp +++ b/src/d/actor/d_a_obj_kabuto.cpp @@ -712,7 +712,10 @@ static int daObjKABUTO_Execute(daObjKABUTO_c* i_this) { } /* 80C2E200-80C2E204 0000F0 0004+00 1/2 0/0 0/0 .rodata l_musiya_num */ -static u16 const l_musiya_num[2] = {0x0191, 0x0192}; +static u16 const l_musiya_num[2] = { + 0x0191, /* dSv_event_flag_c::F_0401 - Misc. - Beetle (M) */ + 0x0192, /* dSv_event_flag_c::F_0402 - Misc. - Beetle (F) */ +}; /* 80C2D578-80C2D724 0027F8 01AC+00 1/1 0/0 0/0 .text CreateChk__13daObjKABUTO_cFv */ bool daObjKABUTO_c::CreateChk() { diff --git a/src/d/actor/d_a_obj_kamakiri.cpp b/src/d/actor/d_a_obj_kamakiri.cpp index 592ddfefa5c..a7ff3fc49b4 100644 --- a/src/d/actor/d_a_obj_kamakiri.cpp +++ b/src/d/actor/d_a_obj_kamakiri.cpp @@ -747,7 +747,10 @@ static int daObjKAM_Execute(daObjKAM_c* i_this) { /* ############################################################################################## */ /* 80C384E4-80C384E8 0000DC 0004+00 1/2 0/0 0/0 .rodata l_musiya_num */ -static u16 const l_musiya_num[2] = {0x019D, 0x019E}; +static u16 const l_musiya_num[2] = { + 0x019D, /* dSv_event_flag_c::F_0413 - Misc. - Mantis (M) */ + 0x019E, /* dSv_event_flag_c::F_0414 - Misc. - Mantis (F) */ +}; /* 80C378F4-80C37AA0 002854 01AC+00 1/1 0/0 0/0 .text CreateChk__10daObjKAM_cFv */ u8 daObjKAM_c::CreateChk() { diff --git a/src/d/actor/d_a_obj_katatsumuri.cpp b/src/d/actor/d_a_obj_katatsumuri.cpp index 49a54fb362f..7dc8c37e5c3 100644 --- a/src/d/actor/d_a_obj_katatsumuri.cpp +++ b/src/d/actor/d_a_obj_katatsumuri.cpp @@ -676,7 +676,10 @@ static int daObjKAT_Execute(daObjKAT_c* i_this) { return i_this->Execute(); } -static u16 const l_musiya_num[2] = { 0x01A1, 0x01A2 }; +static u16 const l_musiya_num[2] = { + 0x01A1, /* dSv_event_flag_c::F_0417 - Misc. - Snail (M) */ + 0x01A2, /* dSv_event_flag_c::F_0418 - Misc. - Snail (F) */ +}; /* 80C3BAAC-80C3BC58 00222C 01AC+00 1/1 0/0 0/0 .text CreateChk__10daObjKAT_cFv */ bool daObjKAT_c::CreateChk() { diff --git a/src/d/actor/d_a_obj_mirror_chain.cpp b/src/d/actor/d_a_obj_mirror_chain.cpp index c7dd01b3465..f16224a49ba 100644 --- a/src/d/actor/d_a_obj_mirror_chain.cpp +++ b/src/d/actor/d_a_obj_mirror_chain.cpp @@ -208,6 +208,7 @@ extern void* __vt__12J3DFrameCtrl[3]; */ int daObjMirrorChain_c::createHeap() { J3DModelData* model_data; + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) { model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 16); mpModel = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000284); @@ -226,6 +227,7 @@ int daObjMirrorChain_c::createHeap() { return 0; } + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) { J3DModelData* portal_model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 12); mpPortalModel = mDoExt_J3DModel__create(portal_model_data, 0, 0x11000084); @@ -260,6 +262,7 @@ int daObjMirrorChain_c::createHeap() { J3DAnmTransform* bck_anm = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName, 8); mpBckAnm = new mDoExt_bckAnm(); bool b = fopAcM_isSwitch(this, getSwitchNo()) + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]); f32 rate = b ? 1.0f : 0.0f; if (mpBckAnm == NULL @@ -268,6 +271,7 @@ int daObjMirrorChain_c::createHeap() { return 0; } if (fopAcM_isSwitch(this, getSwitchNo()) + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361])) { mpBckAnm->setFrame(bck_anm->getFrameMax()); @@ -339,6 +343,7 @@ int daObjMirrorChain_c::draw() { static f32 const SCISSOR_SIZE = 984.0f; g_env_light.settingTevStruct(0x10, ¤t.pos, &tevStr); g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr); + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) { g_env_light.setLightTevColorType_MAJI(mpPortalModel, &tevStr); if (mpBckAnm != NULL) { @@ -474,6 +479,7 @@ int daObjMirrorChain_c::execute() { mpPortalBrkAnm->play(); } + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]) && mpBckAnm != NULL && mpBckAnm->getPlaySpeed() > 0.0f) { if (mpActiveBgW == &mBgW[0]) { @@ -526,7 +532,9 @@ static int daObjMirrorChain_Delete(daObjMirrorChain_c* i_this) { } void daObjMirrorChain_c::create_init() { - if (mpBckAnm != NULL && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) { + if (mpBckAnm != NULL + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ + && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) { mpBckAnm->setPlaySpeed(FLOAT_LABEL(lit_3917)); } mpEmitter = NULL; @@ -535,6 +543,7 @@ void daObjMirrorChain_c::create_init() { mBgW[1].SetCrrFunc(NULL); mBgW[1].SetRoomId(fopAcM_GetRoomNo(this)); bool b = fopAcM_isSwitch(this, getSwitchNo()) + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]); mpActiveBgW = b ? &mBgW[1] : &mBgW[0]; dComIfG_Bgsp().Regist(mpActiveBgW, this); diff --git a/src/d/actor/d_a_obj_mirror_screw.cpp b/src/d/actor/d_a_obj_mirror_screw.cpp index 50adcbdb444..1a9d36d9cc3 100644 --- a/src/d/actor/d_a_obj_mirror_screw.cpp +++ b/src/d/actor/d_a_obj_mirror_screw.cpp @@ -76,6 +76,7 @@ void daObjMirrorScrew_c::initDown() { speedF = 0.0f; mSpinCount = M_attr.mResetSpinCount; + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[361]); dComIfGp_getVibration().StartShock(8, 0xf, cXyz(0.0f, 1.0f, 0.0f)); @@ -177,8 +178,10 @@ static int daObjMirrorScrew_Delete(daObjMirrorScrew_c* i_this) { cPhs__Step daObjMirrorScrew_c::create() { fopAcM_SetupActor(this, daObjMirrorScrew_c); if (fopAcM_isSwitch(this, getSwitchNo()) || - dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) || - dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ + dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ + || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_obj_mirror_table.cpp b/src/d/actor/d_a_obj_mirror_table.cpp index 16397608886..da8d16cfc2b 100644 --- a/src/d/actor/d_a_obj_mirror_table.cpp +++ b/src/d/actor/d_a_obj_mirror_table.cpp @@ -33,6 +33,7 @@ int daObjMirrorTable_c::createHeap() { return 0; } + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ int mirror_res_id = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]) ? 13 : 14; J3DModelData* mirror_model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, mirror_res_id); mpMirrorModel = mDoExt_J3DModel__create(mirror_model_data, 0, 0x11000084); @@ -55,6 +56,7 @@ int daObjMirrorTable_c::createHeap() { return 0; } + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ int mirror_dzb_id = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]) ? 31 : 32; cBgD_t* mirror_dzb = (cBgD_t*)dComIfG_getObjectRes(l_arcName, mirror_dzb_id); if (mBgW[1].Set(mirror_dzb, 1, &mMtx[1])) { @@ -70,6 +72,7 @@ int daObjMirrorTable_c::createHeap() { mpMSquareBckAnm = NULL; mpLightBtkAnm = NULL; + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) { J3DModelData* stair_model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 20); mpStairModel = mDoExt_J3DModel__create(stair_model_data, 0x80000, 0x11000084); @@ -127,7 +130,9 @@ int daObjMirrorTable_c::createHeap() { /* 80C99F7C-80C9A040 0006DC 00C4+00 1/1 0/0 0/0 .text isSwitch__18daObjMirrorTable_cFv */ bool daObjMirrorTable_c::isSwitch() { return fopAcM_isSwitch(this, getSwitchNo()) + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]) ? 1 : 0; } @@ -306,6 +311,7 @@ int daObjMirrorTable_c::execute() { Z2GetAudioMgr()->seStartLevel(Z2SE_OBJ_MR_TBLE, &pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) { if (!mBgW[0].ChkUsed() && mpTableUpBckAnm->getPlaySpeed() > 0.0f) { dComIfG_Bgsp().Regist(&mBgW[0], this); @@ -395,6 +401,7 @@ cPhs__Step daObjMirrorTable_c::create() { /* 80C9ABFC-80C9AFD0 00135C 03D4+00 1/1 0/0 0/0 .text create_init__18daObjMirrorTable_cFv */ void daObjMirrorTable_c::create_init() { + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ bool mirror_complete_flag = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]); mpTableUpBckAnm->setPlaySpeed(0.0f); @@ -435,7 +442,9 @@ void daObjMirrorTable_c::create_init() { field_0x874 = false; + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]) + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361])) { cXyz pos(1760.0f, 4714.3f, -20624.0f); diff --git a/src/d/actor/d_a_obj_nan.cpp b/src/d/actor/d_a_obj_nan.cpp index d57827be52f..b9c74676fe6 100644 --- a/src/d/actor/d_a_obj_nan.cpp +++ b/src/d/actor/d_a_obj_nan.cpp @@ -655,7 +655,10 @@ static int daObjNAN_Execute(daObjNAN_c* i_this) { /* ############################################################################################## */ /* 80CA3294-80CA3298 0000D8 0004+00 0/1 0/0 0/0 .rodata l_musiya_num */ -static u16 const l_musiya_num[2] = {0x0199, 0x019A}; +static u16 const l_musiya_num[2] = { + 0x0199, /* dSv_event_flag_c::F_0409 - Misc. - Phasmid (M) */ + 0x019A, /* dSv_event_flag_c::F_0410 - Misc. - Phasmid (F) */ +}; /* 80CA3298-80CA329C 0000DC 0004+00 0/1 0/0 0/0 .rodata l_heapsize */ static u16 const l_heapsize[2] = {0x0EE0, 0x0EC0}; diff --git a/src/d/actor/d_a_obj_onsenFire.cpp b/src/d/actor/d_a_obj_onsenFire.cpp index 0d11daa7323..51a7c1b5d8a 100644 --- a/src/d/actor/d_a_obj_onsenFire.cpp +++ b/src/d/actor/d_a_obj_onsenFire.cpp @@ -9,7 +9,8 @@ /* 80CA8278-80CA82F4 000078 007C+00 1/1 0/0 0/0 .text create__16daObjOnsenFire_cFv */ int daObjOnsenFire_c::create() { fopAcM_SetupActor(this, daObjOnsenFire_c); - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[377]) == 0) { + /* dSv_event_flag_c::F_0377 - Castle Town - Goron spring water shop open! */ + if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[377])) { return cPhs_ERROR_e; } return cPhs_COMPLEATE_e; diff --git a/src/d/actor/d_a_obj_rgate.cpp b/src/d/actor/d_a_obj_rgate.cpp index 368678e5cef..0b682a32090 100644 --- a/src/d/actor/d_a_obj_rgate.cpp +++ b/src/d/actor/d_a_obj_rgate.cpp @@ -213,23 +213,7 @@ void daObjRgate_c::setBaseMtx() { } } -/* 80CBC4A0-80CBC4AC 000000 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */ -static u8 cNullVec__6Z2Calc[12] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -/* 80CBC4AC-80CBC4C0 00000C 0004+10 0/0 0/0 0/0 .data @1787 */ -#pragma push -#pragma force_active on -static u32 lit_1787[1 + 4 /* padding */] = { - 0x02000201, - /* padding */ - 0x40080000, - 0x00000000, - 0x3FE00000, - 0x00000000, -}; -#pragma pop +UNK_REL_DATA; /* 80CBC4C0-80CBC4C4 -00001 0004+00 4/4 0/0 0/0 .data l_arcName */ static char* l_arcName = "M_RGate00"; @@ -240,8 +224,9 @@ int daObjRgate_c::Create() { u8 sw_no = getSwNo(); if (sw_no != 0xFF && !fopAcM_isSwitch(this, sw_no) && + /* dSv_event_flag_c::M_035 - Cutscene - [cutscene: 35] after carriage guarding event */ !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[68])) - { + {\ eventInfo.setArchiveName(l_arcName); mEventID = dComIfGp_getEventManager().getEventIdx(this, l_evName, 0xFF); @@ -567,6 +552,7 @@ void daObjRgate_c::setCrkSE() { /* 80CBB308-80CBB370 0016E8 0068+00 1/1 0/0 0/0 .text action__12daObjRgate_cFv */ void daObjRgate_c::action() { + /* dSv_event_flag_c::M_035 - Cutscene - [cutscene: 35] after carriage guarding event */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[68])) { mGateLAngle = 0x4000; mGateRAngle = -0x4000; diff --git a/src/d/actor/d_a_obj_roten.cpp b/src/d/actor/d_a_obj_roten.cpp index aa26145d3d0..c6c6ec98093 100644 --- a/src/d/actor/d_a_obj_roten.cpp +++ b/src/d/actor/d_a_obj_roten.cpp @@ -90,6 +90,7 @@ static u32 l_dzbFileIdx = 7; /* 80CC0F40-80CC1038 000460 00F8+00 1/1 0/0 0/0 .text create__13daObj_Roten_cFv */ int daObj_Roten_c::create() { fopAcM_SetupActor(this, daObj_Roten_c); + /* dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x40])) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_obj_snow_soup.cpp b/src/d/actor/d_a_obj_snow_soup.cpp index 062665958d6..3e4e1c75ce9 100644 --- a/src/d/actor/d_a_obj_snow_soup.cpp +++ b/src/d/actor/d_a_obj_snow_soup.cpp @@ -91,6 +91,7 @@ int daObjSnowSoup_c::execute() { mDoAud_seStartLevel(Z2SE_OBJ_FIREWOOD_BURNING, &mFirewoodPos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); switch (mState) { case 0: + /* dSv_event_flag_c::F_0003 - Snowpeak Ruins - Handed over tomato puree and left room */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[7])) { deleteSmkEmtChange(mState); mState = 1; @@ -101,6 +102,7 @@ int daObjSnowSoup_c::execute() { } break; case 1: + /* dSv_event_flag_c::F_0004 - Snowpeak Ruins - Handed over secret ingredient and left room */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[8])) { deleteSmkEmtChange(mState); mState = 2; @@ -120,8 +122,10 @@ int daObjSnowSoup_c::execute() { /* 80CDFE14-80CDFEA4 000634 0090+00 1/1 0/0 0/0 .text init__15daObjSnowSoup_cFv */ void daObjSnowSoup_c::init() { mState = 0; + /* dSv_event_flag_c::F_0004 - Snowpeak Ruins - Handed over secret ingredient and left room */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[8])) { mState = 2; + /* dSv_event_flag_c::F_0003 - Snowpeak Ruins - Handed over tomato puree and left room */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[7])) { mState = 1; } diff --git a/src/d/actor/d_a_obj_swBallB.cpp b/src/d/actor/d_a_obj_swBallB.cpp index 3b37b873480..e9c8e15960f 100644 --- a/src/d/actor/d_a_obj_swBallB.cpp +++ b/src/d/actor/d_a_obj_swBallB.cpp @@ -42,16 +42,25 @@ static GXColor const l_color = {0x03, 0x96, 0xFF, 0xFF}; /* 80CF59D4-80CF59E0 000004 000C+00 0/1 0/0 0/0 .rodata l_event_bitA */ static u16 const l_event_bitA[6] = { - 0x4304, 0x4302, 0x4301, 0x4480, 0x4440, 0x4420, + 0x4304, /* dSv_event_flag_c::F_0551 - Palace of Twilight - Palace of Twilight control use 1 */ + 0x4302, /* dSv_event_flag_c::F_0552 - Palace of Twilight - Palace of Twilight control use 2 */ + 0x4301, /* dSv_event_flag_c::F_0553 - Palace of Twilight - Palace of Twilight control use 3 */ + 0x4480, /* dSv_event_flag_c::F_0554 - Palace of Twilight - Palace of Twilight control use 4 */ + 0x4440, /* dSv_event_flag_c::F_0555 - Palace of Twilight - Palace of Twilight control use 5 */ + 0x4420, /* dSv_event_flag_c::F_0556 - Palace of Twilight - Palace of Twilight control use 6 */ }; /* 80CF59E0-80CF59EC 000010 000C+00 0/1 0/0 0/0 .rodata l_event_bitB */ static u16 const l_event_bitB[6] = { - 0x4410, 0x4408, 0x4404, 0x4402, 0x4401, 0x4580, + 0x4410, /* dSv_event_flag_c::F_0557 - Palace of Twilight - Palace of Twilight control use 7 */ + 0x4408, /* dSv_event_flag_c::F_0558 - Palace of Twilight - Palace of Twilight control use 8 */ + 0x4404, /* dSv_event_flag_c::F_0559 - Palace of Twilight - Palace of Twilight control use 9 */ + 0x4402, /* dSv_event_flag_c::F_0560 - Palace of Twilight - Palace of Twilight control use 10 */ + 0x4401, /* dSv_event_flag_c::F_0561 - Palace of Twilight - Palace of Twilight control use 11 */ + 0x4580, /* dSv_event_flag_c::F_0562 - Palace of Twilight - Palace of Twilight control use 12 */ }; -/* 80CF466C-80CF47BC 00012C 0150+00 1/1 0/0 0/0 .text - * checkArea_sub__14daObjSwBallB_cFP10fopAc_ac_c */ +/* 80CF466C-80CF47BC 00012C 0150+00 1/1 0/0 0/0 .text checkArea_sub__14daObjSwBallB_cFP10fopAc_ac_c */ int daObjSwBallB_c::checkArea_sub(fopAc_ac_c* param_1) { if (param_1 == NULL) { return 0; diff --git a/src/d/actor/d_a_obj_table.cpp b/src/d/actor/d_a_obj_table.cpp index 5cf8e8a7bdb..46aebdc01d0 100644 --- a/src/d/actor/d_a_obj_table.cpp +++ b/src/d/actor/d_a_obj_table.cpp @@ -89,19 +89,27 @@ int daObjTable_c::Create() { mpModel->getModelData()->getMaterialNodePointer(2)->getShape()->hide(); } else { if (dComIfG_play_c::getLayerNo(0) == 4) { + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361])) { mpModel->getModelData()->getMaterialNodePointer(0)->getShape()->hide(); } - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) && - dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[266]) && - !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[267])) + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) + /* dSv_event_flag_c::F_0266 - Snowpeak Ruins - Snowpeak Ruins clear */ + && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[266]) + /* dSv_event_flag_c::F_0267 - Temple of Time - Temple of Time clear */ + && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[267])) { mpModel->getModelData()->getMaterialNodePointer(1)->getShape()->hide(); } - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) && - dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[266]) && - dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[267]) && - !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[268])) + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) + /* dSv_event_flag_c::F_0266 - Snowpeak Ruins - Snowpeak Ruins clear */ + && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[266]) + /* dSv_event_flag_c::F_0267 - Temple of Time - Temple of Time clear */ + && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[267]) + /* dSv_event_flag_c::F_0268 - City in the Sky - City in the Sky clear */ + && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[268])) { mpModel->getModelData()->getMaterialNodePointer(2)->getShape()->hide(); } @@ -110,9 +118,12 @@ int daObjTable_c::Create() { } } - if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[103]) && - !(!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[268]) && - dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[264]))) + /* dSv_event_flag_c::M_070 - Cutscene - [cutscene: 18] Lanayru spirit restored */ + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[103]) + /* dSv_event_flag_c::F_0268 - City in the Sky - City in the Sky clear */ + && !(!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[268]) + /* dSv_event_flag_c::F_0264 - Cutscene - Get master sword */ + && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[264]))) { mpModel->getModelData()->getMaterialNodePointer(4)->getShape()->hide(); attention_info.flags = 0; diff --git a/src/d/actor/d_a_obj_ten.cpp b/src/d/actor/d_a_obj_ten.cpp index 00d45ea78b5..850c2ad6951 100644 --- a/src/d/actor/d_a_obj_ten.cpp +++ b/src/d/actor/d_a_obj_ten.cpp @@ -686,7 +686,10 @@ static int daObjTEN_Execute(daObjTEN_c* i_this) { /* ############################################################################################## */ /* 80D0B9D0-80D0B9D4 0000E0 0004+00 1/2 0/0 0/0 .rodata l_musiya_num */ -static u16 const l_musiya_num[2] = { 0x19F, 0x1A0}; +static u16 const l_musiya_num[2] = { + 0x19F, /* dSv_event_flag_c::F_0415 - Misc. - Ladybug (M) */ + 0x1A0, /* dSv_event_flag_c::F_0416 - Misc. - Ladybug (F) */ +}; /* 80D0AD9C-80D0AF48 0026BC 01AC+00 1/1 0/0 0/0 .text CreateChk__10daObjTEN_cFv */ bool daObjTEN_c::CreateChk() { diff --git a/src/d/actor/d_a_obj_tobyhouse.cpp b/src/d/actor/d_a_obj_tobyhouse.cpp index 1ce49ad76ed..e94fbe25a90 100644 --- a/src/d/actor/d_a_obj_tobyhouse.cpp +++ b/src/d/actor/d_a_obj_tobyhouse.cpp @@ -378,6 +378,7 @@ void daObjTobyHouse_c::demoProc() { mActiveBck->setPlaySpeed(1.0f); mActiveBck->setFrame(0.0f); fopAcM_seStart(this, Z2SE_OBJ_THOUSE_CLOSE, 0); + /* dSv_event_flag_c::F_0063 - Lake Hylia - Used Fyer's cannon for first time */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[161]); break; case 2: diff --git a/src/d/actor/d_a_obj_tombo.cpp b/src/d/actor/d_a_obj_tombo.cpp index e814c61871a..50bce244e06 100644 --- a/src/d/actor/d_a_obj_tombo.cpp +++ b/src/d/actor/d_a_obj_tombo.cpp @@ -607,7 +607,10 @@ static int daObjTOMBO_Execute(daObjTOMBO_c* i_this) { } /* 80D1B7E0-80D1B7E4 000108 0004+00 1/2 0/0 0/0 .rodata l_musiya_num */ -static u16 const l_musiya_num[2] = {0x01A3, 0x01A4}; +static u16 const l_musiya_num[2] = { + 0x01A3, /* dSv_event_flag_c::F_0419 - Misc. - Dragonfly (M) */ + 0x01A4, /* dSv_event_flag_c::F_0420 - Misc. - Dragonfly (F) */ +}; /* 80D1AFC8-80D1B174 001EE8 01AC+00 1/1 0/0 0/0 .text CreateChk__12daObjTOMBO_cFv */ bool daObjTOMBO_c::CreateChk() { diff --git a/src/d/actor/d_a_obj_vground.cpp b/src/d/actor/d_a_obj_vground.cpp index 3d645fc9d47..7922da4b3d1 100644 --- a/src/d/actor/d_a_obj_vground.cpp +++ b/src/d/actor/d_a_obj_vground.cpp @@ -77,6 +77,7 @@ int daObjVGnd_c::create() { /* 80D217A8-80D21878 000448 00D0+00 2/2 0/0 0/0 .text execute__11daObjVGnd_cFv */ int daObjVGnd_c::execute() { + /* dSv_event_flag_c::M_032 - Main Event - Melted Zora river ice with magma rock */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[65])) { mpBrk->setFrame(2.0f); mpBtk->setFrame(2.0f); diff --git a/src/d/actor/d_a_obj_volcbom.cpp b/src/d/actor/d_a_obj_volcbom.cpp index 6e18b5d4e00..61370626601 100644 --- a/src/d/actor/d_a_obj_volcbom.cpp +++ b/src/d/actor/d_a_obj_volcbom.cpp @@ -206,6 +206,7 @@ int daObjVolcBom_c::CreateHeap() { /* 80D248F4-80D249D0 0007D4 00DC+00 1/1 0/0 0/0 .text create1st__14daObjVolcBom_cFv */ int daObjVolcBom_c::create1st() { + /* dSv_event_flag_c::M_032 - Main Event - Melted Zora river ice with magma rock */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[65])) { return cPhs_ERROR_e; } @@ -640,7 +641,10 @@ void daObjVolcBom_c::orderZHintEvent() { /* 80D25A08-80D25B04 0018E8 00FC+00 1/0 0/0 0/0 .text actionWait__14daObjVolcBom_cFv */ void daObjVolcBom_c::actionWait() { - if (checkTalkDistance() && dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[84])) { + if (checkTalkDistance() + /* dSv_event_flag_c::M_051 - Main Event - Shadow Kargorok (?) (Large) event complete + (Horse grass appears in various places) */ + && dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[84])) { setAction(ACTION_ORDER_EVENT); actionOrderEvent(); } diff --git a/src/d/actor/d_a_obj_warp_kbrg.cpp b/src/d/actor/d_a_obj_warp_kbrg.cpp index df1299adb65..920d70ca0fb 100644 --- a/src/d/actor/d_a_obj_warp_kbrg.cpp +++ b/src/d/actor/d_a_obj_warp_kbrg.cpp @@ -51,6 +51,7 @@ static int eventCallBack(void* i_proc, int param_1) { if (i_proc != NULL) { player_p->skipPortalObjWarp(); if (dComIfGp_TransportWarp_check()) { + /* dSv_event_flag_c::M_018 - Main Event - Brought Kakariko bridge back to original location */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[51]); // "Kakariko Bridge: Warp destination is correct" OS_REPORT("\x1B[43;30mカカリコ橋:ワープ先正解です\n\x1B[m"); @@ -242,6 +243,7 @@ int daObjWarpKBrg_c::create1st() { switch (getNameArg()) { case 0: + /* dSv_event_flag_c::M_018 - Main Event - Brought Kakariko bridge back to original location */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[51])) { // "Kakariko Bridge: already warped so creation cancelled!" OS_REPORT("\x1B[43;30mカカリコ橋:ワープさせたので発生取り消し!\n\x1B[m"); @@ -249,6 +251,7 @@ int daObjWarpKBrg_c::create1st() { } break; case 1: + /* dSv_event_flag_c::M_018 - Main Event - Brought Kakariko bridge back to original location */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[51])) { // "Kakariko Bridge: not warped so creation cancelled!" OS_REPORT("\x1B[43;30mカカリコ橋:ワープさせてないので発生取り消し!\n\x1B[m"); @@ -345,7 +348,9 @@ void daObjWarpKBrg_c::actionWait() { daMidna_c* midna_p = (daMidna_c*)daPy_py_c::getMidnaActor(); daPy_py_c* player_p = daPy_getPlayerActorClass(); - if (fopAcM_isSwitch(this, getSwbit2()) && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[54])) { + if (fopAcM_isSwitch(this, getSwbit2()) + /* dSv_event_flag_c::M_021 - Main Event - First portal warp */ + && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[54])) { setAction(ACTION_ORDER_EVENT_e); actionOrderEvent(); } @@ -509,6 +514,7 @@ void daObjWarpKBrg_c::demoProc() { } if (dComIfGp_TransportWarp_check()) { + /* dSv_event_flag_c::M_018 - Main Event - Brought Kakariko bridge back to original location */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[51]); // "Kakariko Bridge: Warp destination is correct" OS_REPORT("\x1B[43;30mカカリコ橋:ワープ先正解です\n\x1B[m"); diff --git a/src/d/actor/d_a_obj_warp_obrg.cpp b/src/d/actor/d_a_obj_warp_obrg.cpp index a7867f10ffd..e641a638b53 100644 --- a/src/d/actor/d_a_obj_warp_obrg.cpp +++ b/src/d/actor/d_a_obj_warp_obrg.cpp @@ -151,6 +151,7 @@ int daObjWarpOBrg_c::create1st() { switch (getNameArg()) { case 0: + /* dSv_event_flag_c::M_092 - Hyrule Field - Warped Eldin Bridge */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[125])) { // "Eldin Bridge: already warped so creation cancelled!" OS_REPORT("\x1B[43;30mオルディン大橋:ワープさせたので発生取り消し!\n\x1B[m"); @@ -158,6 +159,7 @@ int daObjWarpOBrg_c::create1st() { } break; case 1: + /* dSv_event_flag_c::M_092 - Hyrule Field - Warped Eldin Bridge */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[125])) { // "Eldin Bridge: not warped so creation cancelled!" OS_REPORT("\x1B[43;30mオルディン大橋:ワープさせてないので発生取り消し!\n\x1B[m"); @@ -316,19 +318,30 @@ void daObjWarpOBrg_c::actionWarpEvent() { demoProc(); if (dComIfGp_getEvent().checkSkipEdge()) { + /* dSv_event_tmp_flag_c::T_0010 - General use - General use temporary flag (flow control) A */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[11]); + /* dSv_event_tmp_flag_c::T_0011 - General use - General use temporary flag (flow control) B */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[12]); + /* dSv_event_tmp_flag_c::T_0012 - General use - General use temporary flag (flow control) C */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[13]); + /* dSv_event_tmp_flag_c::T_0013 - General use - General use temporary flag (flow control) D */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[14]); + /* dSv_event_tmp_flag_c::T_0014 - General use - General use temporary flag (flow control) E */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[15]); + /* dSv_event_tmp_flag_c::T_0051 - General use - General use temporary flag (flow control) F */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[51]); + /* dSv_event_tmp_flag_c::T_0052 - General use - General use temporary flag (flow control) G */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[52]); + /* dSv_event_tmp_flag_c::T_0053 - General use - General use temporary flag (flow control) H */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[53]); + /* dSv_event_tmp_flag_c::T_0054 - General use - General use temporary flag (flow control) I */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[54]); + /* dSv_event_tmp_flag_c::T_0055 - General use - General use temporary flag (flow control) J */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[55]); daPy_getPlayerActorClass()->skipPortalObjWarp(); if (dComIfGp_TransportWarp_check()) { + /* dSv_event_flag_c::M_092 - Hyrule Field - Warped Eldin Bridge */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[125]); // "Eldin Bridge: Warp destination is correct" OS_REPORT("\x1B[43;30mオルディン大橋:ワープ先正解です\n\x1B[m"); @@ -388,6 +401,7 @@ void daObjWarpOBrg_c::demoProc() { } if (dComIfGp_TransportWarp_check()) { + /* dSv_event_flag_c::M_092 - Hyrule Field - Warped Eldin Bridge */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[125]); // "Eldin Bridge: Warp destination is correct" OS_REPORT("\x1B[43;30mオルディン大橋:ワープ先正解です\n\x1B[m"); diff --git a/src/d/actor/d_a_obj_yousei.cpp b/src/d/actor/d_a_obj_yousei.cpp index a5aa87c2f75..91ee9804833 100644 --- a/src/d/actor/d_a_obj_yousei.cpp +++ b/src/d/actor/d_a_obj_yousei.cpp @@ -816,6 +816,7 @@ int daObjYOUSEI_c::create() { mPrm = 0; break; case 1: + /* dSv_event_flag_c::F_0501 - sub-dungeon - Cave of Ordeals - B10 first arrival */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[501])) { return cPhs_ERROR_e; } @@ -823,18 +824,21 @@ int daObjYOUSEI_c::create() { break; case 2: mPrm = 2; + /* dSv_event_flag_c::F_0502 - sub-dungeon - Cave of Ordeals - B20 first arrival */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[502])) { return cPhs_ERROR_e; } break; case 3: mPrm = 3; + /* dSv_event_flag_c::F_0503 - sub-dungeon - Cave of Ordeals - B30 first arrival */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[503])) { return cPhs_ERROR_e; } break; case 4: mPrm = 4; + /* dSv_event_flag_c::F_0504 - sub-dungeon - Cave of Ordeals - B40 first arrival */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[504])) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_passer_mng.cpp b/src/d/actor/d_a_passer_mng.cpp index d1c91812554..6621287d99f 100644 --- a/src/d/actor/d_a_passer_mng.cpp +++ b/src/d/actor/d_a_passer_mng.cpp @@ -136,6 +136,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { case 9: case 10: case 0xf: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 4)) { case 0: @@ -167,6 +168,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { break; case 3: case 0xb: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 3)) { case 0: @@ -194,6 +196,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { case 5: case 0xc: case 0xd: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 4)) { case 0: @@ -228,6 +231,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { break; case 6: case 0xe: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 3)) { case 0: @@ -252,6 +256,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { } break; case 7: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 3)) { case 0: @@ -277,6 +282,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { break; case 0x10: case 0x17: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 4)) { case 0: @@ -311,6 +317,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { break; case 0x11: case 0x18: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 4)) { case 0: @@ -342,6 +349,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { break; case 0x12: case 0x19: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 5)) { case 0: @@ -379,6 +387,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { break; case 0x13: case 0x1a: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 3)) { case 0: @@ -404,6 +413,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { break; case 0x14: case 0x1b: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 3)) { case 0: @@ -429,6 +439,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { break; case 0x15: case 0x1c: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 3)) { case 0: @@ -457,6 +468,7 @@ int daPasserMng_c::getLuggageParamHigh(u32 param_1) { break; case 0x16: case 0x1d: + /* dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x119])) { switch(cLib_getRndValue(0, 4)) { case 0: diff --git a/src/d/actor/d_a_tag_Lv8Gate.cpp b/src/d/actor/d_a_tag_Lv8Gate.cpp index e1d3cb9c516..0504a28c37f 100644 --- a/src/d/actor/d_a_tag_Lv8Gate.cpp +++ b/src/d/actor/d_a_tag_Lv8Gate.cpp @@ -51,6 +51,7 @@ inline int daTagLv8Gate_c::create() { fopAcM_SetupActor(this, daTagLv8Gate_c); cPhs__Step step; + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) { step = cPhs_ERROR_e; } else { diff --git a/src/d/actor/d_a_tag_TWgate.cpp b/src/d/actor/d_a_tag_TWgate.cpp index f303ba10676..2b793e3fd68 100644 --- a/src/d/actor/d_a_tag_TWgate.cpp +++ b/src/d/actor/d_a_tag_TWgate.cpp @@ -688,6 +688,7 @@ void daTagTWGate_c::initDemoRanail3() { dComIfGp_getEventManager().getEventIdx(this, l_zevParamTbl[mType].mInEventName, -1); dComIfGp_getEvent().reset(this); fopAcM_orderChangeEventId(this, mEventID, 1, -1); + /* dSv_event_flag_c::F_0071 - Twilight Hyrule Field - Cannot warp to Lanayru */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[170]); } diff --git a/src/d/actor/d_a_tag_bottle_item.cpp b/src/d/actor/d_a_tag_bottle_item.cpp index fb30697b471..be822812444 100644 --- a/src/d/actor/d_a_tag_bottle_item.cpp +++ b/src/d/actor/d_a_tag_bottle_item.cpp @@ -147,11 +147,15 @@ s32 daTag_BottleItem_c::orderEvent() { /* 80D56418-80D564A0 0004B8 0088+00 2/2 0/0 0/0 .text makeSoup__18daTag_BottleItem_cFv */ void daTag_BottleItem_c::makeSoup() { - if (mBottleItemType == fpcNm_ITEM_LV1_SOUP && dComIfGs_isEventBit(2)) { + if (mBottleItemType == fpcNm_ITEM_LV1_SOUP + /* dSv_event_flag_c::F_0003 - Snowpeak Ruins - Handed over tomato puree and left room */ + && dComIfGs_isEventBit(2)) { mBottleItemType = fpcNm_ITEM_LV2_SOUP; } - if (mBottleItemType == fpcNm_ITEM_LV2_SOUP && dComIfGs_isEventBit(1)) { + if (mBottleItemType == fpcNm_ITEM_LV2_SOUP + /* dSv_event_flag_c::F_0004 - Snowpeak Ruins - Handed over secret ingredient and left room */ + && dComIfGs_isEventBit(1)) { mBottleItemType = fpcNm_ITEM_LV3_SOUP; } } diff --git a/src/d/actor/d_a_tag_event.cpp b/src/d/actor/d_a_tag_event.cpp index 9fb84c11aa4..15e3adcf0ce 100644 --- a/src/d/actor/d_a_tag_event.cpp +++ b/src/d/actor/d_a_tag_event.cpp @@ -131,6 +131,7 @@ int daTag_Event_c::create() { scale.z *= 100.0f; if (horseRodeo()) { + /* Main Event - Epona rescued flag */ if (dComIfGs_isEventBit(dSv_event_flag_c::M_023)) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_tag_statue_evt.cpp b/src/d/actor/d_a_tag_statue_evt.cpp index bad73e1cf38..8d9be80cd24 100644 --- a/src/d/actor/d_a_tag_statue_evt.cpp +++ b/src/d/actor/d_a_tag_statue_evt.cpp @@ -31,8 +31,12 @@ void daTagStatue_c::initBaseMtx() { /* ############################################################################################## */ /* 805A8104-805A8110 000000 000C+00 4/4 0/0 0/0 .rodata l_event_bit */ static const u16 l_event_bit[6] = { - dSv_event_flag_c::F_0791, dSv_event_flag_c::F_0792, dSv_event_flag_c::F_0793, - dSv_event_flag_c::F_0794, dSv_event_flag_c::F_0795, dSv_event_flag_c::F_0812 + dSv_event_flag_c::F_0791, /* Sky character - Sky character 1 */ + dSv_event_flag_c::F_0792, /* Sky character - Sky character 2 */ + dSv_event_flag_c::F_0793, /* Sky character - Sky character 3 */ + dSv_event_flag_c::F_0794, /* Sky character - Sky character 4 */ + dSv_event_flag_c::F_0795, /* Sky character - Sky character 5 */ + dSv_event_flag_c::F_0812, /* N/A - N/A */ }; /* 805A7000-805A7068 000120 0068+00 2/2 0/0 0/0 .text setBaseMtx__13daTagStatue_cFv */ @@ -331,6 +335,7 @@ int daTagStatue_c::demoProc() { int item; if(getLetterCount() == 5) { item = fpcNm_ITEM_ANCIENT_DOCUMENT2; + /* Sky character - Sky character 6 */ dComIfGs_onEventBit(dSv_event_flag_c::F_0796); } else { @@ -436,9 +441,8 @@ BOOL daTagStatue_c::checkOnEffect() { return FALSE; } -/* 805A7E94-805A7F0C 000FB4 0078+00 1/1 0/0 0/0 .text getLetterCount__13daTagStatue_cFv - */ - s32 daTagStatue_c::getLetterCount() { +/* 805A7E94-805A7F0C 000FB4 0078+00 1/1 0/0 0/0 .text getLetterCount__13daTagStatue_cFv */ +s32 daTagStatue_c::getLetterCount() { s32 numLetters = 0; for(int i = 0; i < 6; i++) { if(dComIfGs_isEventBit(l_event_bit[i])) { @@ -446,8 +450,8 @@ BOOL daTagStatue_c::checkOnEffect() { } } - return numLetters; - } +return numLetters; +} /* 805A7F0C-805A7FF8 00102C 00EC+00 1/1 0/0 0/0 .text draw__13daTagStatue_cFv */ int daTagStatue_c::draw() { diff --git a/src/d/actor/d_a_tag_yami.cpp b/src/d/actor/d_a_tag_yami.cpp index dc14d6d1ac4..d268ac7d664 100644 --- a/src/d/actor/d_a_tag_yami.cpp +++ b/src/d/actor/d_a_tag_yami.cpp @@ -26,6 +26,7 @@ const static dCcD_SrcCyl l_sph_src = { int daTagYami_c::create() { fopAcM_SetupActor(this, daTagYami_c); + /* dSv_event_flag_c::F_0570 - Palace of Twilight - Cleared Palace of Twilight */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[570])) { return cPhs_ERROR_e; } diff --git a/src/d/d_com_static.cpp b/src/d/d_com_static.cpp index a8a9f4e810b..6160cfd0aa6 100644 --- a/src/d/d_com_static.cpp +++ b/src/d/d_com_static.cpp @@ -247,14 +247,17 @@ u8 daNpcKakashi_getSwdTutorialStep() { /* 80031718-80031754 02C058 003C+00 0/0 1/1 0/0 .text daNpcKakashi_getSwdTutorialResult__Fv */ bool daNpcKakashi_getSwdTutorialResult() { + /* dSv_event_tmp_flag_c::T_0004 - Ordon Village - sword tutorial - outcome */ return dComIfGs_isTmpBit(0x40); } /* 80031754-800317A4 02C094 0050+00 0/0 0/0 1/1 .text daNpcKakashi_setSwdTutorialResult__Fb */ void daNpcKakashi_setSwdTutorialResult(bool param_0) { if (param_0) { + /* dSv_event_tmp_flag_c::T_0004 - Ordon Village - sword tutorial - outcome */ dComIfGs_onTmpBit(0x40); } else { + /* dSv_event_tmp_flag_c::T_0004 - Ordon Village - sword tutorial - outcome */ dComIfGs_offTmpBit(0x40); } } diff --git a/src/d/d_event.cpp b/src/d/d_event.cpp index c2ab3acf730..36e835ae69f 100644 --- a/src/d/d_event.cpp +++ b/src/d/d_event.cpp @@ -14,15 +14,13 @@ #include "d/actor/d_a_tag_mstop.h" #include "d/d_event_debug.h" -/* 80041480-80041488 03BDC0 0008+00 1/1 0/0 0/0 .text event_debug_evnt__21@unnamed@d_event_cpp@Fv - */ +/* 80041480-80041488 03BDC0 0008+00 1/1 0/0 0/0 .text event_debug_evnt__21@unnamed@d_event_cpp@Fv */ namespace { static bool event_debug_evnt() { return false; } -/* 80041488-80041580 03BDC8 00F8+00 1/1 0/0 0/0 .text - * clear_tmpflag_for_message__21@unnamed@d_event_cpp@Fv */ +/* 80041488-80041580 03BDC8 00F8+00 1/1 0/0 0/0 .text clear_tmpflag_for_message__21@unnamed@d_event_cpp@Fv */ static void clear_tmpflag_for_message() { dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[11]); dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[12]); @@ -43,15 +41,14 @@ dEvt_control_c::dEvt_control_c() { dEvt_order_c::dEvt_order_c() {} -/* 800415D8-80041668 03BF18 0090+00 1/1 0/0 0/0 .text orderOld__14dEvt_control_cFUsUsUsUsPvPvPCv - */ +/* 800415D8-80041668 03BF18 0090+00 1/1 0/0 0/0 .text orderOld__14dEvt_control_cFUsUsUsUsPvPvPCv */ s32 dEvt_control_c::orderOld(u16 eventType, u16 priority, u16 flag, u16 hind, void* param_4, void* param_5, void const* eventName) { int eventIdx = dComIfGp_getEventManager().getEventIdx((char*)eventName, -1, -1); return order(eventType, priority, flag, hind, param_4, param_5, eventIdx, -1); } -/* 80041668-80041804 03BFA8 019C+00 3/3 13/13 0/0 .text order__14dEvt_control_cFUsUsUsUsPvPvsUc */ +/* 80041668-80041804 03BFA8 019C+00 3/3 13/13 0/0 .text order__14dEvt_control_cFUsUsUsUsPvPvsUc */ s32 dEvt_control_c::order(u16 eventType, u16 priority, u16 flag, u16 hind, void* param_4, void* param_5, s16 eventID, u8 infoIdx) { if (!(flag & 0x400) && infoIdx != 0xFF) { diff --git a/src/d/d_event_data.cpp b/src/d/d_event_data.cpp index 0893d2846bb..b624640ff14 100644 --- a/src/d/d_event_data.cpp +++ b/src/d/d_event_data.cpp @@ -883,11 +883,16 @@ void dEvDtStaff_c::specialProcDirector() { if (specTypeP != NULL) { switch (*specTypeP) { case 8: + /* dSv_event_flag_c::F_0506 - N/A - Only met Ooccoo Sr. - not yet son (shared Forest - Snowpeak) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[506])) { + /* dSv_event_flag_c::F_0566 - Ooccoo Sr. stuff - Letter from Ooccoo Sr. came in OK (no son) */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[566]); } + /* dSv_event_flag_c::F_0507 - N/A - Also met the son in dungeon with first Ooccoo Sr. meeting - + turns 506 OFF (shared Forest - Snowpeak) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[507])) { + /* dSv_event_flag_c::F_0567 - Ooccoo Sr. stuff - Letter from Ooccoo Sr. came in OK (yes son) */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[567]); } } diff --git a/src/d/d_item.cpp b/src/d/d_item.cpp index 47fdaf1cd7f..493a9bfcb20 100644 --- a/src/d/d_item.cpp +++ b/src/d/d_item.cpp @@ -1030,6 +1030,7 @@ void item_func_BILL() { } void item_func_WOOD_STATUE() { + /* dSv_event_flag_c::F_283 - Hyrule Field - Get wood carving */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[283]); dComIfGs_setItem(SLOT_21, fpcNm_ITEM_WOOD_STATUE); } diff --git a/src/d/d_map.cpp b/src/d/d_map.cpp index a54129de518..c4e68f0a82a 100644 --- a/src/d/d_map.cpp +++ b/src/d/d_map.cpp @@ -480,6 +480,7 @@ bool renderingAmap_c::isDrawIconSingle2(dTres_c::data_s const* i_data, bool para if (dComIfGp_getStartStageDarkArea() == 2) { int temp_r3 = i_data->mNo; if (temp_r3 == 0x33 || temp_r3 == 0x34 || temp_r3 == 0x35) { + /* dSv_event_flag_c::M_086 - Twilight Hyrule Field - Show Boss Bug's Tear of Light on the map */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[119])) { temp_r23_2 = true; } diff --git a/src/d/d_map_path_fmap.cpp b/src/d/d_map_path_fmap.cpp index cef7365df8a..ef683774dff 100644 --- a/src/d/d_map_path_fmap.cpp +++ b/src/d/d_map_path_fmap.cpp @@ -599,6 +599,7 @@ bool dMenuFmapIconDisp_c::isDrawDisp() { if (dComIfGp_getStartStageDarkArea() == 2) { int tres_no = mpTresData->mNo; if (tres_no == 0x33 || tres_no == 0x34 || tres_no == 0x35) { + /* dSv_event_flag_c::M_086 - Twilight Hyrule Field - Show Boss Bug's Tear of Light on the map */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[119])) { bVar1 = true; } diff --git a/src/d/d_menu_collect.cpp b/src/d/d_menu_collect.cpp index 8ac2a978d33..924e9d1b838 100644 --- a/src/d/d_menu_collect.cpp +++ b/src/d/d_menu_collect.cpp @@ -237,12 +237,19 @@ bool dMenu_Collect2D_c::isFishIconVisible() { /* 801B061C-801B071C 1AAF5C 0100+00 2/2 0/0 0/0 .text isSkillIconVisible__17dMenu_Collect2D_cFv */ bool dMenu_Collect2D_c::isSkillIconVisible() { + /* dSv_event_flag_c::F_0338 - Secret techniques - Obtained 1 secret techinques - Shield attack */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[338]) || + /* dSv_event_flag_c::F_0339 - Secret techniques - Obtained 2 secret techinques */ dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[339]) || + /* dSv_event_flag_c::F_0340 - Secret techniques - Obtained 3 secret techinques */ dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[340]) || + /* dSv_event_flag_c::F_0341 - Secret techniques - Obtained 4 secret techinques */ dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[341]) || + /* dSv_event_flag_c::F_0342 - Secret techniques - Obtained 5 secret techinques */ dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[342]) || + /* dSv_event_flag_c::F_0343 - Secret techniques - Obtained 6 secret techinques */ dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[343]) || + /* dSv_event_flag_c::F_0344 - Secret techniques - Obtained 7 secret techinques */ dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[344])) { return true; @@ -321,7 +328,9 @@ void dMenu_Collect2D_c::screenSet() { field_0x22d[1][0] = 0; field_0x22d[2][0] = 0; field_0x22d[3][0] = dComIfGs_isItemFirstBit(0x28) || - (dComIfGs_isItemFirstBit(0x3F) && !dComIfGs_isEventBit(0x302)) ? + (dComIfGs_isItemFirstBit(0x3F) + /* dSv_event_flag_c::F_0026 - Ordon Village - gave wooden sword to talo on 3rd day */ + && !dComIfGs_isEventBit(0x302)) ? true : false; @@ -329,7 +338,9 @@ void dMenu_Collect2D_c::screenSet() { if (dComIfGs_isItemFirstBit(0x28)) { mpScreen->search('ken_00')->hide(); mpScreen->search('ken_01')->show(); - } else if (dComIfGs_isItemFirstBit(0x3F) && !dComIfGs_isEventBit(0x302)) { + } else if (dComIfGs_isItemFirstBit(0x3F) + /* dSv_event_flag_c::F_0026 - Ordon Village - gave wooden sword to talo on 3rd day */ + && !dComIfGs_isEventBit(0x302)) { mpScreen->search('ken_00')->show(); mpScreen->search('ken_01')->hide(); } @@ -546,6 +557,7 @@ void dMenu_Collect2D_c::screenSet() { field_0x1d8[5][3] = 0; field_0x1d8[6][3] = 0; field_0x1d8[0][4] = dMsgObject_getSmellTypeMessageID() + 0x100; + /* dSv_event_flag_c::F_0456 - Castle Town - First time meeting with Jovani */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[456])) { field_0x1d8[1][4] = 0x12d8; } else { @@ -2556,7 +2568,9 @@ u8 dMenu_Collect3D_c::getMirrorNum() { /* 801B7504-801B75E8 1B1E44 00E4+00 4/4 0/0 0/0 .text getMaskMdlVisible__17dMenu_Collect3D_cFv */ u8 dMenu_Collect3D_c::getMaskMdlVisible() { if ((getCrystalNum() == 0 && getMirrorNum() == 0) || + /* dSv_event_flag_c::M_071 - Cutscene - [cutscene: 20] Zant appears (during Midna's desperate hour) */ (dComIfGs_isEventBit(0xC01) && !dComIfGs_isCollectMirror(0)) || + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ (dComIfGs_isEventBit(0x2B08) && !dComIfGs_isCollectCrystal(3))) { return 0; diff --git a/src/d/d_menu_dmap.cpp b/src/d/d_menu_dmap.cpp index e135452a2a0..5cca869f060 100644 --- a/src/d/d_menu_dmap.cpp +++ b/src/d/d_menu_dmap.cpp @@ -1208,9 +1208,13 @@ void dMenu_Dmap_c::screenInit() { if (dComIfGs_isDungeonItemBossKey()) { itemNo = fpcNm_ITEM_LV5_BOSS_KEY; field_0x174[2] = (u8)dComIfGs_isDungeonItemBossKey() ? fpcNm_ITEM_LV5_BOSS_KEY : 0; + /* dSv_event_flag_c::F_0003 - Snowpeak Ruins - Handed over + tomato puree and left room */ } else if (checkItemGet(fpcNm_ITEM_TOMATO_PUREE, 1) && !dComIfGs_isEventBit(2)) { itemNo = fpcNm_ITEM_TOMATO_PUREE; field_0x174[2] = fpcNm_ITEM_TOMATO_PUREE; + /* dSv_event_flag_c::F_0004 - Snowpeak Ruins - Handed over secret + ingredient and left room */ } else if (checkItemGet(fpcNm_ITEM_TASTE, 1) && !dComIfGs_isEventBit(1)) { itemNo = fpcNm_ITEM_TASTE; field_0x174[2] = fpcNm_ITEM_TASTE; diff --git a/src/d/d_menu_fmap.cpp b/src/d/d_menu_fmap.cpp index c0cefe1887b..72d80bcdef0 100644 --- a/src/d/d_menu_fmap.cpp +++ b/src/d/d_menu_fmap.cpp @@ -720,7 +720,9 @@ void dMenu_Fmap_c::all_map_proc() { mErrorSound = false; } } else if (dMw_Z_TRIGGER() && mpDraw2DTop->isWarpAccept()) { + /* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x109]) + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x169])) { mpDraw2DTop->createExplain(mpTalkHeap, mpStick); @@ -741,12 +743,15 @@ void dMenu_Fmap_c::all_map_proc() { } } else { mpDraw2DTop->createExplain(mpTalkHeap, mpStick); + /* dSv_event_flag_c::M_071 - Cutscene - [cutscene: 20] Zant appears (during Midna's desperate hour) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x68]) - && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xfa])) + /* dSv_event_flag_c::F_0250 - Cutscene - [cutscene: 21] reunion with Zelda / Midna revived (Hyrule Castle barrier appears) */ + && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xFA])) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x85d, 0, 0, 0xff, true); } else if (!mpDraw2DTop->checkWarpAcceptCannon()) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x7de, 0, 0, 0xff, true); + /* dSv_event_flag_c::F_0787 - Kakariko Village - Stopped by Midna when trying to warp the sky cannon */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x313]); } else if (!mpDraw2DTop->checkWarpAcceptRegion4()) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x7dd, 0, 0, 0xff, true); @@ -885,7 +890,9 @@ void dMenu_Fmap_c::region_map_proc() { mErrorSound = true; } } else if (dMw_Z_TRIGGER() && mpDraw2DTop->isWarpAccept()) { + /* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x109]) + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x169])) { mpDraw2DTop->createExplain(mpTalkHeap, mpStick); @@ -901,12 +908,15 @@ void dMenu_Fmap_c::region_map_proc() { Z2GetAudioMgr()->seStart(Z2SE_WARP_MAP_ON, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else { mpDraw2DTop->createExplain(mpTalkHeap, mpStick); + /* dSv_event_flag_c::M_071 - Cutscene - [cutscene: 20] Zant appears (during Midna's desperate hour) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x68]) - && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xfa])) + /* dSv_event_flag_c::F_0250 - Cutscene - [cutscene: 21] reunion with Zelda / Midna revived (Hyrule Castle barrier appears) */ + && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xFA])) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x85d, 0, 0, 0xff, true); } else if (!mpDraw2DTop->checkWarpAcceptCannon()) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x7de, 0, 0, 0xff, true); + /* dSv_event_flag_c::F_0787 - Kakariko Village - Stopped by Midna when trying to warp the sky cannon */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x313]); } else if (!mpDraw2DTop->checkWarpAcceptRegion4()) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x7dd, 0, 0, 0xff, true); @@ -1005,19 +1015,25 @@ void dMenu_Fmap_c::portal_warp_map_proc() { mpDraw2DTop->createExplain(mpTalkHeap, mpStick); dMsgObject_setPortalMessageID(portals[mPortalNo].mMessageID); + /* dSv_event_flag_c::M_071 - Cutscene - [cutscene: 20] Zant appears (during Midna's desperate hour) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x68]) - && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xfa])) + /* dSv_event_flag_c::F_0250 - Cutscene - [cutscene: 21] reunion with Zelda / Midna revived (Hyrule Castle barrier appears) */ + && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xFA])) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x85d, 0, 0, 0xff, true); + /* dSv_event_flag_c::F_0786 - Kakariko Village - Forced conversation with Shad when he sees the sky cannon */ } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x312]) + /* dSv_event_flag_c::F_0785 - Kakariko Village - Shad leaves after attempting to warp sky cannon */ && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x311])) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x7de, 0, 0, 0xff, true); + /* dSv_event_flag_c::F_0787 - Kakariko Village - Stopped by Midna when trying to warp the sky cannon */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x313]); } else if (mPortalNo == 6) { if ((!strcmp(dComIfGp_getStartStageName(), "F_SP124") && ((daMidna_c*)daPy_py_c::getMidnaActor())->checkPortalObjRide()) - || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x7d])) + /* dSv_event_flag_c::M_092 - Hyrule Field - Warped Eldin Bridge */ + || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x7D])) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x51e, 2, 0, 0xff, true); } else { @@ -1027,6 +1043,7 @@ void dMenu_Fmap_c::portal_warp_map_proc() { if ((dMeter2Info_getMapStatus() == 3 && dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo()) == 2 && dComIfGs_isOneZoneSwitch(0xf, -1)) + /* dSv_event_flag_c::M_018 - Main Event - Brought Kakariko bridge back to original location */ || dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x33])) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x51e, 2, 0, 0xff, true); @@ -1229,12 +1246,15 @@ void dMenu_Fmap_c::spot_map_proc() { } else { mpDraw2DTop->createExplain(mpTalkHeap, mpStick); + /* dSv_event_flag_c::M_071 - Cutscene - [cutscene: 20] Zant appears (during Midna's desperate hour) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x68]) - && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xfa])) + /* dSv_event_flag_c::F_0250 - Cutscene - [cutscene: 21] reunion with Zelda / Midna revived (Hyrule Castle barrier appears) */ + && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xFA])) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x85d, 0, 0, 0xff, true); } else if (!mpDraw2DTop->checkWarpAcceptCannon()) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x7de, 0, 0, 0xff, true); + /* dSv_event_flag_c::F_0787 - Kakariko Village - Stopped by Midna when trying to warp the sky cannon */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x313]); } else if (!mpDraw2DTop->checkWarpAcceptRegion4()) { mpDraw2DTop->getScrnExplainPtr()->openExplain(0x7dd, 0, 0, 0xff, true); @@ -1503,6 +1523,7 @@ void dMenu_Fmap_c::yamiboss_demo2_init() { void dMenu_Fmap_c::yamiboss_demo2_move() { if (dMsgObject_getMsgObjectClass()->getStatus() == 0xe) { mZoomLevel++; + /* dSv_event_flag_c::M_086 - Twilight Hyrule Field - Show Boss Bug's Tear of Light on the map */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x77])) { if (mZoomLevel > 90) { setProcess(PROC_YAMIBOSS_DEMO3); @@ -1510,6 +1531,7 @@ void dMenu_Fmap_c::yamiboss_demo2_move() { } else { if (mZoomLevel > 30) { field_0x30b = true; + /* dSv_event_flag_c::M_086 - Twilight Hyrule Field - Show Boss Bug's Tear of Light on the map */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x77]); } } @@ -2918,10 +2940,13 @@ void dMenu_Fmap_c::tableArrowPosInit(bool param_0) { int swbit; switch (dMeter2Info_getTableMapRegionNo()) { case dMeter_fmapHIO_c::REGION_LANAYRU: + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x169]) + /* dSv_event_flag_c::M_070 - Cutscene - [cutscene: 18] Lanayru spirit restored */ || !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x67])) { iVar5 = 0; + /* dSv_event_flag_c::F_0264 - Cutscene - Get master sword */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x108])) { swbit = 0x4f; } else { diff --git a/src/d/d_menu_fmap2D.cpp b/src/d/d_menu_fmap2D.cpp index 88821d88713..0ef70fce21d 100644 --- a/src/d/d_menu_fmap2D.cpp +++ b/src/d/d_menu_fmap2D.cpp @@ -2734,7 +2734,9 @@ bool dMenu_Fmap2DTop_c::checkWarpAcceptRegion4() { return false; } + /* dSv_event_flag_c::M_071 - Cutscene - [cutscene: 20] Zant appears (during Midna's desperate hour) */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[104]) + /* dSv_event_flag_c::F_0250 - Cutscene - [cutscene: 21] reunion with Zelda / Midna revived (Hyrule Castle barrier appears) */ && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[250])) { return false; @@ -2743,10 +2745,11 @@ bool dMenu_Fmap2DTop_c::checkWarpAcceptRegion4() { return true; } -/* 801D7B58-801D7BCC 1D2498 0074+00 1/1 3/3 0/0 .text checkWarpAcceptCannon__17dMenu_Fmap2DTop_cFv - */ +/* 801D7B58-801D7BCC 1D2498 0074+00 1/1 3/3 0/0 .text checkWarpAcceptCannon__17dMenu_Fmap2DTop_cFv */ bool dMenu_Fmap2DTop_c::checkWarpAcceptCannon() { + /* dSv_event_flag_c::F_0786 - Kakariko Village - Forced conversation with Shad when he sees the sky cannon */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[786]) + /* dSv_event_flag_c::F_0785 - Kakariko Village - Shad leaves after attempting to warp sky cannon */ && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[785])) { return false; @@ -2834,9 +2837,9 @@ void dMenu_Fmap2DTop_c::setHIO(bool param_0) { } } -/* 801D8088-801D810C 1D29C8 0084+00 1/1 3/3 0/0 .text isWarpAccept__17dMenu_Fmap2DTop_cFv - */ +/* 801D8088-801D810C 1D29C8 0084+00 1/1 3/3 0/0 .text isWarpAccept__17dMenu_Fmap2DTop_cFv */ bool dMenu_Fmap2DTop_c::isWarpAccept() { + /* dSv_event_flag_c::M_021 - Main Event - First portal warp */ if ((dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[54]) && dMeter2Info_getMapStatus() != 9 && dMeter2Info_getMapStatus() != 7 && dMeter2Info_getMapStatus() != 8) || g_fmapHIO.mPortalWarpON) @@ -2844,4 +2847,4 @@ bool dMenu_Fmap2DTop_c::isWarpAccept() { return true; } return false; -} \ No newline at end of file +} diff --git a/src/d/d_menu_insect.cpp b/src/d/d_menu_insect.cpp index 7392541cdd3..92744217cba 100644 --- a/src/d/d_menu_insect.cpp +++ b/src/d/d_menu_insect.cpp @@ -600,20 +600,39 @@ bool dMenu_Insect_c::isGetInsect(int param_0, int param_1) { return dComIfGs_isItemFirstBit(getInsectItemID(param_0, param_1)) != 0; } -/* 801D9E20-801D9E7C 1D4760 005C+00 4/4 0/0 0/0 .text isGiveInsect__14dMenu_Insect_cFii - */ +/* 801D9E20-801D9E7C 1D4760 005C+00 4/4 0/0 0/0 .text isGiveInsect__14dMenu_Insect_cFii */ bool dMenu_Insect_c::isGiveInsect(int param_0, int param_1) { static const u32 i_evtID[MAX_INSECT_NUM] = { - 0x1A5, 0x1A6, 0x1A7, 0x1A8, 0x191, 0x192, 0x19D, 0x19E, 0x195, 0x196, 0x19B, 0x19C, - 0x193, 0x194, 0x19F, 0x1A0, 0x1A1, 0x1A2, 0x199, 0x19A, 0x197, 0x198, 0x1A3, 0x1A4, + 0x1A5, /* dSv_event_flag_c::F_0421 - Misc. - Ant (M) */ + 0x1A6, /* dSv_event_flag_c::F_0422 - Misc. - Ant (F) */ + 0x1A7, /* dSv_event_flag_c::F_0423 - Misc. - Dayfly (M) */ + 0x1A8, /* dSv_event_flag_c::F_0424 - Misc. - Dayfly (F) */ + 0x191, /* dSv_event_flag_c::F_0401 - Misc. - Beetle (M) */ + 0x192, /* dSv_event_flag_c::F_0402 - Misc. - Beetle (F) */ + 0x19D, /* dSv_event_flag_c::F_0413 - Misc. - Mantis (M) */ + 0x19E, /* dSv_event_flag_c::F_0414 - Misc. - Mantis (F) */ + 0x195, /* dSv_event_flag_c::F_0405 - Misc. - Stag beetle (M) */ + 0x196, /* dSv_event_flag_c::F_0406 - Misc. - Stag beetle (F) */ + 0x19B, /* dSv_event_flag_c::F_0411 - Misc. - Pill bug (M) */ + 0x19C, /* dSv_event_flag_c::F_0412 - Misc. - Pill bug (F) */ + 0x193, /* dSv_event_flag_c::F_0403 - Misc. - Butterfly (M) */ + 0x194, /* dSv_event_flag_c::F_0404 - Misc. - Butterfly (F) */ + 0x19F, /* dSv_event_flag_c::F_0415 - Misc. - Ladybug (M) */ + 0x1A0, /* dSv_event_flag_c::F_0416 - Misc. - Ladybug (F) */ + 0x1A1, /* dSv_event_flag_c::F_0417 - Misc. - Snail (M) */ + 0x1A2, /* dSv_event_flag_c::F_0418 - Misc. - Snail (F) */ + 0x199, /* dSv_event_flag_c::F_0409 - Misc. - Phasmid (M) */ + 0x19A, /* dSv_event_flag_c::F_0410 - Misc. - Phasmid (F) */ + 0x197, /* dSv_event_flag_c::F_0407 - Misc. - Grasshopper (M) */ + 0x198, /* dSv_event_flag_c::F_0408 - Misc. - Grasshopper (F) */ + 0x1A3, /* dSv_event_flag_c::F_0419 - Misc. - Dragonfly (M) */ + 0x1A4, /*dSv_event_flag_c::F_0420 - Misc. - Dragonfly (F) */ }; - return dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_evtID[param_0 + param_1 * 6]]) != - 0; + return dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_evtID[param_0 + param_1 * 6]]) != 0; } -/* 801D9E7C-801D9ED4 1D47BC 0058+00 1/1 0/0 0/0 .text isCatchInsect__14dMenu_Insect_cFUc - */ +/* 801D9E7C-801D9ED4 1D47BC 0058+00 1/1 0/0 0/0 .text isCatchInsect__14dMenu_Insect_cFUc */ bool dMenu_Insect_c::isCatchInsect(u8 i_insectID) { if (i_insectID >= fpcNm_ITEM_M_BEETLE && i_insectID <= fpcNm_ITEM_F_MAYFLY) { return dComIfGs_isItemFirstBit(i_insectID); @@ -621,8 +640,7 @@ bool dMenu_Insect_c::isCatchInsect(u8 i_insectID) { return false; } -/* 801D9ED4-801D9F3C 1D4814 0068+00 1/1 0/0 0/0 .text isGiveInsect__14dMenu_Insect_cFUc - */ +/* 801D9ED4-801D9F3C 1D4814 0068+00 1/1 0/0 0/0 .text isGiveInsect__14dMenu_Insect_cFUc */ bool dMenu_Insect_c::isGiveInsect(u8 i_insectID) { if (i_insectID >= fpcNm_ITEM_M_BEETLE && i_insectID <= fpcNm_ITEM_F_MAYFLY) { int label = i_insectID + 0xd1; diff --git a/src/d/d_menu_skill.cpp b/src/d/d_menu_skill.cpp index abf8791594f..4581f400fc0 100644 --- a/src/d/d_menu_skill.cpp +++ b/src/d/d_menu_skill.cpp @@ -646,7 +646,13 @@ void dMenu_Skill_c::setNameString(u16 i_stringID) { /* 801F9470-801F9500 1F3DB0 0090+00 1/1 0/0 0/0 .text getSkillNum__13dMenu_Skill_cFv */ u8 dMenu_Skill_c::getSkillNum() { static u32 evt_id[7] = { - 339, 338, 340, 341, 342, 343, 344, + 339, /* dSv_event_flag_c::F_0339 - Secret techniques - Obtained 2 secret techinques */ + 338, /* dSv_event_flag_c::F_0338 - Secret techniques - Obtained 1 secret techinques - Shield attack */ + 340, /* dSv_event_flag_c::F_0340 - Secret techniques - Obtained 3 secret techinques */ + 341, /* dSv_event_flag_c::F_0341 - Secret techniques - Obtained 4 secret techinques */ + 342, /* dSv_event_flag_c::F_0342 - Secret techniques - Obtained 5 secret techinques */ + 343, /* dSv_event_flag_c::F_0343 - Secret techniques - Obtained 6 secret techinques */ + 344, /* dSv_event_flag_c::F_0344 - Secret techniques - Obtained 7 secret techinques */ }; u8 skillNum = 0; @@ -721,4 +727,4 @@ void dMenu_Skill_c::setHIO(bool i_useHIO) { g_drawHIO.mCollectScreen.mButtonBTextScale); } } -} \ No newline at end of file +} diff --git a/src/d/d_meter2.cpp b/src/d/d_meter2.cpp index 8847e5e502f..688e0499223 100644 --- a/src/d/d_meter2.cpp +++ b/src/d/d_meter2.cpp @@ -245,11 +245,15 @@ int dMeter2_c::_create() { int dMeter2_c::_execute() { JKRHeap* heap = mDoExt_setCurrentHeap(mpHeap); - if (!dComIfGs_isCollectMirror(0) && dComIfGs_isEventBit(dSv_event_flag_c::F_0685)) { + if (!dComIfGs_isCollectMirror(0) + /* dSv_event_flag_c::F_0685 - Cutscene - (Cutscene 32) Sage appears, get first Mirror of Twilight shard */ + && dComIfGs_isEventBit(dSv_event_flag_c::F_0685)) { dComIfGs_onCollectMirror(0); } - if (!dComIfGs_isCollectCrystal(3) && dComIfGs_isEventBit(dSv_event_flag_c::F_0686)) { + if (!dComIfGs_isCollectCrystal(3) + /* dSv_event_flag_c::F_0686 - Palace of Twilight - Get fused shadow piece (final mask) */ + && dComIfGs_isEventBit(dSv_event_flag_c::F_0686)) { dComIfGs_onCollectCrystal(3); } diff --git a/src/d/d_meter2_draw.cpp b/src/d/d_meter2_draw.cpp index e5ad2079cbe..d260b1efe06 100644 --- a/src/d/d_meter2_draw.cpp +++ b/src/d/d_meter2_draw.cpp @@ -3160,8 +3160,13 @@ void dMeter2Draw_c::setButtonIconMidonaAlpha(u32 param_0) { bool var_r31 = 1; if (getCanoeFishing() || + /*dSv_event_flag_c::M_009 - Cutscene - [cutscene: 6B] Prison escape - Midna rides on back */ (!dComIfGs_isEventBit(0x0540) && !dMeter2Info_isUseButton(0x800)) || - !dComIfGs_isEventBit(0x0C10) || dComIfGs_isEventBit(0x6140)) + /* dSv_event_flag_c::M_067 - Main Event - Midna riding / not riding (ON == riding) */ + !dComIfGs_isEventBit(0x0C10) || + /* dSv_event_flag_c::F_0800 - Cutscene - After returning to Ordon Woods, until Midna comes out of the shadows + (If 800 is ON, Midna can't be called) */ + dComIfGs_isEventBit(0x6140)) { var_f29 = 0.0f; } else if (dComIfGp_isPauseFlag()) { diff --git a/src/d/d_meter_map.cpp b/src/d/d_meter_map.cpp index cb6c0bbb847..eb6a7b4e274 100644 --- a/src/d/d_meter_map.cpp +++ b/src/d/d_meter_map.cpp @@ -258,6 +258,7 @@ void dMeterMap_c::_create(J2DScreen* unused) { field_0x2e = 0; field_0x28 = 0; field_0x30 = 0; + /* dSv_event_flag_c::M_085 - Twilight Hyrule Field - Midna dialogue right before Boss Bug's Tear of Light appears */ field_0x2b = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118]); } @@ -282,10 +283,13 @@ void dMeterMap_c::_delete() { /* 8020DCE4-8020DF1C 208624 0238+00 0/0 1/1 0/0 .text _move__11dMeterMap_cFUl */ void dMeterMap_c::_move(u32 param_0) { + /* dSv_event_flag_c::M_085 - Twilight Hyrule Field - Midna dialogue right before Boss Bug's Tear of Light appears */ if (!field_0x2b && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118])) { if (strcmp(dComIfGp_getStartStageName(), "F_SP115") == 0) { + /* dSv_event_flag_c::M_086 - Twilight Hyrule Field - Show Boss Bug's Tear of Light on the map */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[119]); } else { + /* dSv_event_flag_c::M_085 - Twilight Hyrule Field - Midna dialogue right before Boss Bug's Tear of Light appears */ field_0x2b = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118]); dMeter2Info_setPauseStatus(2); } diff --git a/src/d/d_msg_object.cpp b/src/d/d_msg_object.cpp index 1c86837757b..d09a28e72f6 100644 --- a/src/d/d_msg_object.cpp +++ b/src/d/d_msg_object.cpp @@ -1166,10 +1166,13 @@ void dMsgObject_c::inputProc() { if (isSend()) { field_0x199 = 0; if (mDoCPd_c::getTrigA(0)) { + /* dSv_event_tmp_flag_c::T_0080 - Kakariko Village - Put money in fundraiser box */ BOOL iVar2 = dComIfGs_isTmpBit(dSv_event_tmp_flag_c::tempBitLabels[80]); + /* dSv_event_flag_c::F_0802 - Faron Woods - Trill attacks when stealing */ if (getInputValue() > 0 && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[802])) { onPaymentFlagLocal(); } + dComIfGp_setItemRupeeCount(-getInputValue()); if (iVar2) { if (getInputValue() > 0) { @@ -1177,17 +1180,21 @@ void dMsgObject_c::inputProc() { getFundRaisingValue(); dMsgObject_getFundRaising(); if (dMsgObject_getFundRaising() >= getFundRaisingValue() && + /* dSv_event_flag_c::M_091 - Kakariko Village - Buy out fundraiser amount (Malo becomes nice) */ !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[124])) { + /* dSv_event_flag_c::F_0376 - Kakariko Village - Gathered funds for bridge repair! (set by program after raising funds) */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[376])) { dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[376]); dMsgObject_setFundRaising(0); } else { + /* dSv_event_flag_c::M_091 - Kakariko Village - Buy out fundraiser amount (Malo becomes nice) */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[124]); dMsgObject_setFundRaising(0); } } } else { + /* dSv_event_tmp_flag_c::T_0080 - Kakariko Village - Put money in fundraiser box */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[80]); } } else { @@ -1197,6 +1204,7 @@ void dMsgObject_c::inputProc() { dMeter2Info_offShopTalkFlag(); setStatusLocal(14); } else if (mDoCPd_c::getTrigB(0)) { + /* dSv_event_tmp_flag_c::T_0080 - Kakariko Village - Put money in fundraiser box */ dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[80]); dMeter2Info_offShopTalkFlag(); setStatusLocal(14); diff --git a/src/d/d_s_menu.cpp b/src/d/d_s_menu.cpp index 8493530afb9..d3bec25c296 100644 --- a/src/d/d_s_menu.cpp +++ b/src/d/d_s_menu.cpp @@ -724,6 +724,7 @@ int dScnMenu_Draw(dScnMenu_c* i_this) { JUTReport(400, 420, "Z:鎧固定"); } + /* Main Event - Midna riding / not riding (ON == riding) */ if (dComIfGs_isEventBit(dSv_event_flag_c::M_067)) { // "Midna ON" JUTReport(500, 420, "ミドナON"); @@ -758,9 +759,13 @@ int toGameScene(dScnMenu_c* i_this) { } if (strcmp(dComIfGp_getNextStageName(), "OPENING") == 0) { + /* Main Event - when OFF, wolf carries sword and shield on back */ dComIfGs_offEventBit(dSv_event_flag_c::M_068); + /* Main Event - Get shadow crystal (can now transform) */ dComIfGs_offEventBit(dSv_event_flag_c::M_077); + /* dSv_event_flag_c::F_0550 - Main Event - Gain ability to use sense */ dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[550]); + /* Secret techniques - Obtained 1 secret techinques - Shield attack */ dComIfGs_offEventBit(dSv_event_flag_c::F_0338); rt = fopScnM_ChangeReq(i_this, PROC_PLAY_SCENE, 0, 5); dComIfGs_init(); @@ -774,6 +779,7 @@ int toGameScene(dScnMenu_c* i_this) { strcmp(dComIfGp_getNextStageName(), "D_MN04A") == 0 || strcmp(dComIfGp_getNextStageName(), "F_SP127") == 0) { + /* Main Event - Get shadow crystal (can now transform) */ dComIfGs_offEventBit(dSv_event_flag_c::M_077); } @@ -1048,48 +1054,77 @@ void setEnvData(menu_data_class* i_data) { dComIfGs_onTransformLV(1); dComIfGs_onTransformLV(2); dComIfGs_onTransformLV(3); + /* Cutscene - [cutscene: 21] reunion with Zelda / Midna revived (Hyrule Castle barrier appears) */ dComIfGs_onEventBit(dSv_event_flag_c::F_0250); } else if (memcmp(&i_data->env_data[i], "奥1", 4) == 0) { // Hidden Skill 1 + /* Secret techniques - Obtained 2 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0339); } else if (memcmp(&i_data->env_data[i], "奥2", 4) == 0) { // Hidden Skill 2 + /* Secret techniques - Obtained 1 secret techinques - Shield attack */ dComIfGs_onEventBit(dSv_event_flag_c::F_0338); + /* Secret techniques - Obtained 2 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0339); } else if (memcmp(&i_data->env_data[i], "奥3", 4) == 0) { // Hidden Skill 3 + /* Secret techniques - Obtained 1 secret techinques - Shield attack */ dComIfGs_onEventBit(dSv_event_flag_c::F_0338); + /* Secret techniques - Obtained 2 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0339); + /* Secret techniques - Obtained 3 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0340); } else if (memcmp(&i_data->env_data[i], "奥4", 4) == 0) { // Hidden Skill 4 + /* Secret techniques - Obtained 1 secret techinques - Shield attack */ dComIfGs_onEventBit(dSv_event_flag_c::F_0338); + /* Secret techniques - Obtained 2 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0339); + /* Secret techniques - Obtained 3 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0340); + /* Secret techniques - Obtained 4 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0341); } else if (memcmp(&i_data->env_data[i], "奥5", 4) == 0) { // Hidden Skill 5 + /* Secret techniques - Obtained 1 secret techinques - Shield attack */ dComIfGs_onEventBit(dSv_event_flag_c::F_0338); + /* Secret techniques - Obtained 2 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0339); + /* Secret techniques - Obtained 3 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0340); + /* Secret techniques - Obtained 4 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0341); + /* Secret techniques - Obtained 5 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0342); } else if (memcmp(&i_data->env_data[i], "奥6", 4) == 0) { // Hidden Skill 6 + /* Secret techniques - Obtained 1 secret techinques - Shield attack */ dComIfGs_onEventBit(dSv_event_flag_c::F_0338); + /* Secret techniques - Obtained 2 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0339); + /* Secret techniques - Obtained 3 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0340); + /* Secret techniques - Obtained 4 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0341); + /* Secret techniques - Obtained 5 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0342); + /* Secret techniques - Obtained 6 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0343); } else if (memcmp(&i_data->env_data[i], "奥7", 4) == 0) { // Hidden Skill 7 + /* Secret techniques - Obtained 1 secret techinques - Shield attack */ dComIfGs_onEventBit(dSv_event_flag_c::F_0338); + /* Secret techniques - Obtained 2 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0339); + /* Secret techniques - Obtained 3 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0340); + /* Secret techniques - Obtained 4 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0341); + /* Secret techniques - Obtained 5 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0342); + /* Secret techniques - Obtained 6 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0343); + /* Secret techniques - Obtained 7 secret techinques */ dComIfGs_onEventBit(dSv_event_flag_c::F_0344); } } @@ -1362,8 +1397,11 @@ block_24: } if (mDoCPd_c::getTrigA(PAD_3)) { - if (dComIfGs_isEventBit(dSv_event_flag_c::M_067) != 0) { + /* Main Event - Midna riding / not riding (ON == riding) */ + if (dComIfGs_isEventBit(dSv_event_flag_c::M_067)) { + /* Main Event - Midna riding / not riding (ON == riding) */ dComIfGs_offEventBit(dSv_event_flag_c::M_067); + /* Inside Hyrule Castle - Midna removes wolf's chains in prison */ dComIfGs_offEventBit(dSv_event_flag_c::M_011); dComIfGs_offGetMagicUseFlag(); @@ -1371,7 +1409,9 @@ block_24: dComIfGs_offLightDropGetFlag(i); } } else { + /* Main Event - Midna riding / not riding (ON == riding) */ dComIfGs_onEventBit(dSv_event_flag_c::M_067); + /* Inside Hyrule Castle - Midna removes wolf's chains in prison */ dComIfGs_onEventBit(dSv_event_flag_c::M_011); for (int i = 0; i < 4; i++) { @@ -1590,8 +1630,11 @@ int phase_2(dScnMenu_c* i_this) { fapGmHIO_onMenu(); i_this->current_category = menu_info->stage_data[l_cursolID].field_0x43; + /* Main Event - Get shadow crystal (can now transform) */ dComIfGs_onEventBit(dSv_event_flag_c::M_077); + /* Main Event - when OFF, wolf carries sword and shield on back */ dComIfGs_onEventBit(dSv_event_flag_c::M_068); + /* dSv_event_flag_c::F_0550 - Main Event - Gain ability to use sense */ dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[550]); return cPhs_COMPLEATE_e; } @@ -1681,6 +1724,7 @@ void dScnMenu_setPlayerDebugMode() { dComIfGp_setMaxOxygen(600); dComIfGp_setOxygen(600); g_dComIfG_gameInfo.info.getSavedata().getSave(17).getBit().onDungeonItemBossKey(); + /* Main Event - Midna riding / not riding (ON == riding) */ dComIfGs_onEventBit(dSv_event_flag_c::M_067); if (strcmp(dComIfGp_getNextStageName(), "D_MN54") == 0) { diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index 6e7ea02027c..64c7e425db7 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -124,6 +124,7 @@ u16 dSv_player_status_a_c::getRupeeMax() const { void dSv_player_status_a_c::onMagicFlag(u8 i_magic) { JUT_ASSERT(203, 0 <= i_magic && i_magic < 8); if (i_magic == 0) { + /* Main Event - Can use magic */ dComIfGs_onEventBit(dSv_event_flag_c::M_097); } @@ -133,6 +134,7 @@ void dSv_player_status_a_c::onMagicFlag(u8 i_magic) { void dSv_player_status_a_c::offMagicFlag(u8 i_magic) { JUT_ASSERT(222, 0 <= i_magic && i_magic < 8); if (i_magic == 0) { + /* Main Event - Can use magic */ dComIfGs_offEventBit(dSv_event_flag_c::M_097); } @@ -143,6 +145,7 @@ void dSv_player_status_a_c::offMagicFlag(u8 i_magic) { BOOL dSv_player_status_a_c::isMagicFlag(u8 i_magic) const { JUT_ASSERT(241, 0 <= i_magic && i_magic < 8); if (i_magic == 0) { + /* Main Event - Can use magic */ return dComIfGs_isEventBit(dSv_event_flag_c::M_097); } @@ -249,8 +252,7 @@ void dSv_player_field_last_stay_info_c::init() { } } -/* 80032DE0-80032E4C 02D720 006C+00 0/0 2/2 0/0 .text - * set__33dSv_player_field_last_stay_info_cFPCcRC4cXyzsScUc */ +/* 80032DE0-80032E4C 02D720 006C+00 0/0 2/2 0/0 .text set__33dSv_player_field_last_stay_info_cFPCcRC4cXyzsScUc */ void dSv_player_field_last_stay_info_c::set(const char* i_name, const cXyz& i_pos, s16 i_angle, s8 i_spawn, u8 i_regionNo) { JUT_ASSERT(468, strlen(i_name) <= 7); @@ -261,8 +263,7 @@ void dSv_player_field_last_stay_info_c::set(const char* i_name, const cXyz& i_po mRegionNo = i_regionNo; } -/* 80032E4C-80032E78 02D78C 002C+00 0/0 1/1 0/0 .text - * onRegionBit__33dSv_player_field_last_stay_info_cFi */ +/* 80032E4C-80032E78 02D78C 002C+00 0/0 1/1 0/0 .text onRegionBit__33dSv_player_field_last_stay_info_cFi */ void dSv_player_field_last_stay_info_c::onRegionBit(int i_region) { if (i_region >= 0 && i_region < 8) { mRegion |= (u8)(1 << i_region); @@ -271,8 +272,7 @@ void dSv_player_field_last_stay_info_c::onRegionBit(int i_region) { } } -/* 80032E78-80032EB0 02D7B8 0038+00 0/0 2/2 0/0 .text - * isRegionBit__33dSv_player_field_last_stay_info_cCFi */ +/* 80032E78-80032EB0 02D7B8 0038+00 0/0 2/2 0/0 .text isRegionBit__33dSv_player_field_last_stay_info_cCFi */ BOOL dSv_player_field_last_stay_info_c::isRegionBit(int i_region) const { if (i_region >= 0 && i_region < 8) { return (mRegion & (u8)(1 << i_region)) ? TRUE : FALSE; @@ -682,8 +682,7 @@ void dSv_player_item_c::setRodTypeLevelUp() { } } -/* 80033D40-80033E40 02E680 0100+00 0/0 2/2 0/0 .text setBaitItem__17dSv_player_item_cFUc - */ +/* 80033D40-80033E40 02E680 0100+00 0/0 2/2 0/0 .text setBaitItem__17dSv_player_item_cFUc */ void dSv_player_item_c::setBaitItem(u8 i_itemNo) { switch (i_itemNo) { case fpcNm_ITEM_BEE_CHILD: { @@ -751,8 +750,7 @@ BOOL dSv_player_get_item_c::isFirstBit(u8 i_itemno) const { return mItemFlags[index] & (1 << bit) ? TRUE : FALSE; } -/* 80033F00-80033F6C 02E840 006C+00 1/1 0/0 0/0 .text init__24dSv_player_item_record_cFv - */ +/* 80033F00-80033F6C 02E840 006C+00 1/1 0/0 0/0 .text init__24dSv_player_item_record_cFv */ void dSv_player_item_record_c::init() { mArrowNum = 0; @@ -1302,27 +1300,23 @@ void dSv_event_c::onEventBit(u16 i_no) { mEvent[i_no >> 8] |= (u8)i_no; } -/* 800349A4-800349BC 02F2E4 0018+00 1/1 14/14 23/23 .text offEventBit__11dSv_event_cFUs - */ +/* 800349A4-800349BC 02F2E4 0018+00 1/1 14/14 23/23 .text offEventBit__11dSv_event_cFUs */ void dSv_event_c::offEventBit(u16 i_no) { mEvent[i_no >> 8] &= ~(u8)i_no; } -/* 800349BC-800349E0 02F2FC 0024+00 3/3 77/77 153/153 .text isEventBit__11dSv_event_cCFUs - */ +/* 800349BC-800349E0 02F2FC 0024+00 3/3 77/77 153/153 .text isEventBit__11dSv_event_cCFUs */ BOOL dSv_event_c::isEventBit(const u16 i_no) const { return mEvent[i_no >> 8] & (i_no & 0xFF) ? TRUE : FALSE; } -/* 800349E0-80034A04 02F320 0024+00 0/0 12/12 17/17 .text setEventReg__11dSv_event_cFUsUc - */ +/* 800349E0-80034A04 02F320 0024+00 0/0 12/12 17/17 .text setEventReg__11dSv_event_cFUsUc */ void dSv_event_c::setEventReg(const u16 i_reg, u8 i_no) { mEvent[i_reg >> 8] &= ~(u8)i_reg; mEvent[i_reg >> 8] |= i_no; } -/* 80034A04-80034A1C 02F344 0018+00 0/0 19/19 20/20 .text getEventReg__11dSv_event_cCFUs - */ +/* 80034A04-80034A1C 02F344 0018+00 0/0 19/19 20/20 .text getEventReg__11dSv_event_cCFUs */ u8 dSv_event_c::getEventReg(u16 i_reg) const { return (u8)i_reg & mEvent[i_reg >> 8]; } @@ -2251,7 +2245,7 @@ u16 dSv_event_flag_c::saveBitLabels[822] = { F_0525, F_0526, F_0527, F_0528, F_0529, F_0530, F_0531, F_0532, F_0533, F_0534, F_0535, F_0536, F_0537, F_0538, F_0539, F_0540, F_0541, F_0542, F_0543, F_0544, F_0545, F_0546, F_0547, F_0548, F_0549, F_0550, F_0551, F_0552, F_0553, F_0554, F_0555, F_0556, F_0557, F_0558, F_0559, F_0560, - F_0561, F_0562, F_0563, F_0564, F_0565, F_0566, F_0567, F_0568, F_0569, F_0570, F_0571, F_0572, + F_0561, F_0562, F_0563, F_0564, F_0565, F_0566, F_0567, F_0568, F_0569, F_0570, F_0571, F_0572, F_0573, F_0574, F_0575, F_0576, F_0577, F_0578, F_0579, F_0580, F_0581, F_0582, F_0583, F_0584, F_0585, F_0586, F_0587, F_0588, F_0589, F_0590, F_0591, F_0592, F_0593, F_0594, F_0595, F_0596, F_0597, F_0598, F_0599, F_0600, F_0601, UNUSED, F_0700, F_0701, F_0702, F_0606, F_0607, F_0608, diff --git a/src/d/d_save_HIO.cpp b/src/d/d_save_HIO.cpp index 1ab54d595b7..389458ba099 100644 --- a/src/d/d_save_HIO.cpp +++ b/src/d/d_save_HIO.cpp @@ -224,8 +224,9 @@ void dSvBit_HIO_c::init() { mDarkness.init(); mTransform.init(); mOther.init(); + /* Main Event - Get shadow crystal (can now transform) */ mTransformFlag = field_0x49d = dComIfGs_isEventBit(dSv_event_flag_c::M_077); } /* 804307EC-80430C90 05D50C 04A0+04 1/1 2/2 0/0 .bss g_save_bit_HIO */ -dSvBit_HIO_c g_save_bit_HIO; \ No newline at end of file +dSvBit_HIO_c g_save_bit_HIO;