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:
- 30:d454d0cb72bc
- Parent:
- 29:579e00b7f118
- Child:
- 31:becb8f6bf7b7
--- a/Models/models.cpp Mon Apr 15 12:59:51 2019 +0000 +++ b/Models/models.cpp Tue Apr 16 21:16:33 2019 +0000 @@ -1,6 +1,6 @@ #include "models.h" -const int spaceship1_width = 11; +const int spaceship1_width = 15; const int spaceship1_height = 10; const int enemy2_height = 7; @@ -9,7 +9,20 @@ const int enemy1_height = 17; const int enemy1_width = 11; -const int spaceShip1[110] = { //10 by 11 +const int cursor[84] = { //12 by 7 + 0,0,0,0,1,0,0,0,0,0,1,1, + 0,0,1,1,1,1,0,0,0,1,0,0, + 0,1,0,0,1,1,1,0,1,0,0,0, + 1,1,1,1,1,0,1,1,1,0,1,1, + 0,1,0,0,1,1,1,0,1,0,0,0, + 0,0,1,1,1,1,0,0,0,1,0,0, + 0,0,0,0,1,0,0,0,0,0,1,1 +}; +const Sprite menu_cursor_sprite(12, 7, cursor); + +const int spaceShip1[150] = { // 10 by 11 the is the size of the ship + 0,0,0,0,0,0,0,0,0,0, // 10 by 15 is the size of the sprite (for shield) + 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,1,1,1,0,0,0, 0,0,0,1,0,0,0,0,0,0, 0,1,1,1,1,1,1,0,0,0, @@ -21,8 +34,30 @@ 0,1,1,1,1,1,1,0,0,0, 0,0,0,1,0,0,0,0,0,0, 0,0,0,0,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, }; -const Sprite player_spaceship1_sprite(10, 11, spaceShip1); +const Sprite player_spaceship1_sprite(10, 15, spaceShip1); + +const int spaceShip1Shield[180] = { // 12 by 15 + 0,0,0,0,0,1,1,1,0,0,0,0, + 0,0,0,0,0,0,0,0,1,0,0,0, + 0,0,0,0,1,1,1,0,0,1,0,0, + 0,0,0,1,0,0,0,0,0,0,1,0, + 0,1,1,1,1,1,1,0,0,0,1,0, + 1,1,1,0,0,1,0,1,0,0,1,0, + 1,1,0,1,0,1,1,0,1,0,0,1, + 1,1,1,1,1,1,0,0,0,1,0,1, + 1,1,0,1,0,1,1,0,1,0,0,1, + 1,1,1,0,0,1,0,1,0,0,1,0, + 0,1,1,1,1,1,1,0,0,0,1,0, + 0,0,0,1,0,0,0,0,0,0,1,0, + 0,0,0,0,1,1,1,0,0,1,0,0, + 0,0,0,0,0,0,0,0,1,0,0,0, + 0,0,0,0,0,1,1,1,0,0,0,0 + +}; +const Sprite player_spaceship1_shield_sprite(12, 15, spaceShip1Shield); const int starSmall[9] = { 0,1,0,