Rename a heap of collision detection functions

This commit is contained in:
Ryan Dwyer
2022-10-06 19:39:18 +10:00
parent f09206034d
commit 4b7e93de8a
38 changed files with 1198 additions and 1322 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ extern u8 **var8009a888;
extern union filedataptr g_TileFileData;
extern s32 g_TileNumRooms;
extern u32 *g_TileRooms;
extern struct geoblock var8009a918;
extern struct geoblock g_CdSavedBlock;
extern u8 g_RdpDramStack[SP_DRAM_STACK_SIZE8];
extern N_ALSndPlayer var8009c2d0;
extern struct var8009c340 var8009c340;
+5 -1
View File
@@ -2345,7 +2345,11 @@
0x00, \
0x00,
#define cmd0103(label) \
/**
* Checks if the current chr's proppreset is blocking line of sight from the chr
* to their target.
*/
#define if_proppreset_blocking_sight_to_target(label) \
mkshort(0x0103), \
label,
+19 -16
View File
@@ -629,6 +629,9 @@
#define CDTYPE_DOORSLOCKEDTOAI 0x8000
#define CDTYPE_ALL 0x003f
#define CHECKVERTICAL_NO 0
#define CHECKVERTICAL_YES 1
#define CHOPPERMODE_PATROL 0
#define CHOPPERMODE_COMBAT 1
#define CHOPPERMODE_FALL 2
@@ -1138,22 +1141,22 @@
#define GBGAME_OTHER 0
#define GBGAME_PD 2
#define GEOFLAG_0001 0x0001
#define GEOFLAG_0002 0x0002
#define GEOFLAG_COLLISIONS 0x0004
#define GEOFLAG_0008 0x0008
#define GEOFLAG_OPAQUE 0x0010 // Block AI fire/sight
#define GEOFLAG_LIFTFLOOR 0x0020
#define GEOFLAG_LADDER 0x0040
#define GEOFLAG_0080 0x0080
#define GEOFLAG_0100 0x0100 // Editor: Low wall/edge
#define GEOFLAG_UNDERWATER 0x0200
#define GEOFLAG_0400 0x0400 // Unused
#define GEOFLAG_AIBOTCROUCH 0x0800
#define GEOFLAG_AIBOTDUCK 0x1000
#define GEOFLAG_STEP 0x2000 // Ascend regardless of steepness
#define GEOFLAG_DIE 0x4000
#define GEOFLAG_CLIMBABLELEDGE 0x8000 // Used for most ledges in Chicago, but not near drain pickup
#define GEOFLAG_FLOOR1 0x0001
#define GEOFLAG_FLOOR2 0x0002
#define GEOFLAG_WALL 0x0004
#define GEOFLAG_BLOCK_SIGHT 0x0008
#define GEOFLAG_BLOCK_SHOOT 0x0010
#define GEOFLAG_LIFTFLOOR 0x0020
#define GEOFLAG_LADDER 0x0040
#define GEOFLAG_RAMPWALL 0x0080
#define GEOFLAG_SLOPE 0x0100
#define GEOFLAG_UNDERWATER 0x0200
#define GEOFLAG_0400 0x0400 // Unused
#define GEOFLAG_AIBOTCROUCH 0x0800
#define GEOFLAG_AIBOTDUCK 0x1000
#define GEOFLAG_STEP 0x2000 // Ascend regardless of steepness
#define GEOFLAG_DIE 0x4000
#define GEOFLAG_LADDER_PLAYERONLY 0x8000 // Used for most ledges in Chicago, but not near drain pickup
#define GEOTYPE_TILE_I 0 // Tiles with integer vertices - used for BG
#define GEOTYPE_TILE_F 1 // Tiles with float vertices - used for lifts
+1 -1
View File
@@ -66,7 +66,7 @@ extern s32 var8005f018;
extern s32 var8005f01c;
extern bool g_AnimHostEnabled;
extern s32 var8005f030;
extern s32 var8005f034;
extern s32 g_CdHasSavedBlock;
extern s32 var8005f038;
extern u16 *g_RdpOutBufferEnd;
extern u16 *g_RdpOutBufferStart;
-160
View File
@@ -1,160 +0,0 @@
# Tile files are implemented here using assembly macros because it doesn't
# appear to be possible to do it in C in a sane way. Some rooms have no tiles,
# and you cannot declare an empty array in C.
.data
.set FLOORTYPE_DEFAULT, 0
.set FLOORTYPE_WOOD, 1
.set FLOORTYPE_STONE, 2
.set FLOORTYPE_CARPET, 3
.set FLOORTYPE_METAL, 4
.set FLOORTYPE_MUD, 5
.set FLOORTYPE_WATER, 6
.set FLOORTYPE_DIRT, 7
.set FLOORTYPE_SNOW, 8
.set GEOFLAG_0001, 0x0001
.set GEOFLAG_0002, 0x0002
.set GEOFLAG_COLLISIONS, 0x0004
.set GEOFLAG_0008, 0x0008
.set GEOFLAG_OPAQUE, 0x0010
.set GEOFLAG_LIFTFLOOR, 0x0020
.set GEOFLAG_LADDER, 0x0040
.set GEOFLAG_0080, 0x0080
.set GEOFLAG_0100, 0x0100
.set GEOFLAG_UNDERWATER, 0x0200
.set GEOFLAG_0400, 0x0400
.set GEOFLAG_AIBOTCROUCH, 0x0800
.set GEOFLAG_AIBOTDUCK, 0x1000
.set GEOFLAG_STEP, 0x2000
.set GEOFLAG_DIE, 0x4000
.set GEOFLAG_CLIMBABLELEDGE, 0x8000
.set VERSION_NTSC_BETA, 0
.set VERSION_NTSC_1_0, 1
.set VERSION_NTSC_FINAL, 2
.set VERSION_PAL_BETA, 3
.set VERSION_PAL_FINAL, 4
.set VERSION_JPN_FINAL, 5
.macro tileabstract numverts, flags, floortype, xmin, ymin, zmin, xmax, ymax, zmax, floorcolour
.byte 0
.byte \numverts
.short \flags
.short \floortype
.byte \xmin
.byte \ymin
.byte \zmin
.byte \xmax
.byte \ymax
.byte \zmax
.short \floorcolour
.endm
.macro tilevert x, y, z
.short \x
.short \y
.short \z
.endm
.macro tile3 flags, floortype, xmin, ymin, zmin, xmax, ymax, zmax, floorcolour, x1, y1, z1, x2, y2, z2, x3, y3, z3
tileabstract 3, \flags, \floortype, \xmin, \ymin, \zmin, \xmax, \ymax, \zmax, \floorcolour
tilevert \x1, \y1, \z1
tilevert \x2, \y2, \z2
tilevert \x3, \y3, \z3
.endm
.macro tile4 flags, floortype, xmin, ymin, zmin, xmax, ymax, zmax, floorcolour, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4
tileabstract 4, \flags, \floortype, \xmin, \ymin, \zmin, \xmax, \ymax, \zmax, \floorcolour
tilevert \x1, \y1, \z1
tilevert \x2, \y2, \z2
tilevert \x3, \y3, \z3
tilevert \x4, \y4, \z4
.endm
.macro tile5 flags, floortype, xmin, ymin, zmin, xmax, ymax, zmax, floorcolour, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, x5, y5, z5
tileabstract 5, \flags, \floortype, \xmin, \ymin, \zmin, \xmax, \ymax, \zmax, \floorcolour
tilevert \x1, \y1, \z1
tilevert \x2, \y2, \z2
tilevert \x3, \y3, \z3
tilevert \x4, \y4, \z4
tilevert \x5, \y5, \z5
.endm
.macro tile6 flags, floortype, xmin, ymin, zmin, xmax, ymax, zmax, floorcolour, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, x5, y5, z5, x6, y6, z6
tileabstract 6, \flags, \floortype, \xmin, \ymin, \zmin, \xmax, \ymax, \zmax, \floorcolour
tilevert \x1, \y1, \z1
tilevert \x2, \y2, \z2
tilevert \x3, \y3, \z3
tilevert \x4, \y4, \z4
tilevert \x5, \y5, \z5
tilevert \x6, \y6, \z6
.endm
.macro tile7 flags, floortype, xmin, ymin, zmin, xmax, ymax, zmax, floorcolour, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, x5, y5, z5, x6, y6, z6, x7, y7, z7
tileabstract 7, \flags, \floortype, \xmin, \ymin, \zmin, \xmax, \ymax, \zmax, \floorcolour
tilevert \x1, \y1, \z1
tilevert \x2, \y2, \z2
tilevert \x3, \y3, \z3
tilevert \x4, \y4, \z4
tilevert \x5, \y5, \z5
tilevert \x6, \y6, \z6
tilevert \x7, \y7, \z7
.endm
.macro tile8 flags, floortype, xmin, ymin, zmin, xmax, ymax, zmax, floorcolour, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, x5, y5, z5, x6, y6, z6, x7, y7, z7, x8, y8, z8
tileabstract 8, \flags, \floortype, \xmin, \ymin, \zmin, \xmax, \ymax, \zmax, \floorcolour
tilevert \x1, \y1, \z1
tilevert \x2, \y2, \z2
tilevert \x3, \y3, \z3
tilevert \x4, \y4, \z4
tilevert \x5, \y5, \z5
tilevert \x6, \y6, \z6
tilevert \x7, \y7, \z7
tilevert \x8, \y8, \z8
.endm
.macro tile9 flags, floortype, xmin, ymin, zmin, xmax, ymax, zmax, floorcolour, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, x5, y5, z5, x6, y6, z6, x7, y7, z7, x8, y8, z8, x9, y9, z9
tileabstract 9, \flags, \floortype, \xmin, \ymin, \zmin, \xmax, \ymax, \zmax, \floorcolour
tilevert \x1, \y1, \z1
tilevert \x2, \y2, \z2
tilevert \x3, \y3, \z3
tilevert \x4, \y4, \z4
tilevert \x5, \y5, \z5
tilevert \x6, \y6, \z6
tilevert \x7, \y7, \z7
tilevert \x8, \y8, \z8
tilevert \x9, \y9, \z9
.endm
.macro tile11 flags, floortype, xmin, ymin, zmin, xmax, ymax, zmax, floorcolour, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, x5, y5, z5, x6, y6, z6, x7, y7, z7, x8, y8, z8, x9, y9, z9, x10, y10, z10, x11, y11, z11
tileabstract 11, \flags, \floortype, \xmin, \ymin, \zmin, \xmax, \ymax, \zmax, \floorcolour
tilevert \x1, \y1, \z1
tilevert \x2, \y2, \z2
tilevert \x3, \y3, \z3
tilevert \x4, \y4, \z4
tilevert \x5, \y5, \z5
tilevert \x6, \y6, \z6
tilevert \x7, \y7, \z7
tilevert \x8, \y8, \z8
tilevert \x9, \y9, \z9
tilevert \x10, \y10, \z10
tilevert \x11, \y11, \z11
.endm
.macro tile12 flags, floortype, xmin, ymin, zmin, xmax, ymax, zmax, floorcolour, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, x5, y5, z5, x6, y6, z6, x7, y7, z7, x8, y8, z8, x9, y9, z9, x10, y10, z10, x11, y11, z11, x12, y12, z12
tileabstract 12, \flags, \floortype, \xmin, \ymin, \zmin, \xmax, \ymax, \zmax, \floorcolour
tilevert \x1, \y1, \z1
tilevert \x2, \y2, \z2
tilevert \x3, \y3, \z3
tilevert \x4, \y4, \z4
tilevert \x5, \y5, \z5
tilevert \x6, \y6, \z6
tilevert \x7, \y7, \z7
tilevert \x8, \y8, \z8
tilevert \x9, \y9, \z9
tilevert \x10, \y10, \z10
tilevert \x11, \y11, \z11
tilevert \x12, \y12, \z12
.endm
+5 -5
View File
@@ -24,7 +24,7 @@ f32 chrGetAttackEntityRelativeAngle(struct chrdata *chr, s32 attackflags, s32 en
f32 chrGetAttackEntityDistance(struct chrdata *chr, u32 attackflags, s32 entityid);
void func0f02e3dc(struct coord *a, struct coord *b, struct coord *c, struct coord *d, struct coord *dst);
void func0f02e4f8(struct coord *arg0, struct coord *arg1, struct coord *dst);
f32 func0f02e550(struct prop *prop, f32 arg1, f32 arg2, u32 arg3, f32 ymax, f32 ymin);
f32 func0f02e550(struct prop *prop, f32 arg1, f32 arg2, u32 cdtypes, f32 ymax, f32 ymin);
f32 func0f02e684(struct prop *prop, f32 arg1, f32 arg2);
void chrChooseStandAnimation(struct chrdata *chr, f32 mergetime);
void chrStand(struct chrdata *chr);
@@ -169,7 +169,7 @@ void func0f044b68(struct coord *arg0, struct coord *arg1, struct coord *arg2);
bool chrNavCanSeeNextPos(struct chrdata *chr, struct coord *pos, s16 *rooms, struct coord *aimpos, struct coord *arg4, struct coord *arg5, f32 negchrradius, f32 chrradius, s32 cdtypes, s32 arg9);
bool chrNavCheckForObstacle(struct chrdata *chr, struct coord *chrpos, s16 *chrrooms, struct coord *aimpos, struct coord *leftpos, struct coord *rightpos, f32 negchrradius, f32 chrradius, s32 cdtypes, bool hasobstacle);
bool chrNavTryObstacle(struct chrdata *chr, struct coord *arg1, bool arg2, struct coord *arg3, f32 radius, bool arg5, struct coord *nextpos, struct waydata *waydata, f32 arg8, s32 cdtypes, s32 arg10);
struct prop *chrOpenDoor(struct chrdata *chr, struct coord *coord);
struct prop *chrOpenDoor(struct chrdata *chr, struct coord *rangepos);
void chrNavTickMain(struct chrdata *chr, struct coord *pos, struct waydata *waydata, bool arg3);
bool chrGoPosUpdateLiftAction(struct chrdata *chr, u32 curpadflags, bool arg2, bool arrivingatlift, s16 curpadnum, s32 nextpadnum);
s16 chrGoPosGetNextPadNum(struct chrdata *chr);
@@ -212,12 +212,12 @@ bool chrAdjustPosForSpawn(f32 chrradius, struct coord *pos, s16 *rooms, f32 angl
#endif
struct prop *chrSpawnAtCoord(s32 body, s32 head, struct coord *pos, s16 *room, f32 angle, u8 *ailist, u32 spawnflags);
bool func0f04b658(struct chrdata *chr);
bool chrIsPropPresetBlockingSightToTarget(struct chrdata *chr);
bool chrMoveToPos(struct chrdata *chr, struct coord *pos, s16 *room, f32 angle, bool allowonscreen);
bool chrCheckCoverOutOfSight(struct chrdata *chr, s32 covernum, bool soft);
s32 chrAssignCoverByCriteria(struct chrdata *chr, u16 arg1, s32 arg2);
s32 chrAssignCoverAwayFromDanger(struct chrdata *chr, s32 mindist, s32 maxdist);
bool chrRunFromPos(struct chrdata *chr, u32 speed, f32 distance, struct coord *frompos);
bool chrRunFromPos(struct chrdata *chr, u32 goposflags, f32 distance, struct coord *frompos);
f32 func0f04c784(struct chrdata *chr);
bool chr0f04c874(struct chrdata *chr, u32 angle360, struct coord *pos, u8 arg3, u8 arg4);
void rebuildTeams(void);
@@ -266,7 +266,7 @@ bool chrTrySurprisedLookAround(struct chrdata *chr);
bool chrTryKneel(struct chrdata *chr);
bool chrTryStartAnim(struct chrdata *chr, s32 animnum, f32 startframe, f32 endframe, u8 chranimflags, s32 merge, f32 speed);
bool chrTryStartAlarm(struct chrdata *chr, s32 pad_id);
s32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 attackflags, u32 entityid);
bool chrConsiderGrenadeThrow(struct chrdata *chr, u32 attackflags, u32 entityid);
void chrTickKneel(struct chrdata *chr);
void chrFadeCorpse(struct chrdata *chr);
void chrFadeCorpseWhenOffScreen(struct chrdata *chr);
+1 -1
View File
@@ -260,7 +260,7 @@
/*0x0100*/ bool aiNoOp0100(void);
/*0x0101*/ bool aiNoOp0101(void);
/*0x0102*/ bool aiSetLights(void);
/*0x0103*/ bool ai0103(void);
/*0x0103*/ bool aiIfPropPresetIsBlockingSightToTarget(void);
/*0x0104*/ bool aiRemoveObjectAtPropPreset(void);
/*0x0105*/ bool aiIfPropPresetHeightLessThan(void);
/*0x0106*/ bool aiSetTarget(void);
+1 -1
View File
@@ -39,7 +39,7 @@ void propsTickPlayer(bool islastplayer);
void propsTickPadEffects(void);
void propSetPerimEnabled(struct prop *prop, bool enable);
void propsTestForPickup(void);
f32 func0f06438c(struct prop *prop, struct coord *arg1, f32 *arg2, f32 *arg3, f32 *arg4, s32 arg5, bool cangangsta, s32 arg7);
f32 func0f06438c(struct prop *prop, struct coord *arg1, f32 *arg2, f32 *arg3, f32 *arg4, bool throughobjects, bool cangangsta, s32 arg7);
void farsightChooseTarget(void);
void autoaimTick(void);
u32 propDoorGetCdTypes(struct prop *prop);
+1 -1
View File
@@ -107,7 +107,7 @@ void objFreeProjectile(struct defaultobj *obj);
void objFreeEmbedmentOrProjectile(struct prop *prop);
void objFree(struct defaultobj *obj, bool freeprop, bool canregen);
void objFreePermanently(struct defaultobj *obj, bool freeprop);
f32 objGetWidth(struct defaultobj *obj);
f32 objGetRadius(struct defaultobj *obj);
bool func0f06b39c(struct coord *pos, struct coord *dir, struct coord *aimpos, f32 arg3);
bool func0f06b488(struct prop *prop, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4, struct coord *arg5, f32 *arg6);
bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2, struct coord *arg3, f32 arg4, struct coord *arg5, struct coord *arg6, struct coord *arg7, struct coord *arg8, f32 *arg9);
+45 -101
View File
@@ -9,119 +9,63 @@ f32 func0f1578c8(struct widthxz *arg0, struct xz *arg1, struct xz *arg2);
f32 func0f1579cc(struct widthxz *arg0, struct xz *arg1, struct xz *arg2, struct xz *arg3);
f32 cd00024e40(void);
void cd00024e4c(struct coord *arg0, struct coord *arg1, u32 line, char *file);
void cdGetEdge(struct coord *pos1, struct coord *pos2, u32 line, char *file);
f32 cd00024e98(void);
s32 cd00024ea4(void);
struct prop *cdGetObstacle(void);
struct prop *cdGetObstacleProp(void);
void cdGetPos(struct coord *pos, u32 line, char *file);
void cd00024ee8(struct coord *arg0);
u32 cdGetTileFlags(void);
void cd00024f6c(void);
void cd00024fb0(struct coord *arg0, struct coord *arg1, struct prop *prop);
void cd00025038(struct coord *arg0, struct coord *arg1, struct prop *prop, f32 arg3);
void cd000250cc(struct coord *arg0, struct coord *arg1, f32 width);
void cd00025168(struct prop *prop);
void cd000251ac(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct prop *prop);
void cd00025254(struct coord *arg0, struct coord *arg1, struct coord *pos, struct prop *prop, f32 arg4, struct geo *tile);
void cd00025314(struct coord *pos, struct coord *arg1);
bool cd00025364(struct coord *arg0, struct coord *arg1);
void cd000253c4(struct geoblock *block);
s32 cd00025410(f32 arg0, f32 arg1, f32 arg2, f32 arg3);
bool cd000254d8(struct coord *arg0, struct coord *arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, bool *arg6);
f32 cd00025654(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3);
f32 cd00025724(f32 x1, f32 z1, f32 x2, f32 z2);
bool cd00025774(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3);
void cd00025848(f32 tilex, f32 tilez, f32 tilewidth, f32 posx, f32 posz, f32 *x1, f32 *z1, f32 *x2, f32 *z2);
void cd00025928(struct geo *tile, struct coord *arg1);
void cdGetObstacleNormal(struct coord *normal);
u32 cdGetGeoFlags(void);
void cdSetSavedPos(struct coord *pos1, struct coord *pos2);
bool cdGetSavedPos(struct coord *arg0, struct coord *arg1);
void cdGetGeoNormal(struct geo *geo, struct coord *normal);
void cdGetFloorCol(struct geo *tile, u16 *floorcol);
void cdGetFloorType(struct geo *tile, u8 *floortype);
f32 cdFindGroundInIntTileAtVertex(struct geotilei *tile, f32 x, f32 z, s32 vertexindex);
f32 cdFindGroundInIntTile(struct geotilei *tile, f32 x, f32 z);
f32 cdFindGroundInFltTile(struct geotilef *tile, f32 x, f32 z);
bool cdIs2dPointInIntTile(struct geotilei *tile, f32 x, f32 z);
bool cdIs2dPointInFltTile(struct geotilef *tile, f32 x, f32 z);
bool cdIs2dPointInBlock(struct geoblock *tile, f32 x, f32 z);
bool cdIs2dPointInCyl(struct geocyl *cyl, f32 x, f32 z);
bool func000266a4(f32 x, f32 z, struct geo *tile);
bool cd000266a4(f32 x, f32 z, struct geo *tile);
void cdGetPropsOnPlatform(struct prop *platform, s16 *propnums, s32 len);
bool cd00026a04(struct coord *pos, u8 *start, u8 *end, u16 flags, s32 room, struct geo **tileptr, s32 *roomptr, f32 *groundptr, bool arg8);
void cd00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct geo **tileptr, s16 *room, f32 *arg5, struct prop **arg6, s32 arg7);
bool cd0002709c(struct geotilei *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing);
bool cd000272f8(struct geotilef *tile, f32 x, f32 z, f32 radius, struct prop *prop, struct collisionthing *thing);
s32 cd000274e0(struct geoblock *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing);
bool cd000276c8(struct geocyl *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing);
void cd00027738(struct coord *pos, f32 width, u8 *start, u8 *end, u16 flags, bool checkvertical, f32 arg6, f32 arg7, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingnum, s32 roomnum);
void cd00027d1c(struct coord *pos, f32 radius, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 arg6, f32 arg7, struct collisionthing *arg8, s32 arg9);
void cd00027f78(struct geotilei *tile, f32 arg1, f32 arg2, f32 arg3, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingindex);
s32 cd00028200(struct geotilei *tile, struct coord *pos, f32 width, f32 y1, f32 y2);
void cd0002840c(struct geotilef *tile, f32 arg1, f32 arg2, f32 arg3, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingindex);
void cd00028638(struct geoblock *block, f32 arg1, f32 arg2, f32 arg3, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingindex);
void cd0002885c(struct geocyl *cyl, f32 x, f32 z, f32 arg3, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingindex);
void cd00028914(u8 *start, u8 *end, struct coord *pos, f32 radius, u16 flags, bool checkvertical, f32 arg6, f32 arg7, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingnum);
void cd00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 ymax, f32 ymin, struct collisionthing *arg8, s32 arg9);
void cd0002901c(struct coord *pos, struct coord *dist, f32 width, struct collisionthing *arg3);
f32 cd000296a0(struct collisionthing *arg0, struct coord *pos, struct collisionthing **arg2, f32 width);
bool cd00029ffc(struct coord *pos, f32 width, f32 foreheadheight, f32 inversefeettoeyesheight, s16 *rooms, u16 arg5, struct coord *laddernormal);
bool cd0002a13c(struct coord *pos, f32 radius, f32 arg2, f32 arg3, s16 *rooms, u16 arg5);
f32 cdFindGroundY(struct coord *pos, f32 radius, s16 *rooms, u16 *floorcol, u8 *floortype, u16 *floorflags, s16 *floorroom, s32 *inlift, struct prop **lift);
f32 cd0002a324(void);
f32 cdFindGroundYSimple(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, u8 *floortype);
f32 cd0002a36c(struct coord *coord, s16 *rooms, u16 *floorcol, u8 *floortype);
s32 cdFindRoom(struct coord *pos, s16 *nearrooms);
s32 cd000274e0Block(struct geoblock *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collision *collision);
bool cd000276c8Cyl(struct geocyl *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collision *collision);
bool cdFindLadder(struct coord *pos, f32 width, f32 ymax, f32 ymin, s16 *rooms, u16 geoflags, struct coord *laddernormal);
bool cd0002a13c(struct coord *pos, f32 radius, f32 arg2, f32 arg3, s16 *rooms, u16 geoflags);
f32 cdFindGroundInfoAtCyl(struct coord *pos, f32 radius, s16 *rooms, u16 *floorcol, u8 *floortype, u16 *floorflags, s16 *floorroom, s32 *inlift, struct prop **lift);
f32 cdReturnZero(void);
f32 cdFindGroundAtCyl(struct coord *pos, f32 radius, s16 *rooms, u16 *floorcol, u8 *floortype);
f32 cdFindFloorYColourTypeAtPos(struct coord *pos, s16 *rooms, u16 *floorcol, u8 *floortype);
s32 cdFindFloorRoomAtPos(struct coord *pos, s16 *nearrooms);
#if VERSION >= VERSION_NTSC_1_0
s16 cd0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr);
s16 cd0002a4d0(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr);
s16 cdFindFloorRoomYColourFlagsAtPos(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr);
s16 cdFindCeilingRoomYColourFlagsAtPos(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr);
#else
s16 cd0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr);
s16 cd0002a4d0(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr);
s16 cdFindFloorRoomYColourFlagsAtPos(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr);
s16 cdFindCeilingRoomYColourFlagsAtPos(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr);
#endif
s16 cd0002a564(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, struct coord *arg4, struct prop **propptr);
s16 cd0002a5e4(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, u16 *arg4, struct coord *arg5);
s32 cdTestVolume(struct coord *pos, f32 radius, s16 *rooms, s32 types, s32 arg4, f32 ymax, f32 ymin);
s32 cd0002a6fc(struct coord *pos, struct coord *pos2, f32 width, s16 *rooms, s32 types, bool arg5, f32 arg6, f32 arg7);
s32 cdTestAToB1(struct coord *origpos, struct coord *dstpos, f32 width, s16 *dstrooms, s32 types, s32 arg5, f32 ymax, f32 ymin);
bool cd0002aac0(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct geotilei *tile, struct coord *arg4, struct coord *arg5);
bool cd0002ab98(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct geotilef *tile, struct coord *arg4, struct coord *arg5);
bool cd0002ac70(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct geotilei *tile, struct coord *arg4, struct coord *arg5, struct coord *arg6, s32 arg7, f32 arg8, f32 arg9);
bool cd0002b128(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct geotilef *tile, struct coord *arg4, struct coord *arg5, struct coord *arg6, s32 arg7, f32 arg8, f32 arg9);
bool cd0002b560(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct geoblock *block, struct coord *arg4, struct coord *arg5, struct coord *arg6, bool arg7, f32 arg8, f32 arg9);
bool cd0002b954(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct geocyl *cyl, struct coord *arg4, struct coord *arg5, struct coord *arg6, bool arg7, f32 arg8, f32 arg9);
bool cd0002bd04(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, struct coord *arg4, u16 arg5, s32 arg6, s32 arg7, f32 arg8, f32 arg9);
void cd0002c328(struct geotilei *tile, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4);
void cd0002c528(struct geotilef *tile, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4);
bool cd0002c714(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, struct coord *arg4, u16 flags, s32 arg6, s32 arg7, f32 ymax, f32 ymin, f32 *arg10, struct coord *arg11, struct coord *arg12, struct coord *arg13, struct geo **tile, s32 roomnum);
bool cd0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types, u16 arg4, s32 arg5, s32 arg6, f32 arg7, f32 arg8);
s32 cd0002d3b0(struct coord *arg0, struct coord *arg1, s16 *arg2, s32 types, u16 arg4, s32 arg5, s32 arg6, f32 ymax, f32 ymin);
bool cd0002d6ac(struct coord *pos, s16 *rooms, struct coord *targetpos, u32 types, u32 arg4, f32 arg5, f32 arg6);
s32 cdTestAToB2(struct coord *pos, s16 *rooms, struct coord *coord2, s16 *rooms2, u32 types, s32 arg5, f32 arg6, f32 arg7);
bool cd0002d7c0(struct coord *pos, s16 *rooms, struct coord *arg2, u32 arg3, u32 arg4, f32 ymax, f32 ymin);
s32 cd0002d840(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin);
s32 cd0002d8b8(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s32 types, bool arg5, f32 ymax, f32 ymin);
s32 cdTestAToB3(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f32 arg4, s32 types, s32 arg6, f32 ymax, f32 ymin);
s32 cd0002da50(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin);
s32 cd0002dac8(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f32 width, u32 types, s32 arg6, f32 ymax, f32 ymin);
bool cd0002db98(struct coord *viewpos, s16 *rooms, struct coord *targetpos, u32 types, u16 arg4);
bool cd0002dc18(struct coord *coord, s16 *rooms, struct coord *coord2, s32 arg3);
bool cdHasLineOfSight(struct coord *coord, s16 *rooms, struct coord *coord2, s16 *rooms2, s32 arg4, u16 arg5);
bool cd0002dcd0(struct coord *arg0, s16 *rooms1, struct coord *arg2, s16 *rooms2, u32 arg4);
bool cd0002dcfc(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s16 *rooms3, u32 types, u16 arg6);
s32 cdTestAToB4(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types, u16 arg4);
s32 cd0002de10(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types);
s32 cd0002de34(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, u16 arg5);
s32 cd0002deac(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types);
s16 cdFindFloorRoomYColourNormalPropAtPos(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, struct coord *normal, struct prop **propptr);
s16 cdFindCeilingRoomYColourFlagsNormalAtPos(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, u16 *geoflags, struct coord *normal);
s32 cdTestVolume(struct coord *pos, f32 radius, s16 *rooms, s32 types, bool checkvertical, f32 ymax, f32 ymin);
s32 cdExamCylMove01(struct coord *pos, struct coord *pos2, f32 radius, s16 *rooms, s32 types, bool checkvertical, f32 ymax, f32 ymin);
s32 cdExamCylMove02(struct coord *origpos, struct coord *dstpos, f32 width, s16 *dstrooms, s32 types, bool checkvertical, f32 ymax, f32 ymin);
bool cdTestCylMove01(struct coord *pos, s16 *rooms, struct coord *targetpos, u32 types, u32 arg4, f32 ymax, f32 ymin);
s32 cdTestCylMove02(struct coord *pos, s16 *rooms, struct coord *coord2, s16 *rooms2, u32 types, bool arg5, f32 ymax, f32 ymin);
s32 cdExamCylMove03(struct coord *pos, s16 *rooms, struct coord *arg2, u32 types, u32 arg4, f32 ymax, f32 ymin);
s32 cdTestCylMove04(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin);
s32 cdExamCylMove05(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s32 types, bool arg5, f32 ymax, f32 ymin);
s32 cdExamCylMove06(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f32 arg4, s32 types, s32 arg6, f32 ymax, f32 ymin);
s32 cdExamCylMove07(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin);
s32 cdExamCylMove08(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f32 width, u32 types, s32 arg6, f32 ymax, f32 ymin);
bool cdTestLos03(struct coord *viewpos, s16 *rooms, struct coord *targetpos, u32 types, u16 geoflags);
bool cdTestLos04(struct coord *coord, s16 *rooms, struct coord *coord2, s32 arg3);
bool cdTestLos05(struct coord *coord, s16 *rooms, struct coord *coord2, s16 *rooms2, s32 cdtypes, u16 geoflags);
bool cdTestLos06(struct coord *arg0, s16 *rooms1, struct coord *arg2, s16 *rooms2, u32 types);
bool cdTestLos07(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s16 *rooms3, u32 types, u16 geoflags);
s32 cdExamLos08(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types, u16 geoflags);
s32 cdExamLos09(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types);
s32 cdTestLos10(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, u16 geoflags);
s32 cdTestLos11(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types);
bool cd0002ded8(struct coord *arg0, struct coord *arg1, struct prop *prop);
bool cd0002dffc(struct geoblock *arg0, struct geoblock *arg1);
s32 cd0002e278(u8 *start, u8 *end, struct geoblock *ref, u16 flags);
s32 cd0002e4c4(struct geoblock *geo, s16 *rooms, u32 types);
bool cd0002e680(struct geotilei *tile, s32 numvertices, struct coord *arg2, struct coord *arg3, struct prop *prop, struct geoblock *block);
bool cd0002e82c(struct geotilef *tile, s32 numvertices, struct coord *arg2, struct coord *arg3, struct prop *prop, struct geoblock *block);
bool cd0002e9d8(struct geoblock *block, s32 numvertices, struct coord *arg2, struct coord *arg3, struct prop *prop, struct geoblock *block2);
bool cd0002eb84(struct geocyl *cyl, s32 numvertices, struct coord *arg2, struct coord *arg3, struct prop *prop, struct geoblock *block);
bool cd0002ed30(u8 *start, u8 *end, struct geoblock *block, s32 numvertices, struct coord *arg4, struct coord *arg5, u16 flags, struct prop *prop);
s32 cdTestBlockOverlapsAnyProp(struct geoblock *geo, s16 *rooms, u32 types);
s32 cd0002f02c(struct geoblock *block, s16 *rooms, s32 types);
bool cd0002f308(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4, u16 arg5);
bool cd0002f450(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4);
bool cdIsNearlyInSight(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4);
#endif
+2 -2
View File
@@ -861,7 +861,7 @@ struct geotilef {
union {
// The arrays are surely the correct type here, but they create
// mismatches in code that has already been matched using individual
// properties (eg. cd00027738). @TODO: Rematch them using the arrays.
// properties (eg. cdCollectGeoForCylFromList). @TODO: Rematch them using the arrays.
struct {
/*0x06*/ u8 min[3]; // These are indexes into vertices
/*0x09*/ u8 max[3];
@@ -5769,7 +5769,7 @@ struct texturepair {
s32 texturenum2;
};
struct collisionthing {
struct collision {
struct geo *geo;
bool intile;
s32 vertexindex;