#51511 - stevos - Sat Aug 20, 2005 9:36 pm
I've just read through the tonc tutorial and have written my first thing, a really simple unbeatable pong game.
So now I'm working on sprites. I'm on a Mac, and the utility posted on this site doesn't seem to work at all (maybe I'm tossing it the wrong image format). Anyway, I have code written to read the colors from any image format and convert them to the BGR15 format. I was planning on just generating a .c file to hold this data. But! If you download the tonc source and go to /code/gfx/gba_pic.c, it doesn't make any sense to me. So the gba_picData holds a bunch of unsigned ints which will actually be interpreted by the GBA as 4 bit quantities, which are then used as indecies into the lookup table gba_picPal. This is fine. But gba_picPal doesn't appear to hold color values, unless I'm reading it totally wrong.
Also, I understand that for 1D images you need to make tiles and then place them horizontally. How high/wide are the tiles supposed to be? 32x32? Or are they 32 high by however wide your sprite is?
Yeah, I'm dumb. I need this stuff to be spelled out to me. And maybe it was spelled out in tonc but I am too blind to see it! So thanks for help in advance guys.
When I get this done I will release this utility for sure (Mac).
So now I'm working on sprites. I'm on a Mac, and the utility posted on this site doesn't seem to work at all (maybe I'm tossing it the wrong image format). Anyway, I have code written to read the colors from any image format and convert them to the BGR15 format. I was planning on just generating a .c file to hold this data. But! If you download the tonc source and go to /code/gfx/gba_pic.c, it doesn't make any sense to me. So the gba_picData holds a bunch of unsigned ints which will actually be interpreted by the GBA as 4 bit quantities, which are then used as indecies into the lookup table gba_picPal. This is fine. But gba_picPal doesn't appear to hold color values, unless I'm reading it totally wrong.
Also, I understand that for 1D images you need to make tiles and then place them horizontally. How high/wide are the tiles supposed to be? 32x32? Or are they 32 high by however wide your sprite is?
Yeah, I'm dumb. I need this stuff to be spelled out to me. And maybe it was spelled out in tonc but I am too blind to see it! So thanks for help in advance guys.
When I get this done I will release this utility for sure (Mac).