From e227684d9b35c8bb05bd0f1b9912487a6a4b0021 Mon Sep 17 00:00:00 2001 From: Maide <34639600+Kelebek1@users.noreply.github.com> Date: Thu, 26 May 2022 02:04:10 +0100 Subject: [PATCH] En_Boom (#813) * En_Boom * Match (thanks Anon) * Update src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c Co-authored-by: Derek Hensley Co-authored-by: Anghelo Carvajal Co-authored-by: Derek Hensley --- include/functions.h | 2 +- include/z64actor.h | 3 + spec | 3 +- src/code/z_en_item00.c | 4 +- .../actors/ovl_Arms_Hook/z_arms_hook.c | 4 +- .../actors/ovl_Arms_Hook/z_arms_hook.h | 3 +- src/overlays/actors/ovl_En_Arrow/z_en_arrow.c | 9 +- src/overlays/actors/ovl_En_Arrow/z_en_arrow.h | 8 +- src/overlays/actors/ovl_En_Boom/z_en_boom.c | 319 ++++++++++++++++-- src/overlays/actors/ovl_En_Boom/z_en_boom.h | 10 +- tools/disasm/variables.txt | 24 +- 11 files changed, 331 insertions(+), 58 deletions(-) diff --git a/include/functions.h b/include/functions.h index 622dfcffb6..0f3a2e671e 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2051,7 +2051,7 @@ s32 func_801242B4(Player* player); // void func_80125D4C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_801262C8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_801263FC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); -s32 func_80126440(GlobalContext* globalCtx, Collider* param_2, s32* param_3, Vec3f* param_4, Vec3f* param_5); +s32 func_80126440(GlobalContext* globalCtx, ColliderQuad* collider, WeaponInfo* weaponInfo, Vec3f* arg3, Vec3f* arg4); // void func_801265C8(void); // void func_8012669C(void); // void func_80126808(void); diff --git a/include/z64actor.h b/include/z64actor.h index ee73ae8afc..c7724bcd74 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -256,6 +256,9 @@ struct EnItem00; typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct GlobalContext*); +#define ENITEM00_GET_8000(thisx) ((thisx)->params & 0x8000) +#define ENITEM00_GET_7F00(thisx) (((thisx)->params & 0x7F00) >> 8) + typedef struct EnItem00 { /* 0x000 */ Actor actor; /* 0x144 */ EnItem00ActionFunc actionFunc; diff --git a/spec b/spec index 83cc52b260..46402feea8 100644 --- a/spec +++ b/spec @@ -924,8 +924,7 @@ beginseg name "ovl_En_Boom" compress include "build/src/overlays/actors/ovl_En_Boom/z_en_boom.o" - include "build/data/ovl_En_Boom/ovl_En_Boom.data.o" - include "build/data/ovl_En_Boom/ovl_En_Boom.reloc.o" + include "build/src/overlays/actors/ovl_En_Boom/ovl_En_Boom_reloc.o" endseg beginseg diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index b8fa0f4f10..3bec8471b0 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -68,9 +68,9 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { f32 shadowOffset = 980.0f; f32 shadowScale = 6.0f; s32 getItemId = GI_NONE; - s32 sp30 = (this->actor.params & 0x8000) ? 1 : 0; + s32 sp30 = ENITEM00_GET_8000(&this->actor) ? 1 : 0; - this->collectibleFlag = (this->actor.params & 0x7F00) >> 8; + this->collectibleFlag = ENITEM00_GET_7F00(&this->actor); thisx->params &= 0xFF; // Has to be thisx to match diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 0094052388..b0a61382ca 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -312,13 +312,13 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_MultiplyVector3fByState(&D_808C1C10, &this->unk1E0); Matrix_MultiplyVector3fByState(&D_808C1C28, &sp5C); Matrix_MultiplyVector3fByState(&D_808C1C34, &sp50); - this->unk1C4 = 0; + this->unk1C4.active = false; } else { Matrix_MultiplyVector3fByState(&D_808C1C1C, &this->unk1E0); Matrix_MultiplyVector3fByState(&D_808C1C40, &sp5C); Matrix_MultiplyVector3fByState(&D_808C1C4C, &sp50); } - func_80126440(globalCtx, &this->collider.base, &this->unk1C4, &sp5C, &sp50); + func_80126440(globalCtx, &this->collider, &this->unk1C4, &sp5C, &sp50); func_8012C28C(globalCtx->state.gfxCtx); func_80122868(globalCtx, player); diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h index ecccf5ff05..527d37b61e 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h @@ -10,8 +10,7 @@ typedef void (*ArmsHookActionFunc)(struct ArmsHook*, GlobalContext*); typedef struct ArmsHook { /* 0x000 */ Actor actor; /* 0x144 */ ColliderQuad collider; - /* 0x1C4 */ s32 unk1C4; - /* 0x1C8 */ char unk1C8[0x18]; + /* 0x1C4 */ WeaponInfo unk1C4; /* 0x1E0 */ Vec3f unk1E0; /* 0x1EC */ Vec3f unk1EC; /* 0x1F8 */ Actor* grabbed; diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index f1dc5c6f6a..45cc5bdae5 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -581,7 +581,7 @@ void func_8088B88C(GlobalContext* globalCtx, EnArrow* this, EnArrowUnkStruct* ar Matrix_MultiplyVector3fByState(&arg2->unk_48, &this->unk_234); if (func_8088ACE0 == this->actionFunc) { - if (this->unk_244 == 0) { + if (!this->unk_244.active) { sp4C = arg2->unk_00; } else { sp4C = arg2->unk_18[globalCtx->gameplayFrames % 2]; @@ -591,9 +591,10 @@ void func_8088B88C(GlobalContext* globalCtx, EnArrow* this, EnArrowUnkStruct* ar if (this->actor.params < ENARROW_8) { sp30 = this->actor.params < ENARROW_6; if (this->unk_264 == 0) { - sp30 &= func_80126440(globalCtx, &this->collider.base, &this->unk_244, &sp40, &sp34); - } else if (sp30 && (sp40.x == this->unk_248) && (sp40.y == this->unk_24C) && (sp40.z == this->unk_250) && - (sp34.x == this->unk_254) && (sp34.y == this->unk_258) && (sp34.z == this->unk_25C)) { + sp30 &= func_80126440(globalCtx, &this->collider, &this->unk_244, &sp40, &sp34); + } else if (sp30 && (sp40.x == this->unk_244.tip.x) && (sp40.y == this->unk_244.tip.y) && + (sp40.z == this->unk_244.tip.z) && (sp34.x == this->unk_244.base.x) && + (sp34.y == this->unk_244.base.y) && (sp34.z == this->unk_244.base.z)) { sp30 = false; } if (sp30) { diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h index f318cf1528..654e8bea62 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h @@ -43,13 +43,7 @@ typedef struct EnArrow { /* 0x228 */ Vec3f unk_228; /* 0x234 */ Vec3f unk_234; /* 0x240 */ s32 unk_240; - /* 0x244 */ s32 unk_244; - /* 0x248 */ f32 unk_248; - /* 0x24C */ f32 unk_24C; - /* 0x250 */ f32 unk_250; - /* 0x254 */ f32 unk_254; - /* 0x258 */ f32 unk_258; - /* 0x25C */ f32 unk_25C; + /* 0x244 */ WeaponInfo unk_244; /* 0x260 */ u8 unk_260; // timer in OoT /* 0x261 */ u8 unk_261; // hitFlags in OoT /* 0x262 */ u8 unk_262; diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 930b1b597c..15347d0ea8 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -5,6 +5,7 @@ */ #include "z_en_boom.h" +#include "objects/gameplay_keep/gameplay_keep.h" #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20) @@ -15,11 +16,9 @@ void EnBoom_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBoom_Update(Actor* thisx, GlobalContext* globalCtx); void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx); +void EnBoom_SetupAction(EnBoom* this, EnBoomActionFunc actionFunc); void func_808A2918(EnBoom* this, GlobalContext* globalCtx); -void EnBoom_SetupAction(EnBoom* this, EnBoomActionFunc actionFunc); - -#if 0 const ActorInit En_Boom_InitVars = { ACTOR_EN_BOOM, ACTORCAT_ITEMACTION, @@ -32,34 +31,316 @@ const ActorInit En_Boom_InitVars = { (ActorFunc)EnBoom_Draw, }; -// static ColliderQuadInit sQuadInit = { -static ColliderQuadInit D_808A3010 = { - { COLTYPE_NONE, AT_ON | AT_TYPE_PLAYER, AC_NONE, OC1_NONE, OC2_TYPE_PLAYER, COLSHAPE_QUAD, }, - { ELEMTYPE_UNK2, { 0x00000010, 0x00, 0x02 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_NORMAL, BUMP_NONE, OCELEM_NONE, }, +static ColliderQuadInit sQuadInit = { + { + COLTYPE_NONE, + AT_ON | AT_TYPE_PLAYER, + AC_NONE, + OC1_NONE, + OC2_TYPE_PLAYER, + COLSHAPE_QUAD, + }, + { + ELEMTYPE_UNK2, + { 0x00000010, 0x00, 0x02 }, + { 0xF7CFFFFF, 0x00, 0x00 }, + TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_NORMAL, + BUMP_NONE, + OCELEM_NONE, + }, { { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } }, }; -// static InitChainEntry sInitChain[] = { -static InitChainEntry D_808A3060[] = { +static InitChainEntry sInitChain[] = { ICHAIN_S8(targetMode, 5, ICHAIN_CONTINUE), ICHAIN_VEC3S(shape.rot, 0, ICHAIN_STOP), }; -#endif +void EnBoom_SetupAction(EnBoom* this, EnBoomActionFunc actionFunc) { + this->actionFunc = actionFunc; +} -extern ColliderQuadInit D_808A3010; -extern InitChainEntry D_808A3060[]; +void func_808A24DC(EnBoom* this, GlobalContext* globalCtx) { + WaterBox* sp54; + f32 sp50 = this->actor.world.pos.y; + u16 sp4E = this->actor.bgCheckFlags & 0x20; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Boom/EnBoom_SetupAction.s") + if (WaterBox_GetSurface1(globalCtx, &globalCtx->colCtx, this->actor.world.pos.x, this->actor.world.pos.z, &sp50, + &sp54) && + (this->actor.world.pos.y < sp50)) { + Vec3f sp40; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Boom/func_808A24DC.s") + this->actor.bgCheckFlags |= 0x20; + sp40.x = this->actor.world.pos.x; + sp40.y = this->actor.world.pos.y - 20.0f; + sp40.z = this->actor.world.pos.z; + EffectSsBubble_Spawn(globalCtx, &sp40, 20.0f, 10.0f, 20.0f, 0.13f); + } else { + this->actor.bgCheckFlags &= ~0x20; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Boom/EnBoom_Init.s") + if ((this->actor.bgCheckFlags & 0x40) && ((this->actor.bgCheckFlags & 0x20) != sp4E)) { + Vec3f sp34; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Boom/EnBoom_Destroy.s") + Math_Vec3f_Diff(&this->actor.world.pos, &this->actor.prevPos, &sp34); + if (sp34.y != 0.0f) { + f32 temp_fv0 = sqrtf(SQ(sp34.x) + SQ(sp34.z)); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Boom/func_808A2918.s") + if (temp_fv0 != 0.0f) { + temp_fv0 = (((sp50 - this->actor.prevPos.y) / sp34.y) * temp_fv0) / temp_fv0; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Boom/EnBoom_Update.s") + sp34.x = this->actor.prevPos.x + (sp34.x * temp_fv0); + sp34.y = sp50; + sp34.z = this->actor.prevPos.z + (sp34.z * temp_fv0); + EffectSsGSplash_Spawn(globalCtx, &sp34, NULL, NULL, 0, 300); + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Boom/EnBoom_Draw.s") + Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_DIVE_INTO_WATER_L); + + EffectSsGRipple_Spawn(globalCtx, &sp34, 100, 500, 0); + EffectSsGRipple_Spawn(globalCtx, &sp34, 100, 500, 4); + EffectSsGRipple_Spawn(globalCtx, &sp34, 100, 500, 8); + } + + this->actor.bgCheckFlags |= 0x40; +} + +void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx) { + static u8 D_808A3068[4] = { 255, 255, 100, 255 }; + static u8 D_808A306C[4] = { 255, 255, 100, 64 }; + static u8 D_808A3070[4] = { 255, 255, 100, 0 }; + static u8 D_808A3074[4] = { 255, 255, 100, 0 }; + s32 pad; + EnBoom* this = THIS; + EffectBlureInit1 sp30; + s32 i; + + this->actor.room = -1; + Actor_ProcessInitChain(&this->actor, sInitChain); + + for (i = 0; i < 4; i++) { + sp30.p1StartColor[i] = D_808A3068[i]; + sp30.p2StartColor[i] = D_808A306C[i]; + sp30.p1EndColor[i] = D_808A3070[i]; + sp30.p2EndColor[i] = D_808A3074[i]; + } + + sp30.elemDuration = 8; + sp30.unkFlag = 0; + sp30.calcMode = 0; + + Effect_Add(globalCtx, &this->effectIndex, 1, 0, 0, &sp30); + + Collider_InitQuad(globalCtx, &this->collider); + Collider_SetQuad(globalCtx, &this->collider, &this->actor, &sQuadInit); + EnBoom_SetupAction(this, func_808A2918); +} + +void EnBoom_Destroy(Actor* thisx, GlobalContext* globalCtx) { + EnBoom* this = THIS; + Player* player = GET_PLAYER(globalCtx); + Actor* temp; + + if (player != NULL) { + Effect_Destroy(globalCtx, this->effectIndex); + Collider_DestroyQuad(globalCtx, &this->collider); + + temp = this->actor.child; + if (temp != NULL) { + temp->parent = NULL; + player->boomerangActor = temp; + } else { + temp = this->actor.parent; + if (temp != NULL) { + temp->child = NULL; + } else { + player->boomerangActor = NULL; + player->stateFlags1 &= ~0x2000000; + } + } + player->stateFlags3 |= 0x800000; + } +} + +void func_808A2918(EnBoom* this, GlobalContext* globalCtx) { + Actor* sp7C; + Player* player = GET_PLAYER(globalCtx); + s32 sp74; + s16 sp72; + s16 sp70; + s16 sp6E; + s16 sp6C; + Actor* temp; + f32 sp64; + f32 distXYZ; + + sp7C = this->player; + + if (sp7C != NULL) { + sp72 = Actor_YawToPoint(&this->actor, &sp7C->focus.pos); + sp70 = this->actor.world.rot.y - sp72; + sp6E = Actor_PitchToPoint(&this->actor, &sp7C->focus.pos); + sp6C = this->actor.world.rot.x - sp6E; + + sp64 = (200.0f - Math_Vec3f_DistXYZ(&this->actor.world.pos, &sp7C->focus.pos)) * 0.005f; + if (sp64 < 0.12f) { + sp64 = 0.12f; + } + + if ((&player->actor != sp7C) && ((sp7C->update == NULL) || ((this->unk_1CF < 0) && (ABS_ALT(sp70) > 0x4000)))) { + this->player = NULL; + } else { + if (this->unk_1CE != 0) { + this->unk_1CE--; + this->actor.world.rot.y += (this->actor.params == 0) ? 0x190 : -0x190; + } else { + if (this->unk_1CF > 0) { + this->unk_1CF--; + } else { + this->unk_1CF = -1; + } + + Math_ScaledStepToS(&this->actor.world.rot.y, sp72, + (this->unk_1CF > 0) ? 1000 : (s16)(((sp70 < 0) ? -sp70 : sp70) * sp64)); + } + + Math_ScaledStepToS(&this->actor.world.rot.x, sp6E, ABS_ALT(sp6C) * sp64); + } + } + + Actor_SetSpeeds(&this->actor, 12.0f); + Actor_MoveWithGravity(&this->actor); + func_808A24DC(this, globalCtx); + func_800B9010(&this->actor, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG); + + if ((this->collider.base.atFlags & AT_HIT) && (((this->collider.base.at->id == ACTOR_EN_ITEM00) && + (this->collider.base.at->params != ITEM00_HEART_CONTAINER) && + (this->collider.base.at->params != ITEM00_HEART_PIECE)) || + (this->collider.base.at->id == ACTOR_EN_SI))) { + this->unk_1C8 = this->collider.base.at; + if (this->collider.base.at->id == ACTOR_EN_SI) { + this->collider.base.at->flags |= 0x2000; + } + } + + if (DECR(this->unk_1CC) != 0) { + s32 sp5C; + Vec3f sp50; + s32 pad; + + sp74 = BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.prevPos, &this->actor.world.pos, &sp50, + &this->actor.wallPoly, true, true, true, true, &sp5C); + if (sp74 != 0) { + if (func_800B90AC(globalCtx, &this->actor, this->actor.wallPoly, sp5C, &sp50)) { + sp74 = 0; + } else { + CollisionCheck_SpawnShieldParticlesMetal(globalCtx, &sp50); + } + } + + if (sp74 != 0) { + this->actor.world.rot.x = -this->actor.world.rot.x; + this->actor.world.rot.y += 0x8000; + this->player = &player->actor; + this->unk_1CC = 0; + } + } + + if (this->unk_1CC <= 16) { + distXYZ = Math_Vec3f_DistXYZ(&this->actor.world.pos, &player->actor.focus.pos); + + if (&player->actor != this->player) { + if (this->player == 0) { + this->unk_1CE = 8; + } + this->player = &player->actor; + } + + if (distXYZ < 40.0f) { + sp7C = this->unk_1C8; + if (sp7C != NULL) { + Math_Vec3f_Copy(&sp7C->world.pos, &player->actor.world.pos); + if (sp7C->id == ACTOR_EN_ITEM00) { + sp7C->gravity = -0.9f; + sp7C->bgCheckFlags &= ~3; + } else { + sp7C->flags &= -0x2001; + } + } + Actor_MarkForDeath(&this->actor); + } + } + + sp7C = this->unk_1C8; + if (sp7C != NULL) { + if (sp7C->update == NULL) { + this->unk_1C8 = NULL; + } else { + Math_Vec3f_Copy(&sp7C->world.pos, &this->actor.world.pos); + } + } +} + +void EnBoom_Update(Actor* thisx, GlobalContext* globalCtx) { + EnBoom* this = THIS; + Player* player = GET_PLAYER(globalCtx); + Actor* actor; + + if (!(player->stateFlags1 & 0x20000000)) { + this->actionFunc(this, globalCtx); + + if (((actor = this->actor.child) != NULL) || ((actor = this->actor.parent) != NULL)) { + this->actor.focus.pos.x = (this->actor.world.pos.x + actor->world.pos.x) * 0.5f; + this->actor.focus.pos.y = (this->actor.world.pos.y + actor->world.pos.y) * 0.5f; + this->actor.focus.pos.z = (this->actor.world.pos.z + actor->world.pos.z) * 0.5f; + } else { + Actor_SetFocus(&this->actor, 0.0f); + } + + if (this->actor.params != 0) { + this->unk_1CD--; + } else { + this->unk_1CD++; + } + } +} + +typedef struct { + /* 0x00 */ Gfx* unk_00; + /* 0x04 */ Vec3f unk_04; + /* 0x10 */ Vec3f unk_10; +} EnBoomStruct; + +EnBoomStruct D_808A3078[] = { + { gameplay_keep_DL_06FE20, { -960.0f, 0.0f, 0.0f }, { 960.0f, 0.0f, 0.0f } }, + { gameplay_keep_DL_06FF68, { -960.0f, 0.0f, 0.0f }, { 960.0f, 0.0f, 0.0f } }, +}; + +void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) { + EnBoom* this = THIS; + EnBoomStruct* sp58 = &D_808A3078[this->actor.params]; + Vec3f sp4C; + Vec3f sp40; + + OPEN_DISPS(globalCtx->state.gfxCtx); + + Matrix_RotateY(this->actor.world.rot.y, MTXMODE_APPLY); + + Matrix_InsertZRotation_s((this->actor.params != 0) ? 0x1F40 : -0x1F40, MTXMODE_APPLY); + Matrix_InsertXRotation_s(this->actor.world.rot.x, MTXMODE_APPLY); + Matrix_MultiplyVector3fByState(&sp58->unk_04, &sp4C); + Matrix_MultiplyVector3fByState(&sp58->unk_10, &sp40); + + if (func_80126440(globalCtx, &this->collider, &this->weaponInfo, &sp4C, &sp40)) { + EffectBlure_AddVertex(Effect_GetByIndex(this->effectIndex), &sp4C, &sp40); + } + + func_8012C28C(globalCtx->state.gfxCtx); + Matrix_RotateY(this->unk_1CD * 0x2EE0, MTXMODE_APPLY); + + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_OPA_DISP++, sp58->unk_00); + + CLOSE_DISPS(globalCtx->state.gfxCtx); +} diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.h b/src/overlays/actors/ovl_En_Boom/z_en_boom.h index 906e592a57..0aa09f15b0 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.h +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.h @@ -9,7 +9,15 @@ typedef void (*EnBoomActionFunc)(struct EnBoom*, GlobalContext*); typedef struct EnBoom { /* 0x0000 */ Actor actor; - /* 0x0144 */ char unk_144[0xAC]; + /* 0x0144 */ ColliderQuad collider; + /* 0x01C4 */ Actor* player; + /* 0x01C8 */ Actor* unk_1C8; + /* 0x01CC */ u8 unk_1CC; + /* 0x01CD */ u8 unk_1CD; + /* 0x01CE */ u8 unk_1CE; + /* 0x01CF */ s8 unk_1CF; + /* 0x01D0 */ s32 effectIndex; + /* 0x01D4 */ WeaponInfo weaponInfo; /* 0x01F0 */ EnBoomActionFunc actionFunc; } EnBoom; // size = 0x1F4 diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index 5827c7261a..fd8ee4d450 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -6351,24 +6351,12 @@ 0x808A2300:("D_808A2300","f32","",0x4), 0x808A2304:("D_808A2304","f32","",0x4), 0x808A2FF0:("En_Boom_InitVars","UNK_TYPE1","",0x1), - 0x808A3010:("D_808A3010","UNK_TYPE1","",0x1), - 0x808A3060:("D_808A3060","UNK_TYPE1","",0x1), - 0x808A3068:("D_808A3068","UNK_TYPE1","",0x1), - 0x808A3069:("D_808A3069","UNK_TYPE1","",0x1), - 0x808A306A:("D_808A306A","UNK_TYPE1","",0x1), - 0x808A306B:("D_808A306B","UNK_TYPE1","",0x1), - 0x808A306C:("D_808A306C","UNK_TYPE1","",0x1), - 0x808A306D:("D_808A306D","UNK_TYPE1","",0x1), - 0x808A306E:("D_808A306E","UNK_TYPE1","",0x1), - 0x808A306F:("D_808A306F","UNK_TYPE1","",0x1), - 0x808A3070:("D_808A3070","UNK_TYPE1","",0x1), - 0x808A3071:("D_808A3071","UNK_TYPE1","",0x1), - 0x808A3072:("D_808A3072","UNK_TYPE1","",0x1), - 0x808A3073:("D_808A3073","UNK_TYPE1","",0x1), - 0x808A3074:("D_808A3074","UNK_TYPE1","",0x1), - 0x808A3075:("D_808A3075","UNK_TYPE1","",0x1), - 0x808A3076:("D_808A3076","UNK_TYPE1","",0x1), - 0x808A3077:("D_808A3077","UNK_TYPE1","",0x1), + 0x808A3010:("sQuadInit","UNK_TYPE1","",0x1), + 0x808A3060:("sInitChain","UNK_TYPE1","",0x1), + 0x808A3068:("D_808A3068","Color_RGBA8","",0x4), + 0x808A306C:("D_808A306C","Color_RGBA8","",0x4), + 0x808A3070:("D_808A3070","Color_RGBA8","",0x4), + 0x808A3074:("D_808A3074","Color_RGBA8","",0x4), 0x808A3078:("D_808A3078","UNK_TYPE4","",0x4), 0x808A30B0:("D_808A30B0","f32","",0x4), 0x808A30B4:("D_808A30B4","f32","",0x4),