ELEC2645 (2018/19) / Mbed 2 deprecated el17dg

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

Revision:
29:579e00b7f118
Parent:
28:35af3843de8f
Child:
30:d454d0cb72bc
--- a/Models/models.h	Wed Apr 10 15:42:10 2019 +0000
+++ b/Models/models.h	Mon Apr 15 12:59:51 2019 +0000
@@ -7,27 +7,12 @@
 extern const int spaceship1_height;
 extern const int enemy2_height;
 extern const int enemy2_width;
-extern const int spaceShip1[110];
-extern const int starSmall[9];
-extern const int starMedium[25];
-extern const int starBig[49];
-extern const int enemyShip1 [187];
-extern const int enemyShip2 [77];
-extern const int enemyHalfExploded [77];
-extern const int enemyExploded [77];
+
 
-extern const int introLineOne [893];
-extern const int introLineOneStars [156];
-extern const int introLineTwoShips [460];
-extern const int introLineTwo [330];
-extern const int introLineThree [1482];
-
-extern const int gameOverSprite [406];
-extern const int youDiedSprite [336];
-
-extern const int tutorialArrowRight[70];
-extern const int tutorialArrowLeft[70];
-
+/** @brief a function to put a sprite and its data in one variable.
+  * @details A struct that alows to create an object containing a sprite, its width and height.
+  * It is used with another function located in main.h. 
+  */
 struct Sprite {
     Sprite(int _width, int _height, const int* _data) : width(_width), height(_height), data(_data) {}
     int width;
@@ -35,18 +20,32 @@
     const int* data;
 };
 
-struct SpriteOnTop {
-    SpriteOnTop(int _width, int _height, const int* _data) : width(_width), height(_height), data(_data) {}
-    int width;
-    int height;
-    const int* data;
-};
+/** Sprite Objects to use for other files. */
 
-extern const Sprite enemy_sprite;
-extern const Sprite enemy_half_exploded_sprite;
-extern const Sprite enemy_exploded_sprite;
+// Enemy sprites.
+extern const Sprite enemy1_sprite;                  // NOT in use
+extern const Sprite enemy2_sprite;
+extern const Sprite enemy2_half_exploded_sprite;
+extern const Sprite enemy2_exploded_sprite;
+// Stars sprites.
 extern const Sprite small_star_sprite;
 extern const Sprite medium_star_sprite;
-extern const SpriteOnTop player_spaceship1_sprite;
+extern const Sprite big_star_sprite;                // NOT in use
+// Planet sprites.
+extern const Sprite planet1_sprite;
+// Intro sprites.
+extern const Sprite intro_line_one_sprite;
+extern const Sprite intro_line_one_stars_sprite;
+extern const Sprite intro_line_two_ships_sprite;
+extern const Sprite intro_line_two_sprite;
+extern const Sprite intro_line_three_sprite;
+// Game Over and You Died sprites.
+extern const Sprite game_over_sprite;
+extern const Sprite you_died_sprite;
+// Tutorial Arrows sprites.
+extern const Sprite tutorial_arrow_right_sprite;
+extern const Sprite tutorial_arrow_left_sprite;
+// Player sprites.
+extern const Sprite player_spaceship1_sprite;
 
 #endif
\ No newline at end of file