aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorEugene Sandulenko2007-03-22 22:29:00 +0000
committerEugene Sandulenko2007-03-22 22:29:00 +0000
commit989f7b67cb918c609a68b74955f2131ae682e96e (patch)
treece4eb705833cba3da9e76a0243af5c1fe066a892 /engines/agi
parenta722b767a8a24906b512a0381fb49b1bcd59aa92 (diff)
downloadscummvm-rg350-989f7b67cb918c609a68b74955f2131ae682e96e.tar.gz
scummvm-rg350-989f7b67cb918c609a68b74955f2131ae682e96e.tar.bz2
scummvm-rg350-989f7b67cb918c609a68b74955f2131ae682e96e.zip
- Save AGIPAL resource number properly
- Move GfxMgr constructor to .cpp file svn-id: r26278
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/graphics.cpp7
-rw-r--r--engines/agi/graphics.h7
-rw-r--r--engines/agi/savegame.cpp5
3 files changed, 10 insertions, 9 deletions
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;