DungeonCrawl
Loading...
Searching...
No Matches
stats_mode_local.c File Reference

Implements localization for the map mode. More...

#include "stats_mode_local.h"
#include "../../local/local_handler.h"
#include <stdlib.h>

Go to the source code of this file.

Functions

void update_stats_local (void)
 Update localized strings for the stats mode.

Variables

char ** stats_mode_strings = NULL

Detailed Description

Implements localization for the map mode.

Definition in file stats_mode_local.c.

Function Documentation

◆ update_stats_local()

void update_stats_local ( void )

Update localized strings for the stats mode.

Updates the localized strings used in the stats menu.

Updates all localized strings used in the stats window.

Definition at line 13 of file stats_mode_local.c.

13 {
14 for (int i = 0; i < MAX_STATS_STRINGS; i++) {
15 if (stats_mode_strings[i] != NULL) {
16 free(stats_mode_strings[i]);
17 }
18 }
19
20 stats_mode_strings[PLAYER_MENU_TITLE] = get_local_string("STATS.PLAYER.MENU.TITLE");
21 stats_mode_strings[STATS_MENU_TITLE] = get_local_string("STATS.STATS.MENU.TITLE");
22 stats_mode_strings[INVENTORY_MENU_TITLE] = get_local_string("STATS.INVENTORY.MENU.TITLE");
23 stats_mode_strings[HEALTH_STR] = get_local_string("HEALTH");
24 stats_mode_strings[STAMINA_STR] = get_local_string("STAMINA");
25 stats_mode_strings[MANA_STR] = get_local_string("MANA");
26 stats_mode_strings[STRENGTH_STR] = get_local_string("STRENGTH");
27 stats_mode_strings[INTELLIGENCE_STR] = get_local_string("INTELLIGENCE");
28 stats_mode_strings[DEXTERITY_STR] = get_local_string("DEXTERITY");
29 stats_mode_strings[CONSTITUTION_STR] = get_local_string("CONSTITUTION");
30 stats_mode_strings[LEVEL_STR] = get_local_string("LEVEL");
31 stats_mode_strings[EXP_STR] = get_local_string("EXP_POINTS");
32 stats_mode_strings[ARMOR_STR] = get_local_string("ARMOR");
33 stats_mode_strings[MAGIC_RESISTANCE_STR] = get_local_string("MAGIC_RESISTANCE");
34 stats_mode_strings[AVAILABLE_SKILL_POINTS_STR] = get_local_string("STATS.AV.SKILL_P");
35 stats_mode_strings[EQUIPPED_ARMOR_STR] = get_local_string("STATS.EQUIPPED.ARMOR");
36 stats_mode_strings[EMPTY_ARMOR_SLOT_STR] = get_local_string("STATS.EMPTY.ARMOR.SLOT");
37}
char * get_local_string(const char *key)
Get the localized string for the given key.

Variable Documentation

◆ stats_mode_strings

char** stats_mode_strings = NULL

Definition at line 11 of file stats_mode_local.c.