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: Gamepad N5110 Pokemon mbed
Fork of 2645_Game_Project_2 by
main.cpp@0:cd3f75767e71, 2017-04-20 (annotated)
- Committer:
- 200923317
- Date:
- Thu Apr 20 15:06:05 2017 +0000
- Revision:
- 0:cd3f75767e71
- Child:
- 1:af881f58c4f9
RESTART;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
200923317 | 0:cd3f75767e71 | 1 | #include "mbed.h" |
200923317 | 0:cd3f75767e71 | 2 | #include "Gamepad.h" |
200923317 | 0:cd3f75767e71 | 3 | #include "N5110.h" |
200923317 | 0:cd3f75767e71 | 4 | #include "Pokemon.h" |
200923317 | 0:cd3f75767e71 | 5 | |
200923317 | 0:cd3f75767e71 | 6 | //rewritten code to implement new/better ideas. part of the code is same as before but lots of changes were needed. |
200923317 | 0:cd3f75767e71 | 7 | |
200923317 | 0:cd3f75767e71 | 8 | //-------------------------------- objects ------------------------------------- |
200923317 | 0:cd3f75767e71 | 9 | N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); |
200923317 | 0:cd3f75767e71 | 10 | Gamepad pad; |
200923317 | 0:cd3f75767e71 | 11 | Pokemon pk; |
200923317 | 0:cd3f75767e71 | 12 | //--------------------------- Structs/Typedefs --------------------------------- |
200923317 | 0:cd3f75767e71 | 13 | struct joyInput { |
200923317 | 0:cd3f75767e71 | 14 | Direction d; //direction of joystick to navigate menu's |
200923317 | 0:cd3f75767e71 | 15 | }; |
200923317 | 0:cd3f75767e71 | 16 | |
200923317 | 0:cd3f75767e71 | 17 | typedef enum State {START, PARTNER, MENU, FIGHT, POKEMON, SETTINGS} Gamepage; |
200923317 | 0:cd3f75767e71 | 18 | //assigning names to different states |
200923317 | 0:cd3f75767e71 | 19 | |
200923317 | 0:cd3f75767e71 | 20 | void init(); |
200923317 | 0:cd3f75767e71 | 21 | void drawStart(); |
200923317 | 0:cd3f75767e71 | 22 | void drawPartner(); |
200923317 | 0:cd3f75767e71 | 23 | float drawMenu(); |
200923317 | 0:cd3f75767e71 | 24 | void drawFight(); |
200923317 | 0:cd3f75767e71 | 25 | void drawPoke(); |
200923317 | 0:cd3f75767e71 | 26 | void select(); |
200923317 | 0:cd3f75767e71 | 27 | void menu(); |
200923317 | 0:cd3f75767e71 | 28 | void settings(); |