From e58547b9d4e6b2dc697d5f232e80392911d533ab Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Mon, 18 Dec 2017 16:36:35 +0300 Subject: [PATCH] Revert "Expand drawHLineDma loop." This reverts commit 2da54945b6ac551f64a086a5c25847d963499856. --- src/tic.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/tic.c b/src/tic.c index eb749cf..869d8aa 100644 --- a/src/tic.c +++ b/src/tic.c @@ -215,17 +215,8 @@ static u8 getPixel(tic_machine* machine, s32 x, s32 y) static void drawHLineDma(tic_mem* memory, s32 xl, s32 xr, s32 y, u8 color) { - color = color << 4 | color; - if (xl >= xr) return; - if (xl & 1) { - tic_tool_poke4(&memory->ram.vram.screen.data, y * TIC80_WIDTH + xl, color); - xl++; - } - for(s32 x = xl; x + 1 < xr; x+=2) { - memory->ram.vram.screen.data[(y * TIC80_WIDTH + x) >> 1] = color; - } - if (xr & 1) { - tic_tool_poke4(&memory->ram.vram.screen.data, y * TIC80_WIDTH + xr - 1, color); + for(s32 x = xl; x < xr; ++x) { + tic_tool_poke4(&memory->ram.vram.screen.data, y * TIC80_WIDTH + x, color); } }