diff options
| author | realtradam <[email protected]> | 2023-05-28 17:07:37 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-05-28 17:07:37 -0400 |
| commit | b3c02a644b9412f07c95621385488954c5b98dfc (patch) | |
| tree | 6a33e772a681e772aabb533fa3539a4cb6492d3d /src/bullet.c | |
| parent | f54e3249d5c8fff4f7a64381c6dd7210c81f569a (diff) | |
| parent | f9996cb800be544b64dd871d652eeb8c7870edf2 (diff) | |
| download | TOJam2023-b3c02a644b9412f07c95621385488954c5b98dfc.tar.gz TOJam2023-b3c02a644b9412f07c95621385488954c5b98dfc.zip | |
.
Diffstat (limited to 'src/bullet.c')
| -rw-r--r-- | src/bullet.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bullet.c b/src/bullet.c index 41264ed..77acaa7 100644 --- a/src/bullet.c +++ b/src/bullet.c @@ -6,6 +6,7 @@ #include "rodeo/collision.h" static rodeo_texture_2d_t bullet_texture; +static rodeo_audio_sound_t *pop_sound; //static rodeo_collision_2d_world_t bullet_collision_world; static rodeo_collision_2d_world_t player_bullet_collision_world = {0}; static rodeo_collision_2d_world_t enemy_bullet_collision_world = {0}; @@ -15,12 +16,14 @@ void init_bullets(void) { bullet_texture = rodeo_texture_2d_create_from_path(cstr_lit("assets/bullet.png")); + pop_sound = rodeo_audio_sound_create_from_path(cstr_lit("assets/pop.wav")); } void deinit_bullets(void) { rodeo_texture_2d_destroy(&bullet_texture); + rodeo_audio_sound_destroy(pop_sound); } bullet_t * @@ -148,6 +151,7 @@ bullet_destroy( rodeo_collision_2d_world_item_destroy_by_id(bullet->id); *bullet = *cvec_bullet_t_back(&bullets); cvec_bullet_t_pop(&bullets); + rodeo_audio_sound_play(pop_sound); } void bullet_wall_resolver( |
