#97772 - iainprice - Fri Aug 11, 2006 1:56 pm
I have a 256*256 bitmap. I use Usenti and convert it to a c file as a tiled image with palette, tile group 16*16. I then copy the image into my program:
for(i = 0; i < 32768; i++)
SPRITE_GFX[i] = spritesTiles[i];
but when I index into the image to allocate the sprites, it only goes half way across the 256*256 and then starts on the left-hand side again.....
sprites[i].attribute[0] = ATTR0_COLOR_256 | ATTR0_SQUARE | ypos;
sprites[i].attribute[1] = ATTR1_SIZE_32 | xpos;
sprites[i].attribute[2] = ATTR2_ALPHA(1) | index;
where index is either 0, 8, 16 etc but it jumps to 128 for the next row 32 pixels down my 256*256...
Thius means I can only use 128*128 which is not many 32*32 sprites!
any ideas?
for(i = 0; i < 32768; i++)
SPRITE_GFX[i] = spritesTiles[i];
but when I index into the image to allocate the sprites, it only goes half way across the 256*256 and then starts on the left-hand side again.....
sprites[i].attribute[0] = ATTR0_COLOR_256 | ATTR0_SQUARE | ypos;
sprites[i].attribute[1] = ATTR1_SIZE_32 | xpos;
sprites[i].attribute[2] = ATTR2_ALPHA(1) | index;
where index is either 0, 8, 16 etc but it jumps to 128 for the next row 32 pixels down my 256*256...
Thius means I can only use 128*128 which is not many 32*32 sprites!
any ideas?