mirror of https://github.com/zeldaret/mm.git
Match 9 Various NON_MATCHING functions (#811)
* Match func_80A3C8D8 (obj_vspinyroll OK) * `EnHorse_Update` OK * Match EnHorse_Init & EnHorse_FleePlayer (en_horse OK) * Fake match func_80BF43FC (en_rg OK) * func_80A66930 + func_80A671E0 (obj_driftice OK) * Match func_80940588 (goroiwa OK) * Match func_80ABBFC0 (@anon) Co-authored-by: hensldm <https://github.com/hensldm> * PR Suggestions * PR suggestions
This commit is contained in:
parent
0fb3fb8634
commit
9fcf1bd55b
24
spec
24
spec
|
|
@ -821,11 +821,7 @@ beginseg
|
|||
name "ovl_En_Horse"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Horse/z_en_horse.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_En_Horse/ovl_En_Horse_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_En_Horse/ovl_En_Horse.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
@ -1501,11 +1497,7 @@ beginseg
|
|||
name "ovl_En_Goroiwa"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_En_Goroiwa/ovl_En_Goroiwa_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_En_Goroiwa/ovl_En_Goroiwa.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
@ -2765,11 +2757,7 @@ beginseg
|
|||
name "ovl_Obj_Vspinyroll"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_Obj_Vspinyroll/ovl_Obj_Vspinyroll_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_Obj_Vspinyroll/ovl_Obj_Vspinyroll.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
@ -3001,11 +2989,7 @@ beginseg
|
|||
name "ovl_Obj_Driftice"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_Obj_Driftice/ovl_Obj_Driftice_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_Obj_Driftice/ovl_Obj_Driftice.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
@ -3287,11 +3271,7 @@ beginseg
|
|||
name "ovl_Bg_Hakugin_Bombwall"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/ovl_Bg_Hakugin_Bombwall_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_Bg_Hakugin_Bombwall/ovl_Bg_Hakugin_Bombwall.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
@ -4878,11 +4858,7 @@ beginseg
|
|||
name "ovl_En_Rg"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Rg/z_en_rg.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_En_Rg/ovl_En_Rg_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_En_Rg/ovl_En_Rg.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
|||
|
|
@ -121,10 +121,8 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Breaks relocs
|
||||
void func_80ABBFC0(BgHakuginBombwall* this, GlobalContext* globalCtx) {
|
||||
s32 temp;
|
||||
f32 temp;
|
||||
Vec3f spF0;
|
||||
Vec3f spE4;
|
||||
Vec3f spD8;
|
||||
|
|
@ -138,13 +136,13 @@ void func_80ABBFC0(BgHakuginBombwall* this, GlobalContext* globalCtx) {
|
|||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
temp = i + 1;
|
||||
temp = (i + 1) * (80.0f / 3.0f);
|
||||
for (j = 0; j < ARRAY_COUNT(D_80ABD020); j++) {
|
||||
spD8.x = D_80ABD020[j] + (s32)((u32)Rand_Next() >> 0x1C);
|
||||
spD8.y = ((Rand_ZeroOne() - 0.5f) * 15.0f) + (temp * 26.666666f);
|
||||
spD8.y = ((Rand_ZeroOne() - 0.5f) * 15.0f) + temp;
|
||||
spD8.z = (Rand_ZeroOne() * 20.0f) - 10.0f;
|
||||
|
||||
spCC.x = ((Rand_ZeroOne() - 0.5f) * 7.0f) + (spD8.x * 0.07777778f);
|
||||
spCC.x = ((Rand_ZeroOne() - 0.5f) * 7.0f) + (spD8.x * (7.0f / 90.0f));
|
||||
spCC.y = (Rand_ZeroOne() * 7.0f) - 2.0f;
|
||||
spCC.z = spD8.z * 0.3f;
|
||||
|
||||
|
|
@ -176,9 +174,6 @@ void func_80ABBFC0(BgHakuginBombwall* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Hakugin_Bombwall/func_80ABBFC0.s")
|
||||
#endif
|
||||
|
||||
void func_80ABC2E0(BgHakuginBombwall* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ void Boss06_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
u16 pad;
|
||||
u8 spD3;
|
||||
u8 spD2;
|
||||
s32 maxColor = 255; // Possible FAKE MATCH
|
||||
s32 maxColor = 255; //! FAKE:
|
||||
f32 sp68;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
|
|
|||
|
|
@ -603,7 +603,7 @@ void EnFsn_UpdateCursorAnim(EnFsn* this) {
|
|||
void EnFsn_UpdateStickDirectionPromptAnim(EnFsn* this) {
|
||||
f32 arrowAnimTween = this->arrowAnimTween;
|
||||
f32 stickAnimTween = this->stickAnimTween;
|
||||
s32 maxColor = 255; // POSSIBLY FAKE
|
||||
s32 maxColor = 255; //! FAKE:
|
||||
|
||||
if (this->arrowAnimState == 0) {
|
||||
arrowAnimTween += 0.05f;
|
||||
|
|
|
|||
|
|
@ -739,24 +739,22 @@ void func_80940090(EnGoroiwa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Stack
|
||||
void func_80940588(GlobalContext* globalCtx, Vec3f* arg1, Gfx* arg2[], Color_RGBA8* arg3, Color_RGBA8* arg4, f32 arg5) {
|
||||
Gfx* phi_s7;
|
||||
Vec3f sp100;
|
||||
Vec3f spF4;
|
||||
Vec3f spE8;
|
||||
f32 temp_f20;
|
||||
s32 phi_fp;
|
||||
f32 spB0;
|
||||
s32 j;
|
||||
s32 i;
|
||||
s32 phi_s0;
|
||||
s32 spD0;
|
||||
s16 spCE;
|
||||
s16 spC8;
|
||||
f32 spB0;
|
||||
f32 spAC;
|
||||
s16 spA8;
|
||||
s16 phi_fp;
|
||||
s16 spC8;
|
||||
f32 spAC;
|
||||
|
||||
spD0 = (s32)(arg5 * 35.0f) + 6;
|
||||
temp_f20 = (arg5 + 0.1f) * 0.5f;
|
||||
|
|
@ -815,10 +813,6 @@ void func_80940588(GlobalContext* globalCtx, Vec3f* arg1, Gfx* arg2[], Color_RGB
|
|||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
void func_80940588(GlobalContext* globalCtx, Vec3f* arg1, Gfx* arg2[], Color_RGBA8* arg3, Color_RGBA8* arg4, f32 arg5);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Goroiwa/func_80940588.s")
|
||||
#endif
|
||||
|
||||
void func_80940A1C(GlobalContext* globalCtx, Vec3f* arg1, Gfx** arg2, Color_RGBA8* arg3, Color_RGBA8* arg4, f32 arg5) {
|
||||
s32 i;
|
||||
|
|
|
|||
|
|
@ -673,16 +673,16 @@ void func_8087C9F8(EnHorse* this) {
|
|||
void func_8087CA04(EnHorse* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
EnHorse* this = THIS;
|
||||
Skin* skin = &this->skin;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
EnHorse_ClearDustFlags(&this->dustFlags);
|
||||
D_801BDAA4 = 0;
|
||||
Skin_Setup(&this->skin);
|
||||
this->riderPos = this->actor.world.pos;
|
||||
this->riderPos = thisx->world.pos;
|
||||
this->unk_52C = 0;
|
||||
this->noInputTimer = 0;
|
||||
this->riderPos.y += 70.0f;
|
||||
|
|
@ -702,19 +702,19 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
return;
|
||||
}
|
||||
this->unk_1EC |= 1;
|
||||
this->actor.update = func_8087D540;
|
||||
thisx->update = func_8087D540;
|
||||
} else if (ENHORSE_GET_4000(&this->actor)) {
|
||||
this->type = HORSE_2;
|
||||
this->unk_528 = 64.8f;
|
||||
this->boostSpeed = 15;
|
||||
if ((this->bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_HORSE_LINK_CHILD)) < 0) {
|
||||
this->actor.objBankIndex = Object_Spawn(&globalCtx->objectCtx, OBJECT_HORSE_LINK_CHILD);
|
||||
thisx->objBankIndex = Object_Spawn(&globalCtx->objectCtx, OBJECT_HORSE_LINK_CHILD);
|
||||
Actor_SetObjectDependency(globalCtx, &this->actor);
|
||||
Skin_Init(&globalCtx->state, &this->skin, sSkeletonHeaders[this->type], sAnimationHeaders[this->type][0]);
|
||||
Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]);
|
||||
this->unk_1EC |= 0x200;
|
||||
} else {
|
||||
this->actor.update = func_8087D540;
|
||||
thisx->update = func_8087D540;
|
||||
}
|
||||
} else if (ENHORSE_GET_2000(&this->actor)) {
|
||||
this->type = HORSE_3;
|
||||
|
|
@ -724,46 +724,46 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
return;
|
||||
}
|
||||
this->unk_1EC |= 1;
|
||||
this->actor.update = func_8087D540;
|
||||
thisx->update = func_8087D540;
|
||||
} else {
|
||||
this->type = HORSE_EPONA;
|
||||
this->boostSpeed = 15;
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
|
||||
this->actor.params &= ~0xE000;
|
||||
if (this->actor.params == 0x1FFF) {
|
||||
this->actor.params = ENHORSE_1;
|
||||
thisx->params &= ~0xE000;
|
||||
if (thisx->params == 0x1FFF) {
|
||||
thisx->params = ENHORSE_1;
|
||||
}
|
||||
|
||||
if (this->actor.params == ENHORSE_3) {
|
||||
if (thisx->params == ENHORSE_3) {
|
||||
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP | ENHORSE_UNRIDEABLE;
|
||||
} else if (this->actor.params == ENHORSE_8) {
|
||||
} else if (thisx->params == ENHORSE_8) {
|
||||
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP;
|
||||
if (CHECK_QUEST_ITEM(14)) {
|
||||
this->stateFlags &= ~ENHORSE_CANT_JUMP;
|
||||
this->stateFlags |= ENHORSE_FLAG_26;
|
||||
}
|
||||
} else if (this->actor.params == ENHORSE_13) {
|
||||
} else if (thisx->params == ENHORSE_13) {
|
||||
this->stateFlags = ENHORSE_FLAG_29;
|
||||
this->unk_1EC |= 0x10;
|
||||
} else if (this->actor.params == ENHORSE_4) {
|
||||
} else if (thisx->params == ENHORSE_4) {
|
||||
this->stateFlags = ENHORSE_FLAG_29 | ENHORSE_CANT_JUMP;
|
||||
this->actor.flags |= ACTOR_FLAG_80000000;
|
||||
} else if (this->actor.params == ENHORSE_5) {
|
||||
thisx->flags |= ACTOR_FLAG_80000000;
|
||||
} else if (thisx->params == ENHORSE_5) {
|
||||
this->stateFlags = ENHORSE_FLAG_29 | ENHORSE_CANT_JUMP;
|
||||
this->actor.flags |= ACTOR_FLAG_80000000;
|
||||
} else if (this->actor.params == ENHORSE_15) {
|
||||
thisx->flags |= ACTOR_FLAG_80000000;
|
||||
} else if (thisx->params == ENHORSE_15) {
|
||||
this->stateFlags = ENHORSE_UNRIDEABLE | ENHORSE_FLAG_7;
|
||||
} else if (this->actor.params == ENHORSE_17) {
|
||||
} else if (thisx->params == ENHORSE_17) {
|
||||
this->stateFlags = 0;
|
||||
this->unk_1EC |= 8;
|
||||
} else if (this->actor.params == ENHORSE_18) {
|
||||
} else if (thisx->params == ENHORSE_18) {
|
||||
this->stateFlags = ENHORSE_FLAG_29 | ENHORSE_CANT_JUMP;
|
||||
this->actor.flags |= ACTOR_FLAG_80000000;
|
||||
} else if (this->actor.params == ENHORSE_1) {
|
||||
thisx->flags |= ACTOR_FLAG_80000000;
|
||||
} else if (thisx->params == ENHORSE_1) {
|
||||
this->stateFlags = ENHORSE_FLAG_7;
|
||||
} else if ((this->actor.params == ENHORSE_19) || (this->actor.params == ENHORSE_20)) {
|
||||
} else if ((thisx->params == ENHORSE_19) || (thisx->params == ENHORSE_20)) {
|
||||
this->stateFlags = ENHORSE_CANT_JUMP | ENHORSE_UNRIDEABLE;
|
||||
} else {
|
||||
this->stateFlags = 0;
|
||||
|
|
@ -774,10 +774,10 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->stateFlags |= ENHORSE_FLAG_25;
|
||||
}
|
||||
|
||||
this->actor.gravity = -3.5f;
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawHorse, 20.0f);
|
||||
thisx->gravity = -3.5f;
|
||||
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawHorse, 20.0f);
|
||||
this->action = ENHORSE_ACT_IDLE;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
thisx->speedXZ = 0.0f;
|
||||
|
||||
if (this->type == HORSE_2) {
|
||||
sJntSphInit.elements[0].dim.limb = 13;
|
||||
|
|
@ -800,7 +800,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->colliderCylinder1.dim.radius = 50;
|
||||
}
|
||||
|
||||
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
CollisionCheck_SetInfo(&thisx->colChkInfo, NULL, &sColChkInfoInit);
|
||||
|
||||
if (this->type == HORSE_2) {
|
||||
Actor_SetScale(&this->actor, 0.00648f);
|
||||
|
|
@ -810,11 +810,11 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_SetScale(&this->actor, 0.01f);
|
||||
}
|
||||
|
||||
this->actor.focus.pos = this->actor.world.pos;
|
||||
thisx->focus.pos = thisx->world.pos;
|
||||
this->playerControlled = false;
|
||||
this->actor.focus.pos.y += 70.0f;
|
||||
thisx->focus.pos.y += 70.0f;
|
||||
|
||||
if (!(this->unk_1EC & 1) && !(this->unk_1EC & 0x200) && (this->actor.update == EnHorse_Update)) {
|
||||
if (!(this->unk_1EC & 1) && !(this->unk_1EC & 0x200) && (thisx->update == EnHorse_Update)) {
|
||||
Skin_Init(&globalCtx->state, &this->skin, sSkeletonHeaders[this->type], sAnimationHeaders[this->type][0]);
|
||||
}
|
||||
|
||||
|
|
@ -828,71 +828,69 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
EnHorse_ResetRace(this, globalCtx);
|
||||
EnHorse_ResetHorsebackArchery(this, globalCtx);
|
||||
|
||||
if (this->actor.params == ENHORSE_2) {
|
||||
if (thisx->params == ENHORSE_2) {
|
||||
this->unk_53C = 0;
|
||||
EnHorse_InitInactive(this);
|
||||
} else if (this->actor.params == ENHORSE_3) {
|
||||
} else if (thisx->params == ENHORSE_3) {
|
||||
EnHorse_InitIngoHorse(this);
|
||||
this->rider = (EnIn*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_IN, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x,
|
||||
this->actor.shape.rot.y, 1, 1);
|
||||
this->rider =
|
||||
(EnIn*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_IN, thisx->world.pos.x, thisx->world.pos.y,
|
||||
thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, 1, 1);
|
||||
this->unk_398 = 14.34f;
|
||||
} else if (this->actor.params == ENHORSE_4) {
|
||||
} else if (thisx->params == ENHORSE_4) {
|
||||
func_80881634(this);
|
||||
this->unk_398 = 14.34f;
|
||||
this->rider = (EnIn*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_IN, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x,
|
||||
this->actor.shape.rot.y, 1, 1);
|
||||
this->rider =
|
||||
(EnIn*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_IN, thisx->world.pos.x, thisx->world.pos.y,
|
||||
thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, 1, 1);
|
||||
this->unk_1EC |= 0x100;
|
||||
} else if (this->actor.params == ENHORSE_5) {
|
||||
} else if (thisx->params == ENHORSE_5) {
|
||||
func_80881634(this);
|
||||
this->unk_398 = 14.525f;
|
||||
this->rider = (EnIn*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_IN, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x,
|
||||
this->actor.shape.rot.y, 1, 2);
|
||||
this->rider =
|
||||
(EnIn*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_IN, thisx->world.pos.x, thisx->world.pos.y,
|
||||
thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, 1, 2);
|
||||
this->unk_1EC |= 0x100;
|
||||
} else if (this->actor.params == ENHORSE_9) {
|
||||
} else if (thisx->params == ENHORSE_9) {
|
||||
EnHorse_InitCutscene(this, globalCtx);
|
||||
} else if (this->actor.params == ENHORSE_10) {
|
||||
} else if (thisx->params == ENHORSE_10) {
|
||||
EnHorse_InitHorsebackArchery(this);
|
||||
func_80112AFC(globalCtx);
|
||||
} else if (this->actor.params == ENHORSE_14) {
|
||||
} else if (thisx->params == ENHORSE_14) {
|
||||
func_808846F0(this, globalCtx);
|
||||
if ((globalCtx->sceneNum == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(globalCtx)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
} else if (this->actor.params == ENHORSE_16) {
|
||||
} else if (thisx->params == ENHORSE_16) {
|
||||
func_8087C9F8(this);
|
||||
} else if (this->actor.params == ENHORSE_15) {
|
||||
} else if (thisx->params == ENHORSE_15) {
|
||||
EnHorse_ResetIdleAnimation(this);
|
||||
} else if (this->actor.params == ENHORSE_18) {
|
||||
} else if (thisx->params == ENHORSE_18) {
|
||||
func_80884994(this);
|
||||
} else if (this->actor.params == ENHORSE_19) {
|
||||
} else if (thisx->params == ENHORSE_19) {
|
||||
EnIn* in;
|
||||
|
||||
func_80884D04(this, globalCtx);
|
||||
in = (EnIn*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_IN, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x,
|
||||
this->actor.shape.rot.y, 1, 1);
|
||||
in = (EnIn*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_IN, thisx->world.pos.x, thisx->world.pos.y,
|
||||
thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, 1, 1);
|
||||
this->rider = in;
|
||||
in->unk4AC |= (0x20 | 0x4);
|
||||
} else if (this->actor.params == ENHORSE_20) {
|
||||
} else if (thisx->params == ENHORSE_20) {
|
||||
EnIn* in;
|
||||
|
||||
func_80884D04(this, globalCtx);
|
||||
in = (EnIn*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_IN, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x,
|
||||
this->actor.shape.rot.y, 1, 1);
|
||||
in = (EnIn*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_IN, thisx->world.pos.x, thisx->world.pos.y,
|
||||
thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, 1, 1);
|
||||
this->rider = in;
|
||||
in->unk4AC |= (0x20 | 0x8 | 0x4);
|
||||
} else {
|
||||
EnHorse_StartIdleRidable(this);
|
||||
}
|
||||
|
||||
this->actor.shape.rot.z = 0;
|
||||
this->actor.world.rot.z = this->actor.shape.rot.z;
|
||||
this->actor.home.rot.z = this->actor.shape.rot.z;
|
||||
this->unk_3EC = this->actor.world.rot.y;
|
||||
thisx->shape.rot.z = 0;
|
||||
thisx->world.rot.z = thisx->shape.rot.z;
|
||||
thisx->home.rot.z = thisx->shape.rot.z;
|
||||
this->unk_3EC = thisx->world.rot.y;
|
||||
this->unk_538 = 0;
|
||||
|
||||
if (this->unk_1EC & 0x100) {
|
||||
|
|
@ -906,9 +904,6 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->colliderCylinder2.info.bumper.dmgFlags = 0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Horse/EnHorse_Init.s")
|
||||
#endif
|
||||
|
||||
void func_8087D540(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnHorse* this = THIS;
|
||||
|
|
@ -2952,13 +2947,12 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void EnHorse_FleePlayer(EnHorse* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
f32 distToHome;
|
||||
f32 playerDistToHome;
|
||||
f32 distToPlayer;
|
||||
s32 nextAnim;
|
||||
s32 nextAnim = this->animationIdx;
|
||||
s32 animFinished;
|
||||
s16 yaw;
|
||||
|
||||
|
|
@ -3098,10 +3092,6 @@ void EnHorse_FleePlayer(EnHorse* this, GlobalContext* globalCtx) {
|
|||
-3.0f);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void EnHorse_FleePlayer(EnHorse* this, GlobalContext* globalCtx);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Horse/EnHorse_FleePlayer.s")
|
||||
#endif
|
||||
|
||||
void func_80883B70(EnHorse* this, CsCmdActorAction* action) {
|
||||
this->actor.world.pos.x = action->startPos.x;
|
||||
|
|
@ -4156,37 +4146,36 @@ s32 EnHorse_RandInt(f32 arg0) {
|
|||
return Rand_ZeroOne() * arg0;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static EnHorseActionFunc sActionFuncs[] = {
|
||||
EnHorse_Frozen,
|
||||
EnHorse_Inactive,
|
||||
EnHorse_Idle,
|
||||
EnHorse_FollowPlayer,
|
||||
EnHorse_UpdateIngoRace,
|
||||
func_808819D8,
|
||||
func_80881398,
|
||||
EnHorse_MountedIdle,
|
||||
EnHorse_MountedIdleWhinneying,
|
||||
EnHorse_MountedTurn,
|
||||
EnHorse_MountedWalk,
|
||||
EnHorse_MountedTrot,
|
||||
EnHorse_MountedGallop,
|
||||
EnHorse_MountedRearing,
|
||||
EnHorse_Stopping,
|
||||
EnHorse_Reverse,
|
||||
EnHorse_LowJump,
|
||||
EnHorse_HighJump,
|
||||
EnHorse_CutsceneUpdate,
|
||||
EnHorse_UpdateHorsebackArchery,
|
||||
EnHorse_FleePlayer,
|
||||
func_80884718,
|
||||
func_8087CA04,
|
||||
func_808848C8,
|
||||
func_80884A40,
|
||||
func_80884E0C,
|
||||
};
|
||||
s32 pad;
|
||||
static EnHorseActionFunc sActionFuncs[] = {
|
||||
EnHorse_Frozen,
|
||||
EnHorse_Inactive,
|
||||
EnHorse_Idle,
|
||||
EnHorse_FollowPlayer,
|
||||
EnHorse_UpdateIngoRace,
|
||||
func_808819D8,
|
||||
func_80881398,
|
||||
EnHorse_MountedIdle,
|
||||
EnHorse_MountedIdleWhinneying,
|
||||
EnHorse_MountedTurn,
|
||||
EnHorse_MountedWalk,
|
||||
EnHorse_MountedTrot,
|
||||
EnHorse_MountedGallop,
|
||||
EnHorse_MountedRearing,
|
||||
EnHorse_Stopping,
|
||||
EnHorse_Reverse,
|
||||
EnHorse_LowJump,
|
||||
EnHorse_HighJump,
|
||||
EnHorse_CutsceneUpdate,
|
||||
EnHorse_UpdateHorsebackArchery,
|
||||
EnHorse_FleePlayer,
|
||||
func_80884718,
|
||||
func_8087CA04,
|
||||
func_808848C8,
|
||||
func_80884A40,
|
||||
func_80884E0C,
|
||||
};
|
||||
void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
EnHorse* this = THIS;
|
||||
Vec3f dustAcc = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f dustVel = { 0.0f, 1.0f, 0.0f };
|
||||
|
|
@ -4200,7 +4189,7 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_SetScale(&this->actor, 0.01f);
|
||||
}
|
||||
|
||||
this->lastYaw = this->actor.shape.rot.y;
|
||||
this->lastYaw = thisx->shape.rot.y;
|
||||
EnHorse_UpdateStick(this, globalCtx);
|
||||
EnHorse_UpdatePlayerDir(this, globalCtx);
|
||||
|
||||
|
|
@ -4222,13 +4211,13 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
sActionFuncs[this->action](this, globalCtx);
|
||||
|
||||
this->stateFlags &= ~ENHORSE_OBSTACLE;
|
||||
this->unk_3EC = this->actor.world.rot.y;
|
||||
this->unk_3EC = thisx->world.rot.y;
|
||||
if ((this->animationIdx == ENHORSE_ANIM_STOPPING) || (this->animationIdx == ENHORSE_ANIM_REARING)) {
|
||||
this->skin.skelAnime.jointTable[0].y += 0x154;
|
||||
}
|
||||
|
||||
this->curFrame = this->skin.skelAnime.curFrame;
|
||||
this->lastPos = this->actor.world.pos;
|
||||
this->lastPos = thisx->world.pos;
|
||||
|
||||
if (!(this->stateFlags & ENHORSE_INACTIVE)) {
|
||||
if ((this->action == ENHORSE_ACT_STOPPING) || (this->action == ENHORSE_ACT_MOUNTED_REARING) ||
|
||||
|
|
@ -4241,7 +4230,7 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (ActorCutscene_GetCurrentIndex() != -1) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
thisx->speedXZ = 0.0f;
|
||||
}
|
||||
|
||||
if (this->action != ENHORSE_ACT_25) {
|
||||
|
|
@ -4251,11 +4240,11 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->rider != NULL) {
|
||||
if ((this->action == ENHORSE_ACT_INGO_RACE) || (this->action == ENHORSE_ACT_MOUNTED_IDLE) ||
|
||||
(this->action == ENHORSE_ACT_25)) {
|
||||
this->rider->actor.world.pos.x = this->actor.world.pos.x;
|
||||
this->rider->actor.world.pos.y = this->actor.world.pos.y + 10.0f;
|
||||
this->rider->actor.world.pos.z = this->actor.world.pos.z;
|
||||
this->rider->actor.shape.rot.x = this->actor.shape.rot.x;
|
||||
this->rider->actor.shape.rot.y = this->actor.shape.rot.y;
|
||||
this->rider->actor.world.pos.x = thisx->world.pos.x;
|
||||
this->rider->actor.world.pos.y = thisx->world.pos.y + 10.0f;
|
||||
this->rider->actor.world.pos.z = thisx->world.pos.z;
|
||||
this->rider->actor.shape.rot.x = thisx->shape.rot.x;
|
||||
this->rider->actor.shape.rot.y = thisx->shape.rot.y;
|
||||
} else if (this->action == ENHORSE_ACT_MOUNTED_IDLE_WHINNEYING) {
|
||||
EnIn* in = this->rider;
|
||||
s16 jnt = in->jointTable[0].y;
|
||||
|
|
@ -4263,14 +4252,14 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
in->actor.world.pos.x = this->riderPos.x;
|
||||
in->actor.world.pos.y = this->riderPos.y - (jnt * 0.01f * this->unk_528 * 0.01f);
|
||||
in->actor.world.pos.z = this->riderPos.z;
|
||||
in->actor.shape.rot.x = this->actor.shape.rot.x;
|
||||
in->actor.shape.rot.y = this->actor.shape.rot.y;
|
||||
in->actor.shape.rot.x = thisx->shape.rot.x;
|
||||
in->actor.shape.rot.y = thisx->shape.rot.y;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->colliderJntSph.elements->info.ocElemFlags & OCELEM_HIT) {
|
||||
if (this->actor.speedXZ > 10.0f) {
|
||||
this->actor.speedXZ -= 1.0f;
|
||||
if (thisx->speedXZ > 10.0f) {
|
||||
thisx->speedXZ -= 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4309,22 +4298,22 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->type == HORSE_2) {
|
||||
this->colliderCylinder1.dim.pos.x =
|
||||
(s16)(Math_SinS(this->actor.shape.rot.y) * 11.0f) + this->colliderCylinder1.dim.pos.x;
|
||||
(s16)(Math_SinS(thisx->shape.rot.y) * 11.0f) + this->colliderCylinder1.dim.pos.x;
|
||||
this->colliderCylinder1.dim.pos.z =
|
||||
(s16)(Math_CosS(this->actor.shape.rot.y) * 11.0f) + this->colliderCylinder1.dim.pos.z;
|
||||
(s16)(Math_CosS(thisx->shape.rot.y) * 11.0f) + this->colliderCylinder1.dim.pos.z;
|
||||
this->colliderCylinder2.dim.pos.x =
|
||||
(s16)(Math_SinS(this->actor.shape.rot.y) * -18.0f) + this->colliderCylinder2.dim.pos.x;
|
||||
(s16)(Math_SinS(thisx->shape.rot.y) * -18.0f) + this->colliderCylinder2.dim.pos.x;
|
||||
this->colliderCylinder2.dim.pos.z =
|
||||
(s16)(Math_CosS(this->actor.shape.rot.y) * -18.0f) + this->colliderCylinder2.dim.pos.z;
|
||||
(s16)(Math_CosS(thisx->shape.rot.y) * -18.0f) + this->colliderCylinder2.dim.pos.z;
|
||||
} else {
|
||||
this->colliderCylinder1.dim.pos.x =
|
||||
(s16)(Math_SinS(this->actor.shape.rot.y) * 6.6000004f) + this->colliderCylinder1.dim.pos.x;
|
||||
(s16)(Math_SinS(thisx->shape.rot.y) * 6.6000004f) + this->colliderCylinder1.dim.pos.x;
|
||||
this->colliderCylinder1.dim.pos.z =
|
||||
(s16)(Math_CosS(this->actor.shape.rot.y) * 6.6000004f) + this->colliderCylinder1.dim.pos.z;
|
||||
(s16)(Math_CosS(thisx->shape.rot.y) * 6.6000004f) + this->colliderCylinder1.dim.pos.z;
|
||||
this->colliderCylinder2.dim.pos.x =
|
||||
(s16)(Math_SinS(this->actor.shape.rot.y) * -10.8f) + this->colliderCylinder2.dim.pos.x;
|
||||
(s16)(Math_SinS(thisx->shape.rot.y) * -10.8f) + this->colliderCylinder2.dim.pos.x;
|
||||
this->colliderCylinder2.dim.pos.z =
|
||||
(s16)(Math_CosS(this->actor.shape.rot.y) * -10.8f) + this->colliderCylinder2.dim.pos.z;
|
||||
(s16)(Math_CosS(thisx->shape.rot.y) * -10.8f) + this->colliderCylinder2.dim.pos.z;
|
||||
}
|
||||
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->colliderCylinder1.base);
|
||||
|
|
@ -4346,18 +4335,18 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
EnHorse_UpdateBgCheckInfo(this, globalCtx);
|
||||
EnHorse_CheckFloors(this, globalCtx);
|
||||
if (this->actor.world.pos.y < this->yFront) {
|
||||
if (this->actor.world.pos.y < this->yBack) {
|
||||
if (thisx->world.pos.y < this->yFront) {
|
||||
if (thisx->world.pos.y < this->yBack) {
|
||||
if (this->yBack < this->yFront) {
|
||||
this->actor.world.pos.y = this->yBack;
|
||||
thisx->world.pos.y = this->yBack;
|
||||
} else {
|
||||
this->actor.world.pos.y = this->yFront;
|
||||
thisx->world.pos.y = this->yFront;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this->actor.focus.pos = this->actor.world.pos;
|
||||
this->actor.focus.pos.y += 70.0f;
|
||||
thisx->focus.pos = thisx->world.pos;
|
||||
thisx->focus.pos.y += 70.0f;
|
||||
|
||||
if ((Rand_ZeroOne() < 0.025f) && (this->blinkTimer == 0)) {
|
||||
this->blinkTimer++;
|
||||
|
|
@ -4368,13 +4357,13 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((this->actor.speedXZ == 0.0f) && !(this->stateFlags & ENHORSE_FLAG_19)) {
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
if ((thisx->speedXZ == 0.0f) && !(this->stateFlags & ENHORSE_FLAG_19)) {
|
||||
thisx->colChkInfo.mass = MASS_IMMOVABLE;
|
||||
} else {
|
||||
this->actor.colChkInfo.mass = MASS_HEAVY;
|
||||
thisx->colChkInfo.mass = MASS_HEAVY;
|
||||
}
|
||||
|
||||
if (this->actor.speedXZ >= 5.0f) {
|
||||
if (thisx->speedXZ >= 5.0f) {
|
||||
this->colliderCylinder1.base.atFlags |= AT_ON;
|
||||
} else {
|
||||
this->colliderCylinder1.base.atFlags &= ~AT_ON;
|
||||
|
|
@ -4400,39 +4389,6 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->stateFlags &= ~ENHORSE_DRAW;
|
||||
}
|
||||
}
|
||||
#else
|
||||
EnHorseActionFunc sActionFuncs[] = {
|
||||
EnHorse_Frozen,
|
||||
EnHorse_Inactive,
|
||||
EnHorse_Idle,
|
||||
EnHorse_FollowPlayer,
|
||||
EnHorse_UpdateIngoRace,
|
||||
func_808819D8,
|
||||
func_80881398,
|
||||
EnHorse_MountedIdle,
|
||||
EnHorse_MountedIdleWhinneying,
|
||||
EnHorse_MountedTurn,
|
||||
EnHorse_MountedWalk,
|
||||
EnHorse_MountedTrot,
|
||||
EnHorse_MountedGallop,
|
||||
EnHorse_MountedRearing,
|
||||
EnHorse_Stopping,
|
||||
EnHorse_Reverse,
|
||||
EnHorse_LowJump,
|
||||
EnHorse_HighJump,
|
||||
EnHorse_CutsceneUpdate,
|
||||
EnHorse_UpdateHorsebackArchery,
|
||||
EnHorse_FleePlayer,
|
||||
func_80884718,
|
||||
func_8087CA04,
|
||||
func_808848C8,
|
||||
func_80884A40,
|
||||
func_80884E0C,
|
||||
};
|
||||
Vec3f D_808891C8 = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f D_808891D4 = { 0.0f, 1.0f, 0.0f };
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Horse/EnHorse_Update.s")
|
||||
#endif
|
||||
|
||||
s32 EnHorse_PlayerDirToMountSide(EnHorse* this, GlobalContext* globalCtx, Player* player) {
|
||||
if (this->playerDir == PLAYER_DIR_SIDE_L) {
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ void EnKakasi_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
i = 0;
|
||||
tempCutscene = this->actor.cutscene;
|
||||
while (tempCutscene != -1) {
|
||||
// This might be a fake match, no others found yet
|
||||
//! FAKE:
|
||||
tempCutscene = ActorCutscene_GetAdditionalCutscene(this->actorCutscenes[i] = tempCutscene);
|
||||
i++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1277,7 +1277,7 @@ void EnOssan_UpdateCursorAnim(EnOssan* this) {
|
|||
void EnOssan_UpdateStickDirectionPromptAnim(EnOssan* this) {
|
||||
f32 arrowAnimTween = this->arrowAnimTween;
|
||||
f32 stickAnimTween = this->stickAnimTween;
|
||||
s32 maxColor = 255; // POSSIBLY FAKE
|
||||
s32 maxColor = 255; //! FAKE:
|
||||
|
||||
if (this->arrowAnimState == 0) {
|
||||
arrowAnimTween += 0.05f;
|
||||
|
|
|
|||
|
|
@ -368,7 +368,6 @@ s32 func_80BF42BC(EnRg* this, f32 arg1) {
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
s32 func_80BF43FC(EnRg* this) {
|
||||
Vec3f sp9C;
|
||||
Vec3f sp90;
|
||||
|
|
@ -378,11 +377,11 @@ s32 func_80BF43FC(EnRg* this) {
|
|||
f32 phi_f20 = 0.0f;
|
||||
s32 temp_s7 = ENRG_GET_7F80(&this->actor);
|
||||
s32 phi_s4 = -1;
|
||||
s16 phi_s6 = 0;
|
||||
s32 temp_s5 = this->unk_344;
|
||||
s16 phi_s6 = 0;
|
||||
s32 phi_s0 = D_80BF57E4[this->unk_344][temp_s7];
|
||||
|
||||
while (true) {
|
||||
do {
|
||||
SubS_CopyPointFromPathCheckBounds(this->path, phi_s0 - 1, &sp9C);
|
||||
SubS_CopyPointFromPathCheckBounds(this->path, phi_s0 + 1, &sp90);
|
||||
if (Math3D_PointDistToLine2D(this->actor.world.pos.x, this->actor.world.pos.z, sp9C.x, sp9C.z, sp90.x, sp90.z,
|
||||
|
|
@ -393,17 +392,10 @@ s32 func_80BF43FC(EnRg* this) {
|
|||
phi_s4 = phi_s0;
|
||||
}
|
||||
phi_s0++;
|
||||
if ((temp_s5 == 18) || (phi_s0 >= D_80BF57E4[temp_s5 + 1][temp_s7])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while ((temp_s5 != 18) && (phi_s0 < D_80BF57E4[temp_s5 + 1][temp_s7]));
|
||||
|
||||
return phi_s4;
|
||||
}
|
||||
#else
|
||||
s32 func_80BF43FC(EnRg* this);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rg/func_80BF43FC.s")
|
||||
#endif
|
||||
|
||||
s32 func_80BF4560(EnRg* this, GlobalContext* globalCtx) {
|
||||
s32 temp_v0 = SurfaceType_GetSceneExitIndex(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
|
|
|
|||
|
|
@ -1191,7 +1191,7 @@ void EnSob1_UpdateCursorAnim(EnSob1* this) {
|
|||
void EnSob1_UpdateStickDirectionPromptAnim(EnSob1* this) {
|
||||
f32 arrowAnimTween = this->arrowAnimTween;
|
||||
f32 stickAnimTween = this->stickAnimTween;
|
||||
s32 maxColor = 255; // POSSIBLY FAKE
|
||||
s32 maxColor = 255; //! FAKE:
|
||||
|
||||
if (this->arrowAnimState == 0) {
|
||||
arrowAnimTween += 0.05f;
|
||||
|
|
|
|||
|
|
@ -1221,7 +1221,7 @@ void EnTrt_UpdateCursorAnim(EnTrt* this) {
|
|||
void EnTrt_UpdateStickDirectionPromptAnim(EnTrt* this) {
|
||||
f32 arrowAnimTween = this->arrowAnimTween;
|
||||
f32 stickAnimTween = this->stickAnimTween;
|
||||
s32 maxColor = 255; // POSSIBLY FAKE
|
||||
s32 maxColor = 255; //! FAKE:
|
||||
|
||||
if (this->arrowAnimState == 0) {
|
||||
arrowAnimTween += 0.05f;
|
||||
|
|
|
|||
|
|
@ -148,7 +148,6 @@ f32 func_80A667F0(ObjDrifticeStruct3* arg0, ObjDriftice* this) {
|
|||
return temp_f20;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void func_80A66930(ObjDrifticeStruct2* arg0, ObjDriftice* this, s16* arg2, s16* arg3) {
|
||||
ObjDrifticeStruct3* temp_s0;
|
||||
f32 temp_f22 = 0.0f;
|
||||
|
|
@ -157,6 +156,7 @@ void func_80A66930(ObjDrifticeStruct2* arg0, ObjDriftice* this, s16* arg2, s16*
|
|||
|
||||
if (this->unk_248 > 0) {
|
||||
f32 temp_f20 = this->dyna.actor.xzDistToPlayer * this->unk_240 * 0.0007075472f;
|
||||
|
||||
if (temp_f20 > 1.0f) {
|
||||
temp_f20 = 1.0f;
|
||||
} else if (temp_f20 < 0.01f) {
|
||||
|
|
@ -195,12 +195,9 @@ void func_80A66930(ObjDrifticeStruct2* arg0, ObjDriftice* this, s16* arg2, s16*
|
|||
|
||||
temp_f22 *= arg0->unk_08;
|
||||
|
||||
*arg2 = (s32)temp_f22 + arg0->unk_00[2];
|
||||
//! FAKE:
|
||||
*arg2 = arg0->unk_00[2] + (s32)((void)0, temp_f22);
|
||||
}
|
||||
#else
|
||||
void func_80A66930(ObjDrifticeStruct2* arg0, ObjDriftice* this, s16* arg2, s16* arg3);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Driftice/func_80A66930.s")
|
||||
#endif
|
||||
|
||||
void func_80A66C4C(ObjDrifticeStruct4* arg0, ObjDriftice* this, s16* arg2, s16* arg3) {
|
||||
ObjDrifticeStruct3* temp_s0;
|
||||
|
|
@ -340,8 +337,6 @@ void func_80A671CC(ObjDriftice* this) {
|
|||
this->actionFunc = func_80A671E0;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// stack
|
||||
void func_80A671E0(ObjDriftice* this, GlobalContext* globalCtx) {
|
||||
f32 phi_f0;
|
||||
Vec3f sp40;
|
||||
|
|
@ -349,12 +344,12 @@ void func_80A671E0(ObjDriftice* this, GlobalContext* globalCtx) {
|
|||
f32 phi_f12;
|
||||
Vec3s* points;
|
||||
s32 sp30;
|
||||
Vec3s* points2;
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
Math_Vec3s_ToVec3f(&sp40, &(&this->unk_16C[this->unk_164])[this->unk_168]);
|
||||
Math_Vec3f_Diff(&sp40, &this->dyna.actor.world.pos, &this->dyna.actor.velocity);
|
||||
Math_Vec3f_Diff(&sp40, &this->dyna.actor.world.pos, &thisx->velocity);
|
||||
|
||||
sp3C = Math3D_Vec3fMagnitude(&this->dyna.actor.velocity);
|
||||
sp3C = Math3D_Vec3fMagnitude(&thisx->velocity);
|
||||
if (sp3C < (this->unk_23C * 8.0f)) {
|
||||
phi_f0 = this->unk_23C * 0.4f;
|
||||
phi_f12 = this->unk_23C * 0.05f;
|
||||
|
|
@ -391,8 +386,8 @@ void func_80A671E0(ObjDriftice* this, GlobalContext* globalCtx) {
|
|||
this->unk_164 = this->unk_160;
|
||||
}
|
||||
|
||||
points2 = &this->unk_16C[0];
|
||||
if ((points2->x != points->x) || (points2->y != points->y) || (points2->z != points->z)) {
|
||||
if ((this->unk_16C[0].x != points->x) || (this->unk_16C[0].y != points->y) ||
|
||||
(this->unk_16C[0].z != points->z)) {
|
||||
func_80A6743C(this);
|
||||
func_800C62BC(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
sp30 = false;
|
||||
|
|
@ -405,9 +400,6 @@ void func_80A671E0(ObjDriftice* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Driftice/func_80A671E0.s")
|
||||
#endif
|
||||
|
||||
void func_80A6743C(ObjDriftice* this) {
|
||||
this->actionFunc = func_80A67450;
|
||||
|
|
|
|||
|
|
@ -557,7 +557,8 @@ void ObjSpidertent_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
ColliderTrisElementInit* element;
|
||||
Vec3f sp70[3];
|
||||
Vec3f sp64;
|
||||
s32 i, j;
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
|
|
@ -698,8 +699,9 @@ void func_80B30AD4(ObjSpidertent* this) {
|
|||
void func_80B30AF8(ObjSpidertent* this, GlobalContext* globalCtx) {
|
||||
ObjSpidertentStruct* temp_s0 = &D_80B31350[OBJSPIDERTENT_GET_1(&this->dyna.actor)];
|
||||
TriNorm* triNorm;
|
||||
s32 i, j;
|
||||
ObjSpidertentStruct2* ptr;
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 pad;
|
||||
Vec3f sp60;
|
||||
f32 sp5C;
|
||||
|
||||
|
|
|
|||
|
|
@ -397,7 +397,8 @@ void ObjSwitch_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (type == OBJSWITCH_TYPE_EYE) {
|
||||
if (sIsSegmentTableInit == false) {
|
||||
s32 i, j;
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
sIsSegmentTableInit = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -141,15 +141,15 @@ void func_80A3C7E8(ObjVspinyroll* this) {
|
|||
s32 index = D_80A3D450[OBJVSPINYROLL_GET_4000(&this->dyna.actor)] * 120.0f * (1.0f / 58.0f);
|
||||
|
||||
index += 2;
|
||||
this->unk_38C = index * 4;
|
||||
this->unk_1A8.unk_1E4 = index * 4;
|
||||
|
||||
tempf = ((D_80A3D450[OBJVSPINYROLL_GET_4000(&this->dyna.actor)] * 120.0f) - 2.0f) / (index - 1);
|
||||
phi_f2 = 1.0f;
|
||||
|
||||
for (i = 0, j = 0; i < this->unk_38C; i++) {
|
||||
this->unk_1A8[i].unk_00.x = D_80A3D4C4[j];
|
||||
this->unk_1A8[i].unk_00.y = phi_f2;
|
||||
this->unk_1A8[i].unk_00.z = D_80A3D4B4[j];
|
||||
for (i = 0, j = 0; i < this->unk_1A8.unk_1E4; i++) {
|
||||
this->unk_1A8.unk_000[i].unk_00.x = D_80A3D4C4[j];
|
||||
this->unk_1A8.unk_000[i].unk_00.y = phi_f2;
|
||||
this->unk_1A8.unk_000[i].unk_00.z = D_80A3D4B4[j];
|
||||
|
||||
j++;
|
||||
if (j >= 4) {
|
||||
|
|
@ -159,11 +159,10 @@ void func_80A3C7E8(ObjVspinyroll* this) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
s32 func_80A3C8D8(ObjVspinyroll* this, GlobalContext* globalCtx, Vec3f* arg2, s32 arg3) {
|
||||
s32 pad;
|
||||
ObjVspinyrollStruct2* ptr = &this->unk_1A8[0];
|
||||
s32 pad2;
|
||||
ObjVspinyrollStruct3* unk_1A8 = &this->unk_1A8;
|
||||
ObjVspinyrollStruct2* ptr;
|
||||
s32 i;
|
||||
Vec3f spE4;
|
||||
Vec3f spD8;
|
||||
|
|
@ -177,9 +176,11 @@ s32 func_80A3C8D8(ObjVspinyroll* this, GlobalContext* globalCtx, Vec3f* arg2, s3
|
|||
|
||||
spE4.z = 0.0f;
|
||||
sp9C = false;
|
||||
this->unk_388 = NULL;
|
||||
unk_1A8->unk_1E0 = NULL;
|
||||
|
||||
for (i = 0; i < unk_1A8->unk_1E4; i++) {
|
||||
ptr = &unk_1A8->unk_000[i];
|
||||
|
||||
for (i = 0; i < this->unk_38C; i++, ptr++) {
|
||||
spE4.x = ptr->unk_00.x;
|
||||
spE4.y = ptr->unk_00.y;
|
||||
func_80A3C4E0(&spD8, &spE4, this->dyna.actor.world.rot.y);
|
||||
|
|
@ -193,8 +194,8 @@ s32 func_80A3C8D8(ObjVspinyroll* this, GlobalContext* globalCtx, Vec3f* arg2, s3
|
|||
spCC.x += 30.0f * this->unk_3B4.x;
|
||||
spCC.z += 30.0f * this->unk_3B4.z;
|
||||
|
||||
if (BgCheck_EntityLineTest3(&globalCtx->colCtx, &spD8, &spCC, &spC0, &this->unk_1A8[i].collisionPoly, true,
|
||||
false, false, true, &this->unk_1A8[i].bgId, &this->dyna.actor, 0.0f)) {
|
||||
if (BgCheck_EntityLineTest3(&globalCtx->colCtx, &spD8, &spCC, &spC0, &unk_1A8->unk_000[i].collisionPoly, true,
|
||||
false, false, true, &unk_1A8->unk_000[i].bgId, &this->dyna.actor, 0.0f)) {
|
||||
if ((arg3 != 0) && (this->dyna.actor.flags & ACTOR_FLAG_40)) {
|
||||
spA8.x = ptr->unk_00.x * 0.2f;
|
||||
spA8.y = ptr->unk_00.y;
|
||||
|
|
@ -215,17 +216,13 @@ s32 func_80A3C8D8(ObjVspinyroll* this, GlobalContext* globalCtx, Vec3f* arg2, s3
|
|||
temp_f20 = temp_f0;
|
||||
sp9C = true;
|
||||
Math_Vec3f_Diff(&spC0, &spCC, arg2);
|
||||
this->unk_388 = ptr;
|
||||
unk_1A8->unk_1E0 = ptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sp9C;
|
||||
}
|
||||
#else
|
||||
s32 func_80A3C8D8(ObjVspinyroll* this, GlobalContext* globalCtx, Vec3f* arg2, s32 arg3);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Vspinyroll/func_80A3C8D8.s")
|
||||
#endif
|
||||
|
||||
s32 func_80A3CB94(ObjVspinyroll* this, GlobalContext* globalCtx, s32 arg2) {
|
||||
Vec3f sp1C;
|
||||
|
|
@ -239,8 +236,8 @@ s32 func_80A3CB94(ObjVspinyroll* this, GlobalContext* globalCtx, s32 arg2) {
|
|||
}
|
||||
|
||||
DynaPolyActor* func_80A3CBF0(ObjVspinyroll* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_388 != NULL) {
|
||||
return DynaPoly_GetActor(&globalCtx->colCtx, this->unk_388->bgId);
|
||||
if (this->unk_1A8.unk_1E0 != NULL) {
|
||||
return DynaPoly_GetActor(&globalCtx->colCtx, this->unk_1A8.unk_1E0->bgId);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,12 +21,16 @@ typedef struct {
|
|||
/* 0x10 */ s32 bgId;
|
||||
} ObjVspinyrollStruct2; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ ObjVspinyrollStruct2 unk_000[24];
|
||||
/* 0x1E0 */ ObjVspinyrollStruct2* unk_1E0;
|
||||
/* 0x1E4 */ s32 unk_1E4;
|
||||
} ObjVspinyrollStruct3; // size = 0x1E8
|
||||
|
||||
typedef struct ObjVspinyroll {
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x015C */ ColliderCylinder collider;
|
||||
/* 0x01A8 */ ObjVspinyrollStruct2 unk_1A8[24];
|
||||
/* 0x0388 */ ObjVspinyrollStruct2* unk_388;
|
||||
/* 0x038C */ s32 unk_38C;
|
||||
/* 0x01A8 */ ObjVspinyrollStruct3 unk_1A8;
|
||||
/* 0x0390 */ ObjVspinyrollActionFunc actionFunc;
|
||||
/* 0x0394 */ f32 unk_394;
|
||||
/* 0x0398 */ s32 unk_398;
|
||||
|
|
|
|||
Loading…
Reference in New Issue