From 37d93c2808e1c7ba8cb761fedf96962ee12acdd5 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Wed, 6 Dec 2017 10:35:43 +0300 Subject: [PATCH] DRAW_TILE_BODY breaks Windows build? #442 --- src/tic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tic.c b/src/tic.c index 2af04ce..901d65c 100644 --- a/src/tic.c +++ b/src/tic.c @@ -245,7 +245,7 @@ static void drawRectBorder(tic_machine* machine, s32 x, s32 y, s32 width, s32 he drawVLine(machine, x + width - 1, y, height, color); } -#define DRAW_TILE_BODY(INDEX_EXPR) {\ +#define DRAW_TILE_BODY(INDEX_EXPR) do {\ for(s32 py=sy; py < ey; py++, y++) \ { \ s32 xx = x; \ @@ -255,7 +255,7 @@ static void drawRectBorder(tic_machine* machine, s32 x, s32 y, s32 width, s32 he if(color != 255) machine->state.setpix(&machine->memory, xx, y, color); \ } \ } \ - } + } while(0) #define REVERT(X) (TIC_SPRITESIZE - 1 - (X)) #define INDEX_XY(X, Y) ((Y) * TIC_SPRITESIZE + (X))