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
main.cpp
- Committer:
- el17mcd
- Date:
- 2019-04-24
- Revision:
- 16:a2c945279b79
- Parent:
- 15:fa5282fcd134
- Child:
- 17:cb39d9fa08dc
File content as of revision 16:a2c945279b79:
/*
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 "SDFileSystem.h"
#include "Gamepad.h"
#include "N5110.h"
#include "Bitmap.h"
#include "Tank.h"
#include "TanksEngine.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);
SDFileSystem sd(PTE3, PTE1, PTE2, PTE4, "sd"); // MOSI, MISO, SCK, CS
Serial serial(USBTX, USBRX); // for PC debug
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);
}
}