Tak łopatologicznie:
GML
w = sprite_get_width( tekstura );
h = sprite_get_height( tekstura );
mx = w * floor( image_xscale );
my = h * floor( image_yscale );
for( yy = 0; yy < my; yy += h )
{
for( xx = 0; xx < mx; xx += w )
{
draw_sprite( tekstura, 0, x + xx, y + yy );
}
}
px = image_xscale mod 1;
if( px != 0 )
{
wx = w * px;
for( yyy = 0; yyy < my; yyy += h )
{
draw_sprite_part( tekstura, 0, 0, 0, wx, h, xx + x, yyy + x );
}
}
py = image_yscale mod 1;
if( py != 0 )
{
hy = h * py;
for( xxx = 0; xxx < mx; xxx += w )
{
draw_sprite_part( tekstura, 0, 0, 0, w, hy, xxx + x, yy + x );
}
}
if( px != 0 && py != 0 )
{
draw_sprite_part( tekstura, 0, 0, 0, wx, hy, xx + x, yy + x );
}