4 // ============================================================================
5 // functions and definitions exported from game_em to main program
6 // ============================================================================
12 // ----------------------------------------------------------------------------
13 // constant definitions
14 // ----------------------------------------------------------------------------
16 #define EM_MAX_CAVE_WIDTH CAVE_WIDTH
17 #define EM_MAX_CAVE_HEIGHT CAVE_HEIGHT
20 // ----------------------------------------------------------------------------
21 // exported structures
22 // ----------------------------------------------------------------------------
36 boolean any_player_moving;
37 boolean any_player_snapping;
39 int last_moving_player;
40 int last_player_direction[MAX_PLAYERS];
43 struct PLAYER *ply[MAX_PLAYERS];
45 // flags to handle bugs in and changes between different engine versions
46 boolean use_single_button;
47 boolean use_snap_key_bug;
48 boolean use_old_explosions;
49 boolean use_old_android;
50 boolean use_wrap_around;
64 int src_offset_x, src_offset_y;
65 int dst_offset_x, dst_offset_y;
68 Bitmap *crumbled_bitmap;
69 int crumbled_src_x, crumbled_src_y;
70 int crumbled_border_size;
71 int crumbled_tile_size;
73 boolean has_crumbled_graphics;
74 boolean preserve_background;
76 int unique_identifier; /* used to identify needed screen updates */
79 struct EngineSnapshotInfo_EM
81 struct GameInfo_EM game_em;
83 struct PLAYER ply[MAX_PLAYERS];
91 // ----------------------------------------------------------------------------
93 // ----------------------------------------------------------------------------
95 extern struct GlobalInfo_EM global_em_info;
96 extern struct GameInfo_EM game_em;
97 extern struct LevelInfo_EM native_em_level;
98 extern struct GraphicInfo_EM graphic_info_em_object[GAME_TILE_MAX][8];
99 extern struct GraphicInfo_EM graphic_info_em_player[MAX_PLAYERS][PLY_MAX][8];
100 extern struct EngineSnapshotInfo_EM engine_snapshot_em;
102 void em_open_all(void);
103 void em_close_all(void);
105 void InitGfxBuffers_EM(void);
107 void InitGameEngine_EM(void);
108 void GameActions_EM(byte *, boolean);
110 unsigned int InitEngineRandom_EM(int);
112 void setLevelInfoToDefaults_EM(void);
113 boolean LoadNativeLevel_EM(char *, boolean);
115 int getFieldbufferOffsetX_EM(void);
116 int getFieldbufferOffsetY_EM(void);
118 void BlitScreenToBitmap_EM(Bitmap *);
119 void RedrawPlayfield_EM(boolean);
121 void LoadEngineSnapshotValues_EM(void);
122 void SaveEngineSnapshotValues_EM(void);
124 boolean checkIfAllPlayersFitToScreen(void);
126 int map_em_element_C_to_X(int);
127 int map_em_element_X_to_C(int);