]> git.itanic.dy.fi Git - sdl-planets/commitdiff
poll_events: Add support for stopping the simulation
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Sun, 18 Apr 2010 10:26:31 +0000 (13:26 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Sun, 18 Apr 2010 10:28:04 +0000 (13:28 +0300)
This makes it possible to for example inspect the tree structure in a
stopped simulation.

Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
main.c

diff --git a/main.c b/main.c
index 8be3330f3128802b82ff307062f516478ad39196..f2a012cf50d24036580df98f060e70e9c8e776aa 100644 (file)
--- a/main.c
+++ b/main.c
@@ -123,6 +123,9 @@ static int poll_events(struct sim_status *status, double time)
                        case SDLK_4:
                                status->time_scale = 30;
                                break;
+                       case SDLK_0:
+                               status->time_scale = 0;
+                               break;
                        case SDLK_t:
                                status->tracers_enabled =
                                        !status->tracers_enabled;