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.
Dependencies: mbed FATFileSystem
CaMove/CaMove.h@4:34bf3587cf42, 2019-04-18 (annotated)
- Committer:
- rottenegg
- Date:
- Thu Apr 18 21:44:05 2019 +0000
- Revision:
- 4:34bf3587cf42
- Child:
- 5:860087ff295e
Added CaMove as a Character Movement and Interaction System that manages the moving animation and the Item Interaction Regions. WDplayer has been Documented and Flepaths File was added. CaMove Require Documenting
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rottenegg | 4:34bf3587cf42 | 1 | #ifndef CAMOVE_H |
| rottenegg | 4:34bf3587cf42 | 2 | #define CAMOVE_H |
| rottenegg | 4:34bf3587cf42 | 3 | |
| rottenegg | 4:34bf3587cf42 | 4 | #include "mbed.h" |
| rottenegg | 4:34bf3587cf42 | 5 | #include "N5110.h" |
| rottenegg | 4:34bf3587cf42 | 6 | #include "Bitmap.h" |
| rottenegg | 4:34bf3587cf42 | 7 | #include <vector> |
| rottenegg | 4:34bf3587cf42 | 8 | |
| rottenegg | 4:34bf3587cf42 | 9 | enum Direction {Lt,Rt,Fd,Bd}; |
| rottenegg | 4:34bf3587cf42 | 10 | |
| rottenegg | 4:34bf3587cf42 | 11 | class CaMove { |
| rottenegg | 4:34bf3587cf42 | 12 | public: |
| rottenegg | 4:34bf3587cf42 | 13 | CaMove(PinName pin); |
| rottenegg | 4:34bf3587cf42 | 14 | ~CaMove(); |
| rottenegg | 4:34bf3587cf42 | 15 | void CMmove(N5110 &lcd, AnalogIn &hoz, AnalogIn &ver); |
| rottenegg | 4:34bf3587cf42 | 16 | void set_region(int xmin, int ymax, int xl, int yl); |
| rottenegg | 4:34bf3587cf42 | 17 | void delete_regions(); |
| rottenegg | 4:34bf3587cf42 | 18 | void intercheck(); |
| rottenegg | 4:34bf3587cf42 | 19 | bool get_Trig(); |
| rottenegg | 4:34bf3587cf42 | 20 | bool inscreen(); |
| rottenegg | 4:34bf3587cf42 | 21 | private: |
| rottenegg | 4:34bf3587cf42 | 22 | Direction Faceing; |
| rottenegg | 4:34bf3587cf42 | 23 | int _h; |
| rottenegg | 4:34bf3587cf42 | 24 | int _v; |
| rottenegg | 4:34bf3587cf42 | 25 | short int _itr; |
| rottenegg | 4:34bf3587cf42 | 26 | std::vector<int> intereact; |
| rottenegg | 4:34bf3587cf42 | 27 | InterruptIn _check; |
| rottenegg | 4:34bf3587cf42 | 28 | volatile int tregion; |
| rottenegg | 4:34bf3587cf42 | 29 | volatile bool Trig; |
| rottenegg | 4:34bf3587cf42 | 30 | |
| rottenegg | 4:34bf3587cf42 | 31 | }; |
| rottenegg | 4:34bf3587cf42 | 32 | |
| rottenegg | 4:34bf3587cf42 | 33 | #endif |