blk_box_tc/main/drivers/game_info.cpp
2025-07-12 18:53:52 -05:00

21 lines
455 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() {
lcd_print(11, 1, game_state);
}