1 /*
2     Copyright (C) 2005-2007 Tom Beaumont
3 
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8 
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12     GNU General Public License for more details.
13 
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18 
19 #ifndef __HHOP_SFX_H__
20 #define __HHOP_SFX_H__
21 
22 #include "state.h"
23 
24 #define HHOP_EFFECT_CHANNELS 16
25 #define HHOP_FADE_MUSIC_IN 200
26 #define HHOP_FADE_MUSIC_OUT 400
27 
28 enum
29 {
30 	HHOP_MUSIC_ENDING,        // Ending sequence after clearing all levels.
31 	HHOP_MUSIC_GAME,          // Puzzle mode music.
32 	HHOP_MUSIC_MAP = 1,       // Map screen music.
33 	HHOP_MUSIC_TITLE = 1,     // Title screen music.
34 	HHOP_MUSIC_WIN = 1,       // Victory music after clearing a level.
35 
36 	HHOP_MUSIC_MAX
37 };
38 
39 enum
40 {
41 	HHOP_SOUND_BUILDER,       // Builder generates new tiles.
42 	HHOP_SOUND_COLLAPSE,      // Green or blue walls collapse to floor tiles.
43 	HHOP_SOUND_CRACK,         // Girl steps on an a green or blue tile.
44 	HHOP_SOUND_DEATH,         // Girl falls in water.
45 	HHOP_SOUND_DISINTEGRATE,  // Tile is removed when girl leaves it.
46 	HHOP_SOUND_EXPLODE_BIG,   // Laser hits a laser tile.
47 	HHOP_SOUND_EXPLODE_SMALL, // Laser hits any other tile.
48 	HHOP_SOUND_FLOATER_ENTER, // Girl steps on a floater.
49 	HHOP_SOUND_FLOATER_MOVE,  // Floater moves one tile.
50 	HHOP_SOUND_FOUND_ANTIICE, // Girl picks up anti-ice item.
51 	HHOP_SOUND_FOUND_JUMP,    // Girl picks up jump item.
52 	HHOP_SOUND_ICE,           // Girl slides through ice tile.
53 	HHOP_SOUND_LASER,         // Girl steps on a laser tile.
54 	HHOP_SOUND_LIFT_UP,       // Elevator goes up.
55 	HHOP_SOUND_LIFT_DOWN,     // Elevator goes down.
56 	HHOP_SOUND_SPINNER,       // Spinner tile spins.
57 	HHOP_SOUND_STEP,          // Girl moves one step.
58 	HHOP_SOUND_TRAMPOLINE,    // Girl steps on a trampoline.
59 	HHOP_SOUND_UI_FADE,       // Screen fade begins.
60 	HHOP_SOUND_UI_MENU,       // Menu item activated.
61 	HHOP_SOUND_USED_ANTIICE,  // Girl steps on ice and uses anti-ice.
62 	HHOP_SOUND_USED_JUMP,     // Girl jumps.
63 	HHOP_SOUND_WIN,           // Level is completed.
64 
65 	HHOP_SOUND_MAX
66 };
67 
68 void InitSound(const char* path);
69 void FreeSound();
70 void PlayMusic(int type);
71 void PlaySound(int type);
72 void QueueSound(int type, double time);
73 void ToggleMusic();
74 void ToggleEffects();
75 void UndoSound();
76 void UpdateSound(double time);
77 
78 #endif
79 
80