From: Holger Schemel Date: Fri, 17 Feb 2017 22:24:10 +0000 (+0100) Subject: added basic support for game engine snapshots for Mirror Magic game engine X-Git-Tag: 4.1.0.0~218 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8a70906dda704f6f2c9f7a55792fb26404ff5cde;p=rocksndiamonds.git added basic support for game engine snapshots for Mirror Magic game engine --- 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); +}