Day 34 complete.

This commit is contained in:
igor
2026-04-15 11:58:51 -07:00
parent 713738b9f3
commit cd0ed29b30
5 changed files with 316 additions and 199 deletions
+40
View File
@@ -0,0 +1,40 @@
#ifndef HANDMADE_TILE_H_SENTRY
#define HANDMADE_TILE_H_SENTRY
typedef struct tile_map_position {
U32 AbsTileX;
U32 AbsTileY;
/* NOTE: Tile-relative X and Y. */
F32 TileRelX;
F32 TileRelY;
} tile_map_position;
typedef struct tile_chunk_position {
U32 TileChunkX;
U32 TileChunkY;
U32 RelTileX;
U32 RelTileY;
} tile_chunk_position;
typedef struct tile_chunk {
U32 *Tiles;
} tile_chunk;
typedef struct tile_map {
U32 ChunkShift;
U32 ChunkMask;
U32 ChunkDim;
F32 TileSideInMeters;
S32 TileSideInPixels;
F32 MetersToPixels;
U32 TileChunkCountX;
U32 TileChunkCountY;
tile_chunk *TileChunks;
} tile_map;
#endif