Files
ld58/code/game/world.h

39 lines
759 B
C
Raw Normal View History

2025-10-04 21:08:52 +01:00
#if !defined(LD_GAME_WORLD_H_)
#define LD_GAME_WORLD_H_
2025-10-05 00:25:37 +01:00
#include "player.h"
#include "npc.h"
#include "bandit.h"
2025-10-05 00:25:37 +01:00
// Areas are which
enum AREA {
WORLD_AREA_OUTSIDE = 1,
WORLD_AREA_SALOON = 1 << 1,
};
2025-10-04 21:08:52 +01:00
typedef struct World World;
struct World {
//// Static stuff
NavMesh navMesh;
//// Player
Player player;
//// NPCs
2025-10-05 00:25:37 +01:00
U32 npcCount;
NPC npcs[128];
////Bandit
// The bandit the player is after.
Bandit bandit;
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
};
function void UpdateWorld(F32 delta, World *world);
function void ProcessEvents(SDL_Event *event, World *world);
2025-10-05 00:25:37 +01:00
function void UpdateNPCs(F32 delta, World *world);
function void updateNPC(F32 delta, NPC *npc, World *world);
2025-10-05 00:25:37 +01:00
2025-10-04 21:08:52 +01:00
#endif // LD_GAME_WORLD_H_