-/* for MoveDoor */
-#define DOOR_OPEN_1 (1 << 0)
-#define DOOR_OPEN_2 (1 << 1)
-#define DOOR_CLOSE_1 (1 << 2)
-#define DOOR_CLOSE_2 (1 << 3)
-#define DOOR_OPEN_ALL (DOOR_OPEN_1 | DOOR_OPEN_2)
-#define DOOR_CLOSE_ALL (DOOR_CLOSE_1 | DOOR_CLOSE_2)
-#define DOOR_ACTION_1 (DOOR_OPEN_1 | DOOR_CLOSE_1)
-#define DOOR_ACTION_2 (DOOR_OPEN_2 | DOOR_CLOSE_2)
-#define DOOR_ACTION (DOOR_ACTION_1 | DOOR_ACTION_2)
-#define DOOR_COPY_BACK (1 << 4)
-#define DOOR_NO_COPY_BACK (1 << 5)
-#define DOOR_NO_DELAY (1 << 6)
-#define DOOR_FORCE_REDRAW (1 << 7)
-#define DOOR_GET_STATE (1 << 8)
-#define DOOR_SET_STATE (1 << 9)
-
-/* for Request */
-#define REQ_ASK (1 << 0)
-#define REQ_CONFIRM (1 << 1)
-#define REQ_PLAYER (1 << 2)
-#define REQ_STAY_OPEN (1 << 3)
-#define REQ_STAY_CLOSED (1 << 4)
-#define REQ_REOPEN (1 << 5)
-
-#define REQUEST_WAIT_FOR_INPUT (REQ_ASK | REQ_CONFIRM | REQ_PLAYER)
+// for MoveDoor
+#define DOOR_OPEN_1 (1 << 0)
+#define DOOR_OPEN_2 (1 << 1)
+#define DOOR_CLOSE_1 (1 << 2)
+#define DOOR_CLOSE_2 (1 << 3)
+#define DOOR_OPEN_ALL (DOOR_OPEN_1 | DOOR_OPEN_2)
+#define DOOR_CLOSE_ALL (DOOR_CLOSE_1 | DOOR_CLOSE_2)
+#define DOOR_ACTION_1 (DOOR_OPEN_1 | DOOR_CLOSE_1)
+#define DOOR_ACTION_2 (DOOR_OPEN_2 | DOOR_CLOSE_2)
+#define DOOR_ACTION (DOOR_ACTION_1 | DOOR_ACTION_2)
+#define DOOR_COPY_BACK (1 << 4)
+#define DOOR_NO_COPY_BACK (1 << 5)
+#define DOOR_NO_DELAY (1 << 6)
+#define DOOR_FORCE_ANIM (1 << 7)
+#define DOOR_FORCE_REDRAW (1 << 8)
+#define DOOR_GET_STATE (1 << 9)
+#define DOOR_SET_STATE (1 << 10)
+
+#define DOOR_1 (DOOR_ACTION_1)
+#define DOOR_2 (DOOR_ACTION_2)
+#define DOOR_OPEN (DOOR_OPEN_ALL)
+#define DOOR_CLOSE (DOOR_CLOSE_ALL)
+
+#define DOOR_INDEX_FROM_TOKEN(x) ((x) == DOOR_1 ? 0 : 1)
+#define DOOR_TOKEN_FROM_INDEX(x) ((x) == 0 ? DOOR_1 ? : DOOR_2)
+#define REDRAW_DOOR_FROM_TOKEN(x) ((x) == DOOR_1 ? REDRAW_DOOR_1 : REDRAW_DOOR_2)
+
+// for Request
+#define REQ_ASK (1 << 0)
+#define REQ_CONFIRM (1 << 1)
+#define REQ_PLAYER (1 << 2)
+#define REQ_STAY_OPEN (1 << 3)
+#define REQ_STAY_CLOSED (1 << 4)
+#define REQ_REOPEN (1 << 5)
+
+
+int getFieldbufferOffsetX_RND(int, int);
+int getFieldbufferOffsetY_RND(int, int);
+
+int getLevelFromScreenX(int);
+int getLevelFromScreenY(int);
+
+int getScreenFieldSizeX(void);
+int getScreenFieldSizeY(void);