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