X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=55201a9f2fe8d81f9c6ea2c9b3880fa283128518;hb=c4e1a476135ce36417cdd797481feeaaff4301af;hp=8115319308b9967195d20d05f59eedcf5b370529;hpb=1100054eec7c45458359fd56072341bd661f4a9c;p=rocksndiamonds.git diff --git a/src/libgame/system.h b/src/libgame/system.h index 81153193..55201a9f 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -30,10 +30,15 @@ /* contant definitions */ -#define DEFAULT_DEPTH 0 +/* the additional 'b' is needed for Win32 to open files in binary mode */ +#define MODE_READ "rb" +#define MODE_WRITE "wb" +#define MODE_APPEND "ab" -#define FULLSCREEN_NOT_AVAILABLE FALSE -#define FULLSCREEN_AVAILABLE TRUE +#define DEFAULT_DEPTH 0 + +#define FULLSCREEN_NOT_AVAILABLE FALSE +#define FULLSCREEN_AVAILABLE TRUE /* values for button_status */ #define MB_NOT_PRESSED FALSE @@ -94,6 +99,7 @@ #define RW_BASE_PATH RW_GAME_DIR #define GRAPHICS_DIRECTORY "graphics" +#define MUSIC_DIRECTORY "music" #define SOUNDS_DIRECTORY "sounds" #define LEVELS_DIRECTORY "levels" #define TAPES_DIRECTORY "tapes" @@ -166,12 +172,19 @@ struct VideoSystemInfo struct AudioSystemInfo { boolean sound_available; + boolean music_available; boolean loops_available; + boolean mods_available; boolean sound_enabled; + int soundserver_pipe[2]; int soundserver_pid; char *device_name; int device_fd; + + int channels; + int music_channel; + int music_nr; }; struct GfxInfo @@ -255,6 +268,7 @@ extern int FrameCounter; void InitCommandName(char *); void InitExitFunction(void (*exit_function)(int)); void InitPlatformDependantStuff(void); +void ClosePlatformDependantStuff(void); void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *); @@ -264,6 +278,7 @@ void InitGfxDoor2Info(int, int, int, int); void InitGfxScrollbufferInfo(int, int); inline void InitVideoDisplay(void); +inline void CloseVideoDisplay(void); inline void InitVideoBuffer(DrawBuffer **,DrawWindow **, int,int,int, boolean); inline Bitmap *CreateBitmapStruct(void); inline Bitmap *CreateBitmap(int, int, int); @@ -286,8 +301,10 @@ inline boolean PointerInWindow(DrawWindow *); inline boolean SetVideoMode(boolean); inline boolean ChangeVideoModeIfNeeded(boolean); -inline boolean OpenAudio(struct AudioSystemInfo *); -inline void CloseAudio(struct AudioSystemInfo *); +Bitmap *LoadImage(char *); + +inline void OpenAudio(void); +inline void CloseAudio(void); inline void SetAudioMode(boolean); inline void InitEventFilter(EventFilter);