X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=a88b3f04ec1a8525e904b45e13418c94580ea9c3;hb=c60227514289cd7d512539785bb2fe47d30db51a;hp=cb3434a1f353de60aead1b156901c3230089adbc;hpb=87382cdd307aa01757ed5c8a863ebb7dcb812e8e;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index cb3434a1..a88b3f04 100644 --- a/src/game.c +++ b/src/game.c @@ -2539,8 +2539,15 @@ void DisplayGameControlValues() return; /* copy default game door content to main double buffer */ +#if 1 + /* !!! CHECK AGAIN !!! */ + SetPanelBackground(); + // SetDoorBackgroundImage(IMG_BACKGROUND_PANEL); + DrawBackground(DX, DY, DXSIZE, DYSIZE); +#else BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto, DOOR_GFX_PAGEX5, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY); +#endif /* redraw game control buttons */ #if 1 @@ -4539,8 +4546,24 @@ void InitGame() if (!game.restart_level) { /* copy default game door content to main double buffer */ +#if 1 +#if 1 + /* !!! CHECK AGAIN !!! */ + SetPanelBackground(); + // SetDoorBackgroundImage(IMG_BACKGROUND_PANEL); + DrawBackground(DX, DY, DXSIZE, DYSIZE); +#else + struct GraphicInfo *gfx = &graphic_info[IMG_BACKGROUND_PANEL]; + + /* (ClearRectangle() only needed if panel bitmap is smaller than panel) */ + ClearRectangle(drawto, DX, DY, DXSIZE, DYSIZE); + BlitBitmap(gfx->bitmap, drawto, gfx->src_x, gfx->src_y, + MIN(gfx->width, DXSIZE), MIN(gfx->height, DYSIZE), DX, DY); +#endif +#else BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto, DOOR_GFX_PAGEX5, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY); +#endif } SetPanelBackground(); @@ -8115,7 +8138,7 @@ void StartMoving(int x, int y) else if (Feld[x][y + 1] == EL_MAGIC_WALL_ACTIVE) { if (!MovDelay[x][y]) - MovDelay[x][y] = TILEY/4 + 1; + MovDelay[x][y] = TILEY / 4 + 1; if (MovDelay[x][y]) { @@ -8143,7 +8166,7 @@ void StartMoving(int x, int y) else if (Feld[x][y + 1] == EL_BD_MAGIC_WALL_ACTIVE) { if (!MovDelay[x][y]) - MovDelay[x][y] = TILEY/4 + 1; + MovDelay[x][y] = TILEY / 4 + 1; if (MovDelay[x][y]) { @@ -8171,7 +8194,7 @@ void StartMoving(int x, int y) else if (Feld[x][y + 1] == EL_DC_MAGIC_WALL_ACTIVE) { if (!MovDelay[x][y]) - MovDelay[x][y] = TILEY/4 + 1; + MovDelay[x][y] = TILEY / 4 + 1; if (MovDelay[x][y]) { @@ -13345,8 +13368,29 @@ void ScrollLevel(int dx, int dy) #else +#if NEW_TILESIZE +#if NEW_SCROLL + int softscroll_offset = (setup.soft_scrolling ? 2 * TILEX_VAR : 0); +#else + int softscroll_offset = (setup.soft_scrolling ? TILEX_VAR : 0); +#endif +#else +#if NEW_SCROLL + int softscroll_offset = (setup.soft_scrolling ? 2 * TILEX : 0); +#else int softscroll_offset = (setup.soft_scrolling ? TILEX : 0); +#endif +#endif +#if NEW_TILESIZE + BlitBitmap(drawto_field, drawto_field, + FX + TILEX_VAR * (dx == -1) - softscroll_offset, + FY + TILEY_VAR * (dy == -1) - softscroll_offset, + SXSIZE - TILEX_VAR * (dx != 0) + 2 * softscroll_offset, + SYSIZE - TILEY_VAR * (dy != 0) + 2 * softscroll_offset, + FX + TILEX_VAR * (dx == 1) - softscroll_offset, + FY + TILEY_VAR * (dy == 1) - softscroll_offset); +#else BlitBitmap(drawto_field, drawto_field, FX + TILEX * (dx == -1) - softscroll_offset, FY + TILEY * (dy == -1) - softscroll_offset, @@ -13355,6 +13399,8 @@ void ScrollLevel(int dx, int dy) FX + TILEX * (dx == 1) - softscroll_offset, FY + TILEY * (dy == 1) - softscroll_offset); #endif + +#endif #endif if (dx != 0)