X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FMainForm.c;h=d33191d69d585ea4b62a522164c8d11c107e750a;hb=a295976063bf04d6e7ee2d04d238235aac05bf92;hp=d612a6c6a8ab4576181fc9b771191f3cf6014837;hpb=475d747d7f6122bf9b62ccf1518fc7e8fc0f201c;p=rocksndiamonds.git diff --git a/src/game_sp/MainForm.c b/src/game_sp/MainForm.c index d612a6c6..d33191d6 100644 --- a/src/game_sp/MainForm.c +++ b/src/game_sp/MainForm.c @@ -78,21 +78,27 @@ static void DrawFrame(int Delta) RX = FieldWidth - Delta; BY = FieldHeight - Delta; - DrawImage(LX, tY, imgFrameCorner); - DrawImage(LX, BY, imgFrameCorner); - DrawImage(RX, tY, imgFrameCorner); - DrawImage(RX, BY, imgFrameCorner); + DrawImage(LX, tY, (Delta > 0 ? imgFrameCorner : aniSpace)); + DrawImage(LX, BY, (Delta > 0 ? imgFrameCorner : aniSpace)); + DrawImage(RX, tY, (Delta > 0 ? imgFrameCorner : aniSpace)); + DrawImage(RX, BY, (Delta > 0 ? imgFrameCorner : aniSpace)); for (i = LX + 1; i <= RX - 1; i++) { - DrawImage(i, tY, imgFrameHorizontal); - DrawImage(i, BY, imgFrameHorizontal); + DrawImage(i, tY, (Delta > 0 ? imgFrameHorizontal : aniSpace)); + DrawImage(i, BY, (Delta > 0 ? imgFrameHorizontal : aniSpace)); } for (i = tY + 1; i <= BY - 1; i++) { - DrawImage(LX, i, imgFrameVertical); - DrawImage(RX, i, imgFrameVertical); + DrawImage(LX, i, (Delta > 0 ? imgFrameVertical : aniSpace)); + DrawImage(RX, i, (Delta > 0 ? imgFrameVertical : aniSpace)); + } + + if (Delta > 0) + { + // ... + // ClearRectangle(bitmap_db_field_sp, } } @@ -181,14 +187,30 @@ static void ReStretch() void SetScrollEdges() { +#if NEW_TILESIZE +#if 0 + int pseudo_sxsize = SXSIZE * TILESIZE / TILESIZE_VAR; + int pseudo_sysize = SYSIZE * TILESIZE / TILESIZE_VAR; +#endif +#endif int border1_offset = (menBorder ? 1 : 2); int border2_offset = (menBorder ? 0 : TILESIZE / 2); /* scroll correction for border frame (1 tile) or border element (2 tiles) */ ScrollMinX = 0; ScrollMinY = 0; +#if NEW_TILESIZE +#if 1 + ScrollMaxX = (DisplayMaxX + border1_offset - SCR_FIELDX) * TILEX; + ScrollMaxY = (DisplayMaxY + border1_offset - SCR_FIELDY) * TILEY; +#else + ScrollMaxX = (DisplayMaxX + border1_offset) * TILEX - pseudo_sxsize; + ScrollMaxY = (DisplayMaxY + border1_offset) * TILEY - pseudo_sysize; +#endif +#else ScrollMaxX = (DisplayMaxX + border1_offset) * TILEX - SXSIZE; ScrollMaxY = (DisplayMaxY + border1_offset) * TILEY - SYSIZE; +#endif /* scroll correction for border element (half tile on left and right side) */ ScrollMinX += border2_offset;