FreeRTOS Emulator with SDL2 Based Graphics and Input Library
1.0
A POSIX wrapper to run FreeRTOS on an x86 machine with some basic input and output libraries aimed at making teaching FreeRTOS simpler.
|
Example draw functions for drawing user objects. More...
Go to the source code of this file.
Macros | |
#define | FPS_FONT "IBMPlexSans-Bold.ttf" |
Functions | |
void | vCreateWalls (wall_t **left_wall, wall_t **right_wall, wall_t **top_wall, wall_t **bottom_wall) |
Creates the four demo walls used. More... | |
void | vDrawWalls (wall_t *left_wall, wall_t *right_wall, wall_t *top_wall, wall_t *bottom_wall) |
Draws the demo walls. More... | |
void | vDrawBall (ball_t *ball) |
Draws a ball. More... | |
void | vDrawClearScreen (void) |
Clears the screen to be white. More... | |
void | vDrawMouseBallAndBoundingBox (unsigned char ball_color_inverted) |
Draws the ball moved by the mouse and its bounding box. More... | |
void | vDrawFPS (void) |
Draws the FPS value on the screen. More... | |
void | vDrawStaticItems (void) |
Draws the help text and FreeRTOS logo on the screen. More... | |
void | vDrawButtonText (void) |
Draws the status information of the button presses on the screen. More... | |
void | vDrawSpriteStatic () |
Draws the static sprite to the bottom right corner of the screen. More... | |
void | vDrawSpriteResetDownwardSequence () |
Resets the downward animation sequence for example purposes. More... | |
void | vDrawSpriteAnimations (TickType_t xLastFrameTime) |
Draws the sprite annimation to the bottom right corner of the screen. More... | |
void | vDrawInitResources (void) |
Loads images, sprite sheets and creates the annimation sequences needed. More... | |
Variables | |
gfx_image_handle_t | logo_image |
Example draw functions for drawing user objects.
---------------------------------------------------------------------- Copyright (C) Alexander Hoffman, 2023 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ----------------------------------------------------------------------
#define FPS_FONT "IBMPlexSans-Bold.ttf" |
void vCreateWalls | ( | wall_t ** | left_wall, |
wall_t ** | right_wall, | ||
wall_t ** | top_wall, | ||
wall_t ** | bottom_wall | ||
) |
Creates the four demo walls used.
left_wall | Double pointer to the wall handle for the left wall |
right_wall | Double pointer to the wall handle for the right wall |
top_wall | Double pointer to the wall handle for the top wall |
bottom_wall | Double pointer to the wall handle for the bottom wall |
void vDrawBall | ( | ball_t * | ball | ) |
Draws a ball.
ball | Pointer to ball handle to be drawn |
void vDrawButtonText | ( | void | ) |
Draws the status information of the button presses on the screen.
void vDrawClearScreen | ( | void | ) |
Clears the screen to be white.
void vDrawFPS | ( | void | ) |
Draws the FPS value on the screen.
void vDrawInitResources | ( | void | ) |
Loads images, sprite sheets and creates the annimation sequences needed.
void vDrawMouseBallAndBoundingBox | ( | unsigned char | ball_color_inverted | ) |
Draws the ball moved by the mouse and its bounding box.
ball_color_inverted |
void vDrawSpriteAnimations | ( | TickType_t | xLastFrameTime | ) |
Draws the sprite annimation to the bottom right corner of the screen.
xLastFrameTime | Ticks since last frame |
void vDrawSpriteResetDownwardSequence | ( | ) |
Resets the downward animation sequence for example purposes.
void vDrawSpriteStatic | ( | ) |
Draws the static sprite to the bottom right corner of the screen.
void vDrawStaticItems | ( | void | ) |
Draws the help text and FreeRTOS logo on the screen.
void vDrawWalls | ( | wall_t * | left_wall, |
wall_t * | right_wall, | ||
wall_t * | top_wall, | ||
wall_t * | bottom_wall | ||
) |
Draws the demo walls.
left_wall | Pointer to the wall handle for the left wall |
right_wall | Pointer to the wall handle for the right wall |
top_wall | Pointer to the wall handle for the top wall |
bottom_wall | Pointer to the wall handle for the bottom wall |
|
extern |