mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-23 06:54:16 -04:00
Clean up dComIfGp_evmng_getMyActIdx calls
This commit is contained in:
@@ -52,7 +52,7 @@ struct DynamicModuleControl : DynamicModuleControlBase {
|
||||
virtual const char* getModuleName() const { return mName; }
|
||||
virtual int getModuleSize() const;
|
||||
virtual const char* getModuleTypeString() const;
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
virtual void dump2();
|
||||
#endif
|
||||
virtual bool do_load();
|
||||
@@ -73,7 +73,7 @@ struct DynamicModuleControl : DynamicModuleControlBase {
|
||||
/* 0x20 */ u8 mResourceType;
|
||||
/* 0x21 */ u8 unk_33;
|
||||
/* 0x22 */ u16 mChecksum;
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
/* 0x24 */ s32 mSize;
|
||||
#endif
|
||||
/* 0x28 */ mDoDvdThd_callback_c* mAsyncLoadCallback;
|
||||
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
BOOL _createHeap();
|
||||
u16 next_msgStatusNormal2(u32*);
|
||||
u32 getMsgNormal2();
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
u32 setRupeeSizeMsg();
|
||||
#endif
|
||||
bool existUnknownCollectMap();
|
||||
@@ -287,4 +287,5 @@ public:
|
||||
/* 0x814 */ bool field_0x814;
|
||||
/* 0x815 */ u8 field_0x815[0x81C - 0x815];
|
||||
}; // Size: 0x81C
|
||||
|
||||
#endif /* D_A_NPC_TC_H */
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
bool chk_areaIN(f32, f32, s16, cXyz);
|
||||
void setWaterRipple();
|
||||
void setWaterSplash();
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
void set_simpleLand(bool);
|
||||
#else
|
||||
void set_simpleLand();
|
||||
|
||||
+8
-8
@@ -50,7 +50,7 @@ DynamicModuleControlBase::DynamicModuleControlBase() {
|
||||
}
|
||||
|
||||
BOOL DynamicModuleControlBase::link() {
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
OSThread* thread = OSGetCurrentThread();
|
||||
if (thread != &mainThread) {
|
||||
OSReport_Error("DynamicModuleControlBase::link not mainthread %08x\n", thread);
|
||||
@@ -70,7 +70,7 @@ BOOL DynamicModuleControlBase::link() {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
JUT_ASSERT(100, mLinkCount < 65535);
|
||||
#endif
|
||||
#if VERSION == VERSION_DEMO
|
||||
@@ -84,7 +84,7 @@ BOOL DynamicModuleControlBase::link() {
|
||||
}
|
||||
|
||||
BOOL DynamicModuleControlBase::unlink() {
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
OSThread* thread = OSGetCurrentThread();
|
||||
if (thread != &mainThread) {
|
||||
OSReport_Error("DynamicModuleControlBase::unlink not mainthread %08x\n", thread);
|
||||
@@ -147,7 +147,7 @@ void DynamicModuleControlBase::dump() {
|
||||
JUTReportConsole_f("%3d%3d ???? ????? %-4s %s\n", doLinkCount, linkCount, type,
|
||||
name);
|
||||
}
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
current->dump2();
|
||||
#endif
|
||||
}
|
||||
@@ -162,7 +162,7 @@ DynamicModuleControl::DynamicModuleControl(char const* name) {
|
||||
unk_24 = 0;
|
||||
mName = name;
|
||||
mResourceType = 0;
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
unk_33 = 0;
|
||||
mChecksum = 0;
|
||||
mSize = 0;
|
||||
@@ -389,7 +389,7 @@ bool DynamicModuleControl::do_unload() {
|
||||
return true;
|
||||
}
|
||||
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
void DynamicModuleControl::dump2() {
|
||||
if (mModule != NULL) {
|
||||
OSSectionInfo* section = (OSSectionInfo*)mModule->info.sectionInfoOffset;
|
||||
@@ -407,7 +407,7 @@ BOOL DynamicModuleControl::do_link() {
|
||||
}
|
||||
if (mModule != NULL) {
|
||||
JUT_ASSERT(DEMO_SELECT(501, 613), mModule->info.sectionInfoOffset < 0x80000000);
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
JUT_ASSERT(615, (u32)mModule + mModule->fixSize < 0x82000000);
|
||||
#endif
|
||||
OSGetTime();
|
||||
@@ -488,7 +488,7 @@ BOOL DynamicModuleControl::do_link() {
|
||||
}
|
||||
|
||||
error:
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
unk_33 = 0;
|
||||
#endif
|
||||
if (mBss != NULL) {
|
||||
|
||||
+5
-5
@@ -464,7 +464,7 @@ const DynamicNameTableEntry DynamicNameTable[] = {
|
||||
|
||||
/* 800227A0-800229E0 .text cCc_Init__Fv */
|
||||
BOOL cCc_Init() {
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
JUT_ASSERT(0x2a, !DMC_initialized);
|
||||
#endif
|
||||
|
||||
@@ -553,7 +553,7 @@ cPhs_State cDyl_Link(s16 i_ProfName) {
|
||||
}
|
||||
}
|
||||
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
static void dummy() {
|
||||
OSReport_Error("cDyl_LinkASync: リンクに失敗しました。諦めます\n");
|
||||
}
|
||||
@@ -581,14 +581,14 @@ cPhs_State cDyl_LinkASync(s16 i_ProfName) {
|
||||
JUT_ASSERT(DEMO_SELECT(208, 273), i_ProfName < ARRAY_SIZE(DMC));
|
||||
DynamicModuleControlBase * d = DMC[i_ProfName];
|
||||
if (d != NULL) {
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
JUT_ASSERT(0x115, cDyl_Initialized);
|
||||
#endif
|
||||
if (d->load_async()) {
|
||||
if (d->link()) {
|
||||
return cPhs_COMPLEATE_e;
|
||||
} else {
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
OSReport_Error("cDyl_LinkASync: リンクに失敗しました。諦めます\n");
|
||||
#endif
|
||||
return cPhs_ERROR_e;
|
||||
@@ -623,7 +623,7 @@ BOOL cDyl_InitCallback(void*) {
|
||||
|
||||
/* 80022DF8-80022E70 .text cDyl_InitAsync__Fv */
|
||||
void cDyl_InitAsync() {
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
cCc_Init();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ void daCanon_c::wait_proc() {
|
||||
|
||||
int iVar2 = dComIfGp_evmng_getMyStaffId("Canon");
|
||||
if (iVar2 != -1) {
|
||||
if (!dComIfGp_evmng_getMyActIdx(iVar2, cut_name_tbl, ARRAY_SSIZE(cut_name_tbl), 1, 0)) {
|
||||
if (!dComIfGp_evmng_getMyActIdx(iVar2, cut_name_tbl, ARRAY_SSIZE(cut_name_tbl), TRUE, 0)) {
|
||||
cXyz sp24 = current.pos;
|
||||
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
|
||||
createTargetObj();
|
||||
@@ -437,7 +437,7 @@ void daCanon_c::end_proc() {
|
||||
int staffIdx = dComIfGp_evmng_getMyStaffId("Canon");
|
||||
if (staffIdx == -1) {
|
||||
wait_proc_init();
|
||||
} else if (!dComIfGp_evmng_getMyActIdx(staffIdx, cut_name_tbl, ARRAY_SIZE(cut_name_tbl), 1, 0)) {
|
||||
} else if (!dComIfGp_evmng_getMyActIdx(staffIdx, cut_name_tbl, ARRAY_SIZE(cut_name_tbl), TRUE, 0)) {
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
if (dComIfGp_getMiniGameType() == 3) {
|
||||
dComIfGp_endMiniGame(3);
|
||||
|
||||
@@ -1502,7 +1502,7 @@ void deku_come_demo(cc_class* i_this) {
|
||||
|
||||
case 4:
|
||||
iVar2 = dComIfGp_evmng_getMyStaffId("CyuCyu");
|
||||
actIdx = dComIfGp_evmng_getMyActIdx(iVar2, cut_name_tbl, ARRAY_SSIZE(cut_name_tbl), 1, 0);
|
||||
actIdx = dComIfGp_evmng_getMyActIdx(iVar2, cut_name_tbl, ARRAY_SSIZE(cut_name_tbl), TRUE, 0);
|
||||
if (actIdx == 1) {
|
||||
dComIfGp_evmng_cutEnd(iVar2);
|
||||
i_this->m2FC++;
|
||||
@@ -1564,7 +1564,7 @@ void deku_ret_demo(cc_class* i_this) {
|
||||
|
||||
case 5:
|
||||
iVar2 = dComIfGp_evmng_getMyStaffId("CyuCyu");
|
||||
actIdx = dComIfGp_evmng_getMyActIdx(iVar2, cut_name_tbl, ARRAY_SSIZE(cut_name_tbl), 1, 0);
|
||||
actIdx = dComIfGp_evmng_getMyActIdx(iVar2, cut_name_tbl, ARRAY_SSIZE(cut_name_tbl), TRUE, 0);
|
||||
if (actIdx == 1) {
|
||||
dComIfGp_evmng_cutEnd(iVar2);
|
||||
i_this->m2FD++;
|
||||
|
||||
@@ -714,7 +714,7 @@ void daFm_c::iceProc() {
|
||||
setAttention();
|
||||
J3DModel* pModel = mpMorf->getModel();
|
||||
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
pModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
#else
|
||||
pModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
@@ -3380,7 +3380,7 @@ void daFm_c::createInit() {
|
||||
holeSetMtx();
|
||||
mpMorf->calc();
|
||||
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
g_env_light.settingTevStruct(TEV_TYPE_ACTOR, ¤t.pos, &tevStr);
|
||||
#endif
|
||||
|
||||
@@ -3477,7 +3477,7 @@ bool daFm_c::_delete() {
|
||||
cancelGrab();
|
||||
dComIfG_resDelete(&mPhs, m_arc_name);
|
||||
mpFollowEcallBack.remove();
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
if(heap != NULL) {
|
||||
mpMorf->stopZelAnime();
|
||||
}
|
||||
|
||||
@@ -831,7 +831,7 @@ int daGoal_Flag_c::getDemoAction(int param_1) {
|
||||
"03_dummy",
|
||||
"04_dummy"
|
||||
};
|
||||
return dComIfGp_evmng_getMyActIdx(param_1, ActionNames, 5, FALSE, 0);
|
||||
return dComIfGp_evmng_getMyActIdx(param_1, ActionNames, ARRAY_SIZE(ActionNames), FALSE, 0);
|
||||
}
|
||||
|
||||
/* 00001DB4-00001F60 .text RaceStart__13daGoal_Flag_cFv */
|
||||
|
||||
@@ -203,7 +203,7 @@ void daMdoor_c::demoProc() {
|
||||
"WAIT", "CLOSE", "STOP_OPEN",
|
||||
};
|
||||
|
||||
s32 actIdx = dComIfGp_evmng_getMyActIdx(m2C0, action_table, ARRAY_SIZE(action_table), 0, 0);
|
||||
s32 actIdx = dComIfGp_evmng_getMyActIdx(m2C0, action_table, ARRAY_SIZE(action_table), FALSE, 0);
|
||||
|
||||
if (dComIfGp_evmng_getIsAddvance(m2C0)) {
|
||||
switch (actIdx) {
|
||||
|
||||
@@ -567,7 +567,7 @@ void daNpc_Hi1_c::privateCut(int i_staffIdx) {
|
||||
};
|
||||
|
||||
if(i_staffIdx != -1) {
|
||||
mActIdx = dComIfGp_evmng_getMyActIdx(i_staffIdx, a_cut_tbl, 1, TRUE, 0);
|
||||
mActIdx = dComIfGp_evmng_getMyActIdx(i_staffIdx, a_cut_tbl, ARRAY_SIZE(a_cut_tbl), TRUE, 0);
|
||||
|
||||
if(mActIdx == -1) {
|
||||
dComIfGp_evmng_cutEnd(i_staffIdx);
|
||||
|
||||
@@ -1974,7 +1974,7 @@ u32 daNpc_Ji1_c::privateCut() {
|
||||
ACT_CONTINUETALK,
|
||||
ACT_SETANGLE,
|
||||
};
|
||||
int actIdx = dComIfGp_evmng_getMyActIdx(staffIdx, cut_name_tbl, ARRAY_SIZE(cut_name_tbl), 1, 0);
|
||||
int actIdx = dComIfGp_evmng_getMyActIdx(staffIdx, cut_name_tbl, ARRAY_SIZE(cut_name_tbl), TRUE, 0);
|
||||
if(actIdx == -1) {
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ void daNpc_Km1_c::privateCut() {
|
||||
|
||||
int staffIdx = dComIfGp_evmng_getMyStaffId("Km1",NULL,0);
|
||||
if(staffIdx != -1){
|
||||
int uVar1 = dComIfGp_evmng_getMyActIdx(staffIdx,cut_name_tbl,1,1,0);
|
||||
int uVar1 = dComIfGp_evmng_getMyActIdx(staffIdx, cut_name_tbl, ARRAY_SIZE(cut_name_tbl), TRUE, 0);
|
||||
field_0x7C9 = uVar1;
|
||||
if(field_0x7C9 == -1){
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
|
||||
@@ -2172,7 +2172,7 @@ void daNpcRoten_c::privateCut() {
|
||||
|
||||
int staffIdx = dComIfGp_evmng_getMyStaffId(l_npc_staff_id[mNpcNo]);
|
||||
if(staffIdx != -1) {
|
||||
field_0x9C3 = dComIfGp_evmng_getMyActIdx(staffIdx, cut_name_tbl, ARRAY_SIZE(cut_name_tbl), 1, 0);
|
||||
field_0x9C3 = dComIfGp_evmng_getMyActIdx(staffIdx, cut_name_tbl, ARRAY_SIZE(cut_name_tbl), TRUE, 0);
|
||||
if(field_0x9C3 == -1) {
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
return;
|
||||
|
||||
@@ -502,7 +502,7 @@ void daNpc_Tc_c::setAnm() {
|
||||
a_anm_prm_tbl[i].mMorf = l_HIO.field_0x94[i];
|
||||
}
|
||||
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
if (mBckIdx == BCK_IDX_MAWASU && (int)mpMorf->getFrame() == 1) {
|
||||
if(mType == TYPE_RED) {
|
||||
fopAcM_monsSeStart(this, JA_SE_CV_TC_B_PUSH_BAR, 0);
|
||||
@@ -981,7 +981,7 @@ void daNpc_Tc_c::getArg() {
|
||||
extern dCcD_SrcCyl dNpc_cyl_src;
|
||||
/* 00001C98-0000202C .text createInit__10daNpc_Tc_cFv */
|
||||
void daNpc_Tc_c::createInit() {
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
if (mType == TYPE_NORMAL) {
|
||||
fopAcM_OnStatus(this, fopAcStts_UNK4000_e);
|
||||
}
|
||||
@@ -1026,7 +1026,7 @@ void daNpc_Tc_c::createInit() {
|
||||
}
|
||||
break;
|
||||
}
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
mObjAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), ¤t.angle, &shape_angle);
|
||||
#endif
|
||||
mOldAnmPrmIdx = 0;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
// The original name of this file is unknown, but it must exist because d_a_npc_tc's "cut" functions
|
||||
// are in a separate .text section from the rest of its functions.
|
||||
|
||||
#include "d/actor/d_a_npc_tc.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
|
||||
/* 00005C58-00005E60 .text cutProc__10daNpc_Tc_cFv */
|
||||
void daNpc_Tc_c::cutProc() {
|
||||
static char* action_table[] = {
|
||||
|
||||
+69
-55
@@ -291,7 +291,7 @@ BOOL daNpc_Zl1_c::set_startPos(int param_1) {
|
||||
bool daNpc_Zl1_c::init_ZL1_0() {
|
||||
if(!dComIfGs_isEventBit(dSv_event_flag_c::UNK_0001)) {
|
||||
set_action(&daNpc_Zl1_c::demo_action1, NULL);
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
fopAcM_ClearStatusMap(this);
|
||||
#endif
|
||||
field_0x7D2 = true;
|
||||
@@ -347,7 +347,7 @@ bool daNpc_Zl1_c::init_ZL1_5() {
|
||||
if(!dComIfGs_isEventBit(dSv_event_flag_c::UNK_2D02)) {
|
||||
set_action(&daNpc_Zl1_c::optn_action1, NULL);
|
||||
fopAcM_OffStatus(this, fopAcStts_CULL_e | fopAcStts_NOCULLEXEC_e);
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
if(!dComIfGs_isEventBit(dSv_event_flag_c::UNK_3804)) {
|
||||
fopAcM_OnStatus(this, fopAcStts_UNK4000_e);
|
||||
field_0x84A = 6;
|
||||
@@ -362,7 +362,7 @@ bool daNpc_Zl1_c::init_ZL1_5() {
|
||||
if(!strcmp(dComIfGp_getStartStageName(), "Hyroom")) {
|
||||
set_startPos(0);
|
||||
}
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -375,7 +375,7 @@ bool daNpc_Zl1_c::init_ZL1_5() {
|
||||
/* 00000CC0-00000D24 .text init_ZL1_6__11daNpc_Zl1_cFv */
|
||||
bool daNpc_Zl1_c::init_ZL1_6() {
|
||||
set_action(&daNpc_Zl1_c::demo_action1, NULL);
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
fopAcM_ClearStatusMap(this);
|
||||
#endif
|
||||
return true;
|
||||
@@ -384,7 +384,7 @@ bool daNpc_Zl1_c::init_ZL1_6() {
|
||||
/* 00000D24-00000D88 .text init_ZL1_7__11daNpc_Zl1_cFv */
|
||||
bool daNpc_Zl1_c::init_ZL1_7() {
|
||||
set_action(&daNpc_Zl1_c::demo_action1, NULL);
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
fopAcM_ClearStatusMap(this);
|
||||
#endif
|
||||
return true;
|
||||
@@ -532,7 +532,7 @@ void daNpc_Zl1_c::setMtx(bool param_1) {
|
||||
mpMorf->getModel()->setBaseScale(scale);
|
||||
|
||||
if(field_0x7CE) {
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
if(!fpcM_IsCreating(mProcId1)) {
|
||||
if(mProcId1 != 0xffffffff) {
|
||||
if(fopAcM_SearchByID(mProcId1, (fopAc_ac_c **)&actor) == 1) {
|
||||
@@ -733,7 +733,7 @@ void daNpc_Zl1_c::eye_ctrl() {
|
||||
f32 temp;
|
||||
f32 temp2;
|
||||
f32 temp3;
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
if(field_0x7D1) {
|
||||
temp = field_0x842 / (f32)(l_HIO.mPrmTbl.field_5E);
|
||||
temp2 = field_0x840 / (f32)(l_HIO.mPrmTbl.field_5E);
|
||||
@@ -1082,11 +1082,11 @@ void daNpc_Zl1_c::checkOrder() {
|
||||
break;
|
||||
case 3:
|
||||
daPy_getPlayerActorClass()->onPlayerNoDraw();
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
fopAcM_OffStatus(this, fopAcStts_UNK4000_e);
|
||||
#endif
|
||||
field_0x7D8 = true;
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
field_0x79C = 1;
|
||||
#endif
|
||||
break;
|
||||
@@ -1650,7 +1650,7 @@ void daNpc_Zl1_c::cut_init_OMAMORI_ONOFF(int i_staffIdx) {
|
||||
field_0x7C2 = 0;
|
||||
if(pOnOff != NULL) {
|
||||
if(*pOnOff == 0) {
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
mDoAud_seStart(JA_SE_ITM_OMAMORI_TETLA);
|
||||
#endif
|
||||
field_0x7C2 = -1;
|
||||
@@ -1686,7 +1686,6 @@ BOOL daNpc_Zl1_c::cut_move_SURPRISED() {
|
||||
|
||||
/* 00003574-000037E0 .text privateCut__11daNpc_Zl1_cFi */
|
||||
void daNpc_Zl1_c::privateCut(int i_staffIdx) {
|
||||
|
||||
static char* a_cut_tbl[] = {
|
||||
"LOK_PLYER",
|
||||
"LOK_PARTNER",
|
||||
@@ -1701,60 +1700,75 @@ void daNpc_Zl1_c::privateCut(int i_staffIdx) {
|
||||
"PLYER_DRW_ONOFF",
|
||||
"JMP_OFF",
|
||||
"OMAMORI_ONOFF",
|
||||
#if VERSION != VERSION_DEMO
|
||||
"SURPRISED"
|
||||
#if VERSION > VERSION_DEMO
|
||||
"SURPRISED",
|
||||
#endif
|
||||
};
|
||||
|
||||
enum {
|
||||
ACT_LOK_PLYER,
|
||||
ACT_LOK_PARTNER,
|
||||
ACT_CHG_ANM_ATR,
|
||||
ACT_PLYER_TRN_PARTNER,
|
||||
ACT_PLYER_TRN_TETRA,
|
||||
ACT_MAJYU_START,
|
||||
ACT_MAJYU_END,
|
||||
ACT_OKIRU,
|
||||
ACT_OKIRU_2,
|
||||
ACT_DRW_ONOFF,
|
||||
ACT_PLYER_DRW_ONOFF,
|
||||
ACT_JMP_OFF,
|
||||
ACT_OMAMORI_ONOFF,
|
||||
#if VERSION > VERSION_DEMO
|
||||
ACT_SURPRISED,
|
||||
#endif
|
||||
};
|
||||
|
||||
if(i_staffIdx != -1) {
|
||||
#if VERSION != VERSION_DEMO
|
||||
mActIdx = dComIfGp_evmng_getMyActIdx(i_staffIdx, a_cut_tbl, 0xE, TRUE, 0);
|
||||
#else
|
||||
mActIdx = dComIfGp_evmng_getMyActIdx(i_staffIdx, a_cut_tbl, 0xD, TRUE, 0);
|
||||
#endif
|
||||
mActIdx = dComIfGp_evmng_getMyActIdx(i_staffIdx, a_cut_tbl, ARRAY_SIZE(a_cut_tbl), TRUE, 0);
|
||||
if(mActIdx == -1) {
|
||||
dComIfGp_evmng_cutEnd(i_staffIdx);
|
||||
} else {
|
||||
if(dComIfGp_evmng_getIsAddvance(i_staffIdx)) {
|
||||
switch(mActIdx) {
|
||||
case 0:
|
||||
case ACT_LOK_PLYER:
|
||||
cut_init_LOK_PLYER(i_staffIdx);
|
||||
break;
|
||||
case 1:
|
||||
case ACT_LOK_PARTNER:
|
||||
cut_init_LOK_PARTNER(i_staffIdx);
|
||||
break;
|
||||
case 2:
|
||||
case ACT_CHG_ANM_ATR:
|
||||
cut_init_CHG_ANM_ATR(i_staffIdx);
|
||||
break;
|
||||
case 3:
|
||||
case ACT_PLYER_TRN_PARTNER:
|
||||
cut_init_PLYER_TRN_PARTNER(i_staffIdx);
|
||||
break;
|
||||
case 4:
|
||||
case ACT_PLYER_TRN_TETRA:
|
||||
cut_init_PLYER_TRN_TETRA(i_staffIdx);
|
||||
break;
|
||||
case 5:
|
||||
case ACT_MAJYU_START:
|
||||
cut_init_MAJYU_START(i_staffIdx);
|
||||
break;
|
||||
case 7:
|
||||
case ACT_OKIRU:
|
||||
cut_init_OKIRU(i_staffIdx);
|
||||
break;
|
||||
case 8:
|
||||
case ACT_OKIRU_2:
|
||||
cut_init_OKIRU_2(i_staffIdx);
|
||||
break;
|
||||
case 9:
|
||||
case ACT_DRW_ONOFF:
|
||||
cut_init_DRW_ONOFF(i_staffIdx);
|
||||
break;
|
||||
case 10:
|
||||
case ACT_PLYER_DRW_ONOFF:
|
||||
cut_init_PLYER_DRW_ONOFF(i_staffIdx);
|
||||
break;
|
||||
case 0xb:
|
||||
case ACT_JMP_OFF:
|
||||
cut_init_JMP_OFF(i_staffIdx);
|
||||
break;
|
||||
case 0xc:
|
||||
case ACT_OMAMORI_ONOFF:
|
||||
cut_init_OMAMORI_ONOFF(i_staffIdx);
|
||||
break;
|
||||
#if VERSION != VERSION_DEMO
|
||||
case 0xd:
|
||||
#if VERSION > VERSION_DEMO
|
||||
case ACT_SURPRISED:
|
||||
cut_init_SURPRISED(i_staffIdx);
|
||||
break;
|
||||
#endif
|
||||
@@ -1763,44 +1777,44 @@ void daNpc_Zl1_c::privateCut(int i_staffIdx) {
|
||||
}
|
||||
BOOL temp;
|
||||
switch(mActIdx) {
|
||||
case 0:
|
||||
case ACT_LOK_PLYER:
|
||||
temp = cut_move_LOK_PLYER();
|
||||
break;
|
||||
case 1:
|
||||
case ACT_LOK_PARTNER:
|
||||
temp = cut_move_LOK_PARTNER();
|
||||
break;
|
||||
case 2:
|
||||
case ACT_CHG_ANM_ATR:
|
||||
temp = cut_move_CHG_ANM_ATR();
|
||||
break;
|
||||
case 3:
|
||||
case ACT_PLYER_TRN_PARTNER:
|
||||
temp = cut_move_PLYER_TRN_PARTNER();
|
||||
break;
|
||||
case 4:
|
||||
case ACT_PLYER_TRN_TETRA:
|
||||
temp = cut_move_PLYER_TRN_TETRA();
|
||||
break;
|
||||
case 5:
|
||||
case ACT_MAJYU_START:
|
||||
temp = cut_move_MAJYU_START();
|
||||
break;
|
||||
case 7:
|
||||
case ACT_OKIRU:
|
||||
temp = cut_move_OKIRU();
|
||||
break;
|
||||
case 8:
|
||||
case ACT_OKIRU_2:
|
||||
temp = cut_move_OKIRU_2();
|
||||
break;
|
||||
case 9:
|
||||
case ACT_DRW_ONOFF:
|
||||
temp = cut_move_DRW_ONOFF();
|
||||
break;
|
||||
case 10:
|
||||
case ACT_PLYER_DRW_ONOFF:
|
||||
temp = cut_move_PLYER_DRW_ONOFF();
|
||||
break;
|
||||
case 0xb:
|
||||
case ACT_JMP_OFF:
|
||||
temp = cut_move_JMP_OFF();
|
||||
break;
|
||||
case 0xc:
|
||||
case ACT_OMAMORI_ONOFF:
|
||||
temp = cut_move_OMAMORI_ONOFF();
|
||||
break;
|
||||
#if VERSION != VERSION_DEMO
|
||||
case 0xd:
|
||||
#if VERSION > VERSION_DEMO
|
||||
case ACT_SURPRISED:
|
||||
temp = cut_move_SURPRISED();
|
||||
break;
|
||||
#endif
|
||||
@@ -1966,14 +1980,14 @@ void daNpc_Zl1_c::setWaterSplash() {
|
||||
}
|
||||
|
||||
/* 00003E74-00003F34 .text set_simpleLand__11daNpc_Zl1_cFb */
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
void daNpc_Zl1_c::set_simpleLand(bool param_1) {
|
||||
#else
|
||||
void daNpc_Zl1_c::set_simpleLand() {
|
||||
#endif
|
||||
int temp;
|
||||
int temp2 = 6;
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
if(param_1) {
|
||||
temp2 = 7;
|
||||
}
|
||||
@@ -2025,7 +2039,7 @@ void daNpc_Zl1_c::setEff() {
|
||||
|
||||
}
|
||||
if(mObjAcch.ChkGroundHit() != false && (mpMorf->checkFrame(13.0f) || mpMorf->checkFrame(27.0f) || field_0x7C6)) {
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
set_simpleLand(field_0x7C6);
|
||||
#endif
|
||||
field_0x7C6 = false;
|
||||
@@ -2052,7 +2066,7 @@ BOOL daNpc_Zl1_c::setFrontWallType() {
|
||||
f32 tempY;
|
||||
f32 tempZ;
|
||||
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
temp.set(current.pos.x, current.pos.y + mAcchCir.GetWallH(), current.pos.z);
|
||||
#else
|
||||
tempZ = current.pos.z;
|
||||
@@ -2062,7 +2076,7 @@ BOOL daNpc_Zl1_c::setFrontWallType() {
|
||||
#endif
|
||||
|
||||
f32 wallRadius = mAcchCir.GetWallR() + 25.0f;
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
tempX = temp.x;
|
||||
tempY = temp.y;
|
||||
tempZ = temp.z;
|
||||
@@ -2098,7 +2112,7 @@ BOOL daNpc_Zl1_c::setFrontWallType() {
|
||||
|
||||
temp.set(tempX3, tempY3, tempZ3);
|
||||
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
f32 wallRadius2 = mAcchCir.GetWallR() + 25.0f;
|
||||
|
||||
tempZ = temp.z + cos * wallRadius2;
|
||||
@@ -2405,7 +2419,7 @@ BOOL daNpc_Zl1_c::optn_2() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
if(!mObjAcch.ChkGroundHit() && mObjAcch.GetGroundH() - current.pos.y < -30.1f) {
|
||||
setAnm_NUM(10, 1);
|
||||
speed.y = l_HIO.mPrmTbl.field_54;
|
||||
@@ -2687,7 +2701,7 @@ const u32 unused[] = {
|
||||
0x0000FF80,
|
||||
0xFFFF0080,
|
||||
0xFF000080,
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
0x00000000
|
||||
#endif
|
||||
};
|
||||
@@ -2926,7 +2940,7 @@ cPhs_State daNpc_Zl1_c::_create() {
|
||||
};
|
||||
|
||||
cPhs_State state;
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
fopAcM_SetupActor(this, daNpc_Zl1_c);
|
||||
#endif
|
||||
if(!decideType(fopAcM_GetParam(this) & 0xFF)) { // idk if this is supposed to be here
|
||||
|
||||
@@ -607,21 +607,21 @@ void daObjApzl_c::privateCut() {
|
||||
};
|
||||
|
||||
enum {
|
||||
WAIT,
|
||||
TALK,
|
||||
GAME,
|
||||
GETITEM,
|
||||
STOP,
|
||||
SOUND,
|
||||
PUSH_A,
|
||||
EVENT_END
|
||||
ACT_WAIT,
|
||||
ACT_TALK,
|
||||
ACT_GAME,
|
||||
ACT_GETITEM,
|
||||
ACT_STOP,
|
||||
ACT_SOUND,
|
||||
ACT_PUSH_A,
|
||||
ACT_EVENT_END
|
||||
};
|
||||
|
||||
int staffIdx = dComIfGp_evmng_getMyStaffId("Apzl");
|
||||
bool temp;
|
||||
if (staffIdx != -1) {
|
||||
|
||||
mActIdx = dComIfGp_evmng_getMyActIdx(staffIdx, cut_name_tbl, 8, 1, 0);
|
||||
mActIdx = dComIfGp_evmng_getMyActIdx(staffIdx, cut_name_tbl, ARRAY_SIZE(cut_name_tbl), TRUE, 0);
|
||||
if (mActIdx == -1) {
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
} else {
|
||||
@@ -629,22 +629,22 @@ void daObjApzl_c::privateCut() {
|
||||
|
||||
if (dComIfGp_evmng_getIsAddvance(staffIdx)) {
|
||||
switch(mActIdx) {
|
||||
case WAIT:
|
||||
case TALK:
|
||||
case STOP:
|
||||
case PUSH_A:
|
||||
case ACT_WAIT:
|
||||
case ACT_TALK:
|
||||
case ACT_STOP:
|
||||
case ACT_PUSH_A:
|
||||
break;
|
||||
case GAME:
|
||||
case ACT_GAME:
|
||||
mGameStarted = true;
|
||||
break;
|
||||
case GETITEM:
|
||||
case ACT_GETITEM:
|
||||
mGaveReward = true;
|
||||
mRewardTimer = 0x96;
|
||||
break;
|
||||
case SOUND:
|
||||
case ACT_SOUND:
|
||||
mDoAud_seStart(JA_SE_15PUZZLE_COMPLETE);
|
||||
break;
|
||||
case EVENT_END:
|
||||
case ACT_EVENT_END:
|
||||
fopAc_ac_c* actor;
|
||||
for(int i = 0; i < mGivenRupeeCount; i++) {
|
||||
actor = fopAcM_SearchByID(mRupeeIds[i]);
|
||||
|
||||
@@ -217,7 +217,7 @@ void daObj_Pfall_c::cutProc() {
|
||||
};
|
||||
int staffIdx = dComIfGp_evmng_getMyStaffId("Nzfall");
|
||||
if(staffIdx != -1) {
|
||||
int actIdx = dComIfGp_evmng_getMyActIdx(staffIdx, action_table, ARRAY_SIZE(action_table), NULL, 0);
|
||||
int actIdx = dComIfGp_evmng_getMyActIdx(staffIdx, action_table, ARRAY_SIZE(action_table), FALSE, 0);
|
||||
if(actIdx == -1) {
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
} else {
|
||||
|
||||
@@ -396,7 +396,7 @@ void daSbox_c::demoProcCom() {
|
||||
s32 daSbox_c::getNowEventAction() {
|
||||
static char* action_table[] = {"WAIT", "OPEN", "DELETE"};
|
||||
|
||||
return dComIfGp_evmng_getMyActIdx(m2F8, action_table, ARRAY_SIZE(action_table), 0, 1);
|
||||
return dComIfGp_evmng_getMyActIdx(m2F8, action_table, ARRAY_SIZE(action_table), FALSE, 1);
|
||||
}
|
||||
|
||||
/* 00001240-00001388 .text demoProc__8daSbox_cFv */
|
||||
|
||||
@@ -540,7 +540,7 @@ BOOL daTag_Hint_c::actionEvent() {
|
||||
"MESSAGE3",
|
||||
};
|
||||
|
||||
s32 iVar2 = dComIfGp_evmng_getMyActIdx(m29C, action_table, ARRAY_SIZE(action_table), 0, 0);
|
||||
s32 iVar2 = dComIfGp_evmng_getMyActIdx(m29C, action_table, ARRAY_SIZE(action_table), FALSE, 0);
|
||||
if (dComIfGp_evmng_getIsAddvance(m29C)) {
|
||||
setFlag(1);
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ void daWarphr_c::demo_proc() {
|
||||
|
||||
m304 = dComIfGp_evmng_getMyStaffId("Ghrwp");
|
||||
if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk() && m304 != -1) {
|
||||
s32 iVar1 = dComIfGp_evmng_getMyActIdx(m304, action_table, ARRAY_SIZE(action_table), 0, 0);
|
||||
s32 iVar1 = dComIfGp_evmng_getMyActIdx(m304, action_table, ARRAY_SIZE(action_table), FALSE, 0);
|
||||
if (iVar1 == -1) {
|
||||
dComIfGp_evmng_cutEnd(m304);
|
||||
} else {
|
||||
|
||||
@@ -184,7 +184,7 @@ BOOL daYougan_c::useHeapInit() {
|
||||
field_0x298[i].field_0x00 = 0;
|
||||
J3DModel* p_model = mDoExt_J3DModel__create(modelData, 0, 0x11020203);
|
||||
field_0x298[i].field_0x04 = p_model;
|
||||
#if VERSION != VERSION_DEMO
|
||||
#if VERSION > VERSION_DEMO
|
||||
if(field_0x298[i].field_0x04 == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+1
-1
@@ -4051,7 +4051,7 @@ bool dCamera_c::eventCamera(s32) {
|
||||
m100 = 0;
|
||||
m11C = 0;
|
||||
}
|
||||
lVar12 = dComIfGp_evmng_getMyActIdx(mEventData.mStaffIdx, ActionNames, ARRAY_SIZE(ActionNames), 0, 0);
|
||||
lVar12 = dComIfGp_evmng_getMyActIdx(mEventData.mStaffIdx, ActionNames, ARRAY_SIZE(ActionNames), FALSE, 0);
|
||||
}
|
||||
else {
|
||||
mEventData.mStaffIdx = -1;
|
||||
|
||||
Reference in New Issue
Block a user