X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame_sp%2FMainForm.c;h=f44177c7f6bab040dac44d392e4e172ef449a597;hp=1c93dc26e7627ceddfb38fc49cc6d57b975e0154;hb=18863a5655e9e07d548e2d673e7f82336703c8fb;hpb=f926e522aef77158e0011ae5ad2cf8805509d6d1 diff --git a/src/game_sp/MainForm.c b/src/game_sp/MainForm.c index 1c93dc26..f44177c7 100644 --- a/src/game_sp/MainForm.c +++ b/src/game_sp/MainForm.c @@ -1652,6 +1652,35 @@ static void Form_Resize() #endif +#if 1 + +static void DrawFrame(int Delta) +{ + int i, LX, tY, RX, BY; + + LX = -1 + Delta; + tY = -1 + Delta; + RX = FieldWidth - Delta; + BY = FieldHeight - Delta; + DrawImage(LX, tY, imgFrameCorner); + DrawImage(LX, BY, imgFrameCorner); + DrawImage(RX, tY, imgFrameCorner); + DrawImage(RX, BY, imgFrameCorner); + for (i = LX + 1; i <= RX - 1; i++) + { + DrawImage(i, tY, imgFrameHorizontal); + DrawImage(i, BY, imgFrameHorizontal); + } + + for (i = tY + 1; i <= BY - 1; i++) + { + DrawImage(LX, i, imgFrameVertical); + DrawImage(RX, i, imgFrameVertical); + } +} + +#else + static void DrawFrame(int Delta) { int i, LX, tY, RX, BY; @@ -1677,6 +1706,8 @@ static void DrawFrame(int Delta) } } +#endif + static void RestoreFrame() { int i, LX, tY, RX, BY; @@ -3283,11 +3314,22 @@ void DrawFieldNoAnimated(int X, int Y) } } +#if 1 + +void DrawImage(int X, int Y, int graphic) +{ + StretchedSprites.BltImg(StretchWidth * X, StretchWidth * Y, graphic, 0); +} + +#else + void DrawSprite(int X, int Y, int SpritePos) { StretchedSprites.BltEx(StretchWidth * X, StretchWidth * Y, SpritePos); } +#endif + #if 0 void InvalidateRect(long XMin, long YMin, long XMax, long YMax)