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
Fork of el17dg by
Diff: Models/models.cpp
- Revision:
- 29:579e00b7f118
- Parent:
- 27:f05f4e738ba9
- Child:
- 30:d454d0cb72bc
--- a/Models/models.cpp Wed Apr 10 15:42:10 2019 +0000 +++ b/Models/models.cpp Mon Apr 15 12:59:51 2019 +0000 @@ -6,6 +6,9 @@ const int enemy2_height = 7; const int enemy2_width = 11; +const int enemy1_height = 17; +const int enemy1_width = 11; + const int spaceShip1[110] = { //10 by 11 0,0,0,0,1,1,1,0,0,0, 0,0,0,1,0,0,0,0,0,0, @@ -19,7 +22,7 @@ 0,0,0,1,0,0,0,0,0,0, 0,0,0,0,1,1,1,0,0,0, }; -const SpriteOnTop player_spaceship1_sprite(10, 11, spaceShip1); +const Sprite player_spaceship1_sprite(10, 11, spaceShip1); const int starSmall[9] = { 0,1,0, @@ -36,7 +39,8 @@ 1,0,0,0,1 }; const Sprite medium_star_sprite(5, 5, starMedium); -const int starBig[49] = { + +const int starBig[49] = { // 7 by 7 1,0,0,1,0,0,1, 0,1,0,1,0,1,0, 0,0,1,1,1,0,0, @@ -45,8 +49,9 @@ 0,1,0,1,0,1,0, 1,0,0,1,0,0,1 }; +const Sprite big_star_sprite(7, 7, starBig); -const int enemyShip1 [187] = { +const int enemyShip1 [187] = { //11 by 17 0,0,0,0,0,0,1,1,1,1,1, 0,0,0,0,0,0,1,1,1,1,1, 0,0,0,0,0,0,1,1,1,1,1, @@ -65,8 +70,9 @@ 0,0,0,0,0,0,1,1,1,1,1, 0,0,0,0,0,0,1,1,1,1,1 }; +const Sprite enemy1_sprite(11, 17, enemyShip1); -const int enemyShip2 [77] = { +const int enemyShip2 [77] = { // 11 by 7 0,0,0,1,1,1,1,1,1,0,0, 0,0,0,0,0,0,1,1,1,0,0, 0,0,0,1,1,1,0,1,0,1,0, @@ -76,7 +82,7 @@ 0,0,0,1,1,1,1,1,1,0,0 }; -const Sprite enemy_sprite(11, 7, enemyShip2); +const Sprite enemy2_sprite(11, 7, enemyShip2); const int enemyHalfExploded [77] = { 0,0,0,0,0,1,1,1,1,0,0, @@ -88,7 +94,7 @@ 0,0,0,1,1,1,0,0,1,0,0 }; -const Sprite enemy_half_exploded_sprite(11, 7, enemyHalfExploded); +const Sprite enemy2_half_exploded_sprite(11, 7, enemyHalfExploded); const int enemyExploded [77] = { 1,0,1,0,1,0,0,1,1,0,0, @@ -99,10 +105,9 @@ 0,0,1,0,0,0,1,0,0,0,0, 1,0,0,1,0,1,1,1,1,0,0 }; -const Sprite enemy_exploded_sprite(11, 7, enemyExploded); +const Sprite enemy2_exploded_sprite(11, 7, enemyExploded); -/* -const int planet1 [289] = { +const int planet1 [289] = { // 17 by 17 0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0, 0,0,0,0,1,1,1,1,1,1,0,1,1,0,0,0,0, 0,0,0,1,0,0,1,1,1,1,0,0,0,1,0,0,0, @@ -121,7 +126,7 @@ 0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0 }; -*/ +const Sprite planet1_sprite(17, 17, planet1); const int introLineOne [893] = { //63 by 11 1,1,1,1,1,1,1,0,0,1,1,0,0,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,1,1,1, @@ -136,6 +141,7 @@ 0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,0,0,1,0,0,0,0,0,0,1,1,0,0,1,1,1,0,1,1,0,0,0,0,0,1,0,0,0, 0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,1,0,0,0 }; +const Sprite intro_line_one_sprite(63, 11, introLineOne); const int introLineOneStars [156] = { //12 by 13 1,0,0,1,0,0,1,0,0,0,0,0, @@ -151,8 +157,8 @@ 0,0,0,0,0,0,0,0,1,1,1,0, 0,0,0,0,0,0,0,0,1,1,1,0, 0,0,0,0,0,0,0,1,0,0,0,1 - }; +const Sprite intro_line_one_stars_sprite(12, 13, introLineOneStars); const int introLineTwoShips [460] = { //46 by 10 0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -166,6 +172,7 @@ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; +const Sprite intro_line_two_ships_sprite(46, 10, introLineTwoShips); const int introLineTwo [330] = { //30 by 11 0,0,1,1,1,1,1,1,0,0,0,1,0,0,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0, @@ -180,6 +187,7 @@ 0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,0,1,1,0,0,1,1,1,1,1,1,0,0,1,1, 0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0 }; +const Sprite intro_line_two_sprite(30, 11, introLineTwo); const int introLineThree [1482] = { //78 by 19 0,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0, @@ -202,6 +210,7 @@ 0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,1,1,0,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,1,0,0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,1,1,1, 0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,1,0,0,0,0,1,1,1,1,1,1,0,0,1,0,0,0,0,1,1 }; +const Sprite intro_line_three_sprite(78, 19, introLineThree); const int gameOverSprite [406] = { //29 by 14 1,1,1,1,1,1,1,0,0,1,1,1,0,0,1,1,0,0,0,1,0,1,1,1,1,1,0,0,0, @@ -219,6 +228,7 @@ 0,0,0,0,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,0,0,1,1,0,1,0, 0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,1,1,1,1,1,0,1,1,0,0,1 }; +const Sprite game_over_sprite(29, 14, gameOverSprite); const int youDiedSprite [336] = { //24 by 14 1,0,0,0,1,0,0,1,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0, @@ -235,8 +245,9 @@ 0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,1,1,1,0,0,1,0,0,1, 0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,0,0,1,0,0,1, 0,0,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,1,0,1,1,1,0 - }; +const Sprite you_died_sprite(24, 14, youDiedSprite); + const int tutorialArrowRight [70] = { //10 by 7 0,0,0,0,0,0,1,0,0,0, 0,0,0,0,0,0,0,1,0,0, @@ -247,6 +258,8 @@ 0,0,0,0,0,0,1,0,0,0 }; +const Sprite tutorial_arrow_right_sprite(10, 7, tutorialArrowRight); + const int tutorialArrowLeft [70] = { //10 by 7 0,0,0,1,0,0,0,0,0,0, 0,0,1,0,0,0,0,0,0,0, @@ -255,4 +268,5 @@ 0,1,0,0,0,0,0,0,0,0, 0,0,1,0,0,0,0,0,0,0, 0,0,0,1,0,0,0,0,0,0 -}; \ No newline at end of file +}; +const Sprite tutorial_arrow_left_sprite(10, 7, tutorialArrowLeft);