Attempt to decompile func0f02ce8c

This commit is contained in:
Ryan Dwyer
2021-05-18 12:11:54 +10:00
parent af457619c4
commit a1414a4776
33 changed files with 556 additions and 426 deletions
+11 -8
View File
@@ -526,7 +526,7 @@
// chr->hidden2
#define CHRH2FLAG_0001 0x0001
#define CHRH2FLAG_0002 0x0002 // Equivalent to OBJFLAG3_00020000
#define CHRH2FLAG_0008 0x0008
#define CHRH2FLAG_BLUESIGHT 0x0008
#define CHRH2FLAG_TICKDURINGAUTOCUT 0x0010
#define CHRH2FLAG_0040 0x0040
#define CHRH2FLAG_0080 0x0080
@@ -1786,6 +1786,9 @@
#define MODELNODETYPE_HEADSPOT 0x17
#define MODELNODETYPE_DL 0x18
#define MODELPART_CHR_04 0x04
#define MODELPART_HEAD_SUNGLASSES 0x00
#define MODELPART_HEAD_HUDPIECE 0x04
#define MODELPART_00 0x00
#define MODELPART_LENS 0x00
#define MODELPART_01 0x01
@@ -3084,22 +3087,22 @@
#define SOUNDMODE_HEADPHONE 2
#define SOUNDMODE_SURROUND 3
#define SPAWNFLAG_00000001 0x00000001
#define SPAWNFLAG_00000002 0x00000002
#define SPAWNFLAG_FORCESUNGLASSES 0x00000001 // 100% chance of wearing sunglasses if head model supports it
#define SPAWNFLAG_MAYBESUNGLASSES 0x00000002 // 50% chance of wearing sunglasses if head model supports it
#define SPAWNFLAG_INVINCIBLE 0x00000008
#define SPAWNFLAG_00000010 0x00000010
#define SPAWNFLAG_ONLYONA 0x00000020
#define SPAWNFLAG_ONLYONSA 0x00000040
#define SPAWNFLAG_ONLYONPA 0x00000080
#define SPAWNFLAG_IGNORECOLLISION 0x00000100
#define SPAWNFLAG_IGNORECOLLISION 0x00000100 // For initial chr placement only
#define SPAWNFLAG_00000200 0x00000200
#define SPAWNFLAG_ANTINONINTERACTABLE 0x00000400
#define SPAWNFLAG_00000800 0x00000800
#define SPAWNFLAG_HIDDEN 0x00001000
#define SPAWNFLAG_00002000 0x00002000
#define SPAWNFLAG_00004000 0x00004000
#define SPAWNFLAG_00008000 0x00008000
#define SPAWNFLAG_00010000 0x00010000
#define SPAWNFLAG_NOBLOOD 0x00002000
#define SPAWNFLAG_FIXEDHEIGHT 0x00004000 // By default, chr heights vary slightly. This disables it.
#define SPAWNFLAG_RTRACKED 0x00008000
#define SPAWNFLAG_BLUESIGHT 0x00010000
#define SPECIALDIE_NONE 0
#define SPECIALDIE_FALLBACK 1
+4 -4
View File
@@ -6,13 +6,13 @@
u32 bodyGetRace(s32 bodynum);
bool bodyLoad(s32 bodynum);
struct model *func0f02ce8c(s32 bodynum, s32 headnum, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7);
struct model *func0f02d338(u32 bodynum, u32 headnum, u32 arg2, u32 arg3, bool arg4, u8 arg5);
struct model *modelAllocateChr(u32 bodynum, u32 headnum, u32 flags);
struct model *func0f02ce8c(s32 bodynum, s32 headnum, struct modelfiledata *bodyfiledata, struct modelfiledata *headfiledata, bool sunglasses, struct model *model, bool isplayer, u8 varyheight);
struct model *func0f02d338(s32 bodynum, s32 headnum, struct modelfiledata *bodyfiledata, struct modelfiledata *headfiledata, bool sunglasses, u8 varyheight);
struct model *modelAllocateChr(s32 bodynum, s32 headnum, u32 spawnflags);
s32 func0f02d3f8(void);
s32 bodyChooseHead(s32 bodynum);
void chrUnpack(s32 stagenum, struct packedchr *packed, s32 cmdindex);
struct prop *propAllocateEyespy(struct pad *pad, s16 room);
u32 func0f02ddbc(void);
void func0f02ddbc(struct modelfiledata *headfiledata, s32 headnum, s32 bodynum);
#endif
+1 -1
View File
@@ -10,7 +10,7 @@ u32 func0f0b2b64(void);
struct model *func0f0b30ac(void *modelfiledata);
void modelFree(struct model *model);
struct model *func0f0b3280(void *modelfiledata);
u32 func0f0b32a0(void);
void func0f0b32a0(struct model *model, struct modelnode *node, struct modelfiledata *headfiledata);
struct anim *func0f0b32e4(void);
void animTurnOff(struct anim *anim);
+1 -1
View File
@@ -116,6 +116,6 @@ void func0f18e39c(char *arg0, char *filename, u16 *numsims, u16 *stagenum, u16 *
s32 func0f18e420(s32 arg0, s32 arg1, u16 arg2);
s32 func0f18e4c8(s32 arg0, s32 arg1, u16 arg2);
void func0f18e558(void);
u32 func0f18e57c(u32 index, s32 *headnum);
struct modelfiledata *func0f18e57c(s32 index, s32 *headnum);
#endif
+10 -9
View File
@@ -691,7 +691,7 @@ struct modelfiledata {
s16 numparts;
s16 nummatrices;
f32 unk10;
u16 rwdatalen; // in words
s16 rwdatalen; // in words
void *unk18;
};
@@ -1457,8 +1457,8 @@ struct chrdata {
u8 p1p2 : 2;
u8 unk32c_18 : 1;
u8 unk32c_19 : 1;
u8 unk32c_20 : 1;
u8 noblood : 1;
u8 rtracked : 1;
u8 unk32c_21 : 1;
u8 unk32c_22 : 2;
@@ -3248,13 +3248,14 @@ struct cheat {
struct headorbody {
/*0x00*/ u16 ismale : 1;
/*0x00*/ u16 unk00_01 : 1;
/*0x00*/ u16 unk00_02 : 4;
/*0x00*/ u16 canvaryheight : 1;
/*0x00*/ u16 unk00_03 : 3;
/*0x00*/ u16 height : 8;
/*0x02*/ u16 bodyfileid;
/*0x04*/ f32 unk04;
/*0x08*/ f32 unk08;
/*0x0c*/ void *unk0c; // likely a pointer to bodyfile data if loaded
/*0x10*/ u16 handfileid;
/*0x02*/ u16 filenum;
/*0x04*/ f32 scale;
/*0x08*/ f32 animscale;
/*0x0c*/ void *filedata;
/*0x10*/ u16 handfilenum;
};
struct stagetableentry {