mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-10-19 03:32:41 +00:00
Fix ext bounds warnings
This commit is contained in:
parent
d63d6a1ca5
commit
0c2f9e86f6
1 changed files with 6 additions and 0 deletions
|
@ -197,12 +197,14 @@ s32 find_wall_collisions(struct WallCollisionData *colData) {
|
||||||
|
|
||||||
colData->numWalls = 0;
|
colData->numWalls = 0;
|
||||||
|
|
||||||
|
#if EXTENDED_BOUNDS_MODE != 3
|
||||||
if (x <= -LEVEL_BOUNDARY_MAX || x >= LEVEL_BOUNDARY_MAX) {
|
if (x <= -LEVEL_BOUNDARY_MAX || x >= LEVEL_BOUNDARY_MAX) {
|
||||||
return numCollisions;
|
return numCollisions;
|
||||||
}
|
}
|
||||||
if (z <= -LEVEL_BOUNDARY_MAX || z >= LEVEL_BOUNDARY_MAX) {
|
if (z <= -LEVEL_BOUNDARY_MAX || z >= LEVEL_BOUNDARY_MAX) {
|
||||||
return numCollisions;
|
return numCollisions;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// World (level) consists of a 16x16 grid. Find where the collision is on
|
// World (level) consists of a 16x16 grid. Find where the collision is on
|
||||||
// the grid (round toward -inf)
|
// the grid (round toward -inf)
|
||||||
|
@ -326,12 +328,14 @@ f32 find_ceil(f32 posX, f32 posY, f32 posZ, struct Surface **pceil) {
|
||||||
z = (s16) posZ;
|
z = (s16) posZ;
|
||||||
*pceil = NULL;
|
*pceil = NULL;
|
||||||
|
|
||||||
|
#if EXTENDED_BOUNDS_MODE != 3
|
||||||
if (x <= -LEVEL_BOUNDARY_MAX || x >= LEVEL_BOUNDARY_MAX) {
|
if (x <= -LEVEL_BOUNDARY_MAX || x >= LEVEL_BOUNDARY_MAX) {
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
if (z <= -LEVEL_BOUNDARY_MAX || z >= LEVEL_BOUNDARY_MAX) {
|
if (z <= -LEVEL_BOUNDARY_MAX || z >= LEVEL_BOUNDARY_MAX) {
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Each level is split into cells to limit load, find the appropriate cell.
|
// Each level is split into cells to limit load, find the appropriate cell.
|
||||||
cellX = ((x + LEVEL_BOUNDARY_MAX) / CELL_SIZE) & NUM_CELLS_INDEX;
|
cellX = ((x + LEVEL_BOUNDARY_MAX) / CELL_SIZE) & NUM_CELLS_INDEX;
|
||||||
|
@ -602,12 +606,14 @@ f32 find_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor) {
|
||||||
|
|
||||||
*pfloor = NULL;
|
*pfloor = NULL;
|
||||||
|
|
||||||
|
#if EXTENDED_BOUNDS_MODE != 3
|
||||||
if (x <= -LEVEL_BOUNDARY_MAX || x >= LEVEL_BOUNDARY_MAX) {
|
if (x <= -LEVEL_BOUNDARY_MAX || x >= LEVEL_BOUNDARY_MAX) {
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
if (z <= -LEVEL_BOUNDARY_MAX || z >= LEVEL_BOUNDARY_MAX) {
|
if (z <= -LEVEL_BOUNDARY_MAX || z >= LEVEL_BOUNDARY_MAX) {
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Each level is split into cells to limit load, find the appropriate cell.
|
// Each level is split into cells to limit load, find the appropriate cell.
|
||||||
cellX = ((x + LEVEL_BOUNDARY_MAX) / CELL_SIZE) & NUM_CELLS_INDEX;
|
cellX = ((x + LEVEL_BOUNDARY_MAX) / CELL_SIZE) & NUM_CELLS_INDEX;
|
||||||
|
|
Loading…
Reference in a new issue