mirror of https://github.com/zeldaret/mm.git
match func_808DDE9C (#1262)
This commit is contained in:
parent
b9f2411cd2
commit
64959177d9
4
spec
4
spec
|
|
@ -1119,11 +1119,7 @@ beginseg
|
|||
name "ovl_Object_Kankyo"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_Object_Kankyo/ovl_Object_Kankyo_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_Object_Kankyo/ovl_Object_Kankyo.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
|||
|
|
@ -647,8 +647,6 @@ f32 func_808DDE74(void) {
|
|||
return Rand_ZeroOne() - 0.5f;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// s2/s3 swapped
|
||||
void func_808DDE9C(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
ObjectKankyo* this = THIS;
|
||||
|
|
@ -674,25 +672,23 @@ void func_808DDE9C(Actor* thisx, PlayState* play2) {
|
|||
temp_f22 = this->unk_14C[0].unk_04 + ((Rand_ZeroOne() - 0.7f) * this->unk_144);
|
||||
temp_f2 = this->unk_14C[0].unk_08 + ((Rand_ZeroOne() - 0.7f) * this->unk_144);
|
||||
|
||||
if ((temp_f20 < -252.0f) && (temp_f20 > -500.0f) && (temp_f2 > 3820.0f) && (temp_f2 < 4150.0f)) {
|
||||
continue;
|
||||
if (!((temp_f20 < -252.0f) && (temp_f20 > -500.0f) && (temp_f2 > 3820.0f) && (temp_f2 < 4150.0f))) {
|
||||
Matrix_Translate(temp_f20, temp_f22, temp_f2, MTXMODE_NEW);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, &D_01000000, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
|
||||
Matrix_RotateYS((s16)this->unk_14C[2].unk_04 + (s16)(i << 5), MTXMODE_APPLY);
|
||||
Matrix_RotateXS((s16)this->unk_14C[2].unk_00 + (s16)(i << 5), MTXMODE_APPLY);
|
||||
|
||||
if (this->unk_114C == 0) {
|
||||
Matrix_Scale(0.5f, 1.0f, 0.5f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(2.0f, 4.0f, 2.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_0706E0);
|
||||
}
|
||||
|
||||
Matrix_Translate(temp_f20, temp_f22, temp_f2, MTXMODE_NEW);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, &D_01000000, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
|
||||
Matrix_RotateYS((s16)this->unk_14C[2].unk_04 + (s16)(i << 5), MTXMODE_APPLY);
|
||||
Matrix_RotateXS((s16)this->unk_14C[2].unk_00 + (s16)(i << 5), MTXMODE_APPLY);
|
||||
|
||||
if (this->unk_114C == 0) {
|
||||
Matrix_Scale(0.5f, 1.0f, 0.5f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(2.0f, 4.0f, 2.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_0706E0);
|
||||
}
|
||||
|
||||
phi_s5 = false;
|
||||
|
|
@ -710,21 +706,17 @@ void func_808DDE9C(Actor* thisx, PlayState* play2) {
|
|||
temp_f22 = player->actor.floorHeight + 2.0f;
|
||||
temp_f2 = this->unk_14C[1].unk_08 + (func_808DDE74() * 220.0f);
|
||||
|
||||
if ((temp_f20 < -252.0f) && (temp_f20 > -500.0f) && (temp_f2 > 3820.0f) && (temp_f2 < 4150.0f)) {
|
||||
continue;
|
||||
if (!((temp_f20 < -252.0f) && (temp_f20 > -500.0f) && (temp_f2 > 3820.0f) && (temp_f2 < 4150.0f))) {
|
||||
Matrix_Translate(temp_f20, temp_f22, temp_f2, MTXMODE_NEW);
|
||||
temp_f12 = (Rand_ZeroOne() * 0.05f) + 0.05f;
|
||||
Matrix_Scale(temp_f12, temp_f12, temp_f12, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffShockwaveDL);
|
||||
}
|
||||
|
||||
Matrix_Translate(temp_f20, temp_f22, temp_f2, MTXMODE_NEW);
|
||||
temp_f12 = (Rand_ZeroOne() * 0.05f) + 0.05f;
|
||||
Matrix_Scale(temp_f12, temp_f12, temp_f12, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffShockwaveDL);
|
||||
}
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Object_Kankyo/func_808DDE9C.s")
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue