forked from NotAShelf/rogged
audio: refactor audio asset loading, add crit sound
This commit is contained in:
parent
23dead8c0d
commit
a315b14dd1
5 changed files with 66 additions and 44 deletions
12
src/common.h
12
src/common.h
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue