fixed bug in single button handling causing broken tapes (EM engine)
[rocksndiamonds.git] / src / game_em / export.h
index 9801d0cb55b94f84f1cd42464606b26f976f226a..365cafe863a6b2bcc29b0166838a25d429a65bb7 100644 (file)
@@ -353,6 +353,12 @@ enum
   Xsand_stonesand_2,
   Xsand_stonesand_3,
   Xsand_stonesand_4,
+
+#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
+  Xsand_stonesand_quickout_1,
+  Xsand_stonesand_quickout_2,
+#endif
+
   Xsand_stoneout_1,
   Xsand_stoneout_2,
   Xsand_sandstone_1,
@@ -616,6 +622,8 @@ struct LEVEL
   short ball_array[8][8];      /* ball data */
   short android_array[TILE_MAX];/* android clone table */
   int num_ball_arrays;         /* number of ball data arrays used */
+
+  int exit_x, exit_y;          /* kludge for playing player exit sound */
 };
 
 struct PLAYER
@@ -657,6 +665,10 @@ struct GlobalInfo_EM
 struct GameInfo_EM
 {
   boolean any_player_moving;
+  boolean any_player_snapping;
+
+  boolean use_single_button;
+
   int last_moving_player;
   int last_player_direction[MAX_PLAYERS];
 };
@@ -669,6 +681,9 @@ struct LevelInfo_EM
 
   struct LEVEL *lev;
   struct PLAYER *ply[MAX_PLAYERS];
+
+  /* used for runtime values */
+  struct GameInfo_EM *game_em;
 };
 
 struct GraphicInfo_EM
@@ -682,6 +697,7 @@ struct GraphicInfo_EM
   Bitmap *crumbled_bitmap;
   int crumbled_src_x, crumbled_src_y;
   int crumbled_border_size;
+  int crumbled_tile_size;
 
   boolean has_crumbled_graphics;
   boolean preserve_background;
@@ -689,29 +705,55 @@ struct GraphicInfo_EM
   int unique_identifier;       /* used to identify needed screen updates */
 };
 
+struct EngineSnapshotInfo_EM
+{
+  struct GameInfo_EM game_em;
+  unsigned int RandomEM;
+  struct LEVEL lev;
+  struct PLAYER ply[MAX_PLAYERS];
+  short Array[4][EM_MAX_CAVE_HEIGHT][EM_MAX_CAVE_WIDTH];
+  int screen_x;
+  int screen_y;
+  int frame;
+  short **Boom;
+  short **Cave;
+  short **Next;
+  short **Draw;
+};
+
 
 /* ------------------------------------------------------------------------- */
 /* exported functions                                                        */
 /* ------------------------------------------------------------------------- */
 
 extern struct GlobalInfo_EM global_em_info;
+extern struct GameInfo_EM game_em;
 extern struct LevelInfo_EM native_em_level;
 extern struct GraphicInfo_EM graphic_info_em_object[TILE_MAX][8];
 extern struct GraphicInfo_EM graphic_info_em_player[MAX_PLAYERS][SPR_MAX][8];
+extern struct EngineSnapshotInfo_EM engine_snapshot_em;
 
 extern void em_open_all();
 extern void em_close_all();
 
+extern void InitGfxBuffers_EM();
+
 extern void InitGameEngine_EM();
 extern void GameActions_EM(byte *, boolean);
 
-extern unsigned int InitEngineRND_EM(long);
+extern unsigned int InitEngineRandom_EM(int);
 
 extern void setLevelInfoToDefaults_EM();
-extern boolean LoadNativeLevel_EM(char *);
+extern boolean LoadNativeLevel_EM(char *, boolean);
+
+extern int getFieldbufferOffsetX_EM();
+extern int getFieldbufferOffsetY_EM();
 
+extern void BackToFront_EM(void);
 extern void BlitScreenToBitmap_EM(Bitmap *);
 extern void RedrawPlayfield_EM(boolean);
-extern void DrawGameDoorValues_EM();
+
+extern void LoadEngineSnapshotValues_EM();
+extern void SaveEngineSnapshotValues_EM();
 
 #endif /* EXPORT_H */