| 1 |
// ============================================================================ |
| 2 |
// Mirror Magic -- McDuffin's Revenge |
| 3 |
// ---------------------------------------------------------------------------- |
| 4 |
// (c) 1994-2017 by Artsoft Entertainment |
| 5 |
// Holger Schemel |
| 6 |
// [email protected] |
| 7 |
// https://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 |
|
| 52 |
void SetDrawtoField_MM(int); |
| 53 |
void BackToFront_MM(void); |
| 54 |
|
| 55 |
void FadeToFront(void); |
| 56 |
void ClearWindow(void); |
| 57 |
|
| 58 |
void MarkTileDirty(int, int); |
| 59 |
|
| 60 |
void DrawAllPlayers_MM(void); |
| 61 |
void DrawPlayerField_MM(int, int); |
| 62 |
void DrawPlayer_MM(struct PlayerInfo *); |
| 63 |
void DrawGraphicAnimation_MM(int, int, int, int); |
| 64 |
|
| 65 |
void DrawGraphic_MM(int, int, int); |
| 66 |
void DrawGraphicExt_MM(DrawBuffer *, int, int, int); |
| 67 |
void DrawGraphicThruMask_MM(int, int, int, int); |
| 68 |
void DrawGraphicThruMaskExt_MM(DrawBuffer *, int, int, int, int); |
| 69 |
void DrawMiniGraphic_MM(int, int, int); |
| 70 |
void getMiniGraphicSource(int, Bitmap **, int *, int *); |
| 71 |
void DrawMiniGraphicExt_MM(DrawBuffer *, int, int, int); |
| 72 |
void DrawGraphicShifted_MM(int, int, int, int, int, int, int); |
| 73 |
void DrawScreenElementExt_MM(int, int, int, int, int, int, int); |
| 74 |
void DrawLevelElementExt_MM(int, int, int, int, int, int, int); |
| 75 |
void DrawScreenElementShifted_MM(int, int, int, int, int, int); |
| 76 |
void ErdreichAnbroeckeln(int, int); |
| 77 |
void DrawScreenElement_MM(int, int, int); |
| 78 |
void DrawScreenField_MM(int, int); |
| 79 |
void DrawLevelField_MM(int, int); |
| 80 |
void DrawMiniElement_MM(int, int, int); |
| 81 |
void DrawMiniElementOrWall_MM(int, int, int, int); |
| 82 |
|
| 83 |
void DrawField_MM(int, int); |
| 84 |
void DrawLevel_MM(void); |
| 85 |
void DrawLaser_MM(void); |
| 86 |
void DrawElement_MM(int, int, int); |
| 87 |
void DrawWallsExt_MM(int, int, int, int); |
| 88 |
void DrawWalls_MM(int, int, int); |
| 89 |
void DrawWallsAnimation_MM(int, int, int, int, int); |
| 90 |
void DrawMicroLevel_MM(int, int, boolean); |
| 91 |
void DrawTileCursor_MM(int, boolean); |
| 92 |
|
| 93 |
boolean Request(char *, unsigned int); |
| 94 |
unsigned int OpenDoor(unsigned int); |
| 95 |
unsigned int CloseDoor(unsigned int); |
| 96 |
unsigned int GetDoorState(void); |
| 97 |
unsigned int MoveDoor(unsigned int); |
| 98 |
void DrawSpecialEditorDoor_MM(void); |
| 99 |
void UndrawSpecialEditorDoor(void); |
| 100 |
Pixel ReadPixel(DrawBuffer *, int, int); |
| 101 |
|
| 102 |
void CreateToolButtons(void); |
| 103 |
|
| 104 |
int get_base_element(int); |
| 105 |
int get_element_phase(int); |
| 106 |
int get_num_elements(int); |
| 107 |
int get_rotated_element(int, int); |
| 108 |
|
| 109 |
int map_wall_from_base_element(int); |
| 110 |
int map_wall_to_base_element(int); |
| 111 |
|
| 112 |
int el2gfx(int); |
| 113 |
int el_act2gfx(int, int); |
| 114 |
|
| 115 |
#endif |