Basic game using accelerometer and LCD screen. You can move and dodge asteroids coming from both left and right. There is no scoring at the moment.
Dependencies: C12832 FXOS8700Q mbed-rtos mbed
main.h@1:c6734b909bf0, 2016-02-16 (annotated)
- Committer:
- co838_gtvl2
- Date:
- Tue Feb 16 22:25:42 2016 +0000
- Revision:
- 1:c6734b909bf0
- Parent:
- 0:9ec880239b3c
Added boost by pressing the joystick on the shield.; Added mutex to have a better stability.; Still a bug when the game stays for too long. :(
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
co838_gtvl2 | 0:9ec880239b3c | 1 | #ifndef _MAIN_H_ |
co838_gtvl2 | 0:9ec880239b3c | 2 | # define _MAIN_H_ |
co838_gtvl2 | 0:9ec880239b3c | 3 | |
co838_gtvl2 | 0:9ec880239b3c | 4 | # include "mbed.h" |
co838_gtvl2 | 0:9ec880239b3c | 5 | # include "rtos.h" |
co838_gtvl2 | 0:9ec880239b3c | 6 | # include "C12832.h" |
co838_gtvl2 | 0:9ec880239b3c | 7 | # include "FXOS8700Q.h" |
co838_gtvl2 | 0:9ec880239b3c | 8 | |
co838_gtvl2 | 0:9ec880239b3c | 9 | # define DISPLAY_X 127 |
co838_gtvl2 | 0:9ec880239b3c | 10 | # define DISPLAY_Y 31 |
co838_gtvl2 | 0:9ec880239b3c | 11 | # define DELTA_MOVE 1000.0f |
co838_gtvl2 | 0:9ec880239b3c | 12 | # define DELTA_TIME 100 |
co838_gtvl2 | 0:9ec880239b3c | 13 | # define START_THREAD 999 |
co838_gtvl2 | 1:c6734b909bf0 | 14 | # define MAX_ASTEROID_NBS 50 |
co838_gtvl2 | 1:c6734b909bf0 | 15 | # define GENERATION_CYCLES 5 |
co838_gtvl2 | 0:9ec880239b3c | 16 | |
co838_gtvl2 | 0:9ec880239b3c | 17 | // # define _DEBUG |
co838_gtvl2 | 0:9ec880239b3c | 18 | # undef _DEBUG |
co838_gtvl2 | 0:9ec880239b3c | 19 | |
co838_gtvl2 | 1:c6734b909bf0 | 20 | # if defined _DEBUG |
co838_gtvl2 | 1:c6734b909bf0 | 21 | extern Serial host; |
co838_gtvl2 | 1:c6734b909bf0 | 22 | # endif |
co838_gtvl2 | 1:c6734b909bf0 | 23 | |
co838_gtvl2 | 0:9ec880239b3c | 24 | #endif /* _MAIN_H_ */ |