X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=fishladder.c;h=e024fca71987265a050db88d2a0be6b4f99317de;hb=f8e80fde4a84a6b990ec17c067b2a95847ae744c;hp=dec99e2c266da40d93d327e18c01164bcdf7421c;hpb=5f7656147f3566b32e4eb8c5dffd554e233bdefb;p=fishladder.git diff --git a/fishladder.c b/fishladder.c index dec99e2..e024fca 100644 --- a/fishladder.c +++ b/fishladder.c @@ -597,6 +597,7 @@ void vg_update(void) else world.selected = -1; } + else world.selected = -1; // Simulation stop/start if( vg_get_button_down("go") ) @@ -611,11 +612,15 @@ void vg_update(void) world.io[i].recv_count = 0; vg_info( "Stopping simulation!\n" ); + + sfx_system_fadeout( &audio_system_balls_rolling, 44100 ); } else { vg_success( "Starting simulation!\n" ); + sfx_set_playrnd( &audio_rolls, &audio_system_balls_rolling, 0, 1 ); + world.simulating = 1; world.num_fishes = 0; world.sim_frame = 0; @@ -636,7 +641,8 @@ void vg_update(void) { while( world.sim_frame < (int)((vg_time-world.sim_start)*2.0f) ) { - vg_info( "frame: %u\n", world.sim_frame ); + //vg_info( "frame: %u\n", world.sim_frame ); + sfx_set_playrnd( &audio_random, &audio_system_balls_switching, 0, 9 ); for( int i = 0; i < arrlen( world.io ); i ++ ) { @@ -755,7 +761,10 @@ void vg_update(void) fish->alive = 0; else if( cell_entry->config == k_cell_type_split ) + { + sfx_set_playrnd( &audio_splitter, &audio_system_balls_important, 0, 1 ); cell_entry->state |= FLAG_FLIP_ROTATING; + } } world.sim_frame ++; @@ -1093,4 +1102,5 @@ void vg_render(void) void vg_ui(void) { //ui_test(); + sfx_internal_debug_overlay(); }