diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py
index b53d2ba13..7327aca7c 100644
--- a/autogen/convert_functions.py
+++ b/autogen/convert_functions.py
@@ -13,7 +13,9 @@ out_filename_defs = 'autogen/lua_definitions/functions.lua'
in_files = [
"src/audio/external.h",
+ "src/engine/math_util.h",
"src/engine/surface_collision.h",
+ "src/engine/surface_load.h",
"src/game/camera.h",
"src/game/characters.h",
"src/game/mario_actions_airborne.c",
@@ -47,7 +49,6 @@ in_files = [
"src/game/obj_behaviors.c",
"src/game/obj_behaviors_2.c",
"src/game/spawn_sound.c",
- "src/engine/surface_load.h",
"src/game/object_list_processor.h",
"src/game/behavior_actions.h",
"src/game/mario_misc.h",
@@ -65,6 +66,7 @@ override_allowed_functions = {
override_disallowed_functions = {
"src/audio/external.h": [ " func_" ],
+ "src/engine/math_util.h": [ "atan2s", "atan2f" ],
"src/engine/surface_collision.h": [ " debug_", "f32_find_wall_collision" ],
"src/game/mario_actions_airborne.c": [ "^[us]32 act_.*" ],
"src/game/mario_actions_automatic.c": [ "^[us]32 act_.*" ],
@@ -468,6 +470,7 @@ def build_call(function):
def build_function(function, do_extern):
s = ''
+ fid = function['identifier']
if len(function['params']) <= 0:
s = 'int smlua_func_%s(UNUSED lua_State* L) {\n' % function['identifier']
@@ -479,7 +482,7 @@ def build_function(function, do_extern):
i = 1
for param in function['params']:
s += build_param(param, i)
- s += ' if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %d"); return 0; }\n' % i
+ s += ' if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %d for function \'%s\'"); return 0; }\n' % (i, fid)
i += 1
s += '\n'
diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua
index 3a0aa8d9a..f3675afaa 100644
--- a/autogen/lua_definitions/functions.lua
+++ b/autogen/lua_definitions/functions.lua
@@ -4186,12 +4186,20 @@ function play_sound_if_no_flag(m, soundBits, flags)
-- ...
end
+--- @param pos Vec3f
+--- @param offset number
+--- @param radius number
+--- @return Surface
+function resolve_and_return_wall_collisions(pos, offset, radius)
+ -- ...
+end
+
--- @param pos Vec3f
--- @param offset number
--- @param radius number
--- @param collisionData WallCollisionData
--- @return nil
-function resolve_and_return_wall_collisions(pos, offset, radius, collisionData)
+function resolve_and_return_wall_collisions_data(pos, offset, radius, collisionData)
-- ...
end
@@ -5066,6 +5074,96 @@ function stop_and_set_height_to_floor(arg0)
-- ...
end
+--- @param m MarioState
+--- @param result Vec3f
+--- @return integer
+function anim_spline_poll(m, result)
+ -- ...
+end
+
+--- @param current number
+--- @param target number
+--- @param inc number
+--- @param dec number
+--- @return number
+function approach_f32(current, target, inc, dec)
+ -- ...
+end
+
+--- @param current integer
+--- @param target integer
+--- @param inc integer
+--- @param dec integer
+--- @return integer
+function approach_s32(current, target, inc, dec)
+ -- ...
+end
+
+--- @param value number
+--- @param replacement number
+--- @return number
+function not_zero(value, replacement)
+ -- ...
+end
+
+--- @param dest Vec3f
+--- @param vecA Vec3f
+--- @param vecB Vec3f
+--- @param sclA number
+--- @param sclB number
+--- @return nil
+function vec3f_combine(dest, vecA, vecB, sclA, sclB)
+ -- ...
+end
+
+--- @param v1 Vec3f
+--- @param v2 Vec3f
+--- @return number
+function vec3f_dist(v1, v2)
+ -- ...
+end
+
+--- @param a Vec3f
+--- @param b Vec3f
+--- @return number
+function vec3f_dot(a, b)
+ -- ...
+end
+
+--- @param from Vec3f
+--- @param to Vec3f
+--- @param dist Pointer_number
+--- @param pitch Pointer_integer
+--- @param yaw Pointer_integer
+--- @return nil
+function vec3f_get_dist_and_angle(from, to, dist, pitch, yaw)
+ -- ...
+end
+
+--- @param a Vec3f
+--- @return number
+function vec3f_length(a)
+ -- ...
+end
+
+--- @param vec Vec3f
+--- @param onto Vec3f
+--- @param out Vec3f
+--- @return nil
+function vec3f_project(vec, onto, out)
+ -- ...
+end
+
+--- @param from Vec3f
+--- @param to Vec3f
+--- @param dist number
+--- @param pitch integer
+--- @param yaw integer
+--- @return nil
+function vec3f_set_dist_and_angle(from, to, dist, pitch, yaw)
+ -- ...
+end
+
--- @param courseNum integer
--- @param actNum integer
--- @param levelNum integer
@@ -7662,11 +7760,23 @@ end
--- @param o1 Object
--- @param o2 Object
---- @return integer
+--- @return boolean
function obj_check_hitbox_overlap(o1, o2)
-- ...
end
+--- @param o Object
+--- @param x number
+--- @param y number
+--- @param z number
+--- @param h number
+--- @param r number
+--- @param d number
+--- @return boolean
+function obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d)
+ -- ...
+end
+
--- @param behaviorId BehaviorId
--- @return integer
function obj_count_objects_with_behavior_id(behaviorId)
@@ -7757,7 +7867,7 @@ function obj_has_model_extended(o, modelId)
end
--- @param o Object
---- @return integer
+--- @return boolean
function obj_is_valid_for_interaction(o)
-- ...
end
diff --git a/docs/lua/functions-3.md b/docs/lua/functions-3.md
index c74d03ede..29b418cb8 100644
--- a/docs/lua/functions-3.md
+++ b/docs/lua/functions-3.md
@@ -3936,7 +3936,29 @@
## [resolve_and_return_wall_collisions](#resolve_and_return_wall_collisions)
### Lua Example
-`resolve_and_return_wall_collisions(pos, offset, radius, collisionData)`
+`local SurfaceValue = resolve_and_return_wall_collisions(pos, offset, radius)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| pos | [Vec3f](structs.md#Vec3f) |
+| offset | `number` |
+| radius | `number` |
+
+### Returns
+[Surface](structs.md#Surface)
+
+### C Prototype
+`struct Surface *resolve_and_return_wall_collisions(Vec3f pos, f32 offset, f32 radius);`
+
+[:arrow_up_small:](#)
+
+
+
+## [resolve_and_return_wall_collisions_data](#resolve_and_return_wall_collisions_data)
+
+### Lua Example
+`resolve_and_return_wall_collisions_data(pos, offset, radius, collisionData)`
### Parameters
| Field | Type |
@@ -3950,7 +3972,7 @@
- None
### C Prototype
-`void resolve_and_return_wall_collisions(Vec3f pos, f32 offset, f32 radius, struct WallCollisionData* collisionData);`
+`void resolve_and_return_wall_collisions_data(Vec3f pos, f32 offset, f32 radius, struct WallCollisionData* collisionData);`
[:arrow_up_small:](#)
@@ -6679,6 +6701,256 @@
+---
+# functions from math_util.h
+
+
+
+
+## [anim_spline_poll](#anim_spline_poll)
+
+### Lua Example
+`local integerValue = anim_spline_poll(m, result)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| result | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- `integer`
+
+### C Prototype
+`s32 anim_spline_poll(struct MarioState* m, Vec3f result);`
+
+[:arrow_up_small:](#)
+
+
+
+## [approach_f32](#approach_f32)
+
+### Lua Example
+`local numberValue = approach_f32(current, target, inc, dec)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| current | `number` |
+| target | `number` |
+| inc | `number` |
+| dec | `number` |
+
+### Returns
+- `number`
+
+### C Prototype
+`f32 approach_f32(f32 current, f32 target, f32 inc, f32 dec);`
+
+[:arrow_up_small:](#)
+
+
+
+## [approach_s32](#approach_s32)
+
+### Lua Example
+`local integerValue = approach_s32(current, target, inc, dec)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| current | `integer` |
+| target | `integer` |
+| inc | `integer` |
+| dec | `integer` |
+
+### Returns
+- `integer`
+
+### C Prototype
+`s32 approach_s32(s32 current, s32 target, s32 inc, s32 dec);`
+
+[:arrow_up_small:](#)
+
+
+
+## [not_zero](#not_zero)
+
+### Lua Example
+`local numberValue = not_zero(value, replacement)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| value | `number` |
+| replacement | `number` |
+
+### Returns
+- `number`
+
+### C Prototype
+`f32 not_zero(f32 value, f32 replacement);`
+
+[:arrow_up_small:](#)
+
+
+
+## [vec3f_combine](#vec3f_combine)
+
+### Lua Example
+`vec3f_combine(dest, vecA, vecB, sclA, sclB)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| dest | [Vec3f](structs.md#Vec3f) |
+| vecA | [Vec3f](structs.md#Vec3f) |
+| vecB | [Vec3f](structs.md#Vec3f) |
+| sclA | `number` |
+| sclB | `number` |
+
+### Returns
+- None
+
+### C Prototype
+`void vec3f_combine(Vec3f dest, Vec3f vecA, Vec3f vecB, f32 sclA, f32 sclB);`
+
+[:arrow_up_small:](#)
+
+
+
+## [vec3f_dist](#vec3f_dist)
+
+### Lua Example
+`local numberValue = vec3f_dist(v1, v2)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| v1 | [Vec3f](structs.md#Vec3f) |
+| v2 | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- `number`
+
+### C Prototype
+`f32 vec3f_dist(Vec3f v1, Vec3f v2);`
+
+[:arrow_up_small:](#)
+
+
+
+## [vec3f_dot](#vec3f_dot)
+
+### Lua Example
+`local numberValue = vec3f_dot(a, b)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| a | [Vec3f](structs.md#Vec3f) |
+| b | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- `number`
+
+### C Prototype
+`f32 vec3f_dot(Vec3f a, Vec3f b);`
+
+[:arrow_up_small:](#)
+
+
+
+## [vec3f_get_dist_and_angle](#vec3f_get_dist_and_angle)
+
+### Lua Example
+`vec3f_get_dist_and_angle(from, to, dist, pitch, yaw)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| from | [Vec3f](structs.md#Vec3f) |
+| to | [Vec3f](structs.md#Vec3f) |
+| dist | `Pointer` <`number`> |
+| pitch | `Pointer` <`integer`> |
+| yaw | `Pointer` <`integer`> |
+
+### Returns
+- None
+
+### C Prototype
+`void vec3f_get_dist_and_angle(Vec3f from, Vec3f to, f32 *dist, s16 *pitch, s16 *yaw);`
+
+[:arrow_up_small:](#)
+
+
+
+## [vec3f_length](#vec3f_length)
+
+### Lua Example
+`local numberValue = vec3f_length(a)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| a | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- `number`
+
+### C Prototype
+`f32 vec3f_length(Vec3f a);`
+
+[:arrow_up_small:](#)
+
+
+
+## [vec3f_project](#vec3f_project)
+
+### Lua Example
+`vec3f_project(vec, onto, out)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| vec | [Vec3f](structs.md#Vec3f) |
+| onto | [Vec3f](structs.md#Vec3f) |
+| out | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- None
+
+### C Prototype
+`void vec3f_project(Vec3f vec, Vec3f onto, Vec3f out);`
+
+[:arrow_up_small:](#)
+
+
+
+## [vec3f_set_dist_and_angle](#vec3f_set_dist_and_angle)
+
+### Lua Example
+`vec3f_set_dist_and_angle(from, to, dist, pitch, yaw)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| from | [Vec3f](structs.md#Vec3f) |
+| to | [Vec3f](structs.md#Vec3f) |
+| dist | `number` |
+| pitch | `integer` |
+| yaw | `integer` |
+
+### Returns
+- None
+
+### C Prototype
+`void vec3f_set_dist_and_angle(Vec3f from, Vec3f to, f32 dist, s16 pitch, s16 yaw);`
+
+[:arrow_up_small:](#)
+
+
+
---
# functions from network_player.h
diff --git a/docs/lua/functions-4.md b/docs/lua/functions-4.md
index 151f1041e..f93f794d6 100644
--- a/docs/lua/functions-4.md
+++ b/docs/lua/functions-4.md
@@ -7167,7 +7167,7 @@
## [obj_check_hitbox_overlap](#obj_check_hitbox_overlap)
### Lua Example
-`local integerValue = obj_check_hitbox_overlap(o1, o2)`
+`local booleanValue = obj_check_hitbox_overlap(o1, o2)`
### Parameters
| Field | Type |
@@ -7176,10 +7176,36 @@
| o2 | [Object](structs.md#Object) |
### Returns
-- `integer`
+- `boolean`
### C Prototype
-`s32 obj_check_hitbox_overlap(struct Object *o1, struct Object *o2);`
+`bool obj_check_hitbox_overlap(struct Object *o1, struct Object *o2);`
+
+[:arrow_up_small:](#)
+
+
+
+## [obj_check_overlap_with_hitbox_params](#obj_check_overlap_with_hitbox_params)
+
+### Lua Example
+`local booleanValue = obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| o | [Object](structs.md#Object) |
+| x | `number` |
+| y | `number` |
+| z | `number` |
+| h | `number` |
+| r | `number` |
+| d | `number` |
+
+### Returns
+- `boolean`
+
+### C Prototype
+`bool obj_check_overlap_with_hitbox_params(struct Object *o, f32 x, f32 y, f32 z, f32 h, f32 r, f32 d);`
[:arrow_up_small:](#)
@@ -7459,7 +7485,7 @@
## [obj_is_valid_for_interaction](#obj_is_valid_for_interaction)
### Lua Example
-`local integerValue = obj_is_valid_for_interaction(o)`
+`local booleanValue = obj_is_valid_for_interaction(o)`
### Parameters
| Field | Type |
@@ -7467,10 +7493,10 @@
| o | [Object](structs.md#Object) |
### Returns
-- `integer`
+- `boolean`
### C Prototype
-`s32 obj_is_valid_for_interaction(struct Object *o);`
+`bool obj_is_valid_for_interaction(struct Object *o);`
[:arrow_up_small:](#)
diff --git a/docs/lua/functions.md b/docs/lua/functions.md
index 929aee211..597a95ccc 100644
--- a/docs/lua/functions.md
+++ b/docs/lua/functions.md
@@ -816,6 +816,7 @@
- [play_sound_and_spawn_particles](functions-3.md#play_sound_and_spawn_particles)
- [play_sound_if_no_flag](functions-3.md#play_sound_if_no_flag)
- [resolve_and_return_wall_collisions](functions-3.md#resolve_and_return_wall_collisions)
+ - [resolve_and_return_wall_collisions_data](functions-3.md#resolve_and_return_wall_collisions_data)
- [return_mario_anim_y_translation](functions-3.md#return_mario_anim_y_translation)
- [set_anim_to_frame](functions-3.md#set_anim_to_frame)
- [set_jump_from_landing](functions-3.md#set_jump_from_landing)
@@ -984,6 +985,21 @@
+- math_util.h
+ - [anim_spline_poll](functions-3.md#anim_spline_poll)
+ - [approach_f32](functions-3.md#approach_f32)
+ - [approach_s32](functions-3.md#approach_s32)
+ - [not_zero](functions-3.md#not_zero)
+ - [vec3f_combine](functions-3.md#vec3f_combine)
+ - [vec3f_dist](functions-3.md#vec3f_dist)
+ - [vec3f_dot](functions-3.md#vec3f_dot)
+ - [vec3f_get_dist_and_angle](functions-3.md#vec3f_get_dist_and_angle)
+ - [vec3f_length](functions-3.md#vec3f_length)
+ - [vec3f_project](functions-3.md#vec3f_project)
+ - [vec3f_set_dist_and_angle](functions-3.md#vec3f_set_dist_and_angle)
+
+
+
- network_player.h
- [get_network_player_from_area](functions-3.md#get_network_player_from_area)
- [get_network_player_from_level](functions-3.md#get_network_player_from_level)
@@ -1436,6 +1452,7 @@
- [get_temp_object_hitbox](functions-4.md#get_temp_object_hitbox)
- [get_trajectory](functions-4.md#get_trajectory)
- [obj_check_hitbox_overlap](functions-4.md#obj_check_hitbox_overlap)
+ - [obj_check_overlap_with_hitbox_params](functions-4.md#obj_check_overlap_with_hitbox_params)
- [obj_count_objects_with_behavior_id](functions-4.md#obj_count_objects_with_behavior_id)
- [obj_get_first](functions-4.md#obj_get_first)
- [obj_get_first_with_behavior_id](functions-4.md#obj_get_first_with_behavior_id)
diff --git a/src/engine/math_util.c b/src/engine/math_util.c
index 61ab9ca05..ee6fd8f5e 100644
--- a/src/engine/math_util.c
+++ b/src/engine/math_util.c
@@ -171,6 +171,34 @@ void vec3f_combine(Vec3f dest, Vec3f vecA, Vec3f vecB, f32 sclA, f32 sclB) {
}
}
+/**
+ * Returns a vector rotated around the z axis, then the x axis, then the y
+ * axis.
+ */
+void *vec3f_rotate_zxy(Vec3f dest, Vec3s rotate) {
+ Vec3f v = { dest[0], dest[1], dest[2] };
+
+ f32 sx = sins(rotate[0]);
+ f32 cx = coss(rotate[0]);
+
+ f32 sy = sins(rotate[1]);
+ f32 cy = coss(rotate[1]);
+
+ f32 sz = sins(rotate[2]);
+ f32 cz = coss(rotate[2]);
+
+ f32 sysz = (sy * sz);
+ f32 cycz = (cy * cz);
+ f32 cysz = (cy * sz);
+ f32 sycz = (sy * cz);
+
+ dest[0] = v[0] * ((sysz * sx) + cycz) + v[1] * ((sycz * sx) - cysz) + v[2] * (cx * sy);
+ dest[1] = v[0] * (cx * sz) + v[1] * (cx * cz) + v[2] * -sx;
+ dest[2] = v[0] * ((cysz * sx) - sycz) + v[1] * ((cycz * sx) + sysz) + v[2] * (cx * cy);
+
+ return &dest;
+}
+
#pragma GCC diagnostic pop
/// Copy matrix 'src' to 'dest'
diff --git a/src/engine/math_util.h b/src/engine/math_util.h
index a4ee0641d..65c9ba6e5 100644
--- a/src/engine/math_util.h
+++ b/src/engine/math_util.h
@@ -63,6 +63,7 @@ void *vec3f_normalize(Vec3f dest);
f32 vec3f_length(Vec3f a);
f32 vec3f_dot(Vec3f a, Vec3f b);
void vec3f_combine(Vec3f dest, Vec3f vecA, Vec3f vecB, f32 sclA, f32 sclB);
+void *vec3f_rotate_zxy(Vec3f v, Vec3s rotate);
void mtxf_copy(Mat4 dest, Mat4 src);
void mtxf_identity(Mat4 mtx);
void mtxf_translate(Mat4 dest, Vec3f b);
diff --git a/src/game/interaction.c b/src/game/interaction.c
index 4b54ded5e..999416cb1 100644
--- a/src/game/interaction.c
+++ b/src/game/interaction.c
@@ -2143,7 +2143,7 @@ void check_kick_or_punch_wall(struct MarioState *m) {
detector[1] = m->pos[1];
struct WallCollisionData wcd = { 0 };
- resolve_and_return_wall_collisions(detector, 80.0f, 5.0f, &wcd);
+ resolve_and_return_wall_collisions_data(detector, 80.0f, 5.0f, &wcd);
if (wcd.numWalls > 0) {
if (m->action != ACT_MOVE_PUNCHING || m->forwardVel >= 0.0f) {
if (m->action == ACT_PUNCHING) {
diff --git a/src/game/mario.c b/src/game/mario.c
index 118895a07..79e6ca309 100644
--- a/src/game/mario.c
+++ b/src/game/mario.c
@@ -591,7 +591,32 @@ u32 mario_get_terrain_sound_addend(struct MarioState *m) {
/**
* Collides with walls and returns the most recent wall.
*/
-void resolve_and_return_wall_collisions(Vec3f pos, f32 offset, f32 radius, struct WallCollisionData* collisionData) {
+struct Surface *resolve_and_return_wall_collisions(Vec3f pos, f32 offset, f32 radius) {
+ struct WallCollisionData collisionData;
+ struct Surface *wall = NULL;
+
+ collisionData.x = pos[0];
+ collisionData.y = pos[1];
+ collisionData.z = pos[2];
+ collisionData.radius = radius;
+ collisionData.offsetY = offset;
+
+ if (find_wall_collisions(&collisionData)) {
+ wall = collisionData.walls[collisionData.numWalls - 1];
+ }
+
+ // I'm not sure if this code is actually ever used or not.
+ pos[0] = collisionData.x;
+ pos[1] = collisionData.y;
+ pos[2] = collisionData.z;
+
+ return wall;
+}
+
+/**
+ * Collides with walls and returns the wall collision data.
+ */
+void resolve_and_return_wall_collisions_data(Vec3f pos, f32 offset, f32 radius, struct WallCollisionData* collisionData) {
if (!collisionData || !pos) { return; }
collisionData->x = pos[0];
diff --git a/src/game/mario.h b/src/game/mario.h
index de1f54904..cc0a41476 100644
--- a/src/game/mario.h
+++ b/src/game/mario.h
@@ -33,7 +33,8 @@ void mario_set_bubbled(struct MarioState* m);
void mario_set_forward_vel(struct MarioState *m, f32 speed);
s32 mario_get_floor_class(struct MarioState *m);
u32 mario_get_terrain_sound_addend(struct MarioState *m);
-void resolve_and_return_wall_collisions(Vec3f pos, f32 offset, f32 radius, struct WallCollisionData* collisionData);
+struct Surface *resolve_and_return_wall_collisions(Vec3f pos, f32 offset, f32 radius);
+void resolve_and_return_wall_collisions_data(Vec3f pos, f32 offset, f32 radius, struct WallCollisionData* collisionData);
f32 vec3f_find_ceil(Vec3f pos, f32 height, struct Surface **ceil);
f32 vec3f_mario_ceil(Vec3f pos, f32 height, struct Surface **ceil);
s32 mario_facing_downhill(struct MarioState *m, s32 turnYaw);
diff --git a/src/game/mario_actions_automatic.c b/src/game/mario_actions_automatic.c
index 058274c1c..8582b8cfe 100644
--- a/src/game/mario_actions_automatic.c
+++ b/src/game/mario_actions_automatic.c
@@ -332,7 +332,7 @@ s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos) {
smlua_call_event_hooks_mario_param(HOOK_BEFORE_PHYS_STEP, m);
struct WallCollisionData wcd = { 0 };
- resolve_and_return_wall_collisions(nextPos, 50.0f, 50.0f, &wcd);
+ resolve_and_return_wall_collisions_data(nextPos, 50.0f, 50.0f, &wcd);
m->wall = (wcd.numWalls > 0)
? wcd.walls[wcd.numWalls - 1]
: NULL;
diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c
index 5a0f2f024..178c7c57a 100644
--- a/src/game/mario_actions_cutscene.c
+++ b/src/game/mario_actions_cutscene.c
@@ -647,7 +647,7 @@ s32 act_debug_free_move(struct MarioState *m) {
}
struct WallCollisionData wcd = { 0 };
- resolve_and_return_wall_collisions(pos, 60.0f, 50.0f, &wcd);
+ resolve_and_return_wall_collisions_data(pos, 60.0f, 50.0f, &wcd);
struct Surface *surf = NULL;
f32 floorHeight = find_floor(pos[0], pos[1], pos[2], &surf);
diff --git a/src/game/mario_actions_submerged.c b/src/game/mario_actions_submerged.c
index 4a2a66b0b..531a3239d 100644
--- a/src/game/mario_actions_submerged.c
+++ b/src/game/mario_actions_submerged.c
@@ -87,7 +87,7 @@ u32 perform_water_full_step(struct MarioState *m, Vec3f nextPos) {
f32 ceilHeight;
f32 floorHeight;
- resolve_and_return_wall_collisions(nextPos, 10.0f, 110.0f, &wcd);
+ resolve_and_return_wall_collisions_data(nextPos, 10.0f, 110.0f, &wcd);
floorHeight = find_floor(nextPos[0], nextPos[1], nextPos[2], &floor);
ceilHeight = vec3f_mario_ceil(nextPos, floorHeight, &ceil);
diff --git a/src/game/mario_step.c b/src/game/mario_step.c
index bf8106b76..f20ee23df 100644
--- a/src/game/mario_step.c
+++ b/src/game/mario_step.c
@@ -267,8 +267,8 @@ static s32 perform_ground_quarter_step(struct MarioState *m, Vec3f nextPos) {
f32 floorHeight;
f32 waterLevel;
- resolve_and_return_wall_collisions(nextPos, 30.0f, 24.0f, &lowerWcd);
- resolve_and_return_wall_collisions(nextPos, 60.0f, 50.0f, &upperWcd);
+ resolve_and_return_wall_collisions_data(nextPos, 30.0f, 24.0f, &lowerWcd);
+ resolve_and_return_wall_collisions_data(nextPos, 60.0f, 50.0f, &upperWcd);
floorHeight = find_floor(nextPos[0], nextPos[1], nextPos[2], &floor);
ceilHeight = vec3f_mario_ceil(nextPos, floorHeight, &ceil);
@@ -421,8 +421,8 @@ s32 perform_air_quarter_step(struct MarioState *m, Vec3f intendedPos, u32 stepAr
vec3f_copy(nextPos, intendedPos);
- resolve_and_return_wall_collisions(nextPos, 150.0f, 50.0f, &upperWcd);
- resolve_and_return_wall_collisions(nextPos, 30.0f, 50.0f, &lowerWcd);
+ resolve_and_return_wall_collisions_data(nextPos, 150.0f, 50.0f, &upperWcd);
+ resolve_and_return_wall_collisions_data(nextPos, 30.0f, 50.0f, &lowerWcd);
floorHeight = find_floor(nextPos[0], nextPos[1], nextPos[2], &floor);
ceilHeight = vec3f_mario_ceil(nextPos, floorHeight, &ceil);
diff --git a/src/pc/lua/smlua.c b/src/pc/lua/smlua.c
index 7331a97ba..a1709cce2 100644
--- a/src/pc/lua/smlua.c
+++ b/src/pc/lua/smlua.c
@@ -132,10 +132,12 @@ void smlua_init(void) {
// load libraries
luaopen_base(L);
//luaopen_coroutine(L);
- //luaopen_debug(L);
- //luaopen_io(L);
+#if defined(LUA_PROFILER)
+ luaL_requiref(L, "debug", luaopen_debug, 1);
+ luaL_requiref(L, "io", luaopen_io, 1);
+ luaL_requiref(L, "os", luaopen_os, 1);
+#endif
luaL_requiref(L, "math", luaopen_math, 1);
- //luaopen_os(L);
//luaopen_package(L);
luaL_requiref(L, "string", luaopen_string, 1);
luaL_requiref(L, "table", luaopen_table, 1);
diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c
index da352c7c8..5fe676e60 100644
--- a/src/pc/lua/smlua_functions_autogen.c
+++ b/src/pc/lua/smlua_functions_autogen.c
@@ -4,7 +4,9 @@
#include "smlua.h"
#include "src/audio/external.h"
+#include "src/engine/math_util.h"
#include "src/engine/surface_collision.h"
+#include "src/engine/surface_load.h"
#include "src/game/camera.h"
#include "src/game/characters.h"
#include "src/game/mario_step.h"
@@ -26,7 +28,6 @@
#include "src/pc/lua/utils/smlua_text_utils.h"
#include "src/pc/lua/utils/smlua_audio_utils.h"
#include "src/pc/lua/utils/smlua_level_utils.h"
-#include "src/engine/surface_load.h"
#include "src/game/object_list_processor.h"
#include "src/game/behavior_actions.h"
#include "src/game/mario_misc.h"
@@ -44,17 +45,17 @@ int smlua_func_arc_to_goal_pos(lua_State* L) {
a0[0] = smlua_get_number_field(1, "x");
a0[1] = smlua_get_number_field(1, "y");
a0[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'arc_to_goal_pos'"); return 0; }
f32* a1 = smlua_get_vec3f_from_buffer();
a1[0] = smlua_get_number_field(2, "x");
a1[1] = smlua_get_number_field(2, "y");
a1[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'arc_to_goal_pos'"); return 0; }
f32 yVel = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'arc_to_goal_pos'"); return 0; }
f32 gravity = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'arc_to_goal_pos'"); return 0; }
lua_pushinteger(L, arc_to_goal_pos(a0, a1, yVel, gravity));
@@ -3790,11 +3791,11 @@ int smlua_func_bhv_spawn_star_no_level_exit(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* object = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'bhv_spawn_star_no_level_exit'"); return 0; }
u32 params = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'bhv_spawn_star_no_level_exit'"); return 0; }
u8 networkSendEvent = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'bhv_spawn_star_no_level_exit'"); return 0; }
bhv_spawn_star_no_level_exit(object, params, networkSendEvent);
@@ -4984,9 +4985,9 @@ int smlua_func_check_if_moving_over_floor(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 a0 = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_if_moving_over_floor'"); return 0; }
f32 a1 = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'check_if_moving_over_floor'"); return 0; }
lua_pushinteger(L, check_if_moving_over_floor(a0, a1));
@@ -4997,7 +4998,7 @@ int smlua_func_clear_particle_flags(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 flags = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'clear_particle_flags'"); return 0; }
clear_particle_flags(flags);
@@ -5008,11 +5009,11 @@ int smlua_func_common_anchor_mario_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 sp28 = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'common_anchor_mario_behavior'"); return 0; }
f32 sp2C = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'common_anchor_mario_behavior'"); return 0; }
s32 sp30 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'common_anchor_mario_behavior'"); return 0; }
common_anchor_mario_behavior(sp28, sp2C, sp30);
@@ -5023,15 +5024,15 @@ int smlua_func_cur_obj_spawn_strong_wind_particles(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
s32 windSpread = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_spawn_strong_wind_particles'"); return 0; }
f32 scale = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_spawn_strong_wind_particles'"); return 0; }
f32 relPosX = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_spawn_strong_wind_particles'"); return 0; }
f32 relPosY = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'cur_obj_spawn_strong_wind_particles'"); return 0; }
f32 relPosZ = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'cur_obj_spawn_strong_wind_particles'"); return 0; }
cur_obj_spawn_strong_wind_particles(windSpread, scale, relPosX, relPosY, relPosZ);
@@ -5043,11 +5044,11 @@ int smlua_func_geo_bits_bowser_coloring(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_bits_bowser_coloring'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_bits_bowser_coloring'"); return 0; }
s32 a2 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_bits_bowser_coloring'"); return 0; }
UNIMPLEMENTED -->(L, geo_bits_bowser_coloring(run, node, a2));
@@ -5060,11 +5061,11 @@ int smlua_func_geo_move_mario_part_from_parent(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_move_mario_part_from_parent'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_move_mario_part_from_parent'"); return 0; }
// Mat4 mtx = (Mat4)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_move_mario_part_from_parent'"); return 0; }
UNIMPLEMENTED -->(L, geo_move_mario_part_from_parent(run, node, mtx));
@@ -5077,11 +5078,11 @@ int smlua_func_geo_scale_bowser_key(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_scale_bowser_key'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_scale_bowser_key'"); return 0; }
f32 mtx[4][4] = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_scale_bowser_key'"); return 0; }
UNIMPLEMENTED -->(L, geo_scale_bowser_key(run, node, mtx[4][4]));
@@ -5094,11 +5095,11 @@ int smlua_func_geo_snufit_move_mask(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_snufit_move_mask'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_snufit_move_mask'"); return 0; }
// Mat4 * c = (Mat4 *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_snufit_move_mask'"); return 0; }
UNIMPLEMENTED -->(L, geo_snufit_move_mask(callContext, node, c));
@@ -5111,11 +5112,11 @@ int smlua_func_geo_snufit_scale_body(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_snufit_scale_body'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_snufit_scale_body'"); return 0; }
// Mat4 * c = (Mat4 *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_snufit_scale_body'"); return 0; }
UNIMPLEMENTED -->(L, geo_snufit_scale_body(callContext, node, c));
@@ -5128,11 +5129,11 @@ int smlua_func_geo_switch_bowser_eyes(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_switch_bowser_eyes'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_switch_bowser_eyes'"); return 0; }
// Mat4 * mtx = (Mat4 *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_switch_bowser_eyes'"); return 0; }
UNIMPLEMENTED -->(L, geo_switch_bowser_eyes(run, node, mtx));
@@ -5145,11 +5146,11 @@ int smlua_func_geo_switch_tuxie_mother_eyes(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_switch_tuxie_mother_eyes'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_switch_tuxie_mother_eyes'"); return 0; }
// Mat4 * mtx = (Mat4 *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_switch_tuxie_mother_eyes'"); return 0; }
UNIMPLEMENTED -->(L, geo_switch_tuxie_mother_eyes(run, node, mtx));
@@ -5162,11 +5163,11 @@ int smlua_func_geo_update_body_rot_from_parent(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_update_body_rot_from_parent'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_update_body_rot_from_parent'"); return 0; }
// Mat4 mtx = (Mat4)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_update_body_rot_from_parent'"); return 0; }
UNIMPLEMENTED -->(L, geo_update_body_rot_from_parent(run, node, mtx));
@@ -5179,11 +5180,11 @@ int smlua_func_geo_update_held_mario_pos(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_update_held_mario_pos'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_update_held_mario_pos'"); return 0; }
// Mat4 mtx = (Mat4)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_update_held_mario_pos'"); return 0; }
UNIMPLEMENTED -->(L, geo_update_held_mario_pos(run, node, mtx));
@@ -5213,7 +5214,7 @@ int smlua_func_play_penguin_walking_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 walk = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_penguin_walking_sound'"); return 0; }
play_penguin_walking_sound(walk);
@@ -5224,11 +5225,11 @@ int smlua_func_spawn_default_star(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 x = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_default_star'"); return 0; }
f32 y = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_default_star'"); return 0; }
f32 z = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'spawn_default_star'"); return 0; }
smlua_push_object(L, LOT_OBJECT, spawn_default_star(x, y, z));
@@ -5248,11 +5249,11 @@ int smlua_func_spawn_mist_particles_variable(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 count = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_mist_particles_variable'"); return 0; }
s32 offsetY = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_mist_particles_variable'"); return 0; }
f32 size = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'spawn_mist_particles_variable'"); return 0; }
spawn_mist_particles_variable(count, offsetY, size);
@@ -5263,11 +5264,11 @@ int smlua_func_spawn_no_exit_star(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 x = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_no_exit_star'"); return 0; }
f32 y = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_no_exit_star'"); return 0; }
f32 z = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'spawn_no_exit_star'"); return 0; }
smlua_push_object(L, LOT_OBJECT, spawn_no_exit_star(x, y, z));
@@ -5278,11 +5279,11 @@ int smlua_func_spawn_red_coin_cutscene_star(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 x = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_red_coin_cutscene_star'"); return 0; }
f32 y = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_red_coin_cutscene_star'"); return 0; }
f32 z = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'spawn_red_coin_cutscene_star'"); return 0; }
smlua_push_object(L, LOT_OBJECT, spawn_red_coin_cutscene_star(x, y, z));
@@ -5293,13 +5294,13 @@ int smlua_func_spawn_triangle_break_particles(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s16 numTris = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_triangle_break_particles'"); return 0; }
s16 triModel = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_triangle_break_particles'"); return 0; }
f32 triSize = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'spawn_triangle_break_particles'"); return 0; }
s16 triAnimState = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'spawn_triangle_break_particles'"); return 0; }
spawn_triangle_break_particles(numTris, triModel, triSize, triAnimState);
@@ -5310,9 +5311,9 @@ int smlua_func_spawn_wind_particles(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 pitch = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_wind_particles'"); return 0; }
s16 yaw = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_wind_particles'"); return 0; }
spawn_wind_particles(pitch, yaw);
@@ -5323,13 +5324,13 @@ int smlua_func_tox_box_move(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
f32 forwardVel = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'tox_box_move'"); return 0; }
f32 a1 = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'tox_box_move'"); return 0; }
s16 deltaPitch = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'tox_box_move'"); return 0; }
s16 deltaRoll = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'tox_box_move'"); return 0; }
tox_box_move(forwardVel, a1, deltaPitch, deltaRoll);
@@ -5340,7 +5341,7 @@ int smlua_func_update_angle_from_move_flags(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 * angle = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_angle_from_move_flags'"); return 0; }
lua_pushinteger(L, update_angle_from_move_flags(angle));
@@ -5355,13 +5356,13 @@ int smlua_func_vec3f_copy_2(lua_State* L) {
dest[0] = smlua_get_number_field(1, "x");
dest[1] = smlua_get_number_field(1, "y");
dest[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_copy_2'"); return 0; }
f32* src = smlua_get_vec3f_from_buffer();
src[0] = smlua_get_number_field(2, "x");
src[1] = smlua_get_number_field(2, "y");
src[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_copy_2'"); return 0; }
vec3f_copy_2(dest, src);
@@ -5384,7 +5385,7 @@ int smlua_func_get_behavior_from_id(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
int id = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_behavior_from_id'"); return 0; }
smlua_push_pointer(L, LVT_BEHAVIORSCRIPT_P, (void*)get_behavior_from_id(id));
@@ -5395,7 +5396,7 @@ int smlua_func_get_behavior_name_from_id(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
int id = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_behavior_name_from_id'"); return 0; }
lua_pushstring(L, get_behavior_name_from_id(id));
@@ -5406,7 +5407,7 @@ int smlua_func_get_id_from_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_id_from_behavior'"); return 0; }
lua_pushinteger(L, get_id_from_behavior(behavior));
@@ -5417,7 +5418,7 @@ int smlua_func_get_id_from_behavior_name(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const char* name = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_id_from_behavior_name'"); return 0; }
lua_pushinteger(L, get_id_from_behavior_name(name));
@@ -5428,7 +5429,7 @@ int smlua_func_get_id_from_vanilla_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_id_from_vanilla_behavior'"); return 0; }
lua_pushinteger(L, get_id_from_vanilla_behavior(behavior));
@@ -5443,11 +5444,11 @@ int smlua_func_approach_camera_height(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_camera_height'"); return 0; }
f32 goal = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_camera_height'"); return 0; }
f32 inc = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_camera_height'"); return 0; }
approach_camera_height(c, goal, inc);
@@ -5458,11 +5459,11 @@ int smlua_func_approach_f32_asymptotic(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 current = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_f32_asymptotic'"); return 0; }
f32 target = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_f32_asymptotic'"); return 0; }
f32 multiplier = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_f32_asymptotic'"); return 0; }
lua_pushnumber(L, approach_f32_asymptotic(current, target, multiplier));
@@ -5473,11 +5474,11 @@ int smlua_func_approach_f32_asymptotic_bool(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 * current = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_f32_asymptotic_bool'"); return 0; }
f32 target = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_f32_asymptotic_bool'"); return 0; }
f32 multiplier = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_f32_asymptotic_bool'"); return 0; }
lua_pushinteger(L, approach_f32_asymptotic_bool(current, target, multiplier));
@@ -5488,11 +5489,11 @@ int smlua_func_approach_s16_asymptotic(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 current = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_s16_asymptotic'"); return 0; }
s16 target = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_s16_asymptotic'"); return 0; }
s16 divisor = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_s16_asymptotic'"); return 0; }
lua_pushinteger(L, approach_s16_asymptotic(current, target, divisor));
@@ -5503,11 +5504,11 @@ int smlua_func_approach_s16_asymptotic_bool(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 * current = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_s16_asymptotic_bool'"); return 0; }
s16 target = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_s16_asymptotic_bool'"); return 0; }
s16 divisor = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_s16_asymptotic_bool'"); return 0; }
lua_pushinteger(L, approach_s16_asymptotic_bool(current, target, divisor));
@@ -5522,19 +5523,19 @@ int smlua_func_approach_vec3f_asymptotic(lua_State* L) {
current[0] = smlua_get_number_field(1, "x");
current[1] = smlua_get_number_field(1, "y");
current[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_vec3f_asymptotic'"); return 0; }
f32* target = smlua_get_vec3f_from_buffer();
target[0] = smlua_get_number_field(2, "x");
target[1] = smlua_get_number_field(2, "y");
target[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_vec3f_asymptotic'"); return 0; }
f32 xMul = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_vec3f_asymptotic'"); return 0; }
f32 yMul = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'approach_vec3f_asymptotic'"); return 0; }
f32 zMul = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'approach_vec3f_asymptotic'"); return 0; }
approach_vec3f_asymptotic(current, target, xMul, yMul, zMul);
@@ -5557,13 +5558,13 @@ int smlua_func_calc_abs_dist(lua_State* L) {
a[0] = smlua_get_number_field(1, "x");
a[1] = smlua_get_number_field(1, "y");
a[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'calc_abs_dist'"); return 0; }
f32* b = smlua_get_vec3f_from_buffer();
b[0] = smlua_get_number_field(2, "x");
b[1] = smlua_get_number_field(2, "y");
b[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'calc_abs_dist'"); return 0; }
lua_pushnumber(L, calc_abs_dist(a, b));
@@ -5586,13 +5587,13 @@ int smlua_func_calc_hor_dist(lua_State* L) {
a[0] = smlua_get_number_field(1, "x");
a[1] = smlua_get_number_field(1, "y");
a[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'calc_hor_dist'"); return 0; }
f32* b = smlua_get_vec3f_from_buffer();
b[0] = smlua_get_number_field(2, "x");
b[1] = smlua_get_number_field(2, "y");
b[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'calc_hor_dist'"); return 0; }
lua_pushnumber(L, calc_hor_dist(a, b));
@@ -5615,17 +5616,17 @@ int smlua_func_calculate_angles(lua_State* L) {
from[0] = smlua_get_number_field(1, "x");
from[1] = smlua_get_number_field(1, "y");
from[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'calculate_angles'"); return 0; }
f32* to = smlua_get_vec3f_from_buffer();
to[0] = smlua_get_number_field(2, "x");
to[1] = smlua_get_number_field(2, "y");
to[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'calculate_angles'"); return 0; }
s16 * pitch = (s16 *)smlua_to_cpointer(L, 3, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'calculate_angles'"); return 0; }
s16 * yaw = (s16 *)smlua_to_cpointer(L, 4, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'calculate_angles'"); return 0; }
calculate_angles(from, to, pitch, yaw);
@@ -5648,13 +5649,13 @@ int smlua_func_calculate_pitch(lua_State* L) {
from[0] = smlua_get_number_field(1, "x");
from[1] = smlua_get_number_field(1, "y");
from[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'calculate_pitch'"); return 0; }
f32* to = smlua_get_vec3f_from_buffer();
to[0] = smlua_get_number_field(2, "x");
to[1] = smlua_get_number_field(2, "y");
to[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'calculate_pitch'"); return 0; }
lua_pushinteger(L, calculate_pitch(from, to));
@@ -5677,13 +5678,13 @@ int smlua_func_calculate_yaw(lua_State* L) {
from[0] = smlua_get_number_field(1, "x");
from[1] = smlua_get_number_field(1, "y");
from[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'calculate_yaw'"); return 0; }
f32* to = smlua_get_vec3f_from_buffer();
to[0] = smlua_get_number_field(2, "x");
to[1] = smlua_get_number_field(2, "y");
to[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'calculate_yaw'"); return 0; }
lua_pushinteger(L, calculate_yaw(from, to));
@@ -5702,7 +5703,7 @@ int smlua_func_cam_select_alt_mode(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 angle = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cam_select_alt_mode'"); return 0; }
lua_pushinteger(L, cam_select_alt_mode(angle));
@@ -5713,11 +5714,11 @@ int smlua_func_camera_approach_f32_symmetric(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 value = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_approach_f32_symmetric'"); return 0; }
f32 target = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'camera_approach_f32_symmetric'"); return 0; }
f32 increment = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'camera_approach_f32_symmetric'"); return 0; }
lua_pushnumber(L, camera_approach_f32_symmetric(value, target, increment));
@@ -5728,11 +5729,11 @@ int smlua_func_camera_approach_f32_symmetric_bool(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 * current = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_approach_f32_symmetric_bool'"); return 0; }
f32 target = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'camera_approach_f32_symmetric_bool'"); return 0; }
f32 increment = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'camera_approach_f32_symmetric_bool'"); return 0; }
lua_pushinteger(L, camera_approach_f32_symmetric_bool(current, target, increment));
@@ -5743,11 +5744,11 @@ int smlua_func_camera_approach_s16_symmetric_bool(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 * current = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_approach_s16_symmetric_bool'"); return 0; }
s16 target = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'camera_approach_s16_symmetric_bool'"); return 0; }
s16 increment = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'camera_approach_s16_symmetric_bool'"); return 0; }
lua_pushinteger(L, camera_approach_s16_symmetric_bool(current, target, increment));
@@ -5758,7 +5759,7 @@ int smlua_func_camera_course_processing(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_course_processing'"); return 0; }
lua_pushinteger(L, camera_course_processing(c));
@@ -5769,7 +5770,7 @@ int smlua_func_camera_set_use_course_specific_settings(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 enable = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_set_use_course_specific_settings'"); return 0; }
camera_set_use_course_specific_settings(enable);
@@ -5784,17 +5785,17 @@ int smlua_func_clamp_pitch(lua_State* L) {
from[0] = smlua_get_number_field(1, "x");
from[1] = smlua_get_number_field(1, "y");
from[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'clamp_pitch'"); return 0; }
f32* to = smlua_get_vec3f_from_buffer();
to[0] = smlua_get_number_field(2, "x");
to[1] = smlua_get_number_field(2, "y");
to[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'clamp_pitch'"); return 0; }
s16 maxPitch = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'clamp_pitch'"); return 0; }
s16 minPitch = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'clamp_pitch'"); return 0; }
lua_pushinteger(L, clamp_pitch(from, to, maxPitch, minPitch));
@@ -5817,21 +5818,21 @@ int smlua_func_clamp_positions_and_find_yaw(lua_State* L) {
pos[0] = smlua_get_number_field(1, "x");
pos[1] = smlua_get_number_field(1, "y");
pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'clamp_positions_and_find_yaw'"); return 0; }
f32* origin = smlua_get_vec3f_from_buffer();
origin[0] = smlua_get_number_field(2, "x");
origin[1] = smlua_get_number_field(2, "y");
origin[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'clamp_positions_and_find_yaw'"); return 0; }
f32 xMax = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'clamp_positions_and_find_yaw'"); return 0; }
f32 xMin = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'clamp_positions_and_find_yaw'"); return 0; }
f32 zMax = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'clamp_positions_and_find_yaw'"); return 0; }
f32 zMin = smlua_to_number(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'clamp_positions_and_find_yaw'"); return 0; }
lua_pushinteger(L, clamp_positions_and_find_yaw(pos, origin, xMax, xMin, zMax, zMin));
@@ -5854,11 +5855,11 @@ int smlua_func_collide_with_walls(lua_State* L) {
pos[0] = smlua_get_number_field(1, "x");
pos[1] = smlua_get_number_field(1, "y");
pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'collide_with_walls'"); return 0; }
f32 offsetY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'collide_with_walls'"); return 0; }
f32 radius = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'collide_with_walls'"); return 0; }
lua_pushinteger(L, collide_with_walls(pos, offsetY, radius));
@@ -5874,13 +5875,13 @@ int smlua_func_cutscene_event(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
// CameraEvent event = (CameraEvent)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cutscene_event'"); return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 2, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cutscene_event'"); return 0; }
s16 start = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cutscene_event'"); return 0; }
s16 end = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'cutscene_event'"); return 0; }
lua_pushinteger(L, cutscene_event(event, c, start, end));
@@ -5892,9 +5893,9 @@ int smlua_func_cutscene_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
u8 cutscene = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cutscene_object'"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cutscene_object'"); return 0; }
lua_pushinteger(L, cutscene_object(cutscene, o));
@@ -5905,11 +5906,11 @@ int smlua_func_cutscene_object_with_dialog(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
u8 cutscene = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cutscene_object_with_dialog'"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cutscene_object_with_dialog'"); return 0; }
s16 dialogID = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cutscene_object_with_dialog'"); return 0; }
lua_pushinteger(L, cutscene_object_with_dialog(cutscene, o, dialogID));
@@ -5920,9 +5921,9 @@ int smlua_func_cutscene_object_without_dialog(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
u8 cutscene = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cutscene_object_without_dialog'"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cutscene_object_without_dialog'"); return 0; }
lua_pushinteger(L, cutscene_object_without_dialog(cutscene, o));
@@ -5933,7 +5934,7 @@ int smlua_func_cutscene_set_fov_shake_preset(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 preset = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cutscene_set_fov_shake_preset'"); return 0; }
cutscene_set_fov_shake_preset(preset);
@@ -5944,9 +5945,9 @@ int smlua_func_cutscene_spawn_obj(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
u32 obj = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cutscene_spawn_obj'"); return 0; }
s16 frame = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cutscene_spawn_obj'"); return 0; }
lua_pushinteger(L, cutscene_spawn_obj(obj, frame));
@@ -5957,11 +5958,11 @@ int smlua_func_find_c_buttons_pressed(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
u16 currentState = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_c_buttons_pressed'"); return 0; }
u16 buttonsPressed = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_c_buttons_pressed'"); return 0; }
u16 buttonsDown = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'find_c_buttons_pressed'"); return 0; }
lua_pushinteger(L, find_c_buttons_pressed(currentState, buttonsPressed, buttonsDown));
@@ -5972,7 +5973,7 @@ int smlua_func_find_mario_floor_and_ceil(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct PlayerGeometry* pg = (struct PlayerGeometry*)smlua_to_cobject(L, 1, LOT_PLAYERGEOMETRY);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_mario_floor_and_ceil'"); return 0; }
find_mario_floor_and_ceil(pg);
@@ -5984,11 +5985,11 @@ int smlua_func_geo_camera_fov(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_camera_fov'"); return 0; }
struct GraphNode* g = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_camera_fov'"); return 0; }
// void * context = (void *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_camera_fov'"); return 0; }
UNIMPLEMENTED -->(L, geo_camera_fov(callContext, g, context));
@@ -6001,11 +6002,11 @@ int smlua_func_geo_camera_main(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_camera_main'"); return 0; }
struct GraphNode* g = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_camera_main'"); return 0; }
// void * context = (void *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_camera_main'"); return 0; }
UNIMPLEMENTED -->(L, geo_camera_main(callContext, g, context));
@@ -6017,7 +6018,7 @@ int smlua_func_get_cutscene_from_mario_status(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_cutscene_from_mario_status'"); return 0; }
lua_pushinteger(L, get_cutscene_from_mario_status(c));
@@ -6028,7 +6029,7 @@ int smlua_func_handle_c_button_movement(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'handle_c_button_movement'"); return 0; }
handle_c_button_movement(c);
@@ -6043,19 +6044,19 @@ int smlua_func_is_range_behind_surface(lua_State* L) {
from[0] = smlua_get_number_field(1, "x");
from[1] = smlua_get_number_field(1, "y");
from[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_range_behind_surface'"); return 0; }
f32* to = smlua_get_vec3f_from_buffer();
to[0] = smlua_get_number_field(2, "x");
to[1] = smlua_get_number_field(2, "y");
to[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'is_range_behind_surface'"); return 0; }
struct Surface* surf = (struct Surface*)smlua_to_cobject(L, 3, LOT_SURFACE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'is_range_behind_surface'"); return 0; }
s16 range = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'is_range_behind_surface'"); return 0; }
s16 surfType = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'is_range_behind_surface'"); return 0; }
lua_pushinteger(L, is_range_behind_surface(from, to, surf, range, surfType));
@@ -6074,11 +6075,11 @@ int smlua_func_is_within_100_units_of_mario(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 posX = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_within_100_units_of_mario'"); return 0; }
f32 posY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'is_within_100_units_of_mario'"); return 0; }
f32 posZ = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'is_within_100_units_of_mario'"); return 0; }
lua_pushinteger(L, is_within_100_units_of_mario(posX, posY, posZ));
@@ -6089,7 +6090,7 @@ int smlua_func_move_mario_head_c_up(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'move_mario_head_c_up'"); return 0; }
move_mario_head_c_up(c);
@@ -6104,39 +6105,39 @@ int smlua_func_next_lakitu_state(lua_State* L) {
newPos[0] = smlua_get_number_field(1, "x");
newPos[1] = smlua_get_number_field(1, "y");
newPos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'next_lakitu_state'"); return 0; }
f32* newFoc = smlua_get_vec3f_from_buffer();
newFoc[0] = smlua_get_number_field(2, "x");
newFoc[1] = smlua_get_number_field(2, "y");
newFoc[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'next_lakitu_state'"); return 0; }
f32* curPos = smlua_get_vec3f_from_buffer();
curPos[0] = smlua_get_number_field(3, "x");
curPos[1] = smlua_get_number_field(3, "y");
curPos[2] = smlua_get_number_field(3, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'next_lakitu_state'"); return 0; }
f32* curFoc = smlua_get_vec3f_from_buffer();
curFoc[0] = smlua_get_number_field(4, "x");
curFoc[1] = smlua_get_number_field(4, "y");
curFoc[2] = smlua_get_number_field(4, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'next_lakitu_state'"); return 0; }
f32* oldPos = smlua_get_vec3f_from_buffer();
oldPos[0] = smlua_get_number_field(5, "x");
oldPos[1] = smlua_get_number_field(5, "y");
oldPos[2] = smlua_get_number_field(5, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'next_lakitu_state'"); return 0; }
f32* oldFoc = smlua_get_vec3f_from_buffer();
oldFoc[0] = smlua_get_number_field(6, "x");
oldFoc[1] = smlua_get_number_field(6, "y");
oldFoc[2] = smlua_get_number_field(6, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'next_lakitu_state'"); return 0; }
s16 yaw = smlua_to_integer(L, 7);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7 for function 'next_lakitu_state'"); return 0; }
lua_pushinteger(L, next_lakitu_state(newPos, newFoc, curPos, curFoc, oldPos, oldFoc, yaw));
@@ -6171,21 +6172,21 @@ int smlua_func_obj_rotate_towards_point(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_rotate_towards_point'"); return 0; }
f32* point = smlua_get_vec3f_from_buffer();
point[0] = smlua_get_number_field(2, "x");
point[1] = smlua_get_number_field(2, "y");
point[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_rotate_towards_point'"); return 0; }
s16 pitchOff = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_rotate_towards_point'"); return 0; }
s16 yawOff = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_rotate_towards_point'"); return 0; }
s16 pitchDiv = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'obj_rotate_towards_point'"); return 0; }
s16 yawDiv = smlua_to_integer(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'obj_rotate_towards_point'"); return 0; }
obj_rotate_towards_point(o, point, pitchOff, yawOff, pitchDiv, yawDiv);
@@ -6204,9 +6205,9 @@ int smlua_func_object_pos_to_vec3f(lua_State* L) {
dst[0] = smlua_get_number_field(1, "x");
dst[1] = smlua_get_number_field(1, "y");
dst[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'object_pos_to_vec3f'"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'object_pos_to_vec3f'"); return 0; }
object_pos_to_vec3f(dst, o);
@@ -6225,25 +6226,25 @@ int smlua_func_offset_rotated(lua_State* L) {
dst[0] = smlua_get_number_field(1, "x");
dst[1] = smlua_get_number_field(1, "y");
dst[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'offset_rotated'"); return 0; }
f32* from = smlua_get_vec3f_from_buffer();
from[0] = smlua_get_number_field(2, "x");
from[1] = smlua_get_number_field(2, "y");
from[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'offset_rotated'"); return 0; }
f32* to = smlua_get_vec3f_from_buffer();
to[0] = smlua_get_number_field(3, "x");
to[1] = smlua_get_number_field(3, "y");
to[2] = smlua_get_number_field(3, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'offset_rotated'"); return 0; }
s16* rotation = smlua_get_vec3s_from_buffer();
rotation[0] = smlua_get_integer_field(4, "x");
rotation[1] = smlua_get_integer_field(4, "y");
rotation[2] = smlua_get_integer_field(4, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'offset_rotated'"); return 0; }
offset_rotated(dst, from, to, rotation);
@@ -6270,9 +6271,9 @@ int smlua_func_offset_yaw_outward_radial(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'offset_yaw_outward_radial'"); return 0; }
s16 areaYaw = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'offset_yaw_outward_radial'"); return 0; }
lua_pushinteger(L, offset_yaw_outward_radial(c, areaYaw));
@@ -6310,7 +6311,7 @@ int smlua_func_play_cutscene(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_cutscene'"); return 0; }
play_cutscene(c);
@@ -6375,9 +6376,9 @@ int smlua_func_radial_camera_input(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'radial_camera_input'"); return 0; }
f32 unused = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'radial_camera_input'"); return 0; }
lua_pushinteger(L, radial_camera_input(c, unused));
@@ -6392,13 +6393,13 @@ int smlua_func_random_vec3s(lua_State* L) {
dst[0] = smlua_get_integer_field(1, "x");
dst[1] = smlua_get_integer_field(1, "y");
dst[2] = smlua_get_integer_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'random_vec3s'"); return 0; }
s16 xRange = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'random_vec3s'"); return 0; }
s16 yRange = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'random_vec3s'"); return 0; }
s16 zRange = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'random_vec3s'"); return 0; }
random_vec3s(dst, xRange, yRange, zRange);
@@ -6413,7 +6414,7 @@ int smlua_func_reset_camera(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'reset_camera'"); return 0; }
reset_camera(c);
@@ -6428,13 +6429,13 @@ int smlua_func_resolve_geometry_collisions(lua_State* L) {
pos[0] = smlua_get_number_field(1, "x");
pos[1] = smlua_get_number_field(1, "y");
pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'resolve_geometry_collisions'"); return 0; }
f32* lastGood = smlua_get_vec3f_from_buffer();
lastGood[0] = smlua_get_number_field(2, "x");
lastGood[1] = smlua_get_number_field(2, "y");
lastGood[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'resolve_geometry_collisions'"); return 0; }
resolve_geometry_collisions(pos, lastGood);
@@ -6453,17 +6454,17 @@ int smlua_func_rotate_camera_around_walls(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'rotate_camera_around_walls'"); return 0; }
f32* cPos = smlua_get_vec3f_from_buffer();
cPos[0] = smlua_get_number_field(2, "x");
cPos[1] = smlua_get_number_field(2, "y");
cPos[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'rotate_camera_around_walls'"); return 0; }
s16 * avoidYaw = (s16 *)smlua_to_cpointer(L, 3, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'rotate_camera_around_walls'"); return 0; }
s16 yawRange = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'rotate_camera_around_walls'"); return 0; }
lua_pushinteger(L, rotate_camera_around_walls(c, cPos, avoidYaw, yawRange));
@@ -6482,15 +6483,15 @@ int smlua_func_rotate_in_xz(lua_State* L) {
dst[0] = smlua_get_number_field(1, "x");
dst[1] = smlua_get_number_field(1, "y");
dst[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'rotate_in_xz'"); return 0; }
f32* src = smlua_get_vec3f_from_buffer();
src[0] = smlua_get_number_field(2, "x");
src[1] = smlua_get_number_field(2, "y");
src[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'rotate_in_xz'"); return 0; }
s16 yaw = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'rotate_in_xz'"); return 0; }
rotate_in_xz(dst, src, yaw);
@@ -6513,15 +6514,15 @@ int smlua_func_rotate_in_yz(lua_State* L) {
dst[0] = smlua_get_number_field(1, "x");
dst[1] = smlua_get_number_field(1, "y");
dst[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'rotate_in_yz'"); return 0; }
f32* src = smlua_get_vec3f_from_buffer();
src[0] = smlua_get_number_field(2, "x");
src[1] = smlua_get_number_field(2, "y");
src[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'rotate_in_yz'"); return 0; }
s16 pitch = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'rotate_in_yz'"); return 0; }
rotate_in_yz(dst, src, pitch);
@@ -6544,21 +6545,21 @@ int smlua_func_scale_along_line(lua_State* L) {
dest[0] = smlua_get_number_field(1, "x");
dest[1] = smlua_get_number_field(1, "y");
dest[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'scale_along_line'"); return 0; }
f32* from = smlua_get_vec3f_from_buffer();
from[0] = smlua_get_number_field(2, "x");
from[1] = smlua_get_number_field(2, "y");
from[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'scale_along_line'"); return 0; }
f32* to = smlua_get_vec3f_from_buffer();
to[0] = smlua_get_number_field(3, "x");
to[1] = smlua_get_number_field(3, "y");
to[2] = smlua_get_number_field(3, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'scale_along_line'"); return 0; }
f32 scale = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'scale_along_line'"); return 0; }
scale_along_line(dest, from, to, scale);
@@ -6590,7 +6591,7 @@ int smlua_func_set_cam_angle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 mode = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_cam_angle'"); return 0; }
lua_pushinteger(L, set_cam_angle(mode));
@@ -6601,11 +6602,11 @@ int smlua_func_set_camera_mode(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_camera_mode'"); return 0; }
s16 mode = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_camera_mode'"); return 0; }
s16 frames = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_camera_mode'"); return 0; }
set_camera_mode(c, mode, frames);
@@ -6616,13 +6617,13 @@ int smlua_func_set_camera_mode_fixed(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_camera_mode_fixed'"); return 0; }
s16 x = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_camera_mode_fixed'"); return 0; }
s16 y = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_camera_mode_fixed'"); return 0; }
s16 z = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'set_camera_mode_fixed'"); return 0; }
lua_pushinteger(L, set_camera_mode_fixed(c, x, y, z));
@@ -6633,11 +6634,11 @@ int smlua_func_set_camera_pitch_shake(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 mag = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_camera_pitch_shake'"); return 0; }
s16 decay = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_camera_pitch_shake'"); return 0; }
s16 inc = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_camera_pitch_shake'"); return 0; }
set_camera_pitch_shake(mag, decay, inc);
@@ -6648,11 +6649,11 @@ int smlua_func_set_camera_roll_shake(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 mag = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_camera_roll_shake'"); return 0; }
s16 decay = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_camera_roll_shake'"); return 0; }
s16 inc = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_camera_roll_shake'"); return 0; }
set_camera_roll_shake(mag, decay, inc);
@@ -6663,7 +6664,7 @@ int smlua_func_set_camera_shake_from_hit(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 shake = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_camera_shake_from_hit'"); return 0; }
set_camera_shake_from_hit(shake);
@@ -6674,13 +6675,13 @@ int smlua_func_set_camera_shake_from_point(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s16 shake = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_camera_shake_from_point'"); return 0; }
f32 posX = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_camera_shake_from_point'"); return 0; }
f32 posY = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_camera_shake_from_point'"); return 0; }
f32 posZ = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'set_camera_shake_from_point'"); return 0; }
set_camera_shake_from_point(shake, posX, posY, posZ);
@@ -6691,11 +6692,11 @@ int smlua_func_set_camera_yaw_shake(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 mag = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_camera_yaw_shake'"); return 0; }
s16 decay = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_camera_yaw_shake'"); return 0; }
s16 inc = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_camera_yaw_shake'"); return 0; }
set_camera_yaw_shake(mag, decay, inc);
@@ -6706,7 +6707,7 @@ int smlua_func_set_environmental_camera_shake(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 shake = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_environmental_camera_shake'"); return 0; }
set_environmental_camera_shake(shake);
@@ -6717,7 +6718,7 @@ int smlua_func_set_fixed_cam_axis_sa_lobby(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 preset = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_fixed_cam_axis_sa_lobby'"); return 0; }
set_fixed_cam_axis_sa_lobby(preset);
@@ -6728,7 +6729,7 @@ int smlua_func_set_fov_function(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 func = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_fov_function'"); return 0; }
set_fov_function(func);
@@ -6739,11 +6740,11 @@ int smlua_func_set_fov_shake(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 amplitude = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_fov_shake'"); return 0; }
s16 decay = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_fov_shake'"); return 0; }
s16 shakeSpeed = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_fov_shake'"); return 0; }
set_fov_shake(amplitude, decay, shakeSpeed);
@@ -6754,13 +6755,13 @@ int smlua_func_set_fov_shake_from_point_preset(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
u8 preset = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_fov_shake_from_point_preset'"); return 0; }
f32 posX = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_fov_shake_from_point_preset'"); return 0; }
f32 posY = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_fov_shake_from_point_preset'"); return 0; }
f32 posZ = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'set_fov_shake_from_point_preset'"); return 0; }
set_fov_shake_from_point_preset(preset, posX, posY, posZ);
@@ -6771,7 +6772,7 @@ int smlua_func_set_handheld_shake(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 mode = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_handheld_shake'"); return 0; }
set_handheld_shake(mode);
@@ -6782,11 +6783,11 @@ int smlua_func_set_or_approach_f32_asymptotic(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 * dst = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_or_approach_f32_asymptotic'"); return 0; }
f32 goal = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_or_approach_f32_asymptotic'"); return 0; }
f32 scale = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_or_approach_f32_asymptotic'"); return 0; }
lua_pushinteger(L, set_or_approach_f32_asymptotic(dst, goal, scale));
@@ -6797,11 +6798,11 @@ int smlua_func_set_or_approach_s16_symmetric(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 * current = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_or_approach_s16_symmetric'"); return 0; }
s16 target = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_or_approach_s16_symmetric'"); return 0; }
s16 increment = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_or_approach_s16_symmetric'"); return 0; }
lua_pushinteger(L, set_or_approach_s16_symmetric(current, target, increment));
@@ -6816,19 +6817,19 @@ int smlua_func_set_or_approach_vec3f_asymptotic(lua_State* L) {
dst[0] = smlua_get_number_field(1, "x");
dst[1] = smlua_get_number_field(1, "y");
dst[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_or_approach_vec3f_asymptotic'"); return 0; }
f32* goal = smlua_get_vec3f_from_buffer();
goal[0] = smlua_get_number_field(2, "x");
goal[1] = smlua_get_number_field(2, "y");
goal[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_or_approach_vec3f_asymptotic'"); return 0; }
f32 xMul = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_or_approach_vec3f_asymptotic'"); return 0; }
f32 yMul = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'set_or_approach_vec3f_asymptotic'"); return 0; }
f32 zMul = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'set_or_approach_vec3f_asymptotic'"); return 0; }
set_or_approach_vec3f_asymptotic(dst, goal, xMul, yMul, zMul);
@@ -6847,19 +6848,19 @@ int smlua_func_set_pitch_shake_from_point(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 7)) { return 0; }
s16 mag = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_pitch_shake_from_point'"); return 0; }
s16 decay = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_pitch_shake_from_point'"); return 0; }
s16 inc = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_pitch_shake_from_point'"); return 0; }
f32 maxDist = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'set_pitch_shake_from_point'"); return 0; }
f32 posX = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'set_pitch_shake_from_point'"); return 0; }
f32 posY = smlua_to_number(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'set_pitch_shake_from_point'"); return 0; }
f32 posZ = smlua_to_number(L, 7);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7 for function 'set_pitch_shake_from_point'"); return 0; }
set_pitch_shake_from_point(mag, decay, inc, maxDist, posX, posY, posZ);
@@ -6874,13 +6875,13 @@ int smlua_func_shake_camera_handheld(lua_State* L) {
pos[0] = smlua_get_number_field(1, "x");
pos[1] = smlua_get_number_field(1, "y");
pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'shake_camera_handheld'"); return 0; }
f32* focus = smlua_get_vec3f_from_buffer();
focus[0] = smlua_get_number_field(2, "x");
focus[1] = smlua_get_number_field(2, "y");
focus[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'shake_camera_handheld'"); return 0; }
shake_camera_handheld(pos, focus);
@@ -6903,13 +6904,13 @@ int smlua_func_shake_camera_pitch(lua_State* L) {
pos[0] = smlua_get_number_field(1, "x");
pos[1] = smlua_get_number_field(1, "y");
pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'shake_camera_pitch'"); return 0; }
f32* focus = smlua_get_vec3f_from_buffer();
focus[0] = smlua_get_number_field(2, "x");
focus[1] = smlua_get_number_field(2, "y");
focus[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'shake_camera_pitch'"); return 0; }
shake_camera_pitch(pos, focus);
@@ -6928,7 +6929,7 @@ int smlua_func_shake_camera_roll(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 * roll = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'shake_camera_roll'"); return 0; }
shake_camera_roll(roll);
@@ -6943,13 +6944,13 @@ int smlua_func_shake_camera_yaw(lua_State* L) {
pos[0] = smlua_get_number_field(1, "x");
pos[1] = smlua_get_number_field(1, "y");
pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'shake_camera_yaw'"); return 0; }
f32* focus = smlua_get_vec3f_from_buffer();
focus[0] = smlua_get_number_field(2, "x");
focus[1] = smlua_get_number_field(2, "y");
focus[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'shake_camera_yaw'"); return 0; }
shake_camera_yaw(pos, focus);
@@ -6968,7 +6969,7 @@ int smlua_func_soft_reset_camera(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'soft_reset_camera'"); return 0; }
soft_reset_camera(c);
@@ -6979,9 +6980,9 @@ int smlua_func_start_cutscene(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'start_cutscene'"); return 0; }
u8 cutscene = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'start_cutscene'"); return 0; }
start_cutscene(c, cutscene);
@@ -6992,7 +6993,7 @@ int smlua_func_start_object_cutscene_without_focus(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 cutscene = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'start_object_cutscene_without_focus'"); return 0; }
lua_pushinteger(L, start_object_cutscene_without_focus(cutscene));
@@ -7003,9 +7004,9 @@ int smlua_func_transition_next_state(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'transition_next_state'"); return 0; }
s16 frames = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'transition_next_state'"); return 0; }
transition_next_state(c, frames);
@@ -7016,7 +7017,7 @@ int smlua_func_trigger_cutscene_dialog(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 trigger = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'trigger_cutscene_dialog'"); return 0; }
lua_pushinteger(L, trigger_cutscene_dialog(trigger));
@@ -7031,13 +7032,13 @@ int smlua_func_vec3f_sub(lua_State* L) {
dst[0] = smlua_get_number_field(1, "x");
dst[1] = smlua_get_number_field(1, "y");
dst[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_sub'"); return 0; }
f32* src = smlua_get_vec3f_from_buffer();
src[0] = smlua_get_number_field(2, "x");
src[1] = smlua_get_number_field(2, "y");
src[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_sub'"); return 0; }
vec3f_sub(dst, src);
@@ -7056,13 +7057,13 @@ int smlua_func_vec3f_to_object_pos(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_to_object_pos'"); return 0; }
f32* src = smlua_get_vec3f_from_buffer();
src[0] = smlua_get_number_field(2, "x");
src[1] = smlua_get_number_field(2, "y");
src[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_to_object_pos'"); return 0; }
vec3f_to_object_pos(o, src);
@@ -7077,11 +7078,11 @@ int smlua_func_warp_camera(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 displacementX = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'warp_camera'"); return 0; }
f32 displacementY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'warp_camera'"); return 0; }
f32 displacementZ = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'warp_camera'"); return 0; }
warp_camera(displacementX, displacementY, displacementZ);
@@ -7096,7 +7097,7 @@ int smlua_func_get_character(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_character'"); return 0; }
smlua_push_object(L, LOT_CHARACTER, get_character(m));
@@ -7107,7 +7108,7 @@ int smlua_func_get_character_anim_offset(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_character_anim_offset'"); return 0; }
lua_pushnumber(L, get_character_anim_offset(m));
@@ -7118,9 +7119,9 @@ int smlua_func_play_character_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_character_sound'"); return 0; }
int characterSound = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_character_sound'"); return 0; }
play_character_sound(m, characterSound);
@@ -7131,11 +7132,11 @@ int smlua_func_play_character_sound_if_no_flag(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_character_sound_if_no_flag'"); return 0; }
int characterSound = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_character_sound_if_no_flag'"); return 0; }
u32 flags = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_character_sound_if_no_flag'"); return 0; }
play_character_sound_if_no_flag(m, characterSound, flags);
@@ -7146,11 +7147,11 @@ int smlua_func_play_character_sound_offset(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_character_sound_offset'"); return 0; }
int characterSound = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_character_sound_offset'"); return 0; }
u32 offset = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_character_sound_offset'"); return 0; }
play_character_sound_offset(m, characterSound, offset);
@@ -7161,7 +7162,7 @@ int smlua_func_update_character_anim_offset(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_character_anim_offset'"); return 0; }
update_character_anim_offset(m);
@@ -7176,7 +7177,7 @@ int smlua_func_djui_chat_message_create(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const char* message = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_chat_message_create'"); return 0; }
djui_chat_message_create(message);
@@ -7245,7 +7246,7 @@ int smlua_func_djui_hud_measure_text(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const char* message = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_hud_measure_text'"); return 0; }
lua_pushnumber(L, djui_hud_measure_text(message));
@@ -7256,13 +7257,13 @@ int smlua_func_djui_hud_print_text(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
const char* message = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_hud_print_text'"); return 0; }
float x = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'djui_hud_print_text'"); return 0; }
float y = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'djui_hud_print_text'"); return 0; }
float scale = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'djui_hud_print_text'"); return 0; }
djui_hud_print_text(message, x, y, scale);
@@ -7273,13 +7274,13 @@ int smlua_func_djui_hud_render_rect(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
f32 x = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_hud_render_rect'"); return 0; }
f32 y = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'djui_hud_render_rect'"); return 0; }
f32 width = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'djui_hud_render_rect'"); return 0; }
f32 height = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'djui_hud_render_rect'"); return 0; }
djui_hud_render_rect(x, y, width, height);
@@ -7290,21 +7291,21 @@ int smlua_func_djui_hud_render_rect_interpolated(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 8)) { return 0; }
f32 prevX = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_hud_render_rect_interpolated'"); return 0; }
f32 prevY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'djui_hud_render_rect_interpolated'"); return 0; }
f32 prevWidth = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'djui_hud_render_rect_interpolated'"); return 0; }
f32 prevHeight = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'djui_hud_render_rect_interpolated'"); return 0; }
f32 x = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'djui_hud_render_rect_interpolated'"); return 0; }
f32 y = smlua_to_number(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'djui_hud_render_rect_interpolated'"); return 0; }
f32 width = smlua_to_number(L, 7);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7 for function 'djui_hud_render_rect_interpolated'"); return 0; }
f32 height = smlua_to_number(L, 8);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 8"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 8 for function 'djui_hud_render_rect_interpolated'"); return 0; }
djui_hud_render_rect_interpolated(prevX, prevY, prevWidth, prevHeight, x, y, width, height);
@@ -7315,13 +7316,13 @@ int smlua_func_djui_hud_set_color(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
u8 r = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_hud_set_color'"); return 0; }
u8 g = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'djui_hud_set_color'"); return 0; }
u8 b = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'djui_hud_set_color'"); return 0; }
u8 a = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'djui_hud_set_color'"); return 0; }
djui_hud_set_color(r, g, b, a);
@@ -7332,7 +7333,7 @@ int smlua_func_djui_hud_set_font(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
int fontType = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_hud_set_font'"); return 0; }
djui_hud_set_font(fontType);
@@ -7343,7 +7344,7 @@ int smlua_func_djui_hud_set_mouse_locked(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool locked = smlua_to_boolean(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_hud_set_mouse_locked'"); return 0; }
djui_hud_set_mouse_locked(locked);
@@ -7354,7 +7355,7 @@ int smlua_func_djui_hud_set_resolution(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
int resolutionType = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_hud_set_resolution'"); return 0; }
djui_hud_set_resolution(resolutionType);
@@ -7369,13 +7370,13 @@ int smlua_func_djui_hud_world_pos_to_screen_pos(lua_State* L) {
pos[0] = smlua_get_number_field(1, "x");
pos[1] = smlua_get_number_field(1, "y");
pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_hud_world_pos_to_screen_pos'"); return 0; }
f32* out = smlua_get_vec3f_from_buffer();
out[0] = smlua_get_number_field(2, "x");
out[1] = smlua_get_number_field(2, "y");
out[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'djui_hud_world_pos_to_screen_pos'"); return 0; }
djui_hud_world_pos_to_screen_pos(pos, out);
@@ -7398,9 +7399,9 @@ int smlua_func_djui_popup_create(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
const char* message = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'djui_popup_create'"); return 0; }
int lines = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'djui_popup_create'"); return 0; }
djui_popup_create(message, lines);
@@ -7415,11 +7416,11 @@ int smlua_func_fade_volume_scale(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
u8 player = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'fade_volume_scale'"); return 0; }
u8 targetScale = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'fade_volume_scale'"); return 0; }
u16 fadeDuration = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'fade_volume_scale'"); return 0; }
fade_volume_scale(player, targetScale, fadeDuration);
@@ -7430,9 +7431,9 @@ int smlua_func_fadeout_background_music(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
u16 arg0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'fadeout_background_music'"); return 0; }
u16 fadeOut = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'fadeout_background_music'"); return 0; }
fadeout_background_music(arg0, fadeOut);
@@ -7497,7 +7498,7 @@ int smlua_func_play_dialog_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 dialogID = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_dialog_sound'"); return 0; }
play_dialog_sound(dialogID);
@@ -7508,11 +7509,11 @@ int smlua_func_play_music(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
u8 player = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_music'"); return 0; }
u16 seqArgs = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_music'"); return 0; }
u16 fadeTimer = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_music'"); return 0; }
play_music(player, seqArgs, fadeTimer);
@@ -7532,7 +7533,7 @@ int smlua_func_play_power_star_jingle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 arg0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_power_star_jingle'"); return 0; }
play_power_star_jingle(arg0);
@@ -7561,13 +7562,13 @@ int smlua_func_play_secondary_music(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
u8 seqId = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_secondary_music'"); return 0; }
u8 bgMusicVolume = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_secondary_music'"); return 0; }
u8 volume = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_secondary_music'"); return 0; }
u16 fadeTimer = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'play_secondary_music'"); return 0; }
play_secondary_music(seqId, bgMusicVolume, volume, fadeTimer);
@@ -7578,13 +7579,13 @@ int smlua_func_play_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 soundBits = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_sound'"); return 0; }
f32* pos = smlua_get_vec3f_from_buffer();
pos[0] = smlua_get_number_field(2, "x");
pos[1] = smlua_get_number_field(2, "y");
pos[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_sound'"); return 0; }
play_sound(soundBits, pos);
@@ -7599,15 +7600,15 @@ int smlua_func_play_sound_with_freq_scale(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 soundBits = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_sound_with_freq_scale'"); return 0; }
f32* pos = smlua_get_vec3f_from_buffer();
pos[0] = smlua_get_number_field(2, "x");
pos[1] = smlua_get_number_field(2, "y");
pos[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_sound_with_freq_scale'"); return 0; }
f32 freqScale = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_sound_with_freq_scale'"); return 0; }
play_sound_with_freq_scale(soundBits, pos, freqScale);
@@ -7640,9 +7641,9 @@ int smlua_func_seq_player_fade_out(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
u8 player = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'seq_player_fade_out'"); return 0; }
u16 fadeDuration = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'seq_player_fade_out'"); return 0; }
seq_player_fade_out(player, fadeDuration);
@@ -7653,11 +7654,11 @@ int smlua_func_seq_player_lower_volume(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
u8 player = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'seq_player_lower_volume'"); return 0; }
u16 fadeDuration = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'seq_player_lower_volume'"); return 0; }
u8 percentage = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'seq_player_lower_volume'"); return 0; }
seq_player_lower_volume(player, fadeDuration, percentage);
@@ -7668,9 +7669,9 @@ int smlua_func_seq_player_unlower_volume(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
u8 player = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'seq_player_unlower_volume'"); return 0; }
u16 fadeDuration = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'seq_player_unlower_volume'"); return 0; }
seq_player_unlower_volume(player, fadeDuration);
@@ -7685,7 +7686,7 @@ int smlua_func_does_mario_have_normal_cap_on_head(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'does_mario_have_normal_cap_on_head'"); return 0; }
lua_pushinteger(L, does_mario_have_normal_cap_on_head(m));
@@ -7696,7 +7697,7 @@ int smlua_func_get_door_save_file_flag(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* door = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_door_save_file_flag'"); return 0; }
lua_pushinteger(L, get_door_save_file_flag(door));
@@ -7707,11 +7708,11 @@ int smlua_func_interact_damage(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'interact_damage'"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'interact_damage'"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'interact_damage'"); return 0; }
lua_pushinteger(L, interact_damage(m, interactType, o));
@@ -7722,9 +7723,9 @@ int smlua_func_mario_blow_off_cap(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_blow_off_cap'"); return 0; }
f32 capSpeed = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_blow_off_cap'"); return 0; }
mario_blow_off_cap(m, capSpeed);
@@ -7735,7 +7736,7 @@ int smlua_func_mario_check_object_grab(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_check_object_grab'"); return 0; }
lua_pushinteger(L, mario_check_object_grab(m));
@@ -7746,7 +7747,7 @@ int smlua_func_mario_drop_held_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_drop_held_object'"); return 0; }
mario_drop_held_object(m);
@@ -7757,9 +7758,9 @@ int smlua_func_mario_get_collided_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_get_collided_object'"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_get_collided_object'"); return 0; }
smlua_push_object(L, LOT_OBJECT, mario_get_collided_object(m, interactType));
@@ -7770,7 +7771,7 @@ int smlua_func_mario_grab_used_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_grab_used_object'"); return 0; }
mario_grab_used_object(m);
@@ -7781,9 +7782,9 @@ int smlua_func_mario_lose_cap_to_enemy(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_lose_cap_to_enemy'"); return 0; }
u32 arg = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_lose_cap_to_enemy'"); return 0; }
lua_pushinteger(L, mario_lose_cap_to_enemy(m, arg));
@@ -7794,9 +7795,9 @@ int smlua_func_mario_obj_angle_to_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_obj_angle_to_object'"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_obj_angle_to_object'"); return 0; }
lua_pushinteger(L, mario_obj_angle_to_object(m, o));
@@ -7807,7 +7808,7 @@ int smlua_func_mario_retrieve_cap(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_retrieve_cap'"); return 0; }
mario_retrieve_cap(m);
@@ -7818,7 +7819,7 @@ int smlua_func_mario_stop_riding_and_holding(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_stop_riding_and_holding'"); return 0; }
mario_stop_riding_and_holding(m);
@@ -7829,7 +7830,7 @@ int smlua_func_mario_stop_riding_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_stop_riding_object'"); return 0; }
mario_stop_riding_object(m);
@@ -7840,7 +7841,7 @@ int smlua_func_mario_throw_held_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_throw_held_object'"); return 0; }
mario_throw_held_object(m);
@@ -7851,9 +7852,9 @@ int smlua_func_passes_pvp_interaction_checks(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* attacker = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'passes_pvp_interaction_checks'"); return 0; }
struct MarioState* victim = (struct MarioState*)smlua_to_cobject(L, 2, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'passes_pvp_interaction_checks'"); return 0; }
lua_pushinteger(L, passes_pvp_interaction_checks(attacker, victim));
@@ -7864,9 +7865,9 @@ int smlua_func_take_damage_and_knock_back(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'take_damage_and_knock_back'"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'take_damage_and_knock_back'"); return 0; }
lua_pushinteger(L, take_damage_and_knock_back(m, o));
@@ -7881,11 +7882,11 @@ int smlua_func_get_level_name(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 courseNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_level_name'"); return 0; }
s16 levelNum = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_level_name'"); return 0; }
s16 areaIndex = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'get_level_name'"); return 0; }
lua_pushstring(L, get_level_name(courseNum, levelNum, areaIndex));
@@ -7896,13 +7897,13 @@ int smlua_func_get_level_name_ascii(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s16 courseNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_level_name_ascii'"); return 0; }
s16 levelNum = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_level_name_ascii'"); return 0; }
s16 areaIndex = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'get_level_name_ascii'"); return 0; }
s16 charCase = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'get_level_name_ascii'"); return 0; }
lua_pushstring(L, get_level_name_ascii(courseNum, levelNum, areaIndex, charCase));
@@ -7913,13 +7914,13 @@ int smlua_func_get_level_name_sm64(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s16 courseNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_level_name_sm64'"); return 0; }
s16 levelNum = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_level_name_sm64'"); return 0; }
s16 areaIndex = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'get_level_name_sm64'"); return 0; }
s16 charCase = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'get_level_name_sm64'"); return 0; }
smlua_push_pointer(L, LVT_U8_P, (void*)get_level_name_sm64(courseNum, levelNum, areaIndex, charCase));
@@ -7930,9 +7931,9 @@ int smlua_func_get_star_name(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 courseNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_star_name'"); return 0; }
s16 starNum = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_star_name'"); return 0; }
lua_pushstring(L, get_star_name(courseNum, starNum));
@@ -7943,11 +7944,11 @@ int smlua_func_get_star_name_ascii(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 courseNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_star_name_ascii'"); return 0; }
s16 starNum = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_star_name_ascii'"); return 0; }
s16 charCase = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'get_star_name_ascii'"); return 0; }
lua_pushstring(L, get_star_name_ascii(courseNum, starNum, charCase));
@@ -7958,11 +7959,11 @@ int smlua_func_get_star_name_sm64(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 courseNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_star_name_sm64'"); return 0; }
s16 starNum = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_star_name_sm64'"); return 0; }
s16 charCase = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'get_star_name_sm64'"); return 0; }
smlua_push_pointer(L, LVT_U8_P, (void*)get_star_name_sm64(courseNum, starNum, charCase));
@@ -7977,7 +7978,7 @@ int smlua_func_adjust_sound_for_speed(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'adjust_sound_for_speed'"); return 0; }
adjust_sound_for_speed(m);
@@ -7988,7 +7989,7 @@ int smlua_func_check_common_action_exits(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_common_action_exits'"); return 0; }
lua_pushinteger(L, check_common_action_exits(m));
@@ -7999,7 +8000,7 @@ int smlua_func_check_common_hold_action_exits(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_common_hold_action_exits'"); return 0; }
lua_pushinteger(L, check_common_hold_action_exits(m));
@@ -8010,11 +8011,11 @@ int smlua_func_drop_and_set_mario_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'drop_and_set_mario_action'"); return 0; }
u32 action = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'drop_and_set_mario_action'"); return 0; }
u32 actionArg = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'drop_and_set_mario_action'"); return 0; }
lua_pushinteger(L, drop_and_set_mario_action(m, action, actionArg));
@@ -8025,7 +8026,7 @@ int smlua_func_execute_mario_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'execute_mario_action'"); return 0; }
lua_pushinteger(L, execute_mario_action(o));
@@ -8036,11 +8037,11 @@ int smlua_func_find_floor_height_relative_polar(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_floor_height_relative_polar'"); return 0; }
s16 angleFromMario = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_floor_height_relative_polar'"); return 0; }
f32 distFromMario = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'find_floor_height_relative_polar'"); return 0; }
lua_pushnumber(L, find_floor_height_relative_polar(m, angleFromMario, distFromMario));
@@ -8051,9 +8052,9 @@ int smlua_func_find_floor_slope(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_floor_slope'"); return 0; }
s16 yawOffset = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_floor_slope'"); return 0; }
lua_pushinteger(L, find_floor_slope(m, yawOffset));
@@ -8064,15 +8065,15 @@ int smlua_func_find_mario_anim_flags_and_translation(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_mario_anim_flags_and_translation'"); return 0; }
s32 yaw = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_mario_anim_flags_and_translation'"); return 0; }
s16* translation = smlua_get_vec3s_from_buffer();
translation[0] = smlua_get_integer_field(3, "x");
translation[1] = smlua_get_integer_field(3, "y");
translation[2] = smlua_get_integer_field(3, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'find_mario_anim_flags_and_translation'"); return 0; }
lua_pushinteger(L, find_mario_anim_flags_and_translation(o, yaw, translation));
@@ -8087,7 +8088,7 @@ int smlua_func_force_idle_state(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'force_idle_state'"); return 0; }
lua_pushinteger(L, force_idle_state(m));
@@ -8098,13 +8099,13 @@ int smlua_func_hurt_and_set_mario_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'hurt_and_set_mario_action'"); return 0; }
u32 action = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'hurt_and_set_mario_action'"); return 0; }
u32 actionArg = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'hurt_and_set_mario_action'"); return 0; }
s16 hurtCounter = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'hurt_and_set_mario_action'"); return 0; }
lua_pushinteger(L, hurt_and_set_mario_action(m, action, actionArg, hurtCounter));
@@ -8115,7 +8116,7 @@ int smlua_func_init_single_mario(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'init_single_mario'"); return 0; }
init_single_mario(m);
@@ -8126,7 +8127,7 @@ int smlua_func_is_anim_at_end(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_anim_at_end'"); return 0; }
lua_pushinteger(L, is_anim_at_end(m));
@@ -8137,7 +8138,7 @@ int smlua_func_is_anim_past_end(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_anim_past_end'"); return 0; }
lua_pushinteger(L, is_anim_past_end(m));
@@ -8148,9 +8149,9 @@ int smlua_func_is_anim_past_frame(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_anim_past_frame'"); return 0; }
s16 animFrame = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'is_anim_past_frame'"); return 0; }
lua_pushinteger(L, is_anim_past_frame(m, animFrame));
@@ -8161,7 +8162,7 @@ int smlua_func_mario_can_bubble(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_can_bubble'"); return 0; }
lua_pushboolean(L, mario_can_bubble(m));
@@ -8172,9 +8173,9 @@ int smlua_func_mario_facing_downhill(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_facing_downhill'"); return 0; }
s32 turnYaw = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_facing_downhill'"); return 0; }
lua_pushinteger(L, mario_facing_downhill(m, turnYaw));
@@ -8185,7 +8186,7 @@ int smlua_func_mario_floor_is_slippery(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_floor_is_slippery'"); return 0; }
lua_pushinteger(L, mario_floor_is_slippery(m));
@@ -8196,7 +8197,7 @@ int smlua_func_mario_floor_is_slope(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_floor_is_slope'"); return 0; }
lua_pushinteger(L, mario_floor_is_slope(m));
@@ -8207,7 +8208,7 @@ int smlua_func_mario_floor_is_steep(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_floor_is_steep'"); return 0; }
lua_pushinteger(L, mario_floor_is_steep(m));
@@ -8218,7 +8219,7 @@ int smlua_func_mario_get_floor_class(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_get_floor_class'"); return 0; }
lua_pushinteger(L, mario_get_floor_class(m));
@@ -8229,7 +8230,7 @@ int smlua_func_mario_get_terrain_sound_addend(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_get_terrain_sound_addend'"); return 0; }
lua_pushinteger(L, mario_get_terrain_sound_addend(m));
@@ -8240,7 +8241,7 @@ int smlua_func_mario_set_bubbled(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_set_bubbled'"); return 0; }
mario_set_bubbled(m);
@@ -8251,9 +8252,9 @@ int smlua_func_mario_set_forward_vel(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_set_forward_vel'"); return 0; }
f32 speed = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_set_forward_vel'"); return 0; }
mario_set_forward_vel(m, speed);
@@ -8264,9 +8265,9 @@ int smlua_func_mario_update_wall(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_update_wall'"); return 0; }
struct WallCollisionData* wcd = (struct WallCollisionData*)smlua_to_cobject(L, 2, LOT_WALLCOLLISIONDATA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_update_wall'"); return 0; }
mario_update_wall(m, wcd);
@@ -8277,11 +8278,11 @@ int smlua_func_play_mario_action_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_mario_action_sound'"); return 0; }
u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_mario_action_sound'"); return 0; }
u32 waveParticleType = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_mario_action_sound'"); return 0; }
play_mario_action_sound(m, soundBits, waveParticleType);
@@ -8292,9 +8293,9 @@ int smlua_func_play_mario_heavy_landing_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_mario_heavy_landing_sound'"); return 0; }
u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_mario_heavy_landing_sound'"); return 0; }
play_mario_heavy_landing_sound(m, soundBits);
@@ -8305,9 +8306,9 @@ int smlua_func_play_mario_heavy_landing_sound_once(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_mario_heavy_landing_sound_once'"); return 0; }
u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_mario_heavy_landing_sound_once'"); return 0; }
play_mario_heavy_landing_sound_once(m, soundBits);
@@ -8318,7 +8319,7 @@ int smlua_func_play_mario_jump_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_mario_jump_sound'"); return 0; }
play_mario_jump_sound(m);
@@ -8329,9 +8330,9 @@ int smlua_func_play_mario_landing_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_mario_landing_sound'"); return 0; }
u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_mario_landing_sound'"); return 0; }
play_mario_landing_sound(m, soundBits);
@@ -8342,9 +8343,9 @@ int smlua_func_play_mario_landing_sound_once(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_mario_landing_sound_once'"); return 0; }
u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_mario_landing_sound_once'"); return 0; }
play_mario_landing_sound_once(m, soundBits);
@@ -8355,11 +8356,11 @@ int smlua_func_play_mario_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_mario_sound'"); return 0; }
s32 primarySoundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_mario_sound'"); return 0; }
s32 scondarySoundBits = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_mario_sound'"); return 0; }
play_mario_sound(m, primarySoundBits, scondarySoundBits);
@@ -8370,11 +8371,11 @@ int smlua_func_play_sound_and_spawn_particles(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_sound_and_spawn_particles'"); return 0; }
u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_sound_and_spawn_particles'"); return 0; }
u32 waveParticleType = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_sound_and_spawn_particles'"); return 0; }
play_sound_and_spawn_particles(m, soundBits, waveParticleType);
@@ -8385,11 +8386,11 @@ int smlua_func_play_sound_if_no_flag(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_sound_if_no_flag'"); return 0; }
u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_sound_if_no_flag'"); return 0; }
u32 flags = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_sound_if_no_flag'"); return 0; }
play_sound_if_no_flag(m, soundBits, flags);
@@ -8397,6 +8398,29 @@ int smlua_func_play_sound_if_no_flag(lua_State* L) {
}
int smlua_func_resolve_and_return_wall_collisions(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+
+ f32* pos = smlua_get_vec3f_from_buffer();
+ pos[0] = smlua_get_number_field(1, "x");
+ pos[1] = smlua_get_number_field(1, "y");
+ pos[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'resolve_and_return_wall_collisions'"); return 0; }
+ f32 offset = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'resolve_and_return_wall_collisions'"); return 0; }
+ f32 radius = smlua_to_number(L, 3);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'resolve_and_return_wall_collisions'"); return 0; }
+
+ smlua_push_object(L, LOT_SURFACE, resolve_and_return_wall_collisions(pos, offset, radius));
+
+ smlua_push_number_field(1, "x", pos[0]);
+ smlua_push_number_field(1, "y", pos[1]);
+ smlua_push_number_field(1, "z", pos[2]);
+
+ return 1;
+}
+
+int smlua_func_resolve_and_return_wall_collisions_data(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
@@ -8404,15 +8428,15 @@ int smlua_func_resolve_and_return_wall_collisions(lua_State* L) {
pos[0] = smlua_get_number_field(1, "x");
pos[1] = smlua_get_number_field(1, "y");
pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'resolve_and_return_wall_collisions_data'"); return 0; }
f32 offset = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'resolve_and_return_wall_collisions_data'"); return 0; }
f32 radius = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'resolve_and_return_wall_collisions_data'"); return 0; }
struct WallCollisionData* collisionData = (struct WallCollisionData*)smlua_to_cobject(L, 4, LOT_WALLCOLLISIONDATA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'resolve_and_return_wall_collisions_data'"); return 0; }
- resolve_and_return_wall_collisions(pos, offset, radius, collisionData);
+ resolve_and_return_wall_collisions_data(pos, offset, radius, collisionData);
smlua_push_number_field(1, "x", pos[0]);
smlua_push_number_field(1, "y", pos[1]);
@@ -8425,7 +8449,7 @@ int smlua_func_return_mario_anim_y_translation(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'return_mario_anim_y_translation'"); return 0; }
lua_pushinteger(L, return_mario_anim_y_translation(m));
@@ -8436,9 +8460,9 @@ int smlua_func_set_anim_to_frame(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_anim_to_frame'"); return 0; }
s16 animFrame = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_anim_to_frame'"); return 0; }
set_anim_to_frame(m, animFrame);
@@ -8449,7 +8473,7 @@ int smlua_func_set_jump_from_landing(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_jump_from_landing'"); return 0; }
lua_pushinteger(L, set_jump_from_landing(m));
@@ -8460,11 +8484,11 @@ int smlua_func_set_jumping_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_jumping_action'"); return 0; }
u32 action = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_jumping_action'"); return 0; }
u32 actionArg = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_jumping_action'"); return 0; }
lua_pushinteger(L, set_jumping_action(m, action, actionArg));
@@ -8475,11 +8499,11 @@ int smlua_func_set_mario_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_mario_action'"); return 0; }
u32 action = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_mario_action'"); return 0; }
u32 actionArg = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_mario_action'"); return 0; }
lua_pushinteger(L, set_mario_action(m, action, actionArg));
@@ -8490,11 +8514,11 @@ int smlua_func_set_mario_anim_with_accel(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_mario_anim_with_accel'"); return 0; }
s32 targetAnimID = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_mario_anim_with_accel'"); return 0; }
s32 accel = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_mario_anim_with_accel'"); return 0; }
lua_pushinteger(L, set_mario_anim_with_accel(m, targetAnimID, accel));
@@ -8505,9 +8529,9 @@ int smlua_func_set_mario_animation(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_mario_animation'"); return 0; }
s32 targetAnimID = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_mario_animation'"); return 0; }
lua_pushinteger(L, set_mario_animation(m, targetAnimID));
@@ -8518,11 +8542,11 @@ int smlua_func_set_mario_particle_flags(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_mario_particle_flags'"); return 0; }
u32 flags = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_mario_particle_flags'"); return 0; }
u8 clear = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_mario_particle_flags'"); return 0; }
set_mario_particle_flags(m, flags, clear);
@@ -8533,11 +8557,11 @@ int smlua_func_set_mario_y_vel_based_on_fspeed(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_mario_y_vel_based_on_fspeed'"); return 0; }
f32 initialVelY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_mario_y_vel_based_on_fspeed'"); return 0; }
f32 multiplier = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_mario_y_vel_based_on_fspeed'"); return 0; }
set_mario_y_vel_based_on_fspeed(m, initialVelY, multiplier);
@@ -8548,7 +8572,7 @@ int smlua_func_set_steep_jump_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_steep_jump_action'"); return 0; }
set_steep_jump_action(m);
@@ -8559,7 +8583,7 @@ int smlua_func_set_water_plunge_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_water_plunge_action'"); return 0; }
lua_pushinteger(L, set_water_plunge_action(m));
@@ -8570,7 +8594,7 @@ int smlua_func_transition_submerged_to_walking(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'transition_submerged_to_walking'"); return 0; }
lua_pushinteger(L, transition_submerged_to_walking(m));
@@ -8581,7 +8605,7 @@ int smlua_func_update_mario_pos_for_anim(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_mario_pos_for_anim'"); return 0; }
update_mario_pos_for_anim(m);
@@ -8592,7 +8616,7 @@ int smlua_func_update_mario_sound_and_camera(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_mario_sound_and_camera'"); return 0; }
update_mario_sound_and_camera(m);
@@ -8608,11 +8632,11 @@ int smlua_func_vec3f_find_ceil(lua_State* L) {
pos[0] = smlua_get_number_field(1, "x");
pos[1] = smlua_get_number_field(1, "y");
pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_find_ceil'"); return 0; }
f32 height = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_find_ceil'"); return 0; }
// struct Surface** ceil = (struct Surface**)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3f_find_ceil'"); return 0; }
lua_pushnumber(L, vec3f_find_ceil(pos, height, ceil));
@@ -8633,11 +8657,11 @@ int smlua_func_vec3f_mario_ceil(lua_State* L) {
pos[0] = smlua_get_number_field(1, "x");
pos[1] = smlua_get_number_field(1, "y");
pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_mario_ceil'"); return 0; }
f32 height = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_mario_ceil'"); return 0; }
// struct Surface** ceil = (struct Surface**)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3f_mario_ceil'"); return 0; }
lua_pushnumber(L, vec3f_mario_ceil(pos, height, ceil));
@@ -8657,7 +8681,7 @@ int smlua_func_check_common_airborne_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_common_airborne_cancels'"); return 0; }
extern s32 check_common_airborne_cancels(struct MarioState *m);
lua_pushinteger(L, check_common_airborne_cancels(m));
@@ -8669,9 +8693,9 @@ int smlua_func_check_fall_damage(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_fall_damage'"); return 0; }
u32 hardFallAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'check_fall_damage'"); return 0; }
extern s32 check_fall_damage(struct MarioState *m, u32 hardFallAction);
lua_pushinteger(L, check_fall_damage(m, hardFallAction));
@@ -8683,9 +8707,9 @@ int smlua_func_check_fall_damage_or_get_stuck(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_fall_damage_or_get_stuck'"); return 0; }
u32 hardFallAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'check_fall_damage_or_get_stuck'"); return 0; }
extern s32 check_fall_damage_or_get_stuck(struct MarioState *m, u32 hardFallAction);
lua_pushinteger(L, check_fall_damage_or_get_stuck(m, hardFallAction));
@@ -8697,7 +8721,7 @@ int smlua_func_check_horizontal_wind(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_horizontal_wind'"); return 0; }
extern s32 check_horizontal_wind(struct MarioState *m);
lua_pushinteger(L, check_horizontal_wind(m));
@@ -8709,7 +8733,7 @@ int smlua_func_check_kick_or_dive_in_air(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_kick_or_dive_in_air'"); return 0; }
extern s32 check_kick_or_dive_in_air(struct MarioState *m);
lua_pushinteger(L, check_kick_or_dive_in_air(m));
@@ -8721,7 +8745,7 @@ int smlua_func_check_wall_kick(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_wall_kick'"); return 0; }
extern s32 check_wall_kick(struct MarioState *m);
lua_pushinteger(L, check_wall_kick(m));
@@ -8733,13 +8757,13 @@ int smlua_func_common_air_action_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'common_air_action_step'"); return 0; }
u32 landAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'common_air_action_step'"); return 0; }
s32 animation = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'common_air_action_step'"); return 0; }
u32 stepArg = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'common_air_action_step'"); return 0; }
extern u32 common_air_action_step(struct MarioState *m, u32 landAction, s32 animation, u32 stepArg);
lua_pushinteger(L, common_air_action_step(m, landAction, animation, stepArg));
@@ -8751,15 +8775,15 @@ int smlua_func_common_air_knockback_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'common_air_knockback_step'"); return 0; }
u32 landAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'common_air_knockback_step'"); return 0; }
u32 hardFallAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'common_air_knockback_step'"); return 0; }
s32 animation = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'common_air_knockback_step'"); return 0; }
f32 speed = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'common_air_knockback_step'"); return 0; }
extern u32 common_air_knockback_step(struct MarioState *m, u32 landAction, u32 hardFallAction, s32 animation, f32 speed);
lua_pushinteger(L, common_air_knockback_step(m, landAction, hardFallAction, animation, speed));
@@ -8771,7 +8795,7 @@ int smlua_func_lava_boost_on_wall(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'lava_boost_on_wall'"); return 0; }
extern s32 lava_boost_on_wall(struct MarioState *m);
lua_pushinteger(L, lava_boost_on_wall(m));
@@ -8783,7 +8807,7 @@ int smlua_func_mario_execute_airborne_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_execute_airborne_action'"); return 0; }
extern s32 mario_execute_airborne_action(struct MarioState *m);
lua_pushinteger(L, mario_execute_airborne_action(m));
@@ -8795,7 +8819,7 @@ int smlua_func_play_far_fall_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_far_fall_sound'"); return 0; }
extern void play_far_fall_sound(struct MarioState *m);
play_far_fall_sound(m);
@@ -8807,13 +8831,13 @@ int smlua_func_play_flip_sounds(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_flip_sounds'"); return 0; }
s16 frame1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_flip_sounds'"); return 0; }
s16 frame2 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_flip_sounds'"); return 0; }
s16 frame3 = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'play_flip_sounds'"); return 0; }
extern void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3);
play_flip_sounds(m, frame1, frame2, frame3);
@@ -8825,7 +8849,7 @@ int smlua_func_play_knockback_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_knockback_sound'"); return 0; }
extern void play_knockback_sound(struct MarioState *m);
play_knockback_sound(m);
@@ -8837,7 +8861,7 @@ int smlua_func_should_get_stuck_in_ground(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'should_get_stuck_in_ground'"); return 0; }
extern s32 should_get_stuck_in_ground(struct MarioState *m);
lua_pushinteger(L, should_get_stuck_in_ground(m));
@@ -8849,7 +8873,7 @@ int smlua_func_update_air_with_turn(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_air_with_turn'"); return 0; }
extern void update_air_with_turn(struct MarioState *m);
update_air_with_turn(m);
@@ -8861,7 +8885,7 @@ int smlua_func_update_air_without_turn(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_air_without_turn'"); return 0; }
extern void update_air_without_turn(struct MarioState *m);
update_air_without_turn(m);
@@ -8873,7 +8897,7 @@ int smlua_func_update_flying(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_flying'"); return 0; }
extern void update_flying(struct MarioState *m);
update_flying(m);
@@ -8885,7 +8909,7 @@ int smlua_func_update_flying_pitch(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_flying_pitch'"); return 0; }
extern void update_flying_pitch(struct MarioState *m);
update_flying_pitch(m);
@@ -8897,7 +8921,7 @@ int smlua_func_update_flying_yaw(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_flying_yaw'"); return 0; }
extern void update_flying_yaw(struct MarioState *m);
update_flying_yaw(m);
@@ -8909,7 +8933,7 @@ int smlua_func_update_lava_boost_or_twirling(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_lava_boost_or_twirling'"); return 0; }
extern void update_lava_boost_or_twirling(struct MarioState *m);
update_lava_boost_or_twirling(m);
@@ -8925,7 +8949,7 @@ int smlua_func_add_tree_leaf_particles(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'add_tree_leaf_particles'"); return 0; }
extern void add_tree_leaf_particles(struct MarioState *m);
add_tree_leaf_particles(m);
@@ -8937,7 +8961,7 @@ int smlua_func_check_common_automatic_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_common_automatic_cancels'"); return 0; }
extern s32 check_common_automatic_cancels(struct MarioState *m);
lua_pushinteger(L, check_common_automatic_cancels(m));
@@ -8949,7 +8973,7 @@ int smlua_func_climb_up_ledge(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'climb_up_ledge'"); return 0; }
extern void climb_up_ledge(struct MarioState *m);
climb_up_ledge(m);
@@ -8961,7 +8985,7 @@ int smlua_func_let_go_of_ledge(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'let_go_of_ledge'"); return 0; }
extern s32 let_go_of_ledge(struct MarioState *m);
lua_pushinteger(L, let_go_of_ledge(m));
@@ -8973,7 +8997,7 @@ int smlua_func_mario_execute_automatic_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_execute_automatic_action'"); return 0; }
extern s32 mario_execute_automatic_action(struct MarioState *m);
lua_pushinteger(L, mario_execute_automatic_action(m));
@@ -8985,13 +9009,13 @@ int smlua_func_perform_hanging_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'perform_hanging_step'"); return 0; }
f32* nextPos = smlua_get_vec3f_from_buffer();
nextPos[0] = smlua_get_number_field(2, "x");
nextPos[1] = smlua_get_number_field(2, "y");
nextPos[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'perform_hanging_step'"); return 0; }
extern s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos);
lua_pushinteger(L, perform_hanging_step(m, nextPos));
@@ -9007,9 +9031,9 @@ int smlua_func_play_climbing_sounds(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_climbing_sounds'"); return 0; }
s32 b = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_climbing_sounds'"); return 0; }
extern void play_climbing_sounds(struct MarioState *m, s32 b);
play_climbing_sounds(m, b);
@@ -9021,9 +9045,9 @@ int smlua_func_set_pole_position(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_pole_position'"); return 0; }
f32 offsetY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_pole_position'"); return 0; }
extern s32 set_pole_position(struct MarioState *m, f32 offsetY);
lua_pushinteger(L, set_pole_position(m, offsetY));
@@ -9035,7 +9059,7 @@ int smlua_func_update_hang_moving(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_hang_moving'"); return 0; }
extern s32 update_hang_moving(struct MarioState *m);
lua_pushinteger(L, update_hang_moving(m));
@@ -9047,7 +9071,7 @@ int smlua_func_update_hang_stationary(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_hang_stationary'"); return 0; }
extern void update_hang_stationary(struct MarioState *m);
update_hang_stationary(m);
@@ -9059,11 +9083,11 @@ int smlua_func_update_ledge_climb(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_ledge_climb'"); return 0; }
s32 animation = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'update_ledge_climb'"); return 0; }
u32 endAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'update_ledge_climb'"); return 0; }
extern void update_ledge_climb(struct MarioState *m, s32 animation, u32 endAction);
update_ledge_climb(m, animation, endAction);
@@ -9075,7 +9099,7 @@ int smlua_func_update_ledge_climb_camera(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_ledge_climb_camera'"); return 0; }
extern void update_ledge_climb_camera(struct MarioState *m);
update_ledge_climb_camera(m);
@@ -9111,11 +9135,11 @@ int smlua_func_common_death_handler(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'common_death_handler'"); return 0; }
s32 animation = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'common_death_handler'"); return 0; }
s32 frameToDeathWarp = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'common_death_handler'"); return 0; }
extern s32 common_death_handler(struct MarioState *m, s32 animation, s32 frameToDeathWarp);
lua_pushinteger(L, common_death_handler(m, animation, frameToDeathWarp));
@@ -9127,7 +9151,7 @@ int smlua_func_cutscene_put_cap_on(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cutscene_put_cap_on'"); return 0; }
extern void cutscene_put_cap_on(struct MarioState *m);
cutscene_put_cap_on(m);
@@ -9139,7 +9163,7 @@ int smlua_func_cutscene_take_cap_off(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cutscene_take_cap_off'"); return 0; }
extern void cutscene_take_cap_off(struct MarioState *m);
cutscene_take_cap_off(m);
@@ -9151,9 +9175,9 @@ int smlua_func_general_star_dance_handler(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'general_star_dance_handler'"); return 0; }
s32 isInWater = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'general_star_dance_handler'"); return 0; }
extern void general_star_dance_handler(struct MarioState *m, s32 isInWater);
general_star_dance_handler(m, isInWater);
@@ -9165,13 +9189,13 @@ int smlua_func_generate_yellow_sparkles(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s16 x = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'generate_yellow_sparkles'"); return 0; }
s16 y = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'generate_yellow_sparkles'"); return 0; }
s16 z = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'generate_yellow_sparkles'"); return 0; }
f32 radius = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'generate_yellow_sparkles'"); return 0; }
extern void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius);
generate_yellow_sparkles(x, y, z, radius);
@@ -9184,7 +9208,7 @@ int smlua_func_get_credits_str_width(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
// char * str = (char *)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_credits_str_width'"); return 0; }
extern s32 get_credits_str_width(char *str);
lua_pushinteger(L, get_credits_str_width(str));
@@ -9197,7 +9221,7 @@ int smlua_func_get_star_collection_dialog(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_star_collection_dialog'"); return 0; }
extern s32 get_star_collection_dialog(struct MarioState *m);
lua_pushinteger(L, get_star_collection_dialog(m));
@@ -9209,7 +9233,7 @@ int smlua_func_handle_save_menu(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'handle_save_menu'"); return 0; }
extern void handle_save_menu(struct MarioState *m);
handle_save_menu(m);
@@ -9221,13 +9245,13 @@ int smlua_func_launch_mario_until_land(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'launch_mario_until_land'"); return 0; }
s32 endAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'launch_mario_until_land'"); return 0; }
s32 animation = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'launch_mario_until_land'"); return 0; }
f32 forwardVel = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'launch_mario_until_land'"); return 0; }
extern s32 launch_mario_until_land(struct MarioState *m, s32 endAction, s32 animation, f32 forwardVel);
lua_pushinteger(L, launch_mario_until_land(m, endAction, animation, forwardVel));
@@ -9239,7 +9263,7 @@ int smlua_func_mario_execute_cutscene_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_execute_cutscene_action'"); return 0; }
extern s32 mario_execute_cutscene_action(struct MarioState *m);
lua_pushinteger(L, mario_execute_cutscene_action(m));
@@ -9251,7 +9275,7 @@ int smlua_func_mario_ready_to_speak(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_ready_to_speak'"); return 0; }
extern s32 mario_ready_to_speak(struct MarioState* m);
lua_pushinteger(L, mario_ready_to_speak(m));
@@ -9273,9 +9297,9 @@ int smlua_func_should_start_or_continue_dialog(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'should_start_or_continue_dialog'"); return 0; }
struct Object* object = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'should_start_or_continue_dialog'"); return 0; }
extern u8 should_start_or_continue_dialog(struct MarioState* m, struct Object* object);
lua_pushinteger(L, should_start_or_continue_dialog(m, object));
@@ -9287,17 +9311,17 @@ int smlua_func_stuck_in_ground_handler(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'stuck_in_ground_handler'"); return 0; }
s32 animation = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'stuck_in_ground_handler'"); return 0; }
s32 unstuckFrame = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'stuck_in_ground_handler'"); return 0; }
s32 target2 = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'stuck_in_ground_handler'"); return 0; }
s32 target3 = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'stuck_in_ground_handler'"); return 0; }
s32 endAction = smlua_to_integer(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'stuck_in_ground_handler'"); return 0; }
extern void stuck_in_ground_handler(struct MarioState *m, s32 animation, s32 unstuckFrame, s32 target2, s32 target3, s32 endAction);
stuck_in_ground_handler(m, animation, unstuckFrame, target2, target3, endAction);
@@ -9313,7 +9337,7 @@ int smlua_func_align_with_floor(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'align_with_floor'"); return 0; }
extern void align_with_floor(struct MarioState *m);
align_with_floor(m);
@@ -9325,7 +9349,7 @@ int smlua_func_analog_stick_held_back(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'analog_stick_held_back'"); return 0; }
extern s32 analog_stick_held_back(struct MarioState *m);
lua_pushinteger(L, analog_stick_held_back(m));
@@ -9337,7 +9361,7 @@ int smlua_func_anim_and_audio_for_heavy_walk(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'anim_and_audio_for_heavy_walk'"); return 0; }
extern void anim_and_audio_for_heavy_walk(struct MarioState *m);
anim_and_audio_for_heavy_walk(m);
@@ -9349,7 +9373,7 @@ int smlua_func_anim_and_audio_for_hold_walk(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'anim_and_audio_for_hold_walk'"); return 0; }
extern void anim_and_audio_for_hold_walk(struct MarioState *m);
anim_and_audio_for_hold_walk(m);
@@ -9361,7 +9385,7 @@ int smlua_func_anim_and_audio_for_walk(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'anim_and_audio_for_walk'"); return 0; }
extern void anim_and_audio_for_walk(struct MarioState *m);
anim_and_audio_for_walk(m);
@@ -9373,9 +9397,9 @@ int smlua_func_apply_landing_accel(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'apply_landing_accel'"); return 0; }
f32 frictionFactor = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'apply_landing_accel'"); return 0; }
extern s32 apply_landing_accel(struct MarioState *m, f32 frictionFactor);
lua_pushinteger(L, apply_landing_accel(m, frictionFactor));
@@ -9387,7 +9411,7 @@ int smlua_func_apply_slope_accel(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'apply_slope_accel'"); return 0; }
extern void apply_slope_accel(struct MarioState *m);
apply_slope_accel(m);
@@ -9399,9 +9423,9 @@ int smlua_func_apply_slope_decel(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'apply_slope_decel'"); return 0; }
f32 decelCoef = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'apply_slope_decel'"); return 0; }
extern s32 apply_slope_decel(struct MarioState *m, f32 decelCoef);
lua_pushinteger(L, apply_slope_decel(m, decelCoef));
@@ -9413,7 +9437,7 @@ int smlua_func_begin_braking_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'begin_braking_action'"); return 0; }
extern s32 begin_braking_action(struct MarioState *m);
lua_pushinteger(L, begin_braking_action(m));
@@ -9425,13 +9449,13 @@ int smlua_func_begin_walking_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'begin_walking_action'"); return 0; }
f32 forwardVel = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'begin_walking_action'"); return 0; }
u32 action = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'begin_walking_action'"); return 0; }
u32 actionArg = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'begin_walking_action'"); return 0; }
extern s32 begin_walking_action(struct MarioState *m, f32 forwardVel, u32 action, u32 actionArg);
lua_pushinteger(L, begin_walking_action(m, forwardVel, action, actionArg));
@@ -9443,7 +9467,7 @@ int smlua_func_check_common_moving_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_common_moving_cancels'"); return 0; }
extern s32 check_common_moving_cancels(struct MarioState *m);
lua_pushinteger(L, check_common_moving_cancels(m));
@@ -9455,7 +9479,7 @@ int smlua_func_check_ground_dive_or_punch(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_ground_dive_or_punch'"); return 0; }
extern s32 check_ground_dive_or_punch(struct MarioState *m);
lua_pushinteger(L, check_ground_dive_or_punch(m));
@@ -9467,7 +9491,7 @@ int smlua_func_check_ledge_climb_down(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_ledge_climb_down'"); return 0; }
extern void check_ledge_climb_down(struct MarioState *m);
check_ledge_climb_down(m);
@@ -9479,15 +9503,15 @@ int smlua_func_common_ground_knockback_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'common_ground_knockback_action'"); return 0; }
s32 animation = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'common_ground_knockback_action'"); return 0; }
s32 arg2 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'common_ground_knockback_action'"); return 0; }
s32 arg3 = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'common_ground_knockback_action'"); return 0; }
s32 arg4 = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'common_ground_knockback_action'"); return 0; }
extern s32 common_ground_knockback_action(struct MarioState *m, s32 animation, s32 arg2, s32 arg3, s32 arg4);
lua_pushinteger(L, common_ground_knockback_action(m, animation, arg2, arg3, arg4));
@@ -9499,11 +9523,11 @@ int smlua_func_common_landing_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'common_landing_action'"); return 0; }
s16 animation = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'common_landing_action'"); return 0; }
u32 airAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'common_landing_action'"); return 0; }
extern u32 common_landing_action(struct MarioState *m, s16 animation, u32 airAction);
lua_pushinteger(L, common_landing_action(m, animation, airAction));
@@ -9516,15 +9540,15 @@ int smlua_func_common_landing_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'common_landing_cancels'"); return 0; }
struct LandingAction* landingAction = (struct LandingAction*)smlua_to_cobject(L, 2, LOT_LANDINGACTION);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'common_landing_cancels'"); return 0; }
// s32 (*setAPressAction)(structMarioState* arg2 = (s32 (*setAPressAction)(structMarioState*)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'common_landing_cancels'"); return 0; }
u32 arg3 = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'common_landing_cancels'"); return 0; }
// u32) arg4 = (u32))smlua_to_cobject(L, 5, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'common_landing_cancels'"); return 0; }
extern s32 common_landing_cancels(struct MarioState *m, struct LandingAction *landingAction, s32 (*setAPressAction)(struct MarioState *, u32, u32));
lua_pushinteger(L, common_landing_cancels(m, landingAction, arg2, arg3, arg4));
@@ -9537,13 +9561,13 @@ int smlua_func_common_slide_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'common_slide_action'"); return 0; }
u32 endAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'common_slide_action'"); return 0; }
u32 airAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'common_slide_action'"); return 0; }
s32 animation = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'common_slide_action'"); return 0; }
extern void common_slide_action(struct MarioState *m, u32 endAction, u32 airAction, s32 animation);
common_slide_action(m, endAction, airAction, animation);
@@ -9555,15 +9579,15 @@ int smlua_func_common_slide_action_with_jump(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'common_slide_action_with_jump'"); return 0; }
u32 stopAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'common_slide_action_with_jump'"); return 0; }
u32 jumpAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'common_slide_action_with_jump'"); return 0; }
u32 airAction = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'common_slide_action_with_jump'"); return 0; }
s32 animation = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'common_slide_action_with_jump'"); return 0; }
extern s32 common_slide_action_with_jump(struct MarioState *m, u32 stopAction, u32 jumpAction, u32 airAction, s32 animation);
lua_pushinteger(L, common_slide_action_with_jump(m, stopAction, jumpAction, airAction, animation));
@@ -9575,7 +9599,7 @@ int smlua_func_mario_execute_moving_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_execute_moving_action'"); return 0; }
extern s32 mario_execute_moving_action(struct MarioState *m);
lua_pushinteger(L, mario_execute_moving_action(m));
@@ -9587,11 +9611,11 @@ int smlua_func_play_step_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_step_sound'"); return 0; }
s16 frame1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_step_sound'"); return 0; }
s16 frame2 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_step_sound'"); return 0; }
extern void play_step_sound(struct MarioState *m, s16 frame1, s16 frame2);
play_step_sound(m, frame1, frame2);
@@ -9603,13 +9627,13 @@ int smlua_func_push_or_sidle_wall(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'push_or_sidle_wall'"); return 0; }
f32* startPos = smlua_get_vec3f_from_buffer();
startPos[0] = smlua_get_number_field(2, "x");
startPos[1] = smlua_get_number_field(2, "y");
startPos[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'push_or_sidle_wall'"); return 0; }
extern void push_or_sidle_wall(struct MarioState *m, Vec3f startPos);
push_or_sidle_wall(m, startPos);
@@ -9625,15 +9649,15 @@ int smlua_func_quicksand_jump_land_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'quicksand_jump_land_action'"); return 0; }
s32 animation1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'quicksand_jump_land_action'"); return 0; }
s32 animation2 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'quicksand_jump_land_action'"); return 0; }
u32 endAction = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'quicksand_jump_land_action'"); return 0; }
u32 airAction = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'quicksand_jump_land_action'"); return 0; }
extern s32 quicksand_jump_land_action(struct MarioState *m, s32 animation1, s32 animation2, u32 endAction, u32 airAction);
lua_pushinteger(L, quicksand_jump_land_action(m, animation1, animation2, endAction, airAction));
@@ -9645,11 +9669,11 @@ int smlua_func_set_triple_jump_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_triple_jump_action'"); return 0; }
u32 action = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_triple_jump_action'"); return 0; }
u32 actionArg = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_triple_jump_action'"); return 0; }
extern s32 set_triple_jump_action(struct MarioState *m, UNUSED u32 action, UNUSED u32 actionArg);
lua_pushinteger(L, set_triple_jump_action(m, action, actionArg));
@@ -9661,7 +9685,7 @@ int smlua_func_should_begin_sliding(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'should_begin_sliding'"); return 0; }
extern s32 should_begin_sliding(struct MarioState *m);
lua_pushinteger(L, should_begin_sliding(m));
@@ -9673,11 +9697,11 @@ int smlua_func_slide_bonk(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'slide_bonk'"); return 0; }
u32 fastAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'slide_bonk'"); return 0; }
u32 slowAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'slide_bonk'"); return 0; }
extern void slide_bonk(struct MarioState *m, u32 fastAction, u32 slowAction);
slide_bonk(m, fastAction, slowAction);
@@ -9689,13 +9713,13 @@ int smlua_func_stomach_slide_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'stomach_slide_action'"); return 0; }
u32 stopAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'stomach_slide_action'"); return 0; }
u32 airAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'stomach_slide_action'"); return 0; }
s32 animation = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'stomach_slide_action'"); return 0; }
extern s32 stomach_slide_action(struct MarioState *m, u32 stopAction, u32 airAction, s32 animation);
lua_pushinteger(L, stomach_slide_action(m, stopAction, airAction, animation));
@@ -9707,7 +9731,7 @@ int smlua_func_tilt_body_butt_slide(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'tilt_body_butt_slide'"); return 0; }
extern void tilt_body_butt_slide(struct MarioState *m);
tilt_body_butt_slide(m);
@@ -9719,9 +9743,9 @@ int smlua_func_tilt_body_ground_shell(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'tilt_body_ground_shell'"); return 0; }
s16 startYaw = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'tilt_body_ground_shell'"); return 0; }
extern void tilt_body_ground_shell(struct MarioState *m, s16 startYaw);
tilt_body_ground_shell(m, startYaw);
@@ -9733,7 +9757,7 @@ int smlua_func_tilt_body_running(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'tilt_body_running'"); return 0; }
extern s16 tilt_body_running(struct MarioState *m);
lua_pushinteger(L, tilt_body_running(m));
@@ -9745,9 +9769,9 @@ int smlua_func_tilt_body_walking(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'tilt_body_walking'"); return 0; }
s16 startYaw = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'tilt_body_walking'"); return 0; }
extern void tilt_body_walking(struct MarioState *m, s16 startYaw);
tilt_body_walking(m, startYaw);
@@ -9759,7 +9783,7 @@ int smlua_func_update_decelerating_speed(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_decelerating_speed'"); return 0; }
extern s32 update_decelerating_speed(struct MarioState *m);
lua_pushinteger(L, update_decelerating_speed(m));
@@ -9771,7 +9795,7 @@ int smlua_func_update_shell_speed(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_shell_speed'"); return 0; }
extern void update_shell_speed(struct MarioState *m);
update_shell_speed(m);
@@ -9783,9 +9807,9 @@ int smlua_func_update_sliding(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_sliding'"); return 0; }
f32 stopSpeed = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'update_sliding'"); return 0; }
extern s32 update_sliding(struct MarioState *m, f32 stopSpeed);
lua_pushinteger(L, update_sliding(m, stopSpeed));
@@ -9797,11 +9821,11 @@ int smlua_func_update_sliding_angle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_sliding_angle'"); return 0; }
f32 accel = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'update_sliding_angle'"); return 0; }
f32 lossFactor = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'update_sliding_angle'"); return 0; }
extern void update_sliding_angle(struct MarioState *m, f32 accel, f32 lossFactor);
update_sliding_angle(m, accel, lossFactor);
@@ -9813,7 +9837,7 @@ int smlua_func_update_walking_speed(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'update_walking_speed'"); return 0; }
extern void update_walking_speed(struct MarioState *m);
update_walking_speed(m);
@@ -9829,11 +9853,11 @@ int smlua_func_animated_stationary_ground_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'animated_stationary_ground_step'"); return 0; }
s32 animation = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'animated_stationary_ground_step'"); return 0; }
u32 endAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'animated_stationary_ground_step'"); return 0; }
extern void animated_stationary_ground_step(struct MarioState *m, s32 animation, u32 endAction);
animated_stationary_ground_step(m, animation, endAction);
@@ -9845,7 +9869,7 @@ int smlua_func_check_common_object_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_common_object_cancels'"); return 0; }
extern s32 check_common_object_cancels(struct MarioState *m);
lua_pushinteger(L, check_common_object_cancels(m));
@@ -9857,7 +9881,7 @@ int smlua_func_mario_execute_object_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_execute_object_action'"); return 0; }
extern s32 mario_execute_object_action(struct MarioState *m);
lua_pushinteger(L, mario_execute_object_action(m));
@@ -9869,7 +9893,7 @@ int smlua_func_mario_update_punch_sequence(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_update_punch_sequence'"); return 0; }
extern s32 mario_update_punch_sequence(struct MarioState *m);
lua_pushinteger(L, mario_update_punch_sequence(m));
@@ -9885,7 +9909,7 @@ int smlua_func_check_common_hold_idle_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_common_hold_idle_cancels'"); return 0; }
extern s32 check_common_hold_idle_cancels(struct MarioState *m);
lua_pushinteger(L, check_common_hold_idle_cancels(m));
@@ -9897,7 +9921,7 @@ int smlua_func_check_common_idle_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_common_idle_cancels'"); return 0; }
extern s32 check_common_idle_cancels(struct MarioState *m);
lua_pushinteger(L, check_common_idle_cancels(m));
@@ -9909,9 +9933,9 @@ int smlua_func_check_common_landing_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_common_landing_cancels'"); return 0; }
u32 action = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'check_common_landing_cancels'"); return 0; }
extern s32 check_common_landing_cancels(struct MarioState *m, u32 action);
lua_pushinteger(L, check_common_landing_cancels(m, action));
@@ -9923,7 +9947,7 @@ int smlua_func_check_common_stationary_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'check_common_stationary_cancels'"); return 0; }
extern s32 check_common_stationary_cancels(struct MarioState *m);
lua_pushinteger(L, check_common_stationary_cancels(m));
@@ -9935,11 +9959,11 @@ int smlua_func_landing_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'landing_step'"); return 0; }
s32 arg1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'landing_step'"); return 0; }
u32 action = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'landing_step'"); return 0; }
extern s32 landing_step(struct MarioState *m, s32 arg1, u32 action);
lua_pushinteger(L, landing_step(m, arg1, action));
@@ -9951,7 +9975,7 @@ int smlua_func_mario_execute_stationary_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_execute_stationary_action'"); return 0; }
extern s32 mario_execute_stationary_action(struct MarioState *m);
lua_pushinteger(L, mario_execute_stationary_action(m));
@@ -9963,13 +9987,13 @@ int smlua_func_play_anim_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_anim_sound'"); return 0; }
u32 actionState = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_anim_sound'"); return 0; }
s32 animFrame = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_anim_sound'"); return 0; }
u32 sound = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'play_anim_sound'"); return 0; }
extern void play_anim_sound(struct MarioState *m, u32 actionState, s32 animFrame, u32 sound);
play_anim_sound(m, actionState, animFrame, sound);
@@ -9981,11 +10005,11 @@ int smlua_func_stopping_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'stopping_step'"); return 0; }
s32 animID = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'stopping_step'"); return 0; }
u32 action = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'stopping_step'"); return 0; }
extern void stopping_step(struct MarioState *m, s32 animID, u32 action);
stopping_step(m, animID, action);
@@ -10001,13 +10025,13 @@ int smlua_func_apply_water_current(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'apply_water_current'"); return 0; }
f32* step = smlua_get_vec3f_from_buffer();
step[0] = smlua_get_number_field(2, "x");
step[1] = smlua_get_number_field(2, "y");
step[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'apply_water_current'"); return 0; }
extern void apply_water_current(struct MarioState *m, Vec3f step);
apply_water_current(m, step);
@@ -10023,7 +10047,7 @@ int smlua_func_float_surface_gfx(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'float_surface_gfx'"); return 0; }
extern void float_surface_gfx(struct MarioState *m);
float_surface_gfx(m);
@@ -10035,7 +10059,7 @@ int smlua_func_mario_execute_submerged_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_execute_submerged_action'"); return 0; }
extern s32 mario_execute_submerged_action(struct MarioState *m);
lua_pushinteger(L, mario_execute_submerged_action(m));
@@ -10047,13 +10071,13 @@ int smlua_func_perform_water_full_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'perform_water_full_step'"); return 0; }
f32* nextPos = smlua_get_vec3f_from_buffer();
nextPos[0] = smlua_get_number_field(2, "x");
nextPos[1] = smlua_get_number_field(2, "y");
nextPos[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'perform_water_full_step'"); return 0; }
extern u32 perform_water_full_step(struct MarioState *m, Vec3f nextPos);
lua_pushinteger(L, perform_water_full_step(m, nextPos));
@@ -10069,7 +10093,7 @@ int smlua_func_perform_water_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'perform_water_step'"); return 0; }
extern u32 perform_water_step(struct MarioState *m);
lua_pushinteger(L, perform_water_step(m));
@@ -10081,9 +10105,9 @@ int smlua_func_set_swimming_at_surface_particles(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_swimming_at_surface_particles'"); return 0; }
u32 particleFlag = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_swimming_at_surface_particles'"); return 0; }
extern void set_swimming_at_surface_particles(struct MarioState *m, u32 particleFlag);
set_swimming_at_surface_particles(m, particleFlag);
@@ -10148,19 +10172,19 @@ int smlua_func_init_bully_collision_data(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 7)) { return 0; }
struct BullyCollisionData* data = (struct BullyCollisionData*)smlua_to_cobject(L, 1, LOT_BULLYCOLLISIONDATA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'init_bully_collision_data'"); return 0; }
f32 posX = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'init_bully_collision_data'"); return 0; }
f32 posZ = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'init_bully_collision_data'"); return 0; }
f32 forwardVel = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'init_bully_collision_data'"); return 0; }
s16 yaw = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'init_bully_collision_data'"); return 0; }
f32 conversionRatio = smlua_to_number(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'init_bully_collision_data'"); return 0; }
f32 radius = smlua_to_number(L, 7);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7 for function 'init_bully_collision_data'"); return 0; }
init_bully_collision_data(data, posX, posZ, forwardVel, yaw, conversionRatio, radius);
@@ -10171,9 +10195,9 @@ int smlua_func_mario_bonk_reflection(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* arg0 = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_bonk_reflection'"); return 0; }
u32 arg1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_bonk_reflection'"); return 0; }
mario_bonk_reflection(arg0, arg1);
@@ -10184,11 +10208,11 @@ int smlua_func_mario_push_off_steep_floor(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* arg0 = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_push_off_steep_floor'"); return 0; }
u32 arg1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_push_off_steep_floor'"); return 0; }
u32 arg2 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mario_push_off_steep_floor'"); return 0; }
lua_pushinteger(L, mario_push_off_steep_floor(arg0, arg1, arg2));
@@ -10199,7 +10223,7 @@ int smlua_func_mario_update_moving_sand(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* arg0 = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_update_moving_sand'"); return 0; }
lua_pushinteger(L, mario_update_moving_sand(arg0));
@@ -10210,9 +10234,9 @@ int smlua_func_mario_update_quicksand(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* arg0 = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_update_quicksand'"); return 0; }
f32 arg1 = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_update_quicksand'"); return 0; }
lua_pushinteger(L, mario_update_quicksand(arg0, arg1));
@@ -10223,7 +10247,7 @@ int smlua_func_mario_update_windy_ground(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* arg0 = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_update_windy_ground'"); return 0; }
lua_pushinteger(L, mario_update_windy_ground(arg0));
@@ -10234,9 +10258,9 @@ int smlua_func_perform_air_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* arg0 = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'perform_air_step'"); return 0; }
u32 arg1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'perform_air_step'"); return 0; }
lua_pushinteger(L, perform_air_step(arg0, arg1));
@@ -10247,7 +10271,7 @@ int smlua_func_perform_ground_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* arg0 = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'perform_ground_step'"); return 0; }
lua_pushinteger(L, perform_ground_step(arg0));
@@ -10258,7 +10282,7 @@ int smlua_func_set_vel_from_pitch_and_yaw(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_vel_from_pitch_and_yaw'"); return 0; }
set_vel_from_pitch_and_yaw(m);
@@ -10269,7 +10293,7 @@ int smlua_func_stationary_ground_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* arg0 = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'stationary_ground_step'"); return 0; }
lua_pushinteger(L, stationary_ground_step(arg0));
@@ -10280,13 +10304,1312 @@ int smlua_func_stop_and_set_height_to_floor(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* arg0 = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'stop_and_set_height_to_floor'"); return 0; }
stop_and_set_height_to_floor(arg0);
return 1;
}
+ /////////////////
+ // math_util.h //
+/////////////////
+
+/*
+int smlua_func_anim_spline_init(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+ struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'anim_spline_init'"); return 0; }
+// Vec4s * keyFrames = (Vec4s *)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'anim_spline_init'"); return 0; }
+
+ anim_spline_init(m, keyFrames);
+
+ return 1;
+}
+*/
+
+int smlua_func_anim_spline_poll(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+ struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'anim_spline_poll'"); return 0; }
+
+ f32* result = smlua_get_vec3f_from_buffer();
+ result[0] = smlua_get_number_field(2, "x");
+ result[1] = smlua_get_number_field(2, "y");
+ result[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'anim_spline_poll'"); return 0; }
+
+ lua_pushinteger(L, anim_spline_poll(m, result));
+
+ smlua_push_number_field(2, "x", result[0]);
+ smlua_push_number_field(2, "y", result[1]);
+ smlua_push_number_field(2, "z", result[2]);
+
+ return 1;
+}
+
+int smlua_func_approach_f32(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+ f32 current = smlua_to_number(L, 1);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_f32'"); return 0; }
+ f32 target = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_f32'"); return 0; }
+ f32 inc = smlua_to_number(L, 3);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_f32'"); return 0; }
+ f32 dec = smlua_to_number(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'approach_f32'"); return 0; }
+
+ lua_pushnumber(L, approach_f32(current, target, inc, dec));
+
+ return 1;
+}
+
+int smlua_func_approach_s32(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+ s32 current = smlua_to_integer(L, 1);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_s32'"); return 0; }
+ s32 target = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_s32'"); return 0; }
+ s32 inc = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_s32'"); return 0; }
+ s32 dec = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'approach_s32'"); return 0; }
+
+ lua_pushinteger(L, approach_s32(current, target, inc, dec));
+
+ return 1;
+}
+
+/*
+int smlua_func_find_vector_perpendicular_to_plane(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_vector_perpendicular_to_plane'"); return 0; }
+
+ f32* a = smlua_get_vec3f_from_buffer();
+ a[0] = smlua_get_number_field(2, "x");
+ a[1] = smlua_get_number_field(2, "y");
+ a[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_vector_perpendicular_to_plane'"); return 0; }
+
+ f32* b = smlua_get_vec3f_from_buffer();
+ b[0] = smlua_get_number_field(3, "x");
+ b[1] = smlua_get_number_field(3, "y");
+ b[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'find_vector_perpendicular_to_plane'"); return 0; }
+
+ f32* c = smlua_get_vec3f_from_buffer();
+ c[0] = smlua_get_number_field(4, "x");
+ c[1] = smlua_get_number_field(4, "y");
+ c[2] = smlua_get_number_field(4, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'find_vector_perpendicular_to_plane'"); return 0; }
+
+ UNIMPLEMENTED -->(L, find_vector_perpendicular_to_plane(dest, a, b, c));
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ smlua_push_number_field(2, "x", a[0]);
+ smlua_push_number_field(2, "y", a[1]);
+ smlua_push_number_field(2, "z", a[2]);
+
+ smlua_push_number_field(3, "x", b[0]);
+ smlua_push_number_field(3, "y", b[1]);
+ smlua_push_number_field(3, "z", b[2]);
+
+ smlua_push_number_field(4, "x", c[0]);
+ smlua_push_number_field(4, "y", c[1]);
+ smlua_push_number_field(4, "z", c[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_get_pos_from_transform_mtx(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_pos_from_transform_mtx'"); return 0; }
+// Mat4 objMtx = (Mat4)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_pos_from_transform_mtx'"); return 0; }
+// Mat4 camMtx = (Mat4)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'get_pos_from_transform_mtx'"); return 0; }
+
+ get_pos_from_transform_mtx(dest, objMtx, camMtx);
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_align_terrain_normal(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+// Mat4 dest = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_align_terrain_normal'"); return 0; }
+
+ f32* upDir = smlua_get_vec3f_from_buffer();
+ upDir[0] = smlua_get_number_field(2, "x");
+ upDir[1] = smlua_get_number_field(2, "y");
+ upDir[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_align_terrain_normal'"); return 0; }
+
+ f32* pos = smlua_get_vec3f_from_buffer();
+ pos[0] = smlua_get_number_field(3, "x");
+ pos[1] = smlua_get_number_field(3, "y");
+ pos[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mtxf_align_terrain_normal'"); return 0; }
+ s16 yaw = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'mtxf_align_terrain_normal'"); return 0; }
+
+ mtxf_align_terrain_normal(dest, upDir, pos, yaw);
+
+ smlua_push_number_field(2, "x", upDir[0]);
+ smlua_push_number_field(2, "y", upDir[1]);
+ smlua_push_number_field(2, "z", upDir[2]);
+
+ smlua_push_number_field(3, "x", pos[0]);
+ smlua_push_number_field(3, "y", pos[1]);
+ smlua_push_number_field(3, "z", pos[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_align_terrain_triangle(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+// Mat4 mtx = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_align_terrain_triangle'"); return 0; }
+
+ f32* pos = smlua_get_vec3f_from_buffer();
+ pos[0] = smlua_get_number_field(2, "x");
+ pos[1] = smlua_get_number_field(2, "y");
+ pos[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_align_terrain_triangle'"); return 0; }
+ s16 yaw = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mtxf_align_terrain_triangle'"); return 0; }
+ f32 radius = smlua_to_number(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'mtxf_align_terrain_triangle'"); return 0; }
+
+ mtxf_align_terrain_triangle(mtx, pos, yaw, radius);
+
+ smlua_push_number_field(2, "x", pos[0]);
+ smlua_push_number_field(2, "y", pos[1]);
+ smlua_push_number_field(2, "z", pos[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_billboard(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+// Mat4 dest = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_billboard'"); return 0; }
+// Mat4 mtx = (Mat4)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_billboard'"); return 0; }
+
+ f32* position = smlua_get_vec3f_from_buffer();
+ position[0] = smlua_get_number_field(3, "x");
+ position[1] = smlua_get_number_field(3, "y");
+ position[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mtxf_billboard'"); return 0; }
+ s16 angle = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'mtxf_billboard'"); return 0; }
+
+ mtxf_billboard(dest, mtx, position, angle);
+
+ smlua_push_number_field(3, "x", position[0]);
+ smlua_push_number_field(3, "y", position[1]);
+ smlua_push_number_field(3, "z", position[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_copy(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+// Mat4 dest = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_copy'"); return 0; }
+// Mat4 src = (Mat4)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_copy'"); return 0; }
+
+ mtxf_copy(dest, src);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_cylboard(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+// Mat4 dest = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_cylboard'"); return 0; }
+// Mat4 mtx = (Mat4)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_cylboard'"); return 0; }
+
+ f32* position = smlua_get_vec3f_from_buffer();
+ position[0] = smlua_get_number_field(3, "x");
+ position[1] = smlua_get_number_field(3, "y");
+ position[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mtxf_cylboard'"); return 0; }
+ s16 angle = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'mtxf_cylboard'"); return 0; }
+
+ mtxf_cylboard(dest, mtx, position, angle);
+
+ smlua_push_number_field(3, "x", position[0]);
+ smlua_push_number_field(3, "y", position[1]);
+ smlua_push_number_field(3, "z", position[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_identity(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
+
+// Mat4 mtx = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_identity'"); return 0; }
+
+ mtxf_identity(mtx);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_inverse(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+// Mat4 dest = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_inverse'"); return 0; }
+// Mat4 src = (Mat4)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_inverse'"); return 0; }
+
+ mtxf_inverse(dest, src);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_lookat(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+// Mat4 mtx = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_lookat'"); return 0; }
+
+ f32* from = smlua_get_vec3f_from_buffer();
+ from[0] = smlua_get_number_field(2, "x");
+ from[1] = smlua_get_number_field(2, "y");
+ from[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_lookat'"); return 0; }
+
+ f32* to = smlua_get_vec3f_from_buffer();
+ to[0] = smlua_get_number_field(3, "x");
+ to[1] = smlua_get_number_field(3, "y");
+ to[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mtxf_lookat'"); return 0; }
+ s16 roll = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'mtxf_lookat'"); return 0; }
+
+ mtxf_lookat(mtx, from, to, roll);
+
+ smlua_push_number_field(2, "x", from[0]);
+ smlua_push_number_field(2, "y", from[1]);
+ smlua_push_number_field(2, "z", from[2]);
+
+ smlua_push_number_field(3, "x", to[0]);
+ smlua_push_number_field(3, "y", to[1]);
+ smlua_push_number_field(3, "z", to[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_mul(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+// Mat4 dest = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_mul'"); return 0; }
+// Mat4 a = (Mat4)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_mul'"); return 0; }
+// Mat4 b = (Mat4)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mtxf_mul'"); return 0; }
+
+ mtxf_mul(dest, a, b);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_mul_vec3s(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+// Mat4 mtx = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_mul_vec3s'"); return 0; }
+
+ s16* b = smlua_get_vec3s_from_buffer();
+ b[0] = smlua_get_integer_field(2, "x");
+ b[1] = smlua_get_integer_field(2, "y");
+ b[2] = smlua_get_integer_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_mul_vec3s'"); return 0; }
+
+ mtxf_mul_vec3s(mtx, b);
+
+ smlua_push_integer_field(2, "x", b[0]);
+ smlua_push_integer_field(2, "y", b[1]);
+ smlua_push_integer_field(2, "z", b[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_rotate_xy(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+// Mtx * mtx = (Mtx *)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_rotate_xy'"); return 0; }
+ s16 angle = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_rotate_xy'"); return 0; }
+
+ mtxf_rotate_xy(mtx, angle);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_rotate_xyz_and_translate(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+// Mat4 dest = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_rotate_xyz_and_translate'"); return 0; }
+
+ f32* b = smlua_get_vec3f_from_buffer();
+ b[0] = smlua_get_number_field(2, "x");
+ b[1] = smlua_get_number_field(2, "y");
+ b[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_rotate_xyz_and_translate'"); return 0; }
+
+ s16* c = smlua_get_vec3s_from_buffer();
+ c[0] = smlua_get_integer_field(3, "x");
+ c[1] = smlua_get_integer_field(3, "y");
+ c[2] = smlua_get_integer_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mtxf_rotate_xyz_and_translate'"); return 0; }
+
+ mtxf_rotate_xyz_and_translate(dest, b, c);
+
+ smlua_push_number_field(2, "x", b[0]);
+ smlua_push_number_field(2, "y", b[1]);
+ smlua_push_number_field(2, "z", b[2]);
+
+ smlua_push_integer_field(3, "x", c[0]);
+ smlua_push_integer_field(3, "y", c[1]);
+ smlua_push_integer_field(3, "z", c[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_rotate_zxy_and_translate(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+// Mat4 dest = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_rotate_zxy_and_translate'"); return 0; }
+
+ f32* translate = smlua_get_vec3f_from_buffer();
+ translate[0] = smlua_get_number_field(2, "x");
+ translate[1] = smlua_get_number_field(2, "y");
+ translate[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_rotate_zxy_and_translate'"); return 0; }
+
+ s16* rotate = smlua_get_vec3s_from_buffer();
+ rotate[0] = smlua_get_integer_field(3, "x");
+ rotate[1] = smlua_get_integer_field(3, "y");
+ rotate[2] = smlua_get_integer_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mtxf_rotate_zxy_and_translate'"); return 0; }
+
+ mtxf_rotate_zxy_and_translate(dest, translate, rotate);
+
+ smlua_push_number_field(2, "x", translate[0]);
+ smlua_push_number_field(2, "y", translate[1]);
+ smlua_push_number_field(2, "z", translate[2]);
+
+ smlua_push_integer_field(3, "x", rotate[0]);
+ smlua_push_integer_field(3, "y", rotate[1]);
+ smlua_push_integer_field(3, "z", rotate[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_scale_vec3f(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+// Mat4 dest = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_scale_vec3f'"); return 0; }
+// Mat4 mtx = (Mat4)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_scale_vec3f'"); return 0; }
+
+ f32* s = smlua_get_vec3f_from_buffer();
+ s[0] = smlua_get_number_field(3, "x");
+ s[1] = smlua_get_number_field(3, "y");
+ s[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mtxf_scale_vec3f'"); return 0; }
+
+ mtxf_scale_vec3f(dest, mtx, s);
+
+ smlua_push_number_field(3, "x", s[0]);
+ smlua_push_number_field(3, "y", s[1]);
+ smlua_push_number_field(3, "z", s[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_to_mtx(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+// Mtx * dest = (Mtx *)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_to_mtx'"); return 0; }
+// Mat4 src = (Mat4)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_to_mtx'"); return 0; }
+
+ mtxf_to_mtx(dest, src);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_mtxf_translate(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+// Mat4 dest = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mtxf_translate'"); return 0; }
+
+ f32* b = smlua_get_vec3f_from_buffer();
+ b[0] = smlua_get_number_field(2, "x");
+ b[1] = smlua_get_number_field(2, "y");
+ b[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mtxf_translate'"); return 0; }
+
+ mtxf_translate(dest, b);
+
+ smlua_push_number_field(2, "x", b[0]);
+ smlua_push_number_field(2, "y", b[1]);
+ smlua_push_number_field(2, "z", b[2]);
+
+ return 1;
+}
+*/
+
+int smlua_func_not_zero(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+ f32 value = smlua_to_number(L, 1);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'not_zero'"); return 0; }
+ f32 replacement = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'not_zero'"); return 0; }
+
+ lua_pushnumber(L, not_zero(value, replacement));
+
+ return 1;
+}
+
+/*
+int smlua_func_spline_get_weights(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+ struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spline_get_weights'"); return 0; }
+// Vec4f result = (Vec4f)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spline_get_weights'"); return 0; }
+ f32 t = smlua_to_number(L, 3);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'spline_get_weights'"); return 0; }
+ s32 c = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'spline_get_weights'"); return 0; }
+
+ spline_get_weights(m, result, t, c);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3f_add(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_add'"); return 0; }
+
+ f32* a = smlua_get_vec3f_from_buffer();
+ a[0] = smlua_get_number_field(2, "x");
+ a[1] = smlua_get_number_field(2, "y");
+ a[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_add'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3f_add(dest, a));
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ smlua_push_number_field(2, "x", a[0]);
+ smlua_push_number_field(2, "y", a[1]);
+ smlua_push_number_field(2, "z", a[2]);
+
+ return 1;
+}
+*/
+
+int smlua_func_vec3f_combine(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_combine'"); return 0; }
+
+ f32* vecA = smlua_get_vec3f_from_buffer();
+ vecA[0] = smlua_get_number_field(2, "x");
+ vecA[1] = smlua_get_number_field(2, "y");
+ vecA[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_combine'"); return 0; }
+
+ f32* vecB = smlua_get_vec3f_from_buffer();
+ vecB[0] = smlua_get_number_field(3, "x");
+ vecB[1] = smlua_get_number_field(3, "y");
+ vecB[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3f_combine'"); return 0; }
+ f32 sclA = smlua_to_number(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'vec3f_combine'"); return 0; }
+ f32 sclB = smlua_to_number(L, 5);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'vec3f_combine'"); return 0; }
+
+ vec3f_combine(dest, vecA, vecB, sclA, sclB);
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ smlua_push_number_field(2, "x", vecA[0]);
+ smlua_push_number_field(2, "y", vecA[1]);
+ smlua_push_number_field(2, "z", vecA[2]);
+
+ smlua_push_number_field(3, "x", vecB[0]);
+ smlua_push_number_field(3, "y", vecB[1]);
+ smlua_push_number_field(3, "z", vecB[2]);
+
+ return 1;
+}
+
+/*
+int smlua_func_vec3f_copy(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_copy'"); return 0; }
+
+ f32* src = smlua_get_vec3f_from_buffer();
+ src[0] = smlua_get_number_field(2, "x");
+ src[1] = smlua_get_number_field(2, "y");
+ src[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_copy'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3f_copy(dest, src));
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ smlua_push_number_field(2, "x", src[0]);
+ smlua_push_number_field(2, "y", src[1]);
+ smlua_push_number_field(2, "z", src[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3f_cross(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_cross'"); return 0; }
+
+ f32* a = smlua_get_vec3f_from_buffer();
+ a[0] = smlua_get_number_field(2, "x");
+ a[1] = smlua_get_number_field(2, "y");
+ a[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_cross'"); return 0; }
+
+ f32* b = smlua_get_vec3f_from_buffer();
+ b[0] = smlua_get_number_field(3, "x");
+ b[1] = smlua_get_number_field(3, "y");
+ b[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3f_cross'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3f_cross(dest, a, b));
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ smlua_push_number_field(2, "x", a[0]);
+ smlua_push_number_field(2, "y", a[1]);
+ smlua_push_number_field(2, "z", a[2]);
+
+ smlua_push_number_field(3, "x", b[0]);
+ smlua_push_number_field(3, "y", b[1]);
+ smlua_push_number_field(3, "z", b[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3f_dif(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_dif'"); return 0; }
+
+ f32* a = smlua_get_vec3f_from_buffer();
+ a[0] = smlua_get_number_field(2, "x");
+ a[1] = smlua_get_number_field(2, "y");
+ a[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_dif'"); return 0; }
+
+ f32* b = smlua_get_vec3f_from_buffer();
+ b[0] = smlua_get_number_field(3, "x");
+ b[1] = smlua_get_number_field(3, "y");
+ b[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3f_dif'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3f_dif(dest, a, b));
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ smlua_push_number_field(2, "x", a[0]);
+ smlua_push_number_field(2, "y", a[1]);
+ smlua_push_number_field(2, "z", a[2]);
+
+ smlua_push_number_field(3, "x", b[0]);
+ smlua_push_number_field(3, "y", b[1]);
+ smlua_push_number_field(3, "z", b[2]);
+
+ return 1;
+}
+*/
+
+int smlua_func_vec3f_dist(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ f32* v1 = smlua_get_vec3f_from_buffer();
+ v1[0] = smlua_get_number_field(1, "x");
+ v1[1] = smlua_get_number_field(1, "y");
+ v1[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_dist'"); return 0; }
+
+ f32* v2 = smlua_get_vec3f_from_buffer();
+ v2[0] = smlua_get_number_field(2, "x");
+ v2[1] = smlua_get_number_field(2, "y");
+ v2[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_dist'"); return 0; }
+
+ lua_pushnumber(L, vec3f_dist(v1, v2));
+
+ smlua_push_number_field(1, "x", v1[0]);
+ smlua_push_number_field(1, "y", v1[1]);
+ smlua_push_number_field(1, "z", v1[2]);
+
+ smlua_push_number_field(2, "x", v2[0]);
+ smlua_push_number_field(2, "y", v2[1]);
+ smlua_push_number_field(2, "z", v2[2]);
+
+ return 1;
+}
+
+int smlua_func_vec3f_dot(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ f32* a = smlua_get_vec3f_from_buffer();
+ a[0] = smlua_get_number_field(1, "x");
+ a[1] = smlua_get_number_field(1, "y");
+ a[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_dot'"); return 0; }
+
+ f32* b = smlua_get_vec3f_from_buffer();
+ b[0] = smlua_get_number_field(2, "x");
+ b[1] = smlua_get_number_field(2, "y");
+ b[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_dot'"); return 0; }
+
+ lua_pushnumber(L, vec3f_dot(a, b));
+
+ smlua_push_number_field(1, "x", a[0]);
+ smlua_push_number_field(1, "y", a[1]);
+ smlua_push_number_field(1, "z", a[2]);
+
+ smlua_push_number_field(2, "x", b[0]);
+ smlua_push_number_field(2, "y", b[1]);
+ smlua_push_number_field(2, "z", b[2]);
+
+ return 1;
+}
+
+int smlua_func_vec3f_get_dist_and_angle(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
+
+
+ f32* from = smlua_get_vec3f_from_buffer();
+ from[0] = smlua_get_number_field(1, "x");
+ from[1] = smlua_get_number_field(1, "y");
+ from[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_get_dist_and_angle'"); return 0; }
+
+ f32* to = smlua_get_vec3f_from_buffer();
+ to[0] = smlua_get_number_field(2, "x");
+ to[1] = smlua_get_number_field(2, "y");
+ to[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_get_dist_and_angle'"); return 0; }
+ f32 * dist = (f32 *)smlua_to_cpointer(L, 3, LVT_F32_P);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3f_get_dist_and_angle'"); return 0; }
+ s16 * pitch = (s16 *)smlua_to_cpointer(L, 4, LVT_S16_P);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'vec3f_get_dist_and_angle'"); return 0; }
+ s16 * yaw = (s16 *)smlua_to_cpointer(L, 5, LVT_S16_P);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'vec3f_get_dist_and_angle'"); return 0; }
+
+ vec3f_get_dist_and_angle(from, to, dist, pitch, yaw);
+
+ smlua_push_number_field(1, "x", from[0]);
+ smlua_push_number_field(1, "y", from[1]);
+ smlua_push_number_field(1, "z", from[2]);
+
+ smlua_push_number_field(2, "x", to[0]);
+ smlua_push_number_field(2, "y", to[1]);
+ smlua_push_number_field(2, "z", to[2]);
+
+ return 1;
+}
+
+int smlua_func_vec3f_length(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
+
+
+ f32* a = smlua_get_vec3f_from_buffer();
+ a[0] = smlua_get_number_field(1, "x");
+ a[1] = smlua_get_number_field(1, "y");
+ a[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_length'"); return 0; }
+
+ lua_pushnumber(L, vec3f_length(a));
+
+ smlua_push_number_field(1, "x", a[0]);
+ smlua_push_number_field(1, "y", a[1]);
+ smlua_push_number_field(1, "z", a[2]);
+
+ return 1;
+}
+
+/*
+int smlua_func_vec3f_mul(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_mul'"); return 0; }
+ f32 a = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_mul'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3f_mul(dest, a));
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3f_normalize(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_normalize'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3f_normalize(dest));
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ return 1;
+}
+*/
+
+int smlua_func_vec3f_project(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+
+ f32* vec = smlua_get_vec3f_from_buffer();
+ vec[0] = smlua_get_number_field(1, "x");
+ vec[1] = smlua_get_number_field(1, "y");
+ vec[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_project'"); return 0; }
+
+ f32* onto = smlua_get_vec3f_from_buffer();
+ onto[0] = smlua_get_number_field(2, "x");
+ onto[1] = smlua_get_number_field(2, "y");
+ onto[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_project'"); return 0; }
+
+ f32* out = smlua_get_vec3f_from_buffer();
+ out[0] = smlua_get_number_field(3, "x");
+ out[1] = smlua_get_number_field(3, "y");
+ out[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3f_project'"); return 0; }
+
+ vec3f_project(vec, onto, out);
+
+ smlua_push_number_field(1, "x", vec[0]);
+ smlua_push_number_field(1, "y", vec[1]);
+ smlua_push_number_field(1, "z", vec[2]);
+
+ smlua_push_number_field(2, "x", onto[0]);
+ smlua_push_number_field(2, "y", onto[1]);
+ smlua_push_number_field(2, "z", onto[2]);
+
+ smlua_push_number_field(3, "x", out[0]);
+ smlua_push_number_field(3, "y", out[1]);
+ smlua_push_number_field(3, "z", out[2]);
+
+ return 1;
+}
+
+/*
+int smlua_func_vec3f_rotate_zxy(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ f32* v = smlua_get_vec3f_from_buffer();
+ v[0] = smlua_get_number_field(1, "x");
+ v[1] = smlua_get_number_field(1, "y");
+ v[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_rotate_zxy'"); return 0; }
+
+ s16* rotate = smlua_get_vec3s_from_buffer();
+ rotate[0] = smlua_get_integer_field(2, "x");
+ rotate[1] = smlua_get_integer_field(2, "y");
+ rotate[2] = smlua_get_integer_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_rotate_zxy'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3f_rotate_zxy(v, rotate));
+
+ smlua_push_number_field(1, "x", v[0]);
+ smlua_push_number_field(1, "y", v[1]);
+ smlua_push_number_field(1, "z", v[2]);
+
+ smlua_push_integer_field(2, "x", rotate[0]);
+ smlua_push_integer_field(2, "y", rotate[1]);
+ smlua_push_integer_field(2, "z", rotate[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3f_set(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_set'"); return 0; }
+ f32 x = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_set'"); return 0; }
+ f32 y = smlua_to_number(L, 3);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3f_set'"); return 0; }
+ f32 z = smlua_to_number(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'vec3f_set'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3f_set(dest, x, y, z));
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ return 1;
+}
+*/
+
+int smlua_func_vec3f_set_dist_and_angle(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
+
+
+ f32* from = smlua_get_vec3f_from_buffer();
+ from[0] = smlua_get_number_field(1, "x");
+ from[1] = smlua_get_number_field(1, "y");
+ from[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_set_dist_and_angle'"); return 0; }
+
+ f32* to = smlua_get_vec3f_from_buffer();
+ to[0] = smlua_get_number_field(2, "x");
+ to[1] = smlua_get_number_field(2, "y");
+ to[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_set_dist_and_angle'"); return 0; }
+ f32 dist = smlua_to_number(L, 3);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3f_set_dist_and_angle'"); return 0; }
+ s16 pitch = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'vec3f_set_dist_and_angle'"); return 0; }
+ s16 yaw = smlua_to_integer(L, 5);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'vec3f_set_dist_and_angle'"); return 0; }
+
+ vec3f_set_dist_and_angle(from, to, dist, pitch, yaw);
+
+ smlua_push_number_field(1, "x", from[0]);
+ smlua_push_number_field(1, "y", from[1]);
+ smlua_push_number_field(1, "z", from[2]);
+
+ smlua_push_number_field(2, "x", to[0]);
+ smlua_push_number_field(2, "y", to[1]);
+ smlua_push_number_field(2, "z", to[2]);
+
+ return 1;
+}
+
+/*
+int smlua_func_vec3f_sum(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_sum'"); return 0; }
+
+ f32* a = smlua_get_vec3f_from_buffer();
+ a[0] = smlua_get_number_field(2, "x");
+ a[1] = smlua_get_number_field(2, "y");
+ a[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_sum'"); return 0; }
+
+ f32* b = smlua_get_vec3f_from_buffer();
+ b[0] = smlua_get_number_field(3, "x");
+ b[1] = smlua_get_number_field(3, "y");
+ b[2] = smlua_get_number_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3f_sum'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3f_sum(dest, a, b));
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ smlua_push_number_field(2, "x", a[0]);
+ smlua_push_number_field(2, "y", a[1]);
+ smlua_push_number_field(2, "z", a[2]);
+
+ smlua_push_number_field(3, "x", b[0]);
+ smlua_push_number_field(3, "y", b[1]);
+ smlua_push_number_field(3, "z", b[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3f_to_vec3s(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ s16* dest = smlua_get_vec3s_from_buffer();
+ dest[0] = smlua_get_integer_field(1, "x");
+ dest[1] = smlua_get_integer_field(1, "y");
+ dest[2] = smlua_get_integer_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3f_to_vec3s'"); return 0; }
+
+ f32* a = smlua_get_vec3f_from_buffer();
+ a[0] = smlua_get_number_field(2, "x");
+ a[1] = smlua_get_number_field(2, "y");
+ a[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3f_to_vec3s'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3f_to_vec3s(dest, a));
+
+ smlua_push_integer_field(1, "x", dest[0]);
+ smlua_push_integer_field(1, "y", dest[1]);
+ smlua_push_integer_field(1, "z", dest[2]);
+
+ smlua_push_number_field(2, "x", a[0]);
+ smlua_push_number_field(2, "y", a[1]);
+ smlua_push_number_field(2, "z", a[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3s_add(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ s16* dest = smlua_get_vec3s_from_buffer();
+ dest[0] = smlua_get_integer_field(1, "x");
+ dest[1] = smlua_get_integer_field(1, "y");
+ dest[2] = smlua_get_integer_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3s_add'"); return 0; }
+
+ s16* a = smlua_get_vec3s_from_buffer();
+ a[0] = smlua_get_integer_field(2, "x");
+ a[1] = smlua_get_integer_field(2, "y");
+ a[2] = smlua_get_integer_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3s_add'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3s_add(dest, a));
+
+ smlua_push_integer_field(1, "x", dest[0]);
+ smlua_push_integer_field(1, "y", dest[1]);
+ smlua_push_integer_field(1, "z", dest[2]);
+
+ smlua_push_integer_field(2, "x", a[0]);
+ smlua_push_integer_field(2, "y", a[1]);
+ smlua_push_integer_field(2, "z", a[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3s_copy(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ s16* dest = smlua_get_vec3s_from_buffer();
+ dest[0] = smlua_get_integer_field(1, "x");
+ dest[1] = smlua_get_integer_field(1, "y");
+ dest[2] = smlua_get_integer_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3s_copy'"); return 0; }
+
+ s16* src = smlua_get_vec3s_from_buffer();
+ src[0] = smlua_get_integer_field(2, "x");
+ src[1] = smlua_get_integer_field(2, "y");
+ src[2] = smlua_get_integer_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3s_copy'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3s_copy(dest, src));
+
+ smlua_push_integer_field(1, "x", dest[0]);
+ smlua_push_integer_field(1, "y", dest[1]);
+ smlua_push_integer_field(1, "z", dest[2]);
+
+ smlua_push_integer_field(2, "x", src[0]);
+ smlua_push_integer_field(2, "y", src[1]);
+ smlua_push_integer_field(2, "z", src[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3s_set(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+
+
+ s16* dest = smlua_get_vec3s_from_buffer();
+ dest[0] = smlua_get_integer_field(1, "x");
+ dest[1] = smlua_get_integer_field(1, "y");
+ dest[2] = smlua_get_integer_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3s_set'"); return 0; }
+ s16 x = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3s_set'"); return 0; }
+ s16 y = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3s_set'"); return 0; }
+ s16 z = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'vec3s_set'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3s_set(dest, x, y, z));
+
+ smlua_push_integer_field(1, "x", dest[0]);
+ smlua_push_integer_field(1, "y", dest[1]);
+ smlua_push_integer_field(1, "z", dest[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3s_sub(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ s16* dest = smlua_get_vec3s_from_buffer();
+ dest[0] = smlua_get_integer_field(1, "x");
+ dest[1] = smlua_get_integer_field(1, "y");
+ dest[2] = smlua_get_integer_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3s_sub'"); return 0; }
+
+ s16* a = smlua_get_vec3s_from_buffer();
+ a[0] = smlua_get_integer_field(2, "x");
+ a[1] = smlua_get_integer_field(2, "y");
+ a[2] = smlua_get_integer_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3s_sub'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3s_sub(dest, a));
+
+ smlua_push_integer_field(1, "x", dest[0]);
+ smlua_push_integer_field(1, "y", dest[1]);
+ smlua_push_integer_field(1, "z", dest[2]);
+
+ smlua_push_integer_field(2, "x", a[0]);
+ smlua_push_integer_field(2, "y", a[1]);
+ smlua_push_integer_field(2, "z", a[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3s_sum(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+
+
+ s16* dest = smlua_get_vec3s_from_buffer();
+ dest[0] = smlua_get_integer_field(1, "x");
+ dest[1] = smlua_get_integer_field(1, "y");
+ dest[2] = smlua_get_integer_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3s_sum'"); return 0; }
+
+ s16* a = smlua_get_vec3s_from_buffer();
+ a[0] = smlua_get_integer_field(2, "x");
+ a[1] = smlua_get_integer_field(2, "y");
+ a[2] = smlua_get_integer_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3s_sum'"); return 0; }
+
+ s16* b = smlua_get_vec3s_from_buffer();
+ b[0] = smlua_get_integer_field(3, "x");
+ b[1] = smlua_get_integer_field(3, "y");
+ b[2] = smlua_get_integer_field(3, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'vec3s_sum'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3s_sum(dest, a, b));
+
+ smlua_push_integer_field(1, "x", dest[0]);
+ smlua_push_integer_field(1, "y", dest[1]);
+ smlua_push_integer_field(1, "z", dest[2]);
+
+ smlua_push_integer_field(2, "x", a[0]);
+ smlua_push_integer_field(2, "y", a[1]);
+ smlua_push_integer_field(2, "z", a[2]);
+
+ smlua_push_integer_field(3, "x", b[0]);
+ smlua_push_integer_field(3, "y", b[1]);
+ smlua_push_integer_field(3, "z", b[2]);
+
+ return 1;
+}
+*/
+
+/*
+int smlua_func_vec3s_to_vec3f(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+
+
+ f32* dest = smlua_get_vec3f_from_buffer();
+ dest[0] = smlua_get_number_field(1, "x");
+ dest[1] = smlua_get_number_field(1, "y");
+ dest[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'vec3s_to_vec3f'"); return 0; }
+
+ s16* a = smlua_get_vec3s_from_buffer();
+ a[0] = smlua_get_integer_field(2, "x");
+ a[1] = smlua_get_integer_field(2, "y");
+ a[2] = smlua_get_integer_field(2, "z");
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'vec3s_to_vec3f'"); return 0; }
+
+ UNIMPLEMENTED -->(L, vec3s_to_vec3f(dest, a));
+
+ smlua_push_number_field(1, "x", dest[0]);
+ smlua_push_number_field(1, "y", dest[1]);
+ smlua_push_number_field(1, "z", dest[2]);
+
+ smlua_push_integer_field(2, "x", a[0]);
+ smlua_push_integer_field(2, "y", a[1]);
+ smlua_push_integer_field(2, "z", a[2]);
+
+ return 1;
+}
+*/
+
//////////////////////
// network_player.h //
//////////////////////
@@ -10295,13 +11618,13 @@ int smlua_func_get_network_player_from_area(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s16 courseNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_network_player_from_area'"); return 0; }
s16 actNum = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_network_player_from_area'"); return 0; }
s16 levelNum = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'get_network_player_from_area'"); return 0; }
s16 areaIndex = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'get_network_player_from_area'"); return 0; }
smlua_push_object(L, LOT_NETWORKPLAYER, get_network_player_from_area(courseNum, actNum, levelNum, areaIndex));
@@ -10312,11 +11635,11 @@ int smlua_func_get_network_player_from_level(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 courseNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_network_player_from_level'"); return 0; }
s16 actNum = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_network_player_from_level'"); return 0; }
s16 levelNum = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'get_network_player_from_level'"); return 0; }
smlua_push_object(L, LOT_NETWORKPLAYER, get_network_player_from_level(courseNum, actNum, levelNum));
@@ -10345,7 +11668,7 @@ int smlua_func_network_player_from_global_index(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 globalIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'network_player_from_global_index'"); return 0; }
smlua_push_object(L, LOT_NETWORKPLAYER, network_player_from_global_index(globalIndex));
@@ -10356,17 +11679,17 @@ int smlua_func_network_player_set_description(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'network_player_set_description'"); return 0; }
const char* description = smlua_to_string(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'network_player_set_description'"); return 0; }
u8 r = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'network_player_set_description'"); return 0; }
u8 g = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'network_player_set_description'"); return 0; }
u8 b = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'network_player_set_description'"); return 0; }
u8 a = smlua_to_integer(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'network_player_set_description'"); return 0; }
network_player_set_description(np, description, r, g, b, a);
@@ -10381,7 +11704,7 @@ int smlua_func_network_get_player_text_color_string(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 localIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'network_get_player_text_color_string'"); return 0; }
lua_pushstring(L, network_get_player_text_color_string(localIndex));
@@ -10392,7 +11715,7 @@ int smlua_func_network_global_index_from_local(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 localIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'network_global_index_from_local'"); return 0; }
lua_pushinteger(L, network_global_index_from_local(localIndex));
@@ -10412,7 +11735,7 @@ int smlua_func_network_local_index_from_global(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 globalIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'network_local_index_from_global'"); return 0; }
lua_pushinteger(L, network_local_index_from_global(globalIndex));
@@ -10427,7 +11750,7 @@ int smlua_func_absf_2(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 f = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'absf_2'"); return 0; }
extern f32 absf_2(f32 f);
lua_pushnumber(L, absf_2(f));
@@ -10439,13 +11762,13 @@ int smlua_func_calc_new_obj_vel_and_pos_y(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Surface* objFloor = (struct Surface*)smlua_to_cobject(L, 1, LOT_SURFACE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'calc_new_obj_vel_and_pos_y'"); return 0; }
f32 objFloorY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'calc_new_obj_vel_and_pos_y'"); return 0; }
f32 objVelX = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'calc_new_obj_vel_and_pos_y'"); return 0; }
f32 objVelZ = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'calc_new_obj_vel_and_pos_y'"); return 0; }
extern void calc_new_obj_vel_and_pos_y(struct Surface *objFloor, f32 objFloorY, f32 objVelX, f32 objVelZ);
calc_new_obj_vel_and_pos_y(objFloor, objFloorY, objVelX, objVelZ);
@@ -10457,15 +11780,15 @@ int smlua_func_calc_new_obj_vel_and_pos_y_underwater(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
struct Surface* objFloor = (struct Surface*)smlua_to_cobject(L, 1, LOT_SURFACE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'calc_new_obj_vel_and_pos_y_underwater'"); return 0; }
f32 floorY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'calc_new_obj_vel_and_pos_y_underwater'"); return 0; }
f32 objVelX = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'calc_new_obj_vel_and_pos_y_underwater'"); return 0; }
f32 objVelZ = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'calc_new_obj_vel_and_pos_y_underwater'"); return 0; }
f32 waterY = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'calc_new_obj_vel_and_pos_y_underwater'"); return 0; }
extern void calc_new_obj_vel_and_pos_y_underwater(struct Surface *objFloor, f32 floorY, f32 objVelX, f32 objVelZ, f32 waterY);
calc_new_obj_vel_and_pos_y_underwater(objFloor, floorY, objVelX, objVelZ, waterY);
@@ -10477,9 +11800,9 @@ int smlua_func_calc_obj_friction(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 * objFriction = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'calc_obj_friction'"); return 0; }
f32 floor_nY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'calc_obj_friction'"); return 0; }
extern void calc_obj_friction(f32 *objFriction, f32 floor_nY);
calc_obj_friction(objFriction, floor_nY);
@@ -10491,7 +11814,7 @@ int smlua_func_current_mario_room_check(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 room = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'current_mario_room_check'"); return 0; }
extern s8 current_mario_room_check(s16 room);
lua_pushinteger(L, current_mario_room_check(room));
@@ -10504,11 +11827,11 @@ int smlua_func_geo_obj_transparency_something(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_obj_transparency_something'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_obj_transparency_something'"); return 0; }
// Mat4 * mtx = (Mat4 *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_obj_transparency_something'"); return 0; }
extern Gfx UNUSED *geo_obj_transparency_something(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx);
UNIMPLEMENTED -->(L, geo_obj_transparency_something(callContext, node, mtx));
@@ -10521,9 +11844,9 @@ int smlua_func_is_nearest_mario_state_to_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_nearest_mario_state_to_object'"); return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'is_nearest_mario_state_to_object'"); return 0; }
extern u8 is_nearest_mario_state_to_object(struct MarioState *m, struct Object *obj);
lua_pushinteger(L, is_nearest_mario_state_to_object(m, obj));
@@ -10535,9 +11858,9 @@ int smlua_func_is_nearest_player_to_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* m = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_nearest_player_to_object'"); return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'is_nearest_player_to_object'"); return 0; }
extern u8 is_nearest_player_to_object(struct Object *m, struct Object *obj);
lua_pushinteger(L, is_nearest_player_to_object(m, obj));
@@ -10559,7 +11882,7 @@ int smlua_func_is_player_active(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_player_active'"); return 0; }
extern u8 is_player_active(struct MarioState* m);
lua_pushinteger(L, is_player_active(m));
@@ -10571,7 +11894,7 @@ int smlua_func_is_player_in_local_area(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_player_in_local_area'"); return 0; }
extern u8 is_player_in_local_area(struct MarioState* m);
lua_pushinteger(L, is_player_in_local_area(m));
@@ -10583,15 +11906,15 @@ int smlua_func_is_point_close_to_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_point_close_to_object'"); return 0; }
f32 x = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'is_point_close_to_object'"); return 0; }
f32 y = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'is_point_close_to_object'"); return 0; }
f32 z = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'is_point_close_to_object'"); return 0; }
s32 dist = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'is_point_close_to_object'"); return 0; }
extern s8 is_point_close_to_object(struct Object *obj, f32 x, f32 y, f32 z, s32 dist);
lua_pushinteger(L, is_point_close_to_object(obj, x, y, z, dist));
@@ -10603,13 +11926,13 @@ int smlua_func_is_point_within_radius_of_mario(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
f32 x = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_point_within_radius_of_mario'"); return 0; }
f32 y = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'is_point_within_radius_of_mario'"); return 0; }
f32 z = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'is_point_within_radius_of_mario'"); return 0; }
s32 dist = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'is_point_within_radius_of_mario'"); return 0; }
extern s8 is_point_within_radius_of_mario(f32 x, f32 y, f32 z, s32 dist);
lua_pushinteger(L, is_point_within_radius_of_mario(x, y, z, dist));
@@ -10621,7 +11944,7 @@ int smlua_func_nearest_interacting_mario_state_to_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'nearest_interacting_mario_state_to_object'"); return 0; }
extern struct MarioState *nearest_interacting_mario_state_to_object(struct Object *obj);
smlua_push_object(L, LOT_MARIOSTATE, nearest_interacting_mario_state_to_object(obj));
@@ -10633,7 +11956,7 @@ int smlua_func_nearest_interacting_player_to_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'nearest_interacting_player_to_object'"); return 0; }
extern struct Object *nearest_interacting_player_to_object(struct Object *obj);
smlua_push_object(L, LOT_OBJECT, nearest_interacting_player_to_object(obj));
@@ -10645,7 +11968,7 @@ int smlua_func_nearest_mario_state_to_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'nearest_mario_state_to_object'"); return 0; }
extern struct MarioState* nearest_mario_state_to_object(struct Object *obj);
smlua_push_object(L, LOT_MARIOSTATE, nearest_mario_state_to_object(obj));
@@ -10657,7 +11980,7 @@ int smlua_func_nearest_player_to_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'nearest_player_to_object'"); return 0; }
extern struct Object* nearest_player_to_object(struct Object *obj);
smlua_push_object(L, LOT_OBJECT, nearest_player_to_object(obj));
@@ -10669,9 +11992,9 @@ int smlua_func_obj_check_floor_death(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 collisionFlags = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_check_floor_death'"); return 0; }
struct Surface* floor = (struct Surface*)smlua_to_cobject(L, 2, LOT_SURFACE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_check_floor_death'"); return 0; }
extern void obj_check_floor_death(s16 collisionFlags, struct Surface *floor);
obj_check_floor_death(collisionFlags, floor);
@@ -10683,11 +12006,11 @@ int smlua_func_obj_check_if_facing_toward_angle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
u32 base = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_check_if_facing_toward_angle'"); return 0; }
u32 goal = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_check_if_facing_toward_angle'"); return 0; }
s16 range = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_check_if_facing_toward_angle'"); return 0; }
extern s8 obj_check_if_facing_toward_angle(u32 base, u32 goal, s16 range);
lua_pushinteger(L, obj_check_if_facing_toward_angle(base, goal, range));
@@ -10699,15 +12022,15 @@ int smlua_func_obj_find_wall(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
f32 objNewX = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_find_wall'"); return 0; }
f32 objY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_find_wall'"); return 0; }
f32 objNewZ = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_find_wall'"); return 0; }
f32 objVelX = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_find_wall'"); return 0; }
f32 objVelZ = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'obj_find_wall'"); return 0; }
extern s8 obj_find_wall(f32 objNewX, f32 objY, f32 objNewZ, f32 objVelX, f32 objVelZ);
lua_pushinteger(L, obj_find_wall(objNewX, objY, objNewZ, objVelX, objVelZ));
@@ -10723,15 +12046,15 @@ int smlua_func_obj_find_wall_displacement(lua_State* L) {
dist[0] = smlua_get_number_field(1, "x");
dist[1] = smlua_get_number_field(1, "y");
dist[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_find_wall_displacement'"); return 0; }
f32 x = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_find_wall_displacement'"); return 0; }
f32 y = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_find_wall_displacement'"); return 0; }
f32 z = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_find_wall_displacement'"); return 0; }
f32 radius = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'obj_find_wall_displacement'"); return 0; }
extern s8 obj_find_wall_displacement(Vec3f dist, f32 x, f32 y, f32 z, f32 radius);
lua_pushinteger(L, obj_find_wall_displacement(dist, x, y, z, radius));
@@ -10747,9 +12070,9 @@ int smlua_func_obj_flicker_and_disappear(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_flicker_and_disappear'"); return 0; }
s16 lifeSpan = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_flicker_and_disappear'"); return 0; }
extern s8 obj_flicker_and_disappear(struct Object *obj, s16 lifeSpan);
lua_pushinteger(L, obj_flicker_and_disappear(obj, lifeSpan));
@@ -10771,7 +12094,7 @@ int smlua_func_obj_move_xyz_using_fvel_and_yaw(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_move_xyz_using_fvel_and_yaw'"); return 0; }
extern void obj_move_xyz_using_fvel_and_yaw(struct Object *obj);
obj_move_xyz_using_fvel_and_yaw(obj);
@@ -10783,13 +12106,13 @@ int smlua_func_obj_orient_graph(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_orient_graph'"); return 0; }
f32 normalX = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_orient_graph'"); return 0; }
f32 normalY = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_orient_graph'"); return 0; }
f32 normalZ = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_orient_graph'"); return 0; }
extern void obj_orient_graph(struct Object *obj, f32 normalX, f32 normalY, f32 normalZ);
obj_orient_graph(obj, normalX, normalY, normalZ);
@@ -10801,15 +12124,15 @@ int smlua_func_obj_return_and_displace_home(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_return_and_displace_home'"); return 0; }
f32 homeX = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_return_and_displace_home'"); return 0; }
f32 homeY = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_return_and_displace_home'"); return 0; }
f32 homeZ = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_return_and_displace_home'"); return 0; }
s32 baseDisp = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'obj_return_and_displace_home'"); return 0; }
extern void obj_return_and_displace_home(struct Object *obj, f32 homeX, UNUSED f32 homeY, f32 homeZ, s32 baseDisp);
obj_return_and_displace_home(obj, homeX, homeY, homeZ, baseDisp);
@@ -10821,15 +12144,15 @@ int smlua_func_obj_return_home_if_safe(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_return_home_if_safe'"); return 0; }
f32 homeX = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_return_home_if_safe'"); return 0; }
f32 y = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_return_home_if_safe'"); return 0; }
f32 homeZ = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_return_home_if_safe'"); return 0; }
s32 dist = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'obj_return_home_if_safe'"); return 0; }
extern s8 obj_return_home_if_safe(struct Object *obj, f32 homeX, f32 y, f32 homeZ, s32 dist);
lua_pushinteger(L, obj_return_home_if_safe(obj, homeX, y, homeZ, dist));
@@ -10841,9 +12164,9 @@ int smlua_func_obj_spawn_yellow_coins(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_spawn_yellow_coins'"); return 0; }
s8 nCoins = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_spawn_yellow_coins'"); return 0; }
extern void obj_spawn_yellow_coins(struct Object *obj, s8 nCoins);
obj_spawn_yellow_coins(obj, nCoins);
@@ -10855,9 +12178,9 @@ int smlua_func_obj_splash(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 waterY = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_splash'"); return 0; }
s32 objY = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_splash'"); return 0; }
extern void obj_splash(s32 waterY, s32 objY);
obj_splash(waterY, objY);
@@ -10899,9 +12222,9 @@ int smlua_func_set_object_visibility(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_object_visibility'"); return 0; }
s32 dist = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_object_visibility'"); return 0; }
extern void set_object_visibility(struct Object *obj, s32 dist);
set_object_visibility(obj, dist);
@@ -10923,13 +12246,13 @@ int smlua_func_spawn_orange_number(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s8 behParam = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_orange_number'"); return 0; }
s16 relX = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_orange_number'"); return 0; }
s16 relY = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'spawn_orange_number'"); return 0; }
s16 relZ = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'spawn_orange_number'"); return 0; }
extern void spawn_orange_number(s8 behParam, s16 relX, s16 relY, s16 relZ);
spawn_orange_number(behParam, relX, relY, relZ);
@@ -10941,13 +12264,13 @@ int smlua_func_turn_obj_away_from_steep_floor(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Surface* objFloor = (struct Surface*)smlua_to_cobject(L, 1, LOT_SURFACE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'turn_obj_away_from_steep_floor'"); return 0; }
f32 floorY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'turn_obj_away_from_steep_floor'"); return 0; }
f32 objVelX = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'turn_obj_away_from_steep_floor'"); return 0; }
f32 objVelZ = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'turn_obj_away_from_steep_floor'"); return 0; }
extern s8 turn_obj_away_from_steep_floor(struct Surface *objFloor, f32 floorY, f32 objVelX, f32 objVelZ);
lua_pushinteger(L, turn_obj_away_from_steep_floor(objFloor, floorY, objVelX, objVelZ));
@@ -10959,19 +12282,19 @@ int smlua_func_turn_obj_away_from_surface(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 7)) { return 0; }
f32 velX = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'turn_obj_away_from_surface'"); return 0; }
f32 velZ = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'turn_obj_away_from_surface'"); return 0; }
f32 nX = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'turn_obj_away_from_surface'"); return 0; }
f32 nY = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'turn_obj_away_from_surface'"); return 0; }
f32 nZ = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'turn_obj_away_from_surface'"); return 0; }
f32 * objYawX = (f32 *)smlua_to_cpointer(L, 6, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'turn_obj_away_from_surface'"); return 0; }
f32 * objYawZ = (f32 *)smlua_to_cpointer(L, 7, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7 for function 'turn_obj_away_from_surface'"); return 0; }
extern void turn_obj_away_from_surface(f32 velX, f32 velZ, f32 nX, UNUSED f32 nY, f32 nZ, f32 *objYawX, f32 *objYawZ);
turn_obj_away_from_surface(velX, velZ, nX, nY, nZ, objYawX, objYawZ);
@@ -10987,11 +12310,11 @@ int smlua_func_approach_f32_ptr(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 * px = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_f32_ptr'"); return 0; }
f32 target = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_f32_ptr'"); return 0; }
f32 delta = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_f32_ptr'"); return 0; }
extern s32 approach_f32_ptr(f32 *px, f32 target, f32 delta);
lua_pushinteger(L, approach_f32_ptr(px, target, delta));
@@ -11003,7 +12326,7 @@ int smlua_func_cur_obj_init_anim_and_check_if_end(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 arg0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_init_anim_and_check_if_end'"); return 0; }
extern s32 cur_obj_init_anim_and_check_if_end(s32 arg0);
lua_pushinteger(L, cur_obj_init_anim_and_check_if_end(arg0));
@@ -11015,9 +12338,9 @@ int smlua_func_cur_obj_init_anim_check_frame(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 arg0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_init_anim_check_frame'"); return 0; }
s32 arg1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_init_anim_check_frame'"); return 0; }
extern s32 cur_obj_init_anim_check_frame(s32 arg0, s32 arg1);
lua_pushinteger(L, cur_obj_init_anim_check_frame(arg0, arg1));
@@ -11029,7 +12352,7 @@ int smlua_func_cur_obj_init_anim_extend(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 arg0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_init_anim_extend'"); return 0; }
extern void cur_obj_init_anim_extend(s32 arg0);
cur_obj_init_anim_extend(arg0);
@@ -11041,11 +12364,11 @@ int smlua_func_cur_obj_play_sound_at_anim_range(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s8 arg0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_play_sound_at_anim_range'"); return 0; }
s8 arg1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_play_sound_at_anim_range'"); return 0; }
u32 sound = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_play_sound_at_anim_range'"); return 0; }
extern s32 cur_obj_play_sound_at_anim_range(s8 arg0, s8 arg1, u32 sound);
lua_pushinteger(L, cur_obj_play_sound_at_anim_range(arg0, arg1, sound));
@@ -11057,7 +12380,7 @@ int smlua_func_cur_obj_set_anim_if_at_end(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 arg0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_set_anim_if_at_end'"); return 0; }
extern s32 cur_obj_set_anim_if_at_end(s32 arg0);
lua_pushinteger(L, cur_obj_set_anim_if_at_end(arg0));
@@ -11069,9 +12392,9 @@ int smlua_func_cur_obj_spin_all_dimensions(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 arg0 = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_spin_all_dimensions'"); return 0; }
f32 arg1 = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_spin_all_dimensions'"); return 0; }
extern void cur_obj_spin_all_dimensions(f32 arg0, f32 arg1);
cur_obj_spin_all_dimensions(arg0, arg1);
@@ -11083,7 +12406,7 @@ int smlua_func_obj_act_knockback(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 baseScale = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_act_knockback'"); return 0; }
extern void obj_act_knockback(UNUSED f32 baseScale);
obj_act_knockback(baseScale);
@@ -11095,7 +12418,7 @@ int smlua_func_obj_act_squished(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 baseScale = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_act_squished'"); return 0; }
extern void obj_act_squished(f32 baseScale);
obj_act_squished(baseScale);
@@ -11107,7 +12430,7 @@ int smlua_func_obj_bounce_off_walls_edges_objects(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 * targetYaw = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_bounce_off_walls_edges_objects'"); return 0; }
extern s32 obj_bounce_off_walls_edges_objects(s32 *targetYaw);
lua_pushinteger(L, obj_bounce_off_walls_edges_objects(targetYaw));
@@ -11119,9 +12442,9 @@ int smlua_func_obj_check_attacks(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_check_attacks'"); return 0; }
s32 attackedMarioAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_check_attacks'"); return 0; }
extern s32 obj_check_attacks(struct ObjectHitbox *hitbox, s32 attackedMarioAction);
lua_pushinteger(L, obj_check_attacks(hitbox, attackedMarioAction));
@@ -11133,7 +12456,7 @@ int smlua_func_obj_compute_vel_from_move_pitch(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 speed = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_compute_vel_from_move_pitch'"); return 0; }
extern void obj_compute_vel_from_move_pitch(f32 speed);
obj_compute_vel_from_move_pitch(speed);
@@ -11165,9 +12488,9 @@ int smlua_func_obj_face_pitch_approach(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 targetPitch = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_face_pitch_approach'"); return 0; }
s16 deltaPitch = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_face_pitch_approach'"); return 0; }
extern s32 obj_face_pitch_approach(s16 targetPitch, s16 deltaPitch);
lua_pushinteger(L, obj_face_pitch_approach(targetPitch, deltaPitch));
@@ -11179,9 +12502,9 @@ int smlua_func_obj_face_roll_approach(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 targetRoll = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_face_roll_approach'"); return 0; }
s16 deltaRoll = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_face_roll_approach'"); return 0; }
extern s32 obj_face_roll_approach(s16 targetRoll, s16 deltaRoll);
lua_pushinteger(L, obj_face_roll_approach(targetRoll, deltaRoll));
@@ -11193,9 +12516,9 @@ int smlua_func_obj_face_yaw_approach(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 targetYaw = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_face_yaw_approach'"); return 0; }
s16 deltaYaw = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_face_yaw_approach'"); return 0; }
extern s32 obj_face_yaw_approach(s16 targetYaw, s16 deltaYaw);
lua_pushinteger(L, obj_face_yaw_approach(targetYaw, deltaYaw));
@@ -11207,9 +12530,9 @@ int smlua_func_obj_forward_vel_approach(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 target = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_forward_vel_approach'"); return 0; }
f32 delta = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_forward_vel_approach'"); return 0; }
extern s32 obj_forward_vel_approach(f32 target, f32 delta);
lua_pushinteger(L, obj_forward_vel_approach(target, delta));
@@ -11231,7 +12554,7 @@ int smlua_func_obj_get_pitch_to_home(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 latDistToHome = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_pitch_to_home'"); return 0; }
extern s16 obj_get_pitch_to_home(f32 latDistToHome);
lua_pushinteger(L, obj_get_pitch_to_home(latDistToHome));
@@ -11243,11 +12566,11 @@ int smlua_func_obj_grow_then_shrink(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 * scaleVel = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_grow_then_shrink'"); return 0; }
f32 shootFireScale = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_grow_then_shrink'"); return 0; }
f32 endScale = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_grow_then_shrink'"); return 0; }
extern s32 obj_grow_then_shrink(f32 *scaleVel, f32 shootFireScale, f32 endScale);
lua_pushinteger(L, obj_grow_then_shrink(scaleVel, shootFireScale, endScale));
@@ -11259,11 +12582,11 @@ int smlua_func_obj_handle_attacks(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_handle_attacks'"); return 0; }
s32 attackedMarioAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_handle_attacks'"); return 0; }
u8 * attackHandlers = (u8 *)smlua_to_cpointer(L, 3, LVT_U8_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_handle_attacks'"); return 0; }
extern s32 obj_handle_attacks(struct ObjectHitbox *hitbox, s32 attackedMarioAction, u8 *attackHandlers);
lua_pushinteger(L, obj_handle_attacks(hitbox, attackedMarioAction, attackHandlers));
@@ -11275,11 +12598,11 @@ int smlua_func_obj_is_near_to_and_facing_mario(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_is_near_to_and_facing_mario'"); return 0; }
f32 maxDist = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_is_near_to_and_facing_mario'"); return 0; }
s16 maxAngleDiff = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_is_near_to_and_facing_mario'"); return 0; }
extern s32 obj_is_near_to_and_facing_mario(struct MarioState* m, f32 maxDist, s16 maxAngleDiff);
lua_pushinteger(L, obj_is_near_to_and_facing_mario(m, maxDist, maxAngleDiff));
@@ -11301,7 +12624,7 @@ int smlua_func_obj_move_for_one_second(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 endAction = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_move_for_one_second'"); return 0; }
extern s32 obj_move_for_one_second(s32 endAction);
lua_pushinteger(L, obj_move_for_one_second(endAction));
@@ -11313,9 +12636,9 @@ int smlua_func_obj_move_pitch_approach(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 target = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_move_pitch_approach'"); return 0; }
s16 delta = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_move_pitch_approach'"); return 0; }
extern s32 obj_move_pitch_approach(s16 target, s16 delta);
lua_pushinteger(L, obj_move_pitch_approach(target, delta));
@@ -11327,7 +12650,7 @@ int smlua_func_obj_random_fixed_turn(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 delta = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_random_fixed_turn'"); return 0; }
extern s16 obj_random_fixed_turn(s16 delta);
lua_pushinteger(L, obj_random_fixed_turn(delta));
@@ -11339,9 +12662,9 @@ int smlua_func_obj_resolve_collisions_and_turn(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 targetYaw = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_resolve_collisions_and_turn'"); return 0; }
s16 turnSpeed = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_resolve_collisions_and_turn'"); return 0; }
extern s32 obj_resolve_collisions_and_turn(s16 targetYaw, s16 turnSpeed);
lua_pushinteger(L, obj_resolve_collisions_and_turn(targetYaw, turnSpeed));
@@ -11353,7 +12676,7 @@ int smlua_func_obj_resolve_object_collisions(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 * targetYaw = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_resolve_object_collisions'"); return 0; }
extern s32 obj_resolve_object_collisions(s32 *targetYaw);
lua_pushinteger(L, obj_resolve_object_collisions(targetYaw));
@@ -11365,11 +12688,11 @@ int smlua_func_obj_roll_to_match_yaw_turn(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 targetYaw = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_roll_to_match_yaw_turn'"); return 0; }
s16 maxRoll = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_roll_to_match_yaw_turn'"); return 0; }
s16 rollSpeed = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_roll_to_match_yaw_turn'"); return 0; }
extern void obj_roll_to_match_yaw_turn(s16 targetYaw, s16 maxRoll, s16 rollSpeed);
obj_roll_to_match_yaw_turn(targetYaw, maxRoll, rollSpeed);
@@ -11381,9 +12704,9 @@ int smlua_func_obj_rotate_yaw_and_bounce_off_walls(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 targetYaw = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_rotate_yaw_and_bounce_off_walls'"); return 0; }
s16 turnAmount = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_rotate_yaw_and_bounce_off_walls'"); return 0; }
extern void obj_rotate_yaw_and_bounce_off_walls(s16 targetYaw, s16 turnAmount);
obj_rotate_yaw_and_bounce_off_walls(targetYaw, turnAmount);
@@ -11395,7 +12718,7 @@ int smlua_func_obj_set_dist_from_home(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 distFromHome = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_dist_from_home'"); return 0; }
extern void obj_set_dist_from_home(f32 distFromHome);
obj_set_dist_from_home(distFromHome);
@@ -11407,7 +12730,7 @@ int smlua_func_obj_set_knockback_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 attackType = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_knockback_action'"); return 0; }
extern void obj_set_knockback_action(s32 attackType);
obj_set_knockback_action(attackType);
@@ -11429,19 +12752,19 @@ int smlua_func_obj_smooth_turn(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 7)) { return 0; }
s16 * angleVel = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_smooth_turn'"); return 0; }
s32 * angle = (s32 *)smlua_to_cpointer(L, 2, LVT_S32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_smooth_turn'"); return 0; }
s16 targetAngle = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_smooth_turn'"); return 0; }
f32 targetSpeedProportion = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_smooth_turn'"); return 0; }
s16 accel = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'obj_smooth_turn'"); return 0; }
s16 minSpeed = smlua_to_integer(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'obj_smooth_turn'"); return 0; }
s16 maxSpeed = smlua_to_integer(L, 7);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7 for function 'obj_smooth_turn'"); return 0; }
extern s32 obj_smooth_turn(s16 *angleVel, s32 *angle, s16 targetAngle, f32 targetSpeedProportion, s16 accel, s16 minSpeed, s16 maxSpeed);
lua_pushinteger(L, obj_smooth_turn(angleVel, angle, targetAngle, targetSpeedProportion, accel, minSpeed, maxSpeed));
@@ -11453,21 +12776,21 @@ int smlua_func_obj_spit_fire(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 8)) { return 0; }
s16 relativePosX = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_spit_fire'"); return 0; }
s16 relativePosY = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_spit_fire'"); return 0; }
s16 relativePosZ = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_spit_fire'"); return 0; }
f32 scale = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_spit_fire'"); return 0; }
s32 model = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'obj_spit_fire'"); return 0; }
f32 startSpeed = smlua_to_number(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'obj_spit_fire'"); return 0; }
f32 endSpeed = smlua_to_number(L, 7);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7 for function 'obj_spit_fire'"); return 0; }
s16 movePitch = smlua_to_integer(L, 8);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 8"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 8 for function 'obj_spit_fire'"); return 0; }
extern struct Object* obj_spit_fire(s16 relativePosX, s16 relativePosY, s16 relativePosZ, f32 scale, s32 model, f32 startSpeed, f32 endSpeed, s16 movePitch);
smlua_push_object(L, LOT_OBJECT, obj_spit_fire(relativePosX, relativePosY, relativePosZ, scale, model, startSpeed, endSpeed, movePitch));
@@ -11479,11 +12802,11 @@ int smlua_func_obj_turn_pitch_toward_mario(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_turn_pitch_toward_mario'"); return 0; }
f32 targetOffsetY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_turn_pitch_toward_mario'"); return 0; }
s16 turnAmount = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_turn_pitch_toward_mario'"); return 0; }
extern s16 obj_turn_pitch_toward_mario(struct MarioState* m, f32 targetOffsetY, s16 turnAmount);
lua_pushinteger(L, obj_turn_pitch_toward_mario(m, targetOffsetY, turnAmount));
@@ -11505,13 +12828,13 @@ int smlua_func_obj_update_blinking(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s32 * blinkTimer = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_update_blinking'"); return 0; }
s16 baseCycleLength = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_update_blinking'"); return 0; }
s16 cycleLengthRange = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_update_blinking'"); return 0; }
s16 blinkLength = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_update_blinking'"); return 0; }
extern void obj_update_blinking(s32 *blinkTimer, s16 baseCycleLength, s16 cycleLengthRange, s16 blinkLength);
obj_update_blinking(blinkTimer, baseCycleLength, cycleLengthRange, blinkLength);
@@ -11523,7 +12846,7 @@ int smlua_func_obj_update_standard_actions(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 scale = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_update_standard_actions'"); return 0; }
extern s32 obj_update_standard_actions(f32 scale);
lua_pushinteger(L, obj_update_standard_actions(scale));
@@ -11535,9 +12858,9 @@ int smlua_func_obj_y_vel_approach(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 target = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_y_vel_approach'"); return 0; }
f32 delta = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_y_vel_approach'"); return 0; }
extern s32 obj_y_vel_approach(f32 target, f32 delta);
lua_pushinteger(L, obj_y_vel_approach(target, delta));
@@ -11549,17 +12872,17 @@ int smlua_func_oscillate_toward(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
s32 * value = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'oscillate_toward'"); return 0; }
f32 * vel = (f32 *)smlua_to_cpointer(L, 2, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'oscillate_toward'"); return 0; }
s32 target = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'oscillate_toward'"); return 0; }
f32 velCloseToZero = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'oscillate_toward'"); return 0; }
f32 accel = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'oscillate_toward'"); return 0; }
f32 slowdown = smlua_to_number(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'oscillate_toward'"); return 0; }
extern s32 oscillate_toward(s32 *value, f32 *vel, s32 target, f32 velCloseToZero, f32 accel, f32 slowdown);
lua_pushinteger(L, oscillate_toward(value, vel, target, velCloseToZero, accel, slowdown));
@@ -11571,13 +12894,13 @@ int smlua_func_platform_on_track_update_pos_or_spawn_ball(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s32 ballIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'platform_on_track_update_pos_or_spawn_ball'"); return 0; }
f32 x = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'platform_on_track_update_pos_or_spawn_ball'"); return 0; }
f32 y = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'platform_on_track_update_pos_or_spawn_ball'"); return 0; }
f32 z = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'platform_on_track_update_pos_or_spawn_ball'"); return 0; }
extern void platform_on_track_update_pos_or_spawn_ball(s32 ballIndex, f32 x, f32 y, f32 z);
platform_on_track_update_pos_or_spawn_ball(ballIndex, x, y, z);
@@ -11589,9 +12912,9 @@ int smlua_func_random_linear_offset(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 base = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'random_linear_offset'"); return 0; }
s16 range = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'random_linear_offset'"); return 0; }
extern s16 random_linear_offset(s16 base, s16 range);
lua_pushinteger(L, random_linear_offset(base, range));
@@ -11603,11 +12926,11 @@ int smlua_func_random_mod_offset(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 base = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'random_mod_offset'"); return 0; }
s16 step = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'random_mod_offset'"); return 0; }
s16 mod = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'random_mod_offset'"); return 0; }
extern s16 random_mod_offset(s16 base, s16 step, s16 mod);
lua_pushinteger(L, random_mod_offset(base, step, mod));
@@ -11619,11 +12942,11 @@ int smlua_func_treat_far_home_as_mario(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 threshold = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'treat_far_home_as_mario'"); return 0; }
s32* distanceToPlayer = (s32*)smlua_to_cpointer(L, 2, LVT_S32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'treat_far_home_as_mario'"); return 0; }
s32* angleToPlayer = (s32*)smlua_to_cpointer(L, 3, LVT_S32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'treat_far_home_as_mario'"); return 0; }
extern void treat_far_home_as_mario(f32 threshold, s32* distanceToPlayer, s32* angleToPlayer);
treat_far_home_as_mario(threshold, distanceToPlayer, angleToPlayer);
@@ -11639,9 +12962,9 @@ int smlua_func_abs_angle_diff(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 x0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'abs_angle_diff'"); return 0; }
s16 x1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'abs_angle_diff'"); return 0; }
extern s16 abs_angle_diff(s16 x0, s16 x1);
lua_pushinteger(L, abs_angle_diff(x0, x1));
@@ -11653,9 +12976,9 @@ int smlua_func_apply_drag_to_value(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 * value = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'apply_drag_to_value'"); return 0; }
f32 dragStrength = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'apply_drag_to_value'"); return 0; }
extern void apply_drag_to_value(f32 *value, f32 dragStrength);
apply_drag_to_value(value, dragStrength);
@@ -11667,11 +12990,11 @@ int smlua_func_approach_f32_signed(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 * value = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_f32_signed'"); return 0; }
f32 target = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_f32_signed'"); return 0; }
f32 increment = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_f32_signed'"); return 0; }
extern s32 approach_f32_signed(f32 *value, f32 target, f32 increment);
lua_pushinteger(L, approach_f32_signed(value, target, increment));
@@ -11683,11 +13006,11 @@ int smlua_func_approach_f32_symmetric(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 value = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_f32_symmetric'"); return 0; }
f32 target = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_f32_symmetric'"); return 0; }
f32 increment = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_f32_symmetric'"); return 0; }
extern f32 approach_f32_symmetric(f32 value, f32 target, f32 increment);
lua_pushnumber(L, approach_f32_symmetric(value, target, increment));
@@ -11699,11 +13022,11 @@ int smlua_func_approach_s16_symmetric(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s16 value = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'approach_s16_symmetric'"); return 0; }
s16 target = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'approach_s16_symmetric'"); return 0; }
s16 increment = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'approach_s16_symmetric'"); return 0; }
extern s16 approach_s16_symmetric(s16 value, s16 target, s16 increment);
lua_pushinteger(L, approach_s16_symmetric(value, target, increment));
@@ -11735,7 +13058,7 @@ int smlua_func_bit_shift_left(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 a0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'bit_shift_left'"); return 0; }
extern s32 bit_shift_left(s32 a0);
lua_pushinteger(L, bit_shift_left(a0));
@@ -11747,7 +13070,7 @@ int smlua_func_chain_segment_init(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct ChainSegment* segment = (struct ChainSegment*)smlua_to_cobject(L, 1, LOT_CHAINSEGMENT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'chain_segment_init'"); return 0; }
extern void chain_segment_init(struct ChainSegment *segment);
chain_segment_init(segment);
@@ -11759,9 +13082,9 @@ int smlua_func_clear_move_flag(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
u32 * bitSet = (u32 *)smlua_to_cpointer(L, 1, LVT_U32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'clear_move_flag'"); return 0; }
s32 flag = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'clear_move_flag'"); return 0; }
extern s32 clear_move_flag(u32 *bitSet, s32 flag);
lua_pushinteger(L, clear_move_flag(bitSet, flag));
@@ -11773,7 +13096,7 @@ int smlua_func_clear_time_stop_flags(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 flags = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'clear_time_stop_flags'"); return 0; }
extern void clear_time_stop_flags(s32 flags);
clear_time_stop_flags(flags);
@@ -11785,7 +13108,7 @@ int smlua_func_count_objects_with_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'count_objects_with_behavior'"); return 0; }
extern s32 count_objects_with_behavior(const BehaviorScript *behavior);
lua_pushinteger(L, count_objects_with_behavior(behavior));
@@ -11808,11 +13131,11 @@ int smlua_func_create_transformation_from_matrices(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
// Mat4 a0 = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'create_transformation_from_matrices'"); return 0; }
// Mat4 a1 = (Mat4)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'create_transformation_from_matrices'"); return 0; }
// Mat4 a2 = (Mat4)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'create_transformation_from_matrices'"); return 0; }
extern void create_transformation_from_matrices(Mat4 a0, Mat4 a1, Mat4 a2);
create_transformation_from_matrices(a0, a1, a2);
@@ -11865,7 +13188,7 @@ int smlua_func_cur_obj_apply_drag_xz(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 dragStrength = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_apply_drag_xz'"); return 0; }
extern void cur_obj_apply_drag_xz(f32 dragStrength);
cur_obj_apply_drag_xz(dragStrength);
@@ -11897,13 +13220,13 @@ int smlua_func_cur_obj_can_mario_activate_textbox(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_can_mario_activate_textbox'"); return 0; }
f32 radius = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_can_mario_activate_textbox'"); return 0; }
f32 height = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_can_mario_activate_textbox'"); return 0; }
s32 unused = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'cur_obj_can_mario_activate_textbox'"); return 0; }
extern s32 cur_obj_can_mario_activate_textbox(struct MarioState* m, f32 radius, f32 height, UNUSED s32 unused);
lua_pushinteger(L, cur_obj_can_mario_activate_textbox(m, radius, height, unused));
@@ -11915,11 +13238,11 @@ int smlua_func_cur_obj_can_mario_activate_textbox_2(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_can_mario_activate_textbox_2'"); return 0; }
f32 radius = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_can_mario_activate_textbox_2'"); return 0; }
f32 height = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_can_mario_activate_textbox_2'"); return 0; }
extern s32 cur_obj_can_mario_activate_textbox_2(struct MarioState* m, f32 radius, f32 height);
lua_pushinteger(L, cur_obj_can_mario_activate_textbox_2(m, radius, height));
@@ -11931,7 +13254,7 @@ int smlua_func_cur_obj_change_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 action = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_change_action'"); return 0; }
extern void cur_obj_change_action(s32 action);
cur_obj_change_action(action);
@@ -11943,7 +13266,7 @@ int smlua_func_cur_obj_check_anim_frame(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 frame = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_check_anim_frame'"); return 0; }
extern s32 cur_obj_check_anim_frame(s32 frame);
lua_pushinteger(L, cur_obj_check_anim_frame(frame));
@@ -11955,9 +13278,9 @@ int smlua_func_cur_obj_check_anim_frame_in_range(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 startFrame = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_check_anim_frame_in_range'"); return 0; }
s32 rangeLength = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_check_anim_frame_in_range'"); return 0; }
extern s32 cur_obj_check_anim_frame_in_range(s32 startFrame, s32 rangeLength);
lua_pushinteger(L, cur_obj_check_anim_frame_in_range(startFrame, rangeLength));
@@ -11969,7 +13292,7 @@ int smlua_func_cur_obj_check_frame_prior_current_frame(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 * a0 = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_check_frame_prior_current_frame'"); return 0; }
extern s32 cur_obj_check_frame_prior_current_frame(s16 *a0);
lua_pushinteger(L, cur_obj_check_frame_prior_current_frame(a0));
@@ -12021,7 +13344,7 @@ int smlua_func_cur_obj_clear_interact_status_flag(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 flag = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_clear_interact_status_flag'"); return 0; }
extern s32 cur_obj_clear_interact_status_flag(s32 flag);
lua_pushinteger(L, cur_obj_clear_interact_status_flag(flag));
@@ -12043,9 +13366,9 @@ int smlua_func_cur_obj_count_objects_with_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_count_objects_with_behavior'"); return 0; }
f32 dist = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_count_objects_with_behavior'"); return 0; }
extern u16 cur_obj_count_objects_with_behavior(const BehaviorScript* behavior, f32 dist);
lua_pushinteger(L, cur_obj_count_objects_with_behavior(behavior, dist));
@@ -12057,7 +13380,7 @@ int smlua_func_cur_obj_detect_steep_floor(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 steepAngleDegrees = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_detect_steep_floor'"); return 0; }
extern s32 cur_obj_detect_steep_floor(s16 steepAngleDegrees);
lua_pushinteger(L, cur_obj_detect_steep_floor(steepAngleDegrees));
@@ -12089,7 +13412,7 @@ int smlua_func_cur_obj_disable_rendering_and_become_intangible(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_disable_rendering_and_become_intangible'"); return 0; }
extern void cur_obj_disable_rendering_and_become_intangible(struct Object *obj);
cur_obj_disable_rendering_and_become_intangible(obj);
@@ -12101,7 +13424,7 @@ int smlua_func_cur_obj_dist_to_nearest_object_with_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_dist_to_nearest_object_with_behavior'"); return 0; }
extern f32 cur_obj_dist_to_nearest_object_with_behavior(const BehaviorScript *behavior);
lua_pushnumber(L, cur_obj_dist_to_nearest_object_with_behavior(behavior));
@@ -12133,7 +13456,7 @@ int smlua_func_cur_obj_enable_rendering_and_become_tangible(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_enable_rendering_and_become_tangible'"); return 0; }
extern void cur_obj_enable_rendering_and_become_tangible(struct Object *obj);
cur_obj_enable_rendering_and_become_tangible(obj);
@@ -12155,11 +13478,11 @@ int smlua_func_cur_obj_end_dialog(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_end_dialog'"); return 0; }
s32 dialogFlags = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_end_dialog'"); return 0; }
s32 dialogResult = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_end_dialog'"); return 0; }
extern void cur_obj_end_dialog(struct MarioState* m, s32 dialogFlags, s32 dialogResult);
cur_obj_end_dialog(m, dialogFlags, dialogResult);
@@ -12181,9 +13504,9 @@ int smlua_func_cur_obj_find_nearby_held_actor(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_find_nearby_held_actor'"); return 0; }
f32 maxDist = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_find_nearby_held_actor'"); return 0; }
extern struct Object *cur_obj_find_nearby_held_actor(const BehaviorScript *behavior, f32 maxDist);
smlua_push_object(L, LOT_OBJECT, cur_obj_find_nearby_held_actor(behavior, maxDist));
@@ -12195,9 +13518,9 @@ int smlua_func_cur_obj_find_nearest_object_with_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_find_nearest_object_with_behavior'"); return 0; }
f32 * dist = (f32 *)smlua_to_cpointer(L, 2, LVT_F32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_find_nearest_object_with_behavior'"); return 0; }
extern struct Object *cur_obj_find_nearest_object_with_behavior(const BehaviorScript *behavior, f32 *dist);
smlua_push_object(L, LOT_OBJECT, cur_obj_find_nearest_object_with_behavior(behavior, dist));
@@ -12219,7 +13542,7 @@ int smlua_func_cur_obj_follow_path(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 unusedArg = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_follow_path'"); return 0; }
extern s32 cur_obj_follow_path(UNUSED s32 unusedArg);
lua_pushinteger(L, cur_obj_follow_path(unusedArg));
@@ -12231,9 +13554,9 @@ int smlua_func_cur_obj_forward_vel_approach_upward(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 target = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_forward_vel_approach_upward'"); return 0; }
f32 increment = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_forward_vel_approach_upward'"); return 0; }
extern void cur_obj_forward_vel_approach_upward(f32 target, f32 increment);
cur_obj_forward_vel_approach_upward(target, increment);
@@ -12255,11 +13578,11 @@ int smlua_func_cur_obj_get_thrown_or_placed(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 forwardVel = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_get_thrown_or_placed'"); return 0; }
f32 velY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_get_thrown_or_placed'"); return 0; }
s32 thrownAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_get_thrown_or_placed'"); return 0; }
extern void cur_obj_get_thrown_or_placed(f32 forwardVel, f32 velY, s32 thrownAction);
cur_obj_get_thrown_or_placed(forwardVel, velY, thrownAction);
@@ -12271,7 +13594,7 @@ int smlua_func_cur_obj_has_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_has_behavior'"); return 0; }
extern s32 cur_obj_has_behavior(const BehaviorScript *behavior);
lua_pushinteger(L, cur_obj_has_behavior(behavior));
@@ -12283,7 +13606,7 @@ int smlua_func_cur_obj_has_model(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u16 modelID = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_has_model'"); return 0; }
extern s32 cur_obj_has_model(u16 modelID);
lua_pushinteger(L, cur_obj_has_model(modelID));
@@ -12305,7 +13628,7 @@ int smlua_func_cur_obj_hide_if_mario_far_away_y(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 distY = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_hide_if_mario_far_away_y'"); return 0; }
extern s32 cur_obj_hide_if_mario_far_away_y(f32 distY);
lua_pushinteger(L, cur_obj_hide_if_mario_far_away_y(distY));
@@ -12327,7 +13650,7 @@ int smlua_func_cur_obj_init_animation(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 animIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_init_animation'"); return 0; }
extern void cur_obj_init_animation(s32 animIndex);
cur_obj_init_animation(animIndex);
@@ -12339,9 +13662,9 @@ int smlua_func_cur_obj_init_animation_and_anim_frame(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 animIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_init_animation_and_anim_frame'"); return 0; }
s32 animFrame = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_init_animation_and_anim_frame'"); return 0; }
extern void cur_obj_init_animation_and_anim_frame(s32 animIndex, s32 animFrame);
cur_obj_init_animation_and_anim_frame(animIndex, animFrame);
@@ -12353,7 +13676,7 @@ int smlua_func_cur_obj_init_animation_and_check_if_near_end(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 animIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_init_animation_and_check_if_near_end'"); return 0; }
extern s32 cur_obj_init_animation_and_check_if_near_end(s32 animIndex);
lua_pushinteger(L, cur_obj_init_animation_and_check_if_near_end(animIndex));
@@ -12365,7 +13688,7 @@ int smlua_func_cur_obj_init_animation_and_extend_if_at_end(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 animIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_init_animation_and_extend_if_at_end'"); return 0; }
extern void cur_obj_init_animation_and_extend_if_at_end(s32 animIndex);
cur_obj_init_animation_and_extend_if_at_end(animIndex);
@@ -12377,9 +13700,9 @@ int smlua_func_cur_obj_init_animation_with_accel_and_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 animIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_init_animation_with_accel_and_sound'"); return 0; }
f32 accel = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_init_animation_with_accel_and_sound'"); return 0; }
extern void cur_obj_init_animation_with_accel_and_sound(s32 animIndex, f32 accel);
cur_obj_init_animation_with_accel_and_sound(animIndex, accel);
@@ -12391,7 +13714,7 @@ int smlua_func_cur_obj_init_animation_with_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 animIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_init_animation_with_sound'"); return 0; }
extern void cur_obj_init_animation_with_sound(s32 animIndex);
cur_obj_init_animation_with_sound(animIndex);
@@ -12443,7 +13766,7 @@ int smlua_func_cur_obj_lateral_dist_from_obj_to_home(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_lateral_dist_from_obj_to_home'"); return 0; }
extern f32 cur_obj_lateral_dist_from_obj_to_home(struct Object *obj);
lua_pushnumber(L, cur_obj_lateral_dist_from_obj_to_home(obj));
@@ -12475,9 +13798,9 @@ int smlua_func_cur_obj_move_after_thrown_or_dropped(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 forwardVel = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_move_after_thrown_or_dropped'"); return 0; }
f32 velY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_move_after_thrown_or_dropped'"); return 0; }
extern void cur_obj_move_after_thrown_or_dropped(f32 forwardVel, f32 velY);
cur_obj_move_after_thrown_or_dropped(forwardVel, velY);
@@ -12489,7 +13812,7 @@ int smlua_func_cur_obj_move_standard(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 steepSlopeAngleDegrees = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_move_standard'"); return 0; }
extern void cur_obj_move_standard(s16 steepSlopeAngleDegrees);
cur_obj_move_standard(steepSlopeAngleDegrees);
@@ -12501,7 +13824,7 @@ int smlua_func_cur_obj_move_up_and_down(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 a0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_move_up_and_down'"); return 0; }
extern s32 cur_obj_move_up_and_down(s32 a0);
lua_pushinteger(L, cur_obj_move_up_and_down(a0));
@@ -12513,9 +13836,9 @@ int smlua_func_cur_obj_move_update_ground_air_flags(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 gravity = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_move_update_ground_air_flags'"); return 0; }
f32 bounciness = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_move_update_ground_air_flags'"); return 0; }
extern void cur_obj_move_update_ground_air_flags(UNUSED f32 gravity, f32 bounciness);
cur_obj_move_update_ground_air_flags(gravity, bounciness);
@@ -12567,9 +13890,9 @@ int smlua_func_cur_obj_move_xz(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 steepSlopeNormalY = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_move_xz'"); return 0; }
s32 careAboutEdgesAndSteepSlopes = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_move_xz'"); return 0; }
extern s32 cur_obj_move_xz(f32 steepSlopeNormalY, s32 careAboutEdgesAndSteepSlopes);
lua_pushinteger(L, cur_obj_move_xz(steepSlopeNormalY, careAboutEdgesAndSteepSlopes));
@@ -12591,11 +13914,11 @@ int smlua_func_cur_obj_move_y(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 gravity = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_move_y'"); return 0; }
f32 bounciness = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_move_y'"); return 0; }
f32 buoyancy = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_move_y'"); return 0; }
extern void cur_obj_move_y(f32 gravity, f32 bounciness, f32 buoyancy);
cur_obj_move_y(gravity, bounciness, buoyancy);
@@ -12607,9 +13930,9 @@ int smlua_func_cur_obj_move_y_and_get_water_level(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 gravity = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_move_y_and_get_water_level'"); return 0; }
f32 buoyancy = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_move_y_and_get_water_level'"); return 0; }
extern f32 cur_obj_move_y_and_get_water_level(f32 gravity, f32 buoyancy);
lua_pushnumber(L, cur_obj_move_y_and_get_water_level(gravity, buoyancy));
@@ -12631,7 +13954,7 @@ int smlua_func_cur_obj_nearest_object_with_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_nearest_object_with_behavior'"); return 0; }
extern struct Object *cur_obj_nearest_object_with_behavior(const BehaviorScript *behavior);
smlua_push_object(L, LOT_OBJECT, cur_obj_nearest_object_with_behavior(behavior));
@@ -12643,13 +13966,13 @@ int smlua_func_cur_obj_outside_home_rectangle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
f32 minX = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_outside_home_rectangle'"); return 0; }
f32 maxX = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_outside_home_rectangle'"); return 0; }
f32 minZ = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_outside_home_rectangle'"); return 0; }
f32 maxZ = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'cur_obj_outside_home_rectangle'"); return 0; }
extern s32 cur_obj_outside_home_rectangle(f32 minX, f32 maxX, f32 minZ, f32 maxZ);
lua_pushinteger(L, cur_obj_outside_home_rectangle(minX, maxX, minZ, maxZ));
@@ -12661,7 +13984,7 @@ int smlua_func_cur_obj_outside_home_square(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 halfLength = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_outside_home_square'"); return 0; }
extern s32 cur_obj_outside_home_square(f32 halfLength);
lua_pushinteger(L, cur_obj_outside_home_square(halfLength));
@@ -12683,7 +14006,7 @@ int smlua_func_cur_obj_push_mario_away(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 radius = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_push_mario_away'"); return 0; }
extern void cur_obj_push_mario_away(f32 radius);
cur_obj_push_mario_away(radius);
@@ -12695,9 +14018,9 @@ int smlua_func_cur_obj_push_mario_away_from_cylinder(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 radius = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_push_mario_away_from_cylinder'"); return 0; }
f32 extentY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_push_mario_away_from_cylinder'"); return 0; }
extern void cur_obj_push_mario_away_from_cylinder(f32 radius, f32 extentY);
cur_obj_push_mario_away_from_cylinder(radius, extentY);
@@ -12769,9 +14092,9 @@ int smlua_func_cur_obj_rotate_yaw_toward(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 target = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_rotate_yaw_toward'"); return 0; }
s16 increment = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_rotate_yaw_toward'"); return 0; }
extern s32 cur_obj_rotate_yaw_toward(s16 target, s16 increment);
lua_pushinteger(L, cur_obj_rotate_yaw_toward(target, increment));
@@ -12783,7 +14106,7 @@ int smlua_func_cur_obj_scale(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 scale = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_scale'"); return 0; }
extern void cur_obj_scale(f32 scale);
cur_obj_scale(scale);
@@ -12795,13 +14118,13 @@ int smlua_func_cur_obj_scale_over_time(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s32 a0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_scale_over_time'"); return 0; }
s32 a1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_scale_over_time'"); return 0; }
f32 sp10 = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_scale_over_time'"); return 0; }
f32 sp14 = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'cur_obj_scale_over_time'"); return 0; }
extern void cur_obj_scale_over_time(s32 a0, s32 a1, f32 sp10, f32 sp14);
cur_obj_scale_over_time(a0, a1, sp10, sp14);
@@ -12813,7 +14136,7 @@ int smlua_func_cur_obj_set_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_set_behavior'"); return 0; }
extern void cur_obj_set_behavior(const BehaviorScript *behavior);
cur_obj_set_behavior(behavior);
@@ -12825,7 +14148,7 @@ int smlua_func_cur_obj_set_direction_table(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s8 * a0 = (s8 *)smlua_to_cpointer(L, 1, LVT_S8_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_set_direction_table'"); return 0; }
extern s32 cur_obj_set_direction_table(s8 *a0);
lua_pushinteger(L, cur_obj_set_direction_table(a0));
@@ -12847,11 +14170,11 @@ int smlua_func_cur_obj_set_hitbox_and_die_if_attacked(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_set_hitbox_and_die_if_attacked'"); return 0; }
s32 deathSound = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_set_hitbox_and_die_if_attacked'"); return 0; }
s32 noLootCoins = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_set_hitbox_and_die_if_attacked'"); return 0; }
extern s32 cur_obj_set_hitbox_and_die_if_attacked(struct ObjectHitbox *hitbox, s32 deathSound, s32 noLootCoins);
lua_pushinteger(L, cur_obj_set_hitbox_and_die_if_attacked(hitbox, deathSound, noLootCoins));
@@ -12863,9 +14186,9 @@ int smlua_func_cur_obj_set_hitbox_radius_and_height(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 radius = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_set_hitbox_radius_and_height'"); return 0; }
f32 height = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_set_hitbox_radius_and_height'"); return 0; }
extern void cur_obj_set_hitbox_radius_and_height(f32 radius, f32 height);
cur_obj_set_hitbox_radius_and_height(radius, height);
@@ -12887,9 +14210,9 @@ int smlua_func_cur_obj_set_hurtbox_radius_and_height(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 radius = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_set_hurtbox_radius_and_height'"); return 0; }
f32 height = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_set_hurtbox_radius_and_height'"); return 0; }
extern void cur_obj_set_hurtbox_radius_and_height(f32 radius, f32 height);
cur_obj_set_hurtbox_radius_and_height(radius, height);
@@ -12901,13 +14224,13 @@ int smlua_func_cur_obj_set_pos_relative(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* other = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_set_pos_relative'"); return 0; }
f32 dleft = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_set_pos_relative'"); return 0; }
f32 dy = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_set_pos_relative'"); return 0; }
f32 dforward = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'cur_obj_set_pos_relative'"); return 0; }
extern void cur_obj_set_pos_relative(struct Object *other, f32 dleft, f32 dy, f32 dforward);
cur_obj_set_pos_relative(other, dleft, dy, dforward);
@@ -12919,11 +14242,11 @@ int smlua_func_cur_obj_set_pos_relative_to_parent(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 dleft = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_set_pos_relative_to_parent'"); return 0; }
f32 dy = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_set_pos_relative_to_parent'"); return 0; }
f32 dforward = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_set_pos_relative_to_parent'"); return 0; }
extern void cur_obj_set_pos_relative_to_parent(f32 dleft, f32 dy, f32 dforward);
cur_obj_set_pos_relative_to_parent(dleft, dy, dforward);
@@ -12975,11 +14298,11 @@ int smlua_func_cur_obj_set_vel_from_mario_vel(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_set_vel_from_mario_vel'"); return 0; }
f32 f12 = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_set_vel_from_mario_vel'"); return 0; }
f32 f14 = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_set_vel_from_mario_vel'"); return 0; }
extern void cur_obj_set_vel_from_mario_vel(struct MarioState* m, f32 f12, f32 f14);
cur_obj_set_vel_from_mario_vel(m, f12, f14);
@@ -12991,9 +14314,9 @@ int smlua_func_cur_obj_set_y_vel_and_animation(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 sp18 = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_set_y_vel_and_animation'"); return 0; }
s32 sp1C = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_set_y_vel_and_animation'"); return 0; }
extern void cur_obj_set_y_vel_and_animation(f32 sp18, s32 sp1C);
cur_obj_set_y_vel_and_animation(sp18, sp1C);
@@ -13005,7 +14328,7 @@ int smlua_func_cur_obj_shake_screen(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 shake = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_shake_screen'"); return 0; }
extern void cur_obj_shake_screen(s32 shake);
cur_obj_shake_screen(shake);
@@ -13017,7 +14340,7 @@ int smlua_func_cur_obj_shake_y(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 amount = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_shake_y'"); return 0; }
extern void cur_obj_shake_y(f32 amount);
cur_obj_shake_y(amount);
@@ -13029,9 +14352,9 @@ int smlua_func_cur_obj_shake_y_until(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 cycles = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_shake_y_until'"); return 0; }
s32 amount = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_shake_y_until'"); return 0; }
extern s32 cur_obj_shake_y_until(s32 cycles, s32 amount);
lua_pushinteger(L, cur_obj_shake_y_until(cycles, amount));
@@ -13053,7 +14376,7 @@ int smlua_func_cur_obj_spawn_loot_coin_at_mario_pos(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_spawn_loot_coin_at_mario_pos'"); return 0; }
extern void cur_obj_spawn_loot_coin_at_mario_pos(struct MarioState* m);
cur_obj_spawn_loot_coin_at_mario_pos(m);
@@ -13065,7 +14388,7 @@ int smlua_func_cur_obj_spawn_particles(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct SpawnParticlesInfo* info = (struct SpawnParticlesInfo*)smlua_to_cobject(L, 1, LOT_SPAWNPARTICLESINFO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_spawn_particles'"); return 0; }
extern void cur_obj_spawn_particles(struct SpawnParticlesInfo *info);
cur_obj_spawn_particles(info);
@@ -13077,13 +14400,13 @@ int smlua_func_cur_obj_spawn_star_at_y_offset(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
f32 targetX = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_spawn_star_at_y_offset'"); return 0; }
f32 targetY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_spawn_star_at_y_offset'"); return 0; }
f32 targetZ = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_spawn_star_at_y_offset'"); return 0; }
f32 offsetY = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'cur_obj_spawn_star_at_y_offset'"); return 0; }
extern void cur_obj_spawn_star_at_y_offset(f32 targetX, f32 targetY, f32 targetZ, f32 offsetY);
cur_obj_spawn_star_at_y_offset(targetX, targetY, targetZ, offsetY);
@@ -13095,9 +14418,9 @@ int smlua_func_cur_obj_start_cam_event(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_start_cam_event'"); return 0; }
s32 cameraEvent = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_start_cam_event'"); return 0; }
extern void cur_obj_start_cam_event(UNUSED struct Object *obj, s32 cameraEvent);
cur_obj_start_cam_event(obj, cameraEvent);
@@ -13119,9 +14442,9 @@ int smlua_func_cur_obj_unrender_and_reset_state(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 sp18 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_unrender_and_reset_state'"); return 0; }
s32 sp1C = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_unrender_and_reset_state'"); return 0; }
extern void cur_obj_unrender_and_reset_state(s32 sp18, s32 sp1C);
cur_obj_unrender_and_reset_state(sp18, sp1C);
@@ -13143,11 +14466,11 @@ int smlua_func_cur_obj_unused_play_footstep_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 animFrame1 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_unused_play_footstep_sound'"); return 0; }
s32 animFrame2 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_unused_play_footstep_sound'"); return 0; }
s32 sound = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'cur_obj_unused_play_footstep_sound'"); return 0; }
extern void cur_obj_unused_play_footstep_sound(s32 animFrame1, s32 animFrame2, s32 sound);
cur_obj_unused_play_footstep_sound(animFrame1, animFrame2, sound);
@@ -13159,9 +14482,9 @@ int smlua_func_cur_obj_unused_resolve_wall_collisions(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 offsetY = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_unused_resolve_wall_collisions'"); return 0; }
f32 radius = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_unused_resolve_wall_collisions'"); return 0; }
extern void cur_obj_unused_resolve_wall_collisions(f32 offsetY, f32 radius);
cur_obj_unused_resolve_wall_collisions(offsetY, radius);
@@ -13183,7 +14506,7 @@ int smlua_func_cur_obj_update_floor_and_resolve_wall_collisions(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 steepSlopeDegrees = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_update_floor_and_resolve_wall_collisions'"); return 0; }
extern void cur_obj_update_floor_and_resolve_wall_collisions(s16 steepSlopeDegrees);
cur_obj_update_floor_and_resolve_wall_collisions(steepSlopeDegrees);
@@ -13225,9 +14548,9 @@ int smlua_func_cur_obj_wait_then_blink(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 timeUntilBlinking = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_wait_then_blink'"); return 0; }
s32 numBlinks = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'cur_obj_wait_then_blink'"); return 0; }
extern s32 cur_obj_wait_then_blink(s32 timeUntilBlinking, s32 numBlinks);
lua_pushinteger(L, cur_obj_wait_then_blink(timeUntilBlinking, numBlinks));
@@ -13279,13 +14602,13 @@ int smlua_func_dist_between_object_and_point(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'dist_between_object_and_point'"); return 0; }
f32 pointX = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'dist_between_object_and_point'"); return 0; }
f32 pointY = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'dist_between_object_and_point'"); return 0; }
f32 pointZ = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'dist_between_object_and_point'"); return 0; }
extern f32 dist_between_object_and_point(struct Object *obj, f32 pointX, f32 pointY, f32 pointZ);
lua_pushnumber(L, dist_between_object_and_point(obj, pointX, pointY, pointZ));
@@ -13297,9 +14620,9 @@ int smlua_func_dist_between_objects(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'dist_between_objects'"); return 0; }
struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'dist_between_objects'"); return 0; }
extern f32 dist_between_objects(struct Object *obj1, struct Object *obj2);
lua_pushnumber(L, dist_between_objects(obj1, obj2));
@@ -13341,7 +14664,7 @@ int smlua_func_find_object_with_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_object_with_behavior'"); return 0; }
extern struct Object *find_object_with_behavior(const BehaviorScript *behavior);
smlua_push_object(L, LOT_OBJECT, find_object_with_behavior(behavior));
@@ -13364,11 +14687,11 @@ int smlua_func_geo_choose_area_ext(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_choose_area_ext'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_choose_area_ext'"); return 0; }
// Mat4 mtx = (Mat4)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_choose_area_ext'"); return 0; }
extern Gfx *geo_choose_area_ext(UNUSED s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx);
UNIMPLEMENTED -->(L, geo_choose_area_ext(callContext, node, mtx));
@@ -13381,11 +14704,11 @@ int smlua_func_geo_offset_klepto_debug(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_offset_klepto_debug'"); return 0; }
struct GraphNode* a1 = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_offset_klepto_debug'"); return 0; }
s32 sp8 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_offset_klepto_debug'"); return 0; }
extern s32 geo_offset_klepto_debug(s32 callContext, struct GraphNode *a1, UNUSED s32 sp8);
lua_pushinteger(L, geo_offset_klepto_debug(callContext, a1, sp8));
@@ -13398,11 +14721,11 @@ int smlua_func_geo_offset_klepto_held_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_offset_klepto_held_object'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_offset_klepto_held_object'"); return 0; }
// Mat4 mtx = (Mat4)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_offset_klepto_held_object'"); return 0; }
extern Gfx *geo_offset_klepto_held_object(s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx);
UNIMPLEMENTED -->(L, geo_offset_klepto_held_object(callContext, node, mtx));
@@ -13416,9 +14739,9 @@ int smlua_func_geo_switch_anim_state(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_switch_anim_state'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_switch_anim_state'"); return 0; }
extern Gfx *geo_switch_anim_state(s32 callContext, struct GraphNode *node);
UNIMPLEMENTED -->(L, geo_switch_anim_state(callContext, node));
@@ -13432,9 +14755,9 @@ int smlua_func_geo_switch_area(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_switch_area'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_switch_area'"); return 0; }
extern Gfx *geo_switch_area(s32 callContext, struct GraphNode *node);
UNIMPLEMENTED -->(L, geo_switch_area(callContext, node));
@@ -13448,11 +14771,11 @@ int smlua_func_geo_update_layer_transparency(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_update_layer_transparency'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_update_layer_transparency'"); return 0; }
// void * context = (void *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_update_layer_transparency'"); return 0; }
extern Gfx *geo_update_layer_transparency(s32 callContext, struct GraphNode *node, UNUSED void *context);
UNIMPLEMENTED -->(L, geo_update_layer_transparency(callContext, node, context));
@@ -13466,11 +14789,11 @@ int smlua_func_geo_update_projectile_pos_from_parent(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'geo_update_projectile_pos_from_parent'"); return 0; }
struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'geo_update_projectile_pos_from_parent'"); return 0; }
// Mat4 mtx = (Mat4)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'geo_update_projectile_pos_from_parent'"); return 0; }
extern Gfx *geo_update_projectile_pos_from_parent(s32 callContext, UNUSED struct GraphNode *node, Mat4 mtx);
UNIMPLEMENTED -->(L, geo_update_projectile_pos_from_parent(callContext, node, mtx));
@@ -13483,7 +14806,7 @@ int smlua_func_get_object_list_from_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_object_list_from_behavior'"); return 0; }
extern u32 get_object_list_from_behavior(const BehaviorScript *behavior);
lua_pushinteger(L, get_object_list_from_behavior(behavior));
@@ -13495,13 +14818,13 @@ int smlua_func_increment_velocity_toward_range(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
f32 value = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'increment_velocity_toward_range'"); return 0; }
f32 center = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'increment_velocity_toward_range'"); return 0; }
f32 zeroThreshold = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'increment_velocity_toward_range'"); return 0; }
f32 increment = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'increment_velocity_toward_range'"); return 0; }
extern f32 increment_velocity_toward_range(f32 value, f32 center, f32 zeroThreshold, f32 increment);
lua_pushnumber(L, increment_velocity_toward_range(value, center, zeroThreshold, increment));
@@ -13513,9 +14836,9 @@ int smlua_func_is_item_in_array(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s8 item = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_item_in_array'"); return 0; }
s8 * array = (s8 *)smlua_to_cpointer(L, 2, LVT_S8_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'is_item_in_array'"); return 0; }
extern s32 is_item_in_array(s8 item, s8 *array);
lua_pushinteger(L, is_item_in_array(item, array));
@@ -13527,7 +14850,7 @@ int smlua_func_is_mario_moving_fast_or_in_air(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 speedThreshold = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'is_mario_moving_fast_or_in_air'"); return 0; }
extern s32 is_mario_moving_fast_or_in_air(s32 speedThreshold);
lua_pushinteger(L, is_mario_moving_fast_or_in_air(speedThreshold));
@@ -13539,9 +14862,9 @@ int smlua_func_lateral_dist_between_objects(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'lateral_dist_between_objects'"); return 0; }
struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'lateral_dist_between_objects'"); return 0; }
extern f32 lateral_dist_between_objects(struct Object *obj1, struct Object *obj2);
lua_pushnumber(L, lateral_dist_between_objects(obj1, obj2));
@@ -13554,19 +14877,19 @@ int smlua_func_linear_mtxf_mul_vec3f(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
// Mat4 m = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'linear_mtxf_mul_vec3f'"); return 0; }
f32* dst = smlua_get_vec3f_from_buffer();
dst[0] = smlua_get_number_field(2, "x");
dst[1] = smlua_get_number_field(2, "y");
dst[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'linear_mtxf_mul_vec3f'"); return 0; }
f32* v = smlua_get_vec3f_from_buffer();
v[0] = smlua_get_number_field(3, "x");
v[1] = smlua_get_number_field(3, "y");
v[2] = smlua_get_number_field(3, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'linear_mtxf_mul_vec3f'"); return 0; }
extern void linear_mtxf_mul_vec3f(Mat4 m, Vec3f dst, Vec3f v);
linear_mtxf_mul_vec3f(m, dst, v);
@@ -13588,19 +14911,19 @@ int smlua_func_linear_mtxf_transpose_mul_vec3f(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
// Mat4 m = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'linear_mtxf_transpose_mul_vec3f'"); return 0; }
f32* dst = smlua_get_vec3f_from_buffer();
dst[0] = smlua_get_number_field(2, "x");
dst[1] = smlua_get_number_field(2, "y");
dst[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'linear_mtxf_transpose_mul_vec3f'"); return 0; }
f32* v = smlua_get_vec3f_from_buffer();
v[0] = smlua_get_number_field(3, "x");
v[1] = smlua_get_number_field(3, "y");
v[2] = smlua_get_number_field(3, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'linear_mtxf_transpose_mul_vec3f'"); return 0; }
extern void linear_mtxf_transpose_mul_vec3f(Mat4 m, Vec3f dst, Vec3f v);
linear_mtxf_transpose_mul_vec3f(m, dst, v);
@@ -13621,7 +14944,7 @@ int smlua_func_mario_is_dive_sliding(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_is_dive_sliding'"); return 0; }
extern s32 mario_is_dive_sliding(struct MarioState* m);
lua_pushinteger(L, mario_is_dive_sliding(m));
@@ -13633,7 +14956,7 @@ int smlua_func_mario_is_in_air_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_is_in_air_action'"); return 0; }
extern s32 mario_is_in_air_action(struct MarioState* m);
lua_pushinteger(L, mario_is_in_air_action(m));
@@ -13645,13 +14968,13 @@ int smlua_func_mario_is_within_rectangle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s16 minX = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_is_within_rectangle'"); return 0; }
s16 maxX = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'mario_is_within_rectangle'"); return 0; }
s16 minZ = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'mario_is_within_rectangle'"); return 0; }
s16 maxZ = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'mario_is_within_rectangle'"); return 0; }
extern s32 mario_is_within_rectangle(s16 minX, s16 maxX, s16 minZ, s16 maxZ);
lua_pushinteger(L, mario_is_within_rectangle(minX, maxX, minZ, maxZ));
@@ -13663,7 +14986,7 @@ int smlua_func_mario_set_flag(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 flag = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'mario_set_flag'"); return 0; }
extern void mario_set_flag(s32 flag);
mario_set_flag(flag);
@@ -13675,9 +14998,9 @@ int smlua_func_obj_angle_to_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_angle_to_object'"); return 0; }
struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_angle_to_object'"); return 0; }
extern s16 obj_angle_to_object(struct Object *obj1, struct Object *obj2);
lua_pushinteger(L, obj_angle_to_object(obj1, obj2));
@@ -13689,11 +15012,11 @@ int smlua_func_obj_angle_to_point(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_angle_to_point'"); return 0; }
f32 pointX = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_angle_to_point'"); return 0; }
f32 pointZ = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_angle_to_point'"); return 0; }
extern s16 obj_angle_to_point(struct Object *obj, f32 pointX, f32 pointZ);
lua_pushinteger(L, obj_angle_to_point(obj, pointX, pointZ));
@@ -13706,11 +15029,11 @@ int smlua_func_obj_apply_scale_to_matrix(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_apply_scale_to_matrix'"); return 0; }
// Mat4 dst = (Mat4)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_apply_scale_to_matrix'"); return 0; }
// Mat4 src = (Mat4)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_apply_scale_to_matrix'"); return 0; }
extern void obj_apply_scale_to_matrix(struct Object *obj, Mat4 dst, Mat4 src);
obj_apply_scale_to_matrix(obj, dst, src);
@@ -13723,7 +15046,7 @@ int smlua_func_obj_apply_scale_to_transform(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_apply_scale_to_transform'"); return 0; }
extern void obj_apply_scale_to_transform(struct Object *obj);
obj_apply_scale_to_transform(obj);
@@ -13735,7 +15058,7 @@ int smlua_func_obj_attack_collided_from_other_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_attack_collided_from_other_object'"); return 0; }
extern s32 obj_attack_collided_from_other_object(struct Object *obj);
lua_pushinteger(L, obj_attack_collided_from_other_object(obj));
@@ -13747,7 +15070,7 @@ int smlua_func_obj_become_tangible(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_become_tangible'"); return 0; }
extern void obj_become_tangible(struct Object *obj);
obj_become_tangible(obj);
@@ -13759,7 +15082,7 @@ int smlua_func_obj_build_relative_transform(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_build_relative_transform'"); return 0; }
extern void obj_build_relative_transform(struct Object *obj);
obj_build_relative_transform(obj);
@@ -13771,11 +15094,11 @@ int smlua_func_obj_build_transform_from_pos_and_angle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_build_transform_from_pos_and_angle'"); return 0; }
s16 posIndex = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_build_transform_from_pos_and_angle'"); return 0; }
s16 angleIndex = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_build_transform_from_pos_and_angle'"); return 0; }
extern void obj_build_transform_from_pos_and_angle(struct Object *obj, s16 posIndex, s16 angleIndex);
obj_build_transform_from_pos_and_angle(obj, posIndex, angleIndex);
@@ -13787,7 +15110,7 @@ int smlua_func_obj_build_transform_relative_to_parent(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_build_transform_relative_to_parent'"); return 0; }
extern void obj_build_transform_relative_to_parent(struct Object *obj);
obj_build_transform_relative_to_parent(obj);
@@ -13799,7 +15122,7 @@ int smlua_func_obj_build_vel_from_transform(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* a0 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_build_vel_from_transform'"); return 0; }
extern void obj_build_vel_from_transform(struct Object *a0);
obj_build_vel_from_transform(a0);
@@ -13811,9 +15134,9 @@ int smlua_func_obj_check_if_collided_with_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_check_if_collided_with_object'"); return 0; }
struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_check_if_collided_with_object'"); return 0; }
extern s32 obj_check_if_collided_with_object(struct Object *obj1, struct Object *obj2);
lua_pushinteger(L, obj_check_if_collided_with_object(obj1, obj2));
@@ -13825,9 +15148,9 @@ int smlua_func_obj_copy_angle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_copy_angle'"); return 0; }
struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_copy_angle'"); return 0; }
extern void obj_copy_angle(struct Object *dst, struct Object *src);
obj_copy_angle(dst, src);
@@ -13839,9 +15162,9 @@ int smlua_func_obj_copy_behavior_params(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_copy_behavior_params'"); return 0; }
struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_copy_behavior_params'"); return 0; }
extern void obj_copy_behavior_params(struct Object *dst, struct Object *src);
obj_copy_behavior_params(dst, src);
@@ -13853,9 +15176,9 @@ int smlua_func_obj_copy_graph_y_offset(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_copy_graph_y_offset'"); return 0; }
struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_copy_graph_y_offset'"); return 0; }
extern void obj_copy_graph_y_offset(struct Object *dst, struct Object *src);
obj_copy_graph_y_offset(dst, src);
@@ -13867,9 +15190,9 @@ int smlua_func_obj_copy_pos(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_copy_pos'"); return 0; }
struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_copy_pos'"); return 0; }
extern void obj_copy_pos(struct Object *dst, struct Object *src);
obj_copy_pos(dst, src);
@@ -13881,9 +15204,9 @@ int smlua_func_obj_copy_pos_and_angle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_copy_pos_and_angle'"); return 0; }
struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_copy_pos_and_angle'"); return 0; }
extern void obj_copy_pos_and_angle(struct Object *dst, struct Object *src);
obj_copy_pos_and_angle(dst, src);
@@ -13895,9 +15218,9 @@ int smlua_func_obj_copy_scale(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_copy_scale'"); return 0; }
struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_copy_scale'"); return 0; }
extern void obj_copy_scale(struct Object *dst, struct Object *src);
obj_copy_scale(dst, src);
@@ -13909,7 +15232,7 @@ int smlua_func_obj_create_transform_from_self(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_create_transform_from_self'"); return 0; }
extern void obj_create_transform_from_self(struct Object *obj);
obj_create_transform_from_self(obj);
@@ -13921,9 +15244,9 @@ int smlua_func_obj_explode_and_spawn_coins(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 sp18 = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_explode_and_spawn_coins'"); return 0; }
s32 sp1C = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_explode_and_spawn_coins'"); return 0; }
extern void obj_explode_and_spawn_coins(f32 sp18, s32 sp1C);
obj_explode_and_spawn_coins(sp18, sp1C);
@@ -13935,9 +15258,9 @@ int smlua_func_obj_has_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_has_behavior'"); return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 2, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_has_behavior'"); return 0; }
extern s32 obj_has_behavior(struct Object *obj, const BehaviorScript *behavior);
lua_pushinteger(L, obj_has_behavior(obj, behavior));
@@ -13949,9 +15272,9 @@ int smlua_func_obj_init_animation(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_init_animation'"); return 0; }
s32 animIndex = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_init_animation'"); return 0; }
extern void obj_init_animation(struct Object *obj, s32 animIndex);
obj_init_animation(obj, animIndex);
@@ -13964,11 +15287,11 @@ int smlua_func_obj_init_animation_with_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_init_animation_with_sound'"); return 0; }
// const structAnimation*const* animations = (const structAnimation*const*)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_init_animation_with_sound'"); return 0; }
s32 animIndex = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_init_animation_with_sound'"); return 0; }
extern void obj_init_animation_with_sound(struct Object *obj, const struct Animation * const* animations, s32 animIndex);
obj_init_animation_with_sound(obj, animations, animIndex);
@@ -13981,7 +15304,7 @@ int smlua_func_obj_is_hidden(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_is_hidden'"); return 0; }
extern s32 obj_is_hidden(struct Object *obj);
lua_pushinteger(L, obj_is_hidden(obj));
@@ -13993,7 +15316,7 @@ int smlua_func_obj_mark_for_deletion(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_mark_for_deletion'"); return 0; }
extern void obj_mark_for_deletion(struct Object *obj);
obj_mark_for_deletion(obj);
@@ -14005,9 +15328,9 @@ int smlua_func_obj_pitch_to_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_pitch_to_object'"); return 0; }
struct Object* target = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_pitch_to_object'"); return 0; }
extern s16 obj_pitch_to_object(struct Object* obj, struct Object* target);
lua_pushinteger(L, obj_pitch_to_object(obj, target));
@@ -14019,9 +15342,9 @@ int smlua_func_obj_scale(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_scale'"); return 0; }
f32 scale = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_scale'"); return 0; }
extern void obj_scale(struct Object *obj, f32 scale);
obj_scale(obj, scale);
@@ -14033,11 +15356,11 @@ int smlua_func_obj_scale_random(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_scale_random'"); return 0; }
f32 rangeLength = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_scale_random'"); return 0; }
f32 minScale = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_scale_random'"); return 0; }
extern void obj_scale_random(struct Object *obj, f32 rangeLength, f32 minScale);
obj_scale_random(obj, rangeLength, minScale);
@@ -14049,13 +15372,13 @@ int smlua_func_obj_scale_xyz(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_scale_xyz'"); return 0; }
f32 xScale = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_scale_xyz'"); return 0; }
f32 yScale = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_scale_xyz'"); return 0; }
f32 zScale = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_scale_xyz'"); return 0; }
extern void obj_scale_xyz(struct Object *obj, f32 xScale, f32 yScale, f32 zScale);
obj_scale_xyz(obj, xScale, yScale, zScale);
@@ -14067,13 +15390,13 @@ int smlua_func_obj_set_angle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_angle'"); return 0; }
s16 pitch = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_angle'"); return 0; }
s16 yaw = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_set_angle'"); return 0; }
s16 roll = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_set_angle'"); return 0; }
extern void obj_set_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);
obj_set_angle(obj, pitch, yaw, roll);
@@ -14085,9 +15408,9 @@ int smlua_func_obj_set_behavior(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_behavior'"); return 0; }
const BehaviorScript* behavior = (const BehaviorScript*)smlua_to_cpointer(L, 2, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_behavior'"); return 0; }
extern void obj_set_behavior(struct Object *obj, const BehaviorScript *behavior);
obj_set_behavior(obj, behavior);
@@ -14099,7 +15422,7 @@ int smlua_func_obj_set_billboard(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_billboard'"); return 0; }
extern void obj_set_billboard(struct Object *obj);
obj_set_billboard(obj);
@@ -14112,9 +15435,9 @@ int smlua_func_obj_set_collision_data(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_collision_data'"); return 0; }
// const void* segAddr = (const void*)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_collision_data'"); return 0; }
extern void obj_set_collision_data(struct Object *obj, const void *segAddr);
obj_set_collision_data(obj, segAddr);
@@ -14127,7 +15450,7 @@ int smlua_func_obj_set_cylboard(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_cylboard'"); return 0; }
extern void obj_set_cylboard(struct Object *obj);
obj_set_cylboard(obj);
@@ -14139,7 +15462,7 @@ int smlua_func_obj_set_face_angle_to_move_angle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_face_angle_to_move_angle'"); return 0; }
extern void obj_set_face_angle_to_move_angle(struct Object *obj);
obj_set_face_angle_to_move_angle(obj);
@@ -14151,9 +15474,9 @@ int smlua_func_obj_set_gfx_pos_at_obj_pos(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_gfx_pos_at_obj_pos'"); return 0; }
struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_gfx_pos_at_obj_pos'"); return 0; }
extern void obj_set_gfx_pos_at_obj_pos(struct Object *obj1, struct Object *obj2);
obj_set_gfx_pos_at_obj_pos(obj1, obj2);
@@ -14165,7 +15488,7 @@ int smlua_func_obj_set_gfx_pos_from_pos(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_gfx_pos_from_pos'"); return 0; }
extern void obj_set_gfx_pos_from_pos(struct Object *obj);
obj_set_gfx_pos_from_pos(obj);
@@ -14177,9 +15500,9 @@ int smlua_func_obj_set_held_state(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_held_state'"); return 0; }
const BehaviorScript* heldBehavior = (const BehaviorScript*)smlua_to_cpointer(L, 2, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_held_state'"); return 0; }
extern void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior);
obj_set_held_state(obj, heldBehavior);
@@ -14191,9 +15514,9 @@ int smlua_func_obj_set_hitbox(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_hitbox'"); return 0; }
struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 2, LOT_OBJECTHITBOX);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_hitbox'"); return 0; }
extern void obj_set_hitbox(struct Object *obj, struct ObjectHitbox *hitbox);
obj_set_hitbox(obj, hitbox);
@@ -14205,13 +15528,13 @@ int smlua_func_obj_set_parent_relative_pos(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_parent_relative_pos'"); return 0; }
s16 relX = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_parent_relative_pos'"); return 0; }
s16 relY = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_set_parent_relative_pos'"); return 0; }
s16 relZ = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_set_parent_relative_pos'"); return 0; }
extern void obj_set_parent_relative_pos(struct Object *obj, s16 relX, s16 relY, s16 relZ);
obj_set_parent_relative_pos(obj, relX, relY, relZ);
@@ -14223,13 +15546,13 @@ int smlua_func_obj_set_pos(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_pos'"); return 0; }
s16 x = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_pos'"); return 0; }
s16 y = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_set_pos'"); return 0; }
s16 z = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_set_pos'"); return 0; }
extern void obj_set_pos(struct Object *obj, s16 x, s16 y, s16 z);
obj_set_pos(obj, x, y, z);
@@ -14241,15 +15564,15 @@ int smlua_func_obj_set_pos_relative(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_pos_relative'"); return 0; }
struct Object* other = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_pos_relative'"); return 0; }
f32 dleft = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_set_pos_relative'"); return 0; }
f32 dy = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_set_pos_relative'"); return 0; }
f32 dforward = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'obj_set_pos_relative'"); return 0; }
extern void obj_set_pos_relative(struct Object *obj, struct Object *other, f32 dleft, f32 dy, f32 dforward);
obj_set_pos_relative(obj, other, dleft, dy, dforward);
@@ -14261,7 +15584,7 @@ int smlua_func_obj_set_throw_matrix_from_transform(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_throw_matrix_from_transform'"); return 0; }
extern void obj_set_throw_matrix_from_transform(struct Object *obj);
obj_set_throw_matrix_from_transform(obj);
@@ -14273,13 +15596,13 @@ int smlua_func_obj_spawn_loot_blue_coins(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_spawn_loot_blue_coins'"); return 0; }
s32 numCoins = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_spawn_loot_blue_coins'"); return 0; }
f32 sp28 = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_spawn_loot_blue_coins'"); return 0; }
s16 posJitter = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_spawn_loot_blue_coins'"); return 0; }
extern void obj_spawn_loot_blue_coins(struct Object *obj, s32 numCoins, f32 sp28, s16 posJitter);
obj_spawn_loot_blue_coins(obj, numCoins, sp28, posJitter);
@@ -14291,17 +15614,17 @@ int smlua_func_obj_spawn_loot_coins(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_spawn_loot_coins'"); return 0; }
s32 numCoins = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_spawn_loot_coins'"); return 0; }
f32 sp30 = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_spawn_loot_coins'"); return 0; }
const BehaviorScript* coinBehavior = (const BehaviorScript*)smlua_to_cpointer(L, 4, LVT_BEHAVIORSCRIPT_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_spawn_loot_coins'"); return 0; }
s16 posJitter = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'obj_spawn_loot_coins'"); return 0; }
s16 model = smlua_to_integer(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'obj_spawn_loot_coins'"); return 0; }
extern void obj_spawn_loot_coins(struct Object *obj, s32 numCoins, f32 sp30, const BehaviorScript *coinBehavior, s16 posJitter, s16 model);
obj_spawn_loot_coins(obj, numCoins, sp30, coinBehavior, posJitter, model);
@@ -14313,11 +15636,11 @@ int smlua_func_obj_spawn_loot_yellow_coins(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_spawn_loot_yellow_coins'"); return 0; }
s32 numCoins = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_spawn_loot_yellow_coins'"); return 0; }
f32 sp28 = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_spawn_loot_yellow_coins'"); return 0; }
extern void obj_spawn_loot_yellow_coins(struct Object *obj, s32 numCoins, f32 sp28);
obj_spawn_loot_yellow_coins(obj, numCoins, sp28);
@@ -14329,11 +15652,11 @@ int smlua_func_obj_translate_local(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_translate_local'"); return 0; }
s16 posIndex = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_translate_local'"); return 0; }
s16 localTranslateIndex = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_translate_local'"); return 0; }
extern void obj_translate_local(struct Object *obj, s16 posIndex, s16 localTranslateIndex);
obj_translate_local(obj, posIndex, localTranslateIndex);
@@ -14345,9 +15668,9 @@ int smlua_func_obj_translate_xyz_random(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_translate_xyz_random'"); return 0; }
f32 rangeLength = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_translate_xyz_random'"); return 0; }
extern void obj_translate_xyz_random(struct Object *obj, f32 rangeLength);
obj_translate_xyz_random(obj, rangeLength);
@@ -14359,9 +15682,9 @@ int smlua_func_obj_translate_xz_random(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_translate_xz_random'"); return 0; }
f32 rangeLength = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_translate_xz_random'"); return 0; }
extern void obj_translate_xz_random(struct Object *obj, f32 rangeLength);
obj_translate_xz_random(obj, rangeLength);
@@ -14373,13 +15696,13 @@ int smlua_func_obj_turn_toward_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_turn_toward_object'"); return 0; }
struct Object* target = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_turn_toward_object'"); return 0; }
s16 angleIndex = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_turn_toward_object'"); return 0; }
s16 turnAmount = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_turn_toward_object'"); return 0; }
extern s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleIndex, s16 turnAmount);
lua_pushinteger(L, obj_turn_toward_object(obj, target, angleIndex, turnAmount));
@@ -14392,9 +15715,9 @@ int smlua_func_obj_update_pos_from_parent_transformation(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
// Mat4 a0 = (Mat4)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_update_pos_from_parent_transformation'"); return 0; }
struct Object* a1 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_update_pos_from_parent_transformation'"); return 0; }
extern void obj_update_pos_from_parent_transformation(Mat4 a0, struct Object *a1);
obj_update_pos_from_parent_transformation(a0, a1);
@@ -14417,7 +15740,7 @@ int smlua_func_random_f32_around_zero(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 diameter = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'random_f32_around_zero'"); return 0; }
extern f32 random_f32_around_zero(f32 diameter);
lua_pushnumber(L, random_f32_around_zero(diameter));
@@ -14429,11 +15752,11 @@ int smlua_func_set_mario_interact_hoot_if_in_range(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 sp0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_mario_interact_hoot_if_in_range'"); return 0; }
s32 sp4 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_mario_interact_hoot_if_in_range'"); return 0; }
f32 sp8 = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_mario_interact_hoot_if_in_range'"); return 0; }
extern void set_mario_interact_hoot_if_in_range(UNUSED s32 sp0, UNUSED s32 sp4, f32 sp8);
set_mario_interact_hoot_if_in_range(sp0, sp4, sp8);
@@ -14445,7 +15768,7 @@ int smlua_func_set_time_stop_flags(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 flags = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_time_stop_flags'"); return 0; }
extern void set_time_stop_flags(s32 flags);
set_time_stop_flags(flags);
@@ -14457,7 +15780,7 @@ int smlua_func_set_time_stop_flags_if_alone(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 flags = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_time_stop_flags_if_alone'"); return 0; }
extern void set_time_stop_flags_if_alone(s32 flags);
set_time_stop_flags_if_alone(flags);
@@ -14469,7 +15792,7 @@ int smlua_func_signum_positive(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 x = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'signum_positive'"); return 0; }
extern s32 signum_positive(s32 x);
lua_pushinteger(L, signum_positive(x));
@@ -14501,7 +15824,7 @@ int smlua_func_spawn_mist_particles_with_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 sp18 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_mist_particles_with_sound'"); return 0; }
extern void spawn_mist_particles_with_sound(u32 sp18);
spawn_mist_particles_with_sound(sp18);
@@ -14513,9 +15836,9 @@ int smlua_func_spawn_star_with_no_lvl_exit(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 sp20 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_star_with_no_lvl_exit'"); return 0; }
s32 sp24 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_star_with_no_lvl_exit'"); return 0; }
extern struct Object *spawn_star_with_no_lvl_exit(s32 sp20, s32 sp24);
smlua_push_object(L, LOT_OBJECT, spawn_star_with_no_lvl_exit(sp20, sp24));
@@ -14527,9 +15850,9 @@ int smlua_func_spawn_water_droplet(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* parent = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_water_droplet'"); return 0; }
struct WaterDropletParams* params = (struct WaterDropletParams*)smlua_to_cobject(L, 2, LOT_WATERDROPLETPARAMS);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_water_droplet'"); return 0; }
extern struct Object *spawn_water_droplet(struct Object *parent, struct WaterDropletParams *params);
smlua_push_object(L, LOT_OBJECT, spawn_water_droplet(parent, params));
@@ -14541,9 +15864,9 @@ int smlua_func_stub_obj_helpers_3(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 sp0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'stub_obj_helpers_3'"); return 0; }
s32 sp4 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'stub_obj_helpers_3'"); return 0; }
extern void stub_obj_helpers_3(UNUSED s32 sp0, UNUSED s32 sp4);
stub_obj_helpers_3(sp0, sp4);
@@ -14569,9 +15892,9 @@ int smlua_func_set_object_respawn_info_bits(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_object_respawn_info_bits'"); return 0; }
u8 bits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_object_respawn_info_bits'"); return 0; }
set_object_respawn_info_bits(obj, bits);
@@ -14586,9 +15909,9 @@ int smlua_func_queue_rumble_data(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 a0 = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'queue_rumble_data'"); return 0; }
s16 a1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'queue_rumble_data'"); return 0; }
extern void queue_rumble_data(s16 a0, s16 a1);
queue_rumble_data(a0, a1);
@@ -14600,11 +15923,11 @@ int smlua_func_queue_rumble_data_mario(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'queue_rumble_data_mario'"); return 0; }
s16 a0 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'queue_rumble_data_mario'"); return 0; }
s16 a1 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'queue_rumble_data_mario'"); return 0; }
extern void queue_rumble_data_mario(struct MarioState* m, s16 a0, s16 a1);
queue_rumble_data_mario(m, a0, a1);
@@ -14616,11 +15939,11 @@ int smlua_func_queue_rumble_data_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* object = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'queue_rumble_data_object'"); return 0; }
s16 a0 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'queue_rumble_data_object'"); return 0; }
s16 a1 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'queue_rumble_data_object'"); return 0; }
extern void queue_rumble_data_object(struct Object* object, s16 a0, s16 a1);
queue_rumble_data_object(object, a0, a1);
@@ -14632,7 +15955,7 @@ int smlua_func_reset_rumble_timers(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'reset_rumble_timers'"); return 0; }
extern void reset_rumble_timers(struct MarioState* m);
reset_rumble_timers(m);
@@ -14644,9 +15967,9 @@ int smlua_func_reset_rumble_timers_2(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'reset_rumble_timers_2'"); return 0; }
s32 a0 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'reset_rumble_timers_2'"); return 0; }
extern void reset_rumble_timers_2(struct MarioState* m, s32 a0);
reset_rumble_timers_2(m, a0);
@@ -14662,7 +15985,7 @@ int smlua_func_save_file_clear_flags(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 flags = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'save_file_clear_flags'"); return 0; }
save_file_clear_flags(flags);
@@ -14677,7 +16000,7 @@ int smlua_func_save_file_get_cap_pos(lua_State* L) {
capPos[0] = smlua_get_integer_field(1, "x");
capPos[1] = smlua_get_integer_field(1, "y");
capPos[2] = smlua_get_integer_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'save_file_get_cap_pos'"); return 0; }
lua_pushinteger(L, save_file_get_cap_pos(capPos));
@@ -14692,9 +16015,9 @@ int smlua_func_save_file_get_course_coin_score(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 fileIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'save_file_get_course_coin_score'"); return 0; }
s32 courseIndex = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'save_file_get_course_coin_score'"); return 0; }
lua_pushinteger(L, save_file_get_course_coin_score(fileIndex, courseIndex));
@@ -14705,9 +16028,9 @@ int smlua_func_save_file_get_course_star_count(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 fileIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'save_file_get_course_star_count'"); return 0; }
s32 courseIndex = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'save_file_get_course_star_count'"); return 0; }
lua_pushinteger(L, save_file_get_course_star_count(fileIndex, courseIndex));
@@ -14727,7 +16050,7 @@ int smlua_func_save_file_get_max_coin_score(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 courseIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'save_file_get_max_coin_score'"); return 0; }
lua_pushinteger(L, save_file_get_max_coin_score(courseIndex));
@@ -14747,9 +16070,9 @@ int smlua_func_save_file_get_star_flags(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s32 fileIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'save_file_get_star_flags'"); return 0; }
s32 courseIndex = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'save_file_get_star_flags'"); return 0; }
lua_pushinteger(L, save_file_get_star_flags(fileIndex, courseIndex));
@@ -14760,11 +16083,11 @@ int smlua_func_save_file_get_total_star_count(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 fileIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'save_file_get_total_star_count'"); return 0; }
s32 minCourse = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'save_file_get_total_star_count'"); return 0; }
s32 maxCourse = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'save_file_get_total_star_count'"); return 0; }
lua_pushinteger(L, save_file_get_total_star_count(fileIndex, minCourse, maxCourse));
@@ -14775,7 +16098,7 @@ int smlua_func_save_file_set_flags(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 flags = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'save_file_set_flags'"); return 0; }
save_file_set_flags(flags);
@@ -14790,7 +16113,7 @@ int smlua_func_audio_sample_destroy(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_sample_destroy'"); return 0; }
audio_sample_destroy(audio);
@@ -14801,7 +16124,7 @@ int smlua_func_audio_sample_load(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const char* filename = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_sample_load'"); return 0; }
smlua_push_object(L, LOT_BASSAUDIO, audio_sample_load(filename));
@@ -14812,15 +16135,15 @@ int smlua_func_audio_sample_play(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_sample_play'"); return 0; }
f32* position = smlua_get_vec3f_from_buffer();
position[0] = smlua_get_number_field(2, "x");
position[1] = smlua_get_number_field(2, "y");
position[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'audio_sample_play'"); return 0; }
f32 volume = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'audio_sample_play'"); return 0; }
audio_sample_play(audio, position, volume);
@@ -14835,7 +16158,7 @@ int smlua_func_audio_stream_destroy(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_destroy'"); return 0; }
audio_stream_destroy(audio);
@@ -14846,7 +16169,7 @@ int smlua_func_audio_stream_get_frequency(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_get_frequency'"); return 0; }
lua_pushnumber(L, audio_stream_get_frequency(audio));
@@ -14857,7 +16180,7 @@ int smlua_func_audio_stream_get_looping(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_get_looping'"); return 0; }
lua_pushboolean(L, audio_stream_get_looping(audio));
@@ -14868,7 +16191,7 @@ int smlua_func_audio_stream_get_position(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_get_position'"); return 0; }
lua_pushnumber(L, audio_stream_get_position(audio));
@@ -14879,7 +16202,7 @@ int smlua_func_audio_stream_get_tempo(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_get_tempo'"); return 0; }
lua_pushnumber(L, audio_stream_get_tempo(audio));
@@ -14890,7 +16213,7 @@ int smlua_func_audio_stream_get_volume(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_get_volume'"); return 0; }
lua_pushnumber(L, audio_stream_get_volume(audio));
@@ -14901,7 +16224,7 @@ int smlua_func_audio_stream_load(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const char* filename = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_load'"); return 0; }
smlua_push_object(L, LOT_BASSAUDIO, audio_stream_load(filename));
@@ -14912,7 +16235,7 @@ int smlua_func_audio_stream_load_url(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const char* url = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_load_url'"); return 0; }
smlua_push_object(L, LOT_BASSAUDIO, audio_stream_load_url(url));
@@ -14923,7 +16246,7 @@ int smlua_func_audio_stream_pause(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_pause'"); return 0; }
audio_stream_pause(audio);
@@ -14934,11 +16257,11 @@ int smlua_func_audio_stream_play(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_play'"); return 0; }
bool restart = smlua_to_boolean(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'audio_stream_play'"); return 0; }
f32 volume = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'audio_stream_play'"); return 0; }
audio_stream_play(audio, restart, volume);
@@ -14949,9 +16272,9 @@ int smlua_func_audio_stream_set_frequency(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_set_frequency'"); return 0; }
f32 freq = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'audio_stream_set_frequency'"); return 0; }
audio_stream_set_frequency(audio, freq);
@@ -14962,9 +16285,9 @@ int smlua_func_audio_stream_set_looping(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_set_looping'"); return 0; }
bool looping = smlua_to_boolean(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'audio_stream_set_looping'"); return 0; }
audio_stream_set_looping(audio, looping);
@@ -14975,9 +16298,9 @@ int smlua_func_audio_stream_set_position(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_set_position'"); return 0; }
f32 pos = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'audio_stream_set_position'"); return 0; }
audio_stream_set_position(audio, pos);
@@ -14988,13 +16311,13 @@ int smlua_func_audio_stream_set_speed(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_set_speed'"); return 0; }
f32 initial_freq = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'audio_stream_set_speed'"); return 0; }
f32 speed = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'audio_stream_set_speed'"); return 0; }
bool pitch = smlua_to_boolean(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'audio_stream_set_speed'"); return 0; }
audio_stream_set_speed(audio, initial_freq, speed, pitch);
@@ -15005,9 +16328,9 @@ int smlua_func_audio_stream_set_tempo(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_set_tempo'"); return 0; }
f32 tempo = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'audio_stream_set_tempo'"); return 0; }
audio_stream_set_tempo(audio, tempo);
@@ -15018,9 +16341,9 @@ int smlua_func_audio_stream_set_volume(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_set_volume'"); return 0; }
f32 volume = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'audio_stream_set_volume'"); return 0; }
audio_stream_set_volume(audio, volume);
@@ -15031,7 +16354,7 @@ int smlua_func_audio_stream_stop(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct BassAudio* audio = (struct BassAudio*)smlua_to_cobject(L, 1, LOT_BASSAUDIO);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'audio_stream_stop'"); return 0; }
audio_stream_stop(audio);
@@ -15042,13 +16365,13 @@ int smlua_func_smlua_audio_utils_replace_sequence(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
u8 sequenceId = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'smlua_audio_utils_replace_sequence'"); return 0; }
u8 bankId = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'smlua_audio_utils_replace_sequence'"); return 0; }
u8 defaultVolume = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'smlua_audio_utils_replace_sequence'"); return 0; }
const char* m64Name = smlua_to_string(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'smlua_audio_utils_replace_sequence'"); return 0; }
smlua_audio_utils_replace_sequence(sequenceId, bankId, defaultVolume, m64Name);
@@ -15072,17 +16395,17 @@ int smlua_func_collision_find_surface_on_ray(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
f32 startX = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'collision_find_surface_on_ray'"); return 0; }
f32 startY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'collision_find_surface_on_ray'"); return 0; }
f32 startZ = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'collision_find_surface_on_ray'"); return 0; }
f32 endX = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'collision_find_surface_on_ray'"); return 0; }
f32 endY = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'collision_find_surface_on_ray'"); return 0; }
f32 endZ = smlua_to_number(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'collision_find_surface_on_ray'"); return 0; }
smlua_push_object(L, LOT_RAYINTERSECTIONINFO, collision_find_surface_on_ray(startX, startY, startZ, endX, endY, endZ));
@@ -15102,7 +16425,7 @@ int smlua_func_smlua_collision_util_get(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const char* name = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'smlua_collision_util_get'"); return 0; }
smlua_push_pointer(L, LVT_COLLISION_P, (void*)smlua_collision_util_get(name));
@@ -15117,21 +16440,21 @@ int smlua_func_level_register(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 8)) { return 0; }
const char* scriptEntryName = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'level_register'"); return 0; }
s16 courseNum = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'level_register'"); return 0; }
const char* fullName = smlua_to_string(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'level_register'"); return 0; }
const char* shortName = smlua_to_string(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'level_register'"); return 0; }
u32 acousticReach = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'level_register'"); return 0; }
u32 echoLevel1 = smlua_to_integer(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'level_register'"); return 0; }
u32 echoLevel2 = smlua_to_integer(L, 7);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7 for function 'level_register'"); return 0; }
u32 echoLevel3 = smlua_to_integer(L, 8);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 8"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 8 for function 'level_register'"); return 0; }
lua_pushinteger(L, level_register(scriptEntryName, courseNum, fullName, shortName, acousticReach, echoLevel1, echoLevel2, echoLevel3));
@@ -15142,7 +16465,7 @@ int smlua_func_smlua_level_util_get_info(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 levelNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'smlua_level_util_get_info'"); return 0; }
smlua_push_object(L, LOT_CUSTOMLEVELINFO, smlua_level_util_get_info(levelNum));
@@ -15153,7 +16476,7 @@ int smlua_func_smlua_level_util_get_info_from_short_name(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
char* shortName = (char*)smlua_to_cobject(L, 1, LOT_NONE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'smlua_level_util_get_info_from_short_name'"); return 0; }
smlua_push_object(L, LOT_CUSTOMLEVELINFO, smlua_level_util_get_info_from_short_name(shortName));
@@ -15164,7 +16487,7 @@ int smlua_func_warp_exit_level(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 aDelay = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'warp_exit_level'"); return 0; }
lua_pushboolean(L, warp_exit_level(aDelay));
@@ -15184,7 +16507,7 @@ int smlua_func_warp_to_castle(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 aLevel = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'warp_to_castle'"); return 0; }
lua_pushboolean(L, warp_to_castle(aLevel));
@@ -15195,11 +16518,11 @@ int smlua_func_warp_to_level(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
s32 aLevel = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'warp_to_level'"); return 0; }
s32 aArea = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'warp_to_level'"); return 0; }
s32 aAct = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'warp_to_level'"); return 0; }
lua_pushboolean(L, warp_to_level(aLevel, aArea, aAct));
@@ -15214,7 +16537,7 @@ int smlua_func_allocate_mario_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 actFlags = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'allocate_mario_action'"); return 0; }
lua_pushinteger(L, allocate_mario_action(actFlags));
@@ -15225,7 +16548,7 @@ int smlua_func_camera_config_enable_analog_cam(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool enable = smlua_to_boolean(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_config_enable_analog_cam'"); return 0; }
camera_config_enable_analog_cam(enable);
@@ -15236,7 +16559,7 @@ int smlua_func_camera_config_enable_free_cam(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool enable = smlua_to_boolean(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_config_enable_free_cam'"); return 0; }
camera_config_enable_free_cam(enable);
@@ -15247,7 +16570,7 @@ int smlua_func_camera_config_enable_mouse_look(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool enable = smlua_to_boolean(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_config_enable_mouse_look'"); return 0; }
camera_config_enable_mouse_look(enable);
@@ -15303,7 +16626,7 @@ int smlua_func_camera_config_invert_x(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool invert = smlua_to_boolean(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_config_invert_x'"); return 0; }
camera_config_invert_x(invert);
@@ -15314,7 +16637,7 @@ int smlua_func_camera_config_invert_y(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool invert = smlua_to_boolean(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_config_invert_y'"); return 0; }
camera_config_invert_y(invert);
@@ -15370,7 +16693,7 @@ int smlua_func_camera_config_set_aggression(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 value = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_config_set_aggression'"); return 0; }
camera_config_set_aggression(value);
@@ -15381,7 +16704,7 @@ int smlua_func_camera_config_set_deceleration(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 value = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_config_set_deceleration'"); return 0; }
camera_config_set_deceleration(value);
@@ -15392,7 +16715,7 @@ int smlua_func_camera_config_set_pan_level(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 value = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_config_set_pan_level'"); return 0; }
camera_config_set_pan_level(value);
@@ -15403,7 +16726,7 @@ int smlua_func_camera_config_set_x_sensitivity(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 value = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_config_set_x_sensitivity'"); return 0; }
camera_config_set_x_sensitivity(value);
@@ -15414,7 +16737,7 @@ int smlua_func_camera_config_set_y_sensitivity(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 value = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'camera_config_set_y_sensitivity'"); return 0; }
camera_config_set_y_sensitivity(value);
@@ -15443,7 +16766,7 @@ int smlua_func_deref_s32_pointer(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32* pointer = (s32*)smlua_to_cpointer(L, 1, LVT_S32_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'deref_s32_pointer'"); return 0; }
lua_pushinteger(L, deref_s32_pointer(pointer));
@@ -15463,7 +16786,7 @@ int smlua_func_get_environment_region(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u8 index = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_environment_region'"); return 0; }
lua_pushnumber(L, get_environment_region(index));
@@ -15474,9 +16797,9 @@ int smlua_func_get_hand_foot_pos_x(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_hand_foot_pos_x'"); return 0; }
u8 index = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_hand_foot_pos_x'"); return 0; }
lua_pushnumber(L, get_hand_foot_pos_x(m, index));
@@ -15487,9 +16810,9 @@ int smlua_func_get_hand_foot_pos_y(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_hand_foot_pos_y'"); return 0; }
u8 index = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_hand_foot_pos_y'"); return 0; }
lua_pushnumber(L, get_hand_foot_pos_y(m, index));
@@ -15500,9 +16823,9 @@ int smlua_func_get_hand_foot_pos_z(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_hand_foot_pos_z'"); return 0; }
u8 index = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'get_hand_foot_pos_z'"); return 0; }
lua_pushnumber(L, get_hand_foot_pos_z(m, index));
@@ -15522,7 +16845,7 @@ int smlua_func_get_temp_s32_pointer(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 initialValue = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_temp_s32_pointer'"); return 0; }
smlua_push_pointer(L, LVT_S32_P, (void*)get_temp_s32_pointer(initialValue));
@@ -15533,7 +16856,7 @@ int smlua_func_hud_get_value(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
int type = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'hud_get_value'"); return 0; }
lua_pushinteger(L, hud_get_value(type));
@@ -15553,15 +16876,15 @@ int smlua_func_hud_render_power_meter(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
s32 health = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'hud_render_power_meter'"); return 0; }
f32 x = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'hud_render_power_meter'"); return 0; }
f32 y = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'hud_render_power_meter'"); return 0; }
f32 width = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'hud_render_power_meter'"); return 0; }
f32 height = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'hud_render_power_meter'"); return 0; }
hud_render_power_meter(health, x, y, width, height);
@@ -15572,9 +16895,9 @@ int smlua_func_hud_set_value(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
int type = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'hud_set_value'"); return 0; }
s32 value = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'hud_set_value'"); return 0; }
hud_set_value(type, value);
@@ -15603,13 +16926,13 @@ int smlua_func_movtexqc_register(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
const char* name = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'movtexqc_register'"); return 0; }
s16 level = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'movtexqc_register'"); return 0; }
s16 area = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'movtexqc_register'"); return 0; }
s16 type = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'movtexqc_register'"); return 0; }
movtexqc_register(name, level, area, type);
@@ -15620,15 +16943,15 @@ int smlua_func_play_transition(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
s16 transType = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_transition'"); return 0; }
s16 time = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'play_transition'"); return 0; }
u8 red = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'play_transition'"); return 0; }
u8 green = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'play_transition'"); return 0; }
u8 blue = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'play_transition'"); return 0; }
play_transition(transType, time, red, green, blue);
@@ -15639,7 +16962,7 @@ int smlua_func_save_file_set_using_backup_slot(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool usingBackupSlot = smlua_to_boolean(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'save_file_set_using_backup_slot'"); return 0; }
save_file_set_using_backup_slot(usingBackupSlot);
@@ -15650,9 +16973,9 @@ int smlua_func_set_environment_region(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
u8 index = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_environment_region'"); return 0; }
s32 value = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_environment_region'"); return 0; }
set_environment_region(index, value);
@@ -15663,7 +16986,7 @@ int smlua_func_set_override_far(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 far = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_override_far'"); return 0; }
set_override_far(far);
@@ -15674,7 +16997,7 @@ int smlua_func_set_override_fov(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 fov = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_override_fov'"); return 0; }
set_override_fov(fov);
@@ -15685,7 +17008,7 @@ int smlua_func_set_override_near(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 near = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_override_near'"); return 0; }
set_override_near(near);
@@ -15700,7 +17023,7 @@ int smlua_func_smlua_model_util_get_id(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const char* name = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'smlua_model_util_get_id'"); return 0; }
lua_pushinteger(L, smlua_model_util_get_id(name));
@@ -15724,7 +17047,7 @@ int smlua_func_get_trajectory(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const char* name = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_trajectory'"); return 0; }
smlua_push_pointer(L, LVT_TRAJECTORY_P, (void*)get_trajectory(name));
@@ -15735,11 +17058,34 @@ int smlua_func_obj_check_hitbox_overlap(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* o1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_check_hitbox_overlap'"); return 0; }
struct Object* o2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_check_hitbox_overlap'"); return 0; }
- lua_pushinteger(L, obj_check_hitbox_overlap(o1, o2));
+ lua_pushboolean(L, obj_check_hitbox_overlap(o1, o2));
+
+ return 1;
+}
+
+int smlua_func_obj_check_overlap_with_hitbox_params(lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 7)) { return 0; }
+
+ struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_check_overlap_with_hitbox_params'"); return 0; }
+ f32 x = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_check_overlap_with_hitbox_params'"); return 0; }
+ f32 y = smlua_to_number(L, 3);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_check_overlap_with_hitbox_params'"); return 0; }
+ f32 z = smlua_to_number(L, 4);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_check_overlap_with_hitbox_params'"); return 0; }
+ f32 h = smlua_to_number(L, 5);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'obj_check_overlap_with_hitbox_params'"); return 0; }
+ f32 r = smlua_to_number(L, 6);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'obj_check_overlap_with_hitbox_params'"); return 0; }
+ f32 d = smlua_to_number(L, 7);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7 for function 'obj_check_overlap_with_hitbox_params'"); return 0; }
+
+ lua_pushboolean(L, obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d));
return 1;
}
@@ -15748,7 +17094,7 @@ int smlua_func_obj_count_objects_with_behavior_id(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
int behaviorId = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_count_objects_with_behavior_id'"); return 0; }
lua_pushinteger(L, obj_count_objects_with_behavior_id(behaviorId));
@@ -15759,7 +17105,7 @@ int smlua_func_obj_get_first(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
int objList = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_first'"); return 0; }
smlua_push_object(L, LOT_OBJECT, obj_get_first(objList));
@@ -15770,7 +17116,7 @@ int smlua_func_obj_get_first_with_behavior_id(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
int behaviorId = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_first_with_behavior_id'"); return 0; }
smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id(behaviorId));
@@ -15781,11 +17127,11 @@ int smlua_func_obj_get_first_with_behavior_id_and_field_f32(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
int behaviorId = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_first_with_behavior_id_and_field_f32'"); return 0; }
s32 fieldIndex = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_get_first_with_behavior_id_and_field_f32'"); return 0; }
f32 value = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_get_first_with_behavior_id_and_field_f32'"); return 0; }
smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value));
@@ -15796,11 +17142,11 @@ int smlua_func_obj_get_first_with_behavior_id_and_field_s32(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
int behaviorId = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_first_with_behavior_id_and_field_s32'"); return 0; }
s32 fieldIndex = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_get_first_with_behavior_id_and_field_s32'"); return 0; }
s32 value = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_get_first_with_behavior_id_and_field_s32'"); return 0; }
smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value));
@@ -15811,9 +17157,9 @@ int smlua_func_obj_get_nearest_object_with_behavior_id(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_nearest_object_with_behavior_id'"); return 0; }
int behaviorId = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_get_nearest_object_with_behavior_id'"); return 0; }
smlua_push_object(L, LOT_OBJECT, obj_get_nearest_object_with_behavior_id(o, behaviorId));
@@ -15824,7 +17170,7 @@ int smlua_func_obj_get_next(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_next'"); return 0; }
smlua_push_object(L, LOT_OBJECT, obj_get_next(o));
@@ -15835,7 +17181,7 @@ int smlua_func_obj_get_next_with_same_behavior_id(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_next_with_same_behavior_id'"); return 0; }
smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id(o));
@@ -15846,11 +17192,11 @@ int smlua_func_obj_get_next_with_same_behavior_id_and_field_f32(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_next_with_same_behavior_id_and_field_f32'"); return 0; }
s32 fieldIndex = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_get_next_with_same_behavior_id_and_field_f32'"); return 0; }
f32 value = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_get_next_with_same_behavior_id_and_field_f32'"); return 0; }
smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value));
@@ -15861,11 +17207,11 @@ int smlua_func_obj_get_next_with_same_behavior_id_and_field_s32(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_next_with_same_behavior_id_and_field_s32'"); return 0; }
s32 fieldIndex = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_get_next_with_same_behavior_id_and_field_s32'"); return 0; }
s32 value = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_get_next_with_same_behavior_id_and_field_s32'"); return 0; }
smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value));
@@ -15876,7 +17222,7 @@ int smlua_func_obj_get_temp_spawn_particles_info(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
int modelId = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_get_temp_spawn_particles_info'"); return 0; }
smlua_push_object(L, LOT_SPAWNPARTICLESINFO, obj_get_temp_spawn_particles_info(modelId));
@@ -15887,9 +17233,9 @@ int smlua_func_obj_has_behavior_id(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_has_behavior_id'"); return 0; }
int behaviorId = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_has_behavior_id'"); return 0; }
lua_pushinteger(L, obj_has_behavior_id(o, behaviorId));
@@ -15900,9 +17246,9 @@ int smlua_func_obj_has_model_extended(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_has_model_extended'"); return 0; }
int modelId = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_has_model_extended'"); return 0; }
lua_pushinteger(L, obj_has_model_extended(o, modelId));
@@ -15913,9 +17259,9 @@ int smlua_func_obj_is_valid_for_interaction(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_is_valid_for_interaction'"); return 0; }
- lua_pushinteger(L, obj_is_valid_for_interaction(o));
+ lua_pushboolean(L, obj_is_valid_for_interaction(o));
return 1;
}
@@ -15924,13 +17270,13 @@ int smlua_func_obj_move_xyz(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_move_xyz'"); return 0; }
f32 dx = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_move_xyz'"); return 0; }
f32 dy = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_move_xyz'"); return 0; }
f32 dz = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_move_xyz'"); return 0; }
obj_move_xyz(o, dx, dy, dz);
@@ -15941,9 +17287,9 @@ int smlua_func_obj_set_model_extended(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_model_extended'"); return 0; }
int modelId = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_model_extended'"); return 0; }
obj_set_model_extended(o, modelId);
@@ -15954,13 +17300,13 @@ int smlua_func_obj_set_vel(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'obj_set_vel'"); return 0; }
f32 vx = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'obj_set_vel'"); return 0; }
f32 vy = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'obj_set_vel'"); return 0; }
f32 vz = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'obj_set_vel'"); return 0; }
obj_set_vel(o, vx, vy, vz);
@@ -15971,17 +17317,17 @@ int smlua_func_spawn_non_sync_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
int behaviorId = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_non_sync_object'"); return 0; }
int modelId = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_non_sync_object'"); return 0; }
f32 x = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'spawn_non_sync_object'"); return 0; }
f32 y = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'spawn_non_sync_object'"); return 0; }
f32 z = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'spawn_non_sync_object'"); return 0; }
LuaFunction objSetupFunction = smlua_to_lua_function(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'spawn_non_sync_object'"); return 0; }
smlua_push_object(L, LOT_OBJECT, spawn_non_sync_object(behaviorId, modelId, x, y, z, objSetupFunction));
@@ -15992,17 +17338,17 @@ int smlua_func_spawn_sync_object(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
int behaviorId = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'spawn_sync_object'"); return 0; }
int modelId = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'spawn_sync_object'"); return 0; }
f32 x = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'spawn_sync_object'"); return 0; }
f32 y = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'spawn_sync_object'"); return 0; }
f32 z = smlua_to_number(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'spawn_sync_object'"); return 0; }
LuaFunction objSetupFunction = smlua_to_lua_function(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'spawn_sync_object'"); return 0; }
smlua_push_object(L, LOT_OBJECT, spawn_sync_object(behaviorId, modelId, x, y, z, objSetupFunction));
@@ -16017,7 +17363,7 @@ int smlua_func_smlua_text_utils_castle_secret_stars_replace(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
const char* name = smlua_to_string(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'smlua_text_utils_castle_secret_stars_replace'"); return 0; }
smlua_text_utils_castle_secret_stars_replace(name);
@@ -16028,21 +17374,21 @@ int smlua_func_smlua_text_utils_course_acts_replace(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 8)) { return 0; }
s16 courseNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'smlua_text_utils_course_acts_replace'"); return 0; }
const char* courseName = smlua_to_string(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'smlua_text_utils_course_acts_replace'"); return 0; }
const char* act1 = smlua_to_string(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'smlua_text_utils_course_acts_replace'"); return 0; }
const char* act2 = smlua_to_string(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'smlua_text_utils_course_acts_replace'"); return 0; }
const char* act3 = smlua_to_string(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'smlua_text_utils_course_acts_replace'"); return 0; }
const char* act4 = smlua_to_string(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'smlua_text_utils_course_acts_replace'"); return 0; }
const char* act5 = smlua_to_string(L, 7);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 7 for function 'smlua_text_utils_course_acts_replace'"); return 0; }
const char* act6 = smlua_to_string(L, 8);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 8"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 8 for function 'smlua_text_utils_course_acts_replace'"); return 0; }
smlua_text_utils_course_acts_replace(courseNum, courseName, act1, act2, act3, act4, act5, act6);
@@ -16053,17 +17399,17 @@ int smlua_func_smlua_text_utils_dialog_replace(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
int dialogId = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'smlua_text_utils_dialog_replace'"); return 0; }
u32 unused = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'smlua_text_utils_dialog_replace'"); return 0; }
s8 linesPerBox = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'smlua_text_utils_dialog_replace'"); return 0; }
s16 leftOffset = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'smlua_text_utils_dialog_replace'"); return 0; }
s16 width = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 5 for function 'smlua_text_utils_dialog_replace'"); return 0; }
const char* str = smlua_to_string(L, 6);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 6 for function 'smlua_text_utils_dialog_replace'"); return 0; }
smlua_text_utils_dialog_replace(dialogId, unused, linesPerBox, leftOffset, width, str);
@@ -16074,9 +17420,9 @@ int smlua_func_smlua_text_utils_extra_text_replace(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 index = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'smlua_text_utils_extra_text_replace'"); return 0; }
const char* text = smlua_to_string(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'smlua_text_utils_extra_text_replace'"); return 0; }
smlua_text_utils_extra_text_replace(index, text);
@@ -16096,9 +17442,9 @@ int smlua_func_smlua_text_utils_secret_star_replace(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
s16 courseNum = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'smlua_text_utils_secret_star_replace'"); return 0; }
const char* courseName = smlua_to_string(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'smlua_text_utils_secret_star_replace'"); return 0; }
smlua_text_utils_secret_star_replace(courseNum, courseName);
@@ -16140,7 +17486,7 @@ int smlua_func_fadeout_level_music(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 fadeTimer = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'fadeout_level_music'"); return 0; }
fadeout_level_music(fadeTimer);
@@ -16151,7 +17497,7 @@ int smlua_func_fadeout_music(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 fadeOutTime = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'fadeout_music'"); return 0; }
fadeout_music(fadeOutTime);
@@ -16162,7 +17508,7 @@ int smlua_func_lower_background_noise(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 a = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'lower_background_noise'"); return 0; }
lower_background_noise(a);
@@ -16173,7 +17519,7 @@ int smlua_func_play_cap_music(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u16 seqArgs = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_cap_music'"); return 0; }
play_cap_music(seqArgs);
@@ -16184,7 +17530,7 @@ int smlua_func_play_cutscene_music(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u16 seqArgs = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_cutscene_music'"); return 0; }
play_cutscene_music(seqArgs);
@@ -16204,7 +17550,7 @@ int smlua_func_play_menu_sounds(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 soundMenuFlags = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'play_menu_sounds'"); return 0; }
play_menu_sounds(soundMenuFlags);
@@ -16233,7 +17579,7 @@ int smlua_func_raise_background_noise(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 a = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'raise_background_noise'"); return 0; }
raise_background_noise(a);
@@ -16253,11 +17599,11 @@ int smlua_func_set_background_music(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
u16 a = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'set_background_music'"); return 0; }
u16 seqArgs = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'set_background_music'"); return 0; }
s16 fadeTimer = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'set_background_music'"); return 0; }
set_background_music(a, seqArgs, fadeTimer);
@@ -16290,7 +17636,7 @@ int smlua_func_calc_dist_to_volume_range_1(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 distance = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'calc_dist_to_volume_range_1'"); return 0; }
extern s32 calc_dist_to_volume_range_1(f32 distance);
lua_pushinteger(L, calc_dist_to_volume_range_1(distance));
@@ -16302,7 +17648,7 @@ int smlua_func_calc_dist_to_volume_range_2(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
f32 distance = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'calc_dist_to_volume_range_2'"); return 0; }
extern s32 calc_dist_to_volume_range_2(f32 distance);
lua_pushinteger(L, calc_dist_to_volume_range_2(distance));
@@ -16314,7 +17660,7 @@ int smlua_func_cur_obj_play_sound_1(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 soundMagic = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_play_sound_1'"); return 0; }
extern void cur_obj_play_sound_1(s32 soundMagic);
cur_obj_play_sound_1(soundMagic);
@@ -16326,7 +17672,7 @@ int smlua_func_cur_obj_play_sound_2(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s32 soundMagic = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'cur_obj_play_sound_2'"); return 0; }
extern void cur_obj_play_sound_2(s32 soundMagic);
cur_obj_play_sound_2(soundMagic);
@@ -16338,7 +17684,7 @@ int smlua_func_exec_anim_sound_state(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct SoundState* soundStates = (struct SoundState*)smlua_to_cobject(L, 1, LOT_SOUNDSTATE);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'exec_anim_sound_state'"); return 0; }
extern void exec_anim_sound_state(struct SoundState *soundStates);
exec_anim_sound_state(soundStates);
@@ -16355,13 +17701,13 @@ int smlua_func_find_ceil(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
f32 posX = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_ceil'"); return 0; }
f32 posY = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_ceil'"); return 0; }
f32 posZ = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'find_ceil'"); return 0; }
// struct Surface** pceil = (struct Surface**)smlua_to_cobject(L, 4, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'find_ceil'"); return 0; }
lua_pushnumber(L, find_ceil(posX, posY, posZ, pceil));
@@ -16373,11 +17719,11 @@ int smlua_func_find_ceil_height(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 x = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_ceil_height'"); return 0; }
f32 y = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_ceil_height'"); return 0; }
f32 z = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'find_ceil_height'"); return 0; }
lua_pushnumber(L, find_ceil_height(x, y, z));
@@ -16389,13 +17735,13 @@ int smlua_func_find_floor(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
f32 xPos = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_floor'"); return 0; }
f32 yPos = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_floor'"); return 0; }
f32 zPos = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'find_floor'"); return 0; }
// struct Surface** pfloor = (struct Surface**)smlua_to_cobject(L, 4, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'find_floor'"); return 0; }
lua_pushnumber(L, find_floor(xPos, yPos, zPos, pfloor));
@@ -16407,11 +17753,11 @@ int smlua_func_find_floor_height(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
f32 x = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_floor_height'"); return 0; }
f32 y = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_floor_height'"); return 0; }
f32 z = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'find_floor_height'"); return 0; }
lua_pushnumber(L, find_floor_height(x, y, z));
@@ -16423,13 +17769,13 @@ int smlua_func_find_floor_height_and_data(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
f32 xPos = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_floor_height_and_data'"); return 0; }
f32 yPos = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_floor_height_and_data'"); return 0; }
f32 zPos = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'find_floor_height_and_data'"); return 0; }
// struct FloorGeometry** floorGeo = (struct FloorGeometry**)smlua_to_cobject(L, 4, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'find_floor_height_and_data'"); return 0; }
lua_pushnumber(L, find_floor_height_and_data(xPos, yPos, zPos, floorGeo));
@@ -16441,9 +17787,9 @@ int smlua_func_find_poison_gas_level(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 x = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_poison_gas_level'"); return 0; }
f32 z = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_poison_gas_level'"); return 0; }
lua_pushnumber(L, find_poison_gas_level(x, z));
@@ -16459,21 +17805,21 @@ int smlua_func_find_surface_on_ray(lua_State* L) {
orig[0] = smlua_get_number_field(1, "x");
orig[1] = smlua_get_number_field(1, "y");
orig[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_surface_on_ray'"); return 0; }
f32* dir = smlua_get_vec3f_from_buffer();
dir[0] = smlua_get_number_field(2, "x");
dir[1] = smlua_get_number_field(2, "y");
dir[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_surface_on_ray'"); return 0; }
// struct Surface** hit_surface = (struct Surface**)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'find_surface_on_ray'"); return 0; }
f32* hit_pos = smlua_get_vec3f_from_buffer();
hit_pos[0] = smlua_get_number_field(4, "x");
hit_pos[1] = smlua_get_number_field(4, "y");
hit_pos[2] = smlua_get_number_field(4, "z");
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'find_surface_on_ray'"); return 0; }
find_surface_on_ray(orig, dir, hit_surface, hit_pos);
@@ -16497,7 +17843,7 @@ int smlua_func_find_wall_collisions(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
struct WallCollisionData* colData = (struct WallCollisionData*)smlua_to_cobject(L, 1, LOT_WALLCOLLISIONDATA);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_wall_collisions'"); return 0; }
lua_pushinteger(L, find_wall_collisions(colData));
@@ -16508,9 +17854,9 @@ int smlua_func_find_water_level(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
f32 x = smlua_to_number(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'find_water_level'"); return 0; }
f32 z = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'find_water_level'"); return 0; }
lua_pushnumber(L, find_water_level(x, z));
@@ -16543,7 +17889,7 @@ int smlua_func_get_area_terrain_size(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
s16 * data = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'get_area_terrain_size'"); return 0; }
lua_pushinteger(L, get_area_terrain_size(data));
@@ -16554,13 +17900,13 @@ int smlua_func_load_area_terrain(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
s16 index = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'load_area_terrain'"); return 0; }
s16 * data = (s16 *)smlua_to_cpointer(L, 2, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 2 for function 'load_area_terrain'"); return 0; }
s8 * surfaceRooms = (s8 *)smlua_to_cpointer(L, 3, LVT_S8_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 3 for function 'load_area_terrain'"); return 0; }
s16 * macroObjects = (s16 *)smlua_to_cpointer(L, 4, LVT_S16_P);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4"); return 0; }
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 4 for function 'load_area_terrain'"); return 0; }
load_area_terrain(index, data, surfaceRooms, macroObjects);
@@ -17369,6 +18715,7 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "play_sound_and_spawn_particles", smlua_func_play_sound_and_spawn_particles);
smlua_bind_function(L, "play_sound_if_no_flag", smlua_func_play_sound_if_no_flag);
smlua_bind_function(L, "resolve_and_return_wall_collisions", smlua_func_resolve_and_return_wall_collisions);
+ smlua_bind_function(L, "resolve_and_return_wall_collisions_data", smlua_func_resolve_and_return_wall_collisions_data);
smlua_bind_function(L, "return_mario_anim_y_translation", smlua_func_return_mario_anim_y_translation);
smlua_bind_function(L, "set_anim_to_frame", smlua_func_set_anim_to_frame);
smlua_bind_function(L, "set_jump_from_landing", smlua_func_set_jump_from_landing);
@@ -17521,6 +18868,55 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "stationary_ground_step", smlua_func_stationary_ground_step);
smlua_bind_function(L, "stop_and_set_height_to_floor", smlua_func_stop_and_set_height_to_floor);
+ // math_util.h
+ //smlua_bind_function(L, "anim_spline_init", smlua_func_anim_spline_init); <--- UNIMPLEMENTED
+ smlua_bind_function(L, "anim_spline_poll", smlua_func_anim_spline_poll);
+ smlua_bind_function(L, "approach_f32", smlua_func_approach_f32);
+ smlua_bind_function(L, "approach_s32", smlua_func_approach_s32);
+ //smlua_bind_function(L, "find_vector_perpendicular_to_plane", smlua_func_find_vector_perpendicular_to_plane); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "get_pos_from_transform_mtx", smlua_func_get_pos_from_transform_mtx); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_align_terrain_normal", smlua_func_mtxf_align_terrain_normal); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_align_terrain_triangle", smlua_func_mtxf_align_terrain_triangle); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_billboard", smlua_func_mtxf_billboard); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_copy", smlua_func_mtxf_copy); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_cylboard", smlua_func_mtxf_cylboard); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_identity", smlua_func_mtxf_identity); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_inverse", smlua_func_mtxf_inverse); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_lookat", smlua_func_mtxf_lookat); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_mul", smlua_func_mtxf_mul); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_mul_vec3s", smlua_func_mtxf_mul_vec3s); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_rotate_xy", smlua_func_mtxf_rotate_xy); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_rotate_xyz_and_translate", smlua_func_mtxf_rotate_xyz_and_translate); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_rotate_zxy_and_translate", smlua_func_mtxf_rotate_zxy_and_translate); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_scale_vec3f", smlua_func_mtxf_scale_vec3f); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_to_mtx", smlua_func_mtxf_to_mtx); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "mtxf_translate", smlua_func_mtxf_translate); <--- UNIMPLEMENTED
+ smlua_bind_function(L, "not_zero", smlua_func_not_zero);
+ //smlua_bind_function(L, "spline_get_weights", smlua_func_spline_get_weights); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3f_add", smlua_func_vec3f_add); <--- UNIMPLEMENTED
+ smlua_bind_function(L, "vec3f_combine", smlua_func_vec3f_combine);
+ //smlua_bind_function(L, "vec3f_copy", smlua_func_vec3f_copy); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3f_cross", smlua_func_vec3f_cross); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3f_dif", smlua_func_vec3f_dif); <--- UNIMPLEMENTED
+ smlua_bind_function(L, "vec3f_dist", smlua_func_vec3f_dist);
+ smlua_bind_function(L, "vec3f_dot", smlua_func_vec3f_dot);
+ smlua_bind_function(L, "vec3f_get_dist_and_angle", smlua_func_vec3f_get_dist_and_angle);
+ smlua_bind_function(L, "vec3f_length", smlua_func_vec3f_length);
+ //smlua_bind_function(L, "vec3f_mul", smlua_func_vec3f_mul); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3f_normalize", smlua_func_vec3f_normalize); <--- UNIMPLEMENTED
+ smlua_bind_function(L, "vec3f_project", smlua_func_vec3f_project);
+ //smlua_bind_function(L, "vec3f_rotate_zxy", smlua_func_vec3f_rotate_zxy); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3f_set", smlua_func_vec3f_set); <--- UNIMPLEMENTED
+ smlua_bind_function(L, "vec3f_set_dist_and_angle", smlua_func_vec3f_set_dist_and_angle);
+ //smlua_bind_function(L, "vec3f_sum", smlua_func_vec3f_sum); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3f_to_vec3s", smlua_func_vec3f_to_vec3s); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3s_add", smlua_func_vec3s_add); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3s_copy", smlua_func_vec3s_copy); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3s_set", smlua_func_vec3s_set); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3s_sub", smlua_func_vec3s_sub); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3s_sum", smlua_func_vec3s_sum); <--- UNIMPLEMENTED
+ //smlua_bind_function(L, "vec3s_to_vec3f", smlua_func_vec3s_to_vec3f); <--- UNIMPLEMENTED
+
// network_player.h
smlua_bind_function(L, "get_network_player_from_area", smlua_func_get_network_player_from_area);
smlua_bind_function(L, "get_network_player_from_level", smlua_func_get_network_player_from_level);
@@ -17961,6 +19357,7 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "get_temp_object_hitbox", smlua_func_get_temp_object_hitbox);
smlua_bind_function(L, "get_trajectory", smlua_func_get_trajectory);
smlua_bind_function(L, "obj_check_hitbox_overlap", smlua_func_obj_check_hitbox_overlap);
+ smlua_bind_function(L, "obj_check_overlap_with_hitbox_params", smlua_func_obj_check_overlap_with_hitbox_params);
smlua_bind_function(L, "obj_count_objects_with_behavior_id", smlua_func_obj_count_objects_with_behavior_id);
smlua_bind_function(L, "obj_get_first", smlua_func_obj_get_first);
smlua_bind_function(L, "obj_get_first_with_behavior_id", smlua_func_obj_get_first_with_behavior_id);
diff --git a/src/pc/lua/utils/smlua_obj_utils.c b/src/pc/lua/utils/smlua_obj_utils.c
index 8310c0940..e64075b0b 100644
--- a/src/pc/lua/utils/smlua_obj_utils.c
+++ b/src/pc/lua/utils/smlua_obj_utils.c
@@ -260,20 +260,45 @@ struct ObjectHitbox* get_temp_object_hitbox(void) {
return &sTmpHitbox;
}
-s32 obj_is_valid_for_interaction(struct Object *o) {
+bool obj_is_valid_for_interaction(struct Object *o) {
return o->activeFlags != ACTIVE_FLAG_DEACTIVATED && o->oIntangibleTimer == 0 && (o->oInteractStatus & INT_STATUS_INTERACTED) == 0;
}
-s32 obj_check_hitbox_overlap(struct Object *o1, struct Object *o2) {
- f32 r2 = sqr(max(o1->hitboxRadius, o1->hurtboxRadius) + max(o2->hitboxRadius, o2->hurtboxRadius));
+bool obj_check_hitbox_overlap(struct Object *o1, struct Object *o2) {
+ if (o1 == NULL || o2 == NULL) { return FALSE; }
+
+ f32 o1H = max(o1->hitboxHeight, o1->hurtboxHeight);
+ f32 o1R = max(o1->hitboxRadius, o1->hurtboxRadius);
+ f32 o2H = max(o2->hitboxHeight, o2->hurtboxHeight);
+ f32 o2R = max(o2->hitboxRadius, o2->hurtboxRadius);
+
+ f32 r2 = sqr(o1R + o2R);
f32 d2 = sqr(o1->oPosX - o2->oPosX) + sqr(o1->oPosZ - o2->oPosZ);
if (d2 > r2) return FALSE;
f32 hb1lb = o1->oPosY - o1->hitboxDownOffset;
- f32 hb1ub = hb1lb + max(o1->hitboxHeight, o1->hurtboxHeight);
+ f32 hb1ub = hb1lb + o1H;
f32 hb2lb = o2->oPosY - o2->hitboxDownOffset;
- f32 hb2ub = hb2lb + max(o2->hitboxHeight, o2->hurtboxHeight);
- f32 hbsoh = max(o1->hitboxHeight, o1->hurtboxHeight) + max(o2->hitboxHeight, o2->hurtboxHeight);
- if (hb2ub - hb1lb > hbsoh || hb1ub - hb2lb > hbsoh) return FALSE;
+ f32 hb2ub = hb2lb + o2H;
+ f32 hbsoh = o1H + o2H;
+ if ((hb2ub - hb1lb) > hbsoh || (hb1ub - hb2lb) > hbsoh) return FALSE;
+ return TRUE;
+}
+
+bool obj_check_overlap_with_hitbox_params(struct Object *o, f32 x, f32 y, f32 z, f32 h, f32 r, f32 d) {
+ if (o == NULL) { return FALSE; }
+
+ f32 oH = max(o->hitboxHeight, o->hurtboxHeight);
+ f32 oR = max(o->hitboxRadius, o->hurtboxRadius);
+
+ f32 r2 = sqr(oR + r);
+ f32 d2 = sqr(o->oPosX - x) + sqr(o->oPosZ - z);
+ if (d2 > r2) return FALSE;
+ f32 hb1lb = o->oPosY - o->hitboxDownOffset;
+ f32 hb1ub = hb1lb + oH;
+ f32 hb2lb = y - d;
+ f32 hb2ub = hb2lb + h;
+ f32 hbsoh = oH + h;
+ if ((hb2ub - hb1lb) > hbsoh || (hb1ub - hb2lb) > hbsoh) return FALSE;
return TRUE;
}
diff --git a/src/pc/lua/utils/smlua_obj_utils.h b/src/pc/lua/utils/smlua_obj_utils.h
index e432c0859..1357016d2 100644
--- a/src/pc/lua/utils/smlua_obj_utils.h
+++ b/src/pc/lua/utils/smlua_obj_utils.h
@@ -37,8 +37,9 @@ s32 obj_count_objects_with_behavior_id(enum BehaviorId behaviorId);
struct SpawnParticlesInfo* obj_get_temp_spawn_particles_info(enum ModelExtendedId modelId);
struct ObjectHitbox* get_temp_object_hitbox(void);
-s32 obj_is_valid_for_interaction(struct Object *o);
-s32 obj_check_hitbox_overlap(struct Object *o1, struct Object *o2);
+bool obj_is_valid_for_interaction(struct Object *o);
+bool obj_check_hitbox_overlap(struct Object *o1, struct Object *o2);
+bool obj_check_overlap_with_hitbox_params(struct Object *o, f32 x, f32 y, f32 z, f32 h, f32 r, f32 d);
void obj_set_vel(struct Object *o, f32 vx, f32 vy, f32 vz);
void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz);