mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Added smlua_text_utils_get_language()
This commit is contained in:
parent
fb51d48c02
commit
6fc711e440
9 changed files with 48 additions and 3 deletions
|
@ -91,7 +91,7 @@ override_disallowed_functions = {
|
|||
"src/game/interaction.h": [ "process_interactions", "_handle_" ],
|
||||
"src/game/sound_init.h": [ "_loop_", "thread4_", "set_sound_mode" ],
|
||||
"src/pc/network/network_utils.h": [ "network_get_player_text_color[^_]" ],
|
||||
"src/pc/network/network_player.h": [ "_init", "_connected[^_]", "_shutdown", "_disconnected", "_update" ],
|
||||
"src/pc/network/network_player.h": [ "_init", "_connected[^_]", "_shutdown", "_disconnected", "_update", "construct_player_popup" ],
|
||||
"src/game/object_helpers.c": [ "spawn_obj", "^bhv_", "abs[fi]", "^bit_shift", "_debug$", "^stub_", "_set_model" ],
|
||||
"src/game/obj_behaviors.c": [ "debug_" ],
|
||||
"src/game/obj_behaviors_2.c": [ "wiggler_jumped_on_attack_handler", "huge_goomba_weakly_attacked" ],
|
||||
|
|
|
@ -4741,7 +4741,7 @@ PLAYER_INTERACTIONS_PVP = 2
|
|||
MAX_RX_SEQ_IDS = 64
|
||||
|
||||
--- @type integer
|
||||
NETWORK_PLAYER_PING_TIMEOUT = 3
|
||||
NETWORK_PLAYER_PING_TIMEOUT = 1
|
||||
|
||||
--- @type integer
|
||||
NETWORK_PLAYER_TIMEOUT = 10
|
||||
|
|
|
@ -8768,6 +8768,11 @@ function smlua_text_utils_extra_text_replace(index, text)
|
|||
-- ...
|
||||
end
|
||||
|
||||
--- @return string
|
||||
function smlua_text_utils_get_language()
|
||||
-- ...
|
||||
end
|
||||
|
||||
--- @return nil
|
||||
function smlua_text_utils_reset_all()
|
||||
-- ...
|
||||
|
|
|
@ -788,6 +788,24 @@
|
|||
|
||||
<br />
|
||||
|
||||
## [smlua_text_utils_get_language](#smlua_text_utils_get_language)
|
||||
|
||||
### Lua Example
|
||||
`local stringValue = smlua_text_utils_get_language()`
|
||||
|
||||
### Parameters
|
||||
- None
|
||||
|
||||
### Returns
|
||||
- `string`
|
||||
|
||||
### C Prototype
|
||||
`char* smlua_text_utils_get_language(void);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [smlua_text_utils_reset_all](#smlua_text_utils_reset_all)
|
||||
|
||||
### Lua Example
|
||||
|
|
|
@ -1622,6 +1622,7 @@
|
|||
- [smlua_text_utils_course_acts_replace](functions-5.md#smlua_text_utils_course_acts_replace)
|
||||
- [smlua_text_utils_dialog_replace](functions-5.md#smlua_text_utils_dialog_replace)
|
||||
- [smlua_text_utils_extra_text_replace](functions-5.md#smlua_text_utils_extra_text_replace)
|
||||
- [smlua_text_utils_get_language](functions-5.md#smlua_text_utils_get_language)
|
||||
- [smlua_text_utils_reset_all](functions-5.md#smlua_text_utils_reset_all)
|
||||
- [smlua_text_utils_secret_star_replace](functions-5.md#smlua_text_utils_secret_star_replace)
|
||||
|
||||
|
|
|
@ -1766,7 +1766,7 @@ char gSmluaConstants[] = ""
|
|||
"UNKNOWN_GLOBAL_INDEX = (-1)\n"
|
||||
"UNKNOWN_NETWORK_INDEX = (-1)\n"
|
||||
"NETWORK_PLAYER_TIMEOUT = 10\n"
|
||||
"NETWORK_PLAYER_PING_TIMEOUT = 3\n"
|
||||
"NETWORK_PLAYER_PING_TIMEOUT = 1\n"
|
||||
"MAX_RX_SEQ_IDS = 64\n"
|
||||
"USE_REAL_PALETTE_VAR = 0xFF\n"
|
||||
"NPT_UNKNOWN = 0\n"
|
||||
|
|
|
@ -28373,6 +28373,21 @@ int smlua_func_smlua_text_utils_extra_text_replace(lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_smlua_text_utils_get_language(UNUSED lua_State* L) {
|
||||
if (L == NULL) { return 0; }
|
||||
|
||||
int top = lua_gettop(L);
|
||||
if (top != 0) {
|
||||
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "smlua_text_utils_get_language", 0, top);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
lua_pushstring(L, smlua_text_utils_get_language());
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_smlua_text_utils_reset_all(UNUSED lua_State* L) {
|
||||
if (L == NULL) { return 0; }
|
||||
|
||||
|
@ -30643,6 +30658,7 @@ void smlua_bind_functions_autogen(void) {
|
|||
smlua_bind_function(L, "smlua_text_utils_course_acts_replace", smlua_func_smlua_text_utils_course_acts_replace);
|
||||
smlua_bind_function(L, "smlua_text_utils_dialog_replace", smlua_func_smlua_text_utils_dialog_replace);
|
||||
smlua_bind_function(L, "smlua_text_utils_extra_text_replace", smlua_func_smlua_text_utils_extra_text_replace);
|
||||
smlua_bind_function(L, "smlua_text_utils_get_language", smlua_func_smlua_text_utils_get_language);
|
||||
smlua_bind_function(L, "smlua_text_utils_reset_all", smlua_func_smlua_text_utils_reset_all);
|
||||
smlua_bind_function(L, "smlua_text_utils_secret_star_replace", smlua_func_smlua_text_utils_secret_star_replace);
|
||||
|
||||
|
|
|
@ -118,4 +118,8 @@ void smlua_text_utils_extra_text_replace(s16 index, const char* text) {
|
|||
|
||||
seg2_act_name_table[index] = smlua_text_utils_convert(text);
|
||||
sReplacedActName[index] = true;
|
||||
}
|
||||
|
||||
char* smlua_text_utils_get_language(void) {
|
||||
return configLanguage;
|
||||
}
|
|
@ -10,5 +10,6 @@ void smlua_text_utils_course_acts_replace(s16 courseNum, const char* courseName,
|
|||
void smlua_text_utils_secret_star_replace(s16 courseNum, const char* courseName);
|
||||
void smlua_text_utils_castle_secret_stars_replace(const char* name);
|
||||
void smlua_text_utils_extra_text_replace(s16 index, const char* text);
|
||||
char* smlua_text_utils_get_language(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue