|
|
|
@ -63,8 +63,9 @@ void run_gui_simulation(SimulationState* sim) { |
|
|
|
gui_init(); |
|
|
|
gui_init(); |
|
|
|
|
|
|
|
|
|
|
|
bool paused = false; |
|
|
|
bool paused = false; |
|
|
|
double speed_multiplier = 1.0; |
|
|
|
double speed_multiplier = 32.0; |
|
|
|
int physics_steps_per_frame = 100; |
|
|
|
double min_multiplier = 1.0; |
|
|
|
|
|
|
|
int physics_steps_per_frame = 1; |
|
|
|
|
|
|
|
|
|
|
|
printf("\nSimulation started!\n"); |
|
|
|
printf("\nSimulation started!\n"); |
|
|
|
printf("Controls:\n"); |
|
|
|
printf("Controls:\n"); |
|
|
|
@ -87,7 +88,7 @@ void run_gui_simulation(SimulationState* sim) { |
|
|
|
|
|
|
|
|
|
|
|
if (IsKeyPressed(KEY_MINUS) || IsKeyPressed(KEY_KP_SUBTRACT)) { |
|
|
|
if (IsKeyPressed(KEY_MINUS) || IsKeyPressed(KEY_KP_SUBTRACT)) { |
|
|
|
speed_multiplier /= 2.0; |
|
|
|
speed_multiplier /= 2.0; |
|
|
|
if (speed_multiplier < 0.125) speed_multiplier = 0.125; |
|
|
|
if (speed_multiplier < min_multiplier) speed_multiplier = min_multiplier; |
|
|
|
printf("Speed multiplier: %.1fx\n", speed_multiplier); |
|
|
|
printf("Speed multiplier: %.1fx\n", speed_multiplier); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|