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