rnd-20051228-2-src
[rocksndiamonds.git] / src / tools.h
index 638d58e911efcdbe7eee1dac7744501cf2bfd491..a59f2bac2f5c946e50eddc79f033753ec2da4929 100644 (file)
 #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_DELAY          (1 << 5)
-#define DOOR_GET_STATE         (1 << 6)
-#define DOOR_SET_STATE         (1 << 7)
+#define DOOR_NO_COPY_BACK      (1 << 5)
+#define DOOR_NO_DELAY          (1 << 6)
+#define DOOR_GET_STATE         (1 << 7)
+#define DOOR_SET_STATE         (1 << 8)
 
 /* for Request */
 #define REQ_ASK                        (1 << 0)
-#define REQ_OPEN               (1 << 1)
-#define REQ_CLOSE              (1 << 2)
-#define REQ_CONFIRM            (1 << 3)
+#define REQ_CONFIRM            (1 << 1)
+#define REQ_PLAYER             (1 << 2)
+#define REQ_STAY_OPEN          (1 << 3)
 #define REQ_STAY_CLOSED                (1 << 4)
-#define REQ_STAY_OPEN          (1 << 5)
-#define REQ_PLAYER             (1 << 6)
+#define REQ_REOPEN             (1 << 5)
 
-#define REQUEST_WAIT_FOR       (REQ_ASK | REQ_CONFIRM | REQ_PLAYER)
+#define REQUEST_WAIT_FOR_INPUT (REQ_ASK | REQ_CONFIRM | REQ_PLAYER)
+
+void DumpTile(int, int);
 
 void SetDrawtoField(int);
 void RedrawPlayfield(boolean, int, int, int, int);
 void BackToFront();
 void FadeToFront();
 void ClearWindow();
+void SetMainBackgroundImageIfDefined(int);
 void SetMainBackgroundImage(int);
 void SetDoorBackgroundImage(int);
 void DrawBackground(int, int, int, int);
@@ -83,6 +86,7 @@ void DrawAllPlayers(void);
 void DrawPlayerField(int, int);
 void DrawPlayer(struct PlayerInfo *);
 
+void getGraphicSourceExt(int, int, Bitmap **, int *, int *, boolean);
 void getGraphicSource(int, int, Bitmap **, int *, int *);
 void DrawGraphic(int, int, int, int);
 void DrawGraphicExt(DrawBuffer *, int, int, int, int);
@@ -93,8 +97,6 @@ void DrawMiniGraphic(int, int, int);
 void getMiniGraphicSource(int, Bitmap **, int *, int *);
 void DrawMiniGraphicExt(DrawBuffer *, int, int, int);
 
-void DrawGraphicShifted(int, int, int, int, int, int, int, int);
-void DrawGraphicShiftedThruMask(int, int, int, int, int, int, int);
 void DrawScreenElementExt(int, int, int, int, int, int, int);
 void DrawLevelElementExt(int, int, int, int, int, int, int);
 void DrawScreenElementShifted(int, int, int, int, int, int);
@@ -102,7 +104,9 @@ void DrawLevelElementShifted(int, int, int, int, int, int);
 void DrawScreenElementThruMask(int, int, int);
 void DrawLevelElementThruMask(int, int, int);
 void DrawLevelFieldThruMask(int, int);
-void DrawCrumbledSand(int, int);
+void DrawLevelFieldCrumbledSand(int, int);
+void DrawLevelFieldCrumbledSandDigging(int, int, int, int);
+void DrawLevelFieldCrumbledSandNeighbours(int, int);
 void DrawScreenElement(int, int, int);
 void DrawLevelElement(int, int, int);
 void DrawScreenField(int, int);
@@ -111,12 +115,15 @@ void DrawLevelField(int, int);
 void DrawMiniElement(int, int, int);
 void DrawMiniElementOrWall(int, int, int, int);
 
+void ShowEnvelope();
+
 void getMicroGraphicSource(int, Bitmap **, int *, int *);
 void DrawMicroElement(int, int, int);
 void DrawLevel(void);
 void DrawMiniLevel(int, int, int, int);
 void DrawMicroLevel(int, int, boolean);
 
+void WaitForEventToContinue();
 boolean Request(char *, unsigned int);
 unsigned int OpenDoor(unsigned int);
 unsigned int CloseDoor(unsigned int);
@@ -127,15 +134,25 @@ unsigned int MoveDoor(unsigned int);
 void DrawSpecialEditorDoor();
 void UndrawSpecialEditorDoor();
 
-int ReadPixel(DrawBuffer *, int, int);
-
 void CreateToolButtons();
 void FreeToolButtons();
 
+int map_element_RND_to_EM(int);
+int map_element_EM_to_RND(int);
+int map_direction_RND_to_EM(int);
+int map_direction_EM_to_RND(int);
+
 int get_next_element(int);
 int el_act_dir2img(int, int, int);
 int el_act2img(int, int);
 int el_dir2img(int, int);
+int el2baseimg(int);
 int el2img(int);
+int el2edimg(int);
+int el2preimg(int);
+int font2baseimg(int);
+
+unsigned int InitRND(long);
+void InitGraphicInfo_EM(void);
 
 #endif /* TOOLS_H */