diff --git a/autogen/autogen.sh b/autogen/autogen.sh
new file mode 100644
index 000000000..ff809e82a
--- /dev/null
+++ b/autogen/autogen.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/bash
+
+python3 ./autogen/convert_structs.py
+python3 ./autogen/convert_functions.py
+python3 ./autogen/convert_constants.py
diff --git a/autogen/common.py b/autogen/common.py
index 2898fd67e..6be11fa5f 100644
--- a/autogen/common.py
+++ b/autogen/common.py
@@ -63,3 +63,24 @@ def gen_comment_header(f):
s += "" + comment_l + "\n"
s += "\n"
return s
+
+def translate_type_to_lua(ptype):
+ if ptype.startswith('struct '):
+ return ptype.split(' ')[1].replace('*', ''), True
+
+ if 'Vec3' in ptype:
+ return ptype, True
+
+ if ptype.startswith('enum '):
+ return 'integer', False
+
+ if ptype in usf_types:
+ if ptype.startswith('f'):
+ return 'number', False
+ else:
+ return 'integer', False
+
+ if 'void' == ptype:
+ return None, False
+
+ return ptype, False
diff --git a/autogen/convert_constants.py b/autogen/convert_constants.py
index a805e9460..823d79aee 100644
--- a/autogen/convert_constants.py
+++ b/autogen/convert_constants.py
@@ -1,18 +1,118 @@
import os
+from common import *
in_filename = os.path.dirname(os.path.realpath(__file__)) + "/lua_constants/constants.lua"
out_filename = os.path.dirname(os.path.realpath(__file__)) + '/../src/pc/lua/smlua_constants_autogen.c'
+docs_lua_constants = 'docs/lua/constants.md'
+
+############################################################################
+
+def build_constants():
+ built = "char gSmluaConstants[] = "
+ with open(in_filename) as fp:
+ lines = fp.readlines()
+ for line in lines:
+ if line.startswith('--'):
+ continue
+ if line.strip() == '':
+ continue
+ built += '"' + line.replace('\n', '').replace('\r', '') + '\\n"' + "\n"
+ built += ';'
+
+ with open(out_filename, 'w') as out:
+ out.write(built)
+
+############################################################################
+
+def doc_process(lines):
+ processed = []
+ cur = None
-built = "char gSmluaConstants[] = "
-with open(in_filename) as fp:
- lines = fp.readlines()
for line in lines:
- if line.startswith('--'):
- continue
- if line.strip() == '':
- continue
- built += '"' + line.replace('\n', '').replace('\r', '') + '\\n"' + "\n"
-built += ';'
-with open(out_filename, 'w') as out:
- out.write(built)
+ if line.startswith('--'):
+ spl = line.split()
+ if len(spl) == 3 and spl[0] == spl[2]:
+ if cur != None:
+ processed.append(cur)
+ cur = {}
+ cur['category'] = spl[1].strip()
+ cur['constants'] = []
+ continue
+
+ if len(line.strip()) == 0:
+ if len(cur['constants']) == 0:
+ continue
+
+ if len(cur['constants'][-1]) == 0:
+ continue
+
+ cur['constants'].append('')
+ continue
+
+ if '=' not in line:
+ continue
+
+ if line[0] < 'A' or line[0] > 'Z':
+ continue
+
+ cur['constants'].append(line.strip().split(' ')[0])
+
+ if cur != None:
+ processed.append(cur)
+
+ processed = sorted(processed, key=lambda d: d['category'])
+ return processed
+
+def doc_build_category(p):
+ category = p['category']
+ constants = p['constants']
+ if len(constants[-1]) == 0:
+ constants = constants[:-1]
+
+ if len(constants) == 0:
+ return
+
+ s = '\n## [%s](%s)\n' % (category, category)
+
+ for c in constants:
+ if len(c) == 0:
+ s += '\n
\n\n'
+ continue
+
+ s += '- %s\n' % c
+
+ s += '\n[:arrow_up_small:](#)\n\n
\n'
+
+ return s
+
+def doc_build_index(processed):
+ s = '# Supported Constants\n'
+ for p in processed:
+ s += '- [%s](#%s)\n' % (p['category'], p['category'])
+
+ s += '\n
\n'
+
+ return s
+
+def doc_build(processed):
+ s = '## [:rewind: Lua Reference](lua.md)\n\n'
+ s += doc_build_index(processed)
+ for p in processed:
+ s += doc_build_category(p)
+
+ with open(get_path(docs_lua_constants), 'w') as out:
+ out.write(s)
+
+def doc_constants():
+ with open(in_filename) as fp:
+ lines = fp.readlines()
+
+ processed = doc_process(lines)
+ doc_build(processed)
+
+
+############################################################################
+
+build_constants()
+doc_constants()
\ No newline at end of file
diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py
index 95e2d5be6..b47a3bac3 100644
--- a/autogen/convert_functions.py
+++ b/autogen/convert_functions.py
@@ -7,6 +7,7 @@ integer_types = ["u8", "u16", "u32", "u64", "s8", "s16", "s32", "s64", "int"]
number_types = ["f32", "float"]
param_override_build = {}
out_filename = 'src/pc/lua/smlua_functions_autogen.c'
+docs_lua_functions = 'docs/lua/functions.md'
###########################################################
@@ -75,18 +76,10 @@ param_override_build['Vec3s'] = {
'after': param_vec3s_after_call
}
-###########################################################
+############################################################################
-built_functions = ""
-built_binds = ""
-
-#######
-
-do_extern = False
header_h = ""
-functions = []
-
def reject_line(line):
if len(line) == 0:
return True
@@ -104,46 +97,7 @@ def normalize_type(t):
t = parts[0] + ' ' + parts[1].replace(' ', '')
return t
-def process_line(line):
- function = {}
-
- line = line.strip()
- function['line'] = line
-
- line = line.replace('UNUSED', '')
-
- match = re.search('[a-zA-Z0-9_]+\(', line)
- function['type'] = normalize_type(line[0:match.span()[0]])
- function['identifier'] = match.group()[0:-1]
-
- function['params'] = []
- params_str = line.split('(', 1)[1].rsplit(')', 1)[0].strip()
- if len(params_str) == 0 or params_str == 'void':
- pass
- else:
- param_index = 0
- for param_str in params_str.split(','):
- param = {}
- param_str = param_str.strip()
- if param_str.endswith('*') or ' ' not in param_str:
- param['type'] = normalize_type(param_str)
- param['identifier'] = 'arg%d' % param_index
- else:
- match = re.search('[a-zA-Z0-9_]+$', param_str)
- param['type'] = normalize_type(param_str[0:match.span()[0]])
- param['identifier'] = match.group()
- function['params'].append(param)
- param_index += 1
-
- functions.append(function)
-
-def process_lines(file_str):
- for line in file_str.splitlines():
- if reject_line(line):
- global rejects
- rejects += line + '\n'
- continue
- process_line(line)
+############################################################################
def build_param(param, i):
ptype = param['type']
@@ -192,7 +146,9 @@ def build_call(function):
return ' %s(L, %s);\n' % (lfunc, ccall)
-def build_function(function):
+def build_function(function, do_extern):
+ s = ''
+
if len(function['params']) <= 0:
s = 'int smlua_func_%s(UNUSED lua_State* L) {\n' % function['identifier']
else:
@@ -207,7 +163,6 @@ def build_function(function):
i += 1
s += '\n'
- global do_extern
if do_extern:
s += ' extern %s\n' % function['line']
@@ -225,12 +180,16 @@ def build_function(function):
if 'UNIMPLEMENTED' in s:
s = "/*\n" + s + "*/\n"
- global built_functions
- built_functions += s + "\n"
+ return s + "\n"
-def build_functions():
- for function in functions:
- build_function(function)
+def build_functions(processed_files):
+ s = ''
+ for processed_file in processed_files:
+ s += gen_comment_header(processed_file['filename'])
+
+ for function in processed_file['functions']:
+ s += build_function(function, processed_file['extern'])
+ return s
def build_bind(function):
s = 'smlua_bind_function(L, "%s", smlua_func_%s);' % (function['identifier'], function['identifier'])
@@ -238,45 +197,172 @@ def build_bind(function):
s = ' ' + s
else:
s = ' //' + s + ' <--- UNIMPLEMENTED'
- global built_binds
- built_binds += s + "\n"
+ return s + "\n"
-def build_binds(fname):
- global built_binds
- built_binds += "\n // " + fname.split('/')[-1] + "\n"
- for function in functions:
- build_bind(function)
+def build_binds(processed_files):
+ s = ''
+ for processed_file in processed_files:
+ s += "\n // " + processed_file['filename'] + "\n"
+
+ for function in processed_file['functions']:
+ s += build_bind(function)
+ return s
+
+############################################################################
+
+def process_function(line):
+ function = {}
+
+ line = line.strip()
+ function['line'] = line
+
+ line = line.replace('UNUSED', '')
+
+ match = re.search('[a-zA-Z0-9_]+\(', line)
+ function['type'] = normalize_type(line[0:match.span()[0]])
+ function['identifier'] = match.group()[0:-1]
+
+ function['params'] = []
+ params_str = line.split('(', 1)[1].rsplit(')', 1)[0].strip()
+ if len(params_str) == 0 or params_str == 'void':
+ pass
+ else:
+ param_index = 0
+ for param_str in params_str.split(','):
+ param = {}
+ param_str = param_str.strip()
+ if param_str.endswith('*') or ' ' not in param_str:
+ param['type'] = normalize_type(param_str)
+ param['identifier'] = 'arg%d' % param_index
+ else:
+ match = re.search('[a-zA-Z0-9_]+$', param_str)
+ param['type'] = normalize_type(param_str[0:match.span()[0]])
+ param['identifier'] = match.group()
+ function['params'].append(param)
+ param_index += 1
+
+ return function
+
+def process_functions(file_str):
+ functions = []
+ for line in file_str.splitlines():
+ if reject_line(line):
+ global rejects
+ rejects += line + '\n'
+ continue
+ functions.append(process_function(line))
+
+ functions = sorted(functions, key=lambda d: d['identifier'])
+ return functions
def process_file(fname):
- functions.clear()
- global do_extern
- do_extern = fname.endswith(".c")
+ processed_file = {}
+ processed_file['filename'] = fname.replace('\\', '/').split('/')[-1]
+ processed_file['extern'] = fname.endswith('.c')
+
with open(fname) as file:
- process_lines(file.read())
- build_functions()
- build_binds(fname)
+ processed_file['functions'] = process_functions(file.read())
+
+ return processed_file
def process_files():
+ processed_files = []
dir_path = os.path.dirname(os.path.realpath(__file__)) + '/lua_functions/'
- files = os.listdir(dir_path)
+ files = sorted(os.listdir(dir_path))
for f in files:
- comment_header = "// " + f + " //"
- comment_line = "/" * len(comment_header)
+ processed_files.append(process_file(dir_path + f))
+ return processed_files
- global built_functions
- built_functions += gen_comment_header(f)
+############################################################################
- process_file(dir_path + f)
+def doc_function_index(processed_files):
+ s = '# Supported Functions\n'
+ for processed_file in processed_files:
+ s += '- %s\n' % processed_file['filename']
+ for function in processed_file['functions']:
+ s += ' - [%s](#%s)\n' % (function['identifier'], function['identifier'])
+ s += '\n
\n\n'
+ return s
+
+def doc_function(function):
+ fid = function['identifier']
+ s = '\n## [%s](#%s)\n' % (fid, fid)
+
+ rtype, rlink = translate_type_to_lua(function['type'])
+ param_str = ', '.join([x['identifier'] for x in function['params']])
+
+ s += "\n### Lua Example\n"
+ if rtype != None:
+ s += "`local %sValue = %s(%s)`\n" % (rtype, fid, param_str)
+ else:
+ s += "`%s(%s)`\n" % (fid, param_str)
+
+ s += '\n### Parameters\n'
+ if len(function['params']) > 0:
+ s += '| Field | Type |\n'
+ s += '| ----- | ---- |\n'
+ for param in function['params']:
+ pid = param['identifier']
+ ptype = param['type']
+ ptype, plink = translate_type_to_lua(ptype)
+
+ if plink:
+ s += '| %s | [%s](structs.md#%s) |\n' % (pid, ptype, ptype)
+ continue
+
+ s += '| %s | %s |\n' % (pid, ptype)
+
+ else:
+ s += '- None\n'
+
+ s += '\n### Returns\n'
+ if rtype != None:
+ if rlink:
+ s += '[%s](structs.md#%s)\n' % (rtype, rtype)
+ else:
+ s += '- %s\n' % rtype
+ else:
+ s += '- None\n'
+
+
+ s += '\n### C Prototype\n'
+ s += '`%s`\n' % function['line'].strip()
+
+ s += '\n[:arrow_up_small:](#)\n\n
\n'
+
+ return s
+
+def doc_functions(functions):
+ s = ''
+ for function in functions:
+ s += doc_function(function)
+ return s
+
+def doc_files(processed_files):
+ s = '## [:rewind: Lua Reference](lua.md)\n\n'
+ s += doc_function_index(processed_files)
+ for processed_file in processed_files:
+ s += '\n---'
+ s += '\n# functions from %s\n\n
\n\n' % processed_file['filename']
+ s += doc_functions(processed_file['functions'])
+
+ with open(get_path(docs_lua_functions), 'w') as out:
+ out.write(s)
############################################################################
def main():
- process_files()
+ processed_files = process_files()
+
+ built_functions = build_functions(processed_files)
+ built_binds = build_binds(processed_files)
+
filename = get_path(out_filename)
with open(filename, 'w') as out:
out.write(template.replace("$[FUNCTIONS]", built_functions).replace("$[BINDS]", built_binds))
print('REJECTS:')
print(rejects)
+ doc_files(processed_files)
if __name__ == '__main__':
main()
\ No newline at end of file
diff --git a/autogen/convert_structs.py b/autogen/convert_structs.py
index 35d246b6a..519c0ef91 100644
--- a/autogen/convert_structs.py
+++ b/autogen/convert_structs.py
@@ -13,6 +13,7 @@ in_files = [
]
smlua_cobject_autogen = 'src/pc/lua/smlua_cobject_autogen'
+docs_lua_structs = 'docs/lua/structs.md'
c_template = """/* THIS FILE IS AUTOGENERATED */
/* SHOULD NOT BE MANUALLY CHANGED */
@@ -56,6 +57,11 @@ override_field_immutable = {
"Character": [ "*" ],
}
+sLuaManuallyDefinedStructs = [
+ 'struct Vec3f { float x; float y; float z; }',
+ 'struct Vec3s { s16 x; s16 y; s16 z; }'
+]
+
############################################################################
def strip_internal_blocks(body):
@@ -149,6 +155,8 @@ def parse_struct(struct_str):
struct['fields'].append(field)
+ struct['fields'] = sorted(struct['fields'], key=lambda d: d['identifier'])
+
return struct
def parse_structs(struct_strs):
@@ -162,28 +170,34 @@ def parse_structs(struct_strs):
sLuaObjectTable = []
sLotAutoGenList = []
+def get_struct_field_info(struct, field):
+ sid = struct['identifier']
+ fid = field['identifier']
+ ftype = field['type']
+
+ if sid in override_field_names and fid in override_field_names[sid]:
+ fid = override_field_names[sid][fid]
+
+ if sid in override_field_types and fid in override_field_types[sid]:
+ ftype = override_field_types[sid][fid]
+
+ lvt = translate_type_to_lvt(ftype)
+ lot = translate_type_to_lot(ftype)
+ fimmutable = str(lvt == 'LVT_COBJECT' or lvt == 'LVT_COBJECT_P').lower()
+
+ if sid in override_field_immutable:
+ if fid in override_field_immutable[sid] or '*' in override_field_immutable[sid]:
+ fimmutable = 'true'
+
+ return fid, ftype, fimmutable, lvt, lot
+
def build_struct(struct):
sid = struct['identifier']
# build up table and track column width
field_table = []
for field in struct['fields']:
- fid = field['identifier']
- ftype = field['type']
-
- if sid in override_field_names and fid in override_field_names[sid]:
- fid = override_field_names[sid][fid]
-
- if sid in override_field_types and fid in override_field_types[sid]:
- ftype = override_field_types[sid][fid]
-
- lvt = translate_type_to_lvt(ftype)
- lot = translate_type_to_lot(ftype)
- fimmutable = str(lvt == 'LVT_COBJECT' or lvt == 'LVT_COBJECT_P').lower()
-
- if sid in override_field_immutable:
- if fid in override_field_immutable[sid] or '*' in override_field_immutable[sid]:
- fimmutable = 'true'
+ fid, ftype, fimmutable, lvt, lot = get_struct_field_info(struct, field)
row = []
row.append(' { ' )
@@ -262,6 +276,57 @@ def build_includes():
s += '#include "%s"\n' % in_file
return s
+
+############################################################################
+
+def doc_struct_index(structs):
+ s = '# Supported Structs\n'
+ for struct in structs:
+ sid = struct['identifier']
+ s += '- [%s](#%s)\n' % (sid, sid)
+ s += '\n
\n\n'
+ return s
+
+def doc_struct(struct):
+ sid = struct['identifier']
+ s = '## [%s](#%s)\n\n' % (sid, sid)
+ s += "| Field | Type |\n"
+ s += "| ----- | ---- |\n"
+
+
+ # build doc table
+ field_table = []
+ for field in struct['fields']:
+ fid, ftype, fimmutable, lvt, lot = get_struct_field_info(struct, field)
+ if '???' in lvt or '???' in lot:
+ continue
+
+ ftype, do_link = translate_type_to_lua(ftype)
+
+ if do_link:
+ s += '| %s | [%s](#%s) |\n' % (fid, ftype, ftype)
+ continue
+
+ s += '| %s | %s |\n' % (fid, ftype)
+
+ s += '\n[:arrow_up_small:](#)\n\n
\n'
+
+ return s
+
+def doc_structs(structs):
+ structs.extend(parse_structs(sLuaManuallyDefinedStructs))
+ structs = sorted(structs, key=lambda d: d['identifier'])
+
+ s = '## [:rewind: Lua Reference](lua.md)\n\n'
+ s += doc_struct_index(structs)
+ for struct in structs:
+ if struct['identifier'] in exclude_structs:
+ continue
+ s += doc_struct(struct) + '\n'
+
+ with open(get_path(docs_lua_structs), 'w') as out:
+ out.write(s)
+
############################################################################
def build_files():
@@ -271,6 +336,8 @@ def build_files():
extracted.extend(extract_structs(path))
parsed = parse_structs(extracted)
+ parsed = sorted(parsed, key=lambda d: d['identifier'])
+
built_body = build_body(parsed)
built_enum = build_lot_enum()
built_include = build_includes()
@@ -283,6 +350,8 @@ def build_files():
with open(out_h_filename, 'w') as out:
out.write(h_template.replace("$[BODY]", built_enum))
+ doc_structs(parsed)
+
############################################################################
if __name__ == '__main__':
diff --git a/autogen/lua_constants/constants.lua b/autogen/lua_constants/constants.lua
index 8d1574ad2..b682bd580 100644
--- a/autogen/lua_constants/constants.lua
+++ b/autogen/lua_constants/constants.lua
@@ -1253,6 +1253,10 @@ MARIO_ANIM_RETURN_FROM_STAR_DANCE = 206
MARIO_ANIM_FORWARD_SPINNING_FLIP = 207
MARIO_ANIM_TRIPLE_JUMP_FLY = 208
+-----------
+-- shake --
+-----------
+
SHAKE_ATTACK = 1
SHAKE_GROUND_POUND = 2
SHAKE_SMALL_DAMAGE = 3
diff --git a/docs/lua/constants.md b/docs/lua/constants.md
new file mode 100644
index 000000000..e91312b9d
--- /dev/null
+++ b/docs/lua/constants.md
@@ -0,0 +1,1256 @@
+## [:rewind: Lua Reference](lua.md)
+
+# Supported Constants
+- [actions](#actions)
+- [animations](#animations)
+- [caps](#caps)
+- [co-op](#co-op)
+- [controls](#controls)
+- [layers](#layers)
+- [lua](#lua)
+- [particles](#particles)
+- [physics](#physics)
+- [shake](#shake)
+- [sounds](#sounds)
+
+
+
+## [actions](actions)
+- ACT_ID_MASK
+- ACT_GROUP_MASK
+- ACT_GROUP_STATIONARY
+- ACT_GROUP_MOVING
+- ACT_GROUP_AIRBORNE
+- ACT_GROUP_SUBMERGED
+- ACT_GROUP_CUTSCENE
+- ACT_GROUP_AUTOMATIC
+- ACT_GROUP_OBJECT
+- ACT_FLAG_STATIONARY
+- ACT_FLAG_MOVING
+- ACT_FLAG_AIR
+- ACT_FLAG_INTANGIBLE
+- ACT_FLAG_SWIMMING
+- ACT_FLAG_METAL_WATER
+- ACT_FLAG_SHORT_HITBOX
+- ACT_FLAG_RIDING_SHELL
+- ACT_FLAG_INVULNERABLE
+- ACT_FLAG_BUTT_OR_STOMACH_SLIDE
+- ACT_FLAG_DIVING
+- ACT_FLAG_ON_POLE
+- ACT_FLAG_HANGING
+- ACT_FLAG_IDLE
+- ACT_FLAG_ATTACKING
+- ACT_FLAG_ALLOW_VERTICAL_WIND_ACTION
+- ACT_FLAG_CONTROL_JUMP_HEIGHT
+- ACT_FLAG_ALLOW_FIRST_PERSON
+- ACT_FLAG_PAUSE_EXIT
+- ACT_FLAG_SWIMMING_OR_FLYING
+- ACT_FLAG_WATER_OR_TEXT
+- ACT_FLAG_THROWING
+- ACT_UNINITIALIZED
+- ACT_IDLE
+- ACT_START_SLEEPING
+- ACT_SLEEPING
+- ACT_WAKING_UP
+- ACT_PANTING
+- ACT_HOLD_PANTING_UNUSED
+- ACT_HOLD_IDLE
+- ACT_HOLD_HEAVY_IDLE
+- ACT_STANDING_AGAINST_WALL
+- ACT_COUGHING
+- ACT_SHIVERING
+- ACT_IN_QUICKSAND
+- ACT_CROUCHING
+- ACT_START_CROUCHING
+- ACT_STOP_CROUCHING
+- ACT_START_CRAWLING
+- ACT_STOP_CRAWLING
+- ACT_SLIDE_KICK_SLIDE_STOP
+- ACT_SHOCKWAVE_BOUNCE
+- ACT_FIRST_PERSON
+- ACT_BACKFLIP_LAND_STOP
+- ACT_JUMP_LAND_STOP
+- ACT_DOUBLE_JUMP_LAND_STOP
+- ACT_FREEFALL_LAND_STOP
+- ACT_SIDE_FLIP_LAND_STOP
+- ACT_HOLD_JUMP_LAND_STOP
+- ACT_HOLD_FREEFALL_LAND_STOP
+- ACT_AIR_THROW_LAND
+- ACT_TWIRL_LAND
+- ACT_LAVA_BOOST_LAND
+- ACT_TRIPLE_JUMP_LAND_STOP
+- ACT_LONG_JUMP_LAND_STOP
+- ACT_GROUND_POUND_LAND
+- ACT_BRAKING_STOP
+- ACT_BUTT_SLIDE_STOP
+- ACT_HOLD_BUTT_SLIDE_STOP
+- ACT_WALKING
+- ACT_HOLD_WALKING
+- ACT_TURNING_AROUND
+- ACT_FINISH_TURNING_AROUND
+- ACT_BRAKING
+- ACT_RIDING_SHELL_GROUND
+- ACT_HOLD_HEAVY_WALKING
+- ACT_CRAWLING
+- ACT_BURNING_GROUND
+- ACT_DECELERATING
+- ACT_HOLD_DECELERATING
+- ACT_BEGIN_SLIDING
+- ACT_HOLD_BEGIN_SLIDING
+- ACT_BUTT_SLIDE
+- ACT_STOMACH_SLIDE
+- ACT_HOLD_BUTT_SLIDE
+- ACT_HOLD_STOMACH_SLIDE
+- ACT_DIVE_SLIDE
+- ACT_MOVE_PUNCHING
+- ACT_CROUCH_SLIDE
+- ACT_SLIDE_KICK_SLIDE
+- ACT_HARD_BACKWARD_GROUND_KB
+- ACT_HARD_FORWARD_GROUND_KB
+- ACT_BACKWARD_GROUND_KB
+- ACT_FORWARD_GROUND_KB
+- ACT_SOFT_BACKWARD_GROUND_KB
+- ACT_SOFT_FORWARD_GROUND_KB
+- ACT_GROUND_BONK
+- ACT_DEATH_EXIT_LAND
+- ACT_JUMP_LAND
+- ACT_FREEFALL_LAND
+- ACT_DOUBLE_JUMP_LAND
+- ACT_SIDE_FLIP_LAND
+- ACT_HOLD_JUMP_LAND
+- ACT_HOLD_FREEFALL_LAND
+- ACT_QUICKSAND_JUMP_LAND
+- ACT_HOLD_QUICKSAND_JUMP_LAND
+- ACT_TRIPLE_JUMP_LAND
+- ACT_LONG_JUMP_LAND
+- ACT_BACKFLIP_LAND
+- ACT_JUMP
+- ACT_DOUBLE_JUMP
+- ACT_TRIPLE_JUMP
+- ACT_BACKFLIP
+- ACT_STEEP_JUMP
+- ACT_WALL_KICK_AIR
+- ACT_SIDE_FLIP
+- ACT_LONG_JUMP
+- ACT_WATER_JUMP
+- ACT_DIVE
+- ACT_FREEFALL
+- ACT_TOP_OF_POLE_JUMP
+- ACT_BUTT_SLIDE_AIR
+- ACT_FLYING_TRIPLE_JUMP
+- ACT_SHOT_FROM_CANNON
+- ACT_FLYING
+- ACT_RIDING_SHELL_JUMP
+- ACT_RIDING_SHELL_FALL
+- ACT_VERTICAL_WIND
+- ACT_HOLD_JUMP
+- ACT_HOLD_FREEFALL
+- ACT_HOLD_BUTT_SLIDE_AIR
+- ACT_HOLD_WATER_JUMP
+- ACT_TWIRLING
+- ACT_FORWARD_ROLLOUT
+- ACT_AIR_HIT_WALL
+- ACT_RIDING_HOOT
+- ACT_GROUND_POUND
+- ACT_SLIDE_KICK
+- ACT_AIR_THROW
+- ACT_JUMP_KICK
+- ACT_BACKWARD_ROLLOUT
+- ACT_CRAZY_BOX_BOUNCE
+- ACT_SPECIAL_TRIPLE_JUMP
+- ACT_BACKWARD_AIR_KB
+- ACT_FORWARD_AIR_KB
+- ACT_HARD_FORWARD_AIR_KB
+- ACT_HARD_BACKWARD_AIR_KB
+- ACT_BURNING_JUMP
+- ACT_BURNING_FALL
+- ACT_SOFT_BONK
+- ACT_LAVA_BOOST
+- ACT_GETTING_BLOWN
+- ACT_THROWN_FORWARD
+- ACT_THROWN_BACKWARD
+- ACT_WATER_IDLE
+- ACT_HOLD_WATER_IDLE
+- ACT_WATER_ACTION_END
+- ACT_HOLD_WATER_ACTION_END
+- ACT_DROWNING
+- ACT_BACKWARD_WATER_KB
+- ACT_FORWARD_WATER_KB
+- ACT_WATER_DEATH
+- ACT_WATER_SHOCKED
+- ACT_BREASTSTROKE
+- ACT_SWIMMING_END
+- ACT_FLUTTER_KICK
+- ACT_HOLD_BREASTSTROKE
+- ACT_HOLD_SWIMMING_END
+- ACT_HOLD_FLUTTER_KICK
+- ACT_WATER_SHELL_SWIMMING
+- ACT_WATER_THROW
+- ACT_WATER_PUNCH
+- ACT_WATER_PLUNGE
+- ACT_CAUGHT_IN_WHIRLPOOL
+- ACT_METAL_WATER_STANDING
+- ACT_HOLD_METAL_WATER_STANDING
+- ACT_METAL_WATER_WALKING
+- ACT_HOLD_METAL_WATER_WALKING
+- ACT_METAL_WATER_FALLING
+- ACT_HOLD_METAL_WATER_FALLING
+- ACT_METAL_WATER_FALL_LAND
+- ACT_HOLD_METAL_WATER_FALL_LAND
+- ACT_METAL_WATER_JUMP
+- ACT_HOLD_METAL_WATER_JUMP
+- ACT_METAL_WATER_JUMP_LAND
+- ACT_HOLD_METAL_WATER_JUMP_LAND
+- ACT_DISAPPEARED
+- ACT_INTRO_CUTSCENE
+- ACT_STAR_DANCE_EXIT
+- ACT_STAR_DANCE_WATER
+- ACT_FALL_AFTER_STAR_GRAB
+- ACT_READING_AUTOMATIC_DIALOG
+- ACT_READING_NPC_DIALOG
+- ACT_STAR_DANCE_NO_EXIT
+- ACT_READING_SIGN
+- ACT_JUMBO_STAR_CUTSCENE
+- ACT_WAITING_FOR_DIALOG
+- ACT_DEBUG_FREE_MOVE
+- ACT_STANDING_DEATH
+- ACT_QUICKSAND_DEATH
+- ACT_ELECTROCUTION
+- ACT_SUFFOCATION
+- ACT_DEATH_ON_STOMACH
+- ACT_DEATH_ON_BACK
+- ACT_EATEN_BY_BUBBA
+- ACT_END_PEACH_CUTSCENE
+- ACT_CREDITS_CUTSCENE
+- ACT_END_WAVING_CUTSCENE
+- ACT_PULLING_DOOR
+- ACT_PUSHING_DOOR
+- ACT_WARP_DOOR_SPAWN
+- ACT_EMERGE_FROM_PIPE
+- ACT_SPAWN_SPIN_AIRBORNE
+- ACT_SPAWN_SPIN_LANDING
+- ACT_EXIT_AIRBORNE
+- ACT_EXIT_LAND_SAVE_DIALOG
+- ACT_DEATH_EXIT
+- ACT_UNUSED_DEATH_EXIT
+- ACT_FALLING_DEATH_EXIT
+- ACT_SPECIAL_EXIT_AIRBORNE
+- ACT_SPECIAL_DEATH_EXIT
+- ACT_FALLING_EXIT_AIRBORNE
+- ACT_UNLOCKING_KEY_DOOR
+- ACT_UNLOCKING_STAR_DOOR
+- ACT_ENTERING_STAR_DOOR
+- ACT_SPAWN_NO_SPIN_AIRBORNE
+- ACT_SPAWN_NO_SPIN_LANDING
+- ACT_BBH_ENTER_JUMP
+- ACT_BBH_ENTER_SPIN
+- ACT_TELEPORT_FADE_OUT
+- ACT_TELEPORT_FADE_IN
+- ACT_SHOCKED
+- ACT_SQUISHED
+- ACT_HEAD_STUCK_IN_GROUND
+- ACT_BUTT_STUCK_IN_GROUND
+- ACT_FEET_STUCK_IN_GROUND
+- ACT_PUTTING_ON_CAP
+- ACT_HOLDING_POLE
+- ACT_GRAB_POLE_SLOW
+- ACT_GRAB_POLE_FAST
+- ACT_CLIMBING_POLE
+- ACT_TOP_OF_POLE_TRANSITION
+- ACT_TOP_OF_POLE
+- ACT_START_HANGING
+- ACT_HANGING
+- ACT_HANG_MOVING
+- ACT_LEDGE_GRAB
+- ACT_LEDGE_CLIMB_SLOW_1
+- ACT_LEDGE_CLIMB_SLOW_2
+- ACT_LEDGE_CLIMB_DOWN
+- ACT_LEDGE_CLIMB_FAST
+- ACT_GRABBED
+- ACT_IN_CANNON
+- ACT_TORNADO_TWIRLING
+- ACT_BUBBLED
+- ACT_PUNCHING
+- ACT_PICKING_UP
+- ACT_DIVE_PICKING_UP
+- ACT_STOMACH_SLIDE_STOP
+- ACT_PLACING_DOWN
+- ACT_THROWING
+- ACT_HEAVY_THROW
+- ACT_PICKING_UP_BOWSER
+- ACT_HOLDING_BOWSER
+- ACT_RELEASING_BOWSER
+
+[:arrow_up_small:](#)
+
+
+
+## [animations](animations)
+- MARIO_ANIM_SLOW_LEDGE_GRAB
+- MARIO_ANIM_FALL_OVER_BACKWARDS
+- MARIO_ANIM_BACKWARD_AIR_KB
+- MARIO_ANIM_DYING_ON_BACK
+- MARIO_ANIM_BACKFLIP
+- MARIO_ANIM_CLIMB_UP_POLE
+- MARIO_ANIM_GRAB_POLE_SHORT
+- MARIO_ANIM_GRAB_POLE_SWING_PART1
+- MARIO_ANIM_GRAB_POLE_SWING_PART2
+- MARIO_ANIM_HANDSTAND_IDLE
+- MARIO_ANIM_HANDSTAND_JUMP
+- MARIO_ANIM_START_HANDSTAND
+- MARIO_ANIM_RETURN_FROM_HANDSTAND
+- MARIO_ANIM_IDLE_ON_POLE
+- MARIO_ANIM_A_POSE
+- MARIO_ANIM_SKID_ON_GROUND
+- MARIO_ANIM_STOP_SKID
+- MARIO_ANIM_CROUCH_FROM_FAST_LONGJUMP
+- MARIO_ANIM_CROUCH_FROM_SLOW_LONGJUMP
+- MARIO_ANIM_FAST_LONGJUMP
+- MARIO_ANIM_SLOW_LONGJUMP
+- MARIO_ANIM_AIRBORNE_ON_STOMACH
+- MARIO_ANIM_WALK_WITH_LIGHT_OBJ
+- MARIO_ANIM_RUN_WITH_LIGHT_OBJ
+- MARIO_ANIM_SLOW_WALK_WITH_LIGHT_OBJ
+- MARIO_ANIM_SHIVERING_WARMING_HAND
+- MARIO_ANIM_SHIVERING_RETURN_TO_IDLE
+- MARIO_ANIM_SHIVERING
+- MARIO_ANIM_CLIMB_DOWN_LEDGE
+- MARIO_ANIM_CREDITS_WAVING
+- MARIO_ANIM_CREDITS_LOOK_UP
+- MARIO_ANIM_CREDITS_RETURN_FROM_LOOK_UP
+- MARIO_ANIM_CREDITS_RAISE_HAND
+- MARIO_ANIM_CREDITS_LOWER_HAND
+- MARIO_ANIM_CREDITS_TAKE_OFF_CAP
+- MARIO_ANIM_CREDITS_START_WALK_LOOK_UP
+- MARIO_ANIM_CREDITS_LOOK_BACK_THEN_RUN
+- MARIO_ANIM_FINAL_BOWSER_RAISE_HAND_SPIN
+- MARIO_ANIM_FINAL_BOWSER_WING_CAP_TAKE_OFF
+- MARIO_ANIM_CREDITS_PEACE_SIGN
+- MARIO_ANIM_STAND_UP_FROM_LAVA_BOOST
+- MARIO_ANIM_FIRE_LAVA_BURN
+- MARIO_ANIM_WING_CAP_FLY
+- MARIO_ANIM_HANG_ON_OWL
+- MARIO_ANIM_LAND_ON_STOMACH
+- MARIO_ANIM_AIR_FORWARD_KB
+- MARIO_ANIM_DYING_ON_STOMACH
+- MARIO_ANIM_SUFFOCATING
+- MARIO_ANIM_COUGHING
+- MARIO_ANIM_THROW_CATCH_KEY
+- MARIO_ANIM_DYING_FALL_OVER
+- MARIO_ANIM_IDLE_ON_LEDGE
+- MARIO_ANIM_FAST_LEDGE_GRAB
+- MARIO_ANIM_HANG_ON_CEILING
+- MARIO_ANIM_PUT_CAP_ON
+- MARIO_ANIM_TAKE_CAP_OFF_THEN_ON
+- MARIO_ANIM_QUICKLY_PUT_CAP_ON
+- MARIO_ANIM_HEAD_STUCK_IN_GROUND
+- MARIO_ANIM_GROUND_POUND_LANDING
+- MARIO_ANIM_TRIPLE_JUMP_GROUND_POUND
+- MARIO_ANIM_START_GROUND_POUND
+- MARIO_ANIM_GROUND_POUND
+- MARIO_ANIM_BOTTOM_STUCK_IN_GROUND
+- MARIO_ANIM_IDLE_WITH_LIGHT_OBJ
+- MARIO_ANIM_JUMP_LAND_WITH_LIGHT_OBJ
+- MARIO_ANIM_JUMP_WITH_LIGHT_OBJ
+- MARIO_ANIM_FALL_LAND_WITH_LIGHT_OBJ
+- MARIO_ANIM_FALL_WITH_LIGHT_OBJ
+- MARIO_ANIM_FALL_FROM_SLIDING_WITH_LIGHT_OBJ
+- MARIO_ANIM_SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ
+- MARIO_ANIM_STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ
+- MARIO_ANIM_RIDING_SHELL
+- MARIO_ANIM_WALKING
+- MARIO_ANIM_FORWARD_FLIP
+- MARIO_ANIM_JUMP_RIDING_SHELL
+- MARIO_ANIM_LAND_FROM_DOUBLE_JUMP
+- MARIO_ANIM_DOUBLE_JUMP_FALL
+- MARIO_ANIM_SINGLE_JUMP
+- MARIO_ANIM_LAND_FROM_SINGLE_JUMP
+- MARIO_ANIM_AIR_KICK
+- MARIO_ANIM_DOUBLE_JUMP_RISE
+- MARIO_ANIM_START_FORWARD_SPINNING
+- MARIO_ANIM_THROW_LIGHT_OBJECT
+- MARIO_ANIM_FALL_FROM_SLIDE_KICK
+- MARIO_ANIM_BEND_KNESS_RIDING_SHELL
+- MARIO_ANIM_LEGS_STUCK_IN_GROUND
+- MARIO_ANIM_GENERAL_FALL
+- MARIO_ANIM_GENERAL_LAND
+- MARIO_ANIM_BEING_GRABBED
+- MARIO_ANIM_GRAB_HEAVY_OBJECT
+- MARIO_ANIM_SLOW_LAND_FROM_DIVE
+- MARIO_ANIM_FLY_FROM_CANNON
+- MARIO_ANIM_MOVE_ON_WIRE_NET_RIGHT
+- MARIO_ANIM_MOVE_ON_WIRE_NET_LEFT
+- MARIO_ANIM_MISSING_CAP
+- MARIO_ANIM_PULL_DOOR_WALK_IN
+- MARIO_ANIM_PUSH_DOOR_WALK_IN
+- MARIO_ANIM_UNLOCK_DOOR
+- MARIO_ANIM_START_REACH_POCKET
+- MARIO_ANIM_REACH_POCKET
+- MARIO_ANIM_STOP_REACH_POCKET
+- MARIO_ANIM_GROUND_THROW
+- MARIO_ANIM_GROUND_KICK
+- MARIO_ANIM_FIRST_PUNCH
+- MARIO_ANIM_SECOND_PUNCH
+- MARIO_ANIM_FIRST_PUNCH_FAST
+- MARIO_ANIM_SECOND_PUNCH_FAST
+- MARIO_ANIM_PICK_UP_LIGHT_OBJ
+- MARIO_ANIM_PUSHING
+- MARIO_ANIM_START_RIDING_SHELL
+- MARIO_ANIM_PLACE_LIGHT_OBJ
+- MARIO_ANIM_FORWARD_SPINNING
+- MARIO_ANIM_BACKWARD_SPINNING
+- MARIO_ANIM_BREAKDANCE
+- MARIO_ANIM_RUNNING
+- MARIO_ANIM_RUNNING_UNUSED
+- MARIO_ANIM_SOFT_BACK_KB
+- MARIO_ANIM_SOFT_FRONT_KB
+- MARIO_ANIM_DYING_IN_QUICKSAND
+- MARIO_ANIM_IDLE_IN_QUICKSAND
+- MARIO_ANIM_MOVE_IN_QUICKSAND
+- MARIO_ANIM_ELECTROCUTION
+- MARIO_ANIM_SHOCKED
+- MARIO_ANIM_BACKWARD_KB
+- MARIO_ANIM_FORWARD_KB
+- MARIO_ANIM_IDLE_HEAVY_OBJ
+- MARIO_ANIM_STAND_AGAINST_WALL
+- MARIO_ANIM_SIDESTEP_LEFT
+- MARIO_ANIM_SIDESTEP_RIGHT
+- MARIO_ANIM_START_SLEEP_IDLE
+- MARIO_ANIM_START_SLEEP_SCRATCH
+- MARIO_ANIM_START_SLEEP_YAWN
+- MARIO_ANIM_START_SLEEP_SITTING
+- MARIO_ANIM_SLEEP_IDLE
+- MARIO_ANIM_SLEEP_START_LYING
+- MARIO_ANIM_SLEEP_LYING
+- MARIO_ANIM_DIVE
+- MARIO_ANIM_SLIDE_DIVE
+- MARIO_ANIM_GROUND_BONK
+- MARIO_ANIM_STOP_SLIDE_LIGHT_OBJ
+- MARIO_ANIM_SLIDE_KICK
+- MARIO_ANIM_CROUCH_FROM_SLIDE_KICK
+- MARIO_ANIM_SLIDE_MOTIONLESS
+- MARIO_ANIM_STOP_SLIDE
+- MARIO_ANIM_FALL_FROM_SLIDE
+- MARIO_ANIM_SLIDE
+- MARIO_ANIM_TIPTOE
+- MARIO_ANIM_TWIRL_LAND
+- MARIO_ANIM_TWIRL
+- MARIO_ANIM_START_TWIRL
+- MARIO_ANIM_STOP_CROUCHING
+- MARIO_ANIM_START_CROUCHING
+- MARIO_ANIM_CROUCHING
+- MARIO_ANIM_CRAWLING
+- MARIO_ANIM_STOP_CRAWLING
+- MARIO_ANIM_START_CRAWLING
+- MARIO_ANIM_SUMMON_STAR
+- MARIO_ANIM_RETURN_STAR_APPROACH_DOOR
+- MARIO_ANIM_BACKWARDS_WATER_KB
+- MARIO_ANIM_SWIM_WITH_OBJ_PART1
+- MARIO_ANIM_SWIM_WITH_OBJ_PART2
+- MARIO_ANIM_FLUTTERKICK_WITH_OBJ
+- MARIO_ANIM_WATER_ACTION_END_WITH_OBJ
+- MARIO_ANIM_STOP_GRAB_OBJ_WATER
+- MARIO_ANIM_WATER_IDLE_WITH_OBJ
+- MARIO_ANIM_DROWNING_PART1
+- MARIO_ANIM_DROWNING_PART2
+- MARIO_ANIM_WATER_DYING
+- MARIO_ANIM_WATER_FORWARD_KB
+- MARIO_ANIM_FALL_FROM_WATER
+- MARIO_ANIM_SWIM_PART1
+- MARIO_ANIM_SWIM_PART2
+- MARIO_ANIM_FLUTTERKICK
+- MARIO_ANIM_WATER_ACTION_END
+- MARIO_ANIM_WATER_PICK_UP_OBJ
+- MARIO_ANIM_WATER_GRAB_OBJ_PART2
+- MARIO_ANIM_WATER_GRAB_OBJ_PART1
+- MARIO_ANIM_WATER_THROW_OBJ
+- MARIO_ANIM_WATER_IDLE
+- MARIO_ANIM_WATER_STAR_DANCE
+- MARIO_ANIM_RETURN_FROM_WATER_STAR_DANCE
+- MARIO_ANIM_GRAB_BOWSER
+- MARIO_ANIM_SWINGING_BOWSER
+- MARIO_ANIM_RELEASE_BOWSER
+- MARIO_ANIM_HOLDING_BOWSER
+- MARIO_ANIM_HEAVY_THROW
+- MARIO_ANIM_WALK_PANTING
+- MARIO_ANIM_WALK_WITH_HEAVY_OBJ
+- MARIO_ANIM_TURNING_PART1
+- MARIO_ANIM_TURNING_PART2
+- MARIO_ANIM_SLIDEFLIP_LAND
+- MARIO_ANIM_SLIDEFLIP
+- MARIO_ANIM_TRIPLE_JUMP_LAND
+- MARIO_ANIM_TRIPLE_JUMP
+- MARIO_ANIM_FIRST_PERSON
+- MARIO_ANIM_IDLE_HEAD_LEFT
+- MARIO_ANIM_IDLE_HEAD_RIGHT
+- MARIO_ANIM_IDLE_HEAD_CENTER
+- MARIO_ANIM_HANDSTAND_LEFT
+- MARIO_ANIM_HANDSTAND_RIGHT
+- MARIO_ANIM_WAKE_FROM_SLEEP
+- MARIO_ANIM_WAKE_FROM_LYING
+- MARIO_ANIM_START_TIPTOE
+- MARIO_ANIM_SLIDEJUMP
+- MARIO_ANIM_START_WALLKICK
+- MARIO_ANIM_STAR_DANCE
+- MARIO_ANIM_RETURN_FROM_STAR_DANCE
+- MARIO_ANIM_FORWARD_SPINNING_FLIP
+- MARIO_ANIM_TRIPLE_JUMP_FLY
+
+[:arrow_up_small:](#)
+
+
+
+## [caps](caps)
+- MARIO_NORMAL_CAP
+- MARIO_VANISH_CAP
+- MARIO_METAL_CAP
+- MARIO_WING_CAP
+- MARIO_CAP_ON_HEAD
+- MARIO_CAP_IN_HAND
+- MARIO_METAL_SHOCK
+- MARIO_TELEPORTING
+- MARIO_UNKNOWN_08
+- MARIO_UNKNOWN_13
+- MARIO_ACTION_SOUND_PLAYED
+- MARIO_MARIO_SOUND_PLAYED
+- MARIO_UNKNOWN_18
+- MARIO_PUNCHING
+- MARIO_KICKING
+- MARIO_TRIPPING
+- MARIO_UNKNOWN_25
+- MARIO_UNKNOWN_30
+- MARIO_UNKNOWN_31
+- MARIO_CAP_FLAGS
+
+[:arrow_up_small:](#)
+
+
+
+## [co-op](co-op)
+- MAX_PLAYERS
+
+
+
+- CT_MARIO
+- CT_LUIGI
+- CT_TOAD
+- CT_WALUIGI
+- CT_MAX
+
+[:arrow_up_small:](#)
+
+
+
+## [controls](controls)
+- CONT_A
+- CONT_B
+- CONT_G
+- CONT_START
+- CONT_UP
+- CONT_DOWN
+- CONT_LEFT
+- CONT_RIGHT
+- CONT_L
+- CONT_R
+- CONT_E
+- CONT_D
+- CONT_C
+- CONT_F
+
+
+
+- A_BUTTON
+- B_BUTTON
+- L_TRIG
+- R_TRIG
+- Z_TRIG
+- START_BUTTON
+- U_JPAD
+- L_JPAD
+- R_JPAD
+- D_JPAD
+- U_CBUTTONS
+- L_CBUTTONS
+- R_CBUTTONS
+- D_CBUTTONS
+
+
+
+- INPUT_NONZERO_ANALOG
+- INPUT_A_PRESSED
+- INPUT_OFF_FLOOR
+- INPUT_ABOVE_SLIDE
+- INPUT_FIRST_PERSON
+- INPUT_ZERO_MOVEMENT
+- INPUT_SQUISHED
+- INPUT_A_DOWN
+- INPUT_IN_POISON_GAS
+- INPUT_IN_WATER
+- INPUT_UNKNOWN_10
+- INPUT_INTERACT_OBJ_GRABBABLE
+- INPUT_UNKNOWN_12
+- INPUT_B_PRESSED
+- INPUT_Z_DOWN
+- INPUT_Z_PRESSED
+
+[:arrow_up_small:](#)
+
+
+
+## [layers](layers)
+- LAYER_FORCE
+- LAYER_OPAQUE
+- LAYER_OPAQUE_DECAL
+- LAYER_OPAQUE_INTER
+- LAYER_ALPHA
+- LAYER_TRANSPARENT
+- LAYER_TRANSPARENT_DECAL
+- LAYER_TRANSPARENT_INTER
+
+[:arrow_up_small:](#)
+
+
+
+## [lua](lua)
+- HOOK_UPDATE
+- HOOK_MARIO_UPDATE
+- HOOK_BEFORE_MARIO_UPDATE
+- HOOK_ON_SET_MARIO_ACTION
+- HOOK_BEFORE_PHYS_STEP
+- HOOK_MAX
+
+[:arrow_up_small:](#)
+
+
+
+## [particles](particles)
+- PARTICLE_DUST
+- PARTICLE_VERTICAL_STAR
+- PARTICLE_2
+- PARTICLE_SPARKLES
+- PARTICLE_HORIZONTAL_STAR
+- PARTICLE_BUBBLE
+- PARTICLE_WATER_SPLASH
+- PARTICLE_IDLE_WATER_WAVE
+- PARTICLE_SHALLOW_WATER_WAVE
+- PARTICLE_PLUNGE_BUBBLE
+- PARTICLE_WAVE_TRAIL
+- PARTICLE_FIRE
+- PARTICLE_SHALLOW_WATER_SPLASH
+- PARTICLE_LEAF
+- PARTICLE_SNOW
+- PARTICLE_DIRT
+- PARTICLE_MIST_CIRCLE
+- PARTICLE_BREATH
+- PARTICLE_TRIANGLE
+- PARTICLE_19
+
+
+
+- MODEL_STATE_NOISE_ALPHA
+- MODEL_STATE_METAL
+
+[:arrow_up_small:](#)
+
+
+
+## [physics](physics)
+- GROUND_STEP_LEFT_GROUND
+- GROUND_STEP_NONE
+- GROUND_STEP_HIT_WALL
+- GROUND_STEP_HIT_WALL_STOP_QSTEPS
+- GROUND_STEP_HIT_WALL_CONTINUE_QSTEPS
+
+
+
+- AIR_STEP_CHECK_LEDGE_GRAB
+- AIR_STEP_CHECK_HANG
+- AIR_STEP_NONE
+- AIR_STEP_LANDED
+- AIR_STEP_HIT_WALL
+- AIR_STEP_GRABBED_LEDGE
+- AIR_STEP_GRABBED_CEILING
+- AIR_STEP_HIT_LAVA_WALL
+
+
+
+- WATER_STEP_NONE
+- WATER_STEP_HIT_FLOOR
+- WATER_STEP_HIT_CEILING
+- WATER_STEP_CANCELLED
+- WATER_STEP_HIT_WALL
+
+[:arrow_up_small:](#)
+
+
+
+## [shake](shake)
+- SHAKE_ATTACK
+- SHAKE_GROUND_POUND
+- SHAKE_SMALL_DAMAGE
+- SHAKE_MED_DAMAGE
+- SHAKE_LARGE_DAMAGE
+- SHAKE_HIT_FROM_BELOW
+- SHAKE_FALL_DAMAGE
+- SHAKE_SHOCK
+
+[:arrow_up_small:](#)
+
+
+
+## [sounds](sounds)
+- SOUNDARGS_MASK_BANK
+- SOUNDARGS_MASK_SOUNDID
+- SOUNDARGS_MASK_PRIORITY
+- SOUNDARGS_MASK_STATUS
+
+
+
+- SOUNDARGS_SHIFT_BANK
+- SOUNDARGS_SHIFT_SOUNDID
+- SOUNDARGS_SHIFT_PRIORITY
+
+
+
+- SOUND_STATUS_STOPPED
+- SOUND_STATUS_STARTING
+- SOUND_STATUS_PLAYING
+
+
+
+- SOUND_LO_BITFLAG_UNK1
+- SOUND_NO_ECHO
+- SOUND_LO_BITFLAG_UNK8
+
+
+
+- SOUND_NO_VOLUME_LOSS
+- SOUND_VIBRATO
+- SOUND_NO_PRIORITY_LOSS
+- SOUND_NO_FREQUENCY_LOSS
+
+
+
+- NO_SOUND
+
+
+
+- SOUND_TERRAIN_DEFAULT
+- SOUND_TERRAIN_GRASS
+- SOUND_TERRAIN_WATER
+- SOUND_TERRAIN_STONE
+- SOUND_TERRAIN_SPOOKY
+- SOUND_TERRAIN_SNOW
+- SOUND_TERRAIN_ICE
+- SOUND_TERRAIN_SAND
+
+
+
+- SOUND_ACTION_TERRAIN_JUMP
+- SOUND_ACTION_TERRAIN_LANDING
+- SOUND_ACTION_TERRAIN_STEP
+- SOUND_ACTION_TERRAIN_BODY_HIT_GROUND
+- SOUND_ACTION_TERRAIN_STEP_TIPTOE
+- SOUND_ACTION_TERRAIN_STUCK_IN_GROUND
+- SOUND_ACTION_TERRAIN_HEAVY_LANDING
+
+
+
+- SOUND_ACTION_METAL_JUMP
+- SOUND_ACTION_METAL_LANDING
+- SOUND_ACTION_METAL_STEP
+- SOUND_ACTION_METAL_HEAVY_LANDING
+- SOUND_ACTION_CLAP_HANDS_COLD
+- SOUND_ACTION_HANGING_STEP
+- SOUND_ACTION_QUICKSAND_STEP
+- SOUND_ACTION_METAL_STEP_TIPTOE
+- SOUND_ACTION_UNKNOWN430
+- SOUND_ACTION_UNKNOWN431
+- SOUND_ACTION_UNKNOWN432
+- SOUND_ACTION_SWIM
+- SOUND_ACTION_UNKNOWN434
+- SOUND_ACTION_THROW
+- SOUND_ACTION_KEY_SWISH
+- SOUND_ACTION_SPIN
+- SOUND_ACTION_TWIRL
+- SOUND_ACTION_CLIMB_UP_TREE
+- SOUND_ACTION_CLIMB_DOWN_TREE
+- SOUND_ACTION_UNK3C
+- SOUND_ACTION_UNKNOWN43D
+- SOUND_ACTION_UNKNOWN43E
+- SOUND_ACTION_PAT_BACK
+- SOUND_ACTION_BRUSH_HAIR
+- SOUND_ACTION_CLIMB_UP_POLE
+- SOUND_ACTION_METAL_BONK
+- SOUND_ACTION_UNSTUCK_FROM_GROUND
+- SOUND_ACTION_HIT
+- SOUND_ACTION_HIT_2
+- SOUND_ACTION_HIT_3
+- SOUND_ACTION_BONK
+- SOUND_ACTION_SHRINK_INTO_BBH
+- SOUND_ACTION_SWIM_FAST
+- SOUND_ACTION_METAL_JUMP_WATER
+- SOUND_ACTION_METAL_LAND_WATER
+- SOUND_ACTION_METAL_STEP_WATER
+- SOUND_ACTION_UNK53
+- SOUND_ACTION_UNK54
+- SOUND_ACTION_UNK55
+- SOUND_ACTION_FLYING_FAST
+- SOUND_ACTION_TELEPORT
+- SOUND_ACTION_UNKNOWN458
+- SOUND_ACTION_BOUNCE_OFF_OBJECT
+- SOUND_ACTION_SIDE_FLIP_UNK
+- SOUND_ACTION_READ_SIGN
+- SOUND_ACTION_UNKNOWN45C
+- SOUND_ACTION_UNK5D
+- SOUND_ACTION_INTRO_UNK45E
+- SOUND_ACTION_INTRO_UNK45F
+
+
+
+- SOUND_MOVING_TERRAIN_SLIDE
+- SOUND_MOVING_TERRAIN_RIDING_SHELL
+
+
+
+- SOUND_MOVING_LAVA_BURN
+- SOUND_MOVING_SLIDE_DOWN_POLE
+- SOUND_MOVING_SLIDE_DOWN_TREE
+- SOUND_MOVING_QUICKSAND_DEATH
+- SOUND_MOVING_SHOCKED
+- SOUND_MOVING_FLYING
+- SOUND_MOVING_ALMOST_DROWNING
+- SOUND_MOVING_AIM_CANNON
+- SOUND_MOVING_UNK1A
+- SOUND_MOVING_RIDING_SHELL_LAVA
+
+
+
+- SOUND_MARIO_YAH_WAH_HOO
+- SOUND_MARIO_HOOHOO
+- SOUND_MARIO_YAHOO
+- SOUND_MARIO_UH
+- SOUND_MARIO_HRMM
+- SOUND_MARIO_WAH2
+- SOUND_MARIO_WHOA
+- SOUND_MARIO_EEUH
+- SOUND_MARIO_ATTACKED
+- SOUND_MARIO_OOOF
+- SOUND_MARIO_OOOF2
+- SOUND_MARIO_HERE_WE_GO
+- SOUND_MARIO_YAWNING
+- SOUND_MARIO_SNORING1
+- SOUND_MARIO_SNORING2
+- SOUND_MARIO_WAAAOOOW
+- SOUND_MARIO_HAHA
+- SOUND_MARIO_HAHA_2
+- SOUND_MARIO_UH2
+- SOUND_MARIO_UH2_2
+- SOUND_MARIO_ON_FIRE
+- SOUND_MARIO_DYING
+- SOUND_MARIO_PANTING_COLD
+
+
+
+- SOUND_MARIO_PANTING
+
+
+
+- SOUND_MARIO_COUGHING1
+- SOUND_MARIO_COUGHING2
+- SOUND_MARIO_COUGHING3
+- SOUND_MARIO_PUNCH_YAH
+- SOUND_MARIO_PUNCH_HOO
+- SOUND_MARIO_MAMA_MIA
+- SOUND_MARIO_OKEY_DOKEY
+- SOUND_MARIO_GROUND_POUND_WAH
+- SOUND_MARIO_DROWNING
+- SOUND_MARIO_PUNCH_WAH
+
+
+
+- SOUND_PEACH_DEAR_MARIO
+
+
+
+- SOUND_MARIO_YAHOO_WAHA_YIPPEE
+
+
+
+- SOUND_MARIO_DOH
+- SOUND_MARIO_GAME_OVER
+- SOUND_MARIO_HELLO
+- SOUND_MARIO_PRESS_START_TO_PLAY
+- SOUND_MARIO_TWIRL_BOUNCE
+- SOUND_MARIO_SNORING3
+- SOUND_MARIO_SO_LONGA_BOWSER
+- SOUND_MARIO_IMA_TIRED
+
+
+
+- SOUND_PEACH_MARIO
+- SOUND_PEACH_POWER_OF_THE_STARS
+- SOUND_PEACH_THANKS_TO_YOU
+- SOUND_PEACH_THANK_YOU_MARIO
+- SOUND_PEACH_SOMETHING_SPECIAL
+- SOUND_PEACH_BAKE_A_CAKE
+- SOUND_PEACH_FOR_MARIO
+- SOUND_PEACH_MARIO2
+
+
+
+- SOUND_GENERAL_ACTIVATE_CAP_SWITCH
+- SOUND_GENERAL_FLAME_OUT
+- SOUND_GENERAL_OPEN_WOOD_DOOR
+- SOUND_GENERAL_CLOSE_WOOD_DOOR
+- SOUND_GENERAL_OPEN_IRON_DOOR
+- SOUND_GENERAL_CLOSE_IRON_DOOR
+- SOUND_GENERAL_BUBBLES
+- SOUND_GENERAL_MOVING_WATER
+- SOUND_GENERAL_SWISH_WATER
+- SOUND_GENERAL_QUIET_BUBBLE
+- SOUND_GENERAL_VOLCANO_EXPLOSION
+- SOUND_GENERAL_QUIET_BUBBLE2
+- SOUND_GENERAL_CASTLE_TRAP_OPEN
+- SOUND_GENERAL_WALL_EXPLOSION
+- SOUND_GENERAL_COIN
+- SOUND_GENERAL_COIN_WATER
+- SOUND_GENERAL_SHORT_STAR
+- SOUND_GENERAL_BIG_CLOCK
+- SOUND_GENERAL_LOUD_POUND
+- SOUND_GENERAL_LOUD_POUND2
+- SOUND_GENERAL_SHORT_POUND1
+- SOUND_GENERAL_SHORT_POUND2
+- SOUND_GENERAL_SHORT_POUND3
+- SOUND_GENERAL_SHORT_POUND4
+- SOUND_GENERAL_SHORT_POUND5
+- SOUND_GENERAL_SHORT_POUND6
+- SOUND_GENERAL_OPEN_CHEST
+- SOUND_GENERAL_CLAM_SHELL1
+- SOUND_GENERAL_BOX_LANDING
+- SOUND_GENERAL_BOX_LANDING_2
+- SOUND_GENERAL_UNKNOWN1
+- SOUND_GENERAL_UNKNOWN1_2
+- SOUND_GENERAL_CLAM_SHELL2
+- SOUND_GENERAL_CLAM_SHELL3
+- SOUND_GENERAL_PAINTING_EJECT
+- SOUND_GENERAL_LEVEL_SELECT_CHANGE
+- SOUND_GENERAL_PLATFORM
+- SOUND_GENERAL_DONUT_PLATFORM_EXPLOSION
+- SOUND_GENERAL_BOWSER_BOMB_EXPLOSION
+- SOUND_GENERAL_COIN_SPURT
+- SOUND_GENERAL_COIN_SPURT_2
+- SOUND_GENERAL_COIN_SPURT_EU
+
+
+
+- SOUND_GENERAL_EXPLOSION6
+- SOUND_GENERAL_UNK32
+- SOUND_GENERAL_BOAT_TILT1
+- SOUND_GENERAL_BOAT_TILT2
+- SOUND_GENERAL_COIN_DROP
+- SOUND_GENERAL_UNKNOWN3_LOWPRIO
+- SOUND_GENERAL_UNKNOWN3
+- SOUND_GENERAL_UNKNOWN3_2
+- SOUND_GENERAL_PENDULUM_SWING
+- SOUND_GENERAL_CHAIN_CHOMP1
+- SOUND_GENERAL_CHAIN_CHOMP2
+- SOUND_GENERAL_DOOR_TURN_KEY
+- SOUND_GENERAL_MOVING_IN_SAND
+- SOUND_GENERAL_UNKNOWN4_LOWPRIO
+- SOUND_GENERAL_UNKNOWN4
+- SOUND_GENERAL_MOVING_PLATFORM_SWITCH
+- SOUND_GENERAL_CAGE_OPEN
+- SOUND_GENERAL_QUIET_POUND1_LOWPRIO
+- SOUND_GENERAL_QUIET_POUND1
+- SOUND_GENERAL_BREAK_BOX
+- SOUND_GENERAL_DOOR_INSERT_KEY
+- SOUND_GENERAL_QUIET_POUND2
+- SOUND_GENERAL_BIG_POUND
+- SOUND_GENERAL_UNK45
+- SOUND_GENERAL_UNK46_LOWPRIO
+- SOUND_GENERAL_UNK46
+- SOUND_GENERAL_CANNON_UP
+- SOUND_GENERAL_GRINDEL_ROLL
+- SOUND_GENERAL_EXPLOSION7
+- SOUND_GENERAL_SHAKE_COFFIN
+- SOUND_GENERAL_RACE_GUN_SHOT
+- SOUND_GENERAL_STAR_DOOR_OPEN
+- SOUND_GENERAL_STAR_DOOR_CLOSE
+- SOUND_GENERAL_POUND_ROCK
+- SOUND_GENERAL_STAR_APPEARS
+- SOUND_GENERAL_COLLECT_1UP
+- SOUND_GENERAL_BUTTON_PRESS_LOWPRIO
+- SOUND_GENERAL_BUTTON_PRESS
+- SOUND_GENERAL_BUTTON_PRESS_2_LOWPRIO
+- SOUND_GENERAL_BUTTON_PRESS_2
+- SOUND_GENERAL_ELEVATOR_MOVE
+- SOUND_GENERAL_ELEVATOR_MOVE_2
+- SOUND_GENERAL_SWISH_AIR
+- SOUND_GENERAL_SWISH_AIR_2
+- SOUND_GENERAL_HAUNTED_CHAIR
+- SOUND_GENERAL_SOFT_LANDING
+- SOUND_GENERAL_HAUNTED_CHAIR_MOVE
+- SOUND_GENERAL_BOWSER_PLATFORM
+- SOUND_GENERAL_BOWSER_PLATFORM_2
+- SOUND_GENERAL_HEART_SPIN
+- SOUND_GENERAL_POUND_WOOD_POST
+- SOUND_GENERAL_WATER_LEVEL_TRIG
+- SOUND_GENERAL_SWITCH_DOOR_OPEN
+- SOUND_GENERAL_RED_COIN
+- SOUND_GENERAL_BIRDS_FLY_AWAY
+- SOUND_GENERAL_METAL_POUND
+- SOUND_GENERAL_BOING1
+- SOUND_GENERAL_BOING2_LOWPRIO
+- SOUND_GENERAL_BOING2
+- SOUND_GENERAL_YOSHI_WALK
+- SOUND_GENERAL_ENEMY_ALERT1
+- SOUND_GENERAL_YOSHI_TALK
+- SOUND_GENERAL_SPLATTERING
+- SOUND_GENERAL_BOING3
+- SOUND_GENERAL_GRAND_STAR
+- SOUND_GENERAL_GRAND_STAR_JUMP
+- SOUND_GENERAL_BOAT_ROCK
+- SOUND_GENERAL_VANISH_SFX
+
+
+
+- SOUND_ENV_WATERFALL1
+- SOUND_ENV_WATERFALL2
+- SOUND_ENV_ELEVATOR1
+- SOUND_ENV_DRONING1
+- SOUND_ENV_DRONING2
+- SOUND_ENV_WIND1
+- SOUND_ENV_MOVING_SAND_SNOW
+- SOUND_ENV_UNK07
+- SOUND_ENV_ELEVATOR2
+- SOUND_ENV_WATER
+- SOUND_ENV_UNKNOWN2
+- SOUND_ENV_BOAT_ROCKING1
+- SOUND_ENV_ELEVATOR3
+- SOUND_ENV_ELEVATOR4
+- SOUND_ENV_ELEVATOR4_2
+- SOUND_ENV_MOVINGSAND
+- SOUND_ENV_MERRY_GO_ROUND_CREAKING
+- SOUND_ENV_WIND2
+- SOUND_ENV_UNK12
+- SOUND_ENV_SLIDING
+- SOUND_ENV_STAR
+- SOUND_ENV_UNKNOWN4
+- SOUND_ENV_WATER_DRAIN
+- SOUND_ENV_METAL_BOX_PUSH
+- SOUND_ENV_SINK_QUICKSAND
+
+
+
+- SOUND_OBJ_SUSHI_SHARK_WATER_SOUND
+- SOUND_OBJ_MRI_SHOOT
+- SOUND_OBJ_BABY_PENGUIN_WALK
+- SOUND_OBJ_BOWSER_WALK
+- SOUND_OBJ_BOWSER_TAIL_PICKUP
+- SOUND_OBJ_BOWSER_DEFEATED
+- SOUND_OBJ_BOWSER_SPINNING
+- SOUND_OBJ_BOWSER_INHALING
+- SOUND_OBJ_BIG_PENGUIN_WALK
+- SOUND_OBJ_BOO_BOUNCE_TOP
+- SOUND_OBJ_BOO_LAUGH_SHORT
+- SOUND_OBJ_THWOMP
+- SOUND_OBJ_CANNON1
+- SOUND_OBJ_CANNON2
+- SOUND_OBJ_CANNON3
+- SOUND_OBJ_JUMP_WALK_WATER
+- SOUND_OBJ_UNKNOWN2
+- SOUND_OBJ_MRI_DEATH
+- SOUND_OBJ_POUNDING1
+- SOUND_OBJ_POUNDING1_HIGHPRIO
+- SOUND_OBJ_WHOMP_LOWPRIO
+- SOUND_OBJ_KING_BOBOMB
+- SOUND_OBJ_BULLY_METAL
+- SOUND_OBJ_BULLY_EXPLODE
+- SOUND_OBJ_BULLY_EXPLODE_2
+- SOUND_OBJ_POUNDING_CANNON
+- SOUND_OBJ_BULLY_WALK
+- SOUND_OBJ_UNKNOWN3
+- SOUND_OBJ_UNKNOWN4
+- SOUND_OBJ_BABY_PENGUIN_DIVE
+- SOUND_OBJ_GOOMBA_WALK
+- SOUND_OBJ_UKIKI_CHATTER_LONG
+- SOUND_OBJ_MONTY_MOLE_ATTACK
+- SOUND_OBJ_EVIL_LAKITU_THROW
+- SOUND_OBJ_UNK23
+- SOUND_OBJ_DYING_ENEMY1
+- SOUND_OBJ_CANNON4
+- SOUND_OBJ_DYING_ENEMY2
+- SOUND_OBJ_BOBOMB_WALK
+- SOUND_OBJ_SOMETHING_LANDING
+- SOUND_OBJ_DIVING_IN_WATER
+- SOUND_OBJ_SNOW_SAND1
+- SOUND_OBJ_SNOW_SAND2
+- SOUND_OBJ_DEFAULT_DEATH
+- SOUND_OBJ_BIG_PENGUIN_YELL
+- SOUND_OBJ_WATER_BOMB_BOUNCING
+- SOUND_OBJ_GOOMBA_ALERT
+- SOUND_OBJ_WIGGLER_JUMP
+- SOUND_OBJ_STOMPED
+- SOUND_OBJ_UNKNOWN6
+- SOUND_OBJ_DIVING_INTO_WATER
+- SOUND_OBJ_PIRANHA_PLANT_SHRINK
+- SOUND_OBJ_KOOPA_THE_QUICK_WALK
+- SOUND_OBJ_KOOPA_WALK
+- SOUND_OBJ_BULLY_WALKING
+- SOUND_OBJ_DORRIE
+- SOUND_OBJ_BOWSER_LAUGH
+- SOUND_OBJ_UKIKI_CHATTER_SHORT
+- SOUND_OBJ_UKIKI_CHATTER_IDLE
+- SOUND_OBJ_UKIKI_STEP_DEFAULT
+- SOUND_OBJ_UKIKI_STEP_LEAVES
+- SOUND_OBJ_KOOPA_TALK
+- SOUND_OBJ_KOOPA_DAMAGE
+- SOUND_OBJ_KLEPTO1
+- SOUND_OBJ_KLEPTO2
+- SOUND_OBJ_KING_BOBOMB_TALK
+- SOUND_OBJ_KING_BOBOMB_JUMP
+- SOUND_OBJ_KING_WHOMP_DEATH
+- SOUND_OBJ_BOO_LAUGH_LONG
+- SOUND_OBJ_EEL
+- SOUND_OBJ_EEL_2
+- SOUND_OBJ_EYEROK_SHOW_EYE
+- SOUND_OBJ_MR_BLIZZARD_ALERT
+- SOUND_OBJ_SNUFIT_SHOOT
+- SOUND_OBJ_SKEETER_WALK
+- SOUND_OBJ_WALKING_WATER
+- SOUND_OBJ_BIRD_CHIRP3
+- SOUND_OBJ_PIRANHA_PLANT_APPEAR
+- SOUND_OBJ_FLAME_BLOWN
+- SOUND_OBJ_MAD_PIANO_CHOMPING
+- SOUND_OBJ_BOBOMB_BUDDY_TALK
+- SOUND_OBJ_SPINY_UNK59
+- SOUND_OBJ_WIGGLER_HIGH_PITCH
+- SOUND_OBJ_HEAVEHO_TOSSED
+- SOUND_OBJ_WIGGLER_DEATH
+- SOUND_OBJ_BOWSER_INTRO_LAUGH
+- SOUND_OBJ_ENEMY_DEATH_HIGH
+- SOUND_OBJ_ENEMY_DEATH_LOW
+- SOUND_OBJ_SWOOP_DEATH
+- SOUND_OBJ_KOOPA_FLYGUY_DEATH
+- SOUND_OBJ_POKEY_DEATH
+- SOUND_OBJ_SNOWMAN_BOUNCE
+- SOUND_OBJ_SNOWMAN_EXPLODE
+- SOUND_OBJ_POUNDING_LOUD
+- SOUND_OBJ_MIPS_RABBIT
+- SOUND_OBJ_MIPS_RABBIT_WATER
+- SOUND_OBJ_EYEROK_EXPLODE
+- SOUND_OBJ_CHUCKYA_DEATH
+- SOUND_OBJ_WIGGLER_TALK
+- SOUND_OBJ_WIGGLER_ATTACKED
+- SOUND_OBJ_WIGGLER_LOW_PITCH
+- SOUND_OBJ_SNUFIT_SKEETER_DEATH
+- SOUND_OBJ_BUBBA_CHOMP
+- SOUND_OBJ_ENEMY_DEFEAT_SHRINK
+
+
+
+- SOUND_AIR_BOWSER_SPIT_FIRE
+- SOUND_AIR_UNK01
+- SOUND_AIR_LAKITU_FLY
+- SOUND_AIR_LAKITU_FLY_HIGHPRIO
+- SOUND_AIR_AMP_BUZZ
+- SOUND_AIR_BLOW_FIRE
+- SOUND_AIR_BLOW_WIND
+- SOUND_AIR_ROUGH_SLIDE
+- SOUND_AIR_HEAVEHO_MOVE
+- SOUND_AIR_UNK07
+- SOUND_AIR_BOBOMB_LIT_FUSE
+- SOUND_AIR_HOWLING_WIND
+- SOUND_AIR_CHUCKYA_MOVE
+- SOUND_AIR_PEACH_TWINKLE
+- SOUND_AIR_CASTLE_OUTDOORS_AMBIENT
+
+
+
+- SOUND_MENU_CHANGE_SELECT
+- SOUND_MENU_REVERSE_PAUSE
+- SOUND_MENU_PAUSE
+- SOUND_MENU_PAUSE_HIGHPRIO
+- SOUND_MENU_PAUSE_2
+- SOUND_MENU_MESSAGE_APPEAR
+- SOUND_MENU_MESSAGE_DISAPPEAR
+- SOUND_MENU_CAMERA_ZOOM_IN
+- SOUND_MENU_CAMERA_ZOOM_OUT
+- SOUND_MENU_PINCH_MARIO_FACE
+- SOUND_MENU_LET_GO_MARIO_FACE
+- SOUND_MENU_HAND_APPEAR
+- SOUND_MENU_HAND_DISAPPEAR
+- SOUND_MENU_UNK0C
+- SOUND_MENU_POWER_METER
+- SOUND_MENU_CAMERA_BUZZ
+- SOUND_MENU_CAMERA_TURN
+- SOUND_MENU_UNK10
+- SOUND_MENU_CLICK_FILE_SELECT
+- SOUND_MENU_MESSAGE_NEXT_PAGE
+- SOUND_MENU_COIN_ITS_A_ME_MARIO
+- SOUND_MENU_YOSHI_GAIN_LIVES
+- SOUND_MENU_ENTER_PIPE
+- SOUND_MENU_EXIT_PIPE
+- SOUND_MENU_BOWSER_LAUGH
+- SOUND_MENU_ENTER_HOLE
+- SOUND_MENU_CLICK_CHANGE_VIEW
+- SOUND_MENU_CAMERA_UNUSED1
+- SOUND_MENU_CAMERA_UNUSED2
+- SOUND_MENU_MARIO_CASTLE_WARP
+- SOUND_MENU_STAR_SOUND
+- SOUND_MENU_THANK_YOU_PLAYING_MY_GAME
+- SOUND_MENU_READ_A_SIGN
+- SOUND_MENU_EXIT_A_SIGN
+- SOUND_MENU_MARIO_CASTLE_WARP2
+- SOUND_MENU_STAR_SOUND_OKEY_DOKEY
+- SOUND_MENU_STAR_SOUND_LETS_A_GO
+
+
+
+- SOUND_MENU_COLLECT_RED_COIN
+- SOUND_MENU_COLLECT_SECRET
+
+
+
+- SOUND_GENERAL2_BOBOMB_EXPLOSION
+- SOUND_GENERAL2_PURPLE_SWITCH
+- SOUND_GENERAL2_ROTATING_BLOCK_CLICK
+- SOUND_GENERAL2_SPINDEL_ROLL
+- SOUND_GENERAL2_PYRAMID_TOP_SPIN
+- SOUND_GENERAL2_PYRAMID_TOP_EXPLOSION
+- SOUND_GENERAL2_BIRD_CHIRP2
+- SOUND_GENERAL2_SWITCH_TICK_FAST
+- SOUND_GENERAL2_SWITCH_TICK_SLOW
+- SOUND_GENERAL2_STAR_APPEARS
+- SOUND_GENERAL2_ROTATING_BLOCK_ALERT
+- SOUND_GENERAL2_BOWSER_EXPLODE
+- SOUND_GENERAL2_BOWSER_KEY
+- SOUND_GENERAL2_1UP_APPEAR
+- SOUND_GENERAL2_RIGHT_ANSWER
+
+
+
+- SOUND_OBJ2_BOWSER_ROAR
+- SOUND_OBJ2_PIRANHA_PLANT_BITE
+- SOUND_OBJ2_PIRANHA_PLANT_DYING
+- SOUND_OBJ2_BOWSER_PUZZLE_PIECE_MOVE
+- SOUND_OBJ2_BULLY_ATTACKED
+- SOUND_OBJ2_KING_BOBOMB_DAMAGE
+- SOUND_OBJ2_SCUTTLEBUG_WALK
+- SOUND_OBJ2_SCUTTLEBUG_ALERT
+- SOUND_OBJ2_BABY_PENGUIN_YELL
+- SOUND_OBJ2_SWOOP
+- SOUND_OBJ2_BIRD_CHIRP1
+- SOUND_OBJ2_LARGE_BULLY_ATTACKED
+- SOUND_OBJ2_EYEROK_SOUND_SHORT
+- SOUND_OBJ2_WHOMP_SOUND_SHORT
+- SOUND_OBJ2_EYEROK_SOUND_LONG
+- SOUND_OBJ2_BOWSER_TELEPORT
+- SOUND_OBJ2_MONTY_MOLE_APPEAR
+- SOUND_OBJ2_BOSS_DIALOG_GRUNT
+- SOUND_OBJ2_MRI_SPINNING
+
+[:arrow_up_small:](#)
+
+
diff --git a/docs/lua/functions.md b/docs/lua/functions.md
new file mode 100644
index 000000000..00770968f
--- /dev/null
+++ b/docs/lua/functions.md
@@ -0,0 +1,5184 @@
+## [:rewind: Lua Reference](lua.md)
+
+# Supported Functions
+- camera.h
+ - [set_camera_shake_from_hit](#set_camera_shake_from_hit)
+ - [set_camera_shake_from_point](#set_camera_shake_from_point)
+ - [set_environmental_camera_shake](#set_environmental_camera_shake)
+
+
+
+- characters.h
+ - [get_character](#get_character)
+ - [get_character_anim_offset](#get_character_anim_offset)
+ - [play_character_sound](#play_character_sound)
+ - [play_character_sound_if_no_flag](#play_character_sound_if_no_flag)
+ - [play_character_sound_offset](#play_character_sound_offset)
+ - [update_character_anim_offset](#update_character_anim_offset)
+
+
+
+- external.h
+ - [play_sound](#play_sound)
+
+
+
+- mario.h
+ - [adjust_sound_for_speed](#adjust_sound_for_speed)
+ - [check_common_action_exits](#check_common_action_exits)
+ - [check_common_hold_action_exits](#check_common_hold_action_exits)
+ - [drop_and_set_mario_action](#drop_and_set_mario_action)
+ - [execute_mario_action](#execute_mario_action)
+ - [find_floor_height_relative_polar](#find_floor_height_relative_polar)
+ - [find_floor_slope](#find_floor_slope)
+ - [find_mario_anim_flags_and_translation](#find_mario_anim_flags_and_translation)
+ - [force_idle_state](#force_idle_state)
+ - [hurt_and_set_mario_action](#hurt_and_set_mario_action)
+ - [is_anim_at_end](#is_anim_at_end)
+ - [is_anim_past_end](#is_anim_past_end)
+ - [is_anim_past_frame](#is_anim_past_frame)
+ - [mario_facing_downhill](#mario_facing_downhill)
+ - [mario_floor_is_slippery](#mario_floor_is_slippery)
+ - [mario_floor_is_slope](#mario_floor_is_slope)
+ - [mario_floor_is_steep](#mario_floor_is_steep)
+ - [mario_get_floor_class](#mario_get_floor_class)
+ - [mario_get_terrain_sound_addend](#mario_get_terrain_sound_addend)
+ - [mario_set_bubbled](#mario_set_bubbled)
+ - [mario_set_forward_vel](#mario_set_forward_vel)
+ - [play_mario_action_sound](#play_mario_action_sound)
+ - [play_mario_heavy_landing_sound](#play_mario_heavy_landing_sound)
+ - [play_mario_heavy_landing_sound_once](#play_mario_heavy_landing_sound_once)
+ - [play_mario_jump_sound](#play_mario_jump_sound)
+ - [play_mario_landing_sound](#play_mario_landing_sound)
+ - [play_mario_landing_sound_once](#play_mario_landing_sound_once)
+ - [play_mario_sound](#play_mario_sound)
+ - [play_sound_and_spawn_particles](#play_sound_and_spawn_particles)
+ - [play_sound_if_no_flag](#play_sound_if_no_flag)
+ - [resolve_and_return_wall_collisions](#resolve_and_return_wall_collisions)
+ - [return_mario_anim_y_translation](#return_mario_anim_y_translation)
+ - [set_anim_to_frame](#set_anim_to_frame)
+ - [set_jump_from_landing](#set_jump_from_landing)
+ - [set_jumping_action](#set_jumping_action)
+ - [set_mario_action](#set_mario_action)
+ - [set_mario_anim_with_accel](#set_mario_anim_with_accel)
+ - [set_mario_animation](#set_mario_animation)
+ - [set_steep_jump_action](#set_steep_jump_action)
+ - [set_water_plunge_action](#set_water_plunge_action)
+ - [transition_submerged_to_walking](#transition_submerged_to_walking)
+ - [update_mario_pos_for_anim](#update_mario_pos_for_anim)
+ - [update_mario_sound_and_camera](#update_mario_sound_and_camera)
+ - [vec3f_find_ceil](#vec3f_find_ceil)
+
+
+
+- mario_actions_airborne.c
+ - [act_air_hit_wall](#act_air_hit_wall)
+ - [act_air_throw](#act_air_throw)
+ - [act_backflip](#act_backflip)
+ - [act_backward_air_kb](#act_backward_air_kb)
+ - [act_backward_rollout](#act_backward_rollout)
+ - [act_burning_fall](#act_burning_fall)
+ - [act_burning_jump](#act_burning_jump)
+ - [act_butt_slide_air](#act_butt_slide_air)
+ - [act_crazy_box_bounce](#act_crazy_box_bounce)
+ - [act_dive](#act_dive)
+ - [act_double_jump](#act_double_jump)
+ - [act_flying](#act_flying)
+ - [act_flying_triple_jump](#act_flying_triple_jump)
+ - [act_forward_air_kb](#act_forward_air_kb)
+ - [act_forward_rollout](#act_forward_rollout)
+ - [act_freefall](#act_freefall)
+ - [act_getting_blown](#act_getting_blown)
+ - [act_ground_pound](#act_ground_pound)
+ - [act_hard_backward_air_kb](#act_hard_backward_air_kb)
+ - [act_hard_forward_air_kb](#act_hard_forward_air_kb)
+ - [act_hold_butt_slide_air](#act_hold_butt_slide_air)
+ - [act_hold_freefall](#act_hold_freefall)
+ - [act_hold_jump](#act_hold_jump)
+ - [act_hold_water_jump](#act_hold_water_jump)
+ - [act_jump](#act_jump)
+ - [act_jump_kick](#act_jump_kick)
+ - [act_lava_boost](#act_lava_boost)
+ - [act_long_jump](#act_long_jump)
+ - [act_riding_hoot](#act_riding_hoot)
+ - [act_riding_shell_air](#act_riding_shell_air)
+ - [act_shot_from_cannon](#act_shot_from_cannon)
+ - [act_side_flip](#act_side_flip)
+ - [act_slide_kick](#act_slide_kick)
+ - [act_soft_bonk](#act_soft_bonk)
+ - [act_special_triple_jump](#act_special_triple_jump)
+ - [act_steep_jump](#act_steep_jump)
+ - [act_thrown_backward](#act_thrown_backward)
+ - [act_thrown_forward](#act_thrown_forward)
+ - [act_top_of_pole_jump](#act_top_of_pole_jump)
+ - [act_triple_jump](#act_triple_jump)
+ - [act_twirling](#act_twirling)
+ - [act_vertical_wind](#act_vertical_wind)
+ - [act_wall_kick_air](#act_wall_kick_air)
+ - [act_water_jump](#act_water_jump)
+ - [check_common_airborne_cancels](#check_common_airborne_cancels)
+ - [check_fall_damage](#check_fall_damage)
+ - [check_fall_damage_or_get_stuck](#check_fall_damage_or_get_stuck)
+ - [check_horizontal_wind](#check_horizontal_wind)
+ - [check_kick_or_dive_in_air](#check_kick_or_dive_in_air)
+ - [check_wall_kick](#check_wall_kick)
+ - [common_air_action_step](#common_air_action_step)
+ - [common_air_knockback_step](#common_air_knockback_step)
+ - [lava_boost_on_wall](#lava_boost_on_wall)
+ - [mario_execute_airborne_action](#mario_execute_airborne_action)
+ - [play_far_fall_sound](#play_far_fall_sound)
+ - [play_flip_sounds](#play_flip_sounds)
+ - [play_knockback_sound](#play_knockback_sound)
+ - [should_get_stuck_in_ground](#should_get_stuck_in_ground)
+ - [update_air_with_turn](#update_air_with_turn)
+ - [update_air_without_turn](#update_air_without_turn)
+ - [update_flying](#update_flying)
+ - [update_flying_pitch](#update_flying_pitch)
+ - [update_flying_yaw](#update_flying_yaw)
+ - [update_lava_boost_or_twirling](#update_lava_boost_or_twirling)
+
+
+
+- mario_actions_automatic.c
+ - [act_bubbled](#act_bubbled)
+ - [act_climbing_pole](#act_climbing_pole)
+ - [act_grab_pole_fast](#act_grab_pole_fast)
+ - [act_grab_pole_slow](#act_grab_pole_slow)
+ - [act_grabbed](#act_grabbed)
+ - [act_hang_moving](#act_hang_moving)
+ - [act_hanging](#act_hanging)
+ - [act_holding_pole](#act_holding_pole)
+ - [act_in_cannon](#act_in_cannon)
+ - [act_ledge_climb_down](#act_ledge_climb_down)
+ - [act_ledge_climb_fast](#act_ledge_climb_fast)
+ - [act_ledge_climb_slow](#act_ledge_climb_slow)
+ - [act_ledge_grab](#act_ledge_grab)
+ - [act_start_hanging](#act_start_hanging)
+ - [act_top_of_pole](#act_top_of_pole)
+ - [act_top_of_pole_transition](#act_top_of_pole_transition)
+ - [act_tornado_twirling](#act_tornado_twirling)
+ - [add_tree_leaf_particles](#add_tree_leaf_particles)
+ - [check_common_automatic_cancels](#check_common_automatic_cancels)
+ - [climb_up_ledge](#climb_up_ledge)
+ - [let_go_of_ledge](#let_go_of_ledge)
+ - [mario_execute_automatic_action](#mario_execute_automatic_action)
+ - [perform_hanging_step](#perform_hanging_step)
+ - [play_climbing_sounds](#play_climbing_sounds)
+ - [set_pole_position](#set_pole_position)
+ - [update_hang_moving](#update_hang_moving)
+ - [update_hang_stationary](#update_hang_stationary)
+ - [update_ledge_climb](#update_ledge_climb)
+ - [update_ledge_climb_camera](#update_ledge_climb_camera)
+
+
+
+- mario_actions_cutscene.c
+ - [bhv_end_peach_loop](#bhv_end_peach_loop)
+ - [bhv_end_toad_loop](#bhv_end_toad_loop)
+ - [cutscene_put_cap_on](#cutscene_put_cap_on)
+ - [cutscene_take_cap_off](#cutscene_take_cap_off)
+ - [general_star_dance_handler](#general_star_dance_handler)
+ - [generate_yellow_sparkles](#generate_yellow_sparkles)
+ - [handle_save_menu](#handle_save_menu)
+ - [print_displaying_credits_entry](#print_displaying_credits_entry)
+ - [should_start_or_continue_dialog](#should_start_or_continue_dialog)
+ - [spawn_obj_at_mario_rel_yaw](#spawn_obj_at_mario_rel_yaw)
+ - [stuck_in_ground_handler](#stuck_in_ground_handler)
+
+
+
+- mario_actions_moving.c
+ - [align_with_floor](#align_with_floor)
+ - [analog_stick_held_back](#analog_stick_held_back)
+ - [anim_and_audio_for_heavy_walk](#anim_and_audio_for_heavy_walk)
+ - [anim_and_audio_for_hold_walk](#anim_and_audio_for_hold_walk)
+ - [anim_and_audio_for_walk](#anim_and_audio_for_walk)
+ - [apply_landing_accel](#apply_landing_accel)
+ - [apply_slope_accel](#apply_slope_accel)
+ - [apply_slope_decel](#apply_slope_decel)
+ - [begin_braking_action](#begin_braking_action)
+ - [begin_walking_action](#begin_walking_action)
+ - [check_common_moving_cancels](#check_common_moving_cancels)
+ - [check_ground_dive_or_punch](#check_ground_dive_or_punch)
+ - [check_ledge_climb_down](#check_ledge_climb_down)
+ - [common_ground_knockback_action](#common_ground_knockback_action)
+ - [common_landing_action](#common_landing_action)
+ - [common_slide_action](#common_slide_action)
+ - [common_slide_action_with_jump](#common_slide_action_with_jump)
+ - [mario_execute_moving_action](#mario_execute_moving_action)
+ - [play_step_sound](#play_step_sound)
+ - [push_or_sidle_wall](#push_or_sidle_wall)
+ - [quicksand_jump_land_action](#quicksand_jump_land_action)
+ - [set_triple_jump_action](#set_triple_jump_action)
+ - [should_begin_sliding](#should_begin_sliding)
+ - [slide_bonk](#slide_bonk)
+ - [stomach_slide_action](#stomach_slide_action)
+ - [tilt_body_butt_slide](#tilt_body_butt_slide)
+ - [tilt_body_ground_shell](#tilt_body_ground_shell)
+ - [tilt_body_running](#tilt_body_running)
+ - [tilt_body_walking](#tilt_body_walking)
+ - [update_decelerating_speed](#update_decelerating_speed)
+ - [update_shell_speed](#update_shell_speed)
+ - [update_sliding](#update_sliding)
+ - [update_sliding_angle](#update_sliding_angle)
+ - [update_walking_speed](#update_walking_speed)
+
+
+
+- mario_actions_object.c
+ - [animated_stationary_ground_step](#animated_stationary_ground_step)
+ - [check_common_object_cancels](#check_common_object_cancels)
+ - [mario_execute_object_action](#mario_execute_object_action)
+ - [mario_update_punch_sequence](#mario_update_punch_sequence)
+
+
+
+- mario_actions_stationary.c
+ - [check_common_hold_idle_cancels](#check_common_hold_idle_cancels)
+ - [check_common_idle_cancels](#check_common_idle_cancels)
+ - [check_common_landing_cancels](#check_common_landing_cancels)
+ - [check_common_stationary_cancels](#check_common_stationary_cancels)
+ - [landing_step](#landing_step)
+ - [mario_execute_stationary_action](#mario_execute_stationary_action)
+ - [play_anim_sound](#play_anim_sound)
+ - [stopping_step](#stopping_step)
+
+
+
+- mario_actions_submerged.c
+ - [apply_water_current](#apply_water_current)
+ - [float_surface_gfx](#float_surface_gfx)
+ - [mario_execute_submerged_action](#mario_execute_submerged_action)
+ - [perform_water_full_step](#perform_water_full_step)
+ - [perform_water_step](#perform_water_step)
+ - [set_swimming_at_surface_particles](#set_swimming_at_surface_particles)
+
+
+
+- mario_step.h
+ - [get_additive_y_vel_for_jumps](#get_additive_y_vel_for_jumps)
+ - [mario_bonk_reflection](#mario_bonk_reflection)
+ - [mario_push_off_steep_floor](#mario_push_off_steep_floor)
+ - [mario_update_moving_sand](#mario_update_moving_sand)
+ - [mario_update_quicksand](#mario_update_quicksand)
+ - [mario_update_windy_ground](#mario_update_windy_ground)
+ - [perform_air_step](#perform_air_step)
+ - [perform_ground_step](#perform_ground_step)
+ - [set_vel_from_pitch_and_yaw](#set_vel_from_pitch_and_yaw)
+ - [stationary_ground_step](#stationary_ground_step)
+ - [stop_and_set_height_to_floor](#stop_and_set_height_to_floor)
+
+
+
+- surface_collision.h
+ - [f32_find_wall_collision](#f32_find_wall_collision)
+ - [find_ceil](#find_ceil)
+ - [find_floor](#find_floor)
+ - [find_floor_height](#find_floor_height)
+ - [find_floor_height_and_data](#find_floor_height_and_data)
+ - [find_poison_gas_level](#find_poison_gas_level)
+ - [find_surface_on_ray](#find_surface_on_ray)
+ - [find_wall_collisions](#find_wall_collisions)
+ - [find_water_level](#find_water_level)
+
+
+
+- thread6.c
+ - [queue_rumble_data](#queue_rumble_data)
+ - [queue_rumble_data_mario](#queue_rumble_data_mario)
+ - [queue_rumble_data_object](#queue_rumble_data_object)
+
+
+
+
+---
+# functions from camera.h
+
+
+
+
+## [set_camera_shake_from_hit](#set_camera_shake_from_hit)
+
+### Lua Example
+`set_camera_shake_from_hit(shake)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| shake | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void set_camera_shake_from_hit(s16 shake);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_camera_shake_from_point](#set_camera_shake_from_point)
+
+### Lua Example
+`set_camera_shake_from_point(shake, posX, posY, posZ)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| shake | integer |
+| posX | number |
+| posY | number |
+| posZ | number |
+
+### Returns
+- None
+
+### C Prototype
+`void set_camera_shake_from_point(s16 shake, f32 posX, f32 posY, f32 posZ);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_environmental_camera_shake](#set_environmental_camera_shake)
+
+### Lua Example
+`set_environmental_camera_shake(shake)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| shake | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void set_environmental_camera_shake(s16 shake);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from characters.h
+
+
+
+
+## [get_character](#get_character)
+
+### Lua Example
+`local CharacterValue = get_character(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+[Character](structs.md#Character)
+
+### C Prototype
+`struct Character* get_character(struct MarioState* m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [get_character_anim_offset](#get_character_anim_offset)
+
+### Lua Example
+`local numberValue = get_character_anim_offset(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- number
+
+### C Prototype
+`f32 get_character_anim_offset(struct MarioState* m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_character_sound](#play_character_sound)
+
+### Lua Example
+`play_character_sound(m, characterSound)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| characterSound | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_character_sound(struct MarioState* m, enum CharacterSound characterSound);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_character_sound_if_no_flag](#play_character_sound_if_no_flag)
+
+### Lua Example
+`play_character_sound_if_no_flag(m, characterSound, flags)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| characterSound | integer |
+| flags | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_character_sound_if_no_flag(struct MarioState* m, enum CharacterSound characterSound, u32 flags);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_character_sound_offset](#play_character_sound_offset)
+
+### Lua Example
+`play_character_sound_offset(m, characterSound, offset)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| characterSound | integer |
+| offset | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_character_sound_offset(struct MarioState* m, enum CharacterSound characterSound, u32 offset);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_character_anim_offset](#update_character_anim_offset)
+
+### Lua Example
+`update_character_anim_offset(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_character_anim_offset(struct MarioState* m);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from external.h
+
+
+
+
+## [play_sound](#play_sound)
+
+### Lua Example
+`play_sound(soundBits, pos)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| soundBits | integer |
+| pos | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- None
+
+### C Prototype
+`void play_sound(s32 soundBits, Vec3f pos);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from mario.h
+
+
+
+
+## [adjust_sound_for_speed](#adjust_sound_for_speed)
+
+### Lua Example
+`adjust_sound_for_speed(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void adjust_sound_for_speed(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_common_action_exits](#check_common_action_exits)
+
+### Lua Example
+`local integerValue = check_common_action_exits(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_common_action_exits(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_common_hold_action_exits](#check_common_hold_action_exits)
+
+### Lua Example
+`local integerValue = check_common_hold_action_exits(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_common_hold_action_exits(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [drop_and_set_mario_action](#drop_and_set_mario_action)
+
+### Lua Example
+`local integerValue = drop_and_set_mario_action(m, action, actionArg)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| action | integer |
+| actionArg | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 drop_and_set_mario_action(struct MarioState *m, u32 action, u32 actionArg);`
+
+[:arrow_up_small:](#)
+
+
+
+## [execute_mario_action](#execute_mario_action)
+
+### Lua Example
+`local integerValue = execute_mario_action(o)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| o | [Object](structs.md#Object) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 execute_mario_action(UNUSED struct Object *o);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_floor_height_relative_polar](#find_floor_height_relative_polar)
+
+### Lua Example
+`local numberValue = find_floor_height_relative_polar(m, angleFromMario, distFromMario)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| angleFromMario | integer |
+| distFromMario | number |
+
+### Returns
+- number
+
+### C Prototype
+`f32 find_floor_height_relative_polar(struct MarioState *m, s16 angleFromMario, f32 distFromMario);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_floor_slope](#find_floor_slope)
+
+### Lua Example
+`local integerValue = find_floor_slope(m, yawOffset)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| yawOffset | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s16 find_floor_slope(struct MarioState *m, s16 yawOffset);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_mario_anim_flags_and_translation](#find_mario_anim_flags_and_translation)
+
+### Lua Example
+`local integerValue = find_mario_anim_flags_and_translation(o, yaw, translation)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| o | [Object](structs.md#Object) |
+| yaw | integer |
+| translation | [Vec3s](structs.md#Vec3s) |
+
+### Returns
+- integer
+
+### C Prototype
+`s16 find_mario_anim_flags_and_translation(struct Object *o, s32 yaw, Vec3s translation);`
+
+[:arrow_up_small:](#)
+
+
+
+## [force_idle_state](#force_idle_state)
+
+### Lua Example
+`local integerValue = force_idle_state(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 force_idle_state(struct MarioState* m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [hurt_and_set_mario_action](#hurt_and_set_mario_action)
+
+### Lua Example
+`local integerValue = hurt_and_set_mario_action(m, action, actionArg, hurtCounter)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| action | integer |
+| actionArg | integer |
+| hurtCounter | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 hurt_and_set_mario_action(struct MarioState *m, u32 action, u32 actionArg, s16 hurtCounter);`
+
+[:arrow_up_small:](#)
+
+
+
+## [is_anim_at_end](#is_anim_at_end)
+
+### Lua Example
+`local integerValue = is_anim_at_end(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 is_anim_at_end(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [is_anim_past_end](#is_anim_past_end)
+
+### Lua Example
+`local integerValue = is_anim_past_end(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 is_anim_past_end(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [is_anim_past_frame](#is_anim_past_frame)
+
+### Lua Example
+`local integerValue = is_anim_past_frame(m, animFrame)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| animFrame | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 is_anim_past_frame(struct MarioState *m, s16 animFrame);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_facing_downhill](#mario_facing_downhill)
+
+### Lua Example
+`local integerValue = mario_facing_downhill(m, turnYaw)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| turnYaw | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_facing_downhill(struct MarioState *m, s32 turnYaw);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_floor_is_slippery](#mario_floor_is_slippery)
+
+### Lua Example
+`local integerValue = mario_floor_is_slippery(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 mario_floor_is_slippery(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_floor_is_slope](#mario_floor_is_slope)
+
+### Lua Example
+`local integerValue = mario_floor_is_slope(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_floor_is_slope(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_floor_is_steep](#mario_floor_is_steep)
+
+### Lua Example
+`local integerValue = mario_floor_is_steep(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_floor_is_steep(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_get_floor_class](#mario_get_floor_class)
+
+### Lua Example
+`local integerValue = mario_get_floor_class(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_get_floor_class(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_get_terrain_sound_addend](#mario_get_terrain_sound_addend)
+
+### Lua Example
+`local integerValue = mario_get_terrain_sound_addend(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 mario_get_terrain_sound_addend(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_set_bubbled](#mario_set_bubbled)
+
+### Lua Example
+`mario_set_bubbled(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void mario_set_bubbled(struct MarioState* m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_set_forward_vel](#mario_set_forward_vel)
+
+### Lua Example
+`mario_set_forward_vel(m, speed)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| speed | number |
+
+### Returns
+- None
+
+### C Prototype
+`void mario_set_forward_vel(struct MarioState *m, f32 speed);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_mario_action_sound](#play_mario_action_sound)
+
+### Lua Example
+`play_mario_action_sound(m, soundBits, waveParticleType)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| soundBits | integer |
+| waveParticleType | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_mario_action_sound(struct MarioState *m, u32 soundBits, u32 waveParticleType);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_mario_heavy_landing_sound](#play_mario_heavy_landing_sound)
+
+### Lua Example
+`play_mario_heavy_landing_sound(m, soundBits)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| soundBits | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_mario_heavy_landing_sound(struct MarioState *m, u32 soundBits);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_mario_heavy_landing_sound_once](#play_mario_heavy_landing_sound_once)
+
+### Lua Example
+`play_mario_heavy_landing_sound_once(m, soundBits)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| soundBits | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_mario_heavy_landing_sound_once(struct MarioState *m, u32 soundBits);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_mario_jump_sound](#play_mario_jump_sound)
+
+### Lua Example
+`play_mario_jump_sound(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void play_mario_jump_sound(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_mario_landing_sound](#play_mario_landing_sound)
+
+### Lua Example
+`play_mario_landing_sound(m, soundBits)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| soundBits | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_mario_landing_sound(struct MarioState *m, u32 soundBits);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_mario_landing_sound_once](#play_mario_landing_sound_once)
+
+### Lua Example
+`play_mario_landing_sound_once(m, soundBits)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| soundBits | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_mario_landing_sound_once(struct MarioState *m, u32 soundBits);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_mario_sound](#play_mario_sound)
+
+### Lua Example
+`play_mario_sound(m, primarySoundBits, scondarySoundBits)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| primarySoundBits | integer |
+| scondarySoundBits | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_mario_sound(struct MarioState *m, s32 primarySoundBits, s32 scondarySoundBits);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_sound_and_spawn_particles](#play_sound_and_spawn_particles)
+
+### Lua Example
+`play_sound_and_spawn_particles(m, soundBits, waveParticleType)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| soundBits | integer |
+| waveParticleType | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_sound_and_spawn_particles(struct MarioState *m, u32 soundBits, u32 waveParticleType);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_sound_if_no_flag](#play_sound_if_no_flag)
+
+### Lua Example
+`play_sound_if_no_flag(m, soundBits, flags)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| soundBits | integer |
+| flags | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_sound_if_no_flag(struct MarioState *m, u32 soundBits, u32 flags);`
+
+[:arrow_up_small:](#)
+
+
+
+## [resolve_and_return_wall_collisions](#resolve_and_return_wall_collisions)
+
+### Lua Example
+`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:](#)
+
+
+
+## [return_mario_anim_y_translation](#return_mario_anim_y_translation)
+
+### Lua Example
+`local integerValue = return_mario_anim_y_translation(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s16 return_mario_anim_y_translation(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_anim_to_frame](#set_anim_to_frame)
+
+### Lua Example
+`set_anim_to_frame(m, animFrame)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| animFrame | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void set_anim_to_frame(struct MarioState *m, s16 animFrame);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_jump_from_landing](#set_jump_from_landing)
+
+### Lua Example
+`local integerValue = set_jump_from_landing(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 set_jump_from_landing(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_jumping_action](#set_jumping_action)
+
+### Lua Example
+`local integerValue = set_jumping_action(m, action, actionArg)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| action | integer |
+| actionArg | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 set_jumping_action(struct MarioState *m, u32 action, u32 actionArg);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_mario_action](#set_mario_action)
+
+### Lua Example
+`local integerValue = set_mario_action(m, action, actionArg)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| action | integer |
+| actionArg | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 set_mario_action(struct MarioState *m, u32 action, u32 actionArg);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_mario_anim_with_accel](#set_mario_anim_with_accel)
+
+### Lua Example
+`local integerValue = set_mario_anim_with_accel(m, targetAnimID, accel)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| targetAnimID | integer |
+| accel | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s16 set_mario_anim_with_accel(struct MarioState *m, s32 targetAnimID, s32 accel);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_mario_animation](#set_mario_animation)
+
+### Lua Example
+`local integerValue = set_mario_animation(m, targetAnimID)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| targetAnimID | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s16 set_mario_animation(struct MarioState *m, s32 targetAnimID);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_steep_jump_action](#set_steep_jump_action)
+
+### Lua Example
+`set_steep_jump_action(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void set_steep_jump_action(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_water_plunge_action](#set_water_plunge_action)
+
+### Lua Example
+`local integerValue = set_water_plunge_action(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 set_water_plunge_action(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [transition_submerged_to_walking](#transition_submerged_to_walking)
+
+### Lua Example
+`local integerValue = transition_submerged_to_walking(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 transition_submerged_to_walking(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_mario_pos_for_anim](#update_mario_pos_for_anim)
+
+### Lua Example
+`update_mario_pos_for_anim(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_mario_pos_for_anim(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_mario_sound_and_camera](#update_mario_sound_and_camera)
+
+### Lua Example
+`update_mario_sound_and_camera(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_mario_sound_and_camera(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [vec3f_find_ceil](#vec3f_find_ceil)
+
+### Lua Example
+`local numberValue = vec3f_find_ceil(pos, height, ceil)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| pos | [Vec3f](structs.md#Vec3f) |
+| height | number |
+| ceil | [Surface](structs.md#Surface) |
+
+### Returns
+- number
+
+### C Prototype
+`f32 vec3f_find_ceil(Vec3f pos, f32 height, struct Surface **ceil);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from mario_actions_airborne.c
+
+
+
+
+## [act_air_hit_wall](#act_air_hit_wall)
+
+### Lua Example
+`local integerValue = act_air_hit_wall(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_air_hit_wall(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_air_throw](#act_air_throw)
+
+### Lua Example
+`local integerValue = act_air_throw(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_air_throw(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_backflip](#act_backflip)
+
+### Lua Example
+`local integerValue = act_backflip(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_backflip(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_backward_air_kb](#act_backward_air_kb)
+
+### Lua Example
+`local integerValue = act_backward_air_kb(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_backward_air_kb(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_backward_rollout](#act_backward_rollout)
+
+### Lua Example
+`local integerValue = act_backward_rollout(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_backward_rollout(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_burning_fall](#act_burning_fall)
+
+### Lua Example
+`local integerValue = act_burning_fall(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_burning_fall(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_burning_jump](#act_burning_jump)
+
+### Lua Example
+`local integerValue = act_burning_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_burning_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_butt_slide_air](#act_butt_slide_air)
+
+### Lua Example
+`local integerValue = act_butt_slide_air(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_butt_slide_air(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_crazy_box_bounce](#act_crazy_box_bounce)
+
+### Lua Example
+`local integerValue = act_crazy_box_bounce(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_crazy_box_bounce(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_dive](#act_dive)
+
+### Lua Example
+`local integerValue = act_dive(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_dive(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_double_jump](#act_double_jump)
+
+### Lua Example
+`local integerValue = act_double_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_double_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_flying](#act_flying)
+
+### Lua Example
+`local integerValue = act_flying(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_flying(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_flying_triple_jump](#act_flying_triple_jump)
+
+### Lua Example
+`local integerValue = act_flying_triple_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_flying_triple_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_forward_air_kb](#act_forward_air_kb)
+
+### Lua Example
+`local integerValue = act_forward_air_kb(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_forward_air_kb(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_forward_rollout](#act_forward_rollout)
+
+### Lua Example
+`local integerValue = act_forward_rollout(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_forward_rollout(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_freefall](#act_freefall)
+
+### Lua Example
+`local integerValue = act_freefall(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_freefall(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_getting_blown](#act_getting_blown)
+
+### Lua Example
+`local integerValue = act_getting_blown(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_getting_blown(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_ground_pound](#act_ground_pound)
+
+### Lua Example
+`local integerValue = act_ground_pound(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_ground_pound(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_hard_backward_air_kb](#act_hard_backward_air_kb)
+
+### Lua Example
+`local integerValue = act_hard_backward_air_kb(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_hard_backward_air_kb(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_hard_forward_air_kb](#act_hard_forward_air_kb)
+
+### Lua Example
+`local integerValue = act_hard_forward_air_kb(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_hard_forward_air_kb(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_hold_butt_slide_air](#act_hold_butt_slide_air)
+
+### Lua Example
+`local integerValue = act_hold_butt_slide_air(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_hold_butt_slide_air(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_hold_freefall](#act_hold_freefall)
+
+### Lua Example
+`local integerValue = act_hold_freefall(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_hold_freefall(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_hold_jump](#act_hold_jump)
+
+### Lua Example
+`local integerValue = act_hold_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_hold_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_hold_water_jump](#act_hold_water_jump)
+
+### Lua Example
+`local integerValue = act_hold_water_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_hold_water_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_jump](#act_jump)
+
+### Lua Example
+`local integerValue = act_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_jump_kick](#act_jump_kick)
+
+### Lua Example
+`local integerValue = act_jump_kick(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_jump_kick(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_lava_boost](#act_lava_boost)
+
+### Lua Example
+`local integerValue = act_lava_boost(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_lava_boost(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_long_jump](#act_long_jump)
+
+### Lua Example
+`local integerValue = act_long_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_long_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_riding_hoot](#act_riding_hoot)
+
+### Lua Example
+`local integerValue = act_riding_hoot(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_riding_hoot(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_riding_shell_air](#act_riding_shell_air)
+
+### Lua Example
+`local integerValue = act_riding_shell_air(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_riding_shell_air(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_shot_from_cannon](#act_shot_from_cannon)
+
+### Lua Example
+`local integerValue = act_shot_from_cannon(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_shot_from_cannon(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_side_flip](#act_side_flip)
+
+### Lua Example
+`local integerValue = act_side_flip(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_side_flip(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_slide_kick](#act_slide_kick)
+
+### Lua Example
+`local integerValue = act_slide_kick(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_slide_kick(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_soft_bonk](#act_soft_bonk)
+
+### Lua Example
+`local integerValue = act_soft_bonk(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_soft_bonk(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_special_triple_jump](#act_special_triple_jump)
+
+### Lua Example
+`local integerValue = act_special_triple_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_special_triple_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_steep_jump](#act_steep_jump)
+
+### Lua Example
+`local integerValue = act_steep_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_steep_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_thrown_backward](#act_thrown_backward)
+
+### Lua Example
+`local integerValue = act_thrown_backward(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_thrown_backward(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_thrown_forward](#act_thrown_forward)
+
+### Lua Example
+`local integerValue = act_thrown_forward(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_thrown_forward(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_top_of_pole_jump](#act_top_of_pole_jump)
+
+### Lua Example
+`local integerValue = act_top_of_pole_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_top_of_pole_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_triple_jump](#act_triple_jump)
+
+### Lua Example
+`local integerValue = act_triple_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_triple_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_twirling](#act_twirling)
+
+### Lua Example
+`local integerValue = act_twirling(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_twirling(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_vertical_wind](#act_vertical_wind)
+
+### Lua Example
+`local integerValue = act_vertical_wind(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_vertical_wind(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_wall_kick_air](#act_wall_kick_air)
+
+### Lua Example
+`local integerValue = act_wall_kick_air(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_wall_kick_air(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_water_jump](#act_water_jump)
+
+### Lua Example
+`local integerValue = act_water_jump(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_water_jump(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_common_airborne_cancels](#check_common_airborne_cancels)
+
+### Lua Example
+`local integerValue = check_common_airborne_cancels(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_common_airborne_cancels(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_fall_damage](#check_fall_damage)
+
+### Lua Example
+`local integerValue = check_fall_damage(m, hardFallAction)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| hardFallAction | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_fall_damage(struct MarioState *m, u32 hardFallAction);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_fall_damage_or_get_stuck](#check_fall_damage_or_get_stuck)
+
+### Lua Example
+`local integerValue = check_fall_damage_or_get_stuck(m, hardFallAction)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| hardFallAction | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_fall_damage_or_get_stuck(struct MarioState *m, u32 hardFallAction);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_horizontal_wind](#check_horizontal_wind)
+
+### Lua Example
+`local integerValue = check_horizontal_wind(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_horizontal_wind(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_kick_or_dive_in_air](#check_kick_or_dive_in_air)
+
+### Lua Example
+`local integerValue = check_kick_or_dive_in_air(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_kick_or_dive_in_air(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_wall_kick](#check_wall_kick)
+
+### Lua Example
+`local integerValue = check_wall_kick(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_wall_kick(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [common_air_action_step](#common_air_action_step)
+
+### Lua Example
+`local integerValue = common_air_action_step(m, landAction, animation, stepArg)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| landAction | integer |
+| animation | integer |
+| stepArg | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 common_air_action_step(struct MarioState *m, u32 landAction, s32 animation, u32 stepArg);`
+
+[:arrow_up_small:](#)
+
+
+
+## [common_air_knockback_step](#common_air_knockback_step)
+
+### Lua Example
+`local integerValue = common_air_knockback_step(m, landAction, hardFallAction, animation, speed)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| landAction | integer |
+| hardFallAction | integer |
+| animation | integer |
+| speed | number |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 common_air_knockback_step(struct MarioState *m, u32 landAction, u32 hardFallAction, s32 animation, f32 speed);`
+
+[:arrow_up_small:](#)
+
+
+
+## [lava_boost_on_wall](#lava_boost_on_wall)
+
+### Lua Example
+`local integerValue = lava_boost_on_wall(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 lava_boost_on_wall(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_execute_airborne_action](#mario_execute_airborne_action)
+
+### Lua Example
+`local integerValue = mario_execute_airborne_action(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_execute_airborne_action(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_far_fall_sound](#play_far_fall_sound)
+
+### Lua Example
+`play_far_fall_sound(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void play_far_fall_sound(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_flip_sounds](#play_flip_sounds)
+
+### Lua Example
+`play_flip_sounds(m, frame1, frame2, frame3)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| frame1 | integer |
+| frame2 | integer |
+| frame3 | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_knockback_sound](#play_knockback_sound)
+
+### Lua Example
+`play_knockback_sound(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void play_knockback_sound(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [should_get_stuck_in_ground](#should_get_stuck_in_ground)
+
+### Lua Example
+`local integerValue = should_get_stuck_in_ground(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 should_get_stuck_in_ground(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_air_with_turn](#update_air_with_turn)
+
+### Lua Example
+`update_air_with_turn(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_air_with_turn(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_air_without_turn](#update_air_without_turn)
+
+### Lua Example
+`update_air_without_turn(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_air_without_turn(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_flying](#update_flying)
+
+### Lua Example
+`update_flying(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_flying(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_flying_pitch](#update_flying_pitch)
+
+### Lua Example
+`update_flying_pitch(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_flying_pitch(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_flying_yaw](#update_flying_yaw)
+
+### Lua Example
+`update_flying_yaw(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_flying_yaw(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_lava_boost_or_twirling](#update_lava_boost_or_twirling)
+
+### Lua Example
+`update_lava_boost_or_twirling(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_lava_boost_or_twirling(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from mario_actions_automatic.c
+
+
+
+
+## [act_bubbled](#act_bubbled)
+
+### Lua Example
+`local integerValue = act_bubbled(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_bubbled(struct MarioState* m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_climbing_pole](#act_climbing_pole)
+
+### Lua Example
+`local integerValue = act_climbing_pole(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_climbing_pole(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_grab_pole_fast](#act_grab_pole_fast)
+
+### Lua Example
+`local integerValue = act_grab_pole_fast(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_grab_pole_fast(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_grab_pole_slow](#act_grab_pole_slow)
+
+### Lua Example
+`local integerValue = act_grab_pole_slow(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_grab_pole_slow(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_grabbed](#act_grabbed)
+
+### Lua Example
+`local integerValue = act_grabbed(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_grabbed(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_hang_moving](#act_hang_moving)
+
+### Lua Example
+`local integerValue = act_hang_moving(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_hang_moving(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_hanging](#act_hanging)
+
+### Lua Example
+`local integerValue = act_hanging(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_hanging(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_holding_pole](#act_holding_pole)
+
+### Lua Example
+`local integerValue = act_holding_pole(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_holding_pole(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_in_cannon](#act_in_cannon)
+
+### Lua Example
+`local integerValue = act_in_cannon(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_in_cannon(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_ledge_climb_down](#act_ledge_climb_down)
+
+### Lua Example
+`local integerValue = act_ledge_climb_down(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_ledge_climb_down(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_ledge_climb_fast](#act_ledge_climb_fast)
+
+### Lua Example
+`local integerValue = act_ledge_climb_fast(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_ledge_climb_fast(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_ledge_climb_slow](#act_ledge_climb_slow)
+
+### Lua Example
+`local integerValue = act_ledge_climb_slow(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_ledge_climb_slow(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_ledge_grab](#act_ledge_grab)
+
+### Lua Example
+`local integerValue = act_ledge_grab(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_ledge_grab(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_start_hanging](#act_start_hanging)
+
+### Lua Example
+`local integerValue = act_start_hanging(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_start_hanging(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_top_of_pole](#act_top_of_pole)
+
+### Lua Example
+`local integerValue = act_top_of_pole(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_top_of_pole(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_top_of_pole_transition](#act_top_of_pole_transition)
+
+### Lua Example
+`local integerValue = act_top_of_pole_transition(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_top_of_pole_transition(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [act_tornado_twirling](#act_tornado_twirling)
+
+### Lua Example
+`local integerValue = act_tornado_twirling(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 act_tornado_twirling(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [add_tree_leaf_particles](#add_tree_leaf_particles)
+
+### Lua Example
+`add_tree_leaf_particles(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void add_tree_leaf_particles(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_common_automatic_cancels](#check_common_automatic_cancels)
+
+### Lua Example
+`local integerValue = check_common_automatic_cancels(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_common_automatic_cancels(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [climb_up_ledge](#climb_up_ledge)
+
+### Lua Example
+`climb_up_ledge(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void climb_up_ledge(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [let_go_of_ledge](#let_go_of_ledge)
+
+### Lua Example
+`local integerValue = let_go_of_ledge(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 let_go_of_ledge(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_execute_automatic_action](#mario_execute_automatic_action)
+
+### Lua Example
+`local integerValue = mario_execute_automatic_action(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_execute_automatic_action(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [perform_hanging_step](#perform_hanging_step)
+
+### Lua Example
+`local integerValue = perform_hanging_step(m, nextPos)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| nextPos | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_climbing_sounds](#play_climbing_sounds)
+
+### Lua Example
+`play_climbing_sounds(m, b)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| b | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_climbing_sounds(struct MarioState *m, s32 b);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_pole_position](#set_pole_position)
+
+### Lua Example
+`local integerValue = set_pole_position(m, offsetY)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| offsetY | number |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 set_pole_position(struct MarioState *m, f32 offsetY);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_hang_moving](#update_hang_moving)
+
+### Lua Example
+`local integerValue = update_hang_moving(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 update_hang_moving(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_hang_stationary](#update_hang_stationary)
+
+### Lua Example
+`update_hang_stationary(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_hang_stationary(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_ledge_climb](#update_ledge_climb)
+
+### Lua Example
+`update_ledge_climb(m, animation, endAction)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| animation | integer |
+| endAction | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void update_ledge_climb(struct MarioState *m, s32 animation, u32 endAction);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_ledge_climb_camera](#update_ledge_climb_camera)
+
+### Lua Example
+`update_ledge_climb_camera(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_ledge_climb_camera(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from mario_actions_cutscene.c
+
+
+
+
+## [bhv_end_peach_loop](#bhv_end_peach_loop)
+
+### Lua Example
+`bhv_end_peach_loop()`
+
+### Parameters
+- None
+
+### Returns
+- None
+
+### C Prototype
+`void bhv_end_peach_loop(void);`
+
+[:arrow_up_small:](#)
+
+
+
+## [bhv_end_toad_loop](#bhv_end_toad_loop)
+
+### Lua Example
+`bhv_end_toad_loop()`
+
+### Parameters
+- None
+
+### Returns
+- None
+
+### C Prototype
+`void bhv_end_toad_loop(void);`
+
+[:arrow_up_small:](#)
+
+
+
+## [cutscene_put_cap_on](#cutscene_put_cap_on)
+
+### Lua Example
+`cutscene_put_cap_on(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void cutscene_put_cap_on(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [cutscene_take_cap_off](#cutscene_take_cap_off)
+
+### Lua Example
+`cutscene_take_cap_off(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void cutscene_take_cap_off(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [general_star_dance_handler](#general_star_dance_handler)
+
+### Lua Example
+`general_star_dance_handler(m, isInWater)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| isInWater | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void general_star_dance_handler(struct MarioState *m, s32 isInWater);`
+
+[:arrow_up_small:](#)
+
+
+
+## [generate_yellow_sparkles](#generate_yellow_sparkles)
+
+### Lua Example
+`generate_yellow_sparkles(x, y, z, radius)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| x | integer |
+| y | integer |
+| z | integer |
+| radius | number |
+
+### Returns
+- None
+
+### C Prototype
+`void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius);`
+
+[:arrow_up_small:](#)
+
+
+
+## [handle_save_menu](#handle_save_menu)
+
+### Lua Example
+`handle_save_menu(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void handle_save_menu(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [print_displaying_credits_entry](#print_displaying_credits_entry)
+
+### Lua Example
+`print_displaying_credits_entry()`
+
+### Parameters
+- None
+
+### Returns
+- None
+
+### C Prototype
+`void print_displaying_credits_entry(void);`
+
+[:arrow_up_small:](#)
+
+
+
+## [should_start_or_continue_dialog](#should_start_or_continue_dialog)
+
+### Lua Example
+`local integerValue = should_start_or_continue_dialog(m, object)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| object | [Object](structs.md#Object) |
+
+### Returns
+- integer
+
+### C Prototype
+`u8 should_start_or_continue_dialog(struct MarioState* m, struct Object* object);`
+
+[:arrow_up_small:](#)
+
+
+
+## [spawn_obj_at_mario_rel_yaw](#spawn_obj_at_mario_rel_yaw)
+
+### Lua Example
+`local ObjectValue = spawn_obj_at_mario_rel_yaw(m, model, behavior, relYaw)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| model | integer |
+| behavior | BehaviorScript * |
+| relYaw | integer |
+
+### Returns
+[Object](structs.md#Object)
+
+### C Prototype
+`struct Object *spawn_obj_at_mario_rel_yaw(struct MarioState *m, s32 model, BehaviorScript *behavior, s16 relYaw);`
+
+[:arrow_up_small:](#)
+
+
+
+## [stuck_in_ground_handler](#stuck_in_ground_handler)
+
+### Lua Example
+`stuck_in_ground_handler(m, animation, unstuckFrame, target2, target3, endAction)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| animation | integer |
+| unstuckFrame | integer |
+| target2 | integer |
+| target3 | integer |
+| endAction | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void stuck_in_ground_handler(struct MarioState *m, s32 animation, s32 unstuckFrame, s32 target2, s32 target3, s32 endAction);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from mario_actions_moving.c
+
+
+
+
+## [align_with_floor](#align_with_floor)
+
+### Lua Example
+`align_with_floor(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void align_with_floor(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [analog_stick_held_back](#analog_stick_held_back)
+
+### Lua Example
+`local integerValue = analog_stick_held_back(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 analog_stick_held_back(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [anim_and_audio_for_heavy_walk](#anim_and_audio_for_heavy_walk)
+
+### Lua Example
+`anim_and_audio_for_heavy_walk(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void anim_and_audio_for_heavy_walk(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [anim_and_audio_for_hold_walk](#anim_and_audio_for_hold_walk)
+
+### Lua Example
+`anim_and_audio_for_hold_walk(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void anim_and_audio_for_hold_walk(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [anim_and_audio_for_walk](#anim_and_audio_for_walk)
+
+### Lua Example
+`anim_and_audio_for_walk(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void anim_and_audio_for_walk(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [apply_landing_accel](#apply_landing_accel)
+
+### Lua Example
+`local integerValue = apply_landing_accel(m, frictionFactor)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| frictionFactor | number |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 apply_landing_accel(struct MarioState *m, f32 frictionFactor);`
+
+[:arrow_up_small:](#)
+
+
+
+## [apply_slope_accel](#apply_slope_accel)
+
+### Lua Example
+`apply_slope_accel(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void apply_slope_accel(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [apply_slope_decel](#apply_slope_decel)
+
+### Lua Example
+`local integerValue = apply_slope_decel(m, decelCoef)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| decelCoef | number |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 apply_slope_decel(struct MarioState *m, f32 decelCoef);`
+
+[:arrow_up_small:](#)
+
+
+
+## [begin_braking_action](#begin_braking_action)
+
+### Lua Example
+`local integerValue = begin_braking_action(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 begin_braking_action(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [begin_walking_action](#begin_walking_action)
+
+### Lua Example
+`local integerValue = begin_walking_action(m, forwardVel, action, actionArg)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| forwardVel | number |
+| action | integer |
+| actionArg | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 begin_walking_action(struct MarioState *m, f32 forwardVel, u32 action, u32 actionArg);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_common_moving_cancels](#check_common_moving_cancels)
+
+### Lua Example
+`local integerValue = check_common_moving_cancels(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_common_moving_cancels(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_ground_dive_or_punch](#check_ground_dive_or_punch)
+
+### Lua Example
+`local integerValue = check_ground_dive_or_punch(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_ground_dive_or_punch(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_ledge_climb_down](#check_ledge_climb_down)
+
+### Lua Example
+`check_ledge_climb_down(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void check_ledge_climb_down(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [common_ground_knockback_action](#common_ground_knockback_action)
+
+### Lua Example
+`local integerValue = common_ground_knockback_action(m, animation, arg2, arg3, arg4)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| animation | integer |
+| arg2 | integer |
+| arg3 | integer |
+| arg4 | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 common_ground_knockback_action(struct MarioState *m, s32 animation, s32 arg2, s32 arg3, s32 arg4);`
+
+[:arrow_up_small:](#)
+
+
+
+## [common_landing_action](#common_landing_action)
+
+### Lua Example
+`local integerValue = common_landing_action(m, animation, airAction)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| animation | integer |
+| airAction | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 common_landing_action(struct MarioState *m, s16 animation, u32 airAction);`
+
+[:arrow_up_small:](#)
+
+
+
+## [common_slide_action](#common_slide_action)
+
+### Lua Example
+`common_slide_action(m, endAction, airAction, animation)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| endAction | integer |
+| airAction | integer |
+| animation | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void common_slide_action(struct MarioState *m, u32 endAction, u32 airAction, s32 animation);`
+
+[:arrow_up_small:](#)
+
+
+
+## [common_slide_action_with_jump](#common_slide_action_with_jump)
+
+### Lua Example
+`local integerValue = common_slide_action_with_jump(m, stopAction, jumpAction, airAction, animation)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| stopAction | integer |
+| jumpAction | integer |
+| airAction | integer |
+| animation | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 common_slide_action_with_jump(struct MarioState *m, u32 stopAction, u32 jumpAction, u32 airAction, s32 animation);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_execute_moving_action](#mario_execute_moving_action)
+
+### Lua Example
+`local integerValue = mario_execute_moving_action(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_execute_moving_action(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_step_sound](#play_step_sound)
+
+### Lua Example
+`play_step_sound(m, frame1, frame2)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| frame1 | integer |
+| frame2 | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_step_sound(struct MarioState *m, s16 frame1, s16 frame2);`
+
+[:arrow_up_small:](#)
+
+
+
+## [push_or_sidle_wall](#push_or_sidle_wall)
+
+### Lua Example
+`push_or_sidle_wall(m, startPos)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| startPos | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- None
+
+### C Prototype
+`void push_or_sidle_wall(struct MarioState *m, Vec3f startPos);`
+
+[:arrow_up_small:](#)
+
+
+
+## [quicksand_jump_land_action](#quicksand_jump_land_action)
+
+### Lua Example
+`local integerValue = quicksand_jump_land_action(m, animation1, animation2, endAction, airAction)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| animation1 | integer |
+| animation2 | integer |
+| endAction | integer |
+| airAction | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 quicksand_jump_land_action(struct MarioState *m, s32 animation1, s32 animation2, u32 endAction, u32 airAction);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_triple_jump_action](#set_triple_jump_action)
+
+### Lua Example
+`local integerValue = set_triple_jump_action(m, action, actionArg)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| action | integer |
+| actionArg | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 set_triple_jump_action(struct MarioState *m, UNUSED u32 action, UNUSED u32 actionArg);`
+
+[:arrow_up_small:](#)
+
+
+
+## [should_begin_sliding](#should_begin_sliding)
+
+### Lua Example
+`local integerValue = should_begin_sliding(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 should_begin_sliding(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [slide_bonk](#slide_bonk)
+
+### Lua Example
+`slide_bonk(m, fastAction, slowAction)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| fastAction | integer |
+| slowAction | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void slide_bonk(struct MarioState *m, u32 fastAction, u32 slowAction);`
+
+[:arrow_up_small:](#)
+
+
+
+## [stomach_slide_action](#stomach_slide_action)
+
+### Lua Example
+`local integerValue = stomach_slide_action(m, stopAction, airAction, animation)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| stopAction | integer |
+| airAction | integer |
+| animation | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 stomach_slide_action(struct MarioState *m, u32 stopAction, u32 airAction, s32 animation);`
+
+[:arrow_up_small:](#)
+
+
+
+## [tilt_body_butt_slide](#tilt_body_butt_slide)
+
+### Lua Example
+`tilt_body_butt_slide(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void tilt_body_butt_slide(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [tilt_body_ground_shell](#tilt_body_ground_shell)
+
+### Lua Example
+`tilt_body_ground_shell(m, startYaw)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| startYaw | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void tilt_body_ground_shell(struct MarioState *m, s16 startYaw);`
+
+[:arrow_up_small:](#)
+
+
+
+## [tilt_body_running](#tilt_body_running)
+
+### Lua Example
+`local integerValue = tilt_body_running(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s16 tilt_body_running(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [tilt_body_walking](#tilt_body_walking)
+
+### Lua Example
+`tilt_body_walking(m, startYaw)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| startYaw | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void tilt_body_walking(struct MarioState *m, s16 startYaw);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_decelerating_speed](#update_decelerating_speed)
+
+### Lua Example
+`local integerValue = update_decelerating_speed(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 update_decelerating_speed(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_shell_speed](#update_shell_speed)
+
+### Lua Example
+`update_shell_speed(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_shell_speed(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_sliding](#update_sliding)
+
+### Lua Example
+`local integerValue = update_sliding(m, stopSpeed)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| stopSpeed | number |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 update_sliding(struct MarioState *m, f32 stopSpeed);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_sliding_angle](#update_sliding_angle)
+
+### Lua Example
+`update_sliding_angle(m, accel, lossFactor)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| accel | number |
+| lossFactor | number |
+
+### Returns
+- None
+
+### C Prototype
+`void update_sliding_angle(struct MarioState *m, f32 accel, f32 lossFactor);`
+
+[:arrow_up_small:](#)
+
+
+
+## [update_walking_speed](#update_walking_speed)
+
+### Lua Example
+`update_walking_speed(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void update_walking_speed(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from mario_actions_object.c
+
+
+
+
+## [animated_stationary_ground_step](#animated_stationary_ground_step)
+
+### Lua Example
+`animated_stationary_ground_step(m, animation, endAction)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| animation | integer |
+| endAction | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void animated_stationary_ground_step(struct MarioState *m, s32 animation, u32 endAction);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_common_object_cancels](#check_common_object_cancels)
+
+### Lua Example
+`local integerValue = check_common_object_cancels(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_common_object_cancels(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_execute_object_action](#mario_execute_object_action)
+
+### Lua Example
+`local integerValue = mario_execute_object_action(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_execute_object_action(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_update_punch_sequence](#mario_update_punch_sequence)
+
+### Lua Example
+`local integerValue = mario_update_punch_sequence(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_update_punch_sequence(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from mario_actions_stationary.c
+
+
+
+
+## [check_common_hold_idle_cancels](#check_common_hold_idle_cancels)
+
+### Lua Example
+`local integerValue = check_common_hold_idle_cancels(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_common_hold_idle_cancels(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_common_idle_cancels](#check_common_idle_cancels)
+
+### Lua Example
+`local integerValue = check_common_idle_cancels(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_common_idle_cancels(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_common_landing_cancels](#check_common_landing_cancels)
+
+### Lua Example
+`local integerValue = check_common_landing_cancels(m, action)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| action | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_common_landing_cancels(struct MarioState *m, u32 action);`
+
+[:arrow_up_small:](#)
+
+
+
+## [check_common_stationary_cancels](#check_common_stationary_cancels)
+
+### Lua Example
+`local integerValue = check_common_stationary_cancels(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 check_common_stationary_cancels(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [landing_step](#landing_step)
+
+### Lua Example
+`local integerValue = landing_step(m, arg1, action)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| arg1 | integer |
+| action | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 landing_step(struct MarioState *m, s32 arg1, u32 action);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_execute_stationary_action](#mario_execute_stationary_action)
+
+### Lua Example
+`local integerValue = mario_execute_stationary_action(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_execute_stationary_action(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [play_anim_sound](#play_anim_sound)
+
+### Lua Example
+`play_anim_sound(m, actionState, animFrame, sound)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| actionState | integer |
+| animFrame | integer |
+| sound | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void play_anim_sound(struct MarioState *m, u32 actionState, s32 animFrame, u32 sound);`
+
+[:arrow_up_small:](#)
+
+
+
+## [stopping_step](#stopping_step)
+
+### Lua Example
+`stopping_step(m, animID, action)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| animID | integer |
+| action | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void stopping_step(struct MarioState *m, s32 animID, u32 action);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from mario_actions_submerged.c
+
+
+
+
+## [apply_water_current](#apply_water_current)
+
+### Lua Example
+`apply_water_current(m, step)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| step | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- None
+
+### C Prototype
+`void apply_water_current(struct MarioState *m, Vec3f step);`
+
+[:arrow_up_small:](#)
+
+
+
+## [float_surface_gfx](#float_surface_gfx)
+
+### Lua Example
+`float_surface_gfx(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void float_surface_gfx(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_execute_submerged_action](#mario_execute_submerged_action)
+
+### Lua Example
+`local integerValue = mario_execute_submerged_action(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 mario_execute_submerged_action(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [perform_water_full_step](#perform_water_full_step)
+
+### Lua Example
+`local integerValue = perform_water_full_step(m, nextPos)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| nextPos | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 perform_water_full_step(struct MarioState *m, Vec3f nextPos);`
+
+[:arrow_up_small:](#)
+
+
+
+## [perform_water_step](#perform_water_step)
+
+### Lua Example
+`local integerValue = perform_water_step(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 perform_water_step(struct MarioState *m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_swimming_at_surface_particles](#set_swimming_at_surface_particles)
+
+### Lua Example
+`set_swimming_at_surface_particles(m, particleFlag)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| particleFlag | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void set_swimming_at_surface_particles(struct MarioState *m, u32 particleFlag);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from mario_step.h
+
+
+
+
+## [get_additive_y_vel_for_jumps](#get_additive_y_vel_for_jumps)
+
+### Lua Example
+`local numberValue = get_additive_y_vel_for_jumps()`
+
+### Parameters
+- None
+
+### Returns
+- number
+
+### C Prototype
+`f32 get_additive_y_vel_for_jumps(void);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_bonk_reflection](#mario_bonk_reflection)
+
+### Lua Example
+`mario_bonk_reflection(arg0, arg1)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| arg0 | [MarioState](structs.md#MarioState) |
+| arg1 | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void mario_bonk_reflection(struct MarioState *, u32);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_push_off_steep_floor](#mario_push_off_steep_floor)
+
+### Lua Example
+`local integerValue = mario_push_off_steep_floor(arg0, arg1, arg2)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| arg0 | [MarioState](structs.md#MarioState) |
+| arg1 | integer |
+| arg2 | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 mario_push_off_steep_floor(struct MarioState *, u32, u32);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_update_moving_sand](#mario_update_moving_sand)
+
+### Lua Example
+`local integerValue = mario_update_moving_sand(arg0)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| arg0 | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 mario_update_moving_sand(struct MarioState *);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_update_quicksand](#mario_update_quicksand)
+
+### Lua Example
+`local integerValue = mario_update_quicksand(arg0, arg1)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| arg0 | [MarioState](structs.md#MarioState) |
+| arg1 | number |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 mario_update_quicksand(struct MarioState *, f32);`
+
+[:arrow_up_small:](#)
+
+
+
+## [mario_update_windy_ground](#mario_update_windy_ground)
+
+### Lua Example
+`local integerValue = mario_update_windy_ground(arg0)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| arg0 | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`u32 mario_update_windy_ground(struct MarioState *);`
+
+[:arrow_up_small:](#)
+
+
+
+## [perform_air_step](#perform_air_step)
+
+### Lua Example
+`local integerValue = perform_air_step(arg0, arg1)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| arg0 | [MarioState](structs.md#MarioState) |
+| arg1 | integer |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 perform_air_step(struct MarioState *, u32);`
+
+[:arrow_up_small:](#)
+
+
+
+## [perform_ground_step](#perform_ground_step)
+
+### Lua Example
+`local integerValue = perform_ground_step(arg0)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| arg0 | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 perform_ground_step(struct MarioState *);`
+
+[:arrow_up_small:](#)
+
+
+
+## [set_vel_from_pitch_and_yaw](#set_vel_from_pitch_and_yaw)
+
+### Lua Example
+`set_vel_from_pitch_and_yaw(m)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void set_vel_from_pitch_and_yaw(struct MarioState* m);`
+
+[:arrow_up_small:](#)
+
+
+
+## [stationary_ground_step](#stationary_ground_step)
+
+### Lua Example
+`local integerValue = stationary_ground_step(arg0)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| arg0 | [MarioState](structs.md#MarioState) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 stationary_ground_step(struct MarioState *);`
+
+[:arrow_up_small:](#)
+
+
+
+## [stop_and_set_height_to_floor](#stop_and_set_height_to_floor)
+
+### Lua Example
+`stop_and_set_height_to_floor(arg0)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| arg0 | [MarioState](structs.md#MarioState) |
+
+### Returns
+- None
+
+### C Prototype
+`void stop_and_set_height_to_floor(struct MarioState *);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from surface_collision.h
+
+
+
+
+## [f32_find_wall_collision](#f32_find_wall_collision)
+
+### Lua Example
+`local integerValue = f32_find_wall_collision(xPtr, yPtr, zPtr, offsetY, radius)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| xPtr | f32 * |
+| yPtr | f32 * |
+| zPtr | f32 * |
+| offsetY | number |
+| radius | number |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 f32_find_wall_collision(f32 *xPtr, f32 *yPtr, f32 *zPtr, f32 offsetY, f32 radius);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_ceil](#find_ceil)
+
+### Lua Example
+`local numberValue = find_ceil(posX, posY, posZ, pceil)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| posX | number |
+| posY | number |
+| posZ | number |
+| pceil | [Surface](structs.md#Surface) |
+
+### Returns
+- number
+
+### C Prototype
+`f32 find_ceil(f32 posX, f32 posY, f32 posZ, struct Surface **pceil);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_floor](#find_floor)
+
+### Lua Example
+`local numberValue = find_floor(xPos, yPos, zPos, pfloor)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| xPos | number |
+| yPos | number |
+| zPos | number |
+| pfloor | [Surface](structs.md#Surface) |
+
+### Returns
+- number
+
+### C Prototype
+`f32 find_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_floor_height](#find_floor_height)
+
+### Lua Example
+`local numberValue = find_floor_height(x, y, z)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| x | number |
+| y | number |
+| z | number |
+
+### Returns
+- number
+
+### C Prototype
+`f32 find_floor_height(f32 x, f32 y, f32 z);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_floor_height_and_data](#find_floor_height_and_data)
+
+### Lua Example
+`local numberValue = find_floor_height_and_data(xPos, yPos, zPos, floorGeo)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| xPos | number |
+| yPos | number |
+| zPos | number |
+| floorGeo | [FloorGeometry](structs.md#FloorGeometry) |
+
+### Returns
+- number
+
+### C Prototype
+`f32 find_floor_height_and_data(f32 xPos, f32 yPos, f32 zPos, struct FloorGeometry **floorGeo);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_poison_gas_level](#find_poison_gas_level)
+
+### Lua Example
+`local numberValue = find_poison_gas_level(x, z)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| x | number |
+| z | number |
+
+### Returns
+- number
+
+### C Prototype
+`f32 find_poison_gas_level(f32 x, f32 z);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_surface_on_ray](#find_surface_on_ray)
+
+### Lua Example
+`find_surface_on_ray(orig, dir, hit_surface, hit_pos)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| orig | [Vec3f](structs.md#Vec3f) |
+| dir | [Vec3f](structs.md#Vec3f) |
+| hit_surface | [Surface](structs.md#Surface) |
+| hit_pos | [Vec3f](structs.md#Vec3f) |
+
+### Returns
+- None
+
+### C Prototype
+`void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Vec3f hit_pos);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_wall_collisions](#find_wall_collisions)
+
+### Lua Example
+`local integerValue = find_wall_collisions(colData)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| colData | [WallCollisionData](structs.md#WallCollisionData) |
+
+### Returns
+- integer
+
+### C Prototype
+`s32 find_wall_collisions(struct WallCollisionData *colData);`
+
+[:arrow_up_small:](#)
+
+
+
+## [find_water_level](#find_water_level)
+
+### Lua Example
+`local numberValue = find_water_level(x, z)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| x | number |
+| z | number |
+
+### Returns
+- number
+
+### C Prototype
+`f32 find_water_level(f32 x, f32 z);`
+
+[:arrow_up_small:](#)
+
+
+
+---
+# functions from thread6.c
+
+
+
+
+## [queue_rumble_data](#queue_rumble_data)
+
+### Lua Example
+`queue_rumble_data(a0, a1)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| a0 | integer |
+| a1 | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void queue_rumble_data(s16 a0, s16 a1);`
+
+[:arrow_up_small:](#)
+
+
+
+## [queue_rumble_data_mario](#queue_rumble_data_mario)
+
+### Lua Example
+`queue_rumble_data_mario(m, a0, a1)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| m | [MarioState](structs.md#MarioState) |
+| a0 | integer |
+| a1 | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void queue_rumble_data_mario(struct MarioState* m, s16 a0, s16 a1);`
+
+[:arrow_up_small:](#)
+
+
+
+## [queue_rumble_data_object](#queue_rumble_data_object)
+
+### Lua Example
+`queue_rumble_data_object(object, a0, a1)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| object | [Object](structs.md#Object) |
+| a0 | integer |
+| a1 | integer |
+
+### Returns
+- None
+
+### C Prototype
+`void queue_rumble_data_object(struct Object* object, s16 a0, s16 a1);`
+
+[:arrow_up_small:](#)
+
+
diff --git a/docs/lua/lua.md b/docs/lua/lua.md
new file mode 100644
index 000000000..2e474b92e
--- /dev/null
+++ b/docs/lua/lua.md
@@ -0,0 +1,33 @@
+# Lua Reference
+
+The Lua scripting API is in early development.
+
+Expect many more things to be supported in the future.
+
+
+
+## How to install Lua mods
+Lua scripts you make can be placed either the `mods` folder in the base directory, or in `/mods`
+
+
+
+## Globals
+| Identifier | Type | Description |
+| :-------- | :--: | :---------: |
+| gMarioStates[MAX_PLAYERS] | [MarioState](structs.md#MarioState) | An array of length MAX_PLAYERS containing mario states |
+| gCharacter[CT_MAX] | [Character](structs.md#Character) | An array of length CT_MAX containing character information |
+
+
+
+## Exposed from SM64
+- [Constants](constants.md)
+- [Functions](functions.md)
+- [Structs](structs.md)
+
+
+
+## Example Lua mods
+- [Extended Moveset](../../mods/extended-moveset.lua)
+- [Character Movesets](../../mods/character-movesets.lua)
+- [Low Gravity](../../mods/low-gravity.lua)
+- [Faster Swimming](../../mods/faster-swimming.lua)
diff --git a/docs/lua/structs.md b/docs/lua/structs.md
new file mode 100644
index 000000000..45763ea79
--- /dev/null
+++ b/docs/lua/structs.md
@@ -0,0 +1,858 @@
+## [:rewind: Lua Reference](lua.md)
+
+# Supported Structs
+- [Animation](#Animation)
+- [Area](#Area)
+- [Camera](#Camera)
+- [CameraFOVStatus](#CameraFOVStatus)
+- [CameraStoredInfo](#CameraStoredInfo)
+- [CameraTrigger](#CameraTrigger)
+- [Character](#Character)
+- [Controller](#Controller)
+- [Cutscene](#Cutscene)
+- [CutsceneSplinePoint](#CutsceneSplinePoint)
+- [CutsceneVariable](#CutsceneVariable)
+- [FloorGeometry](#FloorGeometry)
+- [GraphNode](#GraphNode)
+- [GraphNodeObject](#GraphNodeObject)
+- [GraphNodeObject_sub](#GraphNodeObject_sub)
+- [HandheldShakePoint](#HandheldShakePoint)
+- [InstantWarp](#InstantWarp)
+- [LakituState](#LakituState)
+- [LinearTransitionPoint](#LinearTransitionPoint)
+- [MarioAnimDmaRelatedThing](#MarioAnimDmaRelatedThing)
+- [MarioAnimation](#MarioAnimation)
+- [MarioBodyState](#MarioBodyState)
+- [MarioState](#MarioState)
+- [ModeTransitionInfo](#ModeTransitionInfo)
+- [Object](#Object)
+- [ObjectHitbox](#ObjectHitbox)
+- [ObjectNode](#ObjectNode)
+- [ObjectWarpNode](#ObjectWarpNode)
+- [OffsetSizePair](#OffsetSizePair)
+- [ParallelTrackingPoint](#ParallelTrackingPoint)
+- [PlayerCameraState](#PlayerCameraState)
+- [PlayerGeometry](#PlayerGeometry)
+- [SPTask](#SPTask)
+- [SpawnInfo](#SpawnInfo)
+- [Surface](#Surface)
+- [TransitionInfo](#TransitionInfo)
+- [UnusedArea28](#UnusedArea28)
+- [VblankHandler](#VblankHandler)
+- [Vec3f](#Vec3f)
+- [Vec3s](#Vec3s)
+- [WallCollisionData](#WallCollisionData)
+- [WarpNode](#WarpNode)
+- [WarpTransition](#WarpTransition)
+- [WarpTransitionData](#WarpTransitionData)
+- [Waypoint](#Waypoint)
+- [Whirlpool](#Whirlpool)
+
+
+
+## [Animation](#Animation)
+
+| Field | Type |
+| ----- | ---- |
+| flags | integer |
+| length | integer |
+| animYTransDivisor | integer |
+| startFrame | integer |
+| loopStart | integer |
+| loopEnd | integer |
+| unusedBoneCount | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [Area](#Area)
+
+| Field | Type |
+| ----- | ---- |
+| camera | [Camera](#Camera) |
+| flags | integer |
+| index | integer |
+| instantWarps | [InstantWarp](#InstantWarp) |
+| musicParam | integer |
+| musicParam2 | integer |
+| objectSpawnInfos | [SpawnInfo](#SpawnInfo) |
+| paintingWarpNodes | [WarpNode](#WarpNode) |
+| terrainType | integer |
+| warpNodes | [ObjectWarpNode](#ObjectWarpNode) |
+
+[:arrow_up_small:](#)
+
+
+
+## [Camera](#Camera)
+
+| Field | Type |
+| ----- | ---- |
+| areaCenX | number |
+| areaCenY | number |
+| areaCenZ | number |
+| cutscene | integer |
+| defMode | integer |
+| doorStatus | integer |
+| focus | [Vec3f](#Vec3f) |
+| mode | integer |
+| nextYaw | integer |
+| pos | [Vec3f](#Vec3f) |
+| unusedVec1 | [Vec3f](#Vec3f) |
+| yaw | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [CameraFOVStatus](#CameraFOVStatus)
+
+| Field | Type |
+| ----- | ---- |
+| decay | integer |
+| fov | number |
+| fovFunc | integer |
+| fovOffset | number |
+| shakeAmplitude | number |
+| shakePhase | integer |
+| shakeSpeed | integer |
+| unusedIsSleeping | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [CameraStoredInfo](#CameraStoredInfo)
+
+| Field | Type |
+| ----- | ---- |
+| cannonYOffset | number |
+| focus | [Vec3f](#Vec3f) |
+| panDist | number |
+| pos | [Vec3f](#Vec3f) |
+
+[:arrow_up_small:](#)
+
+
+
+## [CameraTrigger](#CameraTrigger)
+
+| Field | Type |
+| ----- | ---- |
+| area | integer |
+| boundsX | integer |
+| boundsY | integer |
+| boundsYaw | integer |
+| boundsZ | integer |
+| centerX | integer |
+| centerY | integer |
+| centerZ | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [Character](#Character)
+
+| Field | Type |
+| ----- | ---- |
+| animOffsetEnabled | integer |
+| animOffsetFeet | number |
+| animOffsetHand | number |
+| animOffsetLowYPoint | number |
+| cameraHudHead | integer |
+| capEnemyLayer | integer |
+| capMetalModelId | integer |
+| capMetalWingModelId | integer |
+| capModelId | integer |
+| capWingModelId | integer |
+| modelId | integer |
+| soundAttacked | integer |
+| soundCoughing1 | integer |
+| soundCoughing2 | integer |
+| soundCoughing3 | integer |
+| soundDoh | integer |
+| soundDrowning | integer |
+| soundDying | integer |
+| soundEeuh | integer |
+| soundFreqScale | number |
+| soundGameOver | integer |
+| soundGroundPoundWah | integer |
+| soundHaha | integer |
+| soundHaha_2 | integer |
+| soundHello | integer |
+| soundHereWeGo | integer |
+| soundHoohoo | integer |
+| soundHrmm | integer |
+| soundImaTired | integer |
+| soundMamaMia | integer |
+| soundOnFire | integer |
+| soundOoof | integer |
+| soundOoof2 | integer |
+| soundPanting | integer |
+| soundPantingCold | integer |
+| soundPressStartToPlay | integer |
+| soundPunchHoo | integer |
+| soundPunchWah | integer |
+| soundPunchYah | integer |
+| soundSnoring1 | integer |
+| soundSnoring2 | integer |
+| soundSnoring3 | integer |
+| soundSoLongaBowser | integer |
+| soundTwirlBounce | integer |
+| soundUh | integer |
+| soundUh2 | integer |
+| soundUh2_2 | integer |
+| soundWaaaooow | integer |
+| soundWah2 | integer |
+| soundWhoa | integer |
+| soundYahWahHoo | integer |
+| soundYahoo | integer |
+| soundYahooWahaYippee | integer |
+| soundYawning | integer |
+| type | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [Controller](#Controller)
+
+| Field | Type |
+| ----- | ---- |
+| buttonDown | integer |
+| buttonPressed | integer |
+| extStickX | integer |
+| extStickY | integer |
+| port | integer |
+| rawStickX | integer |
+| rawStickY | integer |
+| stickMag | number |
+| stickX | number |
+| stickY | number |
+
+[:arrow_up_small:](#)
+
+
+
+## [Cutscene](#Cutscene)
+
+| Field | Type |
+| ----- | ---- |
+| duration | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [CutsceneSplinePoint](#CutsceneSplinePoint)
+
+| Field | Type |
+| ----- | ---- |
+| index | integer |
+| point | [Vec3s](#Vec3s) |
+| speed | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [CutsceneVariable](#CutsceneVariable)
+
+| Field | Type |
+| ----- | ---- |
+| angle | [Vec3s](#Vec3s) |
+| point | [Vec3f](#Vec3f) |
+| unused1 | integer |
+| unused2 | integer |
+| unusedPoint | [Vec3f](#Vec3f) |
+
+[:arrow_up_small:](#)
+
+
+
+## [FloorGeometry](#FloorGeometry)
+
+| Field | Type |
+| ----- | ---- |
+| normalX | number |
+| normalY | number |
+| normalZ | number |
+| originOffset | number |
+
+[:arrow_up_small:](#)
+
+
+
+## [GraphNode](#GraphNode)
+
+| Field | Type |
+| ----- | ---- |
+| children | [GraphNode](#GraphNode) |
+| flags | integer |
+| next | [GraphNode](#GraphNode) |
+| parent | [GraphNode](#GraphNode) |
+| prev | [GraphNode](#GraphNode) |
+| type | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [GraphNodeObject](#GraphNodeObject)
+
+| Field | Type |
+| ----- | ---- |
+| angle | [Vec3s](#Vec3s) |
+| cameraToObject | [Vec3f](#Vec3f) |
+| node | [GraphNode](#GraphNode) |
+| pos | [Vec3f](#Vec3f) |
+| prevAngle | [Vec3s](#Vec3s) |
+| prevPos | [Vec3f](#Vec3f) |
+| prevScale | [Vec3f](#Vec3f) |
+| prevScaleTimestamp | integer |
+| prevShadowPos | [Vec3f](#Vec3f) |
+| prevShadowPosTimestamp | integer |
+| prevThrowMatrixTimestamp | integer |
+| prevTimestamp | integer |
+| scale | [Vec3f](#Vec3f) |
+| sharedChild | [GraphNode](#GraphNode) |
+| skipInterpolationTimestamp | integer |
+| unk18 | integer |
+| unk19 | integer |
+| animInfo | [GraphNodeObject_sub](#GraphNodeObject_sub) |
+| unk4C | [SpawnInfo](#SpawnInfo) |
+
+[:arrow_up_small:](#)
+
+
+
+## [GraphNodeObject_sub](#GraphNodeObject_sub)
+
+| Field | Type |
+| ----- | ---- |
+| animAccel | integer |
+| animFrame | integer |
+| animFrameAccelAssist | integer |
+| animID | integer |
+| animTimer | integer |
+| animYTrans | integer |
+| curAnim | [Animation](#Animation) |
+| prevAnimFrame | integer |
+| prevAnimFrameTimestamp | integer |
+| prevAnimID | integer |
+| prevAnimPtr | [Animation](#Animation) |
+
+[:arrow_up_small:](#)
+
+
+
+## [HandheldShakePoint](#HandheldShakePoint)
+
+| Field | Type |
+| ----- | ---- |
+| index | integer |
+| pad | integer |
+| point | [Vec3s](#Vec3s) |
+
+[:arrow_up_small:](#)
+
+
+
+## [InstantWarp](#InstantWarp)
+
+| Field | Type |
+| ----- | ---- |
+| area | integer |
+| displacement | [Vec3s](#Vec3s) |
+| id | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [LakituState](#LakituState)
+
+| Field | Type |
+| ----- | ---- |
+| curFocus | [Vec3f](#Vec3f) |
+| curPos | [Vec3f](#Vec3f) |
+| defMode | integer |
+| focHSpeed | number |
+| focVSpeed | number |
+| focus | [Vec3f](#Vec3f) |
+| focusDistance | number |
+| goalFocus | [Vec3f](#Vec3f) |
+| goalPos | [Vec3f](#Vec3f) |
+| keyDanceRoll | integer |
+| lastFrameAction | integer |
+| mode | integer |
+| nextYaw | integer |
+| oldPitch | integer |
+| oldRoll | integer |
+| oldYaw | integer |
+| pos | [Vec3f](#Vec3f) |
+| posHSpeed | number |
+| posVSpeed | number |
+| roll | integer |
+| shakeMagnitude | [Vec3s](#Vec3s) |
+| shakePitchDecay | integer |
+| shakePitchPhase | integer |
+| shakePitchVel | integer |
+| shakeRollDecay | integer |
+| shakeRollPhase | integer |
+| shakeRollVel | integer |
+| shakeYawDecay | integer |
+| shakeYawPhase | integer |
+| shakeYawVel | integer |
+| skipCameraInterpolationTimestamp | integer |
+| unused | integer |
+| unusedVec1 | [Vec3f](#Vec3f) |
+| unusedVec2 | [Vec3s](#Vec3s) |
+| yaw | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [LinearTransitionPoint](#LinearTransitionPoint)
+
+| Field | Type |
+| ----- | ---- |
+| dist | number |
+| focus | [Vec3f](#Vec3f) |
+| pitch | integer |
+| pos | [Vec3f](#Vec3f) |
+| yaw | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [MarioAnimation](#MarioAnimation)
+
+| Field | Type |
+| ----- | ---- |
+| targetAnim | [Animation](#Animation) |
+
+[:arrow_up_small:](#)
+
+
+
+## [MarioBodyState](#MarioBodyState)
+
+| Field | Type |
+| ----- | ---- |
+| action | integer |
+| capState | integer |
+| eyeState | integer |
+| grabPos | integer |
+| handState | integer |
+| headAngle | [Vec3s](#Vec3s) |
+| heldObjLastPosition | [Vec3f](#Vec3f) |
+| modelState | integer |
+| punchState | integer |
+| torsoAngle | [Vec3s](#Vec3s) |
+| torsoPos | [Vec3f](#Vec3f) |
+| wingFlutter | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [MarioState](#MarioState)
+
+| Field | Type |
+| ----- | ---- |
+| action | integer |
+| actionArg | integer |
+| actionState | integer |
+| actionTimer | integer |
+| angleVel | [Vec3s](#Vec3s) |
+| animation | [MarioAnimation](#MarioAnimation) |
+| area | [Area](#Area) |
+| bubbleObj | [Object](#Object) |
+| capTimer | integer |
+| ceil | [Surface](#Surface) |
+| ceilHeight | number |
+| character | [Character](#Character) |
+| collidedObjInteractTypes | integer |
+| controller | [Controller](#Controller) |
+| curAnimOffset | number |
+| currentRoom | integer |
+| doubleJumpTimer | integer |
+| faceAngle | [Vec3s](#Vec3s) |
+| fadeWarpOpacity | integer |
+| flags | integer |
+| floor | [Surface](#Surface) |
+| floorAngle | integer |
+| floorHeight | number |
+| forwardVel | number |
+| framesSinceA | integer |
+| framesSinceB | integer |
+| freeze | integer |
+| healCounter | integer |
+| health | integer |
+| heldByObj | [Object](#Object) |
+| heldObj | [Object](#Object) |
+| hurtCounter | integer |
+| input | integer |
+| intendedMag | number |
+| intendedYaw | integer |
+| interactObj | [Object](#Object) |
+| invincTimer | integer |
+| isSnoring | integer |
+| marioBodyState | [MarioBodyState](#MarioBodyState) |
+| marioObj | [Object](#Object) |
+| minimumBoneY | number |
+| nonInstantWarpPos | [Vec3f](#Vec3f) |
+| numCoins | integer |
+| numKeys | integer |
+| numLives | integer |
+| numStars | integer |
+| particleFlags | integer |
+| peakHeight | number |
+| playerIndex | integer |
+| pos | [Vec3f](#Vec3f) |
+| prevAction | integer |
+| prevNumStarsForDialog | integer |
+| quicksandDepth | number |
+| riddenObj | [Object](#Object) |
+| slideVelX | number |
+| slideVelZ | number |
+| slideYaw | integer |
+| spawnInfo | [SpawnInfo](#SpawnInfo) |
+| splineKeyframeFraction | number |
+| splineState | integer |
+| squishTimer | integer |
+| statusForCamera | [PlayerCameraState](#PlayerCameraState) |
+| terrainSoundAddend | integer |
+| twirlYaw | integer |
+| unkB0 | integer |
+| unkC4 | number |
+| usedObj | [Object](#Object) |
+| vel | [Vec3f](#Vec3f) |
+| wall | [Surface](#Surface) |
+| wallKickTimer | integer |
+| wasNetworkVisible | integer |
+| waterLevel | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [ModeTransitionInfo](#ModeTransitionInfo)
+
+| Field | Type |
+| ----- | ---- |
+| frame | integer |
+| lastMode | integer |
+| max | integer |
+| newMode | integer |
+| transitionEnd | [LinearTransitionPoint](#LinearTransitionPoint) |
+| transitionStart | [LinearTransitionPoint](#LinearTransitionPoint) |
+
+[:arrow_up_small:](#)
+
+
+
+## [Object](#Object)
+
+| Field | Type |
+| ----- | ---- |
+| activeFlags | integer |
+| areaTimer | integer |
+| areaTimerDuration | integer |
+| areaTimerType | integer |
+| bhvDelayTimer | integer |
+| bhvStackIndex | integer |
+| collidedObjInteractTypes | integer |
+| createdThroughNetwork | integer |
+| globalPlayerIndex | integer |
+| header | [ObjectNode](#ObjectNode) |
+| heldByPlayerIndex | integer |
+| hitboxDownOffset | number |
+| hitboxHeight | number |
+| hitboxRadius | number |
+| hurtboxHeight | number |
+| hurtboxRadius | number |
+| numCollidedObjs | integer |
+| parentObj | [Object](#Object) |
+| platform | [Object](#Object) |
+| prevObj | [Object](#Object) |
+| respawnInfoType | integer |
+| unused1 | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [ObjectHitbox](#ObjectHitbox)
+
+| Field | Type |
+| ----- | ---- |
+| damageOrCoinValue | integer |
+| downOffset | integer |
+| health | integer |
+| height | integer |
+| hurtboxHeight | integer |
+| hurtboxRadius | integer |
+| interactType | integer |
+| numLootCoins | integer |
+| radius | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [ObjectNode](#ObjectNode)
+
+| Field | Type |
+| ----- | ---- |
+| gfx | [GraphNodeObject](#GraphNodeObject) |
+| next | [ObjectNode](#ObjectNode) |
+| prev | [ObjectNode](#ObjectNode) |
+
+[:arrow_up_small:](#)
+
+
+
+## [ObjectWarpNode](#ObjectWarpNode)
+
+| Field | Type |
+| ----- | ---- |
+| next | [ObjectWarpNode](#ObjectWarpNode) |
+| node | [WarpNode](#WarpNode) |
+| object | [Object](#Object) |
+
+[:arrow_up_small:](#)
+
+
+
+## [OffsetSizePair](#OffsetSizePair)
+
+| Field | Type |
+| ----- | ---- |
+| offset | integer |
+| size | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [ParallelTrackingPoint](#ParallelTrackingPoint)
+
+| Field | Type |
+| ----- | ---- |
+| distThresh | number |
+| pos | [Vec3f](#Vec3f) |
+| startOfPath | integer |
+| zoom | number |
+
+[:arrow_up_small:](#)
+
+
+
+## [PlayerCameraState](#PlayerCameraState)
+
+| Field | Type |
+| ----- | ---- |
+| action | integer |
+| cameraEvent | integer |
+| faceAngle | [Vec3s](#Vec3s) |
+| headRotation | [Vec3s](#Vec3s) |
+| pos | [Vec3f](#Vec3f) |
+| unused | integer |
+| usedObj | [Object](#Object) |
+
+[:arrow_up_small:](#)
+
+
+
+## [PlayerGeometry](#PlayerGeometry)
+
+| Field | Type |
+| ----- | ---- |
+| currCeil | [Surface](#Surface) |
+| currCeilHeight | number |
+| currCeilType | integer |
+| currFloor | [Surface](#Surface) |
+| currFloorHeight | number |
+| currFloorType | integer |
+| prevCeil | [Surface](#Surface) |
+| prevCeilHeight | number |
+| prevCeilType | integer |
+| prevFloor | [Surface](#Surface) |
+| prevFloorHeight | number |
+| prevFloorType | integer |
+| waterHeight | number |
+
+[:arrow_up_small:](#)
+
+
+
+## [SpawnInfo](#SpawnInfo)
+
+| Field | Type |
+| ----- | ---- |
+| activeAreaIndex | integer |
+| areaIndex | integer |
+| behaviorArg | integer |
+| next | [SpawnInfo](#SpawnInfo) |
+| startAngle | [Vec3s](#Vec3s) |
+| startPos | [Vec3s](#Vec3s) |
+| unk18 | [GraphNode](#GraphNode) |
+
+[:arrow_up_small:](#)
+
+
+
+## [Surface](#Surface)
+
+| Field | Type |
+| ----- | ---- |
+| flags | integer |
+| force | integer |
+| lowerY | integer |
+| modifiedTimestamp | integer |
+| normal | [Vec3f](#Vec3f) |
+| object | [Object](#Object) |
+| originOffset | number |
+| prevVertex1 | [Vec3s](#Vec3s) |
+| prevVertex2 | [Vec3s](#Vec3s) |
+| prevVertex3 | [Vec3s](#Vec3s) |
+| room | integer |
+| type | integer |
+| upperY | integer |
+| vertex1 | [Vec3s](#Vec3s) |
+| vertex2 | [Vec3s](#Vec3s) |
+| vertex3 | [Vec3s](#Vec3s) |
+
+[:arrow_up_small:](#)
+
+
+
+## [TransitionInfo](#TransitionInfo)
+
+| Field | Type |
+| ----- | ---- |
+| focDist | number |
+| focPitch | integer |
+| focYaw | integer |
+| framesLeft | integer |
+| marioPos | [Vec3f](#Vec3f) |
+| pad | integer |
+| posDist | number |
+| posPitch | integer |
+| posYaw | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [Vec3f](#Vec3f)
+
+| Field | Type |
+| ----- | ---- |
+| x | float |
+| y | float |
+| z | float |
+
+[:arrow_up_small:](#)
+
+
+
+## [Vec3s](#Vec3s)
+
+| Field | Type |
+| ----- | ---- |
+| x | integer |
+| y | integer |
+| z | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [WallCollisionData](#WallCollisionData)
+
+| Field | Type |
+| ----- | ---- |
+| numWalls | integer |
+| offsetY | number |
+| radius | number |
+| unk14 | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [WarpNode](#WarpNode)
+
+| Field | Type |
+| ----- | ---- |
+| destArea | integer |
+| destLevel | integer |
+| destNode | integer |
+| id | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [WarpTransition](#WarpTransition)
+
+| Field | Type |
+| ----- | ---- |
+| data | [WarpTransitionData](#WarpTransitionData) |
+| isActive | integer |
+| pauseRendering | integer |
+| time | integer |
+| type | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [WarpTransitionData](#WarpTransitionData)
+
+| Field | Type |
+| ----- | ---- |
+| blue | integer |
+| endTexRadius | integer |
+| endTexX | integer |
+| endTexY | integer |
+| green | integer |
+| red | integer |
+| startTexRadius | integer |
+| startTexX | integer |
+| startTexY | integer |
+| texTimer | integer |
+
+[:arrow_up_small:](#)
+
+
+
+## [Waypoint](#Waypoint)
+
+| Field | Type |
+| ----- | ---- |
+| flags | integer |
+| pos | [Vec3s](#Vec3s) |
+
+[:arrow_up_small:](#)
+
+
+
+## [Whirlpool](#Whirlpool)
+
+| Field | Type |
+| ----- | ---- |
+| pos | [Vec3s](#Vec3s) |
+| strength | integer |
+
+[:arrow_up_small:](#)
+
+
+
diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c
index 10081c513..b1e07afd3 100644
--- a/src/pc/lua/smlua_cobject_autogen.c
+++ b/src/pc/lua/smlua_cobject_autogen.c
@@ -7,384 +7,253 @@
#include "src/game/characters.h"
#include "src/engine/surface_collision.h"
-#define LUA_CONTROLLER_FIELD_COUNT 10
-static struct LuaObjectField sControllerFields[LUA_CONTROLLER_FIELD_COUNT] = {
- { "rawStickX", LVT_S16, offsetof(struct Controller, rawStickX), false, LOT_NONE },
- { "rawStickY", LVT_S16, offsetof(struct Controller, rawStickY), false, LOT_NONE },
- { "stickX", LVT_F32, offsetof(struct Controller, stickX), false, LOT_NONE },
- { "stickY", LVT_F32, offsetof(struct Controller, stickY), false, LOT_NONE },
- { "stickMag", LVT_F32, offsetof(struct Controller, stickMag), false, LOT_NONE },
- { "buttonDown", LVT_U16, offsetof(struct Controller, buttonDown), false, LOT_NONE },
- { "buttonPressed", LVT_U16, offsetof(struct Controller, buttonPressed), false, LOT_NONE },
-// { "statusData", LVT_???, offsetof(struct Controller, statusData), false, LOT_??? }, <--- UNIMPLEMENTED
-// { "controllerData", LVT_???, offsetof(struct Controller, controllerData), false, LOT_??? }, <--- UNIMPLEMENTED
- { "port", LVT_S32, offsetof(struct Controller, port), false, LOT_NONE },
- { "extStickX", LVT_S16, offsetof(struct Controller, extStickX), false, LOT_NONE },
- { "extStickY", LVT_S16, offsetof(struct Controller, extStickY), false, LOT_NONE },
-};
-
#define LUA_ANIMATION_FIELD_COUNT 7
static struct LuaObjectField sAnimationFields[LUA_ANIMATION_FIELD_COUNT] = {
{ "flags", LVT_S16, offsetof(struct Animation, flags), false, LOT_NONE },
+// { "index", LVT_???, offsetof(struct Animation, index), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "length", LVT_U32, offsetof(struct Animation, length), false, LOT_NONE },
{ "animYTransDivisor", LVT_S16, offsetof(struct Animation, unk02), false, LOT_NONE },
{ "startFrame", LVT_S16, offsetof(struct Animation, unk04), false, LOT_NONE },
{ "loopStart", LVT_S16, offsetof(struct Animation, unk06), false, LOT_NONE },
{ "loopEnd", LVT_S16, offsetof(struct Animation, unk08), false, LOT_NONE },
{ "unusedBoneCount", LVT_S16, offsetof(struct Animation, unk0A), false, LOT_NONE },
// { "values", LVT_???, offsetof(struct Animation, values), false, LOT_??? }, <--- UNIMPLEMENTED
-// { "index", LVT_???, offsetof(struct Animation, index), false, LOT_??? }, <--- UNIMPLEMENTED
- { "length", LVT_U32, offsetof(struct Animation, length), false, LOT_NONE },
-};
-
-#define LUA_GRAPH_NODE_FIELD_COUNT 6
-static struct LuaObjectField sGraphNodeFields[LUA_GRAPH_NODE_FIELD_COUNT] = {
- { "type", LVT_S16, offsetof(struct GraphNode, type), false, LOT_NONE },
- { "flags", LVT_S16, offsetof(struct GraphNode, flags), false, LOT_NONE },
- { "prev", LVT_COBJECT_P, offsetof(struct GraphNode, prev), true, LOT_GRAPHNODE },
- { "next", LVT_COBJECT_P, offsetof(struct GraphNode, next), true, LOT_GRAPHNODE },
- { "parent", LVT_COBJECT_P, offsetof(struct GraphNode, parent), true, LOT_GRAPHNODE },
- { "children", LVT_COBJECT_P, offsetof(struct GraphNode, children), true, LOT_GRAPHNODE },
-};
-
-#define LUA_GRAPH_NODE_OBJECT_SUB_FIELD_COUNT 11
-static struct LuaObjectField sGraphNodeObject_subFields[LUA_GRAPH_NODE_OBJECT_SUB_FIELD_COUNT] = {
- { "animID", LVT_S16, offsetof(struct GraphNodeObject_sub, animID), false, LOT_NONE },
- { "animYTrans", LVT_S16, offsetof(struct GraphNodeObject_sub, animYTrans), false, LOT_NONE },
- { "curAnim", LVT_COBJECT_P, offsetof(struct GraphNodeObject_sub, curAnim), true, LOT_ANIMATION },
- { "animFrame", LVT_S16, offsetof(struct GraphNodeObject_sub, animFrame), false, LOT_NONE },
- { "animTimer", LVT_U16, offsetof(struct GraphNodeObject_sub, animTimer), false, LOT_NONE },
- { "animFrameAccelAssist", LVT_S32, offsetof(struct GraphNodeObject_sub, animFrameAccelAssist), false, LOT_NONE },
- { "animAccel", LVT_S32, offsetof(struct GraphNodeObject_sub, animAccel), false, LOT_NONE },
- { "prevAnimFrame", LVT_S16, offsetof(struct GraphNodeObject_sub, prevAnimFrame), false, LOT_NONE },
- { "prevAnimID", LVT_S16, offsetof(struct GraphNodeObject_sub, prevAnimID), false, LOT_NONE },
- { "prevAnimFrameTimestamp", LVT_U32, offsetof(struct GraphNodeObject_sub, prevAnimFrameTimestamp), false, LOT_NONE },
- { "prevAnimPtr", LVT_COBJECT_P, offsetof(struct GraphNodeObject_sub, prevAnimPtr), true, LOT_ANIMATION },
-};
-
-#define LUA_GRAPH_NODE_OBJECT_FIELD_COUNT 19
-static struct LuaObjectField sGraphNodeObjectFields[LUA_GRAPH_NODE_OBJECT_FIELD_COUNT] = {
- { "node", LVT_COBJECT, offsetof(struct GraphNodeObject, node), true, LOT_GRAPHNODE },
- { "sharedChild", LVT_COBJECT_P, offsetof(struct GraphNodeObject, sharedChild), true, LOT_GRAPHNODE },
- { "unk18", LVT_S8, offsetof(struct GraphNodeObject, unk18), false, LOT_NONE },
- { "unk19", LVT_S8, offsetof(struct GraphNodeObject, unk19), false, LOT_NONE },
- { "angle", LVT_COBJECT, offsetof(struct GraphNodeObject, angle), true, LOT_VEC3S },
- { "pos", LVT_COBJECT, offsetof(struct GraphNodeObject, pos), true, LOT_VEC3F },
- { "prevAngle", LVT_COBJECT, offsetof(struct GraphNodeObject, prevAngle), true, LOT_VEC3S },
- { "prevPos", LVT_COBJECT, offsetof(struct GraphNodeObject, prevPos), true, LOT_VEC3F },
- { "prevTimestamp", LVT_U32, offsetof(struct GraphNodeObject, prevTimestamp), false, LOT_NONE },
- { "prevShadowPos", LVT_COBJECT, offsetof(struct GraphNodeObject, prevShadowPos), true, LOT_VEC3F },
- { "prevShadowPosTimestamp", LVT_U32, offsetof(struct GraphNodeObject, prevShadowPosTimestamp), false, LOT_NONE },
- { "scale", LVT_COBJECT, offsetof(struct GraphNodeObject, scale), true, LOT_VEC3F },
- { "prevScale", LVT_COBJECT, offsetof(struct GraphNodeObject, prevScale), true, LOT_VEC3F },
- { "prevScaleTimestamp", LVT_U32, offsetof(struct GraphNodeObject, prevScaleTimestamp), false, LOT_NONE },
- { "animInfo", LVT_COBJECT, offsetof(struct GraphNodeObject, unk38), true, LOT_GRAPHNODEOBJECT_SUB },
- { "unk4C", LVT_COBJECT_P, offsetof(struct GraphNodeObject, unk4C), true, LOT_SPAWNINFO },
-// { "throwMatrix", LVT_???, offsetof(struct GraphNodeObject, throwMatrix), false, LOT_??? }, <--- UNIMPLEMENTED
-// { "prevThrowMatrix", LVT_???, offsetof(struct GraphNodeObject, prevThrowMatrix), false, LOT_??? }, <--- UNIMPLEMENTED
- { "prevThrowMatrixTimestamp", LVT_U32, offsetof(struct GraphNodeObject, prevThrowMatrixTimestamp), false, LOT_NONE },
-// { "throwMatrixInterpolated", LVT_???, offsetof(struct GraphNodeObject, throwMatrixInterpolated), false, LOT_??? }, <--- UNIMPLEMENTED
- { "cameraToObject", LVT_COBJECT, offsetof(struct GraphNodeObject, cameraToObject), true, LOT_VEC3F },
- { "skipInterpolationTimestamp", LVT_U32, offsetof(struct GraphNodeObject, skipInterpolationTimestamp), false, LOT_NONE },
-};
-
-#define LUA_OBJECT_NODE_FIELD_COUNT 3
-static struct LuaObjectField sObjectNodeFields[LUA_OBJECT_NODE_FIELD_COUNT] = {
- { "gfx", LVT_COBJECT, offsetof(struct ObjectNode, gfx), true, LOT_GRAPHNODEOBJECT },
- { "next", LVT_COBJECT_P, offsetof(struct ObjectNode, next), true, LOT_OBJECTNODE },
- { "prev", LVT_COBJECT_P, offsetof(struct ObjectNode, prev), true, LOT_OBJECTNODE },
-};
-
-#define LUA_OBJECT_FIELD_COUNT 22
-static struct LuaObjectField sObjectFields[LUA_OBJECT_FIELD_COUNT] = {
- { "header", LVT_COBJECT, offsetof(struct Object, header), true, LOT_OBJECTNODE },
- { "parentObj", LVT_COBJECT_P, offsetof(struct Object, parentObj), true, LOT_OBJECT },
- { "prevObj", LVT_COBJECT_P, offsetof(struct Object, prevObj), true, LOT_OBJECT },
- { "collidedObjInteractTypes", LVT_U32, offsetof(struct Object, collidedObjInteractTypes), false, LOT_NONE },
- { "activeFlags", LVT_S16, offsetof(struct Object, activeFlags), false, LOT_NONE },
- { "numCollidedObjs", LVT_S16, offsetof(struct Object, numCollidedObjs), false, LOT_NONE },
-// { "collidedObjs", LOT_???, offsetof(struct Object, collidedObjs), false, LOT_??? }, <--- UNIMPLEMENTED
-// { "rawData", LOT_???, offsetof(struct Object, rawData), false, LOT_??? }, <--- UNIMPLEMENTED
-// { "ptrData", LOT_???, offsetof(struct Object, ptrData), false, LOT_??? }, <--- UNIMPLEMENTED
- { "unused1", LVT_U32, offsetof(struct Object, unused1), false, LOT_NONE },
-// { "curBhvCommand", LVT_???, offsetof(struct Object, curBhvCommand), false, LOT_??? }, <--- UNIMPLEMENTED
- { "bhvStackIndex", LVT_U32, offsetof(struct Object, bhvStackIndex), false, LOT_NONE },
-// { "bhvStack", LOT_???, offsetof(struct Object, bhvStack), false, LOT_??? }, <--- UNIMPLEMENTED
- { "bhvDelayTimer", LVT_S16, offsetof(struct Object, bhvDelayTimer), false, LOT_NONE },
- { "respawnInfoType", LVT_S16, offsetof(struct Object, respawnInfoType), false, LOT_NONE },
- { "hitboxRadius", LVT_F32, offsetof(struct Object, hitboxRadius), false, LOT_NONE },
- { "hitboxHeight", LVT_F32, offsetof(struct Object, hitboxHeight), false, LOT_NONE },
- { "hurtboxRadius", LVT_F32, offsetof(struct Object, hurtboxRadius), false, LOT_NONE },
- { "hurtboxHeight", LVT_F32, offsetof(struct Object, hurtboxHeight), false, LOT_NONE },
- { "hitboxDownOffset", LVT_F32, offsetof(struct Object, hitboxDownOffset), false, LOT_NONE },
-// { "behavior", LVT_???, offsetof(struct Object, behavior), false, LOT_??? }, <--- UNIMPLEMENTED
- { "heldByPlayerIndex", LVT_U32, offsetof(struct Object, heldByPlayerIndex), false, LOT_NONE },
- { "platform", LVT_COBJECT_P, offsetof(struct Object, platform), true, LOT_OBJECT },
-// { "collisionData", LVT_???, offsetof(struct Object, collisionData), false, LOT_??? }, <--- UNIMPLEMENTED
-// { "transform", LVT_???, offsetof(struct Object, transform), false, LOT_??? }, <--- UNIMPLEMENTED
-// { "respawnInfo", LVT_???, offsetof(struct Object, respawnInfo), false, LOT_??? }, <--- UNIMPLEMENTED
- { "createdThroughNetwork", LVT_U8, offsetof(struct Object, createdThroughNetwork), false, LOT_NONE },
- { "areaTimerType", LVT_S32, offsetof(struct Object, areaTimerType), false, LOT_NONE },
- { "areaTimer", LVT_U32, offsetof(struct Object, areaTimer), false, LOT_NONE },
- { "areaTimerDuration", LVT_U32, offsetof(struct Object, areaTimerDuration), false, LOT_NONE },
-// { "areaTimerRunOnceCallback)(void)", LVT_???, offsetof(struct Object, areaTimerRunOnceCallback)(void)), false, LOT_??? }, <--- UNIMPLEMENTED
- { "globalPlayerIndex", LVT_U8, offsetof(struct Object, globalPlayerIndex), false, LOT_NONE },
-};
-
-#define LUA_OBJECT_HITBOX_FIELD_COUNT 9
-static struct LuaObjectField sObjectHitboxFields[LUA_OBJECT_HITBOX_FIELD_COUNT] = {
- { "interactType", LVT_U32, offsetof(struct ObjectHitbox, interactType), false, LOT_NONE },
- { "downOffset", LVT_U8, offsetof(struct ObjectHitbox, downOffset), false, LOT_NONE },
- { "damageOrCoinValue", LVT_S8, offsetof(struct ObjectHitbox, damageOrCoinValue), false, LOT_NONE },
- { "health", LVT_S8, offsetof(struct ObjectHitbox, health), false, LOT_NONE },
- { "numLootCoins", LVT_S8, offsetof(struct ObjectHitbox, numLootCoins), false, LOT_NONE },
- { "radius", LVT_S16, offsetof(struct ObjectHitbox, radius), false, LOT_NONE },
- { "height", LVT_S16, offsetof(struct ObjectHitbox, height), false, LOT_NONE },
- { "hurtboxRadius", LVT_S16, offsetof(struct ObjectHitbox, hurtboxRadius), false, LOT_NONE },
- { "hurtboxHeight", LVT_S16, offsetof(struct ObjectHitbox, hurtboxHeight), false, LOT_NONE },
-};
-
-#define LUA_WAYPOINT_FIELD_COUNT 2
-static struct LuaObjectField sWaypointFields[LUA_WAYPOINT_FIELD_COUNT] = {
- { "flags", LVT_S16, offsetof(struct Waypoint, flags), false, LOT_NONE },
- { "pos", LVT_COBJECT, offsetof(struct Waypoint, pos), true, LOT_VEC3S },
-};
-
-#define LUA_SURFACE_FIELD_COUNT 16
-static struct LuaObjectField sSurfaceFields[LUA_SURFACE_FIELD_COUNT] = {
- { "type", LVT_S16, offsetof(struct Surface, type), false, LOT_NONE },
- { "force", LVT_S16, offsetof(struct Surface, force), false, LOT_NONE },
- { "flags", LVT_S8, offsetof(struct Surface, flags), false, LOT_NONE },
- { "room", LVT_S8, offsetof(struct Surface, room), false, LOT_NONE },
- { "lowerY", LVT_S16, offsetof(struct Surface, lowerY), false, LOT_NONE },
- { "upperY", LVT_S16, offsetof(struct Surface, upperY), false, LOT_NONE },
- { "vertex1", LVT_COBJECT, offsetof(struct Surface, vertex1), true, LOT_VEC3S },
- { "vertex2", LVT_COBJECT, offsetof(struct Surface, vertex2), true, LOT_VEC3S },
- { "vertex3", LVT_COBJECT, offsetof(struct Surface, vertex3), true, LOT_VEC3S },
- { "normal", LVT_COBJECT, offsetof(struct Surface, normal), true, LOT_VEC3F },
- { "originOffset", LVT_F32, offsetof(struct Surface, originOffset), false, LOT_NONE },
- { "object", LVT_COBJECT_P, offsetof(struct Surface, object), true, LOT_OBJECT },
- { "prevVertex1", LVT_COBJECT, offsetof(struct Surface, prevVertex1), true, LOT_VEC3S },
- { "prevVertex2", LVT_COBJECT, offsetof(struct Surface, prevVertex2), true, LOT_VEC3S },
- { "prevVertex3", LVT_COBJECT, offsetof(struct Surface, prevVertex3), true, LOT_VEC3S },
- { "modifiedTimestamp", LVT_U32, offsetof(struct Surface, modifiedTimestamp), false, LOT_NONE },
-};
-
-#define LUA_MARIO_BODY_STATE_FIELD_COUNT 12
-static struct LuaObjectField sMarioBodyStateFields[LUA_MARIO_BODY_STATE_FIELD_COUNT] = {
- { "action", LVT_U32, offsetof(struct MarioBodyState, action), false, LOT_NONE },
- { "capState", LVT_S8, offsetof(struct MarioBodyState, capState), false, LOT_NONE },
- { "eyeState", LVT_S8, offsetof(struct MarioBodyState, eyeState), false, LOT_NONE },
- { "handState", LVT_S8, offsetof(struct MarioBodyState, handState), false, LOT_NONE },
- { "wingFlutter", LVT_S8, offsetof(struct MarioBodyState, wingFlutter), false, LOT_NONE },
- { "modelState", LVT_S16, offsetof(struct MarioBodyState, modelState), false, LOT_NONE },
- { "grabPos", LVT_S8, offsetof(struct MarioBodyState, grabPos), false, LOT_NONE },
- { "punchState", LVT_U8, offsetof(struct MarioBodyState, punchState), false, LOT_NONE },
- { "torsoAngle", LVT_COBJECT, offsetof(struct MarioBodyState, torsoAngle), true, LOT_VEC3S },
- { "headAngle", LVT_COBJECT, offsetof(struct MarioBodyState, headAngle), true, LOT_VEC3S },
- { "heldObjLastPosition", LVT_COBJECT, offsetof(struct MarioBodyState, heldObjLastPosition), true, LOT_VEC3F },
- { "torsoPos", LVT_COBJECT, offsetof(struct MarioBodyState, torsoPos), true, LOT_VEC3F },
-// { "handFootPos", LOT_???, offsetof(struct MarioBodyState, handFootPos), false, LOT_??? }, <--- UNIMPLEMENTED
-};
-
-#define LUA_OFFSET_SIZE_PAIR_FIELD_COUNT 2
-static struct LuaObjectField sOffsetSizePairFields[LUA_OFFSET_SIZE_PAIR_FIELD_COUNT] = {
- { "offset", LVT_U32, offsetof(struct OffsetSizePair, offset), false, LOT_NONE },
- { "size", LVT_U32, offsetof(struct OffsetSizePair, size), false, LOT_NONE },
-};
-
-#define LUA_MARIO_ANIMATION_FIELD_COUNT 1
-static struct LuaObjectField sMarioAnimationFields[LUA_MARIO_ANIMATION_FIELD_COUNT] = {
-// { "animDmaTable", LVT_COBJECT_P, offsetof(struct MarioAnimation, animDmaTable), true, LOT_??? }, <--- UNIMPLEMENTED
-// { "currentAnimAddr", LVT_???, offsetof(struct MarioAnimation, currentAnimAddr), false, LOT_??? }, <--- UNIMPLEMENTED
- { "targetAnim", LVT_COBJECT_P, offsetof(struct MarioAnimation, targetAnim), true, LOT_ANIMATION },
-// { "padding", LOT_???, offsetof(struct MarioAnimation, padding), false, LOT_??? }, <--- UNIMPLEMENTED
-};
-
-#define LUA_MARIO_STATE_FIELD_COUNT 72
-static struct LuaObjectField sMarioStateFields[LUA_MARIO_STATE_FIELD_COUNT] = {
- { "playerIndex", LVT_U16, offsetof(struct MarioState, playerIndex), true, LOT_NONE },
- { "input", LVT_U16, offsetof(struct MarioState, input), false, LOT_NONE },
- { "flags", LVT_U32, offsetof(struct MarioState, flags), false, LOT_NONE },
- { "particleFlags", LVT_U32, offsetof(struct MarioState, particleFlags), false, LOT_NONE },
- { "action", LVT_U32, offsetof(struct MarioState, action), false, LOT_NONE },
- { "prevAction", LVT_U32, offsetof(struct MarioState, prevAction), false, LOT_NONE },
- { "terrainSoundAddend", LVT_U32, offsetof(struct MarioState, terrainSoundAddend), false, LOT_NONE },
- { "actionState", LVT_U16, offsetof(struct MarioState, actionState), false, LOT_NONE },
- { "actionTimer", LVT_U16, offsetof(struct MarioState, actionTimer), false, LOT_NONE },
- { "actionArg", LVT_U32, offsetof(struct MarioState, actionArg), false, LOT_NONE },
- { "intendedMag", LVT_F32, offsetof(struct MarioState, intendedMag), false, LOT_NONE },
- { "intendedYaw", LVT_S16, offsetof(struct MarioState, intendedYaw), false, LOT_NONE },
- { "invincTimer", LVT_S16, offsetof(struct MarioState, invincTimer), false, LOT_NONE },
- { "framesSinceA", LVT_U8, offsetof(struct MarioState, framesSinceA), false, LOT_NONE },
- { "framesSinceB", LVT_U8, offsetof(struct MarioState, framesSinceB), false, LOT_NONE },
- { "wallKickTimer", LVT_U8, offsetof(struct MarioState, wallKickTimer), false, LOT_NONE },
- { "doubleJumpTimer", LVT_U8, offsetof(struct MarioState, doubleJumpTimer), false, LOT_NONE },
- { "faceAngle", LVT_COBJECT, offsetof(struct MarioState, faceAngle), true, LOT_VEC3S },
- { "angleVel", LVT_COBJECT, offsetof(struct MarioState, angleVel), true, LOT_VEC3S },
- { "slideYaw", LVT_S16, offsetof(struct MarioState, slideYaw), false, LOT_NONE },
- { "twirlYaw", LVT_S16, offsetof(struct MarioState, twirlYaw), false, LOT_NONE },
- { "pos", LVT_COBJECT, offsetof(struct MarioState, pos), true, LOT_VEC3F },
- { "vel", LVT_COBJECT, offsetof(struct MarioState, vel), true, LOT_VEC3F },
- { "forwardVel", LVT_F32, offsetof(struct MarioState, forwardVel), false, LOT_NONE },
- { "slideVelX", LVT_F32, offsetof(struct MarioState, slideVelX), false, LOT_NONE },
- { "slideVelZ", LVT_F32, offsetof(struct MarioState, slideVelZ), false, LOT_NONE },
- { "wall", LVT_COBJECT_P, offsetof(struct MarioState, wall), true, LOT_SURFACE },
- { "ceil", LVT_COBJECT_P, offsetof(struct MarioState, ceil), true, LOT_SURFACE },
- { "floor", LVT_COBJECT_P, offsetof(struct MarioState, floor), true, LOT_SURFACE },
- { "ceilHeight", LVT_F32, offsetof(struct MarioState, ceilHeight), false, LOT_NONE },
- { "floorHeight", LVT_F32, offsetof(struct MarioState, floorHeight), false, LOT_NONE },
- { "floorAngle", LVT_S16, offsetof(struct MarioState, floorAngle), false, LOT_NONE },
- { "waterLevel", LVT_S16, offsetof(struct MarioState, waterLevel), false, LOT_NONE },
- { "interactObj", LVT_COBJECT_P, offsetof(struct MarioState, interactObj), true, LOT_OBJECT },
- { "heldObj", LVT_COBJECT_P, offsetof(struct MarioState, heldObj), true, LOT_OBJECT },
- { "usedObj", LVT_COBJECT_P, offsetof(struct MarioState, usedObj), true, LOT_OBJECT },
- { "riddenObj", LVT_COBJECT_P, offsetof(struct MarioState, riddenObj), true, LOT_OBJECT },
- { "marioObj", LVT_COBJECT_P, offsetof(struct MarioState, marioObj), true, LOT_OBJECT },
- { "spawnInfo", LVT_COBJECT_P, offsetof(struct MarioState, spawnInfo), true, LOT_SPAWNINFO },
- { "area", LVT_COBJECT_P, offsetof(struct MarioState, area), true, LOT_AREA },
- { "statusForCamera", LVT_COBJECT_P, offsetof(struct MarioState, statusForCamera), true, LOT_PLAYERCAMERASTATE },
- { "marioBodyState", LVT_COBJECT_P, offsetof(struct MarioState, marioBodyState), true, LOT_MARIOBODYSTATE },
- { "controller", LVT_COBJECT_P, offsetof(struct MarioState, controller), true, LOT_CONTROLLER },
- { "animation", LVT_COBJECT_P, offsetof(struct MarioState, animation), true, LOT_MARIOANIMATION },
- { "collidedObjInteractTypes", LVT_U32, offsetof(struct MarioState, collidedObjInteractTypes), false, LOT_NONE },
- { "numCoins", LVT_S16, offsetof(struct MarioState, numCoins), false, LOT_NONE },
- { "numStars", LVT_S16, offsetof(struct MarioState, numStars), false, LOT_NONE },
- { "numKeys", LVT_S8, offsetof(struct MarioState, numKeys), false, LOT_NONE },
- { "numLives", LVT_S8, offsetof(struct MarioState, numLives), false, LOT_NONE },
- { "health", LVT_S16, offsetof(struct MarioState, health), false, LOT_NONE },
- { "unkB0", LVT_S16, offsetof(struct MarioState, unkB0), false, LOT_NONE },
- { "hurtCounter", LVT_U8, offsetof(struct MarioState, hurtCounter), false, LOT_NONE },
- { "healCounter", LVT_U8, offsetof(struct MarioState, healCounter), false, LOT_NONE },
- { "squishTimer", LVT_U8, offsetof(struct MarioState, squishTimer), false, LOT_NONE },
- { "fadeWarpOpacity", LVT_U8, offsetof(struct MarioState, fadeWarpOpacity), false, LOT_NONE },
- { "capTimer", LVT_U16, offsetof(struct MarioState, capTimer), false, LOT_NONE },
- { "prevNumStarsForDialog", LVT_S16, offsetof(struct MarioState, prevNumStarsForDialog), false, LOT_NONE },
- { "peakHeight", LVT_F32, offsetof(struct MarioState, peakHeight), false, LOT_NONE },
- { "quicksandDepth", LVT_F32, offsetof(struct MarioState, quicksandDepth), false, LOT_NONE },
- { "unkC4", LVT_F32, offsetof(struct MarioState, unkC4), false, LOT_NONE },
- { "currentRoom", LVT_S16, offsetof(struct MarioState, currentRoom), false, LOT_NONE },
- { "heldByObj", LVT_COBJECT_P, offsetof(struct MarioState, heldByObj), true, LOT_OBJECT },
- { "isSnoring", LVT_U8, offsetof(struct MarioState, isSnoring), false, LOT_NONE },
- { "bubbleObj", LVT_COBJECT_P, offsetof(struct MarioState, bubbleObj), true, LOT_OBJECT },
- { "freeze", LVT_U8, offsetof(struct MarioState, freeze), false, LOT_NONE },
-// { "splineKeyframe", LVT_???, offsetof(struct MarioState, splineKeyframe), false, LOT_??? }, <--- UNIMPLEMENTED
- { "splineKeyframeFraction", LVT_F32, offsetof(struct MarioState, splineKeyframeFraction), false, LOT_NONE },
- { "splineState", LVT_S32, offsetof(struct MarioState, splineState), false, LOT_NONE },
- { "nonInstantWarpPos", LVT_COBJECT, offsetof(struct MarioState, nonInstantWarpPos), true, LOT_VEC3F },
- { "character", LVT_COBJECT_P, offsetof(struct MarioState, character), true, LOT_CHARACTER },
- { "wasNetworkVisible", LVT_U8, offsetof(struct MarioState, wasNetworkVisible), false, LOT_NONE },
- { "minimumBoneY", LVT_F32, offsetof(struct MarioState, minimumBoneY), false, LOT_NONE },
- { "curAnimOffset", LVT_F32, offsetof(struct MarioState, curAnimOffset), false, LOT_NONE },
-};
-
-#define LUA_WARP_NODE_FIELD_COUNT 4
-static struct LuaObjectField sWarpNodeFields[LUA_WARP_NODE_FIELD_COUNT] = {
- { "id", LVT_U8, offsetof(struct WarpNode, id), false, LOT_NONE },
- { "destLevel", LVT_U8, offsetof(struct WarpNode, destLevel), false, LOT_NONE },
- { "destArea", LVT_U8, offsetof(struct WarpNode, destArea), false, LOT_NONE },
- { "destNode", LVT_U8, offsetof(struct WarpNode, destNode), false, LOT_NONE },
-};
-
-#define LUA_OBJECT_WARP_NODE_FIELD_COUNT 3
-static struct LuaObjectField sObjectWarpNodeFields[LUA_OBJECT_WARP_NODE_FIELD_COUNT] = {
- { "node", LVT_COBJECT, offsetof(struct ObjectWarpNode, node), true, LOT_WARPNODE },
- { "object", LVT_COBJECT_P, offsetof(struct ObjectWarpNode, object), true, LOT_OBJECT },
- { "next", LVT_COBJECT_P, offsetof(struct ObjectWarpNode, next), true, LOT_OBJECTWARPNODE },
-};
-
-#define LUA_INSTANT_WARP_FIELD_COUNT 3
-static struct LuaObjectField sInstantWarpFields[LUA_INSTANT_WARP_FIELD_COUNT] = {
- { "id", LVT_U8, offsetof(struct InstantWarp, id), false, LOT_NONE },
- { "area", LVT_U8, offsetof(struct InstantWarp, area), false, LOT_NONE },
- { "displacement", LVT_COBJECT, offsetof(struct InstantWarp, displacement), true, LOT_VEC3S },
-};
-
-#define LUA_SPAWN_INFO_FIELD_COUNT 7
-static struct LuaObjectField sSpawnInfoFields[LUA_SPAWN_INFO_FIELD_COUNT] = {
- { "startPos", LVT_COBJECT, offsetof(struct SpawnInfo, startPos), true, LOT_VEC3S },
- { "startAngle", LVT_COBJECT, offsetof(struct SpawnInfo, startAngle), true, LOT_VEC3S },
- { "areaIndex", LVT_S8, offsetof(struct SpawnInfo, areaIndex), false, LOT_NONE },
- { "activeAreaIndex", LVT_S8, offsetof(struct SpawnInfo, activeAreaIndex), false, LOT_NONE },
- { "behaviorArg", LVT_U32, offsetof(struct SpawnInfo, behaviorArg), false, LOT_NONE },
-// { "behaviorScript", LVT_???, offsetof(struct SpawnInfo, behaviorScript), false, LOT_??? }, <--- UNIMPLEMENTED
- { "unk18", LVT_COBJECT_P, offsetof(struct SpawnInfo, unk18), true, LOT_GRAPHNODE },
- { "next", LVT_COBJECT_P, offsetof(struct SpawnInfo, next), true, LOT_SPAWNINFO },
-};
-
-#define LUA_WHIRLPOOL_FIELD_COUNT 2
-static struct LuaObjectField sWhirlpoolFields[LUA_WHIRLPOOL_FIELD_COUNT] = {
- { "pos", LVT_COBJECT, offsetof(struct Whirlpool, pos), true, LOT_VEC3S },
- { "strength", LVT_S16, offsetof(struct Whirlpool, strength), false, LOT_NONE },
};
#define LUA_AREA_FIELD_COUNT 10
static struct LuaObjectField sAreaFields[LUA_AREA_FIELD_COUNT] = {
- { "index", LVT_S8, offsetof(struct Area, index), false, LOT_NONE },
- { "flags", LVT_S8, offsetof(struct Area, flags), false, LOT_NONE },
- { "terrainType", LVT_U16, offsetof(struct Area, terrainType), false, LOT_NONE },
-// { "unk04", LVT_COBJECT_P, offsetof(struct Area, unk04), true, LOT_??? }, <--- UNIMPLEMENTED
-// { "terrainData", LVT_???, offsetof(struct Area, terrainData), false, LOT_??? }, <--- UNIMPLEMENTED
-// { "surfaceRooms", LVT_???, offsetof(struct Area, surfaceRooms), false, LOT_??? }, <--- UNIMPLEMENTED
-// { "macroObjects", LVT_???, offsetof(struct Area, macroObjects), false, LOT_??? }, <--- UNIMPLEMENTED
- { "warpNodes", LVT_COBJECT_P, offsetof(struct Area, warpNodes), true, LOT_OBJECTWARPNODE },
- { "paintingWarpNodes", LVT_COBJECT_P, offsetof(struct Area, paintingWarpNodes), true, LOT_WARPNODE },
- { "instantWarps", LVT_COBJECT_P, offsetof(struct Area, instantWarps), true, LOT_INSTANTWARP },
- { "objectSpawnInfos", LVT_COBJECT_P, offsetof(struct Area, objectSpawnInfos), true, LOT_SPAWNINFO },
- { "camera", LVT_COBJECT_P, offsetof(struct Area, camera), true, LOT_CAMERA },
-// { "unused28", LVT_COBJECT_P, offsetof(struct Area, unused28), true, LOT_??? }, <--- UNIMPLEMENTED
-// { "whirlpools", LOT_???, offsetof(struct Area, whirlpools), false, LOT_??? }, <--- UNIMPLEMENTED
-// { "dialog", LOT_???, offsetof(struct Area, dialog), false, LOT_??? }, <--- UNIMPLEMENTED
- { "musicParam", LVT_U16, offsetof(struct Area, musicParam), false, LOT_NONE },
- { "musicParam2", LVT_U16, offsetof(struct Area, musicParam2), false, LOT_NONE },
// { "cachedBehaviors", LOT_???, offsetof(struct Area, cachedBehaviors), false, LOT_??? }, <--- UNIMPLEMENTED
// { "cachedPositions", LOT_???, offsetof(struct Area, cachedPositions), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "camera", LVT_COBJECT_P, offsetof(struct Area, camera), true, LOT_CAMERA },
+// { "dialog", LOT_???, offsetof(struct Area, dialog), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "flags", LVT_S8, offsetof(struct Area, flags), false, LOT_NONE },
+ { "index", LVT_S8, offsetof(struct Area, index), false, LOT_NONE },
+ { "instantWarps", LVT_COBJECT_P, offsetof(struct Area, instantWarps), true, LOT_INSTANTWARP },
+// { "macroObjects", LVT_???, offsetof(struct Area, macroObjects), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "musicParam", LVT_U16, offsetof(struct Area, musicParam), false, LOT_NONE },
+ { "musicParam2", LVT_U16, offsetof(struct Area, musicParam2), false, LOT_NONE },
+ { "objectSpawnInfos", LVT_COBJECT_P, offsetof(struct Area, objectSpawnInfos), true, LOT_SPAWNINFO },
+ { "paintingWarpNodes", LVT_COBJECT_P, offsetof(struct Area, paintingWarpNodes), true, LOT_WARPNODE },
+// { "surfaceRooms", LVT_???, offsetof(struct Area, surfaceRooms), false, LOT_??? }, <--- UNIMPLEMENTED
+// { "terrainData", LVT_???, offsetof(struct Area, terrainData), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "terrainType", LVT_U16, offsetof(struct Area, terrainType), false, LOT_NONE },
+// { "unk04", LVT_COBJECT_P, offsetof(struct Area, unk04), true, LOT_??? }, <--- UNIMPLEMENTED
+// { "unused28", LVT_COBJECT_P, offsetof(struct Area, unused28), true, LOT_??? }, <--- UNIMPLEMENTED
+ { "warpNodes", LVT_COBJECT_P, offsetof(struct Area, warpNodes), true, LOT_OBJECTWARPNODE },
+// { "whirlpools", LOT_???, offsetof(struct Area, whirlpools), false, LOT_??? }, <--- UNIMPLEMENTED
};
-#define LUA_WARP_TRANSITION_DATA_FIELD_COUNT 10
-static struct LuaObjectField sWarpTransitionDataFields[LUA_WARP_TRANSITION_DATA_FIELD_COUNT] = {
- { "red", LVT_U8, offsetof(struct WarpTransitionData, red), false, LOT_NONE },
- { "green", LVT_U8, offsetof(struct WarpTransitionData, green), false, LOT_NONE },
- { "blue", LVT_U8, offsetof(struct WarpTransitionData, blue), false, LOT_NONE },
- { "startTexRadius", LVT_S16, offsetof(struct WarpTransitionData, startTexRadius), false, LOT_NONE },
- { "endTexRadius", LVT_S16, offsetof(struct WarpTransitionData, endTexRadius), false, LOT_NONE },
- { "startTexX", LVT_S16, offsetof(struct WarpTransitionData, startTexX), false, LOT_NONE },
- { "startTexY", LVT_S16, offsetof(struct WarpTransitionData, startTexY), false, LOT_NONE },
- { "endTexX", LVT_S16, offsetof(struct WarpTransitionData, endTexX), false, LOT_NONE },
- { "endTexY", LVT_S16, offsetof(struct WarpTransitionData, endTexY), false, LOT_NONE },
- { "texTimer", LVT_S16, offsetof(struct WarpTransitionData, texTimer), false, LOT_NONE },
+#define LUA_CAMERA_FIELD_COUNT 12
+static struct LuaObjectField sCameraFields[LUA_CAMERA_FIELD_COUNT] = {
+ { "areaCenX", LVT_F32, offsetof(struct Camera, areaCenX), false, LOT_NONE },
+ { "areaCenY", LVT_F32, offsetof(struct Camera, areaCenY), false, LOT_NONE },
+ { "areaCenZ", LVT_F32, offsetof(struct Camera, areaCenZ), false, LOT_NONE },
+ { "cutscene", LVT_U8, offsetof(struct Camera, cutscene), false, LOT_NONE },
+ { "defMode", LVT_U8, offsetof(struct Camera, defMode), false, LOT_NONE },
+ { "doorStatus", LVT_U8, offsetof(struct Camera, doorStatus), false, LOT_NONE },
+// { "filler31", LOT_???, offsetof(struct Camera, filler31), false, LOT_??? }, <--- UNIMPLEMENTED
+// { "filler3C", LOT_???, offsetof(struct Camera, filler3C), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "focus", LVT_COBJECT, offsetof(struct Camera, focus), true, LOT_VEC3F },
+ { "mode", LVT_U8, offsetof(struct Camera, mode), false, LOT_NONE },
+ { "nextYaw", LVT_S16, offsetof(struct Camera, nextYaw), false, LOT_NONE },
+ { "pos", LVT_COBJECT, offsetof(struct Camera, pos), true, LOT_VEC3F },
+ { "unusedVec1", LVT_COBJECT, offsetof(struct Camera, unusedVec1), true, LOT_VEC3F },
+ { "yaw", LVT_S16, offsetof(struct Camera, yaw), false, LOT_NONE },
};
-#define LUA_WARP_TRANSITION_FIELD_COUNT 5
-static struct LuaObjectField sWarpTransitionFields[LUA_WARP_TRANSITION_FIELD_COUNT] = {
- { "isActive", LVT_U8, offsetof(struct WarpTransition, isActive), false, LOT_NONE },
- { "type", LVT_U8, offsetof(struct WarpTransition, type), false, LOT_NONE },
- { "time", LVT_U8, offsetof(struct WarpTransition, time), false, LOT_NONE },
- { "pauseRendering", LVT_U8, offsetof(struct WarpTransition, pauseRendering), false, LOT_NONE },
- { "data", LVT_COBJECT, offsetof(struct WarpTransition, data), true, LOT_WARPTRANSITIONDATA },
+#define LUA_CAMERA_FOVSTATUS_FIELD_COUNT 8
+static struct LuaObjectField sCameraFOVStatusFields[LUA_CAMERA_FOVSTATUS_FIELD_COUNT] = {
+ { "decay", LVT_S16, offsetof(struct CameraFOVStatus, decay), false, LOT_NONE },
+ { "fov", LVT_F32, offsetof(struct CameraFOVStatus, fov), false, LOT_NONE },
+ { "fovFunc", LVT_U8, offsetof(struct CameraFOVStatus, fovFunc), false, LOT_NONE },
+ { "fovOffset", LVT_F32, offsetof(struct CameraFOVStatus, fovOffset), false, LOT_NONE },
+ { "shakeAmplitude", LVT_F32, offsetof(struct CameraFOVStatus, shakeAmplitude), false, LOT_NONE },
+ { "shakePhase", LVT_S16, offsetof(struct CameraFOVStatus, shakePhase), false, LOT_NONE },
+ { "shakeSpeed", LVT_S16, offsetof(struct CameraFOVStatus, shakeSpeed), false, LOT_NONE },
+ { "unusedIsSleeping", LVT_U32, offsetof(struct CameraFOVStatus, unusedIsSleeping), false, LOT_NONE },
};
-#define LUA_PLAYER_CAMERA_STATE_FIELD_COUNT 7
-static struct LuaObjectField sPlayerCameraStateFields[LUA_PLAYER_CAMERA_STATE_FIELD_COUNT] = {
- { "action", LVT_U32, offsetof(struct PlayerCameraState, action), false, LOT_NONE },
- { "pos", LVT_COBJECT, offsetof(struct PlayerCameraState, pos), true, LOT_VEC3F },
- { "faceAngle", LVT_COBJECT, offsetof(struct PlayerCameraState, faceAngle), true, LOT_VEC3S },
- { "headRotation", LVT_COBJECT, offsetof(struct PlayerCameraState, headRotation), true, LOT_VEC3S },
- { "unused", LVT_S16, offsetof(struct PlayerCameraState, unused), false, LOT_NONE },
- { "cameraEvent", LVT_S16, offsetof(struct PlayerCameraState, cameraEvent), false, LOT_NONE },
- { "usedObj", LVT_COBJECT_P, offsetof(struct PlayerCameraState, usedObj), true, LOT_OBJECT },
+#define LUA_CAMERA_STORED_INFO_FIELD_COUNT 4
+static struct LuaObjectField sCameraStoredInfoFields[LUA_CAMERA_STORED_INFO_FIELD_COUNT] = {
+ { "cannonYOffset", LVT_F32, offsetof(struct CameraStoredInfo, cannonYOffset), false, LOT_NONE },
+ { "focus", LVT_COBJECT, offsetof(struct CameraStoredInfo, focus), true, LOT_VEC3F },
+ { "panDist", LVT_F32, offsetof(struct CameraStoredInfo, panDist), false, LOT_NONE },
+ { "pos", LVT_COBJECT, offsetof(struct CameraStoredInfo, pos), true, LOT_VEC3F },
};
-#define LUA_TRANSITION_INFO_FIELD_COUNT 9
-static struct LuaObjectField sTransitionInfoFields[LUA_TRANSITION_INFO_FIELD_COUNT] = {
- { "posPitch", LVT_S16, offsetof(struct TransitionInfo, posPitch), false, LOT_NONE },
- { "posYaw", LVT_S16, offsetof(struct TransitionInfo, posYaw), false, LOT_NONE },
- { "posDist", LVT_F32, offsetof(struct TransitionInfo, posDist), false, LOT_NONE },
- { "focPitch", LVT_S16, offsetof(struct TransitionInfo, focPitch), false, LOT_NONE },
- { "focYaw", LVT_S16, offsetof(struct TransitionInfo, focYaw), false, LOT_NONE },
- { "focDist", LVT_F32, offsetof(struct TransitionInfo, focDist), false, LOT_NONE },
- { "framesLeft", LVT_S32, offsetof(struct TransitionInfo, framesLeft), false, LOT_NONE },
- { "marioPos", LVT_COBJECT, offsetof(struct TransitionInfo, marioPos), true, LOT_VEC3F },
- { "pad", LVT_U8, offsetof(struct TransitionInfo, pad), false, LOT_NONE },
+#define LUA_CAMERA_TRIGGER_FIELD_COUNT 8
+static struct LuaObjectField sCameraTriggerFields[LUA_CAMERA_TRIGGER_FIELD_COUNT] = {
+ { "area", LVT_S8, offsetof(struct CameraTrigger, area), false, LOT_NONE },
+ { "boundsX", LVT_S16, offsetof(struct CameraTrigger, boundsX), false, LOT_NONE },
+ { "boundsY", LVT_S16, offsetof(struct CameraTrigger, boundsY), false, LOT_NONE },
+ { "boundsYaw", LVT_S16, offsetof(struct CameraTrigger, boundsYaw), false, LOT_NONE },
+ { "boundsZ", LVT_S16, offsetof(struct CameraTrigger, boundsZ), false, LOT_NONE },
+ { "centerX", LVT_S16, offsetof(struct CameraTrigger, centerX), false, LOT_NONE },
+ { "centerY", LVT_S16, offsetof(struct CameraTrigger, centerY), false, LOT_NONE },
+ { "centerZ", LVT_S16, offsetof(struct CameraTrigger, centerZ), false, LOT_NONE },
+// { "event", LVT_???, offsetof(struct CameraTrigger, event), false, LOT_??? }, <--- UNIMPLEMENTED
+};
+
+#define LUA_CHARACTER_FIELD_COUNT 55
+static struct LuaObjectField sCharacterFields[LUA_CHARACTER_FIELD_COUNT] = {
+ { "animOffsetEnabled", LVT_U8, offsetof(struct Character, animOffsetEnabled), true, LOT_NONE },
+ { "animOffsetFeet", LVT_F32, offsetof(struct Character, animOffsetFeet), true, LOT_NONE },
+ { "animOffsetHand", LVT_F32, offsetof(struct Character, animOffsetHand), true, LOT_NONE },
+ { "animOffsetLowYPoint", LVT_F32, offsetof(struct Character, animOffsetLowYPoint), true, LOT_NONE },
+ { "cameraHudHead", LVT_U32, offsetof(struct Character, cameraHudHead), true, LOT_NONE },
+// { "capEnemyDecalGfx", LVT_???, offsetof(struct Character, capEnemyDecalGfx), true, LOT_??? }, <--- UNIMPLEMENTED
+// { "capEnemyGfx", LVT_???, offsetof(struct Character, capEnemyGfx), true, LOT_??? }, <--- UNIMPLEMENTED
+ { "capEnemyLayer", LVT_U8, offsetof(struct Character, capEnemyLayer), true, LOT_NONE },
+ { "capMetalModelId", LVT_U32, offsetof(struct Character, capMetalModelId), true, LOT_NONE },
+ { "capMetalWingModelId", LVT_U32, offsetof(struct Character, capMetalWingModelId), true, LOT_NONE },
+ { "capModelId", LVT_U32, offsetof(struct Character, capModelId), true, LOT_NONE },
+ { "capWingModelId", LVT_U32, offsetof(struct Character, capWingModelId), true, LOT_NONE },
+// { "hudHead", LVT_???, offsetof(struct Character, hudHead), true, LOT_??? }, <--- UNIMPLEMENTED
+// { "hudHeadTexture", LVT_???, offsetof(struct Character, hudHeadTexture), true, LOT_??? }, <--- UNIMPLEMENTED
+ { "modelId", LVT_U32, offsetof(struct Character, modelId), true, LOT_NONE },
+// { "name", LVT_???, offsetof(struct Character, name), true, LOT_??? }, <--- UNIMPLEMENTED
+ { "soundAttacked", LVT_S32, offsetof(struct Character, soundAttacked), true, LOT_NONE },
+ { "soundCoughing1", LVT_S32, offsetof(struct Character, soundCoughing1), true, LOT_NONE },
+ { "soundCoughing2", LVT_S32, offsetof(struct Character, soundCoughing2), true, LOT_NONE },
+ { "soundCoughing3", LVT_S32, offsetof(struct Character, soundCoughing3), true, LOT_NONE },
+ { "soundDoh", LVT_S32, offsetof(struct Character, soundDoh), true, LOT_NONE },
+ { "soundDrowning", LVT_S32, offsetof(struct Character, soundDrowning), true, LOT_NONE },
+ { "soundDying", LVT_S32, offsetof(struct Character, soundDying), true, LOT_NONE },
+ { "soundEeuh", LVT_S32, offsetof(struct Character, soundEeuh), true, LOT_NONE },
+ { "soundFreqScale", LVT_F32, offsetof(struct Character, soundFreqScale), true, LOT_NONE },
+ { "soundGameOver", LVT_S32, offsetof(struct Character, soundGameOver), true, LOT_NONE },
+ { "soundGroundPoundWah", LVT_S32, offsetof(struct Character, soundGroundPoundWah), true, LOT_NONE },
+ { "soundHaha", LVT_S32, offsetof(struct Character, soundHaha), true, LOT_NONE },
+ { "soundHaha_2", LVT_S32, offsetof(struct Character, soundHaha_2), true, LOT_NONE },
+ { "soundHello", LVT_S32, offsetof(struct Character, soundHello), true, LOT_NONE },
+ { "soundHereWeGo", LVT_S32, offsetof(struct Character, soundHereWeGo), true, LOT_NONE },
+ { "soundHoohoo", LVT_S32, offsetof(struct Character, soundHoohoo), true, LOT_NONE },
+ { "soundHrmm", LVT_S32, offsetof(struct Character, soundHrmm), true, LOT_NONE },
+ { "soundImaTired", LVT_S32, offsetof(struct Character, soundImaTired), true, LOT_NONE },
+ { "soundMamaMia", LVT_S32, offsetof(struct Character, soundMamaMia), true, LOT_NONE },
+ { "soundOnFire", LVT_S32, offsetof(struct Character, soundOnFire), true, LOT_NONE },
+ { "soundOoof", LVT_S32, offsetof(struct Character, soundOoof), true, LOT_NONE },
+ { "soundOoof2", LVT_S32, offsetof(struct Character, soundOoof2), true, LOT_NONE },
+ { "soundPanting", LVT_S32, offsetof(struct Character, soundPanting), true, LOT_NONE },
+ { "soundPantingCold", LVT_S32, offsetof(struct Character, soundPantingCold), true, LOT_NONE },
+ { "soundPressStartToPlay", LVT_S32, offsetof(struct Character, soundPressStartToPlay), true, LOT_NONE },
+ { "soundPunchHoo", LVT_S32, offsetof(struct Character, soundPunchHoo), true, LOT_NONE },
+ { "soundPunchWah", LVT_S32, offsetof(struct Character, soundPunchWah), true, LOT_NONE },
+ { "soundPunchYah", LVT_S32, offsetof(struct Character, soundPunchYah), true, LOT_NONE },
+ { "soundSnoring1", LVT_S32, offsetof(struct Character, soundSnoring1), true, LOT_NONE },
+ { "soundSnoring2", LVT_S32, offsetof(struct Character, soundSnoring2), true, LOT_NONE },
+ { "soundSnoring3", LVT_S32, offsetof(struct Character, soundSnoring3), true, LOT_NONE },
+ { "soundSoLongaBowser", LVT_S32, offsetof(struct Character, soundSoLongaBowser), true, LOT_NONE },
+ { "soundTwirlBounce", LVT_S32, offsetof(struct Character, soundTwirlBounce), true, LOT_NONE },
+ { "soundUh", LVT_S32, offsetof(struct Character, soundUh), true, LOT_NONE },
+ { "soundUh2", LVT_S32, offsetof(struct Character, soundUh2), true, LOT_NONE },
+ { "soundUh2_2", LVT_S32, offsetof(struct Character, soundUh2_2), true, LOT_NONE },
+ { "soundWaaaooow", LVT_S32, offsetof(struct Character, soundWaaaooow), true, LOT_NONE },
+ { "soundWah2", LVT_S32, offsetof(struct Character, soundWah2), true, LOT_NONE },
+ { "soundWhoa", LVT_S32, offsetof(struct Character, soundWhoa), true, LOT_NONE },
+ { "soundYahWahHoo", LVT_S32, offsetof(struct Character, soundYahWahHoo), true, LOT_NONE },
+ { "soundYahoo", LVT_S32, offsetof(struct Character, soundYahoo), true, LOT_NONE },
+ { "soundYahooWahaYippee", LVT_S32, offsetof(struct Character, soundYahooWahaYippee), true, LOT_NONE },
+ { "soundYawning", LVT_S32, offsetof(struct Character, soundYawning), true, LOT_NONE },
+ { "type", LVT_S32, offsetof(struct Character, type), true, LOT_NONE },
+};
+
+#define LUA_CONTROLLER_FIELD_COUNT 10
+static struct LuaObjectField sControllerFields[LUA_CONTROLLER_FIELD_COUNT] = {
+ { "buttonDown", LVT_U16, offsetof(struct Controller, buttonDown), false, LOT_NONE },
+ { "buttonPressed", LVT_U16, offsetof(struct Controller, buttonPressed), false, LOT_NONE },
+// { "controllerData", LVT_???, offsetof(struct Controller, controllerData), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "extStickX", LVT_S16, offsetof(struct Controller, extStickX), false, LOT_NONE },
+ { "extStickY", LVT_S16, offsetof(struct Controller, extStickY), false, LOT_NONE },
+ { "port", LVT_S32, offsetof(struct Controller, port), false, LOT_NONE },
+ { "rawStickX", LVT_S16, offsetof(struct Controller, rawStickX), false, LOT_NONE },
+ { "rawStickY", LVT_S16, offsetof(struct Controller, rawStickY), false, LOT_NONE },
+// { "statusData", LVT_???, offsetof(struct Controller, statusData), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "stickMag", LVT_F32, offsetof(struct Controller, stickMag), false, LOT_NONE },
+ { "stickX", LVT_F32, offsetof(struct Controller, stickX), false, LOT_NONE },
+ { "stickY", LVT_F32, offsetof(struct Controller, stickY), false, LOT_NONE },
+};
+
+#define LUA_CUTSCENE_FIELD_COUNT 1
+static struct LuaObjectField sCutsceneFields[LUA_CUTSCENE_FIELD_COUNT] = {
+ { "duration", LVT_S16, offsetof(struct Cutscene, duration), false, LOT_NONE },
+// { "shot", LVT_???, offsetof(struct Cutscene, shot), false, LOT_??? }, <--- UNIMPLEMENTED
+};
+
+#define LUA_CUTSCENE_SPLINE_POINT_FIELD_COUNT 3
+static struct LuaObjectField sCutsceneSplinePointFields[LUA_CUTSCENE_SPLINE_POINT_FIELD_COUNT] = {
+ { "index", LVT_S8, offsetof(struct CutsceneSplinePoint, index), false, LOT_NONE },
+ { "point", LVT_COBJECT, offsetof(struct CutsceneSplinePoint, point), true, LOT_VEC3S },
+ { "speed", LVT_U8, offsetof(struct CutsceneSplinePoint, speed), false, LOT_NONE },
+};
+
+#define LUA_CUTSCENE_VARIABLE_FIELD_COUNT 5
+static struct LuaObjectField sCutsceneVariableFields[LUA_CUTSCENE_VARIABLE_FIELD_COUNT] = {
+ { "angle", LVT_COBJECT, offsetof(struct CutsceneVariable, angle), true, LOT_VEC3S },
+ { "point", LVT_COBJECT, offsetof(struct CutsceneVariable, point), true, LOT_VEC3F },
+ { "unused1", LVT_S32, offsetof(struct CutsceneVariable, unused1), false, LOT_NONE },
+ { "unused2", LVT_S16, offsetof(struct CutsceneVariable, unused2), false, LOT_NONE },
+ { "unusedPoint", LVT_COBJECT, offsetof(struct CutsceneVariable, unusedPoint), true, LOT_VEC3F },
+};
+
+#define LUA_FLOOR_GEOMETRY_FIELD_COUNT 4
+static struct LuaObjectField sFloorGeometryFields[LUA_FLOOR_GEOMETRY_FIELD_COUNT] = {
+ { "normalX", LVT_F32, offsetof(struct FloorGeometry, normalX), false, LOT_NONE },
+ { "normalY", LVT_F32, offsetof(struct FloorGeometry, normalY), false, LOT_NONE },
+ { "normalZ", LVT_F32, offsetof(struct FloorGeometry, normalZ), false, LOT_NONE },
+ { "originOffset", LVT_F32, offsetof(struct FloorGeometry, originOffset), false, LOT_NONE },
+// { "unused", LOT_???, offsetof(struct FloorGeometry, unused), false, LOT_??? }, <--- UNIMPLEMENTED
+};
+
+#define LUA_GRAPH_NODE_FIELD_COUNT 6
+static struct LuaObjectField sGraphNodeFields[LUA_GRAPH_NODE_FIELD_COUNT] = {
+ { "children", LVT_COBJECT_P, offsetof(struct GraphNode, children), true, LOT_GRAPHNODE },
+ { "flags", LVT_S16, offsetof(struct GraphNode, flags), false, LOT_NONE },
+ { "next", LVT_COBJECT_P, offsetof(struct GraphNode, next), true, LOT_GRAPHNODE },
+ { "parent", LVT_COBJECT_P, offsetof(struct GraphNode, parent), true, LOT_GRAPHNODE },
+ { "prev", LVT_COBJECT_P, offsetof(struct GraphNode, prev), true, LOT_GRAPHNODE },
+ { "type", LVT_S16, offsetof(struct GraphNode, type), false, LOT_NONE },
+};
+
+#define LUA_GRAPH_NODE_OBJECT_FIELD_COUNT 19
+static struct LuaObjectField sGraphNodeObjectFields[LUA_GRAPH_NODE_OBJECT_FIELD_COUNT] = {
+ { "angle", LVT_COBJECT, offsetof(struct GraphNodeObject, angle), true, LOT_VEC3S },
+ { "cameraToObject", LVT_COBJECT, offsetof(struct GraphNodeObject, cameraToObject), true, LOT_VEC3F },
+ { "node", LVT_COBJECT, offsetof(struct GraphNodeObject, node), true, LOT_GRAPHNODE },
+ { "pos", LVT_COBJECT, offsetof(struct GraphNodeObject, pos), true, LOT_VEC3F },
+ { "prevAngle", LVT_COBJECT, offsetof(struct GraphNodeObject, prevAngle), true, LOT_VEC3S },
+ { "prevPos", LVT_COBJECT, offsetof(struct GraphNodeObject, prevPos), true, LOT_VEC3F },
+ { "prevScale", LVT_COBJECT, offsetof(struct GraphNodeObject, prevScale), true, LOT_VEC3F },
+ { "prevScaleTimestamp", LVT_U32, offsetof(struct GraphNodeObject, prevScaleTimestamp), false, LOT_NONE },
+ { "prevShadowPos", LVT_COBJECT, offsetof(struct GraphNodeObject, prevShadowPos), true, LOT_VEC3F },
+ { "prevShadowPosTimestamp", LVT_U32, offsetof(struct GraphNodeObject, prevShadowPosTimestamp), false, LOT_NONE },
+// { "prevThrowMatrix", LVT_???, offsetof(struct GraphNodeObject, prevThrowMatrix), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "prevThrowMatrixTimestamp", LVT_U32, offsetof(struct GraphNodeObject, prevThrowMatrixTimestamp), false, LOT_NONE },
+ { "prevTimestamp", LVT_U32, offsetof(struct GraphNodeObject, prevTimestamp), false, LOT_NONE },
+ { "scale", LVT_COBJECT, offsetof(struct GraphNodeObject, scale), true, LOT_VEC3F },
+ { "sharedChild", LVT_COBJECT_P, offsetof(struct GraphNodeObject, sharedChild), true, LOT_GRAPHNODE },
+ { "skipInterpolationTimestamp", LVT_U32, offsetof(struct GraphNodeObject, skipInterpolationTimestamp), false, LOT_NONE },
+// { "throwMatrix", LVT_???, offsetof(struct GraphNodeObject, throwMatrix), false, LOT_??? }, <--- UNIMPLEMENTED
+// { "throwMatrixInterpolated", LVT_???, offsetof(struct GraphNodeObject, throwMatrixInterpolated), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "unk18", LVT_S8, offsetof(struct GraphNodeObject, unk18), false, LOT_NONE },
+ { "unk19", LVT_S8, offsetof(struct GraphNodeObject, unk19), false, LOT_NONE },
+ { "animInfo", LVT_COBJECT, offsetof(struct GraphNodeObject, unk38), true, LOT_GRAPHNODEOBJECT_SUB },
+ { "unk4C", LVT_COBJECT_P, offsetof(struct GraphNodeObject, unk4C), true, LOT_SPAWNINFO },
+};
+
+#define LUA_GRAPH_NODE_OBJECT_SUB_FIELD_COUNT 11
+static struct LuaObjectField sGraphNodeObject_subFields[LUA_GRAPH_NODE_OBJECT_SUB_FIELD_COUNT] = {
+ { "animAccel", LVT_S32, offsetof(struct GraphNodeObject_sub, animAccel), false, LOT_NONE },
+ { "animFrame", LVT_S16, offsetof(struct GraphNodeObject_sub, animFrame), false, LOT_NONE },
+ { "animFrameAccelAssist", LVT_S32, offsetof(struct GraphNodeObject_sub, animFrameAccelAssist), false, LOT_NONE },
+ { "animID", LVT_S16, offsetof(struct GraphNodeObject_sub, animID), false, LOT_NONE },
+ { "animTimer", LVT_U16, offsetof(struct GraphNodeObject_sub, animTimer), false, LOT_NONE },
+ { "animYTrans", LVT_S16, offsetof(struct GraphNodeObject_sub, animYTrans), false, LOT_NONE },
+ { "curAnim", LVT_COBJECT_P, offsetof(struct GraphNodeObject_sub, curAnim), true, LOT_ANIMATION },
+ { "prevAnimFrame", LVT_S16, offsetof(struct GraphNodeObject_sub, prevAnimFrame), false, LOT_NONE },
+ { "prevAnimFrameTimestamp", LVT_U32, offsetof(struct GraphNodeObject_sub, prevAnimFrameTimestamp), false, LOT_NONE },
+ { "prevAnimID", LVT_S16, offsetof(struct GraphNodeObject_sub, prevAnimID), false, LOT_NONE },
+ { "prevAnimPtr", LVT_COBJECT_P, offsetof(struct GraphNodeObject_sub, prevAnimPtr), true, LOT_ANIMATION },
};
#define LUA_HANDHELD_SHAKE_POINT_FIELD_COUNT 3
@@ -394,289 +263,420 @@ static struct LuaObjectField sHandheldShakePointFields[LUA_HANDHELD_SHAKE_POINT_
{ "point", LVT_COBJECT, offsetof(struct HandheldShakePoint, point), true, LOT_VEC3S },
};
-#define LUA_CAMERA_TRIGGER_FIELD_COUNT 8
-static struct LuaObjectField sCameraTriggerFields[LUA_CAMERA_TRIGGER_FIELD_COUNT] = {
- { "area", LVT_S8, offsetof(struct CameraTrigger, area), false, LOT_NONE },
-// { "event", LVT_???, offsetof(struct CameraTrigger, event), false, LOT_??? }, <--- UNIMPLEMENTED
- { "centerX", LVT_S16, offsetof(struct CameraTrigger, centerX), false, LOT_NONE },
- { "centerY", LVT_S16, offsetof(struct CameraTrigger, centerY), false, LOT_NONE },
- { "centerZ", LVT_S16, offsetof(struct CameraTrigger, centerZ), false, LOT_NONE },
- { "boundsX", LVT_S16, offsetof(struct CameraTrigger, boundsX), false, LOT_NONE },
- { "boundsY", LVT_S16, offsetof(struct CameraTrigger, boundsY), false, LOT_NONE },
- { "boundsZ", LVT_S16, offsetof(struct CameraTrigger, boundsZ), false, LOT_NONE },
- { "boundsYaw", LVT_S16, offsetof(struct CameraTrigger, boundsYaw), false, LOT_NONE },
-};
-
-#define LUA_CUTSCENE_FIELD_COUNT 1
-static struct LuaObjectField sCutsceneFields[LUA_CUTSCENE_FIELD_COUNT] = {
-// { "shot", LVT_???, offsetof(struct Cutscene, shot), false, LOT_??? }, <--- UNIMPLEMENTED
- { "duration", LVT_S16, offsetof(struct Cutscene, duration), false, LOT_NONE },
-};
-
-#define LUA_CAMERA_FOVSTATUS_FIELD_COUNT 8
-static struct LuaObjectField sCameraFOVStatusFields[LUA_CAMERA_FOVSTATUS_FIELD_COUNT] = {
- { "fovFunc", LVT_U8, offsetof(struct CameraFOVStatus, fovFunc), false, LOT_NONE },
- { "fov", LVT_F32, offsetof(struct CameraFOVStatus, fov), false, LOT_NONE },
- { "fovOffset", LVT_F32, offsetof(struct CameraFOVStatus, fovOffset), false, LOT_NONE },
- { "unusedIsSleeping", LVT_U32, offsetof(struct CameraFOVStatus, unusedIsSleeping), false, LOT_NONE },
- { "shakeAmplitude", LVT_F32, offsetof(struct CameraFOVStatus, shakeAmplitude), false, LOT_NONE },
- { "shakePhase", LVT_S16, offsetof(struct CameraFOVStatus, shakePhase), false, LOT_NONE },
- { "shakeSpeed", LVT_S16, offsetof(struct CameraFOVStatus, shakeSpeed), false, LOT_NONE },
- { "decay", LVT_S16, offsetof(struct CameraFOVStatus, decay), false, LOT_NONE },
-};
-
-#define LUA_CUTSCENE_SPLINE_POINT_FIELD_COUNT 3
-static struct LuaObjectField sCutsceneSplinePointFields[LUA_CUTSCENE_SPLINE_POINT_FIELD_COUNT] = {
- { "index", LVT_S8, offsetof(struct CutsceneSplinePoint, index), false, LOT_NONE },
- { "speed", LVT_U8, offsetof(struct CutsceneSplinePoint, speed), false, LOT_NONE },
- { "point", LVT_COBJECT, offsetof(struct CutsceneSplinePoint, point), true, LOT_VEC3S },
-};
-
-#define LUA_PLAYER_GEOMETRY_FIELD_COUNT 13
-static struct LuaObjectField sPlayerGeometryFields[LUA_PLAYER_GEOMETRY_FIELD_COUNT] = {
- { "currFloor", LVT_COBJECT_P, offsetof(struct PlayerGeometry, currFloor), true, LOT_SURFACE },
- { "currFloorHeight", LVT_F32, offsetof(struct PlayerGeometry, currFloorHeight), false, LOT_NONE },
- { "currFloorType", LVT_S16, offsetof(struct PlayerGeometry, currFloorType), false, LOT_NONE },
- { "currCeil", LVT_COBJECT_P, offsetof(struct PlayerGeometry, currCeil), true, LOT_SURFACE },
- { "currCeilType", LVT_S16, offsetof(struct PlayerGeometry, currCeilType), false, LOT_NONE },
- { "currCeilHeight", LVT_F32, offsetof(struct PlayerGeometry, currCeilHeight), false, LOT_NONE },
- { "prevFloor", LVT_COBJECT_P, offsetof(struct PlayerGeometry, prevFloor), true, LOT_SURFACE },
- { "prevFloorHeight", LVT_F32, offsetof(struct PlayerGeometry, prevFloorHeight), false, LOT_NONE },
- { "prevFloorType", LVT_S16, offsetof(struct PlayerGeometry, prevFloorType), false, LOT_NONE },
- { "prevCeil", LVT_COBJECT_P, offsetof(struct PlayerGeometry, prevCeil), true, LOT_SURFACE },
- { "prevCeilHeight", LVT_F32, offsetof(struct PlayerGeometry, prevCeilHeight), false, LOT_NONE },
- { "prevCeilType", LVT_S16, offsetof(struct PlayerGeometry, prevCeilType), false, LOT_NONE },
- { "waterHeight", LVT_F32, offsetof(struct PlayerGeometry, waterHeight), false, LOT_NONE },
-};
-
-#define LUA_LINEAR_TRANSITION_POINT_FIELD_COUNT 5
-static struct LuaObjectField sLinearTransitionPointFields[LUA_LINEAR_TRANSITION_POINT_FIELD_COUNT] = {
- { "focus", LVT_COBJECT, offsetof(struct LinearTransitionPoint, focus), true, LOT_VEC3F },
- { "pos", LVT_COBJECT, offsetof(struct LinearTransitionPoint, pos), true, LOT_VEC3F },
- { "dist", LVT_F32, offsetof(struct LinearTransitionPoint, dist), false, LOT_NONE },
- { "pitch", LVT_S16, offsetof(struct LinearTransitionPoint, pitch), false, LOT_NONE },
- { "yaw", LVT_S16, offsetof(struct LinearTransitionPoint, yaw), false, LOT_NONE },
-};
-
-#define LUA_MODE_TRANSITION_INFO_FIELD_COUNT 6
-static struct LuaObjectField sModeTransitionInfoFields[LUA_MODE_TRANSITION_INFO_FIELD_COUNT] = {
- { "newMode", LVT_S16, offsetof(struct ModeTransitionInfo, newMode), false, LOT_NONE },
- { "lastMode", LVT_S16, offsetof(struct ModeTransitionInfo, lastMode), false, LOT_NONE },
- { "max", LVT_S16, offsetof(struct ModeTransitionInfo, max), false, LOT_NONE },
- { "frame", LVT_S16, offsetof(struct ModeTransitionInfo, frame), false, LOT_NONE },
- { "transitionStart", LVT_COBJECT, offsetof(struct ModeTransitionInfo, transitionStart), true, LOT_LINEARTRANSITIONPOINT },
- { "transitionEnd", LVT_COBJECT, offsetof(struct ModeTransitionInfo, transitionEnd), true, LOT_LINEARTRANSITIONPOINT },
-};
-
-#define LUA_PARALLEL_TRACKING_POINT_FIELD_COUNT 4
-static struct LuaObjectField sParallelTrackingPointFields[LUA_PARALLEL_TRACKING_POINT_FIELD_COUNT] = {
- { "startOfPath", LVT_S16, offsetof(struct ParallelTrackingPoint, startOfPath), false, LOT_NONE },
- { "pos", LVT_COBJECT, offsetof(struct ParallelTrackingPoint, pos), true, LOT_VEC3F },
- { "distThresh", LVT_F32, offsetof(struct ParallelTrackingPoint, distThresh), false, LOT_NONE },
- { "zoom", LVT_F32, offsetof(struct ParallelTrackingPoint, zoom), false, LOT_NONE },
-};
-
-#define LUA_CAMERA_STORED_INFO_FIELD_COUNT 4
-static struct LuaObjectField sCameraStoredInfoFields[LUA_CAMERA_STORED_INFO_FIELD_COUNT] = {
- { "pos", LVT_COBJECT, offsetof(struct CameraStoredInfo, pos), true, LOT_VEC3F },
- { "focus", LVT_COBJECT, offsetof(struct CameraStoredInfo, focus), true, LOT_VEC3F },
- { "panDist", LVT_F32, offsetof(struct CameraStoredInfo, panDist), false, LOT_NONE },
- { "cannonYOffset", LVT_F32, offsetof(struct CameraStoredInfo, cannonYOffset), false, LOT_NONE },
-};
-
-#define LUA_CUTSCENE_VARIABLE_FIELD_COUNT 5
-static struct LuaObjectField sCutsceneVariableFields[LUA_CUTSCENE_VARIABLE_FIELD_COUNT] = {
- { "unused1", LVT_S32, offsetof(struct CutsceneVariable, unused1), false, LOT_NONE },
- { "point", LVT_COBJECT, offsetof(struct CutsceneVariable, point), true, LOT_VEC3F },
- { "unusedPoint", LVT_COBJECT, offsetof(struct CutsceneVariable, unusedPoint), true, LOT_VEC3F },
- { "angle", LVT_COBJECT, offsetof(struct CutsceneVariable, angle), true, LOT_VEC3S },
- { "unused2", LVT_S16, offsetof(struct CutsceneVariable, unused2), false, LOT_NONE },
-};
-
-#define LUA_CAMERA_FIELD_COUNT 12
-static struct LuaObjectField sCameraFields[LUA_CAMERA_FIELD_COUNT] = {
- { "mode", LVT_U8, offsetof(struct Camera, mode), false, LOT_NONE },
- { "defMode", LVT_U8, offsetof(struct Camera, defMode), false, LOT_NONE },
- { "yaw", LVT_S16, offsetof(struct Camera, yaw), false, LOT_NONE },
- { "focus", LVT_COBJECT, offsetof(struct Camera, focus), true, LOT_VEC3F },
- { "pos", LVT_COBJECT, offsetof(struct Camera, pos), true, LOT_VEC3F },
- { "unusedVec1", LVT_COBJECT, offsetof(struct Camera, unusedVec1), true, LOT_VEC3F },
- { "areaCenX", LVT_F32, offsetof(struct Camera, areaCenX), false, LOT_NONE },
- { "areaCenZ", LVT_F32, offsetof(struct Camera, areaCenZ), false, LOT_NONE },
- { "cutscene", LVT_U8, offsetof(struct Camera, cutscene), false, LOT_NONE },
-// { "filler31", LOT_???, offsetof(struct Camera, filler31), false, LOT_??? }, <--- UNIMPLEMENTED
- { "nextYaw", LVT_S16, offsetof(struct Camera, nextYaw), false, LOT_NONE },
-// { "filler3C", LOT_???, offsetof(struct Camera, filler3C), false, LOT_??? }, <--- UNIMPLEMENTED
- { "doorStatus", LVT_U8, offsetof(struct Camera, doorStatus), false, LOT_NONE },
- { "areaCenY", LVT_F32, offsetof(struct Camera, areaCenY), false, LOT_NONE },
+#define LUA_INSTANT_WARP_FIELD_COUNT 3
+static struct LuaObjectField sInstantWarpFields[LUA_INSTANT_WARP_FIELD_COUNT] = {
+ { "area", LVT_U8, offsetof(struct InstantWarp, area), false, LOT_NONE },
+ { "displacement", LVT_COBJECT, offsetof(struct InstantWarp, displacement), true, LOT_VEC3S },
+ { "id", LVT_U8, offsetof(struct InstantWarp, id), false, LOT_NONE },
};
#define LUA_LAKITU_STATE_FIELD_COUNT 35
static struct LuaObjectField sLakituStateFields[LUA_LAKITU_STATE_FIELD_COUNT] = {
{ "curFocus", LVT_COBJECT, offsetof(struct LakituState, curFocus), true, LOT_VEC3F },
{ "curPos", LVT_COBJECT, offsetof(struct LakituState, curPos), true, LOT_VEC3F },
- { "goalFocus", LVT_COBJECT, offsetof(struct LakituState, goalFocus), true, LOT_VEC3F },
- { "goalPos", LVT_COBJECT, offsetof(struct LakituState, goalPos), true, LOT_VEC3F },
-// { "filler30", LOT_???, offsetof(struct LakituState, filler30), false, LOT_??? }, <--- UNIMPLEMENTED
- { "mode", LVT_U8, offsetof(struct LakituState, mode), false, LOT_NONE },
{ "defMode", LVT_U8, offsetof(struct LakituState, defMode), false, LOT_NONE },
+// { "filler30", LOT_???, offsetof(struct LakituState, filler30), false, LOT_??? }, <--- UNIMPLEMENTED
// { "filler3E", LOT_???, offsetof(struct LakituState, filler3E), false, LOT_??? }, <--- UNIMPLEMENTED
- { "focusDistance", LVT_F32, offsetof(struct LakituState, focusDistance), false, LOT_NONE },
- { "oldPitch", LVT_S16, offsetof(struct LakituState, oldPitch), false, LOT_NONE },
- { "oldYaw", LVT_S16, offsetof(struct LakituState, oldYaw), false, LOT_NONE },
- { "oldRoll", LVT_S16, offsetof(struct LakituState, oldRoll), false, LOT_NONE },
- { "shakeMagnitude", LVT_COBJECT, offsetof(struct LakituState, shakeMagnitude), true, LOT_VEC3S },
- { "shakePitchPhase", LVT_S16, offsetof(struct LakituState, shakePitchPhase), false, LOT_NONE },
- { "shakePitchVel", LVT_S16, offsetof(struct LakituState, shakePitchVel), false, LOT_NONE },
- { "shakePitchDecay", LVT_S16, offsetof(struct LakituState, shakePitchDecay), false, LOT_NONE },
- { "unusedVec1", LVT_COBJECT, offsetof(struct LakituState, unusedVec1), true, LOT_VEC3F },
- { "unusedVec2", LVT_COBJECT, offsetof(struct LakituState, unusedVec2), true, LOT_VEC3S },
// { "filler72", LOT_???, offsetof(struct LakituState, filler72), false, LOT_??? }, <--- UNIMPLEMENTED
- { "roll", LVT_S16, offsetof(struct LakituState, roll), false, LOT_NONE },
- { "yaw", LVT_S16, offsetof(struct LakituState, yaw), false, LOT_NONE },
- { "nextYaw", LVT_S16, offsetof(struct LakituState, nextYaw), false, LOT_NONE },
- { "focus", LVT_COBJECT, offsetof(struct LakituState, focus), true, LOT_VEC3F },
- { "pos", LVT_COBJECT, offsetof(struct LakituState, pos), true, LOT_VEC3F },
- { "shakeRollPhase", LVT_S16, offsetof(struct LakituState, shakeRollPhase), false, LOT_NONE },
- { "shakeRollVel", LVT_S16, offsetof(struct LakituState, shakeRollVel), false, LOT_NONE },
- { "shakeRollDecay", LVT_S16, offsetof(struct LakituState, shakeRollDecay), false, LOT_NONE },
- { "shakeYawPhase", LVT_S16, offsetof(struct LakituState, shakeYawPhase), false, LOT_NONE },
- { "shakeYawVel", LVT_S16, offsetof(struct LakituState, shakeYawVel), false, LOT_NONE },
- { "shakeYawDecay", LVT_S16, offsetof(struct LakituState, shakeYawDecay), false, LOT_NONE },
{ "focHSpeed", LVT_F32, offsetof(struct LakituState, focHSpeed), false, LOT_NONE },
{ "focVSpeed", LVT_F32, offsetof(struct LakituState, focVSpeed), false, LOT_NONE },
- { "posHSpeed", LVT_F32, offsetof(struct LakituState, posHSpeed), false, LOT_NONE },
- { "posVSpeed", LVT_F32, offsetof(struct LakituState, posVSpeed), false, LOT_NONE },
+ { "focus", LVT_COBJECT, offsetof(struct LakituState, focus), true, LOT_VEC3F },
+ { "focusDistance", LVT_F32, offsetof(struct LakituState, focusDistance), false, LOT_NONE },
+ { "goalFocus", LVT_COBJECT, offsetof(struct LakituState, goalFocus), true, LOT_VEC3F },
+ { "goalPos", LVT_COBJECT, offsetof(struct LakituState, goalPos), true, LOT_VEC3F },
{ "keyDanceRoll", LVT_S16, offsetof(struct LakituState, keyDanceRoll), false, LOT_NONE },
{ "lastFrameAction", LVT_U32, offsetof(struct LakituState, lastFrameAction), false, LOT_NONE },
- { "unused", LVT_S16, offsetof(struct LakituState, unused), false, LOT_NONE },
+ { "mode", LVT_U8, offsetof(struct LakituState, mode), false, LOT_NONE },
+ { "nextYaw", LVT_S16, offsetof(struct LakituState, nextYaw), false, LOT_NONE },
+ { "oldPitch", LVT_S16, offsetof(struct LakituState, oldPitch), false, LOT_NONE },
+ { "oldRoll", LVT_S16, offsetof(struct LakituState, oldRoll), false, LOT_NONE },
+ { "oldYaw", LVT_S16, offsetof(struct LakituState, oldYaw), false, LOT_NONE },
+ { "pos", LVT_COBJECT, offsetof(struct LakituState, pos), true, LOT_VEC3F },
+ { "posHSpeed", LVT_F32, offsetof(struct LakituState, posHSpeed), false, LOT_NONE },
+ { "posVSpeed", LVT_F32, offsetof(struct LakituState, posVSpeed), false, LOT_NONE },
+ { "roll", LVT_S16, offsetof(struct LakituState, roll), false, LOT_NONE },
+ { "shakeMagnitude", LVT_COBJECT, offsetof(struct LakituState, shakeMagnitude), true, LOT_VEC3S },
+ { "shakePitchDecay", LVT_S16, offsetof(struct LakituState, shakePitchDecay), false, LOT_NONE },
+ { "shakePitchPhase", LVT_S16, offsetof(struct LakituState, shakePitchPhase), false, LOT_NONE },
+ { "shakePitchVel", LVT_S16, offsetof(struct LakituState, shakePitchVel), false, LOT_NONE },
+ { "shakeRollDecay", LVT_S16, offsetof(struct LakituState, shakeRollDecay), false, LOT_NONE },
+ { "shakeRollPhase", LVT_S16, offsetof(struct LakituState, shakeRollPhase), false, LOT_NONE },
+ { "shakeRollVel", LVT_S16, offsetof(struct LakituState, shakeRollVel), false, LOT_NONE },
+ { "shakeYawDecay", LVT_S16, offsetof(struct LakituState, shakeYawDecay), false, LOT_NONE },
+ { "shakeYawPhase", LVT_S16, offsetof(struct LakituState, shakeYawPhase), false, LOT_NONE },
+ { "shakeYawVel", LVT_S16, offsetof(struct LakituState, shakeYawVel), false, LOT_NONE },
{ "skipCameraInterpolationTimestamp", LVT_U32, offsetof(struct LakituState, skipCameraInterpolationTimestamp), false, LOT_NONE },
+ { "unused", LVT_S16, offsetof(struct LakituState, unused), false, LOT_NONE },
+ { "unusedVec1", LVT_COBJECT, offsetof(struct LakituState, unusedVec1), true, LOT_VEC3F },
+ { "unusedVec2", LVT_COBJECT, offsetof(struct LakituState, unusedVec2), true, LOT_VEC3S },
+ { "yaw", LVT_S16, offsetof(struct LakituState, yaw), false, LOT_NONE },
};
-#define LUA_CHARACTER_FIELD_COUNT 55
-static struct LuaObjectField sCharacterFields[LUA_CHARACTER_FIELD_COUNT] = {
- { "type", LVT_S32, offsetof(struct Character, type), true, LOT_NONE },
-// { "name", LVT_???, offsetof(struct Character, name), true, LOT_??? }, <--- UNIMPLEMENTED
-// { "hudHead", LVT_???, offsetof(struct Character, hudHead), true, LOT_??? }, <--- UNIMPLEMENTED
-// { "hudHeadTexture", LVT_???, offsetof(struct Character, hudHeadTexture), true, LOT_??? }, <--- UNIMPLEMENTED
- { "cameraHudHead", LVT_U32, offsetof(struct Character, cameraHudHead), true, LOT_NONE },
- { "modelId", LVT_U32, offsetof(struct Character, modelId), true, LOT_NONE },
- { "capModelId", LVT_U32, offsetof(struct Character, capModelId), true, LOT_NONE },
- { "capMetalModelId", LVT_U32, offsetof(struct Character, capMetalModelId), true, LOT_NONE },
- { "capWingModelId", LVT_U32, offsetof(struct Character, capWingModelId), true, LOT_NONE },
- { "capMetalWingModelId", LVT_U32, offsetof(struct Character, capMetalWingModelId), true, LOT_NONE },
- { "capEnemyLayer", LVT_U8, offsetof(struct Character, capEnemyLayer), true, LOT_NONE },
-// { "capEnemyGfx", LVT_???, offsetof(struct Character, capEnemyGfx), true, LOT_??? }, <--- UNIMPLEMENTED
-// { "capEnemyDecalGfx", LVT_???, offsetof(struct Character, capEnemyDecalGfx), true, LOT_??? }, <--- UNIMPLEMENTED
- { "animOffsetEnabled", LVT_U8, offsetof(struct Character, animOffsetEnabled), true, LOT_NONE },
- { "animOffsetLowYPoint", LVT_F32, offsetof(struct Character, animOffsetLowYPoint), true, LOT_NONE },
- { "animOffsetFeet", LVT_F32, offsetof(struct Character, animOffsetFeet), true, LOT_NONE },
- { "animOffsetHand", LVT_F32, offsetof(struct Character, animOffsetHand), true, LOT_NONE },
- { "soundFreqScale", LVT_F32, offsetof(struct Character, soundFreqScale), true, LOT_NONE },
- { "soundYahWahHoo", LVT_S32, offsetof(struct Character, soundYahWahHoo), true, LOT_NONE },
- { "soundHoohoo", LVT_S32, offsetof(struct Character, soundHoohoo), true, LOT_NONE },
- { "soundYahoo", LVT_S32, offsetof(struct Character, soundYahoo), true, LOT_NONE },
- { "soundUh", LVT_S32, offsetof(struct Character, soundUh), true, LOT_NONE },
- { "soundHrmm", LVT_S32, offsetof(struct Character, soundHrmm), true, LOT_NONE },
- { "soundWah2", LVT_S32, offsetof(struct Character, soundWah2), true, LOT_NONE },
- { "soundWhoa", LVT_S32, offsetof(struct Character, soundWhoa), true, LOT_NONE },
- { "soundEeuh", LVT_S32, offsetof(struct Character, soundEeuh), true, LOT_NONE },
- { "soundAttacked", LVT_S32, offsetof(struct Character, soundAttacked), true, LOT_NONE },
- { "soundOoof", LVT_S32, offsetof(struct Character, soundOoof), true, LOT_NONE },
- { "soundOoof2", LVT_S32, offsetof(struct Character, soundOoof2), true, LOT_NONE },
- { "soundHereWeGo", LVT_S32, offsetof(struct Character, soundHereWeGo), true, LOT_NONE },
- { "soundYawning", LVT_S32, offsetof(struct Character, soundYawning), true, LOT_NONE },
- { "soundSnoring1", LVT_S32, offsetof(struct Character, soundSnoring1), true, LOT_NONE },
- { "soundSnoring2", LVT_S32, offsetof(struct Character, soundSnoring2), true, LOT_NONE },
- { "soundWaaaooow", LVT_S32, offsetof(struct Character, soundWaaaooow), true, LOT_NONE },
- { "soundHaha", LVT_S32, offsetof(struct Character, soundHaha), true, LOT_NONE },
- { "soundHaha_2", LVT_S32, offsetof(struct Character, soundHaha_2), true, LOT_NONE },
- { "soundUh2", LVT_S32, offsetof(struct Character, soundUh2), true, LOT_NONE },
- { "soundUh2_2", LVT_S32, offsetof(struct Character, soundUh2_2), true, LOT_NONE },
- { "soundOnFire", LVT_S32, offsetof(struct Character, soundOnFire), true, LOT_NONE },
- { "soundDying", LVT_S32, offsetof(struct Character, soundDying), true, LOT_NONE },
- { "soundPantingCold", LVT_S32, offsetof(struct Character, soundPantingCold), true, LOT_NONE },
- { "soundPanting", LVT_S32, offsetof(struct Character, soundPanting), true, LOT_NONE },
- { "soundCoughing1", LVT_S32, offsetof(struct Character, soundCoughing1), true, LOT_NONE },
- { "soundCoughing2", LVT_S32, offsetof(struct Character, soundCoughing2), true, LOT_NONE },
- { "soundCoughing3", LVT_S32, offsetof(struct Character, soundCoughing3), true, LOT_NONE },
- { "soundPunchYah", LVT_S32, offsetof(struct Character, soundPunchYah), true, LOT_NONE },
- { "soundPunchHoo", LVT_S32, offsetof(struct Character, soundPunchHoo), true, LOT_NONE },
- { "soundMamaMia", LVT_S32, offsetof(struct Character, soundMamaMia), true, LOT_NONE },
- { "soundGroundPoundWah", LVT_S32, offsetof(struct Character, soundGroundPoundWah), true, LOT_NONE },
- { "soundDrowning", LVT_S32, offsetof(struct Character, soundDrowning), true, LOT_NONE },
- { "soundPunchWah", LVT_S32, offsetof(struct Character, soundPunchWah), true, LOT_NONE },
- { "soundYahooWahaYippee", LVT_S32, offsetof(struct Character, soundYahooWahaYippee), true, LOT_NONE },
- { "soundDoh", LVT_S32, offsetof(struct Character, soundDoh), true, LOT_NONE },
- { "soundGameOver", LVT_S32, offsetof(struct Character, soundGameOver), true, LOT_NONE },
- { "soundHello", LVT_S32, offsetof(struct Character, soundHello), true, LOT_NONE },
- { "soundPressStartToPlay", LVT_S32, offsetof(struct Character, soundPressStartToPlay), true, LOT_NONE },
- { "soundTwirlBounce", LVT_S32, offsetof(struct Character, soundTwirlBounce), true, LOT_NONE },
- { "soundSnoring3", LVT_S32, offsetof(struct Character, soundSnoring3), true, LOT_NONE },
- { "soundSoLongaBowser", LVT_S32, offsetof(struct Character, soundSoLongaBowser), true, LOT_NONE },
- { "soundImaTired", LVT_S32, offsetof(struct Character, soundImaTired), true, LOT_NONE },
+#define LUA_LINEAR_TRANSITION_POINT_FIELD_COUNT 5
+static struct LuaObjectField sLinearTransitionPointFields[LUA_LINEAR_TRANSITION_POINT_FIELD_COUNT] = {
+ { "dist", LVT_F32, offsetof(struct LinearTransitionPoint, dist), false, LOT_NONE },
+ { "focus", LVT_COBJECT, offsetof(struct LinearTransitionPoint, focus), true, LOT_VEC3F },
+ { "pitch", LVT_S16, offsetof(struct LinearTransitionPoint, pitch), false, LOT_NONE },
+ { "pos", LVT_COBJECT, offsetof(struct LinearTransitionPoint, pos), true, LOT_VEC3F },
+ { "yaw", LVT_S16, offsetof(struct LinearTransitionPoint, yaw), false, LOT_NONE },
+};
+
+#define LUA_MARIO_ANIMATION_FIELD_COUNT 1
+static struct LuaObjectField sMarioAnimationFields[LUA_MARIO_ANIMATION_FIELD_COUNT] = {
+// { "animDmaTable", LVT_COBJECT_P, offsetof(struct MarioAnimation, animDmaTable), true, LOT_??? }, <--- UNIMPLEMENTED
+// { "currentAnimAddr", LVT_???, offsetof(struct MarioAnimation, currentAnimAddr), false, LOT_??? }, <--- UNIMPLEMENTED
+// { "padding", LOT_???, offsetof(struct MarioAnimation, padding), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "targetAnim", LVT_COBJECT_P, offsetof(struct MarioAnimation, targetAnim), true, LOT_ANIMATION },
+};
+
+#define LUA_MARIO_BODY_STATE_FIELD_COUNT 12
+static struct LuaObjectField sMarioBodyStateFields[LUA_MARIO_BODY_STATE_FIELD_COUNT] = {
+ { "action", LVT_U32, offsetof(struct MarioBodyState, action), false, LOT_NONE },
+ { "capState", LVT_S8, offsetof(struct MarioBodyState, capState), false, LOT_NONE },
+ { "eyeState", LVT_S8, offsetof(struct MarioBodyState, eyeState), false, LOT_NONE },
+ { "grabPos", LVT_S8, offsetof(struct MarioBodyState, grabPos), false, LOT_NONE },
+// { "handFootPos", LOT_???, offsetof(struct MarioBodyState, handFootPos), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "handState", LVT_S8, offsetof(struct MarioBodyState, handState), false, LOT_NONE },
+ { "headAngle", LVT_COBJECT, offsetof(struct MarioBodyState, headAngle), true, LOT_VEC3S },
+ { "heldObjLastPosition", LVT_COBJECT, offsetof(struct MarioBodyState, heldObjLastPosition), true, LOT_VEC3F },
+ { "modelState", LVT_S16, offsetof(struct MarioBodyState, modelState), false, LOT_NONE },
+ { "punchState", LVT_U8, offsetof(struct MarioBodyState, punchState), false, LOT_NONE },
+ { "torsoAngle", LVT_COBJECT, offsetof(struct MarioBodyState, torsoAngle), true, LOT_VEC3S },
+ { "torsoPos", LVT_COBJECT, offsetof(struct MarioBodyState, torsoPos), true, LOT_VEC3F },
+ { "wingFlutter", LVT_S8, offsetof(struct MarioBodyState, wingFlutter), false, LOT_NONE },
+};
+
+#define LUA_MARIO_STATE_FIELD_COUNT 72
+static struct LuaObjectField sMarioStateFields[LUA_MARIO_STATE_FIELD_COUNT] = {
+ { "action", LVT_U32, offsetof(struct MarioState, action), false, LOT_NONE },
+ { "actionArg", LVT_U32, offsetof(struct MarioState, actionArg), false, LOT_NONE },
+ { "actionState", LVT_U16, offsetof(struct MarioState, actionState), false, LOT_NONE },
+ { "actionTimer", LVT_U16, offsetof(struct MarioState, actionTimer), false, LOT_NONE },
+ { "angleVel", LVT_COBJECT, offsetof(struct MarioState, angleVel), true, LOT_VEC3S },
+ { "animation", LVT_COBJECT_P, offsetof(struct MarioState, animation), true, LOT_MARIOANIMATION },
+ { "area", LVT_COBJECT_P, offsetof(struct MarioState, area), true, LOT_AREA },
+ { "bubbleObj", LVT_COBJECT_P, offsetof(struct MarioState, bubbleObj), true, LOT_OBJECT },
+ { "capTimer", LVT_U16, offsetof(struct MarioState, capTimer), false, LOT_NONE },
+ { "ceil", LVT_COBJECT_P, offsetof(struct MarioState, ceil), true, LOT_SURFACE },
+ { "ceilHeight", LVT_F32, offsetof(struct MarioState, ceilHeight), false, LOT_NONE },
+ { "character", LVT_COBJECT_P, offsetof(struct MarioState, character), true, LOT_CHARACTER },
+ { "collidedObjInteractTypes", LVT_U32, offsetof(struct MarioState, collidedObjInteractTypes), false, LOT_NONE },
+ { "controller", LVT_COBJECT_P, offsetof(struct MarioState, controller), true, LOT_CONTROLLER },
+ { "curAnimOffset", LVT_F32, offsetof(struct MarioState, curAnimOffset), false, LOT_NONE },
+ { "currentRoom", LVT_S16, offsetof(struct MarioState, currentRoom), false, LOT_NONE },
+ { "doubleJumpTimer", LVT_U8, offsetof(struct MarioState, doubleJumpTimer), false, LOT_NONE },
+ { "faceAngle", LVT_COBJECT, offsetof(struct MarioState, faceAngle), true, LOT_VEC3S },
+ { "fadeWarpOpacity", LVT_U8, offsetof(struct MarioState, fadeWarpOpacity), false, LOT_NONE },
+ { "flags", LVT_U32, offsetof(struct MarioState, flags), false, LOT_NONE },
+ { "floor", LVT_COBJECT_P, offsetof(struct MarioState, floor), true, LOT_SURFACE },
+ { "floorAngle", LVT_S16, offsetof(struct MarioState, floorAngle), false, LOT_NONE },
+ { "floorHeight", LVT_F32, offsetof(struct MarioState, floorHeight), false, LOT_NONE },
+ { "forwardVel", LVT_F32, offsetof(struct MarioState, forwardVel), false, LOT_NONE },
+ { "framesSinceA", LVT_U8, offsetof(struct MarioState, framesSinceA), false, LOT_NONE },
+ { "framesSinceB", LVT_U8, offsetof(struct MarioState, framesSinceB), false, LOT_NONE },
+ { "freeze", LVT_U8, offsetof(struct MarioState, freeze), false, LOT_NONE },
+ { "healCounter", LVT_U8, offsetof(struct MarioState, healCounter), false, LOT_NONE },
+ { "health", LVT_S16, offsetof(struct MarioState, health), false, LOT_NONE },
+ { "heldByObj", LVT_COBJECT_P, offsetof(struct MarioState, heldByObj), true, LOT_OBJECT },
+ { "heldObj", LVT_COBJECT_P, offsetof(struct MarioState, heldObj), true, LOT_OBJECT },
+ { "hurtCounter", LVT_U8, offsetof(struct MarioState, hurtCounter), false, LOT_NONE },
+ { "input", LVT_U16, offsetof(struct MarioState, input), false, LOT_NONE },
+ { "intendedMag", LVT_F32, offsetof(struct MarioState, intendedMag), false, LOT_NONE },
+ { "intendedYaw", LVT_S16, offsetof(struct MarioState, intendedYaw), false, LOT_NONE },
+ { "interactObj", LVT_COBJECT_P, offsetof(struct MarioState, interactObj), true, LOT_OBJECT },
+ { "invincTimer", LVT_S16, offsetof(struct MarioState, invincTimer), false, LOT_NONE },
+ { "isSnoring", LVT_U8, offsetof(struct MarioState, isSnoring), false, LOT_NONE },
+ { "marioBodyState", LVT_COBJECT_P, offsetof(struct MarioState, marioBodyState), true, LOT_MARIOBODYSTATE },
+ { "marioObj", LVT_COBJECT_P, offsetof(struct MarioState, marioObj), true, LOT_OBJECT },
+ { "minimumBoneY", LVT_F32, offsetof(struct MarioState, minimumBoneY), false, LOT_NONE },
+ { "nonInstantWarpPos", LVT_COBJECT, offsetof(struct MarioState, nonInstantWarpPos), true, LOT_VEC3F },
+ { "numCoins", LVT_S16, offsetof(struct MarioState, numCoins), false, LOT_NONE },
+ { "numKeys", LVT_S8, offsetof(struct MarioState, numKeys), false, LOT_NONE },
+ { "numLives", LVT_S8, offsetof(struct MarioState, numLives), false, LOT_NONE },
+ { "numStars", LVT_S16, offsetof(struct MarioState, numStars), false, LOT_NONE },
+ { "particleFlags", LVT_U32, offsetof(struct MarioState, particleFlags), false, LOT_NONE },
+ { "peakHeight", LVT_F32, offsetof(struct MarioState, peakHeight), false, LOT_NONE },
+ { "playerIndex", LVT_U16, offsetof(struct MarioState, playerIndex), true, LOT_NONE },
+ { "pos", LVT_COBJECT, offsetof(struct MarioState, pos), true, LOT_VEC3F },
+ { "prevAction", LVT_U32, offsetof(struct MarioState, prevAction), false, LOT_NONE },
+ { "prevNumStarsForDialog", LVT_S16, offsetof(struct MarioState, prevNumStarsForDialog), false, LOT_NONE },
+ { "quicksandDepth", LVT_F32, offsetof(struct MarioState, quicksandDepth), false, LOT_NONE },
+ { "riddenObj", LVT_COBJECT_P, offsetof(struct MarioState, riddenObj), true, LOT_OBJECT },
+ { "slideVelX", LVT_F32, offsetof(struct MarioState, slideVelX), false, LOT_NONE },
+ { "slideVelZ", LVT_F32, offsetof(struct MarioState, slideVelZ), false, LOT_NONE },
+ { "slideYaw", LVT_S16, offsetof(struct MarioState, slideYaw), false, LOT_NONE },
+ { "spawnInfo", LVT_COBJECT_P, offsetof(struct MarioState, spawnInfo), true, LOT_SPAWNINFO },
+// { "splineKeyframe", LVT_???, offsetof(struct MarioState, splineKeyframe), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "splineKeyframeFraction", LVT_F32, offsetof(struct MarioState, splineKeyframeFraction), false, LOT_NONE },
+ { "splineState", LVT_S32, offsetof(struct MarioState, splineState), false, LOT_NONE },
+ { "squishTimer", LVT_U8, offsetof(struct MarioState, squishTimer), false, LOT_NONE },
+ { "statusForCamera", LVT_COBJECT_P, offsetof(struct MarioState, statusForCamera), true, LOT_PLAYERCAMERASTATE },
+ { "terrainSoundAddend", LVT_U32, offsetof(struct MarioState, terrainSoundAddend), false, LOT_NONE },
+ { "twirlYaw", LVT_S16, offsetof(struct MarioState, twirlYaw), false, LOT_NONE },
+ { "unkB0", LVT_S16, offsetof(struct MarioState, unkB0), false, LOT_NONE },
+ { "unkC4", LVT_F32, offsetof(struct MarioState, unkC4), false, LOT_NONE },
+ { "usedObj", LVT_COBJECT_P, offsetof(struct MarioState, usedObj), true, LOT_OBJECT },
+ { "vel", LVT_COBJECT, offsetof(struct MarioState, vel), true, LOT_VEC3F },
+ { "wall", LVT_COBJECT_P, offsetof(struct MarioState, wall), true, LOT_SURFACE },
+ { "wallKickTimer", LVT_U8, offsetof(struct MarioState, wallKickTimer), false, LOT_NONE },
+ { "wasNetworkVisible", LVT_U8, offsetof(struct MarioState, wasNetworkVisible), false, LOT_NONE },
+ { "waterLevel", LVT_S16, offsetof(struct MarioState, waterLevel), false, LOT_NONE },
+};
+
+#define LUA_MODE_TRANSITION_INFO_FIELD_COUNT 6
+static struct LuaObjectField sModeTransitionInfoFields[LUA_MODE_TRANSITION_INFO_FIELD_COUNT] = {
+ { "frame", LVT_S16, offsetof(struct ModeTransitionInfo, frame), false, LOT_NONE },
+ { "lastMode", LVT_S16, offsetof(struct ModeTransitionInfo, lastMode), false, LOT_NONE },
+ { "max", LVT_S16, offsetof(struct ModeTransitionInfo, max), false, LOT_NONE },
+ { "newMode", LVT_S16, offsetof(struct ModeTransitionInfo, newMode), false, LOT_NONE },
+ { "transitionEnd", LVT_COBJECT, offsetof(struct ModeTransitionInfo, transitionEnd), true, LOT_LINEARTRANSITIONPOINT },
+ { "transitionStart", LVT_COBJECT, offsetof(struct ModeTransitionInfo, transitionStart), true, LOT_LINEARTRANSITIONPOINT },
+};
+
+#define LUA_OBJECT_FIELD_COUNT 22
+static struct LuaObjectField sObjectFields[LUA_OBJECT_FIELD_COUNT] = {
+ { "activeFlags", LVT_S16, offsetof(struct Object, activeFlags), false, LOT_NONE },
+ { "areaTimer", LVT_U32, offsetof(struct Object, areaTimer), false, LOT_NONE },
+ { "areaTimerDuration", LVT_U32, offsetof(struct Object, areaTimerDuration), false, LOT_NONE },
+// { "areaTimerRunOnceCallback)(void)", LVT_???, offsetof(struct Object, areaTimerRunOnceCallback)(void)), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "areaTimerType", LVT_S32, offsetof(struct Object, areaTimerType), false, LOT_NONE },
+// { "behavior", LVT_???, offsetof(struct Object, behavior), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "bhvDelayTimer", LVT_S16, offsetof(struct Object, bhvDelayTimer), false, LOT_NONE },
+// { "bhvStack", LOT_???, offsetof(struct Object, bhvStack), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "bhvStackIndex", LVT_U32, offsetof(struct Object, bhvStackIndex), false, LOT_NONE },
+ { "collidedObjInteractTypes", LVT_U32, offsetof(struct Object, collidedObjInteractTypes), false, LOT_NONE },
+// { "collidedObjs", LOT_???, offsetof(struct Object, collidedObjs), false, LOT_??? }, <--- UNIMPLEMENTED
+// { "collisionData", LVT_???, offsetof(struct Object, collisionData), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "createdThroughNetwork", LVT_U8, offsetof(struct Object, createdThroughNetwork), false, LOT_NONE },
+// { "curBhvCommand", LVT_???, offsetof(struct Object, curBhvCommand), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "globalPlayerIndex", LVT_U8, offsetof(struct Object, globalPlayerIndex), false, LOT_NONE },
+ { "header", LVT_COBJECT, offsetof(struct Object, header), true, LOT_OBJECTNODE },
+ { "heldByPlayerIndex", LVT_U32, offsetof(struct Object, heldByPlayerIndex), false, LOT_NONE },
+ { "hitboxDownOffset", LVT_F32, offsetof(struct Object, hitboxDownOffset), false, LOT_NONE },
+ { "hitboxHeight", LVT_F32, offsetof(struct Object, hitboxHeight), false, LOT_NONE },
+ { "hitboxRadius", LVT_F32, offsetof(struct Object, hitboxRadius), false, LOT_NONE },
+ { "hurtboxHeight", LVT_F32, offsetof(struct Object, hurtboxHeight), false, LOT_NONE },
+ { "hurtboxRadius", LVT_F32, offsetof(struct Object, hurtboxRadius), false, LOT_NONE },
+ { "numCollidedObjs", LVT_S16, offsetof(struct Object, numCollidedObjs), false, LOT_NONE },
+ { "parentObj", LVT_COBJECT_P, offsetof(struct Object, parentObj), true, LOT_OBJECT },
+ { "platform", LVT_COBJECT_P, offsetof(struct Object, platform), true, LOT_OBJECT },
+ { "prevObj", LVT_COBJECT_P, offsetof(struct Object, prevObj), true, LOT_OBJECT },
+// { "ptrData", LOT_???, offsetof(struct Object, ptrData), false, LOT_??? }, <--- UNIMPLEMENTED
+// { "rawData", LOT_???, offsetof(struct Object, rawData), false, LOT_??? }, <--- UNIMPLEMENTED
+// { "respawnInfo", LVT_???, offsetof(struct Object, respawnInfo), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "respawnInfoType", LVT_S16, offsetof(struct Object, respawnInfoType), false, LOT_NONE },
+// { "transform", LVT_???, offsetof(struct Object, transform), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "unused1", LVT_U32, offsetof(struct Object, unused1), false, LOT_NONE },
+};
+
+#define LUA_OBJECT_HITBOX_FIELD_COUNT 9
+static struct LuaObjectField sObjectHitboxFields[LUA_OBJECT_HITBOX_FIELD_COUNT] = {
+ { "damageOrCoinValue", LVT_S8, offsetof(struct ObjectHitbox, damageOrCoinValue), false, LOT_NONE },
+ { "downOffset", LVT_U8, offsetof(struct ObjectHitbox, downOffset), false, LOT_NONE },
+ { "health", LVT_S8, offsetof(struct ObjectHitbox, health), false, LOT_NONE },
+ { "height", LVT_S16, offsetof(struct ObjectHitbox, height), false, LOT_NONE },
+ { "hurtboxHeight", LVT_S16, offsetof(struct ObjectHitbox, hurtboxHeight), false, LOT_NONE },
+ { "hurtboxRadius", LVT_S16, offsetof(struct ObjectHitbox, hurtboxRadius), false, LOT_NONE },
+ { "interactType", LVT_U32, offsetof(struct ObjectHitbox, interactType), false, LOT_NONE },
+ { "numLootCoins", LVT_S8, offsetof(struct ObjectHitbox, numLootCoins), false, LOT_NONE },
+ { "radius", LVT_S16, offsetof(struct ObjectHitbox, radius), false, LOT_NONE },
+};
+
+#define LUA_OBJECT_NODE_FIELD_COUNT 3
+static struct LuaObjectField sObjectNodeFields[LUA_OBJECT_NODE_FIELD_COUNT] = {
+ { "gfx", LVT_COBJECT, offsetof(struct ObjectNode, gfx), true, LOT_GRAPHNODEOBJECT },
+ { "next", LVT_COBJECT_P, offsetof(struct ObjectNode, next), true, LOT_OBJECTNODE },
+ { "prev", LVT_COBJECT_P, offsetof(struct ObjectNode, prev), true, LOT_OBJECTNODE },
+};
+
+#define LUA_OBJECT_WARP_NODE_FIELD_COUNT 3
+static struct LuaObjectField sObjectWarpNodeFields[LUA_OBJECT_WARP_NODE_FIELD_COUNT] = {
+ { "next", LVT_COBJECT_P, offsetof(struct ObjectWarpNode, next), true, LOT_OBJECTWARPNODE },
+ { "node", LVT_COBJECT, offsetof(struct ObjectWarpNode, node), true, LOT_WARPNODE },
+ { "object", LVT_COBJECT_P, offsetof(struct ObjectWarpNode, object), true, LOT_OBJECT },
+};
+
+#define LUA_OFFSET_SIZE_PAIR_FIELD_COUNT 2
+static struct LuaObjectField sOffsetSizePairFields[LUA_OFFSET_SIZE_PAIR_FIELD_COUNT] = {
+ { "offset", LVT_U32, offsetof(struct OffsetSizePair, offset), false, LOT_NONE },
+ { "size", LVT_U32, offsetof(struct OffsetSizePair, size), false, LOT_NONE },
+};
+
+#define LUA_PARALLEL_TRACKING_POINT_FIELD_COUNT 4
+static struct LuaObjectField sParallelTrackingPointFields[LUA_PARALLEL_TRACKING_POINT_FIELD_COUNT] = {
+ { "distThresh", LVT_F32, offsetof(struct ParallelTrackingPoint, distThresh), false, LOT_NONE },
+ { "pos", LVT_COBJECT, offsetof(struct ParallelTrackingPoint, pos), true, LOT_VEC3F },
+ { "startOfPath", LVT_S16, offsetof(struct ParallelTrackingPoint, startOfPath), false, LOT_NONE },
+ { "zoom", LVT_F32, offsetof(struct ParallelTrackingPoint, zoom), false, LOT_NONE },
+};
+
+#define LUA_PLAYER_CAMERA_STATE_FIELD_COUNT 7
+static struct LuaObjectField sPlayerCameraStateFields[LUA_PLAYER_CAMERA_STATE_FIELD_COUNT] = {
+ { "action", LVT_U32, offsetof(struct PlayerCameraState, action), false, LOT_NONE },
+ { "cameraEvent", LVT_S16, offsetof(struct PlayerCameraState, cameraEvent), false, LOT_NONE },
+ { "faceAngle", LVT_COBJECT, offsetof(struct PlayerCameraState, faceAngle), true, LOT_VEC3S },
+ { "headRotation", LVT_COBJECT, offsetof(struct PlayerCameraState, headRotation), true, LOT_VEC3S },
+ { "pos", LVT_COBJECT, offsetof(struct PlayerCameraState, pos), true, LOT_VEC3F },
+ { "unused", LVT_S16, offsetof(struct PlayerCameraState, unused), false, LOT_NONE },
+ { "usedObj", LVT_COBJECT_P, offsetof(struct PlayerCameraState, usedObj), true, LOT_OBJECT },
+};
+
+#define LUA_PLAYER_GEOMETRY_FIELD_COUNT 13
+static struct LuaObjectField sPlayerGeometryFields[LUA_PLAYER_GEOMETRY_FIELD_COUNT] = {
+ { "currCeil", LVT_COBJECT_P, offsetof(struct PlayerGeometry, currCeil), true, LOT_SURFACE },
+ { "currCeilHeight", LVT_F32, offsetof(struct PlayerGeometry, currCeilHeight), false, LOT_NONE },
+ { "currCeilType", LVT_S16, offsetof(struct PlayerGeometry, currCeilType), false, LOT_NONE },
+ { "currFloor", LVT_COBJECT_P, offsetof(struct PlayerGeometry, currFloor), true, LOT_SURFACE },
+ { "currFloorHeight", LVT_F32, offsetof(struct PlayerGeometry, currFloorHeight), false, LOT_NONE },
+ { "currFloorType", LVT_S16, offsetof(struct PlayerGeometry, currFloorType), false, LOT_NONE },
+ { "prevCeil", LVT_COBJECT_P, offsetof(struct PlayerGeometry, prevCeil), true, LOT_SURFACE },
+ { "prevCeilHeight", LVT_F32, offsetof(struct PlayerGeometry, prevCeilHeight), false, LOT_NONE },
+ { "prevCeilType", LVT_S16, offsetof(struct PlayerGeometry, prevCeilType), false, LOT_NONE },
+ { "prevFloor", LVT_COBJECT_P, offsetof(struct PlayerGeometry, prevFloor), true, LOT_SURFACE },
+ { "prevFloorHeight", LVT_F32, offsetof(struct PlayerGeometry, prevFloorHeight), false, LOT_NONE },
+ { "prevFloorType", LVT_S16, offsetof(struct PlayerGeometry, prevFloorType), false, LOT_NONE },
+ { "waterHeight", LVT_F32, offsetof(struct PlayerGeometry, waterHeight), false, LOT_NONE },
+};
+
+#define LUA_SPAWN_INFO_FIELD_COUNT 7
+static struct LuaObjectField sSpawnInfoFields[LUA_SPAWN_INFO_FIELD_COUNT] = {
+ { "activeAreaIndex", LVT_S8, offsetof(struct SpawnInfo, activeAreaIndex), false, LOT_NONE },
+ { "areaIndex", LVT_S8, offsetof(struct SpawnInfo, areaIndex), false, LOT_NONE },
+ { "behaviorArg", LVT_U32, offsetof(struct SpawnInfo, behaviorArg), false, LOT_NONE },
+// { "behaviorScript", LVT_???, offsetof(struct SpawnInfo, behaviorScript), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "next", LVT_COBJECT_P, offsetof(struct SpawnInfo, next), true, LOT_SPAWNINFO },
+ { "startAngle", LVT_COBJECT, offsetof(struct SpawnInfo, startAngle), true, LOT_VEC3S },
+ { "startPos", LVT_COBJECT, offsetof(struct SpawnInfo, startPos), true, LOT_VEC3S },
+ { "unk18", LVT_COBJECT_P, offsetof(struct SpawnInfo, unk18), true, LOT_GRAPHNODE },
+};
+
+#define LUA_SURFACE_FIELD_COUNT 16
+static struct LuaObjectField sSurfaceFields[LUA_SURFACE_FIELD_COUNT] = {
+ { "flags", LVT_S8, offsetof(struct Surface, flags), false, LOT_NONE },
+ { "force", LVT_S16, offsetof(struct Surface, force), false, LOT_NONE },
+ { "lowerY", LVT_S16, offsetof(struct Surface, lowerY), false, LOT_NONE },
+ { "modifiedTimestamp", LVT_U32, offsetof(struct Surface, modifiedTimestamp), false, LOT_NONE },
+ { "normal", LVT_COBJECT, offsetof(struct Surface, normal), true, LOT_VEC3F },
+ { "object", LVT_COBJECT_P, offsetof(struct Surface, object), true, LOT_OBJECT },
+ { "originOffset", LVT_F32, offsetof(struct Surface, originOffset), false, LOT_NONE },
+ { "prevVertex1", LVT_COBJECT, offsetof(struct Surface, prevVertex1), true, LOT_VEC3S },
+ { "prevVertex2", LVT_COBJECT, offsetof(struct Surface, prevVertex2), true, LOT_VEC3S },
+ { "prevVertex3", LVT_COBJECT, offsetof(struct Surface, prevVertex3), true, LOT_VEC3S },
+ { "room", LVT_S8, offsetof(struct Surface, room), false, LOT_NONE },
+ { "type", LVT_S16, offsetof(struct Surface, type), false, LOT_NONE },
+ { "upperY", LVT_S16, offsetof(struct Surface, upperY), false, LOT_NONE },
+ { "vertex1", LVT_COBJECT, offsetof(struct Surface, vertex1), true, LOT_VEC3S },
+ { "vertex2", LVT_COBJECT, offsetof(struct Surface, vertex2), true, LOT_VEC3S },
+ { "vertex3", LVT_COBJECT, offsetof(struct Surface, vertex3), true, LOT_VEC3S },
+};
+
+#define LUA_TRANSITION_INFO_FIELD_COUNT 9
+static struct LuaObjectField sTransitionInfoFields[LUA_TRANSITION_INFO_FIELD_COUNT] = {
+ { "focDist", LVT_F32, offsetof(struct TransitionInfo, focDist), false, LOT_NONE },
+ { "focPitch", LVT_S16, offsetof(struct TransitionInfo, focPitch), false, LOT_NONE },
+ { "focYaw", LVT_S16, offsetof(struct TransitionInfo, focYaw), false, LOT_NONE },
+ { "framesLeft", LVT_S32, offsetof(struct TransitionInfo, framesLeft), false, LOT_NONE },
+ { "marioPos", LVT_COBJECT, offsetof(struct TransitionInfo, marioPos), true, LOT_VEC3F },
+ { "pad", LVT_U8, offsetof(struct TransitionInfo, pad), false, LOT_NONE },
+ { "posDist", LVT_F32, offsetof(struct TransitionInfo, posDist), false, LOT_NONE },
+ { "posPitch", LVT_S16, offsetof(struct TransitionInfo, posPitch), false, LOT_NONE },
+ { "posYaw", LVT_S16, offsetof(struct TransitionInfo, posYaw), false, LOT_NONE },
};
#define LUA_WALL_COLLISION_DATA_FIELD_COUNT 4
static struct LuaObjectField sWallCollisionDataFields[LUA_WALL_COLLISION_DATA_FIELD_COUNT] = {
-// { "z", LVT_???, offsetof(struct WallCollisionData, z), false, LOT_??? }, <--- UNIMPLEMENTED
+ { "numWalls", LVT_S16, offsetof(struct WallCollisionData, numWalls), false, LOT_NONE },
{ "offsetY", LVT_F32, offsetof(struct WallCollisionData, offsetY), false, LOT_NONE },
{ "radius", LVT_F32, offsetof(struct WallCollisionData, radius), false, LOT_NONE },
{ "unk14", LVT_S16, offsetof(struct WallCollisionData, unk14), false, LOT_NONE },
- { "numWalls", LVT_S16, offsetof(struct WallCollisionData, numWalls), false, LOT_NONE },
// { "walls", LOT_???, offsetof(struct WallCollisionData, walls), false, LOT_??? }, <--- UNIMPLEMENTED
+// { "z", LVT_???, offsetof(struct WallCollisionData, z), false, LOT_??? }, <--- UNIMPLEMENTED
};
-#define LUA_FLOOR_GEOMETRY_FIELD_COUNT 4
-static struct LuaObjectField sFloorGeometryFields[LUA_FLOOR_GEOMETRY_FIELD_COUNT] = {
-// { "unused", LOT_???, offsetof(struct FloorGeometry, unused), false, LOT_??? }, <--- UNIMPLEMENTED
- { "normalX", LVT_F32, offsetof(struct FloorGeometry, normalX), false, LOT_NONE },
- { "normalY", LVT_F32, offsetof(struct FloorGeometry, normalY), false, LOT_NONE },
- { "normalZ", LVT_F32, offsetof(struct FloorGeometry, normalZ), false, LOT_NONE },
- { "originOffset", LVT_F32, offsetof(struct FloorGeometry, originOffset), false, LOT_NONE },
+#define LUA_WARP_NODE_FIELD_COUNT 4
+static struct LuaObjectField sWarpNodeFields[LUA_WARP_NODE_FIELD_COUNT] = {
+ { "destArea", LVT_U8, offsetof(struct WarpNode, destArea), false, LOT_NONE },
+ { "destLevel", LVT_U8, offsetof(struct WarpNode, destLevel), false, LOT_NONE },
+ { "destNode", LVT_U8, offsetof(struct WarpNode, destNode), false, LOT_NONE },
+ { "id", LVT_U8, offsetof(struct WarpNode, id), false, LOT_NONE },
+};
+
+#define LUA_WARP_TRANSITION_FIELD_COUNT 5
+static struct LuaObjectField sWarpTransitionFields[LUA_WARP_TRANSITION_FIELD_COUNT] = {
+ { "data", LVT_COBJECT, offsetof(struct WarpTransition, data), true, LOT_WARPTRANSITIONDATA },
+ { "isActive", LVT_U8, offsetof(struct WarpTransition, isActive), false, LOT_NONE },
+ { "pauseRendering", LVT_U8, offsetof(struct WarpTransition, pauseRendering), false, LOT_NONE },
+ { "time", LVT_U8, offsetof(struct WarpTransition, time), false, LOT_NONE },
+ { "type", LVT_U8, offsetof(struct WarpTransition, type), false, LOT_NONE },
+};
+
+#define LUA_WARP_TRANSITION_DATA_FIELD_COUNT 10
+static struct LuaObjectField sWarpTransitionDataFields[LUA_WARP_TRANSITION_DATA_FIELD_COUNT] = {
+ { "blue", LVT_U8, offsetof(struct WarpTransitionData, blue), false, LOT_NONE },
+ { "endTexRadius", LVT_S16, offsetof(struct WarpTransitionData, endTexRadius), false, LOT_NONE },
+ { "endTexX", LVT_S16, offsetof(struct WarpTransitionData, endTexX), false, LOT_NONE },
+ { "endTexY", LVT_S16, offsetof(struct WarpTransitionData, endTexY), false, LOT_NONE },
+ { "green", LVT_U8, offsetof(struct WarpTransitionData, green), false, LOT_NONE },
+ { "red", LVT_U8, offsetof(struct WarpTransitionData, red), false, LOT_NONE },
+ { "startTexRadius", LVT_S16, offsetof(struct WarpTransitionData, startTexRadius), false, LOT_NONE },
+ { "startTexX", LVT_S16, offsetof(struct WarpTransitionData, startTexX), false, LOT_NONE },
+ { "startTexY", LVT_S16, offsetof(struct WarpTransitionData, startTexY), false, LOT_NONE },
+ { "texTimer", LVT_S16, offsetof(struct WarpTransitionData, texTimer), false, LOT_NONE },
+};
+
+#define LUA_WAYPOINT_FIELD_COUNT 2
+static struct LuaObjectField sWaypointFields[LUA_WAYPOINT_FIELD_COUNT] = {
+ { "flags", LVT_S16, offsetof(struct Waypoint, flags), false, LOT_NONE },
+ { "pos", LVT_COBJECT, offsetof(struct Waypoint, pos), true, LOT_VEC3S },
+};
+
+#define LUA_WHIRLPOOL_FIELD_COUNT 2
+static struct LuaObjectField sWhirlpoolFields[LUA_WHIRLPOOL_FIELD_COUNT] = {
+ { "pos", LVT_COBJECT, offsetof(struct Whirlpool, pos), true, LOT_VEC3S },
+ { "strength", LVT_S16, offsetof(struct Whirlpool, strength), false, LOT_NONE },
};
struct LuaObjectTable sLuaObjectAutogenTable[LOT_AUTOGEN_MAX - LOT_AUTOGEN_MIN] = {
- { LOT_CONTROLLER, sControllerFields, LUA_CONTROLLER_FIELD_COUNT },
{ LOT_ANIMATION, sAnimationFields, LUA_ANIMATION_FIELD_COUNT },
+ { LOT_AREA, sAreaFields, LUA_AREA_FIELD_COUNT },
+ { LOT_CAMERA, sCameraFields, LUA_CAMERA_FIELD_COUNT },
+ { LOT_CAMERAFOVSTATUS, sCameraFOVStatusFields, LUA_CAMERA_FOVSTATUS_FIELD_COUNT },
+ { LOT_CAMERASTOREDINFO, sCameraStoredInfoFields, LUA_CAMERA_STORED_INFO_FIELD_COUNT },
+ { LOT_CAMERATRIGGER, sCameraTriggerFields, LUA_CAMERA_TRIGGER_FIELD_COUNT },
+ { LOT_CHARACTER, sCharacterFields, LUA_CHARACTER_FIELD_COUNT },
+ { LOT_CONTROLLER, sControllerFields, LUA_CONTROLLER_FIELD_COUNT },
+ { LOT_CUTSCENE, sCutsceneFields, LUA_CUTSCENE_FIELD_COUNT },
+ { LOT_CUTSCENESPLINEPOINT, sCutsceneSplinePointFields, LUA_CUTSCENE_SPLINE_POINT_FIELD_COUNT },
+ { LOT_CUTSCENEVARIABLE, sCutsceneVariableFields, LUA_CUTSCENE_VARIABLE_FIELD_COUNT },
+ { LOT_FLOORGEOMETRY, sFloorGeometryFields, LUA_FLOOR_GEOMETRY_FIELD_COUNT },
{ LOT_GRAPHNODE, sGraphNodeFields, LUA_GRAPH_NODE_FIELD_COUNT },
- { LOT_GRAPHNODEOBJECT_SUB, sGraphNodeObject_subFields, LUA_GRAPH_NODE_OBJECT_SUB_FIELD_COUNT },
{ LOT_GRAPHNODEOBJECT, sGraphNodeObjectFields, LUA_GRAPH_NODE_OBJECT_FIELD_COUNT },
- { LOT_OBJECTNODE, sObjectNodeFields, LUA_OBJECT_NODE_FIELD_COUNT },
+ { LOT_GRAPHNODEOBJECT_SUB, sGraphNodeObject_subFields, LUA_GRAPH_NODE_OBJECT_SUB_FIELD_COUNT },
+ { LOT_HANDHELDSHAKEPOINT, sHandheldShakePointFields, LUA_HANDHELD_SHAKE_POINT_FIELD_COUNT },
+ { LOT_INSTANTWARP, sInstantWarpFields, LUA_INSTANT_WARP_FIELD_COUNT },
+ { LOT_LAKITUSTATE, sLakituStateFields, LUA_LAKITU_STATE_FIELD_COUNT },
+ { LOT_LINEARTRANSITIONPOINT, sLinearTransitionPointFields, LUA_LINEAR_TRANSITION_POINT_FIELD_COUNT },
+ { LOT_MARIOANIMATION, sMarioAnimationFields, LUA_MARIO_ANIMATION_FIELD_COUNT },
+ { LOT_MARIOBODYSTATE, sMarioBodyStateFields, LUA_MARIO_BODY_STATE_FIELD_COUNT },
+ { LOT_MARIOSTATE, sMarioStateFields, LUA_MARIO_STATE_FIELD_COUNT },
+ { LOT_MODETRANSITIONINFO, sModeTransitionInfoFields, LUA_MODE_TRANSITION_INFO_FIELD_COUNT },
{ LOT_OBJECT, sObjectFields, LUA_OBJECT_FIELD_COUNT },
{ LOT_OBJECTHITBOX, sObjectHitboxFields, LUA_OBJECT_HITBOX_FIELD_COUNT },
- { LOT_WAYPOINT, sWaypointFields, LUA_WAYPOINT_FIELD_COUNT },
- { LOT_SURFACE, sSurfaceFields, LUA_SURFACE_FIELD_COUNT },
- { LOT_MARIOBODYSTATE, sMarioBodyStateFields, LUA_MARIO_BODY_STATE_FIELD_COUNT },
- { LOT_OFFSETSIZEPAIR, sOffsetSizePairFields, LUA_OFFSET_SIZE_PAIR_FIELD_COUNT },
- { LOT_MARIOANIMATION, sMarioAnimationFields, LUA_MARIO_ANIMATION_FIELD_COUNT },
- { LOT_MARIOSTATE, sMarioStateFields, LUA_MARIO_STATE_FIELD_COUNT },
- { LOT_WARPNODE, sWarpNodeFields, LUA_WARP_NODE_FIELD_COUNT },
+ { LOT_OBJECTNODE, sObjectNodeFields, LUA_OBJECT_NODE_FIELD_COUNT },
{ LOT_OBJECTWARPNODE, sObjectWarpNodeFields, LUA_OBJECT_WARP_NODE_FIELD_COUNT },
- { LOT_INSTANTWARP, sInstantWarpFields, LUA_INSTANT_WARP_FIELD_COUNT },
- { LOT_SPAWNINFO, sSpawnInfoFields, LUA_SPAWN_INFO_FIELD_COUNT },
- { LOT_WHIRLPOOL, sWhirlpoolFields, LUA_WHIRLPOOL_FIELD_COUNT },
- { LOT_AREA, sAreaFields, LUA_AREA_FIELD_COUNT },
- { LOT_WARPTRANSITIONDATA, sWarpTransitionDataFields, LUA_WARP_TRANSITION_DATA_FIELD_COUNT },
- { LOT_WARPTRANSITION, sWarpTransitionFields, LUA_WARP_TRANSITION_FIELD_COUNT },
- { LOT_PLAYERCAMERASTATE, sPlayerCameraStateFields, LUA_PLAYER_CAMERA_STATE_FIELD_COUNT },
- { LOT_TRANSITIONINFO, sTransitionInfoFields, LUA_TRANSITION_INFO_FIELD_COUNT },
- { LOT_HANDHELDSHAKEPOINT, sHandheldShakePointFields, LUA_HANDHELD_SHAKE_POINT_FIELD_COUNT },
- { LOT_CAMERATRIGGER, sCameraTriggerFields, LUA_CAMERA_TRIGGER_FIELD_COUNT },
- { LOT_CUTSCENE, sCutsceneFields, LUA_CUTSCENE_FIELD_COUNT },
- { LOT_CAMERAFOVSTATUS, sCameraFOVStatusFields, LUA_CAMERA_FOVSTATUS_FIELD_COUNT },
- { LOT_CUTSCENESPLINEPOINT, sCutsceneSplinePointFields, LUA_CUTSCENE_SPLINE_POINT_FIELD_COUNT },
- { LOT_PLAYERGEOMETRY, sPlayerGeometryFields, LUA_PLAYER_GEOMETRY_FIELD_COUNT },
- { LOT_LINEARTRANSITIONPOINT, sLinearTransitionPointFields, LUA_LINEAR_TRANSITION_POINT_FIELD_COUNT },
- { LOT_MODETRANSITIONINFO, sModeTransitionInfoFields, LUA_MODE_TRANSITION_INFO_FIELD_COUNT },
+ { LOT_OFFSETSIZEPAIR, sOffsetSizePairFields, LUA_OFFSET_SIZE_PAIR_FIELD_COUNT },
{ LOT_PARALLELTRACKINGPOINT, sParallelTrackingPointFields, LUA_PARALLEL_TRACKING_POINT_FIELD_COUNT },
- { LOT_CAMERASTOREDINFO, sCameraStoredInfoFields, LUA_CAMERA_STORED_INFO_FIELD_COUNT },
- { LOT_CUTSCENEVARIABLE, sCutsceneVariableFields, LUA_CUTSCENE_VARIABLE_FIELD_COUNT },
- { LOT_CAMERA, sCameraFields, LUA_CAMERA_FIELD_COUNT },
- { LOT_LAKITUSTATE, sLakituStateFields, LUA_LAKITU_STATE_FIELD_COUNT },
- { LOT_CHARACTER, sCharacterFields, LUA_CHARACTER_FIELD_COUNT },
+ { LOT_PLAYERCAMERASTATE, sPlayerCameraStateFields, LUA_PLAYER_CAMERA_STATE_FIELD_COUNT },
+ { LOT_PLAYERGEOMETRY, sPlayerGeometryFields, LUA_PLAYER_GEOMETRY_FIELD_COUNT },
+ { LOT_SPAWNINFO, sSpawnInfoFields, LUA_SPAWN_INFO_FIELD_COUNT },
+ { LOT_SURFACE, sSurfaceFields, LUA_SURFACE_FIELD_COUNT },
+ { LOT_TRANSITIONINFO, sTransitionInfoFields, LUA_TRANSITION_INFO_FIELD_COUNT },
{ LOT_WALLCOLLISIONDATA, sWallCollisionDataFields, LUA_WALL_COLLISION_DATA_FIELD_COUNT },
- { LOT_FLOORGEOMETRY, sFloorGeometryFields, LUA_FLOOR_GEOMETRY_FIELD_COUNT },
+ { LOT_WARPNODE, sWarpNodeFields, LUA_WARP_NODE_FIELD_COUNT },
+ { LOT_WARPTRANSITION, sWarpTransitionFields, LUA_WARP_TRANSITION_FIELD_COUNT },
+ { LOT_WARPTRANSITIONDATA, sWarpTransitionDataFields, LUA_WARP_TRANSITION_DATA_FIELD_COUNT },
+ { LOT_WAYPOINT, sWaypointFields, LUA_WAYPOINT_FIELD_COUNT },
+ { LOT_WHIRLPOOL, sWhirlpoolFields, LUA_WHIRLPOOL_FIELD_COUNT },
};
struct LuaObjectField* smlua_get_object_field_autogen(u16 lot, const char* key) {
diff --git a/src/pc/lua/smlua_cobject_autogen.h b/src/pc/lua/smlua_cobject_autogen.h
index aa349c956..c4edc2766 100644
--- a/src/pc/lua/smlua_cobject_autogen.h
+++ b/src/pc/lua/smlua_cobject_autogen.h
@@ -5,46 +5,46 @@
enum LuaObjectAutogenType {
LOT_AUTOGEN_MIN = 1000,
- LOT_CONTROLLER,
LOT_ANIMATION,
+ LOT_AREA,
+ LOT_CAMERA,
+ LOT_CAMERAFOVSTATUS,
+ LOT_CAMERASTOREDINFO,
+ LOT_CAMERATRIGGER,
+ LOT_CHARACTER,
+ LOT_CONTROLLER,
+ LOT_CUTSCENE,
+ LOT_CUTSCENESPLINEPOINT,
+ LOT_CUTSCENEVARIABLE,
+ LOT_FLOORGEOMETRY,
LOT_GRAPHNODE,
- LOT_GRAPHNODEOBJECT_SUB,
LOT_GRAPHNODEOBJECT,
- LOT_OBJECTNODE,
+ LOT_GRAPHNODEOBJECT_SUB,
+ LOT_HANDHELDSHAKEPOINT,
+ LOT_INSTANTWARP,
+ LOT_LAKITUSTATE,
+ LOT_LINEARTRANSITIONPOINT,
+ LOT_MARIOANIMATION,
+ LOT_MARIOBODYSTATE,
+ LOT_MARIOSTATE,
+ LOT_MODETRANSITIONINFO,
LOT_OBJECT,
LOT_OBJECTHITBOX,
- LOT_WAYPOINT,
- LOT_SURFACE,
- LOT_MARIOBODYSTATE,
- LOT_OFFSETSIZEPAIR,
- LOT_MARIOANIMATION,
- LOT_MARIOSTATE,
- LOT_WARPNODE,
+ LOT_OBJECTNODE,
LOT_OBJECTWARPNODE,
- LOT_INSTANTWARP,
- LOT_SPAWNINFO,
- LOT_WHIRLPOOL,
- LOT_AREA,
- LOT_WARPTRANSITIONDATA,
- LOT_WARPTRANSITION,
- LOT_PLAYERCAMERASTATE,
- LOT_TRANSITIONINFO,
- LOT_HANDHELDSHAKEPOINT,
- LOT_CAMERATRIGGER,
- LOT_CUTSCENE,
- LOT_CAMERAFOVSTATUS,
- LOT_CUTSCENESPLINEPOINT,
- LOT_PLAYERGEOMETRY,
- LOT_LINEARTRANSITIONPOINT,
- LOT_MODETRANSITIONINFO,
+ LOT_OFFSETSIZEPAIR,
LOT_PARALLELTRACKINGPOINT,
- LOT_CAMERASTOREDINFO,
- LOT_CUTSCENEVARIABLE,
- LOT_CAMERA,
- LOT_LAKITUSTATE,
- LOT_CHARACTER,
+ LOT_PLAYERCAMERASTATE,
+ LOT_PLAYERGEOMETRY,
+ LOT_SPAWNINFO,
+ LOT_SURFACE,
+ LOT_TRANSITIONINFO,
LOT_WALLCOLLISIONDATA,
- LOT_FLOORGEOMETRY,
+ LOT_WARPNODE,
+ LOT_WARPTRANSITION,
+ LOT_WARPTRANSITIONDATA,
+ LOT_WAYPOINT,
+ LOT_WHIRLPOOL,
LOT_AUTOGEN_MAX,
};
diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c
index 8b486b526..751adb910 100644
--- a/src/pc/lua/smlua_functions_autogen.c
+++ b/src/pc/lua/smlua_functions_autogen.c
@@ -28,17 +28,6 @@ int smlua_func_set_camera_shake_from_hit(lua_State* L) {
return 1;
}
-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) { return 0; }
-
- set_environmental_camera_shake(shake);
-
- return 1;
-}
-
int smlua_func_set_camera_shake_from_point(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
@@ -56,6 +45,17 @@ int smlua_func_set_camera_shake_from_point(lua_State* L) {
return 1;
}
+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) { return 0; }
+
+ set_environmental_camera_shake(shake);
+
+ return 1;
+}
+
//////////////////
// characters.h //
//////////////////
@@ -73,6 +73,17 @@ int smlua_func_get_character(lua_State* L) {
}
*/
+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) { return 0; }
+
+ lua_pushnumber(L, get_character_anim_offset(m));
+
+ return 1;
+}
+
int smlua_func_play_character_sound(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
@@ -86,21 +97,6 @@ int smlua_func_play_character_sound(lua_State* L) {
return 1;
}
-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) { return 0; }
- enum CharacterSound characterSound = (enum CharacterSound)smlua_to_cobject(L, 2, LOT_NONE);
- if (!gSmLuaConvertSuccess) { return 0; }
- u32 offset = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- play_character_sound_offset(m, characterSound, offset);
-
- return 1;
-}
-
int smlua_func_play_character_sound_if_no_flag(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
@@ -116,13 +112,17 @@ int smlua_func_play_character_sound_if_no_flag(lua_State* L) {
return 1;
}
-int smlua_func_get_character_anim_offset(lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
+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) { return 0; }
+ enum CharacterSound characterSound = (enum CharacterSound)smlua_to_cobject(L, 2, LOT_NONE);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ u32 offset = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushnumber(L, get_character_anim_offset(m));
+ play_character_sound_offset(m, characterSound, offset);
return 1;
}
@@ -169,78 +169,89 @@ int smlua_func_play_sound(lua_State* L) {
// mario.h //
/////////////
-int smlua_func_is_anim_at_end(lua_State* L) {
+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) { return 0; }
- lua_pushinteger(L, is_anim_at_end(m));
+ adjust_sound_for_speed(m);
return 1;
}
-int smlua_func_is_anim_past_end(lua_State* L) {
+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) { return 0; }
- lua_pushinteger(L, is_anim_past_end(m));
+ lua_pushinteger(L, check_common_action_exits(m));
return 1;
}
-int smlua_func_set_mario_animation(lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+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) { return 0; }
- s32 targetAnimID = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushinteger(L, set_mario_animation(m, targetAnimID));
+ lua_pushinteger(L, check_common_hold_action_exits(m));
return 1;
}
-int smlua_func_set_mario_anim_with_accel(lua_State* L) {
+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) { return 0; }
- s32 targetAnimID = smlua_to_integer(L, 2);
+ u32 action = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { return 0; }
- s32 accel = smlua_to_integer(L, 3);
+ u32 actionArg = smlua_to_integer(L, 3);
if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushinteger(L, set_mario_anim_with_accel(m, targetAnimID, accel));
+ lua_pushinteger(L, drop_and_set_mario_action(m, action, actionArg));
return 1;
}
-int smlua_func_set_anim_to_frame(lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
+int smlua_func_execute_mario_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) { return 0; }
- s16 animFrame = smlua_to_integer(L, 2);
+ struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
if (!gSmLuaConvertSuccess) { return 0; }
- set_anim_to_frame(m, animFrame);
+ lua_pushinteger(L, execute_mario_action(o));
return 1;
}
-int smlua_func_is_anim_past_frame(lua_State* L) {
+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) { return 0; }
+ s16 angleFromMario = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ f32 distFromMario = smlua_to_number(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ lua_pushnumber(L, find_floor_height_relative_polar(m, angleFromMario, distFromMario));
+
+ return 1;
+}
+
+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) { return 0; }
- s16 animFrame = smlua_to_integer(L, 2);
+ s16 yawOffset = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushinteger(L, is_anim_past_frame(m, animFrame));
+ lua_pushinteger(L, find_floor_slope(m, yawOffset));
return 1;
}
@@ -270,262 +281,69 @@ int smlua_func_find_mario_anim_flags_and_translation(lua_State* L) {
return 1;
}
-int smlua_func_update_mario_pos_for_anim(lua_State* L) {
+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) { return 0; }
- update_mario_pos_for_anim(m);
+ lua_pushinteger(L, force_idle_state(m));
return 1;
}
-int smlua_func_return_mario_anim_y_translation(lua_State* L) {
+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) { return 0; }
+ u32 action = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ u32 actionArg = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ s16 hurtCounter = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ lua_pushinteger(L, hurt_and_set_mario_action(m, action, actionArg, hurtCounter));
+
+ return 1;
+}
+
+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) { return 0; }
- lua_pushinteger(L, return_mario_anim_y_translation(m));
+ lua_pushinteger(L, is_anim_at_end(m));
return 1;
}
-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) { return 0; }
- u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- u32 flags = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- play_sound_if_no_flag(m, soundBits, flags);
-
- return 1;
-}
-
-int smlua_func_play_mario_jump_sound(lua_State* L) {
+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) { return 0; }
- play_mario_jump_sound(m);
+ lua_pushinteger(L, is_anim_past_end(m));
return 1;
}
-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) { return 0; }
-
- adjust_sound_for_speed(m);
-
- return 1;
-}
-
-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) { return 0; }
- u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- u32 waveParticleType = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- play_sound_and_spawn_particles(m, soundBits, waveParticleType);
-
- return 1;
-}
-
-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) { return 0; }
- u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- u32 waveParticleType = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- play_mario_action_sound(m, soundBits, waveParticleType);
-
- return 1;
-}
-
-int smlua_func_play_mario_landing_sound(lua_State* L) {
+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) { return 0; }
- u32 soundBits = smlua_to_integer(L, 2);
+ s16 animFrame = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { return 0; }
- play_mario_landing_sound(m, soundBits);
+ lua_pushinteger(L, is_anim_past_frame(m, animFrame));
return 1;
}
-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) { return 0; }
- u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- play_mario_landing_sound_once(m, soundBits);
-
- return 1;
-}
-
-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) { return 0; }
- u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- play_mario_heavy_landing_sound(m, soundBits);
-
- return 1;
-}
-
-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) { return 0; }
- u32 soundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- play_mario_heavy_landing_sound_once(m, soundBits);
-
- return 1;
-}
-
-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) { return 0; }
- s32 primarySoundBits = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- s32 scondarySoundBits = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- play_mario_sound(m, primarySoundBits, scondarySoundBits);
-
- return 1;
-}
-
-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) { return 0; }
-
- mario_set_bubbled(m);
-
- return 1;
-}
-
-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) { return 0; }
- f32 speed = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- mario_set_forward_vel(m, speed);
-
- return 1;
-}
-
-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) { return 0; }
-
- lua_pushinteger(L, mario_get_floor_class(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- lua_pushinteger(L, mario_get_terrain_sound_addend(m));
-
- return 1;
-}
-
-/*
-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");
- if (!gSmLuaConvertSuccess) { return 0; }
- pos[1] = smlua_get_number_field(1, "y");
- if (!gSmLuaConvertSuccess) { return 0; }
- pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { return 0; }
- f32 offset = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- f32 radius = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- UNIMPLEMENTED -->(L, 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_vec3f_find_ceil(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");
- if (!gSmLuaConvertSuccess) { return 0; }
- pos[1] = smlua_get_number_field(1, "y");
- if (!gSmLuaConvertSuccess) { return 0; }
- pos[2] = smlua_get_number_field(1, "z");
- if (!gSmLuaConvertSuccess) { return 0; }
- f32 height = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-// struct Surface** ceil = (struct Surface**)smlua_to_cobject(L, 3, LVT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { return 0; }
-
- lua_pushnumber(L, vec3f_find_ceil(pos, height, ceil));
-
- 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_mario_facing_downhill(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
@@ -572,67 +390,222 @@ int smlua_func_mario_floor_is_steep(lua_State* L) {
return 1;
}
-int smlua_func_find_floor_height_relative_polar(lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
+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) { return 0; }
- s16 angleFromMario = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- f32 distFromMario = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushnumber(L, find_floor_height_relative_polar(m, angleFromMario, distFromMario));
+ lua_pushinteger(L, mario_get_floor_class(m));
return 1;
}
-int smlua_func_find_floor_slope(lua_State* L) {
+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) { return 0; }
+
+ lua_pushinteger(L, mario_get_terrain_sound_addend(m));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ mario_set_bubbled(m);
+
+ return 1;
+}
+
+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) { return 0; }
- s16 yawOffset = smlua_to_integer(L, 2);
+ f32 speed = smlua_to_number(L, 2);
if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushinteger(L, find_floor_slope(m, yawOffset));
+ mario_set_forward_vel(m, speed);
return 1;
}
-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) { return 0; }
-
- update_mario_sound_and_camera(m);
-
- return 1;
-}
-
-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) { return 0; }
-
- set_steep_jump_action(m);
-
- return 1;
-}
-
-int smlua_func_set_mario_action(lua_State* L) {
+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) { return 0; }
- u32 action = smlua_to_integer(L, 2);
+ u32 soundBits = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { return 0; }
- u32 actionArg = smlua_to_integer(L, 3);
+ u32 waveParticleType = smlua_to_integer(L, 3);
if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushinteger(L, set_mario_action(m, action, actionArg));
+ play_mario_action_sound(m, soundBits, waveParticleType);
+
+ return 1;
+}
+
+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) { return 0; }
+ u32 soundBits = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ play_mario_heavy_landing_sound(m, soundBits);
+
+ return 1;
+}
+
+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) { return 0; }
+ u32 soundBits = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ play_mario_heavy_landing_sound_once(m, soundBits);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ play_mario_jump_sound(m);
+
+ return 1;
+}
+
+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) { return 0; }
+ u32 soundBits = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ play_mario_landing_sound(m, soundBits);
+
+ return 1;
+}
+
+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) { return 0; }
+ u32 soundBits = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ play_mario_landing_sound_once(m, soundBits);
+
+ return 1;
+}
+
+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) { return 0; }
+ s32 primarySoundBits = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ s32 scondarySoundBits = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ play_mario_sound(m, primarySoundBits, scondarySoundBits);
+
+ return 1;
+}
+
+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) { return 0; }
+ u32 soundBits = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ u32 waveParticleType = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ play_sound_and_spawn_particles(m, soundBits, waveParticleType);
+
+ return 1;
+}
+
+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) { return 0; }
+ u32 soundBits = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ u32 flags = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ play_sound_if_no_flag(m, soundBits, flags);
+
+ return 1;
+}
+
+/*
+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");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ pos[1] = smlua_get_number_field(1, "y");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ pos[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ f32 offset = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ f32 radius = smlua_to_number(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ UNIMPLEMENTED -->(L, 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_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) { return 0; }
+
+ lua_pushinteger(L, return_mario_anim_y_translation(m));
+
+ return 1;
+}
+
+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) { return 0; }
+ s16 animFrame = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ set_anim_to_frame(m, animFrame);
return 1;
}
@@ -663,7 +636,7 @@ int smlua_func_set_jumping_action(lua_State* L) {
return 1;
}
-int smlua_func_drop_and_set_mario_action(lua_State* L) {
+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);
@@ -673,57 +646,46 @@ int smlua_func_drop_and_set_mario_action(lua_State* L) {
u32 actionArg = smlua_to_integer(L, 3);
if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushinteger(L, drop_and_set_mario_action(m, action, actionArg));
+ lua_pushinteger(L, set_mario_action(m, action, actionArg));
return 1;
}
-int smlua_func_hurt_and_set_mario_action(lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+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) { return 0; }
- u32 action = smlua_to_integer(L, 2);
+ s32 targetAnimID = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { return 0; }
- u32 actionArg = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
- s16 hurtCounter = smlua_to_integer(L, 4);
+ s32 accel = smlua_to_integer(L, 3);
if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushinteger(L, hurt_and_set_mario_action(m, action, actionArg, hurtCounter));
+ lua_pushinteger(L, set_mario_anim_with_accel(m, targetAnimID, accel));
return 1;
}
-int smlua_func_check_common_action_exits(lua_State* L) {
+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) { return 0; }
+ s32 targetAnimID = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ lua_pushinteger(L, set_mario_animation(m, targetAnimID));
+
+ return 1;
+}
+
+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) { return 0; }
- lua_pushinteger(L, check_common_action_exits(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- lua_pushinteger(L, check_common_hold_action_exits(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- lua_pushinteger(L, transition_submerged_to_walking(m));
+ set_steep_jump_action(m);
return 1;
}
@@ -739,82 +701,606 @@ int smlua_func_set_water_plunge_action(lua_State* L) {
return 1;
}
-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) { return 0; }
-
- lua_pushinteger(L, execute_mario_action(o));
-
- return 1;
-}
-
-int smlua_func_force_idle_state(lua_State* L) {
+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) { return 0; }
- lua_pushinteger(L, force_idle_state(m));
+ lua_pushinteger(L, transition_submerged_to_walking(m));
return 1;
}
+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) { return 0; }
+
+ update_mario_pos_for_anim(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ update_mario_sound_and_camera(m);
+
+ return 1;
+}
+
+/*
+int smlua_func_vec3f_find_ceil(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");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ pos[1] = smlua_get_number_field(1, "y");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ pos[2] = smlua_get_number_field(1, "z");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ f32 height = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+// struct Surface** ceil = (struct Surface**)smlua_to_cobject(L, 3, LVT_???); <--- UNIMPLEMENTED
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ lua_pushnumber(L, vec3f_find_ceil(pos, height, ceil));
+
+ 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;
+}
+*/
+
//////////////////////////////
// mario_actions_airborne.c //
//////////////////////////////
-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) { return 0; }
- s16 frame1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- s16 frame2 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
- s16 frame3 = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3);
- play_flip_sounds(m, frame1, frame2, frame3);
-
- return 1;
-}
-
-int smlua_func_play_far_fall_sound(lua_State* L) {
+int smlua_func_act_air_hit_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) { return 0; }
- extern void play_far_fall_sound(struct MarioState *m);
- play_far_fall_sound(m);
+ extern s32 act_air_hit_wall(struct MarioState *m);
+ lua_pushinteger(L, act_air_hit_wall(m));
return 1;
}
-int smlua_func_play_knockback_sound(lua_State* L) {
+int smlua_func_act_air_throw(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) { return 0; }
- extern void play_knockback_sound(struct MarioState *m);
- play_knockback_sound(m);
+ extern s32 act_air_throw(struct MarioState *m);
+ lua_pushinteger(L, act_air_throw(m));
return 1;
}
-int smlua_func_lava_boost_on_wall(lua_State* L) {
+int smlua_func_act_backflip(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) { return 0; }
- extern s32 lava_boost_on_wall(struct MarioState *m);
- lua_pushinteger(L, lava_boost_on_wall(m));
+ extern s32 act_backflip(struct MarioState *m);
+ lua_pushinteger(L, act_backflip(m));
+
+ return 1;
+}
+
+int smlua_func_act_backward_air_kb(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) { return 0; }
+
+ extern s32 act_backward_air_kb(struct MarioState *m);
+ lua_pushinteger(L, act_backward_air_kb(m));
+
+ return 1;
+}
+
+int smlua_func_act_backward_rollout(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) { return 0; }
+
+ extern s32 act_backward_rollout(struct MarioState *m);
+ lua_pushinteger(L, act_backward_rollout(m));
+
+ return 1;
+}
+
+int smlua_func_act_burning_fall(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) { return 0; }
+
+ extern s32 act_burning_fall(struct MarioState *m);
+ lua_pushinteger(L, act_burning_fall(m));
+
+ return 1;
+}
+
+int smlua_func_act_burning_jump(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) { return 0; }
+
+ extern s32 act_burning_jump(struct MarioState *m);
+ lua_pushinteger(L, act_burning_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_butt_slide_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) { return 0; }
+
+ extern s32 act_butt_slide_air(struct MarioState *m);
+ lua_pushinteger(L, act_butt_slide_air(m));
+
+ return 1;
+}
+
+int smlua_func_act_crazy_box_bounce(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) { return 0; }
+
+ extern s32 act_crazy_box_bounce(struct MarioState *m);
+ lua_pushinteger(L, act_crazy_box_bounce(m));
+
+ return 1;
+}
+
+int smlua_func_act_dive(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) { return 0; }
+
+ extern s32 act_dive(struct MarioState *m);
+ lua_pushinteger(L, act_dive(m));
+
+ return 1;
+}
+
+int smlua_func_act_double_jump(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) { return 0; }
+
+ extern s32 act_double_jump(struct MarioState *m);
+ lua_pushinteger(L, act_double_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_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) { return 0; }
+
+ extern s32 act_flying(struct MarioState *m);
+ lua_pushinteger(L, act_flying(m));
+
+ return 1;
+}
+
+int smlua_func_act_flying_triple_jump(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) { return 0; }
+
+ extern s32 act_flying_triple_jump(struct MarioState *m);
+ lua_pushinteger(L, act_flying_triple_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_forward_air_kb(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) { return 0; }
+
+ extern s32 act_forward_air_kb(struct MarioState *m);
+ lua_pushinteger(L, act_forward_air_kb(m));
+
+ return 1;
+}
+
+int smlua_func_act_forward_rollout(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) { return 0; }
+
+ extern s32 act_forward_rollout(struct MarioState *m);
+ lua_pushinteger(L, act_forward_rollout(m));
+
+ return 1;
+}
+
+int smlua_func_act_freefall(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) { return 0; }
+
+ extern s32 act_freefall(struct MarioState *m);
+ lua_pushinteger(L, act_freefall(m));
+
+ return 1;
+}
+
+int smlua_func_act_getting_blown(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) { return 0; }
+
+ extern s32 act_getting_blown(struct MarioState *m);
+ lua_pushinteger(L, act_getting_blown(m));
+
+ return 1;
+}
+
+int smlua_func_act_ground_pound(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) { return 0; }
+
+ extern s32 act_ground_pound(struct MarioState *m);
+ lua_pushinteger(L, act_ground_pound(m));
+
+ return 1;
+}
+
+int smlua_func_act_hard_backward_air_kb(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) { return 0; }
+
+ extern s32 act_hard_backward_air_kb(struct MarioState *m);
+ lua_pushinteger(L, act_hard_backward_air_kb(m));
+
+ return 1;
+}
+
+int smlua_func_act_hard_forward_air_kb(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) { return 0; }
+
+ extern s32 act_hard_forward_air_kb(struct MarioState *m);
+ lua_pushinteger(L, act_hard_forward_air_kb(m));
+
+ return 1;
+}
+
+int smlua_func_act_hold_butt_slide_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) { return 0; }
+
+ extern s32 act_hold_butt_slide_air(struct MarioState *m);
+ lua_pushinteger(L, act_hold_butt_slide_air(m));
+
+ return 1;
+}
+
+int smlua_func_act_hold_freefall(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) { return 0; }
+
+ extern s32 act_hold_freefall(struct MarioState *m);
+ lua_pushinteger(L, act_hold_freefall(m));
+
+ return 1;
+}
+
+int smlua_func_act_hold_jump(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) { return 0; }
+
+ extern s32 act_hold_jump(struct MarioState *m);
+ lua_pushinteger(L, act_hold_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_hold_water_jump(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) { return 0; }
+
+ extern s32 act_hold_water_jump(struct MarioState *m);
+ lua_pushinteger(L, act_hold_water_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_jump(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) { return 0; }
+
+ extern s32 act_jump(struct MarioState *m);
+ lua_pushinteger(L, act_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_jump_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) { return 0; }
+
+ extern s32 act_jump_kick(struct MarioState *m);
+ lua_pushinteger(L, act_jump_kick(m));
+
+ return 1;
+}
+
+int smlua_func_act_lava_boost(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) { return 0; }
+
+ extern s32 act_lava_boost(struct MarioState *m);
+ lua_pushinteger(L, act_lava_boost(m));
+
+ return 1;
+}
+
+int smlua_func_act_long_jump(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) { return 0; }
+
+ extern s32 act_long_jump(struct MarioState *m);
+ lua_pushinteger(L, act_long_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_riding_hoot(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) { return 0; }
+
+ extern s32 act_riding_hoot(struct MarioState *m);
+ lua_pushinteger(L, act_riding_hoot(m));
+
+ return 1;
+}
+
+int smlua_func_act_riding_shell_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) { return 0; }
+
+ extern s32 act_riding_shell_air(struct MarioState *m);
+ lua_pushinteger(L, act_riding_shell_air(m));
+
+ return 1;
+}
+
+int smlua_func_act_shot_from_cannon(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) { return 0; }
+
+ extern s32 act_shot_from_cannon(struct MarioState *m);
+ lua_pushinteger(L, act_shot_from_cannon(m));
+
+ return 1;
+}
+
+int smlua_func_act_side_flip(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) { return 0; }
+
+ extern s32 act_side_flip(struct MarioState *m);
+ lua_pushinteger(L, act_side_flip(m));
+
+ return 1;
+}
+
+int smlua_func_act_slide_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) { return 0; }
+
+ extern s32 act_slide_kick(struct MarioState *m);
+ lua_pushinteger(L, act_slide_kick(m));
+
+ return 1;
+}
+
+int smlua_func_act_soft_bonk(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) { return 0; }
+
+ extern s32 act_soft_bonk(struct MarioState *m);
+ lua_pushinteger(L, act_soft_bonk(m));
+
+ return 1;
+}
+
+int smlua_func_act_special_triple_jump(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) { return 0; }
+
+ extern s32 act_special_triple_jump(struct MarioState *m);
+ lua_pushinteger(L, act_special_triple_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_steep_jump(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) { return 0; }
+
+ extern s32 act_steep_jump(struct MarioState *m);
+ lua_pushinteger(L, act_steep_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_thrown_backward(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) { return 0; }
+
+ extern s32 act_thrown_backward(struct MarioState *m);
+ lua_pushinteger(L, act_thrown_backward(m));
+
+ return 1;
+}
+
+int smlua_func_act_thrown_forward(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) { return 0; }
+
+ extern s32 act_thrown_forward(struct MarioState *m);
+ lua_pushinteger(L, act_thrown_forward(m));
+
+ return 1;
+}
+
+int smlua_func_act_top_of_pole_jump(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) { return 0; }
+
+ extern s32 act_top_of_pole_jump(struct MarioState *m);
+ lua_pushinteger(L, act_top_of_pole_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_triple_jump(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) { return 0; }
+
+ extern s32 act_triple_jump(struct MarioState *m);
+ lua_pushinteger(L, act_triple_jump(m));
+
+ return 1;
+}
+
+int smlua_func_act_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) { return 0; }
+
+ extern s32 act_twirling(struct MarioState *m);
+ lua_pushinteger(L, act_twirling(m));
+
+ return 1;
+}
+
+int smlua_func_act_vertical_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) { return 0; }
+
+ extern s32 act_vertical_wind(struct MarioState *m);
+ lua_pushinteger(L, act_vertical_wind(m));
+
+ return 1;
+}
+
+int smlua_func_act_wall_kick_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) { return 0; }
+
+ extern s32 act_wall_kick_air(struct MarioState *m);
+ lua_pushinteger(L, act_wall_kick_air(m));
+
+ return 1;
+}
+
+int smlua_func_act_water_jump(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) { return 0; }
+
+ extern s32 act_water_jump(struct MarioState *m);
+ lua_pushinteger(L, act_water_jump(m));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern s32 check_common_airborne_cancels(struct MarioState *m);
+ lua_pushinteger(L, check_common_airborne_cancels(m));
return 1;
}
@@ -833,30 +1319,6 @@ int smlua_func_check_fall_damage(lua_State* L) {
return 1;
}
-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) { return 0; }
-
- extern s32 check_kick_or_dive_in_air(struct MarioState *m);
- lua_pushinteger(L, check_kick_or_dive_in_air(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern s32 should_get_stuck_in_ground(struct MarioState *m);
- lua_pushinteger(L, should_get_stuck_in_ground(m));
-
- return 1;
-}
-
int smlua_func_check_fall_damage_or_get_stuck(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
@@ -883,74 +1345,26 @@ int smlua_func_check_horizontal_wind(lua_State* L) {
return 1;
}
-int smlua_func_update_air_with_turn(lua_State* L) {
+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) { return 0; }
- extern void update_air_with_turn(struct MarioState *m);
- update_air_with_turn(m);
+ extern s32 check_kick_or_dive_in_air(struct MarioState *m);
+ lua_pushinteger(L, check_kick_or_dive_in_air(m));
return 1;
}
-int smlua_func_update_air_without_turn(lua_State* L) {
+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) { return 0; }
- extern void update_air_without_turn(struct MarioState *m);
- update_air_without_turn(m);
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void update_lava_boost_or_twirling(struct MarioState *m);
- update_lava_boost_or_twirling(m);
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void update_flying_yaw(struct MarioState *m);
- update_flying_yaw(m);
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void update_flying_pitch(struct MarioState *m);
- update_flying_pitch(m);
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void update_flying(struct MarioState *m);
- update_flying(m);
+ extern s32 check_wall_kick(struct MarioState *m);
+ lua_pushinteger(L, check_wall_kick(m));
return 1;
}
@@ -973,258 +1387,6 @@ int smlua_func_common_air_action_step(lua_State* L) {
return 1;
}
-int smlua_func_act_jump(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) { return 0; }
-
- extern s32 act_jump(struct MarioState *m);
- lua_pushinteger(L, act_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_double_jump(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) { return 0; }
-
- extern s32 act_double_jump(struct MarioState *m);
- lua_pushinteger(L, act_double_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_triple_jump(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) { return 0; }
-
- extern s32 act_triple_jump(struct MarioState *m);
- lua_pushinteger(L, act_triple_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_backflip(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) { return 0; }
-
- extern s32 act_backflip(struct MarioState *m);
- lua_pushinteger(L, act_backflip(m));
-
- return 1;
-}
-
-int smlua_func_act_freefall(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) { return 0; }
-
- extern s32 act_freefall(struct MarioState *m);
- lua_pushinteger(L, act_freefall(m));
-
- return 1;
-}
-
-int smlua_func_act_hold_jump(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) { return 0; }
-
- extern s32 act_hold_jump(struct MarioState *m);
- lua_pushinteger(L, act_hold_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_hold_freefall(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) { return 0; }
-
- extern s32 act_hold_freefall(struct MarioState *m);
- lua_pushinteger(L, act_hold_freefall(m));
-
- return 1;
-}
-
-int smlua_func_act_side_flip(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) { return 0; }
-
- extern s32 act_side_flip(struct MarioState *m);
- lua_pushinteger(L, act_side_flip(m));
-
- return 1;
-}
-
-int smlua_func_act_wall_kick_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) { return 0; }
-
- extern s32 act_wall_kick_air(struct MarioState *m);
- lua_pushinteger(L, act_wall_kick_air(m));
-
- return 1;
-}
-
-int smlua_func_act_long_jump(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) { return 0; }
-
- extern s32 act_long_jump(struct MarioState *m);
- lua_pushinteger(L, act_long_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_riding_shell_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) { return 0; }
-
- extern s32 act_riding_shell_air(struct MarioState *m);
- lua_pushinteger(L, act_riding_shell_air(m));
-
- return 1;
-}
-
-int smlua_func_act_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) { return 0; }
-
- extern s32 act_twirling(struct MarioState *m);
- lua_pushinteger(L, act_twirling(m));
-
- return 1;
-}
-
-int smlua_func_act_dive(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) { return 0; }
-
- extern s32 act_dive(struct MarioState *m);
- lua_pushinteger(L, act_dive(m));
-
- return 1;
-}
-
-int smlua_func_act_air_throw(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) { return 0; }
-
- extern s32 act_air_throw(struct MarioState *m);
- lua_pushinteger(L, act_air_throw(m));
-
- return 1;
-}
-
-int smlua_func_act_water_jump(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) { return 0; }
-
- extern s32 act_water_jump(struct MarioState *m);
- lua_pushinteger(L, act_water_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_hold_water_jump(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) { return 0; }
-
- extern s32 act_hold_water_jump(struct MarioState *m);
- lua_pushinteger(L, act_hold_water_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_steep_jump(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) { return 0; }
-
- extern s32 act_steep_jump(struct MarioState *m);
- lua_pushinteger(L, act_steep_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_ground_pound(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) { return 0; }
-
- extern s32 act_ground_pound(struct MarioState *m);
- lua_pushinteger(L, act_ground_pound(m));
-
- return 1;
-}
-
-int smlua_func_act_burning_jump(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) { return 0; }
-
- extern s32 act_burning_jump(struct MarioState *m);
- lua_pushinteger(L, act_burning_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_burning_fall(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) { return 0; }
-
- extern s32 act_burning_fall(struct MarioState *m);
- lua_pushinteger(L, act_burning_fall(m));
-
- return 1;
-}
-
-int smlua_func_act_crazy_box_bounce(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) { return 0; }
-
- extern s32 act_crazy_box_bounce(struct MarioState *m);
- lua_pushinteger(L, act_crazy_box_bounce(m));
-
- return 1;
-}
-
int smlua_func_common_air_knockback_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 5)) { return 0; }
@@ -1245,302 +1407,14 @@ int smlua_func_common_air_knockback_step(lua_State* L) {
return 1;
}
-int smlua_func_check_wall_kick(lua_State* L) {
+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) { return 0; }
- extern s32 check_wall_kick(struct MarioState *m);
- lua_pushinteger(L, check_wall_kick(m));
-
- return 1;
-}
-
-int smlua_func_act_backward_air_kb(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) { return 0; }
-
- extern s32 act_backward_air_kb(struct MarioState *m);
- lua_pushinteger(L, act_backward_air_kb(m));
-
- return 1;
-}
-
-int smlua_func_act_forward_air_kb(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) { return 0; }
-
- extern s32 act_forward_air_kb(struct MarioState *m);
- lua_pushinteger(L, act_forward_air_kb(m));
-
- return 1;
-}
-
-int smlua_func_act_hard_backward_air_kb(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) { return 0; }
-
- extern s32 act_hard_backward_air_kb(struct MarioState *m);
- lua_pushinteger(L, act_hard_backward_air_kb(m));
-
- return 1;
-}
-
-int smlua_func_act_hard_forward_air_kb(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) { return 0; }
-
- extern s32 act_hard_forward_air_kb(struct MarioState *m);
- lua_pushinteger(L, act_hard_forward_air_kb(m));
-
- return 1;
-}
-
-int smlua_func_act_thrown_backward(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) { return 0; }
-
- extern s32 act_thrown_backward(struct MarioState *m);
- lua_pushinteger(L, act_thrown_backward(m));
-
- return 1;
-}
-
-int smlua_func_act_thrown_forward(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) { return 0; }
-
- extern s32 act_thrown_forward(struct MarioState *m);
- lua_pushinteger(L, act_thrown_forward(m));
-
- return 1;
-}
-
-int smlua_func_act_soft_bonk(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) { return 0; }
-
- extern s32 act_soft_bonk(struct MarioState *m);
- lua_pushinteger(L, act_soft_bonk(m));
-
- return 1;
-}
-
-int smlua_func_act_getting_blown(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) { return 0; }
-
- extern s32 act_getting_blown(struct MarioState *m);
- lua_pushinteger(L, act_getting_blown(m));
-
- return 1;
-}
-
-int smlua_func_act_air_hit_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) { return 0; }
-
- extern s32 act_air_hit_wall(struct MarioState *m);
- lua_pushinteger(L, act_air_hit_wall(m));
-
- return 1;
-}
-
-int smlua_func_act_forward_rollout(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) { return 0; }
-
- extern s32 act_forward_rollout(struct MarioState *m);
- lua_pushinteger(L, act_forward_rollout(m));
-
- return 1;
-}
-
-int smlua_func_act_backward_rollout(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) { return 0; }
-
- extern s32 act_backward_rollout(struct MarioState *m);
- lua_pushinteger(L, act_backward_rollout(m));
-
- return 1;
-}
-
-int smlua_func_act_butt_slide_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) { return 0; }
-
- extern s32 act_butt_slide_air(struct MarioState *m);
- lua_pushinteger(L, act_butt_slide_air(m));
-
- return 1;
-}
-
-int smlua_func_act_hold_butt_slide_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) { return 0; }
-
- extern s32 act_hold_butt_slide_air(struct MarioState *m);
- lua_pushinteger(L, act_hold_butt_slide_air(m));
-
- return 1;
-}
-
-int smlua_func_act_lava_boost(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) { return 0; }
-
- extern s32 act_lava_boost(struct MarioState *m);
- lua_pushinteger(L, act_lava_boost(m));
-
- return 1;
-}
-
-int smlua_func_act_slide_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) { return 0; }
-
- extern s32 act_slide_kick(struct MarioState *m);
- lua_pushinteger(L, act_slide_kick(m));
-
- return 1;
-}
-
-int smlua_func_act_jump_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) { return 0; }
-
- extern s32 act_jump_kick(struct MarioState *m);
- lua_pushinteger(L, act_jump_kick(m));
-
- return 1;
-}
-
-int smlua_func_act_shot_from_cannon(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) { return 0; }
-
- extern s32 act_shot_from_cannon(struct MarioState *m);
- lua_pushinteger(L, act_shot_from_cannon(m));
-
- return 1;
-}
-
-int smlua_func_act_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) { return 0; }
-
- extern s32 act_flying(struct MarioState *m);
- lua_pushinteger(L, act_flying(m));
-
- return 1;
-}
-
-int smlua_func_act_riding_hoot(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) { return 0; }
-
- extern s32 act_riding_hoot(struct MarioState *m);
- lua_pushinteger(L, act_riding_hoot(m));
-
- return 1;
-}
-
-int smlua_func_act_flying_triple_jump(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) { return 0; }
-
- extern s32 act_flying_triple_jump(struct MarioState *m);
- lua_pushinteger(L, act_flying_triple_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_top_of_pole_jump(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) { return 0; }
-
- extern s32 act_top_of_pole_jump(struct MarioState *m);
- lua_pushinteger(L, act_top_of_pole_jump(m));
-
- return 1;
-}
-
-int smlua_func_act_vertical_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) { return 0; }
-
- extern s32 act_vertical_wind(struct MarioState *m);
- lua_pushinteger(L, act_vertical_wind(m));
-
- return 1;
-}
-
-int smlua_func_act_special_triple_jump(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) { return 0; }
-
- extern s32 act_special_triple_jump(struct MarioState *m);
- lua_pushinteger(L, act_special_triple_jump(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern s32 check_common_airborne_cancels(struct MarioState *m);
- lua_pushinteger(L, check_common_airborne_cancels(m));
+ extern s32 lava_boost_on_wall(struct MarioState *m);
+ lua_pushinteger(L, lava_boost_on_wall(m));
return 1;
}
@@ -1557,10 +1431,340 @@ int smlua_func_mario_execute_airborne_action(lua_State* L) {
return 1;
}
+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) { return 0; }
+
+ extern void play_far_fall_sound(struct MarioState *m);
+ play_far_fall_sound(m);
+
+ return 1;
+}
+
+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) { return 0; }
+ s16 frame1 = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ s16 frame2 = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ s16 frame3 = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3);
+ play_flip_sounds(m, frame1, frame2, frame3);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void play_knockback_sound(struct MarioState *m);
+ play_knockback_sound(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern s32 should_get_stuck_in_ground(struct MarioState *m);
+ lua_pushinteger(L, should_get_stuck_in_ground(m));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void update_air_with_turn(struct MarioState *m);
+ update_air_with_turn(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void update_air_without_turn(struct MarioState *m);
+ update_air_without_turn(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void update_flying(struct MarioState *m);
+ update_flying(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void update_flying_pitch(struct MarioState *m);
+ update_flying_pitch(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void update_flying_yaw(struct MarioState *m);
+ update_flying_yaw(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void update_lava_boost_or_twirling(struct MarioState *m);
+ update_lava_boost_or_twirling(m);
+
+ return 1;
+}
+
///////////////////////////////
// mario_actions_automatic.c //
///////////////////////////////
+int smlua_func_act_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) { return 0; }
+
+ extern s32 act_bubbled(struct MarioState* m);
+ lua_pushinteger(L, act_bubbled(m));
+
+ return 1;
+}
+
+int smlua_func_act_climbing_pole(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) { return 0; }
+
+ extern s32 act_climbing_pole(struct MarioState *m);
+ lua_pushinteger(L, act_climbing_pole(m));
+
+ return 1;
+}
+
+int smlua_func_act_grab_pole_fast(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) { return 0; }
+
+ extern s32 act_grab_pole_fast(struct MarioState *m);
+ lua_pushinteger(L, act_grab_pole_fast(m));
+
+ return 1;
+}
+
+int smlua_func_act_grab_pole_slow(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) { return 0; }
+
+ extern s32 act_grab_pole_slow(struct MarioState *m);
+ lua_pushinteger(L, act_grab_pole_slow(m));
+
+ return 1;
+}
+
+int smlua_func_act_grabbed(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) { return 0; }
+
+ extern s32 act_grabbed(struct MarioState *m);
+ lua_pushinteger(L, act_grabbed(m));
+
+ return 1;
+}
+
+int smlua_func_act_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) { return 0; }
+
+ extern s32 act_hang_moving(struct MarioState *m);
+ lua_pushinteger(L, act_hang_moving(m));
+
+ return 1;
+}
+
+int smlua_func_act_hanging(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) { return 0; }
+
+ extern s32 act_hanging(struct MarioState *m);
+ lua_pushinteger(L, act_hanging(m));
+
+ return 1;
+}
+
+int smlua_func_act_holding_pole(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) { return 0; }
+
+ extern s32 act_holding_pole(struct MarioState *m);
+ lua_pushinteger(L, act_holding_pole(m));
+
+ return 1;
+}
+
+int smlua_func_act_in_cannon(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) { return 0; }
+
+ extern s32 act_in_cannon(struct MarioState *m);
+ lua_pushinteger(L, act_in_cannon(m));
+
+ return 1;
+}
+
+int smlua_func_act_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) { return 0; }
+
+ extern s32 act_ledge_climb_down(struct MarioState *m);
+ lua_pushinteger(L, act_ledge_climb_down(m));
+
+ return 1;
+}
+
+int smlua_func_act_ledge_climb_fast(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) { return 0; }
+
+ extern s32 act_ledge_climb_fast(struct MarioState *m);
+ lua_pushinteger(L, act_ledge_climb_fast(m));
+
+ return 1;
+}
+
+int smlua_func_act_ledge_climb_slow(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) { return 0; }
+
+ extern s32 act_ledge_climb_slow(struct MarioState *m);
+ lua_pushinteger(L, act_ledge_climb_slow(m));
+
+ return 1;
+}
+
+int smlua_func_act_ledge_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) { return 0; }
+
+ extern s32 act_ledge_grab(struct MarioState *m);
+ lua_pushinteger(L, act_ledge_grab(m));
+
+ return 1;
+}
+
+int smlua_func_act_start_hanging(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) { return 0; }
+
+ extern s32 act_start_hanging(struct MarioState *m);
+ lua_pushinteger(L, act_start_hanging(m));
+
+ return 1;
+}
+
+int smlua_func_act_top_of_pole(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) { return 0; }
+
+ extern s32 act_top_of_pole(struct MarioState *m);
+ lua_pushinteger(L, act_top_of_pole(m));
+
+ return 1;
+}
+
+int smlua_func_act_top_of_pole_transition(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) { return 0; }
+
+ extern s32 act_top_of_pole_transition(struct MarioState *m);
+ lua_pushinteger(L, act_top_of_pole_transition(m));
+
+ return 1;
+}
+
+int smlua_func_act_tornado_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) { return 0; }
+
+ extern s32 act_tornado_twirling(struct MarioState *m);
+ lua_pushinteger(L, act_tornado_twirling(m));
+
+ return 1;
+}
+
int smlua_func_add_tree_leaf_particles(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
@@ -1573,6 +1777,78 @@ int smlua_func_add_tree_leaf_particles(lua_State* L) {
return 1;
}
+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) { return 0; }
+
+ extern s32 check_common_automatic_cancels(struct MarioState *m);
+ lua_pushinteger(L, check_common_automatic_cancels(m));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void climb_up_ledge(struct MarioState *m);
+ climb_up_ledge(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern s32 let_go_of_ledge(struct MarioState *m);
+ lua_pushinteger(L, let_go_of_ledge(m));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern s32 mario_execute_automatic_action(struct MarioState *m);
+ lua_pushinteger(L, mario_execute_automatic_action(m));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ f32* nextPos = smlua_get_vec3f_from_buffer();
+ nextPos[0] = smlua_get_number_field(2, "x");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ nextPos[1] = smlua_get_number_field(2, "y");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ nextPos[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos);
+ lua_pushinteger(L, perform_hanging_step(m, nextPos));
+
+ smlua_push_number_field(2, "x", nextPos[0]);
+ smlua_push_number_field(2, "y", nextPos[1]);
+ smlua_push_number_field(2, "z", nextPos[2]);
+
+ return 1;
+}
+
int smlua_func_play_climbing_sounds(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
@@ -1601,102 +1877,6 @@ int smlua_func_set_pole_position(lua_State* L) {
return 1;
}
-int smlua_func_act_holding_pole(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) { return 0; }
-
- extern s32 act_holding_pole(struct MarioState *m);
- lua_pushinteger(L, act_holding_pole(m));
-
- return 1;
-}
-
-int smlua_func_act_climbing_pole(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) { return 0; }
-
- extern s32 act_climbing_pole(struct MarioState *m);
- lua_pushinteger(L, act_climbing_pole(m));
-
- return 1;
-}
-
-int smlua_func_act_grab_pole_slow(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) { return 0; }
-
- extern s32 act_grab_pole_slow(struct MarioState *m);
- lua_pushinteger(L, act_grab_pole_slow(m));
-
- return 1;
-}
-
-int smlua_func_act_grab_pole_fast(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) { return 0; }
-
- extern s32 act_grab_pole_fast(struct MarioState *m);
- lua_pushinteger(L, act_grab_pole_fast(m));
-
- return 1;
-}
-
-int smlua_func_act_top_of_pole_transition(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) { return 0; }
-
- extern s32 act_top_of_pole_transition(struct MarioState *m);
- lua_pushinteger(L, act_top_of_pole_transition(m));
-
- return 1;
-}
-
-int smlua_func_act_top_of_pole(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) { return 0; }
-
- extern s32 act_top_of_pole(struct MarioState *m);
- lua_pushinteger(L, act_top_of_pole(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- f32* nextPos = smlua_get_vec3f_from_buffer();
- nextPos[0] = smlua_get_number_field(2, "x");
- if (!gSmLuaConvertSuccess) { return 0; }
- nextPos[1] = smlua_get_number_field(2, "y");
- if (!gSmLuaConvertSuccess) { return 0; }
- nextPos[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos);
- lua_pushinteger(L, perform_hanging_step(m, nextPos));
-
- smlua_push_number_field(2, "x", nextPos[0]);
- smlua_push_number_field(2, "y", nextPos[1]);
- smlua_push_number_field(2, "z", nextPos[2]);
-
- return 1;
-}
-
int smlua_func_update_hang_moving(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
@@ -1721,78 +1901,6 @@ int smlua_func_update_hang_stationary(lua_State* L) {
return 1;
}
-int smlua_func_act_start_hanging(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) { return 0; }
-
- extern s32 act_start_hanging(struct MarioState *m);
- lua_pushinteger(L, act_start_hanging(m));
-
- return 1;
-}
-
-int smlua_func_act_hanging(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) { return 0; }
-
- extern s32 act_hanging(struct MarioState *m);
- lua_pushinteger(L, act_hanging(m));
-
- return 1;
-}
-
-int smlua_func_act_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) { return 0; }
-
- extern s32 act_hang_moving(struct MarioState *m);
- lua_pushinteger(L, act_hang_moving(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern s32 let_go_of_ledge(struct MarioState *m);
- lua_pushinteger(L, let_go_of_ledge(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void climb_up_ledge(struct MarioState *m);
- climb_up_ledge(m);
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void update_ledge_climb_camera(struct MarioState *m);
- update_ledge_climb_camera(m);
-
- return 1;
-}
-
int smlua_func_update_ledge_climb(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
@@ -1809,122 +1917,14 @@ int smlua_func_update_ledge_climb(lua_State* L) {
return 1;
}
-int smlua_func_act_ledge_grab(lua_State* L) {
+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) { return 0; }
- extern s32 act_ledge_grab(struct MarioState *m);
- lua_pushinteger(L, act_ledge_grab(m));
-
- return 1;
-}
-
-int smlua_func_act_ledge_climb_slow(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) { return 0; }
-
- extern s32 act_ledge_climb_slow(struct MarioState *m);
- lua_pushinteger(L, act_ledge_climb_slow(m));
-
- return 1;
-}
-
-int smlua_func_act_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) { return 0; }
-
- extern s32 act_ledge_climb_down(struct MarioState *m);
- lua_pushinteger(L, act_ledge_climb_down(m));
-
- return 1;
-}
-
-int smlua_func_act_ledge_climb_fast(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) { return 0; }
-
- extern s32 act_ledge_climb_fast(struct MarioState *m);
- lua_pushinteger(L, act_ledge_climb_fast(m));
-
- return 1;
-}
-
-int smlua_func_act_grabbed(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) { return 0; }
-
- extern s32 act_grabbed(struct MarioState *m);
- lua_pushinteger(L, act_grabbed(m));
-
- return 1;
-}
-
-int smlua_func_act_in_cannon(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) { return 0; }
-
- extern s32 act_in_cannon(struct MarioState *m);
- lua_pushinteger(L, act_in_cannon(m));
-
- return 1;
-}
-
-int smlua_func_act_tornado_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) { return 0; }
-
- extern s32 act_tornado_twirling(struct MarioState *m);
- lua_pushinteger(L, act_tornado_twirling(m));
-
- return 1;
-}
-
-int smlua_func_act_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) { return 0; }
-
- extern s32 act_bubbled(struct MarioState* m);
- lua_pushinteger(L, act_bubbled(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern s32 check_common_automatic_cancels(struct MarioState *m);
- lua_pushinteger(L, check_common_automatic_cancels(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern s32 mario_execute_automatic_action(struct MarioState *m);
- lua_pushinteger(L, mario_execute_automatic_action(m));
+ extern void update_ledge_climb_camera(struct MarioState *m);
+ update_ledge_climb_camera(m);
return 1;
}
@@ -1933,16 +1933,6 @@ int smlua_func_mario_execute_automatic_action(lua_State* L) {
// mario_actions_cutscene.c //
//////////////////////////////
-int smlua_func_print_displaying_credits_entry(UNUSED lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
-
-
- extern void print_displaying_credits_entry(void);
- print_displaying_credits_entry();
-
- return 1;
-}
-
int smlua_func_bhv_end_peach_loop(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
@@ -1963,6 +1953,62 @@ int smlua_func_bhv_end_toad_loop(UNUSED lua_State* L) {
return 1;
}
+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) { return 0; }
+
+ extern void cutscene_put_cap_on(struct MarioState *m);
+ cutscene_put_cap_on(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void cutscene_take_cap_off(struct MarioState *m);
+ cutscene_take_cap_off(m);
+
+ return 1;
+}
+
+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) { return 0; }
+ s32 isInWater = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern void general_star_dance_handler(struct MarioState *m, s32 isInWater);
+ general_star_dance_handler(m, isInWater);
+
+ return 1;
+}
+
+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) { return 0; }
+ s16 y = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ s16 z = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ f32 radius = smlua_to_number(L, 4);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius);
+ generate_yellow_sparkles(x, y, z, radius);
+
+ return 1;
+}
+
int smlua_func_handle_save_menu(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
@@ -1975,6 +2021,30 @@ int smlua_func_handle_save_menu(lua_State* L) {
return 1;
}
+int smlua_func_print_displaying_credits_entry(UNUSED lua_State* L) {
+ if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
+
+
+ extern void print_displaying_credits_entry(void);
+ print_displaying_credits_entry();
+
+ return 1;
+}
+
+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) { return 0; }
+ struct Object* object = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
+ if (!gSmLuaConvertSuccess) { 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));
+
+ return 1;
+}
+
/*
int smlua_func_spawn_obj_at_mario_rel_yaw(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
@@ -1995,58 +2065,6 @@ int smlua_func_spawn_obj_at_mario_rel_yaw(lua_State* L) {
}
*/
-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) { return 0; }
-
- extern void cutscene_take_cap_off(struct MarioState *m);
- cutscene_take_cap_off(m);
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void cutscene_put_cap_on(struct MarioState *m);
- cutscene_put_cap_on(m);
-
- return 1;
-}
-
-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) { return 0; }
- struct Object* object = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT);
- if (!gSmLuaConvertSuccess) { 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));
-
- return 1;
-}
-
-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) { return 0; }
- s32 isInWater = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern void general_star_dance_handler(struct MarioState *m, s32 isInWater);
- general_star_dance_handler(m, isInWater);
-
- return 1;
-}
-
int smlua_func_stuck_in_ground_handler(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
@@ -2069,56 +2087,10 @@ int smlua_func_stuck_in_ground_handler(lua_State* L) {
return 1;
}
-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) { return 0; }
- s16 y = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- s16 z = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
- f32 radius = smlua_to_number(L, 4);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius);
- generate_yellow_sparkles(x, y, z, radius);
-
- return 1;
-}
-
////////////////////////////
// mario_actions_moving.c //
////////////////////////////
-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) { return 0; }
-
- extern s16 tilt_body_running(struct MarioState *m);
- lua_pushinteger(L, tilt_body_running(m));
-
- return 1;
-}
-
-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) { return 0; }
- s16 frame1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- s16 frame2 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern void play_step_sound(struct MarioState *m, s16 frame1, s16 frame2);
- play_step_sound(m, frame1, frame2);
-
- return 1;
-}
-
int smlua_func_align_with_floor(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
@@ -2131,6 +2103,106 @@ int smlua_func_align_with_floor(lua_State* L) {
return 1;
}
+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) { return 0; }
+
+ extern s32 analog_stick_held_back(struct MarioState *m);
+ lua_pushinteger(L, analog_stick_held_back(m));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void anim_and_audio_for_heavy_walk(struct MarioState *m);
+ anim_and_audio_for_heavy_walk(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void anim_and_audio_for_hold_walk(struct MarioState *m);
+ anim_and_audio_for_hold_walk(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void anim_and_audio_for_walk(struct MarioState *m);
+ anim_and_audio_for_walk(m);
+
+ return 1;
+}
+
+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) { return 0; }
+ f32 frictionFactor = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern s32 apply_landing_accel(struct MarioState *m, f32 frictionFactor);
+ lua_pushinteger(L, apply_landing_accel(m, frictionFactor));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void apply_slope_accel(struct MarioState *m);
+ apply_slope_accel(m);
+
+ return 1;
+}
+
+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) { return 0; }
+ f32 decelCoef = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern s32 apply_slope_decel(struct MarioState *m, f32 decelCoef);
+ lua_pushinteger(L, apply_slope_decel(m, decelCoef));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern s32 begin_braking_action(struct MarioState *m);
+ lua_pushinteger(L, begin_braking_action(m));
+
+ return 1;
+}
+
int smlua_func_begin_walking_action(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
@@ -2149,176 +2221,14 @@ int smlua_func_begin_walking_action(lua_State* L) {
return 1;
}
-int smlua_func_check_ledge_climb_down(lua_State* L) {
+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) { return 0; }
- extern void check_ledge_climb_down(struct MarioState *m);
- check_ledge_climb_down(m);
-
- return 1;
-}
-
-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) { return 0; }
- u32 fastAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- u32 slowAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern void slide_bonk(struct MarioState *m, u32 fastAction, u32 slowAction);
- slide_bonk(m, fastAction, slowAction);
-
- return 1;
-}
-
-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) { return 0; }
- u32 action = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- u32 actionArg = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { 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));
-
- return 1;
-}
-
-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) { return 0; }
- f32 accel = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- f32 lossFactor = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern void update_sliding_angle(struct MarioState *m, f32 accel, f32 lossFactor);
- update_sliding_angle(m, accel, lossFactor);
-
- return 1;
-}
-
-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) { return 0; }
- f32 stopSpeed = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern s32 update_sliding(struct MarioState *m, f32 stopSpeed);
- lua_pushinteger(L, update_sliding(m, stopSpeed));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void apply_slope_accel(struct MarioState *m);
- apply_slope_accel(m);
-
- return 1;
-}
-
-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) { return 0; }
- f32 frictionFactor = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern s32 apply_landing_accel(struct MarioState *m, f32 frictionFactor);
- lua_pushinteger(L, apply_landing_accel(m, frictionFactor));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void update_shell_speed(struct MarioState *m);
- update_shell_speed(m);
-
- return 1;
-}
-
-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) { return 0; }
- f32 decelCoef = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern s32 apply_slope_decel(struct MarioState *m, f32 decelCoef);
- lua_pushinteger(L, apply_slope_decel(m, decelCoef));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern s32 update_decelerating_speed(struct MarioState *m);
- lua_pushinteger(L, update_decelerating_speed(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void update_walking_speed(struct MarioState *m);
- update_walking_speed(m);
-
- return 1;
-}
-
-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) { return 0; }
-
- extern s32 should_begin_sliding(struct MarioState *m);
- lua_pushinteger(L, should_begin_sliding(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern s32 analog_stick_held_back(struct MarioState *m);
- lua_pushinteger(L, analog_stick_held_back(m));
+ extern s32 check_common_moving_cancels(struct MarioState *m);
+ lua_pushinteger(L, check_common_moving_cancels(m));
return 1;
}
@@ -2335,114 +2245,50 @@ int smlua_func_check_ground_dive_or_punch(lua_State* L) {
return 1;
}
-int smlua_func_begin_braking_action(lua_State* L) {
+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) { return 0; }
- extern s32 begin_braking_action(struct MarioState *m);
- lua_pushinteger(L, begin_braking_action(m));
+ extern void check_ledge_climb_down(struct MarioState *m);
+ check_ledge_climb_down(m);
return 1;
}
-int smlua_func_anim_and_audio_for_walk(lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
+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) { return 0; }
+ s32 animation = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ s32 arg2 = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ s32 arg3 = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ s32 arg4 = smlua_to_integer(L, 5);
+ if (!gSmLuaConvertSuccess) { return 0; }
- extern void anim_and_audio_for_walk(struct MarioState *m);
- anim_and_audio_for_walk(m);
+ 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));
return 1;
}
-int smlua_func_anim_and_audio_for_hold_walk(lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
+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) { return 0; }
-
- extern void anim_and_audio_for_hold_walk(struct MarioState *m);
- anim_and_audio_for_hold_walk(m);
-
- return 1;
-}
-
-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);
+ s16 animation = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ u32 airAction = smlua_to_integer(L, 3);
if (!gSmLuaConvertSuccess) { return 0; }
- extern void anim_and_audio_for_heavy_walk(struct MarioState *m);
- anim_and_audio_for_heavy_walk(m);
-
- return 1;
-}
-
-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) { return 0; }
-
- f32* startPos = smlua_get_vec3f_from_buffer();
- startPos[0] = smlua_get_number_field(2, "x");
- if (!gSmLuaConvertSuccess) { return 0; }
- startPos[1] = smlua_get_number_field(2, "y");
- if (!gSmLuaConvertSuccess) { return 0; }
- startPos[2] = smlua_get_number_field(2, "z");
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern void push_or_sidle_wall(struct MarioState *m, Vec3f startPos);
- push_or_sidle_wall(m, startPos);
-
- smlua_push_number_field(2, "x", startPos[0]);
- smlua_push_number_field(2, "y", startPos[1]);
- smlua_push_number_field(2, "z", startPos[2]);
-
- return 1;
-}
-
-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) { return 0; }
- s16 startYaw = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern void tilt_body_walking(struct MarioState *m, s16 startYaw);
- tilt_body_walking(m, startYaw);
-
- return 1;
-}
-
-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) { return 0; }
- s16 startYaw = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern void tilt_body_ground_shell(struct MarioState *m, s16 startYaw);
- tilt_body_ground_shell(m, startYaw);
-
- return 1;
-}
-
-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) { return 0; }
-
- extern void tilt_body_butt_slide(struct MarioState *m);
- tilt_body_butt_slide(m);
+ extern u32 common_landing_action(struct MarioState *m, s16 animation, u32 airAction);
+ lua_pushinteger(L, common_landing_action(m, animation, airAction));
return 1;
}
@@ -2485,56 +2331,54 @@ int smlua_func_common_slide_action_with_jump(lua_State* L) {
return 1;
}
-int smlua_func_stomach_slide_action(lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
+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) { return 0; }
- u32 stopAction = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- u32 airAction = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
- s32 animation = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { 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));
+ extern s32 mario_execute_moving_action(struct MarioState *m);
+ lua_pushinteger(L, mario_execute_moving_action(m));
return 1;
}
-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) { return 0; }
- s32 animation = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- s32 arg2 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
- s32 arg3 = smlua_to_integer(L, 4);
- if (!gSmLuaConvertSuccess) { return 0; }
- s32 arg4 = smlua_to_integer(L, 5);
- if (!gSmLuaConvertSuccess) { 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));
-
- return 1;
-}
-
-int smlua_func_common_landing_action(lua_State* L) {
+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) { return 0; }
- s16 animation = smlua_to_integer(L, 2);
+ s16 frame1 = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { return 0; }
- u32 airAction = smlua_to_integer(L, 3);
+ s16 frame2 = smlua_to_integer(L, 3);
if (!gSmLuaConvertSuccess) { return 0; }
- extern u32 common_landing_action(struct MarioState *m, s16 animation, u32 airAction);
- lua_pushinteger(L, common_landing_action(m, animation, airAction));
+ extern void play_step_sound(struct MarioState *m, s16 frame1, s16 frame2);
+ play_step_sound(m, frame1, frame2);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ f32* startPos = smlua_get_vec3f_from_buffer();
+ startPos[0] = smlua_get_number_field(2, "x");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ startPos[1] = smlua_get_number_field(2, "y");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ startPos[2] = smlua_get_number_field(2, "z");
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern void push_or_sidle_wall(struct MarioState *m, Vec3f startPos);
+ push_or_sidle_wall(m, startPos);
+
+ smlua_push_number_field(2, "x", startPos[0]);
+ smlua_push_number_field(2, "y", startPos[1]);
+ smlua_push_number_field(2, "z", startPos[2]);
return 1;
}
@@ -2559,26 +2403,182 @@ int smlua_func_quicksand_jump_land_action(lua_State* L) {
return 1;
}
-int smlua_func_check_common_moving_cancels(lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
+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) { return 0; }
+ u32 action = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ u32 actionArg = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
- extern s32 check_common_moving_cancels(struct MarioState *m);
- lua_pushinteger(L, check_common_moving_cancels(m));
+ 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));
return 1;
}
-int smlua_func_mario_execute_moving_action(lua_State* L) {
+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) { return 0; }
- extern s32 mario_execute_moving_action(struct MarioState *m);
- lua_pushinteger(L, mario_execute_moving_action(m));
+ extern s32 should_begin_sliding(struct MarioState *m);
+ lua_pushinteger(L, should_begin_sliding(m));
+
+ return 1;
+}
+
+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) { return 0; }
+ u32 fastAction = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ u32 slowAction = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern void slide_bonk(struct MarioState *m, u32 fastAction, u32 slowAction);
+ slide_bonk(m, fastAction, slowAction);
+
+ return 1;
+}
+
+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) { return 0; }
+ u32 stopAction = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ u32 airAction = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ s32 animation = smlua_to_integer(L, 4);
+ if (!gSmLuaConvertSuccess) { 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));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void tilt_body_butt_slide(struct MarioState *m);
+ tilt_body_butt_slide(m);
+
+ return 1;
+}
+
+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) { return 0; }
+ s16 startYaw = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern void tilt_body_ground_shell(struct MarioState *m, s16 startYaw);
+ tilt_body_ground_shell(m, startYaw);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern s16 tilt_body_running(struct MarioState *m);
+ lua_pushinteger(L, tilt_body_running(m));
+
+ return 1;
+}
+
+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) { return 0; }
+ s16 startYaw = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern void tilt_body_walking(struct MarioState *m, s16 startYaw);
+ tilt_body_walking(m, startYaw);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern s32 update_decelerating_speed(struct MarioState *m);
+ lua_pushinteger(L, update_decelerating_speed(m));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void update_shell_speed(struct MarioState *m);
+ update_shell_speed(m);
+
+ return 1;
+}
+
+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) { return 0; }
+ f32 stopSpeed = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern s32 update_sliding(struct MarioState *m, f32 stopSpeed);
+ lua_pushinteger(L, update_sliding(m, stopSpeed));
+
+ return 1;
+}
+
+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) { return 0; }
+ f32 accel = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ f32 lossFactor = smlua_to_number(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern void update_sliding_angle(struct MarioState *m, f32 accel, f32 lossFactor);
+ update_sliding_angle(m, accel, lossFactor);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern void update_walking_speed(struct MarioState *m);
+ update_walking_speed(m);
return 1;
}
@@ -2603,18 +2603,6 @@ int smlua_func_animated_stationary_ground_step(lua_State* L) {
return 1;
}
-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) { return 0; }
-
- extern s32 mario_update_punch_sequence(struct MarioState *m);
- lua_pushinteger(L, mario_update_punch_sequence(m));
-
- return 1;
-}
-
int smlua_func_check_common_object_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
@@ -2639,10 +2627,34 @@ int smlua_func_mario_execute_object_action(lua_State* L) {
return 1;
}
+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) { return 0; }
+
+ extern s32 mario_update_punch_sequence(struct MarioState *m);
+ lua_pushinteger(L, mario_update_punch_sequence(m));
+
+ return 1;
+}
+
////////////////////////////////
// mario_actions_stationary.c //
////////////////////////////////
+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) { return 0; }
+
+ extern s32 check_common_hold_idle_cancels(struct MarioState *m);
+ lua_pushinteger(L, check_common_hold_idle_cancels(m));
+
+ return 1;
+}
+
int smlua_func_check_common_idle_cancels(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
@@ -2655,14 +2667,56 @@ int smlua_func_check_common_idle_cancels(lua_State* L) {
return 1;
}
-int smlua_func_check_common_hold_idle_cancels(lua_State* L) {
+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) { return 0; }
+ u32 action = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern s32 check_common_landing_cancels(struct MarioState *m, u32 action);
+ lua_pushinteger(L, check_common_landing_cancels(m, action));
+
+ return 1;
+}
+
+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) { return 0; }
- extern s32 check_common_hold_idle_cancels(struct MarioState *m);
- lua_pushinteger(L, check_common_hold_idle_cancels(m));
+ extern s32 check_common_stationary_cancels(struct MarioState *m);
+ lua_pushinteger(L, check_common_stationary_cancels(m));
+
+ return 1;
+}
+
+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) { return 0; }
+ s32 arg1 = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ u32 action = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern s32 landing_step(struct MarioState *m, s32 arg1, u32 action);
+ lua_pushinteger(L, landing_step(m, arg1, action));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern s32 mario_execute_stationary_action(struct MarioState *m);
+ lua_pushinteger(L, mario_execute_stationary_action(m));
return 1;
}
@@ -2701,86 +2755,54 @@ int smlua_func_stopping_step(lua_State* L) {
return 1;
}
-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) { return 0; }
- s32 arg1 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- u32 action = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern s32 landing_step(struct MarioState *m, s32 arg1, u32 action);
- lua_pushinteger(L, landing_step(m, arg1, action));
-
- return 1;
-}
-
-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) { return 0; }
- u32 action = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern s32 check_common_landing_cancels(struct MarioState *m, u32 action);
- lua_pushinteger(L, check_common_landing_cancels(m, action));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern s32 check_common_stationary_cancels(struct MarioState *m);
- lua_pushinteger(L, check_common_stationary_cancels(m));
-
- return 1;
-}
-
-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) { return 0; }
-
- extern s32 mario_execute_stationary_action(struct MarioState *m);
- lua_pushinteger(L, mario_execute_stationary_action(m));
-
- return 1;
-}
-
///////////////////////////////
// mario_actions_submerged.c //
///////////////////////////////
-int smlua_func_set_swimming_at_surface_particles(lua_State* L) {
+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) { return 0; }
- u32 particleFlag = smlua_to_integer(L, 2);
+
+ f32* step = smlua_get_vec3f_from_buffer();
+ step[0] = smlua_get_number_field(2, "x");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ step[1] = smlua_get_number_field(2, "y");
+ if (!gSmLuaConvertSuccess) { return 0; }
+ step[2] = smlua_get_number_field(2, "z");
if (!gSmLuaConvertSuccess) { return 0; }
- extern void set_swimming_at_surface_particles(struct MarioState *m, u32 particleFlag);
- set_swimming_at_surface_particles(m, particleFlag);
+ extern void apply_water_current(struct MarioState *m, Vec3f step);
+ apply_water_current(m, step);
+
+ smlua_push_number_field(2, "x", step[0]);
+ smlua_push_number_field(2, "y", step[1]);
+ smlua_push_number_field(2, "z", step[2]);
return 1;
}
-int smlua_func_perform_water_step(lua_State* L) {
+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) { return 0; }
- extern u32 perform_water_step(struct MarioState *m);
- lua_pushinteger(L, perform_water_step(m));
+ extern void float_surface_gfx(struct MarioState *m);
+ float_surface_gfx(m);
+
+ return 1;
+}
+
+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) { return 0; }
+
+ extern s32 mario_execute_submerged_action(struct MarioState *m);
+ lua_pushinteger(L, mario_execute_submerged_action(m));
return 1;
}
@@ -2809,50 +2831,28 @@ int smlua_func_perform_water_full_step(lua_State* L) {
return 1;
}
-int smlua_func_mario_execute_submerged_action(lua_State* L) {
+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) { return 0; }
- extern s32 mario_execute_submerged_action(struct MarioState *m);
- lua_pushinteger(L, mario_execute_submerged_action(m));
+ extern u32 perform_water_step(struct MarioState *m);
+ lua_pushinteger(L, perform_water_step(m));
return 1;
}
-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) { return 0; }
-
- extern void float_surface_gfx(struct MarioState *m);
- float_surface_gfx(m);
-
- return 1;
-}
-
-int smlua_func_apply_water_current(lua_State* L) {
+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) { return 0; }
-
- f32* step = smlua_get_vec3f_from_buffer();
- step[0] = smlua_get_number_field(2, "x");
- if (!gSmLuaConvertSuccess) { return 0; }
- step[1] = smlua_get_number_field(2, "y");
- if (!gSmLuaConvertSuccess) { return 0; }
- step[2] = smlua_get_number_field(2, "z");
+ u32 particleFlag = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { return 0; }
- extern void apply_water_current(struct MarioState *m, Vec3f step);
- apply_water_current(m, step);
-
- smlua_push_number_field(2, "x", step[0]);
- smlua_push_number_field(2, "y", step[1]);
- smlua_push_number_field(2, "z", step[2]);
+ extern void set_swimming_at_surface_particles(struct MarioState *m, u32 particleFlag);
+ set_swimming_at_surface_particles(m, particleFlag);
return 1;
}
@@ -2883,19 +2883,6 @@ int smlua_func_mario_bonk_reflection(lua_State* L) {
return 1;
}
-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) { return 0; }
- f32 arg1 = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- lua_pushinteger(L, mario_update_quicksand(arg0, arg1));
-
- return 1;
-}
-
int smlua_func_mario_push_off_steep_floor(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
@@ -2922,6 +2909,19 @@ int smlua_func_mario_update_moving_sand(lua_State* L) {
return 1;
}
+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) { return 0; }
+ f32 arg1 = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ lua_pushinteger(L, mario_update_quicksand(arg0, arg1));
+
+ return 1;
+}
+
int smlua_func_mario_update_windy_ground(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
@@ -2933,39 +2933,6 @@ int smlua_func_mario_update_windy_ground(lua_State* L) {
return 1;
}
-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) { return 0; }
-
- stop_and_set_height_to_floor(arg0);
-
- return 1;
-}
-
-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) { return 0; }
-
- lua_pushinteger(L, stationary_ground_step(arg0));
-
- return 1;
-}
-
-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) { return 0; }
-
- lua_pushinteger(L, perform_ground_step(arg0));
-
- return 1;
-}
-
int smlua_func_perform_air_step(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
@@ -2979,6 +2946,17 @@ int smlua_func_perform_air_step(lua_State* L) {
return 1;
}
+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) { return 0; }
+
+ lua_pushinteger(L, perform_ground_step(arg0));
+
+ return 1;
+}
+
int smlua_func_set_vel_from_pitch_and_yaw(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
@@ -2990,6 +2968,28 @@ int smlua_func_set_vel_from_pitch_and_yaw(lua_State* L) {
return 1;
}
+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) { return 0; }
+
+ lua_pushinteger(L, stationary_ground_step(arg0));
+
+ return 1;
+}
+
+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) { return 0; }
+
+ stop_and_set_height_to_floor(arg0);
+
+ return 1;
+}
+
/////////////////////////
// surface_collision.h //
/////////////////////////
@@ -3015,17 +3015,6 @@ int smlua_func_f32_find_wall_collision(lua_State* L) {
}
*/
-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) { return 0; }
-
- lua_pushinteger(L, find_wall_collisions(colData));
-
- return 1;
-}
-
/*
int smlua_func_find_ceil(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
@@ -3046,7 +3035,7 @@ int smlua_func_find_ceil(lua_State* L) {
*/
/*
-int smlua_func_find_floor_height_and_data(lua_State* L) {
+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);
@@ -3055,10 +3044,10 @@ int smlua_func_find_floor_height_and_data(lua_State* L) {
if (!gSmLuaConvertSuccess) { return 0; }
f32 zPos = smlua_to_number(L, 3);
if (!gSmLuaConvertSuccess) { return 0; }
-// struct FloorGeometry** floorGeo = (struct FloorGeometry**)smlua_to_cobject(L, 4, LVT_???); <--- UNIMPLEMENTED
+// struct Surface** pfloor = (struct Surface**)smlua_to_cobject(L, 4, LVT_???); <--- UNIMPLEMENTED
if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushnumber(L, find_floor_height_and_data(xPos, yPos, zPos, floorGeo));
+ lua_pushnumber(L, find_floor(xPos, yPos, zPos, pfloor));
return 1;
}
@@ -3080,7 +3069,7 @@ int smlua_func_find_floor_height(lua_State* L) {
}
/*
-int smlua_func_find_floor(lua_State* L) {
+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);
@@ -3089,28 +3078,15 @@ int smlua_func_find_floor(lua_State* L) {
if (!gSmLuaConvertSuccess) { return 0; }
f32 zPos = smlua_to_number(L, 3);
if (!gSmLuaConvertSuccess) { return 0; }
-// struct Surface** pfloor = (struct Surface**)smlua_to_cobject(L, 4, LVT_???); <--- UNIMPLEMENTED
+// struct FloorGeometry** floorGeo = (struct FloorGeometry**)smlua_to_cobject(L, 4, LVT_???); <--- UNIMPLEMENTED
if (!gSmLuaConvertSuccess) { return 0; }
- lua_pushnumber(L, find_floor(xPos, yPos, zPos, pfloor));
+ lua_pushnumber(L, find_floor_height_and_data(xPos, yPos, zPos, floorGeo));
return 1;
}
*/
-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) { return 0; }
- f32 z = smlua_to_number(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- lua_pushnumber(L, find_water_level(x, z));
-
- return 1;
-}
-
int smlua_func_find_poison_gas_level(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 2)) { return 0; }
@@ -3173,6 +3149,30 @@ int smlua_func_find_surface_on_ray(lua_State* L) {
}
*/
+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) { return 0; }
+
+ lua_pushinteger(L, find_wall_collisions(colData));
+
+ return 1;
+}
+
+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) { return 0; }
+ f32 z = smlua_to_number(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ lua_pushnumber(L, find_water_level(x, z));
+
+ return 1;
+}
+
///////////////
// thread6.c //
///////////////
@@ -3191,22 +3191,6 @@ int smlua_func_queue_rumble_data(lua_State* L) {
return 1;
}
-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) { return 0; }
- s16 a0 = smlua_to_integer(L, 2);
- if (!gSmLuaConvertSuccess) { return 0; }
- s16 a1 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { return 0; }
-
- extern void queue_rumble_data_object(struct Object* object, s16 a0, s16 a1);
- queue_rumble_data_object(object, a0, a1);
-
- return 1;
-}
-
int smlua_func_queue_rumble_data_mario(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
@@ -3223,6 +3207,22 @@ int smlua_func_queue_rumble_data_mario(lua_State* L) {
return 1;
}
+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) { return 0; }
+ s16 a0 = smlua_to_integer(L, 2);
+ if (!gSmLuaConvertSuccess) { return 0; }
+ s16 a1 = smlua_to_integer(L, 3);
+ if (!gSmLuaConvertSuccess) { return 0; }
+
+ extern void queue_rumble_data_object(struct Object* object, s16 a0, s16 a1);
+ queue_rumble_data_object(object, a0, a1);
+
+ return 1;
+}
+
void smlua_bind_functions_autogen(void) {
@@ -3230,263 +3230,263 @@ void smlua_bind_functions_autogen(void) {
// camera.h
smlua_bind_function(L, "set_camera_shake_from_hit", smlua_func_set_camera_shake_from_hit);
- smlua_bind_function(L, "set_environmental_camera_shake", smlua_func_set_environmental_camera_shake);
smlua_bind_function(L, "set_camera_shake_from_point", smlua_func_set_camera_shake_from_point);
+ smlua_bind_function(L, "set_environmental_camera_shake", smlua_func_set_environmental_camera_shake);
// characters.h
//smlua_bind_function(L, "get_character", smlua_func_get_character); <--- UNIMPLEMENTED
- smlua_bind_function(L, "play_character_sound", smlua_func_play_character_sound);
- smlua_bind_function(L, "play_character_sound_offset", smlua_func_play_character_sound_offset);
- smlua_bind_function(L, "play_character_sound_if_no_flag", smlua_func_play_character_sound_if_no_flag);
smlua_bind_function(L, "get_character_anim_offset", smlua_func_get_character_anim_offset);
+ smlua_bind_function(L, "play_character_sound", smlua_func_play_character_sound);
+ smlua_bind_function(L, "play_character_sound_if_no_flag", smlua_func_play_character_sound_if_no_flag);
+ smlua_bind_function(L, "play_character_sound_offset", smlua_func_play_character_sound_offset);
smlua_bind_function(L, "update_character_anim_offset", smlua_func_update_character_anim_offset);
// external.h
smlua_bind_function(L, "play_sound", smlua_func_play_sound);
// mario.h
+ smlua_bind_function(L, "adjust_sound_for_speed", smlua_func_adjust_sound_for_speed);
+ smlua_bind_function(L, "check_common_action_exits", smlua_func_check_common_action_exits);
+ smlua_bind_function(L, "check_common_hold_action_exits", smlua_func_check_common_hold_action_exits);
+ smlua_bind_function(L, "drop_and_set_mario_action", smlua_func_drop_and_set_mario_action);
+ smlua_bind_function(L, "execute_mario_action", smlua_func_execute_mario_action);
+ smlua_bind_function(L, "find_floor_height_relative_polar", smlua_func_find_floor_height_relative_polar);
+ smlua_bind_function(L, "find_floor_slope", smlua_func_find_floor_slope);
+ smlua_bind_function(L, "find_mario_anim_flags_and_translation", smlua_func_find_mario_anim_flags_and_translation);
+ smlua_bind_function(L, "force_idle_state", smlua_func_force_idle_state);
+ smlua_bind_function(L, "hurt_and_set_mario_action", smlua_func_hurt_and_set_mario_action);
smlua_bind_function(L, "is_anim_at_end", smlua_func_is_anim_at_end);
smlua_bind_function(L, "is_anim_past_end", smlua_func_is_anim_past_end);
- smlua_bind_function(L, "set_mario_animation", smlua_func_set_mario_animation);
- smlua_bind_function(L, "set_mario_anim_with_accel", smlua_func_set_mario_anim_with_accel);
- smlua_bind_function(L, "set_anim_to_frame", smlua_func_set_anim_to_frame);
smlua_bind_function(L, "is_anim_past_frame", smlua_func_is_anim_past_frame);
- smlua_bind_function(L, "find_mario_anim_flags_and_translation", smlua_func_find_mario_anim_flags_and_translation);
- smlua_bind_function(L, "update_mario_pos_for_anim", smlua_func_update_mario_pos_for_anim);
- smlua_bind_function(L, "return_mario_anim_y_translation", smlua_func_return_mario_anim_y_translation);
- smlua_bind_function(L, "play_sound_if_no_flag", smlua_func_play_sound_if_no_flag);
- smlua_bind_function(L, "play_mario_jump_sound", smlua_func_play_mario_jump_sound);
- smlua_bind_function(L, "adjust_sound_for_speed", smlua_func_adjust_sound_for_speed);
- smlua_bind_function(L, "play_sound_and_spawn_particles", smlua_func_play_sound_and_spawn_particles);
- smlua_bind_function(L, "play_mario_action_sound", smlua_func_play_mario_action_sound);
- smlua_bind_function(L, "play_mario_landing_sound", smlua_func_play_mario_landing_sound);
- smlua_bind_function(L, "play_mario_landing_sound_once", smlua_func_play_mario_landing_sound_once);
- smlua_bind_function(L, "play_mario_heavy_landing_sound", smlua_func_play_mario_heavy_landing_sound);
- smlua_bind_function(L, "play_mario_heavy_landing_sound_once", smlua_func_play_mario_heavy_landing_sound_once);
- smlua_bind_function(L, "play_mario_sound", smlua_func_play_mario_sound);
- smlua_bind_function(L, "mario_set_bubbled", smlua_func_mario_set_bubbled);
- smlua_bind_function(L, "mario_set_forward_vel", smlua_func_mario_set_forward_vel);
- smlua_bind_function(L, "mario_get_floor_class", smlua_func_mario_get_floor_class);
- smlua_bind_function(L, "mario_get_terrain_sound_addend", smlua_func_mario_get_terrain_sound_addend);
- //smlua_bind_function(L, "resolve_and_return_wall_collisions", smlua_func_resolve_and_return_wall_collisions); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "vec3f_find_ceil", smlua_func_vec3f_find_ceil); <--- UNIMPLEMENTED
smlua_bind_function(L, "mario_facing_downhill", smlua_func_mario_facing_downhill);
smlua_bind_function(L, "mario_floor_is_slippery", smlua_func_mario_floor_is_slippery);
smlua_bind_function(L, "mario_floor_is_slope", smlua_func_mario_floor_is_slope);
smlua_bind_function(L, "mario_floor_is_steep", smlua_func_mario_floor_is_steep);
- smlua_bind_function(L, "find_floor_height_relative_polar", smlua_func_find_floor_height_relative_polar);
- smlua_bind_function(L, "find_floor_slope", smlua_func_find_floor_slope);
- smlua_bind_function(L, "update_mario_sound_and_camera", smlua_func_update_mario_sound_and_camera);
- smlua_bind_function(L, "set_steep_jump_action", smlua_func_set_steep_jump_action);
- smlua_bind_function(L, "set_mario_action", smlua_func_set_mario_action);
+ smlua_bind_function(L, "mario_get_floor_class", smlua_func_mario_get_floor_class);
+ smlua_bind_function(L, "mario_get_terrain_sound_addend", smlua_func_mario_get_terrain_sound_addend);
+ smlua_bind_function(L, "mario_set_bubbled", smlua_func_mario_set_bubbled);
+ smlua_bind_function(L, "mario_set_forward_vel", smlua_func_mario_set_forward_vel);
+ smlua_bind_function(L, "play_mario_action_sound", smlua_func_play_mario_action_sound);
+ smlua_bind_function(L, "play_mario_heavy_landing_sound", smlua_func_play_mario_heavy_landing_sound);
+ smlua_bind_function(L, "play_mario_heavy_landing_sound_once", smlua_func_play_mario_heavy_landing_sound_once);
+ smlua_bind_function(L, "play_mario_jump_sound", smlua_func_play_mario_jump_sound);
+ smlua_bind_function(L, "play_mario_landing_sound", smlua_func_play_mario_landing_sound);
+ smlua_bind_function(L, "play_mario_landing_sound_once", smlua_func_play_mario_landing_sound_once);
+ smlua_bind_function(L, "play_mario_sound", smlua_func_play_mario_sound);
+ 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); <--- UNIMPLEMENTED
+ 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);
smlua_bind_function(L, "set_jumping_action", smlua_func_set_jumping_action);
- smlua_bind_function(L, "drop_and_set_mario_action", smlua_func_drop_and_set_mario_action);
- smlua_bind_function(L, "hurt_and_set_mario_action", smlua_func_hurt_and_set_mario_action);
- smlua_bind_function(L, "check_common_action_exits", smlua_func_check_common_action_exits);
- smlua_bind_function(L, "check_common_hold_action_exits", smlua_func_check_common_hold_action_exits);
- smlua_bind_function(L, "transition_submerged_to_walking", smlua_func_transition_submerged_to_walking);
+ smlua_bind_function(L, "set_mario_action", smlua_func_set_mario_action);
+ smlua_bind_function(L, "set_mario_anim_with_accel", smlua_func_set_mario_anim_with_accel);
+ smlua_bind_function(L, "set_mario_animation", smlua_func_set_mario_animation);
+ smlua_bind_function(L, "set_steep_jump_action", smlua_func_set_steep_jump_action);
smlua_bind_function(L, "set_water_plunge_action", smlua_func_set_water_plunge_action);
- smlua_bind_function(L, "execute_mario_action", smlua_func_execute_mario_action);
- smlua_bind_function(L, "force_idle_state", smlua_func_force_idle_state);
+ smlua_bind_function(L, "transition_submerged_to_walking", smlua_func_transition_submerged_to_walking);
+ smlua_bind_function(L, "update_mario_pos_for_anim", smlua_func_update_mario_pos_for_anim);
+ smlua_bind_function(L, "update_mario_sound_and_camera", smlua_func_update_mario_sound_and_camera);
+ //smlua_bind_function(L, "vec3f_find_ceil", smlua_func_vec3f_find_ceil); <--- UNIMPLEMENTED
// mario_actions_airborne.c
- smlua_bind_function(L, "play_flip_sounds", smlua_func_play_flip_sounds);
- smlua_bind_function(L, "play_far_fall_sound", smlua_func_play_far_fall_sound);
- smlua_bind_function(L, "play_knockback_sound", smlua_func_play_knockback_sound);
- smlua_bind_function(L, "lava_boost_on_wall", smlua_func_lava_boost_on_wall);
- smlua_bind_function(L, "check_fall_damage", smlua_func_check_fall_damage);
- smlua_bind_function(L, "check_kick_or_dive_in_air", smlua_func_check_kick_or_dive_in_air);
- smlua_bind_function(L, "should_get_stuck_in_ground", smlua_func_should_get_stuck_in_ground);
- smlua_bind_function(L, "check_fall_damage_or_get_stuck", smlua_func_check_fall_damage_or_get_stuck);
- smlua_bind_function(L, "check_horizontal_wind", smlua_func_check_horizontal_wind);
- smlua_bind_function(L, "update_air_with_turn", smlua_func_update_air_with_turn);
- smlua_bind_function(L, "update_air_without_turn", smlua_func_update_air_without_turn);
- smlua_bind_function(L, "update_lava_boost_or_twirling", smlua_func_update_lava_boost_or_twirling);
- smlua_bind_function(L, "update_flying_yaw", smlua_func_update_flying_yaw);
- smlua_bind_function(L, "update_flying_pitch", smlua_func_update_flying_pitch);
- smlua_bind_function(L, "update_flying", smlua_func_update_flying);
- smlua_bind_function(L, "common_air_action_step", smlua_func_common_air_action_step);
- smlua_bind_function(L, "act_jump", smlua_func_act_jump);
- smlua_bind_function(L, "act_double_jump", smlua_func_act_double_jump);
- smlua_bind_function(L, "act_triple_jump", smlua_func_act_triple_jump);
- smlua_bind_function(L, "act_backflip", smlua_func_act_backflip);
- smlua_bind_function(L, "act_freefall", smlua_func_act_freefall);
- smlua_bind_function(L, "act_hold_jump", smlua_func_act_hold_jump);
- smlua_bind_function(L, "act_hold_freefall", smlua_func_act_hold_freefall);
- smlua_bind_function(L, "act_side_flip", smlua_func_act_side_flip);
- smlua_bind_function(L, "act_wall_kick_air", smlua_func_act_wall_kick_air);
- smlua_bind_function(L, "act_long_jump", smlua_func_act_long_jump);
- smlua_bind_function(L, "act_riding_shell_air", smlua_func_act_riding_shell_air);
- smlua_bind_function(L, "act_twirling", smlua_func_act_twirling);
- smlua_bind_function(L, "act_dive", smlua_func_act_dive);
+ smlua_bind_function(L, "act_air_hit_wall", smlua_func_act_air_hit_wall);
smlua_bind_function(L, "act_air_throw", smlua_func_act_air_throw);
- smlua_bind_function(L, "act_water_jump", smlua_func_act_water_jump);
- smlua_bind_function(L, "act_hold_water_jump", smlua_func_act_hold_water_jump);
- smlua_bind_function(L, "act_steep_jump", smlua_func_act_steep_jump);
- smlua_bind_function(L, "act_ground_pound", smlua_func_act_ground_pound);
- smlua_bind_function(L, "act_burning_jump", smlua_func_act_burning_jump);
- smlua_bind_function(L, "act_burning_fall", smlua_func_act_burning_fall);
- smlua_bind_function(L, "act_crazy_box_bounce", smlua_func_act_crazy_box_bounce);
- smlua_bind_function(L, "common_air_knockback_step", smlua_func_common_air_knockback_step);
- smlua_bind_function(L, "check_wall_kick", smlua_func_check_wall_kick);
+ smlua_bind_function(L, "act_backflip", smlua_func_act_backflip);
smlua_bind_function(L, "act_backward_air_kb", smlua_func_act_backward_air_kb);
+ smlua_bind_function(L, "act_backward_rollout", smlua_func_act_backward_rollout);
+ smlua_bind_function(L, "act_burning_fall", smlua_func_act_burning_fall);
+ smlua_bind_function(L, "act_burning_jump", smlua_func_act_burning_jump);
+ smlua_bind_function(L, "act_butt_slide_air", smlua_func_act_butt_slide_air);
+ smlua_bind_function(L, "act_crazy_box_bounce", smlua_func_act_crazy_box_bounce);
+ smlua_bind_function(L, "act_dive", smlua_func_act_dive);
+ smlua_bind_function(L, "act_double_jump", smlua_func_act_double_jump);
+ smlua_bind_function(L, "act_flying", smlua_func_act_flying);
+ smlua_bind_function(L, "act_flying_triple_jump", smlua_func_act_flying_triple_jump);
smlua_bind_function(L, "act_forward_air_kb", smlua_func_act_forward_air_kb);
+ smlua_bind_function(L, "act_forward_rollout", smlua_func_act_forward_rollout);
+ smlua_bind_function(L, "act_freefall", smlua_func_act_freefall);
+ smlua_bind_function(L, "act_getting_blown", smlua_func_act_getting_blown);
+ smlua_bind_function(L, "act_ground_pound", smlua_func_act_ground_pound);
smlua_bind_function(L, "act_hard_backward_air_kb", smlua_func_act_hard_backward_air_kb);
smlua_bind_function(L, "act_hard_forward_air_kb", smlua_func_act_hard_forward_air_kb);
+ smlua_bind_function(L, "act_hold_butt_slide_air", smlua_func_act_hold_butt_slide_air);
+ smlua_bind_function(L, "act_hold_freefall", smlua_func_act_hold_freefall);
+ smlua_bind_function(L, "act_hold_jump", smlua_func_act_hold_jump);
+ smlua_bind_function(L, "act_hold_water_jump", smlua_func_act_hold_water_jump);
+ smlua_bind_function(L, "act_jump", smlua_func_act_jump);
+ smlua_bind_function(L, "act_jump_kick", smlua_func_act_jump_kick);
+ smlua_bind_function(L, "act_lava_boost", smlua_func_act_lava_boost);
+ smlua_bind_function(L, "act_long_jump", smlua_func_act_long_jump);
+ smlua_bind_function(L, "act_riding_hoot", smlua_func_act_riding_hoot);
+ smlua_bind_function(L, "act_riding_shell_air", smlua_func_act_riding_shell_air);
+ smlua_bind_function(L, "act_shot_from_cannon", smlua_func_act_shot_from_cannon);
+ smlua_bind_function(L, "act_side_flip", smlua_func_act_side_flip);
+ smlua_bind_function(L, "act_slide_kick", smlua_func_act_slide_kick);
+ smlua_bind_function(L, "act_soft_bonk", smlua_func_act_soft_bonk);
+ smlua_bind_function(L, "act_special_triple_jump", smlua_func_act_special_triple_jump);
+ smlua_bind_function(L, "act_steep_jump", smlua_func_act_steep_jump);
smlua_bind_function(L, "act_thrown_backward", smlua_func_act_thrown_backward);
smlua_bind_function(L, "act_thrown_forward", smlua_func_act_thrown_forward);
- smlua_bind_function(L, "act_soft_bonk", smlua_func_act_soft_bonk);
- smlua_bind_function(L, "act_getting_blown", smlua_func_act_getting_blown);
- smlua_bind_function(L, "act_air_hit_wall", smlua_func_act_air_hit_wall);
- smlua_bind_function(L, "act_forward_rollout", smlua_func_act_forward_rollout);
- smlua_bind_function(L, "act_backward_rollout", smlua_func_act_backward_rollout);
- smlua_bind_function(L, "act_butt_slide_air", smlua_func_act_butt_slide_air);
- smlua_bind_function(L, "act_hold_butt_slide_air", smlua_func_act_hold_butt_slide_air);
- smlua_bind_function(L, "act_lava_boost", smlua_func_act_lava_boost);
- smlua_bind_function(L, "act_slide_kick", smlua_func_act_slide_kick);
- smlua_bind_function(L, "act_jump_kick", smlua_func_act_jump_kick);
- smlua_bind_function(L, "act_shot_from_cannon", smlua_func_act_shot_from_cannon);
- smlua_bind_function(L, "act_flying", smlua_func_act_flying);
- smlua_bind_function(L, "act_riding_hoot", smlua_func_act_riding_hoot);
- smlua_bind_function(L, "act_flying_triple_jump", smlua_func_act_flying_triple_jump);
smlua_bind_function(L, "act_top_of_pole_jump", smlua_func_act_top_of_pole_jump);
+ smlua_bind_function(L, "act_triple_jump", smlua_func_act_triple_jump);
+ smlua_bind_function(L, "act_twirling", smlua_func_act_twirling);
smlua_bind_function(L, "act_vertical_wind", smlua_func_act_vertical_wind);
- smlua_bind_function(L, "act_special_triple_jump", smlua_func_act_special_triple_jump);
+ smlua_bind_function(L, "act_wall_kick_air", smlua_func_act_wall_kick_air);
+ smlua_bind_function(L, "act_water_jump", smlua_func_act_water_jump);
smlua_bind_function(L, "check_common_airborne_cancels", smlua_func_check_common_airborne_cancels);
+ smlua_bind_function(L, "check_fall_damage", smlua_func_check_fall_damage);
+ smlua_bind_function(L, "check_fall_damage_or_get_stuck", smlua_func_check_fall_damage_or_get_stuck);
+ smlua_bind_function(L, "check_horizontal_wind", smlua_func_check_horizontal_wind);
+ smlua_bind_function(L, "check_kick_or_dive_in_air", smlua_func_check_kick_or_dive_in_air);
+ smlua_bind_function(L, "check_wall_kick", smlua_func_check_wall_kick);
+ smlua_bind_function(L, "common_air_action_step", smlua_func_common_air_action_step);
+ smlua_bind_function(L, "common_air_knockback_step", smlua_func_common_air_knockback_step);
+ smlua_bind_function(L, "lava_boost_on_wall", smlua_func_lava_boost_on_wall);
smlua_bind_function(L, "mario_execute_airborne_action", smlua_func_mario_execute_airborne_action);
+ smlua_bind_function(L, "play_far_fall_sound", smlua_func_play_far_fall_sound);
+ smlua_bind_function(L, "play_flip_sounds", smlua_func_play_flip_sounds);
+ smlua_bind_function(L, "play_knockback_sound", smlua_func_play_knockback_sound);
+ smlua_bind_function(L, "should_get_stuck_in_ground", smlua_func_should_get_stuck_in_ground);
+ smlua_bind_function(L, "update_air_with_turn", smlua_func_update_air_with_turn);
+ smlua_bind_function(L, "update_air_without_turn", smlua_func_update_air_without_turn);
+ smlua_bind_function(L, "update_flying", smlua_func_update_flying);
+ smlua_bind_function(L, "update_flying_pitch", smlua_func_update_flying_pitch);
+ smlua_bind_function(L, "update_flying_yaw", smlua_func_update_flying_yaw);
+ smlua_bind_function(L, "update_lava_boost_or_twirling", smlua_func_update_lava_boost_or_twirling);
// mario_actions_automatic.c
- smlua_bind_function(L, "add_tree_leaf_particles", smlua_func_add_tree_leaf_particles);
- smlua_bind_function(L, "play_climbing_sounds", smlua_func_play_climbing_sounds);
- smlua_bind_function(L, "set_pole_position", smlua_func_set_pole_position);
- smlua_bind_function(L, "act_holding_pole", smlua_func_act_holding_pole);
+ smlua_bind_function(L, "act_bubbled", smlua_func_act_bubbled);
smlua_bind_function(L, "act_climbing_pole", smlua_func_act_climbing_pole);
- smlua_bind_function(L, "act_grab_pole_slow", smlua_func_act_grab_pole_slow);
smlua_bind_function(L, "act_grab_pole_fast", smlua_func_act_grab_pole_fast);
- smlua_bind_function(L, "act_top_of_pole_transition", smlua_func_act_top_of_pole_transition);
- smlua_bind_function(L, "act_top_of_pole", smlua_func_act_top_of_pole);
- smlua_bind_function(L, "perform_hanging_step", smlua_func_perform_hanging_step);
- smlua_bind_function(L, "update_hang_moving", smlua_func_update_hang_moving);
- smlua_bind_function(L, "update_hang_stationary", smlua_func_update_hang_stationary);
- smlua_bind_function(L, "act_start_hanging", smlua_func_act_start_hanging);
- smlua_bind_function(L, "act_hanging", smlua_func_act_hanging);
+ smlua_bind_function(L, "act_grab_pole_slow", smlua_func_act_grab_pole_slow);
+ smlua_bind_function(L, "act_grabbed", smlua_func_act_grabbed);
smlua_bind_function(L, "act_hang_moving", smlua_func_act_hang_moving);
- smlua_bind_function(L, "let_go_of_ledge", smlua_func_let_go_of_ledge);
- smlua_bind_function(L, "climb_up_ledge", smlua_func_climb_up_ledge);
- smlua_bind_function(L, "update_ledge_climb_camera", smlua_func_update_ledge_climb_camera);
- smlua_bind_function(L, "update_ledge_climb", smlua_func_update_ledge_climb);
- smlua_bind_function(L, "act_ledge_grab", smlua_func_act_ledge_grab);
- smlua_bind_function(L, "act_ledge_climb_slow", smlua_func_act_ledge_climb_slow);
+ smlua_bind_function(L, "act_hanging", smlua_func_act_hanging);
+ smlua_bind_function(L, "act_holding_pole", smlua_func_act_holding_pole);
+ smlua_bind_function(L, "act_in_cannon", smlua_func_act_in_cannon);
smlua_bind_function(L, "act_ledge_climb_down", smlua_func_act_ledge_climb_down);
smlua_bind_function(L, "act_ledge_climb_fast", smlua_func_act_ledge_climb_fast);
- smlua_bind_function(L, "act_grabbed", smlua_func_act_grabbed);
- smlua_bind_function(L, "act_in_cannon", smlua_func_act_in_cannon);
+ smlua_bind_function(L, "act_ledge_climb_slow", smlua_func_act_ledge_climb_slow);
+ smlua_bind_function(L, "act_ledge_grab", smlua_func_act_ledge_grab);
+ smlua_bind_function(L, "act_start_hanging", smlua_func_act_start_hanging);
+ smlua_bind_function(L, "act_top_of_pole", smlua_func_act_top_of_pole);
+ smlua_bind_function(L, "act_top_of_pole_transition", smlua_func_act_top_of_pole_transition);
smlua_bind_function(L, "act_tornado_twirling", smlua_func_act_tornado_twirling);
- smlua_bind_function(L, "act_bubbled", smlua_func_act_bubbled);
+ smlua_bind_function(L, "add_tree_leaf_particles", smlua_func_add_tree_leaf_particles);
smlua_bind_function(L, "check_common_automatic_cancels", smlua_func_check_common_automatic_cancels);
+ smlua_bind_function(L, "climb_up_ledge", smlua_func_climb_up_ledge);
+ smlua_bind_function(L, "let_go_of_ledge", smlua_func_let_go_of_ledge);
smlua_bind_function(L, "mario_execute_automatic_action", smlua_func_mario_execute_automatic_action);
+ smlua_bind_function(L, "perform_hanging_step", smlua_func_perform_hanging_step);
+ smlua_bind_function(L, "play_climbing_sounds", smlua_func_play_climbing_sounds);
+ smlua_bind_function(L, "set_pole_position", smlua_func_set_pole_position);
+ smlua_bind_function(L, "update_hang_moving", smlua_func_update_hang_moving);
+ smlua_bind_function(L, "update_hang_stationary", smlua_func_update_hang_stationary);
+ smlua_bind_function(L, "update_ledge_climb", smlua_func_update_ledge_climb);
+ smlua_bind_function(L, "update_ledge_climb_camera", smlua_func_update_ledge_climb_camera);
// mario_actions_cutscene.c
- smlua_bind_function(L, "print_displaying_credits_entry", smlua_func_print_displaying_credits_entry);
smlua_bind_function(L, "bhv_end_peach_loop", smlua_func_bhv_end_peach_loop);
smlua_bind_function(L, "bhv_end_toad_loop", smlua_func_bhv_end_toad_loop);
- smlua_bind_function(L, "handle_save_menu", smlua_func_handle_save_menu);
- //smlua_bind_function(L, "spawn_obj_at_mario_rel_yaw", smlua_func_spawn_obj_at_mario_rel_yaw); <--- UNIMPLEMENTED
- smlua_bind_function(L, "cutscene_take_cap_off", smlua_func_cutscene_take_cap_off);
smlua_bind_function(L, "cutscene_put_cap_on", smlua_func_cutscene_put_cap_on);
- smlua_bind_function(L, "should_start_or_continue_dialog", smlua_func_should_start_or_continue_dialog);
+ smlua_bind_function(L, "cutscene_take_cap_off", smlua_func_cutscene_take_cap_off);
smlua_bind_function(L, "general_star_dance_handler", smlua_func_general_star_dance_handler);
- smlua_bind_function(L, "stuck_in_ground_handler", smlua_func_stuck_in_ground_handler);
smlua_bind_function(L, "generate_yellow_sparkles", smlua_func_generate_yellow_sparkles);
+ smlua_bind_function(L, "handle_save_menu", smlua_func_handle_save_menu);
+ smlua_bind_function(L, "print_displaying_credits_entry", smlua_func_print_displaying_credits_entry);
+ smlua_bind_function(L, "should_start_or_continue_dialog", smlua_func_should_start_or_continue_dialog);
+ //smlua_bind_function(L, "spawn_obj_at_mario_rel_yaw", smlua_func_spawn_obj_at_mario_rel_yaw); <--- UNIMPLEMENTED
+ smlua_bind_function(L, "stuck_in_ground_handler", smlua_func_stuck_in_ground_handler);
// mario_actions_moving.c
- smlua_bind_function(L, "tilt_body_running", smlua_func_tilt_body_running);
- smlua_bind_function(L, "play_step_sound", smlua_func_play_step_sound);
smlua_bind_function(L, "align_with_floor", smlua_func_align_with_floor);
- smlua_bind_function(L, "begin_walking_action", smlua_func_begin_walking_action);
- smlua_bind_function(L, "check_ledge_climb_down", smlua_func_check_ledge_climb_down);
- smlua_bind_function(L, "slide_bonk", smlua_func_slide_bonk);
- smlua_bind_function(L, "set_triple_jump_action", smlua_func_set_triple_jump_action);
- smlua_bind_function(L, "update_sliding_angle", smlua_func_update_sliding_angle);
- smlua_bind_function(L, "update_sliding", smlua_func_update_sliding);
- smlua_bind_function(L, "apply_slope_accel", smlua_func_apply_slope_accel);
- smlua_bind_function(L, "apply_landing_accel", smlua_func_apply_landing_accel);
- smlua_bind_function(L, "update_shell_speed", smlua_func_update_shell_speed);
- smlua_bind_function(L, "apply_slope_decel", smlua_func_apply_slope_decel);
- smlua_bind_function(L, "update_decelerating_speed", smlua_func_update_decelerating_speed);
- smlua_bind_function(L, "update_walking_speed", smlua_func_update_walking_speed);
- smlua_bind_function(L, "should_begin_sliding", smlua_func_should_begin_sliding);
smlua_bind_function(L, "analog_stick_held_back", smlua_func_analog_stick_held_back);
- smlua_bind_function(L, "check_ground_dive_or_punch", smlua_func_check_ground_dive_or_punch);
- smlua_bind_function(L, "begin_braking_action", smlua_func_begin_braking_action);
- smlua_bind_function(L, "anim_and_audio_for_walk", smlua_func_anim_and_audio_for_walk);
- smlua_bind_function(L, "anim_and_audio_for_hold_walk", smlua_func_anim_and_audio_for_hold_walk);
smlua_bind_function(L, "anim_and_audio_for_heavy_walk", smlua_func_anim_and_audio_for_heavy_walk);
- smlua_bind_function(L, "push_or_sidle_wall", smlua_func_push_or_sidle_wall);
- smlua_bind_function(L, "tilt_body_walking", smlua_func_tilt_body_walking);
- smlua_bind_function(L, "tilt_body_ground_shell", smlua_func_tilt_body_ground_shell);
- smlua_bind_function(L, "tilt_body_butt_slide", smlua_func_tilt_body_butt_slide);
- smlua_bind_function(L, "common_slide_action", smlua_func_common_slide_action);
- smlua_bind_function(L, "common_slide_action_with_jump", smlua_func_common_slide_action_with_jump);
- smlua_bind_function(L, "stomach_slide_action", smlua_func_stomach_slide_action);
+ smlua_bind_function(L, "anim_and_audio_for_hold_walk", smlua_func_anim_and_audio_for_hold_walk);
+ smlua_bind_function(L, "anim_and_audio_for_walk", smlua_func_anim_and_audio_for_walk);
+ smlua_bind_function(L, "apply_landing_accel", smlua_func_apply_landing_accel);
+ smlua_bind_function(L, "apply_slope_accel", smlua_func_apply_slope_accel);
+ smlua_bind_function(L, "apply_slope_decel", smlua_func_apply_slope_decel);
+ smlua_bind_function(L, "begin_braking_action", smlua_func_begin_braking_action);
+ smlua_bind_function(L, "begin_walking_action", smlua_func_begin_walking_action);
+ smlua_bind_function(L, "check_common_moving_cancels", smlua_func_check_common_moving_cancels);
+ smlua_bind_function(L, "check_ground_dive_or_punch", smlua_func_check_ground_dive_or_punch);
+ smlua_bind_function(L, "check_ledge_climb_down", smlua_func_check_ledge_climb_down);
smlua_bind_function(L, "common_ground_knockback_action", smlua_func_common_ground_knockback_action);
smlua_bind_function(L, "common_landing_action", smlua_func_common_landing_action);
- smlua_bind_function(L, "quicksand_jump_land_action", smlua_func_quicksand_jump_land_action);
- smlua_bind_function(L, "check_common_moving_cancels", smlua_func_check_common_moving_cancels);
+ smlua_bind_function(L, "common_slide_action", smlua_func_common_slide_action);
+ smlua_bind_function(L, "common_slide_action_with_jump", smlua_func_common_slide_action_with_jump);
smlua_bind_function(L, "mario_execute_moving_action", smlua_func_mario_execute_moving_action);
+ smlua_bind_function(L, "play_step_sound", smlua_func_play_step_sound);
+ smlua_bind_function(L, "push_or_sidle_wall", smlua_func_push_or_sidle_wall);
+ smlua_bind_function(L, "quicksand_jump_land_action", smlua_func_quicksand_jump_land_action);
+ smlua_bind_function(L, "set_triple_jump_action", smlua_func_set_triple_jump_action);
+ smlua_bind_function(L, "should_begin_sliding", smlua_func_should_begin_sliding);
+ smlua_bind_function(L, "slide_bonk", smlua_func_slide_bonk);
+ smlua_bind_function(L, "stomach_slide_action", smlua_func_stomach_slide_action);
+ smlua_bind_function(L, "tilt_body_butt_slide", smlua_func_tilt_body_butt_slide);
+ smlua_bind_function(L, "tilt_body_ground_shell", smlua_func_tilt_body_ground_shell);
+ smlua_bind_function(L, "tilt_body_running", smlua_func_tilt_body_running);
+ smlua_bind_function(L, "tilt_body_walking", smlua_func_tilt_body_walking);
+ smlua_bind_function(L, "update_decelerating_speed", smlua_func_update_decelerating_speed);
+ smlua_bind_function(L, "update_shell_speed", smlua_func_update_shell_speed);
+ smlua_bind_function(L, "update_sliding", smlua_func_update_sliding);
+ smlua_bind_function(L, "update_sliding_angle", smlua_func_update_sliding_angle);
+ smlua_bind_function(L, "update_walking_speed", smlua_func_update_walking_speed);
// mario_actions_object.c
smlua_bind_function(L, "animated_stationary_ground_step", smlua_func_animated_stationary_ground_step);
- smlua_bind_function(L, "mario_update_punch_sequence", smlua_func_mario_update_punch_sequence);
smlua_bind_function(L, "check_common_object_cancels", smlua_func_check_common_object_cancels);
smlua_bind_function(L, "mario_execute_object_action", smlua_func_mario_execute_object_action);
+ smlua_bind_function(L, "mario_update_punch_sequence", smlua_func_mario_update_punch_sequence);
// mario_actions_stationary.c
- smlua_bind_function(L, "check_common_idle_cancels", smlua_func_check_common_idle_cancels);
smlua_bind_function(L, "check_common_hold_idle_cancels", smlua_func_check_common_hold_idle_cancels);
- smlua_bind_function(L, "play_anim_sound", smlua_func_play_anim_sound);
- smlua_bind_function(L, "stopping_step", smlua_func_stopping_step);
- smlua_bind_function(L, "landing_step", smlua_func_landing_step);
+ smlua_bind_function(L, "check_common_idle_cancels", smlua_func_check_common_idle_cancels);
smlua_bind_function(L, "check_common_landing_cancels", smlua_func_check_common_landing_cancels);
smlua_bind_function(L, "check_common_stationary_cancels", smlua_func_check_common_stationary_cancels);
+ smlua_bind_function(L, "landing_step", smlua_func_landing_step);
smlua_bind_function(L, "mario_execute_stationary_action", smlua_func_mario_execute_stationary_action);
+ smlua_bind_function(L, "play_anim_sound", smlua_func_play_anim_sound);
+ smlua_bind_function(L, "stopping_step", smlua_func_stopping_step);
// mario_actions_submerged.c
- smlua_bind_function(L, "set_swimming_at_surface_particles", smlua_func_set_swimming_at_surface_particles);
- smlua_bind_function(L, "perform_water_step", smlua_func_perform_water_step);
- smlua_bind_function(L, "perform_water_full_step", smlua_func_perform_water_full_step);
- smlua_bind_function(L, "mario_execute_submerged_action", smlua_func_mario_execute_submerged_action);
- smlua_bind_function(L, "float_surface_gfx", smlua_func_float_surface_gfx);
smlua_bind_function(L, "apply_water_current", smlua_func_apply_water_current);
+ smlua_bind_function(L, "float_surface_gfx", smlua_func_float_surface_gfx);
+ smlua_bind_function(L, "mario_execute_submerged_action", smlua_func_mario_execute_submerged_action);
+ smlua_bind_function(L, "perform_water_full_step", smlua_func_perform_water_full_step);
+ smlua_bind_function(L, "perform_water_step", smlua_func_perform_water_step);
+ smlua_bind_function(L, "set_swimming_at_surface_particles", smlua_func_set_swimming_at_surface_particles);
// mario_step.h
smlua_bind_function(L, "get_additive_y_vel_for_jumps", smlua_func_get_additive_y_vel_for_jumps);
smlua_bind_function(L, "mario_bonk_reflection", smlua_func_mario_bonk_reflection);
- smlua_bind_function(L, "mario_update_quicksand", smlua_func_mario_update_quicksand);
smlua_bind_function(L, "mario_push_off_steep_floor", smlua_func_mario_push_off_steep_floor);
smlua_bind_function(L, "mario_update_moving_sand", smlua_func_mario_update_moving_sand);
+ smlua_bind_function(L, "mario_update_quicksand", smlua_func_mario_update_quicksand);
smlua_bind_function(L, "mario_update_windy_ground", smlua_func_mario_update_windy_ground);
- smlua_bind_function(L, "stop_and_set_height_to_floor", smlua_func_stop_and_set_height_to_floor);
- smlua_bind_function(L, "stationary_ground_step", smlua_func_stationary_ground_step);
- smlua_bind_function(L, "perform_ground_step", smlua_func_perform_ground_step);
smlua_bind_function(L, "perform_air_step", smlua_func_perform_air_step);
+ smlua_bind_function(L, "perform_ground_step", smlua_func_perform_ground_step);
smlua_bind_function(L, "set_vel_from_pitch_and_yaw", smlua_func_set_vel_from_pitch_and_yaw);
+ 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);
// surface_collision.h
//smlua_bind_function(L, "f32_find_wall_collision", smlua_func_f32_find_wall_collision); <--- UNIMPLEMENTED
- smlua_bind_function(L, "find_wall_collisions", smlua_func_find_wall_collisions);
//smlua_bind_function(L, "find_ceil", smlua_func_find_ceil); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "find_floor_height_and_data", smlua_func_find_floor_height_and_data); <--- UNIMPLEMENTED
- smlua_bind_function(L, "find_floor_height", smlua_func_find_floor_height);
//smlua_bind_function(L, "find_floor", smlua_func_find_floor); <--- UNIMPLEMENTED
- smlua_bind_function(L, "find_water_level", smlua_func_find_water_level);
+ smlua_bind_function(L, "find_floor_height", smlua_func_find_floor_height);
+ //smlua_bind_function(L, "find_floor_height_and_data", smlua_func_find_floor_height_and_data); <--- UNIMPLEMENTED
smlua_bind_function(L, "find_poison_gas_level", smlua_func_find_poison_gas_level);
//smlua_bind_function(L, "find_surface_on_ray", smlua_func_find_surface_on_ray); <--- UNIMPLEMENTED
+ smlua_bind_function(L, "find_wall_collisions", smlua_func_find_wall_collisions);
+ smlua_bind_function(L, "find_water_level", smlua_func_find_water_level);
// thread6.c
smlua_bind_function(L, "queue_rumble_data", smlua_func_queue_rumble_data);
- smlua_bind_function(L, "queue_rumble_data_object", smlua_func_queue_rumble_data_object);
smlua_bind_function(L, "queue_rumble_data_mario", smlua_func_queue_rumble_data_mario);
+ smlua_bind_function(L, "queue_rumble_data_object", smlua_func_queue_rumble_data_object);
}