minor changes to be on track with vg revision
[carveJwlIkooP6JGAAIwe30JlM.git] / world_audio.c
index 8a167e402b4889c753a2489be87eeead1a58c172..826e20a4ce708a80fc33a15050b21d79ec268e4f 100644 (file)
@@ -6,7 +6,7 @@
 
 /* finds any active playing in world and fades them out, we can only do this 
  * while unloading */
-VG_STATIC void world_fadeout_audio( world_instance *world )
+static void world_fadeout_audio( world_instance *world )
 {
    if( world->status != k_world_status_unloading ){
       vg_fatal_error( "World status must be set to 'unloading', to fadeout"
@@ -29,12 +29,11 @@ VG_STATIC void world_fadeout_audio( world_instance *world )
 /*
  * Trace out a random point, near the player to try and determine water areas
  */
-VG_STATIC 
-enum audio_sprite_type world_audio_sample_sprite_random(v3f origin, v3f output)
-{
-   v3f chance = { (vg_randf64()-0.5f) * 30.0f, 
-                  8.0f,
-                  (vg_randf64()-0.5f) * 30.0f };
+static 
+enum audio_sprite_type world_audio_sample_sprite_random(v3f origin, v3f output){
+   v3f chance = { (vg_randf64(&vg.rand)-0.5f) * 30.0f, 
+                  8,
+                  (vg_randf64(&vg.rand)-0.5f) * 30.0f };
    
    v3f pos;
    v3_add( chance, origin, pos );
@@ -69,7 +68,7 @@ enum audio_sprite_type world_audio_sample_sprite_random(v3f origin, v3f output)
       return k_audio_sprite_type_none;
 }
 
-VG_STATIC void world_audio_sample_distances( v3f co, int *index, float *value )
+static void world_audio_sample_distances( v3f co, int *index, float *value )
 {
    float inr3 = 0.57735027,
          inr2 = 0.70710678118;
@@ -117,7 +116,7 @@ VG_STATIC void world_audio_sample_distances( v3f co, int *index, float *value )
 
    distances[si] = dist;
 
-   if( vg_audio.debug_ui && vg_lines.draw ){
+   if( vg_audio.debug_ui && vg_lines.enabled ){
       for( int i=0; i<14; i++ ){
          if( distances[i] != 200.0f ){
             u32 colours[] = { VG__RED, VG__BLUE, VG__GREEN,