diff --git a/engines/prince/cursor.cpp b/engines/prince/cursor.cpp index 414e7ce39737..865ae99cadd3 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 e04fa432152f..d9264cb02dba 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 edf89e81978d..f3608af81d0b 100644 --- a/engines/prince/debugger.h +++ b/engines/prince/debugger.h @@ -35,7 +35,8 @@ class Debugger : public GUI::Debugger { 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 53c8684a6d89..fdd9219b13d4 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 0da0bcfe719e..25fac64435bb 100644 --- a/engines/prince/prince.h +++ b/engines/prince/prince.h @@ -133,6 +133,7 @@ class PrinceEngine : public Engine { void debugEngine(const char *s, ...); uint16 _locationNr; + uint8 _cursorNr; Common::RandomSource *_rnd; Graphics::BitmapDecoder *_roomBmp;