From 8a70906dda704f6f2c9f7a55792fb26404ff5cde Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 17 Feb 2017 23:24:10 +0100 Subject: [PATCH] added basic support for game engine snapshots for Mirror Magic game engine --- src/game_mm/export.h | 1 + src/game_mm/mm_init.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/game_mm/export.h b/src/game_mm/export.h index b36ab430..7b6167bc 100644 --- a/src/game_mm/export.h +++ b/src/game_mm/export.h @@ -173,6 +173,7 @@ struct GraphicInfo_MM struct EngineSnapshotInfo_MM { + struct GameInfo_MM game_mm; }; diff --git a/src/game_mm/mm_init.c b/src/game_mm/mm_init.c index eec9ee1e..9d945a38 100644 --- a/src/game_mm/mm_init.c +++ b/src/game_mm/mm_init.c @@ -11,7 +11,30 @@ #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); +} -- 2.34.1