tron@2186: /* $Id$ */ tron@2186: truelight@0: #ifndef HAL_H truelight@0: #define HAL_H truelight@0: truelight@0: typedef struct { tron@1301: const char *(*start)(const char * const *parm); tron@1093: void (*stop)(void); truelight@0: } HalCommonDriver; truelight@0: truelight@0: typedef struct { tron@1301: const char *(*start)(const char * const *parm); tron@1093: void (*stop)(void); truelight@0: void (*make_dirty)(int left, int top, int width, int height); tron@2228: void (*main_loop)(void); truelight@0: bool (*change_resolution)(int w, int h); Darkvater@1829: void (*toggle_fullscreen)(bool fullscreen); truelight@0: } HalVideoDriver; truelight@0: truelight@0: typedef struct { tron@1301: const char *(*start)(const char * const *parm); tron@1093: void (*stop)(void); truelight@0: } HalSoundDriver; truelight@0: truelight@0: typedef struct { tron@1301: const char *(*start)(const char * const *parm); tron@1093: void (*stop)(void); truelight@0: truelight@0: void (*play_song)(const char *filename); tron@1093: void (*stop_song)(void); tron@1093: bool (*is_song_playing)(void); truelight@0: void (*set_volume)(byte vol); truelight@0: } HalMusicDriver; truelight@0: truelight@0: VARDEF HalMusicDriver *_music_driver; truelight@0: VARDEF HalSoundDriver *_sound_driver; truelight@0: VARDEF HalVideoDriver *_video_driver; truelight@0: truelight@0: enum DriverType { truelight@0: VIDEO_DRIVER = 0, truelight@0: SOUND_DRIVER = 1, truelight@0: MUSIC_DRIVER = 2, truelight@0: }; truelight@0: Darkvater@4217: void GameLoop(void); truelight@0: tron@1093: void CreateConsole(void); truelight@0: truelight@0: #endif /* HAL_H */