diff options
author | Kamil Zbróg | 2013-11-11 12:00:19 +0000 |
---|---|---|
committer | Kamil Zbróg | 2013-11-11 12:00:19 +0000 |
commit | 87e2229df264c36dd2809eb85544b9377e0ddfd5 (patch) | |
tree | 6afa634584d9f1b2543b02208e3d3c2455ea84d8 /engines/prince | |
parent | bd59732ce20df7d62b74b9a88bf510e4e2305c54 (diff) | |
download | scummvm-rg350-87e2229df264c36dd2809eb85544b9377e0ddfd5.tar.gz scummvm-rg350-87e2229df264c36dd2809eb85544b9377e0ddfd5.tar.bz2 scummvm-rg350-87e2229df264c36dd2809eb85544b9377e0ddfd5.zip |
PRINCE: initroom from debugger
Diffstat (limited to 'engines/prince')
-rw-r--r-- | engines/prince/cursor.cpp | 3 | ||||
-rw-r--r-- | engines/prince/debugger.cpp | 4 | ||||
-rw-r--r-- | engines/prince/debugger.h | 3 | ||||
-rw-r--r-- | engines/prince/prince.cpp | 10 | ||||
-rw-r--r-- | engines/prince/prince.h | 1 |
5 files changed, 12 insertions, 9 deletions
diff --git a/engines/prince/cursor.cpp b/engines/prince/cursor.cpp index 414e7ce397..865ae99cad 100644 --- a/engines/prince/cursor.cpp +++ b/engines/prince/cursor.cpp @@ -44,9 +44,8 @@ bool Cursor::loadFromStream(Common::SeekableReadStream &stream) { _surface = new Graphics::Surface(); _surface->create(w, h, Graphics::PixelFormat::createFormatCLUT8()); - for (int ih = 0; ih < h; ++ih) { + for (int ih = 0; ih < h; ++ih) stream.read(_surface->getBasePtr(0, ih), w); - } return true; } diff --git a/engines/prince/debugger.cpp b/engines/prince/debugger.cpp index e04fa43215..d9264cb02d 100644 --- a/engines/prince/debugger.cpp +++ b/engines/prince/debugger.cpp @@ -146,8 +146,8 @@ bool Debugger::Cmd_ChangeCursor(int argc, const char **argv) { return true; } - int flagNum = strToInt(argv[1]); - _vm->changeCursor(flagNum); + _cursorNr = strToInt(argv[1]); + return true; } diff --git a/engines/prince/debugger.h b/engines/prince/debugger.h index edf89e8197..f3608af81d 100644 --- a/engines/prince/debugger.h +++ b/engines/prince/debugger.h @@ -35,7 +35,8 @@ public: Debugger(PrinceEngine *vm); virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ - uint32 _locationNr; + uint8 _locationNr; + uint8 _cursorNr; private: bool Cmd_DebugLevel(int argc, const char **argv); diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index 53c8684a6d..fdd9219b13 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -269,8 +269,9 @@ bool PrinceEngine::loadLocation(uint16 locationNr) { return true; } -void PrinceEngine::changeCursor(uint16 curId) -{ +void PrinceEngine::changeCursor(uint16 curId) { + _debugger->_cursorNr = curId; + Graphics::Surface *curSurface = NULL; uint16 hotspotX = 0; @@ -583,9 +584,10 @@ void PrinceEngine::mainLoop() { _cameraX = _newCameraX; ++_frameNr; - if (_debugger->_locationNr != _locationNr) { + if (_debugger->_locationNr != _locationNr) loadLocation(_debugger->_locationNr); - } + if (_debugger->_cursorNr != _cursorNr) + changeCursor(_debugger->_cursorNr); } } diff --git a/engines/prince/prince.h b/engines/prince/prince.h index 0da0bcfe71..25fac64435 100644 --- a/engines/prince/prince.h +++ b/engines/prince/prince.h @@ -133,6 +133,7 @@ private: void debugEngine(const char *s, ...); uint16 _locationNr; + uint8 _cursorNr; Common::RandomSource *_rnd; Graphics::BitmapDecoder *_roomBmp; |