DungeonCrawl
|
Implements outputting to the screen for the combat mode. More...
#include "combat_output.h"
#include "../../../character/character.h"
#include "../../../common.h"
#include "../../../logging/logger.h"
#include "../../input/input_handler.h"
#include "../../io_handler.h"
#include "../common/output_handler.h"
#include "../media/media_files.h"
#include "../media/media_output.h"
#include <string.h>
Go to the source code of this file.
Functions | |
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. | |
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. | |
void | draw_combat_log (vector2d_t anchor, const char *combat_log_message) |
Draws the combat log. | |
void | draw_game_over (void) |
Draws the game over screen. | |
int | draw_resource_bar (vector2d_t anchor, const character_t *c) |
Draws the resource bar for a character. |
Implements outputting to the screen for the combat mode.
Definition in file combat_output.c.
void draw_combat_log | ( | vector2d_t | anchor, |
const char * | combat_log_message ) |
Draws the combat log.
This function displays a combat log message and waits for user input before continuing.
anchor | The anchor point of the combat log, representing the top-left corner |
combat_log_message | The message to be displayed in the combat log |
Definition at line 65 of file combat_output.c.
void draw_combat_menu | ( | vector2d_t | anchor, |
const char * | menu_name, | ||
char ** | menu_options, | ||
int | menu_option_count, | ||
int | selected_index, | ||
const char * | tail_msg ) |
Draws the combat menu.
This function renders a menu for the combat mode with selectable options.
anchor | The anchor point of the combat menu, representing the top left corner |
menu_name | The name of the menu |
menu_options | The options of the menu |
menu_option_count | The number of options in the menu |
selected_index | The index of the selected option |
tail_msg | The message to be displayed at the bottom of the menu. If the message is NULL, it will not be displayed. |
Definition at line 45 of file combat_output.c.
vector2d_t draw_combat_view | ( | vector2d_t | anchor, |
const character_t * | player, | ||
const character_t * | enemy, | ||
const char * | enemy_sprite, | ||
int | sprite_height, | ||
bool | red_enemy_sprite ) |
Draws the combat view UI.
This function renders the combat view including player and enemy information, as well as the enemy sprite.
anchor | The anchor point of the combat view, representing the top left corner |
player | The player character |
enemy | The enemy character |
enemy_sprite | The sprite of the enemy |
sprite_height | The height of the enemy sprite |
red_enemy_sprite | If true, the enemy sprite will be drawn in red |
Definition at line 18 of file combat_output.c.
void draw_game_over | ( | void | ) |
Draws the game over screen.
This function displays a game over message and waits for user input.
Definition at line 82 of file combat_output.c.
int draw_resource_bar | ( | vector2d_t | anchor, |
const character_t * | c ) |
Draws the resource bar for a character.
This function displays the character's name, health, mana, and stamina in a formatted bar.
anchor | The anchor point for the resource bar, representing the top-left corner |
c | A pointer to the character whose resources are to be displayed |
Definition at line 95 of file combat_output.c.