equal
deleted
inserted
replaced
1 /* $Id$ */ |
|
2 |
|
3 /** @file hal.h Hardware Abstraction Layer declarations */ |
|
4 |
|
5 #ifndef HAL_H |
|
6 #define HAL_H |
|
7 |
|
8 struct HalCommonDriver { |
|
9 const char *(*start)(const char * const *parm); |
|
10 void (*stop)(); |
|
11 }; |
|
12 |
|
13 struct HalVideoDriver { |
|
14 const char *(*start)(const char * const *parm); |
|
15 void (*stop)(); |
|
16 void (*make_dirty)(int left, int top, int width, int height); |
|
17 void (*main_loop)(); |
|
18 bool (*change_resolution)(int w, int h); |
|
19 void (*toggle_fullscreen)(bool fullscreen); |
|
20 }; |
|
21 |
|
22 struct HalSoundDriver { |
|
23 const char *(*start)(const char * const *parm); |
|
24 void (*stop)(); |
|
25 }; |
|
26 |
|
27 struct HalMusicDriver { |
|
28 const char *(*start)(const char * const *parm); |
|
29 void (*stop)(); |
|
30 |
|
31 void (*play_song)(const char *filename); |
|
32 void (*stop_song)(); |
|
33 bool (*is_song_playing)(); |
|
34 void (*set_volume)(byte vol); |
|
35 }; |
|
36 |
|
37 extern HalMusicDriver *_music_driver; |
|
38 extern HalSoundDriver *_sound_driver; |
|
39 extern HalVideoDriver *_video_driver; |
|
40 |
|
41 enum DriverType { |
|
42 VIDEO_DRIVER = 0, |
|
43 SOUND_DRIVER = 1, |
|
44 MUSIC_DRIVER = 2, |
|
45 }; |
|
46 |
|
47 #endif /* HAL_H */ |
|