Files
@ r4346:fa4ac6b6f852
Branch filter:
Location: cpp/openttd-patchpack/source/hal.h - annotation
r4346:fa4ac6b6f852
1.2 KiB
text/x-c
(svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
-Codechange: use IsValidXXX where ever possible
Note: both changes to prepare for new pool system, which needs those changes.
For every pool there are 2 ugly lines, which will be removed when done
implementing new pool system.
Based on FS#13 by blathijs, partly implemented.
-Codechange: use IsValidXXX where ever possible
Note: both changes to prepare for new pool system, which needs those changes.
For every pool there are 2 ugly lines, which will be removed when done
implementing new pool system.
Based on FS#13 by blathijs, partly implemented.
r2186:5ee653b1b5e1 r2186:5ee653b1b5e1 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r1301:421c809ec9f3 r1093:18f56ef2d029 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r1301:421c809ec9f3 r1093:18f56ef2d029 r0:d63b455452f6 r2228:cc9d133c0351 r0:d63b455452f6 r1829:3dfbdb5a9e01 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r1301:421c809ec9f3 r1093:18f56ef2d029 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r1301:421c809ec9f3 r1093:18f56ef2d029 r0:d63b455452f6 r0:d63b455452f6 r1093:18f56ef2d029 r1093:18f56ef2d029 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r4217:96db9b185b25 r0:d63b455452f6 r1093:18f56ef2d029 r0:d63b455452f6 r3329:ddd8de7d4298 r3329:ddd8de7d4298 r3329:ddd8de7d4298 r3329:ddd8de7d4298 r3329:ddd8de7d4298 r3329:ddd8de7d4298 r3329:ddd8de7d4298 r3329:ddd8de7d4298 r0:d63b455452f6 | /* $Id$ */
#ifndef HAL_H
#define HAL_H
typedef struct {
const char *(*start)(const char * const *parm);
void (*stop)(void);
} HalCommonDriver;
typedef struct {
const char *(*start)(const char * const *parm);
void (*stop)(void);
void (*make_dirty)(int left, int top, int width, int height);
void (*main_loop)(void);
bool (*change_resolution)(int w, int h);
void (*toggle_fullscreen)(bool fullscreen);
} HalVideoDriver;
typedef struct {
const char *(*start)(const char * const *parm);
void (*stop)(void);
} HalSoundDriver;
typedef struct {
const char *(*start)(const char * const *parm);
void (*stop)(void);
void (*play_song)(const char *filename);
void (*stop_song)(void);
bool (*is_song_playing)(void);
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,
};
void GameLoop(void);
void CreateConsole(void);
#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
#endif /* HAL_H */
|