rnd-20060824-1-src
[rocksndiamonds.git] / src / game.h
index 71ad7a0a3b8084c0296b9464c340b8522f15613d..a18b624772fa8da437f9b0709a7d27c2a40b8a24 100644 (file)
@@ -1,7 +1,7 @@
 /***********************************************************
 * Rocks'n'Diamonds -- McDuffin Strikes Back!               *
 *----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment                      *
+* (c) 1995-2006 Artsoft Entertainment                      *
 *               Holger Schemel                             *
 *               Detmolder Strasse 189                      *
 *               33604 Bielefeld                            *
 #define MAX_NUM_KEYS           8
 
 
+struct GamePanelInfo
+{
+  struct XY level;
+  struct XY gems;
+  struct XY inventory;
+  struct XY keys;
+  struct XY score;
+  struct XY time;
+};
+
 struct GameInfo
 {
+  /* values for control panel */
+  struct GamePanelInfo panel;
+
   /* values for engine initialization */
   int default_push_delay_fixed;
   int default_push_delay_random;
@@ -54,13 +67,11 @@ struct GameInfo
   boolean explosions_delayed;
   boolean envelope_active;
 
-#if 1
   /* values for the new EMC elements */
   int lenses_time_left;
   int magnify_time_left;
   boolean ball_state;
   int ball_content_nr;
-#endif
 
   /* values for player idle animation (no effect on engine) */
   int player_boring_delay_fixed;
@@ -113,6 +124,10 @@ struct PlayerInfo
 
   boolean LevelSolved, GameOver;
 
+  boolean LevelSolved_GameEnd;
+  boolean LevelSolved_SaveTape;
+  boolean LevelSolved_SaveScore;
+
   int last_move_dir;
 
   boolean is_active;
@@ -168,6 +183,8 @@ struct PlayerInfo
   int step_counter;
 
   int score;
+  int score_final;
+
   int gems_still_needed;
   int sokobanfields_still_needed;
   int lights_still_needed;
@@ -182,9 +199,8 @@ struct PlayerInfo
   int inventory_size;
 };
 
-
 extern struct GameInfo         game;
-extern struct PlayerInfo       stored_player[], *local_player;
+extern struct PlayerInfo       stored_player[MAX_PLAYERS], *local_player;
 
 
 #ifdef DEBUG
@@ -197,10 +213,11 @@ void DrawGameValue_Time(int);
 void DrawGameDoorValues(void);
 
 void InitGameSound();
-void InitGame(void);
+void InitGame();
 
 void UpdateEngineValues(int, int);
 void GameWon(void);
+void GameEnd(void);
 
 void InitPlayerGfxAnimation(struct PlayerInfo *, int, int);
 void Moving2Blocked(int, int, int *, int *);
@@ -222,6 +239,11 @@ void RaiseScore(int);
 void RaiseScoreElement(int);
 void RequestQuitGame(boolean);
 
+void FreeEngineSnapshot();
+void LoadEngineSnapshot();
+void SaveEngineSnapshot();
+boolean CheckEngineSnapshot();
+
 void CreateGameButtons();
 void FreeGameButtons();
 void UnmapGameButtons();