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.
draw.h
Go to the documentation of this file.
1 
24 #ifndef __DRAW_H__
25 #define __DRAW_H__
26 
27 #include "FreeRTOS.h"
28 #include "task.h"
29 
30 #include "gfx_draw.h"
31 #include "gfx_ball.h"
32 
33 #define FPS_FONT "IBMPlexSans-Bold.ttf"
34 
36 
42 void vCreateWalls(wall_t **left_wall, wall_t **right_wall, wall_t **top_wall, wall_t **bottom_wall);
43 
49 void vDrawWalls(wall_t *left_wall, wall_t *right_wall, wall_t *top_wall, wall_t *bottom_wall);
50 
53 void vDrawBall(ball_t *ball);
54 
56 void vDrawClearScreen(void);
57 
60 void vDrawMouseBallAndBoundingBox(unsigned char ball_color_inverted);
61 
63 void vDrawFPS(void);
64 
66 void vDrawStaticItems(void);
67 
69 void vDrawButtonText(void);
70 
72 void vDrawSpriteStatic();
73 
76 
79 void vDrawSpriteAnimations(TickType_t xLastFrameTime);
80 
82 void vDrawInitResources(void);
83 
84 #endif //__DRAW_H__
void vDrawMouseBallAndBoundingBox(unsigned char ball_color_inverted)
Draws the ball moved by the mouse and its bounding box.
Definition: draw.c:147
void vDrawButtonText(void)
Draws the status information of the button presses on the screen.
Definition: draw.c:267
void vDrawBall(ball_t *ball)
Draws a ball.
Definition: draw.c:141
void vDrawSpriteStatic()
Draws the static sprite to the bottom right corner of the screen.
Definition: draw.c:549
void vDrawWalls(wall_t *left_wall, wall_t *right_wall, wall_t *top_wall, wall_t *bottom_wall)
Draws the demo walls.
Definition: draw.c:122
void vDrawSpriteAnimations(TickType_t xLastFrameTime)
Draws the sprite annimation to the bottom right corner of the screen.
Definition: draw.c:565
void vDrawFPS(void)
Draws the FPS value on the screen.
Definition: draw.c:184
void vCreateWalls(wall_t **left_wall, wall_t **right_wall, wall_t **top_wall, wall_t **bottom_wall)
Creates the four demo walls used.
Definition: draw.c:99
gfx_image_handle_t logo_image
void vDrawClearScreen(void)
Clears the screen to be white.
Definition: draw.c:81
void vDrawStaticItems(void)
Draws the help text and FreeRTOS logo on the screen.
Definition: draw.c:261
void vDrawSpriteResetDownwardSequence()
Resets the downward animation sequence for example purposes.
Definition: draw.c:559
void vDrawInitResources(void)
Loads images, sprite sheets and creates the annimation sequences needed.
Definition: draw.c:543
API to create balls and walls that interact with each other on a 2D plane.
void * gfx_image_handle_t
Handle used to reference loaded images, an invalid image will have a NULL handle.
Definition: gfx_draw.h:130
Object to represent a ball that bounces off walls.
Definition: gfx_ball.h:66
Object to represent a wall that balls bounce off of.
Definition: gfx_ball.h:113