Here is a tile image function converted to DGSDK from DBPRO.. the code originally was written by scraggle - found here:
http://developer.thegamecreators.com/?m=codebase_view&i=a47a35b12fe3795bb2b67e84faca417a
and the DGSDK code here:
void TileImage(char *filename,int across,int down,int imagenumber,int bitmap)
{
dbLoadBitmap(filename,bitmap);
dbSetCurrentBitmap(bitmap);
int ScaleX = dbBitmapWidth(bitmap) / across;
int ScaleY = dbBitmapHeight(bitmap) / down;
for(int y=0; y < down-1; y++)
{
for(int x=0; x < across-1; x++)
{
dbGetImage(imagenumber,x * ScaleX,y * ScaleY,x * ScaleX + ScaleX,y * ScaleY + ScaleY, 1);
imagenumber++;
}
}
dbDeleteBitmap(bitmap);
dbSetCurrentBitmap(0);
}
I didn't know if I could post SDK code here, so I did anyway...mod please move to the right place if its wrong.. .
I needed this function, so I guess you guys will as well
..
Thanks scraggle..