mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +00:00
Document en_viewer (cutscene npcs) (#898)
* document en_viewer * `EnViewerAnimFunc` -> `EnViewerInitDrawFunc` * Document `EnGanonMant`-related code * Run formatter * Cleanup undefined_syms.txt * Ganon -> Ganondorf * InitDraw -> InitAnim * `EnViewer#draw` -> `isVisible` * Remove `#define TYPE`, use params directly * Run formatter * Clarify comment about `Actor_MoveForward` having no effect * Remove clang-format cheat * Change `sInitData` index comments from decimal to enum names * Move data to get rid of forward declarations * Remove not really useful comment * `sShadowFuncs` -> `sShadowDrawFuncs`
This commit is contained in:
parent
9b89ec5fac
commit
bfc36c57bf
2 changed files with 366 additions and 306 deletions
File diff suppressed because it is too large
Load diff
|
@ -8,28 +8,55 @@ struct EnViewer;
|
||||||
|
|
||||||
typedef void (*EnViewerActionFunc)(struct EnViewer*, GlobalContext*);
|
typedef void (*EnViewerActionFunc)(struct EnViewer*, GlobalContext*);
|
||||||
typedef void (*EnViewerDrawFunc)(struct EnViewer*, GlobalContext*);
|
typedef void (*EnViewerDrawFunc)(struct EnViewer*, GlobalContext*);
|
||||||
typedef void (*EnViewerAnimFunc)(struct EnViewer*, GlobalContext*, void*, AnimationHeader*);
|
typedef void (*EnViewerInitAnimFunc)(struct EnViewer*, GlobalContext*, void*, AnimationHeader*);
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
/* 0 */ ENVIEWER_TYPE_0_HORSE_ZELDA,
|
||||||
|
/* 1 */ ENVIEWER_TYPE_1_IMPA,
|
||||||
|
/* 2 */ ENVIEWER_TYPE_2_ZELDA,
|
||||||
|
/* 3 */ ENVIEWER_TYPE_3_GANONDORF,
|
||||||
|
/* 4 */ ENVIEWER_TYPE_4_HORSE_GANONDORF,
|
||||||
|
/* 5 */ ENVIEWER_TYPE_5_GANONDORF,
|
||||||
|
/* 6 */ ENVIEWER_TYPE_6_HORSE_GANONDORF,
|
||||||
|
/* 7 */ ENVIEWER_TYPE_7_GANONDORF,
|
||||||
|
/* 8 */ ENVIEWER_TYPE_8_GANONDORF,
|
||||||
|
/* 9 */ ENVIEWER_TYPE_9_GANONDORF
|
||||||
|
} EnViewerType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
/* 0 */ ENVIEWER_DRAW_GANONDORF,
|
||||||
|
/* 1 */ ENVIEWER_DRAW_HORSE,
|
||||||
|
/* 2 */ ENVIEWER_DRAW_ZELDA,
|
||||||
|
/* 3 */ ENVIEWER_DRAW_IMPA
|
||||||
|
} EnViewerDrawType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
/* 0 */ ENVIEWER_SHADOW_NONE,
|
||||||
|
/* 1 */ ENVIEWER_SHADOW_CIRCLE,
|
||||||
|
/* 2 */ ENVIEWER_SHADOW_HORSE
|
||||||
|
} EnViewerShadowType;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x00 */ s16 objId1;
|
/* 0x00 */ s16 skeletonObject;
|
||||||
/* 0x02 */ s16 objId2;
|
/* 0x02 */ s16 animObject;
|
||||||
/* 0x04 */ u8 scale;
|
/* 0x04 */ u8 scale; // divided by 100.0f
|
||||||
/* 0x05 */ s8 unk_5;
|
/* 0x05 */ s8 yOffset; // multiplied by 100
|
||||||
/* 0x06 */ u8 actorShadowDrawFuncIndex;
|
/* 0x06 */ u8 shadowType;
|
||||||
/* 0x07 */ u8 unk_7;
|
/* 0x07 */ u8 shadowScale;
|
||||||
/* 0x08 */ u8 drawFuncIndex;
|
/* 0x08 */ u8 drawType;
|
||||||
/* 0x0C */ void* skel;
|
/* 0x0C */ void* skeletonHeaderSeg;
|
||||||
/* 0x10 */ AnimationHeader* unk_10;
|
/* 0x10 */ AnimationHeader* anim;
|
||||||
} struct_80B2CEE8; // size = 0x14
|
} EnViewerInitData; // size = 0x14
|
||||||
|
|
||||||
// Structured like an effect?
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x00 */ Vec3f unk_0;
|
/* 0x00 */ Vec3f startPos;
|
||||||
/* 0x0C */ Vec3f unk_C;
|
/* 0x0C */ Vec3f endPos;
|
||||||
/* 0x18 */ Vec3f unk_18;
|
/* 0x18 */ Vec3f pos;
|
||||||
/* 0x24 */ Vec3f unk_24;
|
/* 0x24 */ f32 lerpFactorSpeed;
|
||||||
|
/* 0x28 */ f32 scale;
|
||||||
|
/* 0x2C */ f32 lerpFactor;
|
||||||
/* 0x30 */ u8 state;
|
/* 0x30 */ u8 state;
|
||||||
} EnViewerUnkStruct; // size = 0x34
|
} EnViewerFireEffect; // size = 0x34
|
||||||
|
|
||||||
typedef struct EnViewer {
|
typedef struct EnViewer {
|
||||||
/* 0x0000 */ Actor actor;
|
/* 0x0000 */ Actor actor;
|
||||||
|
@ -38,9 +65,9 @@ typedef struct EnViewer {
|
||||||
/* 0x01DD */ u8 drawFuncIndex;
|
/* 0x01DD */ u8 drawFuncIndex;
|
||||||
/* 0x01E0 */ EnViewerActionFunc actionFunc;
|
/* 0x01E0 */ EnViewerActionFunc actionFunc;
|
||||||
/* 0x01E4 */ u8 unused;
|
/* 0x01E4 */ u8 unused;
|
||||||
/* 0x01E5 */ u8 unk_1E5;
|
/* 0x01E5 */ u8 state;
|
||||||
/* 0x01E6 */ u8 unk_1E6; // Conditional
|
/* 0x01E6 */ u8 isVisible;
|
||||||
/* 0x01E8 */ EnViewerUnkStruct unk_1E8[20];
|
/* 0x01E8 */ EnViewerFireEffect fireEffects[20];
|
||||||
} EnViewer; // size = 0x05F8
|
} EnViewer; // size = 0x05F8
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue