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
This commit is contained in:
Yves Rizoud 2011-11-07 00:06:17 +00:00
parent 1b4b242a06
commit a60a33c204
2 changed files with 11 additions and 1 deletions

View File

@ -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);

View File

@ -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<Main_image_height;yy+=Snap_height)
for (xx=(x-Snap_offset_X)%Snap_width+Snap_offset_X;xx<Main_image_width;xx+=Snap_width)
Pixel_in_current_screen(xx,yy,color,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);
}
}