#49211 - NighTiger - Wed Jul 27, 2005 9:21 am
Hi guys,
I did read that the gba saves the colors information in BGR format, in
2 bytes where every variable takes 5 bit and the most important bit
is not checked.
So if We want a RGB format We need to apply the following code to the
variables
(r | (g<<5) | (b<<10))
I know how the left-shift works and how the logical-OR works , but I
can't understand how the compilator works to make the correct format.
Can anybody help me to understand that?
tnx
I did read that the gba saves the colors information in BGR format, in
2 bytes where every variable takes 5 bit and the most important bit
is not checked.
Code: |
X B B B B B G G G G G R R R R R F E D C B A 9 8 7 6 5 4 3 2 1 0 |
So if We want a RGB format We need to apply the following code to the
variables
(r | (g<<5) | (b<<10))
I know how the left-shift works and how the logical-OR works , but I
can't understand how the compilator works to make the correct format.
Can anybody help me to understand that?
tnx