Opps! Got the name of the function wrong. It's dbSetSpriteTextureCoord().
The following is a function to set the corner coordinates of an image that's applied to the sprite. It assumes that the image has already been assigned to the sprite.
void spriteSection(int spriteNum, float left, float top, float right, float bottom)
{
dbSetSpriteTextureCoord(spriteNumber, 0, left, top);
dbSetSpriteTextureCoord(spriteNumber, 1, right, top);
dbSetSpriteTextureCoord(spriteNumber, 2, left, bottom);
dbSetSpriteTextureCoord(spriteNumber, 3, right, bottom);
}
So, to tell sprite number 1 to use the upper left 1/16th section you call
spriteSection (1, 0.0f, 0.0f, 0.25f, 0.025f);
For sprite number 2 to use the same size section to the immediate right
spriteSection (2, 0.25f, 0.0f, 0.50f, 0.25f);
If sprite 5 was to use the section just below the first
spriteSection (5, 0.0f, 0.25f, 0.25, 0.50f);
This may also require you to resize your sprite to get the needed results.
Lilith, Night Butterfly
I'm not a programmer but I play one in the office