-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
-*----------------------------------------------------------*
-* (c) 1995-2006 Artsoft Entertainment *
-* Holger Schemel *
-* Detmolder Strasse 189 *
-* 33604 Bielefeld *
-* Germany *
-* e-mail: info@artsoft.org *
-*----------------------------------------------------------*
-* tools.h *
-***********************************************************/
+// ============================================================================
+// Rocks'n'Diamonds - McDuffin Strikes Back!
+// ----------------------------------------------------------------------------
+// (c) 1995-2014 by Artsoft Entertainment
+// Holger Schemel
+// info@artsoft.org
+// http://www.artsoft.org/
+// ----------------------------------------------------------------------------
+// tools.h
+// ============================================================================
#ifndef TOOLS_H
#define TOOLS_H
#define DOOR_GET_STATE (1 << 8)
#define DOOR_SET_STATE (1 << 9)
+#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 REQUEST_WAIT_FOR_INPUT (REQ_ASK | REQ_CONFIRM | REQ_PLAYER)
-struct RequestButtonInfo
-{
- struct TextPosInfo yes;
- struct TextPosInfo no;
- struct TextPosInfo confirm;
- struct TextPosInfo player_1;
- struct TextPosInfo player_2;
- struct TextPosInfo player_3;
- struct TextPosInfo player_4;
-};
-
-struct RequestInfo
-{
- struct RequestButtonInfo button;
-};
-
-extern struct RequestInfo request;
-
-
void DumpTile(int, int);
void DrawMaskedBorder_FIELD();
void DrawMaskedBorder(int);
void SetDrawtoField(int);
-void RedrawPlayfield(boolean, int, int, int, int);
+void RedrawPlayfield();
void BlitScreenToBitmap(Bitmap *);
void BackToFront();
void ShowEnvelope(int);
void ShowEnvelopeDoor(char *text, int);
-void DrawLevel(void);
+void DrawLevel(int);
void DrawMiniLevel(int, int, int, int);
void DrawPreviewLevelInitial(void);
void DrawPreviewLevelAnimation(void);
-void WaitForEventToContinue();
+void WaitForEventToContinue(void);
boolean Request(char *, unsigned int);
+void InitGraphicCompatibilityInfo_Doors(void);
+void InitDoors(void);
unsigned int OpenDoor(unsigned int);
unsigned int CloseDoor(unsigned int);
unsigned int GetDoorState(void);