- [FIX] Nomes l'heroi pot fer que els blocs que desapareixen desapareguen
- [NEW] Flag en l'editor de habitació completada, per a no tornar-me loco - Més habitacions
This commit is contained in:
@@ -30,6 +30,8 @@ namespace room
|
||||
static int doors_type = 0; // Textura per a les portes
|
||||
static int walldoors_type = 0; // Textura per a baix de les portes
|
||||
|
||||
static int editor_done = 0; // Nomes per al editor, per a marcar les habitacions completades i no tornarme loco
|
||||
|
||||
static bool modified = false;
|
||||
|
||||
// Surface on se guarden els gràfics de cada cosa
|
||||
@@ -175,7 +177,7 @@ namespace room
|
||||
for (int i=0;i<4;++i) door_height[i] = -1;
|
||||
color = original_color = 2;
|
||||
num_color_cycles = 0;
|
||||
floor_type = walls_type = doors_type = walldoors_type = 0;
|
||||
floor_type = walls_type = doors_type = walldoors_type = editor_done = 0;
|
||||
for (int i=0;i<6;++i) exits[i] = -1;
|
||||
|
||||
// Després intentem carregar els valors segons el arxiu que toca, si existeix
|
||||
@@ -242,6 +244,9 @@ namespace room
|
||||
} else if (util::strcomp(key, "exit-zn:")) {
|
||||
const int val = file::readInt(&buffer);
|
||||
exits[5] = SDL_clamp(val, 0, 64);
|
||||
} else if (util::strcomp(key, "editor-done:")) {
|
||||
const int val = file::readInt(&buffer);
|
||||
editor_done = SDL_clamp(val, 0, 1);
|
||||
|
||||
} else if (util::strcomp(key, "actor{")) {
|
||||
actor::actor_t *act = actor::createFromFile(&buffer);
|
||||
@@ -579,6 +584,8 @@ namespace room
|
||||
|
||||
int &refExit(const int which) { return exits[which]; }
|
||||
|
||||
int &refEditorDone() { return editor_done; }
|
||||
|
||||
bool roomExists(const int which) { return room_exists[which]; }
|
||||
|
||||
void updateRoomList()
|
||||
@@ -636,6 +643,8 @@ namespace room
|
||||
if (exits[ZP]!=-1) fprintf(f, "exit-zp: %i\n", exits[ZP]);
|
||||
if (exits[ZN]!=-1) fprintf(f, "exit-zn: %i\n", exits[ZN]);
|
||||
|
||||
if (editor_done!=0) fprintf(f, "editor-done: %i\n", editor_done);
|
||||
|
||||
actor::actor_t *act = actor::alphaOrder(actor::getFirst());
|
||||
while (act)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user