mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-09-13 04:25:18 -04:00
Decompile modelGetPart
This commit is contained in:
+16
-6
@@ -3404,12 +3404,15 @@
|
||||
value,
|
||||
|
||||
/**
|
||||
* Remove the necklace from the given chr.
|
||||
* Toggle the visibility of part of the chr's model. It's used for Cassandra's
|
||||
* necklace.
|
||||
*
|
||||
* modelpart should be a MODELPART constant, and refers to a node in the model.
|
||||
*/
|
||||
#define remove_cass_necklace(chr) \
|
||||
#define chr_toggle_modelpart(chr, modelpart) \
|
||||
mkshort(0x018c), \
|
||||
chr, \
|
||||
0x07,
|
||||
modelpart,
|
||||
|
||||
/**
|
||||
* Activate the given lift.
|
||||
@@ -3910,11 +3913,18 @@
|
||||
mkshort(portal), \
|
||||
flag,
|
||||
|
||||
#define set_object_part_visible(object, bool) \
|
||||
/**
|
||||
* Shows or hides part of the object's model.
|
||||
*
|
||||
* modelpart should be a MODELPART constant, and refers to a node in the model.
|
||||
*
|
||||
* visible is a boolean. TRUE makes it visible. FALSE makes it invisible.
|
||||
*/
|
||||
#define object_set_modelpart_visible(object, modelpart, visible) \
|
||||
mkshort(0x01d1), \
|
||||
object, \
|
||||
0xb7, \
|
||||
bool,
|
||||
modelpart, \
|
||||
visible,
|
||||
|
||||
/**
|
||||
* Emits sparks from the given chr.
|
||||
|
||||
@@ -1458,6 +1458,16 @@
|
||||
#define MODEL_CETANDOORSIDE 0x01b7
|
||||
#define MODEL_BUDDYBRIDGE 0x01b8
|
||||
|
||||
#define MODELNODETYPE_ROOT 0x01
|
||||
#define MODELNODETYPE_HEADSPOT 0x17
|
||||
|
||||
#define MODELPART_MUZZLEFLASHRIGHT 0x0002
|
||||
#define MODELPART_MUZZLEFLASHLEFT 0x0003
|
||||
#define MODELPART_HUDPIECE 0x0004
|
||||
#define MODELPART_NECKLACE 0x0007
|
||||
#define MODELPART_006E 0x006e
|
||||
#define MODELPART_SKGANGWAY 0x00b7
|
||||
|
||||
#define MOVEMODE_WALK 0
|
||||
#define MOVEMODE_BIKE 3
|
||||
#define MOVEMODE_GRAB 4
|
||||
|
||||
@@ -323,7 +323,7 @@ s16 *teamGetChrIds(s32 team_id);
|
||||
s16 *squadronGetChrIds(s32 squadron_id);
|
||||
void audioMarkAsRecentlyPlayed(s16 audioid);
|
||||
bool audioWasNotPlayedRecently(s16 audioid);
|
||||
void func0f04cf90(struct chrdata *chr, s32 arg1);
|
||||
void chrToggleModelPart(struct chrdata *chr, s32 partnum);
|
||||
bool chrIsAvoiding(struct chrdata *chr);
|
||||
void chrEmitSparks(struct chrdata *chr);
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
/*0x0189*/ bool aiLiftGoToStop(void);
|
||||
/*0x018a*/ bool aiIfLiftAtStop(void);
|
||||
/*0x018b*/ bool aiConfigureRain(void);
|
||||
/*0x018c*/ bool aiChrToggleProp(void);
|
||||
/*0x018c*/ bool aiChrToggleModelPart(void);
|
||||
/*0x018d*/ bool aiActivateLift(void);
|
||||
/*0x018e*/ bool aiMiniSkedarTryPounce(void);
|
||||
/*0x018f*/ bool aiIfObjectDistanceToPadLessThan(void);
|
||||
@@ -428,7 +428,7 @@
|
||||
/*0x01ce*/ bool aiSetPassiveMode(void);
|
||||
/*0x01cf*/ bool aiChrSetFiringInCutscene(void);
|
||||
/*0x01d0*/ bool aiSetPortalFlag(void);
|
||||
/*0x01d1*/ bool aiSetObjPartVisible(void);
|
||||
/*0x01d1*/ bool aiObjSetModelPartVisible(void);
|
||||
/*0x01d2*/ bool aiChrEmitSparks(void);
|
||||
/*0x01d3*/ bool aiSetDrCarollImages(void);
|
||||
/*0x01d4*/ bool ai01d4(void);
|
||||
|
||||
@@ -338,6 +338,6 @@ u32 func0f091030(void);
|
||||
void func0f0910ac(void);
|
||||
u32 func0f091250(void);
|
||||
u32 func0f0912dc(void);
|
||||
void objSetPartVisible(struct defaultobj *obj, s32 partnum, bool visible);
|
||||
void objSetModelPartVisible(struct defaultobj *obj, s32 partnum, bool visible);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,10 +14,10 @@ u32 func0001a740(void);
|
||||
u32 func0001a784(void);
|
||||
u32 func0001a7cc(void);
|
||||
u32 func0001a85c(void);
|
||||
struct model08_00 *func0001a91c(struct model08 *arg0, s32 arg1);
|
||||
struct modelnode *modelGetPart(struct model08 *arg0, s32 partnum);
|
||||
struct modelthing *func0001a9bc(void *modelfiledata, s32 arg1);
|
||||
u32 func0001a9e8(void);
|
||||
struct model10 *func0001aa1c(struct model *model, struct model08_00 *arg1);
|
||||
struct model10 *func0001aa1c(struct model *model, struct modelnode *node);
|
||||
u32 func0001ab0c(void);
|
||||
u32 func0001abc4(void);
|
||||
void func0001ad0c(struct model *model, struct coord *coord);
|
||||
@@ -45,7 +45,7 @@ u32 func0001c81c(void);
|
||||
u32 func0001c868(void);
|
||||
u32 func0001c924(void);
|
||||
u32 func0001c950(void);
|
||||
void func0001cb0c(struct model *model, struct model08_00 *arg1);
|
||||
void func0001cb0c(struct model *model, struct modelnode *node);
|
||||
u32 func0001cc20(void);
|
||||
u32 func0001cd18(void);
|
||||
u32 func0001ce64(void);
|
||||
|
||||
+10
-7
@@ -155,16 +155,20 @@ struct stagethinglist {
|
||||
u16 *things;
|
||||
};
|
||||
|
||||
struct model08_00 {
|
||||
u16 unk00;
|
||||
struct modelnode {
|
||||
u16 type;
|
||||
u32 unk04;
|
||||
};
|
||||
|
||||
struct model08 {
|
||||
struct model08_00 *unk00;
|
||||
struct modelnode *rootnode;
|
||||
struct stagethinglist *unk04;
|
||||
u32 unk08;
|
||||
u16 unk0c;
|
||||
|
||||
// This is a pointer to a variable length array of pointers to modelnodes,
|
||||
// but the array is followed by an s16 array of part numbers.
|
||||
struct modelnode **parts;
|
||||
|
||||
s16 numparts;
|
||||
s16 unk0e;
|
||||
};
|
||||
|
||||
@@ -186,8 +190,7 @@ struct model0c {
|
||||
/*0x38*/ f32 unk38;
|
||||
};
|
||||
|
||||
// This seems to be a model component which can be turned on and off, like a
|
||||
// muzzle flash, Jo's hudpiece and probably Cass's necklace.
|
||||
// Suspected to be multiple structs, or a union based on the node type
|
||||
struct model10 {
|
||||
union {
|
||||
u16 u16;
|
||||
|
||||
Reference in New Issue
Block a user