19 const char* enemy_sprite,
const int sprite_height,
const bool red_enemy_sprite) {
36 display_image_at(enemy_sprite, vec.dx + 10, vec.dy, sprite_height, 2 * sprite_height, SCALE_STRETCH);
37 vec.dy += sprite_height + 2;
46 const int menu_option_count,
const int selected_index,
const char* tail_msg) {
47 if (menu_name == NULL || menu_options == NULL) {
48 log_msg(ERROR,
"Combat Output",
"Menu options are NULL");
54 print_menu_default(menu_name, menu_options, menu_option_count, selected_index, vec.dy, anchor.dx);
57 if (tail_msg != NULL) {
66 if (combat_log_message == NULL) {
67 log_msg(ERROR,
"Combat Output",
"Given combat log message is NULL");
86 print_text(1, 1,
"Game over", RED_TEXT_COLORS);
97 log_msg(ERROR,
"Combat Output",
"Character is NULL");
101 char c_info[MAX_STRING_LENGTH];
102 snprintf(c_info,
sizeof(c_info),
"%-20s | HP: %4d/%-4d | Mana: %4d/%-4d | Stamina: %4d/%-4d",
104 c->current_resources.health, c->max_resources.health,
105 c->current_resources.mana, c->max_resources.mana,
106 c->current_resources.stamina, c->max_resources.stamina);
Exposes functions for working working with the character.
void draw_combat_log(vector2d_t anchor, const char *combat_log_message)
Draws the combat log.
void draw_combat_menu(const vector2d_t anchor, const char *menu_name, char **menu_options, const int menu_option_count, const int selected_index, const char *tail_msg)
Draws the combat menu.
vector2d_t draw_combat_view(const vector2d_t anchor, const character_t *player, const character_t *enemy, const char *enemy_sprite, const int sprite_height, const bool red_enemy_sprite)
Draws the combat view UI.
int draw_resource_bar(vector2d_t anchor, const character_t *c)
Draws the resource bar for a character.
void draw_game_over(void)
Draws the game over screen.
Exposes functions for outputing to the screen while in the combat mode.
Defines common macros, types, and global variables for color schemes and utilities.
Exposes functions for the IO-Handler.
void log_msg(const log_level_t level, const char *module, const char *format,...)
Logs a formatted message with a specified log level and module.
Header file for logging functionality of the game.
void print_text(int y, int x, const char *text, uint64_t ncchannel)
Print text at a specific position.
void print_text_default(int y, int x, const char *text)
Print text at a specific position with default colors.
bool render_frame(void)
Render the current frame.
void clear_screen(void)
Clear the screen.
void print_menu_default(const char *title, const char **options, int option_count, int selected_index, int y, int x)
Print a menu with selection highlighting using default colors.
Exposes functions for outputting to the console.
2-dimensional vector struct