test avoid bulled game
Dependencies: C12832_lcd LCD_fonts mbed mbed-rtos
Revision 16:1104089ff3cb, committed 2016-12-09
- Comitter:
- th_mbed
- Date:
- Fri Dec 09 13:46:34 2016 +0000
- Parent:
- 15:400760117d9d
- Parent:
- 14:5da230069776
- Child:
- 20:1dc1560a4902
- Commit message:
- add Stage model
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GraphicBuilder.cpp Fri Dec 09 13:46:34 2016 +0000 @@ -0,0 +1,22 @@ +#include "integrate_graphics.h" +#include "point.h" +#include "graphics.h" +#include "C12832_lcd.h" +#include "models.h" + +Bitmap GraphicBuilder::integrateBitmap(point pe, point bu, point st[]) +{ + int cnt; + for(int i=0;i<bitmPlayer.ySize;i++) + map[pe.x+(pe.y+i)*LCD_X]=Player[i]; + for(int i=0;i<bitmBullet_graphics.ySize;i++) + map[bu.x+(bu.y+i)*LCD_X]=Bullet_graphics[i]; + +// map = lcd.buffer; + + return bitmap_all; +} +void GraphicBuilder::init(){ + for (int i=0;i<LCD_X*LCD_Y;i++) + map[i]=0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/integrate_graphics.h Fri Dec 09 13:46:34 2016 +0000 @@ -0,0 +1,31 @@ +#ifndef integrate_H +#define integrate_H +#include "C12832_lcd.h" +#include "models.h" + + +class GraphicBuilder +{ +private: + point pe; + point bu; + point st[]; + Bitmap bitmap_all; + // char map[]; +public: + Bitmap integrateBitmap(point pe, point bu, point st[]); + void init(); + // char map[]; +}; + +static char map[] = { + }; + +Bitmap bitmap_all = { + LCD_X, + LCD_Y, + LCD_X/8, + map, +}; + +#endif \ No newline at end of file