#20081 - CyberSlag5k - Sat May 01, 2004 5:21 pm
I'm attempting to load some tiles into vram, only they are not loading correctly. Every other pixel appears white:
[Images not permitted - Click here to view it]
I was thinking the problem was that the data is stored in a 0xXX format instead of 0xXXXX but even switching converting the data for the first tile produced the same result for that tile.
to no avail. So perhaps the problem lies elsewhere? My data file looks like this:
I load the data in as such:
Halving the conditional value in the for loop that loads the tile data has no effect. I'm kind of at a loss here and don't know what else to try...
Any help would be appreciated.
_________________
When you find yourself in the company of a halfling and an ill-tempered Dragon, remember, you do not have to outrun the Dragon...
[Images not permitted - Click here to view it]
I was thinking the problem was that the data is stored in a 0xXX format instead of 0xXXXX but even switching converting the data for the first tile produced the same result for that tile.
to no avail. So perhaps the problem lies elsewhere? My data file looks like this:
Code: |
const short towerMap[1024] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 , 1, 1, 2, 3, 1, 1, 106, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 106, 106, 106, 1, 1, 1, 1, 36, 1, 1, 1, 1, 1 , 1, 106, 1, 3, 1, 1, 1, 1, 1, 3, 3, 3, 1, 1, 1, 1, 1, 106, 1, 1, 1, 1, 1, 1, 17, 1, 36, 36, 4, 1, 1, 1 ...... const unsigned short towerPalette[256] = { 0x7FFF, 0x67FF, 0x4FFF, 0x33FF, 0x1BFF, 0x03FF, 0x7F3F, 0x673F, 0x4F3F, 0x333F, 0x1B3F, 0x033F, 0x7E7F, 0x667F, 0x4E7F, 0x327F, 0x1A7F, 0x027F, 0x7D9F, 0x659F, 0x4D9F, 0x319F, 0x199F, 0x019F,..... const unsigned char towerTiles[18496] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE3, 0xE3, 0xE5, 0xE6, 0xE6, 0xE3, 0xE6, 0xE5, .... |
I load the data in as such:
Code: |
for(int i = 0; i < 256; i++) BGPaletteMem[i] = towerPalette[i]; for(int i = 0; i < 9248*2; i++) tileData[i] = towerTiles[i]; for(int i = 0; i < 512; i++) mapData[i] = (towerMap[i]; |
Halving the conditional value in the for loop that loads the tile data has no effect. I'm kind of at a loss here and don't know what else to try...
Any help would be appreciated.
_________________
When you find yourself in the company of a halfling and an ill-tempered Dragon, remember, you do not have to outrun the Dragon...