mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-12-06 16:12:42 +00:00
exposed handle_special_dialog_text
This commit is contained in:
parent
c1af89aaf3
commit
cdf3ad4e66
6 changed files with 51 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ override_allowed_functions = {
|
|||
"src/game/level_update.h": [ "level_trigger_warp", "get_painting_warp_node", "initiate_painting_warp", "warp_special", "lvl_set_current_level", "level_control_timer_running", "fade_into_special_warp", "get_instant_warp" ],
|
||||
"src/game/area.h": [ "get_mario_spawn_type", "area_get_warp_node", "area_get_any_warp_node", "play_transition" ],
|
||||
"src/engine/level_script.h": [ "area_create_warp_node" ],
|
||||
"src/game/ingame_menu.h": [ "set_min_dialog_width", "set_dialog_override_pos", "reset_dialog_override_pos", "set_dialog_override_color", "reset_dialog_override_color", "set_menu_mode", "create_dialog_box", "create_dialog_box_with_var", "create_dialog_inverted_box", "create_dialog_box_with_response", "reset_dialog_render_state", "set_dialog_box_state", ],
|
||||
"src/game/ingame_menu.h": [ "set_min_dialog_width", "set_dialog_override_pos", "reset_dialog_override_pos", "set_dialog_override_color", "reset_dialog_override_color", "set_menu_mode", "create_dialog_box", "create_dialog_box_with_var", "create_dialog_inverted_box", "create_dialog_box_with_response", "reset_dialog_render_state", "set_dialog_box_state", "handle_special_dialog_text" ],
|
||||
"src/audio/seqplayer.h": [ "sequence_player_set_tempo", "sequence_player_set_tempo_acc", "sequence_player_set_transposition", "sequence_player_get_tempo", "sequence_player_get_tempo_acc", "sequence_player_get_transposition", "sequence_player_get_volume", "sequence_player_get_fade_volume", "sequence_player_get_mute_volume_scale" ],
|
||||
"src/pc/network/sync_object.h": [ "sync_object_is_initialized", "sync_object_is_owned_locally", "sync_object_get_object" ],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4444,6 +4444,12 @@ function set_menu_mode(mode)
|
|||
-- ...
|
||||
end
|
||||
|
||||
--- @param dialogID integer
|
||||
--- The internal function used by SM64 which plays a tune whenever boss, KtQ, etc dialog is read.
|
||||
function handle_special_dialog_text(dialogID)
|
||||
-- ...
|
||||
end
|
||||
|
||||
--- @param width integer
|
||||
--- Dialog box customization: Sets the minimum width for a dialog box
|
||||
function set_min_dialog_width(width)
|
||||
|
|
|
|||
|
|
@ -4931,6 +4931,29 @@ Sets the in-game menu state. 0-1 is the courses box with the castle secret stars
|
|||
|
||||
<br />
|
||||
|
||||
## [handle_special_dialog_text](#handle_special_dialog_text)
|
||||
|
||||
### Description
|
||||
The internal function used by SM64 which plays a tune whenever boss, KtQ, etc dialog is read.
|
||||
|
||||
### Lua Example
|
||||
`handle_special_dialog_text(dialogID)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| dialogID | `integer` |
|
||||
|
||||
### Returns
|
||||
- None
|
||||
|
||||
### C Prototype
|
||||
`void handle_special_dialog_text(s32 dialogID);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [set_min_dialog_width](#set_min_dialog_width)
|
||||
|
||||
### Description
|
||||
|
|
|
|||
|
|
@ -869,6 +869,7 @@
|
|||
- [create_dialog_box_with_response](functions-3.md#create_dialog_box_with_response)
|
||||
- [reset_dialog_render_state](functions-3.md#reset_dialog_render_state)
|
||||
- [set_menu_mode](functions-3.md#set_menu_mode)
|
||||
- [handle_special_dialog_text](functions-3.md#handle_special_dialog_text)
|
||||
- [set_min_dialog_width](functions-3.md#set_min_dialog_width)
|
||||
- [set_dialog_override_pos](functions-3.md#set_dialog_override_pos)
|
||||
- [reset_dialog_override_pos](functions-3.md#reset_dialog_override_pos)
|
||||
|
|
|
|||
|
|
@ -182,6 +182,8 @@ void do_cutscene_handler(void);
|
|||
void render_hud_cannon_reticle(void);
|
||||
void reset_red_coins_collected(void);
|
||||
s16 render_menus_and_dialogs(void);
|
||||
/* |description|The internal function used by SM64 which plays a tune whenever boss, KtQ, etc dialog is read.|descriptionEnd| */
|
||||
void handle_special_dialog_text(s32 dialogID);
|
||||
void create_dl_scale_matrix(s8 pushOp, f32 x, f32 y, f32 z);
|
||||
/* |description|Dialog box customization: Sets the minimum width for a dialog box|descriptionEnd| */
|
||||
void set_min_dialog_width(s16 width);
|
||||
|
|
|
|||
|
|
@ -14146,6 +14146,23 @@ int smlua_func_set_menu_mode(lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_handle_special_dialog_text(lua_State* L) {
|
||||
if (L == NULL) { return 0; }
|
||||
|
||||
int top = lua_gettop(L);
|
||||
if (top != 1) {
|
||||
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "handle_special_dialog_text", 1, top);
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 dialogID = smlua_to_integer(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "handle_special_dialog_text"); return 0; }
|
||||
|
||||
handle_special_dialog_text(dialogID);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_set_min_dialog_width(lua_State* L) {
|
||||
if (L == NULL) { return 0; }
|
||||
|
||||
|
|
@ -37574,6 +37591,7 @@ void smlua_bind_functions_autogen(void) {
|
|||
smlua_bind_function(L, "create_dialog_box_with_response", smlua_func_create_dialog_box_with_response);
|
||||
smlua_bind_function(L, "reset_dialog_render_state", smlua_func_reset_dialog_render_state);
|
||||
smlua_bind_function(L, "set_menu_mode", smlua_func_set_menu_mode);
|
||||
smlua_bind_function(L, "handle_special_dialog_text", smlua_func_handle_special_dialog_text);
|
||||
smlua_bind_function(L, "set_min_dialog_width", smlua_func_set_min_dialog_width);
|
||||
smlua_bind_function(L, "set_dialog_override_pos", smlua_func_set_dialog_override_pos);
|
||||
smlua_bind_function(L, "reset_dialog_override_pos", smlua_func_reset_dialog_override_pos);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue