diff options
Diffstat (limited to 'engines/hdb')
-rw-r--r-- | engines/hdb/gfx.cpp | 16 | ||||
-rw-r--r-- | engines/hdb/gfx.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 3fdba2ed8e..57d0cc7ad4 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -137,6 +137,22 @@ bool Gfx::init() { return true; } +void Gfx::save(Common::OutSaveFile *out) { + out->writeSint32LE(_currentSky); + out->write(&_fadeInfo, sizeof(_fadeInfo)); + out->write(&_snowInfo, sizeof(_snowInfo)); +} + +void Gfx::loadSaveFile(Common::InSaveFile *in) { + _currentSky = in->readSint32LE(); + in->read(&_fadeInfo, sizeof(_fadeInfo)); + in->read(&_snowInfo, sizeof(_snowInfo)); + setSky(_currentSky); + turnOffSnow(); + if (_snowInfo.active) + turnOnSnow(); +} + void Gfx::fillScreen(uint32 color) { _globalSurface.fillRect(Common::Rect(kScreenWidth, kScreenHeight), color); g_system->fillScreen(color); diff --git a/engines/hdb/gfx.h b/engines/hdb/gfx.h index 597bf7fe37..88fb25063b 100644 --- a/engines/hdb/gfx.h +++ b/engines/hdb/gfx.h @@ -91,6 +91,8 @@ public: Graphics::ManagedSurface _globalSurface; bool init(); + void save(Common::OutSaveFile *out); + void loadSaveFile(Common::InSaveFile *in); void fillScreen(uint32 color); void updateVideo(); void setPointerState(int value); |