Remove redundant function/struct

This commit is contained in:
Arceveti committed 2021-09-17 18:22:29 -07:00
1 parent 38fdbb6ec3
commit 97f6fa6959
12 files changed
+30 -116

No files matched your search

-29
View File
@@ -367,35 +367,6 @@ f32 unused_obj_find_floor_height(struct Object *obj) {
return floorHeight;
}
/**
* Basically a local variable that passes through floor geo info.
*/
struct FloorGeometry sFloorGeo;
UNUSED static u8 unused8038BE50[0x40];
/**
* Return the floor height underneath (xPos, yPos, zPos) and populate `floorGeo`
* with data about the floor's normal vector and origin offset. Also update
* sFloorGeo.
*/
f32 find_floor_height_and_data(f32 xPos, f32 yPos, f32 zPos, struct FloorGeometry **floorGeo) {
struct Surface *floor;
f32 floorHeight = find_floor(xPos, yPos, zPos, &floor);
*floorGeo = NULL;
if (floor != NULL) {
sFloorGeo.normalX = floor->normal.x;
sFloorGeo.normalY = floor->normal.y;
sFloorGeo.normalZ = floor->normal.z;
sFloorGeo.originOffset = floor->originOffset;
*floorGeo = &sFloorGeo;
}
return floorHeight;
}
/**
* Iterate through the list of floors and find the first floor under a given point.
*/
-10
View File
@@ -25,19 +25,9 @@ struct WallCollisionData
/*0x18*/ struct Surface *walls[4];
};
struct FloorGeometry
{
f32 unused[4]; // possibly position data?
f32 normalX;
f32 normalY;
f32 normalZ;
f32 originOffset;
};
s32 f32_find_wall_collision(f32 *xPtr, f32 *yPtr, f32 *zPtr, f32 offsetY, f32 radius);
s32 find_wall_collisions(struct WallCollisionData *colData);
f32 find_ceil(f32 posX, f32 posY, f32 posZ, struct Surface **pceil);
f32 find_floor_height_and_data(f32 xPos, f32 yPos, f32 zPos, struct FloorGeometry **floorGeo);
f32 find_floor_height(f32 x, f32 y, f32 z);
f32 find_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor);
s32 find_water_level_and_floor(s32 x, s32 z, struct Surface **pfloor);