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
Models/models.h
- Committer:
- Noximilien
- Date:
- 2019-04-29
- Revision:
- 33:c623c6d5ed16
- Parent:
- 32:5403bb974294
- Child:
- 34:754915ce9de5
File content as of revision 33:c623c6d5ed16:
#ifndef MODELS_H #define MODELS_H extern const int spaceship1_width; extern const int spaceship1_height; extern const int enemy2_height; extern const int enemy2_width; extern const int enemy1_height; extern const int enemy1_width; extern const int PressAWidth; extern const int PressAHeight; /** @struct Sprite * @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. * @var Sprire::width . * Member 'width' contains witdh of the sprite. * @var Sprire::height. * Member 'height' contains height of the sprite. * @var Sprire::data. * Member 'data' contains the array of 1s and 0s of the sprite. */ struct Sprite { /*@{*/ Sprite(int _width, int _height, const int* _data) : width(_width), height(_height), data(_data) {} int width; /**< The width of the sprite*/ int height; /**< The height of the sprite*/ const int* data; /**< The array of 1s and 0s of the sprite.*/ }; /** Sprite Objects to use for other files. */ // 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 Sprite big_star_sprite; // NOT in use // Planet sprites. extern const Sprite planet1_sprite; // NOT in use // 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 and Menu sprites. extern const Sprite tutorial_arrow_right_sprite; extern const Sprite tutorial_arrow_left_sprite; extern const Sprite menu_cursor_sprite; extern const Sprite Press_A_Icon_Sprite; // Player sprites. extern const Sprite player_spaceship1_sprite; extern const Sprite player_spaceship1_shield_sprite; #endif