From a60a33c204fa2af19890651e4a6c3c8e1e1efb31 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Mon, 7 Nov 2011 00:06:17 +0000 Subject: [PATCH] Tilemap mode works, and it's faster than I thought possible. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1858 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/buttons.c | 1 + src/graph.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/buttons.c b/src/buttons.c index 0d37214d..741546d5 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -4541,6 +4541,7 @@ void Button_Effects(void) Display_effect_sprite(EFFECTS_SPRITE_GRID, C2+1,77); Display_effect_sprite(EFFECTS_SPRITE_TILING, C2+1,96); Display_effect_sprite(EFFECTS_SPRITE_8BIT, 177+1,20); + Display_effect_sprite(EFFECTS_SPRITE_TILING,177+1,39); Display_effect_states(); Print_in_window(12,117,"click: Left:Switch / Right:Edit",MC_Dark,MC_Light); diff --git a/src/graph.c b/src/graph.c index bc37a181..f4c024d1 100644 --- a/src/graph.c +++ b/src/graph.c @@ -2746,7 +2746,16 @@ void Display_pixel(word x,word y,byte color) && (!((Mask_mode) && (Mask_table[Read_pixel_from_spare_screen(x,y)]))) ) { color=Effect_function(x,y,color); - Pixel_in_current_screen(x,y,color,1); + if (Tilemap_mode) + { + int xx,yy; + for (yy=(y-Snap_offset_Y)%Snap_height+Snap_offset_Y;yy=Limit_top&&yy<=Limit_bottom&&xx>=Limit_left&&xx<=Limit_right); + Update_rect(0,0,0,0); + } + else + Pixel_in_current_screen(x,y,color,1); } }