aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
{