Remove fake matches, fix false equivalencies, and other small matches (#2837)

* Debug matches and remove fake matches

* Fix false equivalencies, regallocs, and vtable orders

* Fix PAL splits
This commit is contained in:
LagoLunatic 2025-11-21 00:17:51 -05:00 committed by GitHub
parent 6f7457a870
commit 91011befd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
41 changed files with 217 additions and 182 deletions

View File

@ -13,3 +13,4 @@ d/actor/d_a_obj_swhang.cpp:
.text start:0x00000078 end:0x00001914
.rodata start:0x00000000 end:0x000000DC
.data start:0x00000000 end:0x00000214
.bss start:0x00000000 end:0x00000004

View File

@ -77,4 +77,4 @@ __vt__8cM3dGSph = .data:0x0000019C; // type:object size:0xC scope:global
__vt__8cM3dGAab = .data:0x000001A8; // type:object size:0xC scope:global
__vt__17dEvLib_callback_c = .data:0x000001B4; // type:object size:0x18 scope:global
__vt__13daObjSwHang_c = .data:0x000001CC; // type:object size:0x48 scope:global
lbl_643_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
init$2095 = .bss:0x00000000; // type:object size:0x1 align:1 data:byte

View File

@ -686,7 +686,7 @@ config.libs = [
Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_file_sel_info.cpp"),
Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_bright_check.cpp"),
Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_scope.cpp"),
Object(Equivalent, "d/d_select_cursor.cpp"), # vtable order
Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_select_cursor.cpp"),
Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_select_icon.cpp"),
Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_shop_camera.cpp"),
Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_shop_item_ctrl.cpp"),
@ -1886,7 +1886,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_jagar"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_kasi_hana"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_kasi_kyu"),
ActorRel(Equivalent, "d_a_npc_kasi_mich"), # idk this why can't link
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_kasi_mich"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01", "Shield"), "d_a_npc_kdk"),
ActorRel(NonMatching, "d_a_npc_kn"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_knj"),
@ -1980,7 +1980,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_bubblePilar"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_catdoor"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_cb"),
ActorRel(Equivalent, "d_a_obj_cblock"), # weird weak data issue
ActorRel(Equivalent, "d_a_obj_cblock"), # weird weak data issue - needs a ...data pool, but no functions use it
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_cdoor"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_chandelier"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_chest"),
@ -2134,7 +2134,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mhole"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mie"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mirror_6pole"),
ActorRel(Equivalent, "d_a_obj_mirror_chain"), # stack order
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mirror_chain"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mirror_sand"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mirror_screw"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mirror_table"),
@ -2190,8 +2190,8 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_snowEffTag"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_snow_soup"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_so"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_spinLift"), # extra weak dtors?
ActorRel(Equivalent, "d_a_obj_ss_drink"), # vtable order
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_spinLift"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_ss_drink"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_ss_item"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_stairBlock"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_stone"),
@ -2204,7 +2204,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_swBallC"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_swLight"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_swchain"),
ActorRel(Equivalent, "d_a_obj_swhang"), # vtable order
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_swhang"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_sword"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_swpush2"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_swspinner"),

View File

@ -3359,11 +3359,7 @@ public:
BOOL checkSmallUpperGuardAnime() const { return checkUpperAnime(0x16); }
BOOL checkFmChainGrabAnime() const { return checkUpperAnime(0x62) || checkUpperAnime(0x2A0); }
// this might be a fake match, but helps fix usage in many functions
#pragma push
#pragma optimization_level 2
BOOL checkAttentionLock() { return mAttention->Lockon(); }
#pragma pop
bool checkUpperAnime(u16 i_idx) const { return mUpperAnmHeap[UPPER_2].getIdx() == i_idx; }
bool checkUnderAnime(u16 i_idx) const { return mUnderAnmHeap[UNDER_2].getIdx() == i_idx; }

View File

@ -75,7 +75,6 @@ public:
/* 80A28F74 */ int escape(int);
/* 80A2908C */ int iyan_look(int);
/* 80A29164 */ int turn_hana(int);
void dummy();
/* 80A291E8 */ int wait_dummy(int);
/* 80A2926C */ int cheer(int);
/* 80A29458 */ BOOL _turn_to_link(s16);

View File

@ -27,6 +27,7 @@ public:
u8 getSwitchNo() { return (fopAcM_GetParam(this) >> 8) & 0xff; }
void setAnmSpeed(f32 speed) { mpTableUpBckAnm->setPlaySpeed(speed); }
void setEffect() { field_0x874 = true; }
/* 0x568 */ J3DModel* mpTableModel;
/* 0x56C */ J3DModel* mpMirrorModel;

View File

@ -44,8 +44,8 @@ public:
/* 80CE6454 */ int talk(void*);
/* 80CE6514 */ int drink(void*);
/* 80CE59FC */ virtual void setSoldOut();
/* 80CE4F78 */ virtual ~daObj_SSDrink_c();
/* 80CE59FC */ virtual void setSoldOut();
static dCcD_SrcGObjInf const mCcDObjInfo;
static dCcD_SrcCyl mCcDCyl;

View File

@ -50,8 +50,6 @@ public:
/* 80CFC6AC */ void modeOffWait();
/* 80CFCA34 */ void init_modeOnWait();
/* 80CFCA40 */ void modeOnWait();
/* 80CFCCE0 */ bool eventStart();
/* 80CFD034 */ virtual ~daObjSwHang_c() {}
daObjSwHang_c() : dEvLib_callback_c(this) {}
@ -61,6 +59,9 @@ public:
/* 80CFCD04 */ virtual int Draw();
/* 80CFCD98 */ virtual int Delete();
/* 80CFCCE0 */ virtual bool eventStart();
/* 80CFD034 */ virtual ~daObjSwHang_c() {}
cXyz getHangPos() { return mHangPos; }
void setHangPlayer() { mHangPlayer = 1; }

View File

