23 lines
495 B
C++
23 lines
495 B
C++
#include "game_info.h"
|
|
#include <stdio.h>
|
|
#include "char_lcd.h"
|
|
|
|
static char game_state[GAME_STATE_MAX_LEN+1] = " ";
|
|
|
|
void set_game_state(char* new_state) {
|
|
snprintf(game_state, sizeof(game_state), "%-5s", new_state);
|
|
}
|
|
|
|
void reset_game_state() {
|
|
for (int i = 0; i < GAME_STATE_MAX_LEN; i++) {
|
|
game_state[i] = '\0';
|
|
}
|
|
game_state[GAME_STATE_MAX_LEN] = '\0';
|
|
}
|
|
|
|
void lcd_print_header_step() {
|
|
if (!lcd_header_enabled()) return;
|
|
|
|
lcd_print(11, 1, game_state);
|
|
}
|