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.
models.h
00001 #ifndef MODELS_H 00002 #define MODELS_H 00003 00004 00005 00006 extern const int spaceship1_width; 00007 extern const int spaceship1_height; 00008 extern const int enemy2_height; 00009 extern const int enemy2_width; 00010 extern const int enemy1_height; 00011 extern const int enemy1_width; 00012 extern const int PressAWidth; 00013 extern const int PressAHeight; 00014 00015 00016 /** @struct Sprite 00017 * @brief A function to put a sprite and its data in one variable. 00018 * @details A struct that alows to create an object containing a sprite, its width and height. 00019 * It is used with another function located in main.h. 00020 * @var Sprire::width . 00021 * Member 'width' contains witdh of the sprite. 00022 * @var Sprire::height. 00023 * Member 'height' contains height of the sprite. 00024 * @var Sprire::data. 00025 * Member 'data' contains the array of 1s and 0s of the sprite. 00026 */ 00027 struct Sprite { 00028 /*@{*/ 00029 Sprite(int _width, int _height, const int* _data) : width(_width), height(_height), data(_data) {} 00030 int width; /**< The width of the sprite*/ 00031 int height; /**< The height of the sprite*/ 00032 const int* data; /**< The array of 1s and 0s of the sprite.*/ 00033 }; 00034 00035 /** Sprite Objects to use for other files. */ 00036 00037 // Enemy and Boss sprites. 00038 extern const Sprite blast_sprite; 00039 extern const Sprite enemy2_sprite; 00040 extern const Sprite enemy2_half_exploded_sprite; 00041 extern const Sprite enemy2_exploded_sprite; 00042 00043 extern const Sprite enemy1_sprite; 00044 extern const Sprite enemy1_quarter_exploded_sprite; 00045 extern const Sprite enemy1_half_exploded_sprite; 00046 extern const Sprite enemy1_second_quarter_exploded_sprite; 00047 extern const Sprite enemy1_fully_exploded_sprite; 00048 // Stars sprites. 00049 extern const Sprite small_star_sprite; 00050 extern const Sprite medium_star_sprite; 00051 extern const Sprite big_star_sprite; // NOT in use 00052 // Planet sprites. 00053 extern const Sprite planet1_sprite; // NOT in use 00054 // Intro sprites. 00055 extern const Sprite intro_line_one_sprite; 00056 extern const Sprite intro_line_one_stars_sprite; 00057 extern const Sprite intro_line_two_ships_sprite; 00058 extern const Sprite intro_line_two_sprite; 00059 extern const Sprite intro_line_three_sprite; 00060 // Game Over and You Died sprites. 00061 extern const Sprite game_over_sprite; 00062 extern const Sprite you_died_sprite; 00063 // Tutorial Arrows and Menu sprites. 00064 extern const Sprite tutorial_arrow_right_sprite; 00065 extern const Sprite tutorial_arrow_left_sprite; 00066 extern const Sprite menu_cursor_sprite; 00067 extern const Sprite Press_A_Icon_Sprite; 00068 // Player sprites. 00069 extern const Sprite player_spaceship1_sprite; 00070 extern const Sprite player_spaceship1_shield_sprite; 00071 #endif
Generated on Wed Dec 20 2023 20:30:17 by
1.7.2