Last change
on this file since 57 was
57,
checked in by Sam Hocevar, 14 years ago
|
- Move each header to the same directory as its corresponding source, to
get a better idea of which files are likely to export symbols.
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | * Abuse - dark 2D side-scrolling platform game |
---|
3 | * Copyright (c) 1995 Crack dot Com |
---|
4 | * |
---|
5 | * This software was released into the Public Domain. As with most public |
---|
6 | * domain software, no warranty is made or implied by Crack dot Com or |
---|
7 | * Jonathan Clark. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef __SOUND_HPP_ |
---|
11 | #define __SOUND_HPP_ |
---|
12 | |
---|
13 | /* options are passed via command line */ |
---|
14 | |
---|
15 | #define SFX_INITIALIZED 1 |
---|
16 | #define MUSIC_INITIALIZED 2 |
---|
17 | |
---|
18 | int sound_init(int argc, char **argv); |
---|
19 | void sound_uninit(); |
---|
20 | void print_sound_options(); // print the options avaible for sound |
---|
21 | |
---|
22 | class sound_effect |
---|
23 | { |
---|
24 | long size; |
---|
25 | void *data; |
---|
26 | public : |
---|
27 | sound_effect(char *filename); |
---|
28 | void play(int volume=127, int pitch=128, int panpot=128); |
---|
29 | ~sound_effect(); |
---|
30 | } ; |
---|
31 | |
---|
32 | |
---|
33 | class song |
---|
34 | { |
---|
35 | char *Name; |
---|
36 | unsigned char *data; |
---|
37 | unsigned long song_id; |
---|
38 | public : |
---|
39 | char const *name() { return Name; } |
---|
40 | song(char const *filename); |
---|
41 | void play(unsigned char volume=127); |
---|
42 | void stop(long fadeout_time=0); // time in ms |
---|
43 | int playing(); |
---|
44 | void set_volume(int volume); |
---|
45 | ~song(); |
---|
46 | } ; |
---|
47 | #endif |
---|
48 | |
---|
49 | |
---|
50 | |
---|
51 | |
---|
52 | |
---|
53 | |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | |
---|
58 | |
---|
Note: See
TracBrowser
for help on using the repository browser.