For Nikhil

Dependencies:   4DGL-uLCD-SE EthernetInterface Game_Synchronizer MMA8452 SDFileSystem mbed-rtos mbed wave_player

Fork of 2035_Tanks_Shell by ECE2035 Spring 2015 TA

globals/globals.cpp

Committer:
jford38
Date:
2015-10-26
Revision:
14:36c306e26317

File content as of revision 14:36c306e26317:

#include "globals.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;
}