diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-28 16:27:07 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-28 16:27:07 +0200 |
| commit | f2522c04446bb4bd597a8625f9398e67ff957565 (patch) | |
| tree | bd5e7506a434978296397b9d0a0e95bf3ae04d60 /include | |
| parent | 1ac22220f6077b3367456384b4bb563f1c5c2d29 (diff) | |
more sounds
Diffstat (limited to 'include')
| -rw-r--r-- | include/asset_defs.h | 1 | ||||
| -rw-r--r-- | include/audio.h | 2 | ||||
| -rw-r--r-- | include/zombies.h | 6 |
3 files changed, 9 insertions, 0 deletions
diff --git a/include/asset_defs.h b/include/asset_defs.h index 63f46bd..acca89e 100644 --- a/include/asset_defs.h +++ b/include/asset_defs.h @@ -42,6 +42,7 @@ Mix_Chunk* wav_throwable_bounce; Mix_Chunk* wav_shoot_mp5; Mix_Chunk* wav_reload_mp5; +Mix_Chunk* wav_impact_zombie; Mix_Chunk* wav_impact_wood; Mix_Chunk* wav_error; diff --git a/include/audio.h b/include/audio.h index 47cd10e..38543dd 100644 --- a/include/audio.h +++ b/include/audio.h @@ -20,12 +20,14 @@ typedef struct t_audio_event { u32 playerid; vec3f position; object_type obj; + zombie_type zombie; } audio_event; #define MAX_AUDIO_EVENTS 20 audio_event audio_events[MAX_AUDIO_EVENTS] = {0}; int max_audio_events = MAX_AUDIO_EVENTS; +void add_zombie_audio_event_to_queue(audio_event_type event, zombie_type zombie, u32 playerid, vec3f position); void add_object_audio_event_to_queue(audio_event_type event, object_type obj, u32 playerid, vec3f position); void add_audio_event_to_queue(audio_event_type event, u32 playerid, vec3f position); void play_sounds_in_queue(); diff --git a/include/zombies.h b/include/zombies.h index 0c18bef..eeadaaf 100644 --- a/include/zombies.h +++ b/include/zombies.h @@ -8,6 +8,11 @@ #include "pathfinding.h" #include "sprite.h" +typedef enum t_zombie_type { + ZOMBIE_TYPE_NONE, + ZOMBIE_TYPE_NORMAL, +} zombie_type; + typedef struct t_zombie { bool alive; float health; @@ -18,6 +23,7 @@ typedef struct t_zombie { float time_since_last_path; pathfinding_request request; vec2f next2tiles[2]; + zombie_type type; } zombie; typedef struct t_spawner { |
