Path finding (first pass)

This commit is contained in:
2026-07-02 14:08:59 -05:00
parent a8271e01bd
commit 8d5c0c7cad
15 changed files with 199 additions and 37 deletions
+5 -6
View File
@@ -7,6 +7,7 @@
#include "rpg.h"
#include "entity/entity.h"
#include "rpg/entity/npc/npcpath.h"
#include "rpg/overworld/map.h"
#include "rpg/cutscene/cutscenesystem.h"
#include "rpg/cutscene/scene/testcutscene.h"
@@ -57,12 +58,10 @@ errorret_t rpgInit(void) {
if(ci != -1) entitySetChunk(npc, (uint8_t)ci);
}
// npcpath_t *path = &npc->data.npc.moveData.path;
// path->positions[0] = (worldpos_t){ 3, 3, 0 };
// path->positions[1] = (worldpos_t){ 10, 3, 0 };
// path->positions[2] = (worldpos_t){ 10, 10, 0 };
// path->positions[3] = (worldpos_t){ 3, 10, 0 };
// path->count = 4;
npcPathAddNode(&npc->data.npc, (worldpos_t){ 4, 4, 0 });
npcPathAddNode(&npc->data.npc, (worldpos_t){ 10, 10, 1 });
npcPathAddNode(&npc->data.npc, (worldpos_t){ 4, 4, 0 });
npcPathAddNode(&npc->data.npc, (worldpos_t){ 10, 10, 1 });
// All Good!
errorOk();