2025-10-04 21:08:52 +01:00
|
|
|
#if !defined(LD_GAME_WORLD_H_)
|
|
|
|
|
#define LD_GAME_WORLD_H_
|
2025-10-05 02:40:59 +01:00
|
|
|
|
2025-10-05 00:25:37 +01:00
|
|
|
#include "player.h"
|
|
|
|
|
#include "npc.h"
|
|
|
|
|
|
2025-10-05 02:40:59 +01:00
|
|
|
// Areas are which
|
|
|
|
|
typedef U32 World_Area;
|
|
|
|
|
enum World_Area {
|
|
|
|
|
WORLD_AREA_OUTSIDE = (1 << 0),
|
|
|
|
|
WORLD_AREA_SALOON = (1 << 1),
|
2025-10-05 00:25:37 +01:00
|
|
|
};
|
2025-10-04 21:08:52 +01:00
|
|
|
|
|
|
|
|
typedef struct World World;
|
|
|
|
|
struct World {
|
2025-10-05 00:25:37 +01:00
|
|
|
U32 npcCount;
|
|
|
|
|
NPC npcs[128];
|
2025-10-05 02:40:59 +01:00
|
|
|
|
|
|
|
|
NavMesh *navMesh;
|
|
|
|
|
|
2025-10-05 00:25:37 +01:00
|
|
|
// NPC points of interest, places to walk to.
|
|
|
|
|
U32 npcPOI[256];
|
2025-10-04 21:08:52 +01:00
|
|
|
};
|
|
|
|
|
|
2025-10-05 00:25:37 +01:00
|
|
|
function void updateWorld(F32 delta, World *world);
|
2025-10-05 02:40:59 +01:00
|
|
|
function void updateNPCs(F32 delta, World *world);
|
2025-10-05 00:25:37 +01:00
|
|
|
|
2025-10-04 21:08:52 +01:00
|
|
|
#endif // LD_GAME_WORLD_H_
|