diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py index a78102893..56830e4b5 100644 --- a/autogen/convert_functions.py +++ b/autogen/convert_functions.py @@ -868,7 +868,9 @@ def build_param(fid, param, i): else: s = ' ' + s - return s + '\n' + sanity_check = ' if (lua_isnil(L, %d)) { return 0; }\n' % (i) + + return sanity_check + s + '\n' def build_param_after(param, i): ptype = param['type'] diff --git a/autogen/lua_definitions/constants.lua b/autogen/lua_definitions/constants.lua index 28736680c..4c063ed71 100644 --- a/autogen/lua_definitions/constants.lua +++ b/autogen/lua_definitions/constants.lua @@ -11219,6 +11219,9 @@ SOUND_TERRAIN_WATER = 2 --- @type integer SOUND_VIBRATO = 0x2000000 +--- @type integer +HAZARD_TYPE_HORIZONTAL_WIND = 4 + --- @type integer HAZARD_TYPE_LAVA_FLOOR = 1 @@ -11228,9 +11231,6 @@ HAZARD_TYPE_LAVA_WALL = 2 --- @type integer HAZARD_TYPE_QUICKSAND = 3 ---- @type integer -HAZARD_TYPE_HORIZONTAL_WIND = 4 - --- @type integer HAZARD_TYPE_VERTICAL_WIND = 5 diff --git a/docs/lua/constants.md b/docs/lua/constants.md index 21fc12b0c..8fa0ad8f8 100644 --- a/docs/lua/constants.md +++ b/docs/lua/constants.md @@ -4704,10 +4704,10 @@
## [surface_terrains.h](#surface_terrains.h) +- HAZARD_TYPE_HORIZONTAL_WIND - HAZARD_TYPE_LAVA_FLOOR - HAZARD_TYPE_LAVA_WALL - HAZARD_TYPE_QUICKSAND -- HAZARD_TYPE_HORIZONTAL_WIND - HAZARD_TYPE_VERTICAL_WIND - SURFACE_0004 - SURFACE_BOSS_FIGHT_CAMERA diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index 28a766de0..2625eaf63 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -4741,4 +4741,4 @@ char gSmluaConstants[] = "" "VERSION_NUMBER=40\n" "MINOR_VERSION_NUMBER=0\n" "MAX_VERSION_LENGTH=128\n" -; +; \ No newline at end of file diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index be2f78710..c9592d644 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -218,6 +218,7 @@ int smlua_func_area_get_warp_node_from_params(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "area_get_warp_node_from_params"); return 0; } @@ -6993,6 +6994,7 @@ int smlua_func_bhv_spawn_star_no_level_exit(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* object = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "bhv_spawn_star_no_level_exit"); return 0; } u32 params = smlua_to_integer(L, 2); @@ -9211,6 +9213,7 @@ int smlua_func_geo_bits_bowser_coloring(lua_State* L) { s32 run = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_bits_bowser_coloring"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_bits_bowser_coloring"); return 0; } s32 a2 = smlua_to_integer(L, 3); @@ -9234,6 +9237,7 @@ int smlua_func_geo_move_mario_part_from_parent(lua_State* L) { s32 run = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_move_mario_part_from_parent"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_move_mario_part_from_parent"); return 0; } @@ -9261,6 +9265,7 @@ int smlua_func_geo_scale_bowser_key(lua_State* L) { s32 run = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_scale_bowser_key"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_scale_bowser_key"); return 0; } f32 mtx[4][4] = smlua_to_number(L, 3); @@ -9284,8 +9289,10 @@ int smlua_func_geo_snufit_move_mask(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_snufit_move_mask"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_snufit_move_mask"); return 0; } + if (lua_isnil(L, 3)) { return 0; } Mat4 * c = (Mat4 *)smlua_to_cobject(L, 3, LOT_MAT4); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_snufit_move_mask"); return 0; } @@ -9307,8 +9314,10 @@ int smlua_func_geo_snufit_scale_body(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_snufit_scale_body"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_snufit_scale_body"); return 0; } + if (lua_isnil(L, 3)) { return 0; } Mat4 * c = (Mat4 *)smlua_to_cobject(L, 3, LOT_MAT4); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_snufit_scale_body"); return 0; } @@ -9330,8 +9339,10 @@ int smlua_func_geo_switch_bowser_eyes(lua_State* L) { s32 run = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_switch_bowser_eyes"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_switch_bowser_eyes"); return 0; } + if (lua_isnil(L, 3)) { return 0; } Mat4 * mtx = (Mat4 *)smlua_to_cobject(L, 3, LOT_MAT4); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_switch_bowser_eyes"); return 0; } @@ -9353,8 +9364,10 @@ int smlua_func_geo_switch_tuxie_mother_eyes(lua_State* L) { s32 run = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_switch_tuxie_mother_eyes"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_switch_tuxie_mother_eyes"); return 0; } + if (lua_isnil(L, 3)) { return 0; } Mat4 * mtx = (Mat4 *)smlua_to_cobject(L, 3, LOT_MAT4); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_switch_tuxie_mother_eyes"); return 0; } @@ -9376,6 +9389,7 @@ int smlua_func_geo_update_body_rot_from_parent(lua_State* L) { s32 run = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_update_body_rot_from_parent"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_update_body_rot_from_parent"); return 0; } @@ -9403,6 +9417,7 @@ int smlua_func_geo_update_held_mario_pos(lua_State* L) { s32 run = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_update_held_mario_pos"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_update_held_mario_pos"); return 0; } @@ -9787,6 +9802,7 @@ int smlua_func_obj_update_gfx_pos_and_angle(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_update_gfx_pos_and_angle"); return 0; } @@ -9972,6 +9988,7 @@ int smlua_func_approach_camera_height(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_camera_height"); return 0; } f32 goal = smlua_to_number(L, 2); @@ -10329,6 +10346,7 @@ int smlua_func_camera_course_processing(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_course_processing"); return 0; } @@ -10470,8 +10488,10 @@ int smlua_func_cutscene_event(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } // CameraEvent event = (CameraEvent)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_event"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 2, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_event"); return 0; } s16 start = smlua_to_integer(L, 3); @@ -10496,6 +10516,7 @@ int smlua_func_cutscene_object(lua_State* L) { u8 cutscene = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_object"); return 0; } @@ -10515,6 +10536,7 @@ int smlua_func_cutscene_object_with_dialog(lua_State* L) { u8 cutscene = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_object_with_dialog"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_object_with_dialog"); return 0; } s16 dialogID = smlua_to_integer(L, 3); @@ -10536,6 +10558,7 @@ int smlua_func_cutscene_object_without_dialog(lua_State* L) { u8 cutscene = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_object_without_dialog"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_object_without_dialog"); return 0; } @@ -10610,6 +10633,7 @@ int smlua_func_find_mario_floor_and_ceil(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct PlayerGeometry* pg = (struct PlayerGeometry*)smlua_to_cobject(L, 1, LOT_PLAYERGEOMETRY); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_mario_floor_and_ceil"); return 0; } @@ -10630,8 +10654,10 @@ int smlua_func_geo_camera_fov(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_camera_fov"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* g = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_camera_fov"); return 0; } + if (lua_isnil(L, 3)) { return 0; } // void * context = (void *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_camera_fov"); return 0; } @@ -10653,8 +10679,10 @@ int smlua_func_geo_camera_main(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_camera_main"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* g = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_camera_main"); return 0; } + if (lua_isnil(L, 3)) { return 0; } // void * context = (void *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_camera_main"); return 0; } @@ -10673,6 +10701,7 @@ int smlua_func_get_cutscene_from_mario_status(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_cutscene_from_mario_status"); return 0; } @@ -10690,6 +10719,7 @@ int smlua_func_handle_c_button_movement(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "handle_c_button_movement"); return 0; } @@ -10715,6 +10745,7 @@ int smlua_func_is_range_behind_surface(lua_State* L) { Vec3f to; smlua_get_vec3f(to, 2); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_range_behind_surface"); return 0; } + if (lua_isnil(L, 3)) { return 0; } struct Surface* surf = (struct Surface*)smlua_to_cobject(L, 3, LOT_SURFACE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "is_range_behind_surface"); return 0; } s16 range = smlua_to_integer(L, 4); @@ -10761,6 +10792,7 @@ int smlua_func_move_mario_head_c_up(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "move_mario_head_c_up"); return 0; } @@ -10831,6 +10863,7 @@ int smlua_func_obj_rotate_towards_point(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_rotate_towards_point"); return 0; } @@ -10866,6 +10899,7 @@ int smlua_func_object_pos_to_vec3f(lua_State* L) { Vec3f dst; smlua_get_vec3f(dst, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "object_pos_to_vec3f"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "object_pos_to_vec3f"); return 0; } @@ -10924,6 +10958,7 @@ int smlua_func_offset_yaw_outward_radial(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "offset_yaw_outward_radial"); return 0; } s16 areaYaw = smlua_to_integer(L, 2); @@ -10988,6 +11023,7 @@ int smlua_func_play_cutscene(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_cutscene"); return 0; } @@ -11095,6 +11131,7 @@ int smlua_func_radial_camera_input(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "radial_camera_input"); return 0; } f32 unused = smlua_to_number(L, 2); @@ -11141,6 +11178,7 @@ int smlua_func_reset_camera(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "reset_camera"); return 0; } @@ -11185,6 +11223,7 @@ int smlua_func_rotate_camera_around_walls(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "rotate_camera_around_walls"); return 0; } @@ -11337,6 +11376,7 @@ int smlua_func_set_camera_mode(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_mode"); return 0; } s16 mode = smlua_to_integer(L, 2); @@ -11358,6 +11398,7 @@ int smlua_func_set_camera_mode_fixed(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_mode_fixed"); return 0; } s16 x = smlua_to_integer(L, 2); @@ -11830,6 +11871,7 @@ int smlua_func_soft_reset_camera(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "soft_reset_camera"); return 0; } @@ -11847,6 +11889,7 @@ int smlua_func_start_cutscene(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "start_cutscene"); return 0; } u8 cutscene = smlua_to_integer(L, 2); @@ -11883,6 +11926,7 @@ int smlua_func_transition_next_state(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "transition_next_state"); return 0; } s16 frames = smlua_to_integer(L, 2); @@ -11946,6 +11990,7 @@ int smlua_func_vec3f_to_object_pos(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_to_object_pos"); return 0; } @@ -11994,6 +12039,7 @@ int smlua_func_get_character(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_character"); return 0; } @@ -12011,6 +12057,7 @@ int smlua_func_get_character_anim(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_character_anim"); return 0; } int characterAnim = smlua_to_integer(L, 2); @@ -12030,6 +12077,7 @@ int smlua_func_get_character_anim_offset(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_character_anim_offset"); return 0; } @@ -12047,6 +12095,7 @@ int smlua_func_play_character_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_character_sound"); return 0; } int characterSound = smlua_to_integer(L, 2); @@ -12066,6 +12115,7 @@ int smlua_func_play_character_sound_if_no_flag(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_character_sound_if_no_flag"); return 0; } int characterSound = smlua_to_integer(L, 2); @@ -12087,6 +12137,7 @@ int smlua_func_play_character_sound_offset(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_character_sound_offset"); return 0; } int characterSound = smlua_to_integer(L, 2); @@ -12108,6 +12159,7 @@ int smlua_func_update_character_anim_offset(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_character_anim_offset"); return 0; } @@ -13434,6 +13486,7 @@ int smlua_func_first_person_check_cancels(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "first_person_check_cancels"); return 0; } @@ -13722,8 +13775,10 @@ int smlua_func_determine_interaction(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "determine_interaction"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "determine_interaction"); return 0; } @@ -13741,6 +13796,7 @@ int smlua_func_does_mario_have_normal_cap_on_head(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "does_mario_have_normal_cap_on_head"); return 0; } @@ -13758,6 +13814,7 @@ int smlua_func_get_door_save_file_flag(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* door = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_door_save_file_flag"); return 0; } @@ -13775,6 +13832,7 @@ int smlua_func_get_mario_cap_flag(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* capObject = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_mario_cap_flag"); return 0; } @@ -13792,9 +13850,11 @@ int smlua_func_interact_bbh_entrance(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bbh_entrance"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bbh_entrance"); return 0; } @@ -13812,9 +13872,11 @@ int smlua_func_interact_bounce_top(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bounce_top"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bounce_top"); return 0; } @@ -13832,9 +13894,11 @@ int smlua_func_interact_breakable(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_breakable"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_breakable"); return 0; } @@ -13852,9 +13916,11 @@ int smlua_func_interact_bully(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bully"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bully"); return 0; } @@ -13872,9 +13938,11 @@ int smlua_func_interact_cannon_base(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_cannon_base"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_cannon_base"); return 0; } @@ -13892,9 +13960,11 @@ int smlua_func_interact_cap(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_cap"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_cap"); return 0; } @@ -13912,9 +13982,11 @@ int smlua_func_interact_clam_or_bubba(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_clam_or_bubba"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_clam_or_bubba"); return 0; } @@ -13932,9 +14004,11 @@ int smlua_func_interact_coin(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_coin"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_coin"); return 0; } @@ -13952,9 +14026,11 @@ int smlua_func_interact_damage(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_damage"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_damage"); return 0; } @@ -13972,9 +14048,11 @@ int smlua_func_interact_door(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_door"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_door"); return 0; } @@ -13992,9 +14070,11 @@ int smlua_func_interact_flame(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_flame"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_flame"); return 0; } @@ -14012,9 +14092,11 @@ int smlua_func_interact_grabbable(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_grabbable"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_grabbable"); return 0; } @@ -14032,9 +14114,11 @@ int smlua_func_interact_hit_from_below(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_hit_from_below"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_hit_from_below"); return 0; } @@ -14052,9 +14136,11 @@ int smlua_func_interact_hoot(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_hoot"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_hoot"); return 0; } @@ -14072,9 +14158,11 @@ int smlua_func_interact_igloo_barrier(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_igloo_barrier"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_igloo_barrier"); return 0; } @@ -14092,9 +14180,11 @@ int smlua_func_interact_koopa_shell(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_koopa_shell"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_koopa_shell"); return 0; } @@ -14112,9 +14202,11 @@ int smlua_func_interact_mr_blizzard(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_mr_blizzard"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_mr_blizzard"); return 0; } @@ -14132,9 +14224,11 @@ int smlua_func_interact_player(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_player"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_player"); return 0; } @@ -14152,9 +14246,11 @@ int smlua_func_interact_pole(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_pole"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_pole"); return 0; } @@ -14172,9 +14268,11 @@ int smlua_func_interact_shock(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_shock"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_shock"); return 0; } @@ -14192,9 +14290,11 @@ int smlua_func_interact_snufit_bullet(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_snufit_bullet"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_snufit_bullet"); return 0; } @@ -14212,9 +14312,11 @@ int smlua_func_interact_spiny_walking(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_spiny_walking"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_spiny_walking"); return 0; } @@ -14232,9 +14334,11 @@ int smlua_func_interact_star_or_key(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_star_or_key"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_star_or_key"); return 0; } @@ -14252,9 +14356,11 @@ int smlua_func_interact_strong_wind(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_strong_wind"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_strong_wind"); return 0; } @@ -14272,9 +14378,11 @@ int smlua_func_interact_text(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_text"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_text"); return 0; } @@ -14292,9 +14400,11 @@ int smlua_func_interact_tornado(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_tornado"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_tornado"); return 0; } @@ -14312,9 +14422,11 @@ int smlua_func_interact_warp(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_warp"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_warp"); return 0; } @@ -14332,9 +14444,11 @@ int smlua_func_interact_warp_door(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_warp_door"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_warp_door"); return 0; } @@ -14352,9 +14466,11 @@ int smlua_func_interact_water_ring(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_water_ring"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_water_ring"); return 0; } @@ -14372,9 +14488,11 @@ int smlua_func_interact_whirlpool(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_whirlpool"); return 0; } // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_whirlpool"); return 0; } @@ -14392,6 +14510,7 @@ int smlua_func_mario_blow_off_cap(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_blow_off_cap"); return 0; } f32 capSpeed = smlua_to_number(L, 2); @@ -14411,6 +14530,7 @@ int smlua_func_mario_check_object_grab(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_check_object_grab"); return 0; } @@ -14428,6 +14548,7 @@ int smlua_func_mario_drop_held_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_drop_held_object"); return 0; } @@ -14445,6 +14566,7 @@ int smlua_func_mario_get_collided_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_get_collided_object"); return 0; } u32 interactType = smlua_to_integer(L, 2); @@ -14464,6 +14586,7 @@ int smlua_func_mario_grab_used_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_grab_used_object"); return 0; } @@ -14481,6 +14604,7 @@ int smlua_func_mario_lose_cap_to_enemy(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_lose_cap_to_enemy"); return 0; } u32 arg = smlua_to_integer(L, 2); @@ -14500,8 +14624,10 @@ int smlua_func_mario_obj_angle_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_obj_angle_to_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_obj_angle_to_object"); return 0; } @@ -14519,6 +14645,7 @@ int smlua_func_mario_retrieve_cap(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_retrieve_cap"); return 0; } @@ -14536,6 +14663,7 @@ int smlua_func_mario_stop_riding_and_holding(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_stop_riding_and_holding"); return 0; } @@ -14553,6 +14681,7 @@ int smlua_func_mario_stop_riding_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_stop_riding_object"); return 0; } @@ -14570,6 +14699,7 @@ int smlua_func_mario_throw_held_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_throw_held_object"); return 0; } @@ -14587,8 +14717,10 @@ int smlua_func_passes_pvp_interaction_checks(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* attacker = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "passes_pvp_interaction_checks"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct MarioState* victim = (struct MarioState*)smlua_to_cobject(L, 2, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "passes_pvp_interaction_checks"); return 0; } @@ -14606,8 +14738,10 @@ int smlua_func_should_push_or_pull_door(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "should_push_or_pull_door"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "should_push_or_pull_door"); return 0; } @@ -14625,8 +14759,10 @@ int smlua_func_take_damage_and_knock_back(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "take_damage_and_knock_back"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "take_damage_and_knock_back"); return 0; } @@ -14648,6 +14784,7 @@ int smlua_func_lag_compensation_get_local_state(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct NetworkPlayer* otherNp = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "lag_compensation_get_local_state"); return 0; } @@ -14856,6 +14993,7 @@ int smlua_func_area_create_warp_node(lua_State* L) { if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "area_create_warp_node"); return 0; } u8 checkpoint = smlua_to_integer(L, 5); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "area_create_warp_node"); return 0; } + if (lua_isnil(L, 6)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 6, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "area_create_warp_node"); return 0; } @@ -14960,6 +15098,7 @@ int smlua_func_level_trigger_warp(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "level_trigger_warp"); return 0; } s32 warpOp = smlua_to_integer(L, 2); @@ -15247,6 +15386,7 @@ int smlua_func_adjust_sound_for_speed(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "adjust_sound_for_speed"); return 0; } @@ -15264,6 +15404,7 @@ int smlua_func_check_common_action_exits(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_action_exits"); return 0; } @@ -15281,6 +15422,7 @@ int smlua_func_check_common_hold_action_exits(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_hold_action_exits"); return 0; } @@ -15298,6 +15440,7 @@ int smlua_func_drop_and_set_mario_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "drop_and_set_mario_action"); return 0; } u32 action = smlua_to_integer(L, 2); @@ -15319,6 +15462,7 @@ int smlua_func_execute_mario_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "execute_mario_action"); return 0; } @@ -15336,6 +15480,7 @@ int smlua_func_find_floor_height_relative_polar(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_floor_height_relative_polar"); return 0; } s16 angleFromMario = smlua_to_integer(L, 2); @@ -15357,6 +15502,7 @@ int smlua_func_find_floor_slope(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_floor_slope"); return 0; } s16 yawOffset = smlua_to_integer(L, 2); @@ -15376,6 +15522,7 @@ int smlua_func_find_mario_anim_flags_and_translation(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_mario_anim_flags_and_translation"); return 0; } s32 yaw = smlua_to_integer(L, 2); @@ -15401,6 +15548,7 @@ int smlua_func_force_idle_state(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "force_idle_state"); return 0; } @@ -15418,6 +15566,7 @@ int smlua_func_hurt_and_set_mario_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hurt_and_set_mario_action"); return 0; } u32 action = smlua_to_integer(L, 2); @@ -15441,6 +15590,7 @@ int smlua_func_init_single_mario(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "init_single_mario"); return 0; } @@ -15458,6 +15608,7 @@ int smlua_func_is_anim_at_end(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_anim_at_end"); return 0; } @@ -15475,6 +15626,7 @@ int smlua_func_is_anim_past_end(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_anim_past_end"); return 0; } @@ -15492,6 +15644,7 @@ int smlua_func_is_anim_past_frame(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_anim_past_frame"); return 0; } s16 animFrame = smlua_to_integer(L, 2); @@ -15511,6 +15664,7 @@ int smlua_func_mario_can_bubble(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_can_bubble"); return 0; } @@ -15528,6 +15682,7 @@ int smlua_func_mario_facing_downhill(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_facing_downhill"); return 0; } s32 turnYaw = smlua_to_integer(L, 2); @@ -15547,6 +15702,7 @@ int smlua_func_mario_floor_is_slippery(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_floor_is_slippery"); return 0; } @@ -15564,6 +15720,7 @@ int smlua_func_mario_floor_is_slope(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_floor_is_slope"); return 0; } @@ -15581,6 +15738,7 @@ int smlua_func_mario_floor_is_steep(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_floor_is_steep"); return 0; } @@ -15598,6 +15756,7 @@ int smlua_func_mario_get_floor_class(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_get_floor_class"); return 0; } @@ -15615,6 +15774,7 @@ int smlua_func_mario_get_terrain_sound_addend(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_get_terrain_sound_addend"); return 0; } @@ -15632,6 +15792,7 @@ int smlua_func_mario_is_crouching(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_crouching"); return 0; } @@ -15649,6 +15810,7 @@ int smlua_func_mario_set_bubbled(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_set_bubbled"); return 0; } @@ -15666,6 +15828,7 @@ int smlua_func_mario_set_forward_vel(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_set_forward_vel"); return 0; } f32 speed = smlua_to_number(L, 2); @@ -15685,8 +15848,10 @@ int smlua_func_mario_update_wall(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_wall"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct WallCollisionData* wcd = (struct WallCollisionData*)smlua_to_cobject(L, 2, LOT_WALLCOLLISIONDATA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_update_wall"); return 0; } @@ -15704,6 +15869,7 @@ int smlua_func_play_mario_action_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_action_sound"); return 0; } u32 soundBits = smlua_to_integer(L, 2); @@ -15725,6 +15891,7 @@ int smlua_func_play_mario_heavy_landing_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_heavy_landing_sound"); return 0; } u32 soundBits = smlua_to_integer(L, 2); @@ -15744,6 +15911,7 @@ int smlua_func_play_mario_heavy_landing_sound_once(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_heavy_landing_sound_once"); return 0; } u32 soundBits = smlua_to_integer(L, 2); @@ -15763,6 +15931,7 @@ int smlua_func_play_mario_jump_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_jump_sound"); return 0; } @@ -15780,6 +15949,7 @@ int smlua_func_play_mario_landing_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_landing_sound"); return 0; } u32 soundBits = smlua_to_integer(L, 2); @@ -15799,6 +15969,7 @@ int smlua_func_play_mario_landing_sound_once(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_landing_sound_once"); return 0; } u32 soundBits = smlua_to_integer(L, 2); @@ -15818,6 +15989,7 @@ int smlua_func_play_mario_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_sound"); return 0; } s32 primarySoundBits = smlua_to_integer(L, 2); @@ -15839,6 +16011,7 @@ int smlua_func_play_sound_and_spawn_particles(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_sound_and_spawn_particles"); return 0; } u32 soundBits = smlua_to_integer(L, 2); @@ -15860,6 +16033,7 @@ int smlua_func_play_sound_if_no_flag(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_sound_if_no_flag"); return 0; } u32 soundBits = smlua_to_integer(L, 2); @@ -15914,6 +16088,7 @@ int smlua_func_resolve_and_return_wall_collisions_data(lua_State* L) { if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "resolve_and_return_wall_collisions_data"); return 0; } f32 radius = smlua_to_number(L, 3); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "resolve_and_return_wall_collisions_data"); return 0; } + if (lua_isnil(L, 4)) { return 0; } struct WallCollisionData* collisionData = (struct WallCollisionData*)smlua_to_cobject(L, 4, LOT_WALLCOLLISIONDATA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "resolve_and_return_wall_collisions_data"); return 0; } @@ -15933,6 +16108,7 @@ int smlua_func_return_mario_anim_y_translation(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "return_mario_anim_y_translation"); return 0; } @@ -15950,6 +16126,7 @@ int smlua_func_set_anim_to_frame(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_anim_to_frame"); return 0; } s16 animFrame = smlua_to_integer(L, 2); @@ -15969,6 +16146,7 @@ int smlua_func_set_character_anim_with_accel(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_character_anim_with_accel"); return 0; } int targetAnimID = smlua_to_integer(L, 2); @@ -15990,6 +16168,7 @@ int smlua_func_set_character_animation(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_character_animation"); return 0; } int targetAnimID = smlua_to_integer(L, 2); @@ -16009,6 +16188,7 @@ int smlua_func_set_jump_from_landing(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_jump_from_landing"); return 0; } @@ -16026,6 +16206,7 @@ int smlua_func_set_jumping_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_jumping_action"); return 0; } u32 action = smlua_to_integer(L, 2); @@ -16047,6 +16228,7 @@ int smlua_func_set_mario_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_action"); return 0; } u32 action = smlua_to_integer(L, 2); @@ -16068,6 +16250,7 @@ int smlua_func_set_mario_anim_with_accel(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_anim_with_accel"); return 0; } s32 targetAnimID = smlua_to_integer(L, 2); @@ -16089,6 +16272,7 @@ int smlua_func_set_mario_animation(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_animation"); return 0; } s32 targetAnimID = smlua_to_integer(L, 2); @@ -16108,6 +16292,7 @@ int smlua_func_set_mario_particle_flags(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_particle_flags"); return 0; } u32 flags = smlua_to_integer(L, 2); @@ -16129,6 +16314,7 @@ int smlua_func_set_mario_y_vel_based_on_fspeed(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_y_vel_based_on_fspeed"); return 0; } f32 initialVelY = smlua_to_number(L, 2); @@ -16150,6 +16336,7 @@ int smlua_func_set_steep_jump_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_steep_jump_action"); return 0; } @@ -16167,6 +16354,7 @@ int smlua_func_set_water_plunge_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_water_plunge_action"); return 0; } @@ -16184,6 +16372,7 @@ int smlua_func_transition_submerged_to_walking(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "transition_submerged_to_walking"); return 0; } @@ -16201,6 +16390,7 @@ int smlua_func_update_mario_pos_for_anim(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_mario_pos_for_anim"); return 0; } @@ -16218,6 +16408,7 @@ int smlua_func_update_mario_sound_and_camera(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_mario_sound_and_camera"); return 0; } @@ -16242,6 +16433,7 @@ int smlua_func_vec3f_find_ceil(lua_State* L) { if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_find_ceil"); return 0; } f32 height = smlua_to_number(L, 2); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_find_ceil"); return 0; } + if (lua_isnil(L, 3)) { return 0; } // struct Surface** ceil = (struct Surface**)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_find_ceil"); return 0; } @@ -16269,6 +16461,7 @@ int smlua_func_vec3f_mario_ceil(lua_State* L) { if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_mario_ceil"); return 0; } f32 height = smlua_to_number(L, 2); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_mario_ceil"); return 0; } + if (lua_isnil(L, 3)) { return 0; } // struct Surface** ceil = (struct Surface**)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_mario_ceil"); return 0; } @@ -16293,6 +16486,7 @@ int smlua_func_check_common_airborne_cancels(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_airborne_cancels"); return 0; } @@ -16311,6 +16505,7 @@ int smlua_func_check_fall_damage(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_fall_damage"); return 0; } u32 hardFallAction = smlua_to_integer(L, 2); @@ -16331,6 +16526,7 @@ int smlua_func_check_fall_damage_or_get_stuck(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_fall_damage_or_get_stuck"); return 0; } u32 hardFallAction = smlua_to_integer(L, 2); @@ -16351,6 +16547,7 @@ int smlua_func_check_horizontal_wind(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_horizontal_wind"); return 0; } @@ -16369,6 +16566,7 @@ int smlua_func_check_kick_or_dive_in_air(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_kick_or_dive_in_air"); return 0; } @@ -16387,6 +16585,7 @@ int smlua_func_check_wall_kick(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_wall_kick"); return 0; } @@ -16405,6 +16604,7 @@ int smlua_func_common_air_action_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_air_action_step"); return 0; } u32 landAction = smlua_to_integer(L, 2); @@ -16429,6 +16629,7 @@ int smlua_func_common_air_knockback_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_air_knockback_step"); return 0; } u32 landAction = smlua_to_integer(L, 2); @@ -16455,6 +16656,7 @@ int smlua_func_lava_boost_on_wall(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "lava_boost_on_wall"); return 0; } @@ -16473,6 +16675,7 @@ int smlua_func_mario_execute_airborne_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_airborne_action"); return 0; } @@ -16491,6 +16694,7 @@ int smlua_func_play_far_fall_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_far_fall_sound"); return 0; } @@ -16509,6 +16713,7 @@ int smlua_func_play_flip_sounds(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_flip_sounds"); return 0; } s16 frame1 = smlua_to_integer(L, 2); @@ -16534,6 +16739,7 @@ int smlua_func_play_knockback_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_knockback_sound"); return 0; } @@ -16553,6 +16759,7 @@ int smlua_func_should_get_stuck_in_ground(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "should_get_stuck_in_ground"); return 0; } @@ -16571,6 +16778,7 @@ int smlua_func_update_air_with_turn(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_air_with_turn"); return 0; } @@ -16589,6 +16797,7 @@ int smlua_func_update_air_without_turn(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_air_without_turn"); return 0; } @@ -16607,6 +16816,7 @@ int smlua_func_update_flying(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_flying"); return 0; } @@ -16625,6 +16835,7 @@ int smlua_func_update_flying_pitch(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_flying_pitch"); return 0; } @@ -16643,6 +16854,7 @@ int smlua_func_update_flying_yaw(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_flying_yaw"); return 0; } @@ -16661,6 +16873,7 @@ int smlua_func_update_lava_boost_or_twirling(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_lava_boost_or_twirling"); return 0; } @@ -16683,6 +16896,7 @@ int smlua_func_add_tree_leaf_particles(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "add_tree_leaf_particles"); return 0; } @@ -16701,6 +16915,7 @@ int smlua_func_check_common_automatic_cancels(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_automatic_cancels"); return 0; } @@ -16719,6 +16934,7 @@ int smlua_func_climb_up_ledge(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "climb_up_ledge"); return 0; } @@ -16737,6 +16953,7 @@ int smlua_func_let_go_of_ledge(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "let_go_of_ledge"); return 0; } @@ -16755,6 +16972,7 @@ int smlua_func_mario_execute_automatic_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_automatic_action"); return 0; } @@ -16773,6 +16991,7 @@ int smlua_func_perform_hanging_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_hanging_step"); return 0; } @@ -16797,6 +17016,7 @@ int smlua_func_play_climbing_sounds(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_climbing_sounds"); return 0; } s32 b = smlua_to_integer(L, 2); @@ -16817,6 +17037,7 @@ int smlua_func_set_pole_position(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_pole_position"); return 0; } f32 offsetY = smlua_to_number(L, 2); @@ -16837,6 +17058,7 @@ int smlua_func_update_hang_moving(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_hang_moving"); return 0; } @@ -16855,6 +17077,7 @@ int smlua_func_update_hang_stationary(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_hang_stationary"); return 0; } @@ -16873,6 +17096,7 @@ int smlua_func_update_ledge_climb(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_ledge_climb"); return 0; } s32 animation = smlua_to_integer(L, 2); @@ -16895,6 +17119,7 @@ int smlua_func_update_ledge_climb_camera(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_ledge_climb_camera"); return 0; } @@ -16949,6 +17174,7 @@ int smlua_func_common_death_handler(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_death_handler"); return 0; } s32 animation = smlua_to_integer(L, 2); @@ -16971,6 +17197,7 @@ int smlua_func_cutscene_put_cap_on(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_put_cap_on"); return 0; } @@ -16989,6 +17216,7 @@ int smlua_func_cutscene_take_cap_off(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_take_cap_off"); return 0; } @@ -17007,6 +17235,7 @@ int smlua_func_general_star_dance_handler(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "general_star_dance_handler"); return 0; } s32 isInWater = smlua_to_integer(L, 2); @@ -17069,6 +17298,7 @@ int smlua_func_get_star_collection_dialog(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_star_collection_dialog"); return 0; } @@ -17087,6 +17317,7 @@ int smlua_func_handle_save_menu(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "handle_save_menu"); return 0; } @@ -17105,6 +17336,7 @@ int smlua_func_launch_mario_until_land(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "launch_mario_until_land"); return 0; } s32 endAction = smlua_to_integer(L, 2); @@ -17129,6 +17361,7 @@ int smlua_func_mario_execute_cutscene_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_cutscene_action"); return 0; } @@ -17147,6 +17380,7 @@ int smlua_func_mario_ready_to_speak(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_ready_to_speak"); return 0; } @@ -17165,8 +17399,10 @@ int smlua_func_should_start_or_continue_dialog(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "should_start_or_continue_dialog"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* object = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "should_start_or_continue_dialog"); return 0; } @@ -17185,6 +17421,7 @@ int smlua_func_stuck_in_ground_handler(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stuck_in_ground_handler"); return 0; } s32 animation = smlua_to_integer(L, 2); @@ -17217,6 +17454,7 @@ int smlua_func_align_with_floor(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "align_with_floor"); return 0; } @@ -17235,6 +17473,7 @@ int smlua_func_analog_stick_held_back(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "analog_stick_held_back"); return 0; } @@ -17253,6 +17492,7 @@ int smlua_func_anim_and_audio_for_heavy_walk(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_and_audio_for_heavy_walk"); return 0; } @@ -17271,6 +17511,7 @@ int smlua_func_anim_and_audio_for_hold_walk(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_and_audio_for_hold_walk"); return 0; } @@ -17289,6 +17530,7 @@ int smlua_func_anim_and_audio_for_walk(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_and_audio_for_walk"); return 0; } @@ -17307,6 +17549,7 @@ int smlua_func_apply_landing_accel(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_landing_accel"); return 0; } f32 frictionFactor = smlua_to_number(L, 2); @@ -17327,6 +17570,7 @@ int smlua_func_apply_slope_accel(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_slope_accel"); return 0; } @@ -17345,6 +17589,7 @@ int smlua_func_apply_slope_decel(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_slope_decel"); return 0; } f32 decelCoef = smlua_to_number(L, 2); @@ -17365,6 +17610,7 @@ int smlua_func_begin_braking_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "begin_braking_action"); return 0; } @@ -17383,6 +17629,7 @@ int smlua_func_begin_walking_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "begin_walking_action"); return 0; } f32 forwardVel = smlua_to_number(L, 2); @@ -17407,6 +17654,7 @@ int smlua_func_check_common_moving_cancels(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_moving_cancels"); return 0; } @@ -17425,6 +17673,7 @@ int smlua_func_check_ground_dive_or_punch(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_ground_dive_or_punch"); return 0; } @@ -17443,6 +17692,7 @@ int smlua_func_check_ledge_climb_down(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_ledge_climb_down"); return 0; } @@ -17461,6 +17711,7 @@ int smlua_func_common_ground_knockback_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_ground_knockback_action"); return 0; } s32 animation = smlua_to_integer(L, 2); @@ -17487,6 +17738,7 @@ int smlua_func_common_landing_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_landing_action"); return 0; } s16 animation = smlua_to_integer(L, 2); @@ -17510,14 +17762,18 @@ int smlua_func_common_landing_cancels(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_landing_cancels"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct LandingAction* landingAction = (struct LandingAction*)smlua_to_cobject(L, 2, LOT_LANDINGACTION); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "common_landing_cancels"); return 0; } + if (lua_isnil(L, 3)) { return 0; } // s32 (*setAPressAction)(structMarioState* arg2 = (s32 (*setAPressAction)(structMarioState*)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "common_landing_cancels"); return 0; } u32 arg3 = smlua_to_integer(L, 4); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "common_landing_cancels"); return 0; } + if (lua_isnil(L, 5)) { return 0; } // u32) arg4 = (u32))smlua_to_cobject(L, 5, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "common_landing_cancels"); return 0; } @@ -17537,6 +17793,7 @@ int smlua_func_common_slide_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_slide_action"); return 0; } u32 endAction = smlua_to_integer(L, 2); @@ -17561,6 +17818,7 @@ int smlua_func_common_slide_action_with_jump(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_slide_action_with_jump"); return 0; } u32 stopAction = smlua_to_integer(L, 2); @@ -17587,6 +17845,7 @@ int smlua_func_mario_execute_moving_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_moving_action"); return 0; } @@ -17605,6 +17864,7 @@ int smlua_func_play_step_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_step_sound"); return 0; } s16 frame1 = smlua_to_integer(L, 2); @@ -17627,6 +17887,7 @@ int smlua_func_push_or_sidle_wall(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "push_or_sidle_wall"); return 0; } @@ -17651,6 +17912,7 @@ int smlua_func_quicksand_jump_land_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "quicksand_jump_land_action"); return 0; } s32 animation1 = smlua_to_integer(L, 2); @@ -17677,6 +17939,7 @@ int smlua_func_set_triple_jump_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_triple_jump_action"); return 0; } u32 action = smlua_to_integer(L, 2); @@ -17699,6 +17962,7 @@ int smlua_func_should_begin_sliding(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "should_begin_sliding"); return 0; } @@ -17717,6 +17981,7 @@ int smlua_func_slide_bonk(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "slide_bonk"); return 0; } u32 fastAction = smlua_to_integer(L, 2); @@ -17739,6 +18004,7 @@ int smlua_func_stomach_slide_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stomach_slide_action"); return 0; } u32 stopAction = smlua_to_integer(L, 2); @@ -17763,6 +18029,7 @@ int smlua_func_tilt_body_butt_slide(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_butt_slide"); return 0; } @@ -17781,6 +18048,7 @@ int smlua_func_tilt_body_ground_shell(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_ground_shell"); return 0; } s16 startYaw = smlua_to_integer(L, 2); @@ -17801,6 +18069,7 @@ int smlua_func_tilt_body_running(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_running"); return 0; } @@ -17819,6 +18088,7 @@ int smlua_func_tilt_body_walking(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_walking"); return 0; } s16 startYaw = smlua_to_integer(L, 2); @@ -17839,6 +18109,7 @@ int smlua_func_update_decelerating_speed(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_decelerating_speed"); return 0; } @@ -17857,6 +18128,7 @@ int smlua_func_update_shell_speed(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_shell_speed"); return 0; } @@ -17875,6 +18147,7 @@ int smlua_func_update_sliding(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_sliding"); return 0; } f32 stopSpeed = smlua_to_number(L, 2); @@ -17895,6 +18168,7 @@ int smlua_func_update_sliding_angle(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_sliding_angle"); return 0; } f32 accel = smlua_to_number(L, 2); @@ -17917,6 +18191,7 @@ int smlua_func_update_walking_speed(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_walking_speed"); return 0; } @@ -17939,6 +18214,7 @@ int smlua_func_animated_stationary_ground_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "animated_stationary_ground_step"); return 0; } s32 animation = smlua_to_integer(L, 2); @@ -17961,6 +18237,7 @@ int smlua_func_check_common_object_cancels(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_object_cancels"); return 0; } @@ -17979,6 +18256,7 @@ int smlua_func_mario_execute_object_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_object_action"); return 0; } @@ -17997,6 +18275,7 @@ int smlua_func_mario_update_punch_sequence(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_punch_sequence"); return 0; } @@ -18019,6 +18298,7 @@ int smlua_func_check_common_hold_idle_cancels(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_hold_idle_cancels"); return 0; } @@ -18037,6 +18317,7 @@ int smlua_func_check_common_idle_cancels(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_idle_cancels"); return 0; } @@ -18055,6 +18336,7 @@ int smlua_func_check_common_landing_cancels(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_landing_cancels"); return 0; } u32 action = smlua_to_integer(L, 2); @@ -18075,6 +18357,7 @@ int smlua_func_check_common_stationary_cancels(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_stationary_cancels"); return 0; } @@ -18093,6 +18376,7 @@ int smlua_func_landing_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "landing_step"); return 0; } s32 arg1 = smlua_to_integer(L, 2); @@ -18115,6 +18399,7 @@ int smlua_func_mario_execute_stationary_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_stationary_action"); return 0; } @@ -18133,6 +18418,7 @@ int smlua_func_play_anim_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_anim_sound"); return 0; } u32 actionState = smlua_to_integer(L, 2); @@ -18157,6 +18443,7 @@ int smlua_func_stopping_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stopping_step"); return 0; } s32 animID = smlua_to_integer(L, 2); @@ -18183,6 +18470,7 @@ int smlua_func_apply_water_current(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_water_current"); return 0; } @@ -18207,6 +18495,7 @@ int smlua_func_float_surface_gfx(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "float_surface_gfx"); return 0; } @@ -18225,6 +18514,7 @@ int smlua_func_mario_execute_submerged_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_submerged_action"); return 0; } @@ -18243,6 +18533,7 @@ int smlua_func_perform_water_full_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_water_full_step"); return 0; } @@ -18267,6 +18558,7 @@ int smlua_func_perform_water_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_water_step"); return 0; } @@ -18285,6 +18577,7 @@ int smlua_func_set_swimming_at_surface_particles(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_swimming_at_surface_particles"); return 0; } u32 particleFlag = smlua_to_integer(L, 2); @@ -18418,6 +18711,7 @@ int smlua_func_init_bully_collision_data(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct BullyCollisionData* data = (struct BullyCollisionData*)smlua_to_cobject(L, 1, LOT_BULLYCOLLISIONDATA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "init_bully_collision_data"); return 0; } f32 posX = smlua_to_number(L, 2); @@ -18447,6 +18741,7 @@ int smlua_func_mario_bonk_reflection(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_bonk_reflection"); return 0; } u8 negateSpeed = smlua_to_integer(L, 2); @@ -18466,6 +18761,7 @@ int smlua_func_mario_push_off_steep_floor(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_push_off_steep_floor"); return 0; } u32 action = smlua_to_integer(L, 2); @@ -18487,6 +18783,7 @@ int smlua_func_mario_update_moving_sand(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_moving_sand"); return 0; } @@ -18504,6 +18801,7 @@ int smlua_func_mario_update_quicksand(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_quicksand"); return 0; } f32 sinkingSpeed = smlua_to_number(L, 2); @@ -18523,6 +18821,7 @@ int smlua_func_mario_update_windy_ground(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_windy_ground"); return 0; } @@ -18540,6 +18839,7 @@ int smlua_func_perform_air_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_air_step"); return 0; } u32 stepArg = smlua_to_integer(L, 2); @@ -18559,6 +18859,7 @@ int smlua_func_perform_ground_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_ground_step"); return 0; } @@ -18576,6 +18877,7 @@ int smlua_func_set_vel_from_pitch_and_yaw(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_vel_from_pitch_and_yaw"); return 0; } @@ -18593,6 +18895,7 @@ int smlua_func_stationary_ground_step(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stationary_ground_step"); return 0; } @@ -18610,6 +18913,7 @@ int smlua_func_stop_and_set_height_to_floor(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stop_and_set_height_to_floor"); return 0; } @@ -18631,8 +18935,10 @@ int smlua_func_anim_spline_init(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_spline_init"); return 0; } + if (lua_isnil(L, 2)) { return 0; } Vec4s * keyFrames = (Vec4s *)smlua_to_cobject(L, 2, LOT_VEC4S); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "anim_spline_init"); return 0; } @@ -18650,6 +18956,7 @@ int smlua_func_anim_spline_poll(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_spline_poll"); return 0; } @@ -19134,6 +19441,7 @@ int smlua_func_mtxf_rotate_xy(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } // Mtx * mtx = (Mtx *)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_rotate_xy"); return 0; } s16 angle = smlua_to_integer(L, 2); @@ -19254,6 +19562,7 @@ int smlua_func_mtxf_to_mtx(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } // Mtx * dest = (Mtx *)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_to_mtx"); return 0; } @@ -19341,6 +19650,7 @@ int smlua_func_spline_get_weights(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spline_get_weights"); return 0; } @@ -20470,6 +20780,7 @@ int smlua_func_network_player_get_override_palette_color_channel(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_get_override_palette_color_channel"); return 0; } int part = smlua_to_integer(L, 2); @@ -20491,6 +20802,7 @@ int smlua_func_network_player_get_palette_color_channel(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_get_palette_color_channel"); return 0; } int part = smlua_to_integer(L, 2); @@ -20512,6 +20824,7 @@ int smlua_func_network_player_is_override_palette_same(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_is_override_palette_same"); return 0; } @@ -20529,6 +20842,7 @@ int smlua_func_network_player_reset_override_palette(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_reset_override_palette"); return 0; } @@ -20546,6 +20860,7 @@ int smlua_func_network_player_set_description(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_set_description"); return 0; } const char* description = smlua_to_string(L, 2); @@ -20573,6 +20888,7 @@ int smlua_func_network_player_set_override_location(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_set_override_location"); return 0; } const char* location = smlua_to_string(L, 2); @@ -20592,6 +20908,7 @@ int smlua_func_network_player_set_override_palette_color(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_set_override_palette_color"); return 0; } int part = smlua_to_integer(L, 2); @@ -20756,6 +21073,7 @@ int smlua_func_calc_new_obj_vel_and_pos_y(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Surface* objFloor = (struct Surface*)smlua_to_cobject(L, 1, LOT_SURFACE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_new_obj_vel_and_pos_y"); return 0; } f32 objFloorY = smlua_to_number(L, 2); @@ -20780,6 +21098,7 @@ int smlua_func_calc_new_obj_vel_and_pos_y_underwater(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Surface* objFloor = (struct Surface*)smlua_to_cobject(L, 1, LOT_SURFACE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_new_obj_vel_and_pos_y_underwater"); return 0; } f32 floorY = smlua_to_number(L, 2); @@ -20847,8 +21166,10 @@ int smlua_func_geo_obj_transparency_something(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_obj_transparency_something"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_obj_transparency_something"); return 0; } + if (lua_isnil(L, 3)) { return 0; } Mat4 * mtx = (Mat4 *)smlua_to_cobject(L, 3, LOT_MAT4); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_obj_transparency_something"); return 0; } @@ -20868,8 +21189,10 @@ int smlua_func_is_nearest_mario_state_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_nearest_mario_state_to_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_nearest_mario_state_to_object"); return 0; } @@ -20888,8 +21211,10 @@ int smlua_func_is_nearest_player_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* m = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_nearest_player_to_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_nearest_player_to_object"); return 0; } @@ -20924,6 +21249,7 @@ int smlua_func_is_player_active(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_player_active"); return 0; } @@ -20942,6 +21268,7 @@ int smlua_func_is_player_in_local_area(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_player_in_local_area"); return 0; } @@ -20960,6 +21287,7 @@ int smlua_func_is_point_close_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_point_close_to_object"); return 0; } f32 x = smlua_to_number(L, 2); @@ -21034,6 +21362,7 @@ int smlua_func_nearest_interacting_mario_state_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_interacting_mario_state_to_object"); return 0; } @@ -21052,6 +21381,7 @@ int smlua_func_nearest_interacting_player_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_interacting_player_to_object"); return 0; } @@ -21070,6 +21400,7 @@ int smlua_func_nearest_mario_state_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_mario_state_to_object"); return 0; } @@ -21088,6 +21419,7 @@ int smlua_func_nearest_player_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_player_to_object"); return 0; } @@ -21106,6 +21438,7 @@ int smlua_func_nearest_possible_mario_state_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_possible_mario_state_to_object"); return 0; } @@ -21126,6 +21459,7 @@ int smlua_func_obj_check_floor_death(lua_State* L) { s16 collisionFlags = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_floor_death"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Surface* floor = (struct Surface*)smlua_to_cobject(L, 2, LOT_SURFACE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_floor_death"); return 0; } @@ -21222,6 +21556,7 @@ int smlua_func_obj_flicker_and_disappear(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_flicker_and_disappear"); return 0; } s16 lifeSpan = smlua_to_integer(L, 2); @@ -21258,6 +21593,7 @@ int smlua_func_obj_move_xyz_using_fvel_and_yaw(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_move_xyz_using_fvel_and_yaw"); return 0; } @@ -21276,6 +21612,7 @@ int smlua_func_obj_orient_graph(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_orient_graph"); return 0; } f32 normalX = smlua_to_number(L, 2); @@ -21300,6 +21637,7 @@ int smlua_func_obj_return_and_displace_home(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_return_and_displace_home"); return 0; } f32 homeX = smlua_to_number(L, 2); @@ -21326,6 +21664,7 @@ int smlua_func_obj_return_home_if_safe(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_return_home_if_safe"); return 0; } f32 homeX = smlua_to_number(L, 2); @@ -21352,6 +21691,7 @@ int smlua_func_obj_spawn_yellow_coins(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_spawn_yellow_coins"); return 0; } s8 nCoins = smlua_to_integer(L, 2); @@ -21440,6 +21780,7 @@ int smlua_func_set_object_visibility(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_object_visibility"); return 0; } s32 dist = smlua_to_integer(L, 2); @@ -21500,6 +21841,7 @@ int smlua_func_turn_obj_away_from_steep_floor(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Surface* objFloor = (struct Surface*)smlua_to_cobject(L, 1, LOT_SURFACE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "turn_obj_away_from_steep_floor"); return 0; } f32 floorY = smlua_to_number(L, 2); @@ -21750,6 +22092,7 @@ int smlua_func_obj_check_attacks(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_attacks"); return 0; } s32 attackedMarioAction = smlua_to_integer(L, 2); @@ -21956,6 +22299,7 @@ int smlua_func_obj_handle_attacks(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_handle_attacks"); return 0; } s32 attackedMarioAction = smlua_to_integer(L, 2); @@ -21978,6 +22322,7 @@ int smlua_func_obj_is_near_to_and_facing_mario(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_near_to_and_facing_mario"); return 0; } f32 maxDist = smlua_to_number(L, 2); @@ -22266,6 +22611,7 @@ int smlua_func_obj_turn_pitch_toward_mario(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_turn_pitch_toward_mario"); return 0; } f32 targetOffsetY = smlua_to_number(L, 2); @@ -22642,6 +22988,7 @@ int smlua_func_chain_segment_init(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ChainSegment* segment = (struct ChainSegment*)smlua_to_cobject(L, 1, LOT_CHAINSEGMENT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "chain_segment_init"); return 0; } @@ -22880,6 +23227,7 @@ int smlua_func_cur_obj_can_mario_activate_textbox(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_can_mario_activate_textbox"); return 0; } f32 radius = smlua_to_number(L, 2); @@ -22904,6 +23252,7 @@ int smlua_func_cur_obj_can_mario_activate_textbox_2(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_can_mario_activate_textbox_2"); return 0; } f32 radius = smlua_to_number(L, 2); @@ -23168,6 +23517,7 @@ int smlua_func_cur_obj_disable_rendering_and_become_intangible(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_disable_rendering_and_become_intangible"); return 0; } @@ -23236,6 +23586,7 @@ int smlua_func_cur_obj_enable_rendering_and_become_tangible(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_enable_rendering_and_become_tangible"); return 0; } @@ -23270,6 +23621,7 @@ int smlua_func_cur_obj_end_dialog(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_end_dialog"); return 0; } s32 dialogFlags = smlua_to_integer(L, 2); @@ -23702,6 +24054,7 @@ int smlua_func_cur_obj_lateral_dist_from_obj_to_home(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_lateral_dist_from_obj_to_home"); return 0; } @@ -24292,6 +24645,7 @@ int smlua_func_cur_obj_set_hitbox_and_die_if_attacked(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_hitbox_and_die_if_attacked"); return 0; } s32 deathSound = smlua_to_integer(L, 2); @@ -24370,6 +24724,7 @@ int smlua_func_cur_obj_set_pos_relative(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* other = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_pos_relative"); return 0; } f32 dleft = smlua_to_number(L, 2); @@ -24480,6 +24835,7 @@ int smlua_func_cur_obj_set_vel_from_mario_vel(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_vel_from_mario_vel"); return 0; } f32 f12 = smlua_to_number(L, 2); @@ -24594,6 +24950,7 @@ int smlua_func_cur_obj_spawn_loot_coin_at_mario_pos(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spawn_loot_coin_at_mario_pos"); return 0; } @@ -24612,6 +24969,7 @@ int smlua_func_cur_obj_spawn_particles(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct SpawnParticlesInfo* info = (struct SpawnParticlesInfo*)smlua_to_cobject(L, 1, LOT_SPAWNPARTICLESINFO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spawn_particles"); return 0; } @@ -24656,6 +25014,7 @@ int smlua_func_cur_obj_start_cam_event(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_start_cam_event"); return 0; } s32 cameraEvent = smlua_to_integer(L, 2); @@ -24936,6 +25295,7 @@ int smlua_func_dist_between_object_and_point(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "dist_between_object_and_point"); return 0; } f32 pointX = smlua_to_number(L, 2); @@ -24960,8 +25320,10 @@ int smlua_func_dist_between_objects(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "dist_between_objects"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "dist_between_objects"); return 0; } @@ -25065,6 +25427,7 @@ int smlua_func_geo_choose_area_ext(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_choose_area_ext"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_choose_area_ext"); return 0; } @@ -25093,6 +25456,7 @@ int smlua_func_geo_offset_klepto_debug(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_offset_klepto_debug"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* a1 = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_offset_klepto_debug"); return 0; } s32 sp8 = smlua_to_integer(L, 3); @@ -25117,6 +25481,7 @@ int smlua_func_geo_offset_klepto_held_object(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_offset_klepto_held_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_offset_klepto_held_object"); return 0; } @@ -25145,6 +25510,7 @@ int smlua_func_geo_switch_anim_state(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_switch_anim_state"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_switch_anim_state"); return 0; } @@ -25167,6 +25533,7 @@ int smlua_func_geo_switch_area(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_switch_area"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_switch_area"); return 0; } @@ -25189,8 +25556,10 @@ int smlua_func_geo_update_layer_transparency(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_update_layer_transparency"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_update_layer_transparency"); return 0; } + if (lua_isnil(L, 3)) { return 0; } // void * context = (void *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_update_layer_transparency"); return 0; } @@ -25213,6 +25582,7 @@ int smlua_func_geo_update_projectile_pos_from_parent(lua_State* L) { s32 callContext = smlua_to_integer(L, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_update_projectile_pos_from_parent"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_update_projectile_pos_from_parent"); return 0; } @@ -25336,8 +25706,10 @@ int smlua_func_lateral_dist_between_objects(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "lateral_dist_between_objects"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "lateral_dist_between_objects"); return 0; } @@ -25424,6 +25796,7 @@ int smlua_func_mario_is_dive_sliding(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_dive_sliding"); return 0; } @@ -25442,6 +25815,7 @@ int smlua_func_mario_is_in_air_action(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_in_air_action"); return 0; } @@ -25502,8 +25876,10 @@ int smlua_func_obj_angle_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_angle_to_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_angle_to_object"); return 0; } @@ -25522,6 +25898,7 @@ int smlua_func_obj_angle_to_point(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_angle_to_point"); return 0; } f32 pointX = smlua_to_number(L, 2); @@ -25544,6 +25921,7 @@ int smlua_func_obj_apply_scale_to_matrix(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_apply_scale_to_matrix"); return 0; } @@ -25574,6 +25952,7 @@ int smlua_func_obj_apply_scale_to_transform(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_apply_scale_to_transform"); return 0; } @@ -25592,6 +25971,7 @@ int smlua_func_obj_attack_collided_from_other_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_attack_collided_from_other_object"); return 0; } @@ -25610,6 +25990,7 @@ int smlua_func_obj_become_tangible(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_become_tangible"); return 0; } @@ -25628,6 +26009,7 @@ int smlua_func_obj_build_relative_transform(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_relative_transform"); return 0; } @@ -25646,6 +26028,7 @@ int smlua_func_obj_build_transform_from_pos_and_angle(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_transform_from_pos_and_angle"); return 0; } s16 posIndex = smlua_to_integer(L, 2); @@ -25668,6 +26051,7 @@ int smlua_func_obj_build_transform_relative_to_parent(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_transform_relative_to_parent"); return 0; } @@ -25686,6 +26070,7 @@ int smlua_func_obj_build_vel_from_transform(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* a0 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_vel_from_transform"); return 0; } @@ -25704,8 +26089,10 @@ int smlua_func_obj_check_if_collided_with_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_if_collided_with_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_if_collided_with_object"); return 0; } @@ -25724,8 +26111,10 @@ int smlua_func_obj_copy_angle(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_angle"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_angle"); return 0; } @@ -25744,8 +26133,10 @@ int smlua_func_obj_copy_behavior_params(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_behavior_params"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_behavior_params"); return 0; } @@ -25764,8 +26155,10 @@ int smlua_func_obj_copy_graph_y_offset(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_graph_y_offset"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_graph_y_offset"); return 0; } @@ -25784,8 +26177,10 @@ int smlua_func_obj_copy_pos(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_pos"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_pos"); return 0; } @@ -25804,8 +26199,10 @@ int smlua_func_obj_copy_pos_and_angle(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_pos_and_angle"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_pos_and_angle"); return 0; } @@ -25824,8 +26221,10 @@ int smlua_func_obj_copy_scale(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_scale"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_scale"); return 0; } @@ -25844,6 +26243,7 @@ int smlua_func_obj_create_transform_from_self(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_create_transform_from_self"); return 0; } @@ -25882,6 +26282,7 @@ int smlua_func_obj_has_behavior(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_has_behavior"); return 0; } BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 2, LVT_BEHAVIORSCRIPT_P); @@ -25902,6 +26303,7 @@ int smlua_func_obj_init_animation(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_init_animation"); return 0; } s32 animIndex = smlua_to_integer(L, 2); @@ -25922,6 +26324,7 @@ int smlua_func_obj_init_animation_with_accel_and_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_init_animation_with_accel_and_sound"); return 0; } s32 animIndex = smlua_to_integer(L, 2); @@ -25944,8 +26347,10 @@ int smlua_func_obj_init_animation_with_sound(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_init_animation_with_sound"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct AnimationTable* animations = (struct AnimationTable*)smlua_to_cobject(L, 2, LOT_ANIMATIONTABLE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_init_animation_with_sound"); return 0; } s32 animIndex = smlua_to_integer(L, 3); @@ -25966,6 +26371,7 @@ int smlua_func_obj_is_hidden(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_hidden"); return 0; } @@ -25984,6 +26390,7 @@ int smlua_func_obj_mark_for_deletion(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_mark_for_deletion"); return 0; } @@ -26002,8 +26409,10 @@ int smlua_func_obj_pitch_to_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_pitch_to_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* target = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_pitch_to_object"); return 0; } @@ -26022,6 +26431,7 @@ int smlua_func_obj_scale(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_scale"); return 0; } f32 scale = smlua_to_number(L, 2); @@ -26042,6 +26452,7 @@ int smlua_func_obj_scale_random(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_scale_random"); return 0; } f32 rangeLength = smlua_to_number(L, 2); @@ -26064,6 +26475,7 @@ int smlua_func_obj_scale_xyz(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_scale_xyz"); return 0; } f32 xScale = smlua_to_number(L, 2); @@ -26088,6 +26500,7 @@ int smlua_func_obj_set_angle(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_angle"); return 0; } s16 pitch = smlua_to_integer(L, 2); @@ -26112,6 +26525,7 @@ int smlua_func_obj_set_behavior(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_behavior"); return 0; } BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 2, LVT_BEHAVIORSCRIPT_P); @@ -26132,6 +26546,7 @@ int smlua_func_obj_set_billboard(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_billboard"); return 0; } @@ -26151,8 +26566,10 @@ int smlua_func_obj_set_collision_data(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_collision_data"); return 0; } + if (lua_isnil(L, 2)) { return 0; } // void * segAddr = (void *)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_collision_data"); return 0; } @@ -26172,6 +26589,7 @@ int smlua_func_obj_set_cylboard(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_cylboard"); return 0; } @@ -26190,6 +26608,7 @@ int smlua_func_obj_set_face_angle(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_face_angle"); return 0; } s16 pitch = smlua_to_integer(L, 2); @@ -26214,6 +26633,7 @@ int smlua_func_obj_set_face_angle_to_move_angle(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_face_angle_to_move_angle"); return 0; } @@ -26232,6 +26652,7 @@ int smlua_func_obj_set_gfx_angle(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_angle"); return 0; } s16 pitch = smlua_to_integer(L, 2); @@ -26256,6 +26677,7 @@ int smlua_func_obj_set_gfx_pos(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_pos"); return 0; } f32 x = smlua_to_number(L, 2); @@ -26280,8 +26702,10 @@ int smlua_func_obj_set_gfx_pos_at_obj_pos(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_pos_at_obj_pos"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_gfx_pos_at_obj_pos"); return 0; } @@ -26300,6 +26724,7 @@ int smlua_func_obj_set_gfx_pos_from_pos(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_pos_from_pos"); return 0; } @@ -26318,6 +26743,7 @@ int smlua_func_obj_set_gfx_scale(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_scale"); return 0; } f32 x = smlua_to_number(L, 2); @@ -26342,6 +26768,7 @@ int smlua_func_obj_set_held_state(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_held_state"); return 0; } BehaviorScript * heldBehavior = (BehaviorScript *)smlua_to_cpointer(L, 2, LVT_BEHAVIORSCRIPT_P); @@ -26362,8 +26789,10 @@ int smlua_func_obj_set_hitbox(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_hitbox"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 2, LOT_OBJECTHITBOX); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_hitbox"); return 0; } @@ -26382,6 +26811,7 @@ int smlua_func_obj_set_hitbox_radius_and_height(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_hitbox_radius_and_height"); return 0; } f32 radius = smlua_to_number(L, 2); @@ -26404,6 +26834,7 @@ int smlua_func_obj_set_hurtbox_radius_and_height(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_hurtbox_radius_and_height"); return 0; } f32 radius = smlua_to_number(L, 2); @@ -26426,6 +26857,7 @@ int smlua_func_obj_set_move_angle(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_move_angle"); return 0; } s16 pitch = smlua_to_integer(L, 2); @@ -26450,6 +26882,7 @@ int smlua_func_obj_set_parent_relative_pos(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_parent_relative_pos"); return 0; } s16 relX = smlua_to_integer(L, 2); @@ -26474,6 +26907,7 @@ int smlua_func_obj_set_pos(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_pos"); return 0; } s16 x = smlua_to_integer(L, 2); @@ -26498,8 +26932,10 @@ int smlua_func_obj_set_pos_relative(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_pos_relative"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* other = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_pos_relative"); return 0; } f32 dleft = smlua_to_number(L, 3); @@ -26524,6 +26960,7 @@ int smlua_func_obj_set_throw_matrix_from_transform(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_throw_matrix_from_transform"); return 0; } @@ -26542,6 +26979,7 @@ int smlua_func_obj_spawn_loot_blue_coins(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_spawn_loot_blue_coins"); return 0; } s32 numCoins = smlua_to_integer(L, 2); @@ -26566,6 +27004,7 @@ int smlua_func_obj_spawn_loot_coins(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_spawn_loot_coins"); return 0; } s32 numCoins = smlua_to_integer(L, 2); @@ -26594,6 +27033,7 @@ int smlua_func_obj_spawn_loot_yellow_coins(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_spawn_loot_yellow_coins"); return 0; } s32 numCoins = smlua_to_integer(L, 2); @@ -26616,6 +27056,7 @@ int smlua_func_obj_translate_local(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_translate_local"); return 0; } s16 posIndex = smlua_to_integer(L, 2); @@ -26638,6 +27079,7 @@ int smlua_func_obj_translate_xyz_random(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_translate_xyz_random"); return 0; } f32 rangeLength = smlua_to_number(L, 2); @@ -26658,6 +27100,7 @@ int smlua_func_obj_translate_xz_random(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_translate_xz_random"); return 0; } f32 rangeLength = smlua_to_number(L, 2); @@ -26678,8 +27121,10 @@ int smlua_func_obj_turn_toward_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_turn_toward_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* target = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_turn_toward_object"); return 0; } s16 angleIndex = smlua_to_integer(L, 3); @@ -26706,6 +27151,7 @@ int smlua_func_obj_update_pos_from_parent_transformation(lua_State* L) { Mat4 a0; smlua_get_mat4(a0, 1); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_update_pos_from_parent_transformation"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* a1 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_update_pos_from_parent_transformation"); return 0; } @@ -26924,8 +27370,10 @@ int smlua_func_spawn_water_droplet(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* parent = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_water_droplet"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct WaterDropletParams* params = (struct WaterDropletParams*)smlua_to_cobject(L, 2, LOT_WATERDROPLETPARAMS); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_water_droplet"); return 0; } @@ -26984,6 +27432,7 @@ int smlua_func_set_object_respawn_info_bits(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_object_respawn_info_bits"); return 0; } u8 bits = smlua_to_integer(L, 2); @@ -27026,6 +27475,7 @@ int smlua_func_queue_rumble_data_mario(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "queue_rumble_data_mario"); return 0; } s16 a0 = smlua_to_integer(L, 2); @@ -27047,6 +27497,7 @@ int smlua_func_queue_rumble_data_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* object = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "queue_rumble_data_object"); return 0; } s16 a0 = smlua_to_integer(L, 2); @@ -27068,6 +27519,7 @@ int smlua_func_reset_rumble_timers(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "reset_rumble_timers"); return 0; } @@ -27085,6 +27537,7 @@ int smlua_func_reset_rumble_timers_2(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "reset_rumble_timers_2"); return 0; } s32 a0 = smlua_to_integer(L, 2); @@ -27590,6 +28043,7 @@ int smlua_func_smlua_anim_util_get_current_animation_name(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_anim_util_get_current_animation_name"); return 0; } @@ -27607,6 +28061,7 @@ int smlua_func_smlua_anim_util_set_animation(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_anim_util_set_animation"); return 0; } const char* name = smlua_to_string(L, 2); @@ -27630,6 +28085,7 @@ int smlua_func_audio_sample_destroy(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_sample_destroy"); return 0; } @@ -27664,6 +28120,7 @@ int smlua_func_audio_sample_play(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_sample_play"); return 0; } @@ -27689,6 +28146,7 @@ int smlua_func_audio_sample_stop(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_sample_stop"); return 0; } @@ -27706,6 +28164,7 @@ int smlua_func_audio_stream_destroy(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_destroy"); return 0; } @@ -27723,6 +28182,7 @@ int smlua_func_audio_stream_get_frequency(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_frequency"); return 0; } @@ -27740,6 +28200,7 @@ int smlua_func_audio_stream_get_looping(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_looping"); return 0; } @@ -27757,6 +28218,7 @@ int smlua_func_audio_stream_get_position(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_position"); return 0; } @@ -27774,6 +28236,7 @@ int smlua_func_audio_stream_get_volume(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_volume"); return 0; } @@ -27808,6 +28271,7 @@ int smlua_func_audio_stream_pause(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_pause"); return 0; } @@ -27825,6 +28289,7 @@ int smlua_func_audio_stream_play(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_play"); return 0; } bool restart = smlua_to_boolean(L, 2); @@ -27846,6 +28311,7 @@ int smlua_func_audio_stream_set_frequency(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_frequency"); return 0; } f32 freq = smlua_to_number(L, 2); @@ -27865,6 +28331,7 @@ int smlua_func_audio_stream_set_loop_points(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_loop_points"); return 0; } s64 loopStart = smlua_to_integer(L, 2); @@ -27886,6 +28353,7 @@ int smlua_func_audio_stream_set_looping(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_looping"); return 0; } bool looping = smlua_to_boolean(L, 2); @@ -27905,6 +28373,7 @@ int smlua_func_audio_stream_set_position(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_position"); return 0; } f32 pos = smlua_to_number(L, 2); @@ -27924,6 +28393,7 @@ int smlua_func_audio_stream_set_volume(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_volume"); return 0; } f32 volume = smlua_to_number(L, 2); @@ -27943,6 +28413,7 @@ int smlua_func_audio_stream_stop(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_stop"); return 0; } @@ -28876,6 +29347,7 @@ int smlua_func_get_surface_from_wcd_index(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct WallCollisionData* wcd = (struct WallCollisionData*)smlua_to_cobject(L, 1, LOT_WALLCOLLISIONDATA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_surface_from_wcd_index"); return 0; } s8 index = smlua_to_integer(L, 2); @@ -28982,6 +29454,7 @@ int smlua_func_audio_stream_get_tempo(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_tempo"); return 0; } @@ -28999,6 +29472,7 @@ int smlua_func_audio_stream_set_speed(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_speed"); return 0; } f32 initial_freq = smlua_to_number(L, 2); @@ -29022,6 +29496,7 @@ int smlua_func_audio_stream_set_tempo(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_tempo"); return 0; } f32 tempo = smlua_to_number(L, 2); @@ -29058,6 +29533,7 @@ int smlua_func_network_player_color_to_palette(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_color_to_palette"); return 0; } int part = smlua_to_integer(L, 2); @@ -29083,6 +29559,7 @@ int smlua_func_network_player_palette_to_color(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_palette_to_color"); return 0; } int part = smlua_to_integer(L, 2); @@ -29244,6 +29721,7 @@ int smlua_func_gfx_get_vtx(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } Gfx* gfx = (Gfx*)smlua_to_cobject(L, 1, LOT_GFX); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "gfx_get_vtx"); return 0; } u16 offset = smlua_to_integer(L, 2); @@ -29263,6 +29741,7 @@ int smlua_func_gfx_get_vtx_count(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } Gfx* cmd = (Gfx*)smlua_to_cobject(L, 1, LOT_GFX); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "gfx_get_vtx_count"); return 0; } @@ -29280,6 +29759,7 @@ int smlua_func_gfx_parse(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } Gfx* cmd = (Gfx*)smlua_to_cobject(L, 1, LOT_GFX); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "gfx_parse"); return 0; } LuaFunction func = smlua_to_lua_function(L, 2); @@ -29299,6 +29779,7 @@ int smlua_func_gfx_set_combine_lerp(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } Gfx* gfx = (Gfx*)smlua_to_cobject(L, 1, LOT_GFX); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "gfx_set_combine_lerp"); return 0; } u32 a0 = smlua_to_integer(L, 2); @@ -29348,6 +29829,7 @@ int smlua_func_gfx_set_texture_image(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } Gfx* gfx = (Gfx*)smlua_to_cobject(L, 1, LOT_GFX); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "gfx_set_texture_image"); return 0; } u32 format = smlua_to_integer(L, 2); @@ -30391,6 +30873,7 @@ int smlua_func_get_hand_foot_pos_x(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_hand_foot_pos_x"); return 0; } u8 index = smlua_to_integer(L, 2); @@ -30410,6 +30893,7 @@ int smlua_func_get_hand_foot_pos_y(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_hand_foot_pos_y"); return 0; } u8 index = smlua_to_integer(L, 2); @@ -30429,6 +30913,7 @@ int smlua_func_get_hand_foot_pos_z(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_hand_foot_pos_z"); return 0; } u8 index = smlua_to_integer(L, 2); @@ -31349,8 +31834,10 @@ int smlua_func_obj_check_hitbox_overlap(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_hitbox_overlap"); return 0; } + if (lua_isnil(L, 2)) { return 0; } struct Object* o2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_hitbox_overlap"); return 0; } @@ -31368,6 +31855,7 @@ int smlua_func_obj_check_overlap_with_hitbox_params(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_overlap_with_hitbox_params"); return 0; } f32 x = smlua_to_number(L, 2); @@ -31414,6 +31902,7 @@ int smlua_func_obj_get_collided_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_collided_object"); return 0; } s16 index = smlua_to_integer(L, 2); @@ -31433,6 +31922,7 @@ int smlua_func_obj_get_field_f32(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_field_f32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); @@ -31452,6 +31942,7 @@ int smlua_func_obj_get_field_s16(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_field_s16"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); @@ -31473,6 +31964,7 @@ int smlua_func_obj_get_field_s32(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_field_s32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); @@ -31492,6 +31984,7 @@ int smlua_func_obj_get_field_u32(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_field_u32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); @@ -31587,6 +32080,7 @@ int smlua_func_obj_get_model_id_extended(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_model_id_extended"); return 0; } @@ -31604,6 +32098,7 @@ int smlua_func_obj_get_nearest_object_with_behavior_id(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_nearest_object_with_behavior_id"); return 0; } int behaviorId = smlua_to_integer(L, 2); @@ -31623,6 +32118,7 @@ int smlua_func_obj_get_next(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_next"); return 0; } @@ -31640,6 +32136,7 @@ int smlua_func_obj_get_next_with_same_behavior_id(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_next_with_same_behavior_id"); return 0; } @@ -31657,6 +32154,7 @@ int smlua_func_obj_get_next_with_same_behavior_id_and_field_f32(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_next_with_same_behavior_id_and_field_f32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); @@ -31678,6 +32176,7 @@ int smlua_func_obj_get_next_with_same_behavior_id_and_field_s32(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_next_with_same_behavior_id_and_field_s32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); @@ -31716,6 +32215,7 @@ int smlua_func_obj_has_behavior_id(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_has_behavior_id"); return 0; } int behaviorId = smlua_to_integer(L, 2); @@ -31735,6 +32235,7 @@ int smlua_func_obj_has_model_extended(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_has_model_extended"); return 0; } int modelId = smlua_to_integer(L, 2); @@ -31754,6 +32255,7 @@ int smlua_func_obj_is_attackable(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_attackable"); return 0; } @@ -31771,6 +32273,7 @@ int smlua_func_obj_is_breakable_object(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_breakable_object"); return 0; } @@ -31788,6 +32291,7 @@ int smlua_func_obj_is_bully(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_bully"); return 0; } @@ -31805,6 +32309,7 @@ int smlua_func_obj_is_coin(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_coin"); return 0; } @@ -31822,6 +32327,7 @@ int smlua_func_obj_is_exclamation_box(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_exclamation_box"); return 0; } @@ -31839,6 +32345,7 @@ int smlua_func_obj_is_grabbable(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_grabbable"); return 0; } @@ -31856,6 +32363,7 @@ int smlua_func_obj_is_mushroom_1up(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_mushroom_1up"); return 0; } @@ -31873,6 +32381,7 @@ int smlua_func_obj_is_secret(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_secret"); return 0; } @@ -31890,6 +32399,7 @@ int smlua_func_obj_is_valid_for_interaction(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_valid_for_interaction"); return 0; } @@ -31907,6 +32417,7 @@ int smlua_func_obj_move_xyz(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_move_xyz"); return 0; } f32 dx = smlua_to_number(L, 2); @@ -31930,6 +32441,7 @@ int smlua_func_obj_set_field_f32(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_field_f32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); @@ -31951,6 +32463,7 @@ int smlua_func_obj_set_field_s16(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_field_s16"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); @@ -31974,6 +32487,7 @@ int smlua_func_obj_set_field_s32(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_field_s32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); @@ -31995,6 +32509,7 @@ int smlua_func_obj_set_field_u32(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_field_u32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); @@ -32016,6 +32531,7 @@ int smlua_func_obj_set_model_extended(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_model_extended"); return 0; } int modelId = smlua_to_integer(L, 2); @@ -32035,6 +32551,7 @@ int smlua_func_obj_set_vel(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_vel"); return 0; } f32 vx = smlua_to_number(L, 2); @@ -32058,6 +32575,7 @@ int smlua_func_set_cutscene_focus(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_cutscene_focus"); return 0; } @@ -32075,6 +32593,7 @@ int smlua_func_set_secondary_camera_focus(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_secondary_camera_focus"); return 0; } @@ -32836,6 +33355,7 @@ int smlua_func_exec_anim_sound_state(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct SoundState* soundStates = (struct SoundState*)smlua_to_cobject(L, 1, LOT_SOUNDSTATE); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "exec_anim_sound_state"); return 0; } u16 maxSoundStates = smlua_to_integer(L, 2); @@ -32866,6 +33386,7 @@ int smlua_func_find_ceil(lua_State* L) { if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_ceil"); return 0; } f32 posZ = smlua_to_number(L, 3); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_ceil"); return 0; } + if (lua_isnil(L, 4)) { return 0; } // struct Surface** pceil = (struct Surface**)smlua_to_cobject(L, 4, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "find_ceil"); return 0; } @@ -32912,6 +33433,7 @@ int smlua_func_find_floor(lua_State* L) { if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_floor"); return 0; } f32 zPos = smlua_to_number(L, 3); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_floor"); return 0; } + if (lua_isnil(L, 4)) { return 0; } // struct Surface** pfloor = (struct Surface**)smlua_to_cobject(L, 4, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "find_floor"); return 0; } @@ -32958,6 +33480,7 @@ int smlua_func_find_floor_height_and_data(lua_State* L) { if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_floor_height_and_data"); return 0; } f32 zPos = smlua_to_number(L, 3); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_floor_height_and_data"); return 0; } + if (lua_isnil(L, 4)) { return 0; } // struct FloorGeometry** floorGeo = (struct FloorGeometry**)smlua_to_cobject(L, 4, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "find_floor_height_and_data"); return 0; } @@ -33004,6 +33527,7 @@ int smlua_func_find_surface_on_ray(lua_State* L) { Vec3f dir; smlua_get_vec3f(dir, 2); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_surface_on_ray"); return 0; } + if (lua_isnil(L, 3)) { return 0; } // struct Surface** hit_surface = (struct Surface**)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_surface_on_ray"); return 0; } @@ -33034,6 +33558,7 @@ int smlua_func_find_wall_collisions(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct WallCollisionData* colData = (struct WallCollisionData*)smlua_to_cobject(L, 1, LOT_WALLCOLLISIONDATA); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_wall_collisions"); return 0; } @@ -33154,6 +33679,7 @@ int smlua_func_obj_get_surface_from_index(lua_State* L) { return 0; } + if (lua_isnil(L, 1)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_surface_from_index"); return 0; } u32 index = smlua_to_integer(L, 2);