fire arrow almost done, draw func regalloc

This commit is contained in:
fig02
2020-03-28 02:41:49 -04:00
1219 changed files with 33806 additions and 37613 deletions
+89 -61
View File
@@ -1,7 +1,7 @@
#ifndef _FUNCTIONS_H_
#define _FUNCTIONS_H_
#include <z64.h>
#include "z64.h"
float fabsf(float f);
#pragma intrinsic(fabsf)
@@ -397,10 +397,10 @@ Hilite* func_8003435C(Vec3f* object, GlobalContext* globalCtx);
s32 func_800343CC(GlobalContext* globalCtx, Actor* actor, s16* arg2, f32 arg3, u16 (*unkFunc1)(GlobalContext*, Actor*),
s16 (*unkFunc2)(GlobalContext*, Actor*));
s16 func_800347E8(s16 arg0);
void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc1, void* unkFunc2, Actor* actor,
s16 alpha);
void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc1, void* unkFunc2, Actor* actor,
s16 alpha);
void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1,
SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha);
void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1,
SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha);
void func_80034EC0(SkelAnime* skelAnime, struct_80034EC0_Entry* arg1, s32 arg2);
void Actor_Noop(Actor* actor, GlobalContext* globalCtx);
void Draw_DListOpa(GlobalContext* globalCtx, u32 dlist);
@@ -800,7 +800,7 @@ void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* pos2, s32 radius
// ? func_8006BE88(?);
// ? func_8006BF1C(?);
// ? func_8006C0FC(?);
u16 func_8006C360(GlobalContext*, u32);
u16 Text_GetFaceReaction(GlobalContext* globalCtx, u32 reactionSet);
// ? func_8006C3A0(?);
// ? func_8006C3D0(?);
void func_8006C438(GlobalContext* globalCtx, s16 arg1);
@@ -1005,7 +1005,9 @@ s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2);
void func_80088B34(s16 arg0);
void Interface_Draw(GlobalContext* globalCtx);
void Interface_Update(GlobalContext* globalCtx);
f32 func_8008E520(Actor* actor, Path* path, s16, s16*);
Path* Path_GetByIndex(GlobalContext* globalCtx, s16 index, s16 max);
f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw);
void Path_CopyLastPoint(Path* path, Vec3f* dest);
// ? func_8008E6A0(?);
// ? func_8008E6AC(?);
// ? func_8008E750(?);
@@ -1070,7 +1072,7 @@ s16 func_80092F88(Camera*, UNK_TYPE);
// ? func_80093708(?);
// ? func_8009373C(?);
Gfx* func_80093774(Gfx* a0, u32 a1);
// ? func_800937C0(?);
Gfx* func_800937C0(Gfx* a0);
// ? func_80093808(?);
// ? func_800938B4(?);
// ? func_8009398C(?);
@@ -1129,59 +1131,85 @@ s32 Scene_ExecuteCommands(GlobalContext* globalCtx, SceneCmd* sceneCmd);
void func_80098CBC(GlobalContext* globalCtx, u8* nbTransitionActors);
void func_800994A0(GlobalContext* globalCtx);
void Scene_Draw(GlobalContext* globalCtx);
// ? func_800A08A0(?);
// ? func_800A0D94(?);
// ? func_800A106C(?);
// ? func_800A1344(?);
void SkelAnime_Draw(GlobalContext* globalCtx, u32 limbIndex, u32 adt, u8 limbDListCnt, void* internal0,
void* internal1);
// ? func_800A180C(?);
void func_800A1AC8(GlobalContext* globalCtx, u32 limbIndex, u32 actorDrawTbl, u32 dListCount, void* posUpdateFunc,
void* drawFunc, Actor* actor);
// ? func_800A1D8C(?);
// ? func_800A1FC8(?);
s32 SkelAnime_GetFrameCount(u32 animation);
// ? func_800A2044(?);
// ? func_800A24A0(?);
Gfx* func_800A273C(GlobalContext* globalCtx, u32 limbIndex, u32 adt, u8 limbDListCnt, void* internal0, void* internal1,
Actor* actor, Gfx* gfx);
// ? func_800A2E70(?);
// ? func_800A32EC(?);
// ? func_800A3334(?);
// ? func_800A336C(?);
// ? func_800A3478(?);
// ? func_800A34DC(?);
// ? func_800A390C(?);
// ? func_800A39AC(?);
// ? func_800A3B8C(?);
// ? func_800A3BE4(?);
// ? func_800A3C9C(?);
// ? func_800A3F08(?);
// ? func_800A3D70(?);
// ? func_800A4478(?);
void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skeleton, u32 animation, u16* unk0, u16* unk1,
u8 unk2);
void func_800A46F8(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skeleton, u32 animation, u16* unk0, u16* unk1,
u8 unk2);
// ? func_800A4A20(?);
// ? func_800A4AD8(?);
// ? func_800A4D9C(?);
// ? func_800A4EE0(?);
// ? func_800A487C(?);
// ? func_800A49B0(?);
void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable,
SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc,
Actor* actor, s32 dListIndex);
void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 limbCount,
SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc,
Actor* actor, s32 dListIndex);
void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable,
SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor);
void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 limbCount,
SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc,
Actor* actor);
s16 SkelAnime_GetFrameCount(GenericAnimationHeader* animationSeg);
Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable,
SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc,
Actor* actor, Gfx* gfx);
Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 dListCount,
SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc,
Actor* actor, Gfx* gfx);
void func_800A2E70(s32, Vec3s*, Vec3s*, Vec3s*, f32);
void SkelAnime_AnimationCtxReset(AnimationContext* animationCtx);
void func_800A32F4(GlobalContext* globalCtx);
void func_800A3310(GlobalContext* globalCtx);
void SkelAnime_LoadLinkAnimetion(GlobalContext* globalCtx, LinkAnimetionEntry* linkAnimetionSeg, s32 frame,
s32 limbCount, void* ram);
void SkelAnime_LoadAnimationType1(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src);
void SkelAnime_LoadAnimationType2(GlobalContext* globalCtx, s32 limbCount, Vec3s* arg2, Vec3s* arg3, f32 arg4);
void SkelAnime_LoadAnimationType3(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index);
void SkelAnime_LoadAnimationType4(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index);
void SkelAnime_LoadAnimationType5(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3);
void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx);
void SkelAnime_InitLinkAnimetion(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
LinkAnimetionEntry* linkAnimetionEntrySeg, s32 flags, Vec3s* actorDrawTbl, Vec3s* arg6,
s32 limbBufCount);
void func_800A3B8C(SkelAnime* skelAnime);
void func_800A3BC0(GlobalContext* globalCtx, SkelAnime* skelAnime);
void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime);
void func_800A3EE8(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2);
void SkelAnime_LinkChangeAnimation(GlobalContext* globalCtx, SkelAnime* skelAnime,
LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed, f32 arg4,
f32 frameCount, u8 arg6, f32 arg7);
void func_800A407C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg);
void func_800A40DC(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg,
f32 playbackSpeed);
void func_800A4140(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg);
void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg,
f32 playbackSpeed);
void func_800A41FC(GlobalContext* globalCtx, SkelAnime* skelAnime);
void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg,
f32 frame);
void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg,
f32 frame);
void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 frame);
void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame,
LinkAnimetionEntry* linkAnimetionEntrySeg2, f32 arg5, f32 arg6, Vec3s* arg7);
void func_800A43B8(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame,
LinkAnimetionEntry* linkAnimetionEntrySeg2, f32 arg5, f32 arg6, Vec3s* arg7);
s32 func_800A4530(SkelAnime* skelAnime, f32 arg1);
void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animationseg, Vec3s* actorDrawTable, Vec3s* arg5, s32 limbCount);
void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animationseg, Vec3s* actorDrawTable, Vec3s* arg5, s32 limbCount);
void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animationseg);
s32 SkelAnime_FrameUpdateMatrix(SkelAnime* skelAnime);
// ? func_800A4C58(?);
// ? func_800A4FE4(?);
void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount,
u8 unk1, f32 transitionRate);
void func_800A51E8(SkelAnime* skelAnime, u32 animation);
void func_800A5240(SkelAnime* skelAnime, u32 animation, f32 unk0);
void func_800A529C(SkelAnime* skelAnime, u32 animation, f32 unk0, Actor* actor);
// ? func_800A52F8(?);
// ? func_800A54FC(?);
void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 playbackSpeed, f32 frame,
f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2);
void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 playbackSpeed, f32 unk0,
f32 frameCount, u8 unk1, f32 transitionRate);
void func_800A51E8(SkelAnime* skelAnime, AnimationHeader* animationseg);
void func_800A5240(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 transitionRate);
void func_800A529C(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 playbackSpeed);
void SkelAnime_ChangeAnimationDefault(SkelAnime* skelAnime, AnimationHeader* animationseg);
void SkelAnime_ChangeAnimationTransitionRate(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 transitionRate);
void SkelAnime_ChangeAnimationPlaybackSpeed(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 playbackSpeed);
void func_800A5408(SkelAnime* skelAnime);
void func_800A5428(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* index);
void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle);
s32 func_800A56C8(SkelAnime* skelAnime, f32 arg1);
// ? func_800A56F0(?);
// ? func_800A5774(?);
void SkelAnime_Free(SkelAnime* skelAnime, GlobalContext* globalCtx);
// ? func_800A57C0(?);
// ? func_800A598C(?);
// ? func_800A5E28(?);
@@ -1641,8 +1669,8 @@ void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode);
void Matrix_RotateX(f32 x, u8 mode);
void Matrix_RotateY(f32 y, u8 mode);
void Matrix_RotateZ(f32 z, u8 mode);
void Matrix_RotateXYZ(s16 x, s16 y, s16 z, u8 mode);
void func_800D1340(Vec3f* arg0, Vec3s* arg1);
void Matrix_RotateZYX(s16 x, s16 y, s16 z, u8 mode);
void Matrix_TranslateThenRotateZYX(Vec3f* arg0, Vec3s* arg1);
void func_800D1694(f32 x, f32 y, f32 z, Vec3s* vec);
Mtx* Matrix_MtxFToMtx(MtxF* src, Mtx* dest);
Mtx* Matrix_ToMtx(Mtx* dest, char* file, s32 line);
+1 -4
View File
@@ -54,7 +54,7 @@ extern u32 D_0403F070;
extern u32 D_04042440;
//extern ? D_04048160;
extern u32 D_04048180;
extern u32 D_04049210;
extern Gfx D_04049210[];
extern u32 D_04049AD0;
//extern ? D_0404D1C0;
extern u32 D_0404D450;
@@ -544,8 +544,6 @@ extern u32 gObjectTableSize;
extern RomFile gObjectTable[402];
extern EntranceInfo gEntranceTable[1556];
extern Scene gSceneTable[110];
//extern ? D_8012A480;
//extern ? D_8012A484;
//extern ? D_8012A4A0;
//extern ? D_8012A4E0;
//extern ? D_8012A4EC;
@@ -3506,7 +3504,6 @@ extern u8 D_8015FD70;
//extern ? D_80160014;
//extern ? D_80160018;
//extern ? D_80160020;
//extern ? D_801600B0;
//extern ? D_801600C0;
extern u8 D_80161010;
extern u8 D_801610D4;
+10 -50
View File
@@ -11,6 +11,8 @@
#include <z64scene.h>
#include <z64effect.h>
#include <z64item.h>
#include <z64animation.h>
#include <z64dma.h>
#include <bgm.h>
#include <sfx.h>
#include <color.h>
@@ -499,17 +501,6 @@ typedef struct {
/* 0xE40E */ char unk_E40E[0x0A];
} MessageContext; // size = 0xE418
typedef struct {
/* 0x00 */ u32 vromAddr; // VROM address (source)
/* 0x04 */ void* dramAddr; // DRAM address (destination)
/* 0x08 */ u32 size; // File Transfer size
/* 0x0C */ char* filename; // Filename for debugging
/* 0x10 */ s32 line; // Line for debugging
/* 0x14 */ s32 unk_14;
/* 0x18 */ OSMesgQueue* notifyQueue; // Message queue for the notification message
/* 0x1C */ OSMesg notifyMsg; // Completion notification message
} DmaRequest; // size = 0x20
typedef struct {
/* 0x0000 */ View view;
/* 0x0128 */ Vtx* vtx_128;
@@ -885,7 +876,8 @@ typedef struct GlobalContext {
/* 0x10B0B */ char unk_10B0B[0x7];
/* 0x10B12 */ u8 unk_10B12[4];
/* 0x10B16 */ u8 unk_10B16[4];
/* 0x10B1A */ char unk_10B1A[0xC8A];
/* 0x10B1A */ char unk_10B1A[0x6];
/* 0x10B20 */ AnimationContext animationCtx;
/* 0x117A4 */ ObjectContext objectCtx;
/* 0x11CBC */ RoomContext roomCtx;
/* 0x11D30 */ s16 unk_11D30[2];
@@ -964,39 +956,14 @@ typedef struct LoadedParticleEntry {
// Some animation related structure
typedef struct {
/* 0x00 */ u32 animation;
/* 0x04 */ f32 playbackSpeed;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 frameCount;
/* 0x10 */ u8 unk_10;
/* 0x14 */ f32 transitionRate;
/* 0x00 */ AnimationHeader* animation;
/* 0x04 */ f32 playbackSpeed;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 frameCount;
/* 0x10 */ u8 unk_10;
/* 0x14 */ f32 transitionRate;
} struct_80034EC0_Entry; // size = 0x18
typedef struct {
/* 0x00 */ u8 limbCount;
/* 0x01 */ char unk_01[0x01];
/* 0x02 */ u8 dListCount;
/* 0x03 */ char unk_03[0x01]; /* Probably Padding */
/* 0x04 */ u32 limbIndex;
/* 0x08 */ u32* animCurrent;
/* 0x0C */ char unk_0C[0x04];
/* 0x10 */ f32 animFrameCount;
/* 0x14 */ f32 unk_14;
/* 0x18 */ f32 animCurrentFrame;
/* 0x1C */ f32 animPlaybackSpeed;
/* 0x20 */ u32 actorDrawTbl;
/* 0x24 */ u32 unk_24;
/* 0x28 */ u32 unk_28;
/* 0x2C */ u32 unk_2C;
/* 0x30 */ void* funcUnk30; /* Some function pointer */
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ u16 unk_3C;
/* 0x3E */ u16 unk_3E;
/* 0x40 */ u16 unk_40;
/* 0x42 */ u16 unk_42;
} SkelAnime; // size = 0x44
typedef struct {
/* 0x00 */ u32 unk_00;
/* 0x04 */ u32(*init)(GlobalContext*, u32, LoadedParticleEntry*, void*);
@@ -1200,13 +1167,6 @@ typedef struct {
/* 0x20 */ u8 data[0x10000-0x20];
} ISVDbg;
typedef struct {
/* 0x00 */ u32 vromStart;
/* 0x04 */ u32 vromEnd;
/* 0x08 */ u32 romStart;
/* 0x0C */ u32 romEnd;
} DmaEntry;
typedef struct {
char name[0x18];
u32 mediaFormat;
+192
View File
@@ -0,0 +1,192 @@
#ifndef _Z64_ANIMATION_H
#define _Z64_ANIMATION_H
#include <ultra64.h>
#include <ultra64/gbi.h>
#include <z64dma.h>
#define LINK_ANIMETION_OFFSET(addr,offset) (((u32)&_link_animetionSegmentRomStart)+((u32)addr)-((u32)&link_animetion_segment)+((u32)offset))
#define LIMB_DONE 0xFF
#define ANIMATION_ENTRY_MAX 50
struct GlobalContext;
struct Actor;
typedef struct SkelAnime SkelAnime;
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.
} SkelLimbEntry; // Size = 0xC or 0x10
typedef struct {
/* 0x000 */ SkelLimbEntry* limbs[1]; // One ore more limbs, index 0 is the root limb.
} Skeleton; // Size >= 4
typedef struct {
/* 0x000 */ Skeleton* skeletonSeg; // Segment address of SkelLimbIndex.
/* 0x004 */ u8 limbCount; // Number of limbs in the model.
/* 0x005 */ char unk_05[3]; // unknown, maybe padding?
/* 0x008 */ u8 dListCount; // Number of display lists in the model.
} SkeletonHeader; // Size = 0xC
typedef s16 AnimationRotationValue;
typedef struct {
/* 0x000 */ u16 x;
/* 0x002 */ u16 y;
/* 0x004 */ u16 z;
} AnimationRotationIndex; // size = 0x06
typedef struct {
s16 frameCount;
s16 unk_02;
} GenericAnimationHeader;
typedef struct {
/* 0x000 */ GenericAnimationHeader genericHeader;
/* 0x004 */ u32 rotationValueSeg; // referenced as tbl
/* 0x008 */ u32 rotationIndexSeg; // referenced as ref_tbl
/* 0x00C */ u16 limit;
} AnimationHeader; // size = 0x10
typedef enum {
ANIMATION_LINKANIMETION,
ANIMATION_TYPE1,
ANIMATION_TYPE2,
ANIMATION_TYPE3,
ANIMATION_TYPE4,
ANIMATION_TYPE5
} AnimationType;
typedef struct {
/* 0x000 */ DmaRequest req;
/* 0x020 */ OSMesgQueue msgQueue;
/* 0x038 */ OSMesg msg;
} AnimationEntryType0;
typedef struct {
/* 0x000 */ u8 unk_00;
/* 0x001 */ u8 vecCount;
/* 0x004 */ Vec3s* dst;
/* 0x008 */ Vec3s* src;
/* 0x00C */ char unk_0C[0x30];
} AnimationEntryType1;
typedef struct {
/* 0x000 */ u8 unk_00;
/* 0x001 */ u8 limbCount;
/* 0x004 */ Vec3s* unk_04;
/* 0x008 */ Vec3s* unk_08;
/* 0x00C */ f32 unk_0C;
/* 0x010 */ char unk_10[0x2C];
} AnimationEntryType2;
typedef struct {
/* 0x000 */ u8 unk_00;
/* 0x001 */ u8 vecCount;
/* 0x004 */ Vec3s* dst;
/* 0x008 */ Vec3s* src;
/* 0x00C */ u8* index;
/* 0x010 */ char unk_10[0x2C];
} AnimationEntryType3;
typedef struct {
/* 0x000 */ u8 unk_00;
/* 0x001 */ u8 vecCount;
/* 0x002 */ char unk_02[0x2];
/* 0x004 */ Vec3s* dst;
/* 0x008 */ Vec3s* src;
/* 0x00C */ u8* index;
/* 0x010 */ char unk_10[0x2C];
} AnimationEntryType4;
typedef struct {
/* 0x000 */ struct Actor* actor;
/* 0x004 */ SkelAnime* skelAnime;
/* 0x008 */ f32 unk_08;
/* 0x00C */ char unk_0C[0x30];
} AnimationEntryType5;
typedef struct {
/* 0x000 */ u8 raw[0x3C];
} AnimationEntryRaw;
typedef union {
AnimationEntryRaw raw;
AnimationEntryType0 type0;
AnimationEntryType1 type1;
AnimationEntryType2 type2;
AnimationEntryType3 type3;
AnimationEntryType4 type4;
AnimationEntryType5 type5;
} AnimationEntryType;
typedef struct {
/* 0x000 */ u8 type;
/* 0x001 */ u8 unk_01;
/* 0x004 */ AnimationEntryType types;
} AnimationEntry; // size = 0x40
typedef struct AnimationContext {
s16 animationCount;
char unk_02[2];
AnimationEntry entries[ANIMATION_ENTRY_MAX];
} AnimationContext;
typedef struct {
GenericAnimationHeader genericHeader;
u32 animationSegAddress;
} LinkAnimetionEntry;
struct SkelAnime {
/* 0x00 */ u8 limbCount; // joint_Num
/* 0x01 */ u8 unk_01; // state? 00 = loop 02 = don't loop ?
/* 0x02 */ u8 dListCount;
/* 0x03 */ s8 unk_03;
/* 0x04 */ Skeleton* skeleton;
/* 0x08 */
union {
AnimationHeader* animCurrentSeg;
LinkAnimetionEntry* linkAnimetionSeg;
GenericAnimationHeader* genericSeg;
};
/* 0x0C */ f32 unk_0C;
/* 0x10 */ f32 animFrameCount; // ending frame?
/* 0x14 */ f32 unk_14; // Loop frame?
/* 0x18 */ f32 animCurrentFrame;
/* 0x1C */ f32 animPlaybackSpeed;
/* 0x20 */ Vec3s* actorDrawTbl; // now_joint
/* 0x24 */ Vec3s* unk_24; // morf_joint
/* 0x28 */ f32 unk_28;
/* 0x2C */ f32 unk_2C;
/* 0x30 */ s32 (*animUpdate)();
/* 0x34 */ s8 unk_34;
/* 0x35 */ u8 unk_35; // flags
/* 0x36 */ s16 unk_36;
/* 0x38 */ s16 unk_38;
/* 0x3A */ s16 unk_3A;
/* 0x3C */ s16 unk_3C;
/* 0x3E */ s16 unk_3E;
/* 0x40 */ s16 unk_40;
/* 0x42 */ s16 unk_42;
}; // size = 0x44
typedef s32 (*SkelAnime_LimbUpdateMatrix)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
Vec3f* pos, Vec3s* rot, struct Actor* actor);
typedef void (*SkelAnime_LimbAppendDlist)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
Vec3s* rot, struct Actor* actor);
typedef s32 (*SkelAnime_LimbUpdateMatrix2)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
Vec3f* pos, Vec3s* rot, struct Actor* actor, Gfx** gfx);
typedef void (*SkelAnime_LimbAppendDlist2)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
Vec3s* rot, struct Actor* actor, Gfx** gfx);
typedef void (*AnimationEntryCallback)(struct GlobalContext*, AnimationEntryType*);
extern u32 link_animetion_segment;
#endif
+23
View File
@@ -0,0 +1,23 @@
#ifndef _Z64_DMA_H_
#define _Z64_DMA_H_
#include <ultra64.h>
typedef struct {
/* 0x00 */ u32 vromAddr; // VROM address (source)
/* 0x04 */ void* dramAddr; // DRAM address (destination)
/* 0x08 */ u32 size; // File Transfer size
/* 0x0C */ char* filename; // Filename for debugging
/* 0x10 */ s32 line; // Line for debugging
/* 0x14 */ s32 unk_14;
/* 0x18 */ OSMesgQueue* notifyQueue; // Message queue for the notification message
/* 0x1C */ OSMesg notifyMsg; // Completion notification message
} DmaRequest; // size = 0x20
typedef struct {
/* 0x00 */ u32 vromStart;
/* 0x04 */ u32 vromEnd;
/* 0x08 */ u32 romStart;
/* 0x0C */ u32 romEnd;
} DmaEntry;
#endif
+2 -2
View File
@@ -328,8 +328,8 @@ typedef struct {
} WaterBoxHeader;
typedef struct {
/* 0x00 */ u8 count; // Total number of points in the path for the actor to follow
/* 0x04 */ Vec3s* path; // Segment Address of the start of the path list
/* 0x00 */ u8 count; // number of points in the path
/* 0x04 */ Vec3s* points; // Segment Address to the array of points
} Path; // size = 0x8
typedef union {