aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorOliver Kiehl2002-11-17 15:15:26 +0000
committerOliver Kiehl2002-11-17 15:15:26 +0000
commit5f4d594150976e9624ca0c93e92d1bb07970876f (patch)
treea1619a3bf6ecbf87ac1b19ff93a0c82297edd5cb /simon
parentca9101ea6e0474194fb088b647de45b689ac8641 (diff)
downloadscummvm-rg350-5f4d594150976e9624ca0c93e92d1bb07970876f.tar.gz
scummvm-rg350-5f4d594150976e9624ca0c93e92d1bb07970876f.tar.bz2
scummvm-rg350-5f4d594150976e9624ca0c93e92d1bb07970876f.zip
implemented quit_if_user_presses_y()
svn-id: r5589
Diffstat (limited to 'simon')
-rw-r--r--simon/items.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/simon/items.cpp b/simon/items.cpp
index 321b558016..36c064aec4 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -775,7 +775,7 @@ int SimonState::runScript()
break;
case 135:{
- warning("Quit if user presses Y unimplemented");
+ o_quit_if_user_presses_y();
}
break;
@@ -1479,6 +1479,20 @@ void SimonState::o_177()
}
}
+void SimonState::o_quit_if_user_presses_y()
+{
+ OSystem::Event event;
+
+ for (;;) {
+ _system->poll_event(&event);
+ if (event.event_code == OSystem::EVENT_KEYDOWN)
+ if (event.kbd.keycode == 'y')
+ _system->quit();
+ else if (event.kbd.keycode == 'n')
+ break;
+ delay(10);
+ }
+}
void SimonState::o_unk_137(uint fcs_index)
{