mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 13:42:02 +00:00
FREESCAPE: fixes for driller demo
This commit is contained in:
parent
2c40ad1b12
commit
51b9f6f705
@ -40,12 +40,19 @@ void FreescapeEngine::generateDemoInput() {
|
||||
|
||||
if (_currentDemoInputCode >= 0x16 && _currentDemoInputCode <= 0x1a) {
|
||||
event = decodeDOSMouseEvent(_currentDemoInputCode, _currentDemoInputRepetition);
|
||||
|
||||
Common::Point resolution = _gfx->nativeResolution();
|
||||
event.mouse.x = resolution.x * event.mouse.x / _screenW;
|
||||
event.mouse.y = resolution.y * event.mouse.y / _screenH ;
|
||||
|
||||
_demoEvents.push_back(event);
|
||||
g_system->delayMillis(10);
|
||||
_currentDemoInputRepetition = 0;
|
||||
} else if (_currentDemoInputCode == 0x7f) {
|
||||
// NOP
|
||||
_currentDemoInputRepetition--;
|
||||
} else if (_currentDemoInputCode == 0x0) {
|
||||
_forceEndGame = true;
|
||||
} else {
|
||||
event = Common::Event();
|
||||
event.type = Common::EVENT_KEYDOWN;
|
||||
|
@ -756,7 +756,8 @@ void DrillerEngine::initGameState() {
|
||||
|
||||
bool DrillerEngine::checkIfGameEnded() {
|
||||
if (isDemo() && _demoMode)
|
||||
return (_demoData[_demoIndex + 1] == 0x5f);
|
||||
if (_demoData[_demoIndex + 1] == 0x5f)
|
||||
return true;
|
||||
|
||||
if (_countdown <= 0) {
|
||||
insertTemporaryMessage(_messagesList[14], _countdown - 2);
|
||||
@ -800,12 +801,16 @@ bool DrillerEngine::checkIfGameEnded() {
|
||||
|
||||
if (_forceEndGame) {
|
||||
_forceEndGame = false;
|
||||
insertTemporaryMessage(_messagesList[18], _countdown - 2);
|
||||
drawFrame();
|
||||
_gfx->flipBuffer();
|
||||
g_system->updateScreen();
|
||||
g_system->delayMillis(2000);
|
||||
gotoArea(127, 0);
|
||||
if (isDemo())
|
||||
return true;
|
||||
else {
|
||||
insertTemporaryMessage(_messagesList[18], _countdown - 2);
|
||||
drawFrame();
|
||||
_gfx->flipBuffer();
|
||||
g_system->updateScreen();
|
||||
g_system->delayMillis(2000);
|
||||
gotoArea(127, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (_currentArea->getAreaID() == 127) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user