+}
+
+static int RequestDoor(char *text, unsigned int req_state)
+{
+ unsigned int old_door_state = GetDoorState();
+ int draw_buffer_last = GetDrawtoField();
+ int result;
+
+ if (old_door_state & DOOR_OPEN_1)
+ {
+ CloseDoor(DOOR_CLOSE_1);
+
+ // save old door content
+ BlitBitmap(bitmap_db_door_1, bitmap_db_door_1,
+ 0, 0, DXSIZE, DYSIZE, DXSIZE, 0);
+ }
+
+ SetDoorBackgroundImage(IMG_BACKGROUND_DOOR);
+ SetDrawBackgroundMask(REDRAW_FIELD | REDRAW_DOOR_1);
+
+ // clear door drawing field
+ DrawBackground(DX, DY, DXSIZE, DYSIZE);
+
+ // write text for request
+ DrawRequestDoorText(text);