test avoid bulled game
Dependencies: C12832_lcd LCD_fonts mbed mbed-rtos
Diff: Converter.cpp
- Revision:
- 38:63b99151e218
- Parent:
- 36:b88fa8ff0be9
- Parent:
- 37:f5d98f22b6bd
- Child:
- 39:e8d6dd3c75c7
--- a/Converter.cpp Mon Dec 12 12:47:07 2016 +0000 +++ b/Converter.cpp Tue Dec 13 07:34:07 2016 +0000 @@ -4,7 +4,7 @@ #include "C12832_lcd.h" #include <math.h> -Bitmap Converter::convert(int map[][LCD_X]){ +char* Converter::convert(int map[][LCD_X]){ int len = LCD_Y*LCD_X/CHAR_SIZE; int count = 0; int tmp = 0; @@ -15,7 +15,8 @@ for(int i = 0; i < LCD_Y; i++){ for(int j = 0; j < LCD_X; j++){ int index = (i*LCD_X + j)/CHAR_SIZE; - char_map[index] |= map[i][j] << ((CHAR_SIZE - 1) - index % CHAR_SIZE); } + char_map[index] |= map[i][j] << ((CHAR_SIZE - 1) - index % CHAR_SIZE); + } } //return char_map; Bitmap bitmap_converted = { @@ -24,5 +25,6 @@ LCD_X/CHAR_SIZE, char_map, }; - return bitmap_converted; + //return bitmap_converted; + return char_map; }