projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some challenges to the world map
[carveJwlIkooP6JGAAIwe30JlM.git]
/
world_audio.c
diff --git
a/world_audio.c
b/world_audio.c
index 1e902fad724f3581941a999b25d35dc159cb376e..b33d62fd30ee80d678e214583424037d3e6bb57c 100644
(file)
--- a/
world_audio.c
+++ b/
world_audio.c
@@
-1,12
+1,9
@@
-#ifndef WORLD_AUDIO_C
-#define WORLD_AUDIO_C
-
#include "audio.h"
#include "world_audio.h"
/* finds any active playing in world and fades them out, we can only do this
* while unloading */
#include "audio.h"
#include "world_audio.h"
/* finds any active playing in world and fades them out, we can only do this
* while unloading */
-
static
void world_fadeout_audio( world_instance *world )
+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"
{
if( world->status != k_world_status_unloading ){
vg_fatal_error( "World status must be set to 'unloading', to fadeout"
@@
-29,12
+26,11
@@
static void world_fadeout_audio( world_instance *world )
/*
* Trace out a random point, near the player to try and determine water areas
*/
/*
* Trace out a random point, near the player to try and determine water areas
*/
-static
enum audio_sprite_type world_audio_sample_sprite_random(v3f origin, v3f output)
{
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 };
+ 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 );
v3f pos;
v3_add( chance, origin, pos );
@@
-63,13
+59,13
@@
enum audio_sprite_type world_audio_sample_sprite_random(v3f origin, v3f output)
float dist = fabsf(output[1] - origin[1]);
float dist = fabsf(output[1] - origin[1]);
- if( world->water.enabled && dist<=40.0f )
+ if( world->water.enabled && dist<=40.0f
&& !(world->info.flags&0x2)
)
return k_audio_sprite_type_water;
else
return k_audio_sprite_type_none;
}
return k_audio_sprite_type_water;
else
return k_audio_sprite_type_none;
}
-
static
void world_audio_sample_distances( v3f co, int *index, float *value )
+void world_audio_sample_distances( v3f co, int *index, float *value )
{
float inr3 = 0.57735027,
inr2 = 0.70710678118;
{
float inr3 = 0.57735027,
inr2 = 0.70710678118;
@@
-117,7
+113,7
@@
static void world_audio_sample_distances( v3f co, int *index, float *value )
distances[si] = dist;
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,
for( int i=0; i<14; i++ ){
if( distances[i] != 200.0f ){
u32 colours[] = { VG__RED, VG__BLUE, VG__GREEN,
@@
-141,5
+137,3
@@
static void world_audio_sample_distances( v3f co, int *index, float *value )
if( si >= 14 )
si = 0;
}
if( si >= 14 )
si = 0;
}
-
-#endif /* WORLD_AUDIO_C */