diff options
author | peter1138 <peter1138@openttd.org> | 2007-07-05 12:23:54 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-07-05 12:23:54 +0000 |
commit | 68c6add8ccd9aa32eb799a433aa8a3b05ec84a57 (patch) | |
tree | 52e0cc5b1e4eb6cf9aed8556873ee6833662e11f /src/hal.h | |
parent | b5079071762021ebfbb66a14eaa598e48d6a3234 (diff) | |
download | openttd-68c6add8ccd9aa32eb799a433aa8a3b05ec84a57.tar.xz |
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
Diffstat (limited to 'src/hal.h')
-rw-r--r-- | src/hal.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/hal.h b/src/hal.h deleted file mode 100644 index ed6564e7d..000000000 --- a/src/hal.h +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ */ - -/** @file hal.h Hardware Abstraction Layer declarations */ - -#ifndef HAL_H -#define HAL_H - -struct HalCommonDriver { - const char *(*start)(const char * const *parm); - void (*stop)(); -}; - -struct HalVideoDriver { - const char *(*start)(const char * const *parm); - void (*stop)(); - void (*make_dirty)(int left, int top, int width, int height); - void (*main_loop)(); - bool (*change_resolution)(int w, int h); - void (*toggle_fullscreen)(bool fullscreen); -}; - -struct HalSoundDriver { - const char *(*start)(const char * const *parm); - void (*stop)(); -}; - -struct HalMusicDriver { - const char *(*start)(const char * const *parm); - void (*stop)(); - - void (*play_song)(const char *filename); - void (*stop_song)(); - bool (*is_song_playing)(); - void (*set_volume)(byte vol); -}; - -extern HalMusicDriver *_music_driver; -extern HalSoundDriver *_sound_driver; -extern HalVideoDriver *_video_driver; - -enum DriverType { - VIDEO_DRIVER = 0, - SOUND_DRIVER = 1, - MUSIC_DRIVER = 2, -}; - -#endif /* HAL_H */ |