added basic support for game engine snapshots for Mirror Magic game engine
authorHolger Schemel <info@artsoft.org>
Fri, 17 Feb 2017 22:24:10 +0000 (23:24 +0100)
committerHolger Schemel <info@artsoft.org>
Fri, 23 Mar 2018 22:21:08 +0000 (23:21 +0100)
src/game_mm/export.h
src/game_mm/mm_init.c

index b36ab4300229fe2590c0c495dde8f3657c55d8f2..7b6167bc3137e9e8218c9a131a4e57ae7a50459c 100644 (file)
@@ -173,6 +173,7 @@ struct GraphicInfo_MM
 
 struct EngineSnapshotInfo_MM
 {
+  struct GameInfo_MM game_mm;
 };
 
 
index eec9ee1e31135b98fe9156b2f555ea7d27e09062..9d945a3894f616daefb879a49868555fffbd44c4 100644 (file)
 
 #include "main_mm.h"
 
+
+struct EngineSnapshotInfo_MM engine_snapshot_mm;
+
+
 unsigned int InitEngineRandom_MM(int seed)
 {
   return InitEngineRandom(seed);
 }
+
+
+/* ------------------------------------------------------------------------- */
+/* Mirror Magic game engine snapshot handling functions                      */
+/* ------------------------------------------------------------------------- */
+
+void SaveEngineSnapshotValues_MM(ListNode **buffers)
+{
+  engine_snapshot_mm.game_mm = game_mm;
+}
+
+void LoadEngineSnapshotValues_MM()
+{
+  /* stored engine snapshot buffers already restored at this point */
+
+  game_mm = engine_snapshot_mm.game_mm;
+
+  RedrawPlayfield_MM(TRUE);
+}