map tiles
This commit is contained in:
@@ -5,9 +5,22 @@
|
||||
|
||||
// Areas are which
|
||||
typedef U32 World_Area;
|
||||
enum World_Area {
|
||||
enum World_Area
|
||||
{
|
||||
WORLD_AREA_OUTSIDE = (1 << 0),
|
||||
WORLD_AREA_SALOON = (1 << 1),
|
||||
WORLD_AREA_SALOON = (1 << 1),
|
||||
WORLD_PATH_MIDDLE_EDGE = (1 << 2),
|
||||
WORLD_PATH_MIDDLE = (1 << 3),
|
||||
WORLD_PATH_CORNER = (1 << 4),
|
||||
WORLD_PATH_CORNER_EDGE = (1 << 5),
|
||||
};
|
||||
|
||||
typedef struct World_Tile World_Tile;
|
||||
struct World_Tile
|
||||
{
|
||||
World_Area tile;
|
||||
double rotation;
|
||||
bool collision;
|
||||
};
|
||||
|
||||
typedef struct World World;
|
||||
@@ -22,7 +35,7 @@ struct World {
|
||||
V2f mouseProjected;
|
||||
|
||||
//// Player
|
||||
Player player;
|
||||
Player player;
|
||||
|
||||
//// NPCs
|
||||
U32 npcCount;
|
||||
@@ -37,10 +50,10 @@ struct World {
|
||||
};
|
||||
|
||||
function void UpdateWorld(F32 delta, World *world);
|
||||
function void RenderWorld(World *world, D_Context *drawContext );
|
||||
function void RenderWorld(World *world, D_Context *drawContext);
|
||||
function void ProcessEvents(SDL_Event *event, World *world);
|
||||
function void UpdateNPCs(F32 delta, World *world);
|
||||
function void UpdateNPC(F32 delta, NPC *npc, World *world);
|
||||
function void UpdateBandit(F32 delta, Bandit *bandit, World *world);
|
||||
|
||||
#endif // LD_GAME_WORLD_H_
|
||||
#endif // LD_GAME_WORLD_H_
|
||||
|
||||
Reference in New Issue
Block a user