Rename positions to props

This commit is contained in:
Ryan Dwyer
2019-12-25 20:01:00 +10:00
parent 1f8552aa51
commit 9fc71545a0
32 changed files with 582 additions and 582 deletions
+7 -7
View File
@@ -349,7 +349,7 @@
mkshort(0x0046), \
label,
#define if_bitcheck_in_position_struct(label) \
#define if_bitcheck_in_prop_struct(label) \
mkshort(0x0047), \
label,
@@ -1604,7 +1604,7 @@
// value is either 25, 70 or 335.
// u1 is either 1 or 2.
// It seems related to the chr's position properties
// It seems related to the chr's prop properties
// Used by G5 cloaked guards, Deep Sea cloaked purple guards and globals.s
// I think this is related to flanking, where the value arg is the angle
// relative to the player's direction. 335 is the same as 25 degress to the
@@ -1814,9 +1814,9 @@
label,
// If bool is false, run some function on the chr and their gun ground
// position, then follow the label.
// prop, then follow the label.
// If bool is true, don't call the function, and only follow the label if field
// 0x4 in the gun ground position struct is less than 64.
// 0x4 in the gun ground prop struct is less than 64.
#define if_gun_landed(bool, label) \
mkshort(0x0170), \
bool, \
@@ -2055,9 +2055,9 @@
mkshort(0x01a3), \
value,
#define display_text(position, color, text) \
#define display_text(prop, color, text) \
mkshort(0x01a4), \
position, \
prop, \
color, \
mkshort(text),
@@ -2407,7 +2407,7 @@
mkshort(0x01de), \
label,
// Something to do with the chr's position struct
// Something to do with the chr's prop struct
#define cmd01e0 \
mkshort(0x01e0),
+6 -6
View File
@@ -630,12 +630,12 @@
#define PATHTYPE_CIRCULAR 1
#define PATHTYPE_FLYING 2
#define POSITIONTYPE_1 1
#define POSITIONTYPE_DOOR 2
#define POSITIONTYPE_CHR 3
#define POSITIONTYPE_WEAPON 4
#define POSITIONTYPE_5 5
#define POSITIONTYPE_PLAYER 6
#define PROPTYPE_1 1
#define PROPTYPE_DOOR 2
#define PROPTYPE_CHR 3
#define PROPTYPE_WEAPON 4
#define PROPTYPE_5 5
#define PROPTYPE_PLAYER 6
#define RACE_HUMAN 0
#define RACE_SKEDAR 1
+7 -7
View File
@@ -16,7 +16,7 @@ f32 chrGetLateralDistanceToCoord(struct chrdata *chr, struct coord *coord);
f32 chrGetLateralDistanceToPad(struct chrdata *chr, s32 pad_id);
f32 chrGetSameFloorDistanceToPad(struct chrdata *chr, s32 pad_id);
f32 chrGetSquaredDistanceToCoord(struct chrdata *chr, struct coord *coord);
struct position *chrGetTargetPosition(struct chrdata *chr);
struct prop *chrGetTargetProp(struct chrdata *chr);
f32 chrGetTimer(struct chrdata *chr);
bool chrHasFlag(struct chrdata *chr, u32 flag, u8 bank);
bool chrHasFlagById(struct chrdata *ref, u32 chrnum, u32 flag, u32 bank);
@@ -52,7 +52,7 @@ u32 func0f020668(void);
u32 func0f020b14(void);
u32 func0f020cc8(void);
u32 func0f020d44(void);
void func0f020f90(s32 positionnum);
void func0f020f90(s32 propnum);
u32 func0f021258(void);
u32 func0f02133c(void);
u32 func0f0213a0(void);
@@ -157,7 +157,7 @@ void chrSidestep(struct chrdata *chr, s32 arg1);
void func0f02fc2c(struct chrdata *chr);
void chrJumpOut(struct chrdata *chr, s32 arg1);
void func0f02fe18(struct chrdata *chr);
void chrRunToPos(struct chrdata *chr, struct coord *coord);
void chrRunToProp(struct chrdata *chr, struct coord *coord);
void func0f030120(struct chrdata *chr, s32 thingtype, s32 thingid);
void func0f030308(struct chrdata *chr, s32 thingtype, s32 thingid);
void func0f0303a0(struct chrdata *chr, s32 thingtype, s32 thingid);
@@ -253,7 +253,7 @@ u32 chrTrySurrender(struct chrdata *chr);
bool chrFadeOut(struct chrdata *chr);
bool chrGoToTarget(struct chrdata *chr, u32 speed);
bool chrGoToChr(struct chrdata *chr, u32 dst_chrnum, u32 speed);
bool func0f03ab74(struct chrdata *chr, struct position *pos, s32 arg2);
bool func0f03ab74(struct chrdata *chr, struct prop *prop, s32 arg2);
u32 func0f03abd0(void);
u32 func0f03aca0(struct chrdata *chr, u32 arg1, u32 arg2);
bool chrTryStop(struct chrdata *chr);
@@ -415,9 +415,9 @@ u32 func0f04e418(void);
u32 getNumChrs(void);
void incrementByte(u8 *dst, u8 amount);
s32 chrResolvePadId(struct chrdata *chr, s32 pad_id);
f32 positionGetDistanceToPosition(struct position *a, struct position *b);
u32 positionGetIndexByChrId(struct chrdata *chr, s32 chrnum);
f32 positionGetLateralDistanceToPosition(struct position *a, struct position *b);
f32 propGetDistanceToProp(struct prop *a, struct prop *b);
u32 propGetIndexByChrId(struct chrdata *chr, s32 chrnum);
f32 propGetLateralDistanceToProp(struct prop *a, struct prop *b);
void func0f01e760(void);
#endif
+1 -1
View File
@@ -445,6 +445,6 @@
/*0x01df*/ bool aiIfChrSameFloorDistanceToPadLessThan(void);
/*0x01e0*/ bool ai01e0(void);
void func0f05abdc(struct position *pos);
void func0f05abdc(struct prop *prop);
#endif
+6 -6
View File
@@ -4,13 +4,13 @@
#include "types.h"
u32 func0f0601b0(void);
u32 func0f0602f0(struct position *pos);
u32 func0f060300(struct position *pos);
u32 func0f0602f0(struct prop *prop);
u32 func0f060300(struct prop *prop);
u32 func0f060358(void);
u32 func0f060438(void);
void func0f0604bc(struct position *pos);
void func0f0604bc(struct prop *prop);
u32 func0f060538(void);
u32 func0f0605c4(struct position *pos);
u32 func0f0605c4(struct prop *prop);
u32 func0f060698(void);
u32 func0f0606c0(void);
u32 func0f06071c(void);
@@ -46,8 +46,8 @@ u32 func0f0658e8(void);
u32 func0f06593c(void);
u32 func0f0659e4(void);
u32 func0f065ae0(void);
void func0f065c44(struct position *pos);
void func0f065cb0(struct position *pos);
void func0f065c44(struct prop *prop);
void func0f065cb0(struct prop *prop);
u32 func0f065d1c(void);
u32 func0f065dd8(void);
u32 func0f065dfc(void);
+12 -12
View File
@@ -6,7 +6,7 @@
void alarmActivate(void);
void alarmDeactivate(void);
bool alarmIsActive(void);
bool audioPlayFromWorldPosition(s8 channel_id, s16 audio_id, s32 volumemaybe, struct position *pos, s32 arg4, s32 arg5);
bool audioPlayFromProp(s8 channel_id, s16 audio_id, s32 volumemaybe, struct prop *prop, s32 arg4, s32 arg5);
f32 countdownTimerGetValue(void);
bool countdownTimerIsHidden(void);
bool countdownTimerIsRunning(void);
@@ -14,7 +14,7 @@ void countdownTimerSetRunning(bool running);
void countdownTimerSetValue(f32 frames);
void countdownTimerSetVisible(u32 flag, bool show);
void countdownTimerTick(void);
u32 func0f066310(struct position *pos, u32 arg1);
u32 func0f066310(struct prop *prop, u32 arg1);
u32 func0f0665ac(void);
u32 func0f066640(void);
u32 func0f0666cc(void);
@@ -92,7 +92,7 @@ u32 func0f06a620(void);
u32 func0f06a730(void);
u32 func0f06ab60(void);
u32 func0f06ac40(void);
void func0f06ac90(struct position *pos);
void func0f06ac90(struct prop *prop);
void setupParseObject(u32 *ptr, bool arg1, bool arg2);
void setupParseObjectWithArg2False(u32 *ptr, bool arg1);
u32 func0f06b36c(void);
@@ -126,7 +126,7 @@ u32 func0f07092c(void);
u32 func0f070a1c(void);
u32 func0f070bd0(void);
u32 func0f070ca0(void);
void liftActivate(struct position *pos, u32 arg1);
void liftActivate(struct prop *prop, u32 arg1);
u32 func0f070e58(void);
u32 func0f070eac(void);
u32 func0f070f08(void);
@@ -206,7 +206,7 @@ void func0f082964(struct attachment *attachment, s32 arg1);
u32 func0f082a1c(void);
u32 func0f082d74(void);
u32 func0f082e84(void);
u32 func0f082f88(struct position *pos);
u32 func0f082f88(struct prop *prop);
u32 func0f08307c(void);
u32 func0f083db0(void);
u32 func0f0840ac(void);
@@ -229,7 +229,7 @@ u32 func0f086918(void);
u32 objIsHealthy(struct defaultobj *obj);
u32 func0f0869cc(void);
u32 func0f086d60(void);
void func0f086f40(struct position *pos);
void func0f086f40(struct prop *prop);
u32 func0f087420(void);
u32 func0f087458(void);
u32 func0f08756c(void);
@@ -246,7 +246,7 @@ u32 func0f08819c(void);
u32 func0f088254(void);
u32 func0f08841c(void);
u32 func0f0887c8(void);
u32 func0f088840(struct position *pos, s32 arg1);
u32 func0f088840(struct prop *prop, s32 arg1);
u32 func0f089014(void);
u32 func0f0899dc(void);
u32 func0f089a94(void);
@@ -322,7 +322,7 @@ u32 func0f08f538(void);
u32 func0f08f604(void);
u32 func0f08f968(void);
u32 func0f08fcb8(void);
void func0f08fee8(struct position *pos, s32 arg1);
void func0f08fee8(struct prop *prop, s32 arg1);
u32 func0f08fffc(void);
u32 func0f0900c0(void);
u32 func0f09018c(void);
@@ -351,7 +351,7 @@ u32 func0f0923d4(void);
u32 func0f092420(void);
u32 func0f092484(void);
u32 func0f092610(void);
u32 func0f0926bc(struct position *pos, u32 arg1, u32 arg2);
u32 func0f0926bc(struct prop *prop, u32 arg1, u32 arg2);
s32 func0f0927d4(f32 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4);
s32 func0f092914(s32 arg0);
u32 func0f09294c(void);
@@ -363,10 +363,10 @@ u32 func0f093508(void);
u32 func0f093630(void);
u32 func0f093790(void);
u32 func0f0938ec(void);
void func0f0939f8(s32 arg0, struct position *pos, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, f32 arg9, s32 arg10, s32 arg11, f32 arg12, f32 arg13, f32 arg14);
void func0f0939f8(s32 arg0, struct prop *prop, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, f32 arg9, s32 arg10, s32 arg11, f32 arg12, f32 arg13, f32 arg14);
void audioMuteChannel(s32 channel);
u32 audioIfChannelIdle(s32 channel);
bool audioPlayFromWorldPosition2(s8 channel_id, s32 audio_id, s32 volumemaybe, struct position *pos, u32 arg4, s32 arg5, s32 arg6, s32 arg7);
bool audioPlayFromProp2(s8 channel_id, s32 audio_id, s32 volumemaybe, struct prop *prop, u32 arg4, s32 arg5, s32 arg6, s32 arg7);
u32 func0f0946b0(void);
u32 func0f094940(void);
u32 func0f094b1c(void);
@@ -395,7 +395,7 @@ u32 func0f0964b4(void);
u32 func0f0965e4(void);
u32 func0f096698(void);
u32 func0f096700(void);
struct position *heliGetTargetPosition(struct heliobj *heli);
struct prop *heliGetTargetProp(struct heliobj *heli);
struct defaultobj *objFindByTagId(s32 tag_id);
struct tag *tagFindById(s32 tag_id);
+1 -1
View File
@@ -16,7 +16,7 @@ u32 func0f0c7bd0(void);
u32 func0f0c7c34(void);
u32 func0f0c7c98(void);
u32 func0f0c7cc4(void);
void currentPlayerGrabProp(struct position *pos);
void currentPlayerGrabProp(struct prop *prop);
void func0f0c7d30(u32 arg0);
void releaseObj(u32 arg0);
u32 func0f0c7f2c(void);
+1 -1
View File
@@ -30,7 +30,7 @@ u32 func0f11253c(void);
u32 func0f112790(void);
u32 func0f112844(void);
u32 func0f112884(void);
u32 currentPlayerHasProp(struct position *pos);
u32 currentPlayerHasProp(struct prop *prop);
u32 func0f112950(void);
u32 func0f112a58(void);
u32 func0f112bc0(void);
+1 -1
View File
@@ -64,7 +64,7 @@ u32 func0f128cf0(void);
u32 func0f128d20(void);
u32 func0f128dbc(void);
u32 func0f128ec8(void);
u32 posGetPlayerNum(struct position *pos);
u32 propGetPlayerNum(struct prop *prop);
void setCurrentPlayerNum(u32 playernum);
#endif
+3 -3
View File
@@ -3,7 +3,7 @@
#include <ultra64.h>
#include "types.h"
void func0f129900(struct position *pos, struct coord *coord, s16 room, s32 arg3, s32 arg4);
void func0f129900(struct prop *prop, struct coord *coord, s16 room, s32 arg3, s32 arg4);
u32 func0f129940(void);
u32 func0f129b08(void);
u32 func0f129ba4(void);
@@ -21,7 +21,7 @@ u32 func0f12d3f0(void);
u32 func0f12e1c0(void);
u32 func0f12e454(void);
u32 func0f12e5b0(void);
void func0f12e714(struct position *pos, s32 arg1);
void func0f12e714(struct prop *prop, s32 arg1);
u32 func0f12e74c(void);
u32 func0f12e77c(void);
u32 func0f12e820(void);
@@ -31,7 +31,7 @@ u32 func0f12f230(void);
u32 func0f12f5f8(void);
u32 func0f12f6c0(void);
u32 func0f12f95c(void);
void func0f12f9f0(s32 room, struct position *pos, struct coord *coord, s32 arg3, s32 arg4, s32 arg5);
void func0f12f9f0(s32 room, struct prop *prop, struct coord *coord, s32 arg3, s32 arg4, s32 arg5);
u32 func0f130044(void);
u32 func0f131060(void);
u32 func0f1312d8(void);
+1 -1
View File
@@ -90,7 +90,7 @@ struct g_vars {
/*00032c*/ u32 unk00032c;
/*000330*/ u32 unk000330;
/*000334*/ u32 unk000334;
/*000338*/ struct position *positions;
/*000338*/ struct prop *props;
/*00033c*/ u32 unk00033c;
/*000340*/ u32 unk000340;
/*000344*/ u32 unk000344;
+10 -10
View File
@@ -27,14 +27,14 @@ struct attachment {
/**
* Most, if not all, entity types (chrs, objs, weapons etc) have a pointer to a
* position struct. The struct contains properties that most entities have in
* prop struct. The struct contains properties that most entities have in
* common such as coords and a room number. You can think of it as generic
* entity.
*
* The type field indicates what type it is (chr, obj etc) and the entity
* pointer points back to the proper entity struct.
*/
struct position {
struct prop {
u8 type;
u8 flags;
u16 unk02;
@@ -276,7 +276,7 @@ struct chrdata {
/*0x013*/ s8 path;
/*0x014*/ u32 hidden;
/*0x018*/ u32 chrflags;
/*0x01c*/ struct position *pos;
/*0x01c*/ struct prop *prop;
/*0x020*/ struct chr020 *unk020;
/*0x024*/ u32 chrwidth;
/*0x028*/ u32 chrheight;
@@ -373,7 +373,7 @@ struct chrdata {
/*0x170*/ struct attachment *weapons_held[2];
/*0x178*/ u32 unk178;
/*0x17c*/ s8 fireslot[2];
/*0x17e*/ s16 target; // index into g_Vars.positions
/*0x17e*/ s16 target; // index into g_Vars.props
/*0x180*/ f32 cshield;
/*0x184*/ u8 cmnum;
/*0x185*/ u8 cmnum2;
@@ -425,7 +425,7 @@ struct chrdata {
/*0x2fd*/ u8 ivebeenhit;
/*0x2fe*/ u8 race;
/*0x2ff*/ u8 blurnumtimesdied;
/*0x300*/ struct position *gungroundpos;
/*0x300*/ struct prop *gunprop;
/*0x304*/ u32 pushspeed[2];
/*0x30c*/ u32 gunroty[2];
/*0x314*/ u32 gunrotx[2];
@@ -483,7 +483,7 @@ struct defaultobj {
/*0x08*/ u32 flags;
/*0x0c*/ u32 flags2;
/*0x10*/ u32 flags3;
/*0x14*/ struct position *pos;
/*0x14*/ struct prop *prop;
/*0x18*/ void *unk18; // probably same struct as chrdata->unk020
/*0x1c*/ f32 realrot[9];
/*0x40*/ u32 hidden; // most significant nibble is the playernum who holds the obj
@@ -552,7 +552,7 @@ struct weaponobj { // objtype 0x08
/*0x08*/ u32 flags;
/*0x0c*/ u32 flags2;
/*0x10*/ u32 flags3;
/*0x14*/ struct position *pos;
/*0x14*/ struct prop *prop;
/*0x18*/ u32 unk18;
/*0x1c*/ f32 realrot[9];
/*0x40*/ u32 hidden;
@@ -577,7 +577,7 @@ struct singlemonitorobj { // objtype 0x0a
/*0x08*/ u32 flags;
/*0x0c*/ u32 flags2;
/*0x10*/ u32 flags3;
/*0x14*/ struct position *pos;
/*0x14*/ struct prop *prop;
/*0x18*/ u32 unk18;
/*0x1c*/ f32 realrot[9];
/*0x40*/ u32 hidden;
@@ -710,7 +710,7 @@ struct player {
/*0x00b0*/ u32 unk00b0;
/*0x00b4*/ f32 unk00b4;
/*0x00b8*/ u32 unk00b8;
/*0x00bc*/ struct position *targetpos;
/*0x00bc*/ struct prop *prop;
/*0x00c0*/ u32 unk00c0;
/*0x00c4*/ u32 unk00c4;
/*0x00c8*/ u32 unk00c8;
@@ -2080,7 +2080,7 @@ struct player {
/*0x1618*/ u32 unk1618;
/*0x161c*/ u32 unk161c;
/*0x1620*/ u32 unk1620;
/*0x1624*/ struct position *lookingatprop;
/*0x1624*/ struct prop *lookingatprop;
/*0x1628*/ u32 unk1628;
/*0x162c*/ u32 unk162c;
/*0x1630*/ u32 unk1630;