// Fish ticks
if( world.simulating )
{
- while( world.sim_frame < (int)((vg_time-world.sim_start)*20.0f) )
+ while( world.sim_frame < (int)((vg_time-world.sim_start)*200.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, 5 );
for( int i = 0; i < arrlen( world.io ); i ++ )
u32 ch, end, cur;
u32 flags;
- int is_queued;
-
// Effects
u32 fadeout, fadeout_current;
{
MUTEX_LOCK( sfx_mux_t01 );
- if( sys->is_queued )
+ if( sfx_q_len >= SFX_MAX_SYSTEMS )
{
MUTEX_UNLOCK( sfx_mux_t01 );
-
- vg_warn( "Sfx system locked for writing.. Spam is being created!\n" );
+ vg_warn( "Warning: No free space in sound queue\n" );
return 0;
}
- sys->is_queued = 1;
return 1;
}
// Mark change to be uploaded to queue system
static int sfx_save( sfx_system *sys )
{
- if( sfx_q_len >= SFX_MAX_SYSTEMS )
- {
- vg_error( "Warning: No free space in sound queue\n" );
-
- MUTEX_UNLOCK( sfx_mux_t01 );
- return 0;
- }
-
// Mark change in queue
sfx_q[ sfx_q_len ++ ] = sys;
while( sfx_q_len --> 0 )
{
sfx_system *src = sfx_q[sfx_q_len];
- src->is_queued = 0;
-
sfx_system *clone;
// This is a 'new' sound if thread_clone not set.
// Draw audio stack
for( int i = 0; i < num_systems; i ++ )
{
- ui_global_ctx.cursor[2] = 300;
- ui_global_ctx.cursor[3] = 25;
+ ui_global_ctx.cursor[2] = 150;
+ ui_global_ctx.cursor[3] = 12;
u32 alpha = (infos[i].flags & SFX_FLAG_GHOST)? 0x44000000: 0xff000000;
ui_new_node( &ui_global_ctx );
- {
+ {
ui_fill_rect( &ui_global_ctx, ui_global_ctx.cursor, 0x00333333 | alpha );
- ui_global_ctx.cursor[2] = (int)(((float)infos[i].cursor / (float)infos[i].length) * 300.0f);
+ ui_rect_pad( ui_global_ctx.cursor, 2 );
+ ui_global_ctx.cursor[2] = (int)(((float)infos[i].cursor / (float)infos[i].length) * 150.0f);
ui_fill_rect( &ui_global_ctx, ui_global_ctx.cursor, 0x77ffffff );
- ui_text( &ui_global_ctx, infos[i].name, 2, 0 );
+ ui_text( &ui_global_ctx, infos[i].name, 1, 0 );
}
ui_end_down( &ui_global_ctx );
ui_global_ctx.cursor[1] += 1;