Implementation for the localization of the combat mode.
More...
Go to the source code of this file.
Implementation for the localization of the combat mode.
Definition in file combat_mode_local.c.
◆ update_combat_local()
void update_combat_local |
( |
void | | ) |
|
Updates the combat mode strings with localized versions.
- Note
- This function should be called after initializing the combat mode.
Definition at line 13 of file combat_mode_local.c.
13 {
14 for (int i = 0; i < MAX_COMBAT_MODE_STRINGS; i++) {
15 if (combat_mode_strings[i] != NULL) {
16 free(combat_mode_strings[i]);
17 }
18 }
19
20 combat_mode_strings[MAIN_MENU_TITLE] =
get_local_string(
"COMBAT.MAIN.MENU.TITLE");
21 combat_mode_strings[ABILITY_MENU_TITLE] =
get_local_string(
"COMBAT.ABILITY.MENU.TITLE");
22 combat_mode_strings[POTION_MENU_TITLE] =
get_local_string(
"COMBAT.POTION.MENU.TITLE");
23 combat_mode_strings[MAIN_MENU_OPTION1] =
get_local_string(
"COMBAT.USE.ABILITY");
24 combat_mode_strings[MAIN_MENU_OPTION2] =
get_local_string(
"COMBAT.USE.POTION");
25
26 combat_mode_strings[ABILITY_FORMAT] =
get_local_string(
"COMBAT.ABILITY.FORMAT");
30
31 combat_mode_strings[ATTACK_SUCCESS] =
get_local_string(
"COMBAT.ATTACK.SUCCESS");
35}
char * get_local_string(const char *key)
Get the localized string for the given key.
◆ combat_mode_strings
char** combat_mode_strings = NULL |