+/*
+ * Copyright 2021-2022 (C) Mount0 Software, Harry Godden - All Rights Reserved
+ * -----------------------------------------------------------------------------
+ *
+ * Player audio
+ *
+ * -----------------------------------------------------------------------------
+ */
+
#ifndef PLAYER_AUDIO_H
#define PLAYER_AUDIO_H
{
struct player_phys *phys = &player.phys;
- static int _ding = 0;
-
- int last = _ding;
- _ding = glfwGetKey(vg_window, GLFW_KEY_C);
-
- int trigger_ding = 0;
- if( _ding && !last )
- trigger_ding = 1;
-
static int _air = 0;
int l2 = _air;
float *cam = player.camera[3],
*pos = phys->rb.co;
- if( trigger_ding )
- audio_player_playclip( &audio_player_extra, &audio_ding );
-
audio_player_set_position( &audio_player0, phys->rb.co );
audio_player_set_position( &audio_player1, phys->rb.co );
audio_player_set_position( &audio_player2, phys->rb.co );
audio_player_set_position( &audio_player_gate, world.render_gate_pos );
+ audio_player_set_vol( &audio_player_gate, 5.0f );
v3_sub( phys->rb.co, player.camera[3], delta );
v3_normalize( delta );
audio_player_set_vol( &audio_player0, 0.0f );
audio_player_set_vol( &audio_player1, 0.0f );
audio_player_set_vol( &audio_player2, 0.0f );
+ audio_player_set_vol( &audio_player3, 0.0f );
int walk_phase = 0;
if( vg_fractf(player.walk_timer) > 0.5f )