projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
camera basis
[carveJwlIkooP6JGAAIwe30JlM.git]
/
audio.h
diff --git
a/audio.h
b/audio.h
index 5eb499a0c44ce2eebfeca0f7a3daba7b0736bf3c..e6e76bdd22d5940a1ffb3beff528485d06b4854a 100644
(file)
--- a/
audio.h
+++ b/
audio.h
@@
-186,10
+186,12
@@
VG_STATIC void audio_ambient_sprite_play( v3f co, audio_clip *clip )
audio_unlock();
}
audio_unlock();
}
+VG_STATIC
+enum audio_sprite_type world_audio_sample_sprite_random(v3f origin, v3f output);
VG_STATIC void audio_ambient_sprites_update( world_instance *world, v3f co )
{
static float accum = 0.0f;
VG_STATIC void audio_ambient_sprites_update( world_instance *world, v3f co )
{
static float accum = 0.0f;
- accum += vg.
fra
me_delta;
+ accum += vg.
ti
me_delta;
if( accum > 0.1f )
accum -= 0.1f;
if( accum > 0.1f )
accum -= 0.1f;
@@
-201,11
+203,13
@@
VG_STATIC void audio_ambient_sprites_update( world_instance *world, v3f co )
if( sprite_type != k_audio_sprite_type_none ){
if( sprite_type == k_audio_sprite_type_grass ){
if( sprite_type != k_audio_sprite_type_none ){
if( sprite_type == k_audio_sprite_type_grass ){
- audio_ambient_sprite_play( sprite_pos, &audio_grass[
rand
()%4] );
+ audio_ambient_sprite_play( sprite_pos, &audio_grass[
vg_randu32
()%4] );
}
else if( sprite_type == k_audio_sprite_type_water ){
}
else if( sprite_type == k_audio_sprite_type_water ){
- if( world->water.enabled )
- audio_ambient_sprite_play( sprite_pos, &audio_water[rand()%6] );
+ if( world->water.enabled ){
+ audio_ambient_sprite_play( sprite_pos,
+ &audio_water[vg_randu32()%6] );
+ }
}
}
}
}
}
}