Drawing image 0 is fine so it looks like the height and width are correct. But other images (when fU and fV are not zero) don't appear correctly.
Any ideas?
Code: Select all
int nX = nImage % 32;
int nY = nImage / 32;
float fU = (1.0f/32.0f) * (float)nX;
float fV = (1.0f/32.0f) * (float)nY;
float fUWidth = 1.0f/32.0f;
float fUHeight = 1.0f/32.0f;
InterfaceTexturedRect(
0, gnSpritesOverlay,
nScreenX, nScreenY,
16, 16,
0xFFFFFFFF,
fU, fV,
fUWidth, fUHeight );
Code: Select all
InterfaceSprite(
0, gnSpritesOverlay,
nScreenX, nScreenY,
1.0f/32.0f,
nImage,
0xFFFFFFFF,
0.0f, 0.0f );