rnd-20140514-2-src
[rocksndiamonds.git] / src / tools.h
index fb4ab2785c3da70d3f0d3d80561ec598393fda00..e042fa66bf5ae3561eb8aea7c49f865f92f93477 100644 (file)
 #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)
@@ -59,6 +69,7 @@
 
 #define REQUEST_WAIT_FOR_INPUT (REQ_ASK | REQ_CONFIRM | REQ_PLAYER)
 
+
 void DumpTile(int, int);
 
 void DrawMaskedBorder_FIELD();
@@ -69,7 +80,11 @@ void DrawMaskedBorder_ALL();
 void DrawMaskedBorder(int);
 
 void SetDrawtoField(int);
+#if 1
+void RedrawPlayfield();
+#else
 void RedrawPlayfield(boolean, int, int, int, int);
+#endif
 void BlitScreenToBitmap(Bitmap *);
 void BackToFront();
 
@@ -167,10 +182,13 @@ void ShowEnvelopeDoor(char *text, int);
 
 void DrawLevel(void);
 void DrawMiniLevel(int, int, int, int);
-void DrawPreviewLevel(boolean);
+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);
@@ -218,7 +236,7 @@ int getBeltElementFromBeltNrAndBeltDir(int, int);
 int getBeltSwitchElementFromBeltNrAndBeltDirNr(int, int);
 int getBeltSwitchElementFromBeltNrAndBeltDir(int, int);
 
-unsigned int InitRND(long);
+unsigned int InitRND(int);
 void InitGraphicInfo_EM(void);
 
 void PlayMenuSoundExt(int);
@@ -231,7 +249,7 @@ void PlayMenuMusic();
 void PlaySoundActivating();
 void PlaySoundSelecting();
 
-void ToggleFullscreenIfNeeded();
+void ToggleFullscreenOrChangeWindowScalingIfNeeded();
 void ChangeViewportPropertiesIfNeeded();
 
 #endif /* TOOLS_H */