Path finding (first pass)
This commit is contained in:
+5
-6
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user