(I searched the forum but didn't surprisingly find anything about that)
I always thought the GP32 has 65536 colours (it's even written on the gamepark package), but starting coding in 16 Bit mode I discovered that via the macro (from CHN's source code)
#define GP_RGB24(r,g,B) (((((r>>3))&0x1f)<<11)|((((g>>3))&0x1f)<<6)|((((b>>3))&0x1f)<<1))
you only get 5 bit for red, 5 bit for green, 5 bit for blue, the very first bit is unused (5-5-5-0 format).
That are only 2^15 = 32*32*32 = 32768 colours.
So I tried to verify and switched bit 0 on/off in a loop, but I couldn't see any difference in colour shade on my GP32.
Is CHN's macro wrong(actually it works quite good except for that possible 1 bit loss...) or what's the correct colour format?
I always thought the GP32 has 65536 colours (it's even written on the gamepark package), but starting coding in 16 Bit mode I discovered that via the macro (from CHN's source code)
#define GP_RGB24(r,g,B) (((((r>>3))&0x1f)<<11)|((((g>>3))&0x1f)<<6)|((((b>>3))&0x1f)<<1))
you only get 5 bit for red, 5 bit for green, 5 bit for blue, the very first bit is unused (5-5-5-0 format).
That are only 2^15 = 32*32*32 = 32768 colours.
So I tried to verify and switched bit 0 on/off in a loop, but I couldn't see any difference in colour shade on my GP32.
Is CHN's macro wrong(actually it works quite good except for that possible 1 bit loss...) or what's the correct colour format?