mirror of https://github.com/zeldaret/mm.git
Matched last remaining function in z_en_tru.c. (#1237)
* Matched last remaining function in z_en_tru.c. (Also touched up other similar functions for uniformity) * Fix spec file, revert unnecessary deltas, and change variable ordering.
This commit is contained in:
parent
eaf682dc05
commit
c9a89ae2bb
6
spec
6
spec
|
@ -2962,11 +2962,7 @@ beginseg
|
||||||
name "ovl_En_Tru"
|
name "ovl_En_Tru"
|
||||||
compress
|
compress
|
||||||
include "build/src/overlays/actors/ovl_En_Tru/z_en_tru.o"
|
include "build/src/overlays/actors/ovl_En_Tru/z_en_tru.o"
|
||||||
#ifdef NON_MATCHING
|
include "build/src/overlays/actors/ovl_En_Tru/ovl_En_Tru_reloc.o"
|
||||||
include "build/src/overlays/actors/ovl_En_Tru/ovl_En_Tru_reloc.o"
|
|
||||||
#else
|
|
||||||
include "build/data/ovl_En_Tru/ovl_En_Tru.reloc.o"
|
|
||||||
#endif
|
|
||||||
endseg
|
endseg
|
||||||
|
|
||||||
beginseg
|
beginseg
|
||||||
|
|
|
@ -93,8 +93,14 @@ ActorInit En_Tru_InitVars = {
|
||||||
static Vec3f D_80A8B250 = { 0.0f, 0.02f, 0.0f };
|
static Vec3f D_80A8B250 = { 0.0f, 0.02f, 0.0f };
|
||||||
|
|
||||||
static Color_RGBA8 D_80A8B25C[] = {
|
static Color_RGBA8 D_80A8B25C[] = {
|
||||||
{ 255, 20, 60, 0 }, { 255, 235, 160, 0 }, { 20, 60, 255, 0 },
|
{ 255, 20, 60, 0 },
|
||||||
{ 100, 100, 100, 0 }, { 255, 255, 200, 0 }, { 100, 100, 100, 0 },
|
{ 255, 235, 160, 0 },
|
||||||
|
{ 20, 60, 255, 0 },
|
||||||
|
};
|
||||||
|
static Color_RGBA8 D_80A8B268[] = {
|
||||||
|
{ 100, 100, 100, 0 },
|
||||||
|
{ 255, 255, 200, 0 },
|
||||||
|
{ 100, 100, 100, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static f32 D_80A8B274[] = { 60.0f, 255.0f, 60.0f };
|
static f32 D_80A8B274[] = { 60.0f, 255.0f, 60.0f };
|
||||||
|
@ -176,33 +182,33 @@ void func_80A85788(EnTruUnkStruct* arg0, PlayState* play) {
|
||||||
func_8012C2DC(play->state.gfxCtx);
|
func_8012C2DC(play->state.gfxCtx);
|
||||||
|
|
||||||
for (i = 0; i < 30; i++, arg0++) {
|
for (i = 0; i < 30; i++, arg0++) {
|
||||||
if (arg0->unk_00 == 1) {
|
f32 alpha;
|
||||||
f32 alpha;
|
|
||||||
|
|
||||||
if (!flag) {
|
if (arg0->unk_00 != 1) {
|
||||||
gSPDisplayList(POLY_XLU_DISP++, D_80A89000);
|
continue;
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
do {
|
|
||||||
alpha = (f32)arg0->unk_02 / arg0->unk_01;
|
|
||||||
alpha *= 255.0f;
|
|
||||||
} while (0);
|
|
||||||
|
|
||||||
gDPPipeSync(POLY_XLU_DISP++);
|
|
||||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128);
|
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (u8)alpha);
|
|
||||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
|
||||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, -arg0->unk_02 * 5, 32, 64, 1, 0, 0, 32, 32));
|
|
||||||
|
|
||||||
Matrix_Translate(arg0->unk_04.x, arg0->unk_04.y, arg0->unk_04.z, MTXMODE_NEW);
|
|
||||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
|
||||||
Matrix_Scale(arg0->unk_28, arg0->unk_28, 1.0f, MTXMODE_APPLY);
|
|
||||||
Matrix_Translate(0.0f, 14.0f, 0.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++, D_80A890A8);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!flag) {
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, D_80A89000);
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
alpha = (f32)arg0->unk_02 / arg0->unk_01;
|
||||||
|
alpha *= 255.0f;
|
||||||
|
|
||||||
|
gDPPipeSync(POLY_XLU_DISP++);
|
||||||
|
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128);
|
||||||
|
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (u8)alpha);
|
||||||
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||||
|
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, -arg0->unk_02 * 5, 32, 64, 1, 0, 0, 32, 32));
|
||||||
|
|
||||||
|
Matrix_Translate(arg0->unk_04.x, arg0->unk_04.y, arg0->unk_04.z, MTXMODE_NEW);
|
||||||
|
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||||
|
Matrix_Scale(arg0->unk_28, arg0->unk_28, 1.0f, MTXMODE_APPLY);
|
||||||
|
Matrix_Translate(0.0f, 14.0f, 0.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++, D_80A890A8);
|
||||||
}
|
}
|
||||||
|
|
||||||
CLOSE_DISPS(play->state.gfxCtx);
|
CLOSE_DISPS(play->state.gfxCtx);
|
||||||
|
@ -227,38 +233,38 @@ void func_80A85AA4(EnTruUnkStruct* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 ar
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80A85BCC(EnTruUnkStruct* arg0, PlayState* play) {
|
void func_80A85BCC(EnTruUnkStruct* arg0, PlayState* play) {
|
||||||
|
GraphicsContext* gfxCtx = play->state.gfxCtx;
|
||||||
s32 i;
|
s32 i;
|
||||||
s32 flag = false;
|
s32 flag = false;
|
||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx);
|
OPEN_DISPS(play->state.gfxCtx);
|
||||||
if (play) {}
|
|
||||||
|
|
||||||
func_8012C2DC(play->state.gfxCtx);
|
func_8012C2DC(play->state.gfxCtx);
|
||||||
|
|
||||||
for (i = 0; i < 30; i++, arg0++) {
|
for (i = 0; i < 30; i++, arg0++) {
|
||||||
if (arg0->unk_00 == 2) {
|
f32 alpha;
|
||||||
f32 alpha;
|
|
||||||
|
|
||||||
if (!flag) {
|
if (arg0->unk_00 != 2) {
|
||||||
gDPPipeSync(POLY_XLU_DISP++);
|
continue;
|
||||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 200, 0);
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
do {
|
|
||||||
alpha = (f32)arg0->unk_02 / arg0->unk_01;
|
|
||||||
alpha *= 255.0f;
|
|
||||||
} while (0);
|
|
||||||
|
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 200, (u8)alpha);
|
|
||||||
|
|
||||||
Matrix_Translate(arg0->unk_04.x, arg0->unk_04.y, arg0->unk_04.z, MTXMODE_NEW);
|
|
||||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
|
||||||
Matrix_Scale(arg0->unk_28, arg0->unk_28, 1.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++, D_80A8A108);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!flag) {
|
||||||
|
gDPPipeSync(POLY_XLU_DISP++);
|
||||||
|
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 200, 0);
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
alpha = (f32)arg0->unk_02 / arg0->unk_01;
|
||||||
|
alpha *= 255.0f;
|
||||||
|
|
||||||
|
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 200, (u8)alpha);
|
||||||
|
|
||||||
|
Matrix_Translate(arg0->unk_04.x, arg0->unk_04.y, arg0->unk_04.z, MTXMODE_NEW);
|
||||||
|
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||||
|
Matrix_Scale(arg0->unk_28, arg0->unk_28, 1.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++, D_80A8A108);
|
||||||
}
|
}
|
||||||
|
|
||||||
CLOSE_DISPS(play->state.gfxCtx);
|
CLOSE_DISPS(play->state.gfxCtx);
|
||||||
|
@ -282,11 +288,10 @@ void func_80A85E2C(EnTruUnkStruct* arg0, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NON_MATCHING
|
|
||||||
// s8/s6 flipped, same deal as above functions but the same fixes don't work
|
|
||||||
void func_80A85F84(EnTruUnkStruct* arg0, PlayState* play) {
|
void func_80A85F84(EnTruUnkStruct* arg0, PlayState* play) {
|
||||||
u8 flag = false;
|
GraphicsContext* gfxCtx = play->state.gfxCtx;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
s32 flag = false;
|
||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx);
|
OPEN_DISPS(play->state.gfxCtx);
|
||||||
|
|
||||||
|
@ -295,50 +300,44 @@ void func_80A85F84(EnTruUnkStruct* arg0, PlayState* play) {
|
||||||
for (i = 0; i < 30; i++, arg0++) {
|
for (i = 0; i < 30; i++, arg0++) {
|
||||||
f32 alpha;
|
f32 alpha;
|
||||||
s32 index;
|
s32 index;
|
||||||
|
if ((arg0->unk_00 != 3) && (arg0->unk_00 != 4) && (arg0->unk_00 != 5)) {
|
||||||
if ((arg0->unk_00 == 3) || (arg0->unk_00 == 4) || (arg0->unk_00 == 5)) {
|
continue;
|
||||||
if (!flag) {
|
|
||||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++, gKoumeDustMaterialDL);
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix_Push();
|
|
||||||
|
|
||||||
do {
|
|
||||||
alpha = (f32)arg0->unk_02 / arg0->unk_01;
|
|
||||||
alpha *= D_80A8B274[arg0->unk_00 - 3];
|
|
||||||
} while (0);
|
|
||||||
|
|
||||||
gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0,
|
|
||||||
COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
|
|
||||||
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2);
|
|
||||||
gSPSetGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
|
||||||
gDPPipeSync(POLY_XLU_DISP++);
|
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, D_80A8B25C[arg0->unk_00 - 3].r, D_80A8B25C[arg0->unk_00 - 3].g,
|
|
||||||
D_80A8B25C[arg0->unk_00 - 3].b, (u8)alpha);
|
|
||||||
gDPSetEnvColor(POLY_XLU_DISP++, D_80A8B25C[arg0->unk_00 - 3].r, D_80A8B25C[arg0->unk_00 - 3].g,
|
|
||||||
D_80A8B25C[arg0->unk_00 - 3].b, 0);
|
|
||||||
|
|
||||||
Matrix_Translate(arg0->unk_04.x, arg0->unk_04.y, arg0->unk_04.z, MTXMODE_NEW);
|
|
||||||
Matrix_Scale(arg0->unk_28, arg0->unk_28, 1.0f, MTXMODE_APPLY);
|
|
||||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
|
||||||
|
|
||||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
|
||||||
index = ((f32)arg0->unk_02 / arg0->unk_01) * 8.0f;
|
|
||||||
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(sDustTextures[index]));
|
|
||||||
gSPDisplayList(POLY_XLU_DISP++, gKoumeDustModelDL);
|
|
||||||
|
|
||||||
Matrix_Pop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!flag) {
|
||||||
|
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, gKoumeDustMaterialDL);
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Matrix_Push();
|
||||||
|
|
||||||
|
alpha = (f32)arg0->unk_02 / arg0->unk_01;
|
||||||
|
alpha *= D_80A8B274[arg0->unk_00 - 3];
|
||||||
|
|
||||||
|
gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0,
|
||||||
|
COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
|
||||||
|
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2);
|
||||||
|
gSPSetGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||||
|
gDPPipeSync(POLY_XLU_DISP++);
|
||||||
|
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, D_80A8B25C[arg0->unk_00 - 3].r, D_80A8B25C[arg0->unk_00 - 3].g,
|
||||||
|
D_80A8B25C[arg0->unk_00 - 3].b, (u8)alpha);
|
||||||
|
gDPSetEnvColor(POLY_XLU_DISP++, D_80A8B268[arg0->unk_00 - 3].r, D_80A8B268[arg0->unk_00 - 3].g,
|
||||||
|
D_80A8B268[arg0->unk_00 - 3].b, 0);
|
||||||
|
|
||||||
|
Matrix_Translate(arg0->unk_04.x, arg0->unk_04.y, arg0->unk_04.z, MTXMODE_NEW);
|
||||||
|
Matrix_Scale(arg0->unk_28, arg0->unk_28, 1.0f, MTXMODE_APPLY);
|
||||||
|
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||||
|
|
||||||
|
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
index = ((f32)arg0->unk_02 / arg0->unk_01) * 8.0f;
|
||||||
|
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(sDustTextures[index]));
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, gKoumeDustModelDL);
|
||||||
|
Matrix_Pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
CLOSE_DISPS(play->state.gfxCtx);
|
CLOSE_DISPS(play->state.gfxCtx);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
void func_80A85F84(EnTruUnkStruct* arg0, PlayState* play);
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Tru/func_80A85F84.s")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
s32 func_80A86384(EnTruUnkStruct* arg0, Vec3f* arg1) {
|
s32 func_80A86384(EnTruUnkStruct* arg0, Vec3f* arg1) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
Loading…
Reference in New Issue