X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftools.c;h=606652248307a0eb8a1b05964695d43c2e066781;hp=451ef014e103daaac8476837e92bb5412d49bb56;hb=063fcfffebc7960fedb0e468a6b20821e387d403;hpb=f0b6179ac5fd4ff548d4263488373408f92874e8 diff --git a/src/tools.c b/src/tools.c index 451ef014..60665224 100644 --- a/src/tools.c +++ b/src/tools.c @@ -9442,11 +9442,14 @@ void ChangeViewportPropertiesIfNeeded(void) struct RectWithBorder *vp_door_3 = &viewport.door_2[GAME_MODE_EDITOR]; int new_win_xsize = vp_window->width; int new_win_ysize = vp_window->height; - int border_size = vp_playfield->border_size; - int new_sx = vp_playfield->x + border_size; - int new_sy = vp_playfield->y + border_size; - int new_sxsize = vp_playfield->width - 2 * border_size; - int new_sysize = vp_playfield->height - 2 * border_size; + int border_left = vp_playfield->border_left; + int border_right = vp_playfield->border_right; + int border_top = vp_playfield->border_top; + int border_bottom = vp_playfield->border_bottom; + int new_sx = vp_playfield->x + border_left; + int new_sy = vp_playfield->y + border_top; + int new_sxsize = vp_playfield->width - border_left - border_right; + int new_sysize = vp_playfield->height - border_top - border_bottom; int new_real_sx = vp_playfield->x; int new_real_sy = vp_playfield->y; int new_full_sxsize = vp_playfield->width;