Shell code for the Tanks game

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

Revision:
20:6a58052b0140
Parent:
14:36c306e26317
Child:
22:3c68eea5a609
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/misc.cpp	Thu Oct 29 02:21:11 2015 +0000
@@ -0,0 +1,13 @@
+#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;
+}
\ No newline at end of file