mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Animation system updated, some more boot files decompiled (+6%), z_fcurve_data_skelanime decompiled (1 non-matching), some asm files split, etc (#89)
* Progress on various files * gfxprint stuff * split some rodata, add iconv for rodata string parsing * z_std_dma rodata * 2 nonmatchings in gfxprint * mtxuty-cvt ok * more * match a function in idle.c * progress * Cleanup * Rename BgPolygon to CollisionPoly * progress * some effect stuff * more effect progress * updates * made suggested changes * z_effect_soft_sprite_old_init mostly ok * remove old effects enum * gamealloc.c OK * added more files * motor.c almost done * motor.c OK * updates * migration of two files * listalloc.c oK * z_fcurve_data_skelanime split * z_fcurve_data_skelanime.c decompiled * more files split * z_malloc.c OK * contpfs.c OK * fault.c rodata migrated * migrated fault_drawer rodata * update * update preprocess.py * renamed functions in z_skelanime * started z_skelanime cleanup * like halfway through fixing z_skelanime * animation system updated to meet oot standards * remove unused animation structs * rename matrix structs to fit oot * Add -woff 712 * fix diff_settings.py because i accidentally broke it before * fixed merge conflict, doesn't match though * It matches now * Updates * Fixed warnings...added gcc code syntax checking * Remove gcc check, added in Tharo's PR * warnings fixed (i think) * fixed all warnings i think * ok * not sure what to do * Fix all warnings i think (z_en_a_keep needs some file cleanup thouguh) * it matches if i do this * remove comment * accidentally put osPfsFreeBlocks in epilinkhandle.c * memcmp -> bcmp * change u32 size to size_t size, delete string.h because it caused unnecessary confusion with defining size_t twice * format.sh * MTXMODE_NEW and MTXMODE_APPLY to matrix functions * Made suggested changes * pragma sFaultDrawerFont instead of including in repo * add some functions to functions.h * Bss reordering fixed in z_collision_check...added hack to disasm.py * Updated z_en_a_keep.c * Missed suggestion in EnAObj_Destroy * . * update z_fcurve_Data_skelanime and z_skelanime with suggestions * devmgr.c ok * minor changes * Addressed comments * remove redundant file * gfxp -> dlist in game.c * updated actorfixer.py * fixed warnings in z_malloc * Change void* back to Actor* * format * Add the soft_sprit comments back * Rename SV->Flex * remove .common * run format * Update src/code/z_skelanime.c * u32 channel Co-authored-by: Lucas Shaw <lucas.shaw1123@gmail.com> Co-authored-by: angie <angheloalf95@gmail.com> Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
This commit is contained in:
co-authored by
Lucas Shaw
angie
Kenix3
parent
961913f18f
commit
dcf44596d2
+1
-1
@@ -92,7 +92,7 @@
|
||||
#define SEGMENT_ADDR(num, off) (((num) << 24) + (off))
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#define NULL ((void*)0)
|
||||
#endif
|
||||
|
||||
#endif /* !_MBI_H_ */
|
||||
|
||||
+259
-238
File diff suppressed because it is too large
Load Diff
@@ -139,7 +139,8 @@ typedef struct {
|
||||
/* 0x01 */ u8 txsize;
|
||||
/* 0x02 */ u8 rxsize;
|
||||
/* 0x03 */ u8 cmd;
|
||||
/* 0x04 */ u16 address;
|
||||
/* 0x04 */ u8 hi;
|
||||
/* 0x05 */ u8 lo;
|
||||
/* 0x06 */ u8 data[32];
|
||||
/* 0x26 */ u8 datacrc;
|
||||
} __OSContRamReadFormat;
|
||||
|
||||
+4
-3
@@ -1,6 +1,7 @@
|
||||
#ifndef _OS_H_
|
||||
#define _OS_H_
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "ultra64/thread.h"
|
||||
#include "ultra64/message.h"
|
||||
|
||||
@@ -65,7 +66,7 @@ typedef struct {
|
||||
/* 0x00 */ OSIoMesgHdr hdr;
|
||||
/* 0x08 */ void* dramAddr;
|
||||
/* 0x0C */ u32 devAddr;
|
||||
/* 0x10 */ u32 size;
|
||||
/* 0x10 */ size_t size;
|
||||
/* 0x14 */ OSPiHandle* piHandle;
|
||||
} OSIoMesg; // size = 0x88
|
||||
|
||||
@@ -76,8 +77,8 @@ typedef struct {
|
||||
/* 0x08 */ OSMesgQueue* cmdQueue;
|
||||
/* 0x0C */ OSMesgQueue* evtQueue;
|
||||
/* 0x10 */ OSMesgQueue* acsQueue;
|
||||
/* 0x14 */ s32 (*piDmaCallback)(s32, u32, void*, u32);
|
||||
/* 0x18 */ s32 (*epiDmaCallback)(OSPiHandle*, s32, u32, void*, u32);
|
||||
/* 0x14 */ s32 (*piDmaCallback)(s32, u32, void*, size_t);
|
||||
/* 0x18 */ s32 (*epiDmaCallback)(OSPiHandle*, s32, u32, void*, size_t);
|
||||
} OSDevMgr; // size = 0x1C
|
||||
|
||||
|
||||
|
||||
@@ -6,4 +6,14 @@ typedef struct {
|
||||
/* 0x04 */ OSMesg msg;
|
||||
} __osHwInt; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 initialized;
|
||||
/* 0x04 */ OSThread* mgrThread;
|
||||
/* 0x08 */ OSMesgQueue* cmdQueue;
|
||||
/* 0x0C */ OSMesgQueue* eventQueue;
|
||||
/* 0x10 */ OSMesgQueue* accessQueue;
|
||||
/* 0x14 */ s32 (*piDmaCallback)(s32, u32, void*, size_t);
|
||||
/* 0x18 */ s32 (*epiDmaCallback)(OSPiHandle*, s32, u32, void*, size_t);
|
||||
} OSMgrArgs; // size = 0x1C
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ typedef struct {
|
||||
/* 0x8 */ long long rem;
|
||||
} lldiv_t;
|
||||
|
||||
typedef unsigned int size_t;
|
||||
typedef unsigned long size_t;
|
||||
|
||||
typedef int ssize_t;
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef _STRING_H_
|
||||
#define _STRING_H_
|
||||
|
||||
#define NULL 0
|
||||
typedef unsigned int size_t;
|
||||
|
||||
#endif
|
||||
+27
-36
@@ -30,8 +30,8 @@ extern vs32 gIrqMgrResetStatus;
|
||||
extern volatile OSTime sIrqMgrResetTime;
|
||||
extern volatile OSTime sIrqMgrRetraceTime;
|
||||
extern s32 sIrqMgrRetraceCount;
|
||||
extern char* D_80096B80[18];
|
||||
extern char* sExceptionNames[6];
|
||||
extern const char* sCpuExceptions[18];
|
||||
extern const char* sFpuExceptions[6];
|
||||
extern FaultDrawer* sFaultDrawContext;
|
||||
extern FaultDrawer sFaultDrawerDefault;
|
||||
// extern UNK_TYPE4 D_80096C20;
|
||||
@@ -67,8 +67,8 @@ extern OSPiHandle* __osPiTable;
|
||||
extern OSPiHandle* __osCurrentHandle[];
|
||||
extern UNK_TYPE4 __osPiAccessQueueEnabled;
|
||||
extern OSViMode osViModeNtscHpn1;
|
||||
// extern UNK_TYPE4 D_80097F00;
|
||||
// extern UNK_TYPE1 D_80097F04;
|
||||
extern s32 __osPfsInodeCacheChannel;
|
||||
extern u8 __osPfsInodeCacheBank;
|
||||
extern UNK_TYPE4 D_80097F10;
|
||||
extern char spaces[];
|
||||
extern char zeroes[];
|
||||
@@ -207,8 +207,8 @@ extern char D_80098A00[];
|
||||
extern char D_80098A0C[];
|
||||
extern char D_80098A1C[];
|
||||
extern char D_80098A20[34];
|
||||
extern char D_80098A44[];
|
||||
extern char D_80098A68[];
|
||||
extern const char D_80098A44[];
|
||||
extern const char D_80098A68[];
|
||||
extern char D_80098A88[53];
|
||||
extern char D_80098AC0[49];
|
||||
extern char D_80098AF4[51];
|
||||
@@ -218,7 +218,7 @@ extern char D_80098B68[];
|
||||
extern char D_80098B84[];
|
||||
extern char D_80098BA0[];
|
||||
extern char D_80098BBC[];
|
||||
extern char faultThreadName[];
|
||||
extern const char faultThreadName[];
|
||||
extern char D_80098BE0[];
|
||||
extern char D_80098BF8[];
|
||||
extern char D_80098BFC[];
|
||||
@@ -230,15 +230,14 @@ extern char D_80098C2C[];
|
||||
extern char D_80098C34[];
|
||||
extern char D_80098C38[];
|
||||
extern char D_80098C40[];
|
||||
extern u8 sFaultDrawerFont[8][128];
|
||||
extern char D_80099050[];
|
||||
extern char D_80099054[];
|
||||
extern char D_8009905C[];
|
||||
extern char D_80099064[];
|
||||
extern char D_80099070[];
|
||||
extern char D_80099078[];
|
||||
extern char D_8009907C[];
|
||||
extern char D_80099080[];
|
||||
extern const char D_80099078[];
|
||||
extern const char D_8009907C[];
|
||||
extern const char D_80099080[];
|
||||
extern char D_800990B0[];
|
||||
extern f32 D_800990C0[9];
|
||||
extern f32 D_800990E4;
|
||||
@@ -325,10 +324,10 @@ extern FaultDrawer sFaultDrawerStruct;
|
||||
// extern Arena gSystemArena;
|
||||
extern u32 sRandFloat;
|
||||
// extern UNK_TYPE4 sArenaLockMsg;
|
||||
// extern OSTask tmp_task;
|
||||
// extern UNK_TYPE1 D_8009CDB0;
|
||||
// extern OSMesg siAccessBuf[1];
|
||||
// extern OSMesgQueue __osSiAccessQueue;
|
||||
extern OSTask tmp_task;
|
||||
extern OSPifRam osPifBuffers[4];
|
||||
extern OSMesg siAccessBuf[1];
|
||||
extern OSMesgQueue __osSiAccessQueue;
|
||||
extern OSPifRam __osContPifRam;
|
||||
// extern UNK_TYPE1 D_8009CF0C;
|
||||
extern u8 __osContLastCmd;
|
||||
@@ -1673,7 +1672,7 @@ extern UNK_PTR D_801D1540;
|
||||
// extern f32 sFactorialTbl[13];
|
||||
extern Vec3f D_801D15B0;
|
||||
extern Vec3s D_801D15BC;
|
||||
extern RSPMatrix D_801D1DE0;
|
||||
extern Mtx D_801D1DE0;
|
||||
extern MtxF D_801D1E20;
|
||||
extern UNK_PTR D_801D1E60;
|
||||
extern UNK_PTR D_801D1E64;
|
||||
@@ -3263,7 +3262,6 @@ extern TriNorm D_801EF590;
|
||||
extern TriNorm D_801EF5C8;
|
||||
extern TriNorm D_801EF600;
|
||||
extern TriNorm D_801EF638;
|
||||
// extern UNK_TYPE1 D_801EF66D;
|
||||
extern SaveContext gSaveContext;
|
||||
// extern UNK_TYPE2 D_801F3F38;
|
||||
// extern UNK_TYPE1 D_801F3F3A;
|
||||
@@ -3344,7 +3342,7 @@ extern s16 D_801F4E7A;
|
||||
// extern UNK_TYPE1 D_801F4F68;
|
||||
// extern UNK_TYPE1 D_801F4F6A;
|
||||
extern LightsBuffer sLightsBuffer;
|
||||
extern Arena mainHeap;
|
||||
extern Arena sZeldaArena;
|
||||
// extern UNK_TYPE1 D_801F5130;
|
||||
// extern UNK_TYPE1 D_801F5270;
|
||||
// extern UNK_TYPE1 D_801F528E;
|
||||
@@ -3368,13 +3366,6 @@ extern Arena mainHeap;
|
||||
// extern UNK_TYPE1 D_801F59F0;
|
||||
// extern UNK_TYPE1 D_801F59F4;
|
||||
// extern UNK_TYPE1 D_801F59F8;
|
||||
// extern QuakeRequest sQuakeRequest[4];
|
||||
// extern Quake2Context sQuake2Context;
|
||||
// extern s32 sMatAnimStep;
|
||||
// extern u32 sMatAnimFlags;
|
||||
// extern f32 sMatAnimAlphaRatio;
|
||||
extern s32 D_801F5AB0;
|
||||
extern s32 D_801F5AB4;
|
||||
// extern UNK_TYPE1 D_801F5AC0;
|
||||
// extern UNK_TYPE1 D_801F69D0;
|
||||
// extern UNK_TYPE1 D_801F6A10;
|
||||
@@ -3437,19 +3428,19 @@ extern FaultClient graphFaultClient;
|
||||
extern Gfx* graphDlEntry;
|
||||
// extern UNK_TYPE1 D_801F80F8;
|
||||
extern u64 lastRenderFrameTimestamp;
|
||||
extern OSMesgQueue siEventCallbackQueue;
|
||||
extern OSMesg siEventCallbackBuffer[1];
|
||||
extern OSMesgQueue sSiIntMsgQ;
|
||||
extern OSMesg sSiIntMsgBuf[1];
|
||||
extern u32 gSegments[NUM_SEGMENTS];
|
||||
extern SchedContext gSchedContext;
|
||||
extern IrqMgrClient mainIrqmgrCallbackNode;
|
||||
extern OSMesgQueue mainIrqmgrCallbackQueue;
|
||||
extern OSMesg mainIrqCallbackBuffer[60];
|
||||
extern OSThread graphOSThread;
|
||||
extern u8 graphStack[0x1800];
|
||||
extern u8 schedStack[0x600];
|
||||
extern u8 audioStack[0x800];
|
||||
extern u8 padmgrStack[0x500];
|
||||
extern StackEntry graphStackEntry;
|
||||
extern IrqMgrClient irqClient;
|
||||
extern OSMesgQueue irqMgrMsgQ;
|
||||
extern OSMesg irqMgrMsgBuf[60];
|
||||
extern OSThread sGraphThread;
|
||||
extern u8 sGraphStack[6144];
|
||||
extern u8 schedStack[1536];
|
||||
extern u8 audioStack[2048];
|
||||
extern u8 padmgrStack[1280];
|
||||
extern StackEntry sGraphStackInfo;
|
||||
extern StackEntry schedStackEntry;
|
||||
extern StackEntry audioStackEntry;
|
||||
extern StackEntry padmgrStackEntry;
|
||||
|
||||
+27
-26
@@ -308,7 +308,7 @@ typedef struct GraphicsContext {
|
||||
/* 0x1B4 */ Gfx* unk1B4;
|
||||
/* 0x1B8 */ TwoHeadGfxArena unk1B8;
|
||||
/* 0x1C8 */ UNK_TYPE1 pad1C8[0xAC];
|
||||
/* 0x274 */ OSViMode* unk274;
|
||||
/* 0x274 */ OSViMode* viMode;
|
||||
/* 0x278 */ void* zbuffer;
|
||||
/* 0x27C */ UNK_TYPE1 pad27C[0x1C];
|
||||
/* 0x298 */ TwoHeadGfxArena overlay;
|
||||
@@ -410,13 +410,13 @@ typedef struct {
|
||||
/* 0xC */ s32 rightX;
|
||||
} Viewport; // size = 0x10
|
||||
|
||||
typedef void*(*fault_address_converter_func)(void* addr, void* arg);
|
||||
typedef void*(*FaultAddrConvFunc)(void* addr, void* arg);
|
||||
|
||||
typedef void(*fault_client_func)(void* arg1, void* arg2);
|
||||
|
||||
typedef void(*osCreateThread_func)(void*);
|
||||
|
||||
typedef void* (*PrintCallback)(void*, const char*, u32);
|
||||
typedef void* (*PrintCallback)(void*, const char*, size_t);
|
||||
|
||||
typedef enum {
|
||||
SLOWLY_CALLBACK_NO_ARGS,
|
||||
@@ -991,7 +991,7 @@ typedef struct {
|
||||
typedef struct ArenaNode_t {
|
||||
/* 0x0 */ s16 magic; // Should always be 0x7373
|
||||
/* 0x2 */ s16 isFree;
|
||||
/* 0x4 */ u32 size;
|
||||
/* 0x4 */ size_t size;
|
||||
/* 0x8 */ struct ArenaNode_t* next;
|
||||
/* 0xC */ struct ArenaNode_t* prev;
|
||||
} ArenaNode; // size = 0x10
|
||||
@@ -1009,7 +1009,7 @@ typedef struct FaultAddrConvClient FaultAddrConvClient;
|
||||
|
||||
struct FaultAddrConvClient {
|
||||
/* 0x0 */ FaultAddrConvClient* next;
|
||||
/* 0x4 */ fault_address_converter_func callback;
|
||||
/* 0x4 */ FaultAddrConvFunc callback;
|
||||
/* 0x8 */ void* param;
|
||||
}; // size = 0xC
|
||||
|
||||
@@ -1044,46 +1044,47 @@ typedef struct FireObj FireObj;
|
||||
|
||||
typedef struct FireObjLight FireObjLight;
|
||||
|
||||
typedef struct GameAlloc GameAlloc;
|
||||
typedef struct GameAllocNode {
|
||||
/* 0x0 */ struct GameAllocNode* next;
|
||||
/* 0x4 */ struct GameAllocNode* prev;
|
||||
/* 0x8 */ size_t size;
|
||||
/* 0xC */ u32 unk_0C;
|
||||
} GameAllocEntry; // size = 0x10
|
||||
|
||||
typedef struct PreNMIContext PreNMIContext;
|
||||
|
||||
typedef struct GameAllocNode GameAllocNode;
|
||||
|
||||
struct GameAllocNode {
|
||||
/* 0x0 */ GameAllocNode* next;
|
||||
/* 0x4 */ GameAllocNode* prev;
|
||||
/* 0x8 */ u32 size;
|
||||
/* 0xC */ UNK_TYPE1 padC[0x4];
|
||||
}; // size = 0x10
|
||||
|
||||
struct GameAlloc {
|
||||
/* 0x00 */ GameAllocNode base;
|
||||
/* 0x10 */ GameAllocNode* head;
|
||||
}; // size = 0x14
|
||||
typedef struct GameAlloc {
|
||||
/* 0x00 */ GameAllocEntry base;
|
||||
/* 0x10 */ GameAllocEntry* head;
|
||||
} GameAlloc; // size = 0x14
|
||||
|
||||
struct GameState {
|
||||
/* 0x00 */ GraphicsContext* gfxCtx;
|
||||
/* 0x04 */ GameStateFunc main;
|
||||
/* 0x08 */ GameStateFunc destroy;
|
||||
/* 0x0C */ GameStateFunc nextGameStateInit;
|
||||
/* 0x10 */ u32 nextGameStateSize;
|
||||
/* 0x10 */ size_t nextGameStateSize;
|
||||
/* 0x14 */ Input input[4];
|
||||
/* 0x74 */ TwoHeadArena heap;
|
||||
/* 0x84 */ GameAlloc alloc;
|
||||
/* 0x98 */ UNK_TYPE1 pad98[0x3];
|
||||
/* 0x9B */ u8 running; // If 0, switch to next game state
|
||||
/* 0x9C */ u32 frames;
|
||||
/* 0xA0 */ UNK_TYPE1 padA0[0x2];
|
||||
/* 0xA0 */ u8 padA0[0x2];
|
||||
/* 0xA2 */ u8 framerateDivisor; // game speed?
|
||||
/* 0xA3 */ UNK_TYPE1 unkA3;
|
||||
}; // size = 0xA4
|
||||
|
||||
struct PreNMIContext {
|
||||
typedef struct PreNMIContext {
|
||||
/* 0x00 */ GameState state;
|
||||
/* 0xA4 */ u32 timer;
|
||||
/* 0xA8 */ UNK_TYPE4 unkA8;
|
||||
}; // size = 0xAC
|
||||
} PreNMIContext; // size = 0xAC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 resetting;
|
||||
/* 0x04 */ u32 resetCount;
|
||||
/* 0x08 */ OSTime duration;
|
||||
/* 0x10 */ OSTime resetTime;
|
||||
} PreNmiBuff; // size = 0x18 (actually osAppNmiBuffer is 0x40 bytes large but the rest is unused)
|
||||
|
||||
typedef struct GlobalContext GlobalContext;
|
||||
|
||||
@@ -1266,7 +1267,7 @@ typedef struct {
|
||||
/* 0x024 */ UNK_TYPE4 unk24;
|
||||
/* 0x028 */ OSMesg lockMesg[1];
|
||||
/* 0x02C */ OSMesg interrupts[8];
|
||||
/* 0x04C */ OSMesgQueue siEventCallbackQueue;
|
||||
/* 0x04C */ OSMesgQueue sSiIntMsgQ;
|
||||
/* 0x064 */ OSMesgQueue lock;
|
||||
/* 0x07C */ OSMesgQueue irqmgrCallbackQueue;
|
||||
/* 0x094 */ IrqMgrClient irqmgrCallbackQueueNode;
|
||||
|
||||
+9
-5
@@ -141,7 +141,7 @@ typedef struct {
|
||||
/* 0x10 */ f32 shadowScale; // Changes the size of the shadow
|
||||
/* 0x14 */ u8 shadowAlpha; // Default is 255
|
||||
/* 0x15 */ u8 feetFloorFlags; // Set if the actor's foot is clipped under the floor. & 1 is right foot, & 2 is left
|
||||
/* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDraw
|
||||
/* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDrawOpa
|
||||
} ActorShape; // size = 0x30
|
||||
|
||||
typedef struct Actor {
|
||||
@@ -289,12 +289,16 @@ typedef struct EnItem00 {
|
||||
/* 0x1A4 */ s8 unk1A4;
|
||||
} EnItem00; // size = 0x1A8
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Actor base;
|
||||
/* 0x144 */ ActorFunc update;
|
||||
struct EnAObj;
|
||||
|
||||
typedef void (*EnAObjActionFunc)(struct EnAObj*, struct GlobalContext*);
|
||||
|
||||
typedef struct EnAObj {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ EnAObjActionFunc actionFunc;
|
||||
/* 0x148 */ ColliderCylinder collision;
|
||||
/* 0x194 */ UNK_TYPE1 pad194[0x14];
|
||||
} ActorEnAObj; // size = 0x1A8
|
||||
} EnAObj; // size = 0x1A8
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ ACTORCAT_SWITCH,
|
||||
|
||||
+131
-111
@@ -6,196 +6,216 @@
|
||||
#include "z64dma.h"
|
||||
#include "z64math.h"
|
||||
|
||||
struct GlobalContext;
|
||||
struct Actor;
|
||||
struct SkelAnime;
|
||||
|
||||
#define LINK_ANIMETION_OFFSET(addr, offset) \
|
||||
(SEGMENT_ROM_START(link_animetion) + ((u32)addr & 0xFFFFFF) + ((u32)offset))
|
||||
#define LIMB_DONE 0xFF
|
||||
#define ANIMATION_ENTRY_MAX 50
|
||||
|
||||
#define ANIM_FLAG_UPDATEXZ 0x02
|
||||
#define ANIM_FLAG_UPDATEY 0x10
|
||||
#define ANIM_FLAG_UPDATEY (1 << 1)
|
||||
#define ANIM_FLAG_NOMOVE (1 << 4)
|
||||
|
||||
struct GlobalContext;
|
||||
struct Actor;
|
||||
typedef struct SkelAnime SkelAnime;
|
||||
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 {
|
||||
/* 0x000 */ Vec3s translation; // Translation relative to parent limb. root limb is a tranlation for entire model.
|
||||
/* 0x006 */ u8 firstChildIndex; // The first child's index into the limb table.
|
||||
/* 0x007 */ u8 nextLimbIndex; // The parent limb's next limb index into the limb table.
|
||||
/* 0x008 */ Gfx* displayLists[1]; // Display lists for the limb. Index 0 is the normal display list, index 1 is the
|
||||
// far model display list.
|
||||
} StandardLimb; // Size = 0xC
|
||||
/* 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
|
||||
|
||||
// Model has limbs with only rigid meshes
|
||||
typedef struct {
|
||||
/* 0x000 */ void** skeletonSeg; // Segment address of SkelLimbIndex.
|
||||
/* 0x004 */ u8 limbCount; // Number of limbs in the model.
|
||||
/* 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
|
||||
|
||||
// Model has limbs with only rigid meshes
|
||||
typedef struct {
|
||||
/* 0x00 */ void** segment;
|
||||
/* 0x04 */ u8 limbCount;
|
||||
} SkeletonHeader; // size = 0x8
|
||||
|
||||
// Model has limbs with flexible meshes
|
||||
typedef struct {
|
||||
/* 0x000 */ SkeletonHeader sh;
|
||||
/* 0x008 */ u8 dListCount; // Number of display lists in the model.
|
||||
/* 0x00 */ SkeletonHeader sh;
|
||||
/* 0x08 */ u8 dListCount;
|
||||
} FlexSkeletonHeader; // size = 0xC
|
||||
|
||||
typedef s16 AnimationRotationValue;
|
||||
|
||||
// Index into the frame data table.
|
||||
typedef struct {
|
||||
/* 0x000 */ u16 x;
|
||||
/* 0x002 */ u16 y;
|
||||
/* 0x004 */ u16 z;
|
||||
/* 0x00 */ u16 x;
|
||||
/* 0x02 */ u16 y;
|
||||
/* 0x04 */ u16 z;
|
||||
} JointIndex; // size = 0x06
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ s16 frameCount;
|
||||
/* 0x002 */ s16 unk02;
|
||||
} AnimationHeaderCommon; // size = 0x4
|
||||
/* 0x00 */ s16 frameCount;
|
||||
} AnimationHeaderCommon;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ AnimationHeaderCommon common;
|
||||
/* 0x04 */ s16* frameData; // referenced as tbl
|
||||
/* 0x08 */ JointIndex* jointIndices; // referenced as ref_tbl
|
||||
/* 0x0C */ u16 staticIndexMax;
|
||||
/* 0x000 */ AnimationHeaderCommon common;
|
||||
/* 0x004 */ s16* frameData; // referenced as tbl
|
||||
/* 0x008 */ JointIndex* jointIndices; // referenced as ref_tbl
|
||||
/* 0x00C */ u16 staticIndexMax;
|
||||
} AnimationHeader; // size = 0x10
|
||||
|
||||
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
|
||||
|
||||
typedef enum {
|
||||
ANIMATION_LINKANIMETION,
|
||||
ANIMATION_TYPE1,
|
||||
ANIMATION_TYPE2,
|
||||
ANIMATION_TYPE3,
|
||||
ANIMATION_TYPE4,
|
||||
ANIMATION_TYPE5
|
||||
ANIMENTRY_COPYALL,
|
||||
ANIMENTRY_INTERP,
|
||||
ANIMENTRY_COPYTRUE,
|
||||
ANIMENTRY_COPYFALSE,
|
||||
ANIMENTRY_MOVEACTOR
|
||||
} AnimationType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ DmaRequest req;
|
||||
/* 0x020 */ OSMesgQueue msgQueue;
|
||||
/* 0x038 */ OSMesg msg;
|
||||
} AnimationEntryType0; // size = 0x3C
|
||||
} AnimEntryLoadFrame; // size = 0x3C
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 unk00;
|
||||
/* 0x000 */ u8 queueFlag;
|
||||
/* 0x001 */ u8 vecCount;
|
||||
/* 0x004 */ Vec3s* dst;
|
||||
/* 0x008 */ Vec3s* src;
|
||||
} AnimationEntryType1; // size = 0xC
|
||||
} AnimEntryCopyAll; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 unk00;
|
||||
/* 0x001 */ u8 limbCount;
|
||||
/* 0x004 */ Vec3s* unk04;
|
||||
/* 0x008 */ Vec3s* unk08;
|
||||
/* 0x00C */ f32 unk0C;
|
||||
} AnimationEntryType2; // size = 0x10
|
||||
/* 0x000 */ u8 queueFlag;
|
||||
/* 0x001 */ u8 vecCount;
|
||||
/* 0x004 */ Vec3s* base;
|
||||
/* 0x008 */ Vec3s* mod;
|
||||
/* 0x00C */ f32 weight;
|
||||
} AnimEntryInterp; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 unk00;
|
||||
/* 0x000 */ u8 queueFlag;
|
||||
/* 0x001 */ u8 vecCount;
|
||||
/* 0x004 */ Vec3s* dst;
|
||||
/* 0x008 */ Vec3s* src;
|
||||
/* 0x00C */ u8* index;
|
||||
} AnimationEntryType3; // size = 0x10
|
||||
/* 0x00C */ u8* copyFlag;
|
||||
} AnimEntryCopyTrue; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 unk00;
|
||||
/* 0x000 */ u8 queueFlag;
|
||||
/* 0x001 */ u8 vecCount;
|
||||
/* 0x002 */ char unk02[0x2];
|
||||
/* 0x004 */ Vec3s* dst;
|
||||
/* 0x008 */ Vec3s* src;
|
||||
/* 0x00C */ u8* index;
|
||||
} AnimationEntryType4; // size = 0x10
|
||||
/* 0x00C */ u8* copyFlag;
|
||||
} AnimEntryCopyFalse; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ struct Actor* actor;
|
||||
/* 0x004 */ SkelAnime* skelAnime;
|
||||
/* 0x004 */ struct SkelAnime* skelAnime;
|
||||
/* 0x008 */ f32 unk08;
|
||||
} AnimationEntryType5; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 raw[0x3C];
|
||||
} AnimationEntryRaw; // size = 0x3C
|
||||
} AnimEntryMoveActor; // size = 0xC
|
||||
|
||||
typedef union {
|
||||
AnimationEntryRaw raw;
|
||||
AnimationEntryType0 type0;
|
||||
AnimationEntryType1 type1;
|
||||
AnimationEntryType2 type2;
|
||||
AnimationEntryType3 type3;
|
||||
AnimationEntryType4 type4;
|
||||
AnimationEntryType5 type5;
|
||||
} AnimationEntryType; // size = 0x3C
|
||||
AnimEntryLoadFrame load;
|
||||
AnimEntryCopyAll copy;
|
||||
AnimEntryInterp interp;
|
||||
AnimEntryCopyTrue copy1;
|
||||
AnimEntryCopyFalse copy0;
|
||||
AnimEntryMoveActor move;
|
||||
} AnimationEntryData; // size = 0x3C
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 type;
|
||||
/* 0x001 */ u8 unk01;
|
||||
/* 0x004 */ AnimationEntryType types;
|
||||
/* 0x004 */ AnimationEntryData data;
|
||||
} AnimationEntry; // size = 0x40
|
||||
|
||||
typedef struct AnimationContext {
|
||||
/* 0x000 */ s16 animationCount;
|
||||
/* 0x002 */ char unk02[2];
|
||||
/* 0x004 */ AnimationEntry entries[ANIMATION_ENTRY_MAX];
|
||||
} AnimationContext; // size = 0xC84
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ AnimationHeaderCommon common;
|
||||
/* 0x04 */ u32 segment;
|
||||
/* 0x000 */ AnimationHeaderCommon common;
|
||||
/* 0x004 */ u32 segment;
|
||||
} LinkAnimationHeader; // size = 0x8
|
||||
|
||||
struct SkelAnime {
|
||||
/* 0x00 */ u8 limbCount; // joint_Num
|
||||
/* modes 0 and 1 repeat the animation indefinitely
|
||||
* modes 2 and 3 play the animaton once then stop
|
||||
* modes >= 4 play the animation once, and always start at frame 0.
|
||||
*/
|
||||
/* 0x01 */ u8 mode;
|
||||
/* 0x02 */ u8 dListCount;
|
||||
/* 0x03 */ s8 unk03;
|
||||
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.
|
||||
/* 0x04 */ void** skeleton; // An array of pointers to limbs. Can be StandardLimb, LodLimb, or SkinLimb.
|
||||
/* 0x08 */
|
||||
union {
|
||||
AnimationHeader* animCurrentSeg;
|
||||
LinkAnimationHeader* linkAnimetionSeg;
|
||||
AnimationHeaderCommon* genericSeg;
|
||||
};
|
||||
/* 0x0C */ f32 initialFrame;
|
||||
/* 0x10 */ f32 animFrameCount;
|
||||
/* 0x14 */ f32 totalFrames;
|
||||
/* 0x18 */ f32 animCurrentFrame;
|
||||
/* 0x1C */ f32 animPlaybackSpeed;
|
||||
/* 0x20 */ Vec3s* limbDrawTbl; // now_joint
|
||||
/* 0x24 */ Vec3s* transitionDrawTbl; // morf_joint
|
||||
/* 0x28 */ f32 transCurrentFrame;
|
||||
/* 0x2C */ f32 transitionStep;
|
||||
/* 0x30 */ s32 (*animUpdate)();
|
||||
/* 0x34 */ s8 initFlags;
|
||||
/* 0x35 */ u8 flags;
|
||||
/* 0x36 */ s16 prevFrameRot;
|
||||
/* 0x38 */ Vec3s prevFramePos;
|
||||
/* 0x3E */ Vec3s unk3E;
|
||||
}; // size = 0x44
|
||||
/* 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 (*OverrideLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
typedef s32 (*OverrideLimbDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
struct Actor* actor);
|
||||
|
||||
typedef void (*PostLimbDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
struct Actor* actor);
|
||||
|
||||
typedef s32 (*OverrideLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
struct Actor* actor, Gfx** gfx);
|
||||
|
||||
typedef void (*PostLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
struct Actor* actor);
|
||||
struct Actor* actor, Gfx** gfx);
|
||||
|
||||
typedef s32 (*OverrideLimbDraw2)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
struct Actor* actor, Gfx** gfx);
|
||||
typedef s32 (*OverrideLimbDrawFlex)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
struct Actor* actor);
|
||||
|
||||
typedef void (*PostLimbDraw2)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
struct Actor* actor, Gfx** gfx);
|
||||
|
||||
typedef s32 (*OverrideLimbDrawSV)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
struct Actor* actor);
|
||||
|
||||
typedef void (*PostLimbDrawSV)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList1, Gfx** dList2, Vec3s* rot,
|
||||
struct Actor* actor);
|
||||
typedef void (*PostLimbDrawFlex)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList1, Gfx** dList2, Vec3s* rot,
|
||||
struct Actor* actor);
|
||||
|
||||
typedef void (*UnkActorDraw)(struct GlobalContext* globalCtx, s32 limbIndex, struct Actor* actor);
|
||||
|
||||
typedef void (*AnimationEntryCallback)(struct GlobalContext*, AnimationEntryType*);
|
||||
typedef void (*AnimationEntryCallback)(struct GlobalContext*, AnimationEntryData*);
|
||||
|
||||
extern u32 link_animetion_segment;
|
||||
|
||||
|
||||
+27
-6
@@ -274,16 +274,37 @@ typedef struct {
|
||||
/* 0x8 */ s32 size;
|
||||
} EffectSsInfo; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ EffectSs* data_table; // Name from debug assert
|
||||
/* 0x4 */ s32 searchIndex;
|
||||
/* 0x8 */ s32 size;
|
||||
} EffectTableInfo; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ UNK_TYPE4 unk0;
|
||||
/* 0x4 */ EffectSsInitFunc init;
|
||||
} ParticleOverlayInfo; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 vromStart;
|
||||
/* 0x04 */ u32 vromEnd;
|
||||
/* 0x08 */ void* vramStart;
|
||||
/* 0x0C */ void* vramEnd;
|
||||
/* 0x10 */ void* loadedRamAddr;
|
||||
/* 0x14 */ ParticleOverlayInfo* overlayInfo;
|
||||
/* 0x18 */ u32 unk18; // Always 0x01000000?
|
||||
} ParticleOverlay; // size = 0x1C
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ EFFECT_SS_DUST,
|
||||
/* 0x01 */ EFFECT_SS_KIRAKIRA,
|
||||
/* 0x02 */ EFFECT_SS_UNSET_02,
|
||||
/* 0x02 */ EFFECT_SS_UNSET_02, // Deleted
|
||||
/* 0x03 */ EFFECT_SS_BOMB2,
|
||||
/* 0x04 */ EFFECT_SS_BLAST,
|
||||
/* 0x05 */ EFFECT_SS_G_SPK,
|
||||
/* 0x06 */ EFFECT_SS_D_FIRE,
|
||||
/* 0x07 */ EFFECT_SS_BUBBLE,
|
||||
/* 0x08 */ EFFECT_SS_UNSET_08,
|
||||
/* 0x08 */ EFFECT_SS_UNSET_08, // Deleted
|
||||
/* 0x09 */ EFFECT_SS_G_RIPPLE,
|
||||
/* 0x0A */ EFFECT_SS_G_SPLASH,
|
||||
/* 0x0B */ EFFECT_SS_UNSET_0B,
|
||||
@@ -293,8 +314,8 @@ typedef enum {
|
||||
/* 0x0F */ EFFECT_SS_HAHEN,
|
||||
/* 0x10 */ EFFECT_SS_STICK,
|
||||
/* 0x11 */ EFFECT_SS_SIBUKI,
|
||||
/* 0x12 */ EFFECT_SS_UNSET_12,
|
||||
/* 0x13 */ EFFECT_SS_UNSET_13,
|
||||
/* 0x12 */ EFFECT_SS_UNSET_12, // Deleted
|
||||
/* 0x13 */ EFFECT_SS_UNSET_13, // Deleted
|
||||
/* 0x14 */ EFFECT_SS_STONE1,
|
||||
/* 0x15 */ EFFECT_SS_HITMARK,
|
||||
/* 0x16 */ EFFECT_SS_FHG_FLASH,
|
||||
@@ -306,11 +327,11 @@ typedef enum {
|
||||
/* 0x1C */ EFFECT_SS_FIRE_TAIL,
|
||||
/* 0x1D */ EFFECT_SS_EN_FIRE,
|
||||
/* 0x1E */ EFFECT_SS_EXTRA,
|
||||
/* 0x1F */ EFFECT_SS_UNSET_1F,
|
||||
/* 0x1F */ EFFECT_SS_UNSET_1F, // Deleted
|
||||
/* 0x20 */ EFFECT_SS_DEAD_DB,
|
||||
/* 0x21 */ EFFECT_SS_DEAD_DD,
|
||||
/* 0x22 */ EFFECT_SS_DEAD_DS,
|
||||
/* 0x23 */ EFFECT_SS_UNSET_23,
|
||||
/* 0x23 */ EFFECT_SS_UNSET_23, // Deleted
|
||||
/* 0x24 */ EFFECT_SS_ICE_SMOKE,
|
||||
/* 0x25 */ EFFECT_EN_ICE_BLOCK,
|
||||
/* 0x26 */ EFFECT_SS_SBN,
|
||||
|
||||
+2
-2
@@ -215,8 +215,8 @@ typedef struct {
|
||||
} SCmdMinimapChests;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 opaqueDl;
|
||||
/* 0x4 */ u32 translucentDl;
|
||||
/* 0x0 */ Gfx* opaqueDl;
|
||||
/* 0x4 */ Gfx* translucentDl;
|
||||
} RoomMeshType0Params; // size = 0x8
|
||||
|
||||
// Fields TODO
|
||||
|
||||
Reference in New Issue
Block a user