Users browsing this thread: 1 Guest(s)
Ripping/converting .obm files (iOS)
#7
Ah, awesome! That confused me for a bit but looks like it's RGB555 with the last (least significant) bit being the alpha value. The only colour which has this at 0 should usually be the first one (although if this system exists then maybe not always).

Strangely though, TiledGGD says it's read as big-endian RGB. However when looking at the palette myself, I had to read it as little-endian to get the proper values. I looked at the TiledGGD source code and it actually seems to be reading palettes backwards, i.e. big-endian as little-endian and vice versa:


Code:
case PaletteFormat.FORMAT_2BPP:
                       if (bendian)
                       {
                           b1 = (uint)data[1];
                           b2 = (uint)data[0];
                       }
                       else
                       {
                           b1 = (uint)data[0];
                           b2 = (uint)data[1];
                       }
                       bt = (b1 << 8) | b2;

The wiki (on Google Code) also states:

Quote:99 out of 100 (if not more) of the games have their data stored BigEndian; which means that the bytes that provide the most information are stored at the end of a set of bytes.

Weird. He might just be confused? But whatever, looks like you got it sorted so well done Smile
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by:


Messages In This Thread
RE: Ripping/converting .obm files (iOS) - by Dazz - 11-04-2014, 05:50 AM
RE: Ripping/converting .obm files (iOS) - by puggsoy - 11-06-2014, 04:10 PM
RE: Ripping/converting .obm files (iOS) - by Ton - 11-07-2014, 09:50 AM
RE: Ripping/converting .obm files (iOS) - by Dazz - 11-07-2014, 10:06 AM
RE: Ripping/converting .obm files (iOS) - by Ton - 11-07-2014, 12:42 PM

Forum Jump: