diff options
author | Benjamin Haisch | 2008-08-12 12:28:28 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-20 22:43:05 +0100 |
commit | f0c9e489feeed8df564e5eadb32a730ec21e35ba (patch) | |
tree | 3ccb8339fd67176eead23e1d68ae554ba8f3d0eb /engines/toltecs | |
parent | d561cb7ae39ec7119c62aa24a093c32d4872a353 (diff) | |
download | scummvm-rg350-f0c9e489feeed8df564e5eadb32a730ec21e35ba.tar.gz scummvm-rg350-f0c9e489feeed8df564e5eadb32a730ec21e35ba.tar.bz2 scummvm-rg350-f0c9e489feeed8df564e5eadb32a730ec21e35ba.zip |
TOLTECS: Minor cleanup.
Diffstat (limited to 'engines/toltecs')
-rw-r--r-- | engines/toltecs/toltecs.cpp | 37 | ||||
-rw-r--r-- | engines/toltecs/toltecs.h | 5 |
2 files changed, 10 insertions, 32 deletions
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp index f1b531f878..d4b1a34cca 100644 --- a/engines/toltecs/toltecs.cpp +++ b/engines/toltecs/toltecs.cpp @@ -98,10 +98,10 @@ int ToltecsEngine::go() { _cameraY = 0; _newCameraX = 0; _newCameraY = 0; - _guiHeight = 26; _cameraHeight = 0; - _yetAnotherX = 0; - + + _guiHeight = 26; + _sceneWidth = 0; _sceneHeight = 0; @@ -280,36 +280,15 @@ void ToltecsEngine::scrollCameraRight(int16 delta) { void ToltecsEngine::updateCamera() { - _yetAnotherX = _newCameraX; - if (_cameraX != _yetAnotherX) { + if (_cameraX != _newCameraX) { //dirtyFullRefresh = -1; + _cameraX = _newCameraX; } - _cameraX = _yetAnotherX; - + if (_cameraY != _newCameraY) { - if (_cameraY < _newCameraY) { - /* - drawRequest.resIndex = -(cameraY - anotherY); - drawRequest.y = cameraHeight + cameraY; - drawRequest.x = cameraX; - drawRequest.flags = 640; - */ - debug(0, "ToltecsEngine::updateCamera() a: (%d, %d, %d, %d)", - -(_cameraY - _newCameraY), _cameraHeight + _cameraY, _cameraX, 640); - //dirtyFullRefresh = -1; - } else { - /* - drawRequest.resIndex = cameraY - anotherY; - drawRequest.y = anotherY; - drawRequest.x = cameraX; - drawRequest.flags = 640; - */ - debug(0, "ToltecsEngine::updateCamera() b: (%d, %d, %d, %d)", - _cameraY - _newCameraY, _newCameraY, _cameraX, 640); - //dirtyFullRefresh = -1; - } + //dirtyFullRefresh = -1; + _cameraY = _newCameraY; } - _cameraY = _newCameraY; debug(0, "ToltecsEngine::checkCamera() _cameraX = %d; _cameraY = %d", _cameraX, _cameraY); diff --git a/engines/toltecs/toltecs.h b/engines/toltecs/toltecs.h index 11ce76715c..3b5bd67cfa 100644 --- a/engines/toltecs/toltecs.h +++ b/engines/toltecs/toltecs.h @@ -109,7 +109,6 @@ public: uint _sceneResIndex; int16 _sceneWidth, _sceneHeight; - //byte _scenePalette[768]; bool _quitGame; int _counter01, _counter02; @@ -119,8 +118,8 @@ public: // TODO: Move camera stuff into own Scene class int16 _cameraX, _cameraY; int16 _newCameraX, _newCameraY; - int16 _guiHeight, _cameraHeight; - int16 _yetAnotherX; + int16 _cameraHeight; + int16 _guiHeight; bool _doSpeech, _doText; |