X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fsystem.h;h=0e84953a407dad736dc1d4f5885a9a164bb82619;hb=1150bdce04915bf329bd816307fb2507eba80e15;hp=1037515bc8b43cecfcd91e605cf6318d4b19076e;hpb=7d958613de0b14e460ebca1a651b73cfadf9213c;p=rocksndiamonds.git diff --git a/src/system.h b/src/system.h index 1037515b..0e84953a 100644 --- a/src/system.h +++ b/src/system.h @@ -15,23 +15,20 @@ #ifndef SYSTEM_H #define SYSTEM_H -#if defined(XPM_INCLUDE_FILE) && !defined(MSDOS) -#define USE_XPM_LIBRARY -#include XPM_INCLUDE_FILE -#endif +#include "platform.h" -#if defined(MSDOS) +#if defined(PLATFORM_MSDOS) #include "msdos.h" #endif -#if defined(USE_SDL_LIBRARY) +#if defined(TARGET_SDL) #include "sdl.h" -#elif defined(USE_X11_LIBRARY) +#elif defined(TARGET_X11) #include "x11.h" #endif -/* system-wide contant definitions */ +/* contant definitions */ #define DEFAULT_DEPTH 0 @@ -39,36 +36,49 @@ #define FULLSCREEN_AVAILABLE TRUE -/* system-wide type definitions */ +/* type definitions */ typedef int (*EventFilter)(const Event *); -/* system-wide function definitions */ +/* structure definitions */ + +struct SystemInfo +{ + boolean audio_available; + boolean audio_loops_available; + int audio_process_id; + int audio_process_pipe[2]; + int audio_fd; +}; + + +/* function definitions */ -inline void InitEventFilter(EventFilter); inline void InitBufferedDisplay(DrawBuffer *, DrawWindow *); inline int GetDisplayDepth(void); inline Bitmap CreateBitmap(int, int, int); +inline void FreeBitmap(Bitmap); inline void ClearRectangle(Bitmap, int, int, int, int); inline void BlitBitmap(Bitmap, Bitmap, int, int, int, int, int, int); inline void SetClipMask(GC, Pixmap); inline void SetClipOrigin(GC, int, int); inline void BlitBitmapMasked(Bitmap, Bitmap, int, int, int, int, int, int); inline void DrawSimpleWhiteLine(Bitmap, int, int, int, int); - inline void FlushDisplay(void); inline void SyncDisplay(void); inline void KeyboardAutoRepeatOn(void); inline void KeyboardAutoRepeatOff(void); inline boolean PointerInWindow(DrawWindow); +inline boolean SetVideoMode(void); +inline void ChangeVideoModeIfNeeded(void); + +inline boolean InitAudio(void); +inline void InitEventFilter(EventFilter); inline boolean PendingEvent(void); inline void NextEvent(Event *event); - inline Key GetEventKey(KeyEvent *, boolean); - -inline boolean SetVideoMode(void); -inline void ChangeVideoModeIfNeeded(void); +inline boolean CheckCloseWindowEvent(ClientMessageEvent *); #endif /* SYSTEM_H */