Clean up.

This commit is contained in:
2026-07-14 13:21:04 -07:00
parent 943ed21776
commit ffc4310646
12 changed files with 1445 additions and 955 deletions
+30 -30
View File
@@ -3,46 +3,46 @@
#include "handmade_math.h"
typedef struct tile_map_difference {
v2 dXY;
F32 dZ;
} tile_map_difference;
struct tile_map_difference {
struct v2 dXY;
float dZ;
};
typedef struct tile_map_position {
U32 AbsTileX;
U32 AbsTileY;
U32 AbsTileZ;
struct tile_map_position {
unsigned int AbsTileX;
unsigned int AbsTileY;
unsigned int AbsTileZ;
/* NOTE: X and Y relative to tile center. */
v2 Offset;
} tile_map_position;
struct v2 Offset;
};
typedef struct tile_chunk_position {
U32 TileChunkX;
U32 TileChunkY;
U32 TileChunkZ;
struct tile_chunk_position {
unsigned int TileChunkX;
unsigned int TileChunkY;
unsigned int TileChunkZ;
U32 RelTileX;
U32 RelTileY;
} tile_chunk_position;
unsigned int RelTileX;
unsigned int RelTileY;
};
typedef struct tile_chunk {
U32 *Tiles;
} tile_chunk;
struct tile_chunk {
unsigned int *Tiles;
};
typedef struct tile_map {
U32 ChunkShift;
U32 ChunkMask;
U32 ChunkDim;
struct tile_map {
unsigned int ChunkShift;
unsigned int ChunkMask;
unsigned int ChunkDim;
F32 TileSideInMeters;
float TileSideInMeters;
/* TODO: Real sparseness. */
U32 TileChunkCountX;
U32 TileChunkCountY;
U32 TileChunkCountZ;
unsigned int TileChunkCountX;
unsigned int TileChunkCountY;
unsigned int TileChunkCountZ;
tile_chunk *TileChunks;
} tile_map;
struct tile_chunk *TileChunks;
};
#endif