dont remember
[carveJwlIkooP6JGAAIwe30JlM.git] / audio.h
diff --git a/audio.h b/audio.h
index f70edf5bd783f5fdfe3c9c75d998fb6c3ee63d38..4f735099fb87fddbb8d6f40524c55bc885b5b664 100644 (file)
--- a/audio.h
+++ b/audio.h
@@ -127,8 +127,8 @@ audio_clip audio_ui[] = {
 };
 
 audio_clip audio_music[] = {
-   { .path = "sound/song.ogg", .flags = AUDIO_FLAG_VORBIS },
-   { .path = "sound/skate.ogg", .flags = AUDIO_FLAG_VORBIS },
+   { .path = "sound/song.ogg", .flags = k_audio_format_vorbis },
+   { .path = "sound/skate.ogg", .flags = k_audio_format_vorbis },
 };
 
 #if 0
@@ -384,17 +384,14 @@ VG_STATIC enum audio_sprite_type audio_sample_sprite_random( v3f origin,
 
    world_instance *world = get_active_world();
    
-   if( ray_world( world, pos, (v3f){0.0f,-1.0f,0.0f}, &contact ) )
-   {
-      struct world_material *mat = ray_hit_material( world, &contact );
+   if( ray_world( world, pos, (v3f){0.0f,-1.0f,0.0f}, &contact ) ){
+      struct world_surface *mat = ray_hit_surface( world, &contact );
 
-      if( mat->info.surface_prop == k_surface_prop_grass) 
-      {
+      if( mat->info.surface_prop == k_surface_prop_grass){
          v3_copy( contact.pos, output );
          return k_audio_sprite_type_grass;
       }
-      else
-      {
+      else{
 #if 0
          vg_line( pos, contact.pos, 0xff0000ff );
          vg_line_pt3( contact.pos, 0.3f, 0xff0000ff );