embedded-software
reusable software modules for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
game.h File Reference
#include "project_settings.h"
#include "terminal.h"
Include dependency graph for game.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  char_object_t
 Char Object. More...
 
struct  linked_char_object_t
 Linkable Char Object. More...
 
struct  player_info_t
 Player info structure to hold player settings. More...
 

Macros

#define TRANSPARENT_CHAR   '`'
 transparent character for drawing tiles More...
 

Functions

uint8_t Game_Register (char *name, char *description, void(*play)(void), void(*help)(void))
 Game_Register registers a game by adding it to the games[] array. More...
 
void Game_RegisterCallback (uint8_t game_id, void(*callback)(int argc, char *argv[]))
 
void Game_RegisterHighscoreCallback (uint8_t game_id, void(*callback)(void))
 
void Game_Log (uint8_t game_id, char *str,...)
 
void Game_EnableMultiPlayer (uint8_t game_id, uint8_t num)
 
void Game_RegisterPlayer1Receiver (void(*rx)(uint8_t))
 
void Game_RegisterPlayer2Receiver (void(*rx)(uint8_t))
 Register Player 2 UART Channel. More...
 
void Game_UnregisterPlayer1Receiver (void(*rx)(uint8_t))
 Unregister Player 1 UART Channel receiver. More...
 
void Game_UnregisterPlayer2Receiver (void(*rx)(uint8_t))
 Unregister Player 2 UART Channel receiver. More...
 
void Game_CharXY (char c, char x, char y)
 Write a character to a coordinate of the terminal. More...
 
void Game_Player1CharXY (char c, char x, char y)
 Write a character to a coordinate of the first players terminal. More...
 
void Game_Player2CharXY (char c, char x, char y)
 Write a character to a coordinate of the second players terminal. More...
 
void Game_CursorXY (char x, char y)
 Cursor Position XY. More...
 
void Game_Player1CursorXY (char x, char y)
 Player 1 Cursor Position XY. More...
 
void Game_Player2CursorXY (char x, char y)
 Player 2 Cursor Position XY. More...
 
void Game_Printf (char *str,...)
 
void Game_PrintfXY (char x, char y, char *str,...)
 PrintfXY to screen. More...
 
void Game_Player1Printf (char *str,...)
 
void Game_Player2Printf (char *str,...)
 
void Game_HideCursor (void)
 Hide the cursor for player 1 (and player2 if a two player game) More...
 
void Game_ShowCursor (void)
 Show the cursor for player 1 (and player2 if a two player game) More...
 
void Game_SetColor (enum term_color color)
 
void Game_DrawTile (char *tile[], char x, char y)
 
void Game_DrawRect (char x_min, char y_min, char x_max, char y_max)
 
void Game_FillRect (char c, char x_min, char y_min, char x_max, char y_max)
 
void Game_LinkedChar (char c, char x_first, char y_first, int length, int direction, linked_char_object_t list[])
 
void Game_ScrollDown (void)
 
void Game_ScrollUp (void)
 
void Game_ClearScreen (void)
 
uint8_t Game_IsTransmitting (void)
 
void Game_Bell (void)
 
void Game_GameOver (void)
 let the game management module know that your game is over. More...