X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=7902f42bb80279fc126ea08d394f4ad4ed536027;hb=04822a800bb5479087613b0730fdf7e765ba012c;hp=9ac05663bfc373f59d4dd6d73756d65663a2a67c;hpb=273ed881a8affb54ee8e2bd7489eb3d898e11c23;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index 9ac05663..7902f42b 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -214,6 +214,14 @@ void InitGfxDoor2Info(int vx, int vy, int vxsize, int vysize) gfx.vysize = vysize; } +void InitGfxDoor3Info(int ex, int ey, int exsize, int eysize) +{ + gfx.ex = ex; + gfx.ey = ey; + gfx.exsize = exsize; + gfx.eysize = eysize; +} + void InitGfxWindowInfo(int win_xsize, int win_ysize) { gfx.win_xsize = win_xsize; @@ -563,6 +571,19 @@ inline static boolean CheckDrawingArea(int x, int y, int width, int height, if (draw_mask & REDRAW_ALL) return TRUE; +#if 1 + if ((draw_mask & REDRAW_FIELD) && IN_GFX_FIELD_FULL(x, y)) + return TRUE; + + if ((draw_mask & REDRAW_DOOR_1) && IN_GFX_DOOR_1(x, y)) + return TRUE; + + if ((draw_mask & REDRAW_DOOR_2) && IN_GFX_DOOR_2(x, y)) + return TRUE; + + if ((draw_mask & REDRAW_DOOR_3) && IN_GFX_DOOR_3(x, y)) + return TRUE; +#else if ((draw_mask & REDRAW_FIELD) && x >= gfx.real_sx && x < gfx.real_sx + gfx.full_sxsize) return TRUE; @@ -574,6 +595,7 @@ inline static boolean CheckDrawingArea(int x, int y, int width, int height, if ((draw_mask & REDRAW_DOOR_2) && x >= gfx.dx && y >= gfx.vy) return TRUE; +#endif return FALSE; }