ELEC2645 (2018/19) / Mbed 2 deprecated EL17MCD

Dependencies:   mbed

main.cpp

Committer:
el17mcd
Date:
2019-04-27
Revision:
17:cb39d9fa08dc
Parent:
16:a2c945279b79
Child:
19:1c3ff2d748ae

File content as of revision 17:cb39d9fa08dc:

/*
ELEC2645 Embedded Systems Project:
School of Electronic & Electrical Engineering
University of Leeds
Name: Maxim C. Delacoe
Username: EL 17 MCD
Student ID Number: 2011 58344
Date: 19/03/2019
Game: Tanks!
*/
///////// pre-processor directives ////////
#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include "Bitmap.h"
#include "TanksEngine.h"
#include "Tank.h"
#include "Projectile.h"
#include "Graphics.h"
#include "Menus.h"
#include "Scores.h"

#ifdef WITH_TESTING

#endif

/////////////// objects ///////////////
N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
TanksEngine engine;
Gamepad pad;
Graphics graphics;
Menus menus;
Scores scores;

int main()
{    // need to initialise LCD and Gamepad  
  lcd.init();
  pad.init();
      
  while(1) {  // infinite loop
    menus.start_up_screen(graphics, lcd, pad);
    menus.main_menu(graphics, lcd, pad, scores); 
    engine.initgame(menus);
    engine.game_loop(graphics, lcd, pad, menus, scores);        
  }
}