@ -39,8 +39,8 @@ public:
/* 801958E0 */ void setBckAnimation(J2DAnmTransformKey*);
/* 80195940 */ void moveCenter(J2DPane*, f32, f32);
/* 80194C30 */ virtual void draw();
/* 801949EC */ virtual ~dSelect_cursor_c();
/* 80194C30 */ virtual void draw();
void setPos(f32 x, f32 y) {
mPositionX = x;

View File

@ -83,9 +83,9 @@ enum fopAc_Cull_e {
};
enum fopAc_attention_type {
fopAc_attn_LOCK_e,
fopAc_attn_TALK_e,
fopAc_attn_BATTLE_e,
/* 0x0 */ fopAc_attn_LOCK_e,
/* 0x1 */ fopAc_attn_TALK_e,
/* 0x2 */ fopAc_attn_BATTLE_e,
#if !PLATFORM_GCN
fopAc_attn_UNK_3,
@ -93,17 +93,17 @@ enum fopAc_attention_type {
fopAc_attn_UNK_5,
#endif
fopAc_attn_SPEAK_e,
fopAc_attn_CARRY_e,
fopAc_attn_DOOR_e,
fopAc_attn_JUEL_e,
/* 0x3 */ fopAc_attn_SPEAK_e,
/* 0x4 */ fopAc_attn_CARRY_e,
/* 0x5 */ fopAc_attn_DOOR_e,
/* 0x6 */ fopAc_attn_JUEL_e,
#if !PLATFORM_GCN
fopAc_attn_UNK_10,
#endif
fopAc_attn_ETC_e,
fopAc_attn_CHECK_e,
/* 0x7 */ fopAc_attn_ETC_e,
/* 0x8 */ fopAc_attn_CHECK_e,
fopAc_attn_MAX_e,
};

View File

@ -15,13 +15,11 @@ JAUSeqDataBlock::JAUSeqDataBlock() : field_0x0(this) {}
/* 802A6928-802A6974 2A1268 004C+00 1/1 0/0 0/0 .text getSeqData__16JAUSeqDataBlocksF10JAISoundID
*/
u8* JAUSeqDataBlocks::getSeqData(JAISoundID param_0) {
// fake match. Should be
// if (param_0.isAnonymous()) {
// But doesn't match
if ((u32)param_0 == 0xffffffff) {
if (param_0.isAnonymous()) {
return NULL;
}
for (JSULink<JAUSeqDataBlock>* link = getFirst(); link != NULL;
JSULink<JAUSeqDataBlock>* link;
for (link = getFirst(); link != NULL;
link = link->getNext())
{
if ((u32)link->getObject()->field_0x10 == (u32)param_0) {
@ -86,7 +84,7 @@ JAUDynamicSeqDataBlocks::JAUDynamicSeqDataBlocks() {
/* 802A6AA0-802A6AA8 -00001 0008+00 0/0 0/0 0/0 .text
* setSeqDataArchive__23JAUDynamicSeqDataBlocksFP10JKRArchive */
void JAUDynamicSeqDataBlocks::setSeqDataArchive(JKRArchive* param_0) {
*(u32*)(((u8*)this) + 36) /* this->field_0x24 */ = (u32)(param_0);
seqDataArchive_ = param_0;
}
/* 802A6AA8-802A6B8C 2A13E8 00E4+00 0/0 1/1 0/0 .text

View File

@ -29,20 +29,28 @@ void JUTNameTab::setResource(const ResNTAB* pNameTable) {
}
s32 JUTNameTab::getIndex(const char* pName) const {
JUT_ASSERT(101, mNameTable != NULL);
const ResNTAB::Entry* pEntry = mNameTable->mEntries;
u16 keyCode = calcKeyCode(pName);
for (u16 i = 0; i < mNameNum; pEntry++, i++)
if (pEntry->mKeyCode == keyCode &&
strcmp((mNameTable->mEntries[i].mOffs + ((const char*)mNameTable)), pName) == 0)
for (u16 i = 0; i < mNameNum; i++) {
if (
pEntry->mKeyCode == keyCode &&
strcmp((mNameTable->mEntries[i].mOffs + ((const char*)mNameTable)), pName) == 0
) {
return i;
}
pEntry++;
}
return -1;
}
const char* JUTNameTab::getName(u16 index) const {
JUT_ASSERT(138, mNameTable != NULL);
if (index < mNameNum)
return mNameTable->getName(index);
return ((const char*)mNameTable) + mNameTable->mEntries[index].mOffs;
return NULL;
}

View File

@ -422,7 +422,7 @@ void Z2SoundObjAnime::updateSoundLifeTime_(f32 param_0, f32 param_1) {
switch (getHandle(i)->getSound()->getAnimationState()) {
case 0:
break;
case 1:
case 1: {
JAUSoundAnimationSound* sound =
(JAUSoundAnimationSound*)getHandle(i)->getSound()->getUserData();
bool bvar1 = param_1 == 0.0f && sound->stopsWhenSpeedIsZero();
@ -446,6 +446,7 @@ void Z2SoundObjAnime::updateSoundLifeTime_(f32 param_0, f32 param_1) {
}
}
break;
}
case 2:
break;
}

View File

@ -9951,7 +9951,7 @@ void daAlink_c::setSpeedAndAngleAtn() {
* checkRequestTalkActor__9daAlink_cFP10dAttList_cP10fopAc_ac_c */
int daAlink_c::checkRequestTalkActor(dAttList_c* param_0, fopAc_ac_c* param_1) {
if (param_0 != NULL &&
(param_0->mType == 3 || (param_0->mType == 1 && mTargetedActor == param_1)))
(param_0->mType == fopAc_attn_SPEAK_e || (param_0->mType == fopAc_attn_TALK_e && mTargetedActor == param_1)))
{
return true;
}

View File

@ -531,7 +531,7 @@ BOOL daAlink_c::checkNextActionGrab() {
setCarryArmAngle(0.0f, 1.0f);
if (mTargetedActor == NULL && mAttList != NULL && mAttList->mType == 5 && fopAcM_CheckStatus(temp_r3, 0x2000000)) {
if (mTargetedActor == NULL && mAttList != NULL && mAttList->mType == fopAc_attn_DOOR_e && fopAcM_CheckStatus(temp_r3, 0x2000000)) {
setDoStatus(6);
} else if ((field_0x27f4 == NULL) || !checkGrabTalkActor(field_0x27f4) || !setTalkStatus()) {
if (checkModeFlg(0x400)) {
@ -2601,7 +2601,7 @@ int daAlink_c::procGoronMove() {
int temp_r28 = cLib_distanceAngleS(field_0x2fe2, shape_angle.y);
if (mAttention->getActionBtnB() != NULL && mAttention->getActionBtnB()->mType == 4) {
if (mAttention->getActionBtnB() != NULL && mAttention->getActionBtnB()->mType == fopAc_attn_CARRY_e) {
setDoStatus(0x91);
if (doTrigger()) {

View File

@ -2269,7 +2269,7 @@ void daB_MGN_c::executeFall() {
}
switch (mMoveMode) {
case 0:
case 0: {
onBodyCo();
f32 var_f31 = player->speedF * 60.0f;
s16 sp8 = player->current.angle.y;
@ -2309,6 +2309,7 @@ void daB_MGN_c::executeFall() {
mpMgnBtk->init(mpMgnModelMorf->getModel()->getModelData(),
(J3DAnmTextureSRTKey*)dComIfG_getObjectRes("B_mgn", 0x3a), 1, 0, 0.0f, 0,
-1);
}
case 1:
cLib_chaseF(&field_0xae8, 1.0f, 0.02f);
@ -2531,7 +2532,7 @@ void daB_MGN_c::executeOpening() {
cXyz sp94(0.0f, 220.0f, -1390.0f);
switch (mMoveMode) {
case 0:
case 0: {
attention_info.flags = 0;
if (!eventInfo.checkCommandDemoAccrpt()) {
@ -2590,6 +2591,7 @@ void daB_MGN_c::executeOpening() {
Z2GetAudioMgr()->bgmStreamPrepare(0x2000062);
Z2GetAudioMgr()->bgmStreamPlay();
return;
}
case 1:
cLib_addCalc2(&field_0xadc, 0.0f, 0.1f, 5.0f);
cLib_addCalcAngleS2(&field_0xae2, 0x50, 8, 8);
@ -2813,7 +2815,7 @@ void daB_MGN_c::executeDeath() {
s16 sp8 = nREG_S(0) + 0x6800;
switch (mMoveMode) {
case 0:
case 0: {
if (!eventInfo.checkCommandDemoAccrpt()) {
fopAcM_orderPotentialEvent(this, 2, 0xffff, 0);
eventInfo.onCondition(2);
@ -2865,6 +2867,7 @@ void daB_MGN_c::executeDeath() {
mSound.startCreatureVoice(Z2SE_EN_MGN_DEMO_END, -1);
return;
}
case 1:
current.pos = sp48;
current.angle.y = 0x6800;

View File

@ -165,13 +165,11 @@ void daCrod_c::setMatrix() {
/* 804A3500-804A3580 000740 0080+00 1/1 0/0 0/0 .text posMove__8daCrod_cFv */
void daCrod_c::posMove() {
f32 cosx = cM_scos(current.angle.x);
f32 cosy = cM_scos(current.angle.y);
f32 speedfy = (speedF * cosy);
//probably fake match
f32 speedz;
speed.set(speedF * cM_ssin(current.angle.y) * cM_scos(current.angle.x),
speedF * cM_ssin(current.angle.x), speedz = speedfy * cosx);
speed.set(
speedF * cM_ssin(current.angle.y) * cM_scos(current.angle.x),
speedF * cM_ssin(current.angle.x),
speedF * cM_scos(current.angle.y) * cM_scos(current.angle.x)
);
current.pos += speed;
}

View File

@ -845,8 +845,7 @@ int daBdoorL1_c::checkArea() {
daPy_py_c* player = daPy_getPlayerActorClass();
cXyz local_48;
cXyz local_54;
// Fake Match. Not the first time this solves this. Something is up with the check wolf (maybe only in REL).
if (dComIfGp_getLinkPlayer()->mNoResetFlg1 & daPy_py_c::FLG1_IS_WOLF) {
if (daPy_py_c::checkNowWolf()) {
local_48 = player->attention_info.position - current.pos;
local_54 = player->current.pos - current.pos;
} else {
@ -857,7 +856,7 @@ int daBdoorL1_c::checkArea() {
if (fabsf(local_48.x) > 200.0f) {
return 0;
}
if (dComIfGp_getLinkPlayer()->mNoResetFlg1 & daPy_py_c::FLG1_IS_WOLF) {
if (daPy_py_c::checkNowWolf()) {
mDoMtx_stack_c::multVec(&local_54, &local_54);
if (fabsf(local_54.x) > 130.0f) {
return 0;

View File

@ -452,7 +452,7 @@ static void atHit_CB(fopAc_ac_c* i_atActor, dCcD_GObjInf* i_atObjInf, fopAc_ac_c
/* 8067DB5C-8067DC58 00147C 00FC+00 1/1 0/0 0/0 .text e_arrow_shield__FP13e_arrow_class
*/
static void e_arrow_shield(e_arrow_class* i_this) {
e_arrow_class* a_this = (e_arrow_class*)i_this; // necessary for reg alloc
e_arrow_class* a_this = (e_arrow_class*)i_this;
daAlink_getAlinkActorClass()->setArrowShieldPos(&a_this->current.pos, &a_this->shape_angle,
&i_this->field_0x9d4, &i_this->field_0x9c8);

View File

@ -1325,7 +1325,6 @@ int daE_HP_c::create() {
/* 806E9900-806E9ABC 003C00 01BC+00 1/1 0/0 0/0 .text __ct__8daE_HP_cFv */
daE_HP_c::daE_HP_c() {
// NONMATCHING
}
/* 806E9CD0-806E9CF0 003FD0 0020+00 1/0 0/0 0/0 .text daE_HP_Create__FP8daE_HP_c */

View File

@ -311,7 +311,6 @@ void daE_WS_c::executeWait() {
}
/* 807E4AB8-807E4E68 001198 03B0+00 1/1 0/0 0/0 .text executeAttack__8daE_WS_cFv */
// NONMATCHING
void daE_WS_c::executeAttack() {
cXyz player_pos;
mDoMtx_stack_c::copy(daPy_getLinkPlayerActorClass()->getModelJointMtx(0));
@ -326,13 +325,15 @@ void daE_WS_c::executeAttack() {
case 1:
setFootSound();
if (!checkAttackEnd()) {
if (cLib_chaseAngleS(&shape_angle.y, calcTargetAngle(current.pos, player_pos), 0x300)) {
mMode = 2;
setBck(10, 2, 3.0f, 1.0f);
mSound.startCreatureVoice(Z2SE_EN_WS_V_YOKOKU, -1);
mMoveWaitTimer = 10;
}
if (checkAttackEnd()) {
return;
}
if (cLib_chaseAngleS(&shape_angle.y, calcTargetAngle(current.pos, player_pos), 0x300)) {
mMode = 2;
setBck(10, 2, 3.0f, 1.0f);
mSound.startCreatureVoice(Z2SE_EN_WS_V_YOKOKU, -1);
mMoveWaitTimer = 10;
}
break;
case 2:
@ -347,11 +348,24 @@ void daE_WS_c::executeAttack() {
}
break;
case 3:
case 3: {
setFootSound();
cLib_chaseAngleS(&shape_angle.y, calcTargetAngle(current.pos, player_pos), 0x400);
if (checkBeforeBg(shape_angle.y) || (mCcSph.ChkAtHit() && fopAcM_GetName(dCc_GetAc(mCcSph.GetAtHitObj()->GetAc())) == PROC_ALINK) || !checkInSearchRange(current.pos, field_0x65c)) {
BOOL r28 = false;
if (checkBeforeBg(shape_angle.y)) {
r28 = true;
}
if (mCcSph.ChkAtHit()) {
cCcD_Obj* r27 = mCcSph.GetAtHitObj();
if (fopAcM_GetName(dCc_GetAc(r27->GetAc())) == PROC_ALINK) {
r28 = true;
}
}
if (!checkInSearchRange(current.pos, field_0x65c)) {
r28 = true;
}
if (r28) {
mMode = 4;
speedF = 0.0f;
setBck(4, 0, 3.0f, 1.0f);
@ -362,6 +376,7 @@ void daE_WS_c::executeAttack() {
return;
}
break;
}
case 4:
if (mpModelMorf->checkFrame(7.5f)) {
mSound.startCreatureVoice(Z2SE_EN_WS_V_ATTACK, -1);
@ -370,7 +385,7 @@ void daE_WS_c::executeAttack() {
if (mpModelMorf->isStop()) {
setActionMode(ACTION_WAIT_e);
}
break;
/* fallthrough */
}
current.angle.y = shape_angle.y;

View File

@ -77,7 +77,6 @@ static void daKytag12_light_swprd_proc(kytag12_class* i_this) {
/* 8085BD0C-8085D1DC 00024C 14D0+00 2/1 0/0 0/0 .text
* daKytag12_Execute_standard__FP13kytag12_class */
// NONMATCHING minor regalloc
static int daKytag12_Execute_standard(kytag12_class* i_this) {
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
@ -467,7 +466,6 @@ static int daKytag12_Execute_standard(kytag12_class* i_this) {
/* 8085D1DC-8085DFF0 00171C 0E14+00 1/1 0/0 0/0 .text daKytag12_Execute_arrival__FP13kytag12_class
*/
// NONMATCHING minor regalloc
static int daKytag12_Execute_arrival(kytag12_class* i_this) {
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);

View File

@ -318,7 +318,7 @@ static BOOL move_gake_check(ni_class* i_this, f32 param_1) {
/* 8094C7B4-8094CE7C 000C74 06C8+00 1/1 0/0 0/0 .text ni_normal__FP8ni_class */
static void ni_normal(ni_class* i_this) {
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; // temp var and casts necessary atm. fake match?
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
cXyz sp50;
cXyz sp5C;
@ -377,9 +377,8 @@ static void ni_normal(ni_class* i_this) {
i_this->field_0x60e = 30;
}
if ((s16)(a_this->shape_angle.y - i_this->mAngleToPlayer) < 0x2000 &&
(s16)(a_this->shape_angle.y - i_this->mAngleToPlayer) > 0x2000)
{
s16 sp0A = a_this->shape_angle.y - i_this->mAngleToPlayer;
if (sp0A < 0x2000 && sp0A > 0x2000) {
i_this->field_0x60e = 0;
}
@ -427,7 +426,7 @@ static void ni_normal(ni_class* i_this) {
/* 8094CE7C-8094D2A4 00133C 0428+00 1/1 0/0 0/0 .text ni_away__FP8ni_class */
static void ni_away(ni_class* i_this) {
ni_class* a_this = (ni_class*)i_this; // temp var and cast necessary to match atm. fake match?
ni_class* a_this = (ni_class*)i_this;
fopAc_ac_c* player = dComIfGp_getPlayer(0);
cXyz sp4C;
cXyz sp58;
@ -476,7 +475,7 @@ static void ni_away(ni_class* i_this) {
}
if (a_this->mTimers[1] == 0) {
a_this->mMoveAngle = cM_atan2s(sp4C.x, sp4C.z);
a_this->mMoveAngle = (s16)cM_atan2s(sp4C.x, sp4C.z);
if (fopAcM_wayBgCheck(a_this, 100.0f, 30.0f)) {
a_this->mTimers[1] = 30;
@ -584,7 +583,7 @@ static void ni_swim(ni_class* i_this) {
/* 8094D60C-8094D7BC 001ACC 01B0+00 1/1 0/0 0/0 .text ni_carry__FP8ni_class */
static int ni_carry(ni_class* i_this) {
ni_class* a_this = (ni_class*)i_this; // temp var and cast necessary to match atm. fake match?
ni_class* a_this = (ni_class*)i_this;
cXyz sp40;
cXyz sp4C;
cXyz sp58;
@ -1424,7 +1423,7 @@ static void play_camera(ni_class* i_this) {
/* 8094F5D8-809502B4 003A98 0CDC+00 2/1 0/0 0/0 .text action__FP8ni_class */
static void action(ni_class* i_this) {
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; // necessary for reg alloc
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
cXyz sp148;
cXyz sp154;

View File

@ -1917,7 +1917,7 @@ BOOL daNpcF_chkDoBtnEqSpeak(fopAc_ac_c* i_actor_p) {
for (int i = 0; i < dComIfGp_getAttention()->GetActionCount(); i++) {
if (dComIfGp_getAttention()->ActionTarget(i) == i_actor_p &&
dComIfGp_getAttention()->getActionBtnB() &&
dComIfGp_getAttention()->getActionBtnB()->mType == 3)
dComIfGp_getAttention()->getActionBtnB()->mType == fopAc_attn_SPEAK_e)
{
ret = TRUE;
}
@ -1926,7 +1926,7 @@ BOOL daNpcF_chkDoBtnEqSpeak(fopAc_ac_c* i_actor_p) {
for (int i = 0; i < dComIfGp_getAttention()->GetLockonCount(); i++) {
if (dComIfGp_getAttention()->LockonTarget(i) == i_actor_p &&
dComIfGp_getAttention()->getActionBtnB() &&
dComIfGp_getAttention()->getActionBtnB()->mType == 1)
dComIfGp_getAttention()->getActionBtnB()->mType == fopAc_attn_TALK_e)
{
ret = TRUE;
}

View File

@ -1356,7 +1356,6 @@ void daNpc_Besu_c::beforeMove() {
/* 80538C18-805391B8 001EB8 05A0+00 1/0 0/0 0/0 .text setAttnPos__12daNpc_Besu_cFv */
void daNpc_Besu_c::setAttnPos() {
// NONMATCHING
cXyz eyeOffset(10.0f, 30.0f, 0.0f);
if (field_0x112f) {
daPy_getPlayerActorClass()->onWolfEyeKeep();

View File

@ -112,7 +112,6 @@ daNpc_grS_c::cutFunc daNpc_grS_c::mEvtCutList[2] = {
/* 809E40CC-809E4250 0000EC 0184+00 1/1 0/0 0/0 .text __ct__11daNpc_grS_cFv */
daNpc_grS_c::daNpc_grS_c() {
// NONMATCHING
}
/* 809E42E0-809E44E0 000300 0200+00 1/0 0/0 0/0 .text __dt__11daNpc_grS_cFv */

View File

@ -761,7 +761,6 @@ BOOL daNpcKasiMich_c::chkFindPlayer() {
/* 80A27F08-80A282B4 001E28 03AC+00 8/0 0/0 0/0 .text wait__15daNpcKasiMich_cFi */
int daNpcKasiMich_c::wait(int param_1) {
// NONMATCHING
switch (mMode) {
case -1:
break;
@ -777,7 +776,7 @@ int daNpcKasiMich_c::wait(int param_1) {
mMode = 1;
break;
case 1:
case 1: {
chkFindPlayer();
if (mActorMngr[0].getActorP() != NULL) {
@ -846,7 +845,7 @@ int daNpcKasiMich_c::wait(int param_1) {
orderEvent(field_0x1469, l_evtNames[mOrderEvtNo], 0xFFFF, 40, 0xFF, 1);
}
break;
}
default:
JUT_ASSERT(1301, FALSE);
break;
@ -973,9 +972,15 @@ int daNpcKasiMich_c::getWolfPathNearIdx() {
return rv;
}
void dummy() {
daNpcKasiMich_c::actionFunc temp;
temp = &daNpcKasiMich_c::wait;
temp = &daNpcKasiMich_c::wait;
temp = &daNpcKasiMich_c::wait;
}
/* 80A286FC-80A287A0 00261C 00A4+00 2/0 0/0 0/0 .text chace_st__15daNpcKasiMich_cFi */
int daNpcKasiMich_c::chace_st(int param_1) {
// NONMATCHING
switch (mMode) {
case -1:
break;
@ -988,7 +993,7 @@ int daNpcKasiMich_c::chace_st(int param_1) {
case 1:
if (_turn_to_link(0xC00)) {
setAction(&daNpcKasiMich_c::wait);
setAction(&daNpcKasiMich_c::chace);
}
break;
}
@ -998,7 +1003,6 @@ int daNpcKasiMich_c::chace_st(int param_1) {
/* 80A287A0-80A28910 0026C0 0170+00 4/0 0/0 0/0 .text chace__15daNpcKasiMich_cFi */
int daNpcKasiMich_c::chace(int param_1) {
// NONMATCHING
switch (mMode) {
case -1:
break;
@ -1021,7 +1025,7 @@ int daNpcKasiMich_c::chace(int param_1) {
setAction(&daNpcKasiMich_c::wait);
}
} else {
setAction(&daNpcKasiMich_c::wait);
setAction(&daNpcKasiMich_c::chace_st);
}
break;
}
@ -1029,6 +1033,11 @@ int daNpcKasiMich_c::chace(int param_1) {
return 1;
}
void dummy2() {
daNpcKasiMich_c::actionFunc temp;
temp = &daNpcKasiMich_c::chace;
}
/* 80A28910-80A289CC 002830 00BC+00 1/1 0/0 0/0 .text getChacePos__15daNpcKasiMich_cFv */
cXyz daNpcKasiMich_c::getChacePos() {
int plPoint = mPlPoint;
@ -1052,7 +1061,6 @@ cXyz daNpcKasiMich_c::getChacePos() {
/* 80A289CC-80A28A8C 0028EC 00C0+00 2/0 0/0 0/0 .text turn_link__15daNpcKasiMich_cFi */
int daNpcKasiMich_c::turn_link(int param_1) {
// NONMATCHING
switch (mMode) {
case -1:
break;
@ -1065,7 +1073,7 @@ int daNpcKasiMich_c::turn_link(int param_1) {
case 1:
if (_turn_to_link(0x1000)) {
setAction(&daNpcKasiMich_c::chace);
setAction(&daNpcKasiMich_c::wait);
break;
}
}
@ -1075,7 +1083,6 @@ int daNpcKasiMich_c::turn_link(int param_1) {
/* 80A28A8C-80A28B70 0029AC 00E4+00 1/0 0/0 0/0 .text turn_home__15daNpcKasiMich_cFi */
int daNpcKasiMich_c::turn_home(int param_1) {
// NONMATCHING
switch (mMode) {
case -1:
break;
@ -1093,7 +1100,7 @@ int daNpcKasiMich_c::turn_home(int param_1) {
shape_angle.y = current.angle.y;
if (bVar1) {
setAction(&daNpcKasiMich_c::wait);
setAction(&daNpcKasiMich_c::wait_dummy);
}
break;
}
@ -1103,7 +1110,6 @@ int daNpcKasiMich_c::turn_home(int param_1) {
/* 80A28B70-80A28C40 002A90 00D0+00 1/0 0/0 0/0 .text turn_center__15daNpcKasiMich_cFi */
int daNpcKasiMich_c::turn_center(int param_1) {
// NONMATCHING
switch (mMode) {
case -1:
break;
@ -1117,7 +1123,7 @@ int daNpcKasiMich_c::turn_center(int param_1) {
case 1:
if (_turn_pos(mCenterPos, 0x1000)) {
setAction(&daNpcKasiMich_c::chace_st);
setAction(&daNpcKasiMich_c::wait_dummy);
}
break;
}
@ -1197,14 +1203,13 @@ int daNpcKasiMich_c::kya2(int param_1) {
/* 80A28E28-80A28EFC 002D48 00D4+00 1/0 0/0 0/0 .text kya_stop__15daNpcKasiMich_cFi */
int daNpcKasiMich_c::kya_stop(int param_1) {
// NONMATCHING
switch (mMode) {
case -1:
break;
case 0:
if (mMotion != MOT_MICH_KYA_TALK) {
setAction(&daNpcKasiMich_c::chace);
setAction(&daNpcKasiMich_c::wait);
} else {
mMode = 1;
}
@ -1212,7 +1217,7 @@ int daNpcKasiMich_c::kya_stop(int param_1) {
case 1:
if (mAnm_p->getFrame() == 19.0f || mAnm_p->getFrame() == 1.0f) {
setAction(&daNpcKasiMich_c::wait);
setAction(&daNpcKasiMich_c::wait_dummy);
}
break;
}
@ -1272,7 +1277,6 @@ int daNpcKasiMich_c::escape(int param_1) {
/* 80A2908C-80A29164 002FAC 00D8+00 1/0 0/0 0/0 .text iyan_look__15daNpcKasiMich_cFi */
int daNpcKasiMich_c::iyan_look(int param_1) {
// NONMATCHING
switch (mMode) {
case -1:
break;
@ -1296,13 +1300,6 @@ int daNpcKasiMich_c::iyan_look(int param_1) {
return 1;
}
void daNpcKasiMich_c::dummy() {
setAction(&daNpcKasiMich_c::wait_dummy);
setAction(&daNpcKasiMich_c::wait);
setAction(&daNpcKasiMich_c::wait_dummy);
setAction(&daNpcKasiMich_c::wait_dummy);
}
/* 80A29164-80A291E8 003084 0084+00 1/0 0/0 0/0 .text turn_hana__15daNpcKasiMich_cFi */
int daNpcKasiMich_c::turn_hana(int param_1) {
switch (mMode) {
@ -1345,7 +1342,6 @@ int daNpcKasiMich_c::wait_dummy(int param_1) {
/* 80A2926C-80A29458 00318C 01EC+00 1/0 0/0 0/0 .text cheer__15daNpcKasiMich_cFi */
int daNpcKasiMich_c::cheer(int param_1) {
// NONMATCHING
switch (mMode) {
case -1:
break;

View File

@ -199,7 +199,6 @@ daNpc_zrC_c::EventFn daNpc_zrC_c::mEvtCutList[2] = {
/* 80B8DC0C-80B8DD90 0000EC 0184+00 1/1 0/0 0/0 .text __ct__11daNpc_zrC_cFv */
daNpc_zrC_c::daNpc_zrC_c() {
// NONMATCHING
}
/* 80B8DE20-80B8E03C 000300 021C+00 1/0 0/0 0/0 .text __dt__11daNpc_zrC_cFv */

View File

@ -39,7 +39,7 @@ int daObjLv5Key_c::Init() {
setStatus(STATUS_WAIT);
mAction = NULL;
setAction(&Wait, 1);
setAction(&daObjLv5Key_c::Wait, 1);
return cPhs_COMPLEATE_e;
}
@ -137,9 +137,9 @@ void daObjLv5Key_c::Wait(int param_0) {
case 1:
if (is_open_start()) {
setBgc();
setAction(&Open, 1);
setAction(&daObjLv5Key_c::Open, 1);
} else if (is_shake_start()) {
setAction(&Shake, 1);
setAction(&daObjLv5Key_c::Shake, 1);
}
}
}
@ -158,7 +158,7 @@ void daObjLv5Key_c::Open(int param_0) {
mBck.play();
if (mBck.isStop()) {
setAction(&Fall, 1);
setAction(&daObjLv5Key_c::Fall, 1);
}
}
}
@ -174,7 +174,7 @@ void daObjLv5Key_c::Fall(int param_0) {
fopAcM_SetGravity(this, -6.0f);
mMode = 1;
break;
case 1:
case 1: {
fopAcM_calcSpeed(this);
fopAcM_posMove(this, NULL);
@ -194,6 +194,7 @@ void daObjLv5Key_c::Fall(int param_0) {
mMode = 2;
}
break;
}
case 2:
RotateAngle();
@ -207,7 +208,7 @@ void daObjLv5Key_c::Fall(int param_0) {
current.pos.y = prev_y;
if (mAcch.ChkGroundHit()) {
setAction(&Land, 1);
setAction(&daObjLv5Key_c::Land, 1);
}
}
}
@ -267,7 +268,7 @@ void daObjLv5Key_c::Shake(int param_0) {
decShakeNum();
if (is_shake_end()) {
setAction(&Wait, 1);
setAction(&daObjLv5Key_c::Wait, 1);
}
}
}

View File

@ -11,13 +11,14 @@
#include "d/d_procname.h"
#include "d/d_s_play.h"
#include "SSystem/SComponent/c_math.h"
#include "f_op/f_op_actor_mng.h"
/* 8057CBD8-8057CC44 000078 006C+00 1/0 0/0 0/0 .text daObj_Fmobj_Draw__FP15obj_fmobj_class */
static int daObj_Fmobj_Draw(obj_fmobj_class* i_this) {
fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor;
J3DModel* model_p = i_this->mpModel;
g_env_light.settingTevStruct(0x40, &a_this->current.pos, &a_this->tevStr);
g_env_light.settingTevStruct(0x40, &a_this->current.pos, &i_this->mActor.tevStr);
g_env_light.setLightTevColorType_MAJI(model_p, &a_this->tevStr);
mDoExt_modelUpdateDL(model_p);
return 1;
@ -25,6 +26,7 @@ static int daObj_Fmobj_Draw(obj_fmobj_class* i_this) {
/* 8057CC44-8057CC84 0000E4 0040+00 1/0 0/0 0/0 .text daObj_Fmobj_Execute__FP15obj_fmobj_class */
static int daObj_Fmobj_Execute(obj_fmobj_class* i_this) {
fopAc_ac_c* actor = &i_this->mActor;
i_this->field_0x578++;
for (int i = 0; i < 2; i++) {
@ -43,6 +45,8 @@ static int daObj_Fmobj_IsDelete(obj_fmobj_class* i_this) {
/* 8057CC8C-8057CCDC 00012C 0050+00 1/0 0/0 0/0 .text daObj_Fmobj_Delete__FP15obj_fmobj_class */
static int daObj_Fmobj_Delete(obj_fmobj_class* i_this) {
fopAc_ac_c* actor = &i_this->mActor;
fopAcM_RegisterDeleteID(i_this, "Obj_Fmobj");
dComIfG_resDelete(&i_this->mPhase, "Obj_Fmobj");
dComIfG_Bgsp().Release(i_this->mpBgW);
return 1;
@ -53,6 +57,7 @@ static int useHeapInit(fopAc_ac_c* i_this) {
obj_fmobj_class* a_this = (obj_fmobj_class*)i_this;
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("Obj_Fmobj", 4);
JUT_ASSERT(213, modelData != NULL);
a_this->mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
if (a_this->mpModel == NULL) {
return 0;
@ -63,8 +68,7 @@ static int useHeapInit(fopAc_ac_c* i_this) {
return 0;
}
cBgD_t* pdzb = (cBgD_t*)dComIfG_getObjectRes("Obj_Fmobj", 7);
if (a_this->mpBgW->Set(pdzb, cBgW::MOVE_BG_e, &a_this->mBgMtx) == 1) {
if (a_this->mpBgW->Set((cBgD_t*)dComIfG_getObjectRes("Obj_Fmobj", 7), cBgW::MOVE_BG_e, &a_this->mBgMtx) == 1) {
return 0;
}
@ -74,13 +78,11 @@ static int useHeapInit(fopAc_ac_c* i_this) {
/* 8057CDE0-8057CF60 000280 0180+00 1/0 0/0 0/0 .text daObj_Fmobj_Create__FP10fopAc_ac_c
*/
static int daObj_Fmobj_Create(fopAc_ac_c* i_this_param) {
// Fake match - debug says i_this is fake
fopAc_ac_c* i_this = (fopAc_ac_c*)i_this_param;
obj_fmobj_class* a_this = (obj_fmobj_class*)i_this_param;
fopAcM_ct(i_this, obj_fmobj_class);
static int daObj_Fmobj_Create(fopAc_ac_c* i_this) {
obj_fmobj_class* a_this = (obj_fmobj_class*)i_this;
fopAcM_ct(&a_this->mActor, obj_fmobj_class);
int phase;
phase = dComIfG_resLoad(&a_this->mPhase, "Obj_Fmobj");
if (phase == cPhs_COMPLEATE_e) {
OS_REPORT("OBJ_FMOBJ PARAM %x\n", fopAcM_GetParam(i_this));
@ -97,7 +99,7 @@ static int daObj_Fmobj_Create(fopAc_ac_c* i_this_param) {
}
OS_REPORT("//////////////OBJ_FMOBJ SET 2 !!\n");
if (dComIfG_Bgsp().Regist(a_this->mpBgW, i_this)) {
if (dComIfG_Bgsp().Regist(a_this->mpBgW, &a_this->mActor)) {
return cPhs_ERROR_e;
}

View File

@ -39,7 +39,7 @@ void daObjMasterSword_c::executeWait() {
for (int i = 0; i < dComIfGp_getAttention()->GetActionCount(); i++) {
if (dComIfGp_getAttention()->ActionTarget(i) == this) {
if (dComIfGp_getAttention()->getActionBtnB() != NULL &&
dComIfGp_getAttention()->getActionBtnB()->mType == 4)
dComIfGp_getAttention()->getActionBtnB()->mType == fopAc_attn_CARRY_e)
{
dComIfGp_setDoStatusForce(8, 0);
}

View File

@ -19,7 +19,6 @@ static u8 l_begin;
#endif
/* 80C96698-80C96DAC 000078 0714+00 1/0 0/0 0/0 .text draw__22dScissorBegin_packet_cFv */
// NONMATCHING - slight stack order issue
void dScissorBegin_packet_c::draw() {
GXGetScissor(&l_scissor[0], &l_scissor[1], &l_scissor[2], &l_scissor[3]);
@ -39,8 +38,7 @@ void dScissorBegin_packet_c::draw() {
f32 sp68 = l_scissor[1];
f32 sp64 = sp68 + l_scissor[3];
cXyz spEC[4];
cXyz sp11C;
cXyz spEC[5];
int sp60 = 4;
view_class* view_p = dComIfGd_getView();
f32 sp58 = -view_p->near;

View File

@ -163,7 +163,7 @@ void daObj_Oiltubo_c::restart() {
current.angle.set(0, home.angle.y, 0);
shape_angle = current.angle;
setProcess(&wait);
setProcess(&daObj_Oiltubo_c::wait);
}
/* 80CA7068-80CA720C 0009C8 01A4+00 1/1 0/0 0/0 .text initialize__15daObj_Oiltubo_cFv */

View File

@ -375,7 +375,7 @@ void daObj_SSDrink_c::setMtx() {
/* 80CE60E8-80CE6170 0011E8 0088+00 1/1 0/0 0/0 .text setAttnPos__15daObj_SSDrink_cFv */
void daObj_SSDrink_c::setAttnPos() {
if (!checkProcess(&daObj_SSDrink_c::drink)) {
if (!checkProcess(&daObj_SSDrink_c::talk)) {
attention_info.position = current.pos;
}

View File

@ -243,7 +243,7 @@ u16 daObj_SSItem_c::getValue() {
void daObj_SSItem_c::restart() {
current.angle.set(0, home.angle.y, 0);
shape_angle = current.angle;
setProcess(&wait);
setProcess(&daObj_SSItem_c::wait);
}
/* 80CE7950-80CE7B04 000DB0 01B4+00 1/1 0/0 0/0 .text initialize__14daObj_SSItem_cFv */

View File

@ -128,58 +128,77 @@ static int daTagLv8Gate_Execute(daTagLv8Gate_c* i_this) {
}
/* 80D51F48-80D522F0 000388 03A8+00 1/1 0/0 0/0 .text execute__14daTagLv8Gate_cFv */
int daTagLv8Gate_c::execute() {
dComIfG_inf_c& game_info = g_dComIfG_gameInfo; // Fake match?
if (game_info.getPlay().getEvent().runCheck() && !eventInfo.checkCommandTalk()) {
s32 cut_index = dComIfGp_getEventManager().getMyStaffId(l_arcName, NULL, 0);
inline int daTagLv8Gate_c::execute() {
#if VERSION != VERSION_SHIELD_DEBUG
// TODO: gameInfo fake match to force reuse of pointer
dComIfG_play_c* play = &g_dComIfG_gameInfo.play;
if (play->getEvent().runCheck() && !eventInfo.checkCommandTalk()) {
#else
if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) {
#endif
dEvent_manager_c& eventManager = dComIfGp_getEventManager();
s32 cut_index = eventManager.getMyStaffId(l_arcName, NULL, 0);
if (cut_index != -1) {
int* cut_name = (int*)dComIfGp_getEventManager().getMyNowCutName(cut_index);
int* cut_name = (int*)eventManager.getMyNowCutName(cut_index);
if (dComIfGp_getEventManager().getIsAddvance(cut_index)) {
if (eventManager.getIsAddvance(cut_index)) {
switch (*cut_name) {
case '0001':
dComIfGp_getEvent().setSkipProc(this, dEv_noFinishSkipProc, 0);
case '0001': {
dComIfGp_getEvent().startCheckSkipEdge(this);
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&current.pos, shape_angle.y,
0);
fopAc_ac_c* mirror_table = fopAcM_SearchByName(PROC_Obj_MirrorTable);
if (mirror_table != NULL) {
static_cast<daObjMirrorTable_c*>(mirror_table)->field_0x874 = true;
static_cast<daObjMirrorTable_c*>(mirror_table)->setEffect();
}
break;
}
case '0002':
dStage_changeScene(getSceneNo(), 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1);
break;
default:
JUT_ASSERT(139, FALSE);
}
}
#if VERSION != VERSION_SHIELD_DEBUG
dEvt_control_c& eventControl = play->getEvent();
#endif
if (dComIfGp_getEvent().checkSkipEdge()) {
#if VERSION != VERSION_SHIELD_DEBUG
dComIfGp_getEvent().reset();
#else
dComIfGp_event_reset();
#endif
dStage_changeScene(getSceneNo(), 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1);
}
switch (*cut_name) {
case '0001':
case '0002':
dComIfGp_evmng_cutEnd(cut_index);
eventManager.cutEnd(cut_index);
break;
default:
JUT_ASSERT(154, FALSE);
break;
}
if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1) {
if (dComIfGp_evmng_endCheck(mEventID)) {
if (eventManager.endCheck(mEventID)) {
mEventID = -1;
}
}
}
} else {
if (daPy_getPlayerActorClass()->checkPriActorOwn(this)) {
JUT_ASSERT(169, NULL != dComIfGp_getAttention());
for (int i = 0; i < dComIfGp_getAttention()->GetActionCount(); i++) {
if (dComIfGp_getAttention()->ActionTarget(i) == this) {
if (dComIfGp_getAttention()->getActionBtnB() != NULL &&
dComIfGp_getAttention()->getActionBtnB()->mType == 4)
dComIfGp_getAttention()->getActionBtnB()->mType == fopAc_attn_CARRY_e)
{
dComIfGp_setDoStatusForce(7, 0);
}
@ -189,7 +208,7 @@ int daTagLv8Gate_c::execute() {
if (fopAcM_checkCarryNow(this)) {
fopAcM_cancelCarryNow(this);
attention_info.flags &= ~fopAc_AttnFlag_CARRY_e;
cLib_offBit<u32>(attention_info.flags, fopAc_AttnFlag_CARRY_e);
eventInfo.setArchiveName(l_arcName);
dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName());
mEventID = dComIfGp_getEventManager().getEventIdx(this, "LV8_GATE_ENTRY", -1);

View File

@ -1902,15 +1902,18 @@ void vrkumo_move() {
}
for (int i = 0; i < 100; i++) {
s16 sp8;
f32 sp34;
f32 var_f31;
switch (vrkumo_packet->mVrkumoEff[i].mStatus) {
case 0:
s16 sp8 = cM_rndF(65535.0f);
f32 sp34 = cM_rndF(18000.0f);
sp8 = cM_rndF(65535.0f);
sp34 = cM_rndF(18000.0f);
if (sp34 > 15000.0f) {
sp34 = 14000.0 + cM_rndF(1000.0f);
}
f32 var_f31 = sp34 * cM_ssin(sp8);
var_f31 = sp34 * cM_ssin(sp8);
// @bug - parenthesis should not be on the condition
if ((f32)fabs(var_f31 < 5000.0f)) {
if (var_f31 > 0.0f) {
@ -4577,7 +4580,6 @@ inline float cosf(float x) {
}
/* 8006A090-8006B190 0649D0 1100+00 0/0 1/1 0/0 .text drawVrkumo__FPA4_fR8_GXColorPPUc */
// NONMATCHING - regalloc, j/k getting put in too low of registers?
void drawVrkumo(Mtx drawMtx, GXColor& color, u8** tex) {
dKankyo_sun_Packet* sun_packet = g_env_light.mpSunPacket;
dScnKy_env_light_c* envlight = dKy_getEnvlight();

View File

@ -38,7 +38,6 @@ void dNpcLib_lookat_c::init(J3DModel* i_mdl_p, int* param_1, csXyz* param_2, csX
void dNpcLib_lookat_c::action(cXyz param_0, cXyz param_1, fopAc_ac_c* param_2, Mtx param_3,
int param_4) {
cXyz sp90;
int i;
Mtx spA0;
cMtx_copy(param_3, spA0);

View File

@ -106,7 +106,7 @@ void dOvlpFd2_dlst_c::draw() {
/* 80252990-802529F4 24D2D0 0064+00 1/1 0/0 0/0 .text __ct__10dOvlpFd2_cFv */
dOvlpFd2_c::dOvlpFd2_c() {
setExecute(&execFirstSnap);
setExecute(&dOvlpFd2_c::execFirstSnap);
dComIfGp_2dShowOff();
mTimer = 2;
}
@ -115,7 +115,7 @@ dOvlpFd2_c::dOvlpFd2_c() {
void dOvlpFd2_c::execFirstSnap() {
if (field_0x11c != 0) {
if (cLib_calcTimer<s8>(&mTimer) == 0) {
setExecute(&execFadeOut);
setExecute(&dOvlpFd2_c::execFadeOut);
fopOvlpM_Done(this);
mTimer = -12;
}
@ -138,7 +138,7 @@ void dOvlpFd2_c::execFadeOut() {
if (mTimer == 0) {
if (fopOvlpM_IsOutReq(this)) {
fopOvlpM_SceneIsStart();
setExecute(&execNextSnap);
setExecute(&dOvlpFd2_c::execNextSnap);
field_0x110 = -0x4000;
mTimer = 15;
}
@ -154,7 +154,7 @@ void dOvlpFd2_c::execFadeOut() {
cLib_calcTimer<s8>(&mTimer);
}
field_0x114 += TREG_S(0) + 0x800;
field_0x114 += (s16)(TREG_S(0) + 0x800);
cLib_addCalc2(&field_0x118, TREG_F(1) + 1.0f, 1.0f, TREG_F(2) + 0.05f);
}
@ -167,7 +167,7 @@ void dOvlpFd2_c::execNextSnap() {
dComIfGp_setWindowNum(1);
dComIfGp_2dShowOff();
setExecute(&execFadeIn);
setExecute(&dOvlpFd2_c::execFadeIn);
}
}
}

View File

@ -115,7 +115,7 @@ void dOvlpFd3_dlst_c::draw() {
/* 8025343C-80253518 24DD7C 00DC+00 1/1 0/0 0/0 .text __ct__10dOvlpFd3_cFv */
dOvlpFd3_c::dOvlpFd3_c() {
setExecute(&execFirstSnap);
setExecute(&dOvlpFd3_c::execFirstSnap);
dComIfGp_2dShowOff();
mTimer = 2;
@ -132,7 +132,7 @@ dOvlpFd3_c::dOvlpFd3_c() {
void dOvlpFd3_c::execFirstSnap() {
if (cLib_calcTimer(&field_0x11f) == 0 && field_0x11c != 0) {
if (cLib_calcTimer(&mTimer) == 0) {
setExecute(&execFadeOut);
setExecute(&dOvlpFd3_c::execFadeOut);
fopOvlpM_Done(this);
mTimer = 0xFF;
}
@ -148,7 +148,7 @@ void dOvlpFd3_c::execFadeOut() {
if (mTimer == 0) {
if (fopOvlpM_IsOutReq(this)) {
fopOvlpM_SceneIsStart();
setExecute(&execNextSnap);
setExecute(&dOvlpFd3_c::execNextSnap);
field_0x110 = -0x4000;
mTimer = 1;
}
@ -173,7 +173,7 @@ void dOvlpFd3_c::execNextSnap() {
field_0x110 += field_0x112;
dComIfGp_setWindowNum(1);
setExecute(&execFadeIn);
setExecute(&dOvlpFd3_c::execFadeIn);
}
}
}

View File

@ -1176,20 +1176,23 @@ int mDoExt_McaMorf::create(J3DModelData* modelData, mDoExt_McaMorfCallBack1_c* c
if (!mpQuat) {
goto cleanup;
}
J3DTransformInfo* info = mpTransformInfo;
Quaternion* quat = mpQuat;
J3DModelData* r23 = mpModel->getModelData();
u16 jointNum = r23->getJointNum();
for (int i = 0; i < jointNum; i++) {
J3DJoint* joint = r23->getJointNodePointer(i);
*info = joint->getTransformInfo();
JMAEulerToQuat(info->mRotation.x, info->mRotation.y, info->mRotation.z, quat);
info++;
quat++;
{
J3DTransformInfo* info = mpTransformInfo;
Quaternion* quat = mpQuat;
J3DModelData* r23 = mpModel->getModelData();
int jointNum = r23->getJointNum();
for (int i = 0; i < jointNum; i++) {
J3DJoint* joint = r23->getJointNodePointer(i);
J3DTransformInfo& transInfo = joint->getTransformInfo();
*info = transInfo;
JMAEulerToQuat(info->mRotation.x, info->mRotation.y, info->mRotation.z, quat);
info++;
quat++;
}
mpCallback1 = callback1;
mpCallback2 = callback2;
return 1;
}
mpCallback1 = callback1;
mpCallback2 = callback2;
return 1;
cleanup:
if (mpSound) {
mpSound->stopAnime();
@ -1351,7 +1354,7 @@ void mDoExt_McaMorf::modelCalc() {
mpAnm->setFrame(mFrameCtrl.getFrame());
}
mpModel->getModelData()->getJointNodePointer(0)->setMtxCalc((J3DMtxCalc*)this);
mpModel->getModelData()->getJointNodePointer(0)->setMtxCalc(this);
mpModel->calc();
}
}
@ -1441,17 +1444,19 @@ int mDoExt_McaMorfSO::create(J3DModelData* i_modelData, mDoExt_McaMorfCallBack1_
mpQuat = new Quaternion[i_modelData->getJointNum()];
if (mpQuat != NULL) {
J3DTransformInfo* transInfo = mpTransformInfo;
J3DTransformInfo* transInfo_p = mpTransformInfo;
Quaternion* quat = mpQuat;
J3DModelData* modelData = mpModel->getModelData();
u16 jointNum = modelData->getJointNum();
int jointNum = modelData->getJointNum();
for (int i = 0; i < jointNum; i++) {
*transInfo = modelData->getJointNodePointer(i)->getTransformInfo();
JMAEulerToQuat(transInfo->mRotation.x, transInfo->mRotation.y,
transInfo->mRotation.z, quat);
J3DJoint* joint = modelData->getJointNodePointer(i);
J3DTransformInfo& transInfo = joint->getTransformInfo();;
*transInfo_p = transInfo;
JMAEulerToQuat(transInfo_p->mRotation.x, transInfo_p->mRotation.y,
transInfo_p->mRotation.z, quat);
transInfo++;
transInfo_p++;
quat++;
}
@ -1633,7 +1638,7 @@ void mDoExt_McaMorfSO::updateDL() {
mpAnm->setFrame(mFrameCtrl.getFrame());
}
mpModel->getModelData()->getJointNodePointer(0)->setMtxCalc((J3DMtxCalc*)this);
mpModel->getModelData()->getJointNodePointer(0)->setMtxCalc(this);
mDoExt_modelUpdateDL(mpModel);
mPrevMorf = mCurMorf;
}
@ -1655,7 +1660,7 @@ void mDoExt_McaMorfSO::modelCalc() {
mpAnm->setFrame(mFrameCtrl.getFrame());
}
mpModel->getModelData()->getJointNodePointer(0)->setMtxCalc((J3DMtxCalc*)this);
mpModel->getModelData()->getJointNodePointer(0)->setMtxCalc(this);
mpModel->calc();
}
}
@ -2058,7 +2063,7 @@ void mDoExt_McaMorf2::modelCalc() {
field_0x40->setFrame(mFrameCtrl.getFrame());
}
mpModel->getModelData()->getJointNodePointer(0)->setMtxCalc((J3DMtxCalc*)this);
mpModel->getModelData()->getJointNodePointer(0)->setMtxCalc(this);
mpModel->calc();
}
}