Day 33 complete.

This commit is contained in:
igor
2026-04-14 18:33:43 -07:00
parent ed18e333f2
commit 713738b9f3
4 changed files with 167 additions and 176 deletions
+19 -21
View File
@@ -136,42 +136,40 @@ void UpdateAndRender(thread_context *Thread, game_memory *Memory,
*
*/
typedef struct cannonical_position {
#if 1
S32 TileMapX;
S32 TileMapY;
typedef struct tile_chunk_position {
U32 TileChunkX;
U32 TileChunkY;
S32 TileX;
S32 TileY;
#else
U32 _TileX;
U32 _TileY;
#endif
U32 RelTileX;
U32 RelTileY;
} tile_chunk_position;
typedef struct cannonical_position {
U32 AbsTileX;
U32 AbsTileY;
/* NOTE: Tile-relative X and Y. */
F32 TileRelX;
F32 TileRelY;
} cannonical_position;
typedef struct tile_map {
typedef struct tile_chunk {
U32 *Tiles;
} tile_map;
} tile_chunk;
typedef struct world {
U32 ChunkShift;
U32 ChunkMask;
U32 ChunkDim;
F32 TileSideInMeters;
S32 TileSideInPixels;
F32 MetersToPixels;
S32 CountX;
S32 CountY;
S32 TileChunkCountX;
S32 TileChunkCountY;
F32 UpperLeftX;
F32 UpperLeftY;
S32 TileMapCountX;
S32 TileMapCountY;
tile_map *TileMaps;
tile_chunk *TileChunks;
} world;
typedef struct game_state {