mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-22 07:32:07 -05:00
Re-expose function
This commit is contained in:
parent
ea65bb06f9
commit
fefb222198
6 changed files with 45 additions and 1 deletions
|
@ -121,7 +121,7 @@ override_disallowed_functions = {
|
|||
"src/pc/lua/utils/smlua_audio_utils.h": [ "smlua_audio_utils_override", "audio_custom_shutdown", "smlua_audio_custom_deinit", "audio_sample_destroy_pending_copies", "audio_custom_update_volume" ],
|
||||
"src/pc/djui/djui_hud_utils.h": [ "djui_hud_render_texture", "djui_hud_render_texture_raw", "djui_hud_render_texture_tile", "djui_hud_render_texture_tile_raw" ],
|
||||
"src/pc/lua/utils/smlua_level_utils.h": [ "smlua_level_util_reset" ],
|
||||
"src/pc/lua/utils/smlua_text_utils.h": [ "smlua_text_utils_init", "smlua_text_utils_shutdown", "smlua_text_utils_reset_all" ],
|
||||
"src/pc/lua/utils/smlua_text_utils.h": [ "smlua_text_utils_init", "smlua_text_utils_shutdown" ],
|
||||
"src/pc/lua/utils/smlua_anim_utils.h": [ "smlua_anim_util_reset", "smlua_anim_util_register_animation" ],
|
||||
"src/pc/network/lag_compensation.h": [ "lag_compensation_clear" ],
|
||||
"src/game/first_person_cam.h": [ "first_person_update" ],
|
||||
|
|
|
@ -10376,6 +10376,11 @@ function smlua_text_utils_get_language()
|
|||
-- ...
|
||||
end
|
||||
|
||||
--- Resets every modified dialog back to vanilla
|
||||
function smlua_text_utils_reset_all()
|
||||
-- ...
|
||||
end
|
||||
|
||||
--- @param courseNum integer
|
||||
--- @param courseName string
|
||||
--- Replaces the secret star course name of `courseNum` with `courseName`
|
||||
|
|
|
@ -3242,6 +3242,27 @@ Gets the current language
|
|||
|
||||
<br />
|
||||
|
||||
## [smlua_text_utils_reset_all](#smlua_text_utils_reset_all)
|
||||
|
||||
### Description
|
||||
Resets every modified dialog back to vanilla
|
||||
|
||||
### Lua Example
|
||||
`smlua_text_utils_reset_all()`
|
||||
|
||||
### Parameters
|
||||
- None
|
||||
|
||||
### Returns
|
||||
- None
|
||||
|
||||
### C Prototype
|
||||
`void smlua_text_utils_reset_all(void);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [smlua_text_utils_secret_star_replace](#smlua_text_utils_secret_star_replace)
|
||||
|
||||
### Description
|
||||
|
|
|
@ -1890,6 +1890,7 @@
|
|||
- [smlua_text_utils_dialog_replace](functions-6.md#smlua_text_utils_dialog_replace)
|
||||
- [smlua_text_utils_extra_text_replace](functions-6.md#smlua_text_utils_extra_text_replace)
|
||||
- [smlua_text_utils_get_language](functions-6.md#smlua_text_utils_get_language)
|
||||
- [smlua_text_utils_reset_all](functions-6.md#smlua_text_utils_reset_all)
|
||||
- [smlua_text_utils_secret_star_replace](functions-6.md#smlua_text_utils_secret_star_replace)
|
||||
|
||||
<br />
|
||||
|
|
|
@ -31271,6 +31271,21 @@ int smlua_func_smlua_text_utils_get_language(UNUSED lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_smlua_text_utils_reset_all(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_reset_all", 0, top);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
smlua_text_utils_reset_all();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_smlua_text_utils_secret_star_replace(lua_State* L) {
|
||||
if (L == NULL) { return 0; }
|
||||
|
||||
|
@ -33785,6 +33800,7 @@ void smlua_bind_functions_autogen(void) {
|
|||
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);
|
||||
|
||||
// sound_init.h
|
||||
|
|
|
@ -24,6 +24,7 @@ extern struct CourseName *gReplacedActNameTable[];
|
|||
|
||||
void smlua_text_utils_init(void);
|
||||
void smlua_text_utils_shutdown(void);
|
||||
/* |description|Resets every modified dialog back to vanilla|descriptionEnd|*/
|
||||
void smlua_text_utils_reset_all(void);
|
||||
/* |description|Replaces `dialogId` with a custom one|descriptionEnd| */
|
||||
void smlua_text_utils_dialog_replace(enum DialogId dialogId, u32 unused, s8 linesPerBox, s16 leftOffset, s16 width, const char* str);
|
||||
|
|
Loading…
Reference in a new issue