summaryrefslogtreecommitdiffstats
path: root/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'edit.c')
-rw-r--r--edit.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/edit.c b/edit.c
new file mode 100644
index 0000000..d75f5b9
--- /dev/null
+++ b/edit.c
@@ -0,0 +1,22 @@
+#include "edit.h"
+
+
+static int editMode = EDIT_MODE_VIEW;
+
+static ROOM *activeRoom = NULL;
+
+int getEditMode() {
+ return editMode;
+}
+
+
+ROOM *getActiveRoom() {
+ return activeRoom;
+}
+
+void setActiveRoom(ROOM *room) {
+ activeRoom = room;
+
+ if(editMode == EDIT_MODE_VIEW || editMode == EDIT_MODE_SELECTED)
+ editMode = (room == NULL) ? EDIT_MODE_VIEW : EDIT_MODE_SELECTED;
+}