mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-28 20:55:19 +00:00
Moved cursor state setting (when entering a new room) from Game::loadRoom() to Game::start() (just after running the gate program). This fixes a black cursor bug when the game starts (the cursor should not be even displayed then).
svn-id: r43162
This commit is contained in:
parent
f68ceeb88c
commit
abedc7e9bb
@ -183,6 +183,16 @@ void Game::start() {
|
|||||||
|
|
||||||
// Run the program for the gate the dragon came through
|
// Run the program for the gate the dragon came through
|
||||||
runGateProgram(_newGate);
|
runGateProgram(_newGate);
|
||||||
|
|
||||||
|
// Set cursor state
|
||||||
|
// Need to do this after we set the palette since the cursors use it
|
||||||
|
if (_currentRoom._mouseOn) {
|
||||||
|
debugC(6, kDraciLogicDebugLevel, "Mouse: ON");
|
||||||
|
_vm->_mouse->cursorOn();
|
||||||
|
} else {
|
||||||
|
debugC(6, kDraciLogicDebugLevel, "Mouse: OFF");
|
||||||
|
_vm->_mouse->cursorOff();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mimic the original engine by setting the loop status to Ordinary before
|
// Mimic the original engine by setting the loop status to Ordinary before
|
||||||
@ -614,16 +624,6 @@ void Game::loadRoom(int roomNum) {
|
|||||||
f = _vm->_paletteArchive->getFile(_currentRoom._palette);
|
f = _vm->_paletteArchive->getFile(_currentRoom._palette);
|
||||||
_vm->_screen->setPalette(f->_data, 0, kNumColours);
|
_vm->_screen->setPalette(f->_data, 0, kNumColours);
|
||||||
|
|
||||||
// Set cursor state
|
|
||||||
// Need to do this after we set the palette since the cursors use it
|
|
||||||
if (_currentRoom._mouseOn) {
|
|
||||||
debugC(6, kDraciLogicDebugLevel, "Mouse: ON");
|
|
||||||
_vm->_mouse->cursorOn();
|
|
||||||
} else {
|
|
||||||
debugC(6, kDraciLogicDebugLevel, "Mouse: OFF");
|
|
||||||
_vm->_mouse->cursorOff();
|
|
||||||
}
|
|
||||||
|
|
||||||
// HACK: Create a visible overlay from the walking map so we can test it
|
// HACK: Create a visible overlay from the walking map so we can test it
|
||||||
byte *wlk = new byte[kScreenWidth * kScreenHeight];
|
byte *wlk = new byte[kScreenWidth * kScreenHeight];
|
||||||
memset(wlk, 255, kScreenWidth * kScreenHeight);
|
memset(wlk, 255, kScreenWidth * kScreenHeight);
|
||||||
|
Loading…
Reference in New Issue
Block a user