NPC movements

This commit is contained in:
2026-06-26 14:21:48 -05:00
parent cb23d4c11b
commit d326f6c1ac
22 changed files with 502 additions and 96 deletions
+8
View File
@@ -41,10 +41,18 @@ errorret_t rpgInit(void) {
uint8_t npcIndex = entityGetAvailable();
entity_t *npc = &ENTITIES[npcIndex];
entityInit(npc, ENTITY_TYPE_NPC);
npcSetMoveType(npc, NPC_MOVE_TYPE_PATH);
npc->position = (worldpos_t){ 3, 3, 0 };
npc->interact.type = ENTITY_INTERACT_PRINT;
npc->interact.data.message = "hello world";
npcpath_t *path = &npc->data.npc.moveData.path;
path->positions[0] = (worldpos_t){ 3, 3, 0 };
path->positions[1] = (worldpos_t){ 5, 3, 0 };
path->positions[2] = (worldpos_t){ 5, 5, 0 };
path->positions[3] = (worldpos_t){ 3, 5, 0 };
path->count = 4;
// All Good!
errorOk();
}