RPG stuff

This commit is contained in:
2026-06-11 12:18:13 -05:00
parent 5be21a21d5
commit aa246eff94
9 changed files with 274 additions and 106 deletions
+5 -3
View File
@@ -26,14 +26,16 @@ errorret_t rpgInit(void) {
rpgCameraInit();
rpgTextboxInit();
// Init world
errorChain(mapPositionSet((chunkpos_t){ 0, 0, 0 }));
// TEST: Create some entities.
uint8_t entIndex = entityGetAvailable();
assertTrue(entIndex != 0xFF, "No available entity slots!.");
entity_t *ent = &ENTITIES[entIndex];
entityInit(ent, ENTITY_TYPE_PLAYER);
// RPG_CAMERA.mode = RPG_CAMERA_MODE_FOLLOW_ENTITY;
// RPG_CAMERA.followEntity.followEntityId = ent->id;
ent->position.x = 2, ent->position.y = 2;
RPG_CAMERA.mode = RPG_CAMERA_MODE_FOLLOW_ENTITY;
RPG_CAMERA.followEntity.followEntityId = ent->id;
// All Good!
errorOk();