test avoid bulled game

Dependencies:   C12832_lcd LCD_fonts mbed mbed-rtos

Revision:
37:f5d98f22b6bd
Parent:
33:442498e281b1
Child:
38:63b99151e218
--- a/main.cpp	Mon Dec 12 11:50:33 2016 +0000
+++ b/main.cpp	Tue Dec 13 02:02:50 2016 +0000
@@ -41,7 +41,7 @@
     for(int i = 0; i < LCD_Y; i++){
         for(int j = 0; j < LCD_X ; j++){
             if(wall_height[i] > (LCD_Y - 1 - j)){
-                white_board[i][j] = white_board[i][j] ^ 1;
+                white_board[i][j] = 1;
             }
         }
     }
@@ -104,6 +104,8 @@
     int gameOver = 0;
     srand((int)(aIn * 100));
     Converter converter();
+    int len = LCD_Y*LCD_X/8;
+    char char_map[len];
 //    Bitmap picture;
     
     while(true){
@@ -117,10 +119,16 @@
         //printf("bullet  x: %d,  y: %d \n", p_bullet.x,p_bullet.y);
 //        printf("person  x: %d,  y: %d \n", p_person.x,p_person.y);
         corrision_judge(p_person, p_bullet);
-        Bitmap picture = converter.convert(white_board);
+        Bitmap bitmap_converted = {
+             LCD_X,
+             LCD_Y,
+            LCD_X/8,
+            char_map,
+         };
         update_mtx.unlock();
         lcd.cls();
         lcd.print_bm(bitmPlayer,p_person.x,p_person.y);
+        lcd.print_bm(bitmap_converted,0,0);
         if(b != NULL){
             lcd.print_bm(bitmBullet_graphics, p_bullet.x, p_bullet.y);
         }
@@ -128,6 +136,7 @@
         wait(0.02);
         lcd.cls();
         lcd.print_bm(bitmPlayerB,p_person.x,p_person.y);
+        lcd.print_bm(bitmap_converted,0,0);
         if(b != NULL){
             lcd.print_bm(bitmBullet_graphics, p_bullet.x, p_bullet.y);
         }