exposed a bunch of interaction functions to Lua (#22)

Renamed the function interact_unknown_08 to interact_spiny_walking
and added the constant INTERACT_SPINY_WALKING, which has the same value of INTERACT_UNKNOWN_08
INTERACT_UNKNOWN_08 is kept for compatibility with smlua, and behavior dynos bins
This commit is contained in:
Isaac0-dev 2024-05-03 18:38:21 +10:00 committed by GitHub
parent df7da84cc6
commit 90b071acc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 3497 additions and 1949 deletions

View file

@ -3786,6 +3786,9 @@ ATTACK_KICK_OR_TRIP = 2
--- @type integer
ATTACK_PUNCH = 1
--- @type integer
INTERACT_UNKNOWN_08 = (1 << 8)
--- @type integer
INT_ANY_ATTACK = (INT_GROUND_POUND_OR_TWIRL | INT_PUNCH | INT_KICK | INT_TRIP | INT_SLIDE_KICK | INT_FAST_ATTACK_OR_SHELL | INT_HIT_FROM_ABOVE | INT_HIT_FROM_BELOW)
@ -3953,7 +3956,7 @@ INTERACT_POLE = (1 << 6)
INTERACT_KOOPA = (1 << 7)
--- @type InteractionType
INTERACT_UNKNOWN_08 = (1 << 8)
INTERACT_SPINY_WALKING = (1 << 8)
--- @type InteractionType
INTERACT_BREAKABLE = (1 << 9)

View file

@ -4077,6 +4077,70 @@ function get_door_save_file_flag(door)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_bbh_entrance(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_bounce_top(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_breakable(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_bully(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_cannon_base(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_cap(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_clam_or_bubba(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_coin(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
@ -4085,6 +4149,174 @@ function interact_damage(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_door(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_flame(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_grabbable(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_hit_from_below(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_hoot(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_igloo_barrier(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_koopa_shell(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_mr_blizzard(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_player(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_pole(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_shock(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_snufit_bullet(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_spiny_walking(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_star_or_key(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_strong_wind(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_text(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_tornado(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_warp(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_warp_door(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_water_ring(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param interactType integer
--- @param o Object
--- @return integer
function interact_whirlpool(m, interactType, o)
-- ...
end
--- @param m MarioState
--- @param capSpeed number
--- @return nil

View file

@ -2006,6 +2006,7 @@
--- @field public headlessServer integer
--- @field public maxPlayers integer
--- @field public nametags integer
--- @field public pauseAnywhere integer
--- @field public playerInteractions PlayerInteractions
--- @field public playerKnockbackStrength integer
--- @field public skipIntro integer

View file

@ -107,6 +107,7 @@ s64 DynOS_Bhv_ParseBehaviorIntegerScriptConstants(const String &_Arg, bool *foun
bhv_constant(INTERACT_POLE);
bhv_constant(INTERACT_KOOPA);
bhv_constant(INTERACT_UNKNOWN_08);
bhv_constant(INTERACT_SPINY_WALKING);
bhv_constant(INTERACT_BREAKABLE);
bhv_constant(INTERACT_STRONG_WIND);
bhv_constant(INTERACT_WARP_DOOR);
@ -2494,7 +2495,7 @@ static DataNode<BehaviorScript> *DynOS_Bhv_Load(BinFile *aFile, GfxData *aGfxDat
// We have nothing to return, So return NULL.
return NULL;
}
// Allocate our node.
DataNode<BehaviorScript> *_Node = New<DataNode<BehaviorScript>>();
@ -2518,7 +2519,7 @@ static DataNode<BehaviorScript> *DynOS_Bhv_Load(BinFile *aFile, GfxData *aGfxDat
// We have nothing to return, So return NULL.
return NULL;
}
// If we have nothing in the .bhv file, It compiled incorrectly or is maliciously crafted.
// We also check if the specified behavior size is valid for the file.
u32 dataSize = aFile->Read<u32>();
@ -2548,7 +2549,7 @@ static DataNode<BehaviorScript> *DynOS_Bhv_Load(BinFile *aFile, GfxData *aGfxDat
_Node->mData[i] = (uintptr_t) _Value;
}
}
// Add it
if (aGfxData != NULL) {
aGfxData->mBehaviorScripts.Add(_Node);

View file

@ -1321,6 +1321,7 @@
- ATTACK_GROUND_POUND_OR_TWIRL
- ATTACK_KICK_OR_TRIP
- ATTACK_PUNCH
- INTERACT_UNKNOWN_08
- INT_ANY_ATTACK
- INT_ATTACK_NOT_FROM_BELOW
- INT_ATTACK_NOT_WEAK_FROM_ABOVE
@ -1383,7 +1384,7 @@
| INTERACT_CAP | (1 << 5) |
| INTERACT_POLE | (1 << 6) |
| INTERACT_KOOPA | (1 << 7) |
| INTERACT_UNKNOWN_08 | (1 << 8) |
| INTERACT_SPINY_WALKING | (1 << 8) |
| INTERACT_BREAKABLE | (1 << 9) |
| INTERACT_STRONG_WIND | (1 << 10) |
| INTERACT_WARP_DOOR | (1 << 11) |

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -5,6 +5,571 @@
[< prev](functions-4.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | 5]
---
# functions from smlua_collision_utils.h
<br />
## [collision_find_ceil](#collision_find_ceil)
### Lua Example
`local SurfaceValue = collision_find_ceil(x, y, z)`
### Parameters
| Field | Type |
| ----- | ---- |
| x | `number` |
| y | `number` |
| z | `number` |
### Returns
[Surface](structs.md#Surface)
### C Prototype
`struct Surface* collision_find_ceil(f32 x, f32 y, f32 z);`
[:arrow_up_small:](#)
<br />
## [collision_find_floor](#collision_find_floor)
### Lua Example
`local SurfaceValue = collision_find_floor(x, y, z)`
### Parameters
| Field | Type |
| ----- | ---- |
| x | `number` |
| y | `number` |
| z | `number` |
### Returns
[Surface](structs.md#Surface)
### C Prototype
`struct Surface* collision_find_floor(f32 x, f32 y, f32 z);`
[:arrow_up_small:](#)
<br />
## [collision_find_surface_on_ray](#collision_find_surface_on_ray)
### Lua Example
`local RayIntersectionInfoValue = collision_find_surface_on_ray(startX, startY, startZ, dirX, dirY, dirZ)`
### Parameters
| Field | Type |
| ----- | ---- |
| startX | `number` |
| startY | `number` |
| startZ | `number` |
| dirX | `number` |
| dirY | `number` |
| dirZ | `number` |
### Returns
[RayIntersectionInfo](structs.md#RayIntersectionInfo)
### C Prototype
`struct RayIntersectionInfo* collision_find_surface_on_ray(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ);`
[:arrow_up_small:](#)
<br />
## [collision_get_temp_wall_collision_data](#collision_get_temp_wall_collision_data)
### Lua Example
`local WallCollisionDataValue = collision_get_temp_wall_collision_data()`
### Parameters
- None
### Returns
[WallCollisionData](structs.md#WallCollisionData)
### C Prototype
`struct WallCollisionData* collision_get_temp_wall_collision_data(void);`
[:arrow_up_small:](#)
<br />
## [get_water_surface_pseudo_floor](#get_water_surface_pseudo_floor)
### Lua Example
`local SurfaceValue = get_water_surface_pseudo_floor()`
### Parameters
- None
### Returns
[Surface](structs.md#Surface)
### C Prototype
`struct Surface* get_water_surface_pseudo_floor(void);`
[:arrow_up_small:](#)
<br />
## [smlua_collision_util_get](#smlua_collision_util_get)
### Lua Example
`local PointerValue = smlua_collision_util_get(name)`
### Parameters
| Field | Type |
| ----- | ---- |
| name | `string` |
### Returns
- `Pointer` <`Collision`>
### C Prototype
`Collision* smlua_collision_util_get(const char* name);`
[:arrow_up_small:](#)
<br />
---
# functions from smlua_deprecated.h
<br />
---
# functions from smlua_level_utils.h
<br />
## [level_is_vanilla_level](#level_is_vanilla_level)
### Lua Example
`local booleanValue = level_is_vanilla_level(levelNum)`
### Parameters
| Field | Type |
| ----- | ---- |
| levelNum | `integer` |
### Returns
- `boolean`
### C Prototype
`bool level_is_vanilla_level(s16 levelNum);`
[:arrow_up_small:](#)
<br />
## [level_register](#level_register)
### Lua Example
`local integerValue = level_register(scriptEntryName, courseNum, fullName, shortName, acousticReach, echoLevel1, echoLevel2, echoLevel3)`
### Parameters
| Field | Type |
| ----- | ---- |
| scriptEntryName | `string` |
| courseNum | `integer` |
| fullName | `string` |
| shortName | `string` |
| acousticReach | `integer` |
| echoLevel1 | `integer` |
| echoLevel2 | `integer` |
| echoLevel3 | `integer` |
### Returns
- `integer`
### C Prototype
`s16 level_register(const char* scriptEntryName, s16 courseNum, const char* fullName, const char* shortName, u32 acousticReach, u32 echoLevel1, u32 echoLevel2, u32 echoLevel3);`
[:arrow_up_small:](#)
<br />
## [smlua_level_util_change_area](#smlua_level_util_change_area)
### Lua Example
`smlua_level_util_change_area(areaIndex)`
### Parameters
| Field | Type |
| ----- | ---- |
| areaIndex | `integer` |
### Returns
- None
### C Prototype
`void smlua_level_util_change_area(s32 areaIndex);`
[:arrow_up_small:](#)
<br />
## [smlua_level_util_get_info](#smlua_level_util_get_info)
### Lua Example
`local CustomLevelInfoValue = smlua_level_util_get_info(levelNum)`
### Parameters
| Field | Type |
| ----- | ---- |
| levelNum | `integer` |
### Returns
[CustomLevelInfo](structs.md#CustomLevelInfo)
### C Prototype
`struct CustomLevelInfo* smlua_level_util_get_info(s16 levelNum);`
[:arrow_up_small:](#)
<br />
## [smlua_level_util_get_info_from_course_num](#smlua_level_util_get_info_from_course_num)
### Lua Example
`local CustomLevelInfoValue = smlua_level_util_get_info_from_course_num(courseNum)`
### Parameters
| Field | Type |
| ----- | ---- |
| courseNum | `integer` |
### Returns
[CustomLevelInfo](structs.md#CustomLevelInfo)
### C Prototype
`struct CustomLevelInfo* smlua_level_util_get_info_from_course_num(u8 courseNum);`
[:arrow_up_small:](#)
<br />
## [smlua_level_util_get_info_from_short_name](#smlua_level_util_get_info_from_short_name)
### Lua Example
`local CustomLevelInfoValue = smlua_level_util_get_info_from_short_name(shortName)`
### Parameters
| Field | Type |
| ----- | ---- |
| shortName | `string` |
### Returns
[CustomLevelInfo](structs.md#CustomLevelInfo)
### C Prototype
`struct CustomLevelInfo* smlua_level_util_get_info_from_short_name(const char* shortName);`
[:arrow_up_small:](#)
<br />
## [warp_exit_level](#warp_exit_level)
### Lua Example
`local booleanValue = warp_exit_level(aDelay)`
### Parameters
| Field | Type |
| ----- | ---- |
| aDelay | `integer` |
### Returns
- `boolean`
### C Prototype
`bool warp_exit_level(s32 aDelay);`
[:arrow_up_small:](#)
<br />
## [warp_restart_level](#warp_restart_level)
### Lua Example
`local booleanValue = warp_restart_level()`
### Parameters
- None
### Returns
- `boolean`
### C Prototype
`bool warp_restart_level(void);`
[:arrow_up_small:](#)
<br />
## [warp_to_castle](#warp_to_castle)
### Lua Example
`local booleanValue = warp_to_castle(aLevel)`
### Parameters
| Field | Type |
| ----- | ---- |
| aLevel | `integer` |
### Returns
- `boolean`
### C Prototype
`bool warp_to_castle(s32 aLevel);`
[:arrow_up_small:](#)
<br />
## [warp_to_level](#warp_to_level)
### Lua Example
`local booleanValue = warp_to_level(aLevel, aArea, aAct)`
### Parameters
| Field | Type |
| ----- | ---- |
| aLevel | `integer` |
| aArea | `integer` |
| aAct | `integer` |
### Returns
- `boolean`
### C Prototype
`bool warp_to_level(s32 aLevel, s32 aArea, s32 aAct);`
[:arrow_up_small:](#)
<br />
## [warp_to_start_level](#warp_to_start_level)
### Lua Example
`local booleanValue = warp_to_start_level()`
### Parameters
- None
### Returns
- `boolean`
### C Prototype
`bool warp_to_start_level(void);`
[:arrow_up_small:](#)
<br />
## [warp_to_warpnode](#warp_to_warpnode)
### Lua Example
`local booleanValue = warp_to_warpnode(aLevel, aArea, aAct, aWarpId)`
### Parameters
| Field | Type |
| ----- | ---- |
| aLevel | `integer` |
| aArea | `integer` |
| aAct | `integer` |
| aWarpId | `integer` |
### Returns
- `boolean`
### C Prototype
`bool warp_to_warpnode(s32 aLevel, s32 aArea, s32 aAct, s32 aWarpId);`
[:arrow_up_small:](#)
<br />
---
# functions from smlua_math_utils.h
<br />
## [clamp](#clamp)
### Lua Example
`local integerValue = clamp(a, b, c)`
### Parameters
| Field | Type |
| ----- | ---- |
| a | `integer` |
| b | `integer` |
| c | `integer` |
### Returns
- `integer`
### C Prototype
`s32 clamp(s32 a, s32 b, s32 c);`
[:arrow_up_small:](#)
<br />
## [clampf](#clampf)
### Lua Example
`local numberValue = clampf(a, b, c)`
### Parameters
| Field | Type |
| ----- | ---- |
| a | `number` |
| b | `number` |
| c | `number` |
### Returns
- `number`
### C Prototype
`f32 clampf(f32 a, f32 b, f32 c);`
[:arrow_up_small:](#)
<br />
## [max](#max)
### Lua Example
`local integerValue = max(a, b)`
### Parameters
| Field | Type |
| ----- | ---- |
| a | `integer` |
| b | `integer` |
### Returns
- `integer`
### C Prototype
`s32 max(s32 a, s32 b);`
[:arrow_up_small:](#)
<br />
## [maxf](#maxf)
### Lua Example
`local numberValue = maxf(a, b)`
### Parameters
| Field | Type |
| ----- | ---- |
| a | `number` |
| b | `number` |
### Returns
- `number`
### C Prototype
`f32 maxf(f32 a, f32 b);`
[:arrow_up_small:](#)
<br />
## [min](#min)
### Lua Example
`local integerValue = min(a, b)`
### Parameters
| Field | Type |
| ----- | ---- |
| a | `integer` |
| b | `integer` |
### Returns
- `integer`
### C Prototype
`s32 min(s32 a, s32 b);`
[:arrow_up_small:](#)
<br />
## [minf](#minf)
### Lua Example
`local numberValue = minf(a, b)`
### Parameters
| Field | Type |
| ----- | ---- |
| a | `number` |
| b | `number` |
### Returns
- `number`
### C Prototype
`f32 minf(f32 a, f32 b);`
[:arrow_up_small:](#)
<br />
## [sqr](#sqr)
### Lua Example
`local integerValue = sqr(x)`
### Parameters
| Field | Type |
| ----- | ---- |
| x | `integer` |
### Returns
- `integer`
### C Prototype
`s32 sqr(s32 x);`
[:arrow_up_small:](#)
<br />
## [sqrf](#sqrf)
### Lua Example
`local numberValue = sqrf(x)`
### Parameters
| Field | Type |
| ----- | ---- |
| x | `number` |
### Returns
- `number`
### C Prototype
`f32 sqrf(f32 x);`
[:arrow_up_small:](#)
<br />
---
# functions from smlua_misc_utils.h

View file

@ -820,7 +820,36 @@
- [determine_interaction](functions-3.md#determine_interaction)
- [does_mario_have_normal_cap_on_head](functions-3.md#does_mario_have_normal_cap_on_head)
- [get_door_save_file_flag](functions-3.md#get_door_save_file_flag)
- [interact_bbh_entrance](functions-3.md#interact_bbh_entrance)
- [interact_bounce_top](functions-3.md#interact_bounce_top)
- [interact_breakable](functions-3.md#interact_breakable)
- [interact_bully](functions-3.md#interact_bully)
- [interact_cannon_base](functions-3.md#interact_cannon_base)
- [interact_cap](functions-3.md#interact_cap)
- [interact_clam_or_bubba](functions-3.md#interact_clam_or_bubba)
- [interact_coin](functions-3.md#interact_coin)
- [interact_damage](functions-3.md#interact_damage)
- [interact_door](functions-3.md#interact_door)
- [interact_flame](functions-3.md#interact_flame)
- [interact_grabbable](functions-3.md#interact_grabbable)
- [interact_hit_from_below](functions-3.md#interact_hit_from_below)
- [interact_hoot](functions-3.md#interact_hoot)
- [interact_igloo_barrier](functions-3.md#interact_igloo_barrier)
- [interact_koopa_shell](functions-3.md#interact_koopa_shell)
- [interact_mr_blizzard](functions-3.md#interact_mr_blizzard)
- [interact_player](functions-3.md#interact_player)
- [interact_pole](functions-3.md#interact_pole)
- [interact_shock](functions-3.md#interact_shock)
- [interact_snufit_bullet](functions-3.md#interact_snufit_bullet)
- [interact_spiny_walking](functions-3.md#interact_spiny_walking)
- [interact_star_or_key](functions-3.md#interact_star_or_key)
- [interact_strong_wind](functions-3.md#interact_strong_wind)
- [interact_text](functions-3.md#interact_text)
- [interact_tornado](functions-3.md#interact_tornado)
- [interact_warp](functions-3.md#interact_warp)
- [interact_warp_door](functions-3.md#interact_warp_door)
- [interact_water_ring](functions-3.md#interact_water_ring)
- [interact_whirlpool](functions-3.md#interact_whirlpool)
- [mario_blow_off_cap](functions-3.md#mario_blow_off_cap)
- [mario_check_object_grab](functions-3.md#mario_check_object_grab)
- [mario_drop_held_object](functions-3.md#mario_drop_held_object)
@ -1075,69 +1104,69 @@
<br />
- math_util.h
- [anim_spline_init](functions-3.md#anim_spline_init)
- [anim_spline_poll](functions-3.md#anim_spline_poll)
- [approach_f32](functions-3.md#approach_f32)
- [approach_s32](functions-3.md#approach_s32)
- [find_vector_perpendicular_to_plane](functions-3.md#find_vector_perpendicular_to_plane)
- [get_pos_from_transform_mtx](functions-3.md#get_pos_from_transform_mtx)
- [mtxf_align_terrain_normal](functions-3.md#mtxf_align_terrain_normal)
- [mtxf_align_terrain_triangle](functions-3.md#mtxf_align_terrain_triangle)
- [mtxf_billboard](functions-3.md#mtxf_billboard)
- [mtxf_copy](functions-3.md#mtxf_copy)
- [mtxf_cylboard](functions-3.md#mtxf_cylboard)
- [mtxf_identity](functions-3.md#mtxf_identity)
- [mtxf_inverse](functions-3.md#mtxf_inverse)
- [mtxf_lookat](functions-3.md#mtxf_lookat)
- [mtxf_mul](functions-3.md#mtxf_mul)
- [mtxf_mul_vec3s](functions-3.md#mtxf_mul_vec3s)
- [mtxf_rotate_xy](functions-3.md#mtxf_rotate_xy)
- [mtxf_rotate_xyz_and_translate](functions-3.md#mtxf_rotate_xyz_and_translate)
- [mtxf_rotate_zxy_and_translate](functions-3.md#mtxf_rotate_zxy_and_translate)
- [mtxf_scale_vec3f](functions-3.md#mtxf_scale_vec3f)
- [mtxf_to_mtx](functions-3.md#mtxf_to_mtx)
- [mtxf_translate](functions-3.md#mtxf_translate)
- [not_zero](functions-3.md#not_zero)
- [spline_get_weights](functions-3.md#spline_get_weights)
- [vec3f_add](functions-3.md#vec3f_add)
- [vec3f_combine](functions-3.md#vec3f_combine)
- [vec3f_copy](functions-3.md#vec3f_copy)
- [vec3f_cross](functions-3.md#vec3f_cross)
- [vec3f_dif](functions-3.md#vec3f_dif)
- [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_mul](functions-3.md#vec3f_mul)
- [vec3f_normalize](functions-3.md#vec3f_normalize)
- [vec3f_project](functions-3.md#vec3f_project)
- [vec3f_rotate_zxy](functions-3.md#vec3f_rotate_zxy)
- [vec3f_set](functions-3.md#vec3f_set)
- [vec3f_set_dist_and_angle](functions-3.md#vec3f_set_dist_and_angle)
- [vec3f_sum](functions-3.md#vec3f_sum)
- [vec3f_to_vec3s](functions-3.md#vec3f_to_vec3s)
- [vec3s_add](functions-3.md#vec3s_add)
- [vec3s_copy](functions-3.md#vec3s_copy)
- [vec3s_set](functions-3.md#vec3s_set)
- [vec3s_sum](functions-3.md#vec3s_sum)
- [vec3s_to_vec3f](functions-3.md#vec3s_to_vec3f)
- [anim_spline_init](functions-4.md#anim_spline_init)
- [anim_spline_poll](functions-4.md#anim_spline_poll)
- [approach_f32](functions-4.md#approach_f32)
- [approach_s32](functions-4.md#approach_s32)
- [find_vector_perpendicular_to_plane](functions-4.md#find_vector_perpendicular_to_plane)
- [get_pos_from_transform_mtx](functions-4.md#get_pos_from_transform_mtx)
- [mtxf_align_terrain_normal](functions-4.md#mtxf_align_terrain_normal)
- [mtxf_align_terrain_triangle](functions-4.md#mtxf_align_terrain_triangle)
- [mtxf_billboard](functions-4.md#mtxf_billboard)
- [mtxf_copy](functions-4.md#mtxf_copy)
- [mtxf_cylboard](functions-4.md#mtxf_cylboard)
- [mtxf_identity](functions-4.md#mtxf_identity)
- [mtxf_inverse](functions-4.md#mtxf_inverse)
- [mtxf_lookat](functions-4.md#mtxf_lookat)
- [mtxf_mul](functions-4.md#mtxf_mul)
- [mtxf_mul_vec3s](functions-4.md#mtxf_mul_vec3s)
- [mtxf_rotate_xy](functions-4.md#mtxf_rotate_xy)
- [mtxf_rotate_xyz_and_translate](functions-4.md#mtxf_rotate_xyz_and_translate)
- [mtxf_rotate_zxy_and_translate](functions-4.md#mtxf_rotate_zxy_and_translate)
- [mtxf_scale_vec3f](functions-4.md#mtxf_scale_vec3f)
- [mtxf_to_mtx](functions-4.md#mtxf_to_mtx)
- [mtxf_translate](functions-4.md#mtxf_translate)
- [not_zero](functions-4.md#not_zero)
- [spline_get_weights](functions-4.md#spline_get_weights)
- [vec3f_add](functions-4.md#vec3f_add)
- [vec3f_combine](functions-4.md#vec3f_combine)
- [vec3f_copy](functions-4.md#vec3f_copy)
- [vec3f_cross](functions-4.md#vec3f_cross)
- [vec3f_dif](functions-4.md#vec3f_dif)
- [vec3f_dist](functions-4.md#vec3f_dist)
- [vec3f_dot](functions-4.md#vec3f_dot)
- [vec3f_get_dist_and_angle](functions-4.md#vec3f_get_dist_and_angle)
- [vec3f_length](functions-4.md#vec3f_length)
- [vec3f_mul](functions-4.md#vec3f_mul)
- [vec3f_normalize](functions-4.md#vec3f_normalize)
- [vec3f_project](functions-4.md#vec3f_project)
- [vec3f_rotate_zxy](functions-4.md#vec3f_rotate_zxy)
- [vec3f_set](functions-4.md#vec3f_set)
- [vec3f_set_dist_and_angle](functions-4.md#vec3f_set_dist_and_angle)
- [vec3f_sum](functions-4.md#vec3f_sum)
- [vec3f_to_vec3s](functions-4.md#vec3f_to_vec3s)
- [vec3s_add](functions-4.md#vec3s_add)
- [vec3s_copy](functions-4.md#vec3s_copy)
- [vec3s_set](functions-4.md#vec3s_set)
- [vec3s_sum](functions-4.md#vec3s_sum)
- [vec3s_to_vec3f](functions-4.md#vec3s_to_vec3f)
<br />
- misc.h
- [update_all_mario_stars](functions-3.md#update_all_mario_stars)
- [update_all_mario_stars](functions-4.md#update_all_mario_stars)
<br />
- mod_storage.h
- [mod_storage_clear](functions-3.md#mod_storage_clear)
- [mod_storage_load](functions-3.md#mod_storage_load)
- [mod_storage_load_bool](functions-3.md#mod_storage_load_bool)
- [mod_storage_load_number](functions-3.md#mod_storage_load_number)
- [mod_storage_remove](functions-3.md#mod_storage_remove)
- [mod_storage_save](functions-3.md#mod_storage_save)
- [mod_storage_save_bool](functions-3.md#mod_storage_save_bool)
- [mod_storage_save_number](functions-3.md#mod_storage_save_number)
- [mod_storage_clear](functions-4.md#mod_storage_clear)
- [mod_storage_load](functions-4.md#mod_storage_load)
- [mod_storage_load_bool](functions-4.md#mod_storage_load_bool)
- [mod_storage_load_number](functions-4.md#mod_storage_load_number)
- [mod_storage_remove](functions-4.md#mod_storage_remove)
- [mod_storage_save](functions-4.md#mod_storage_save)
- [mod_storage_save_bool](functions-4.md#mod_storage_save_bool)
- [mod_storage_save_number](functions-4.md#mod_storage_save_number)
<br />
@ -1550,12 +1579,12 @@
<br />
- smlua_collision_utils.h
- [collision_find_ceil](functions-4.md#collision_find_ceil)
- [collision_find_floor](functions-4.md#collision_find_floor)
- [collision_find_surface_on_ray](functions-4.md#collision_find_surface_on_ray)
- [collision_get_temp_wall_collision_data](functions-4.md#collision_get_temp_wall_collision_data)
- [get_water_surface_pseudo_floor](functions-4.md#get_water_surface_pseudo_floor)
- [smlua_collision_util_get](functions-4.md#smlua_collision_util_get)
- [collision_find_ceil](functions-5.md#collision_find_ceil)
- [collision_find_floor](functions-5.md#collision_find_floor)
- [collision_find_surface_on_ray](functions-5.md#collision_find_surface_on_ray)
- [collision_get_temp_wall_collision_data](functions-5.md#collision_get_temp_wall_collision_data)
- [get_water_surface_pseudo_floor](functions-5.md#get_water_surface_pseudo_floor)
- [smlua_collision_util_get](functions-5.md#smlua_collision_util_get)
<br />
@ -1564,30 +1593,30 @@
<br />
- smlua_level_utils.h
- [level_is_vanilla_level](functions-4.md#level_is_vanilla_level)
- [level_register](functions-4.md#level_register)
- [smlua_level_util_change_area](functions-4.md#smlua_level_util_change_area)
- [smlua_level_util_get_info](functions-4.md#smlua_level_util_get_info)
- [smlua_level_util_get_info_from_course_num](functions-4.md#smlua_level_util_get_info_from_course_num)
- [smlua_level_util_get_info_from_short_name](functions-4.md#smlua_level_util_get_info_from_short_name)
- [warp_exit_level](functions-4.md#warp_exit_level)
- [warp_restart_level](functions-4.md#warp_restart_level)
- [warp_to_castle](functions-4.md#warp_to_castle)
- [warp_to_level](functions-4.md#warp_to_level)
- [warp_to_start_level](functions-4.md#warp_to_start_level)
- [warp_to_warpnode](functions-4.md#warp_to_warpnode)
- [level_is_vanilla_level](functions-5.md#level_is_vanilla_level)
- [level_register](functions-5.md#level_register)
- [smlua_level_util_change_area](functions-5.md#smlua_level_util_change_area)
- [smlua_level_util_get_info](functions-5.md#smlua_level_util_get_info)
- [smlua_level_util_get_info_from_course_num](functions-5.md#smlua_level_util_get_info_from_course_num)
- [smlua_level_util_get_info_from_short_name](functions-5.md#smlua_level_util_get_info_from_short_name)
- [warp_exit_level](functions-5.md#warp_exit_level)
- [warp_restart_level](functions-5.md#warp_restart_level)
- [warp_to_castle](functions-5.md#warp_to_castle)
- [warp_to_level](functions-5.md#warp_to_level)
- [warp_to_start_level](functions-5.md#warp_to_start_level)
- [warp_to_warpnode](functions-5.md#warp_to_warpnode)
<br />
- smlua_math_utils.h
- [clamp](functions-4.md#clamp)
- [clampf](functions-4.md#clampf)
- [max](functions-4.md#max)
- [maxf](functions-4.md#maxf)
- [min](functions-4.md#min)
- [minf](functions-4.md#minf)
- [sqr](functions-4.md#sqr)
- [sqrf](functions-4.md#sqrf)
- [clamp](functions-5.md#clamp)
- [clampf](functions-5.md#clampf)
- [max](functions-5.md#max)
- [maxf](functions-5.md#maxf)
- [min](functions-5.md#min)
- [minf](functions-5.md#minf)
- [sqr](functions-5.md#sqr)
- [sqrf](functions-5.md#sqrf)
<br />

View file

@ -2518,6 +2518,7 @@
| headlessServer | `integer` | |
| maxPlayers | `integer` | |
| nametags | `integer` | |
| pauseAnywhere | `integer` | |
| playerInteractions | [enum PlayerInteractions](constants.md#enum-PlayerInteractions) | |
| playerKnockbackStrength | `integer` | |
| skipIntro | `integer` | |

View file

@ -7,7 +7,7 @@
/**
* Hitbox for spiny both while thrown and walking. The interaction type is
* changed to INTERACT_UNKNOWN_08 while walking.
* changed to INTERACT_SPINY_WALKING while walking.
*/
static struct ObjectHitbox sSpinyHitbox = {
/* interactType: */ INTERACT_MR_BLIZZARD,
@ -158,7 +158,7 @@ static void spiny_act_walk(void) {
// Don't allow mario to punch the spiny two frames in a row?
o->oInteractType = INTERACT_MR_BLIZZARD;
} else {
o->oInteractType = INTERACT_UNKNOWN_08;
o->oInteractType = INTERACT_SPINY_WALKING;
}
}
}

View file

@ -34,36 +34,6 @@
u8 sDelayInvincTimer;
s16 gInteractionInvulnerable;
u32 interact_coin(struct MarioState *, u32, struct Object *);
u32 interact_water_ring(struct MarioState *, u32, struct Object *);
u32 interact_star_or_key(struct MarioState *, u32, struct Object *);
u32 interact_bbh_entrance(struct MarioState *, u32, struct Object *);
u32 interact_warp(struct MarioState *, u32, struct Object *);
u32 interact_warp_door(struct MarioState *, u32, struct Object *);
u32 interact_door(struct MarioState *, u32, struct Object *);
u32 interact_cannon_base(struct MarioState *, u32, struct Object *);
u32 interact_player(struct MarioState*, u32, struct Object*);
u32 interact_igloo_barrier(struct MarioState *, u32, struct Object *);
u32 interact_tornado(struct MarioState *, u32, struct Object *);
u32 interact_whirlpool(struct MarioState *, u32, struct Object *);
u32 interact_strong_wind(struct MarioState *, u32, struct Object *);
u32 interact_flame(struct MarioState *, u32, struct Object *);
u32 interact_snufit_bullet(struct MarioState *, u32, struct Object *);
u32 interact_clam_or_bubba(struct MarioState *, u32, struct Object *);
u32 interact_bully(struct MarioState *, u32, struct Object *);
u32 interact_shock(struct MarioState *, u32, struct Object *);
u32 interact_mr_blizzard(struct MarioState *, u32, struct Object *);
u32 interact_hit_from_below(struct MarioState *, u32, struct Object *);
u32 interact_bounce_top(struct MarioState *, u32, struct Object *);
u32 interact_unknown_08(struct MarioState *, u32, struct Object *);
u32 interact_damage(struct MarioState *, u32, struct Object *);
u32 interact_breakable(struct MarioState *, u32, struct Object *);
u32 interact_koopa_shell(struct MarioState *, u32, struct Object *);
u32 interact_pole(struct MarioState *, u32, struct Object *);
u32 interact_hoot(struct MarioState *, u32, struct Object *);
u32 interact_cap(struct MarioState *, u32, struct Object *);
u32 interact_grabbable(struct MarioState *, u32, struct Object *);
u32 interact_text(struct MarioState *, u32, struct Object *);
struct InteractionHandler {
u32 interactType;
@ -98,7 +68,7 @@ static struct InteractionHandler sInteractionHandlers[] = {
{ INTERACT_BREAKABLE, interact_breakable },
{ INTERACT_KOOPA, interact_bounce_top },
{ INTERACT_KOOPA_SHELL, interact_koopa_shell },
{ INTERACT_UNKNOWN_08, interact_unknown_08 },
{ INTERACT_SPINY_WALKING, interact_spiny_walking },
{ INTERACT_CAP, interact_cap },
{ INTERACT_GRABBABLE, interact_grabbable },
{ INTERACT_TEXT, interact_text },
@ -1864,7 +1834,7 @@ u32 interact_bounce_top(struct MarioState *m, UNUSED u32 interactType, struct Ob
return FALSE;
}
u32 interact_unknown_08(struct MarioState *m, UNUSED u32 interactType, struct Object *o) {
u32 interact_spiny_walking(struct MarioState *m, UNUSED u32 interactType, struct Object *o) {
if (!m || !o) { return FALSE; }
u32 interaction = determine_interaction(m, o);

View file

@ -5,6 +5,8 @@
#include "types.h"
#define INTERACT_UNKNOWN_08 (1 << 8)
enum InteractionType {
INTERACT_HOOT = /* 0x00000001 */ (1 << 0),
INTERACT_GRABBABLE = /* 0x00000002 */ (1 << 1),
@ -14,7 +16,7 @@ enum InteractionType {
INTERACT_CAP = /* 0x00000020 */ (1 << 5),
INTERACT_POLE = /* 0x00000040 */ (1 << 6),
INTERACT_KOOPA = /* 0x00000080 */ (1 << 7),
INTERACT_UNKNOWN_08 = /* 0x00000100 */ (1 << 8),
INTERACT_SPINY_WALKING = /* 0x00000100 */ (1 << 8),
INTERACT_BREAKABLE = /* 0x00000200 */ (1 << 9),
INTERACT_STRONG_WIND = /* 0x00000400 */ (1 << 10),
INTERACT_WARP_DOOR = /* 0x00000800 */ (1 << 11),
@ -119,6 +121,37 @@ enum InteractionFlag {
extern s16 gInteractionInvulnerable;
extern u8 gPssSlideStarted;
u32 interact_coin(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_water_ring(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_bbh_entrance(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_warp(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_warp_door(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_door(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_cannon_base(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_player(struct MarioState* m, UNUSED u32 interactType, struct Object* o);
u32 interact_igloo_barrier(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_tornado(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_whirlpool(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_strong_wind(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_flame(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_snufit_bullet(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_clam_or_bubba(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_bully(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_shock(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_mr_blizzard(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_hit_from_below(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_bounce_top(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_spiny_walking(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_damage(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_breakable(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_koopa_shell(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_pole(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_hoot(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_cap(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 interact_grabbable(struct MarioState *m, u32 interactType, struct Object *o);
u32 interact_text(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
s16 mario_obj_angle_to_object(struct MarioState *m, struct Object *o);
void mario_stop_riding_object(struct MarioState *m);
void mario_grab_used_object(struct MarioState *m);
@ -136,7 +169,6 @@ void mario_process_interactions(struct MarioState *m);
void mario_handle_special_floors(struct MarioState *m);
u8 passes_pvp_interaction_checks(struct MarioState* attacker, struct MarioState* victim);
u32 take_damage_and_knock_back(struct MarioState *m, struct Object *o);
u32 interact_damage(struct MarioState *m, UNUSED u32 interactType, struct Object *o);
u32 determine_interaction(struct MarioState *m, struct Object *o);
#endif // INTERACTION_H

View file

@ -2,26 +2,26 @@
/* SHOULD NOT BE MANUALLY CHANGED */
#include "smlua.h"
#include "include/types.h"
#include "game/area.h"
#include "game/camera.h"
#include "game/characters.h"
#include "engine/surface_collision.h"
#include "pc/network/network_player.h"
#include "pc/djui/djui_hud_utils.h"
#include "game/object_helpers.h"
#include "game/mario_step.h"
#include "pc/lua/utils/smlua_anim_utils.h"
#include "pc/lua/utils/smlua_misc_utils.h"
#include "pc/lua/utils/smlua_collision_utils.h"
#include "pc/lua/utils/smlua_level_utils.h"
#include "game/spawn_sound.h"
#include "pc/network/network.h"
#include "game/hardcoded.h"
#include "pc/mods/mod.h"
#include "pc/lua/utils/smlua_audio_utils.h"
#include "game/paintings.h"
#include "pc/djui/djui_types.h"
#include "game/first_person_cam.h"
#include "src/game/area.h"
#include "src/game/camera.h"
#include "src/game/characters.h"
#include "src/engine/surface_collision.h"
#include "src/pc/network/network_player.h"
#include "src/pc/djui/djui_hud_utils.h"
#include "src/game/object_helpers.h"
#include "src/game/mario_step.h"
#include "src/pc/lua/utils/smlua_anim_utils.h"
#include "src/pc/lua/utils/smlua_misc_utils.h"
#include "src/pc/lua/utils/smlua_collision_utils.h"
#include "src/pc/lua/utils/smlua_level_utils.h"
#include "src/game/spawn_sound.h"
#include "src/pc/network/network.h"
#include "src/game/hardcoded.h"
#include "src/pc/mods/mod.h"
#include "src/pc/lua/utils/smlua_audio_utils.h"
#include "src/game/paintings.h"
#include "src/pc/djui/djui_types.h"
#include "src/game/first_person_cam.h"
#include "include/object_fields.h"
@ -2194,7 +2194,7 @@ static struct LuaObjectField sRayIntersectionInfoFields[LUA_RAY_INTERSECTION_INF
{ "surface", LVT_COBJECT_P, offsetof(struct RayIntersectionInfo, surface), false, LOT_SURFACE },
};
#define LUA_SERVER_SETTINGS_FIELD_COUNT 12
#define LUA_SERVER_SETTINGS_FIELD_COUNT 13
static struct LuaObjectField sServerSettingsFields[LUA_SERVER_SETTINGS_FIELD_COUNT] = {
{ "bouncyLevelBounds", LVT_S32, offsetof(struct ServerSettings, bouncyLevelBounds), false, LOT_NONE },
{ "bubbleDeath", LVT_U8, offsetof(struct ServerSettings, bubbleDeath), false, LOT_NONE },
@ -2204,6 +2204,7 @@ static struct LuaObjectField sServerSettingsFields[LUA_SERVER_SETTINGS_FIELD_COU
{ "headlessServer", LVT_U8, offsetof(struct ServerSettings, headlessServer), false, LOT_NONE },
{ "maxPlayers", LVT_U8, offsetof(struct ServerSettings, maxPlayers), false, LOT_NONE },
{ "nametags", LVT_U8, offsetof(struct ServerSettings, nametags), false, LOT_NONE },
{ "pauseAnywhere", LVT_U8, offsetof(struct ServerSettings, pauseAnywhere), false, LOT_NONE },
{ "playerInteractions", LVT_S32, offsetof(struct ServerSettings, playerInteractions), false, LOT_NONE },
{ "playerKnockbackStrength", LVT_U8, offsetof(struct ServerSettings, playerKnockbackStrength), false, LOT_NONE },
{ "skipIntro", LVT_U8, offsetof(struct ServerSettings, skipIntro), false, LOT_NONE },

View file

@ -1471,6 +1471,7 @@ char gSmluaConstants[] = ""
"GEO_CONTEXT_AREA_LOAD = 3\n"
"GEO_CONTEXT_AREA_INIT = 4\n"
"GEO_CONTEXT_HELD_OBJ = 5\n"
"INTERACT_UNKNOWN_08 = (1 << 8)\n"
"INTERACT_HOOT = (1 << 0)\n"
"INTERACT_GRABBABLE = (1 << 1)\n"
"INTERACT_DOOR = (1 << 2)\n"
@ -1479,7 +1480,7 @@ char gSmluaConstants[] = ""
"INTERACT_CAP = (1 << 5)\n"
"INTERACT_POLE = (1 << 6)\n"
"INTERACT_KOOPA = (1 << 7)\n"
"INTERACT_UNKNOWN_08 = (1 << 8)\n"
"INTERACT_SPINY_WALKING = (1 << 8)\n"
"INTERACT_BREAKABLE = (1 << 9)\n"
"INTERACT_STRONG_WIND = (1 << 10)\n"
"INTERACT_WARP_DOOR = (1 << 11)\n"

View file

@ -3,46 +3,46 @@
#include "smlua.h"
#include "audio/external.h"
#include "engine/math_util.h"
#include "engine/surface_collision.h"
#include "engine/surface_load.h"
#include "game/camera.h"
#include "game/characters.h"
#include "game/mario_step.h"
#include "game/mario.h"
#include "pc/djui/djui_popup.h"
#include "pc/network/network_utils.h"
#include "pc/djui/djui_console.h"
#include "pc/djui/djui_chat_message.h"
#include "game/interaction.h"
#include "game/level_info.h"
#include "game/save_file.h"
#include "game/sound_init.h"
#include "pc/djui/djui_hud_utils.h"
#include "pc/network/network_player.h"
#include "pc/network/lag_compensation.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"
#include "src/game/mario.h"
#include "src/pc/djui/djui_popup.h"
#include "src/pc/network/network_utils.h"
#include "src/pc/djui/djui_console.h"
#include "src/pc/djui/djui_chat_message.h"
#include "src/game/interaction.h"
#include "src/game/level_info.h"
#include "src/game/save_file.h"
#include "src/game/sound_init.h"
#include "src/pc/djui/djui_hud_utils.h"
#include "src/pc/network/network_player.h"
#include "src/pc/network/lag_compensation.h"
#include "include/behavior_table.h"
#include "pc/lua/utils/smlua_obj_utils.h"
#include "pc/lua/utils/smlua_misc_utils.h"
#include "pc/lua/utils/smlua_collision_utils.h"
#include "pc/lua/utils/smlua_math_utils.h"
#include "pc/lua/utils/smlua_model_utils.h"
#include "pc/lua/utils/smlua_text_utils.h"
#include "pc/lua/utils/smlua_audio_utils.h"
#include "pc/lua/utils/smlua_level_utils.h"
#include "pc/lua/utils/smlua_anim_utils.h"
#include "pc/lua/utils/smlua_deprecated.h"
#include "game/object_list_processor.h"
#include "game/behavior_actions.h"
#include "game/mario_misc.h"
#include "pc/mods/mod_storage.h"
#include "pc/utils/misc.h"
#include "game/level_update.h"
#include "game/area.h"
#include "engine/level_script.h"
#include "game/ingame_menu.h"
#include "game/first_person_cam.h"
#include "src/pc/lua/utils/smlua_obj_utils.h"
#include "src/pc/lua/utils/smlua_misc_utils.h"
#include "src/pc/lua/utils/smlua_collision_utils.h"
#include "src/pc/lua/utils/smlua_math_utils.h"
#include "src/pc/lua/utils/smlua_model_utils.h"
#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/pc/lua/utils/smlua_anim_utils.h"
#include "src/pc/lua/utils/smlua_deprecated.h"
#include "src/game/object_list_processor.h"
#include "src/game/behavior_actions.h"
#include "src/game/mario_misc.h"
#include "src/pc/mods/mod_storage.h"
#include "src/pc/utils/misc.h"
#include "src/game/level_update.h"
#include "src/game/area.h"
#include "src/engine/level_script.h"
#include "src/game/ingame_menu.h"
#include "src/game/first_person_cam.h"
////////////
@ -13406,6 +13406,174 @@ int smlua_func_get_door_save_file_flag(lua_State* L) {
return 1;
}
int smlua_func_interact_bbh_entrance(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_bbh_entrance", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bbh_entrance"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_bbh_entrance"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bbh_entrance"); return 0; }
lua_pushinteger(L, interact_bbh_entrance(m, interactType, o));
return 1;
}
int smlua_func_interact_bounce_top(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_bounce_top", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bounce_top"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_bounce_top"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bounce_top"); return 0; }
lua_pushinteger(L, interact_bounce_top(m, interactType, o));
return 1;
}
int smlua_func_interact_breakable(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_breakable", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_breakable"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_breakable"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_breakable"); return 0; }
lua_pushinteger(L, interact_breakable(m, interactType, o));
return 1;
}
int smlua_func_interact_bully(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_bully", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bully"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_bully"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bully"); return 0; }
lua_pushinteger(L, interact_bully(m, interactType, o));
return 1;
}
int smlua_func_interact_cannon_base(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_cannon_base", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_cannon_base"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_cannon_base"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_cannon_base"); return 0; }
lua_pushinteger(L, interact_cannon_base(m, interactType, o));
return 1;
}
int smlua_func_interact_cap(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_cap", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_cap"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_cap"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_cap"); return 0; }
lua_pushinteger(L, interact_cap(m, interactType, o));
return 1;
}
int smlua_func_interact_clam_or_bubba(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_clam_or_bubba", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_clam_or_bubba"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_clam_or_bubba"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_clam_or_bubba"); return 0; }
lua_pushinteger(L, interact_clam_or_bubba(m, interactType, o));
return 1;
}
int smlua_func_interact_coin(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_coin", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_coin"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_coin"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_coin"); return 0; }
lua_pushinteger(L, interact_coin(m, interactType, o));
return 1;
}
int smlua_func_interact_damage(lua_State* L) {
if (L == NULL) { return 0; }
@ -13427,6 +13595,447 @@ int smlua_func_interact_damage(lua_State* L) {
return 1;
}
int smlua_func_interact_door(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_door", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_door"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_door"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_door"); return 0; }
lua_pushinteger(L, interact_door(m, interactType, o));
return 1;
}
int smlua_func_interact_flame(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_flame", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_flame"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_flame"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_flame"); return 0; }
lua_pushinteger(L, interact_flame(m, interactType, o));
return 1;
}
int smlua_func_interact_grabbable(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_grabbable", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_grabbable"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_grabbable"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_grabbable"); return 0; }
lua_pushinteger(L, interact_grabbable(m, interactType, o));
return 1;
}
int smlua_func_interact_hit_from_below(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_hit_from_below", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_hit_from_below"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_hit_from_below"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_hit_from_below"); return 0; }
lua_pushinteger(L, interact_hit_from_below(m, interactType, o));
return 1;
}
int smlua_func_interact_hoot(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_hoot", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_hoot"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_hoot"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_hoot"); return 0; }
lua_pushinteger(L, interact_hoot(m, interactType, o));
return 1;
}
int smlua_func_interact_igloo_barrier(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_igloo_barrier", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_igloo_barrier"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_igloo_barrier"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_igloo_barrier"); return 0; }
lua_pushinteger(L, interact_igloo_barrier(m, interactType, o));
return 1;
}
int smlua_func_interact_koopa_shell(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_koopa_shell", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_koopa_shell"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_koopa_shell"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_koopa_shell"); return 0; }
lua_pushinteger(L, interact_koopa_shell(m, interactType, o));
return 1;
}
int smlua_func_interact_mr_blizzard(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_mr_blizzard", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_mr_blizzard"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_mr_blizzard"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_mr_blizzard"); return 0; }
lua_pushinteger(L, interact_mr_blizzard(m, interactType, o));
return 1;
}
int smlua_func_interact_player(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_player", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_player"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_player"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_player"); return 0; }
lua_pushinteger(L, interact_player(m, interactType, o));
return 1;
}
int smlua_func_interact_pole(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_pole", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_pole"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_pole"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_pole"); return 0; }
lua_pushinteger(L, interact_pole(m, interactType, o));
return 1;
}
int smlua_func_interact_shock(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_shock", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_shock"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_shock"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_shock"); return 0; }
lua_pushinteger(L, interact_shock(m, interactType, o));
return 1;
}
int smlua_func_interact_snufit_bullet(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_snufit_bullet", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_snufit_bullet"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_snufit_bullet"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_snufit_bullet"); return 0; }
lua_pushinteger(L, interact_snufit_bullet(m, interactType, o));
return 1;
}
int smlua_func_interact_spiny_walking(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_spiny_walking", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_spiny_walking"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_spiny_walking"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_spiny_walking"); return 0; }
lua_pushinteger(L, interact_spiny_walking(m, interactType, o));
return 1;
}
int smlua_func_interact_star_or_key(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_star_or_key", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_star_or_key"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_star_or_key"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_star_or_key"); return 0; }
lua_pushinteger(L, interact_star_or_key(m, interactType, o));
return 1;
}
int smlua_func_interact_strong_wind(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_strong_wind", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_strong_wind"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_strong_wind"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_strong_wind"); return 0; }
lua_pushinteger(L, interact_strong_wind(m, interactType, o));
return 1;
}
int smlua_func_interact_text(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_text", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_text"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_text"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_text"); return 0; }
lua_pushinteger(L, interact_text(m, interactType, o));
return 1;
}
int smlua_func_interact_tornado(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_tornado", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_tornado"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_tornado"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_tornado"); return 0; }
lua_pushinteger(L, interact_tornado(m, interactType, o));
return 1;
}
int smlua_func_interact_warp(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_warp", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_warp"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_warp"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_warp"); return 0; }
lua_pushinteger(L, interact_warp(m, interactType, o));
return 1;
}
int smlua_func_interact_warp_door(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_warp_door", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_warp_door"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_warp_door"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_warp_door"); return 0; }
lua_pushinteger(L, interact_warp_door(m, interactType, o));
return 1;
}
int smlua_func_interact_water_ring(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_water_ring", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_water_ring"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_water_ring"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_water_ring"); return 0; }
lua_pushinteger(L, interact_water_ring(m, interactType, o));
return 1;
}
int smlua_func_interact_whirlpool(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 3) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_whirlpool", 3, top);
return 0;
}
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_whirlpool"); return 0; }
u32 interactType = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "interact_whirlpool"); return 0; }
struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_whirlpool"); return 0; }
lua_pushinteger(L, interact_whirlpool(m, interactType, o));
return 1;
}
int smlua_func_mario_blow_off_cap(lua_State* L) {
if (L == NULL) { return 0; }
@ -32182,7 +32791,36 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "determine_interaction", smlua_func_determine_interaction);
smlua_bind_function(L, "does_mario_have_normal_cap_on_head", smlua_func_does_mario_have_normal_cap_on_head);
smlua_bind_function(L, "get_door_save_file_flag", smlua_func_get_door_save_file_flag);
smlua_bind_function(L, "interact_bbh_entrance", smlua_func_interact_bbh_entrance);
smlua_bind_function(L, "interact_bounce_top", smlua_func_interact_bounce_top);
smlua_bind_function(L, "interact_breakable", smlua_func_interact_breakable);
smlua_bind_function(L, "interact_bully", smlua_func_interact_bully);
smlua_bind_function(L, "interact_cannon_base", smlua_func_interact_cannon_base);
smlua_bind_function(L, "interact_cap", smlua_func_interact_cap);
smlua_bind_function(L, "interact_clam_or_bubba", smlua_func_interact_clam_or_bubba);
smlua_bind_function(L, "interact_coin", smlua_func_interact_coin);
smlua_bind_function(L, "interact_damage", smlua_func_interact_damage);
smlua_bind_function(L, "interact_door", smlua_func_interact_door);
smlua_bind_function(L, "interact_flame", smlua_func_interact_flame);
smlua_bind_function(L, "interact_grabbable", smlua_func_interact_grabbable);
smlua_bind_function(L, "interact_hit_from_below", smlua_func_interact_hit_from_below);
smlua_bind_function(L, "interact_hoot", smlua_func_interact_hoot);
smlua_bind_function(L, "interact_igloo_barrier", smlua_func_interact_igloo_barrier);
smlua_bind_function(L, "interact_koopa_shell", smlua_func_interact_koopa_shell);
smlua_bind_function(L, "interact_mr_blizzard", smlua_func_interact_mr_blizzard);
smlua_bind_function(L, "interact_player", smlua_func_interact_player);
smlua_bind_function(L, "interact_pole", smlua_func_interact_pole);
smlua_bind_function(L, "interact_shock", smlua_func_interact_shock);
smlua_bind_function(L, "interact_snufit_bullet", smlua_func_interact_snufit_bullet);
smlua_bind_function(L, "interact_spiny_walking", smlua_func_interact_spiny_walking);
smlua_bind_function(L, "interact_star_or_key", smlua_func_interact_star_or_key);
smlua_bind_function(L, "interact_strong_wind", smlua_func_interact_strong_wind);
smlua_bind_function(L, "interact_text", smlua_func_interact_text);
smlua_bind_function(L, "interact_tornado", smlua_func_interact_tornado);
smlua_bind_function(L, "interact_warp", smlua_func_interact_warp);
smlua_bind_function(L, "interact_warp_door", smlua_func_interact_warp_door);
smlua_bind_function(L, "interact_water_ring", smlua_func_interact_water_ring);
smlua_bind_function(L, "interact_whirlpool", smlua_func_interact_whirlpool);
smlua_bind_function(L, "mario_blow_off_cap", smlua_func_mario_blow_off_cap);
smlua_bind_function(L, "mario_check_object_grab", smlua_func_mario_check_object_grab);
smlua_bind_function(L, "mario_drop_held_object", smlua_func_mario_drop_held_object);