Files @ r6250:8f26e7e58ba0
Branch filter:

Location: cpp/openttd-patchpack/source/src/hal.h

miham
(svn r9054) -Update: WebTranslator2 update to 2007-03-07 18:39:14
catalan - 2 fixed by arnaullv (2)
croatian - 95 fixed, 34 changed by Ydobon (129)
czech - 1 fixed, 3 deleted, 109 changed by Hadez (113)
danish - 4 fixed by ThomasA (4)
dutch - 2 fixed by habell (2)
esperanto - 5 fixed by LaPingvino (5)
french - 2 fixed by glx (2)
german - 1 fixed by Neonox (1)
hungarian - 1 fixed by miham (1)
italian - 1 fixed by sidew (1)
japanese - 14 fixed by ickoonite (14)
korean - 9 fixed by Nios (9)
norwegian_nynorsk - 1 fixed by Eikje3 (1)
polish - 2 fixed by meush (2)
simplified_chinese - 5 fixed by Fishingsnow (5)
slovenian - 1 fixed by Necrolyte (1)
spanish - 5 fixed by eusebio (5)
swedish - 5 fixed by daishan (5)
traditional_chinese - 7 fixed by sam0737 (7)
ukrainian - 1 fixed by znikoz (1)
/* $Id$ */

/** @file hal.h Hardware Abstraction Layer declarations */

#ifndef HAL_H
#define HAL_H

struct HalCommonDriver {
	const char *(*start)(const char * const *parm);
	void (*stop)();
};

struct HalVideoDriver {
	const char *(*start)(const char * const *parm);
	void (*stop)();
	void (*make_dirty)(int left, int top, int width, int height);
	void (*main_loop)();
	bool (*change_resolution)(int w, int h);
	void (*toggle_fullscreen)(bool fullscreen);
};

struct HalSoundDriver {
	const char *(*start)(const char * const *parm);
	void (*stop)();
};

struct HalMusicDriver {
	const char *(*start)(const char * const *parm);
	void (*stop)();

	void (*play_song)(const char *filename);
	void (*stop_song)();
	bool (*is_song_playing)();
	void (*set_volume)(byte vol);
};

extern HalMusicDriver *_music_driver;
extern HalSoundDriver *_sound_driver;
extern HalVideoDriver *_video_driver;

enum DriverType {
	VIDEO_DRIVER = 0,
	SOUND_DRIVER = 1,
	MUSIC_DRIVER = 2,
};

#endif /* HAL_H */