summaryrefslogtreecommitdiffstats
path: root/edit.c
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-06-25 18:55:01 +0200
committerneoraider <devnull@localhost>2007-06-25 18:55:01 +0200
commitb8549034bef0de090547f32af07df248e68c7064 (patch)
tree2cf8128807a5d9e4b53e1461492b4930a2743ad3 /edit.c
parenta686a31daece494006e3ce841a5883472a0f412a (diff)
downloadzoomedit-b8549034bef0de090547f32af07df248e68c7064.tar
zoomedit-b8549034bef0de090547f32af07df248e68c7064.zip
zoomedit: Added Pixmap to drawing; added "point in polygon" checker; rooms are now selectable
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;
+}