mirror of
https://github.com/zeldaret/tp
synced 2026-08-21 22:41:04 -04:00
Misc Changes (#306)
This commit is contained in:
@@ -805,13 +805,13 @@ static void daKytag06_type_09_Execute(kytag06_class* i_this) {
|
||||
*/
|
||||
static void daKytag06_type_10_Execute(kytag06_class* i_this) {
|
||||
u8 tmp = 0;
|
||||
if (i_dComIfGs_isEventBit(0x2008)) {
|
||||
if (i_dComIfGs_isEventBit(dSv_event_flag_c::F_0266)) {
|
||||
// 2008: Snowpeak Ruins completed
|
||||
tmp = 0;
|
||||
} else if (i_dComIfGs_isEventBit(0x1420)) {
|
||||
} else if (i_dComIfGs_isEventBit(dSv_event_flag_c::F_0065)) {
|
||||
// 1420: Talked to Yeta after giving cheese
|
||||
tmp = 2;
|
||||
} else if (i_dComIfGs_isEventBit(0x1440)) {
|
||||
} else if (i_dComIfGs_isEventBit(dSv_event_flag_c::F_0064)) {
|
||||
// 1440: Talked to Yeta after giving pumpkin
|
||||
tmp = 1;
|
||||
}
|
||||
@@ -946,7 +946,7 @@ static void daKytag06_type_03_Execute(kytag06_class* i_this) {
|
||||
switch (i_this->mMode) {
|
||||
case 0:
|
||||
// 0C01: Midna's Desperate Hour started 1E08: Midna's Desperate Hour Completed
|
||||
if (i_dComIfGs_isEventBit(0x0C01) && !i_dComIfGs_isEventBit(0x1E08)) {
|
||||
if (i_dComIfGs_isEventBit(dSv_event_flag_c::M_071) && !i_dComIfGs_isEventBit(dSv_event_flag_c::F_0250)) {
|
||||
i_this->mMode = 1;
|
||||
i_this->field_0x578 = 450;
|
||||
dKy_change_colpat(i_this->field_0x591);
|
||||
|
||||
@@ -1,37 +1,13 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: d_a_tag_mstop
|
||||
//
|
||||
/**
|
||||
* d_a_tag_mstop.cpp
|
||||
* Tag - Midna Stop
|
||||
*/
|
||||
|
||||
#include "rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop.h"
|
||||
#include "d/a/d_a_npc.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct daPy_py_c {
|
||||
static u8 m_midnaActor[4];
|
||||
};
|
||||
|
||||
struct dSv_info_c {
|
||||
/* 80035360 */ void isSwitch(int, int) const;
|
||||
};
|
||||
|
||||
struct dSv_event_flag_c {
|
||||
static u8 saveBitLabels[1644 + 4 /* padding */];
|
||||
};
|
||||
|
||||
struct dSv_event_c {
|
||||
/* 800349BC */ void isEventBit(u16) const;
|
||||
};
|
||||
|
||||
struct dEvt_control_c {
|
||||
/* 80042468 */ void reset();
|
||||
/* 80042518 */ void reset(void*);
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -44,7 +20,6 @@ extern "C" void eventOrder__12daTagMstop_cFv();
|
||||
extern "C" void execute__12daTagMstop_cFv();
|
||||
extern "C" static void daTagMstop_Execute__FP12daTagMstop_c();
|
||||
extern "C" static bool daTagMstop_Draw__FP12daTagMstop_c();
|
||||
extern "C" extern void* g_profile_Tag_Mstop[12];
|
||||
|
||||
//
|
||||
// External References:
|
||||
@@ -77,7 +52,6 @@ extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */];
|
||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
||||
extern "C" u8 m_midnaActor__9daPy_py_c[4];
|
||||
extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
|
||||
|
||||
@@ -95,56 +69,98 @@ SECTION_RODATA static f32 const lit_3864 = 100.0f;
|
||||
COMPILER_STRIP_GATE(0x805A6970, &lit_3864);
|
||||
|
||||
/* 805A6138-805A6318 000078 01E0+00 1/1 0/0 0/0 .text create__12daTagMstop_cFv */
|
||||
#ifdef NONMATCHING
|
||||
// matches with literals
|
||||
int daTagMstop_c::create() {
|
||||
if (!fopAcM_CheckCondition(this, 8)) {
|
||||
new (this) daTagMstop_c();
|
||||
fopAcM_OnCondition(this, 8);
|
||||
}
|
||||
|
||||
field_0x56b = fopAcM_GetParam(this) >> 16;
|
||||
field_0x56a = (fopAcM_GetParam(this) >> 24) & 0xF;
|
||||
|
||||
if (field_0x56a == 1 || field_0x56a == 2) {
|
||||
field_0x56c = 1;
|
||||
|
||||
if (field_0x56a == 2) {
|
||||
field_0x56a = 0;
|
||||
}
|
||||
|
||||
} else {
|
||||
field_0x56c = 0;
|
||||
}
|
||||
|
||||
if ((fopAcM_GetParam(this) >> 28) & 1) {
|
||||
field_0x568 = 0xFF;
|
||||
mSwitch = 0xFF;
|
||||
field_0x570 = shape_angle.x;
|
||||
field_0x572 = shape_angle.y;
|
||||
} else {
|
||||
field_0x568 = shape_angle.x;
|
||||
mSwitch = (shape_angle.x >> 8) & 0xFF; // matches but may not be right
|
||||
field_0x570 = 0xFFFF;
|
||||
field_0x572 = 0xFFFF;
|
||||
}
|
||||
|
||||
f32 tmp = mScale.x;
|
||||
tmp *= 10000.0f * mScale.x;
|
||||
|
||||
field_0x5c0 = tmp;
|
||||
field_0x5c4 = current.pos.y + mScale.y * 100.0f;
|
||||
|
||||
csXyz pos_angle;
|
||||
|
||||
daNpcF_getPlayerInfoFromPlayerList(fopAcM_GetParam(this) & 0xFFFF, fopAcM_GetRoomNo(this),
|
||||
field_0x5c8, pos_angle);
|
||||
|
||||
u8 idx = field_0x56b;
|
||||
|
||||
if (!checkNoAttention()) {
|
||||
s32 room = fopAcM_GetRoomNo(this);
|
||||
cXyz* pos = &dComIfGp_getRoomArrow(room)
|
||||
->mEntries[dComIfGp_getRoomCamera(room)->field_0x4[idx].field_0x10]
|
||||
.mPosition;
|
||||
|
||||
mEyePos.set(pos->x, pos->y, pos->z);
|
||||
mAttentionInfo.mPosition = mEyePos;
|
||||
}
|
||||
|
||||
shape_angle.y = fopAcM_searchPlayerAngleY(this);
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daTagMstop_c::create() {
|
||||
asm int daTagMstop_c::create() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop/create__12daTagMstop_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 805A6318-805A6338 000258 0020+00 1/0 0/0 0/0 .text daTagMstop_Create__FP10fopAc_ac_c
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daTagMstop_Create(fopAc_ac_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop/daTagMstop_Create__FP10fopAc_ac_c.s"
|
||||
static int daTagMstop_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daTagMstop_c*>(i_this)->create();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 805A6338-805A639C 000278 0064+00 1/1 0/0 0/0 .text __dt__12daTagMstop_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm daTagMstop_c::~daTagMstop_c() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop/__dt__12daTagMstop_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
daTagMstop_c::~daTagMstop_c() {}
|
||||
|
||||
/* 805A639C-805A63C4 0002DC 0028+00 1/0 0/0 0/0 .text daTagMstop_Delete__FP12daTagMstop_c
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daTagMstop_Delete(daTagMstop_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop/daTagMstop_Delete__FP12daTagMstop_c.s"
|
||||
static int daTagMstop_Delete(daTagMstop_c* i_this) {
|
||||
i_this->~daTagMstop_c();
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 805A63C4-805A63F8 000304 0034+00 1/1 0/0 0/0 .text eventOrder__12daTagMstop_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daTagMstop_c::eventOrder() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop/eventOrder__12daTagMstop_cFv.s"
|
||||
void daTagMstop_c::eventOrder() {
|
||||
mEvtInfo.i_onCondition(1);
|
||||
fopAcM_orderSpeakEvent(this, 0, 0);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 805A6974-805A6978 000008 0004+00 0/1 0/0 0/0 .rodata @4056 */
|
||||
@@ -181,50 +197,139 @@ COMPILER_STRIP_GATE(0x805A6980, &lit_4059);
|
||||
#pragma pop
|
||||
|
||||
/* 805A63F8-805A693C 000338 0544+00 1/1 0/0 0/0 .text execute__12daTagMstop_cFv */
|
||||
#ifdef NONMATCHING
|
||||
// inline function nightmare
|
||||
int daTagMstop_c::execute() {
|
||||
if (field_0x56c) {
|
||||
fopAcM_seStartCurrentLevel(this, Z2SE_OBJ_DARK_GATE, 0);
|
||||
}
|
||||
|
||||
daMidna_c* midna = daPy_py_c::getMidnaActor();
|
||||
|
||||
if (!midna) {
|
||||
return 1;
|
||||
} else {
|
||||
daAlink_c* link = (daAlink_c*)daPy_getLinkPlayerActorClass();
|
||||
|
||||
if (checkNoAttention()) {
|
||||
mAttentionInfo.mPosition = midna->mAttentionInfo.mPosition;
|
||||
shape_angle.y = midna->shape_angle.y;
|
||||
mEyePos = midna->mAttentionInfo.mPosition;
|
||||
|
||||
} else {
|
||||
shape_angle.y = fopAcM_searchPlayerAngleY(this);
|
||||
}
|
||||
|
||||
if (field_0x56e == 4) {
|
||||
if (field_0x5c8.abs2(link->current.pos) < 2500.0f) {
|
||||
i_dComIfGp_event_reset();
|
||||
link->i_cancelOriginalDemo();
|
||||
field_0x56e = 0;
|
||||
}
|
||||
} else if (field_0x56e == 3) {
|
||||
if (link->checkHorseRide()) {
|
||||
link->setPlayerPosAndAngle(&field_0x5c8, link->shape_angle.y, 0);
|
||||
i_dComIfGp_event_reset();
|
||||
field_0x56e = 0;
|
||||
} else {
|
||||
field_0x56e = 4;
|
||||
link->i_changeOriginalDemo();
|
||||
|
||||
field_0x56a == 0 ? link->i_changeDemoMode(3, 0, 0, 0) :
|
||||
link->i_changeDemoMode(2, 0, 0, 0);
|
||||
link->i_changeDemoPos0(&field_0x5c8);
|
||||
}
|
||||
} else if (mEvtInfo.checkCommandTalk()) {
|
||||
if (field_0x56e == 2) {
|
||||
int shadowmode = midna->checkShadowModelDraw();
|
||||
if (midna->checkShadowReturnEnd()) {
|
||||
i_dComIfGp_getEvent().reset(this);
|
||||
fopAcM_orderPotentialEvent(this, 0x400, 0x14f, 1);
|
||||
field_0x56e = 3;
|
||||
} else if (shadowmode == 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
} else if (mSwitch != 0xFF || i_fopAcM_isSwitch(this, mSwitch) && field_0x572 == -1 ||
|
||||
dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[field_0x572]))
|
||||
{
|
||||
fopAcM_delete(this);
|
||||
|
||||
} else if (field_0x568 == 0xFF ||
|
||||
i_fopAcM_isSwitch(this, field_0x568) && field_0x570 == -1 ||
|
||||
dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[field_0x572]) &&
|
||||
current.pos.y <= link->current.pos.y && link->current.pos.y <= field_0x5c4 &&
|
||||
fopAcM_searchPlayerDistanceXZ2(this) < field_0x5c0)
|
||||
{
|
||||
eventOrder();
|
||||
|
||||
} else {
|
||||
if (midna->checkShadowModeTalkWait()) {
|
||||
if (field_0x56e == 0) {
|
||||
mMsgFlow.init(this, shape_angle.z, 0, 0);
|
||||
mDoAud_seStart(16, 0, 0, 0);
|
||||
field_0x56e = 1;
|
||||
} else {
|
||||
if (mMsgFlow.doFlow(this, 0, 0)) {
|
||||
field_0x56e = 2;
|
||||
mDoAud_seStart(17, 0, 0, 0);
|
||||
|
||||
if (midna->checkShadowModelDraw()) {
|
||||
midna->setShadowReturn();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daTagMstop_c::execute() {
|
||||
asm int daTagMstop_c::execute() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop/execute__12daTagMstop_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 805A693C-805A695C 00087C 0020+00 1/0 0/0 0/0 .text daTagMstop_Execute__FP12daTagMstop_c */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daTagMstop_Execute(daTagMstop_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop/daTagMstop_Execute__FP12daTagMstop_c.s"
|
||||
static int daTagMstop_Execute(daTagMstop_c* i_this) {
|
||||
return i_this->execute();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 805A695C-805A6964 00089C 0008+00 1/0 0/0 0/0 .text daTagMstop_Draw__FP12daTagMstop_c
|
||||
*/
|
||||
static bool daTagMstop_Draw(daTagMstop_c* param_0) {
|
||||
return true;
|
||||
static int daTagMstop_Draw(daTagMstop_c* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 805A6984-805A69A4 -00001 0020+00 1/0 0/0 0/0 .data l_daTagMstop_Method */
|
||||
SECTION_DATA static void* l_daTagMstop_Method[8] = {
|
||||
(void*)daTagMstop_Create__FP10fopAc_ac_c,
|
||||
(void*)daTagMstop_Delete__FP12daTagMstop_c,
|
||||
(void*)daTagMstop_Execute__FP12daTagMstop_c,
|
||||
(void*)NULL,
|
||||
(void*)daTagMstop_Draw__FP12daTagMstop_c,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
};
|
||||
static actor_method_class l_daTagMstop_Method = {
|
||||
(process_method_func)daTagMstop_Create, (process_method_func)daTagMstop_Delete,
|
||||
(process_method_func)daTagMstop_Execute, NULL, (process_method_func)daTagMstop_Draw};
|
||||
|
||||
/* 805A69A4-805A69D4 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Tag_Mstop */
|
||||
SECTION_DATA extern void* g_profile_Tag_Mstop[12] = {
|
||||
(void*)0xFFFFFFFD, (void*)0x0007FFFD,
|
||||
(void*)0x02C40000, (void*)&g_fpcLf_Method,
|
||||
(void*)0x000005D4, (void*)NULL,
|
||||
(void*)NULL, (void*)&g_fopAc_Method,
|
||||
(void*)0x01010000, (void*)&l_daTagMstop_Method,
|
||||
(void*)0x00044000, (void*)0x030E0000,
|
||||
extern actor_process_profile_definition g_profile_Tag_Mstop = {
|
||||
-3, // mLayerID
|
||||
7, // mListID
|
||||
-3, // mListPrio
|
||||
PROC_Tag_Mstop, // mProcName
|
||||
0, // padding
|
||||
&g_fpcLf_Method.mBase, // mSubMtd
|
||||
sizeof(daTagMstop_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopAc_Method.base, // mSubMtd
|
||||
0x0101, // mPriority
|
||||
0, // padding
|
||||
0, // padding
|
||||
&l_daTagMstop_Method, // mSubMtd
|
||||
0x00044000, // mStatus
|
||||
3, // mActorType
|
||||
0x0E, // mCullType
|
||||
0, // padding
|
||||
0 // padding
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user