You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
surface load optimizations
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,11 @@
|
||||
#include "surface_collision.h"
|
||||
#include "types.h"
|
||||
|
||||
#define SURFACE_VERTICAL_BUFFER 5
|
||||
|
||||
#define NORMAL_FLOOR_THRESHOLD 0.01f
|
||||
#define NORMAL_CEIL_THRESHOLD -NORMAL_FLOOR_THRESHOLD
|
||||
|
||||
extern u8 gSurfacePoolError;
|
||||
|
||||
struct SurfaceNode {
|
||||
@@ -13,26 +18,28 @@ struct SurfaceNode {
|
||||
struct Surface *surface;
|
||||
};
|
||||
|
||||
enum {
|
||||
enum SpatialPartitions {
|
||||
SPATIAL_PARTITION_FLOORS,
|
||||
SPATIAL_PARTITION_CEILS,
|
||||
SPATIAL_PARTITION_WALLS,
|
||||
SPATIAL_PARTITION_WATER
|
||||
SPATIAL_PARTITION_WATER,
|
||||
NUM_SPATIAL_PARTITIONS
|
||||
};
|
||||
|
||||
typedef struct SurfaceNode SpatialPartitionCell[4];
|
||||
typedef struct SurfaceNode SpatialPartitionCell[NUM_SPATIAL_PARTITIONS];
|
||||
|
||||
extern SpatialPartitionCell gStaticSurfacePartition[NUM_CELLS][NUM_CELLS];
|
||||
extern SpatialPartitionCell gDynamicSurfacePartition[NUM_CELLS][NUM_CELLS];
|
||||
extern struct SurfaceNode *sSurfaceNodePool;
|
||||
extern struct Surface *sSurfacePool;
|
||||
extern s16 sSurfacePoolSize;
|
||||
extern s32 sSurfaceNodePoolSize;
|
||||
extern s32 sSurfacePoolSize;
|
||||
|
||||
void alloc_surface_pools(void);
|
||||
#ifdef NO_SEGMENTED_MEMORY
|
||||
u32 get_area_terrain_size(TerrainData *data);
|
||||
#endif
|
||||
void load_area_terrain(s32 index, TerrainData *data, RoomData *surfaceRooms, s16 *macroObjects);
|
||||
void load_area_terrain(s32 index, TerrainData *data, RoomData *surfaceRooms, MacroObject *macroObjects);
|
||||
void clear_dynamic_surfaces(void);
|
||||
void load_object_collision_model(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user