Decompile bgTestHitOnObj

This commit is contained in:
Ryan Dwyer
2022-08-08 17:50:48 +10:00
parent 3ef6cb880b
commit 9d2805430e
3 changed files with 309 additions and 752 deletions
+303 -746
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -65,8 +65,8 @@ Gfx *bgRenderRoomXlu(Gfx *gdl, s32 roomnum);
s32 bgPopulateVtxBatchType(s32 roomnum, struct vtxbatch *batches, Gfx *gdl, s32 batchindex, struct gfxvtx *vertices, s32 arg5);
void bgFindRoomVtxBatches(s32 roomnum);
bool func0f15f20c(struct coord *arg0, struct coord *arg1, s32 *arg2, s32 *arg3);
bool bg0f15f2b0(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3);
bool bgTestHitOnObj(struct coord *arg0, struct coord *arg1, struct coord *arg2, Gfx *arg3, void *arg4, struct gfxvtx *vertices, struct hitthing *hitthing);
bool bgTestLineIntersectsBbox(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3);
bool bgTestHitOnObj(struct coord *arg0, struct coord *arg1, struct coord *arg2, Gfx *gdl, Gfx *gdl2, struct gfxvtx *vertices, struct hitthing *hitthing);
bool bgTestHitOnChr(struct model *model, struct coord *arg1, struct coord *arg2, struct coord *arg3, Gfx *arg4, Gfx *arg5, struct gfxvtx *vertices, f32 *arg7, struct hitthing *hitthing);
bool bgTestHitInVtxBatch(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct vtxbatch *batches, s32 roomnum, struct hitthing *hitthing);
s32 bg0f1612e4(struct coord *bbmin, struct coord *bbmax, struct coord *arg2, struct coord *arg3, struct coord *arg4, struct coord *arg5);
+4 -4
View File
@@ -3779,7 +3779,7 @@ bool cd0002bd04(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, stru
if ((!(arg2->y < min.y) || !(arg3->y < min.y))
&& (!(arg2->y > max.y) || !(arg3->y > max.y))
&& bg0f15f2b0(arg2, arg4, &min, &max)
&& bgTestLineIntersectsBbox(arg2, arg4, &min, &max)
&& cd0002aac0(arg2, arg3, arg4, tile, &spc4, &spb8)) {
return false;
}
@@ -3816,7 +3816,7 @@ bool cd0002bd04(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, stru
if ((!(arg2->y < min.y) || !(arg3->y < min.y))
&& (!(arg2->y > max.y) || !(arg3->y > max.y))
&& bg0f15f2b0(arg2, arg4, &min, &max)
&& bgTestLineIntersectsBbox(arg2, arg4, &min, &max)
&& cd0002ab98(arg2, arg3, arg4, tile, &sp90, &sp84)) {
return false;
}
@@ -4010,7 +4010,7 @@ bool cd0002c714(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, stru
if ((!(arg2->y < min.y) || !(arg3->y < min.y))
&& (!(arg2->y > max.y) || !(arg3->y > max.y))
&& bg0f15f2b0(arg2, arg4, &min, &max)
&& bgTestLineIntersectsBbox(arg2, arg4, &min, &max)
&& cd0002aac0(arg2, arg3, arg4, tile, &sp12c, &sp120)) {
x = sp12c.x - arg2->x;
y = sp12c.y - arg2->y;
@@ -4089,7 +4089,7 @@ bool cd0002c714(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, stru
if ((!(arg2->y < min.y) || !(arg3->y < min.y))
&& (!(arg2->y > max.y) || !(arg3->y > max.y))
&& bg0f15f2b0(arg2, arg4, &min, &max)
&& bgTestLineIntersectsBbox(arg2, arg4, &min, &max)
&& cd0002ab98(arg2, arg3, arg4, tile, &spe0, &spd4)) {
x = spe0.x - arg2->x;
y = spe0.y - arg2->y;