Fix some version differences (#852)

* Fix some version differences

* Found real inline name for checkBowMiniGame
This commit is contained in:
LagoLunatic
2025-08-12 16:30:44 -04:00
committed by GitHub
parent c5878bf068
commit 2eaf012e4f
40 changed files with 515 additions and 275 deletions
+9 -9
View File
@@ -365,7 +365,7 @@ config.libs = [
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "m_Do/m_Do_Reset.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "m_Do/m_Do_dvd_thread.cpp"),
Object(Matching, "m_Do/m_Do_DVDError.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "m_Do/m_Do_MemCard.cpp"),
Object(Matching, "m_Do/m_Do_MemCard.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "m_Do/m_Do_MemCardRWmng.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "m_Do/m_Do_gba_com.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "m_Do/m_Do_machine_exception.cpp"),
@@ -1364,14 +1364,14 @@ config.libs = [
ActorRel(Matching, "d_a_coming3", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_demo_dk"),
ActorRel(Matching, "d_a_demo_kmm"),
ActorRel(Equivalent, "d_a_door10", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Equivalent, "d_a_door10", extra_cflags=['-pragma "nosyminline on"']), # weak func order
ActorRel(Matching, "d_a_dr"),
ActorRel(Equivalent, "d_a_dr2"),
ActorRel(Matching, "d_a_ep", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_floor"),
ActorRel(Matching, "d_a_grass"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_hitobj", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_hot_floor", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_hot_floor", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_ikari"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_jbo", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_kaji"),
@@ -1399,7 +1399,7 @@ config.libs = [
ActorRel(Matching, "d_a_obj_Ygush00", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_akabe"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_barrel", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_barrel2", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_obj_barrel2", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_bscurtain", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_obj_cafelmp"),
ActorRel(NonMatching, "d_a_obj_coming"),
@@ -1408,10 +1408,10 @@ config.libs = [
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_doguu_demo"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_gryw00", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_obj_hfuck1", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_hole", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_obj_hole", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_obj_ice", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_ikada", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_kanat"),
ActorRel(Matching, "d_a_obj_kanat"),
ActorRel(Matching, "d_a_obj_leaves", extra_cflags=["-sym off"]),
ActorRel(Matching, "d_a_obj_lpalm"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_monument"),
@@ -1423,7 +1423,7 @@ config.libs = [
ActorRel(Equivalent, "d_a_obj_pirateship", extra_cflags=['-pragma "nosyminline on"']), # weak func order
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_quake"),
ActorRel(NonMatching, "d_a_obj_rcloud"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_roten", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_obj_roten", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_shelf"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_shmrgrd", extra_cflags=["-sym off"]),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_swpush", extra_cflags=['-pragma "nosyminline on"']),
@@ -1455,7 +1455,7 @@ config.libs = [
ActorRel(Matching, "d_a_tag_event"),
ActorRel(Matching, "d_a_tag_evsw", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_tag_ghostship"),
ActorRel(Equivalent, "d_a_tag_hint", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Equivalent, "d_a_tag_hint", extra_cflags=['-pragma "nosyminline on"']), # weak func order
ActorRel(Matching, "d_a_tag_kb_item"),
ActorRel(Equivalent, "d_a_tag_kk1", extra_cflags=['-pragma "nosyminline on"']), # weak func order
ActorRel(NonMatching, "d_a_tag_light"),
@@ -1663,7 +1663,7 @@ config.libs = [
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_eayogn"),
ActorRel(Matching, "d_a_obj_ebomzo", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_ekskz"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_eskban", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_obj_eskban", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_ferris", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_figure", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_firewall"),
+2 -2
View File
@@ -47,7 +47,7 @@ public:
f32 getBlurRate() { return m_blur_rate[fopAcM_GetParam(this)]; }
u8 getSeType() { return m_se_type[fopAcM_GetParam(this)]; }
void getFlameTimer() {}
int getFlameTimer() { return m2C4; }
void getNowMode() {}
void setNowMode(int) {}
void moveStateInit(f32 speedForward, f32 speedY, s16 angleY) {
@@ -62,7 +62,7 @@ public:
}
}
void setRotAngleSpeed(s16 speed) { m2C2 = speed; }
void setThrow(s16) {} // maybe m2BA
void setThrow(s16 param_0) { m2BA = param_0; }
void getTopPos(cXyz*);
void getBlurRootPos(cXyz*);
+1 -1
View File
@@ -72,7 +72,7 @@ public:
void setCattleRoomNo(s8 roomNo) { m_cattleRoomNo = roomNo; }
static bool isPlayerRoom(int idx) { return m_playerRoom[idx]; }
static bool isPlayerRoom_Goat() { return isPlayerRoom(1) == 1; }
static bool isPlayerRoom_Goat() { return isPlayerRoom(1) == true; }
cPhs_State create();
BOOL createHeap();
+2 -2
View File
@@ -98,7 +98,7 @@ public:
/* 0x041 */ DEMO_FOODSET_e = 65,
/* 0x042 */ DEMO_SWAIT_e = 66,
/* 0x043 */ DEMO_PWAIT_067_e = 67,
/* 0x044 */ DEMO_UNK_068_e = 68,
/* 0x044 */ DEMO_BOW_MINIGAME_e = 68,
/* 0x045 */ DEMO_SHIPSIT_e = 69,
/* 0x046 */ DEMO_UNK_070_e = 70,
/* 0x047 */ DEMO_SHIPOFF_e = 71,
@@ -551,7 +551,7 @@ public:
void setFace(daPy_FACE face) { mFace = face; }
BOOL checkSwordMiniGame() const { return dComIfGp_getMiniGameType() == 2; }
void checkBowMiniGame() const {}
BOOL checkBowMiniGame() const { return mDemo.getDemoMode() == daPy_demo_c::DEMO_BOW_MINIGAME_e; }
void checkSoupPowerUp() const {}
void checkSubjectAccept() const {}
void getRopeJumpLand() const {}
+1 -1
View File
@@ -1865,7 +1865,7 @@ public:
BOOL allTrigger() const { return mItemTrigger & (BTN_A | BTN_B | BTN_X | BTN_Y | BTN_Z); }
void otherWeaponTrigger() const {}
BOOL checkPlayerDemoMode() const { return mDemo.getDemoType() != 0; }
BOOL checkPlayerDemoMode() const { return mDemo.getDemoType() != 0; }
void checkSpecialDemoMode() const {}
f32 getAnmSpeedStickRate(f32 param_0, f32 param_1) {
+2 -2
View File
@@ -230,8 +230,8 @@ public:
fopAc_ac_c* getLook2Target() { return mLook[1].getLookTarget(); }
fopAc_ac_c* getZHintTarget() { return mHint.getZHintTarget(); }
int ZHintRequest(fopAc_ac_c* param_1, int param_2) {
return mHint.request(param_1, param_2);
int ZHintRequest(fopAc_ac_c* i_actor, int priority) {
return mHint.request(i_actor, priority);
}
int GetLockonCount() { return mLockonCount; }
+36 -11
View File
@@ -354,6 +354,7 @@ public:
void setStageNameDelete() { mPlacenameState = 0; }
void setStageNameOff() { mPlacenameState = 1; }
u8 getGameoverStatus() { return mGameoverStatus; }
void setGameoverStatus(u8 stts) { mGameoverStatus = stts; }
fopAc_ac_c* getPlayer(int idx) { return mPlayerInfo[idx].mpPlayer; }
@@ -375,6 +376,7 @@ public:
mItemTimer = timer;
mStartItemTimer = false;
}
void startItemTimer() { mStartItemTimer = true; }
int getMessageRupee() { return mMessageRupee; }
void setMessageRupee(s16 count) { mMessageRupee = count; }
@@ -497,7 +499,7 @@ public:
void setPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[param_0][i] |= flag; }
void clearPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[param_0][i] &= ~flag; }
BOOL checkPlayerStatus(int param_0, int i, u32 flag) { return mPlayerStatus[param_0][i] & flag; }
u32 checkPlayerStatus(int param_0, int i, u32 flag) { return mPlayerStatus[param_0][i] & flag; }
u8 getSelectItem(int idx) { return mSelectItem[idx]; }
void setSelectItem(int idx, u8 itemNo) { mSelectItem[idx] = itemNo; }
@@ -632,8 +634,7 @@ public:
u8 getPictureResultDetail() { return mPictureResultDetail; }
void setBossBattleData(JKRAramBlock* aramBlock, int i) { mBossBattleData[i] = aramBlock; }
void startItemTimer() { mStartItemTimer = true; }
void startFwaterTimer() { mFwaterTimer = 1; }
void stopFwaterTimer() { mFwaterTimer = 0; }
u8 checkFwaterTimer() { return mFwaterTimer; }
@@ -942,6 +943,10 @@ inline int dComIfGs_getRupee() {
return g_dComIfG_gameInfo.save.getPlayer().getPlayerStatusA().getRupee();
}
inline void dComIfGp_startItemTimer() {
g_dComIfG_gameInfo.play.startItemTimer();
}
inline int dComIfGp_getItemTimer() {
return g_dComIfG_gameInfo.play.getItemTimer();
}
@@ -950,6 +955,10 @@ inline void dComIfGp_resetItemTimer(s16 timer) {
g_dComIfG_gameInfo.play.resetItemTimer(timer);
}
inline void dComIfGp_decItemTimer() {
// TODO
}
inline int dComIfGp_getMessageRupee() {
return g_dComIfG_gameInfo.play.getMessageRupee();
}
@@ -1212,10 +1221,6 @@ inline void dComIfGs_setPictureNum(u8 num) {
g_dComIfG_gameInfo.save.getPlayer().getItemRecord().setPictureNum(num);
}
inline u16 dComIfGs_getFwaterTimer() {
return g_dComIfG_gameInfo.save.getPlayer().getItemRecord().getTimer();
}
inline u8 dComIfGs_getBeastNum(int i_idx) {
return g_dComIfG_gameInfo.save.getPlayer().getBagItemRecord().getBeastNum(i_idx);
}
@@ -1252,6 +1257,10 @@ inline void dComIfGs_setReserveItemEmpty() {
g_dComIfG_gameInfo.save.getPlayer().getBagItem().setReserveItemEmpty();
}
inline void dComIfGs_setReserveItemEmpty(u8 i_itemBtn) {
g_dComIfG_gameInfo.save.getPlayer().getBagItem().setReserveItemEmpty(i_itemBtn);
}
inline void dComIfGs_setReserveBaitEmpty(u8 i_itemBtn) {
g_dComIfG_gameInfo.save.getPlayer().getBagItem().setBaitItemEmpty(i_itemBtn);
}
@@ -2037,8 +2046,12 @@ stage_scls_info_class* dComIfGd_getMeshSceneList(Vec& vec);
BOOL dComIfGs_checkSeaLandingEvent(s8 i_roomNo);
inline void dComIfGp_startItemTimer() {
g_dComIfG_gameInfo.play.startItemTimer();
inline u16 dComIfGs_getFwaterTimer() {
return g_dComIfG_gameInfo.save.getPlayer().getItemRecord().getTimer();
}
inline void dComIfGs_startFwaterTimer() {
g_dComIfG_gameInfo.play.startFwaterTimer();
}
inline void dComIfGs_stopFwaterTimer() {
@@ -2049,6 +2062,14 @@ inline u8 dComIfGs_checkFwaterTimer() {
return g_dComIfG_gameInfo.play.checkFwaterTimer();
}
inline void dComIfGs_resetFwaterTimer(u16) {
// TODO
}
inline void dComIfGs_decFwaterTimer() {
// TODO
}
void dComIfGs_setPlayerRecollectionData();
void dComIfGs_revPlayerRecollectionData();
@@ -2097,6 +2118,10 @@ inline void dComIfGp_setStageNameOff() {
g_dComIfG_gameInfo.play.setStageNameOff();
}
inline u8 dComIfGp_getGameoverStatus() {
return g_dComIfG_gameInfo.play.getGameoverStatus();
}
inline void dComIfGp_setGameoverStatus(u8 stts) {
g_dComIfG_gameInfo.play.setGameoverStatus(stts);
}
@@ -3967,8 +3992,8 @@ inline void dComIfGp_att_offAleart() {
dComIfGp_getAttention().offAleart();
}
inline int dComIfGp_att_ZHintRequest(fopAc_ac_c* param_1, int param_2) {
return dComIfGp_getAttention().ZHintRequest(param_1, param_2);
inline int dComIfGp_att_ZHintRequest(fopAc_ac_c* i_actor, int priority) {
return dComIfGp_getAttention().ZHintRequest(i_actor, priority);
}
inline void dComIfGp_att_LookRequest(fopAc_ac_c* param_0, f32 i_horizontalDist, f32 i_upDist,
+1 -1
View File
@@ -233,7 +233,7 @@ static BOOL daFf_Execute(ff_class* i_this) {
i_this->mTimers[4] = REG13_F(9) + (cM_rndF(20.0f) + 30.0f);
}
i_this->mSph.SetC(i_this->current.pos);
g_dComIfG_gameInfo.play.mCcS.Set(&i_this->mSph);
dComIfG_Ccsp()->Set(&i_this->mSph);
return TRUE;
}
+3
View File
@@ -52,7 +52,10 @@ cPhs_State daHot_Floor_c::CreateInit() {
}
cPhs_State daHot_Floor_c::_create() {
#if VERSION > VERSION_DEMO
// Bug: This actor is never initialized in the demo.
fopAcM_SetupActor(this, daHot_Floor_c);
#endif
return CreateInit();
}
+1 -1
View File
@@ -1782,7 +1782,7 @@ cPhs_State daNpcRoten_c::createInit() {
/* 000011C8-0000122C .text _delete__12daNpcRoten_cFv */
bool daNpcRoten_c::_delete() {
dComIfG_resDelete(getPhaseP(), l_arcname_tbl[mNpcNo]);
dComIfG_resDeleteDemo(getPhaseP(), l_arcname_tbl[mNpcNo]);
if(heap && mpMorf) {
mpMorf->stopZelAnime();
}
+14 -14
View File
@@ -61,7 +61,7 @@ const daObjBarrel2::Attr_c daObjBarrel2::Act_c::M_attr[] = {
/* m10 */ 800.0f,
/* m14 */ 100.0f,
/* m18 */ 50.0f,
/* m1C */ 0.0099999998f,
/* m1C */ 0.01f,
/* m20 */ 4.0f,
/* m24 */ 1.0f,
/* m28 */ 3.0f,
@@ -79,8 +79,8 @@ const daObjBarrel2::Attr_c daObjBarrel2::Act_c::M_attr[] = {
/* m58 */ 0x3E8,
/* m5C */ 0.3f,
/* m60 */ 0.02f,
/* m64 */ 0.039999999f,
/* m68 */ 0.34999999f,
/* m64 */ 0.04f,
/* m68 */ 0.35f,
/* m6C */ 1.0f,
/* m70 */ 1.0f,
},
@@ -93,7 +93,7 @@ const daObjBarrel2::Attr_c daObjBarrel2::Act_c::M_attr[] = {
/* m10 */ 300.0f,
/* m14 */ 100.0f,
/* m18 */ 50.0f,
/* m1C */ 0.0099999998f,
/* m1C */ 0.01f,
/* m20 */ 4.0f,
/* m24 */ 1.0f,
/* m28 */ 3.0f,
@@ -111,8 +111,8 @@ const daObjBarrel2::Attr_c daObjBarrel2::Act_c::M_attr[] = {
/* m58 */ 0x3E8,
/* m5C */ 0.3f,
/* m60 */ 0.02f,
/* m64 */ 0.039999999f,
/* m68 */ 0.34999999f,
/* m64 */ 0.04f,
/* m68 */ 0.35f,
/* m6C */ 1.0f,
/* m70 */ 1.0f,
},
@@ -125,7 +125,7 @@ const daObjBarrel2::Attr_c daObjBarrel2::Act_c::M_attr[] = {
/* m10 */ 4500.0f,
/* m14 */ 100.0f,
/* m18 */ 50.0f,
/* m1C */ 0.0099999998f,
/* m1C */ 0.01f,
/* m20 */ 5.76f,
/* m24 */ 1.0f,
/* m28 */ 3.0f,
@@ -143,8 +143,8 @@ const daObjBarrel2::Attr_c daObjBarrel2::Act_c::M_attr[] = {
/* m58 */ 0x3E8,
/* m5C */ 0.3f,
/* m60 */ 0.02f,
/* m64 */ 0.039999999f,
/* m68 */ 0.34999999f,
/* m64 */ 0.04f,
/* m68 */ 0.35f,
/* m6C */ 5.0f,
/* m70 */ 1.0f,
},
@@ -152,13 +152,13 @@ const daObjBarrel2::Attr_c daObjBarrel2::Act_c::M_attr[] = {
{
/* m00 */ 0x5,
/* m02 */ 0x9,
/* m04 */ 0x520,
/* m04 */ DEMO_SELECT(0x12A0, 0x520),
/* m08 */ 288.0f,
/* m0C */ 576.0f,
/* m10 */ 800.0f,
/* m14 */ 100.0f,
/* m18 */ 50.0f,
/* m1C */ 0.0099999998f,
/* m1C */ 0.01f,
/* m20 */ 5.76f,
/* m24 */ 1.0f,
/* m28 */ 3.0f,
@@ -176,8 +176,8 @@ const daObjBarrel2::Attr_c daObjBarrel2::Act_c::M_attr[] = {
/* m58 */ 0x3E8,
/* m5C */ 0.3f,
/* m60 */ 0.02f,
/* m64 */ 0.039999999f,
/* m68 */ 0.34999999f,
/* m64 */ 0.04f,
/* m68 */ 0.35f,
/* m6C */ 1.0f,
/* m70 */ 1.0f,
},
@@ -1080,7 +1080,7 @@ bool daObjBarrel2::Act_c::_execute() {
item_connect_check();
s32 uVar2 = 0;
if (m46A != 1 && dComIfGp_event_runCheck() != 0) {
if (m46A != 1 && dComIfGp_event_runCheck() != FALSE) {
uVar2 = 1;
}
m46C = uVar2;
+1 -1
View File
@@ -180,7 +180,7 @@ BOOL daObjEskban::Act_c::Delete() {
BOOL daObjEskban::Act_c::Mthd_Delete() {
s32 result = MoveBGDelete();
if (fpcM_CreateResult(this) != cPhs_STOP_e) {
dComIfG_resDelete(&mPhs, M_arcname);
dComIfG_resDeleteDemo(&mPhs, M_arcname);
}
return result;
}
+21 -11
View File
@@ -251,21 +251,31 @@ void daObj_Hole_c::getArg() {
/* 0000096C-00000BA8 .text _create__12daObj_Hole_cFv */
cPhs_State daObj_Hole_c::_create() {
fopAcM_SetupActor(this, daObj_Hole_c);
cPhs_State result;
#if VERSION == VERSION_DEMO
result = dComIfG_resLoad(&mPhs, m_arc_name);
if (result == cPhs_COMPLEATE_e)
#endif
{
fopAcM_SetupActor(this, daObj_Hole_c);
cPhs_State result = dComIfG_resLoad(&mPhs, m_arc_name);
if (result == cPhs_COMPLEATE_e) {
getArg();
#if VERSION > VERSION_DEMO
result = dComIfG_resLoad(&mPhs, m_arc_name);
if (result == cPhs_COMPLEATE_e)
#endif
{
getArg();
if (mHasModel == 0xFF) {
u32 heapResult = fopAcM_entrySolidHeap(this, createHeap_CB, 0x1000);
if (mHasModel == 0xFF) {
u32 heapResult = fopAcM_entrySolidHeap(this, createHeap_CB, 0x1000);
if (heapResult == 0) {
return cPhs_ERROR_e;
if (heapResult == 0) {
return cPhs_ERROR_e;
}
}
}
createInit();
createInit();
}
}
return result;
@@ -273,7 +283,7 @@ cPhs_State daObj_Hole_c::_create() {
/* 0000122C-0000125C .text _delete__12daObj_Hole_cFv */
bool daObj_Hole_c::_delete() {
dComIfG_resDelete(&mPhs, m_arc_name);
dComIfG_resDeleteDemo(&mPhs, m_arc_name);
return true;
}
+1 -1
View File
@@ -59,7 +59,7 @@ BOOL daObjKanat::Act_c::Delete() {
BOOL daObjKanat::Act_c::Mthd_Delete() {
s32 result = MoveBGDelete();
if (fpcM_CreateResult(this) != cPhs_STOP_e) {
dComIfG_resDelete(&mPhs, M_arcname);
dComIfG_resDeleteDemo(&mPhs, M_arcname);
}
return result;
}
+1 -1
View File
@@ -138,7 +138,7 @@ static cPhs_State daObj_RotenCreate(void* i_actor) {
bool daObj_Roten_c::_delete() {
if(field_0x2D1 == 0) {
dComIfG_Bgsp()->Release(mpBgW);
dComIfG_resDelete(&mPhs, daObj_Roten_c::M_arcname);
dComIfG_resDeleteDemo(&mPhs, daObj_Roten_c::M_arcname);
}
return true;
+1 -1
View File
@@ -249,7 +249,7 @@ void Act_c::move_to_aim(float arg1, bool arg2) {
/* 00000D04-00000D64 .text chk_demo_rescue__Q29daObjTide5Act_cCFv */
bool Act_c::chk_demo_rescue() const {
bool ret = false;
if (dComIfGp_event_runCheck() != 0 && dComIfGp_evmng_startCheck("rescue")) {
if (dComIfGp_event_runCheck() != FALSE && dComIfGp_evmng_startCheck("rescue")) {
ret = true;
}
return ret;
+6 -9
View File
@@ -48,7 +48,7 @@ static BOOL daPy_bowJointCB(J3DNode* node, int calcTiming) {
/* 80149FD0-8014A008 .text bowButton__9daPy_lk_cCFv */
BOOL daPy_lk_c::bowButton() const {
if (mDemo.getDemoMode() == daPy_demo_c::DEMO_UNK_068_e) {
if (checkBowMiniGame()) {
return doButton();
} else {
return itemButton();
@@ -67,15 +67,12 @@ BOOL daPy_lk_c::checkBowAnime() const {
/* 8014A080-8014A180 .text makeArrow__9daPy_lk_cFv */
void daPy_lk_c::makeArrow() {
// Fakematch: The first call to getPt1 needs to load gameinfo differently from the other two.
// Adding a redundant (dEvt_control_c*) cast to just that one fixes it.
BOOL r4 = mDemo.getDemoMode() == daPy_demo_c::DEMO_UNK_068_e;
if ((!r4 && dComIfGs_getArrowNum() != 0) ||
(r4 && ((dEvt_control_c*)&g_dComIfG_gameInfo.play.getEvent())->getPt1() != NULL &&
if ((!checkBowMiniGame() && dComIfGs_getArrowNum() != 0) ||
(checkBowMiniGame() && dComIfGp_event_getPt1() &&
fopAcM_GetName(dComIfGp_event_getPt1()) == PROC_NPC_SO &&
((daNpc_So_c*)dComIfGp_event_getPt1())->getMiniGameRestArrow() > 0))
{
fopAc_ac_c* arrow_p = (fopAc_ac_c*)fopAcM_fastCreate(PROC_ARROW, 0, &current.pos, current.roomNo);
fopAc_ac_c* arrow_p = (fopAc_ac_c*)fopAcM_fastCreate(PROC_ARROW, 0, &current.pos, fopAcM_GetRoomNo(this));
mActorKeepEquip.setData(arrow_p);
}
m355C = 0;
@@ -143,7 +140,7 @@ BOOL daPy_lk_c::checkNextActionBowReady() {
} else if (bowButton() == NULL) {
if (arrow != NULL) {
fopAcM_SetParam(arrow, 1);
if (mDemo.getDemoMode() != daPy_demo_c::DEMO_UNK_068_e) {
if (!checkBowMiniGame()) {
dComIfGp_setItemArrowNumCount(-1);
}
mActorKeepEquip.clearData();
@@ -171,7 +168,7 @@ BOOL daPy_lk_c::checkNextActionBowReady() {
} else if (checkBowShootAnime()) {
if (mFrameCtrlUpper[UPPER_MOVE2_e].getRate() < 0.01f) {
if (m355E == 0 && bowButton() &&
(mDemo.getDemoMode() == daPy_demo_c::DEMO_UNK_068_e || mEquipItem == getReadyItem()) &&
(checkBowMiniGame() || mEquipItem == getReadyItem()) &&
!checkUseArrowEffect())
{
setBowReloadAnime();
+1 -1
View File
@@ -625,7 +625,7 @@ BOOL daPy_lk_c::procCrawlAutoMove() {
m34D0 = -1;
}
if (m34D0 == -1) {
g_dComIfG_gameInfo.play.mDirection = 0;
dComIfGp_setAdvanceDirection(0);
if (shape_angle.y == current.angle.y) {
frameCtrl.setRate(2.0f);
frameCtrl.setLoop(0);
+2 -2
View File
@@ -1075,7 +1075,7 @@ BOOL daPy_lk_c::dProcDead() {
m3574 = 1;
}
}
if ((m3574 != 0) && (g_dComIfG_gameInfo.play.mGameoverStatus == 2)) {
if (m3574 != 0 && dComIfGp_getGameoverStatus() == 2) {
dComIfGs_setGameStartStage();
dComIfGs_gameStart();
}
@@ -2078,7 +2078,7 @@ BOOL daPy_lk_c::dProcGetDance_init() {
initShipRideUseItem(iVar2, 0);
dKy_Itemgetcol_chg_on();
setTactModel();
#if VERSION > VERSION_DEMO
#if VERSION > VERSION_JPN
m3574 = 0;
#endif
return true;
+2 -2
View File
@@ -43,9 +43,9 @@ BOOL daPy_lk_c::fanJointCB(int param_0) {
BOOL daPy_fanJointCallback(J3DNode* node, int calcTiming) {
if (calcTiming == J3DNodeCBCalcTiming_In) {
J3DJoint* joint = static_cast<J3DJoint*>(node);
s32 jntNo = joint->getJntNo();
J3DModel* model = j3dSys.getModel();
daPy_lk_c* i_this = reinterpret_cast<daPy_lk_c*>(model->getUserArea());
s32 jntNo = joint->getJntNo();
i_this->fanJointCB(jntNo);
}
return TRUE;
@@ -70,9 +70,9 @@ BOOL daPy_lk_c::parachuteJointCB(int param_0) {
BOOL daPy_parachuteJointCallback(J3DNode* node, int calcTiming) {
if (calcTiming == J3DNodeCBCalcTiming_In) {
J3DJoint* joint = static_cast<J3DJoint*>(node);
s32 jntNo = joint->getJntNo();
J3DModel* model = j3dSys.getModel();
daPy_lk_c* i_this = reinterpret_cast<daPy_lk_c*>(model->getUserArea());
s32 jntNo = joint->getJntNo();
i_this->parachuteJointCB(jntNo);
}
return TRUE;
+3 -1
View File
@@ -236,7 +236,7 @@ BOOL daPy_lk_c::checkNextActionGrab() {
fopAcM_orderZHintEvent(this, dComIfGp_att_getZHint());
return true;
}
#if VERSION > VERSION_DEMO
#if VERSION > VERSION_JPN
if (checkSetItemTrigger(dItem_MAGIC_ARMOR_e, 1) ||
(checkNoResetFlg1(daPyFlg1_EQUIP_DRAGON_SHIELD) && checkSetItemTrigger(dItem_MAGIC_ARMOR_e, 0)))
{
@@ -854,7 +854,9 @@ BOOL daPy_lk_c::procGrabRebound() {
fopAc_ac_c* grab_actor = mActorKeepGrab.getActor();
if (grab_actor == NULL) {
#if VERSION > VERSION_DEMO
resetActAnimeUpper(UPPER_MOVE2_e, -1.0f);
#endif
return checkNextMode(0);
}
+1 -1
View File
@@ -81,7 +81,7 @@ int daPy_lk_c::setMoveBGLadderCorrect() {
}
}
cXyz local_18(m370C.x + cM_ssin(current.angle.y) * 50.0f, m370C.y, m370C.z + cM_scos(current.angle.y) * 50.0f);
mLinkLinChk.Set(&m370C, (cXyz*)&local_18, this);
mLinkLinChk.Set(&m370C, &local_18, this);
if ((!dComIfG_Bgsp()->LineCross(&mLinkLinChk)) || (dComIfG_Bgsp()->GetWallCode(mLinkLinChk) != 4)) {
return procFall_init(1, daPy_HIO_wallCatch_c0::m.field_0x54);
} else {
+192 -106
View File
@@ -318,7 +318,16 @@ BOOL daPy_lk_c::jointBeforeCB(int jnt_no, J3DTransformInfo* param_2, Quaternion*
}
}
}
if (!checkResetFlg0(daPyRFlg0_UNK800000)) {
#if VERSION == VERSION_DEMO
if (
!checkModeFlg(ModeFlg_WHIDE | ModeFlg_SWIM | ModeFlg_CRAWL) &&
mCurProc != daPyProc_VOMIT_WAIT_e && mCurProc != daPyProc_ELEC_DAMAGE_e && mCurProc != daPyProc_DEMO_DOOR_OPEN_e
)
#else
if (!checkResetFlg0(daPyRFlg0_UNK800000))
#endif
{
if (jnt_no == 0x1A) {
JMAEulerToQuat(0, m34F8, m3528 + (m34F6 + -0x8000) + m350E, param_3);
} else if (jnt_no == 0x1B) {
@@ -327,6 +336,7 @@ BOOL daPy_lk_c::jointBeforeCB(int jnt_no, J3DTransformInfo* param_2, Quaternion*
JMAEulerToQuat(0, m3500, m34FE + m3512, param_3);
}
}
if (jnt_no == 0) {
if (m34C2 == 1) {
param_2->mTranslate.x = 0.0f;
@@ -2436,7 +2446,7 @@ void daPy_lk_c::posMoveFromFootPos() {
speed.x = f1 * cM_ssin(current.angle.y);
speed.z = f1 * cM_scos(current.angle.y);
} else if (mCurProc != daPyProc_CUT_ROLL_e || !dComIfGp_event_runCheck() ||
mDemo.getDemoType() != 0 || mDemo.getDemoMode() == daPy_demo_c::DEMO_CUT_ROLL_e)
checkPlayerDemoMode() || mDemo.getDemoMode() == daPy_demo_c::DEMO_CUT_ROLL_e)
{
speed.x = speedF * cM_ssin(current.angle.y);
speed.z = speedF * cM_scos(current.angle.y);
@@ -2649,13 +2659,23 @@ BOOL daPy_lk_c::cancelItemUpperReadyAnime() {
/* 80109F4C-8010A204 .text checkBodyAngleX__9daPy_lk_cFs */
s16 daPy_lk_c::checkBodyAngleX(s16 param_1) {
static Vec top_vec = {0.0f, 70.0f, 0.0f};
f32 f1;
f32 f31;
cXyz sp38;
#if VERSION <= VERSION_JPN
cXyz sp5C;
cXyz sp50;
#endif
cXyz sp2C;
mDoMtx_multVecZero(mpCLModel->getAnmMtx(0x2), &sp38);
#if VERSION <= VERSION_JPN
sp5C = eyePos - sp38;
mDoMtx_stack_c::ZXYrotS(param_1 - mBodyAngle.x, shape_angle.y, 0);
mDoMtx_stack_c::YrotM(-shape_angle.y);
mDoMtx_stack_c::multVec(&sp5C, &sp50);
sp2C = sp50 + sp38;
#else
static Vec top_vec = {0.0f, 70.0f, 0.0f};
if (param_1 >= 0) {
top_vec.z = 25.0f;
} else {
@@ -2664,18 +2684,23 @@ s16 daPy_lk_c::checkBodyAngleX(s16 param_1) {
mDoMtx_stack_c::transS(sp38);
mDoMtx_stack_c::ZXYrotM(param_1, shape_angle.y, 0);
mDoMtx_stack_c::multVec(&top_vec, &sp2C);
#endif
mLinkLinChk.Set(&sp38, &sp2C, this);
if (dComIfG_Bgsp()->LineCross(&mLinkLinChk)) {
cXyz local_4c = (mLinkLinChk.GetCross() - sp38);
f31 = cM_ssin(param_1);
f1 = (f31 * local_4c.abs()) / std::sqrtf(5525.0);
#if VERSION <= VERSION_JPN
f32 f1 = (cM_ssin(param_1) * local_4c.abs()) / sp50.abs();
#else
f32 f1 = (cM_ssin(param_1) * local_4c.abs()) / std::sqrtf(SQUARE(70.0f) + SQUARE(25.0f));
#endif
if (f1 > 1.0f) {
f1 = 1.0f;
} else if (f1 < -1.0f) {
f1 = -1.0f;
}
f31 = std::sqrtf(1.0f - (f1 * f1));
param_1 = cM_atan2s(f1, f31);
f32 f2 = std::sqrtf(1.0f - (f1 * f1));
param_1 = cM_atan2s(f1, f2);
}
return param_1;
}
@@ -2683,7 +2708,6 @@ s16 daPy_lk_c::checkBodyAngleX(s16 param_1) {
/* 8010A204-8010A2F4 .text setBodyAngleToCamera__9daPy_lk_cFv */
BOOL daPy_lk_c::setBodyAngleToCamera() {
BOOL bVar1;
s16 sVar2;
s16 local_16;
s16 local_18;
@@ -2692,12 +2716,16 @@ BOOL daPy_lk_c::setBodyAngleToCamera() {
if (bVar1 != 0) {
shape_angle.y = local_18;
current.angle.y = local_18;
#if VERSION <= VERSION_JPN
mBodyAngle.x = checkBodyAngleX(local_16);
#else
mBodyAngle.x = checkBodyAngleX(mBodyAngle.x);
sVar2 = mBodyAngle.x;
s16 sVar2 = mBodyAngle.x;
mBodyAngle.x = checkBodyAngleX(local_16);
if (mBodyAngle.x != local_16) {
mBodyAngle.x = sVar2;
}
#endif
} else {
camera_class* cam = dComIfGp_getCamera(mCameraInfoIdx);
shape_angle.y = cam->mAngle.y;
@@ -2966,7 +2994,7 @@ void daPy_lk_c::setBlendMoveAnime(f32 param_1) {
J3DFrameCtrl& frameCtrl = mFrameCtrlUnder[UNDER_MOVE1_e];
f32 f29;
f32 f28;
if (dComIfGp_event_runCheck() || mDemo.getDemoType() != 0) {
if (dComIfGp_event_runCheck() || checkPlayerDemoMode()) {
f29 = daPy_HIO_move_c0::m.field_0x44;
f28 = daPy_HIO_move_c0::m.field_0x64;
} else if (checkHeavyStateOn()) {
@@ -3482,7 +3510,7 @@ void daPy_lk_c::setAnimeUnequipSword() {
ModeFlg_LADDER |
ModeFlg_CROUCH |
ModeFlg_CRAWL
) || dComIfGp_event_runCheck() || mDemo.getDemoType() != 0) {
) || dComIfGp_event_runCheck() || checkPlayerDemoMode()) {
rate = daPy_HIO_cut_c0::m.field_0x20;
start = daPy_HIO_cut_c0::m.field_0x24;
end = daPy_HIO_cut_c0::m.field_0x4;
@@ -4993,7 +5021,10 @@ BOOL daPy_lk_c::setDamagePoint(f32 amount) {
dComIfGp_setItemLifeCount(amount);
if (amount < 0.0f) {
offNoResetFlg1(daPyFlg1_UNK8000);
if (!checkFinalMasterSwordEquip()) {
#if VERSION > VERSION_JPN
if (!checkFinalMasterSwordEquip())
#endif
{
offNoResetFlg1(daPyFlg1_UNK200000);
}
}
@@ -5082,8 +5113,10 @@ BOOL daPy_lk_c::changeDamageProc() {
daShip_c* ship = (daShip_c*)dComIfGp_getShipActor();
if (dComIfGp_event_runCheck() ||
mDemo.getDemoType() != 0 ||
checkPlayerDemoMode() ||
#if VERSION > VERSION_JPN
checkNoControll() ||
#endif
mCurProc == daPyProc_SHIP_READY_e ||
(
dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e) &&
@@ -5400,7 +5433,7 @@ BOOL daPy_lk_c::changeDemoProc() {
deleteEquipItem(FALSE);
}
u32 demo_mode = mDemo.getDemoMode();
JUT_ASSERT(9342, (demo_mode < daPy_demo_c::DEMO_LAST_e) || (demo_mode == daPy_demo_c::DEMO_NEW_ANM0_e));
JUT_ASSERT(VERSION_SELECT(9293, 9293, 9342, 9342), (demo_mode < daPy_demo_c::DEMO_LAST_e) || (demo_mode == daPy_demo_c::DEMO_NEW_ANM0_e));
if (demo_mode != daPy_demo_c::DEMO_NEW_ANM0_e && demo_mode != daPy_demo_c::DEMO_UNK_030_e &&
demo_mode != daPy_demo_c::DEMO_LDAM_e && demo_mode != daPy_demo_c::DEMO_PFALL_e &&
demo_mode != daPy_demo_c::DEMO_SFALL_e && demo_mode != daPy_demo_c::DEMO_INIT_WAIT_e &&
@@ -8012,7 +8045,7 @@ BOOL daPy_lk_c::procLargeDamageUp() {
mFrameCtrlUnder[UNDER_MOVE0_e].setRate(0.5f);
}
} else if (mFrameCtrlUnder[UNDER_MOVE0_e].getRate() < 0.01f) {
if (dComIfGp_event_runCheck() != 0) {
if (dComIfGp_event_runCheck()) {
dComIfGp_evmng_cutEnd(mStaffIdx);
} else {
checkNextMode(0);
@@ -8494,13 +8527,20 @@ BOOL daPy_lk_c::procBootsEquip() {
}
}
if (frameCtrl.getRate() < 0.01f) {
#if VERSION <= VERSION_JPN
checkNextMode(0);
#else
if (checkGrabAnime()) {
initGrabNextMode();
} else {
checkNextMode(0);
}
#endif
} else {
if (frameCtrl.getFrame() > daPy_HIO_boots_c0::m.field_0xC) {
#if VERSION <= VERSION_JPN
checkNextMode(1);
#else
if (checkGrabAnime()) {
if (mStickDistance > 0.05f) {
initGrabNextMode();
@@ -8508,6 +8548,7 @@ BOOL daPy_lk_c::procBootsEquip() {
} else {
checkNextMode(1);
}
#endif
} else {
if (frameCtrl.checkPass(15.0f) && checkEquipHeavyBoots()) {
dComIfGp_getVibration().StartShock(5, -0x31, cXyz(0.0f, 1.0f, 0.0f));
@@ -8577,7 +8618,7 @@ BOOL daPy_lk_c::procNotUse() {
msg_p->mStatus = fopMsgStts_MSG_CONTINUES_e;
m3624 = 0xf10;
fopMsgM_messageSet(m3624);
g_dComIfG_gameInfo.save.getPlayer().getBagItem().setReserveItemEmpty(mReadyItemBtn);
dComIfGs_setReserveItemEmpty(mReadyItemBtn);
} else {
msg_p->mStatus = fopMsgStts_MSG_ENDS_e;
}
@@ -8640,22 +8681,18 @@ int daPy_lk_c::setLegAngle(f32 param_1, int param_2, s16* param_3, s16* param_4)
}
dVar8 = param_1;
mDoMtx_concat(m37B4, mFootData[param_2].field_0x088[0], mDoMtx_stack_c::get());
spE8.x = 0.0f;
spE8.y = mDoMtx_stack_c::now[1][3];
spE8.z = mDoMtx_stack_c::now[2][3];
spE8.set(0.0f, mDoMtx_stack_c::get()[1][3], mDoMtx_stack_c::get()[2][3]);
mDoMtx_concat(m37B4, mFootData[param_2].field_0x088[1], mDoMtx_stack_c::get());
spDC.x = 0.0f;
spDC.y = mDoMtx_stack_c::now[1][3];
spDC.z = mDoMtx_stack_c::now[2][3];
spDC.set(0.0f, mDoMtx_stack_c::get()[1][3], mDoMtx_stack_c::get()[2][3]);
mDoMtx_concat(m37B4, mFootData[param_2].field_0x088[2], mDoMtx_stack_c::get());
spD0.x = 0.0f;
spD0.y = mDoMtx_stack_c::now[1][3] + 3.25f;
spD0.z = mDoMtx_stack_c::now[2][3];
spD0.set(0.0f, mDoMtx_stack_c::get()[1][3] + 3.25f, mDoMtx_stack_c::get()[2][3]);
spAC = spDC - spE8;
spA0 = spD0 - spDC;
spB8.set(spD0.x, spD0.y, spD0.z);
spB8.x = spD0.x;
spB8.y = spD0.y;
spB8.z = spD0.z;
spB8.y += dVar8;
spB8.z += dVar9;
if (spB8.y >= spE8.y) {
@@ -8675,26 +8712,30 @@ int daPy_lk_c::setLegAngle(f32 param_1, int param_2, s16* param_3, s16* param_4)
return false;
}
dVar8 = (((dVar9 + dVar10) - dVar11) / (2.0f * dVar9));
sp58.set(0.0f, spE8.y + (dVar8 * sp7C.y), spE8.z + (dVar8 * sp7C.z));
sp58.x = 0.0f;
sp58.y = spE8.y + (dVar8 * sp7C.y);
sp58.z = spE8.z + (dVar8 * sp7C.z);
f32 f4 = dVar10 - (dVar8 * (dVar9 * dVar8));
if (f4 < 0.0f) {
f4 = 0.0f;
}
dVar9 = std::sqrtf(f4);
sp70.set(0.0f, sp7C.z, -sp7C.y);
sp70.x = 0.0f;
sp70.y = sp7C.z;
sp70.z = -sp7C.y;
dVar8 = sp70.abs();
if (cM3d_IsZero(dVar8)) {
return false;
}
f32 f2 = dVar9 / dVar8;
spC4.set(0.0f, sp58.y + f2 * sp70.y, sp58.z + f2 * sp70.z);
spC4.x = 0.0f;
spC4.y = sp58.y + f2 * sp70.y;
spC4.z = sp58.z + f2 * sp70.z;
sp94 = spC4 - spE8;
sp88 = spB8 - spC4;
mDoMtx_concat(m37B4, mpCLModel->getAnmMtx(0), mDoMtx_stack_c::get());
sp64.x = 0.0f;
sp64.y = mDoMtx_stack_c::now[1][3];
sp64.z = mDoMtx_stack_c::now[2][3];
s16 r29 = cM_atan2s(-mDoMtx_stack_c::now[1][3], -mDoMtx_stack_c::now[2][3]);
sp64.set(0.0f, mDoMtx_stack_c::get()[1][3], mDoMtx_stack_c::get()[2][3]);
s16 r29 = cM_atan2s(-sp64.y, -sp64.z);
s16 r27 = cM_atan2s(sp94.y, sp94.z);
s16 r26 = cM_atan2s(sp88.y, sp88.z);
s16 r3 = r27 - r29;
@@ -10305,7 +10346,7 @@ void daPy_lk_c::setDemoData() {
int* prm0_p = NULL;
int* prm1_p = NULL;
if (!dComIfGp_event_runCheck()) {
if (mDemo.getDemoType() != 0) {
if (checkPlayerDemoMode()) {
endDemoMode();
}
if (m3554 > 0) {
@@ -10537,7 +10578,7 @@ void daPy_lk_c::setStickData() {
mStickDistance = 0.0f;
m34E8 = 0;
} else {
if (mDemo.getDemoMode() == daPy_demo_c::DEMO_UNK_068_e) {
if (checkBowMiniGame()) {
mStickDistance = g_mDoCPd_cpadInfo[0].mMainStickValue;
m34DC = g_mDoCPd_cpadInfo[0].mMainStickAngle + 0x8000;
m34E8 = m34DC + dCam_getControledAngleY(dComIfGp_getCamera(mCameraInfoIdx));
@@ -10545,7 +10586,7 @@ void daPy_lk_c::setStickData() {
mItemButton |= BTN_A;
}
} else if (
(dComIfGp_event_runCheck() != 0 || mDemo.getDemoType() != 0) &&
(dComIfGp_event_runCheck() || checkPlayerDemoMode()) &&
!dComIfGp_checkPlayerStatus1(0, daPyStts1_WIND_WAKER_CONDUCT_e) &&
mCurProc != daPyProc_NOT_USE_e && mCurProc != daPyProc_BOTTLE_GET_e
) {
@@ -10569,7 +10610,7 @@ void daPy_lk_c::setStickData() {
m34E8 = 0;
} else {
mStickDistance = g_mDoCPd_cpadInfo[0].mMainStickValue;
if (checkNoResetFlg1(daPyFlg1_CONFUSE) && dComIfGp_event_runCheck() == 0) {
if (checkNoResetFlg1(daPyFlg1_CONFUSE) && !dComIfGp_event_runCheck()) {
m34DC = g_mDoCPd_cpadInfo[0].mMainStickAngle;
} else {
m34DC = g_mDoCPd_cpadInfo[0].mMainStickAngle + 0x8000;
@@ -10647,7 +10688,12 @@ void daPy_lk_c::setStickData() {
if (checkGrabWear()) {
mStickDistance = mStickDistance * daPy_HIO_move_c0::m.field_0x74;
}
if (bVar1 && dComIfGp_event_runCheck() == 0) {
#if VERSION == VERSION_DEMO
if (bVar1)
#else
if (bVar1 && !dComIfGp_event_runCheck())
#endif
{
seStartSystem(JA_SE_ITEM_TARGET_OUT);
}
}
@@ -10793,7 +10839,7 @@ void daPy_lk_c::checkFallCode() {
((dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e) && ship != NULL && !ship->checkForceMove()) ||
(m3580 == 5 && m35F4 - current.pos.y > 500.0f)))
{
g_dComIfG_gameInfo.play.mFwaterTimer = 1;
dComIfGs_startFwaterTimer();
dVar6 = speedF;
dVar5 = 1.5f;
if (dVar6 < dVar5) {
@@ -11135,13 +11181,13 @@ void daPy_lk_c::setWindAtPower() {
}
}
if (mCurProc != daPyProc_FAN_GLIDE_e) {
if (dComIfGp_event_runCheck() || mDemo.getDemoType() != 0) {
if (dComIfGp_event_runCheck() || checkPlayerDemoMode()) {
m373C.x = 0.0f;
m373C.z = 0.0f;
} else {
cLib_addCalcPosXZ(&m373C, local_58, 0.5f, fVar2, 0.5f);
}
if (checkHeavyStateOn() || dComIfGp_event_runCheck() || mDemo.getDemoType() != 0) {
if (checkHeavyStateOn() || dComIfGp_event_runCheck() || checkPlayerDemoMode()) {
m3730.x = 0.0f;
m3730.z = 0.0f;
} else {
@@ -11199,7 +11245,6 @@ void daPy_lk_c::checkRoofRestart() {
/* 80121870-80122D30 .text execute__9daPy_lk_cFv */
BOOL daPy_lk_c::execute() {
/* Nonmatching - retail-only regalloc */
#if VERSION > VERSION_DEMO
if (setGetDemo()) {
return TRUE;
@@ -11224,7 +11269,7 @@ BOOL daPy_lk_c::execute() {
dComIfGs_setBottleItemIn(dItem_FOREST_WATER_e, dItem_WATER_BOTTLE_e);
mDemo.setDemoType(5);
m3628 = fpcM_ERROR_PROCESS_ID_e;
#if VERSION > VERSION_DEMO
#if VERSION > VERSION_JPN
if (mCurProc == daPyProc_SCOPE_e) {
procWait_init();
}
@@ -11832,20 +11877,20 @@ static BOOL daPy_Delete(daPy_lk_c* i_this) {
/* 80123078-80123360 .text initTextureAnime__9daPy_lk_cFv */
void daPy_lk_c::initTextureAnime() {
m_tex_anm_heap.m_buffer = new(0x20) u8[0x1000];
JUT_ASSERT(20869, m_tex_anm_heap.m_buffer != NULL);
JUT_ASSERT(VERSION_SELECT(20789, 20789, 20869, 20869), m_tex_anm_heap.m_buffer != NULL);
JKRReadIdxResource(m_tex_anm_heap.m_buffer, 0x1000, LKANM_BTP_TMABAA, dComIfGp_getAnmArchive());
J3DAnmTexPattern* btp = static_cast<J3DAnmTexPattern*>(J3DAnmLoaderDataBase::load(m_tex_anm_heap.m_buffer));
btp->searchUpdateMaterialID(mpCLModelData);
u16 material_num = btp->getUpdateMaterialNum();
m_texNoAnms = new J3DTexNoAnm[material_num];
JUT_ASSERT(20885, m_texNoAnms != NULL);
JUT_ASSERT(VERSION_SELECT(20805, 20805, 20885, 20885), m_texNoAnms != NULL);
for (u16 i = 0; i < material_num; i++) {
u16 matID = btp->getUpdateMaterialID(i);
if (matID != 0xFFFF) {
J3DMaterialAnm* mat_anm = new J3DMaterialAnm();
JUT_ASSERT(20894, mat_anm != NULL);
JUT_ASSERT(VERSION_SELECT(20814, 20814, 20894, 20894), mat_anm != NULL);
if (matID != 1 && matID != 4) {
// Not eyeL or eyeR (i.e. it's mouth, mayuL, or mayuR)
@@ -11878,16 +11923,16 @@ void daPy_lk_c::initTextureAnime() {
/* 80123360-80123830 .text initTextureScroll__9daPy_lk_cFv */
void daPy_lk_c::initTextureScroll() {
m_tex_scroll_heap.m_buffer = new(0x20) u8[0x800];
JUT_ASSERT(DEMO_SELECT(20757, 20944), m_tex_scroll_heap.m_buffer != NULL);
JUT_ASSERT(VERSION_SELECT(20757, 20864, 20944, 20944), m_tex_scroll_heap.m_buffer != NULL);
JKRReadIdxResource(m_tex_scroll_heap.m_buffer, 0x800, LKANM_BTK_TMABA, dComIfGp_getAnmArchive());
J3DAnmTextureSRTKey* btk = static_cast<J3DAnmTextureSRTKey*>(J3DAnmLoaderDataBase::load(m_tex_scroll_heap.m_buffer));
btk->searchUpdateMaterialID(mpCLModelData);
u16 material_num = btk->getUpdateMaterialNum();
JUT_ASSERT(DEMO_SELECT(20771, 20958), material_num == 2);
JUT_ASSERT(VERSION_SELECT(20771, 20878, 20958, 20958), material_num == 2);
m_texMtxAnm = new J3DTexMtxAnm[material_num];
JUT_ASSERT(DEMO_SELECT(20774, 20961), m_texMtxAnm != NULL);
JUT_ASSERT(VERSION_SELECT(20774, 20881, 20961, 20961), m_texMtxAnm != NULL);
for (u16 no = 0; no < material_num; no++) {
u16 matID = btk->getUpdateMaterialID(no);
@@ -11896,7 +11941,7 @@ void daPy_lk_c::initTextureScroll() {
}
m_tex_eye_scroll[no] = new daPy_matAnm_c();
JUT_ASSERT(DEMO_SELECT(20785, 20972), m_tex_eye_scroll[no] != NULL);
JUT_ASSERT(VERSION_SELECT(20785, 20892, 20972, 20972), m_tex_eye_scroll[no] != NULL);
mpCLModelData->getMaterialNodePointer(matID)->change();
mpCLModelData->getMaterialNodePointer(matID)->setMaterialAnm(m_tex_eye_scroll[no]);
@@ -11910,7 +11955,7 @@ void daPy_lk_c::initTextureScroll() {
J3DTexMtx* tmtx;
if (mtl->getTexMtx(texMtxID) == NULL) {
tmtx = new J3DTexMtx();
JUT_ASSERT(DEMO_SELECT(20797, 20984), tmtx != NULL);
JUT_ASSERT(VERSION_SELECT(20797, 20904, 20984, 20984), tmtx != NULL);
mtl->setTexMtx(texMtxID, tmtx);
}
if (mtl->getTexCoord(texMtxID) != NULL) {
@@ -11927,7 +11972,7 @@ void daPy_lk_c::initTextureScroll() {
tmtxinfo.mCenter.y = btk->getSRTCenter(no).y;
tmtxinfo.mCenter.z = btk->getSRTCenter(no).z;
JUT_ASSERT(DEMO_SELECT(20814, 21001), mtl->getMaterialAnm() != NULL);
JUT_ASSERT(VERSION_SELECT(20814, 20921, 21001, 21001), mtl->getMaterialAnm() != NULL);
mtl->getMaterialAnm()->setTexMtxAnm(texMtxID, &m_texMtxAnm[no]);
}
@@ -11950,7 +11995,7 @@ BOOL daPy_lk_c::createHeap() {
tmp_modelData = initModel(&mpSwgripmsModel, LINK_BDL_SWGRIPMS, 0x37221222);
bck = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName, LINK_BCK_SWGRIPMSAB);
ret = mSwgripmsabBckAnim.init(mpSwgripmsModel->getModelData(), bck, false, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1, false);
if (!ret) { JUT_ASSERT(21046, FALSE); }
if (!ret) { JUT_ASSERT(VERSION_SELECT(20966, 20966, 21046, 21046), FALSE); }
mpTswgripmsabBrk = entryBrk(tmp_modelData, LINK_BRK_TSWGRIPMSAB);
mpTswgripmsBtk = entryBtk(tmp_modelData, LINK_BTK_TSWGRIPMS);
@@ -11959,13 +12004,13 @@ BOOL daPy_lk_c::createHeap() {
tmp_modelData = initModel(&mpShaModel, LINK_BDL_SHA, 0x37221222);
bck = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName, LINK_BCK_ATNGSHA);
ret = mAtngshaBck.init(mpShaModel->getModelData(), bck, false, J3DFrameCtrl::EMode_NONE, 1.0f, 0, -1, false);
if (!ret) { JUT_ASSERT(21063, FALSE); }
if (!ret) { JUT_ASSERT(VERSION_SELECT(20983, 20983, 21063, 21063), FALSE); }
tmp_modelData = initModel(&mpShmsModel, LINK_BDL_SHMS, 0x37221222);
mpTshmsBtk = entryBtk(tmp_modelData, LINK_BTK_TSHMS);
J3DSkinDeform* shmsSkinDeform = new J3DSkinDeform();
if (!shmsSkinDeform) { JUT_ASSERT(21077, FALSE); }
if (mpShmsModel->setSkinDeform(shmsSkinDeform, 1) != J3DErrType_Success ) { JUT_ASSERT(21080, FALSE); }
if (!shmsSkinDeform) { JUT_ASSERT(VERSION_SELECT(20997, 20997, 21077, 21077), FALSE); }
if (mpShmsModel->setSkinDeform(shmsSkinDeform, 1) != J3DErrType_Success ) { JUT_ASSERT(VERSION_SELECT(21000, 21000, 21080, 21080), FALSE); }
tmp_modelData = initModel(&mpYmsls00Model, LINK_BDL_YMSLS00, 0x13000222);
mpYmsls00Btk = entryBtk(tmp_modelData, LINK_BTK_YMSLS00);
@@ -11979,7 +12024,7 @@ BOOL daPy_lk_c::createHeap() {
tmp_modelData = initModel(&mpYuchw00Model, LINK_BDL_YUCHW00, 0x13000222);
bck = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName, LINK_BCK_YUCHW00);
ret = mYuchw00Bck.init(tmp_modelData, bck, 1, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1, false);
if (!ret) { JUT_ASSERT(21113, FALSE); }
if (!ret) { JUT_ASSERT(VERSION_SELECT(21033, 21033, 21113, 21113), FALSE); }
mpYuchw00Btk = entryBtk(tmp_modelData, LINK_BTK_YUCHW00);
mpYuchw00Brk = entryBrk(tmp_modelData, LINK_BRK_YUCHW00);
mpYuchw00Brk->setFrame(mpYuchw00Brk->getFrameMax()-0.001f);
@@ -11989,75 +12034,75 @@ BOOL daPy_lk_c::createHeap() {
mpYbafo00Btk->setFrame(mpYbafo00Btk->getFrameMax()-0.001f);
tmp_modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_arcName, LINK_BDL_YAURA00));
JUT_ASSERT(21130, tmp_modelData != NULL);
JUT_ASSERT(VERSION_SELECT(21050, 21050, 21130, 21130), tmp_modelData != NULL);
daPy_aura_c* aura_p = mMagicArmorAuraEntries;
for (int i = 0; i < 6; i++) {
aura_p->setModel(mDoExt_J3DModel__create(tmp_modelData, 0x00080000, 0x11001222));
JUT_ASSERT(21139, aura_p->getModel() != NULL);
JUT_ASSERT(VERSION_SELECT(21059, 21059, 21139, 21139), aura_p->getModel() != NULL);
aura_p++;
}
mpYaura00Btk = entryBtk(tmp_modelData, LINK_BTK_YAURA00);
brk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(l_arcName, LINK_BRK_YAURA00_R);
ret = mYaura00rBrk.init(tmp_modelData, brk, false, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1, false, 0);
if (!ret) { JUT_ASSERT(21147, FALSE); }
if (!ret) { JUT_ASSERT(VERSION_SELECT(21067, 21067, 21147, 21147), FALSE); }
mYaura00rBrk.entryFrame(0.0f);
tmp_modelData = initModel(&mpYmgcs00Model, LINK_BDL_YMGCS00, 0x11001222);
mpYmgcs00Btk = entryBtk(tmp_modelData, LINK_BTK_YMGCS00);
brk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(l_arcName, LINK_BRK_YMGCS00_MS);
ret = mYmgcs00Brk.init(tmp_modelData, brk, false, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1, false, 0);
if (!ret) { JUT_ASSERT(21161, FALSE); }
if (!ret) { JUT_ASSERT(VERSION_SELECT(21081, 21081, 21161, 21161), FALSE); }
mYmgcs00Brk.entryFrame(0.0f);
tmp_modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_arcName, LINK_BDL_BOMB));
JUT_ASSERT(21169, tmp_modelData != NULL);
JUT_ASSERT(VERSION_SELECT(21089, 21089, 21169, 21169), tmp_modelData != NULL);
mpBombBrk = entryBrk(tmp_modelData, LINK_BRK_BOMB);
tmp_modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_arcName, LINK_BDL_GWP00));
JUT_ASSERT(21176, tmp_modelData != NULL);
JUT_ASSERT(VERSION_SELECT(21096, 21096, 21176, 21176), tmp_modelData != NULL);
mpGwp00BrkData = entryBrk(tmp_modelData, LINK_BRK_GWP00);
mpGwp00BtkData = entryBtk(tmp_modelData, LINK_BTK_GWP00);
tmp_modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_arcName, LINK_BDL_ARROW));
JUT_ASSERT(21184, tmp_modelData != NULL);
JUT_ASSERT(VERSION_SELECT(21104, 21104, 21184, 21184), tmp_modelData != NULL);
mpIceArrowBtk = entryBtk(tmp_modelData, LINK_BTK_TTIPICE);
tmp_modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_arcName, LINK_BDL_ARROWGLITTER));
JUT_ASSERT(21191, tmp_modelData != NULL);
JUT_ASSERT(VERSION_SELECT(21111, 21111, 21191, 21191), tmp_modelData != NULL);
mpLightArrowBtk = entryBtk(tmp_modelData, LINK_BTK_TARROWGLITTER);
tmp_modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_arcName, LINK_BDL_GICER00));
JUT_ASSERT(21198, tmp_modelData != NULL);
JUT_ASSERT(VERSION_SELECT(21118, 21118, 21198, 21198), tmp_modelData != NULL);
mpGicer00Btk = entryBtk(tmp_modelData, LINK_BTK_GICER00);
tmp_modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_arcName, LINK_BDL_GICER01));
JUT_ASSERT(21205, tmp_modelData != NULL);
JUT_ASSERT(VERSION_SELECT(21125, 21125, 21205, 21205), tmp_modelData != NULL);
mpGicer01Btk = entryBtk(tmp_modelData, LINK_BTK_GICER01);
const int numCLJoints = 0x2A;
m_old_fdata = new mDoExt_MtxCalcOldFrame(new J3DTransformInfo[numCLJoints], new Quaternion[numCLJoints]);
JUT_ASSERT(21233, m_old_fdata != NULL);
JUT_ASSERT(VERSION_SELECT(21153, 21153, 21233, 21233), m_old_fdata != NULL);
m_pbCalc[PART_UNDER_e] = new mDoExt_MtxCalcAnmBlendTblOld(m_old_fdata, ARRAY_SIZE(mAnmRatioUnder), mAnmRatioUnder);
JUT_ASSERT(21239, m_pbCalc[PART_UNDER_e] != NULL);
JUT_ASSERT(VERSION_SELECT(21159, 21159, 21239, 21239), m_pbCalc[PART_UNDER_e] != NULL);
m_pbCalc[PART_UPPER_e] = new mDoExt_MtxCalcAnmBlendTblOld(m_old_fdata, ARRAY_SIZE(mAnmRatioUpper), mAnmRatioUpper);
JUT_ASSERT(21245, m_pbCalc[PART_UPPER_e] != NULL);
JUT_ASSERT(VERSION_SELECT(21165, 21165, 21245, 21245), m_pbCalc[PART_UPPER_e] != NULL);
initTextureScroll();
initTextureAnime();
m_HIO = new daPy_HIO_c();
JUT_ASSERT(21254, m_HIO != NULL);
JUT_ASSERT(VERSION_SELECT(21174, 21174, 21254, 21254), m_HIO != NULL);
m_anm_heap_under[UNDER_MOVE0_e].m_buffer = new(0x20) u8[0xB400];
JUT_ASSERT(21259, m_anm_heap_under[UNDER_MOVE0_e].m_buffer != NULL);
JUT_ASSERT(VERSION_SELECT(21179, 21179, 21259, 21259), m_anm_heap_under[UNDER_MOVE0_e].m_buffer != NULL);
m_sanm_buffer = new(0x20) u8[0x200];
JUT_ASSERT(21266, m_sanm_buffer != NULL);
JUT_ASSERT(VERSION_SELECT(21186, 21186, 21266, 21266), m_sanm_buffer != NULL);
m_item_bck_buffer = new(0x20) u8[0x1000];
JUT_ASSERT(21269, m_item_bck_buffer != NULL);
JUT_ASSERT(VERSION_SELECT(21189, 21189, 21269, 21269), m_item_bck_buffer != NULL);
return TRUE;
}
@@ -12078,16 +12123,16 @@ void daPy_lk_c::createAnimeHeap(JKRSolidHeap** pHeap, daPy_HEAP_TYPE heapType) {
if (heapType == HEAP_TYPE_ITEM_ANIME_e) {
mDoExt_transAnmBas* tmp_trans_bas = new mDoExt_transAnmBas(NULL);
JUT_ASSERT(21307, tmp_trans_bas != NULL);
JUT_ASSERT(VERSION_SELECT(21227, 21227, 21307, 21307), tmp_trans_bas != NULL);
} else if (heapType == HEAP_TYPE_UNDER_UPPER_e) {
J3DAnmTransformKey* tmp_trans = new J3DAnmTransformKey;
JUT_ASSERT(21310, tmp_trans != NULL);
JUT_ASSERT(VERSION_SELECT(21230, 21230, 21310, 21310), tmp_trans != NULL);
} else if (heapType == HEAP_TYPE_TEXTURE_ANIME_e) {
J3DAnmTexPattern* tmp_tp = new J3DAnmTexPattern;
JUT_ASSERT(21313, tmp_tp != NULL);
JUT_ASSERT(VERSION_SELECT(21233, 21233, 21313, 21313), tmp_tp != NULL);
} else { // heapType == HEAP_TYPE_TEXTURE_SCROLL_e
J3DAnmTextureSRTKey* tmp_tk = new J3DAnmTextureSRTKey;
JUT_ASSERT(21316, tmp_tk != NULL);
JUT_ASSERT(VERSION_SELECT(21236, 21236, 21316, 21316), tmp_tk != NULL);
}
mDoExt_restoreCurrentHeap();
@@ -12098,9 +12143,9 @@ void daPy_lk_c::createAnimeHeap(JKRSolidHeap** pHeap, daPy_HEAP_TYPE heapType) {
J3DModelData* daPy_lk_c::initModel(J3DModel** i_model, int i_fileIndex, u32 i_differedDlistFlag) {
J3DModelData* tmp_modelData;
tmp_modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_arcName, i_fileIndex));
JUT_ASSERT(21340, tmp_modelData != NULL);
JUT_ASSERT(VERSION_SELECT(21260, 21260, 21340, 21340), tmp_modelData != NULL);
*i_model = mDoExt_J3DModel__create(tmp_modelData, 0x00080000, i_differedDlistFlag);
JUT_ASSERT(21344, *i_model != NULL);
JUT_ASSERT(VERSION_SELECT(21264, 21264, 21344, 21344), *i_model != NULL);
return tmp_modelData;
}
@@ -12108,7 +12153,7 @@ J3DModelData* daPy_lk_c::initModel(J3DModel** i_model, int i_fileIndex, u32 i_di
J3DAnmTextureSRTKey* daPy_lk_c::entryBtk(J3DModelData* param_1, int param_2) {
J3DAnmTextureSRTKey* btk_anm =
static_cast<J3DAnmTextureSRTKey*>(dComIfG_getObjectRes(l_arcName, param_2));
JUT_ASSERT(21373, btk_anm != NULL);
JUT_ASSERT(VERSION_SELECT(21293, 21293, 21373, 21373), btk_anm != NULL);
btk_anm->searchUpdateMaterialID(param_1);
param_1->entryTexMtxAnimator(btk_anm);
btk_anm->setFrame(0.0f);
@@ -12119,7 +12164,7 @@ J3DAnmTextureSRTKey* daPy_lk_c::entryBtk(J3DModelData* param_1, int param_2) {
J3DAnmTevRegKey* daPy_lk_c::entryBrk(J3DModelData* param_1, int param_2) {
J3DAnmTevRegKey* brk_anm =
static_cast<J3DAnmTevRegKey*>(dComIfG_getObjectRes(l_arcName, param_2));
JUT_ASSERT(21395, brk_anm != NULL);
JUT_ASSERT(VERSION_SELECT(21315, 21315, 21395, 21395), brk_anm != NULL);
brk_anm->searchUpdateMaterialID(param_1);
param_1->entryTevRegAnimator(brk_anm);
brk_anm->setFrame(0.0f);
@@ -12129,7 +12174,7 @@ J3DAnmTevRegKey* daPy_lk_c::entryBrk(J3DModelData* param_1, int param_2) {
/* 80124C98-80125CC8 .text playerInit__9daPy_lk_cFv */
void daPy_lk_c::playerInit() {
if (!fopAcM_entrySolidHeap(this, daPy_createHeap, 0xB0000)) {
JUT_ASSERT(21430, FALSE);
JUT_ASSERT(VERSION_SELECT(21350, 21350, 21430, 21430), FALSE);
}
fopAcM_SetMtx(this, mpCLModel->getBaseTRMtx());
@@ -12168,23 +12213,23 @@ void daPy_lk_c::playerInit() {
if (mtl->getZMode()->getCompareEnable() == 0) {
if ((u8)mtl->getBlend()->getType() == GX_BM_BLEND) {
mpZOffBlendShape[zoff_blend_cnt++] = mtl->getShape();
JUT_ASSERT(21486, zoff_blend_cnt <= 4);
JUT_ASSERT(VERSION_SELECT(21406, 21406, 21486, 21486), zoff_blend_cnt <= 4);
} else {
mpZOffNoneShape[zoff_none_cnt++] = mtl->getShape();
JUT_ASSERT(21490, zoff_none_cnt <= 4);
JUT_ASSERT(VERSION_SELECT(21410, 21410, 21490, 21490), zoff_none_cnt <= 4);
}
} else {
mpZOnShape[zon_cnt++] = mtl->getShape();
JUT_ASSERT(21494, zon_cnt <= 4);
JUT_ASSERT(VERSION_SELECT(21414, 21414, 21494, 21494), zon_cnt <= 4);
}
mtl = mtl->getNext();
}
mtl = mpCLModelData->getJointNodePointer(0x15)->getMesh(); // cl_mayu joint
}
JUT_ASSERT(21501, zon_cnt == 4);
JUT_ASSERT(21502, zoff_none_cnt == 4);
JUT_ASSERT(21503, zoff_blend_cnt == 4);
JUT_ASSERT(VERSION_SELECT(21421, 21421, 21501, 21501), zon_cnt == 4);
JUT_ASSERT(VERSION_SELECT(21422, 21422, 21502, 21502), zoff_none_cnt == 4);
JUT_ASSERT(VERSION_SELECT(21423, 21423, 21503, 21503), zoff_blend_cnt == 4);
mpLhandShape = mpCLModelData->getJointNodePointer(0x08)->getMesh()->getShape(); // cl_LhandA joint
mpRhandShape = mpCLModelData->getJointNodePointer(0x0C)->getMesh()->getShape(); // cl_RhandA joint
@@ -12277,13 +12322,13 @@ void daPy_lk_c::playerInit() {
mpItemHeaps[0] = mDoExt_createSolidHeapFromGameToCurrent(0xE600, 0x20);
u8* dummy_data = new u8[0xE600];
JUT_ASSERT(21651, dummy_data != NULL);
JUT_ASSERT(VERSION_SELECT(21571, 21571, 21651, 21651), dummy_data != NULL);
mDoExt_restoreCurrentHeap();
mDoExt_adjustSolidHeap(mpItemHeaps[0]);
mpItemHeaps[1] = mDoExt_createSolidHeapFromGameToCurrent(0xE600, 0x20);
dummy_data = new u8[0xE600];
JUT_ASSERT(21657, dummy_data != NULL);
JUT_ASSERT(VERSION_SELECT(21577, 21577, 21657, 21657), dummy_data != NULL);
mDoExt_restoreCurrentHeap();
mDoExt_adjustSolidHeap(mpItemHeaps[1]);
@@ -12308,10 +12353,10 @@ void daPy_lk_c::playerInit() {
resetSeAnime();
ResTIMG* tmp_tex = (ResTIMG*)dComIfG_getObjectRes("Always", ALWAYS_I4_BALL128B);
JUT_ASSERT(0x54B7, tmp_tex != NULL);
JUT_ASSERT(VERSION_SELECT(21607, 21607, 21687, 21687), tmp_tex != NULL);
mSightPacket.setSightTex(tmp_tex);
ResTIMG* tmp_img = (ResTIMG*)dComIfG_getObjectRes(l_arcName, LINK_BTI_ROCK_MARK);
JUT_ASSERT(0x54BD, tmp_img != NULL);
JUT_ASSERT(VERSION_SELECT(21613, 21613, 21693, 21693), tmp_img != NULL);
void* tmp_img_data = reinterpret_cast<void*>(reinterpret_cast<u32>(tmp_img) + tmp_img->imageOffset);
mSightPacket.setLockTex(tmp_img_data);
mSightPacket.setImage(tmp_img);
@@ -12359,9 +12404,9 @@ void daPy_lk_c::playerInit() {
ResTIMG* linktex_casual = (ResTIMG*)dComIfG_getObjectRes(l_arcName, LINK_BTI_LINKTEXBCI4);
int num_linktex_headers_seen = 0;
J3DTexture* texture = mpCLModelData->getTexture();
JUT_ASSERT(0x5504, texture != NULL);
JUT_ASSERT(VERSION_SELECT(21684, 21684, 21764, 21764), texture != NULL);
JUTNameTab* textureName = mpCLModelData->getTextureName();
JUT_ASSERT(0x5506, textureName != NULL);
JUT_ASSERT(VERSION_SELECT(21686, 21686, 21766, 21766), textureName != NULL);
for (u16 i = 0; i < texture->getNum(); i++) {
const char* texName = textureName->getName(i);
if (strcmp(texName, "linktexS3TC") != 0) {
@@ -12442,16 +12487,39 @@ cPhs_State daPy_lk_c::makeBgWait() {
cXyz local_44;
cXyz local_50;
#if VERSION > VERSION_DEMO
if ((int)m352E != 0) {
m352E--;
}
#endif
mAcch.CrrPos(*dComIfG_Bgsp());
if (-G_CM3D_F_INF == mAcch.GetGroundH() ||
(m352E != 0 && dComIfG_Bgsp()->ChkMoveBG(mAcch.m_gnd) &&
fopAcM_GetName(dComIfG_Bgsp()->GetActorPointer(mAcch.m_gnd)) == PROC_TBOX))
{
if (
mAcch.GetGroundH() == -G_CM3D_F_INF
#if VERSION > VERSION_DEMO
|| (
m352E != 0 && dComIfG_Bgsp()->ChkMoveBG(mAcch.m_gnd) &&
fopAcM_GetName(dComIfG_Bgsp()->GetActorPointer(mAcch.m_gnd)) == PROC_TBOX
)
#endif
) {
return cPhs_INIT_e;
}
#if VERSION == VERSION_DEMO
if (((fopAcM_GetParam(this) & 0x80) != 0)) {
m352E--;
if (m352E != 0) {
if (!dComIfG_Bgsp()->ChkMoveBG(mAcch.m_gnd) ||
fopAcM_GetName(dComIfG_Bgsp()->GetActorPointer(mAcch.m_gnd)) != PROC_OBJ_IKADA)
{
return cPhs_INIT_e;
}
current.pos.y = mAcch.GetGroundH();
}
}
#else
if (((fopAcM_GetParam(this) & 0x80) != 0) && m352E != 0) {
if (!dComIfG_Bgsp()->ChkMoveBG(mAcch.m_gnd) ||
fopAcM_GetName(dComIfG_Bgsp()->GetActorPointer(mAcch.m_gnd)) != PROC_OBJ_IKADA)
@@ -12461,6 +12529,8 @@ cPhs_State daPy_lk_c::makeBgWait() {
current.pos.y = mAcch.GetGroundH();
m352E = 0;
}
#endif
setWaterY();
u32 uVar5 = fopAcM_GetParam(this) & 0x40;
if (uVar5 == 0) {
@@ -12487,10 +12557,12 @@ cPhs_State daPy_lk_c::makeBgWait() {
if (ship == NULL) {
return cPhs_INIT_e;
}
#if VERSION > VERSION_JPN
if (dComIfGs_isEventBit(0x3e10)) {
dComIfGs_onEventBit(0x3e01);
dComIfGs_onEventBit(0x3f80);
}
#endif
s16 sVar6;
if (uVar5 != 0) {
s16 sVar2 = shape_angle.y;
@@ -12515,10 +12587,11 @@ cPhs_State daPy_lk_c::makeBgWait() {
procShipRestart_init();
} else if (startMode == 9) {
ship->setStartModeWarp();
#if VERSION > VERSION_DEMO
local_38.set(current.pos.x, current.pos.y + 1500.0f, current.pos.z);
fpc_ProcID uVar8 =
fopAcM_create(PROC_TORNADO, 2, &local_38, fopAcM_GetRoomNo(this));
fpc_ProcID uVar8 = fopAcM_create(PROC_TORNADO, 2, &local_38, fopAcM_GetRoomNo(this));
ship->setTactWarpID(uVar8);
#endif
}
}
} else if (startMode == 4) {
@@ -12607,8 +12680,12 @@ cPhs_State daPy_lk_c::makeBgWait() {
mpCLModelData->getJointNodePointer(0)->setMtxCalc(m_pbCalc[PART_UNDER_e]);
mpCLModelData->getJointNodePointer(0x02)->setMtxCalc(m_pbCalc[PART_UPPER_e]);
mpCLModelData->getJointNodePointer(0x1D)->setMtxCalc(m_pbCalc[PART_UNDER_e]);
#if VERSION > VERSION_DEMO
checkOriginalHatAnimation();
animeUpdate();
#endif
mpCLModel->calc();
mpKatsuraModel->setBaseTRMtx(mpCLModel->getAnmMtx(0xF));
mpKatsuraModel->calc();
@@ -12628,14 +12705,17 @@ cPhs_State daPy_lk_c::makeBgWait() {
} else {
mTinkleShieldTimer = (s16)(dComIfGs_getLastSceneMode() >> 0x10);
}
#if VERSION > VERSION_DEMO
if ((dComIfGs_getLastSceneMode() & 0x4000) != 0) {
onNoResetFlg1(daPyFlg1_UNK8000);
}
#if VERSION > VERSION_DEMO
l_debug_keep_pos = current.pos;
l_debug_shape_angle = shape_angle;
l_debug_current_angle = current.angle;
#endif
return cPhs_NEXT_e;
}
@@ -12668,7 +12748,7 @@ void daPy_lk_c::setSeAnime(const daPy_anmHeap_c* anmHeap, J3DFrameCtrl* frameCtr
u32 data_size = fileHeader->mFileSize - fileHeader->mSeAnmOffset;
const u32 l_sanm_buffer_size = 0x200;
JUT_ASSERT(22318, data_size < l_sanm_buffer_size);
JUT_ASSERT(VERSION_SELECT(22228, 22228, 22318, 22318), data_size < l_sanm_buffer_size);
u8* seAnmPtr = reinterpret_cast<u8*>(anmHeap->m_buffer) + fileHeader->mSeAnmOffset;
cLib_memCpy(m_sanm_buffer, seAnmPtr, data_size);
@@ -13109,8 +13189,14 @@ void daPy_lk_c::endDemoMode() {
/* 80128F8C-8012901C .text getBokoFlamePos__9daPy_lk_cFP4cXyz */
BOOL daPy_lk_c::getBokoFlamePos(cXyz* outPos) {
if (mEquipItem == daPyItem_BOKO_e) {
#if VERSION == VERSION_DEMO
daBoko_c* boko = (daBoko_c*)mActorKeepEquip.getActor();
if (boko->getFlameTimer() != 0)
#else
daBoko_c* boko = (daBoko_c*)fopAcM_SearchByID(mActorKeepEquip.getID());
if (boko && boko->m2C4 != 0) { // maybe daBoko_c::getFlameTimer inline
if (boko && boko->getFlameTimer() != 0)
#endif
{
*outPos = mSwordTopPos;
return TRUE;
}
+12 -1
View File
@@ -115,8 +115,10 @@ void daPy_swimTailEcallBack_c::draw(JPABaseEmitter*) {
/* 80129348-8012952C .text draw__18daPy_sightPacket_cFv */
void daPy_sightPacket_c::draw() {
#if VERSION > VERSION_JPN
j3dSys.reinitGX();
GXSetNumIndStages(0);
#endif
GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
@@ -152,7 +154,10 @@ void daPy_sightPacket_c::draw() {
GXSetCurrentMtx(GX_PNMTX0);
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL);
GXCallDisplayList(&l_sightDL, sizeof(l_sightDL) - 0x09);
#if VERSION > VERSION_JPN
J3DShape::resetVcdVatCache();
#endif
}
/* 8012952C-801296FC .text setSight__18daPy_sightPacket_cFv */
@@ -260,8 +265,10 @@ void daPy_swBlur_c::copySwBlur(MtxP mtx, int param_2) {
/* 80129A78-80129DD0 .text draw__13daPy_swBlur_cFv */
void daPy_swBlur_c::draw() {
#if VERSION > VERSION_JPN
j3dSys.reinitGX();
GXSetNumIndStages(0);
#endif
static GXTexObj texObj;
u16 texWidth = 16;
@@ -323,7 +330,10 @@ void daPy_swBlur_c::draw() {
r28 = r29;
r29 += r30;
}
#if VERSION > VERSION_JPN
J3DShape::resetVcdVatCache();
#endif
}
/* 80129DD0-80129E9C .text execute__24daPy_fanSwingEcallBack_cFP14JPABaseEmitter */
@@ -438,6 +448,7 @@ void daPy_dmEcallBack_c::execute(JPABaseEmitter* emitter) {
pos.x = (mpMtx[0][3] - pos.x) * -0.05f;
pos.z = (mpMtx[2][3] - pos.z) * -0.05f;
f32 f6 = 0.6f;
f32 sq = pos.x * pos.x + pos.z * pos.z;
if (sq > 1.0f) {
@@ -447,7 +458,7 @@ void daPy_dmEcallBack_c::execute(JPABaseEmitter* emitter) {
pos.z *= distFrac;
}
emitter->setDirection(JGeometry::TVec3<f32>(pos.x, 0.6f, pos.z));
emitter->setDirection(JGeometry::TVec3<f32>(pos.x, f6, pos.z));
} else {
emitter->setGlobalRTMatrix(mpMtx);
}
+59 -33
View File
@@ -641,42 +641,58 @@ BOOL daPy_lk_c::procRopeSwing() {
cXyz sp28;
mDoMtx_stack_c::multVec(&sp34, &sp28);
if (checkSpecialRope()) {
f30 = 0.0f;
dVar13 = 0.0f;
} else {
f32 f30_2;
#if VERSION == VERSION_DEMO
if (strcmp(dComIfGp_getStartStageName(), "GanonK") == 0) {
if ((0.0f <= f30) && (f30 <= M_PI / 2)) {
f30 = -0.45f * cM_fsin(f30);
f30_2 = -0.1f * cM_fsin(f30);
} else if (f30 <= -M_PI / 2) {
f30_2 = 0.1f * cM_fsin(f30);
} else {
if (f30 <= -M_PI / 2) {
f30 = 0.45f * cM_fsin(f30);
} else {
f30 = 0.0f;
}
f30_2 = 0.25f;
}
if ((0.0f <= dVar13) && (dVar13 <= M_PI / 2)) {
dVar13 = -0.1f * cM_fsin(dVar13);
} else if (dVar13 <= -M_PI / 2) {
dVar13 = 0.1f * cM_fsin(dVar13);
} else {
dVar13 = 0.25f;
}
}
#else
if (checkSpecialRope()) {
f30_2 = 0.0f;
dVar13 = 0.0f;
}
#endif
else {
if ((0.0f <= f30) && (f30 <= M_PI / 2)) {
f30_2 = -0.45f * cM_fsin(f30);
} else if (f30 <= -M_PI / 2) {
f30_2 = 0.45f * cM_fsin(f30);
} else {
f30_2 = 0.0f;
}
if ((0.0f <= dVar13) && (dVar13 <= M_PI / 2)) {
dVar13 = -0.45f * cM_fsin(dVar13);
} else if (dVar13 <= -M_PI / 2) {
dVar13 = 0.45f * cM_fsin(dVar13);
} else {
if (dVar13 <= -M_PI / 2) {
dVar13 = 0.45f * cM_fsin(dVar13);
} else {
dVar13 = 0.0f;
}
dVar13 = 0.0f;
}
}
f32 dVar11 = 1.0f;
m35A8 = m35A8 + (dVar11 + f30);
m35AC = m35AC + (dVar11 + dVar13);
m35A8 = m35A8 + (1.0f + f30_2);
m35AC = m35AC + (1.0f + dVar13);
f32 sp0C = m35A8 * m35A4;
f30 = m35AC * m35A4;
f30_2 = m35AC * m35A4;
if (sp0C >= M_PI) {
sp0C = sp0C - M_PI * 2;
m35A8 = sp0C / m35A4;
}
if (f30 >= M_PI) {
f30 = f30 - M_PI * 2;
m35AC = f30 / m35A4;
if (f30_2 >= M_PI) {
f30_2 = f30_2 - M_PI * 2;
m35AC = f30_2 / m35A4;
}
if ((checkModeFlg(ModeFlg_00000400)) && (mFrameCtrlUnder[UNDER_MOVE0_e].getRate() < 0.01f)) {
offModeFlg(ModeFlg_00000400);
@@ -688,15 +704,25 @@ BOOL daPy_lk_c::procRopeSwing() {
s16 r30;
s16 r28;
s16 r29;
#if VERSION == VERSION_DEMO
if (strcmp(dComIfGp_getStartStageName(), "GanonK") == 0) {
r30 = daPy_HIO_rope_c0::m.field_0x0 / 3;
r28 = 0xA;
r29 = 0x15;
}
#else
if (checkSpecialRope()) {
r30 = daPy_HIO_rope_c0::m.field_0x0 / 8.0f;
r28 = 4;
r29 = 8;
} else {
}
#endif
else {
r30 = daPy_HIO_rope_c0::m.field_0x0;
r28 = 0x20;
r29 = 0x40;
}
if (spActionButton()) {
cLib_chaseS(&m34D4, 0, r28 * 10);
cLib_chaseS(&m34D6, 0, r28 * 10);
@@ -714,20 +740,20 @@ BOOL daPy_lk_c::procRopeSwing() {
}
s16 sp08 = -m34D4 * cM_fsin(sp0C);
s16 r29_2 = m34D6 * cM_fsin(f30);
s16 r29_2 = m34D6 * cM_fsin(f30_2);
s16 r28_2;
if (m34D0 != 0) {
dVar13 = m_pbCalc[PART_UNDER_e]->getRatio(1);
f32 f1 = m_pbCalc[PART_UNDER_e]->getRatio(1);
f32 f2 = -m34D4 * cM_fsin(sp0C);
f32 f0 = 0.5f * m34D4 * m34D0;
r28_2 = f2 + (f0 * dVar13);
r28_2 = f2 + (f0 * f1);
} else {
r28_2 = -m34D4 * cM_fsin(sp0C - (M_PI / 5));
}
cLib_addCalcAngleS(&shape_angle.x, r28_2, 8, 0xc00, 0x100);
dVar13 = cM_fcos(f30);
dVar13 = cM_fcos(f30_2);
cLib_addCalcAngleS(
&shape_angle.z, m34D6 * cM_fsin(f30 - 1.0995574f), 8, 0x400 + (0x800 * dVar13), 0x80 + (0x80 * dVar13)
&shape_angle.z, m34D6 * cM_fsin(f30_2 - 1.0995574f), 8, 0x400 + (0x800 * dVar13), 0x80 + (0x80 * dVar13)
);
cXyz sp1C(0.0f, -m35A0, 0.0f);
mDoMtx_stack_c::transS(mRopePos.x, mRopePos.y, mRopePos.z);
@@ -747,23 +773,23 @@ BOOL daPy_lk_c::procRopeSwing() {
}
}
f30 = ((f32)m34D4 / r30);
f32 f30_3 = ((f32)m34D4 / r30);
if (changeRopeEndProc(0)) {
dVar13 = (m35A0 / (100.0f * daPy_HIO_rope_c0::m.field_0x14));
if (dVar13 < 1.0f) {
dVar13 = 1.0f;
}
f30 *= dVar13;
mVelocity = daPy_HIO_rope_c0::m.field_0xC * f30;
f30_3 *= dVar13;
mVelocity = daPy_HIO_rope_c0::m.field_0xC * f30_3;
if (std::abs(sp0C) > M_PI / 2) {
current.angle.y = shape_angle.y + 0x8000;
}
speed.y = daPy_HIO_rope_c0::m.field_0x10 * f30;
speed.y = daPy_HIO_rope_c0::m.field_0x10 * f30_3;
procFall_init(0, daPy_HIO_wallCatch_c0::m.field_0x54);
onNoResetFlg1(daPyFlg1_UNK8000000);
} else if ((m34D4 == 0) && (m34D6 == 0)) {
procRopeHangWait_init(0);
} else if (f30 > 0.6f) {
} else if (f30_3 > 0.6f) {
if (cM_fcos(sp0C) > 0.77f) {
mDoAud_seStart(JA_SE_LK_ROPE_SWING_F, &mRopePos, 0, mReverb);
}
+6 -6
View File
@@ -655,7 +655,7 @@ BOOL daPy_lk_c::procShipPaddle() {
}
} else {
onResetFlg0(daPyRFlg0_UNK4000000);
if (dComIfGp_checkCameraAttentionStatus(mCameraInfoIdx, 0x1000) && dComIfGp_event_runCheck() == 0) {
if (dComIfGp_checkCameraAttentionStatus(mCameraInfoIdx, 0x1000) && !dComIfGp_event_runCheck()) {
setSubjectMode();
}
}
@@ -905,7 +905,7 @@ BOOL daPy_lk_c::procShipBow_init() {
deleteEquipItem(TRUE);
gravity = 0.0f;
ship->setPaddleMove();
if (mDemo.getDemoMode() == daPy_demo_c::DEMO_UNK_068_e) {
if (checkBowMiniGame()) {
mEquipItem = dItem_BOW_e;
} else {
mEquipItem = dComIfGp_getSelectItem(mReadyItemBtn);
@@ -917,7 +917,7 @@ BOOL daPy_lk_c::procShipBow_init() {
setShipRidePos(0);
m34D4 = ship->shape_angle.y;
m34DA = 0;
if (checkAttentionLock() && mDemo.getDemoMode() != daPy_demo_c::DEMO_UNK_068_e) {
if (checkAttentionLock() && !checkBowMiniGame()) {
mProcVar0.m3570 = 1;
} else {
mProcVar0.m3570 = 0;
@@ -928,11 +928,11 @@ BOOL daPy_lk_c::procShipBow_init() {
/* 80142084-80142250 .text procShipBow__9daPy_lk_cFv */
BOOL daPy_lk_c::procShipBow() {
if ((mDemo.getDemoMode() != daPy_demo_c::DEMO_UNK_068_e) && changeShipEndProc()) {
if (!checkBowMiniGame() && changeShipEndProc()) {
return true;
}
setShipRidePos(0);
if (mDemo.getDemoMode() != daPy_demo_c::DEMO_UNK_068_e) {
if (!checkBowMiniGame()) {
dComIfGp_setDoStatus(dActStts_RETURN_e);
if (doTrigger() || ((!checkAttentionLock() && mActorKeepEquip.getActor() == NULL) && mProcVar0.m3570 != 0)) {
procShipPaddle_init();
@@ -946,7 +946,7 @@ BOOL daPy_lk_c::procShipBow() {
if (checkBowWaitAnime()) {
setShipAttentionAnmSpeed(1.0f);
}
if (checkAttentionLock() && (mDemo.getDemoMode() != daPy_demo_c::DEMO_UNK_068_e)) {
if (checkAttentionLock() && !checkBowMiniGame()) {
setShipAttnetionBodyAngle();
mProcVar0.m3570 = 1;
} else {
+2 -2
View File
@@ -1567,7 +1567,7 @@ BOOL daPy_lk_c::procCutRoll() {
shape_angle.y = current.angle.y;
}
sVar3 = current.angle.y - uVar1;
if (dComIfGp_event_runCheck() != 0) {
if (dComIfGp_event_runCheck()) {
if (mDemo.getDemoMode() != daPy_demo_c::DEMO_CUT_ROLL_e) {
m34D0 = 0;
} else {
@@ -1587,7 +1587,7 @@ BOOL daPy_lk_c::procCutRoll() {
} else if (cLib_addCalc(&mVelocity, 0.0f, 0.1f, 2.5f, 1.0f) < 0.5f) {
shape_angle.y = shape_angle.y + m34EC;
current.angle.y = shape_angle.y;
if (dComIfGp_event_runCheck() != 0 && (mDemo.getDemoMode() != daPy_demo_c::DEMO_CUT_ROLL_e)) {
if (dComIfGp_event_runCheck() && (mDemo.getDemoMode() != daPy_demo_c::DEMO_CUT_ROLL_e)) {
procWait_init();
} else {
procCutRollEnd_init();
+8 -3
View File
@@ -54,7 +54,7 @@ void daPy_lk_c::setTactModel() {
BOOL daPy_lk_c::checkNpcStatus() {
daPy_py_c* partner = (daPy_py_c*)dComIfGp_getCb1Player();
if (partner) {
if (!partner->checkNpcNotChange() && partner->current.roomNo == current.roomNo) {
if (!partner->checkNpcNotChange() && partner->current.roomNo == fopAcM_GetRoomNo(this)) {
return TRUE;
}
}
@@ -116,7 +116,12 @@ BOOL daPy_lk_c::checkTactLastInput() {
/* 8014D9F8-8014DA78 .text setTactZev__9daPy_lk_cFUiiPc */
void daPy_lk_c::setTactZev(fpc_ProcID tactZevPartnerId, int r30, char* r31) {
if (tactZevPartnerId != fpcM_ERROR_PROCESS_ID_e) {
#if VERSION <= VERSION_JPN
if (r31)
#else
if (tactZevPartnerId != fpcM_ERROR_PROCESS_ID_e)
#endif
{
seStartSystem(JA_SE_PRE_TAKT);
}
mTactZevPartnerId = tactZevPartnerId;
@@ -541,7 +546,7 @@ BOOL daPy_lk_c::procTactPlay_init(s32 r27, int r30, int r31) {
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
if (dStage_stagInfo_GetSTType(stag_info) == dStageType_SEA_e && m34CC != 1 && r30 != 0) {
daShip_c* ship = dComIfGp_getShipActor();
fpc_ProcID warpID = fopAcM_create(PROC_TORNADO, 1, &current.pos, current.roomNo);
fpc_ProcID warpID = fopAcM_create(PROC_TORNADO, 1, &current.pos, fopAcM_GetRoomNo(this));
ship->setTactWarpID(warpID);
}
}
+15 -1
View File
@@ -87,6 +87,9 @@ BOOL daPy_lk_c::procVomitWait_init() {
mVelocity = 0.0f;
m34D4 = 0;
dComIfGp_setPlayerStatus0(0, daPyStts0_UNK80_e);
#if VERSION == VERSION_PAL
m34D0 = 0;
#endif
return true;
}
@@ -94,9 +97,20 @@ BOOL daPy_lk_c::procVomitWait_init() {
BOOL daPy_lk_c::procVomitWait() {
s16 r30 = 0;
#if VERSION < VERSION_PAL
if (checkNoResetFlg1(daPyFlg1_FORCE_VOMIT_JUMP)) {
procVomitJump_init(0);
} else {
}
#else
if (checkNoResetFlg1(daPyFlg1_FORCE_VOMIT_JUMP) || m34D0) {
if (!dComIfGp_event_runCheck()) {
procVomitJump_init(0);
} else {
m34D0 = 1;
}
}
#endif
else {
if (mStickDistance > 0.05f) {
int direction = getDirectionFromAngle(m34DC);
if (direction == DIR_LEFT) {
+1 -1
View File
@@ -394,7 +394,7 @@ BOOL daPy_lk_c::procWeaponThrow() {
uVar2 = cM_atan2s(-local_34.y, dVar5);
}
}
boko->m2BA = 1;
boko->setThrow(1);
boko->m2CA = uVar2;
voiceStart(0);
deleteEquipItem(FALSE);
+1 -1
View File
@@ -853,7 +853,7 @@ f32 daShip_c::getWaterY() {
waterY = m03F4;
#else
daPy_lk_c* link = daPy_getPlayerLinkActorClass();
if (link && link->mDemo.getDemoMode() == daPy_demo_c::DEMO_UNK_068_e ) {
if (link && link->checkBowMiniGame()) {
waterY = 0.0f;
}
else {
+1 -1
View File
@@ -273,7 +273,7 @@ s32 daSwhit0_c::actionOffWait() {
/* 00000D8C-00000E24 .text actionToOnReady__10daSwhit0_cFv */
s32 daSwhit0_c::actionToOnReady() {
if (dComIfGp_event_runCheck() != 0) {
if (dComIfGp_event_runCheck()) {
return TRUE;
}
+9 -5
View File
@@ -643,13 +643,13 @@ void dCamera_c::updateMonitor() {
/* 801628DC-80163020 .text calcPeepAngle__9dCamera_cFv */
cSAngle dCamera_c::calcPeepAngle() {
f32 temp_50 = 50.0f;
f32 temp_30 = 30.0f;
cSAngle res(cSAngle::_0);
if (check_owner_action(mPadId, daPyStts0_UNK20_e)) {
f32 temp_30 = 30.0f;
cXyz local_b8(0.0f, 0.0f, -temp_30);
f32 temp_50 = 50.0f;
cXyz local_ac(-temp_50, 0.0f, -temp_30);
cXyz local_a0(relationalPos(mpPlayerActor, &local_b8));
@@ -663,10 +663,9 @@ cSAngle dCamera_c::calcPeepAngle() {
}
}
else if (check_owner_action(mPadId, daPyStts0_UNK40_e)) {
f32 temp_30 = 30.0f;
cXyz local_88(0.0f, 0.0f, -temp_30);
cXyz local_7c(50.0f, 0.0f, -temp_30);
cXyz local_7c(temp_50, 0.0f, -temp_30);
cXyz local_70(relationalPos(mpPlayerActor, &local_88));
cXyz local_64(relationalPos(mpPlayerActor, &local_7c));
@@ -1239,7 +1238,12 @@ int dCamera_c::nextMode(s32 i_curMode) {
if (next_mode == 12 && types[mCurType].mStyles[next_mode] < 0) {
next_mode = i_curMode;
if (mCurType != mCamTypeEvent && mCurType != mCamTypeBoat && mCurType != mCamTypeBoatBattle && mCurType != mCamTypeRestrict) {
#if VERSION == VERSION_DEMO
if (mCurType != mCamTypeEvent && mCurType != mCamTypeBoat && mCurType != GetCameraTypeFromCameraName("BoatBattle"))
#else
if (mCurType != mCamTypeEvent && mCurType != mCamTypeBoat && mCurType != mCamTypeBoatBattle && mCurType != mCamTypeRestrict)
#endif
{
m254 |= 1;
}
m144 = 1;
+19 -6
View File
@@ -4,6 +4,7 @@
//
#include "d/d_ovlp_fade.h"
#include "d/d_priority.h"
#include "f_op/f_op_overlap.h"
#include "f_op/f_op_overlap_mng.h"
#include "f_pc/f_pc_manager.h"
@@ -31,10 +32,14 @@ BOOL dOvlpFd_FadeOut(overlap1_class* i_this) {
}
}
#if VERSION > VERSION_DEMO
fopOvlpM_SceneIsStart();
#endif
if (--i_this->mFadeOutTime == 0) {
fopOvlpM_Done(i_this);
#if VERSION > VERSION_DEMO
i_this->mFadeOutTime++;
#endif
}
return TRUE;
@@ -42,8 +47,12 @@ BOOL dOvlpFd_FadeOut(overlap1_class* i_this) {
/* 802236AC-802236E4 .text dOvlpFd_Wait__FP14overlap1_class */
BOOL dOvlpFd_Wait(overlap1_class* i_this) {
if (fopOvlpM_IsOutReq(i_this))
if (fopOvlpM_IsOutReq(i_this)) {
dOvlpFd_execute_f = dOvlpFd_FadeOut;
#if VERSION == VERSION_DEMO
fopOvlpM_SceneIsStart();
#endif
}
return TRUE;
}
@@ -84,7 +93,11 @@ static BOOL dOvlpFd_Delete(overlap1_class* i_this) {
/* 802237E0-802237F4 .text dOvlpFd_Create__FPv */
static cPhs_State dOvlpFd_Create(void* i_this) {
dOvlpFd_execute_f = dOvlpFd_FadeIn;
#if VERSION == VERSION_DEMO
return cPhs_NEXT_e;
#else
return cPhs_COMPLEATE_e;
#endif
}
overlap_method_class l_dOvlpFd_Method = {
@@ -105,7 +118,7 @@ overlap_process_profile_definition g_profile_OVERLAP0 = {
0,
0,
&g_fopOvlp_Method,
0x1E1,
PRIO_OVERLAP0,
&l_dOvlpFd_Method,
};
@@ -119,7 +132,7 @@ overlap_process_profile_definition g_profile_OVERLAP1 = {
0,
0,
&g_fopOvlp_Method,
0x1E2,
PRIO_OVERLAP1,
&l_dOvlpFd_Method,
};
@@ -133,7 +146,7 @@ overlap_process_profile_definition g_profile_OVERLAP6 = {
0,
0,
&g_fopOvlp_Method,
0x1E7,
PRIO_OVERLAP6,
&l_dOvlpFd_Method,
};
@@ -147,7 +160,7 @@ overlap_process_profile_definition g_profile_OVERLAP7 = {
0,
0,
&g_fopOvlp_Method,
0x1E8,
PRIO_OVERLAP7,
&l_dOvlpFd_Method,
};
@@ -161,6 +174,6 @@ overlap_process_profile_definition g_profile_OVERLAP8 = {
0,
0,
&g_fopOvlp_Method,
0x1E9,
PRIO_OVERLAP8,
&l_dOvlpFd_Method,
};
+3 -2
View File
@@ -5,6 +5,7 @@
#include "d/d_ovlp_fade2.h"
#include "d/d_com_inf_game.h"
#include "d/d_priority.h"
#include "d/d_procname.h"
#include "d/d_s_play.h"
#include "f_ap/f_ap_game.h"
@@ -253,7 +254,7 @@ overlap_process_profile_definition g_profile_OVERLAP2 = {
0,
0,
&g_fopOvlp_Method,
0x1E3,
PRIO_OVERLAP2,
&l_dOvlpFd2_Method,
};
@@ -268,7 +269,7 @@ overlap_process_profile_definition g_profile_OVERLAP3 = {
0,
0,
&g_fopOvlp_Method,
0x1E4,
PRIO_OVERLAP3,
&l_dOvlpFd2_Method,
};
#endif
+3 -2
View File
@@ -5,6 +5,7 @@
#include "d/d_ovlp_fade4.h"
#include "d/d_com_inf_game.h"
#include "d/d_priority.h"
#include "d/d_procname.h"
#include "f_op/f_op_overlap.h"
#include "m_Do/m_Do_graphic.h"
@@ -385,7 +386,7 @@ overlap_process_profile_definition g_profile_OVERLAP4 = {
0,
0,
&g_fopOvlp_Method,
0x1E5,
PRIO_OVERLAP4,
&l_dOvlpFd4_Method,
};
@@ -399,6 +400,6 @@ overlap_process_profile_definition g_profile_OVERLAP5 = {
0,
0,
&g_fopOvlp_Method,
0x1E6,
PRIO_OVERLAP5,
&l_dOvlpFd4_Method,
};
+7 -4
View File
@@ -4,6 +4,7 @@
//
#include "d/d_place_name.h"
#include "d/d_priority.h"
#include "f_op/f_op_msg.h"
#include "f_op/f_op_msg_mng.h"
#include "d/d_com_inf_game.h"
@@ -83,7 +84,8 @@ void dPlace_name_c::setScreen(const char* name, JKRArchive* arc) {
BOOL dPlace_name_c::_openAnime() {
if (pane.mUserArea < 10) {
pane.mUserArea++;
f32 alpha = fopMsgM_valueIncrease(10, pane.mUserArea, 0);
s16 tmp = pane.mUserArea;
f32 alpha = fopMsgM_valueIncrease(10, tmp, 0);
fopMsgM_setNowAlpha(&pane, alpha);
}
@@ -96,7 +98,8 @@ BOOL dPlace_name_c::_closeAnime() {
if (pane.mUserArea > 0) {
pane.mUserArea--;
f32 alpha = fopMsgM_valueIncrease(10, pane.mUserArea, 0);
s16 tmp = pane.mUserArea;
f32 alpha = fopMsgM_valueIncrease(10, tmp, 0);
fopMsgM_setNowAlpha(&pane, alpha);
}
@@ -213,7 +216,7 @@ BOOL dPn_c::_delete() {
mpHeap->freeAll();
dComIfGp_offHeapLockFlag();
mDoExt_setCurrentHeap(oldHeap);
dComIfG_resDelete(&mPhs, "PName");
dComIfG_resDeleteDemo(&mPhs, "PName");
return TRUE;
}
@@ -261,6 +264,6 @@ msg_process_profile_definition g_profile_PLACE_NAME = {
0,
0,
&g_fopMsg_Method,
0x1DD,
PRIO_PLACE_NAME,
&l_dPlace_name_Method,
};
+4 -1
View File
@@ -19,10 +19,13 @@ fapGm_HIO_c g_HIO;
fapGm_HIO_c::fapGm_HIO_c() {
field_0x05 = 1;
#if VERSION > VERSION_DEMO
if (mDoMain::developmentMode) {
mDisplayMeter = true;
mDisplayFlag = 1;
} else {
} else
#endif
{
mDisplayMeter = false;
mDisplayFlag = 0;
}
+49 -24
View File
@@ -598,12 +598,14 @@ char* fopMsgM_messageGet(char* dst, u32 msgNo) {
dstPtr++;
}
else if ((next_as_int & 0xFFFFFF) == 0) {
#if VERSION > VERSION_DEMO
strcpy(dstBuf, dComIfGs_getPlayerName());
#if VERSION <= VERSION_JPN
if(msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE) {
#else
if(dComIfGs_getPalLanguage() == 1 && (msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE)) {
if(
#if VERSION > VERSION_JPN
dComIfGs_getPalLanguage() == 1 &&
#endif
(msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE)
) {
s32 bufLen = strlen(dstBuf);
current = (dstBuf)[bufLen - 1];
if(current == 's' || current == 'S' || current == 'z' || current == 'Z' || current == 'x' || current == 'X') {
@@ -613,6 +615,7 @@ char* fopMsgM_messageGet(char* dst, u32 msgNo) {
strcat(dstBuf, "s");
}
}
#endif
for (char* bufPtr = dstBuf; *bufPtr != '\0'; bufPtr++) {
*dstPtr = *bufPtr;
@@ -659,12 +662,14 @@ void fopMsgM_passwordGet(char* dst, u32 msgNo) {
while(cursor = (u32*)src + curOffset, current = *cursor, (s8)*cursor != '\0') {
if(*cursor == 0x1A) {
if((cursor[1] & 0xFFFFFF) == 0) {
#if VERSION > VERSION_DEMO
strcpy(dstBuf, dComIfGs_getPlayerName());
#if VERSION <= VERSION_JPN
if(msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE) {
#else
if(dComIfGs_getPalLanguage() == 1 && (msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE)) {
if(
#if VERSION > VERSION_JPN
dComIfGs_getPalLanguage() == 1 &&
#endif
(msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE)
) {
s32 bufLen = strlen(dstBuf);
current = (dstBuf)[bufLen - 1];
if(current == 's' || current == 'S' || current == 'z' || current == 'Z' || current == 'x' || current == 'X') {
@@ -674,6 +679,7 @@ void fopMsgM_passwordGet(char* dst, u32 msgNo) {
strcat(dstBuf, "s");
}
}
#endif
for(s32 i = 0; dstBuf[i] != '\0'; i++) {
dst[numRead] = dstBuf[i];
@@ -2382,51 +2388,69 @@ void fopMsgM_int_to_char2(char* dst, int num) {
/* 800351E8-80035408 .text getString__21fopMsgM_msgDataProc_cFPcUl */
void fopMsgM_msgDataProc_c::getString(char* dst, u32 msgNo) {
/* Nonmatching */
s32 i;
fopMsgM_msgGet_c msgGet;
msgGet.mMsgIdx = 0;
msgGet.mGroupID = 0;
msgGet.mMsgNo = 0;
msgGet.mResMsgNo = 0;
#if VERSION > VERSION_DEMO
static const char* name = "no name";
#endif
#if VERSION > VERSION_DEMO
s32 curOffset = 0;
s32 numRead = 0;
#endif
mesg_header* header;
const char* src;
#if VERSION > VERSION_DEMO
if(msgNo == 0) {
src = name;
}
else {
else
#endif
{
header = msgGet.getMesgHeader(msgNo);
src = msgGet.getMessage(header);
}
char dstBuf[24];
#if VERSION == VERSION_DEMO
s32 curOffset = 0;
s32 numRead = 0;
#endif
const u8* cursor;
s32 current;
while(cursor = (u8*)src + curOffset, current = *cursor, (s8)*cursor != '\0') {
if(*cursor == 0x1A) {
int codeLen = cursor[1];
if(cursor[2] == 0 && cursor[3] == 0 && cursor[4] == 0) {
strcpy(dstBuf, dComIfGs_getPlayerName());
#if VERSION <= VERSION_JPN
if(msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE) {
#if VERSION == VERSION_DEMO
const char* str = dComIfGs_getPlayerName();
#else
if(dComIfGs_getPalLanguage() == 1 && (msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE)) {
char str[24];
strcpy(str, dComIfGs_getPlayerName());
if(
#if VERSION > VERSION_JPN
dComIfGs_getPalLanguage() == 1 &&
#endif
s32 bufLen = strlen(dstBuf);
current = (dstBuf)[bufLen - 1];
(msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE)
) {
s32 bufLen = strlen(str);
current = (str)[bufLen - 1];
if(current == 's' || current == 'S' || current == 'z' || current == 'Z' || current == 'x' || current == 'X') {
strcat(dstBuf, "\'");
strcat(str, "\'");
}
else {
strcat(dstBuf, "s");
strcat(str, "s");
}
}
#endif
for(s32 i = 0; dstBuf[i] != '\0'; i++) {
dst[numRead] = dstBuf[i];
for(i = 0; str[i] != '\0'; i++) {
dst[numRead] = str[i];
numRead++;
}
}
@@ -2474,11 +2498,12 @@ void fopMsgM_msgDataProc_c::getString(char* dst, char*, char*, char*, u32 msgNo,
int codeLen = cursor[1];
if(cursor[2] == 0 && cursor[3] == 0 && cursor[4] == 0) {
strcpy(dstBuf, dComIfGs_getPlayerName());
#if VERSION <= VERSION_JPN
if(msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE) {
#else
if(dComIfGs_getPalLanguage() == 1 && (msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE)) {
if(
#if VERSION > VERSION_JPN
dComIfGs_getPalLanguage() == 1 &&
#endif
(msgNo == 0x33B || msgNo == 0xC8B || msgNo == 0x1D21 || msgNo == 0x31D7 || msgNo == 0x37DD || msgNo == 0x37DE)
) {
s32 bufLen = strlen(dstBuf);
current = (dstBuf)[bufLen - 1];
if(current == 's' || current == 'S' || current == 'z' || current == 'Z' || current == 'x' || current == 'X') {
+12 -1
View File
@@ -45,6 +45,12 @@ void mDoMemCd_Ctrl_c::main() {
while (mCommand == CARD_NO_COMMAND)
OSWaitCond(&mCond, &mMutex);
#if VERSION == VERSION_DEMO
if (mDoRst::isReset()) {
mCommand = CARD_NO_COMMAND;
}
#endif
switch (mCommand) {
case CARD_RESTORE:
restore();
@@ -75,13 +81,16 @@ void mDoMemCd_Ctrl_c::main() {
/* 80018EC8-80018FD8 .text update__15mDoMemCd_Ctrl_cFv */
void mDoMemCd_Ctrl_c::update() {
#if VERSION > VERSION_DEMO
if (mDoRst::isReset()) {
OSLockMutex(&mMutex);
mCommand = CARD_DETACH;
field_0x165A = 3;
OSUnlockMutex(&mMutex);
OSSignalCond(&mCond);
} else {
} else
#endif
{
if (getStatus(0) != 14) {
if (CARDProbe(0) && getStatus(0) == 0) {
OSLockMutex(&mMutex);
@@ -423,10 +432,12 @@ void mDoMemCd_Ctrl_c::setCardState(s32 state) {
/* 800198C4-80019918 .text mDoMemCd_main__FPv */
int mDoMemCd_main(void*) {
#if VERSION > VERSION_DEMO
{ JKRThread thread(OSGetCurrentThread(), 0); }
JKRHeap* heap = NULL;
heap->becomeCurrentHeap();
#endif
g_mDoMemCd_control.main();
return 0;