#if !defined(LD_GAME_NPC_H_)
#define LD_GAME_NPC_H_
#include "aabb.h"
#include "nav.h"
#include "npc_look.h"
#include "../core/types.h"

#define NPC_SPEED 1.0f

typedef enum NPC_ACTION NPC_ACTION;
enum NPC_ACTION {
  // Waiting can be at any point of interest
  NPC_ACTION_WAITING,
  // Walking is when they are actively moving somewhere
  NPC_ACTION_WALKING,
};


typedef struct NPC NPC;
struct NPC {
  //// Personal
  AABB collision;
  Str8 name;
  NPC_LOOK look;
  World_Area currentArea;

  bool customPOI;
  U32 customPOICount;
  U32 npcPOI[16];

  //// Actions
  NPC_ACTION mode;
  // How long they've been waiting
  F32 waitTime;
  // How long they will wait until changing action
  F32 maxWaitTime;

  //// Navigation
  // The NPC's current path
  NavPath path;
  // Which node the NPC is on in the path
  U32 currentNavNode;
  // The current index of the NPC's current node
  U32 pathIndex;
  // Target navNode index the npc is walking to
  U32 targetNavNode;
  // How long the npc has been walking to the next index
  F32 walkTimer;

  //// Knowledge
  // What the NPC knows about the bandit.
  NPC_LOOK banditKnowledge;
};

#endif  // LD_GAME_NPC_H_
