The 16bit_color_bmp uses grit instead of gfx2gba.exe and GBACrusher.exe. Also there is this code from ToD in background.cpp that I'm unable to understand.
Code: Select all
int getSize(uint8 * source, uint16 * dest, uint32 r2)
{
u32 size = *((u32*)source) >> 8;
return (size<<8) | 16;
}
Code: Select all
int getHeader(uint8 *source, uint16 *dest, uint32 arg) {
return *(uint32*)source;
}
Code: Select all
int getHeader(uint8 *source, uint16 *dest, uint32 arg) {
return *(uint32*)source;
}
uint8 readByte(uint8 *source) {
return *source;
}
TDecompressionStream decomStream = {
getHeader,
0,
readByte
};
swiDecompressLZSSVram((void*)data, (void*)dst, 0, &decomStream);
Could you explain what those shifts and OR are doing in getSize? I haven't done much low level memory programming so they are beyond me.
The reason I'm asking about this is I plan to make something in a rpg style and was hoping to make it work in a emulator so that people without a flash cart could play it. I'm assuming compression is important in a game with many sprites. I don't completely understand the memory limits yet.