Attempt to decompile func0002d3b0
This commit is contained in:
parent
a5045665d2
commit
7f9b9bd352
|
|
@ -15495,7 +15495,7 @@ struct prop *chrGetTargetProp(struct chrdata *chr)
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool chrUpdateGeometry(struct prop *prop, struct tiletype3 **arg1, struct tiletype3 **arg2)
|
||||
bool chrUpdateGeometry(struct prop *prop, u8 **start, u8 **end)
|
||||
{
|
||||
struct chrdata *chr = prop->chr;
|
||||
|
||||
|
|
@ -15528,14 +15528,14 @@ bool chrUpdateGeometry(struct prop *prop, struct tiletype3 **arg1, struct tilety
|
|||
chr->geo.width = 15;
|
||||
}
|
||||
|
||||
*arg1 = &chr->geo;
|
||||
*arg2 = *arg1 + 1;
|
||||
*start = (void *) &chr->geo;
|
||||
*end = *start + sizeof(struct tiletype3);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
*arg2 = NULL;
|
||||
*arg1 = NULL;
|
||||
*end = NULL;
|
||||
*start = NULL;
|
||||
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -16849,7 +16849,7 @@ void func0f0c1e54(struct prop *prop, bool enable)
|
|||
g_Vars.players[playernum]->bondperimenabled = enable;
|
||||
}
|
||||
|
||||
bool playerUpdateGeometry(struct prop *prop, struct tiletype3 **arg1, struct tiletype3 **arg2)
|
||||
bool playerUpdateGeometry(struct prop *prop, u8 **start, u8 **end)
|
||||
{
|
||||
s32 playernum = propGetPlayerNum(prop);
|
||||
|
||||
|
|
@ -16859,18 +16859,18 @@ bool playerUpdateGeometry(struct prop *prop, struct tiletype3 **arg1, struct til
|
|||
g_Vars.players[playernum]->perimshoot = g_Vars.players[playernum]->periminfo;
|
||||
g_Vars.players[playernum]->perimshoot.width = 15;
|
||||
|
||||
*arg1 = &g_Vars.players[playernum]->perimshoot;
|
||||
*start = (void *) &g_Vars.players[playernum]->perimshoot;
|
||||
} else {
|
||||
*arg1 = &g_Vars.players[playernum]->periminfo;
|
||||
*start = (void *) &g_Vars.players[playernum]->periminfo;
|
||||
}
|
||||
|
||||
*arg2 = *arg1 + 1;
|
||||
*end = *start + sizeof(struct tiletype3);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
*arg2 = NULL;
|
||||
*arg1 = NULL;
|
||||
*end = NULL;
|
||||
*start = NULL;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7780,16 +7780,16 @@ void propGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin)
|
|||
}
|
||||
}
|
||||
|
||||
bool propUpdateGeometry(struct prop *prop, struct tiletype3 **arg1, struct tiletype3 **arg2)
|
||||
bool propUpdateGeometry(struct prop *prop, u8 **start, u8 **end)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (prop->type == PROPTYPE_PLAYER) {
|
||||
result = playerUpdateGeometry(prop, arg1, arg2);
|
||||
result = playerUpdateGeometry(prop, start, end);
|
||||
} else if (prop->type == PROPTYPE_CHR) {
|
||||
result = chrUpdateGeometry(prop, arg1, arg2);
|
||||
result = chrUpdateGeometry(prop, start, end);
|
||||
} else if (prop->type == PROPTYPE_OBJ || prop->type == PROPTYPE_DOOR) {
|
||||
result = objUpdateGeometry(prop, arg1, arg2);
|
||||
result = objUpdateGeometry(prop, start, end);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -47876,7 +47876,7 @@ s32 objTick(struct prop *prop)
|
|||
f32 sp112;
|
||||
s32 tagnum;
|
||||
struct tile *geos[2];
|
||||
struct tiletype3 *sp96;
|
||||
u8 *end;
|
||||
f32 damage;
|
||||
|
||||
if (sp572) {
|
||||
|
|
@ -47948,7 +47948,7 @@ s32 objTick(struct prop *prop)
|
|||
func0f069c70(obj, true, true);
|
||||
sp592 = true;
|
||||
|
||||
if (objUpdateGeometry(prop, geos, &sp96)
|
||||
if (objUpdateGeometry(prop, (u8 **)geos, &end)
|
||||
&& geos[0]->type == TILETYPE_02
|
||||
&& func0002e4c4((struct tiletype2 *) geos[0], prop->rooms, 4) == 0) {
|
||||
damage = ((obj->maxdamage - obj->damage) + 1) / 250.0f;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ struct chrdata *chrFindByLiteralId(s32 chrnum);
|
|||
struct prop *chrGetEquippedWeaponProp(struct chrdata *chr, s32 hand);
|
||||
struct prop *chrGetEquippedWeaponPropWithCheck(struct chrdata *chr, s32 hand);
|
||||
struct prop *chrGetTargetProp(struct chrdata *chr);
|
||||
bool chrUpdateGeometry(struct prop *prop, struct tiletype3 **arg1, struct tiletype3 **arg2);
|
||||
bool chrUpdateGeometry(struct prop *prop, u8 **start, u8 **end);
|
||||
void propChrGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ void func0f0c1ba4(struct coord *pos, struct coord *up, struct coord *look, struc
|
|||
void func0f0c1bd8(struct coord *pos, struct coord *up, struct coord *look);
|
||||
void allPlayersClearMemCamRoom(void);
|
||||
void func0f0c1e54(struct prop *prop, bool enable);
|
||||
bool playerUpdateGeometry(struct prop *prop, struct tiletype3 **arg1, struct tiletype3 **arg2);
|
||||
bool playerUpdateGeometry(struct prop *prop, u8 **start, u8 **end);
|
||||
void currentPlayerUpdatePerimInfo(void);
|
||||
void propPlayerGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin);
|
||||
f32 currentPlayerGetHealthFrac(void);
|
||||
|
|
|
|||
|
|
@ -59,6 +59,6 @@ void func0f065e98(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2
|
|||
void roomGetProps(s16 *room, s16 *propnums, u32 size);
|
||||
u32 func0f066054(void);
|
||||
void propGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin);
|
||||
bool propUpdateGeometry(struct prop *prop, struct tiletype3 **arg1, struct tiletype3 **arg2);
|
||||
bool propUpdateGeometry(struct prop *prop, u8 **start, u8 **end);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ bool func0f0869cc(struct prop *prop);
|
|||
bool currentPlayerTryMountHoverbike(struct prop *prop);
|
||||
bool propobjInteract(struct prop *prop);
|
||||
void propObjSetOrUnsetHiddenFlag00400000(struct prop *prop, bool enable);
|
||||
bool objUpdateGeometry(struct prop *prop, struct tile **arg1, struct tiletype3 **arg2);
|
||||
bool objUpdateGeometry(struct prop *prop, u8 **arg1, u8 **arg2);
|
||||
void propObjGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin);
|
||||
void ammotypeGetPickedUpText(char *dst);
|
||||
void ammotypeGetDeterminer(char *dst, s32 ammotype, s32 qty);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ u32 func00025038(void);
|
|||
void func000250cc(struct coord *arg0, struct coord *arg1, f32 width);
|
||||
void func00025168(struct prop *prop);
|
||||
u32 func000251ac(void);
|
||||
u32 func00025254(void);
|
||||
void func00025254(u32 *arg0, u32 *arg1, u32 *arg2, struct prop *prop, f32 arg4, u32 arg5);
|
||||
u32 func00025314(void);
|
||||
u32 func00025364(void);
|
||||
u32 func000253c4(void);
|
||||
|
|
@ -40,20 +40,20 @@ bool cdIs2dPointInTileType2(struct tiletype2 *tile, f32 x, f32 z);
|
|||
u32 func00026654(void);
|
||||
u32 func000266a4(void);
|
||||
void platformGetRidingProps(struct prop *platform, s16 *propnums, u32 len);
|
||||
bool func00026a04(struct coord *pos, struct tiletype3 *arg1, struct tiletype3 *arg2, bool arg3, s32 room, struct tile **tile, s32 *arg6, f32 *arg7, bool arg8);
|
||||
bool func00026a04(struct coord *pos, u8 *start, u8 *end, bool arg3, s32 room, struct tile **tile, s32 *arg6, f32 *arg7, bool arg8);
|
||||
void func00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr, s16 *arg4, f32 *arg5, struct prop **arg6, s32 arg7);
|
||||
bool func0002709c(struct tiletype0 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing);
|
||||
bool func000272f8(struct tiletype1 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing);
|
||||
s32 func000274e0(struct tiletype2 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing);
|
||||
bool func000276c8(struct tiletype3 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing);
|
||||
void func00027738(struct coord *pos, f32 width, struct tile *start, struct tile *end, u16 flags, bool checkvertical, f32 arg6, f32 arg7, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingnum, s32 roomnum);
|
||||
void func00027738(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 func00027d1c(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 arg6, f32 arg7, struct collisionthing *arg8, s32 arg9);
|
||||
u32 func00027f78(void);
|
||||
s32 func00028200(struct tiletype0 *tile, struct coord *pos, f32 width, f32 y1, f32 y2);
|
||||
u32 func0002840c(void);
|
||||
u32 func00028638(void);
|
||||
u32 func0002885c(void);
|
||||
s32 func00028914(struct tile *start, struct tile *end, struct coord *pos, f32 width, u16 flags, bool checkvertical, f32 arg6, f32 arg7, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingnum);
|
||||
s32 func00028914(u8 *start, u8 *end, struct coord *pos, f32 width, u16 flags, bool checkvertical, f32 arg6, f32 arg7, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingnum);
|
||||
void func00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 ymax, f32 ymin, struct collisionthing *arg8, s32 arg9);
|
||||
void func0002901c(struct coord *pos, struct coord *dist, f32 width, struct collisionthing *arg3);
|
||||
f32 func000296a0(struct collisionthing *arg0, struct coord *pos, struct tilething **arg2, f32 width);
|
||||
|
|
@ -77,10 +77,10 @@ u32 func0002ac70(void);
|
|||
u32 func0002b128(void);
|
||||
u32 func0002b560(void);
|
||||
u32 func0002b954(void);
|
||||
bool func0002bd04(struct tiletype3 *arg0, struct tiletype3 *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4, s32 arg5, s32 arg6, s32 arg7, f32 arg8, f32 arg9);
|
||||
bool func0002bd04(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, struct coord *arg4, s32 arg5, s32 arg6, s32 arg7, f32 arg8, f32 arg9);
|
||||
u32 func0002c328(void);
|
||||
u32 func0002c528(void);
|
||||
u32 func0002c714(void);
|
||||
bool func0002c714(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, struct coord *arg4, u16 arg5, s32 arg6, s32 arg7, f32 ymax, f32 ymin, f32 *arg10, u32 *arg11, u32 *arg12, u32 *arg13, u32 *arg14, s32 roomnum);
|
||||
bool func0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types, u16 arg4, s32 arg5, s32 arg6, f32 arg7, f32 arg8);
|
||||
s32 func0002d3b0(struct coord *arg0, struct coord *arg1, s16 *arg2, s32 types, u16 arg4, s32 arg5, s32 arg6, f32 ymax, f32 ymin);
|
||||
bool func0002d6ac(struct coord *pos, s16 *rooms, struct coord *targetpos, u32 types, u32 arg4, f32 arg5, f32 arg6);
|
||||
|
|
@ -102,7 +102,7 @@ u32 func0002de34(void);
|
|||
u32 func0002deac(void);
|
||||
u32 func0002ded8(void);
|
||||
bool func0002dffc(struct tiletype2 *arg0, struct tiletype2 *arg1);
|
||||
s32 func0002e278(struct tile *start, struct tile *end, struct tiletype2 *ref, u16 flags);
|
||||
s32 func0002e278(u8 *start, u8 *end, struct tiletype2 *ref, u16 flags);
|
||||
s32 func0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types);
|
||||
u32 func0002e680(void);
|
||||
u32 func0002e82c(void);
|
||||
|
|
|
|||
|
|
@ -2011,8 +2011,8 @@ void func00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr
|
|||
{
|
||||
s16 *roomptr;
|
||||
s32 roomnum;
|
||||
struct tiletype3 *sp27c;
|
||||
struct tiletype3 *sp278;
|
||||
u8 *start;
|
||||
u8 *end;
|
||||
f32 sp274;
|
||||
struct tile *sp270 = NULL;
|
||||
s32 sp26c = 0;
|
||||
|
|
@ -2031,10 +2031,10 @@ void func00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr
|
|||
|
||||
while (roomnum != -1) {
|
||||
if (roomnum < g_TileNumRooms) {
|
||||
sp27c = (struct tiletype3 *)(g_TileFileData.u8 + g_TileRooms[roomnum]);
|
||||
sp278 = (struct tiletype3 *)(g_TileFileData.u8 + g_TileRooms[roomnum + 1]);
|
||||
start = g_TileFileData.u8 + g_TileRooms[roomnum];
|
||||
end = g_TileFileData.u8 + g_TileRooms[roomnum + 1];
|
||||
|
||||
func00026a04(pos, sp27c, sp278, arg2, roomnum, &sp270, &sp26c, &sp274, arg7);
|
||||
func00026a04(pos, start, end, arg2, roomnum, &sp270, &sp26c, &sp274, arg7);
|
||||
}
|
||||
|
||||
roomptr++;
|
||||
|
|
@ -2047,8 +2047,8 @@ void func00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr
|
|||
while (*propnumptr >= 0) {
|
||||
struct prop *prop = &g_Vars.props[*propnumptr];
|
||||
|
||||
if (propUpdateGeometry(prop, &sp27c, &sp278)
|
||||
&& func00026a04(pos, sp27c, sp278, arg2, prop->rooms[0], &sp270, &sp26c, &sp274, arg7)) {
|
||||
if (propUpdateGeometry(prop, &start, &end)
|
||||
&& func00026a04(pos, start, end, arg2, prop->rooms[0], &sp270, &sp26c, &sp274, arg7)) {
|
||||
sp268 = prop;
|
||||
}
|
||||
|
||||
|
|
@ -2204,14 +2204,14 @@ bool func000276c8(struct tiletype3 *tile, f32 x, f32 z, f32 width, struct prop *
|
|||
return result;
|
||||
}
|
||||
|
||||
void func00027738(struct coord *pos, f32 width, struct tile *start, struct tile *end, u16 flags,
|
||||
void func00027738(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)
|
||||
{
|
||||
struct tile *tile = start;
|
||||
struct tile *tile = (struct tile *) start;
|
||||
s32 result;
|
||||
|
||||
while (tile < end) {
|
||||
while (tile < (struct tile *) end) {
|
||||
if (tile->type == TILETYPE_00) {
|
||||
struct tiletype0 *type0 = (struct tiletype0 *) tile;
|
||||
|
||||
|
|
@ -2311,8 +2311,8 @@ void func00027d1c(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4,
|
|||
{
|
||||
s16 *roomptr;
|
||||
s32 roomnum;
|
||||
u8 *roomdatastart;
|
||||
u8 *roomdataend;
|
||||
u8 *start;
|
||||
u8 *end;
|
||||
s32 sp294 = 0;
|
||||
s16 *propnumptr;
|
||||
s16 propnums[256];
|
||||
|
|
@ -2324,11 +2324,10 @@ void func00027d1c(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4,
|
|||
|
||||
while (roomnum != -1) {
|
||||
if (roomnum < g_TileNumRooms) {
|
||||
roomdatastart = (g_TileFileData.u8 + g_TileRooms[roomnum]);
|
||||
roomdataend = g_TileFileData.u8 + g_TileRooms[roomnum + 1];
|
||||
start = g_TileFileData.u8 + g_TileRooms[roomnum];
|
||||
end = g_TileFileData.u8 + g_TileRooms[roomnum + 1];
|
||||
|
||||
func00027738(pos, width, (struct tile *) roomdatastart, (struct tile *) roomdataend,
|
||||
arg4, arg5, arg6, arg7, NULL, arg8, arg9, &sp294, roomnum);
|
||||
func00027738(pos, width, start, end, arg4, arg5, arg6, arg7, NULL, arg8, arg9, &sp294, roomnum);
|
||||
|
||||
if (sp294 >= arg9) {
|
||||
goto end;
|
||||
|
|
@ -2347,9 +2346,8 @@ void func00027d1c(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4,
|
|||
while (*propnumptr >= 0) {
|
||||
struct prop *prop = &g_Vars.props[*propnumptr];
|
||||
|
||||
if (propIsOfCdType(prop, types) && propUpdateGeometry(prop, (struct tiletype3 **) &roomdatastart, (struct tiletype3 **) &roomdataend)) {
|
||||
func00027738(pos, width, (struct tile *) roomdatastart, (struct tile *) roomdataend,
|
||||
arg4, arg5, arg6, arg7, prop, arg8, arg9, &sp294, prop->rooms[0]);
|
||||
if (propIsOfCdType(prop, types) && propUpdateGeometry(prop, &start, &end)) {
|
||||
func00027738(pos, width, start, end, arg4, arg5, arg6, arg7, prop, arg8, arg9, &sp294, prop->rooms[0]);
|
||||
|
||||
if (sp294 >= arg9) {
|
||||
break;
|
||||
|
|
@ -3310,8 +3308,8 @@ void func00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4,
|
|||
{
|
||||
s16 *roomptr;
|
||||
s32 roomnum;
|
||||
u8 *roomdatastart;
|
||||
u8 *roomdataend;
|
||||
u8 *start;
|
||||
u8 *end;
|
||||
s32 sp294 = 0;
|
||||
s16 *propnumptr;
|
||||
s16 propnums[256];
|
||||
|
|
@ -3323,11 +3321,10 @@ void func00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4,
|
|||
|
||||
while (roomnum != -1) {
|
||||
if (roomnum < g_TileNumRooms) {
|
||||
roomdatastart = (g_TileFileData.u8 + g_TileRooms[roomnum]);
|
||||
roomdataend = g_TileFileData.u8 + g_TileRooms[roomnum + 1];
|
||||
start = g_TileFileData.u8 + g_TileRooms[roomnum];
|
||||
end = g_TileFileData.u8 + g_TileRooms[roomnum + 1];
|
||||
|
||||
func00028914((struct tile *) roomdatastart, (struct tile *) roomdataend, pos, width,
|
||||
arg4, arg5, ymax, ymin, NULL, arg8, arg9, &sp294);
|
||||
func00028914(start, end, pos, width, arg4, arg5, ymax, ymin, NULL, arg8, arg9, &sp294);
|
||||
}
|
||||
|
||||
roomptr++;
|
||||
|
|
@ -3342,9 +3339,8 @@ void func00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4,
|
|||
while (*propnumptr >= 0) {
|
||||
struct prop *prop = &g_Vars.props[*propnumptr];
|
||||
|
||||
if (propIsOfCdType(prop, types) && propUpdateGeometry(prop, (struct tiletype3 **) &roomdatastart, (struct tiletype3 **) &roomdataend)) {
|
||||
func00028914((struct tile *) roomdatastart, (struct tile *) roomdataend, pos, width,
|
||||
arg4, arg5, ymax, ymin, prop, arg8, arg9, &sp294);
|
||||
if (propIsOfCdType(prop, types) && propUpdateGeometry(prop, &start, &end)) {
|
||||
func00028914(start, end, pos, width, arg4, arg5, ymax, ymin, prop, arg8, arg9, &sp294);
|
||||
}
|
||||
|
||||
propnumptr++;
|
||||
|
|
@ -8342,8 +8338,8 @@ bool func0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types
|
|||
{
|
||||
s32 roomnum;
|
||||
s16 *roomptr;
|
||||
struct tiletype3 *sp28c;
|
||||
struct tiletype3 *sp288;
|
||||
u8 *start;
|
||||
u8 *end;
|
||||
struct coord sp27c;
|
||||
s16 *propnumptr;
|
||||
s16 propnums[256];
|
||||
|
|
@ -8358,10 +8354,10 @@ bool func0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types
|
|||
|
||||
while (roomnum != -1) {
|
||||
if (roomnum < g_TileNumRooms) {
|
||||
sp28c = (struct tiletype3 *)(g_TileFileData.u8 + g_TileRooms[roomnum]);
|
||||
sp288 = (struct tiletype3 *)(g_TileFileData.u8 + g_TileRooms[roomnum + 1]);
|
||||
start = g_TileFileData.u8 + g_TileRooms[roomnum];
|
||||
end = g_TileFileData.u8 + g_TileRooms[roomnum + 1];
|
||||
|
||||
if (func0002bd04(sp28c, sp288, pos, coord2, &sp27c, arg4, arg5, arg6, arg7, arg8) == 0) {
|
||||
if (func0002bd04(start, end, pos, coord2, &sp27c, arg4, arg5, arg6, arg7, arg8) == 0) {
|
||||
func00025168(NULL);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -8380,8 +8376,8 @@ bool func0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types
|
|||
struct prop *prop = &g_Vars.props[*propnumptr];
|
||||
|
||||
if (propIsOfCdType(prop, types)
|
||||
&& propUpdateGeometry(prop, &sp28c, &sp288)
|
||||
&& func0002bd04(sp28c, sp288, pos, coord2, &sp27c, arg4, arg5, arg6, arg7, arg8) == 0) {
|
||||
&& propUpdateGeometry(prop, &start, &end)
|
||||
&& func0002bd04(start, end, pos, coord2, &sp27c, arg4, arg5, arg6, arg7, arg8) == 0) {
|
||||
func00025168(prop);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -8594,6 +8590,68 @@ glabel func0002d3b0
|
|||
/* 2d6a8: 27bd02e0 */ addiu $sp,$sp,0x2e0
|
||||
);
|
||||
|
||||
// Mismatch: Calculation of g_TileRooms[roomnum] is different
|
||||
// Other functions and the below use t3 as the offset, t2 as the base, then t2 + t3
|
||||
// But goal for this function uses t2 as the offset, t3 as the base, then t2 + t3
|
||||
//s32 func0002d3b0(struct coord *arg0, struct coord *arg1, s16 *rooms, s32 types, u16 arg4, s32 arg5, s32 arg6, f32 ymax, f32 ymin)
|
||||
//{
|
||||
// s32 roomnum;
|
||||
// s16 *roomptr;
|
||||
// u8 *start;
|
||||
// u8 *end;
|
||||
// struct coord sp2c4;
|
||||
// bool sp2c0 = false;
|
||||
// u32 sp2b4[3];
|
||||
// u32 sp2a8[3];
|
||||
// u32 sp29c[3];
|
||||
// f32 sp298 = 4294967296;
|
||||
// u32 sp294;
|
||||
// s16 *propnumptr;
|
||||
// s16 propnums[256];
|
||||
//
|
||||
// sp2c4.x = arg1->x - arg0->x;
|
||||
// sp2c4.y = arg1->y - arg0->y;
|
||||
// sp2c4.z = arg1->z - arg0->z;
|
||||
//
|
||||
// if (types & CDTYPE_BG) {
|
||||
// roomptr = rooms;
|
||||
// roomnum = rooms[0];
|
||||
//
|
||||
// while (roomnum != -1) {
|
||||
// if (roomnum < g_TileNumRooms) {
|
||||
// start = g_TileFileData.u8 + g_TileRooms[roomnum];
|
||||
// end = g_TileFileData.u8 + g_TileRooms[roomnum + 1];
|
||||
//
|
||||
// if (!func0002c714(start, end, arg0, arg1, &sp2c4, arg4, arg5, arg6, ymax, ymin, &sp298, sp2b4, sp2a8, sp29c, &sp294, roomnum)) {
|
||||
// sp2c0 = true;
|
||||
// func00025254(sp2a8, sp29c, sp2b4, NULL, sp298, sp294);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// roomptr++;
|
||||
// roomnum = *roomptr;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// roomGetProps(rooms, propnums, 256);
|
||||
// propnumptr = propnums;
|
||||
//
|
||||
// while (*propnumptr >= 0) {
|
||||
// struct prop *prop = &g_Vars.props[*propnumptr];
|
||||
//
|
||||
// if (propIsOfCdType(prop, types)
|
||||
// && propUpdateGeometry(prop, &start, &end)
|
||||
// && !func0002c714(start, end, arg0, arg1, &sp2c4, arg4, arg5, arg6, ymax, ymin, &sp298, sp2b4, sp2a8, sp29c, &sp294, -999)) {
|
||||
// sp2c0 = true;
|
||||
// func00025254(sp2a8, sp29c, sp2b4, prop, sp298, sp294);
|
||||
// }
|
||||
//
|
||||
// propnumptr++;
|
||||
// }
|
||||
//
|
||||
// return !sp2c0;
|
||||
//}
|
||||
|
||||
bool func0002d6ac(struct coord *pos, s16 *rooms, struct coord *targetpos, u32 types, u32 arg4, f32 arg5, f32 arg6)
|
||||
{
|
||||
s16 sp44[21];
|
||||
|
|
@ -9230,11 +9288,11 @@ glabel func0002dffc
|
|||
// return false;
|
||||
//}
|
||||
|
||||
s32 func0002e278(struct tile *start, struct tile *end, struct tiletype2 *ref, u16 flags)
|
||||
s32 func0002e278(u8 *start, u8 *end, struct tiletype2 *ref, u16 flags)
|
||||
{
|
||||
struct tile *tile = start;
|
||||
struct tile *tile = (struct tile *) start;
|
||||
|
||||
while (tile < end) {
|
||||
while (tile < (struct tile *) end) {
|
||||
if (tile->type == TILETYPE_00) {
|
||||
struct tiletype0 *type0 = (struct tiletype0 *) tile;
|
||||
tile = (struct tile *)((u32)tile + type0->header.numvertices * 6 + 0xe);
|
||||
|
|
@ -9289,8 +9347,8 @@ s32 func0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types)
|
|||
{
|
||||
s32 result = CDRESULT_NOCOLLISION;
|
||||
s32 roomnum;
|
||||
u8 *roomdatastart;
|
||||
u8 *roomdataend;
|
||||
u8 *start;
|
||||
u8 *end;
|
||||
s16 *roomptr;
|
||||
s16 propnums[256];
|
||||
s16 *propnumptr;
|
||||
|
|
@ -9302,10 +9360,10 @@ s32 func0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types)
|
|||
|
||||
while (roomnum != -1) {
|
||||
if (roomnum < g_TileNumRooms) {
|
||||
roomdatastart = (g_TileFileData.u8 + g_TileRooms[roomnum]);
|
||||
roomdataend = g_TileFileData.u8 + g_TileRooms[roomnum + 1];
|
||||
start = g_TileFileData.u8 + g_TileRooms[roomnum];
|
||||
end = g_TileFileData.u8 + g_TileRooms[roomnum + 1];
|
||||
|
||||
result = func0002e278((struct tile *) roomdatastart, (struct tile *) roomdataend, geo, TILEFLAG_0004);
|
||||
result = func0002e278(start, end, geo, TILEFLAG_0004);
|
||||
|
||||
if (result == CDRESULT_COLLISION) {
|
||||
func00025168(NULL);
|
||||
|
|
@ -9326,8 +9384,8 @@ s32 func0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types)
|
|||
while (*propnumptr >= 0) {
|
||||
struct prop *prop = &g_Vars.props[*propnumptr];
|
||||
|
||||
if (propIsOfCdType(prop, types) && propUpdateGeometry(prop, (struct tiletype3 **) &roomdatastart, (struct tiletype3 **) &roomdataend)) {
|
||||
result = func0002e278((struct tile *) roomdatastart, (struct tile *) roomdataend, geo, TILEFLAG_0004);
|
||||
if (propIsOfCdType(prop, types) && propUpdateGeometry(prop, &start, &end)) {
|
||||
result = func0002e278(start, end, geo, TILEFLAG_0004);
|
||||
|
||||
if (result == CDRESULT_COLLISION) {
|
||||
func00025168(prop);
|
||||
|
|
|
|||
Loading…
Reference in New Issue