Bunch of stuff done

This commit is contained in:
2026-06-26 19:42:34 -05:00
parent 88aed11d98
commit 8181a28557
32 changed files with 567 additions and 148 deletions
+12
View File
@@ -37,6 +37,12 @@ errorret_t rpgInit(void) {
entityInit(ent, ENTITY_TYPE_PLAYER);
RPG_CAMERA.mode = RPG_CAMERA_MODE_FOLLOW_ENTITY;
RPG_CAMERA.followEntity.followEntityId = ent->id;
{
chunkpos_t cp;
worldPosToChunkPos(&ent->position, &cp);
chunkindex_t ci = mapGetChunkIndexAt(cp);
if(ci != -1) entitySetChunk(ent, (uint8_t)ci);
}
uint8_t npcIndex = entityGetAvailable();
entity_t *npc = &ENTITIES[npcIndex];
@@ -45,6 +51,12 @@ errorret_t rpgInit(void) {
npc->position = (worldpos_t){ 3, 3, 0 };
npc->interact.type = ENTITY_INTERACT_PRINT;
npc->interact.data.message = "hello world";
{
chunkpos_t cp;
worldPosToChunkPos(&npc->position, &cp);
chunkindex_t ci = mapGetChunkIndexAt(cp);
if(ci != -1) entitySetChunk(npc, (uint8_t)ci);
}
npcpath_t *path = &npc->data.npc.moveData.path;
path->positions[0] = (worldpos_t){ 3, 3, 0 };