From 47f7bf2985f96ff3865cb8084e66aed3e7166e74 Mon Sep 17 00:00:00 2001 From: MonstersGoBoom Date: Mon, 4 Jun 2018 14:49:46 -0400 Subject: [PATCH 1/2] fix for width UV bug with textri --- src/tic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tic.c b/src/tic.c index 4a1d852..9ed471d 100644 --- a/src/tic.c +++ b/src/tic.c @@ -1072,7 +1072,7 @@ static void api_textri(tic_mem* tic, float x1, float y1, float x2, float y2, flo // are we drawing from the map . ok then at least check before the inner loop if (use_map == true) { - for (s32 x = left; x <= right; ++x) + for (s32 x = left; x = right; ++x) { enum { MapWidth = TIC_MAP_WIDTH * TIC_SPRITESIZE, MapHeight = TIC_MAP_HEIGHT * TIC_SPRITESIZE }; s32 iu = (u >> 16) % MapWidth; @@ -1092,7 +1092,7 @@ static void api_textri(tic_mem* tic, float x1, float y1, float x2, float y2, flo else { // direct from tile ram - for (s32 x = left; x <= right; ++x) + for (s32 x = left; x < right; ++x) { enum{SheetWidth = TIC_SPRITESHEET_SIZE, SheetHeight = TIC_SPRITESHEET_SIZE * TIC_SPRITE_BANKS}; s32 iu = (u>>16) & (SheetWidth - 1); From 54ee18d933b8c33c7f05634b45d152fd9b057764 Mon Sep 17 00:00:00 2001 From: MonstersGoBoom Date: Mon, 4 Jun 2018 16:29:55 -0400 Subject: [PATCH 2/2] fixed typo --- src/tic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tic.c b/src/tic.c index 9ed471d..8e21f16 100644 --- a/src/tic.c +++ b/src/tic.c @@ -1072,7 +1072,7 @@ static void api_textri(tic_mem* tic, float x1, float y1, float x2, float y2, flo // are we drawing from the map . ok then at least check before the inner loop if (use_map == true) { - for (s32 x = left; x = right; ++x) + for (s32 x = left; x < right; ++x) { enum { MapWidth = TIC_MAP_WIDTH * TIC_SPRITESIZE, MapHeight = TIC_MAP_HEIGHT * TIC_SPRITESIZE }; s32 iu = (u >> 16) % MapWidth;