Tile Image Function by Scraggle15th Dec 2003 4:20
|
---|
Summary A Function to tile images Description This is a simple fuction to cut an image into tiles. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com Function TileImage(filename$,across,down,imagenumber,bitmap) load bitmap filename$, bitmap set current bitmap bitmap ScaleX = bitmap width(bitmap) / across ScaleY = bitmap height(bitmap) / down for y = 0 to down-1 for x = 0 to across-1 get image imagenumber,x * ScaleX,y * ScaleY,x * ScaleX + ScaleX,y * ScaleY + ScaleY, 1 inc imagenumber next x next y delete bitmap bitmap set current bitmap 0 endfunction |