1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 23:10:22 +00:00

Decompiled ovl_Bg_Spot17_Funen (#67)

* First steps

* Decompiled ovl_Bg_Spot17_Funen

* static functions no more
This commit is contained in:
Ethan Roseman 2020-04-13 19:30:01 -04:00 committed by GitHub
parent 298abfb128
commit 16646aa34d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 51 additions and 212 deletions

View file

@ -1,3 +1,9 @@
/*
* File: z_bg_spot17_funen.c
* Overlay: ovl_Bg_Spot17_Funen
* Description:
*/
#include "z_bg_spot17_funen.h"
#define ROOM 0x00
@ -7,7 +13,9 @@ void BgSpot17Funen_Init(BgSpot17Funen* this, GlobalContext* globalCtx);
void BgSpot17Funen_Destroy(BgSpot17Funen* this, GlobalContext* globalCtx);
void BgSpot17Funen_Update(BgSpot17Funen* this, GlobalContext* globalCtx);
/*
void func_808B7478(BgSpot17Funen* this, GlobalContext* globalCtx);
void func_808B746C(BgSpot17Funen* this, GlobalContext* globalCtx);
const ActorInit Bg_Spot17_Funen_InitVars = {
ACTOR_BG_SPOT17_FUNEN,
ACTORTYPE_SWITCH,
@ -20,13 +28,48 @@ const ActorInit Bg_Spot17_Funen_InitVars = {
(ActorFunc)BgSpot17Funen_Update,
NULL,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Funen/BgSpot17Funen_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Funen/BgSpot17Funen_Destroy.s")
static InitChainEntry initChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Funen/BgSpot17Funen_Update.s")
extern Gfx D_06000B40[];
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Funen/func_808B746C.s")
void BgSpot17Funen_Init(BgSpot17Funen* this, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, initChain);
osSyncPrintf("spot17 obj. 噴煙 (arg_data 0x%04x)\n", this->actor.params);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Funen/func_808B7478.s")
void BgSpot17Funen_Destroy(BgSpot17Funen* this, GlobalContext* globalCtx) {
}
void BgSpot17Funen_Update(BgSpot17Funen* this, GlobalContext* globalCtx) {
this->actor.draw = (ActorFunc)func_808B7478;
this->actor.update = (ActorFunc)func_808B746C;
}
void func_808B746C(BgSpot17Funen* this, GlobalContext* globalCtx) {
}
void func_808B7478(BgSpot17Funen* this, GlobalContext* globalCtx) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
Gfx* dispRefs[5];
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 153);
func_80093D84(globalCtx->state.gfxCtx);
Matrix_RotateY((s16)(func_8005A9F4(globalCtx->cameraCtx.activeCameraPtrs[globalCtx->cameraCtx.unk_5C0]) -
this->actor.shape.rot.y + 0x8000) *
9.58738019108e-05f,
MTXMODE_APPLY);
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 161),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(gfxCtx->polyXlu.p++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (0 - globalCtx->gameplayFrames) & 0x7F, 0x20, 0x20, 1, 0,
(0 - globalCtx->gameplayFrames) & 0x7F, 0x20, 0x20));
do {
gSPDisplayList(gfxCtx->polyXlu.p++, D_06000B40);
} while (0); // necessary to match
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 176);
}