diff options
author | Travis Howell | 2007-05-09 15:36:05 +0000 |
---|---|---|
committer | Travis Howell | 2007-05-09 15:36:05 +0000 |
commit | 20bf83a2ce1c19e81cd486b4af3b7b73bd25e510 (patch) | |
tree | 058454d1570cad4d4eeb6271eee27705d0578c6f /engines/agos/agos.cpp | |
parent | 85082dc8a00b91689f2ab11494e9bdc1bed71578 (diff) | |
download | scummvm-rg350-20bf83a2ce1c19e81cd486b4af3b7b73bd25e510.tar.gz scummvm-rg350-20bf83a2ce1c19e81cd486b4af3b7b73bd25e510.tar.bz2 scummvm-rg350-20bf83a2ce1c19e81cd486b4af3b7b73bd25e510.zip |
Imrproved support for Elvira 1/2 and Waxworks.
svn-id: r26792
Diffstat (limited to 'engines/agos/agos.cpp')
-rw-r--r-- | engines/agos/agos.cpp | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 78634c81e2..b3e615bfec 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -199,6 +199,9 @@ AGOSEngine::AGOSEngine(OSystem *syst) _copyPartialMode = 0; _fastMode = 0; _useBackGround = 0; + + _oldDrawMethod = 0; + _backFlag = 0; _debugMode = 0; _startMainScript = false; @@ -291,6 +294,7 @@ AGOSEngine::AGOSEngine(OSystem *syst) _leftButtonDown = 0; _rightButtonDown = 0; + _clickOnly = 0; _noRightClick = false; _leftButton = 0; @@ -477,6 +481,17 @@ AGOSEngine::AGOSEngine(OSystem *syst) _backBuf = 0; _scaleBuf = 0; + _window3Flag = 0; + _window4Flag = 0; + _window6Flag = 0; + _window4BackScn = 0; + _window6BackScn = 0; + + _moveXMin = 0; + _moveYMin = 0; + _moveXMax = 0; + _moveYMax = 0; + _vc10BasePtrOld = 0; memcpy (_hebrewCharWidths, "\x5\x5\x4\x6\x5\x3\x4\x5\x6\x3\x5\x5\x4\x6\x5\x3\x4\x6\x5\x6\x6\x6\x5\x5\x5\x6\x5\x6\x6\x6\x6\x6", 32); @@ -511,6 +526,12 @@ int AGOSEngine::init() { return -1; } + // TODO: Enable for Simon the Sorcerer 1/2 when complete + if (getGameType() == GType_WW || getGameType() == GType_ELVIRA2 || + getGameType() == GType_ELVIRA1) { + _oldDrawMethod = true; + } + if (getGameId() == GID_DIMP) { _screenWidth = 496; _screenHeight = 400; @@ -562,9 +583,25 @@ int AGOSEngine::init() { // allocate buffers _backGroundBuf = (byte *)calloc(_screenWidth * _screenHeight, 1); _frontBuf = (byte *)calloc(_screenWidth * _screenHeight, 1); - _backBuf = (byte *)calloc(_screenWidth * _screenHeight, 1); - if (getGameType() == GType_FF || getGameType() == GType_PP) + + if (getGameType() == GType_FF || getGameType() == GType_PP) { _scaleBuf = (byte *)calloc(_screenWidth * _screenHeight, 1); + } + + if (!_oldDrawMethod) { + _backBuf = (byte *)calloc(_screenWidth * _screenHeight, 1); + } else { + if (getGameType() == GType_SIMON2) { + _window4BackScn = (byte *)calloc(_screenWidth * _screenHeight, 1); + } else if (getGameType() == GType_SIMON1) { + _window4BackScn = (byte *)calloc(_screenWidth * 134, 1); + } else if (getGameType() == GType_WW || getGameType() == GType_ELVIRA2) { + _window4BackScn = (byte *)calloc(224 * 127, 1); + } else if (getGameType() == GType_ELVIRA1) { + _window4BackScn = (byte *)calloc(224 * 127, 1); + _window6BackScn = (byte *)calloc(48 * 80, 1); + } + } setupGame(); @@ -851,6 +888,9 @@ AGOSEngine::~AGOSEngine() { free(_backBuf); free(_scaleBuf); + free(_window4BackScn); + free(_window6BackScn); + free(_variableArray); free(_variableArray2); |