For Nikhil
Dependencies: 4DGL-uLCD-SE EthernetInterface Game_Synchronizer MMA8452 SDFileSystem mbed-rtos mbed wave_player
Fork of 2035_Tanks_Shell by
misc/misc.cpp
- Committer:
- jford38
- Date:
- 2015-10-29
- Revision:
- 20:6a58052b0140
- Parent:
- globals/globals.cpp@ 14:36c306e26317
- Child:
- 22:3c68eea5a609
File content as of revision 20:6a58052b0140:
#include "misc.h" int CONVERT_24_TO_16_BPP(int col_24) { int b = col_24 & 0xFF; int g = (col_24 >> 8) & 0xFF; int r = (col_24 >> 16)& 0xFF; r >>= 3; g >>= 2; b >>= 3; return r<<11 | g<<5 | b; }