Files
ld58/code/game/world.h
James Bulman eb3c81cd04 Added unproject
Broken and buggy font stuff
Fixed some typos
Fixed draw rect not using dim properly
2025-10-05 21:11:18 +01:00

43 lines
856 B
C

#if !defined(LD_GAME_WORLD_H_)
#define LD_GAME_WORLD_H_
#include "player.h"
#include "npc.h"
#include "bandit.h"
// Areas are which
typedef U32 World_Area;
enum World_Area {
WORLD_AREA_OUTSIDE = (1 << 0),
WORLD_AREA_SALOON = (1 << 1),
};
typedef struct World World;
struct World {
//// Static stuff
NavMesh *navMesh;
//// Player
Player player;
//// NPCs
U32 npcCount;
NPC npcs[128];
////Bandit
// The bandit the player is after.
Bandit bandit;
// NPC points of interest, places to walk to.
U32 npcPOI[256];
};
function void UpdateWorld(F32 delta, World *world);
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 G_WorldDraw(G_State *game, World *world);
#endif // LD_GAME_WORLD_H_