Demo_Syoten (#672)

* Demo_Syoten

* Fix build, use UNK_PTR

* Use Vtx

* Keyframe stuff

* PR

* BSS

* PR

* Fix fix
This commit is contained in:
Maide
2022-03-24 22:41:04 -03:00
committed by GitHub
parent 950f3a247e
commit 0fbbde8d7d
8 changed files with 638 additions and 52 deletions
+7 -2
View File
@@ -1,6 +1,7 @@
<Root>
<File Name="object_syoten" Segment="6">
<!-- <Blob Name="object_syoten_Blob_000000" Size="0x250" Offset="0x0" /> -->
<!-- <Blob Name="object_syoten_Blob_000000" Size="0x23C" Offset="0x0" /> -->
<Blob Name="object_syoten_Blob_00023C" Size="0x214" Offset="0x23C" />
<DList Name="object_syoten_DL_000450" Offset="0x450" />
<DList Name="object_syoten_DL_000518" Offset="0x518" />
<DList Name="object_syoten_DL_0005E0" Offset="0x5E0" />
@@ -12,12 +13,16 @@
<Texture Name="object_syoten_Tex_000A90" OutName="tex_000A90" Format="i8" Width="32" Height="32" Offset="0xA90" />
<Texture Name="object_syoten_Tex_000E90" OutName="tex_000E90" Format="i8" Width="32" Height="32" Offset="0xE90" />
<TextureAnimation Name="object_syoten_Matanimheader_001298" Offset="0x1298" />
<!-- <Blob Name="object_syoten_Blob_0012A0" Size="0x90" Offset="0x12A0" /> -->
<!-- <Blob Name="object_syoten_Blob_0012A0" Size="0x88" Offset="0x12A0" /> -->
<Blob Name="object_syoten_Blob_001328" Size="0x48" Offset="0x1328" />
<DList Name="object_syoten_DL_001370" Offset="0x1370" />
<TextureAnimation Name="object_syoten_Matanimheader_001448" Offset="0x1448" />
<DList Name="object_syoten_DL_001730" Offset="0x1730" />
<DList Name="object_syoten_DL_0018A0" Offset="0x18A0" />
<TextureAnimation Name="object_syoten_Matanimheader_0018B8" Offset="0x18B8" />
<Array Name="object_syotenVtx_0018C0" Count="81" Offset="0x18C0">
<Vtx/>
</Array>
<DList Name="object_syoten_DL_001DD0" Offset="0x1DD0" />
<DList Name="object_syoten_DL_002018" Offset="0x2018" />
<DList Name="object_syoten_DL_002880" Offset="0x2880" />
+8 -6
View File
@@ -1586,7 +1586,7 @@ void func_800FE658(f32 arg0);
// void func_800FE778(void);
// void func_800FE788(void);
// void func_800FE798(void);
// void func_800FE7A8(void);
void func_800FE7A8(Color_RGBA8* arg0, Color_RGBA8* arg1);
s32 func_800FE9B4(GlobalContext* globalCtx);
// void func_800FEA50(void);
void func_800FEAB0(void);
@@ -3191,12 +3191,12 @@ void func_80183070(void);
// void func_801832B0(void);
// void func_8018332C(void);
// void func_8018340C(void);
// void func_80183430(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_8018349C(void);
void func_80183430(SkeletonInfo* skeletonInfo, void* arg1, void* arg2, Vec3s* arg3, s16* arg4, UnkKeyframeCallback* callbacks);
void func_8018349C(UNK_PTR arg0);
// void func_801834A8(void);
// void func_80183510(void);
// void func_80183580(void);
// void func_801835EC(void);
void func_801835EC(UNK_PTR arg0, UNK_PTR arg1);
// void func_80183658(void);
// void func_801836CC(void);
// void func_8018373C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
@@ -3206,9 +3206,11 @@ void func_80183070(void);
// void func_80183A3C(void);
// void func_80183B08(void);
// void func_80183B68(void);
// void func_80183DE0(void);
s32 func_80183DE0(SkeletonInfo* skeletonInfo);
// void func_8018410C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8018450C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
void func_8018450C(GlobalContext* globalCtx, SkeletonInfo* skeleton, Mtx* mtx,
OverrideKeyframeDrawScaled overrideKeyframeDraw, PostKeyframeDrawScaled postKeyframeDraw,
Actor* actor);
// void func_801845A4(void);
// void func_801845C8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_80184638(void);
+1 -1
View File
@@ -3285,9 +3285,9 @@ extern ShrinkWindowContext gShrinkWindowContext;
extern ShrinkWindowContext* gShrinkWindowContextPtr;
// extern UNK_TYPE4 D_801F6B50;
// extern UNK_TYPE1 D_801F6B58;
extern FaultAddrConvClient sKaleidoAreaFaultClient;
extern void (*sKaleidoScopeUpdateFunc)(GlobalContext* globalCtx);
extern void (*sKaleidoScopeDrawFunc)(GlobalContext* globalCtx);
extern FaultAddrConvClient sKaleidoAreaFaultClient;
// extern UNK_TYPE1 D_801F6C10;
extern Input D_801F6C18;
// extern UNK_TYPE1 D_801F6C30;
+69
View File
@@ -296,4 +296,73 @@ typedef struct AnimationSpeedInfo {
/* 0x0C */ f32 morphFrames;
} AnimationSpeedInfo; // size = 0x10
struct SkeletonInfo;
typedef s32 (*UnkKeyframeCallback)(struct GlobalContext* globalCtx, struct SkeletonInfo* skeletonInfo, s32* arg2, Gfx** dList,
u8* arg4, void* arg5);
// Keyframe limb?
typedef struct {
/* 0x00 */ Gfx* dList;
/* 0x04 */ u8 unk_4;
/* 0x05 */ u8 flags;
/* 0x06 */ Vec3s root;
} Struct_801BFA14_Arg1_Field4; // size = 0xC
// Other limb type?
typedef struct {
/* 0x00 */ Gfx* dList;
/* 0x04 */ u8 unk_4;
/* 0x05 */ u8 flags;
/* 0x06 */ u8 unk_6; // transform limb draw index
} Struct_801BFA14_Arg1_Field4_2; // size = 0x8
typedef struct {
/* 0x00 */ u8 limbCount;
/* 0x01 */ u8 unk_1; // non-zero in object files, number of non-null-dlist limbs?
/* 0x04 */ union {
Struct_801BFA14_Arg1_Field4* unk_4; // arrays
Struct_801BFA14_Arg1_Field4_2* unk_4_2;
};
/* 0x08 */ s16* unk_8;
/* 0x0C */ s16* unk_C;
/* 0x0C */ char unk_10[0x2];
/* 0x12 */ s16 unk_12;
} Struct_801BFA14_Arg1;
typedef struct {
/* 0x00 */ u16* unk_0;
/* 0x04 */ s16* unk_4;
/* 0x08 */ s16* unk_8;
/* 0x0C */ s16* unk_C;
/* 0x0C */ char unk_10[0x2];
/* 0x12 */ s16 unk_12;
} SkeletonInfo_1C;
typedef struct {
/* 0x00 */ f32 unk_0;
/* 0x04 */ f32 unk_4;
/* 0x08 */ f32 unk_8;
/* 0x0C */ f32 unk_C;
/* 0x10 */ f32 unk_10;
/* 0x14 */ s32 unk_14;
} FrameControl;
// FlexKeyframeSkeleton ?
typedef struct SkeletonInfo {
/* 0x00 */ FrameControl frameCtrl;
/* 0x18 */ Struct_801BFA14_Arg1* unk_18; // array
/* 0x1C */ SkeletonInfo_1C* unk_1C;
/* 0x20 */ UnkKeyframeCallback* unk_20; // pointer to array of functions
/* 0x24 */ f32 unk_24; // duration? current time?
/* 0x28 */ Vec3s* frameData; // array of 3 Vec3s
/* 0x2C */ s16* unk_2C;
} SkeletonInfo;
typedef s32 (*OverrideKeyframeDrawScaled)(struct GlobalContext* globalCtx, SkeletonInfo* skeletonInfo, s32 limbIndex, Gfx** dList,
u8* flags, struct Actor* actor, Vec3f* scale, Vec3s* rot, Vec3f* pos);
typedef void (*PostKeyframeDrawScaled)(struct GlobalContext* globalCtx, SkeletonInfo* skeleton, s32 limbIndex, Gfx** dList,
u8* flags, struct Actor* actor, Vec3f* scale, Vec3s* rot, Vec3f* pos);
#endif
+1 -2
View File
@@ -5175,8 +5175,7 @@ beginseg
name "ovl_Demo_Syoten"
compress
include "build/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.o"
include "build/data/ovl_Demo_Syoten/ovl_Demo_Syoten.data.o"
include "build/data/ovl_Demo_Syoten/ovl_Demo_Syoten.reloc.o"
include "build/src/overlays/actors/ovl_Demo_Syoten/ovl_Demo_Syoten_reloc.o"
endseg
beginseg
File diff suppressed because it is too large Load Diff
@@ -7,9 +7,33 @@ struct DemoSyoten;
typedef void (*DemoSyotenActionFunc)(struct DemoSyoten*, GlobalContext*);
#define DEMOSYOTEN_GET_F(thisx) ((thisx)->params & 0xF)
#define DEMOSYOTEN_GET_7E00(thisx) (((thisx)->params & 0x7E00) >> 9)
#define DEMOSYOTEN_7E00_3F 0x3F
enum {
/* 0 */ DEMOSYOTEN_F_0,
/* 1 */ DEMOSYOTEN_F_1,
/* 2 */ DEMOSYOTEN_F_2,
/* 3 */ DEMOSYOTEN_F_3,
/* 4 */ DEMOSYOTEN_F_4
};
typedef struct DemoSyoten {
/* 0x0000 */ Actor actor;
/* 0x0144 */ char unk_144[0x2B0];
/* 0x0144 */ SkeletonInfo unk_144;
/* 0x0174 */ Vec3s unk_174[51];
/* 0x02A6 */ s16 unk_2A6[153];
/* 0x03D8 */ f32 unk_3D8;
/* 0x03DC */ Gfx* unk_3DC;
/* 0x03E0 */ AnimatedMaterial* unk_3E0;
/* 0x03E4 */ u16 unk_3E4;
/* 0x03E6 */ s16 unk_3E6;
/* 0x03E8 */ Path* unk_3E8;
/* 0x03EC */ s32 unk_3EC;
/* 0x03F0 */ u16 unk_3F0;
/* 0x03F2 */ u16 unk_3F2;
/* 0x03F4 */ DemoSyotenActionFunc actionFunc;
} DemoSyoten; // size = 0x3F8
-16
View File
@@ -910,22 +910,6 @@ D_0600B5A0 = 0x0600B5A0;
D_06010C40 = 0x06010C40;
D_060129F0 = 0x060129F0;
// ovl_Demo_Syoten
D_0600023C = 0x0600023C;
D_06001298 = 0x06001298;
D_06001328 = 0x06001328;
D_06001370 = 0x06001370;
D_06001448 = 0x06001448;
D_06001730 = 0x06001730;
D_060018B8 = 0x060018B8;
D_060018C0 = 0x060018C0;
D_06001DD0 = 0x06001DD0;
D_06002880 = 0x06002880;
D_06002A20 = 0x06002A20;
D_06002B88 = 0x06002B88;
D_06002B98 = 0x06002B98;
// ovl_Demo_Tre_Lgt
D_06007D78 = 0x06007D78;