1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-02 09:34:27 +00:00

Decompiled ovl_En_Tana, ran format.sh

This commit is contained in:
shawlucas 2020-04-01 14:34:48 -07:00
parent 46f9fe6185
commit 76bc423dd3
6 changed files with 84 additions and 21 deletions

4
spec
View file

@ -3624,9 +3624,7 @@ endseg
beginseg
name "ovl_En_Tana"
include "build/src/overlays/actors/ovl_En_Tana/z_en_tana.o"
include "build/data/overlays/actors/z_en_tana.data.o"
include "build/data/overlays/actors/z_en_tana.rodata.o"
include "build/data/overlays/actors/z_en_tana.reloc.o"
include "build/src/overlays/actors/ovl_En_Tana/z_en_tana_reloc.o"
endseg
beginseg

View file

@ -239,7 +239,7 @@ void ArrowFire_Draw(ArrowFire* this, GlobalContext* globalCtx) {
gSPDisplayList(gfxCtx->polyXlu.p++, textureDL);
gSPDisplayList(gfxCtx->polyXlu.p++,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 255 - (stateFrames * 2) % 256, 0, 64, 32, 1,
255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64));
255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64));
gSPDisplayList(gfxCtx->polyXlu.p++, vertexDL);
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_arrow_fire.c", 682);
}

View file

@ -239,7 +239,7 @@ void ArrowIce_Draw(ArrowIce* this, GlobalContext* globalCtx) {
gSPDisplayList(gfxCtx->polyXlu.p++, textureDL);
gSPDisplayList(gfxCtx->polyXlu.p++,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 128, 32, 1,
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16));
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16));
gSPDisplayList(gfxCtx->polyXlu.p++, vertexDL);
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_arrow_ice.c", 676);
}

View file

@ -239,7 +239,7 @@ void ArrowLight_Draw(ArrowLight* this, GlobalContext* globalCtx) {
gSPDisplayList(gfxCtx->polyXlu.p++, textureDL);
gSPDisplayList(gfxCtx->polyXlu.p++,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1,
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16));
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16));
gSPDisplayList(gfxCtx->polyXlu.p++, vertexDL);
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_arrow_light.c", 664);
}

View file

@ -1,13 +1,20 @@
/*
* File: z_en_tana.c
* Overlay: ovl_En_Tana
* Description: Shop Shelves
*/
#include "z_en_tana.h"
#define ROOM 0x00
#define FLAGS 0x00000009
void EnTana_Init(EnTana* this, GlobalContext* globalCtx);
void EnTana_Destroy(EnTana* this, GlobalContext* globalCtx);
void EnTana_Update(EnTana* this, GlobalContext* globalCtx);
static void EnTana_Init(EnTana* this, GlobalContext* globalCtx);
static void EnTana_Destroy(EnTana* this, GlobalContext* globalCtx);
static void EnTana_Update(EnTana* this, GlobalContext* globalCtx);
static void func_80B17FC4(EnTana* this, GlobalContext* globalCtx);
static void func_80B1809C(EnTana* this, GlobalContext* globalCtx);
/*
const ActorInit En_Tana_InitVars = {
ACTOR_EN_TANA,
ACTORTYPE_PROP,
@ -20,13 +27,71 @@ const ActorInit En_Tana_InitVars = {
(ActorFunc)EnTana_Update,
NULL,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Tana/EnTana_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Tana/EnTana_Destroy.s")
static char* shelfTypes[] = {
"木の棚", // "Wooden Shelves"
"石の棚", // "Stone Shelves"
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Tana/EnTana_Update.s")
static const ActorFunc drawFuncs[] = {
(ActorFunc)func_80B17FC4,
(ActorFunc)func_80B1809C,
(ActorFunc)func_80B1809C,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Tana/func_80B17FC4.s")
static u32 dListTbl[] = {
0x06000B80,
0x060027E8,
0x060027E8,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Tana/func_80B1809C.s")
static u32 dListTbl2[] = {
0x00000000,
0x06000E08,
0x06001608,
0x00000000,
};
static void EnTana_Init(EnTana* this, GlobalContext* globalCtx) {
Actor* thisx = &this->actor;
osSyncPrintf("☆☆☆ %s ☆☆☆\n", shelfTypes[thisx->params]);
Actor_SetScale(thisx, 1.0f);
thisx->flags &= 0xFFFFFFFE;
thisx->draw = drawFuncs[thisx->params];
}
static void EnTana_Destroy(EnTana* this, GlobalContext* globalCtx) {
}
static void EnTana_Update(EnTana* this, GlobalContext* globalCtx) {
}
static void func_80B17FC4(EnTana* this, GlobalContext* globalCtx) {
Actor* thisx = &this->actor;
GraphicsContext* gfxCtx;
Gfx* gfxArr[4];
gfxCtx = globalCtx->state.gfxCtx;
func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_en_tana.c", 148);
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 152),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyOpa.p++, dListTbl[thisx->params]);
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_en_tana.c", 157);
}
static void func_80B1809C(EnTana* this, GlobalContext* globalCtx) {
Actor* thisx = &this->actor;
GraphicsContext* gfxCtx;
Gfx* gfxArr[4];
gfxCtx = globalCtx->state.gfxCtx;
func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_en_tana.c", 163);
func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(dListTbl2[thisx->params]));
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 169),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyOpa.p++, dListTbl[thisx->params]);
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_en_tana.c", 174);
}

View file

@ -57,11 +57,11 @@ static ColliderCylinderInit colCylinderInit = {
0x00, 0x01, 0x01, 0x00, 0x001E, 0x0028, 0x0000, 0x0000, 0x0000, 0x0000,
};
static Sub98Init4 sub98Init = {
0x04,
0x001E,
0x0028,
0x96,
static Sub98Init4 sub98Init = {
0x04,
0x001E,
0x0028,
0x96,
};
static ActorDamageChart damageChart = { {