diff --git a/Source/automap.cpp b/Source/automap.cpp index f30aa114f..e903d39aa 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -206,22 +206,23 @@ static void DrawAutomapTile(int sx, int sy, WORD automap_type) BYTE flags = automap_type >> 8; if (flags & MAPFLAG_DIRT) { - ENG_set_pixel(sx, sy, COLOR_DIM); - ENG_set_pixel(sx - AmLine8, sy - AmLine4, COLOR_DIM); - ENG_set_pixel(sx - AmLine8, sy + AmLine4, COLOR_DIM); - ENG_set_pixel(sx + AmLine8, sy - AmLine4, COLOR_DIM); - ENG_set_pixel(sx + AmLine8, sy + AmLine4, COLOR_DIM); - ENG_set_pixel(sx - AmLine16, sy, COLOR_DIM); - ENG_set_pixel(sx + AmLine16, sy, COLOR_DIM); - ENG_set_pixel(sx, sy - AmLine8, COLOR_DIM); - ENG_set_pixel(sx, sy + AmLine8, COLOR_DIM); - ENG_set_pixel(sx + AmLine8 - AmLine32, sy + AmLine4, COLOR_DIM); - ENG_set_pixel(sx - AmLine8 + AmLine32, sy + AmLine4, COLOR_DIM); - ENG_set_pixel(sx - AmLine16, sy + AmLine8, COLOR_DIM); - ENG_set_pixel(sx + AmLine16, sy + AmLine8, COLOR_DIM); - ENG_set_pixel(sx - AmLine8, sy + AmLine16 - AmLine4, COLOR_DIM); - ENG_set_pixel(sx + AmLine8, sy + AmLine16 - AmLine4, COLOR_DIM); - ENG_set_pixel(sx, sy + AmLine16, COLOR_DIM); + CelOutputBuffer out = GlobalBackBuffer(); + SetPixel(out, sx, sy, COLOR_DIM); + SetPixel(out, sx - AmLine8, sy - AmLine4, COLOR_DIM); + SetPixel(out, sx - AmLine8, sy + AmLine4, COLOR_DIM); + SetPixel(out, sx + AmLine8, sy - AmLine4, COLOR_DIM); + SetPixel(out, sx + AmLine8, sy + AmLine4, COLOR_DIM); + SetPixel(out, sx - AmLine16, sy, COLOR_DIM); + SetPixel(out, sx + AmLine16, sy, COLOR_DIM); + SetPixel(out, sx, sy - AmLine8, COLOR_DIM); + SetPixel(out, sx, sy + AmLine8, COLOR_DIM); + SetPixel(out, sx + AmLine8 - AmLine32, sy + AmLine4, COLOR_DIM); + SetPixel(out, sx - AmLine8 + AmLine32, sy + AmLine4, COLOR_DIM); + SetPixel(out, sx - AmLine16, sy + AmLine8, COLOR_DIM); + SetPixel(out, sx + AmLine16, sy + AmLine8, COLOR_DIM); + SetPixel(out, sx - AmLine8, sy + AmLine16 - AmLine4, COLOR_DIM); + SetPixel(out, sx + AmLine8, sy + AmLine16 - AmLine4, COLOR_DIM); + SetPixel(out, sx, sy + AmLine16, COLOR_DIM); } if (flags & MAPFLAG_STAIRS) { diff --git a/Source/engine.cpp b/Source/engine.cpp index b66e098be..5cc2c35e4 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -550,8 +550,9 @@ void DrawLine(int x0, int y0, int x1, int y1, BYTE col) sx = x0; sy = y0; + CelOutputBuffer out = GlobalBackBuffer(); for (i = 0; i <= steps; i++, sx += ix, sy += iy) { - ENG_set_pixel(sx, sy, col); + SetPixel(out, sx, sy, col); } } diff --git a/Source/engine.h b/Source/engine.h index 05b70dcaf..5d469271f 100644 --- a/Source/engine.h +++ b/Source/engine.h @@ -286,10 +286,6 @@ inline void CelBlitOutline(BYTE col, int sx, int sy, BYTE *pCelBuff, int nCel, i * @param col Color index from current palette */ void SetPixel(CelOutputBuffer out, int sx, int sy, BYTE col); -inline void ENG_set_pixel(int sx, int sy, BYTE col) -{ - return SetPixel(GlobalBackBuffer(), sx, sy, col); -} /** * @brief Blit CL2 sprite, to the back buffer at the given coordianates