X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=11670c698785428a14fad8d5844908f03e6a0c45;hb=80aa0e4b2b060112407417a9d2896395023a21cc;hp=df95c9d336ff7ed064fb095c09572b5149b947b0;hpb=0c6144aa1196e8121ba38716f9f95836d0ccbb9e;p=rocksndiamonds.git diff --git a/src/libgame/system.h b/src/libgame/system.h index df95c9d3..11670c69 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -285,7 +285,18 @@ REDRAW_TILES | \ 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 + 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_SCREEN(x, y) (x >= gfx.sx && x < gfx.sx + gfx.sxsize && \ y >= gfx.sy && y < gfx.sy + gfx.sysize)