diff options
Diffstat (limited to 'edit.c')
-rw-r--r-- | edit.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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; +} |