From 989f7b67cb918c609a68b74955f2131ae682e96e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 22 Mar 2007 22:29:00 +0000 Subject: - Save AGIPAL resource number properly - Move GfxMgr constructor to .cpp file svn-id: r26278 --- engines/agi/graphics.cpp | 7 +++++++ engines/agi/graphics.h | 7 +------ engines/agi/savegame.cpp | 5 ++--- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'engines/agi') diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp index d2a686d298..c3ddde14f8 100644 --- a/engines/agi/graphics.cpp +++ b/engines/agi/graphics.cpp @@ -116,6 +116,13 @@ static struct UpdateBlock update = { MAX_INT, MAX_INT, 0, 0 }; +GfxMgr::GfxMgr(AgiEngine *vm) : _vm(vm) { + _shakeH = NULL; + _shakeV = NULL; + _agipalFileNum = 0; +} + + /* * Layer 4: 640x480? ================== User display * ^ diff --git a/engines/agi/graphics.h b/engines/agi/graphics.h index 9c9dba0cb0..be79db6858 100644 --- a/engines/agi/graphics.h +++ b/engines/agi/graphics.h @@ -50,12 +50,7 @@ private: int _agipalFileNum; public: - GfxMgr(AgiEngine *vm) { - _vm = vm; - _shakeH = NULL; - _shakeV = NULL; - _agipalFileNum = 0; - } + GfxMgr(AgiEngine *vm); void gfxPutBlock(int x1, int y1, int x2, int y2); diff --git a/engines/agi/savegame.cpp b/engines/agi/savegame.cpp index 566f2945b0..4f25b58cc5 100644 --- a/engines/agi/savegame.cpp +++ b/engines/agi/savegame.cpp @@ -202,8 +202,7 @@ int AgiEngine::saveGame(const char *fileName, const char *description) { out->writeByte(0); //Write which file number AGIPAL is using (0 if not being used) - if ((getFeatures() & GF_AGIPAL)) - out->writeSint16BE(_gfx->getAGIPalFileNum()); + out->writeSint16BE(_gfx->getAGIPalFileNum()); out->finalize(); if (out->ioFailed()) @@ -440,7 +439,7 @@ int AgiEngine::loadGame(const char *fileName) { } //Load AGIPAL Data - if ((getFeatures() & GF_AGIPAL) && (saveVersion >= 3)) + if (saveVersion >= 3) _gfx->setAGIPal(in->readSint16BE()); delete in; -- cgit v1.2.3