#43296 - _Dan - Sat May 21, 2005 6:34 pm
Hello!
I've just started coding for my GBA and it's all very exciting but I have a problem.
I've wrote some code turn a bitmap into a .h file (as a C array), and it's working, however, when I use the images in my GBA program, some of the brighter areas of the graphics appear too bright...an example:
The original:
[Images not permitted - Click here to view it]
The GBA version:
[Images not permitted - Click here to view it]
The code I use to convert colours is:
unsigned short int colour = ((r>>3) | ((g>>3)<<5) | ((b>>3)<<10));
Where r,g,b are the colour componants from a 24 bitmap. And "colour" is the two byte GBA pixel.
Can anyone tell me why it's so bright?
(it's not because it's in an emulator or anything is it?)
I am using mode 3 which I think is correct:
Any help appreciated!
Thanks.
I've just started coding for my GBA and it's all very exciting but I have a problem.
I've wrote some code turn a bitmap into a .h file (as a C array), and it's working, however, when I use the images in my GBA program, some of the brighter areas of the graphics appear too bright...an example:
The original:
[Images not permitted - Click here to view it]
The GBA version:
[Images not permitted - Click here to view it]
The code I use to convert colours is:
unsigned short int colour = ((r>>3) | ((g>>3)<<5) | ((b>>3)<<10));
Where r,g,b are the colour componants from a 24 bitmap. And "colour" is the two byte GBA pixel.
Can anyone tell me why it's so bright?
(it's not because it's in an emulator or anything is it?)
I am using mode 3 which I think is correct:
Code: |
unsigned short *video = (unsigned short *)0x6000000;
*(unsigned long *)0x4000000 = (0x3 | 0x400); // set video mode 3 (240x160 16-bit) |
Any help appreciated!
Thanks.