FreeRTOS Tetris
Functions
gui.h File Reference

Header file for gui.c. More...

#include "tetrisConfig.h"
#include "logic.h"
Include dependency graph for gui.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

Widths & heights for the individual mode texts on the display.
#define MODE_EASY_WIDTH   60
 
#define MODE_FAIR_WIDTH   61
 
#define MODE_HARD_WIDTH   60
 
#define MODE_RANDOM_WIDTH   90
 
#define MODE_DETERMINISTIC_WIDTH   198
 
#define MODES_HEIGHT   500
 

Functions

void vGUIDrawMainMenu (game_mode_t mode, player_mode_t playerMode, rotation_t rotationMode, bool isConnected)
 Draw the main menu. More...
 
bool bGUIDrawLevelScreen (uint8_t *currentLevel, const score_t highScores[])
 Draw the level selection & highscores screen. More...
 
void vGUIDrawStatic (const image_handle_t squares[], const score_t *score)
 Draw the wall, score, level & number of lines completed. More...
 
void vGUIDrawPauseMenu (bool isConnected)
 Draw the Pause Menu. More...
 
void vGUIDrawGameOverMenu (score_t *score, char *lastUserName)
 Draw the Game-Over Menu. More...
 
bool bGUIDrawPlayerModeSelection (player_mode_t *playerMode)
 Draw the player-mode selection in Main Menu. More...
 
bool bGUIDrawRotationSelection (rotation_t *rotationMode)
 Draw rotation-mode selection in Main Menu. More...
 
bool bGUIDrawLevelMenuSelection (void)
 Draws & let the player switch to the level selection/highscores screen. More...
 
void vGUIDrawTetromino (const tetromino_t *tetromino, const image_handle_t squares[])
 Draw the current Tetromino. More...
 
void vGUIDrawLanded (const color_t landed[ROWS][COLS], const image_handle_t squares[])
 Draw the array of landed tetrominos. More...
 
void vGUIDrawNextTetromino (const tetromino_t *tetromino, const image_handle_t squares[])
 Draw the upcoming Tetromino in the upper right corner. More...
 
void vGUIDrawFPS (void)
 Draw an FPS counter.
 
void vGUISetImageHandle (image_handle_t squares[])
 Takes an image_handle_t array & initializes it with the correct images. More...
 

Detailed Description

Header file for gui.c.

Authors
Philipp Karg (phili.nosp@m.pp.k.nosp@m.arg@t.nosp@m.um.d.nosp@m.e)
Date
04.02.2021
Authors
Philipp Karg (phili.nosp@m.pp.k.nosp@m.arg@t.nosp@m.um.d.nosp@m.e)
Date
04.02.2021