breakhack/src/mixer.h

92 lines
1.5 KiB
C
Raw Normal View History

2018-02-16 18:11:26 +01:00
/*
* BreakHack - A dungeone crawler RPG
* Copyright (C) 2018 Linus Probert <linus.probert@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIXER_H_
#define MIXER_H_
#include <stdbool.h>
2018-03-17 09:03:29 +01:00
#include "gamestate.h"
2018-02-15 14:00:59 +01:00
typedef enum Music_t {
MENU_MUSIC,
GAME_MUSIC0,
GAME_MUSIC1,
GAME_MUSIC2,
BOSS_MUSIC0,
2018-02-15 14:00:59 +01:00
LAST_MUSIC
} Music;
typedef enum Fx_t {
CLICK,
2018-02-15 14:00:59 +01:00
SWING0,
SWING1,
SWING2,
2018-03-01 19:46:23 +01:00
SWOOSH,
2018-03-01 06:47:16 +01:00
TRIPPLE_SWING,
2018-02-15 14:00:59 +01:00
SWORD_HIT,
2018-03-01 06:47:16 +01:00
DOUBLE_SWORD_HIT,
TRIPPLE_SWORD_HIT,
2018-02-15 14:00:59 +01:00
BONK,
DEATH,
2018-05-16 15:52:39 +02:00
FALL0,
FALL1,
2018-02-15 14:00:59 +01:00
COIN,
BOTTLE,
BUBBLE0,
BUBBLE1,
BUBBLE2,
EAT,
LEVEL_UP,
NEXT_LEVEL,
SPLAT,
2018-02-16 14:16:21 +01:00
PLAYER_HIT0,
PLAYER_HIT1,
PLAYER_HIT2,
DAGGER_PICKUP,
2018-08-05 15:47:56 +02:00
SLAM,
MAGIC_PICKUP,
2018-08-10 20:09:56 +02:00
CHEST_OPEN,
FADE_IN,
FADE_OUT,
2018-10-27 13:47:44 +02:00
BURST,
LAST_EFFECT
} Fx;
void
mixer_init(void);
2018-02-20 10:45:54 +01:00
bool
mixer_toggle_sound(void);
bool
2018-03-17 09:03:29 +01:00
mixer_toggle_music(GameState*);
2018-02-20 10:45:54 +01:00
void
mixer_play_effect(Fx fx);
2018-02-15 00:02:23 +01:00
void
2018-02-15 14:00:59 +01:00
mixer_play_music(Music);
2018-02-15 00:02:23 +01:00
void
mixer_stop_music(void);
void
mixer_close(void);
#endif // MIXER_H_