With the following setup:
Code:
Code:
And using this image
I am unable to correctly decompress and display any tile other than tile 0. The line that reads
Code:
has the constant varied to test varying tiles. Using 0 displays the proper tile, using 1 shows a garbled mess, and 2 results in a colorful crash. I stopped testing at that point.
What am I doing wrong?
This is obviously a test setup. The code that this was supposed to be used in is designed to display a fullscreen image one tile at a time. Each tile is assumed 40x40 pixels for a total of 48 tiles.
Code:
#include "gfx/TCDAT.h"
uint8_t tempimg[40*40+2];
void keywait(void) { while (!kb_AnyKey()); return; }
void waitanykey(void) { keywait(); while (kb_AnyKey()); keywait(); }
void main(void) {
uint8_t i;
if (!TCDAT_init()) return;
gfx_Begin();
gfx_SetDrawBuffer();
gfx_FillScreen(0);
dzx7_Turbo(cardmat2_tiles_compressed[1],tempimg);
gfx_Sprite_NoClip((gfx_sprite_t*)tempimg,0,0);
gfx_SwapDraw();
waitanykey();
gfx_End();
}
Code:
#GroupC : export_gfx
#Palette : xlibc
#Compression : zx7
#Tilemap : 40,40,true
#NoPaletteArray
cardmat2
#AppvarC : TCDAT
#OutputInitCode : true
cardmat2
And using this image
I am unable to correctly decompress and display any tile other than tile 0. The line that reads
Code:
dzx7_Turbo(cardmat2_tiles_compressed[1],tempimg);
What am I doing wrong?
This is obviously a test setup. The code that this was supposed to be used in is designed to display a fullscreen image one tile at a time. Each tile is assumed 40x40 pixels for a total of 48 tiles.