- Ja carrega habitació i actors de arxiu

- Els templates deurien funcionar quan s'active la funcionalitat
This commit is contained in:
2024-06-05 20:46:15 +02:00
parent 9dc27d7e8b
commit 30e908c8a9
6 changed files with 167 additions and 52 deletions

View File

@@ -101,8 +101,8 @@ namespace room
// Després intentem carregar els valors segons el arxiu que toca, si existeix
char filename[] = "rooms/00.txt";
filename[6] = int(room/10)*48;
filename[7] = (room%10)*48;
filename[6] = int(room/10)+48;
filename[7] = (room%10)+48;
int filesize=0;
char *buffer = file::getFileBuffer(filename, filesize, true);
char *original_buffer = buffer;
@@ -165,7 +165,8 @@ namespace room
exits[5] = SDL_clamp(val, 0, 64);
} else if (util::strcomp(key, "actor{")) {
actor::createFromFile(&buffer);
actor::actor_t *act = actor::createFromFile(&buffer);
actor::setDirty(act, true);
}
}
free(original_buffer);