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
4
spec
4
spec
|
@ -2962,11 +2962,7 @@ beginseg
|
|||
name "ovl_En_Tru"
|
||||
compress
|
||||
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"
|
||||
#else
|
||||
include "build/data/ovl_En_Tru/ovl_En_Tru.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -93,8 +93,14 @@ ActorInit En_Tru_InitVars = {
|
|||
static Vec3f D_80A8B250 = { 0.0f, 0.02f, 0.0f };
|
||||
|
||||
static Color_RGBA8 D_80A8B25C[] = {
|
||||
{ 255, 20, 60, 0 }, { 255, 235, 160, 0 }, { 20, 60, 255, 0 },
|
||||
{ 100, 100, 100, 0 }, { 255, 255, 200, 0 }, { 100, 100, 100, 0 },
|
||||
{ 255, 20, 60, 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 };
|
||||
|
@ -176,18 +182,19 @@ void func_80A85788(EnTruUnkStruct* arg0, PlayState* play) {
|
|||
func_8012C2DC(play->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < 30; i++, arg0++) {
|
||||
if (arg0->unk_00 == 1) {
|
||||
f32 alpha;
|
||||
|
||||
if (arg0->unk_00 != 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!flag) {
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_80A89000);
|
||||
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);
|
||||
|
@ -203,7 +210,6 @@ void func_80A85788(EnTruUnkStruct* arg0, PlayState* play) {
|
|||
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);
|
||||
}
|
||||
|
@ -227,28 +233,29 @@ void func_80A85AA4(EnTruUnkStruct* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 ar
|
|||
}
|
||||
|
||||
void func_80A85BCC(EnTruUnkStruct* arg0, PlayState* play) {
|
||||
GraphicsContext* gfxCtx = play->state.gfxCtx;
|
||||
s32 i;
|
||||
s32 flag = false;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
if (play) {}
|
||||
|
||||
func_8012C2DC(play->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < 30; i++, arg0++) {
|
||||
if (arg0->unk_00 == 2) {
|
||||
f32 alpha;
|
||||
|
||||
if (arg0->unk_00 != 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!flag) {
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
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);
|
||||
|
||||
|
@ -259,7 +266,6 @@ void func_80A85BCC(EnTruUnkStruct* arg0, PlayState* play) {
|
|||
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);
|
||||
}
|
||||
|
@ -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) {
|
||||
u8 flag = false;
|
||||
GraphicsContext* gfxCtx = play->state.gfxCtx;
|
||||
s32 i;
|
||||
s32 flag = false;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
@ -295,8 +300,10 @@ void func_80A85F84(EnTruUnkStruct* arg0, PlayState* play) {
|
|||
for (i = 0; i < 30; i++, arg0++) {
|
||||
f32 alpha;
|
||||
s32 index;
|
||||
if ((arg0->unk_00 != 3) && (arg0->unk_00 != 4) && (arg0->unk_00 != 5)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((arg0->unk_00 == 3) || (arg0->unk_00 == 4) || (arg0->unk_00 == 5)) {
|
||||
if (!flag) {
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gKoumeDustMaterialDL);
|
||||
|
@ -305,10 +312,8 @@ void func_80A85F84(EnTruUnkStruct* arg0, PlayState* play) {
|
|||
|
||||
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);
|
||||
|
@ -317,8 +322,8 @@ void func_80A85F84(EnTruUnkStruct* arg0, PlayState* play) {
|
|||
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);
|
||||
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);
|
||||
|
@ -328,17 +333,11 @@ void func_80A85F84(EnTruUnkStruct* arg0, PlayState* play) {
|
|||
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);
|
||||
}
|
||||
#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 i;
|
||||
|
|
Loading…
Reference in New Issue