2020-10-11 17:31:06 +00:00
|
|
|
#ifndef _Z64_ANIMATION_H
|
|
|
|
#define _Z64_ANIMATION_H
|
|
|
|
|
Overhaul the build system (#234)
* wip
* fix
* add disassembler
* Disasm builds OK
* Variable addends
* More wip
* Rodata migration implemented
* Cleanup old tools
* Try fix submodule -> subrepo merge
* git subrepo pull --force --remote=https://github.com/zeldaret/ZAPD.git tools/ZAPD
subrepo:
subdir: "tools/ZAPD"
merged: "602e609"
upstream:
origin: "https://github.com/zeldaret/ZAPD.git"
branch: "master"
commit: "602e609"
git-subrepo:
version: "0.4.3"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "2f68596"
* Builds again but assets are totally broken
* git subrepo pull --force tools/asm-processor
subrepo:
subdir: "tools/asm-processor"
merged: "1ffdb08a"
upstream:
origin: "https://github.com/simonlindholm/asm-processor.git"
branch: "master"
commit: "1ffdb08a"
git-subrepo:
version: "0.4.3"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "2f68596"
* More cleanup, move functions.txt and variables.txt to tools/disasm and rm tables
* rm z64compress in preparation for subrepo
* git subrepo clone (merge) https://github.com/z64me/z64compress.git tools/z64compress
subrepo:
subdir: "tools/z64compress"
merged: "eb11085c"
upstream:
origin: "https://github.com/z64me/z64compress.git"
branch: "main"
commit: "eb11085c"
git-subrepo:
version: "0.4.3"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "2f68596"
* Fix asset extraction
* Fix diff-init make rule
* Split code bss
* Split assumed linker bug padding from assembly files
* add filelists for mm.us.rev1
* Maybe working, but I'm not sure
* add overlays to spec
* Add rodata to actos
* Everything compiles
* Make a lot of C files for code
* Add almost every file in code to spec
* whoops
* 3 code files left
* add scenes to spec
* More progress on progress.py
* Fix skelanime in spec
* audio files!
* Fix merge issues
* Fix some C files in code
* Fix remaining code files
* Use existing O1 C files in spec
* reorder boot order in spec
* update spec
* fault.c
* Convert relocs on completed actors, fixbaserom uses current rom name
* more boot files
* Add VT macros and script
* finish already existing boot files
* most of libultra
* fix 64bits libultra files
* Use C files for libultra, wrap some functions in NON_MATCHING
* Remove duplicate of OS_CLOCK_RATE from fault.c
* C files for fbdemos
* delete dumb files
* bootstrap C files, still need to add them to the spec
* update fixbaserom
* boot OK?
* I forgot to commit the spec
* C for gamestates
* C for kaleido
* Change all includes to ""
* copy actor sizes script from oot
* I forgot to delete those files
* Basic C files for effects
* Add effects initvars names
* Remove mislabelled boot functions from header/txt
* Begin porting bootstrap_fx, some sizes
* Fix <>
* Fix enum
* Fix diff.py
* fix libultra stuff
* update regconvert
* update setup warnings
* add some missing ;
* Fix some makefile stuff and other fixes on some non_matching functions
* add executable flag in extract_baserom and fixbaserom
* fix relative path
* copy assist from oot
* fix map path
* another assist path fix
* Delete C files for handwritten files
* add code_801A51F0 to spec
* add gfxbuffers to spec
* Move rodata to top of each file when possible
* UNK_TYPEs for func_801A51F0
* Remove kaleido rodata from spec
* Update spec and undefined_syms for recent merge
* GCC warnings and fix errors in nonmatchings,
* round percentage numbers
* progress script: format changes
* progress: error on non-existing files
* fix warning in z_scene_table
* Match 2 nonmatchings in z_actor
* Warnings in lightswitch and invadepoh
* Fix warning in z_actor_dlftbls
* I though I fixed this one
* whoops
* Comment out CC_CHECK
* Removed redundant ultra64.h includes
* Update asm_processor, sorted boot_O1 into other folders, completed the fbdemo bootstrap, cleaned up undefined_syms
* Completed gamestates bootstrap
* Split kaleido_scope
* Remove section.h and segment.h, move keep object externs to a common location in variables.h
* Completed effects bootstrap
* Segmented address externs for effects, fbdemos, gamestates and kaleido
* Move actor data externs out of the if 0
* Segmented address externs for actors
* Prepare actionfunc detection
* fix script, how did it even work before
* Fix actionfunc script again, re-introduce some more intermediate prints to the disassembler
* Automated actionFunc detection in actors
* Segmented addresses from player .text
* rm old segment addrs script and fix build
* Move sizes folder to tools
* Make build.py executable
* New Jenkinsfile Prayge
* Remove numpy dependencies
* Add warnings_disasm_current.txt
* my bad
* Update spec and undefined_syms
* Add z_eff_ss_hahen to pametfrog
* git subrepo pull (merge) --force tools/z64compress
subrepo:
subdir: "tools/z64compress"
merged: "163ca2af"
upstream:
origin: "https://github.com/z64me/z64compress.git"
branch: "main"
commit: "163ca2af"
git-subrepo:
version: "0.4.3"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "2f68596"
* Make z64compress print to stdout
* sneeky commit to update warnings tooling
* test
* Another test
* Mark fixing overlay reloc generating as a TODO
* Update warnings stuff
* Communicate the return code from running z64compress back to the Makefile through the wrapper
* Run formatter, remove extra commented copy of function
* Re-fix some includes
* Convert atan to hex to conform to decided style
* Some tidying up, remove c for fp and the other two handwritten code files
* BSS in z_collision_check & z_scene_proc
* add static back in
* Fix timerintr bss, add file to spec, some cleanup
* Remove externs
* Newline
* Readd enums
* Typo
* Colours
* Comments for hitmark enum values
Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
* Improvements and suggestions
* Organize and remove unused imports and use env for python3 scripts, delete unused overlay.py
Co-authored-by: angie <angheloalf95@gmail.com>
Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
2021-08-04 03:21:31 +00:00
|
|
|
#include "PR/ultratypes.h"
|
|
|
|
#include "PR/gbi.h"
|
|
|
|
#include "z64dma.h"
|
|
|
|
#include "z64math.h"
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2021-10-24 14:59:14 +00:00
|
|
|
struct GlobalContext;
|
|
|
|
struct Actor;
|
|
|
|
struct SkelAnime;
|
|
|
|
|
2020-10-11 17:31:06 +00:00
|
|
|
#define LINK_ANIMETION_OFFSET(addr, offset) \
|
2021-09-23 01:50:35 +00:00
|
|
|
(SEGMENT_ROM_START(link_animetion) + ((u32)addr & 0xFFFFFF) + ((u32)offset))
|
2020-10-11 17:31:06 +00:00
|
|
|
#define LIMB_DONE 0xFF
|
|
|
|
#define ANIMATION_ENTRY_MAX 50
|
|
|
|
|
2021-10-24 14:59:14 +00:00
|
|
|
#define ANIM_FLAG_UPDATEY (1 << 1)
|
|
|
|
#define ANIM_FLAG_NOMOVE (1 << 4)
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2021-10-24 14:59:14 +00:00
|
|
|
typedef enum {
|
|
|
|
/* 0 */ ANIMMODE_LOOP,
|
|
|
|
/* 1 */ ANIMMODE_LOOP_INTERP,
|
|
|
|
/* 2 */ ANIMMODE_ONCE,
|
|
|
|
/* 3 */ ANIMMODE_ONCE_INTERP,
|
|
|
|
/* 4 */ ANIMMODE_LOOP_PARTIAL,
|
|
|
|
/* 5 */ ANIMMODE_LOOP_PARTIAL_INTERP
|
|
|
|
} AnimationModes;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
/* -1 */ ANIMTAPER_DECEL = -1,
|
|
|
|
/* 0 */ ANIMTAPER_NONE,
|
|
|
|
/* 1 */ ANIMTAPER_ACCEL
|
|
|
|
} AnimationTapers;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x00 */ Vec3s jointPos; // Root is position in model space, children are relative to parent
|
|
|
|
/* 0x06 */ u8 child; // The first child's index into the limb table.
|
|
|
|
/* 0x07 */ u8 sibling; // The parent limb's next limb index into the limb table.
|
|
|
|
/* 0x08 */ Gfx* dList; // Display lists for the limb. Index 0 is the normal display list, index 1 is the
|
|
|
|
// far model display list.
|
|
|
|
} StandardLimb; // size = 0xC
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2021-10-24 14:59:14 +00:00
|
|
|
// Model has limbs with only rigid meshes
|
2020-10-11 17:31:06 +00:00
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x00 */ Vec3s jointPos; // Root is position in model space, children are relative to parent
|
|
|
|
/* 0x06 */ u8 child;
|
|
|
|
/* 0x07 */ u8 sibling;
|
|
|
|
/* 0x08 */ Gfx* dLists[2]; // Near and far
|
|
|
|
} LodLimb; // size = 0x10
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2021-12-18 19:37:05 +00:00
|
|
|
typedef struct {
|
|
|
|
/* 0x00 */ Vec3s jointPos; // Root is position in model space, children are relative to parent
|
|
|
|
/* 0x06 */ u8 child;
|
|
|
|
/* 0x07 */ u8 sibling;
|
|
|
|
/* 0x08 */ s32 unk_8; // Type of data contained in segment
|
|
|
|
/* 0x0C */ void* segment; // Segment address of data. Currently unclear what.
|
|
|
|
} SkinLimb; // size = 0x10
|
|
|
|
|
2021-05-20 22:52:07 +00:00
|
|
|
// Model has limbs with only rigid meshes
|
2020-10-11 17:31:06 +00:00
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x00 */ void** segment;
|
|
|
|
/* 0x04 */ u8 limbCount;
|
2021-05-20 22:52:07 +00:00
|
|
|
} SkeletonHeader; // size = 0x8
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2021-05-20 22:52:07 +00:00
|
|
|
// Model has limbs with flexible meshes
|
2020-10-11 17:31:06 +00:00
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x00 */ SkeletonHeader sh;
|
|
|
|
/* 0x08 */ u8 dListCount;
|
2021-05-20 22:52:07 +00:00
|
|
|
} FlexSkeletonHeader; // size = 0xC
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2021-10-24 14:59:14 +00:00
|
|
|
// Index into the frame data table.
|
2020-10-11 17:31:06 +00:00
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x00 */ u16 x;
|
|
|
|
/* 0x02 */ u16 y;
|
|
|
|
/* 0x04 */ u16 z;
|
2021-05-20 22:52:07 +00:00
|
|
|
} JointIndex; // size = 0x06
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x00 */ s16 frameCount;
|
|
|
|
} AnimationHeaderCommon;
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x000 */ AnimationHeaderCommon common;
|
|
|
|
/* 0x004 */ s16* frameData; // referenced as tbl
|
|
|
|
/* 0x008 */ JointIndex* jointIndices; // referenced as ref_tbl
|
|
|
|
/* 0x00C */ u16 staticIndexMax;
|
2020-10-11 17:31:06 +00:00
|
|
|
} AnimationHeader; // size = 0x10
|
|
|
|
|
2021-10-24 14:59:14 +00:00
|
|
|
typedef struct {
|
|
|
|
/* 0x00 */ s16 xMax;
|
|
|
|
/* 0x02 */ s16 x;
|
|
|
|
/* 0x04 */ s16 yMax;
|
|
|
|
/* 0x06 */ s16 y;
|
|
|
|
/* 0x08 */ s16 zMax;
|
|
|
|
/* 0x10 */ s16 z;
|
|
|
|
} JointKey; // size = 0x12
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x00 */ s16 frameCount;
|
|
|
|
/* 0x02 */ s16 limbCount;
|
|
|
|
/* 0x04 */ s16* frameData;
|
|
|
|
/* 0x08 */ JointKey* jointKey;
|
|
|
|
} LegacyAnimationHeader; // size = 0xC
|
|
|
|
|
2020-10-11 17:31:06 +00:00
|
|
|
typedef enum {
|
|
|
|
ANIMATION_LINKANIMETION,
|
2021-10-24 14:59:14 +00:00
|
|
|
ANIMENTRY_COPYALL,
|
|
|
|
ANIMENTRY_INTERP,
|
|
|
|
ANIMENTRY_COPYTRUE,
|
|
|
|
ANIMENTRY_COPYFALSE,
|
|
|
|
ANIMENTRY_MOVEACTOR
|
2020-10-11 17:31:06 +00:00
|
|
|
} AnimationType;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x000 */ DmaRequest req;
|
|
|
|
/* 0x020 */ OSMesgQueue msgQueue;
|
|
|
|
/* 0x038 */ OSMesg msg;
|
2021-10-24 14:59:14 +00:00
|
|
|
} AnimEntryLoadFrame; // size = 0x3C
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x000 */ u8 queueFlag;
|
2020-10-11 17:31:06 +00:00
|
|
|
/* 0x001 */ u8 vecCount;
|
|
|
|
/* 0x004 */ Vec3s* dst;
|
|
|
|
/* 0x008 */ Vec3s* src;
|
2021-10-24 14:59:14 +00:00
|
|
|
} AnimEntryCopyAll; // size = 0xC
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x000 */ u8 queueFlag;
|
|
|
|
/* 0x001 */ u8 vecCount;
|
|
|
|
/* 0x004 */ Vec3s* base;
|
|
|
|
/* 0x008 */ Vec3s* mod;
|
|
|
|
/* 0x00C */ f32 weight;
|
|
|
|
} AnimEntryInterp; // size = 0x10
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x000 */ u8 queueFlag;
|
2020-10-11 17:31:06 +00:00
|
|
|
/* 0x001 */ u8 vecCount;
|
|
|
|
/* 0x004 */ Vec3s* dst;
|
|
|
|
/* 0x008 */ Vec3s* src;
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x00C */ u8* copyFlag;
|
|
|
|
} AnimEntryCopyTrue; // size = 0x10
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x000 */ u8 queueFlag;
|
2020-10-11 17:31:06 +00:00
|
|
|
/* 0x001 */ u8 vecCount;
|
|
|
|
/* 0x004 */ Vec3s* dst;
|
|
|
|
/* 0x008 */ Vec3s* src;
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x00C */ u8* copyFlag;
|
|
|
|
} AnimEntryCopyFalse; // size = 0x10
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x000 */ struct Actor* actor;
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x004 */ struct SkelAnime* skelAnime;
|
2020-10-11 17:31:06 +00:00
|
|
|
/* 0x008 */ f32 unk08;
|
2021-10-24 14:59:14 +00:00
|
|
|
} AnimEntryMoveActor; // size = 0xC
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef union {
|
2021-10-24 14:59:14 +00:00
|
|
|
AnimEntryLoadFrame load;
|
|
|
|
AnimEntryCopyAll copy;
|
|
|
|
AnimEntryInterp interp;
|
|
|
|
AnimEntryCopyTrue copy1;
|
|
|
|
AnimEntryCopyFalse copy0;
|
|
|
|
AnimEntryMoveActor move;
|
|
|
|
} AnimationEntryData; // size = 0x3C
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x000 */ u8 type;
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x004 */ AnimationEntryData data;
|
2020-10-11 17:31:06 +00:00
|
|
|
} AnimationEntry; // size = 0x40
|
|
|
|
|
|
|
|
typedef struct AnimationContext {
|
|
|
|
/* 0x000 */ s16 animationCount;
|
|
|
|
/* 0x004 */ AnimationEntry entries[ANIMATION_ENTRY_MAX];
|
|
|
|
} AnimationContext; // size = 0xC84
|
|
|
|
|
|
|
|
typedef struct {
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x000 */ AnimationHeaderCommon common;
|
|
|
|
/* 0x004 */ u32 segment;
|
2021-05-20 22:52:07 +00:00
|
|
|
} LinkAnimationHeader; // size = 0x8
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2021-10-24 14:59:14 +00:00
|
|
|
typedef struct SkelAnime {
|
|
|
|
/* 0x00 */ u8 limbCount; // Number of limbs in the skeleton
|
|
|
|
/* 0x01 */ u8 mode; // 0: loop, 2: play once, 4: partial loop. +1 to interpolate between frames.
|
|
|
|
/* 0x02 */ u8 dListCount; // Number of display lists in a flexible skeleton
|
|
|
|
/* 0x03 */ s8 taper; // Tapering to use when morphing between animations. Only used by Door_Warp1.
|
2021-05-20 22:52:07 +00:00
|
|
|
/* 0x04 */ void** skeleton; // An array of pointers to limbs. Can be StandardLimb, LodLimb, or SkinLimb.
|
2021-10-24 14:59:14 +00:00
|
|
|
/* 0x08 */ void* animation; // Can be an AnimationHeader or LinkAnimationHeader.
|
|
|
|
/* 0x0C */ f32 startFrame; // In mode 4, start of partial loop.
|
|
|
|
/* 0x10 */ f32 endFrame; // In mode 2, Update returns true when curFrame is equal to this. In mode 4, end of partial loop.
|
|
|
|
/* 0x14 */ f32 animLength; // Total number of frames in the current animation's file.
|
|
|
|
/* 0x18 */ f32 curFrame; // Current frame in the animation
|
|
|
|
/* 0x1C */ f32 playSpeed; // Multiplied by R_UPDATE_RATE / 3 to get the animation's frame rate.
|
|
|
|
/* 0x20 */ Vec3s* jointTable; // Current translation of model and rotations of all limbs
|
|
|
|
/* 0x24 */ Vec3s* morphTable; // Table of values used to morph between animations
|
|
|
|
/* 0x28 */ f32 morphWeight; // Weight of the current animation morph as a fraction in [0,1]
|
|
|
|
/* 0x2C */ f32 morphRate; // Reciprocal of the number of frames in the morph
|
|
|
|
/* 0x30 */ s32 (*update)(); // Can be Loop, Partial loop, Play once, Morph, or Tapered morph. Link only has Loop, Play once, and Morph
|
|
|
|
/* 0x34 */ s8 initFlags; // Flags used when initializing Link's skeleton
|
|
|
|
/* 0x35 */ u8 moveFlags; // Flags used for animations that move the actor in worldspace.
|
|
|
|
/* 0x36 */ s16 prevRot; // Previous rotation in worldspace.
|
|
|
|
/* 0x38 */ Vec3s prevTransl; // Previous modelspace translation.
|
|
|
|
/* 0x3E */ Vec3s baseTransl; // Base modelspace translation.
|
|
|
|
} SkelAnime; // size = 0x44
|
|
|
|
|
|
|
|
typedef s32 (*OverrideLimbDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
2022-01-16 20:14:34 +00:00
|
|
|
struct Actor* thisx);
|
2021-10-24 14:59:14 +00:00
|
|
|
|
|
|
|
typedef void (*PostLimbDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
2022-01-16 20:14:34 +00:00
|
|
|
struct Actor* thisx);
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef s32 (*OverrideLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
2022-01-16 20:14:34 +00:00
|
|
|
struct Actor* thisx, Gfx** gfx);
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
typedef void (*PostLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
2022-01-16 20:14:34 +00:00
|
|
|
struct Actor* thisx, Gfx** gfx);
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2021-10-24 14:59:14 +00:00
|
|
|
typedef s32 (*OverrideLimbDrawFlex)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
2022-01-16 20:14:34 +00:00
|
|
|
struct Actor* thisx);
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2021-10-24 14:59:14 +00:00
|
|
|
typedef void (*PostLimbDrawFlex)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList1, Gfx** dList2, Vec3s* rot,
|
2022-01-16 20:14:34 +00:00
|
|
|
struct Actor* thisx);
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2022-01-16 20:14:34 +00:00
|
|
|
typedef void (*TransformLimbDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, struct Actor* thisx);
|
2021-11-19 15:45:26 +00:00
|
|
|
|
2022-01-16 20:14:34 +00:00
|
|
|
typedef void (*TransformLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, struct Actor* thisx, Gfx** gfx);
|
2020-10-11 17:31:06 +00:00
|
|
|
|
2021-10-24 14:59:14 +00:00
|
|
|
typedef void (*AnimationEntryCallback)(struct GlobalContext*, AnimationEntryData*);
|
2020-10-11 17:31:06 +00:00
|
|
|
|
|
|
|
extern u32 link_animetion_segment;
|
|
|
|
|
|
|
|
// fcurve_skelanime structs
|
|
|
|
typedef struct {
|
|
|
|
/* 0x0000 */ u16 unk00; // appears to be flags
|
|
|
|
/* 0x0002 */ s16 unk02;
|
|
|
|
/* 0x0004 */ s16 unk04;
|
|
|
|
/* 0x0006 */ s16 unk06;
|
|
|
|
/* 0x0008 */ f32 unk08;
|
|
|
|
} TransformData; // size = 0xC
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x0000 */ u8* refIndex;
|
|
|
|
/* 0x0004 */ TransformData* transformData;
|
|
|
|
/* 0x0008 */ s16* copyValues;
|
|
|
|
/* 0x000C */ s16 unk0C;
|
|
|
|
/* 0x000E */ s16 unk10;
|
|
|
|
} TransformUpdateIndex; // size 0x10
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x0000 */ u8 firstChildIdx;
|
|
|
|
/* 0x0001 */ u8 nextLimbIdx;
|
|
|
|
/* 0x0004 */ Gfx* dList[2];
|
|
|
|
} SkelCurveLimb; // size >= 0x8
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x0000 */ SkelCurveLimb** limbs;
|
|
|
|
/* 0x0004 */ u8 limbCount;
|
|
|
|
} SkelCurveLimbList; // size = 0x8
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x0000 */ Vec3s scale;
|
|
|
|
/* 0x0006 */ Vec3s rot;
|
|
|
|
/* 0x000C */ Vec3s pos;
|
|
|
|
} LimbTransform; // size = 0x12
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x0000 */ u8 limbCount;
|
|
|
|
/* 0x0004 */ SkelCurveLimb** limbList;
|
|
|
|
/* 0x0008 */ TransformUpdateIndex* transUpdIdx;
|
|
|
|
/* 0x000C */ f32 unk0C; // seems to be unused
|
|
|
|
/* 0x0010 */ f32 animFinalFrame;
|
|
|
|
/* 0x0014 */ f32 animSpeed;
|
|
|
|
/* 0x0018 */ f32 animCurFrame;
|
|
|
|
/* 0x001C */ LimbTransform* transforms;
|
|
|
|
} SkelAnimeCurve; // size = 0x20
|
|
|
|
|
|
|
|
typedef s32 (*OverrideCurveLimbDraw)(struct GlobalContext* globalCtx, SkelAnimeCurve* skelCuve, s32 limbIndex,
|
|
|
|
struct Actor* actor);
|
|
|
|
typedef void (*PostCurveLimbDraw)(struct GlobalContext* globalCtx, SkelAnimeCurve* skelCuve, s32 limbIndex,
|
|
|
|
struct Actor* actor);
|
|
|
|
|
2021-12-18 19:37:05 +00:00
|
|
|
// TODO the name of this struct is imported from OoT and cannot change until the ZAPD name also changes
|
|
|
|
typedef struct {
|
|
|
|
/* 0x000 */ u16 unk_0;
|
|
|
|
/* 0x002 */ s16 unk_2;
|
|
|
|
/* 0x004 */ s16 unk_4;
|
|
|
|
/* 0x006 */ s8 unk_6;
|
|
|
|
/* 0x007 */ s8 unk_7;
|
|
|
|
/* 0x008 */ s8 unk_8;
|
|
|
|
/* 0x009 */ u8 unk_9;
|
|
|
|
} Struct_800A57C0; // size = 0xA
|
|
|
|
|
|
|
|
// TODO the name of this struct is imported from OoT and cannot change until the ZAPD name also changes
|
|
|
|
typedef struct {
|
|
|
|
/* 0x000 */ u8 unk_0;
|
|
|
|
/* 0x002 */ s16 x;
|
|
|
|
/* 0x004 */ s16 y;
|
|
|
|
/* 0x006 */ s16 z;
|
|
|
|
/* 0x008 */ u8 unk_8;
|
|
|
|
} Struct_800A598C_2; // size = 0xA
|
|
|
|
|
|
|
|
// TODO the name of this struct is imported from OoT and cannot change until the ZAPD name also changes
|
|
|
|
typedef struct {
|
|
|
|
/* 0x000 */ u16 unk_0;
|
|
|
|
/* 0x002 */ u16 unk_2;
|
|
|
|
/* 0x004 */ u16 unk_4;
|
|
|
|
/* 0x008 */ Struct_800A57C0* unk_8;
|
|
|
|
/* 0x00C */ Struct_800A598C_2* unk_C;
|
|
|
|
} Struct_800A598C; // size = 0x10
|
|
|
|
|
|
|
|
// TODO the name of this struct is imported from OoT and cannot change until the ZAPD name also changes
|
|
|
|
typedef struct {
|
|
|
|
/* 0x000 */ u16 unk_0;
|
|
|
|
/* 0x002 */ u16 unk_2;
|
|
|
|
/* 0x004 */ Struct_800A598C* unk_4;
|
|
|
|
/* 0x008 */ Gfx* unk_8;
|
|
|
|
} Struct_800A5E28; // size = 0xC
|
|
|
|
|
2022-02-14 02:10:56 +00:00
|
|
|
typedef struct {
|
|
|
|
/* 0x00 */ AnimationHeader* animation;
|
|
|
|
/* 0x04 */ f32 playSpeed;
|
|
|
|
/* 0x08 */ f32 startFrame;
|
|
|
|
/* 0x0C */ f32 frameCount;
|
|
|
|
/* 0x10 */ u8 mode;
|
|
|
|
/* 0x14 */ f32 morphFrames;
|
|
|
|
} AnimationInfo; // size = 0x18
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
/* 0x00 */ AnimationHeader* animation;
|
|
|
|
/* 0x04 */ f32 playSpeed;
|
|
|
|
/* 0x08 */ s16 startFrame;
|
|
|
|
/* 0x0A */ s16 frameCount;
|
|
|
|
/* 0x0C */ u8 mode;
|
|
|
|
/* 0x0E */ s16 morphFrames;
|
|
|
|
} AnimationInfoS; // size = 0x10
|
|
|
|
|
|
|
|
typedef struct AnimationSpeedInfo {
|
|
|
|
/* 0x00 */ AnimationHeader* animation;
|
|
|
|
/* 0x04 */ f32 playSpeed;
|
2021-06-09 22:38:35 +00:00
|
|
|
/* 0x08 */ u8 mode;
|
2022-02-14 02:10:56 +00:00
|
|
|
/* 0x0C */ f32 morphFrames;
|
|
|
|
} AnimationSpeedInfo; // size = 0x10
|
2021-06-09 22:38:35 +00:00
|
|
|
|
2020-10-11 17:31:06 +00:00
|
|
|
#endif
|