2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2007-03-01 01:24:44 +00:00
|
|
|
/** @file hal.h Hardware Abstraction Layer declarations */
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
#ifndef HAL_H
|
|
|
|
#define HAL_H
|
|
|
|
|
2007-03-07 12:11:48 +00:00
|
|
|
struct HalCommonDriver {
|
2005-02-05 18:05:42 +00:00
|
|
|
const char *(*start)(const char * const *parm);
|
2007-03-07 11:47:46 +00:00
|
|
|
void (*stop)();
|
2007-03-07 12:11:48 +00:00
|
|
|
};
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2007-03-07 12:11:48 +00:00
|
|
|
struct HalVideoDriver {
|
2005-02-05 18:05:42 +00:00
|
|
|
const char *(*start)(const char * const *parm);
|
2007-03-07 11:47:46 +00:00
|
|
|
void (*stop)();
|
2004-08-09 17:04:08 +00:00
|
|
|
void (*make_dirty)(int left, int top, int width, int height);
|
2007-03-07 11:47:46 +00:00
|
|
|
void (*main_loop)();
|
2004-08-09 17:04:08 +00:00
|
|
|
bool (*change_resolution)(int w, int h);
|
2005-05-16 16:19:32 +00:00
|
|
|
void (*toggle_fullscreen)(bool fullscreen);
|
2007-03-07 12:11:48 +00:00
|
|
|
};
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2007-03-07 12:11:48 +00:00
|
|
|
struct HalSoundDriver {
|
2005-02-05 18:05:42 +00:00
|
|
|
const char *(*start)(const char * const *parm);
|
2007-03-07 11:47:46 +00:00
|
|
|
void (*stop)();
|
2007-03-07 12:11:48 +00:00
|
|
|
};
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2007-03-07 12:11:48 +00:00
|
|
|
struct HalMusicDriver {
|
2005-02-05 18:05:42 +00:00
|
|
|
const char *(*start)(const char * const *parm);
|
2007-03-07 11:47:46 +00:00
|
|
|
void (*stop)();
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
void (*play_song)(const char *filename);
|
2007-03-07 11:47:46 +00:00
|
|
|
void (*stop_song)();
|
|
|
|
bool (*is_song_playing)();
|
2004-08-09 17:04:08 +00:00
|
|
|
void (*set_volume)(byte vol);
|
2007-03-07 12:11:48 +00:00
|
|
|
};
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2007-01-10 18:56:51 +00:00
|
|
|
extern HalMusicDriver *_music_driver;
|
|
|
|
extern HalSoundDriver *_sound_driver;
|
|
|
|
extern HalVideoDriver *_video_driver;
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
enum DriverType {
|
|
|
|
VIDEO_DRIVER = 0,
|
|
|
|
SOUND_DRIVER = 1,
|
|
|
|
MUSIC_DRIVER = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* HAL_H */
|