2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
#ifndef HAL_H
|
|
|
|
#define HAL_H
|
|
|
|
|
|
|
|
typedef struct {
|
2005-02-05 18:05:42 +00:00
|
|
|
const char *(*start)(const char * const *parm);
|
2005-01-22 20:23:18 +00:00
|
|
|
void (*stop)(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
} HalCommonDriver;
|
|
|
|
|
|
|
|
typedef struct {
|
2005-02-05 18:05:42 +00:00
|
|
|
const char *(*start)(const char * const *parm);
|
2005-01-22 20:23:18 +00:00
|
|
|
void (*stop)(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
void (*make_dirty)(int left, int top, int width, int height);
|
2005-07-29 16:40:29 +00:00
|
|
|
void (*main_loop)(void);
|
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);
|
2004-08-09 17:04:08 +00:00
|
|
|
} HalVideoDriver;
|
|
|
|
|
|
|
|
typedef struct {
|
2005-02-05 18:05:42 +00:00
|
|
|
const char *(*start)(const char * const *parm);
|
2005-01-22 20:23:18 +00:00
|
|
|
void (*stop)(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
} HalSoundDriver;
|
|
|
|
|
|
|
|
typedef struct {
|
2005-02-05 18:05:42 +00:00
|
|
|
const char *(*start)(const char * const *parm);
|
2005-01-22 20:23:18 +00:00
|
|
|
void (*stop)(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
void (*play_song)(const char *filename);
|
2005-01-22 20:23:18 +00:00
|
|
|
void (*stop_song)(void);
|
|
|
|
bool (*is_song_playing)(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
void (*set_volume)(byte vol);
|
|
|
|
} HalMusicDriver;
|
|
|
|
|
|
|
|
VARDEF HalMusicDriver *_music_driver;
|
|
|
|
VARDEF HalSoundDriver *_sound_driver;
|
|
|
|
VARDEF HalVideoDriver *_video_driver;
|
|
|
|
|
|
|
|
enum DriverType {
|
|
|
|
VIDEO_DRIVER = 0,
|
|
|
|
SOUND_DRIVER = 1,
|
|
|
|
MUSIC_DRIVER = 2,
|
|
|
|
};
|
|
|
|
|
2006-08-04 23:33:05 +00:00
|
|
|
void GameLoop(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2005-01-22 20:23:18 +00:00
|
|
|
void CreateConsole(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2006-03-25 09:22:10 +00:00
|
|
|
#if defined(WIN32) || defined(WIN64) || defined(__WATCOMC__)
|
|
|
|
# define FS2OTTD(name) name
|
|
|
|
# define OTTD2FS(name) name
|
|
|
|
#else
|
|
|
|
const char *FS2OTTD(const char *name);
|
|
|
|
const char *OTTD2FS(const char *name);
|
|
|
|
#endif
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
#endif /* HAL_H */
|