diff options
| -rw-r--r-- | engines/made/screen.cpp | 7 | ||||
| -rw-r--r-- | engines/made/script.cpp | 9 | ||||
| -rw-r--r-- | engines/made/scriptfuncs.cpp | 5 | 
3 files changed, 6 insertions, 15 deletions
| diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 79d43dad61..6fb7804753 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -358,9 +358,7 @@ void Screen::updateSprites() {  	drawSpriteChannels(_workScreenDrawCtx, 1, 2);  	_vm->_system->copyRectToScreen((const byte*)_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); - -	_vm->_system->updateScreen(); - +	_vm->_screen->updateScreenAndWait(10);  }  void Screen::clearChannels() { @@ -626,14 +624,13 @@ void Screen::show() {  	_fx->run(_visualEffectNum, _workScreen, _palette, _newPalette, _paletteColorCount);  	_visualEffectNum = 0; -	_vm->_system->updateScreen(); -  	if (!_paletteInitialized) {  		memcpy(_newPalette, _palette, _paletteColorCount * 3);  		_oldPaletteColorCount = _paletteColorCount;  		_paletteInitialized = true;  	} +	updateScreenAndWait(10);  }  void Screen::flash(int flashCount) { diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 79f93f3b23..4c3bff77c3 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -144,9 +144,6 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) {  	_codeIp = _codeBase;  	while (!_vm->shouldQuit()) { - -		_vm->handleEvents(); -  		byte opcode = readByte();  		if (opcode >= 1 && opcode <= _commandsMax) { @@ -159,11 +156,7 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) {  		/* We sleep a little after 500 opcodes to reduce the CPU load.  		*/  		if (++opcodeSleepCounter > 500) { -			uint32 startTime = _vm->_system->getMillis(); -			while (_vm->_system->getMillis() < startTime + 5) { -				_vm->handleEvents(); -				_vm->_system->delayMillis(5); -			} +			_vm->_screen->updateScreenAndWait(5);  			opcodeSleepCounter = 0;  		} diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index 77e180628f..5b6ff37905 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -203,11 +203,12 @@ int16 ScriptFunctions::sfShowPage(int16 argc, int16 *argv) {  }  int16 ScriptFunctions::sfPollEvent(int16 argc, int16 *argv) { - -	_vm->_system->updateScreen(); +	_vm->handleEvents(); +	_vm->_screen->updateScreenAndWait(10);  	int16 eventNum = _vm->_eventNum;  	_vm->_eventNum = 0; +  	return eventNum;  } | 
