Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Engine/engine.h@2:cc9d8ec2e1f4, 2020-05-15 (annotated)
- Committer:
- Neowless
- Date:
- Fri May 15 17:44:25 2020 +0000
- Revision:
- 2:cc9d8ec2e1f4
- Parent:
- 1:48b0bf0bcda8
- Child:
- 3:31ff7b3e2005
test;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Neowless | 1:48b0bf0bcda8 | 1 | #ifndef ENGINE_H |
| Neowless | 1:48b0bf0bcda8 | 2 | #define ENGINE_H |
| Neowless | 1:48b0bf0bcda8 | 3 | |
| Neowless | 2:cc9d8ec2e1f4 | 4 | #include "chara.h" |
| Neowless | 1:48b0bf0bcda8 | 5 | #include "life.h" |
| Neowless | 1:48b0bf0bcda8 | 6 | #include "Bitmap.h" |
| Neowless | 1:48b0bf0bcda8 | 7 | #include "N5110.h" |
| Neowless | 1:48b0bf0bcda8 | 8 | #include "Gamepad.h" |
| Neowless | 1:48b0bf0bcda8 | 9 | |
| Neowless | 1:48b0bf0bcda8 | 10 | |
| Neowless | 2:cc9d8ec2e1f4 | 11 | struct obs{ |
| Neowless | 1:48b0bf0bcda8 | 12 | int x; |
| Neowless | 1:48b0bf0bcda8 | 13 | int y; |
| Neowless | 1:48b0bf0bcda8 | 14 | int width; |
| Neowless | 1:48b0bf0bcda8 | 15 | int height; |
| Neowless | 1:48b0bf0bcda8 | 16 | int *data; |
| Neowless | 1:48b0bf0bcda8 | 17 | }; |
| Neowless | 2:cc9d8ec2e1f4 | 18 | |
| Neowless | 1:48b0bf0bcda8 | 19 | |
| Neowless | 1:48b0bf0bcda8 | 20 | enum events{ |
| Neowless | 1:48b0bf0bcda8 | 21 | DEAD, |
| Neowless | 1:48b0bf0bcda8 | 22 | FIRE, |
| Neowless | 1:48b0bf0bcda8 | 23 | ELMININATE, |
| Neowless | 1:48b0bf0bcda8 | 24 | NONE, |
| Neowless | 1:48b0bf0bcda8 | 25 | }; |
| Neowless | 1:48b0bf0bcda8 | 26 | class engine{ |
| Neowless | 1:48b0bf0bcda8 | 27 | public: |
| Neowless | 1:48b0bf0bcda8 | 28 | void init(); |
| Neowless | 2:cc9d8ec2e1f4 | 29 | events evet_check(chara &p, obs &b, Gamepad &pad); |
| Neowless | 2:cc9d8ec2e1f4 | 30 | void fire(int x,int y); |
| Neowless | 2:cc9d8ec2e1f4 | 31 | int randomobs(); |
| Neowless | 1:48b0bf0bcda8 | 32 | }; |
| Neowless | 1:48b0bf0bcda8 | 33 | #endif |
| Neowless | 1:48b0bf0bcda8 | 34 |