aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/touche/opcodes.cpp11
-rw-r--r--engines/touche/touche.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/engines/touche/opcodes.cpp b/engines/touche/opcodes.cpp
index 28cb2ddb61..8fc9d66435 100644
--- a/engines/touche/opcodes.cpp
+++ b/engines/touche/opcodes.cpp
@@ -21,6 +21,7 @@
*/
#include "common/stdafx.h"
+#include "common/system.h"
#include "touche/touche.h"
@@ -171,7 +172,7 @@ void ToucheEngine::setupOpcodes() {
/* 0x70 */
&ToucheEngine::op_startMusic,
0,
- 0,
+ &ToucheEngine::op_sleep,
0,
/* 0x74 */
&ToucheEngine::op_delay,
@@ -865,6 +866,14 @@ void ToucheEngine::op_startMusic() {
_newMusicNum = _script.readNextWord();
}
+void ToucheEngine::op_sleep() {
+ debugC(9, kDebugOpcodes, "ToucheEngine::op_sleep()");
+ int16 cycles = _script.readNextWord();
+ if (!_fastMode) {
+ _system->delayMillis(50 * cycles);
+ }
+}
+
void ToucheEngine::op_delay() {
debugC(9, kDebugOpcodes, "ToucheEngine::op_delay()");
int16 delay = _script.readNextWord();
diff --git a/engines/touche/touche.h b/engines/touche/touche.h
index b7caa3723c..d83e667d4c 100644
--- a/engines/touche/touche.h
+++ b/engines/touche/touche.h
@@ -547,6 +547,7 @@ protected:
void op_startAnimation();
void op_setKeyCharTextColor();
void op_startMusic();
+ void op_sleep();
void op_delay();
void op_lockHitBox();
void op_removeItemFromInventory();