3fdee2fb71653f050ced58627be8e2377f5f9cf0
[rocksndiamonds.git] / src / game_mm / mm_tools.h
1 /***********************************************************
2 * Mirror Magic -- McDuffin's Revenge                       *
3 *----------------------------------------------------------*
4 * (c) 1994-2001 Artsoft Entertainment                      *
5 *               Holger Schemel                             *
6 *               Detmolder Strasse 189                      *
7 *               33604 Bielefeld                            *
8 *               Germany                                    *
9 *               e-mail: info@artsoft.org                   *
10 *----------------------------------------------------------*
11 * tools.h                                                  *
12 ***********************************************************/
13
14 #ifndef MM_TOOLS_H
15 #define MM_TOOLS_H
16
17 #include "main_mm.h"
18
19
20 /* for DrawElementShifted */
21 #define NO_CUTTING              0
22 #define CUT_ABOVE               (1 << 0)
23 #define CUT_BELOW               (1 << 1)
24 #define CUT_LEFT                (1 << 2)
25 #define CUT_RIGHT               (1 << 3)
26
27 /* for masking functions */
28 #define NO_MASKING              0
29 #define USE_MASKING             1
30
31 /* for MoveDoor */
32 #define DOOR_OPEN_1             (1 << 0)
33 #define DOOR_OPEN_2             (1 << 1)
34 #define DOOR_CLOSE_1            (1 << 2)
35 #define DOOR_CLOSE_2            (1 << 3)
36 #define DOOR_OPEN_ALL           (DOOR_OPEN_1 | DOOR_OPEN_2)
37 #define DOOR_CLOSE_ALL          (DOOR_CLOSE_1 | DOOR_CLOSE_2)
38 #define DOOR_ACTION_1           (DOOR_OPEN_1 | DOOR_CLOSE_1)
39 #define DOOR_ACTION_2           (DOOR_OPEN_2 | DOOR_CLOSE_2)
40 #define DOOR_ACTION             (DOOR_ACTION_1 | DOOR_ACTION_2)
41 #define DOOR_COPY_BACK          (1 << 4)
42 #define DOOR_NO_DELAY           (1 << 5)
43 #define DOOR_GET_STATE          (1 << 6)
44
45 /* for Request */
46 #define REQ_ASK                 (1 << 0)
47 #define REQ_OPEN                (1 << 1)
48 #define REQ_CLOSE               (1 << 2)
49 #define REQ_CONFIRM             (1 << 3)
50 #define REQ_STAY_CLOSED         (1 << 4)
51 #define REQ_STAY_OPEN           (1 << 5)
52
53 #define REQUEST_WAIT_FOR        (REQ_ASK | REQ_CONFIRM)
54
55 /* font types */
56 #define FS_SMALL                0
57 #define FS_BIG                  1
58 #define FS_MEDIUM               2
59
60
61 void SetDrawtoField_MM(int);
62 void BackToFront();
63 void FadeToFront();
64 void ClearWindow();
65
66 void MarkTileDirty(int, int);
67
68 void DrawAllPlayers_MM(void);
69 void DrawPlayerField_MM(int, int);
70 void DrawPlayer_MM(struct PlayerInfo *);
71 void DrawGraphicAnimation_MM(int, int, int, int);
72
73 void DrawGraphic_MM(int, int, int);
74 void DrawGraphicExt_MM(DrawBuffer *, int, int, int);
75 void DrawGraphicThruMask_MM(int, int, int);
76 void DrawGraphicThruMaskExt_MM(DrawBuffer *, int, int, int);
77 void DrawMiniGraphic_MM(int, int, int);
78 void getMiniGraphicSource(int, Bitmap **, int *, int *);
79 void DrawMiniGraphicExt_MM(DrawBuffer *, int, int, int);
80 void DrawGraphicShifted_MM(int, int, int, int, int, int, int);
81 void DrawGraphicShiftedThruMask_MM(int, int, int, int, int, int);
82 void DrawScreenElementExt_MM(int, int, int, int, int, int, int);
83 void DrawLevelElementExt_MM(int, int, int, int, int, int, int);
84 void DrawScreenElementShifted_MM(int, int, int, int, int, int);
85 void DrawLevelElementShifted_MM(int, int, int, int, int, int);
86 void DrawScreenElementThruMask_MM(int, int, int);
87 void DrawLevelElementThruMask_MM(int, int, int);
88 void DrawLevelFieldThruMask_MM(int, int);
89 void ErdreichAnbroeckeln(int, int);
90 void DrawScreenElement_MM(int, int, int);
91 void DrawLevelElement_MM(int, int, int);
92 void DrawScreenField_MM(int, int);
93 void DrawLevelField_MM(int, int);
94 void DrawMiniElement_MM(int, int, int);
95 void DrawMiniElementOrWall_MM(int, int, int, int);
96
97 void DrawField_MM(int, int);
98 void DrawLevel_MM(void);
99 void DrawLaser_MM(void);
100 void DrawElement_MM(int, int, int);
101 void DrawWallsExt_MM(int, int, int, int);
102 void DrawWalls_MM(int, int, int);
103 void DrawWallsAnimation_MM(int, int, int, int, int);
104 void DrawMiniLevel_MM(int, int, int, int);
105 void DrawMicroLevel_MM(int, int, boolean);
106
107 boolean Request(char *, unsigned int);
108 unsigned int OpenDoor(unsigned int);
109 unsigned int CloseDoor(unsigned int);
110 unsigned int GetDoorState(void);
111 unsigned int MoveDoor(unsigned int);
112 void DrawSpecialEditorDoor_MM();
113 void UndrawSpecialEditorDoor();
114 Pixel ReadPixel(DrawBuffer *, int, int);
115 void SetRGB(unsigned int, unsigned short, unsigned short, unsigned short);
116
117 void CreateToolButtons();
118
119 int get_base_element(int);
120 int get_element_phase(int);
121 int get_num_elements(int);
122 int get_rotated_element(int, int);
123
124 int el2gfx(int);
125
126 #endif