Expose fade_into_special_warp
This commit is contained in:
parent
efd432afb8
commit
1f3af25805
|
@ -75,7 +75,7 @@ override_allowed_functions = {
|
||||||
"src/game/object_list_processor.h": [ "set_object_respawn_info_bits" ],
|
"src/game/object_list_processor.h": [ "set_object_respawn_info_bits" ],
|
||||||
"src/game/mario_misc.h": [ "bhv_toad.*", "bhv_unlock_door.*" ],
|
"src/game/mario_misc.h": [ "bhv_toad.*", "bhv_unlock_door.*" ],
|
||||||
"src/pc/utils/misc.h": [ "update_all_mario_stars" ],
|
"src/pc/utils/misc.h": [ "update_all_mario_stars" ],
|
||||||
"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" ],
|
"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" ],
|
||||||
"src/game/area.h": [ "area_get_warp_node" ],
|
"src/game/area.h": [ "area_get_warp_node" ],
|
||||||
"src/engine/level_script.h": [ "area_create_warp_node" ],
|
"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", "close_dialog_box", ]
|
"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", "close_dialog_box", ]
|
||||||
|
|
|
@ -4503,6 +4503,13 @@ function area_create_warp_node(id, destLevel, destArea, destNode, checkpoint, o)
|
||||||
-- ...
|
-- ...
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- @param arg integer
|
||||||
|
--- @param color integer
|
||||||
|
--- @return nil
|
||||||
|
function fade_into_special_warp(arg, color)
|
||||||
|
-- ...
|
||||||
|
end
|
||||||
|
|
||||||
--- @return WarpNode
|
--- @return WarpNode
|
||||||
function get_painting_warp_node()
|
function get_painting_warp_node()
|
||||||
-- ...
|
-- ...
|
||||||
|
|
|
@ -4766,6 +4766,27 @@
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
## [fade_into_special_warp](#fade_into_special_warp)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`fade_into_special_warp(arg, color)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| arg | `integer` |
|
||||||
|
| color | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void fade_into_special_warp(u32 arg, u32 color);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## [get_painting_warp_node](#get_painting_warp_node)
|
## [get_painting_warp_node](#get_painting_warp_node)
|
||||||
|
|
||||||
### Lua Example
|
### Lua Example
|
||||||
|
|
|
@ -893,6 +893,7 @@
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
- level_update.h
|
- level_update.h
|
||||||
|
- [fade_into_special_warp](functions-3.md#fade_into_special_warp)
|
||||||
- [get_painting_warp_node](functions-3.md#get_painting_warp_node)
|
- [get_painting_warp_node](functions-3.md#get_painting_warp_node)
|
||||||
- [initiate_painting_warp](functions-3.md#initiate_painting_warp)
|
- [initiate_painting_warp](functions-3.md#initiate_painting_warp)
|
||||||
- [level_control_timer_running](functions-3.md#level_control_timer_running)
|
- [level_control_timer_running](functions-3.md#level_control_timer_running)
|
||||||
|
|
|
@ -270,7 +270,7 @@ void set_play_mode(s16 playMode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void warp_special(s32 arg) {
|
void warp_special(s32 arg) {
|
||||||
if (arg != SPECIAL_WARP_CAKE && arg != SPECIAL_WARP_GODDARD && arg != SPECIAL_WARP_GODDARD_GAMEOVER && arg != SPECIAL_WARP_TITLE && arg != SPECIAL_WARP_LEVEL_SELECT) {
|
if (arg != 0 && arg != SPECIAL_WARP_CAKE && arg != SPECIAL_WARP_GODDARD && arg != SPECIAL_WARP_GODDARD_GAMEOVER && arg != SPECIAL_WARP_TITLE && arg != SPECIAL_WARP_LEVEL_SELECT) {
|
||||||
LOG_ERROR("Invalid parameter value for warp_special: Expected SPECIAL_WARP_CAKE, SPECIAL_WARP_GODDARD, SPECIAL_WARP_GODDARD_GAMEOVER, SPECIAL_WARP_TITLE, or SPECIAL_WARP_LEVEL_SELECT");
|
LOG_ERROR("Invalid parameter value for warp_special: Expected SPECIAL_WARP_CAKE, SPECIAL_WARP_GODDARD, SPECIAL_WARP_GODDARD_GAMEOVER, SPECIAL_WARP_TITLE, or SPECIAL_WARP_LEVEL_SELECT");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14559,6 +14559,25 @@ int smlua_func_area_create_warp_node(lua_State* L) {
|
||||||
// level_update.h //
|
// level_update.h //
|
||||||
////////////////////
|
////////////////////
|
||||||
|
|
||||||
|
int smlua_func_fade_into_special_warp(lua_State* L) {
|
||||||
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
int top = lua_gettop(L);
|
||||||
|
if (top != 2) {
|
||||||
|
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "fade_into_special_warp", 2, top);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 arg = smlua_to_integer(L, 1);
|
||||||
|
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "fade_into_special_warp"); return 0; }
|
||||||
|
u32 color = smlua_to_integer(L, 2);
|
||||||
|
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "fade_into_special_warp"); return 0; }
|
||||||
|
|
||||||
|
fade_into_special_warp(arg, color);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int smlua_func_get_painting_warp_node(UNUSED lua_State* L) {
|
int smlua_func_get_painting_warp_node(UNUSED lua_State* L) {
|
||||||
if (L == NULL) { return 0; }
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
@ -33289,6 +33308,7 @@ void smlua_bind_functions_autogen(void) {
|
||||||
smlua_bind_function(L, "area_create_warp_node", smlua_func_area_create_warp_node);
|
smlua_bind_function(L, "area_create_warp_node", smlua_func_area_create_warp_node);
|
||||||
|
|
||||||
// level_update.h
|
// level_update.h
|
||||||
|
smlua_bind_function(L, "fade_into_special_warp", smlua_func_fade_into_special_warp);
|
||||||
smlua_bind_function(L, "get_painting_warp_node", smlua_func_get_painting_warp_node);
|
smlua_bind_function(L, "get_painting_warp_node", smlua_func_get_painting_warp_node);
|
||||||
smlua_bind_function(L, "initiate_painting_warp", smlua_func_initiate_painting_warp);
|
smlua_bind_function(L, "initiate_painting_warp", smlua_func_initiate_painting_warp);
|
||||||
smlua_bind_function(L, "level_control_timer_running", smlua_func_level_control_timer_running);
|
smlua_bind_function(L, "level_control_timer_running", smlua_func_level_control_timer_running);
|
||||||
|
|
Loading…
Reference in New Issue