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
Diff: Sprites/Sprites.h
- Revision:
- 45:bad704c546d4
- Parent:
- 44:e29458976114
- Child:
- 49:9bea7089b657
--- a/Sprites/Sprites.h Wed Apr 17 19:57:33 2019 +0000 +++ b/Sprites/Sprites.h Wed Apr 24 13:17:58 2019 +0000 @@ -5,6 +5,13 @@ #include "N5110.h" #include "Gamepad.h" +/** Sprites Class +@author Andrew Milner University of Leeds +@brief Draws sprites and sets all collision rules +@date April 2019 +*/ + +/////////// All sprite bitmaps//////////////// const int miner_right[24] = { @@ -78,7 +85,7 @@ 1,0,1,0,1, }; -///////structs for sprites detection/////////////////// +/////////structs for sprite parameters and collision detection////////////// struct keyed { bool key[5]; @@ -101,7 +108,7 @@ bool collision[5]; }; -////////structs for populating levels////////////////// +/////////////structs for populating levels////////////////// struct Enemies { bool f[5]; @@ -148,10 +155,10 @@ Vector2D get_pos(); void miner_init(int x, int y); - int miner_move(Direction d, N5110 &lcd); + void miner_move(Direction d, N5110 &lcd); void miner_draw(N5110 &lcd); void miner_gravity(N5110 &lcd); - int miner_jump(N5110 &lcd, Gamepad &pad); + void miner_jump(N5110 &lcd, Gamepad &pad); void miner_land(N5110 &lcd); void enemy_init(int i, int x, int y, int d);