mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
En_Baguo (Nejiron) OK and mostly documented (#351)
* Migrate data to C * EnBaguo_Init OK * EnBaguo_Destroy OK * func_80A3B220 OK * func_80A3B2CC OK * func_80A3B2CC OK * func_80A3B794 OK * func_80A3B5E0 OK * func_80A3B7B8 OK * EnBaguo_Update OK * func_80A3B8F8 * func_80A3BE24 OK, some other not-OK junk * func_80A3BE60 OK (wow this is bad!) * Document the blink system * func_80A3C17C OK * Document timer and fix warnings * func_80A3C008 OK * Rename x/y/z so it's clear they are positions * func_80A3BE60 OK in a not-crazy way * func_80A3B958 OK * func_80A3BF0C OK * Make the rotation a Vec3s * Update the spec to use the built reloc * Use ARRAY_COUNT instead of hardcoded length * Document the state stuff * Document NejironParticle * Document the rolling rotation stuff * unk_1BC -> maxDistanceFromHome * unk_1B8 -> zRollDirection * Name the two draw functions * Name the static variables properly * Name all other functions * Clean up forward declares * Last bit of documentation and cleanup * Add an enum for the rolling direction * Add explanatory comment * state -> action and move action descriptions inline * Use enum for Stone Mask * Use "Setup" for the setup function * Document the damage effect * Add some space around the for-loop * ./format.sh * Use % 8 everywhere * Use -= instead of += a negative number * Switch order of max check * Use CLEAR_TAG_POP enum value * eyeIndexTemp -> eyeIndex * visible -> isVisible * Move enums above structs * Merge animation system changes * yDist fix * Respond to review feedback
This commit is contained in:
@@ -2863,8 +2863,7 @@ beginseg
|
||||
name "ovl_En_Baguo"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Baguo/z_en_baguo.o"
|
||||
include "build/data/ovl_En_Baguo/ovl_En_Baguo.data.o"
|
||||
include "build/data/ovl_En_Baguo/ovl_En_Baguo.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Baguo/ovl_En_Baguo_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,11 +7,53 @@ struct EnBaguo;
|
||||
|
||||
typedef void (*EnBaguoActionFunc)(struct EnBaguo*, GlobalContext*);
|
||||
|
||||
typedef enum {
|
||||
/* 0x0 */ NEJIRON_ACTION_INACTIVE, // The Nejiron is either underground or emerging from underground
|
||||
/* 0x1 */ NEJIRON_ACTION_ACTIVE, // The Nejiron is above ground and actively chasing the player
|
||||
/* 0x2 */ NEJIRON_ACTION_RETREATING, // The Nejiron is burrowing back underground
|
||||
/* 0x3 */ NEJIRON_ACTION_EXPLODING // The Nejiron has detonated
|
||||
} NejironAction;
|
||||
|
||||
/**
|
||||
* These directions are relative to the Nejiron.
|
||||
*/
|
||||
typedef enum {
|
||||
/* 0x0 */ NEJIRON_DIRECTION_RIGHT,
|
||||
/* 0x1 */ NEJIRON_DIRECTION_LEFT
|
||||
} NejironRollDirection;
|
||||
|
||||
/**
|
||||
* When a Nejiron explodes, rock particles fly out from where it exploded.
|
||||
* This struct governs how these rock particles behave.
|
||||
*/
|
||||
typedef struct NejironParticle {
|
||||
/* 0x00 */ u8 isVisible;
|
||||
/* 0x04 */ Vec3f position;
|
||||
/* 0x10 */ Vec3f velocity;
|
||||
/* 0x1C */ Vec3f acceleration;
|
||||
/* 0x28 */ Vec3s rotation;
|
||||
/* 0x30 */ f32 scale;
|
||||
/* 0x34 */ s16 timer;
|
||||
} NejironParticle; // size = 0x38
|
||||
|
||||
typedef struct EnBaguo {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ char unk_144[0x68];
|
||||
/* 0x01AC */ EnBaguoActionFunc actionFunc;
|
||||
/* 0x01B0 */ char unk_1B0[0x71C];
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ Vec3s jointTable[3];
|
||||
/* 0x19A */ Vec3s morphTable[3];
|
||||
/* 0x1AC */ EnBaguoActionFunc actionFunc;
|
||||
/* 0x1B0 */ s16 eyeIndex;
|
||||
/* 0x1B2 */ s16 blinkTimer;
|
||||
/* 0x1B4 */ s16 timer;
|
||||
/* 0x1B6 */ s16 action;
|
||||
/* 0x1B8 */ s16 zRollDirection;
|
||||
/* 0x1BC */ f32 maxDistanceFromHome;
|
||||
/* 0x1C0 */ u8 hardHitFlag;
|
||||
/* 0x1C4 */ Vec3f currentRotation;
|
||||
/* 0x1D0 */ Vec3f targetRotation;
|
||||
/* 0x1DC */ ColliderJntSph collider;
|
||||
/* 0x1FC */ ColliderJntSphElement colliderElements[1];
|
||||
/* 0x23C */ NejironParticle particles[30];
|
||||
} EnBaguo; // size = 0x8CC
|
||||
|
||||
extern const ActorInit En_Baguo_InitVars;
|
||||
|
||||
+13
-13
@@ -10297,20 +10297,20 @@
|
||||
0x80A3AEC8:("DmTsg_Draw",),
|
||||
0x80A3B080:("EnBaguo_Init",),
|
||||
0x80A3B1F4:("EnBaguo_Destroy",),
|
||||
0x80A3B220:("func_80A3B220",),
|
||||
0x80A3B2CC:("func_80A3B2CC",),
|
||||
0x80A3B3E0:("func_80A3B3E0",),
|
||||
0x80A3B5E0:("func_80A3B5E0",),
|
||||
0x80A3B794:("func_80A3B794",),
|
||||
0x80A3B7B8:("func_80A3B7B8",),
|
||||
0x80A3B8F8:("func_80A3B8F8",),
|
||||
0x80A3B958:("func_80A3B958",),
|
||||
0x80A3B220:("EnBaguo_UndergroundIdle",),
|
||||
0x80A3B2CC:("EnBaguo_EmergeFromUnderground",),
|
||||
0x80A3B3E0:("EnBaguo_Idle",),
|
||||
0x80A3B5E0:("EnBaguo_Roll",),
|
||||
0x80A3B794:("EnBaguo_SetupRetreatUnderground",),
|
||||
0x80A3B7B8:("EnBaguo_RetreatUnderground",),
|
||||
0x80A3B8F8:("EnBaguo_PostDetonation",),
|
||||
0x80A3B958:("EnBaguo_CheckForDetonation",),
|
||||
0x80A3BC88:("EnBaguo_Update",),
|
||||
0x80A3BE24:("func_80A3BE24",),
|
||||
0x80A3BE60:("func_80A3BE60",),
|
||||
0x80A3BF0C:("func_80A3BF0C",),
|
||||
0x80A3C008:("func_80A3C008",),
|
||||
0x80A3C17C:("func_80A3C17C",),
|
||||
0x80A3BE24:("EnBaguo_PostLimbDraw",),
|
||||
0x80A3BE60:("EnBaguo_DrawBody",),
|
||||
0x80A3BF0C:("EnBaguo_InitializeParticle",),
|
||||
0x80A3C008:("EnBaguo_UpdateParticles",),
|
||||
0x80A3C17C:("EnBaguo_DrawRockParticles",),
|
||||
0x80A3C4E0:("func_80A3C4E0",),
|
||||
0x80A3C560:("func_80A3C560",),
|
||||
0x80A3C658:("func_80A3C658",),
|
||||
|
||||
@@ -1514,6 +1514,9 @@ D_060092A0 = 0x060092A0;
|
||||
|
||||
// ovl_En_Baguo
|
||||
|
||||
D_060014C8 = 0x060014C8;
|
||||
D_060018C8 = 0x060018C8;
|
||||
D_06001CC8 = 0x06001CC8;
|
||||
D_060020E8 = 0x060020E8;
|
||||
|
||||
// ovl_En_Baisen
|
||||
|
||||
Reference in New Issue
Block a user