X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=bb78fbe9453b442d666aa8b603b060f6ca327932;hb=7b3e068e43bcfeb38ce390d5d1c3b1a13c81cb55;hp=6580d083b37f3cafa6fe87a7e1a2ad64e86feb5c;hpb=959794cfda1f83edc51512211ae5a9f6b1e0b179;p=rocksndiamonds.git diff --git a/src/libgame/system.h b/src/libgame/system.h index 6580d083..bb78fbe9 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1,15 +1,13 @@ -/*********************************************************** -* Artsoft Retro-Game Library * -*----------------------------------------------------------* -* (c) 1994-2006 Artsoft Entertainment * -* Holger Schemel * -* Detmolder Strasse 189 * -* 33604 Bielefeld * -* Germany * -* e-mail: info@artsoft.org * -*----------------------------------------------------------* -* system.h * -***********************************************************/ +// ============================================================================ +// Artsoft Retro-Game Library +// ---------------------------------------------------------------------------- +// (c) 1995-2014 by Artsoft Entertainment +// Holger Schemel +// info@artsoft.org +// http://www.artsoft.org/ +// ---------------------------------------------------------------------------- +// system.h +// ============================================================================ #ifndef SYSTEM_H #define SYSTEM_H @@ -26,11 +24,7 @@ #include "android.h" #endif -#if defined(TARGET_SDL) #include "sdl.h" -#elif defined(TARGET_X11) -#include "x11.h" -#endif /* the additional 'b' is needed for Win32 to open files in binary mode */ @@ -313,17 +307,10 @@ REDRAW_MICROLEVEL) #define REDRAW_FPS (1 << 11) -#if defined(TARGET_X11) -/* on old-style, classic and potentially slow graphics systems, redraw single - tiles instead of the whole playfield unless a certain threshold is reached; - when using the X11 target, this method should still be fast on all systems */ -#define REDRAWTILES_THRESHOLD (SCR_FIELDX * SCR_FIELDY / 2) -#else -/* on modern graphics systems and when using the SDL target, this tile redraw +/* on modern graphics systems and when using the SDL target, the old tile redraw optimization can slow things down a lot due to many small blits compared to one single playfield-sized blit (especially observed on Mac OS X with SDL) */ #define REDRAWTILES_THRESHOLD 0 -#endif #define IN_GFX_FIELD_PLAY(x, y) (x >= gfx.sx && x < gfx.sx + gfx.sxsize && \ y >= gfx.sy && y < gfx.sy + gfx.sysize) @@ -680,12 +667,9 @@ struct ProgramInfo char *window_title; char *icon_title; - char *x11_icon_filename; - char *x11_iconmask_filename; char *sdl_icon_filename; char *cookie_prefix; - char *filename_prefix; /* prefix to cut off from DOS filenames */ char *error_filename; /* filename where to write error messages to */ FILE *error_file; /* (used instead of 'stderr' on some systems) */ @@ -693,6 +677,8 @@ struct ProgramInfo int version_major; int version_minor; int version_patch; + int version_build; + int version_ident; char *(*window_title_function)(void); void (*exit_message_function)(char *, va_list); @@ -721,7 +707,6 @@ struct OptionInfo boolean network; boolean verbose; boolean debug; - boolean debug_x11_sync; }; struct ScreenModeInfo @@ -777,10 +762,6 @@ struct FontBitmapInfo int num_chars; int num_chars_per_line; - -#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND) - Pixmap *clip_mask; /* single-char-only clip mask array for X11 */ -#endif }; struct GfxInfo @@ -791,6 +772,8 @@ struct GfxInfo int full_sxsize, full_sysize; int scrollbuffer_width, scrollbuffer_height; + int game_tile_size, standard_tile_size; + int dx, dy; int dxsize, dysize; @@ -805,6 +788,8 @@ struct GfxInfo int draw_deactivation_mask; int draw_background_mask; + boolean drawing_area_changed; + Bitmap *field_save_buffer; Bitmap *background_bitmap; @@ -828,6 +813,8 @@ struct GfxInfo int anim_random_frame; void (*draw_busy_anim_function)(void); + + int cursor_mode; }; struct JoystickInfo @@ -1219,13 +1206,15 @@ struct DoorPartPosInfo struct TextPosInfo { int x, y; + int xoffset; /* special case for tape date and time */ + int xoffset2; /* special case for tape date */ int width, height; int align, valign; - int size; + int size; /* also used for suffix ".digits" */ int font, font_alt; boolean draw_masked; boolean draw_player; /* special case for network player buttons */ - int sort_priority; + int sort_priority; /* also used for suffix ".draw_order" */ int id; }; @@ -1257,11 +1246,6 @@ extern int level_nr; extern struct LevelStats level_stats[]; -extern Display *display; -extern Visual *visual; -extern int screen; -extern Colormap cmap; - extern DrawWindow *window; extern DrawBuffer *backbuffer; extern DrawBuffer *drawto; @@ -1280,13 +1264,8 @@ extern int FrameCounter; /* function definitions */ -#if 1 void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *, - char *, char *, char *, int); -#else -void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *, - char *, char *, char *, char *, char *, int); -#endif + int); void SetWindowTitle(); @@ -1297,6 +1276,7 @@ void InitPlatformDependentStuff(void); void ClosePlatformDependentStuff(void); void InitGfxFieldInfo(int, int, int, int, int, int, int, int, Bitmap *); +void InitGfxTileSizeInfo(int, int); void InitGfxDoor1Info(int, int, int, int); void InitGfxDoor2Info(int, int, int, int); void InitGfxDoor3Info(int, int, int, int); @@ -1305,6 +1285,7 @@ void InitGfxScrollbufferInfo(int, int); void InitGfxClipRegion(boolean, int, int, int, int); void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(void)); void InitGfxCustomArtworkInfo(); +void InitGfxOtherSettings(); void SetDrawDeactivationMask(int); void SetDrawBackgroundMask(int); void SetWindowBackgroundBitmap(Bitmap *); @@ -1327,10 +1308,9 @@ void FadeRectangle(Bitmap *bitmap, int, int, int, int, int, int, int, void FillRectangle(Bitmap *, int, int, int, int, Pixel); void ClearRectangle(Bitmap *, int, int, int, int); void ClearRectangleOnBackground(Bitmap *, int, int, int, int); -void SetClipMask(Bitmap *, GC, Pixmap); -void SetClipOrigin(Bitmap *, GC, int, int); void BlitBitmapMasked(Bitmap *, Bitmap *, int, int, int, int, int, int); boolean DrawingOnBackground(int, int); +boolean DrawingAreaChanged(); void BlitBitmapOnBackground(Bitmap *, Bitmap *, int, int, int, int, int, int); void DrawSimpleBlackLine(Bitmap *, int, int, int, int); void DrawSimpleWhiteLine(Bitmap *, int, int, int, int); @@ -1339,8 +1319,6 @@ Pixel GetPixel(Bitmap *, int, int); Pixel GetPixelFromRGB(Bitmap *, unsigned int,unsigned int,unsigned int); Pixel GetPixelFromRGBcompact(Bitmap *, unsigned int); -void FlushDisplay(void); -void SyncDisplay(void); void KeyboardAutoRepeatOn(void); void KeyboardAutoRepeatOff(void); boolean PointerInWindow(DrawWindow *); @@ -1352,8 +1330,9 @@ Bitmap *LoadCustomImage(char *); void ReloadCustomImage(Bitmap *, char *); Bitmap *ZoomBitmap(Bitmap *, int, int); -void CreateBitmapWithSmallBitmaps(Bitmap *, int); -void ScaleBitmap(Bitmap *, int); +void ReCreateGameTileSizeBitmap(Bitmap **); +void CreateBitmapWithSmallBitmaps(Bitmap **, int, int); +void ScaleBitmap(Bitmap **, int); void SetMouseCursor(int);