Day 34 complete.
This commit is contained in:
+10
-33
@@ -2,6 +2,7 @@
|
||||
#define HANDMADE_H_SENTRY
|
||||
|
||||
#include "core.h"
|
||||
#include "handmade_tile.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* NOTE: Servcies that the platform layer provides to the game. */
|
||||
@@ -136,44 +137,20 @@ void UpdateAndRender(thread_context *Thread, game_memory *Memory,
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct tile_chunk_position {
|
||||
U32 TileChunkX;
|
||||
U32 TileChunkY;
|
||||
|
||||
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_chunk {
|
||||
U32 *Tiles;
|
||||
} tile_chunk;
|
||||
typedef struct memory_arena {
|
||||
U64 Size;
|
||||
U8 *Base;
|
||||
U64 Used;
|
||||
} memory_arena;
|
||||
|
||||
typedef struct world {
|
||||
U32 ChunkShift;
|
||||
U32 ChunkMask;
|
||||
U32 ChunkDim;
|
||||
|
||||
F32 TileSideInMeters;
|
||||
S32 TileSideInPixels;
|
||||
F32 MetersToPixels;
|
||||
|
||||
S32 TileChunkCountX;
|
||||
S32 TileChunkCountY;
|
||||
|
||||
tile_chunk *TileChunks;
|
||||
tile_map *TileMap;
|
||||
} world;
|
||||
|
||||
typedef struct game_state {
|
||||
cannonical_position PlayerP;
|
||||
memory_arena WorldArena;
|
||||
world *World;
|
||||
tile_map_position PlayerP;
|
||||
} game_state;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user