1 /***********************************************************
2 * Artsoft Retro-Game Library *
3 *----------------------------------------------------------*
4 * (c) 1994-2002 Artsoft Entertainment *
6 * Detmolder Strasse 189 *
9 * e-mail: info@artsoft.org *
10 *----------------------------------------------------------*
12 ***********************************************************/
21 #if defined(PLATFORM_MACOSX)
23 #elif defined(PLATFORM_WIN32)
25 #elif defined(PLATFORM_MSDOS)
29 #if defined(TARGET_SDL)
31 #elif defined(TARGET_X11)
36 /* the additional 'b' is needed for Win32 to open files in binary mode */
37 #define MODE_READ "rb"
38 #define MODE_WRITE "wb"
39 #define MODE_APPEND "ab"
41 #define DEFAULT_DEPTH 0
45 #define BLIT_INVERSE 2
46 #define BLIT_ON_BACKGROUND 3
48 #define FULLSCREEN_NOT_AVAILABLE FALSE
49 #define FULLSCREEN_AVAILABLE TRUE
51 /* default input keys */
52 #define DEFAULT_KEY_LEFT KSYM_Left
53 #define DEFAULT_KEY_RIGHT KSYM_Right
54 #define DEFAULT_KEY_UP KSYM_Up
55 #define DEFAULT_KEY_DOWN KSYM_Down
56 #if defined(PLATFORM_MACOSX)
57 #define DEFAULT_KEY_SNAP KSYM_Control_L
58 #define DEFAULT_KEY_BOMB KSYM_KP_Enter
60 #define DEFAULT_KEY_SNAP KSYM_Shift_L
61 #define DEFAULT_KEY_BOMB KSYM_Shift_R
63 #define DEFAULT_KEY_OKAY KSYM_Return
64 #define DEFAULT_KEY_CANCEL KSYM_Escape
66 /* default shortcut keys */
67 #define DEFAULT_KEY_SAVE_GAME KSYM_F1
68 #define DEFAULT_KEY_LOAD_GAME KSYM_F2
69 #define DEFAULT_KEY_TOGGLE_PAUSE KSYM_space
71 /* values for key_status */
72 #define KEY_NOT_PRESSED FALSE
73 #define KEY_RELEASED FALSE
74 #define KEY_PRESSED TRUE
76 /* values for button status */
77 #define MB_NOT_PRESSED FALSE
78 #define MB_NOT_RELEASED TRUE
79 #define MB_RELEASED FALSE
80 #define MB_PRESSED TRUE
81 #define MB_MENU_CHOICE FALSE
82 #define MB_MENU_MARK TRUE
83 #define MB_MENU_INITIALIZE (-1)
84 #define MB_MENU_LEAVE (-2)
85 #define MB_LEFTBUTTON 1
86 #define MB_MIDDLEBUTTON 2
87 #define MB_RIGHTBUTTON 3
90 /* values for move directions */
92 #define MV_BIT_RIGHT 1
96 #define NUM_DIRECTIONS 4
98 /* values for special "button" bitmasks */
102 /* values for move direction and special "button" key bitmasks */
103 #define MV_NO_MOVING 0
104 #define MV_LEFT (1 << MV_BIT_LEFT)
105 #define MV_RIGHT (1 << MV_BIT_RIGHT)
106 #define MV_UP (1 << MV_BIT_UP)
107 #define MV_DOWN (1 << MV_BIT_DOWN)
109 #define KEY_BUTTON_1 (1 << BUTTON_1)
110 #define KEY_BUTTON_2 (1 << BUTTON_2)
111 #define KEY_MOTION (MV_LEFT | MV_RIGHT | MV_UP | MV_DOWN)
112 #define KEY_BUTTON (KEY_BUTTON_1 | KEY_BUTTON_2)
113 #define KEY_ACTION (KEY_MOTION | KEY_BUTTON)
115 #define MV_DIR_BIT(x) ((x) == MV_LEFT ? MV_BIT_LEFT : \
116 (x) == MV_RIGHT ? MV_BIT_RIGHT : \
117 (x) == MV_UP ? MV_BIT_UP : MV_BIT_DOWN)
120 /* values for animation mode (frame order and direction) */
122 #define ANIM_LOOP (1 << 0)
123 #define ANIM_LINEAR (1 << 1)
124 #define ANIM_PINGPONG (1 << 2)
125 #define ANIM_PINGPONG2 (1 << 3)
126 #define ANIM_RANDOM (1 << 4)
127 #define ANIM_REVERSE (1 << 5)
129 /* values for special (non game element) animation modes */
130 #define ANIM_HORIZONTAL (1 << 6)
131 #define ANIM_VERTICAL (1 << 7)
133 #define ANIM_DEFAULT ANIM_LOOP
135 /* values for redraw_mask */
136 #define REDRAW_NONE (0)
137 #define REDRAW_ALL (1 << 0)
138 #define REDRAW_FIELD (1 << 1)
139 #define REDRAW_TILES (1 << 2)
140 #define REDRAW_DOOR_1 (1 << 3)
141 #define REDRAW_VIDEO_1 (1 << 4)
142 #define REDRAW_VIDEO_2 (1 << 5)
143 #define REDRAW_VIDEO_3 (1 << 6)
144 #define REDRAW_MICROLEVEL (1 << 7)
145 #define REDRAW_MICROLABEL (1 << 8)
146 #define REDRAW_FROM_BACKBUFFER (1 << 9)
147 #define REDRAW_DOOR_2 (REDRAW_VIDEO_1 | \
150 #define REDRAW_DOOR_3 (1 << 10)
151 #define REDRAW_DOORS (REDRAW_DOOR_1 | \
154 #define REDRAW_MAIN (REDRAW_FIELD | \
157 #define REDRAW_FPS (1 << 11)
158 #define REDRAWTILES_THRESHOLD (SCR_FIELDX * SCR_FIELDY / 2)
161 /* values for mouse cursor */
162 #define CURSOR_DEFAULT 0
163 #define CURSOR_PLAYFIELD 1
166 /* maximum number of parallel players supported by libgame functions */
167 #define MAX_PLAYERS 4
169 /* maximum allowed length of player name */
170 #define MAX_PLAYER_NAME_LEN 10
172 /* default name for empty highscore entry */
173 #define EMPTY_PLAYER_NAME "no name"
175 /* default name for unknown player names */
176 #define ANONYMOUS_NAME "anonymous"
178 /* default name for new levels */
179 #define NAMELESS_LEVEL_NAME "nameless level"
181 /* default text for non-existant artwork */
182 #define NOT_AVAILABLE "(not available)"
184 /* default value for undefined filename */
185 #define UNDEFINED_FILENAME "[NONE]"
187 /* default value for undefined parameter */
188 #define ARG_DEFAULT "[DEFAULT]"
190 /* default values for undefined configuration file parameters */
191 #define ARG_UNDEFINED "-1000000"
192 #define ARG_UNDEFINED_VALUE (atoi(ARG_UNDEFINED))
194 /* definitions for game sub-directories */
196 #define RO_GAME_DIR "."
200 #define RW_GAME_DIR "."
203 #define RO_BASE_PATH RO_GAME_DIR
204 #define RW_BASE_PATH RW_GAME_DIR
206 /* directory names */
207 #define GRAPHICS_DIRECTORY "graphics"
208 #define SOUNDS_DIRECTORY "sounds"
209 #define MUSIC_DIRECTORY "music"
210 #define LEVELS_DIRECTORY "levels"
211 #define TAPES_DIRECTORY "tapes"
212 #define SCORES_DIRECTORY "scores"
213 #define DOCS_DIRECTORY "docs"
215 #if !defined(PLATFORM_MSDOS)
216 #define GFX_CLASSIC_SUBDIR "gfx_classic"
217 #define SND_CLASSIC_SUBDIR "snd_classic"
218 #define MUS_CLASSIC_SUBDIR "mus_classic"
220 #define GFX_CLASSIC_SUBDIR "gfx_orig"
221 #define SND_CLASSIC_SUBDIR "snd_orig"
222 #define MUS_CLASSIC_SUBDIR "mus_orig"
225 /* file names and filename extensions */
226 #if !defined(PLATFORM_MSDOS)
227 #define LEVELSETUP_DIRECTORY "levelsetup"
228 #define SETUP_FILENAME "setup.conf"
229 #define LEVELSETUP_FILENAME "levelsetup.conf"
230 #define LEVELINFO_FILENAME "levelinfo.conf"
231 #define GRAPHICSINFO_FILENAME "graphicsinfo.conf"
232 #define SOUNDSINFO_FILENAME "soundsinfo.conf"
233 #define MUSICINFO_FILENAME "musicinfo.conf"
234 #define LEVELFILE_EXTENSION "level"
235 #define TAPEFILE_EXTENSION "tape"
236 #define SCOREFILE_EXTENSION "score"
238 #define LEVELSETUP_DIRECTORY "lvlsetup"
239 #define SETUP_FILENAME "setup.cnf"
240 #define LEVELSETUP_FILENAME "lvlsetup.cnf"
241 #define LEVELINFO_FILENAME "lvlinfo.cnf"
242 #define GRAPHICSINFO_FILENAME "gfxinfo.cnf"
243 #define SOUNDSINFO_FILENAME "sndinfo.cnf"
244 #define MUSICINFO_FILENAME "musinfo.cnf"
245 #define LEVELFILE_EXTENSION "lvl"
246 #define TAPEFILE_EXTENSION "tap"
247 #define SCOREFILE_EXTENSION "sco"
251 /* areas in bitmap PIX_DOOR */
252 /* meaning in PIX_DB_DOOR: (3 PAGEs)
253 PAGEX1: 1. buffer for DOOR_1
254 PAGEX2: 2. buffer for DOOR_1
255 PAGEX3: buffer for animations
258 #define DOOR_GFX_PAGESIZE (gfx.dxsize)
259 #define DOOR_GFX_PAGEX1 (0 * DOOR_GFX_PAGESIZE)
260 #define DOOR_GFX_PAGEX2 (1 * DOOR_GFX_PAGESIZE)
261 #define DOOR_GFX_PAGEX3 (2 * DOOR_GFX_PAGESIZE)
262 #define DOOR_GFX_PAGEX4 (3 * DOOR_GFX_PAGESIZE)
263 #define DOOR_GFX_PAGEX5 (4 * DOOR_GFX_PAGESIZE)
264 #define DOOR_GFX_PAGEX6 (5 * DOOR_GFX_PAGESIZE)
265 #define DOOR_GFX_PAGEX7 (6 * DOOR_GFX_PAGESIZE)
266 #define DOOR_GFX_PAGEX8 (7 * DOOR_GFX_PAGESIZE)
267 #define DOOR_GFX_PAGEY1 (0)
268 #define DOOR_GFX_PAGEY2 (gfx.dysize)
271 /* macros for version handling */
272 #define VERSION_IDENT(x,y,z) ((x) * 1000000 + (y) * 10000 + (z) * 100)
273 #define RELEASE_IDENT(x,y,z,r) (VERSION_IDENT(x,y,z) + (r))
274 #define VERSION_MAJOR(x) ((x) / 1000000)
275 #define VERSION_MINOR(x) (((x) % 1000000) / 10000)
276 #define VERSION_PATCH(x) (((x) % 10000) / 100)
277 #define VERSION_RELEASE(x) ((x) % 100)
280 /* macros for parent/child process identification */
281 #if defined(PLATFORM_UNIX)
282 #define IS_PARENT_PROCESS() (audio.mixer_pid != getpid())
283 #define IS_CHILD_PROCESS() (audio.mixer_pid == getpid())
284 #define HAS_CHILD_PROCESS() (audio.mixer_pid > 0)
286 #define IS_PARENT_PROCESS() TRUE
287 #define IS_CHILD_PROCESS() FALSE
288 #define HAS_CHILD_PROCESS() FALSE
292 /* values for artwork type */
293 #define ARTWORK_TYPE_GRAPHICS 0
294 #define ARTWORK_TYPE_SOUNDS 1
295 #define ARTWORK_TYPE_MUSIC 2
297 #define NUM_ARTWORK_TYPES 3
300 /* values for tree type (chosen to match artwork type) */
301 #define TREE_TYPE_UNDEFINED -1
302 #define TREE_TYPE_GRAPHICS_DIR ARTWORK_TYPE_GRAPHICS
303 #define TREE_TYPE_SOUNDS_DIR ARTWORK_TYPE_SOUNDS
304 #define TREE_TYPE_MUSIC_DIR ARTWORK_TYPE_MUSIC
305 #define TREE_TYPE_LEVEL_DIR 3
307 #define NUM_TREE_TYPES 4
310 /* values for artwork handling */
311 #define LEVELDIR_ARTWORK_SET(leveldir, type) \
312 ((type) == ARTWORK_TYPE_GRAPHICS ? \
313 (leveldir)->graphics_set : \
314 (type) == ARTWORK_TYPE_SOUNDS ? \
315 (leveldir)->sounds_set : \
316 (leveldir)->music_set)
318 #define LEVELDIR_ARTWORK_PATH(leveldir, type) \
319 ((type) == ARTWORK_TYPE_GRAPHICS ? \
320 (leveldir)->graphics_path : \
321 (type) == ARTWORK_TYPE_SOUNDS ? \
322 (leveldir)->sounds_path : \
323 (leveldir)->music_path)
325 #define SETUP_ARTWORK_SET(setup, type) \
326 ((type) == ARTWORK_TYPE_GRAPHICS ? \
327 (setup).graphics_set : \
328 (type) == ARTWORK_TYPE_SOUNDS ? \
329 (setup).sounds_set : \
332 #define SETUP_OVERRIDE_ARTWORK(setup, type) \
333 ((type) == ARTWORK_TYPE_GRAPHICS ? \
334 (setup).override_level_graphics : \
335 (type) == ARTWORK_TYPE_SOUNDS ? \
336 (setup).override_level_sounds : \
337 (setup).override_level_music)
339 #define ARTWORK_FIRST_NODE(artwork, type) \
340 ((type) == ARTWORK_TYPE_GRAPHICS ? \
341 (artwork).gfx_first : \
342 (type) == ARTWORK_TYPE_SOUNDS ? \
343 (artwork).snd_first : \
346 #define ARTWORK_CURRENT_IDENTIFIER(artwork, type) \
347 ((type) == ARTWORK_TYPE_GRAPHICS ? \
348 (artwork).gfx_current_identifier : \
349 (type) == ARTWORK_TYPE_SOUNDS ? \
350 (artwork).snd_current_identifier : \
351 (artwork).mus_current_identifier)
353 #define ARTWORKINFO_FILENAME(type) \
354 ((type) == ARTWORK_TYPE_GRAPHICS ? \
355 GRAPHICSINFO_FILENAME : \
356 (type) == ARTWORK_TYPE_SOUNDS ? \
357 SOUNDSINFO_FILENAME : \
358 (type) == ARTWORK_TYPE_MUSIC ? \
359 MUSICINFO_FILENAME : "")
361 #define ARTWORK_DIRECTORY(type) \
362 ((type) == ARTWORK_TYPE_GRAPHICS ? \
363 GRAPHICS_DIRECTORY : \
364 (type) == ARTWORK_TYPE_SOUNDS ? \
366 (type) == ARTWORK_TYPE_MUSIC ? \
367 MUSIC_DIRECTORY : "")
369 #define OPTIONS_ARTWORK_DIRECTORY(type) \
370 ((type) == ARTWORK_TYPE_GRAPHICS ? \
371 options.graphics_directory : \
372 (type) == ARTWORK_TYPE_SOUNDS ? \
373 options.sounds_directory : \
374 (type) == ARTWORK_TYPE_MUSIC ? \
375 options.music_directory : "")
378 /* type definitions */
379 typedef int (*EventFilter)(const Event *);
382 /* structure definitions */
386 char *command_basename;
387 char *userdata_directory;
393 char *x11_icon_filename;
394 char *x11_iconmask_filename;
395 char *msdos_cursor_filename;
398 char *filename_prefix; /* prefix to cut off from DOS filenames */
404 void (*exit_function)(int);
413 char *ro_base_directory;
414 char *rw_base_directory;
415 char *level_directory;
416 char *graphics_directory;
417 char *sounds_directory;
418 char *music_directory;
419 char *docs_directory;
420 char *execute_command;
428 struct VideoSystemInfo
431 int width, height, depth;
432 boolean fullscreen_available;
433 boolean fullscreen_enabled;
436 struct AudioSystemInfo
438 boolean sound_available;
439 boolean loops_available;
440 boolean music_available;
442 boolean sound_enabled;
443 boolean sound_deactivated; /* for temporarily disabling sound */
452 int first_sound_channel;
455 struct FontBitmapInfo
458 int src_x, src_y; /* start position of animation frames */
459 int width, height; /* width/height of each animation frame */
460 int draw_x, draw_y; /* offset for drawing font characters */
462 int num_chars_per_line;
464 #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
465 Pixmap *clip_mask; /* single-char-only clip mask array for X11 */
473 int real_sx, real_sy;
474 int full_sxsize, full_sysize;
475 int scrollbuffer_width, scrollbuffer_height;
483 int draw_deactivation_mask;
484 int draw_background_mask;
486 Bitmap *field_save_buffer;
488 Bitmap *background_bitmap;
489 int background_bitmap_mask;
492 struct FontBitmapInfo *font_bitmap_info;
493 int (*select_font_function)(int);
495 int anim_random_frame;
501 int fd[MAX_PLAYERS]; /* file descriptor of player's joystick */
504 struct SetupJoystickInfo
506 char *device_name; /* device name of player's joystick */
508 int xleft, xmiddle, xright;
509 int yupper, ymiddle, ylower;
514 struct SetupKeyboardInfo
524 struct SetupInputInfo
526 boolean use_joystick;
527 struct SetupJoystickInfo joy;
528 struct SetupKeyboardInfo key;
531 struct SetupEditorInfo
533 boolean el_boulderdash;
534 boolean el_emerald_mine;
538 boolean el_diamond_caves;
539 boolean el_dx_boulderdash;
542 boolean el_custom_more;
544 boolean el_headlines;
547 struct SetupShortcutInfo
554 struct SetupSystemInfo
556 char *sdl_audiodriver;
557 int audio_fragment_size;
567 boolean sound_simple;
569 boolean double_buffering;
570 boolean direct_draw; /* !double_buffering (redundant!) */
571 boolean scroll_delay;
572 boolean soft_scrolling;
580 boolean ask_on_escape;
585 boolean override_level_graphics;
586 boolean override_level_sounds;
587 boolean override_level_music;
589 struct SetupEditorInfo editor;
590 struct SetupShortcutInfo shortcut;
591 struct SetupInputInfo input[MAX_PLAYERS];
592 struct SetupSystemInfo system;
593 struct OptionInfo options;
598 struct TreeInfo **node_top; /* topmost node in tree */
599 struct TreeInfo *node_parent; /* parent level directory info */
600 struct TreeInfo *node_group; /* level group sub-directory info */
601 struct TreeInfo *next; /* next level series structure node */
603 int cl_first; /* internal control field for setup screen */
604 int cl_cursor; /* internal control field for setup screen */
606 int type; /* type of tree content */
608 /* fields for "type == TREE_TYPE_LEVEL_DIR" */
610 char *filename; /* tree info sub-directory basename (may be ".") */
611 char *fullpath; /* complete path relative to tree base directory */
612 char *basepath; /* absolute base path of tree base directory */
613 char *identifier; /* identifier string for configuration files */
614 char *name; /* tree info name, as displayed in selection menues */
615 char *name_sorting; /* optional sorting name for correct name sorting */
616 char *author; /* level or artwork author name */
617 char *imported_from; /* optional comment for imported levels or artwork */
619 char *graphics_set; /* optional custom graphics set (level tree only) */
620 char *sounds_set; /* optional custom sounds set (level tree only) */
621 char *music_set; /* optional custom music set (level tree only) */
622 char *graphics_path; /* path to optional custom graphics set (level only) */
623 char *sounds_path; /* path to optional custom sounds set (level only) */
624 char *music_path; /* path to optional custom music set (level only) */
626 int levels; /* number of levels in level series */
627 int first_level; /* first level number (to allow start with 0 or 1) */
628 int last_level; /* last level number (automatically calculated) */
629 int sort_priority; /* sort levels by 'sort_priority' and then by name */
631 boolean level_group; /* directory contains more level series directories */
632 boolean parent_link; /* entry links back to parent directory */
633 boolean user_defined; /* user defined levels are stored in home directory */
634 boolean readonly; /* readonly levels can not be changed with editor */
636 int color; /* color to use on selection screen for this level */
637 char *class_desc; /* description of level series class */
638 int handicap_level; /* number of the lowest unsolved level */
641 typedef struct TreeInfo TreeInfo;
642 typedef struct TreeInfo LevelDirTree;
643 typedef struct TreeInfo ArtworkDirTree;
644 typedef struct TreeInfo GraphicsDirTree;
645 typedef struct TreeInfo SoundsDirTree;
646 typedef struct TreeInfo MusicDirTree;
650 GraphicsDirTree *gfx_first;
651 GraphicsDirTree *gfx_current;
652 SoundsDirTree *snd_first;
653 SoundsDirTree *snd_current;
654 MusicDirTree *mus_first;
655 MusicDirTree *mus_current;
657 char *gfx_current_identifier;
658 char *snd_current_identifier;
659 char *mus_current_identifier;
675 struct TokenIntPtrInfo
685 char *default_filename;
688 char **default_parameter; /* array of file parameters */
689 char **parameter; /* array of file parameters */
699 struct SetupFileList *next;
704 char *source_filename; /* primary key for node list */
708 struct PropertyMapping
718 struct ArtworkListInfo
720 int type; /* type of artwork */
722 int num_file_list_entries;
723 int num_dynamic_file_list_entries;
724 struct FileInfo *file_list; /* static artwork file array */
725 struct FileInfo *dynamic_file_list; /* dynamic artwrk file array */
727 int num_suffix_list_entries;
728 struct ConfigInfo *suffix_list; /* parameter suffixes array */
730 int num_base_prefixes;
731 int num_ext1_suffixes;
732 int num_ext2_suffixes;
733 int num_ext3_suffixes;
734 char **base_prefixes; /* base token prefixes array */
735 char **ext1_suffixes; /* property suffixes array 1 */
736 char **ext2_suffixes; /* property suffixes array 2 */
737 char **ext3_suffixes; /* property suffixes array 3 */
739 int num_ignore_tokens;
740 char **ignore_tokens; /* file tokens to be ignored */
742 int num_property_mapping_entries;
743 struct PropertyMapping *property_mapping; /* mapping token -> artwork */
745 int sizeof_artwork_list_entry;
747 struct ListNodeInfo **artwork_list; /* static artwork node array */
748 struct ListNodeInfo **dynamic_artwork_list; /* dynamic artwrk node array */
749 struct ListNode *content_list; /* dynamic artwork node list */
751 void *(*load_artwork)(char *); /* constructor function */
752 void (*free_artwork)(void *); /* destructor function */
756 /* ========================================================================= */
757 /* exported variables */
758 /* ========================================================================= */
760 extern struct ProgramInfo program;
761 extern struct OptionInfo options;
762 extern struct VideoSystemInfo video;
763 extern struct AudioSystemInfo audio;
764 extern struct GfxInfo gfx;
765 extern struct AnimInfo anim;
766 extern struct ArtworkInfo artwork;
767 extern struct JoystickInfo joystick;
768 extern struct SetupInfo setup;
770 extern LevelDirTree *leveldir_first;
771 extern LevelDirTree *leveldir_current;
774 extern Display *display;
775 extern Visual *visual;
777 extern Colormap cmap;
779 extern DrawWindow *window;
780 extern DrawBuffer *backbuffer;
781 extern DrawBuffer *drawto;
783 extern int button_status;
784 extern boolean motion_status;
786 extern int redraw_mask;
787 extern int redraw_tiles;
789 extern int FrameCounter;
792 /* function definitions */
794 void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *,
795 char *, char *, char *, int);
797 void InitExitFunction(void (*exit_function)(int));
798 void InitPlatformDependentStuff(void);
799 void ClosePlatformDependentStuff(void);
801 void InitGfxFieldInfo(int, int, int, int, int, int, int, int, Bitmap *);
802 void InitGfxDoor1Info(int, int, int, int);
803 void InitGfxDoor2Info(int, int, int, int);
804 void InitGfxScrollbufferInfo(int, int);
805 void SetDrawDeactivationMask(int);
806 void SetDrawBackgroundMask(int);
807 void SetMainBackgroundBitmap(Bitmap *);
808 void SetDoorBackgroundBitmap(Bitmap *);
810 inline void InitVideoDisplay(void);
811 inline void CloseVideoDisplay(void);
812 inline void InitVideoBuffer(DrawBuffer **,DrawWindow **, int,int,int, boolean);
813 inline Bitmap *CreateBitmapStruct(void);
814 inline Bitmap *CreateBitmap(int, int, int);
815 inline void FreeBitmap(Bitmap *);
816 inline void BlitBitmap(Bitmap *, Bitmap *, int, int, int, int, int, int);
817 inline void FillRectangle(Bitmap *, int, int, int, int, Pixel);
818 inline void ClearRectangle(Bitmap *, int, int, int, int);
819 inline void ClearRectangleOnBackground(Bitmap *, int, int, int, int);
820 inline void SetClipMask(Bitmap *, GC, Pixmap);
821 inline void SetClipOrigin(Bitmap *, GC, int, int);
822 inline void BlitBitmapMasked(Bitmap *, Bitmap *, int, int, int, int, int, int);
823 inline boolean DrawingOnBackground(int, int);
824 inline void BlitBitmapOnBackground(Bitmap *, Bitmap *, int, int, int, int, int,
826 inline void DrawSimpleWhiteLine(Bitmap *, int, int, int, int);
827 inline void DrawLines(Bitmap *, struct XY *, int, Pixel);
828 inline Pixel GetPixel(Bitmap *, int, int);
829 inline Pixel GetPixelFromRGB(Bitmap *, unsigned int,unsigned int,unsigned int);
830 inline Pixel GetPixelFromRGBcompact(Bitmap *, unsigned int);
832 inline void FlushDisplay(void);
833 inline void SyncDisplay(void);
834 inline void KeyboardAutoRepeatOn(void);
835 inline void KeyboardAutoRepeatOff(void);
836 inline boolean PointerInWindow(DrawWindow *);
837 inline boolean SetVideoMode(boolean);
838 inline boolean ChangeVideoModeIfNeeded(boolean);
840 Bitmap *LoadImage(char *);
841 Bitmap *LoadCustomImage(char *);
842 void ReloadCustomImage(Bitmap *, char *);
844 Bitmap *ZoomBitmap(Bitmap *, int, int);
845 void CreateBitmapWithSmallBitmaps(Bitmap *);
847 void SetMouseCursor(int);
849 inline void OpenAudio(void);
850 inline void CloseAudio(void);
851 inline void SetAudioMode(boolean);
853 inline void InitEventFilter(EventFilter);
854 inline boolean PendingEvent(void);
855 inline void NextEvent(Event *event);
856 inline Key GetEventKey(KeyEvent *, boolean);
857 inline KeyMod HandleKeyModState(Key, int);
858 inline KeyMod GetKeyModState();
859 inline boolean CheckCloseWindowEvent(ClientMessageEvent *);
861 inline void InitJoysticks();
862 inline boolean ReadJoystick(int, int *, int *, boolean *, boolean *);
864 #endif /* SYSTEM_H */