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
- Committer:
- 200923317
- Date:
- 2017-04-20
- Revision:
- 1:af881f58c4f9
- Parent:
- 0:cd3f75767e71
- Child:
- 2:a2bb794f830c
File content as of revision 1:af881f58c4f9:
#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include "Pokemon.h"
#include "Sprites.h"
//rewritten code to implement new/better ideas. part of the code is same as before but lots of changes were needed.
//-------------------------------- objects -------------------------------------
N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
Gamepad pad;
Pokemon pk;
//--------------------------- Structs/Typedefs ---------------------------------
struct joyInput {
Direction d; //direction of joystick to navigate menu's
};
typedef enum State {START, PARTNER, MENU, FIGHT, POKEMON, SETTINGS} Gamepage;
//assigning names to different states
void init();
void drawStart();
void drawPartner();
void partner1();
void partner2();
void partner3();
float drawMenu();
void drawFight();
void drawPoke();
void select();
void menu();
void settings();
//------------------------------------------------------------------------------
int main()
{
init();
drawStart();
Gamepage state = START;
void init()
{
pad.init();
lcd.init();
lcd.setBrightness(1.0);
}
