- [NEW] Botó per a activar/desactivar l'edició
- [NEW] Seleccionar actors amb CTRL+Up/Down
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "jfile.h"
|
||||
#include "jutil.h"
|
||||
#include "actor.h"
|
||||
#include "editor.h"
|
||||
|
||||
namespace room
|
||||
{
|
||||
@@ -95,9 +96,14 @@ namespace room
|
||||
//void load(int x, int y, int8_t xp, int8_t xn, int8_t yp, int8_t yn, uint8_t col, uint8_t floor, uint8_t walls, uint8_t door, uint8_t walldoor)
|
||||
void load(const int room)
|
||||
{
|
||||
if (modified) editor::save();
|
||||
if (modified && ::editor::isEditing()) editor::save();
|
||||
|
||||
if (room > 64) { perror("ERROR: Nombre d'habitació massa gran! Eixint..."); exit(1); }
|
||||
|
||||
actor::actor_t *sel = actor::getSelected();
|
||||
char selected_actor_name[16]; selected_actor_name[0] = 0;
|
||||
if (sel) strcpy(selected_actor_name, sel->name);
|
||||
|
||||
init();
|
||||
|
||||
// Primer carreguem els valors per defecte
|
||||
@@ -181,6 +187,8 @@ namespace room
|
||||
}
|
||||
current_room = room;
|
||||
refresh();
|
||||
|
||||
actor::select(actor::find(selected_actor_name));
|
||||
}
|
||||
|
||||
void update()
|
||||
|
||||
Reference in New Issue
Block a user