diff options
| author | Ethan Roseman <ethteck@gmail.com> | 2020-04-13 19:30:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-13 19:30:01 -0400 |
| commit | 16646aa34d533b36e3a93985ae59cbefdf58b6d4 (patch) | |
| tree | 1a4c422c61e7dbf91a4986dbd6727623d6b2c7b1 /src | |
| parent | 298abfb1280134a4def3dc30fab1530edcb64bb8 (diff) | |
Decompiled ovl_Bg_Spot17_Funen (#67)
* First steps
* Decompiled ovl_Bg_Spot17_Funen
* static functions no more
Diffstat (limited to 'src')
| -rw-r--r-- | src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c | 57 |
1 files changed, 50 insertions, 7 deletions
diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index 5e992d216..8bdfe51e4 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c @@ -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), +}; + +extern Gfx D_06000B40[]; + +void BgSpot17Funen_Init(BgSpot17Funen* this, GlobalContext* globalCtx) { + Actor_ProcessInitChain(&this->actor, initChain); + osSyncPrintf("spot17 obj. 噴煙 (arg_data 0x%04x)\n", this->actor.params); +} + +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]; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Funen/BgSpot17Funen_Update.s") + 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); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Funen/func_808B746C.s") + 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 -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot17_Funen/func_808B7478.s") + Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot17_funen.c", 176); +} |
