blk_box_tc/main/drivers/game_info.cpp
2025-07-13 14:37:03 -05:00

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);
}