diff --git a/spec b/spec index 3959b14b72..7aa5c6e984 100644 --- a/spec +++ b/spec @@ -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 diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index af0fb9ca23..2a289272d6 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -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); } diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 5b70457f49..f119387994 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -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); } diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 4522c4c84d..4a1826d422 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -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); } diff --git a/src/overlays/actors/ovl_En_Tana/z_en_tana.c b/src/overlays/actors/ovl_En_Tana/z_en_tana.c index 1b5e59514a..ea86492cf0 100644 --- a/src/overlays/actors/ovl_En_Tana/z_en_tana.c +++ b/src/overlays/actors/ovl_En_Tana/z_en_tana.c @@ -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); +} diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index d106c9cd02..cddc64c8aa 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -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 = { {