diff options
author | Gregory Montoir | 2006-11-15 22:35:45 +0000 |
---|---|---|
committer | Gregory Montoir | 2006-11-15 22:35:45 +0000 |
commit | 24df07d29dfeae8df28b74744f71962eb34686fc (patch) | |
tree | f8a26b7076fc30957a87acec8189689385b14590 /engines/touche | |
parent | f55320f988a481ee7d92bcce39dfcbbf31d4151a (diff) | |
download | scummvm-rg350-24df07d29dfeae8df28b74744f71962eb34686fc.tar.gz scummvm-rg350-24df07d29dfeae8df28b74744f71962eb34686fc.tar.bz2 scummvm-rg350-24df07d29dfeae8df28b74744f71962eb34686fc.zip |
added handler for flag 618 (cursor display on/off) and workaround a palette glitch
svn-id: r24724
Diffstat (limited to 'engines/touche')
-rw-r--r-- | engines/touche/midi.cpp | 6 | ||||
-rw-r--r-- | engines/touche/opcodes.cpp | 15 | ||||
-rw-r--r-- | engines/touche/resource.cpp | 4 | ||||
-rw-r--r-- | engines/touche/touche.cpp | 11 | ||||
-rw-r--r-- | engines/touche/touche.h | 2 |
5 files changed, 30 insertions, 8 deletions
diff --git a/engines/touche/midi.cpp b/engines/touche/midi.cpp index fd8a9c4add..8420a9b7dc 100644 --- a/engines/touche/midi.cpp +++ b/engines/touche/midi.cpp @@ -105,10 +105,12 @@ void MidiPlayer::close() { _driver->setTimerCallback(NULL, NULL); _mutex.unlock(); stop(); - _parser->setMidiDriver(NULL); - delete _parser; + _mutex.lock(); _driver->close(); _driver = 0; + _parser->setMidiDriver(NULL); + delete _parser; + _mutex.unlock(); } void MidiPlayer::send(uint32 b) { diff --git a/engines/touche/opcodes.cpp b/engines/touche/opcodes.cpp index 1a287330d6..b8832799cc 100644 --- a/engines/touche/opcodes.cpp +++ b/engines/touche/opcodes.cpp @@ -411,6 +411,9 @@ void ToucheEngine::op_setFlag() { case 615: _fullRedrawCounter = 1; break; + case 618: + showCursor(val == 0); + break; default: break; } @@ -479,6 +482,18 @@ void ToucheEngine::op_loadRoom() { // _flagsTable[115] = 1; } + if (_currentEpisodeNum == 100 && num == 1 && _currentRoomNum == 2) { + // + // Same problem in script 100... + // + // [021F] (34) LOAD_ROOM(1) + // [xxxx] ... + // [023D] (13) ST[0] = 1 + // [0240] (1E) FLAGS[604] = ST[0] + // [0243] (84) START_PALETTE_FADE_IN(2) + // + _flagsTable[115] = 1; + } res_loadRoom(num); } diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp index 5f70dafa88..5850762848 100644 --- a/engines/touche/resource.cpp +++ b/engines/touche/resource.cpp @@ -411,9 +411,9 @@ void ToucheEngine::res_loadRoom(int num) { const uint32 offsInfo = res_getDataOffset(kResourceTypeRoomInfo, num); _fData.seek(offsInfo); - _fData.readUint16LE(); + _fData.skip(2); const int roomImageNum = _fData.readUint16LE(); - _fData.readUint16LE(); + _fData.skip(2); for (int i = 0; i < 256; ++i) { _fData.read(&_paletteBuffer[i * 4], 3); _paletteBuffer[i * 4 + 3] = 0; diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index d25e5643e4..adb2836ef0 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -227,11 +227,10 @@ void ToucheEngine::writeConfigurationSettings() { void ToucheEngine::mainLoop() { restart(); - _inp_mousePos.x = 640 / 2; - _inp_mousePos.y = 352 / 2; _inp_leftMouseButtonPressed = false; _inp_rightMouseButtonPressed = false; - _system->warpMouse(_inp_mousePos.x, _inp_mousePos.y); + showCursor(false); + setPalette(0, 255, 0, 0, 0); readConfigurationSettings(); @@ -1381,6 +1380,11 @@ void ToucheEngine::drawHitBoxes() { } } +void ToucheEngine::showCursor(bool show) { + debugC(9, kDebugEngine, "ToucheEngine::showCursor()"); + _system->showMouse(show); +} + void ToucheEngine::setCursor(int num) { debugC(9, kDebugEngine, "ToucheEngine::setCursor(%d)", num); _currentCursorObject = num; @@ -1388,7 +1392,6 @@ void ToucheEngine::setCursor(int num) { const int cursorH = 42; res_loadImage(num, _mouseData); _system->setMouseCursor(_mouseData, cursorW, cursorH, cursorW / 2, cursorH / 2, 0); - _system->showMouse(true); } void ToucheEngine::setDefaultCursor(int num) { diff --git a/engines/touche/touche.h b/engines/touche/touche.h index dd37f0bf92..ab86097713 100644 --- a/engines/touche/touche.h +++ b/engines/touche/touche.h @@ -389,6 +389,7 @@ protected: void setKeyCharTalkingFrame(int keyChar); void lockUnlockHitBox(int num, int lock); void drawHitBoxes(); + void showCursor(bool show); void setCursor(int num); void setDefaultCursor(int num); void handleLeftMouseButtonClickOnInventory(); @@ -773,6 +774,7 @@ protected: 615 : room scroll y offset 616 : disable room scrolling 617 : current speech file number + 618 : hide mouse cursor 621 : enable french version "features" 902 : debug/draw walk boxes 911 : load scripts/programs from external files |