Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
With the following setup:

#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;

#GroupC         : export_gfx
#Palette        : xlibc
#Compression    : zx7
#Tilemap        : 40,40,true
#AppvarC        : TCDAT
#OutputInitCode : true

And using this image

I am unable to correctly decompress and display any tile other than tile 0. The line that reads

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.
You aren't doing anything wrong. This is a convpng bug. I'll fix it. In the meantime, github is a great place for posting issues like this because it really prompts developers to get things done. But here works totally fine too, thanks! Smile
Fixed and updated, along with an example in the toolchain (gfx_fullscreen_tiled_image) which demonstrates exactly what you want to do Smile

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum