audio: refactor audio asset loading, add crit sound

This commit is contained in:
A.M. Rowsell 2026-04-06 17:51:07 -04:00
commit a315b14dd1
Signed by: amr
GPG key ID: E0879EDBDB0CA7B1
5 changed files with 66 additions and 44 deletions

View file

@ -2,6 +2,7 @@
#define COMMON_H
#include "settings.h"
#include <raylib.h>
// Tile types
typedef enum { TILE_WALL, TILE_FLOOR, TILE_STAIRS } TileType;
@ -112,6 +113,15 @@ typedef struct {
StatusEffectType effect_type; // used to pick color for proc labels
} FloatingText;
// AudioAssets
typedef struct {
Sound attack1, attack2, attack3;
Sound pickup;
Sound staircase;
Sound dodge1, dodge2, dodge3;
Sound crit;
} AudioAssets;
// GameState - encapsulates all game state for testability and save/load
typedef struct {
Player player;
@ -139,6 +149,8 @@ typedef struct {
int screen_shake; // frames of screen shake remaining
int shake_x;
int shake_y;
AudioAssets sounds;
} GameState;
#endif // COMMON_H