return world.buttons[ k_world_button_sim ].pressed;
}
+static void clear_animation_flags(void)
+{
+ for( int i = 0; i < world.w*world.h; i ++ )
+ world.data[ i ].state &= ~(FLAG_FLIP_FLOP|FLAG_FLIP_ROTATING);
+}
+
static void simulation_stop(void)
{
world.buttons[ k_world_button_sim ].pressed = 0;
world.num_fishes = 0;
world.sim_frame = 0;
world.sim_run = 0;
+ world.frame_lerp = 0.0f;
io_reset();
sfx_system_fadeout( &audio_system_balls_rolling, 44100 );
+ clear_animation_flags();
+
vg_info( "Stopping simulation!\n" );
}
+static void simulation_start(void)
+{
+ vg_success( "Starting simulation!\n" );
+
+ sfx_set_playrnd( &audio_rolls, &audio_system_balls_rolling, 0, 1 );
+
+ world.num_fishes = 0;
+ world.sim_frame = 0;
+ world.sim_run = 0;
+
+ world.sim_delta_speed = 2.5f;
+ world.sim_delta_ref = vg_time;
+ world.sim_internal_ref = 0.0f;
+ world.sim_internal_time = 0.0f;
+ world.pause_offset_target = 0.0f;
+
+ world.sim_target = 0;
+
+ clear_animation_flags();
+
+ io_reset();
+}
+
static int world_check_pos_ok( v2i co )
{
return (co[0] < 2 || co[0] >= world.w-2 || co[1] < 2 || co[1] >= world.h-2)? 0: 1;
}
}*/
-static void simulation_start(void)
-{
- vg_success( "Starting simulation!\n" );
-
- sfx_set_playrnd( &audio_rolls, &audio_system_balls_rolling, 0, 1 );
-
- world.num_fishes = 0;
- world.sim_frame = 0;
- world.sim_run = 0;
-
- world.sim_delta_speed = 2.5f;
- world.sim_delta_ref = vg_time;
- world.sim_internal_ref = 0.0f;
- world.sim_internal_time = 0.0f;
- world.pause_offset_target = 0.0f;
-
- world.sim_target = 0;
-
- for( int i = 0; i < world.w*world.h; i ++ )
- world.data[ i ].state &= ~FLAG_FLIP_FLOP;
-
- io_reset();
-}
-
static void wbutton_run( enum e_world_button btn_name )
{
static v3f button_colours[] = {