1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 14:34:32 +00:00

Gohma (ovl_Boss_Goma) (#397)

* ovl_Boss_Goma OK, except func_80917D98

* ovl_Boss_Goma OK and documented

* Minor cleanup: shorten enums, use named constants...

* Floats with .0f, less useless static usage, details on oversight about spawning child gohmas, cleanup...

* More documentation, hopefully less weird about documenting setups and actions

* fix fhg_fire

* remove warnings

* formatting things

* newlines

* review

Co-authored-by: Fig02 <fig02srl@gmail.com>
This commit is contained in:
Dragorn421 2021-04-03 22:58:33 +02:00 committed by GitHub
parent 9834f5517e
commit 288320317c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 2018 additions and 6294 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,11 +6,61 @@
struct BossGoma;
typedef void (*BossGomaActionFunc)(struct BossGoma*, GlobalContext*);
typedef struct BossGoma {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x70];
/* 0x014C */ SkelAnime skelanime;
/* 0x0190 */ BossGomaActionFunc actionFunc;
/* 0x0194 */ s16 frameCount; // also used as a timer
/* 0x0196 */ s16 patienceTimer; // when non-0: walk towards player, can be stunned
/* 0x0198 */ s16 eyeLidBottomRotX;
/* 0x019A */ s16 eyeLidTopRotX;
/* 0x019C */ s16 eyeClosedTimer; // also used as a second invincibility frames source
/* 0x019E */ s16 eyeIrisRotX;
/* 0x01A0 */ s16 eyeIrisRotY;
/* 0x01A2 */ s16 unusedTimer;
/* 0x01A4 */ s16 childrenGohmaState[3]; // 0 not spawned, 1 spawned, -1 dead (-1 set by child gohma)
/* 0x01AA */ s16 tailLimbsScaleTimers[4];
/* 0x01B2 */ s16 spawnGohmasActionTimer;
/* 0x01B4 */ s16 eyeState;
/* 0x01B6 */ s16 doNotMoveThisFrame;
/* 0x01B8 */ s16 visualState;
/* 0x01BA */ s16 invincibilityFrames;
/* 0x01BC */ s16 subCameraId;
/* 0x01BE */ char unk_1BE[0x95E];
/* 0x01BE */ s16 disableGameplayLogic;
/* 0x01C0 */ s16 decayingProgress; // when defeated, textures are progressively cleared
/* 0x01C2 */ s16 noBackfaceCulling;
/* 0x01C4 */ s16 blinkTimer;
/* 0x01C6 */ s16 lookedAtFrames;
/* 0x01C8 */ char unk_1C8[0x8];
/* 0x01D0 */ s16 actionState;
/* 0x01D2 */ s16 framesUntilNextAction; // not always used as named
/* 0x01D4 */ s16 timer;
/* 0x01D6 */ s16 sfxFaintTimer;
/* 0x01D8 */ char unk_1D8[0x10];
/* 0x01E8 */ f32 tailLimbsScale[4];
/* 0x01F8 */ f32 eyeIrisScaleX;
/* 0x01FC */ f32 unusedInitX;
/* 0x0200 */ f32 unusedInitZ;
/* 0x0204 */ f32 mainEnvColor[3];
/* 0x0210 */ f32 eyeEnvColor[3];
/* 0x021C */ f32 currentAnimFrameCount; // not used consistently
/* 0x0220 */ f32 subCameraFollowSpeed;
/* 0x0224 */ f32 eyeIrisScaleY;
/* 0x0228 */ f32 defeatedCameraEyeDist;
/* 0x022C */ f32 defeatedCameraEyeAngle;
/* 0x0230 */ char unk_230[0x30];
/* 0x0260 */ Vec3f lastTailLimbWorldPos;
/* 0x026C */ Vec3f firstTailLimbWorldPos;
/* 0x0278 */ Vec3f rightHandBackLimbWorldPos;
/* 0x0284 */ Vec3f leftHandBackLimbWorldPos;
/* 0x0290 */ Vec3f subCameraEye;
/* 0x029C */ Vec3f subCameraAt;
/* 0x02A8 */ Vec3f defeatedLimbPositions[100]; // only 85/86 first indices actually used
/* 0x0758 */ u8 deadLimbsState[100]; // only 85/90 first indices actually used
/* 0x07BC */ ColliderJntSph collider;
/* 0x07DC */ ColliderJntSphElement colliderItems[13];
} BossGoma; // size = 0x0B1C
extern const ActorInit Boss_Goma_InitVars;

View file

@ -312,7 +312,6 @@ void EnFhgFire_LightningShock(EnFhgFire* this, GlobalContext* globalCtx) {
void EnFhgFire_LightningBurst(EnFhgFire* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s32 pad;
globalCtx->envCtx.unk_E1 = 0x01;
this->actor.shape.rot.y += 0x1000;
@ -326,11 +325,9 @@ void EnFhgFire_LightningBurst(EnFhgFire* this, GlobalContext* globalCtx) {
globalCtx->envCtx.unk_D6 = 0x14;
}
if (this->work[FHGFIRE_FX_TIMER] >= 48) {
globalCtx->envCtx.unk_E2[2] = 0xFF;
globalCtx->envCtx.unk_E2[1] = 0xFF;
globalCtx->envCtx.unk_E2[0] = 0xFF;
globalCtx->envCtx.unk_E2[0] = globalCtx->envCtx.unk_E2[1] = globalCtx->envCtx.unk_E2[2] = 0xFF;
if (((this->work[FHGFIRE_TIMER] & 0xFF) % 2) != 0) {
if ((this->work[FHGFIRE_TIMER] % 2) != 0) {
globalCtx->envCtx.unk_E2[3] = 0x46;
} else {
globalCtx->envCtx.unk_E2[3] = 0x00;

View file

@ -8,7 +8,9 @@ struct EnGoma;
typedef struct EnGoma {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x258];
/* 0x014C */ char unk_14C[0x1BC];
/* 0x0308 */ Gfx* unk_308; // set by z_boss_goma
/* 0x030C */ char unk_30C[0x98];
} EnGoma; // size = 0x03A4
extern const ActorInit En_Goma_InitVars;