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: main/main.h
- Revision:
- 29:579e00b7f118
- Parent:
- 28:35af3843de8f
- Child:
- 31:becb8f6bf7b7
--- a/main/main.h Wed Apr 10 15:42:10 2019 +0000 +++ b/main/main.h Mon Apr 15 12:59:51 2019 +0000 @@ -8,8 +8,8 @@ #include "models.h" /** Global variable readings from the gamepad are shared for all the files to - * use. - */ + * use. + */ extern N5110 lcd; extern Gamepad gamepad; extern AnalogIn pot; @@ -18,21 +18,24 @@ static const int fps = 10; -/** This is a specific function I made to simplify drawing the sprites. - * It only works with spawn() function in gameobject.h. - * The parameters for this function are given in the models.cpp for the - * sprites. - */ +/** @brief A simplified function to draw sprites. + * @details This is a specific function I made to simplify drawing the sprites. + * It only works with spawn() function in gameobject.h. + * The parameters for this function are given in the models.cpp for the + * sprites. + */ static void drawSprite(Point pos, const Sprite& sprite) { lcd.drawSprite(pos.x, pos.y, sprite.height, sprite.width, (int*)sprite.data); } -/** This is an exactly the same function as before, but for the drawing sprite - * function that draws the black pixels on top the white pixels when the - * sprites overlap. - */ -static void drawSpriteOnTop(Point pos, const SpriteOnTop& spriteOnTop) { - lcd.drawSpriteOnTop(pos.x, pos.y, spriteOnTop.height, spriteOnTop.width, (int*)spriteOnTop.data); +/** @brief A simplified function to draw sprites. But this draw black pixels on top of white pixels. + * @details This is an exactly the same function as before, but for the drawing + * sprite function that draws the black pixels on top the white pixels when the + * sprites overlap. + */ +static void drawSpriteOnTop(Point pos, const Sprite& sprite) { + lcd.drawSpriteOnTop(pos.x, pos.y, sprite.height, sprite.width, (int*)sprite.data); } + #endif \ No newline at end of file