diff --git a/.github/workflows/build-coop.yaml b/.github/workflows/build-coop.yaml index ae4ce8a8c..88d47db15 100644 --- a/.github/workflows/build-coop.yaml +++ b/.github/workflows/build-coop.yaml @@ -208,7 +208,7 @@ jobs: build-macos-intel: if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }} - runs-on: macos-13 + runs-on: macos-15-intel steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index 771495a46..c42e9ef03 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ # Libraries *.lib -*.a *.la *.lo @@ -91,3 +90,4 @@ todo-old.txt *.DS_Store tools/ido5.3_compiler/usr/lib/libc.so.1 /.vs +tools/audiofile/libaudiofile.a diff --git a/Makefile b/Makefile index 0fc235b8e..94eb9478f 100644 --- a/Makefile +++ b/Makefile @@ -978,11 +978,11 @@ ifeq ($(COOPNET),1) ifeq ($(shell uname -m),arm64) LDFLAGS += -Wl,-rpath,@loader_path -L./lib/coopnet/mac_arm/ -l coopnet COOPNET_LIBS += ./lib/coopnet/mac_arm/libcoopnet.dylib - COOPNET_LIBS += ./lib/coopnet/mac_arm/libjuice.1.2.2.dylib + COOPNET_LIBS += ./lib/coopnet/mac_arm/libjuice.1.6.2.dylib else LDFLAGS += -Wl,-rpath,@loader_path -L./lib/coopnet/mac_intel/ -l coopnet COOPNET_LIBS += ./lib/coopnet/mac_intel/libcoopnet.dylib - COOPNET_LIBS += ./lib/coopnet/mac_intel/libjuice.1.2.2.dylib + COOPNET_LIBS += ./lib/coopnet/mac_intel/libjuice.1.6.2.dylib endif else ifeq ($(TARGET_RPI),1) ifneq (,$(findstring aarch64,$(machine))) diff --git a/autogen/autogen.sh b/autogen/autogen.sh index 9459f4d61..4036b217a 100755 --- a/autogen/autogen.sh +++ b/autogen/autogen.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash python3 ./autogen/gen_math.py $1 +python3 ./autogen/convert_functions.py $1 python3 ./autogen/convert_structs.py $1 python3 ./autogen/gen_hooks.py $1 -python3 ./autogen/convert_functions.py $1 python3 ./autogen/convert_constants.py $1 python3 ./autogen/extract_display_lists.py $1 diff --git a/autogen/common.py b/autogen/common.py index cea0d42f1..1c3575b02 100644 --- a/autogen/common.py +++ b/autogen/common.py @@ -5,6 +5,7 @@ from vec_types import * usf_types = ['u8', 'u16', 'u32', 'u64', 's8', 's16', 's32', 's64', 'f32', 'f64'] vec_types = list(VEC_TYPES.keys()) typedef_pointers = ['BehaviorScript', 'ObjectAnimPointer', 'Collision', 'LevelScript', 'Trajectory', 'Texture'] +cobject_function_identifier = 'FUNCTION' type_mappings = { 'char': 's8', @@ -16,13 +17,38 @@ type_mappings = { 'double': 'f64', 'uintptr_t': 'u64', # this is assumed + 'size_t': 'u64', # this is assumed } exclude_structs = [ - 'SPTask', - 'VblankHandler', + 'AnimationTable', + 'BullyCollisionData', + 'CameraFOVStatus', + 'CameraStoredInfo', + 'CameraTrigger', + 'Cutscene', + 'CutsceneSplinePoint', + 'CutsceneVariable', + 'FloorGeometry', + 'GraphNode_802A45E4', + 'HandheldShakePoint', + 'LinearTransitionPoint', 'MarioAnimDmaRelatedThing', + 'ModAudioSampleCopies', + 'ModFile', + 'ModeTransitionInfo', + 'OffsetSizePair', + 'PaintingMeshVertex', + 'ParallelTrackingPoint', + 'PlayerGeometry', + 'SPTask', + 'SoundState', + 'TransitionInfo', 'UnusedArea28', + 'VblankHandler', + 'Vtx_Interp', + 'WarpTransition', + 'WarpTransitionData', ] override_types = { "Gfx", "Vtx" } @@ -117,6 +143,12 @@ def translate_type_to_lvt(ptype, allowArrays=False): if ptype == "LuaFunction": return "LVT_LUAFUNCTION" + if ptype == "LuaTable": + return "LVT_LUATABLE" + + if ptype == cobject_function_identifier: + return "LVT_FUNCTION" + if "struct" in ptype: if pointerLvl > 1: return "LVT_???" @@ -194,6 +226,12 @@ def translate_type_to_lot(ptype, allowArrays=True): if ptype == 'LuaFunction': return 'LOT_NONE' + if ptype == 'LuaTable': + return 'LOT_NONE' + + if ptype == cobject_function_identifier: + return 'LOT_NONE' + if ptype in override_types: return 'LOT_' + ptype.upper() @@ -280,6 +318,12 @@ def translate_type_to_lua(ptype): if ptype == 'LuaFunction': return '`Lua Function` ()', None + if ptype == 'LuaTable': + return '`table`', None + + if ptype == cobject_function_identifier: + return cobject_function_identifier, None + if ptype.count('*') == 1 and '???' not in translate_type_to_lvt(ptype): ptype = ptype.replace('const', '').replace('*', '').strip() s = '`Pointer` <`%s`>' % translate_type_to_lua(ptype)[0].replace('`', '').strip() diff --git a/autogen/convert_constants.py b/autogen/convert_constants.py index 615b442fe..46b521710 100644 --- a/autogen/convert_constants.py +++ b/autogen/convert_constants.py @@ -67,7 +67,7 @@ exclude_constants = { "src/pc/djui/djui_console.h": [ "CONSOLE_MAX_TMP_BUFFER" ], "src/pc/lua/smlua_hooks.h": [ "MAX_HOOKED_MOD_MENU_ELEMENTS", "^HOOK_RETURN_.*", "^ACTION_HOOK_.*", "^MOD_MENU_ELEMENT_.*" ], "src/pc/djui/djui_panel_menu.h": [ "RAINBOW_TEXT_LEN" ], - "src/pc/mods/mod_fs.h": [ "MOD_FS_DIRECTORY", "MOD_FS_EXTENSION", "MOD_FS_VERSION", "INT_TYPE_MAX", "FLOAT_TYPE_MAX", "FILE_SEEK_MAX" ], + "src/pc/mods/mod_fs.h": [ "INT_TYPE_MAX", "FLOAT_TYPE_MAX", "FILE_SEEK_MAX" ], } include_constants = { @@ -112,7 +112,8 @@ include_constants = { ], "include/PR/gbi_extension.h": [ "^G_VTX_EXT$", - "^G_PPARTTOCOLOR$" + "^G_PPARTTOCOLOR$", + "^G_SETENVRGB$" ], } @@ -139,6 +140,7 @@ defined_values = { 'VERSION_JP': False, 'VERSION_SH': False, 'F3DEX_GBI_2': True, + 'DEVELOPMENT': False, } ############################################################################ @@ -255,15 +257,17 @@ def process_define(filename, line, inIfBlock): val = val.replace('(u8)', '') val = val.replace('(u64)', '') val = re.sub(r'\.\d+f', '', val) + val = val.strip() - for p in val.split(' '): - if p.startswith('0x'): - continue - p = re.sub(r'0x[a-fA-F0-9]+', '', p) - if re.search(r'[a-z]', p) != None and "VERSION_TEXT" not in line and "SM64COOPDX_VERSION" not in line: - if 'gCurrentObject' not in line and verbose: - print('UNRECOGNIZED DEFINE: ' + line) - return None + if not (val.startswith('"') and val.endswith('"') and '"' not in val[1:-1]): + for p in val.split(' '): + if p.startswith('0x'): + continue + p = re.sub(r'0x[a-fA-F0-9]+', '', p) + if re.search(r'[a-z]', p) != None and "VERSION_TEXT" not in line and "SM64COOPDX_VERSION" not in line: + if 'gCurrentObject' not in line and verbose: + print('UNRECOGNIZED DEFINE: ' + line) + return None if not allowed_identifier(filename, ident): return None diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py index 8f0e8758a..ba1b753fa 100644 --- a/autogen/convert_functions.py +++ b/autogen/convert_functions.py @@ -88,15 +88,15 @@ override_allowed_functions = { "src/pc/djui/djui_popup.h": [ "create" ], "src/pc/djui/djui_language.h": [ "djui_language_get" ], "src/pc/djui/djui_panel_menu.h": [ "djui_menu_get_rainbow_string_color" ], - "src/game/save_file.h": [ "get_level_", "save_file_get_", "save_file_set_flags", "save_file_clear_flags", "save_file_reload", "save_file_erase_current_backup_save", "save_file_set_star_flags", "save_file_is_cannon_unlocked", "touch_coin_score_age", "save_file_set_course_coin_score", "save_file_do_save", "save_file_remove_star_flags", "save_file_erase" ], + "src/game/save_file.h": [ "get_level_", "save_file_get_", "save_file_set_flags", "save_file_clear_flags", "save_file_reload", "save_file_erase_current_backup_save", "save_file_set_star_flags", "save_file_is_cannon_unlocked", "save_file_set_cannon_unlocked", "touch_coin_score_age", "save_file_set_course_coin_score", "save_file_do_save", "save_file_remove_star_flags", "save_file_erase" ], "src/pc/lua/utils/smlua_model_utils.h": [ "smlua_model_util_get_id" ], "src/game/object_list_processor.h": [ "set_object_respawn_info_bits" ], "src/game/platform_displacement.h": [ "apply_platform_displacement" ], "src/game/mario_misc.h": [ "bhv_toad.*", "bhv_unlock_door.*", "geo_get_.*_state" ], - "src/game/level_update.h": [ "level_trigger_warp", "get_painting_warp_node", "initiate_painting_warp", "warp_special", "lvl_set_current_level", "level_control_timer_running", "fade_into_special_warp", "get_instant_warp" ], + "src/game/level_update.h": [ "level_trigger_warp", "get_painting_warp_node", "initiate_painting_warp", "warp_special", "lvl_set_current_level", "level_control_timer_running", "pressed_pause", "fade_into_special_warp", "get_instant_warp" ], "src/game/area.h": [ "get_mario_spawn_type", "area_get_warp_node", "area_get_any_warp_node", "play_transition" ], "src/engine/level_script.h": [ "area_create_warp_node" ], - "src/game/ingame_menu.h": [ "set_min_dialog_width", "set_dialog_override_pos", "reset_dialog_override_pos", "set_dialog_override_color", "reset_dialog_override_color", "set_menu_mode", "create_dialog_box", "create_dialog_box_with_var", "create_dialog_inverted_box", "create_dialog_box_with_response", "reset_dialog_render_state", "set_dialog_box_state", ], + "src/game/ingame_menu.h": [ "set_min_dialog_width", "set_dialog_override_pos", "reset_dialog_override_pos", "set_dialog_override_color", "reset_dialog_override_color", "set_menu_mode", "create_dialog_box", "create_dialog_box_with_var", "create_dialog_inverted_box", "create_dialog_box_with_response", "reset_dialog_render_state", "set_dialog_box_state", "handle_special_dialog_text" ], "src/audio/seqplayer.h": [ "sequence_player_set_tempo", "sequence_player_set_tempo_acc", "sequence_player_set_transposition", "sequence_player_get_tempo", "sequence_player_get_tempo_acc", "sequence_player_get_transposition", "sequence_player_get_volume", "sequence_player_get_fade_volume", "sequence_player_get_mute_volume_scale" ], "src/pc/network/sync_object.h": [ "sync_object_is_initialized", "sync_object_is_owned_locally", "sync_object_get_object" ], } @@ -129,15 +129,16 @@ override_disallowed_functions = { "src/game/camera.h": [ "update_camera", "init_camera", "stub_camera", "^reset_camera", "move_point_along_spline", "romhack_camera_init_settings", "romhack_camera_reset_settings" ], "src/game/behavior_actions.h": [ "bhv_dust_smoke_loop", "bhv_init_room" ], "src/pc/lua/utils/smlua_audio_utils.h": [ "smlua_audio_utils_override", "audio_custom_shutdown", "smlua_audio_custom_deinit", "audio_sample_destroy_pending_copies", "audio_custom_update_volume" ], - "src/pc/djui/djui_hud_utils.h": [ "djui_hud_render_texture_raw", "djui_hud_render_texture_tile_raw" ], "src/pc/lua/utils/smlua_level_utils.h": [ "smlua_level_util_reset" ], - "src/pc/lua/utils/smlua_text_utils.h": [ "smlua_text_utils_init", "smlua_text_utils_shutdown", "get_dialog_text_ascii", "smlua_text_utils_dialog_get_unmodified"], + "src/pc/lua/utils/smlua_text_utils.h": [ "smlua_text_utils_init", "smlua_text_utils_shutdown", "smlua_text_utils_dialog_get_unmodified"], "src/pc/lua/utils/smlua_anim_utils.h": [ "smlua_anim_util_reset", "smlua_anim_util_register_animation" ], "src/pc/lua/utils/smlua_gfx_utils.h": [ "gfx_allocate_internal", "vtx_allocate_internal", "gfx_get_length_no_sentinel" ], "src/pc/network/lag_compensation.h": [ "lag_compensation_clear" ], "src/game/first_person_cam.h": [ "first_person_update" ], "src/pc/lua/utils/smlua_collision_utils.h": [ "collision_find_surface_on_ray" ], "src/engine/behavior_script.h": [ "stub_behavior_script_2", "cur_obj_update" ], + "src/pc/mods/mod_storage.h": [ "mod_storage_shutdown" ], + "src/pc/mods/mod_fs.h": [ "mod_fs_read_file_from_uri", "mod_fs_shutdown" ], "src/pc/utils/misc.h": [ "str_.*", "file_get_line", "delta_interpolate_(normal|rgba|mtx)", "detect_and_skip_mtx_interpolation", "precise_delay_f64" ], "src/engine/lighting_engine.h": [ "le_calculate_vertex_lighting", "le_clear", "le_shutdown" ], } @@ -813,6 +814,8 @@ def build_param(fid, param, i): return ' %s %s = smlua_to_bytestring(L, %d);\n' % (ptype, pid, i) elif ptype == 'LuaFunction': return ' %s %s = smlua_to_lua_function(L, %d);\n' % (ptype, pid, i) + elif ptype == 'LuaTable': + return ' %s %s = smlua_to_lua_table(L, %d);\n' % (ptype, pid, i) elif translate_type_to_lot(ptype) == 'LOT_POINTER': lvt = translate_type_to_lvt(ptype) return ' %s %s = (%s)smlua_to_cpointer(L, %d, %s);\n' % (ptype, pid, ptype, i, lvt) @@ -868,6 +871,8 @@ def build_call(function): lfunc = 'lua_pushstring' elif ftype == 'ByteString': lfunc = 'smlua_push_bytestring' + elif ftype == 'LuaTable': + lfunc = 'smlua_push_lua_table' elif translate_type_to_lot(ftype) == 'LOT_POINTER': lvt = translate_type_to_lvt(ftype) return ' smlua_push_pointer(L, %s, (void*)%s, NULL);\n' % (lvt, ccall) diff --git a/autogen/convert_structs.py b/autogen/convert_structs.py index c8af5f8e1..5cff396b2 100644 --- a/autogen/convert_structs.py +++ b/autogen/convert_structs.py @@ -89,13 +89,15 @@ override_field_invisible = { "Mod": [ "files", "showedScriptWarning" ], "Camera": [ "paletteEditorCapState" ], "MarioState": [ "visibleToEnemies" ], - "NetworkPlayer": [ "gag", "moderator", "discordId" ], + "NetworkPlayer": [ "gag", "moderator", "discordId", "rxPacketHash", "rxSeqIds" ], "GraphNode": [ "_guard1", "_guard2", "padding" ], "GraphNodeRoot": ["unk15", "views"], + "GraphNodeMasterList": [ "listHeads", "listTails" ], "FnGraphNode": [ "luaTokenIndex" ], "Object": [ "firstSurface" ], "Animation": [ "unusedBoneCount" ], "ModAudio": [ "sound", "decoder", "buffer", "bufferSize", "sampleCopiesTail" ], + "Painting": [ "normalDisplayList", "textureMaps", "rippleDisplayList", "ripples" ], "DialogEntry": [ "str" ], "ModFsFile": [ "data", "capacity" ], "ModFs": [ "files" ], @@ -112,9 +114,10 @@ override_field_immutable = { "Character": [ "*" ], "NetworkPlayer": [ "*" ], "TextureInfo": [ "*" ], - "Object": ["oSyncID", "coopFlags", "oChainChompSegments", "oWigglerSegments", "oHauntedChairUnk100", "oTTCTreadmillBigSurface", "oTTCTreadmillSmallSurface", "bhvStackIndex", "respawnInfoType", "numSurfaces" ], + "Object": ["oSyncID", "coopFlags", "oChainChompSegments", "oWigglerSegments", "oHauntedChairUnk100", "oTTCTreadmillBigSurface", "oTTCTreadmillSmallSurface", "bhvStackIndex", "respawnInfoType", "numSurfaces", "bhvStack" ], "GlobalObjectAnimations": [ "*"], "SpawnParticlesInfo": [ "model" ], + "WaterDropletParams": [ "model" ], "MarioBodyState": [ "updateTorsoTime", "updateHeadPosTime", "animPartsPos", "currAnimPart" ], "Area": [ "localAreaTimer", "nextSyncID", "objectSpawnInfos", "paintingWarpNodes", "warpNodes" ], "Mod": [ "*" ], @@ -141,6 +144,7 @@ override_field_immutable = { "DialogEntry": [ "unused", "linesPerBox", "leftOffset", "width", "str", "text", "replaced"], "ModFsFile": [ "*" ], "ModFs": [ "*" ], + "StaticObjectCollision": [ "*" ], } override_field_version_excludes = { @@ -321,6 +325,14 @@ def parse_struct(struct_str, sortFields = False): field['identifier'] = field_id.strip() field['field_str'] = field_str + # handle function members + if field['type'].startswith(cobject_function_identifier): + field_function = field['identifier'] + field_type, field_id = field['type'].split() + field['type'] = field_type.strip() + field['identifier'] = field_id.strip('"').strip() + field['function'] = field_function.strip() + struct['fields'].append(field) if identifier == 'Object': @@ -484,6 +496,9 @@ def get_struct_field_info(struct, field): if fid in override_field_mutable[sid] or '*' in override_field_mutable[sid]: fimmutable = 'false' + if ftype == cobject_function_identifier: + fimmutable = 'true' + if not ('char' in ftype and '[' in ftype and 'unsigned' not in ftype): array_match = re.search(r'\[([^\]]+)\]', ftype) if array_match: @@ -492,6 +507,8 @@ def get_struct_field_info(struct, field): size = int(array_size) elif array_size.startswith("0x") and all(c in "0123456789abcdef" for c in array_size[2:]): size = int(array_size, 16) + elif array_size != "": + size = array_size else: lvt, lot = 'LVT_???', "LOT_???" # array size not provided, so not supported @@ -506,6 +523,7 @@ def build_struct(struct): # build up table and track column width field_table = [] + field_functions = [] for field in struct['fields']: fid, ftype, fimmutable, lvt, lot, size = get_struct_field_info(struct, field) @@ -531,22 +549,40 @@ def build_struct(struct): startStr += '#ifndef ' + override_field_version_excludes[fid] + '\n' endStr += '\n#endif' startStr += ' { ' - row.append(startStr ) - row.append('"%s", ' % fid ) - row.append('%s, ' % lvt ) - row.append('offsetof(%s%s, %s), ' % (struct_str, name, field['identifier'])) - row.append('%s, ' % fimmutable ) - row.append('%s, ' % lot ) - row.append('%s, ' % size ) - row.append('sizeof(%s)' % ftype ) - row.append(endStr ) + if ftype == cobject_function_identifier: + row.append(startStr ) + row.append('"%s", ' % fid ) + row.append('%s, ' % lvt ) + row.append('(size_t) FUNCTION__%s, ' % (field['function'])) + row.append('%s, ' % fimmutable ) + row.append('%s, ' % lot ) + row.append('%s, ' % size ) + row.append('sizeof(const char *)' ) + row.append(endStr ) + field_functions.append(field['function']) + else: + row.append(startStr ) + row.append('"%s", ' % fid ) + row.append('%s, ' % lvt ) + row.append('offsetof(%s%s, %s), ' % (struct_str, name, field['identifier'])) + row.append('%s, ' % fimmutable ) + row.append('%s, ' % lot ) + row.append('%s, ' % size ) + row.append('sizeof(%s)' % ftype ) + row.append(endStr ) field_table.append(row) field_table_str, field_count = table_to_string(field_table) field_count_define = 'LUA_%s_FIELD_COUNT' % identifier_to_caps(sid) struct_lot = 'LOT_%s' % sid.upper() - s = "#define %s $[STRUCTFIELDCOUNT]\n" % field_count_define + s = '' + if field_functions: + for field_function in field_functions: + s += 'static const char FUNCTION__%s[] = "%s";\n' % (field_function, field_function) + s += '\n' + + s += "#define %s $[STRUCTFIELDCOUNT]\n" % field_count_define s += "static struct LuaObjectField s%sFields[%s] = {\n" % (sid, field_count_define) s += field_table_str s += '};\n' @@ -646,10 +682,27 @@ def build_includes(): ############################################################################ +# HACK: Parse docs/functions.md to find the page where the function is documented +function_links = {} + +def doc_find_function_link(function): + if not function_links: + with open('docs/lua/functions.md') as f: + lines = f.readlines() + for line in lines: + line = line.replace(' ', '').strip() + res, n = re.subn(r'^-\[(.*)\]\((.*)\)', '\\1,\\2', line) + if n != 0: + fname, flink = res.split(',') + function_links[fname] = flink + return function_links.get(function, '') + def doc_struct_index(structs): s = '# Supported Structs\n' for struct in structs: sid = struct['identifier'] + if sid in exclude_structs: + continue s += '- [%s](#%s)\n' % (sid, sid) global total_structs total_structs += 1 @@ -662,26 +715,30 @@ def doc_struct_field(struct, field): sid = struct['identifier'] if sid in override_field_invisible: if fid in override_field_invisible[sid]: - return '' + return '', False if sid in override_field_deprecated: if fid in override_field_deprecated[sid]: - return '' + return '', False if '???' in lvt or '???' in lot: - return '' + return '', False ftype, flink = translate_type_to_lua(ftype) + if ftype == cobject_function_identifier: + flink = doc_find_function_link(field['function']) + return '| %s | [`%s`](%s) |\n' % (fid, field['function'], flink), True + restrictions = ('', 'read-only')[fimmutable == 'true'] global total_fields total_fields += 1 if flink: - return '| %s | [%s](%s) | %s |\n' % (fid, ftype, flink, restrictions) + return '| %s | [%s](%s) | %s |\n' % (fid, ftype, flink, restrictions), False - return '| %s | %s | %s |\n' % (fid, ftype, restrictions) + return '| %s | %s | %s |\n' % (fid, ftype, restrictions), False def doc_struct_object_fields(struct): @@ -696,7 +753,8 @@ def doc_struct_object_fields(struct): s += "| Field | Type | Access |\n" s += "| ----- | ---- | ------ |\n" - s += doc_struct_field(struct, field) + line, _ = doc_struct_field(struct, field) + s += line return s @@ -707,17 +765,27 @@ def doc_struct(struct): s += "| Field | Type | Access |\n" s += "| ----- | ---- | ------ |\n" - # build doc table - field_table = [] + field_functions = '' for field in struct['fields']: if 'object_field' in field and field['object_field'] == True: continue - s += doc_struct_field(struct, field) + line, isFunction = doc_struct_field(struct, field) + if isFunction: + field_functions += line + else: + s += line if sid == 'Object': s += doc_struct_object_fields(struct) + # functions + if field_functions: + s += '\n**Functions:**\n\n' + s += "| Name | Reference |\n" + s += "| ---- | --------- |\n" + s += field_functions + s += '\n[:arrow_up_small:](#)\n\n
\n' return s @@ -740,6 +808,32 @@ def doc_structs(structs): def_pointers = [] +# HACK: Parse autogen/lua_definitions/functions.lua to find the function signature +function_signatures = {} + +def get_function_signature(function): + if not function_signatures: + with open('autogen/lua_definitions/functions.lua') as f: + lines = f.readlines() + function_params = [] + function_return = None + for line in lines: + if line.startswith('--- @param'): + function_params.append(line.split()[2:4]) + elif line.startswith('--- @return'): + function_return = line.split()[2] + elif line.startswith('function'): + sig = 'fun(' + sig += ', '.join(['%s: %s' % (param_name, param_type) for param_name, param_type in function_params]) + sig += ')' + if function_return: + sig += ': %s' % (function_return) + function_name = line.replace('(', ' ').split()[1] + function_signatures[function_name] = sig + function_params.clear() + function_return = None + return function_signatures.get(function, 'function') + def def_struct(struct): sid = struct['identifier'] @@ -761,7 +855,12 @@ def def_struct(struct): ftype, flink = translate_type_to_lua(ftype) - ftype = translate_to_def(ftype) + # try to get the function signature + if ftype == cobject_function_identifier: + ftype = get_function_signature(field['function']) + else: + ftype = translate_to_def(ftype) + if ftype.startswith('Pointer_') and ftype not in def_pointers: def_pointers.append(ftype) diff --git a/autogen/extract_structs.py b/autogen/extract_structs.py index a2d65f1e9..5fb06c5ef 100644 --- a/autogen/extract_structs.py +++ b/autogen/extract_structs.py @@ -1,6 +1,7 @@ import os import re import sys +from common import cobject_function_identifier def extract_structs(filename): with open(filename) as file: @@ -36,6 +37,9 @@ def extract_structs(filename): while (' ' in txt): txt = txt.replace(' ', ' ') + # handle function members (NOT function pointers) + txt = re.sub(f'{cobject_function_identifier}\\((.*),(.*)\\)', f'{cobject_function_identifier} \\1 \\2', txt) + # strip macros txt = re.sub(r'[^a-zA-Z0-9_][A-Z0-9_]+\(.*\)', '', txt) diff --git a/autogen/gen_math.py b/autogen/gen_math.py index 98da45c1a..e5ef37b6f 100644 --- a/autogen/gen_math.py +++ b/autogen/gen_math.py @@ -1,39 +1,70 @@ import sys - -VEC3X_TO_VEC3Y = """ +VECX_TO_VECY = """ /* |description| -Converts a 3D {{desc}} vector `a` into a 3D {{desc_2}} vector and stores the result in `dest` +Converts a {{size}}D {{desc}} vector `a` into a {{size}}D {{desc_2}} vector and stores the result in `dest` |descriptionEnd| */ -INLINE OPTIMIZE_O3 Vec3{{suffix_2}}p vec3{{suffix}}_to_vec3{{suffix_2}}(OUT Vec3{{suffix_2}} dest, Vec3{{suffix}} a) { - dest[0] = a[0]{{rounding_0}}; - dest[1] = a[1]{{rounding_1}}; - dest[2] = a[2]{{rounding_2}}; +INLINE OPTIMIZE_O3 Vec{{size}}{{suffix_2}}p vec{{size}}{{suffix}}_to_vec{{size}}{{suffix_2}}(OUT Vec{{size}}{{suffix_2}} dest, Vec{{size}}{{suffix}} a) { + {{body}} return dest; } """ -ROUNDING_FORMULA = " + ((a[%d] > 0) ? 0.5f : -0.5f)" +ROUNDING_FORMULA = " + ((a[{i}] > 0) ? 0.5f : -0.5f)" -def vec3_write_conversion_functions(generated: str, curr_template: dict, templates: list, size: int) -> str: +def vec_write_conversion_functions(generated: str, curr_template: dict, templates: list, size: int) -> str: for template in templates: if template["suffix"] == curr_template["suffix"]: continue - generated += VEC3X_TO_VEC3Y \ + body = "\n ".join([ + "dest[{i}] = a[{i}]{rounding};".format( + i=i, + rounding=ROUNDING_FORMULA.format(i=i) if curr_template["rounding"] else "" + ) for i in range(size) + ]) + + generated += VECX_TO_VECY \ + .replace("{{size}}", str(size)) \ .replace("{{desc}}", curr_template["desc"]) \ .replace("{{suffix}}", curr_template["suffix"]) \ .replace("{{desc_2}}", template["desc"]) \ - .replace("{{suffix_2}}", template["suffix"]) - - for i in range(size): - rounding_i = "{{rounding_%d}}" % (i) - generated = generated.replace(rounding_i, ROUNDING_FORMULA % (i) if curr_template["rounding"] else "") + .replace("{{suffix_2}}", template["suffix"]) \ + .replace("{{body}}", body) return generated TEMPLATES = { + "src/engine/math_util_vec2.tmpl": { + "size": 2, + "templates": [ + { + "desc": "floating-point", + "type": "f32", + "suffix": "f", + "rounding": True + }, + { + "desc": "integer", + "type": "s32", + "suffix": "i", + "rounding": False + }, + { + "desc": "short integer", + "type": "s16", + "suffix": "s", + "rounding": False + } + ], + "post-template": { + "function": vec_write_conversion_functions, + "args": { + "size": 2 + } + } + }, "src/engine/math_util_vec3.tmpl": { "size": 3, "templates": [ @@ -57,7 +88,7 @@ TEMPLATES = { } ], "post-template": { - "function": vec3_write_conversion_functions, + "function": vec_write_conversion_functions, "args": { "size": 3 } diff --git a/autogen/lua_definitions/constants.lua b/autogen/lua_definitions/constants.lua index 9626d3b75..e2fd6a244 100644 --- a/autogen/lua_definitions/constants.lua +++ b/autogen/lua_definitions/constants.lua @@ -2944,6 +2944,9 @@ G_TEXRECT = 0xe4 --- @type integer G_VTX_EXT = 0x11 +--- @type integer +G_SETENVRGB = 0xd1 + --- @type integer G_PPARTTOCOLOR = 0xd3 @@ -2999,6 +3002,9 @@ GRAPH_RENDER_PLAYER = (1 << 7) --- @type integer GRAPH_EXTRA_FORCE_3D = (1 << 0) +--- @type integer +GRAPH_EXTRA_ROTATE_HELD = (1 << 1) + --- @type integer GRAPH_NODE_TYPE_FUNCTIONAL = 0x100 @@ -4554,14 +4560,20 @@ GRAB_POS_BOWSER = 3 --- @type MarioGrabPosGSCId --- | `GRAB_POS_BOWSER` --- @type integer -MOD_FS_MAX_SIZE = 0x1000000 +MOD_FS_MAX_SIZE = 0x2000000 --- @type integer -MOD_FS_MAX_FILES = 0x100 +MOD_FS_MAX_FILES = 0x200 --- @type integer MOD_FS_MAX_PATH = 0x100 +--- @type string +MOD_FS_URI_PREFIX = "modfs:/" + +--- @type string +MOD_FS_URI_FORMAT = "modfs:/%s/%s" + INT_TYPE_U8 = 0 --- @type ModFsFileIntType INT_TYPE_U16 = 1 --- @type ModFsFileIntType INT_TYPE_U32 = 2 --- @type ModFsFileIntType @@ -6755,6 +6767,9 @@ R_CBUTTONS = CONT_F --- @type integer D_CBUTTONS = CONT_D +--- @type string +PALETTES_DIRECTORY = "palettes" + --- @type integer MAX_PRESET_PALETTES = 128 @@ -10953,6 +10968,9 @@ SURFACE_FLAG_DYNAMIC = (1 << 0) --- @type integer SURFACE_FLAG_NO_CAM_COLLISION = (1 << 1) +--- @type integer +SURFACE_FLAG_INTANGIBLE = (1 << 2) + --- @type integer SURFACE_FLAG_X_PROJECTION = (1 << 3) @@ -11163,5 +11181,11 @@ VERSION_NUMBER = 41 --- @type integer MINOR_VERSION_NUMBER = 0 +--- @type string +GAME_NAME = "sm64coopdx" + +--- @type string +WINDOW_NAME = "Super Mario 64 Coop Deluxe" + --- @type integer MAX_VERSION_LENGTH = 128 diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua index 673c1a31f..adb750035 100644 --- a/autogen/lua_definitions/functions.lua +++ b/autogen/lua_definitions/functions.lua @@ -3615,12 +3615,6 @@ function rotate_camera_around_walls(c, cPos, avoidYaw, yawRange) -- ... end ---- @param pg PlayerGeometry ---- Finds the floor and ceiling directly above and below Mario's position. Updates Mario's geometry information for camera calculations -function find_mario_floor_and_ceil(pg) - -- ... -end - --- @param cutscene integer --- @return integer --- Starts a cutscene focused on an object without requiring focus to remain locked. This is useful for dynamic events where the camera adjusts freely @@ -3914,8 +3908,14 @@ function djui_hud_get_raw_mouse_y() -- ... end +--- @return boolean +--- Checks if the cursor is locked to the window +function djui_hud_is_mouse_locked() + -- ... +end + --- @param locked boolean ---- Sets if the cursor is hidden and constrainted to the window +--- Locks (or unlocks) the cursor to the window function djui_hud_set_mouse_locked(locked) -- ... end @@ -3954,12 +3954,12 @@ end --- @param y number --- @param width number --- @param height number ---- Sets the viewport to the specified position and size, this will resize +--- Sets the viewport to the specified position and size, this will resize any subsequent DJUI graphics function djui_hud_set_viewport(x, y, width, height) -- ... end ---- put the description here +--- Resets the viewport to a fullscreen state function djui_hud_reset_viewport() -- ... end @@ -3968,12 +3968,12 @@ end --- @param y number --- @param width number --- @param height number ---- put the description here +--- Sets the scissor rectangle to the specified position and size, this will cut off any subsequent DJUI graphics not within the rectangle function djui_hud_set_scissor(x, y, width, height) -- ... end ---- put the description here +--- Resets the scissor rectangle to a fullscreen state function djui_hud_reset_scissor() -- ... end @@ -4444,6 +4444,12 @@ function set_menu_mode(mode) -- ... end +--- @param dialogID integer +--- The internal function used by SM64 which plays a tune whenever boss, KtQ, etc dialog is read. +function handle_special_dialog_text(dialogID) + -- ... +end + --- @param width integer --- Dialog box customization: Sets the minimum width for a dialog box function set_min_dialog_width(width) @@ -4987,6 +4993,12 @@ function level_control_timer_running() -- ... end +--- @return boolean +--- Checks if the start button has been pressed as well as some other conditions for opening the pause menu depending on if pause anywhere is enabled +function pressed_pause() + -- ... +end + --- @param arg integer --- @param color integer --- Fades into a special warp with `arg` and using `color` @@ -6393,17 +6405,6 @@ function mario_bonk_reflection(m, negateSpeed) -- ... end ---- @param data BullyCollisionData ---- @param posX number ---- @param posZ number ---- @param forwardVel number ---- @param yaw integer ---- @param conversionRatio number ---- @param radius number -function init_bully_collision_data(data, posX, posZ, forwardVel, yaw, conversionRatio, radius) - -- ... -end - --- @param m MarioState --- @param sinkingSpeed number --- @return integer @@ -6443,14 +6444,14 @@ end --- @param m MarioState --- @return integer ---- Performs a full Mario stationary physics step (4 substeps) and returns an `GROUND_STEP_*` result +--- Performs a full Mario stationary physics step (4 substeps) and returns a `GROUND_STEP_*` result function stationary_ground_step(m) -- ... end --- @param m MarioState --- @return integer ---- Performs a full Mario ground physics step (4 substeps) and returns an `GROUND_STEP_*` result +--- Performs a full Mario ground physics step (4 substeps) and returns a `GROUND_STEP_*` result function perform_ground_step(m) -- ... end @@ -7435,25 +7436,6 @@ function mod_fs_create() -- ... end ---- @return boolean ---- Deletes the modfs object of the active mod if it exists. Returns true on success -function mod_fs_delete() - -- ... -end - ---- @return boolean ---- Saves the modfs object of the active mod if it exists. Returns true on success -function mod_fs_save() - -- ... -end - ---- @param pub boolean ---- @return boolean ---- Marks the modfs object of the active mod as public (i.e. readable by other mods) if it exists. Returns true on success -function mod_fs_set_public(pub) - -- ... -end - --- @param modFs ModFs --- @param index integer --- @return string @@ -7514,6 +7496,28 @@ function mod_fs_clear(modFs) -- ... end +--- @param modFs ModFs +--- @return boolean +--- Saves the provided `modFs` to persistent storage. Returns true on success +function mod_fs_save(modFs) + -- ... +end + +--- @param modFs ModFs +--- @return boolean +--- Removes the provided `modFs` from persistent storage and deletes its object. Returns true on success +function mod_fs_delete(modFs) + -- ... +end + +--- @param modFs ModFs +--- @param pub boolean +--- @return boolean +--- Marks the provided `modFs` as public (i.e. readable by other mods). Returns true on success +function mod_fs_set_public(modFs, pub) + -- ... +end + --- @param file ModFsFile --- @return boolean --- Reads a boolean from a binary modfs `file` @@ -7618,6 +7622,13 @@ function mod_fs_file_seek(file, offset, origin) -- ... end +--- @param file ModFsFile +--- @return boolean +--- Sets the current position of a modfs `file` to its beginning. Returns true on success +function mod_fs_file_rewind(file) + -- ... +end + --- @param file ModFsFile --- @return boolean --- Returns true if the provided modfs `file` has reached its end of file @@ -7642,6 +7653,14 @@ function mod_fs_file_erase(file, length) -- ... end +--- @param file ModFsFile +--- @param text boolean +--- @return boolean +--- Marks the provided modfs `file` as text. Returns true on success +function mod_fs_file_set_text_mode(file, text) + -- ... +end + --- @param file ModFsFile --- @param pub boolean --- @return boolean @@ -7707,6 +7726,12 @@ function mod_storage_load_bool(key) -- ... end +--- @return table +--- Loads all keys and values in mod storage as strings and returns them as a table +function mod_storage_load_all() + -- ... +end + --- @param key string --- @return boolean --- Checks if a `key` is in mod storage @@ -8802,13 +8827,6 @@ function cur_obj_init_animation_with_accel_and_sound(animIndex, accel) -- ... end ---- @param obj Object ---- @param animations AnimationTable ---- @param animIndex integer -function obj_init_animation_with_sound(obj, animations, animIndex) - -- ... -end - --- @param obj Object function cur_obj_enable_rendering_and_become_tangible(obj) -- ... @@ -9990,6 +10008,11 @@ function save_file_is_cannon_unlocked(fileIndex, courseIndex) -- ... end +--- Unlocks the cannon in the current course +function save_file_set_cannon_unlocked() + -- ... +end + --- @param capPos Vec3s --- @return integer --- Retrieves the current position of Mario's cap, if it is on the ground in the current level and area. The position is stored in the provided `capPos` parameter. Useful for tracking the cap's location after it has been dropped or lost @@ -10005,7 +10028,7 @@ end --- @param player integer --- @return integer ---- Gets the tempo of `player` +--- Gets the `tempo` of `player` function sequence_player_get_tempo(player) -- ... end @@ -10019,7 +10042,7 @@ end --- @param player integer --- @return integer ---- Gets the tempoAcc (tempo accumulation) of `player` +--- Gets the `tempoAcc` (tempo accumulation) of `player` function sequence_player_get_tempo_acc(player) -- ... end @@ -10033,7 +10056,7 @@ end --- @param player integer --- @return integer ---- Gets the transposition (pitch) of `player` +--- Gets the `transposition` (pitch) of `player` function sequence_player_get_transposition(player) -- ... end @@ -11069,6 +11092,12 @@ function djui_get_playerlist_page_index() -- ... end +--- @return boolean +--- Checks if the DJUI chatbox is open +function djui_is_chatbox_open() + -- ... +end + --- @return DjuiFontType --- Gets the DJUI menu font function djui_menu_get_font() @@ -11250,6 +11279,28 @@ function is_game_paused() -- ... end +--- @return boolean +--- Gets if the pause menu elements are hidden, useful for creating custom pause menus +function is_pause_menu_hidden() + -- ... +end + +--- @param hidden boolean +--- Sets if the pause menu elements are hidden, useful for creating custom pause menus +function set_pause_menu_hidden(hidden) + -- ... +end + +--- Pauses the game +function game_pause() + -- ... +end + +--- Unpauses the game +function game_unpause() + -- ... +end + --- @return boolean --- Checks if a screen transition is playing function is_transition_playing() @@ -11529,7 +11580,8 @@ function geo_get_current_held_object() end --- @param tex Pointer_Texture ---- Converts a texture's pixels to a Lua table. Returns nil if failed. Otherwise, returns a table as a pure memory buffer. Supports rgba16 and rgba32 textures +--- @return table +--- Converts a texture's pixels to a Lua table. Returns nil if failed. Otherwise, returns a 1-indexed table of RGBA pixels function texture_to_lua_table(tex) -- ... end @@ -11811,6 +11863,14 @@ function obj_get_temp_spawn_particles_info(modelId) -- ... end +--- @param modelId ModelExtendedId +--- @param behaviorId BehaviorId +--- @return WaterDropletParams +--- Returns a temporary water droplet params pointer with its model and behavior loaded in from `modelId` and `behaviorId` +function obj_get_temp_water_droplet_params(modelId, behaviorId) + -- ... +end + --- @return ObjectHitbox --- Returns a temporary object hitbox pointer function get_temp_object_hitbox() @@ -12295,6 +12355,27 @@ function load_object_collision_model() -- ... end +--- @return StaticObjectCollision +--- Loads the object's collision data into static collision. You may run this only once to capture the object's collision at that frame. +function load_static_object_collision() + -- ... +end + +--- @param col StaticObjectCollision +--- @param tangible boolean +--- Toggles a collection of static object surfaces +function toggle_static_object_collision(col, tangible) + -- ... +end + +--- @param col StaticObjectCollision +--- @param index integer +--- @return Surface +--- Gets a surface corresponding to `index` from the static object collision +function get_static_object_surface(col, index) + -- ... +end + --- @param o Object --- @param index integer --- @return Surface diff --git a/autogen/lua_definitions/manual.lua b/autogen/lua_definitions/manual.lua index c3ee4c52d..c0680411a 100644 --- a/autogen/lua_definitions/manual.lua +++ b/autogen/lua_definitions/manual.lua @@ -300,62 +300,6 @@ function get_texture_info(textureName) -- ... end ---- @param texInfo TextureInfo The texture ---- @param x number Where the texture is horizontally (left anchored) ---- @param y number Where the texture is vertically (top anchored) ---- @param scaleW number The scaled width of the texture ---- @param scaleH number The scaled height of the texture ---- Renders a texture to the screen -function djui_hud_render_texture(texInfo, x, y, scaleW, scaleH) - -- ... -end - ---- @param texInfo TextureInfo The texture ---- @param x number Where the texture is horizontally (left anchored) ---- @param y number Where the texture is vertically (top anchored) ---- @param scaleW number The scaled width of the texture ---- @param scaleH number The scaled height of the texture ---- @param tileX number Where the tile is horizontally (left anchored) ---- @param tileY number Where the tile is vertically (top anchored) ---- @param tileW number The width of the tile ---- @param tileH number The height of the tile ---- Renders a tile of a texture to the screen -function djui_hud_render_texture_tile(texInfo, x, y, scaleW, scaleH, tileX, tileY, tileW, tileH) - -- ... -end - ---- @param texInfo TextureInfo The texture ---- @param prevX number Where the texture previously was horizontally (left anchored) ---- @param prevY number Where the texture previously was vertically (top anchored) ---- @param prevScaleW number The previous scaled width of the texture ---- @param prevScaleH number The previous scaled height of the texture ---- @param x number Where the texture is horizontally (left anchored) ---- @param y number Where the texture is vertically (top anchored) ---- @param scaleW number The scaled width of the texture ---- @param scaleH number The scaled height of the texture ---- Renders an interpolated texture to the screen -function djui_hud_render_texture_interpolated(texInfo, prevX, prevY, prevScaleW, prevScaleH, x, y, scaleW, scaleH) - -- ... -end - ---- @param texInfo TextureInfo The texture ---- @param prevX number Where the texture previously was horizontally (left anchored) ---- @param prevY number Where the texture previously was vertically (top anchored) ---- @param prevScaleW number The previous scaled width of the texture ---- @param prevScaleH number The previous scaled height of the texture ---- @param x number Where the texture is horizontally (left anchored) ---- @param y number Where the texture is vertically (top anchored) ---- @param scaleW number The scaled width of the texture ---- @param scaleH number The scaled height of the texture ---- @param tileX number Where the tile is horizontally (left anchored) ---- @param tileY number Where the tile is vertically (top anchored) ---- @param tileW number The width of the tile ---- @param tileH number The height of the tile ---- Renders an interpolated tile of a texture to the screen -function djui_hud_render_texture_tile_interpolated(texInfo, prevX, prevY, prevScaleW, prevScaleH, x, y, scaleW, scaleH, tileX, tileY, tileW, tileH) - -- ... -end - --- @param textureName string The name of the texture --- @param overrideTexInfo TextureInfo The texture to override with --- Overrides a texture with a custom `TextureInfo` diff --git a/autogen/lua_definitions/structs.lua b/autogen/lua_definitions/structs.lua index 8dfc585dc..cae4894d4 100644 --- a/autogen/lua_definitions/structs.lua +++ b/autogen/lua_definitions/structs.lua @@ -25,9 +25,6 @@ --- @field public valuesLength integer --- @field public indexLength integer ---- @class AnimationTable ---- @field public count integer - --- @class Area --- @field public index integer --- @field public flags integer @@ -203,14 +200,6 @@ --- @field public dialogs BehaviorDialogs --- @field public trajectories BehaviorTrajectories ---- @class BullyCollisionData ---- @field public conversionRatio number ---- @field public radius number ---- @field public posX number ---- @field public posZ number ---- @field public velX number ---- @field public velZ number - --- @class Camera --- @field public mode integer --- @field public defMode integer @@ -228,36 +217,6 @@ --- @field public areaCenY number --- @field public mtx Mat4 ---- @class CameraFOVStatus ---- @field public fovFunc integer ---- @field public fov number ---- @field public fovOffset number ---- @field public unusedIsSleeping integer ---- @field public shakeAmplitude number ---- @field public shakePhase integer ---- @field public shakeSpeed integer ---- @field public decay integer - ---- @class CameraOverride ---- @field public value integer ---- @field public override boolean - ---- @class CameraStoredInfo ---- @field public pos Vec3f ---- @field public focus Vec3f ---- @field public panDist number ---- @field public cannonYOffset number - ---- @class CameraTrigger ---- @field public area integer ---- @field public centerX integer ---- @field public centerY integer ---- @field public centerZ integer ---- @field public boundsX integer ---- @field public boundsY integer ---- @field public boundsZ integer ---- @field public boundsYaw integer - --- @class ChainSegment --- @field public posX number --- @field public posY number @@ -494,6 +453,7 @@ --- @field public animReturnFromStarDance integer --- @field public animForwardSpinningFlip integer --- @field public animTripleJumpFly integer +--- @field public anims integer[] --- @field public soundFreqScale number --- @field public soundYahWahHoo integer --- @field public soundHoohoo integer @@ -539,6 +499,7 @@ --- @field public soundImaTired integer --- @field public soundLetsAGo integer --- @field public soundOkeyDokey integer +--- @field public sounds integer[] --- @class Controller --- @field public port integer @@ -567,21 +528,6 @@ --- @field public modIndex integer --- @field public next CustomLevelInfo ---- @class Cutscene ---- @field public duration integer - ---- @class CutsceneSplinePoint ---- @field public index integer ---- @field public speed integer ---- @field public point Vec3s - ---- @class CutsceneVariable ---- @field public unused1 integer ---- @field public point Vec3f ---- @field public unusedPoint Vec3f ---- @field public angle Vec3s ---- @field public unused2 integer - --- @class DateTime --- @field public year integer --- @field public month integer @@ -651,13 +597,6 @@ --- @field public fov number --- @field public offset Vec3f ---- @class FloorGeometry ---- @field public unused number[] ---- @field public normalX number ---- @field public normalY number ---- @field public normalZ number ---- @field public originOffset number - --- @class FnGraphNode --- @field public node GraphNode @@ -1015,19 +954,6 @@ --- @field public translation Vec3s --- @field public rotation Vec3s ---- @class GraphNode_802A45E4 ---- @field public unk18 integer ---- @field public unk1A integer ---- @field public unk1C integer ---- @field public unk1E integer ---- @field public unk20 integer ---- @field public unk22 integer - ---- @class HandheldShakePoint ---- @field public index integer ---- @field public pad integer ---- @field public point Vec3s - --- @class HudUtilsRotation --- @field public rotation number --- @field public rotationDiff number @@ -1139,13 +1065,6 @@ --- @field public floorNormalMinY number --- @field public ceilNormalMaxY number ---- @class LinearTransitionPoint ---- @field public focus Vec3f ---- @field public pos Vec3f ---- @field public dist number ---- @field public pitch integer ---- @field public yaw integer - --- @class MarioAnimation --- @field public currentAnimAddr Pointer_integer --- @field public targetAnim Animation @@ -1165,6 +1084,7 @@ --- @field public headPos Vec3f --- @field public torsoPos Vec3f --- @field public heldObjLastPosition Vec3f +--- @field public animPartsPos Vec3f[] --- @field public currAnimPart integer --- @field public updateTorsoTime integer --- @field public updateHeadPosTime integer @@ -1277,33 +1197,31 @@ --- @field public renderBehindHud boolean --- @field public pausable boolean --- @field public ignoreScriptWarnings boolean +--- @field public size integer --- @field public customBehaviorIndex integer --- @class ModAudio ---- @field public file ModFile +--- @field public filepath string --- @field public isStream boolean --- @field public baseVolume number --- @field public loaded boolean ---- @class ModAudioSampleCopies ---- @field public next ModAudioSampleCopies ---- @field public prev ModAudioSampleCopies ---- @field public parent ModAudio - ---- @class ModFile ---- @field public relativePath string ---- @field public modifiedTimestamp integer ---- @field public isLoadedLuaModule boolean ---- @field public wroteBytes integer ---- @field public dataHash integer[] ---- @field public cachedPath string - --- @class ModFs --- @field public mod Mod --- @field public modPath string --- @field public numFiles integer --- @field public totalSize integer --- @field public isPublic boolean +--- @field public get_filename fun(modFs: ModFs, index: integer): string +--- @field public get_file fun(modFs: ModFs, filepath: string): ModFsFile +--- @field public create_file fun(modFs: ModFs, filepath: string, text: boolean): ModFsFile +--- @field public move_file fun(modFs: ModFs, oldpath: string, newpath: string, overwriteExisting: boolean): boolean +--- @field public copy_file fun(modFs: ModFs, srcpath: string, dstpath: string, overwriteExisting: boolean): boolean +--- @field public delete_file fun(modFs: ModFs, filepath: string): boolean +--- @field public clear fun(modFs: ModFs): boolean +--- @field public save fun(modFs: ModFs): boolean +--- @field public delete fun(modFs: ModFs): boolean +--- @field public set_public fun(modFs: ModFs, pub: boolean): boolean --- @class ModFsFile --- @field public modFs ModFs @@ -1312,14 +1230,25 @@ --- @field public offset integer --- @field public isText boolean --- @field public isPublic boolean - ---- @class ModeTransitionInfo ---- @field public newMode integer ---- @field public lastMode integer ---- @field public max integer ---- @field public frame integer ---- @field public transitionStart LinearTransitionPoint ---- @field public transitionEnd LinearTransitionPoint +--- @field public read_bool fun(file: ModFsFile): boolean +--- @field public read_integer fun(file: ModFsFile, intType: ModFsFileIntType): integer +--- @field public read_number fun(file: ModFsFile, floatType: ModFsFileFloatType): number +--- @field public read_bytes fun(file: ModFsFile, length: integer): string +--- @field public read_string fun(file: ModFsFile): string +--- @field public read_line fun(file: ModFsFile): string +--- @field public write_bool fun(file: ModFsFile, value: boolean): boolean +--- @field public write_integer fun(file: ModFsFile, value: integer, intType: ModFsFileIntType): boolean +--- @field public write_number fun(file: ModFsFile, value: number, floatType: ModFsFileFloatType): boolean +--- @field public write_bytes fun(file: ModFsFile, bytestring: string): boolean +--- @field public write_string fun(file: ModFsFile, str: string): boolean +--- @field public write_line fun(file: ModFsFile, str: string): boolean +--- @field public seek fun(file: ModFsFile, offset: integer, origin: ModFsFileSeek): boolean +--- @field public rewind fun(file: ModFsFile): boolean +--- @field public is_eof fun(file: ModFsFile): boolean +--- @field public fill fun(file: ModFsFile, byte: integer, length: integer): boolean +--- @field public erase fun(file: ModFsFile, length: integer): boolean +--- @field public set_text_mode fun(file: ModFsFile, text: boolean): boolean +--- @field public set_public fun(file: ModFsFile, pub: boolean): boolean --- @class NametagsSettings --- @field public showHealth boolean @@ -1369,6 +1298,7 @@ --- @field public collisionData Pointer_Collision --- @field public behavior Pointer_BehaviorScript --- @field public curBhvCommand Pointer_BehaviorScript +--- @field public bhvStack integer[] --- @field public bhvStackIndex integer --- @field public bhvDelayTimer integer --- @field public activeFlags integer @@ -2144,10 +2074,6 @@ --- @field public object Object --- @field public next ObjectWarpNode ---- @class OffsetSizePair ---- @field public offset integer ---- @field public size integer - --- @class Painting --- @field public id integer --- @field public imageCount integer @@ -2176,10 +2102,9 @@ --- @field public rippleTimer number --- @field public rippleX number --- @field public rippleY number ---- @field public normalDisplayList Pointer_Gfx +--- @field public textureArray Pointer_Texture[] --- @field public textureWidth integer --- @field public textureHeight integer ---- @field public rippleDisplayList Pointer_Gfx --- @field public rippleTrigger integer --- @field public alpha integer --- @field public marioWasUnder integer @@ -2187,10 +2112,6 @@ --- @field public marioWentUnder integer --- @field public size number ---- @class PaintingMeshVertex ---- @field public pos integer[] ---- @field public norm integer[] - --- @class PaintingValues --- @field public cotmc_painting Painting --- @field public bob_painting Painting @@ -2209,12 +2130,6 @@ --- @field public thi_huge_painting Painting --- @field public ttm_slide_painting Painting ---- @class ParallelTrackingPoint ---- @field public startOfPath integer ---- @field public pos Vec3f ---- @field public distThresh number ---- @field public zoom number - --- @class PlayerCameraState --- @field public action integer --- @field public pos Vec3f @@ -2224,22 +2139,8 @@ --- @field public cameraEvent integer --- @field public usedObj Object ---- @class PlayerGeometry ---- @field public currFloor Surface ---- @field public currFloorHeight number ---- @field public currFloorType integer ---- @field public currCeil Surface ---- @field public currCeilType integer ---- @field public currCeilHeight number ---- @field public prevFloor Surface ---- @field public prevFloorHeight number ---- @field public prevFloorType integer ---- @field public prevCeil Surface ---- @field public prevCeilHeight number ---- @field public prevCeilType integer ---- @field public waterHeight number - --- @class PlayerPalette +--- @field public parts Color[] --- @class RayIntersectionInfo --- @field public surface Surface @@ -2272,12 +2173,6 @@ --- @field public maxPlayers integer --- @field public pauseAnywhere integer ---- @class SoundState ---- @field public playSound integer ---- @field public animFrame1 integer ---- @field public animFrame2 integer ---- @field public soundMagic integer - --- @class SpawnInfo --- @field public startPos Vec3s --- @field public startAngle Vec3s @@ -2338,6 +2233,10 @@ --- @field public dialog5 integer --- @field public dialog6 integer +--- @class StaticObjectCollision +--- @field public index integer +--- @field public length integer + --- @class Surface --- @field public type integer --- @field public flags integer @@ -2361,18 +2260,8 @@ --- @field public name string --- @field public width integer --- @field public height integer ---- @field public bitSize integer - ---- @class TransitionInfo ---- @field public posPitch integer ---- @field public posYaw integer ---- @field public posDist number ---- @field public focPitch integer ---- @field public focYaw integer ---- @field public focDist number ---- @field public framesLeft integer ---- @field public marioPos Vec3f ---- @field public pad integer +--- @field public format integer +--- @field public size integer --- @class Vtx --- @field public x number @@ -2389,10 +2278,6 @@ --- @field public nz integer --- @field public a integer ---- @class Vtx_Interp ---- @field public ob number[] ---- @field public n string - --- @class WallCollisionData --- @field public x number --- @field public y number @@ -2411,25 +2296,6 @@ --- @field public destArea integer --- @field public destNode integer ---- @class WarpTransition ---- @field public isActive integer ---- @field public type integer ---- @field public time integer ---- @field public pauseRendering integer ---- @field public data WarpTransitionData - ---- @class WarpTransitionData ---- @field public red integer ---- @field public green integer ---- @field public blue integer ---- @field public startTexRadius integer ---- @field public endTexRadius integer ---- @field public startTexX integer ---- @field public startTexY integer ---- @field public endTexX integer ---- @field public endTexY integer ---- @field public texTimer integer - --- @class WaterDropletParams --- @field public flags integer --- @field public model integer @@ -2528,4 +2394,5 @@ --- @alias Pointer_Mat4 Mat4 --- @alias Pointer_Vec4s Vec4s --- @alias Pointer_BehaviorScript BehaviorScript +--- @alias Pointer_Texture[] Texture[] --- @alias Pointer_Texture Texture diff --git a/bin/custom_font.c b/bin/custom_font.c index 9988d772b..2075d57bc 100644 --- a/bin/custom_font.c +++ b/bin/custom_font.c @@ -67,7 +67,7 @@ const f32 font_aliased_widths[] = { /* 0 1 2 3 4 5 6 7 8 9 */ 14, 12, 13, 14, 14, 14, 14, 13, 14, 14, /* : ; < = > ? @ */ - 6, 8, 10, 12, 10, 11, 18, + 8, 8, 10, 12, 10, 11, 18, /* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z */ 12, 12, 12, 12, 11, 10, 12, 12, 9, 12, 12, 10, 16, 16, 12, 11, 12, 12, 12, 10, 12, 10, 16, 14, 12, 12, /* [ \ ] ^ _ ` */ @@ -75,7 +75,7 @@ const f32 font_aliased_widths[] = { /* a b c d e f g h i j k l m n o p q r s t u v w x y z */ 10, 10, 10, 10, 9, 8, 12, 10, 7, 9, 10, 4, 13, 10, 9, 9, 10, 9, 10, 9, 10, 9, 14, 12, 10, 10, /* { | } ~ DEL */ - 10, 8, 10, 16, 10, + 10, 8, 10, 16, 16, }; ////////////////////////////////////////////////////////// diff --git a/data/dynos.c.h b/data/dynos.c.h index c5171f31e..82d7a2494 100644 --- a/data/dynos.c.h +++ b/data/dynos.c.h @@ -37,21 +37,22 @@ void dynos_generate_packs(const char* directory); // -- geos -- // void dynos_actor_override(struct Object* obj, void** aSharedChild); -void dynos_add_actor_custom(s32 modIndex, s32 modFileIndex, const char *filePath, const char* geoName); +bool dynos_add_actor_custom(s32 modIndex, s32 modFileIndex, const char *filePath, const char* geoName); const void* dynos_geolayout_get(const char *name); bool dynos_actor_get_mod_index_and_token(struct GraphNode *graphNode, u32 tokenIndex, s32 *modIndex, s32 *modFileIndex, const char **token); void dynos_actor_register_modified_graph_node(struct GraphNode *node); // -- collisions -- // -void dynos_add_collision(const char *filePath, const char* collisionName); +bool dynos_add_collision(const char *filePath, const char* collisionName); Collision* dynos_collision_get(const char* collisionName); // -- textures -- // -void dynos_add_texture(const char *filePath, const char* textureName); +bool dynos_add_texture(const char *filePath, const char* textureName); bool dynos_texture_get(const char* textureName, struct TextureInfo* outTextureInfo); bool dynos_texture_get_from_data(const Texture *tex, struct TextureInfo* outTextureInfo); void dynos_texture_override_set(const char* textureName, struct TextureInfo* overrideTextureInfo); void dynos_texture_override_reset(const char* textureName); +u8 *dynos_texture_convert_to_rgba32(const Texture *tex, u32 width, u32 height, u8 fmt, u8 siz); // -- movtexqcs -- // void dynos_movtexqc_register(const char* name, s16 level, s16 area, s16 type); diff --git a/data/dynos.cpp.h b/data/dynos.cpp.h index d45985daf..29331f45d 100644 --- a/data/dynos.cpp.h +++ b/data/dynos.cpp.h @@ -653,15 +653,6 @@ struct DynosOption : NoCopy { }; typedef bool (*DynosLoopFunc)(DynosOption *, void *); -struct BuiltinTexInfo { - const char* identifier; - const void* pointer; - const char* path; - s32 width; - s32 height; - s32 bitSize; -}; - struct LvlCmd { u8 mType; u8 mSize; @@ -866,8 +857,8 @@ const char * DynOS_Builtin_Anim_GetFromData(const Animation *aData); const Texture* DynOS_Builtin_Tex_GetFromName(const char* aDataName); const char* DynOS_Builtin_Tex_GetFromData(const Texture* aData); const char* DynOS_Builtin_Tex_GetNameFromFileName(const char* aDataName); -const struct BuiltinTexInfo* DynOS_Builtin_Tex_GetInfoFromName(const char* aDataName); -const struct BuiltinTexInfo* DynOS_Builtin_Tex_GetInfoFromData(const Texture* aData); +const struct TextureInfo* DynOS_Builtin_Tex_GetInfoFromName(const char* aDataName); +const struct TextureInfo* DynOS_Builtin_Tex_GetInfoFromData(const Texture* aData); const void* DynOS_Builtin_Func_GetFromName(const char* aDataName, u8 aFuncType); const void* DynOS_Builtin_Func_GetFromIndex(s32 aIndex, u8 aFuncType); const char * DynOS_Builtin_Func_GetNameFromIndex(s32 aIndex, u8 aFuncType); @@ -897,7 +888,7 @@ void DynOS_Pack_AddTex(PackData* aPackData, DataNode* aTexData); // std::map &DynOS_Actor_GetValidActors(); -void DynOS_Actor_AddCustom(s32 aModIndex, s32 aModFileIndex, const SysPath &aFilename, const char *aActorName); +bool DynOS_Actor_AddCustom(s32 aModIndex, s32 aModFileIndex, const SysPath &aFilename, const char *aActorName); const void *DynOS_Actor_GetLayoutFromName(const char *aActorName); bool DynOS_Actor_GetModIndexAndToken(const GraphNode *aGraphNode, u32 aTokenIndex, s32 *outModIndex, s32 *outModFileIndex, const char **outToken); ActorGfx* DynOS_Actor_GetActorGfx(const GraphNode* aGraphNode); @@ -925,7 +916,7 @@ u8 *DynOS_Tex_ConvertToRGBA32(const u8 *aData, u64 aLength, s32 aFormat, s32 aSi bool DynOS_Tex_Import(void **aOutput, void *aPtr, s32 aTile, void *aGfxRApi, void **aHashMap, void *aPool, u32 *aPoolPos, u32 aPoolSize); void DynOS_Tex_Activate(DataNode* aNode, bool aCustomTexture); void DynOS_Tex_Deactivate(DataNode* aNode); -void DynOS_Tex_AddCustom(const SysPath &aFilename, const char *aTexName); +bool DynOS_Tex_AddCustom(const SysPath &aFilename, const char *aTexName); bool DynOS_Tex_Get(const char* aTexName, struct TextureInfo* aOutTexInfo); bool DynOS_Tex_GetFromData(const Texture *aTex, struct TextureInfo* aOutTexInfo); void DynOS_Tex_Override_Set(const char* textureName, struct TextureInfo* aOverrideTexInfo); @@ -963,7 +954,7 @@ void DynOS_Bhv_ModShutdown(); // Col Manager // -void DynOS_Col_Activate(const SysPath &aFilePath, const char *aCollisionName); +bool DynOS_Col_Activate(const SysPath &aFilePath, const char *aCollisionName); Collision* DynOS_Col_Get(const char* collisionName); void DynOS_Col_ModShutdown(); diff --git a/data/dynos_bin_compress.cpp b/data/dynos_bin_compress.cpp index 02a3546a5..302c6c2b1 100644 --- a/data/dynos_bin_compress.cpp +++ b/data/dynos_bin_compress.cpp @@ -1,6 +1,10 @@ #include "dynos.cpp.h" #include +extern "C" { +#include "pc/mods/mod_fs.h" +} + static const u64 DYNOS_BIN_COMPRESS_MAGIC = 0x4E4942534F4E5944llu; static FILE *sFile = NULL; static u8 *sBufferUncompressed = NULL; @@ -154,9 +158,75 @@ bool DynOS_Bin_Compress(const SysPath &aFilename) { return true; } +static BinFile *DynOS_Bin_Decompress_ModFs(const SysPath &aFilename) { + DynOS_Bin_Compress_Init(); + + // Read file data + void *_Buffer = NULL; + u32 _Size = 0; + if (!mod_fs_read_file_from_uri(aFilename.c_str(), &_Buffer, &_Size)) { + DynOS_Bin_Compress_Free(); + return NULL; + } + sBufferCompressed = (u8 *) _Buffer; + sLengthCompressed = _Size; + + // Check file length + u64 _LengthHeader = (u64) (sizeof(u64) + sizeof(u64)); + if (!DynOS_Bin_Compress_Check( + sLengthCompressed >= _LengthHeader, + __FUNCTION__, aFilename.c_str(), "Empty file" + )) return NULL; + + // Compare with magic constant + // If not equal, it's not a compressed file + u64 _Magic = ((u64 *) _Buffer)[0]; + if (_Magic != DYNOS_BIN_COMPRESS_MAGIC) { + BinFile *_BinFile = BinFile::OpenB(sBufferCompressed, sLengthCompressed); + DynOS_Bin_Compress_Free(); + return _BinFile; + } + PrintNoNewLine("Decompressing file \"%s\"...", aFilename.c_str()); + + // Read expected uncompressed file size + sLengthUncompressed = ((u64 *) _Buffer)[1]; + sLengthCompressed -= _LengthHeader; + u8 *_BufferCompressed = sBufferCompressed + _LengthHeader; + + // Allocate memory for uncompressed buffer + if (!DynOS_Bin_Compress_Check( + (sBufferUncompressed = (u8 *) calloc(sLengthUncompressed, sizeof(u8))) != NULL, + __FUNCTION__, aFilename.c_str(), "Cannot allocate memory for decompression" + )) return NULL; + + // Uncompress data + uLongf _LengthUncompressed = (uLongf)sLengthUncompressed; + int uncompressRc = uncompress(sBufferUncompressed, &_LengthUncompressed, _BufferCompressed, sLengthCompressed); + sLengthUncompressed = _LengthUncompressed; + if (!DynOS_Bin_Compress_Check( + uncompressRc == Z_OK, + __FUNCTION__, aFilename.c_str(), "Cannot uncompress data" + )) { + PrintError("ERROR: uncompress rc: %d, length uncompressed: %lu, length compressed: %lu, length header: %lu", uncompressRc, sLengthUncompressed, sLengthCompressed, _LengthHeader); + return NULL; + } + Print("uncompress rc: %d, length uncompressed: %lu, length compressed: %lu, length header: %lu", uncompressRc, sLengthUncompressed, sLengthCompressed, _LengthHeader); + + // Return uncompressed data as a BinFile + BinFile *_BinFile = BinFile::OpenB(sBufferUncompressed, sLengthUncompressed); + DynOS_Bin_Compress_Free(); + Print(" Done."); + return _BinFile; +} + BinFile *DynOS_Bin_Decompress(const SysPath &aFilename) { DynOS_Bin_Compress_Init(); + // Check modfs + if (is_mod_fs_file(aFilename.c_str())) { + return DynOS_Bin_Decompress_ModFs(aFilename); + } + // Open input file if (!DynOS_Bin_Compress_Check( (sFile = f_open_r(aFilename.c_str())) != NULL, diff --git a/data/dynos_bin_gfx.cpp b/data/dynos_bin_gfx.cpp index 1c686cb50..caae686da 100644 --- a/data/dynos_bin_gfx.cpp +++ b/data/dynos_bin_gfx.cpp @@ -405,6 +405,7 @@ s64 DynOS_Gfx_ParseGfxConstants(const String& _Arg, bool* found) { gfx_constant(G_LIGHT_MAP_EXT); gfx_constant(G_LIGHTING_ENGINE_EXT); gfx_constant(G_PACKED_NORMALS_EXT); + gfx_constant(G_CULL_INVERT_EXT); gfx_constant(G_FRESNEL_COLOR_EXT); gfx_constant(G_FRESNEL_ALPHA_EXT); @@ -1234,12 +1235,36 @@ struct GfxParamInfo { const GfxParamType *types; }; +// Allow whitespaces before and after the command symbol name +static const char *ExtractGfxSymbol(const char *command, size_t *symbolLength) { + const char *symbol = NULL; + *symbolLength = 0; + for (; *command != 0; command++) { + if ((u8) *command <= (u8) ' ' || *command == '(') { + if (symbol != NULL) { + return symbol; + } + } else { + if (symbol == NULL) { + symbol = command; + } + (*symbolLength)++; + } + } + return symbol; +} + static const struct GfxParamInfo *GetGfxParamInfo(const char *command) { -#define define_gfx_symbol(symb, params, addPtr, ...) \ - static const GfxParamType types_##symb[] = { __VA_ARGS__ }; \ - static struct GfxParamInfo info_##symb = { .count = params, .types = types_##symb }; \ - static_assert(sizeof(types_##symb) == params, "Parameter count does not match for gfx command."); \ - if (!strncmp(#symb, command, strlen(#symb))) { return &info_##symb; } + size_t symbolLength = 0; + const char *symbol = ExtractGfxSymbol(command, &symbolLength); + if (symbol == NULL) { return NULL; } +#define define_gfx_symbol(symb, params, addPtr, ...) \ +{ \ + static const GfxParamType types_##symb[] = { __VA_ARGS__ }; \ + static struct GfxParamInfo info_##symb = { .count = params, .types = types_##symb }; \ + static_assert(sizeof(types_##symb) == params, "Parameter count does not match for gfx symbol: " #symb); \ + if (symbolLength == sizeof(#symb) - 1 && !memcmp(symbol, #symb, symbolLength)) { return &info_##symb; } \ +} #define define_gfx_symbol_manual(...) define_gfx_symbol(__VA_ARGS__) #include "gfx_symbols.h" #undef define_gfx_symbol diff --git a/data/dynos_bin_tex.cpp b/data/dynos_bin_tex.cpp index 7385726ae..858526d45 100644 --- a/data/dynos_bin_tex.cpp +++ b/data/dynos_bin_tex.cpp @@ -2,8 +2,11 @@ extern "C" { #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb/stb_image_write.h" +#include "pc/mods/mod_fs.h" } +#define PNG_SIGNATURE 0x0A1A0A0D474E5089llu + /////////// // Utils // /////////// @@ -304,46 +307,67 @@ DataNode* DynOS_Tex_LoadFromBinary(const SysPath &aPackFolder, const Sy // Load data from binary file DataNode* _TexNode = NULL; - BinFile *_File = BinFile::OpenR(aFilename.c_str()); + BinFile *_File = NULL; + if (is_mod_fs_file(aFilename.c_str())) { + void *_Buffer = NULL; + u32 _Size = 0; + if (mod_fs_read_file_from_uri(aFilename.c_str(), &_Buffer, &_Size)) { + _File = BinFile::OpenB((const u8 *) _Buffer, _Size); + free(_Buffer); + } + } else { + _File = BinFile::OpenR(aFilename.c_str()); + } if (!_File) { return NULL; } u8 type = _File->Read(); if (type == DATA_TYPE_TEXTURE) { + // load png-texture _TexNode = New>(); - _TexNode->mData = New(); - _TexNode->mName.Read(_File); + _TexNode->mData = New(); _TexNode->mData->mPngData.Read(_File); - BinFile::Close(_File); + + } else if (type == DATA_TYPE_TEXTURE_RAW) { + + // load raw-texture + _TexNode = New>(); + _TexNode->mName.Read(_File); + _TexNode->mData = New(); + _TexNode->mData->mRawFormat = _File->Read(); + _TexNode->mData->mRawSize = _File->Read(); + _TexNode->mData->mRawWidth = _File->Read(); + _TexNode->mData->mRawHeight = _File->Read(); + _TexNode->mData->mRawData.Read(_File); + + } else if ((_File->SetOffset(0), _File->Read() == PNG_SIGNATURE)) { + _File->SetOffset(0); + + // load PNG file + _TexNode = New>(); + _TexNode->mName = aFilename.c_str(); + _TexNode->mData = New(); + _TexNode->mData->mPngData.Resize(_File->Size()); + _File->Read(_TexNode->mData->mPngData.begin(), _File->Size()); + } + + BinFile::Close(_File); + + if (_TexNode) { + + // For some reason texture nodes are indexed to DynosCustomTexs by their node name, + // and not by `aTexName`, but DynOS_Tex_Get searches for `aTexName`... + // Normally, this doesn't cause any issue, but things go wrong when `aTexName` + // is not the same as the texture node name (which is the case for modfs files). + if (is_mod_fs_file(aFilename.c_str())) { + _TexNode->mName = aTexName; + } if (aAddToPack) { if (!_Pack) { _Pack = DynOS_Pack_Add(aPackFolder); } DynOS_Pack_AddTex(_Pack, _TexNode); } - - return _TexNode; - } else if (type != DATA_TYPE_TEXTURE_RAW) { - BinFile::Close(_File); - return NULL; - } - - // load raw-texture - _TexNode = New>(); - _TexNode->mData = New(); - - _TexNode->mName.Read(_File); - _TexNode->mData->mRawFormat = _File->Read(); - _TexNode->mData->mRawSize = _File->Read(); - _TexNode->mData->mRawWidth = _File->Read(); - _TexNode->mData->mRawHeight = _File->Read(); - _TexNode->mData->mRawData.Read(_File); - - BinFile::Close(_File); - - if (aAddToPack) { - if (!_Pack) { _Pack = DynOS_Pack_Add(aPackFolder); } - DynOS_Pack_AddTex(_Pack, _TexNode); } return _TexNode; diff --git a/data/dynos_c.cpp b/data/dynos_c.cpp index f3f501249..28d6fc4ed 100644 --- a/data/dynos_c.cpp +++ b/data/dynos_c.cpp @@ -115,8 +115,8 @@ void dynos_actor_override(struct Object* obj, void** aSharedChild) { DynOS_Actor_Override(obj, aSharedChild); } -void dynos_add_actor_custom(s32 modIndex, s32 modFileIndex, const char *filePath, const char* geoName) { - DynOS_Actor_AddCustom(modIndex, modFileIndex, filePath, geoName); +bool dynos_add_actor_custom(s32 modIndex, s32 modFileIndex, const char *filePath, const char* geoName) { + return DynOS_Actor_AddCustom(modIndex, modFileIndex, filePath, geoName); } const void* dynos_geolayout_get(const char *name) { @@ -133,8 +133,8 @@ void dynos_actor_register_modified_graph_node(struct GraphNode *node) { // -- collisions -- // -void dynos_add_collision(const char *filePath, const char* collisionName) { - DynOS_Col_Activate(filePath, collisionName); +bool dynos_add_collision(const char *filePath, const char* collisionName) { + return DynOS_Col_Activate(filePath, collisionName); } Collision* dynos_collision_get(const char* collisionName) { @@ -143,9 +143,9 @@ Collision* dynos_collision_get(const char* collisionName) { // -- textures -- // -void dynos_add_texture(const char *filePath, const char* textureName) { +bool dynos_add_texture(const char *filePath, const char* textureName) { SysPath _FilePath = filePath; - DynOS_Tex_AddCustom(_FilePath, textureName); + return DynOS_Tex_AddCustom(_FilePath, textureName); } bool dynos_texture_get(const char* textureName, struct TextureInfo* outTextureInfo) { @@ -164,6 +164,16 @@ void dynos_texture_override_reset(const char* textureName) { DynOS_Tex_Override_Reset(textureName); } +u8 *dynos_texture_convert_to_rgba32(const Texture *tex, u32 width, u32 height, u8 fmt, u8 siz) { + switch (siz) { + case G_IM_SIZ_4b: return DynOS_Tex_ConvertToRGBA32(tex, (width * height) / 2, fmt, siz, NULL); + case G_IM_SIZ_8b: return DynOS_Tex_ConvertToRGBA32(tex, width * height, fmt, siz, NULL); + case G_IM_SIZ_16b: return DynOS_Tex_ConvertToRGBA32(tex, width * height * 2, fmt, siz, NULL); + case G_IM_SIZ_32b: return DynOS_Tex_ConvertToRGBA32(tex, width * height * 4, fmt, siz, NULL); + } + return NULL; +} + // -- movtexqcs -- // void dynos_movtexqc_register(const char* name, s16 level, s16 area, s16 type) { diff --git a/data/dynos_mgr_actor.cpp b/data/dynos_mgr_actor.cpp index 5aba16350..fda357d0c 100644 --- a/data/dynos_mgr_actor.cpp +++ b/data/dynos_mgr_actor.cpp @@ -9,6 +9,7 @@ extern "C" { #include "game/object_list_processor.h" #include "pc/configfile.h" #include "pc/lua/smlua_hooks.h" +#include "pc/mods/mod_fs.h" } // Static maps/arrays @@ -31,7 +32,7 @@ std::map &DynOS_Actor_GetValidActors() { return DynosValidActors(); } -void DynOS_Actor_AddCustom(s32 aModIndex, s32 aModFileIndex, const SysPath &aFilename, const char *aActorName) { +bool DynOS_Actor_AddCustom(s32 aModIndex, s32 aModFileIndex, const SysPath &aFilename, const char *aActorName) { const void* georef = DynOS_Builtin_Actor_GetFromName(aActorName); u16 actorLen = strlen(aActorName); @@ -42,7 +43,7 @@ void DynOS_Actor_AddCustom(s32 aModIndex, s32 aModFileIndex, const SysPath &aFil if (!_GfxData) { PrintError(" ERROR: Couldn't load Actor Binary \"%s\" from \"%s\"", actorName, aFilename.c_str()); free(actorName); - return; + return false; } _GfxData->mModIndex = aModIndex; _GfxData->mModFileIndex = aModFileIndex; @@ -51,7 +52,7 @@ void DynOS_Actor_AddCustom(s32 aModIndex, s32 aModFileIndex, const SysPath &aFil if (!geoLayout) { PrintError(" ERROR: Couldn't load geo layout for \"%s\"", actorName); free(actorName); - return; + return false; } // Alloc and init the actors gfx list @@ -63,7 +64,7 @@ void DynOS_Actor_AddCustom(s32 aModIndex, s32 aModFileIndex, const SysPath &aFil if (!actorGfx.mGraphNode) { PrintError(" ERROR: Couldn't load graph node for \"%s\"", actorName); free(actorName); - return; + return false; } actorGfx.mGraphNode->georef = georef; @@ -76,6 +77,7 @@ void DynOS_Actor_AddCustom(s32 aModIndex, s32 aModFileIndex, const SysPath &aFil // Add to list DynOS_Actor_Valid(georef, actorGfx); free(actorName); + return true; } const void *DynOS_Actor_GetLayoutFromName(const char *aActorName) { @@ -115,6 +117,13 @@ const void *DynOS_Actor_GetLayoutFromName(const char *aActorName) { } } + // check modfs file + if (is_mod_fs_file(aActorName)) { + if (DynOS_Actor_AddCustom(gLuaActiveMod->index, -1, aActorName, aActorName)) { + return DynOS_Actor_GetLayoutFromName(aActorName); + } + } + return NULL; } @@ -222,7 +231,6 @@ void DynOS_Actor_Override(struct Object* obj, void** aSharedChild) { } } - *aSharedChild = (void*)it->second.mGraphNode; } diff --git a/data/dynos_mgr_builtin_tex.cpp b/data/dynos_mgr_builtin_tex.cpp index 4aed3a50c..3b34912b6 100644 --- a/data/dynos_mgr_builtin_tex.cpp +++ b/data/dynos_mgr_builtin_tex.cpp @@ -8,1185 +8,1211 @@ extern "C" { // Textures // ////////////// -#define define_builtin_tex(_ptr, _path, _width, _height, _bitSize) { (const char*)#_ptr, (const void*)_ptr, (const char*)_path, _width, _height, _bitSize } -#define define_builtin_tex_(_ptr, _path, _width, _height, _bitSize) { (const char*)#_ptr "_", (const void*)_ptr, (const char*)_path, _width, _height, _bitSize } +struct BuiltinTexInfo { + const char *path; + struct TextureInfo info; +}; + +#define define_builtin_tex(_ptr, _path, _width, _height, _format, _size) { \ + .path = _path, \ + .info = { \ + .texture = _ptr, \ + .name = #_ptr, \ + .width = _width, \ + .height = _height, \ + .format = _format, \ + .size = _size, \ + } \ +} + +#define define_builtin_tex_(_ptr, _path, _width, _height, _format, _size) { \ + .path = _path, \ + .info = { \ + .texture = _ptr, \ + .name = #_ptr "_", \ + .width = _width, \ + .height = _height, \ + .format = _format, \ + .size = _size, \ + } \ +} static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { - define_builtin_tex(amp_seg8_texture_08000F18, "actors/amp/amp_electricity.rgba16.png", 16, 32, 16), - define_builtin_tex(amp_seg8_texture_08001318, "actors/amp/amp_eyes.rgba16.png", 32, 32, 16), - define_builtin_tex(amp_seg8_texture_08001B18, "actors/amp/amp_body.rgba16.png", 32, 32, 16), - define_builtin_tex(amp_seg8_texture_08002318, "actors/amp/amp_mouth.rgba16.png", 32, 32, 16), - define_builtin_tex(blue_coin_switch_seg8_texture_08000018, "actors/blue_coin_switch/blue_coin_switch_side.rgba16.png", 32, 16, 16), - define_builtin_tex(blue_coin_switch_seg8_texture_08000418, "actors/blue_coin_switch/blue_coin_switch_top.rgba16.png", 32, 32, 16), - define_builtin_tex(blue_fish_seg3_texture_0301B5E0, "actors/blue_fish/blue_fish.rgba16.png", 32, 32, 16), - define_builtin_tex(bobomb_seg8_texture_0801DA60, "actors/bobomb/bob-omb_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(bobomb_seg8_texture_0801EA60, "actors/bobomb/bob-omb_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(bobomb_seg8_texture_0801FA60, "actors/bobomb/bob-omb_buddy_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(bobomb_seg8_texture_08020A60, "actors/bobomb/bob-omb_buddy_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(bobomb_seg8_texture_08021A60, "actors/bobomb/bob-omb_eyes.rgba16.png", 32, 32, 16), - define_builtin_tex(bobomb_seg8_texture_08022260, "actors/bobomb/bob-omb_eyes_blink.rgba16.png", 32, 32, 16), - define_builtin_tex(bomb_seg6_texture_06057AC0, "actors/bomb/bomb_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(bomb_seg6_texture_06058AC0, "actors/bomb/bomb_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(bomb_seg6_texture_06059AC0, "actors/bomb/bomb_spike.rgba16.png", 32, 32, 16), - define_builtin_tex(boo_seg5_texture_05009B40, "actors/boo/boo_eyes.rgba16.png", 64, 32, 16), - define_builtin_tex(boo_seg5_texture_0500AB40, "actors/boo/boo_mouth.rgba16.png", 32, 32, 16), - define_builtin_tex(boo_castle_seg6_texture_06015670, "actors/boo_castle/bbh_boo_eyes.rgba16.png", 64, 32, 16), - define_builtin_tex(boo_castle_seg6_texture_06016670, "actors/boo_castle/bbh_boo_mouth.rgba16.png", 32, 32, 16), - define_builtin_tex(book_seg5_texture_05002570, "actors/book/book_cover.rgba16.png", 32, 32, 16), - define_builtin_tex(bookend_seg5_texture_05000060, "actors/bookend/bookend_spine.rgba16.png", 16, 32, 16), - define_builtin_tex(bookend_seg5_texture_05000460, "actors/bookend/bookend_tooth.rgba16.png", 16, 32, 16), - define_builtin_tex(bookend_seg5_texture_05000860, "actors/bookend/bookend_mouth.rgba16.png", 16, 32, 16), - define_builtin_tex(bookend_seg5_texture_05000C60, "actors/bookend/bookend_pages.rgba16.png", 16, 32, 16), - define_builtin_tex(bookend_seg5_texture_05001060, "actors/bookend/bookend_cover.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_seg6_texture_0601F438, "actors/bowser/bowser_shell.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_seg6_texture_0601FC38, "actors/bowser/bowser_eyebrow.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06020C38, "actors/bowser/bowser_muzzle.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_seg6_texture_06021438, "actors/bowser/bowser_nostrils.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06022438, "actors/bowser/bowser_body.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_seg6_texture_06022C38, "actors/bowser/bowser_armband_spike.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06023C38, "actors/bowser/bowser_armband.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_seg6_texture_06024438, "actors/bowser/bowser_tongue.rgba16.png", 32, 64, 16), - define_builtin_tex(bowser_seg6_texture_06025438, "actors/bowser/bowser_chest.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_seg6_texture_06025C38, "actors/bowser/bowser_shell_edge.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_seg6_texture_06026438, "actors/bowser/bowser_blue_eye_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06027438, "actors/bowser/bowser_mouth_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06028438, "actors/bowser/bowser_upper_face.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_seg6_texture_06028C38, "actors/bowser/bowser_hair.rgba16.png", 32, 64, 16), - define_builtin_tex(bowser_seg6_texture_06029C38, "actors/bowser/bowser_claw_edge.rgba16.png", 32, 64, 16), - define_builtin_tex(bowser_seg6_texture_0602AC38, "actors/bowser/bowser_claw_horn_tooth.rgba16.png", 32, 64, 16), - define_builtin_tex(bowser_seg6_texture_0602BC38, "actors/bowser/bowser_claw_horn_angle.rgba16.png", 32, 64, 16), - define_builtin_tex(bowser_seg6_texture_0602CC38, "actors/bowser/bowser_eye_left_0.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_0602DC38, "actors/bowser/bowser_eye_half_closed_0.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_0602EC38, "actors/bowser/bowser_eye_closed_0.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_0602FC38, "actors/bowser/bowser_eye_center_0.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06030C38, "actors/bowser/bowser_eye_right_0.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06031C38, "actors/bowser/bowser_eye_far_left_0.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06032C38, "actors/bowser/bowser_eye_left_1.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06033C38, "actors/bowser/bowser_eye_half_closed_1.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06034C38, "actors/bowser/bowser_eye_closed_1.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06035C38, "actors/bowser/bowser_eye_center_1.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06036C38, "actors/bowser/bowser_eye_right_1.rgba16.png", 64, 32, 16), - define_builtin_tex(bowser_seg6_texture_06037C38, "actors/bowser/bowser_eye_far_left_1.rgba16.png", 64, 32, 16), - define_builtin_tex(flame_seg6_texture_06000000, "actors/bowser_flame/bowser_flame_0.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_06002000, "actors/bowser_flame/bowser_flame_1.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_06004000, "actors/bowser_flame/bowser_flame_2.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_06006000, "actors/bowser_flame/bowser_flame_3.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_06008000, "actors/bowser_flame/bowser_flame_4.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_0600A000, "actors/bowser_flame/bowser_flame_5.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_0600C000, "actors/bowser_flame/bowser_flame_6.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_0600E000, "actors/bowser_flame/bowser_flame_7.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_06010000, "actors/bowser_flame/bowser_flame_8.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_06012000, "actors/bowser_flame/bowser_flame_9.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_06014000, "actors/bowser_flame/bowser_flame_10.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_06016000, "actors/bowser_flame/bowser_flame_11.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_06018000, "actors/bowser_flame/bowser_flame_12.rgba16.png", 64, 64, 16), - define_builtin_tex(flame_seg6_texture_0601A000, "actors/bowser_flame/bowser_flame_13.rgba16.png", 64, 64, 16), - define_builtin_tex(bowser_key_left_texture, "actors/bowser_key/bowser_key_left.rgba16.png", 32, 64, 16), - define_builtin_tex(bowser_key_right_texture, "actors/bowser_key/bowser_key_right.rgba16.png", 32, 64, 16), - define_builtin_tex(breakable_box_seg8_texture_08011A90, "actors/breakable_box/crazy_box_surface.rgba16.png", 32, 32, 16), - define_builtin_tex(breakable_box_seg8_texture_08012290, "actors/breakable_box/cork_box_surface.rgba16.png", 32, 32, 16), - define_builtin_tex(bub_seg6_texture_0600E2A8, "actors/bub/bub_eye_border.rgba16.png", 32, 32, 16), - define_builtin_tex(bub_seg6_texture_0600EAA8, "actors/bub/bub_fins.rgba16.png", 32, 32, 16), - define_builtin_tex(bub_seg6_texture_0600F2A8, "actors/bub/bub_eyes.rgba16.png", 64, 32, 16), - define_builtin_tex(bub_seg6_texture_060102A8, "actors/bub/bub_scales.rgba16.png", 64, 32, 16), - define_builtin_tex(bubba_seg5_texture_05000008, "actors/bubba/bubba_sunglasses.rgba16.png", 16, 32, 16), - define_builtin_tex(bubba_seg5_texture_05000408, "actors/bubba/bubba_eyes_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(bubba_seg5_texture_05001408, "actors/bubba/bubba_eye_border.rgba16.png", 32, 32, 16), - define_builtin_tex(bubba_seg5_texture_05001C08, "actors/bubba/bubba_fins.rgba16.png", 32, 32, 16), - define_builtin_tex(bubba_seg5_texture_05002408, "actors/bubba/bubba_scales.rgba16.png", 64, 64, 16), - define_builtin_tex(bubble_seg4_texture_0401CD60, "actors/bubble/bubble.rgba16.png", 32, 32, 16), - define_builtin_tex(bubble_seg4_texture_0401D560, "actors/bubble/mr_i_bubble.rgba16.png", 32, 32, 16), - define_builtin_tex(bullet_bill_seg5_texture_0500BAA8, "actors/bullet_bill/bullet_bill_eye.rgba16.png", 64, 32, 16), - define_builtin_tex(bullet_bill_seg5_texture_0500CAA8, "actors/bullet_bill/bullet_bill_mouth.rgba16.png", 64, 32, 16), - define_builtin_tex(bully_seg5_texture_050000E0, "actors/bully/bully_horn.rgba16.png", 16, 16, 16), - define_builtin_tex(bully_seg5_texture_05000468, "actors/bully/bully_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(bully_seg5_texture_05001468, "actors/bully/bully_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(bully_seg5_texture_05002468, "actors/bully/bully_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(burn_smoke_seg4_texture_04021800, "actors/burn_smoke/burn_smoke.ia16.png", 32, 32, 16), - define_builtin_tex(butterfly_seg3_texture_030043A8, "actors/butterfly/butterfly_wing.rgba16.png", 32, 64, 16), - define_builtin_tex(cannon_barrel_seg8_texture_080058A8, "actors/cannon_barrel/cannon_barrel.rgba16.png", 32, 32, 16), - define_builtin_tex(cannon_base_seg8_texture_080049B8, "actors/cannon_base/cannon_base.rgba16.png", 32, 32, 16), - define_builtin_tex(cannon_lid_seg8_texture_08004058, "actors/cannon_lid/cannon_lid.rgba16.png", 32, 32, 16), - define_builtin_tex(capswitch_seg5_texture_05001C48, "actors/capswitch/cap_switch_head.ia16.png", 32, 64, 16), - define_builtin_tex(capswitch_seg5_texture_05002C48, "actors/capswitch/cap_switch_base.rgba16.png", 16, 4, 16), - define_builtin_tex(chain_ball_seg6_texture_06020AE8, "actors/chain_ball/chain_ball.rgba16.png", 32, 32, 16), - define_builtin_tex(chain_chomp_seg6_texture_060213D0, "actors/chain_chomp/chain_chomp_bright_shine.rgba16.png", 32, 32, 16), - define_builtin_tex(chain_chomp_seg6_texture_06021BD0, "actors/chain_chomp/chain_chomp_dull_shine.rgba16.png", 32, 32, 16), - define_builtin_tex(chain_chomp_seg6_texture_060223D0, "actors/chain_chomp/chain_chomp_tongue.rgba16.png", 32, 32, 16), - define_builtin_tex(chain_chomp_seg6_texture_06022BD0, "actors/chain_chomp/chain_chomp_tooth.rgba16.png", 32, 32, 16), - define_builtin_tex(chain_chomp_seg6_texture_060233D0, "actors/chain_chomp/chain_chomp_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(chair_seg5_texture_05003060, "actors/chair/chair_front.rgba16.png", 32, 32, 16), - define_builtin_tex(chair_seg5_texture_05003860, "actors/chair/chair_leg.rgba16.png", 32, 32, 16), - define_builtin_tex(chair_seg5_texture_05004060, "actors/chair/chair_bottom.rgba16.png", 32, 16, 16), - define_builtin_tex(chair_seg5_texture_05004460, "actors/chair/chair_surface_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(checkerboard_platform_seg8_texture_0800C840, "actors/checkerboard_platform/checkerboard_platform_side.rgba16.png", 32, 16, 16), - define_builtin_tex(checkerboard_platform_seg8_texture_0800CC40, "actors/checkerboard_platform/checkerboard_platform.rgba16.png", 32, 32, 16), - define_builtin_tex(chilly_chief_seg6_texture_06000060, "actors/chillychief/chill_bully_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(chilly_chief_seg6_texture_06001060, "actors/chillychief/chill_bully_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(chilly_chief_seg6_texture_06002060, "actors/chillychief/chill_bully_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(chuckya_seg8_texture_08006778, "actors/chuckya/chuckya_eyes.rgba16.png", 32, 64, 16), - define_builtin_tex(chuckya_seg8_texture_08007778, "actors/chuckya/chuckya_hand_antenna.rgba16.png", 32, 32, 16), - define_builtin_tex(chuckya_seg8_texture_08007F78, "actors/chuckya/chuckya_body_arm_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(chuckya_seg8_texture_08008F78, "actors/chuckya/chuckya_body_arm_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(clam_shell_seg5_texture_05000030, "actors/clam_shell/clam_shell.rgba16.png", 32, 32, 16), - define_builtin_tex(clam_shell_seg5_texture_05000830, "actors/clam_shell/clam_shell_mouth.rgba16.png", 32, 32, 16), - define_builtin_tex(coin_seg3_texture_03005780, "actors/coin/coin_front.ia16.png", 32, 32, 16), - define_builtin_tex(coin_seg3_texture_03005F80, "actors/coin/coin_tilt_right.ia16.png", 32, 32, 16), - define_builtin_tex(coin_seg3_texture_03006780, "actors/coin/coin_side.ia16.png", 32, 32, 16), - define_builtin_tex(coin_seg3_texture_03006F80, "actors/coin/coin_tilt_left.ia16.png", 32, 32, 16), - define_builtin_tex(cyan_fish_seg6_texture_0600D468, "actors/cyan_fish/cyan_fish.rgba16.png", 32, 32, 16), - define_builtin_tex(dirt_seg3_texture_0302BDF8, "actors/dirt/dirt_particle.rgba16.png", 16, 16, 16), - define_builtin_tex(door_seg3_texture_03009D10, "actors/door/polished_wooden_door.rgba16.png", 32, 64, 16), - define_builtin_tex(door_seg3_texture_0300AD10, "actors/door/polished_wooden_door_overlay.rgba16.png", 32, 64, 16), - define_builtin_tex(door_seg3_texture_0300BD10, "actors/door/rough_wooden_door.rgba16.png", 32, 64, 16), - define_builtin_tex(door_seg3_texture_0300CD10, "actors/door/rough_wooden_door_overlay.rgba16.png", 32, 32, 16), - define_builtin_tex(door_seg3_texture_0300D510, "actors/door/metal_door.rgba16.png", 32, 64, 16), - define_builtin_tex(door_seg3_texture_0300E510, "actors/door/metal_door_overlay.rgba16.png", 32, 32, 16), - define_builtin_tex(door_seg3_texture_0300ED10, "actors/door/hmc_mural_door.rgba16.png", 32, 64, 16), - define_builtin_tex(door_seg3_texture_0300FD10, "actors/door/hmc_mural_door_overlay.rgba16.png", 32, 32, 16), - define_builtin_tex(door_seg3_texture_03010510, "actors/door/bbh_door.rgba16.png", 32, 64, 16), - define_builtin_tex(door_seg3_texture_03011510, "actors/door/bbh_door_overlay.rgba16.png", 32, 32, 16), - define_builtin_tex(door_seg3_texture_03011D10, "actors/door/zero_star_door_sign.rgba16.png", 32, 32, 16), - define_builtin_tex(door_seg3_texture_03012510, "actors/door/one_star_door_sign.rgba16.png", 32, 32, 16), - define_builtin_tex(door_seg3_texture_03012D10, "actors/door/three_star_door_sign.rgba16.png", 32, 32, 16), - define_builtin_tex(door_seg3_texture_03013510, "actors/door/door_lock.rgba16.png", 16, 32, 16), - define_builtin_tex(dorrie_seg6_texture_06009BA0, "actors/dorrie/dorrie_eye.rgba16.png", 16, 16, 16), - define_builtin_tex(dorrie_seg6_texture_06009DA0, "actors/dorrie/dorrie_skin.rgba16.png", 32, 64, 16), - define_builtin_tex(dorrie_seg6_texture_0600ADA0, "actors/dorrie/dorrie_tongue.rgba16.png", 32, 32, 16), - define_builtin_tex(exclamation_box_seg8_texture_08012E28, "actors/exclamation_box/vanish_cap_box_front.rgba16.png", 32, 32, 16), - define_builtin_tex(exclamation_box_seg8_texture_08013628, "actors/exclamation_box/vanish_cap_box_side.rgba16.png", 32, 64, 16), - define_builtin_tex(exclamation_box_seg8_texture_08014628, "actors/exclamation_box/metal_cap_box_front.rgba16.png", 32, 32, 16), - define_builtin_tex(exclamation_box_seg8_texture_08014E28, "actors/exclamation_box/metal_cap_box_side.rgba16.png", 64, 32, 16), - define_builtin_tex(exclamation_box_seg8_texture_08015E28, "actors/exclamation_box/wing_cap_box_front.rgba16.png", 32, 32, 16), - define_builtin_tex(exclamation_box_seg8_texture_08016628, "actors/exclamation_box/wing_cap_box_side.rgba16.png", 32, 64, 16), - define_builtin_tex(exclamation_box_seg8_texture_08017628, "actors/exclamation_box/exclamation_box_front.rgba16.png", 32, 32, 16), - define_builtin_tex(exclamation_box_seg8_texture_08017E28, "actors/exclamation_box/exclamation_box_side.rgba16.png", 64, 32, 16), - define_builtin_tex(exclamation_box_outline_seg8_texture_08025168, "actors/exclamation_box_outline/exclamation_box_outline.rgba16.png", 32, 32, 16), - define_builtin_tex(exclamation_box_outline_seg8_texture_08025A80, "actors/exclamation_box_outline/exclamation_point.rgba16.png", 16, 32, 16), - define_builtin_tex(explosion_seg3_texture_03000A08, "actors/explosion/explosion_0.rgba16.png", 32, 32, 16), - define_builtin_tex(explosion_seg3_texture_03001208, "actors/explosion/explosion_1.rgba16.png", 32, 32, 16), - define_builtin_tex(explosion_seg3_texture_03001A08, "actors/explosion/explosion_2.rgba16.png", 32, 32, 16), - define_builtin_tex(explosion_seg3_texture_03002208, "actors/explosion/explosion_3.rgba16.png", 32, 32, 16), - define_builtin_tex(explosion_seg3_texture_03002A08, "actors/explosion/explosion_4.rgba16.png", 32, 32, 16), - define_builtin_tex(explosion_seg3_texture_03003208, "actors/explosion/explosion_5.rgba16.png", 32, 32, 16), - define_builtin_tex(explosion_seg3_texture_03003A08, "actors/explosion/explosion_6.rgba16.png", 32, 32, 16), - define_builtin_tex(eyerok_seg5_texture_05008D40, "actors/eyerok/eyerok_bricks.rgba16.png", 32, 32, 16), - define_builtin_tex(eyerok_seg5_texture_05009540, "actors/eyerok/eyerok_eye_open.rgba16.png", 32, 32, 16), - define_builtin_tex(eyerok_seg5_texture_05009D40, "actors/eyerok/eyerok_eye_mostly_open.rgba16.png", 32, 32, 16), - define_builtin_tex(eyerok_seg5_texture_0500A540, "actors/eyerok/eyerok_eye_mostly_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(eyerok_seg5_texture_0500AD40, "actors/eyerok/eyerok_eye_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(flame_seg3_texture_03017320, "actors/flame/flame_0.ia16.png", 32, 32, 16), - define_builtin_tex(flame_seg3_texture_03017B20, "actors/flame/flame_1.ia16.png", 32, 32, 16), - define_builtin_tex(flame_seg3_texture_03018320, "actors/flame/flame_2.ia16.png", 32, 32, 16), - define_builtin_tex(flame_seg3_texture_03018B20, "actors/flame/flame_3.ia16.png", 32, 32, 16), - define_builtin_tex(flame_seg3_texture_03019320, "actors/flame/flame_4.ia16.png", 32, 32, 16), - define_builtin_tex(flame_seg3_texture_03019B20, "actors/flame/flame_5.ia16.png", 32, 32, 16), - define_builtin_tex(flame_seg3_texture_0301A320, "actors/flame/flame_6.ia16.png", 32, 32, 16), - define_builtin_tex(flame_seg3_texture_0301AB20, "actors/flame/flame_7.ia16.png", 32, 32, 16), - define_builtin_tex(flyguy_seg8_texture_0800E088, "actors/flyguy/flyguy_cloth_wrinkle.rgba16.png", 64, 32, 16), - define_builtin_tex(flyguy_seg8_texture_0800F088, "actors/flyguy/flyguy_face.rgba16.png", 32, 32, 16), - define_builtin_tex(flyguy_seg8_texture_0800F888, "actors/flyguy/flyguy_propeller.ia16.png", 32, 32, 16), - define_builtin_tex(fwoosh_seg5_texture_05015808, "actors/fwoosh/fwoosh_face.ia16.png", 32, 32, 16), - define_builtin_tex(goomba_seg8_texture_08019530, "actors/goomba/goomba_body.rgba16.png", 32, 32, 16), - define_builtin_tex(goomba_seg8_texture_08019D30, "actors/goomba/goomba_face.rgba16.png", 32, 32, 16), - define_builtin_tex(goomba_seg8_texture_0801A530, "actors/goomba/goomba_face_blink.rgba16.png", 32, 32, 16), - define_builtin_tex(haunted_cage_seg5_texture_0500C288, "actors/haunted_cage/bbh_cage_floor.rgba16.png", 32, 32, 16), - define_builtin_tex(haunted_cage_seg5_texture_0500CA88, "actors/haunted_cage/bbh_cage_double_ornament.rgba16.png", 32, 32, 16), - define_builtin_tex(haunted_cage_seg5_texture_0500D288, "actors/haunted_cage/bbh_cage_ornament.rgba16.png", 32, 16, 16), - define_builtin_tex(haunted_cage_seg5_texture_0500D688, "actors/haunted_cage/bbh_cage_wooden_base.rgba16.png", 32, 16, 16), - define_builtin_tex(haunted_cage_seg5_texture_0500DA88, "actors/haunted_cage/bbh_cage_bars.rgba16.png", 32, 32, 16), - define_builtin_tex(haunted_cage_seg5_texture_0500E288, "actors/haunted_cage/bbh_cage_garbage.rgba16.png", 32, 32, 16), - define_builtin_tex(heart_seg8_texture_0800D7E0, "actors/heart/spinning_heart.rgba16.png", 32, 32, 16), - define_builtin_tex(heave_ho_seg5_texture_0500E9C8, "actors/heave_ho/heave-ho_face.rgba16.png", 32, 32, 16), - define_builtin_tex(heave_ho_seg5_texture_0500F1C8, "actors/heave_ho/heave-ho_platform.rgba16.png", 32, 32, 16), - define_builtin_tex(heave_ho_seg5_texture_0500F9C8, "actors/heave_ho/heave-ho_logo.rgba16.png", 64, 32, 16), - define_builtin_tex(heave_ho_seg5_texture_050109C8, "actors/heave_ho/heave-ho_arm_ornament.rgba16.png", 32, 32, 16), - define_builtin_tex(heave_ho_seg5_texture_050111C8, "actors/heave_ho/heave-ho_roller.rgba16.png", 16, 16, 16), - define_builtin_tex(heave_ho_seg5_texture_050113C8, "actors/heave_ho/heave-ho_turnkey.rgba16.png", 32, 32, 16), - define_builtin_tex(hoot_seg5_texture_05000A20, "actors/hoot/hoot_eyes.rgba16.png", 32, 32, 16), - define_builtin_tex(hoot_seg5_texture_05001E50, "actors/hoot/hoot_wing.rgba16.png", 32, 32, 16), - define_builtin_tex(hoot_seg5_texture_05002650, "actors/hoot/hoot_wing_tip.rgba16.png", 32, 32, 16), - define_builtin_tex(impact_ring_seg6_texture_0601CA50, "actors/impact_ring/impact_ring_left_side.ia16.png", 32, 64, 16), - define_builtin_tex(impact_ring_seg6_texture_0601DA50, "actors/impact_ring/impact_ring_right_side.ia16.png", 32, 64, 16), - define_builtin_tex(king_bobomb_seg5_texture_05000078, "actors/king_bobomb/bob-omb_buddy_left_side_unused.rgba16.png", 32, 64, 16), - define_builtin_tex(king_bobomb_seg5_texture_05001078, "actors/king_bobomb/bob-omb_buddy_right_side_unused.rgba16.png", 32, 64, 16), - define_builtin_tex(king_bobomb_seg5_texture_05002078, "actors/king_bobomb/king_bob-omb_arm.rgba16.png", 32, 32, 16), - define_builtin_tex(king_bobomb_seg5_texture_05002878, "actors/king_bobomb/king_bob-omb_body_unused.rgba16.png", 64, 64, 16), - define_builtin_tex(king_bobomb_seg5_texture_05004878, "actors/king_bobomb/king_bob-omb_eyes.rgba16.png", 32, 64, 16), - define_builtin_tex(king_bobomb_seg5_texture_05005878, "actors/king_bobomb/king_bob-omb_hand.rgba16.png", 32, 32, 16), - define_builtin_tex(king_bobomb_seg5_texture_05006078, "actors/king_bobomb/king_bob-omb_crown_rim.rgba16.png", 32, 16, 16), - define_builtin_tex(king_bobomb_seg5_texture_05006478, "actors/king_bobomb/bob-omb_buddy_body_unused.rgba16.png", 64, 64, 16), - define_builtin_tex(king_bobomb_seg5_texture_05008478, "actors/king_bobomb/king_bob-omb_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(king_bobomb_seg5_texture_05009478, "actors/king_bobomb/king_bob-omb_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(klepto_seg5_texture_05000008, "actors/klepto/klepto_chest_tuft.rgba16.png", 32, 32, 16), - define_builtin_tex(klepto_seg5_texture_05000808, "actors/klepto/klepto_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(klepto_seg5_texture_05001008, "actors/klepto/klepto_beak.rgba16.png", 32, 64, 16), - define_builtin_tex(klepto_seg5_texture_05002008, "actors/klepto/klepto_wing.rgba16.png", 64, 32, 16), - define_builtin_tex(klepto_seg5_texture_05003008, "actors/klepto/klepto_wing_flap.rgba16.png", 32, 32, 16), - define_builtin_tex(koopa_seg6_texture_06002648, "actors/koopa/koopa_shell_front.rgba16.png", 32, 32, 16), - define_builtin_tex(koopa_seg6_texture_06002E48, "actors/koopa/koopa_shell_back.rgba16.png", 32, 32, 16), - define_builtin_tex(koopa_seg6_texture_06003648, "actors/koopa/koopa_shoe.rgba16.png", 32, 32, 16), - define_builtin_tex(koopa_seg6_texture_06003E48, "actors/koopa/koopa_shell_front_top.rgba16.png", 32, 32, 16), - define_builtin_tex(koopa_seg6_texture_06004648, "actors/koopa/koopa_eyes_open.rgba16.png", 32, 32, 16), - define_builtin_tex(koopa_seg6_texture_06004E48, "actors/koopa/koopa_eyes_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(koopa_seg6_texture_06005648, "actors/koopa/koopa_eye_border.rgba16.png", 32, 32, 16), - define_builtin_tex(koopa_seg6_texture_06005E48, "actors/koopa/koopa_nostrils.rgba16.png", 64, 32, 16), - define_builtin_tex(koopa_flag_seg6_texture_06000048, "actors/koopa_flag/koopa_flag_banner.rgba16.png", 32, 32, 16), - define_builtin_tex(koopa_shell_seg8_texture_080274A0, "actors/koopa_shell/koopa_shell_front.rgba16.png", 32, 32, 16), - define_builtin_tex(koopa_shell_seg8_texture_08027CA0, "actors/koopa_shell/koopa_shell_back.rgba16.png", 32, 32, 16), - define_builtin_tex(lakitu_seg6_texture_06000000, "actors/lakitu_cameraman/lakitu_cameraman_cloud_face_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(lakitu_seg6_texture_06000800, "actors/lakitu_cameraman/lakitu_cameraman_eyes_open.rgba16.png", 64, 32, 16), - define_builtin_tex(lakitu_seg6_texture_06001800, "actors/lakitu_cameraman/lakitu_cameraman_eyes_closed.rgba16.png", 64, 32, 16), - define_builtin_tex(lakitu_seg6_texture_06002800, "actors/lakitu_cameraman/lakitu_cameraman_shell.rgba16.png", 32, 32, 16), - define_builtin_tex(lakitu_seg6_texture_06003000, "actors/lakitu_cameraman/lakitu_cameraman_frown.rgba16.png", 32, 32, 16), - define_builtin_tex(lakitu_seg6_texture_06003800, "actors/lakitu_cameraman/lakitu_camera_lens.rgba16.png", 16, 16, 16), - define_builtin_tex(lakitu_enemy_seg5_texture_0500ECE0, "actors/lakitu_enemy/lakitu_enemy_cloud_face_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(lakitu_enemy_seg5_texture_0500F4E0, "actors/lakitu_enemy/lakitu_enemy_eyes_open.rgba16.png", 64, 32, 16), - define_builtin_tex(lakitu_enemy_seg5_texture_050104E0, "actors/lakitu_enemy/lakitu_enemy_eyes_closed.rgba16.png", 64, 32, 16), - define_builtin_tex(lakitu_enemy_seg5_texture_050114E0, "actors/lakitu_enemy/lakitu_enemy_shell.rgba16.png", 32, 32, 16), - define_builtin_tex(lakitu_enemy_seg5_texture_05011CE0, "actors/lakitu_enemy/lakitu_enemy_frown.rgba16.png", 32, 32, 16), - define_builtin_tex(leaves_seg3_texture_0301CBE0, "actors/leaves/leaf.rgba16.png", 16, 16, 16), - define_builtin_tex(mad_piano_seg5_texture_05006AF0, "actors/mad_piano/mad_piano_tooth.rgba16.png", 32, 32, 16), - define_builtin_tex(mad_piano_seg5_texture_050072F0, "actors/mad_piano/mad_piano_body.rgba16.png", 16, 32, 16), - define_builtin_tex(mad_piano_seg5_texture_050076F0, "actors/mad_piano/mad_piano_keys_corner.rgba16.png", 32, 16, 16), - define_builtin_tex(mad_piano_seg5_texture_05007AF0, "actors/mad_piano/mad_piano_mouth.rgba16.png", 16, 32, 16), - define_builtin_tex(mad_piano_seg5_texture_05007EF0, "actors/mad_piano/mad_piano_keys.rgba16.png", 32, 16, 16), - define_builtin_tex(mad_piano_seg5_texture_050082F0, "actors/mad_piano/mad_piano_keys_edge.rgba16.png", 32, 16, 16), - define_builtin_tex(manta_seg5_texture_050017A0, "actors/manta/manta_fin_corner.rgba16.png", 32, 32, 16), - define_builtin_tex(manta_seg5_texture_05001FA0, "actors/manta/manta_gills.rgba16.png", 32, 64, 16), - define_builtin_tex(manta_seg5_texture_05002FA0, "actors/manta/manta_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(manta_seg5_texture_050037A0, "actors/manta/manta_fin_edge.rgba16.png", 64, 32, 16), - define_builtin_tex(metal_box_seg8_texture_08023998, "actors/metal_box/metal_box_side.rgba16.png", 32, 64, 16), - define_builtin_tex(mips_seg6_texture_0600FB80, "actors/mips/mips_eyes.rgba16.png", 32, 32, 16), - define_builtin_tex(mist_seg3_texture_03000080, "actors/mist/mist.ia16.png", 32, 32, 16), - define_builtin_tex(moneybag_seg6_texture_060039B0, "actors/moneybag/moneybag_mouth.rgba16.png", 64, 32, 16), - define_builtin_tex(moneybag_seg6_texture_060049B0, "actors/moneybag/moneybag_eyes.rgba16.png", 32, 32, 16), - define_builtin_tex(monty_mole_seg5_texture_05000970, "actors/monty_mole/monty_mole_cheek.rgba16.png", 32, 32, 16), - define_builtin_tex(monty_mole_seg5_texture_05001170, "actors/monty_mole/monty_mole_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(monty_mole_seg5_texture_05001970, "actors/monty_mole/monty_mole_nose.rgba16.png", 32, 32, 16), - define_builtin_tex(monty_mole_seg5_texture_05002170, "actors/monty_mole/monty_mole_tooth.rgba16.png", 32, 32, 16), - define_builtin_tex(monty_mole_seg5_texture_05002970, "actors/monty_mole/monty_mole_claw.rgba16.png", 32, 32, 16), - define_builtin_tex(monty_mole_hole_seg5_texture_05000040, "actors/monty_mole_hole/monty_mole_hole.ia16.png", 32, 32, 16), - define_builtin_tex(mr_i_eyeball_seg6_texture_06000080, "actors/mr_i_eyeball/mr_i_eyeball_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(mr_i_eyeball_seg6_texture_06001080, "actors/mr_i_eyeball/mr_i_eyeball_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(mr_i_iris_seg6_texture_06002170, "actors/mr_i_iris/mr_i_iris_open.rgba16.png", 32, 32, 16), - define_builtin_tex(mr_i_iris_seg6_texture_06002970, "actors/mr_i_iris/mr_i_iris_mostly_open.rgba16.png", 32, 32, 16), - define_builtin_tex(mr_i_iris_seg6_texture_06003170, "actors/mr_i_iris/mr_i_iris_mostly_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(mr_i_iris_seg6_texture_06003970, "actors/mr_i_iris/mr_i_iris_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(mushroom_1up_seg3_texture_03029628, "actors/mushroom_1up/1-up_mushroom.rgba16.png", 32, 64, 16), - define_builtin_tex(peach_seg5_texture_05000A28, "actors/peach/peach_eye_open.rgba16.png", 32, 32, 16), - define_builtin_tex(peach_seg5_texture_05001228, "actors/peach/peach_eye_mostly_open.rgba16.png", 32, 32, 16), - define_builtin_tex(peach_seg5_texture_05001A28, "actors/peach/peach_eye_mostly_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(peach_seg5_texture_05002228, "actors/peach/peach_eye_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(peach_seg5_texture_05002A28, "actors/peach/peach_crown_jewel.rgba16.png", 16, 16, 16), - define_builtin_tex(peach_seg5_texture_05002C28, "actors/peach/peach_chest_jewel.rgba16.png", 16, 16, 16), - define_builtin_tex(peach_seg5_texture_05002E28, "actors/peach/peach_lips_scrunched.rgba16.png", 32, 32, 16), - define_builtin_tex(peach_seg5_texture_05003628, "actors/peach/peach_lips.rgba16.png", 32, 32, 16), - define_builtin_tex(peach_seg5_texture_05003E28, "actors/peach/peach_nostril.rgba16.png", 16, 16, 16), - define_builtin_tex(peach_seg5_texture_05004028, "actors/peach/peach_dress.rgba16.png", 32, 32, 16), - define_builtin_tex(pebble_seg3_texture_0301C300, "actors/pebble/pebble.rgba16.png", 32, 32, 16), - define_builtin_tex(penguin_seg5_texture_05002DE0, "actors/penguin/penguin_eye_open.rgba16.png", 32, 32, 16), - define_builtin_tex(penguin_seg5_texture_050035E0, "actors/penguin/penguin_eye_half_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(penguin_seg5_texture_05003DE0, "actors/penguin/penguin_eye_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(penguin_seg5_texture_050045E0, "actors/penguin/penguin_eye_angry.rgba16.png", 32, 32, 16), - define_builtin_tex(penguin_seg5_texture_05004DE0, "actors/penguin/penguin_eye_angry_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(penguin_seg5_texture_050055E0, "actors/penguin/penguin_beak.rgba16.png", 32, 32, 16), - define_builtin_tex(piranha_plant_seg6_texture_060113F8, "actors/piranha_plant/piranha_plant_tongue.rgba16.png", 32, 64, 16), - define_builtin_tex(piranha_plant_seg6_texture_060123F8, "actors/piranha_plant/piranha_plant_skin.rgba16.png", 32, 32, 16), - define_builtin_tex(piranha_plant_seg6_texture_06012BF8, "actors/piranha_plant/piranha_plant_stem.rgba16.png", 32, 32, 16), - define_builtin_tex(piranha_plant_seg6_texture_060133F8, "actors/piranha_plant/piranha_plant_bottom_lip.rgba16.png", 32, 32, 16), - define_builtin_tex(piranha_plant_seg6_texture_06013BF8, "actors/piranha_plant/piranha_plant_tooth.rgba16.png", 32, 32, 16), - define_builtin_tex(piranha_plant_seg6_texture_060143F8, "actors/piranha_plant/piranha_plant_leaf.rgba16.png", 32, 64, 16), - define_builtin_tex(pokey_seg5_texture_05011750, "actors/pokey/pokey_face.rgba16.png", 32, 32, 16), - define_builtin_tex(pokey_seg5_texture_05011F50, "actors/pokey/pokey_face_blink.rgba16.png", 32, 32, 16), - define_builtin_tex(pokey_seg5_texture_05012878, "actors/pokey/pokey_body.rgba16.png", 32, 32, 16), - define_builtin_tex(poundable_pole_seg6_texture_06001050, "actors/poundable_pole/poundable_pole_top.rgba16.png", 32, 32, 16), - define_builtin_tex(poundable_pole_seg6_texture_06001850, "actors/poundable_pole/poundable_pole_side.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_power_meter_left_side, "actors/power_meter/power_meter_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(texture_power_meter_right_side, "actors/power_meter/power_meter_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(texture_power_meter_full, "actors/power_meter/power_meter_full.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_power_meter_seven_segments, "actors/power_meter/power_meter_seven_segments.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_power_meter_six_segments, "actors/power_meter/power_meter_six_segments.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_power_meter_five_segments, "actors/power_meter/power_meter_five_segments.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_power_meter_four_segments, "actors/power_meter/power_meter_four_segments.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_power_meter_three_segments, "actors/power_meter/power_meter_three_segments.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_power_meter_two_segments, "actors/power_meter/power_meter_two_segments.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_power_meter_one_segments, "actors/power_meter/power_meter_one_segment.rgba16.png", 32, 32, 16), - define_builtin_tex(purple_switch_seg8_texture_0800C0A8, "actors/purple_switch/purple_switch_base.rgba16.png", 16, 4, 16), - define_builtin_tex(purple_switch_seg8_texture_0800C128, "actors/purple_switch/purple_switch_exclamation_point.rgba16.png", 16, 32, 16), - define_builtin_tex(sand_seg3_texture_0302BAD0, "actors/sand/sand_particle.rgba16.png", 16, 16, 16), - define_builtin_tex(scuttlebug_seg6_texture_06010108, "actors/scuttlebug/scuttlebug_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(scuttlebug_seg6_texture_06010908, "actors/scuttlebug/scuttlebug_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(scuttlebug_seg6_texture_06011908, "actors/scuttlebug/scuttlebug_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(scuttlebug_seg6_texture_06012908, "actors/scuttlebug/scuttlebug_iris.rgba16.png", 32, 32, 16), - define_builtin_tex(scuttlebug_seg6_texture_06013108, "actors/scuttlebug/scuttlebug_leg.rgba16.png", 32, 32, 16), - define_builtin_tex(seaweed_seg6_texture_06007E10, "actors/seaweed/seaweed_tip.rgba16.png", 32, 32, 16), - define_builtin_tex(seaweed_seg6_texture_06008610, "actors/seaweed/seaweed_upper_center.rgba16.png", 32, 32, 16), - define_builtin_tex(seaweed_seg6_texture_06008E10, "actors/seaweed/seaweed_lower_center.rgba16.png", 32, 32, 16), - define_builtin_tex(seaweed_seg6_texture_06009610, "actors/seaweed/seaweed_base.rgba16.png", 32, 32, 16), - define_builtin_tex(skeeter_seg6_texture_06000090, "actors/skeeter/skeeter_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(skeeter_seg6_texture_06000890, "actors/skeeter/skeeter_iris.rgba16.png", 16, 8, 16), - define_builtin_tex(smoke_seg5_texture_050072C0, "actors/smoke/smoke.ia16.png", 32, 32, 16), - define_builtin_tex(snowman_seg5_texture_05008C70, "actors/snowman/mr_blizzard_mitten.rgba16.png", 32, 32, 16), - define_builtin_tex(snowman_seg5_texture_05009470, "actors/snowman/mr_blizzard_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(snowman_seg5_texture_0500A470, "actors/snowman/mr_blizzard_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(snowman_seg5_texture_0500B470, "actors/snowman/mr_blizzard_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(snowman_seg5_texture_0500BC70, "actors/snowman/mr_blizzard_mouth.rgba16.png", 32, 32, 16), - define_builtin_tex(snufit_seg6_texture_060070E0, "actors/snufit/snufit_body.rgba16.png", 32, 32, 16), - define_builtin_tex(snufit_seg6_texture_060078E0, "actors/snufit/snufit_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(snufit_seg6_texture_060080E0, "actors/snufit/snufit_mask_strap.rgba16.png", 16, 32, 16), - define_builtin_tex(snufit_seg6_texture_060084E0, "actors/snufit/snufit_mouth.rgba16.png", 32, 32, 16), - define_builtin_tex(sparkles_seg4_texture_04027490, "actors/sparkle/sparkle_0.rgba16.png", 32, 32, 16), - define_builtin_tex(sparkles_seg4_texture_04027C90, "actors/sparkle/sparkle_1.rgba16.png", 32, 32, 16), - define_builtin_tex(sparkles_seg4_texture_04028490, "actors/sparkle/sparkle_2.rgba16.png", 32, 32, 16), - define_builtin_tex(sparkles_seg4_texture_04028C90, "actors/sparkle/sparkle_3.rgba16.png", 32, 32, 16), - define_builtin_tex(sparkles_seg4_texture_04029490, "actors/sparkle/sparkle_4.rgba16.png", 32, 32, 16), - define_builtin_tex(sparkles_seg4_texture_04029C90, "actors/sparkle/sparkle_5.rgba16.png", 32, 32, 16), - define_builtin_tex(sparkles_animation_seg4_texture_04032A88, "actors/sparkle_animation/sparkle_animation_0.ia16.png", 32, 32, 16), - define_builtin_tex(sparkles_animation_seg4_texture_04033288, "actors/sparkle_animation/sparkle_animation_1.ia16.png", 32, 32, 16), - define_builtin_tex(sparkles_animation_seg4_texture_04033A88, "actors/sparkle_animation/sparkle_animation_2.ia16.png", 32, 32, 16), - define_builtin_tex(sparkles_animation_seg4_texture_04034288, "actors/sparkle_animation/sparkle_animation_3.ia16.png", 32, 32, 16), - define_builtin_tex(sparkles_animation_seg4_texture_04034A88, "actors/sparkle_animation/sparkle_animation_4.ia16.png", 32, 32, 16), - define_builtin_tex(spindrift_seg5_texture_050006D0, "actors/spindrift/spindrift_face.rgba16.png", 32, 32, 16), - define_builtin_tex(spindrift_seg5_texture_05000ED0, "actors/spindrift/spindrift_petal.rgba16.png", 32, 32, 16), - define_builtin_tex(spindrift_seg5_texture_050016D0, "actors/spindrift/spindrift_leaf.rgba16.png", 32, 32, 16), - define_builtin_tex(spindrift_seg5_texture_05001ED0, "actors/spindrift/spindrift_head.rgba16.png", 32, 32, 16), - define_builtin_tex(springboard_seg5_texture_05000018, "actors/springboard/springboard_top_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(springboard_seg5_texture_05000818, "actors/springboard/springboard_base_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(star_seg3_texture_0302A6F0, "actors/star/star_surface.rgba16.png", 32, 32, 16), - define_builtin_tex(star_seg3_texture_0302AEF0, "actors/star/star_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(stomp_smoke_seg4_texture_04022148, "actors/stomp_smoke/stomp_smoke_0.ia16.png", 32, 32, 16), - define_builtin_tex(stomp_smoke_seg4_texture_04022948, "actors/stomp_smoke/stomp_smoke_1.ia16.png", 32, 32, 16), - define_builtin_tex(stomp_smoke_seg4_texture_04023148, "actors/stomp_smoke/stomp_smoke_2.ia16.png", 32, 32, 16), - define_builtin_tex(stomp_smoke_seg4_texture_04023948, "actors/stomp_smoke/stomp_smoke_3.ia16.png", 32, 32, 16), - define_builtin_tex(stomp_smoke_seg4_texture_04024148, "actors/stomp_smoke/stomp_smoke_4.ia16.png", 32, 32, 16), - define_builtin_tex(stomp_smoke_seg4_texture_04024948, "actors/stomp_smoke/stomp_smoke_5.ia16.png", 32, 32, 16), - define_builtin_tex(sushi_seg5_texture_05008ED0, "actors/sushi/sushi_snout.rgba16.png", 32, 32, 16), - define_builtin_tex(sushi_seg5_texture_050096D0, "actors/sushi/sushi_eye.rgba16.png", 32, 16, 16), - define_builtin_tex(sushi_seg5_texture_05009AD0, "actors/sushi/sushi_tooth.rgba16.png", 8, 8, 16), - define_builtin_tex(swoop_seg6_texture_06004270, "actors/swoop/swoop_body.rgba16.png", 32, 32, 16), - define_builtin_tex(swoop_seg6_texture_06004A70, "actors/swoop/swoop_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(swoop_seg6_texture_06005270, "actors/swoop/swoop_nose.rgba16.png", 32, 32, 16), - define_builtin_tex(swoop_seg6_texture_06005A70, "actors/swoop/swoop_wing.rgba16.png", 32, 32, 16), - define_builtin_tex(thwomp_seg5_texture_05009900, "actors/thwomp/thwomp_face.rgba16.png", 32, 64, 16), - define_builtin_tex(thwomp_seg5_texture_0500A900, "actors/thwomp/thwomp_surface.rgba16.png", 32, 32, 16), - define_builtin_tex(toad_seg6_texture_06005920, "actors/toad/toad_face.rgba16.png", 32, 32, 16), - define_builtin_tex(toad_seg6_texture_06006120, "actors/toad/toad_head.rgba16.png", 32, 32, 16), - define_builtin_tex(tornado_seg5_texture_05013128, "actors/tornado/tornado.ia16.png", 32, 64, 16), - define_builtin_tex(treasure_chest_seg6_texture_06013FA8, "actors/treasure_chest/treasure_chest_lock.rgba16.png", 32, 32, 16), - define_builtin_tex(treasure_chest_seg6_texture_060147A8, "actors/treasure_chest/treasure_chest_side.rgba16.png", 32, 32, 16), - define_builtin_tex(treasure_chest_seg6_texture_06014FA8, "actors/treasure_chest/treasure_chest_lock_top.rgba16.png", 32, 32, 16), - define_builtin_tex(treasure_chest_seg6_texture_060157A8, "actors/treasure_chest/treasure_chest_front.rgba16.png", 64, 32, 16), - define_builtin_tex(tree_seg3_texture_0302DE28, "actors/tree/tree_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(tree_seg3_texture_0302EE28, "actors/tree/tree_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(tree_seg3_texture_0302FF60, "actors/tree/pine_tree.rgba16.png", 32, 64, 16), - define_builtin_tex(tree_seg3_texture_03031048, "actors/tree/snowy_pine_tree.rgba16.png", 32, 64, 16), - define_builtin_tex(tree_seg3_texture_03032218, "actors/tree/palm_tree.rgba16.png", 32, 64, 16), - define_builtin_tex(ukiki_seg5_texture_05007BC0, "actors/ukiki/ukiki_face.rgba16.png", 64, 32, 16), - define_builtin_tex(ukiki_seg5_texture_05008BC0, "actors/ukiki/ukiki_face_blink.rgba16.png", 64, 32, 16), - define_builtin_tex(ukiki_seg5_texture_05009BC0, "actors/ukiki/ukiki_butt.rgba16.png", 32, 32, 16), - define_builtin_tex(ukiki_seg5_texture_0500A3C0, "actors/ukiki/ukiki_fur.rgba16.png", 32, 32, 16), - define_builtin_tex(unagi_seg5_texture_0500AF20, "actors/unagi/unagi_body.rgba16.png", 32, 32, 16), - define_builtin_tex(unagi_seg5_texture_0500B720, "actors/unagi/unagi_eye.rgba16.png", 16, 16, 16), - define_builtin_tex(unagi_seg5_texture_0500B920, "actors/unagi/unagi_head_base.rgba16.png", 32, 32, 16), - define_builtin_tex(unagi_seg5_texture_0500C120, "actors/unagi/unagi_tooth.rgba16.png", 16, 16, 16), - define_builtin_tex(unagi_seg5_texture_0500C320, "actors/unagi/unagi_mouth.rgba16.png", 8, 8, 16), - define_builtin_tex(unagi_seg5_texture_0500C3A0, "actors/unagi/unagi_tail.rgba16.png", 32, 32, 16), - define_builtin_tex(smoke_seg4_texture_0401DEA0, "actors/walk_smoke/walk_smoke_0.ia16.png", 32, 32, 16), - define_builtin_tex(smoke_seg4_texture_0401E6A0, "actors/walk_smoke/walk_smoke_1.ia16.png", 32, 32, 16), - define_builtin_tex(smoke_seg4_texture_0401EEA0, "actors/walk_smoke/walk_smoke_2.ia16.png", 32, 32, 16), - define_builtin_tex(smoke_seg4_texture_0401F6A0, "actors/walk_smoke/walk_smoke_3.ia16.png", 32, 32, 16), - define_builtin_tex(smoke_seg4_texture_0401FEA0, "actors/walk_smoke/walk_smoke_4.ia16.png", 32, 32, 16), - define_builtin_tex(smoke_seg4_texture_040206A0, "actors/walk_smoke/walk_smoke_5.ia16.png", 32, 32, 16), - define_builtin_tex(smoke_seg4_texture_04020EA0, "actors/walk_smoke/walk_smoke_6.ia16.png", 32, 32, 16), - define_builtin_tex(warp_pipe_seg3_texture_03007E40, "actors/warp_pipe/warp_pipe_side.rgba16.png", 32, 64, 16), - define_builtin_tex(warp_pipe_seg3_texture_03009168, "actors/warp_pipe/warp_pipe_top.rgba16.png", 32, 32, 16), - define_builtin_tex(water_bubble_seg5_texture_0500FE80, "actors/water_bubble/water_bubble.rgba16.png", 32, 32, 16), - define_builtin_tex(water_mine_seg6_texture_0600A4F8, "actors/water_mine/water_mine_left_side_unused.rgba16.png", 32, 64, 16), - define_builtin_tex(water_mine_seg6_texture_0600B4F8, "actors/water_mine/water_mine_right_side_unused.rgba16.png", 32, 64, 16), - define_builtin_tex(water_mine_seg6_texture_0600C4F8, "actors/water_mine/water_mine_spike_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(water_ring_seg6_texture_06012380, "actors/water_ring/water_ring.rgba16.png", 64, 32, 16), - define_builtin_tex(water_splash_seg4_texture_0402A5C8, "actors/water_splash/water_splash_0.rgba16.png", 32, 64, 16), - define_builtin_tex(water_splash_seg4_texture_0402B5C8, "actors/water_splash/water_splash_1.rgba16.png", 32, 64, 16), - define_builtin_tex(water_splash_seg4_texture_0402C5C8, "actors/water_splash/water_splash_2.rgba16.png", 32, 64, 16), - define_builtin_tex(water_splash_seg4_texture_0402D5C8, "actors/water_splash/water_splash_3.rgba16.png", 32, 64, 16), - define_builtin_tex(water_splash_seg4_texture_0402E5C8, "actors/water_splash/water_splash_4.rgba16.png", 32, 64, 16), - define_builtin_tex(water_splash_seg4_texture_0402F5C8, "actors/water_splash/water_splash_5.rgba16.png", 32, 64, 16), - define_builtin_tex(water_splash_seg4_texture_040305C8, "actors/water_splash/water_splash_6.rgba16.png", 32, 64, 16), - define_builtin_tex(water_splash_seg4_texture_040315C8, "actors/water_splash/water_splash_7.rgba16.png", 32, 64, 16), - define_builtin_tex(water_wave_seg4_texture_04025358, "actors/water_wave/water_wave_0.ia16.png", 32, 32, 16), - define_builtin_tex(water_wave_seg4_texture_04025B58, "actors/water_wave/water_wave_1.ia16.png", 32, 32, 16), - define_builtin_tex(water_wave_seg4_texture_04026358, "actors/water_wave/water_wave_2.ia16.png", 32, 32, 16), - define_builtin_tex(water_wave_seg4_texture_04026B58, "actors/water_wave/water_wave_3.ia16.png", 32, 32, 16), - define_builtin_tex(whirlpool_seg5_texture_05012848, "actors/whirlpool/whirlpool.ia16.png", 32, 64, 16), - define_builtin_tex(white_particle_texture, "actors/white_particle/snow_particle.rgba16.png", 16, 16, 16), - define_builtin_tex(white_particle_small_texture, "actors/white_particle_small/small_snow_particle.rgba16.png", 16, 16, 16), - define_builtin_tex(whomp_seg6_texture_0601C360, "actors/whomp/whomp_back.rgba16.png", 32, 64, 16), - define_builtin_tex(whomp_seg6_texture_0601D360, "actors/whomp/whomp_face.rgba16.png", 32, 64, 16), - define_builtin_tex(whomp_seg6_texture_0601E360, "actors/whomp/whomp_hand.rgba16.png", 32, 32, 16), - define_builtin_tex(whomp_seg6_texture_0601EB60, "actors/whomp/whomp_surface.rgba16.png", 32, 32, 16), - define_builtin_tex(wiggler_seg5_texture_05005A30, "actors/wiggler/wiggler_segment_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(wiggler_seg5_texture_05006A30, "actors/wiggler/wiggler_segment_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(wiggler_seg5_texture_05007A30, "actors/wiggler/wiggler_eye.rgba16.png", 32, 32, 16), - define_builtin_tex(wiggler_seg5_texture_05008230, "actors/wiggler/wiggler_flower.rgba16.png", 32, 32, 16), - define_builtin_tex(wiggler_seg5_texture_05008A30, "actors/wiggler/wiggler_frown.rgba16.png", 32, 32, 16), - define_builtin_tex(wiggler_seg5_texture_05009230, "actors/wiggler/wiggler_nose_left_side.rgba16.png", 32, 64, 16), - define_builtin_tex(wiggler_seg5_texture_0500A230, "actors/wiggler/wiggler_nose_right_side.rgba16.png", 32, 64, 16), - define_builtin_tex(wooden_signpost_seg3_texture_0302C9C8, "actors/wooden_signpost/wooden_signpost_back.rgba16.png", 32, 32, 16), - define_builtin_tex(wooden_signpost_seg3_texture_0302D1C8, "actors/wooden_signpost/wooden_signpost_front.rgba16.png", 32, 32, 16), - define_builtin_tex(yellow_sphere_seg6_texture_0601EB88, "actors/yellow_sphere/yellow_sphere.rgba16.png", 32, 32, 16), - define_builtin_tex(yellow_sphere_seg5_texture_05000040, "actors/yellow_sphere_small/small_yellow_sphere.rgba16.png", 32, 32, 16), - define_builtin_tex(yoshi_seg5_texture_0501C4A0, "actors/yoshi/yoshi_eye.rgba16.png", 16, 16, 16), - define_builtin_tex(yoshi_seg5_texture_0501C6A0, "actors/yoshi/yoshi_eye_blink.rgba16.png", 16, 16, 16), - define_builtin_tex(yoshi_seg5_texture_0501C8A0, "actors/yoshi/yoshi_nostril.rgba16.png", 16, 16, 16), - define_builtin_tex(yoshi_egg_seg5_texture_050057B8, "actors/yoshi_egg/yoshi_egg_0_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(yoshi_egg_seg5_texture_05005FB8, "actors/yoshi_egg/yoshi_egg_1_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(yoshi_egg_seg5_texture_050067B8, "actors/yoshi_egg/yoshi_egg_2_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(yoshi_egg_seg5_texture_05006FB8, "actors/yoshi_egg/yoshi_egg_3_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(yoshi_egg_seg5_texture_050077B8, "actors/yoshi_egg/yoshi_egg_4_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(yoshi_egg_seg5_texture_05007FB8, "actors/yoshi_egg/yoshi_egg_5_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(yoshi_egg_seg5_texture_050087B8, "actors/yoshi_egg/yoshi_egg_6_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(yoshi_egg_seg5_texture_05008FB8, "actors/yoshi_egg/yoshi_egg_7_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(cave_09000000, "textures/cave/hmc_textures.00000.rgba16.png", 32, 64, 16), - define_builtin_tex(cave_09001000, "textures/cave/hmc_textures.01000.rgba16.png", 32, 32, 16), - define_builtin_tex(cave_09001800, "textures/cave/hmc_textures.01800.rgba16.png", 32, 64, 16), - define_builtin_tex(cave_09002800, "textures/cave/hmc_textures.02800.rgba16.png", 32, 32, 16), - define_builtin_tex(cave_09003000, "textures/cave/hmc_textures.03000.rgba16.png", 32, 32, 16), - define_builtin_tex(cave_09003800, "textures/cave/hmc_textures.03800.rgba16.png", 32, 64, 16), - define_builtin_tex(cave_09004800, "textures/cave/hmc_textures.04800.rgba16.png", 64, 32, 16), - define_builtin_tex(cave_09005800, "textures/cave/hmc_textures.05800.rgba16.png", 32, 64, 16), - define_builtin_tex(cave_09006800, "textures/cave/hmc_textures.06800.rgba16.png", 32, 32, 16), - define_builtin_tex(cave_09007000, "textures/cave/hmc_textures.07000.rgba16.png", 32, 32, 16), - define_builtin_tex(cave_09007800, "textures/cave/hmc_textures.07800.rgba16.png", 32, 64, 16), - define_builtin_tex(cave_09008800, "textures/cave/hmc_textures.08800.rgba16.png", 32, 64, 16), - define_builtin_tex(cave_09009800, "textures/cave/hmc_textures.09800.rgba16.png", 32, 32, 16), - define_builtin_tex(cave_0900A000, "textures/cave/hmc_textures.0A000.rgba16.png", 32, 32, 16), - define_builtin_tex(cave_0900A800, "textures/cave/hmc_textures.0A800.rgba16.png", 32, 64, 16), - define_builtin_tex(cave_0900B800, "textures/cave/hmc_textures.0B800.ia16.png", 32, 32, 16), - define_builtin_tex(cave_0900C000, "textures/cave/hmc_textures.0C000.ia16.png", 32, 32, 16), - define_builtin_tex(effect_0B000008, "textures/effect/flower.00008.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B000808, "textures/effect/flower.00808.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B001008, "textures/effect/flower.01008.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B001808, "textures/effect/flower.01808.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B002020, "textures/effect/lava_bubble.02020.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B002820, "textures/effect/lava_bubble.02820.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B003020, "textures/effect/lava_bubble.03020.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B003820, "textures/effect/lava_bubble.03820.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B004020, "textures/effect/lava_bubble.04020.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B004820, "textures/effect/lava_bubble.04820.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B005020, "textures/effect/lava_bubble.05020.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B005820, "textures/effect/lava_bubble.05820.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B006048, "textures/effect/bubble.06048.rgba16.png", 32, 32, 16), - define_builtin_tex(effect_0B00684C, "textures/effect/tiny_bubble.0684C.rgba16.png", 16, 16, 16), - define_builtin_tex(effect_0B006AD8, "textures/effect/tiny_bubble.06AD8.rgba16.png", 16, 16, 16), - define_builtin_tex(fire_09000000, "textures/fire/lll_textures.00000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09000800, "textures/fire/lll_textures.00800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09001000, "textures/fire/lll_textures.01000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09001800, "textures/fire/lll_textures.01800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09002000, "textures/fire/lll_textures.02000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09002800, "textures/fire/lll_textures.02800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09003000, "textures/fire/lll_textures.03000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09003800, "textures/fire/lll_textures.03800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09004000, "textures/fire/lll_textures.04000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09004800, "textures/fire/lll_textures.04800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09005000, "textures/fire/lll_textures.05000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09005800, "textures/fire/lll_textures.05800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09006000, "textures/fire/lll_textures.06000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09006800, "textures/fire/lll_textures.06800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09007000, "textures/fire/lll_textures.07000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09007800, "textures/fire/lll_textures.07800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09008000, "textures/fire/lll_textures.08000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09008800, "textures/fire/lll_textures.08800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09009000, "textures/fire/lll_textures.09000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_09009800, "textures/fire/lll_textures.09800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_0900A000, "textures/fire/lll_textures.0A000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_0900A800, "textures/fire/lll_textures.0A800.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_0900B000, "textures/fire/lll_textures.0B000.rgba16.png", 32, 32, 16), - define_builtin_tex(fire_0900B800, "textures/fire/lll_textures.0B800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09000000, "textures/generic/bob_textures.00000.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09000800, "textures/generic/bob_textures.00800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09001000, "textures/generic/bob_textures.01000.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09001800, "textures/generic/bob_textures.01800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09002000, "textures/generic/bob_textures.02000.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09002800, "textures/generic/bob_textures.02800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09003000, "textures/generic/bob_textures.03000.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09003800, "textures/generic/bob_textures.03800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09004000, "textures/generic/bob_textures.04000.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09004800, "textures/generic/bob_textures.04800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09005000, "textures/generic/bob_textures.05000.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09005800, "textures/generic/bob_textures.05800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09006000, "textures/generic/bob_textures.06000.rgba16.png", 32, 64, 16), - define_builtin_tex(generic_09007000, "textures/generic/bob_textures.07000.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09007800, "textures/generic/bob_textures.07800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09008000, "textures/generic/bob_textures.08000.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09008800, "textures/generic/bob_textures.08800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09009000, "textures/generic/bob_textures.09000.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_09009800, "textures/generic/bob_textures.09800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_0900A000, "textures/generic/bob_textures.0A000.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_0900A800, "textures/generic/bob_textures.0A800.rgba16.png", 32, 32, 16), - define_builtin_tex(generic_0900B000, "textures/generic/bob_textures.0B000.ia16.png", 32, 32, 16), - define_builtin_tex(grass_09000000, "textures/grass/wf_textures.00000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09000800, "textures/grass/wf_textures.00800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09001000, "textures/grass/wf_textures.01000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09001800, "textures/grass/wf_textures.01800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09002000, "textures/grass/wf_textures.02000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09002800, "textures/grass/wf_textures.02800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09003000, "textures/grass/wf_textures.03000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09003800, "textures/grass/wf_textures.03800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09004000, "textures/grass/wf_textures.04000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09004800, "textures/grass/wf_textures.04800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09005000, "textures/grass/wf_textures.05000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09005800, "textures/grass/wf_textures.05800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09006000, "textures/grass/wf_textures.06000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09006800, "textures/grass/wf_textures.06800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09007000, "textures/grass/wf_textures.07000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09007800, "textures/grass/wf_textures.07800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09008000, "textures/grass/wf_textures.08000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09008800, "textures/grass/wf_textures.08800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09009000, "textures/grass/wf_textures.09000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_09009800, "textures/grass/wf_textures.09800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_0900A000, "textures/grass/wf_textures.0A000.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_0900A800, "textures/grass/wf_textures.0A800.rgba16.png", 32, 32, 16), - define_builtin_tex(grass_0900B000, "textures/grass/wf_textures.0B000.ia16.png", 32, 32, 16), - define_builtin_tex(grass_0900B800, "textures/grass/wf_textures.0B800.ia16.png", 32, 32, 16), - define_builtin_tex(inside_09000000, "textures/inside/inside_castle_textures.00000.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_09001000, "textures/inside/inside_castle_textures.01000.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_09002000, "textures/inside/inside_castle_textures.02000.rgba16.png", 32, 64, 16), - define_builtin_tex(inside_09003000, "textures/inside/inside_castle_textures.03000.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_09003800, "textures/inside/inside_castle_textures.03800.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_09004000, "textures/inside/inside_castle_textures.04000.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_09004800, "textures/inside/inside_castle_textures.04800.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_09005000, "textures/inside/inside_castle_textures.05000.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_09005800, "textures/inside/inside_castle_textures.05800.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_09006000, "textures/inside/inside_castle_textures.06000.rgba16.png", 32, 64, 16), - define_builtin_tex(inside_09007000, "textures/inside/inside_castle_textures.07000.rgba16.png", 32, 64, 16), - define_builtin_tex(inside_09008000, "textures/inside/inside_castle_textures.08000.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_09008800, "textures/inside/inside_castle_textures.08800.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_09009000, "textures/inside/inside_castle_textures.09000.rgba16.png", 32, 64, 16), - define_builtin_tex(inside_0900A000, "textures/inside/inside_castle_textures.0A000.rgba16.png", 32, 64, 16), - define_builtin_tex(inside_0900B000, "textures/inside/inside_castle_textures.0B000.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_0900B800, "textures/inside/inside_castle_textures.0B800.rgba16.png", 64, 32, 16), - define_builtin_tex(machine_09000000, "textures/machine/ttc_textures.00000.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09000800, "textures/machine/ttc_textures.00800.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09001000, "textures/machine/ttc_textures.01000.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09001800, "textures/machine/ttc_textures.01800.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09002000, "textures/machine/ttc_textures.02000.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09002800, "textures/machine/ttc_textures.02800.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09003000, "textures/machine/ttc_textures.03000.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09003800, "textures/machine/ttc_textures.03800.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09004000, "textures/machine/ttc_textures.04000.rgba16.png", 32, 64, 16), - define_builtin_tex(machine_09005000, "textures/machine/ttc_textures.05000.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09005800, "textures/machine/ttc_textures.05800.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09006000, "textures/machine/ttc_textures.06000.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09006800, "textures/machine/ttc_textures.06800.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09007000, "textures/machine/ttc_textures.07000.rgba16.png", 32, 32, 16), - define_builtin_tex(machine_09007800, "textures/machine/ttc_textures.07800.rgba16.png", 16, 64, 16), - define_builtin_tex(machine_09008000, "textures/machine/ttc_textures.08000.rgba16.png", 64, 8, 16), - define_builtin_tex(machine_09008400, "textures/machine/ttc_textures.08400.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09000000, "textures/mountain/ttm_textures.00000.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09000800, "textures/mountain/ttm_textures.00800.rgba16.png", 64, 32, 16), - define_builtin_tex(mountain_09001800, "textures/mountain/ttm_textures.01800.rgba16.png", 32, 64, 16), - define_builtin_tex(mountain_09002800, "textures/mountain/ttm_textures.02800.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09003000, "textures/mountain/ttm_textures.03000.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09003800, "textures/mountain/ttm_textures.03800.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09004000, "textures/mountain/ttm_textures.04000.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09004800, "textures/mountain/ttm_textures.04800.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09005000, "textures/mountain/ttm_textures.05000.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09005800, "textures/mountain/ttm_textures.05800.rgba16.png", 32, 64, 16), - define_builtin_tex(mountain_09006800, "textures/mountain/ttm_textures.06800.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09007000, "textures/mountain/ttm_textures.07000.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09007800, "textures/mountain/ttm_textures.07800.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09008000, "textures/mountain/ttm_textures.08000.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_09008800, "textures/mountain/ttm_textures.08800.rgba16.png", 64, 32, 16), - define_builtin_tex(mountain_09009800, "textures/mountain/ttm_textures.09800.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_0900A000, "textures/mountain/ttm_textures.0A000.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_0900A800, "textures/mountain/ttm_textures.0A800.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_0900B000, "textures/mountain/ttm_textures.0B000.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_0900B800, "textures/mountain/ttm_textures.0B800.rgba16.png", 32, 32, 16), - define_builtin_tex(mountain_0900C000, "textures/mountain/ttm_textures.0C000.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09000000, "textures/outside/castle_grounds_textures.00000.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09000800, "textures/outside/castle_grounds_textures.00800.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09001000, "textures/outside/castle_grounds_textures.01000.rgba16.png", 64, 32, 16), - define_builtin_tex(outside_09002000, "textures/outside/castle_grounds_textures.02000.rgba16.png", 32, 64, 16), - define_builtin_tex(outside_09003000, "textures/outside/castle_grounds_textures.03000.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09003800, "textures/outside/castle_grounds_textures.03800.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09004000, "textures/outside/castle_grounds_textures.04000.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09004800, "textures/outside/castle_grounds_textures.04800.rgba16.png", 32, 64, 16), - define_builtin_tex(outside_09005800, "textures/outside/castle_grounds_textures.05800.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09006000, "textures/outside/castle_grounds_textures.06000.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09006800, "textures/outside/castle_grounds_textures.06800.rgba16.png", 64, 32, 16), - define_builtin_tex(outside_09007800, "textures/outside/castle_grounds_textures.07800.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09008000, "textures/outside/castle_grounds_textures.08000.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09008800, "textures/outside/castle_grounds_textures.08800.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09009000, "textures/outside/castle_grounds_textures.09000.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_09009800, "textures/outside/castle_grounds_textures.09800.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_0900A000, "textures/outside/castle_grounds_textures.0A000.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_0900A800, "textures/outside/castle_grounds_textures.0A800.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_0900B000, "textures/outside/castle_grounds_textures.0B000.rgba16.png", 16, 32, 16), - define_builtin_tex(outside_0900B400, "textures/outside/castle_grounds_textures.0B400.rgba16.png", 32, 32, 16), - define_builtin_tex(outside_0900BC00, "textures/outside/castle_grounds_textures.0BC00.ia16.png", 32, 32, 16), - define_builtin_tex(texture_hud_char_0, "textures/segment2/segment2.00000.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_1, "textures/segment2/segment2.00200.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_2, "textures/segment2/segment2.00400.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_3, "textures/segment2/segment2.00600.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_4, "textures/segment2/segment2.00800.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_5, "textures/segment2/segment2.00A00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_6, "textures/segment2/segment2.00C00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_7, "textures/segment2/segment2.00E00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_8, "textures/segment2/segment2.01000.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_9, "textures/segment2/segment2.01200.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_A, "textures/segment2/segment2.01400.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_B, "textures/segment2/segment2.01600.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_C, "textures/segment2/segment2.01800.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_D, "textures/segment2/segment2.01A00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_E, "textures/segment2/segment2.01C00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_F, "textures/segment2/segment2.01E00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_G, "textures/segment2/segment2.02000.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_H, "textures/segment2/segment2.02200.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_I, "textures/segment2/segment2.02400.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_J, "textures/segment2/custom_hud_j.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_K, "textures/segment2/segment2.02800.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_L, "textures/segment2/segment2.02A00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_M, "textures/segment2/segment2.02C00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_N, "textures/segment2/segment2.02E00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_O, "textures/segment2/segment2.03000.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_P, "textures/segment2/segment2.03200.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_Q, "textures/segment2/custom_hud_q.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_R, "textures/segment2/segment2.03600.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_S, "textures/segment2/segment2.03800.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_T, "textures/segment2/segment2.03A00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_U, "textures/segment2/segment2.03C00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_V, "textures/segment2/custom_hud_v.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_W, "textures/segment2/segment2.04000.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_X, "textures/segment2/custom_hud_x.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_Y, "textures/segment2/segment2.04400.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_Z, "textures/segment2/custom_hud_z.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_apostrophe, "textures/segment2/segment2.04800.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_double_quote, "textures/segment2/segment2.04A00.rgba16.png", 16, 16, 16), + define_builtin_tex(amp_seg8_texture_08000F18, "actors/amp/amp_electricity.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(amp_seg8_texture_08001318, "actors/amp/amp_eyes.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(amp_seg8_texture_08001B18, "actors/amp/amp_body.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(amp_seg8_texture_08002318, "actors/amp/amp_mouth.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(blue_coin_switch_seg8_texture_08000018, "actors/blue_coin_switch/blue_coin_switch_side.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(blue_coin_switch_seg8_texture_08000418, "actors/blue_coin_switch/blue_coin_switch_top.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(blue_fish_seg3_texture_0301B5E0, "actors/blue_fish/blue_fish.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bobomb_seg8_texture_0801DA60, "actors/bobomb/bob-omb_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bobomb_seg8_texture_0801EA60, "actors/bobomb/bob-omb_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bobomb_seg8_texture_0801FA60, "actors/bobomb/bob-omb_buddy_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bobomb_seg8_texture_08020A60, "actors/bobomb/bob-omb_buddy_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bobomb_seg8_texture_08021A60, "actors/bobomb/bob-omb_eyes.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bobomb_seg8_texture_08022260, "actors/bobomb/bob-omb_eyes_blink.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bomb_seg6_texture_06057AC0, "actors/bomb/bomb_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bomb_seg6_texture_06058AC0, "actors/bomb/bomb_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bomb_seg6_texture_06059AC0, "actors/bomb/bomb_spike.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(boo_seg5_texture_05009B40, "actors/boo/boo_eyes.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(boo_seg5_texture_0500AB40, "actors/boo/boo_mouth.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(boo_castle_seg6_texture_06015670, "actors/boo_castle/bbh_boo_eyes.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(boo_castle_seg6_texture_06016670, "actors/boo_castle/bbh_boo_mouth.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(book_seg5_texture_05002570, "actors/book/book_cover.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bookend_seg5_texture_05000060, "actors/bookend/bookend_spine.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bookend_seg5_texture_05000460, "actors/bookend/bookend_tooth.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bookend_seg5_texture_05000860, "actors/bookend/bookend_mouth.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bookend_seg5_texture_05000C60, "actors/bookend/bookend_pages.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bookend_seg5_texture_05001060, "actors/bookend/bookend_cover.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_0601F438, "actors/bowser/bowser_shell.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_0601FC38, "actors/bowser/bowser_eyebrow.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06020C38, "actors/bowser/bowser_muzzle.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06021438, "actors/bowser/bowser_nostrils.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06022438, "actors/bowser/bowser_body.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06022C38, "actors/bowser/bowser_armband_spike.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06023C38, "actors/bowser/bowser_armband.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06024438, "actors/bowser/bowser_tongue.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06025438, "actors/bowser/bowser_chest.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06025C38, "actors/bowser/bowser_shell_edge.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06026438, "actors/bowser/bowser_blue_eye_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06027438, "actors/bowser/bowser_mouth_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06028438, "actors/bowser/bowser_upper_face.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06028C38, "actors/bowser/bowser_hair.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06029C38, "actors/bowser/bowser_claw_edge.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_0602AC38, "actors/bowser/bowser_claw_horn_tooth.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_0602BC38, "actors/bowser/bowser_claw_horn_angle.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_0602CC38, "actors/bowser/bowser_eye_left_0.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_0602DC38, "actors/bowser/bowser_eye_half_closed_0.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_0602EC38, "actors/bowser/bowser_eye_closed_0.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_0602FC38, "actors/bowser/bowser_eye_center_0.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06030C38, "actors/bowser/bowser_eye_right_0.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06031C38, "actors/bowser/bowser_eye_far_left_0.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06032C38, "actors/bowser/bowser_eye_left_1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06033C38, "actors/bowser/bowser_eye_half_closed_1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06034C38, "actors/bowser/bowser_eye_closed_1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06035C38, "actors/bowser/bowser_eye_center_1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06036C38, "actors/bowser/bowser_eye_right_1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_seg6_texture_06037C38, "actors/bowser/bowser_eye_far_left_1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_06000000, "actors/bowser_flame/bowser_flame_0.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_06002000, "actors/bowser_flame/bowser_flame_1.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_06004000, "actors/bowser_flame/bowser_flame_2.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_06006000, "actors/bowser_flame/bowser_flame_3.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_06008000, "actors/bowser_flame/bowser_flame_4.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_0600A000, "actors/bowser_flame/bowser_flame_5.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_0600C000, "actors/bowser_flame/bowser_flame_6.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_0600E000, "actors/bowser_flame/bowser_flame_7.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_06010000, "actors/bowser_flame/bowser_flame_8.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_06012000, "actors/bowser_flame/bowser_flame_9.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_06014000, "actors/bowser_flame/bowser_flame_10.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_06016000, "actors/bowser_flame/bowser_flame_11.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_06018000, "actors/bowser_flame/bowser_flame_12.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg6_texture_0601A000, "actors/bowser_flame/bowser_flame_13.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_key_left_texture, "actors/bowser_key/bowser_key_left.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_key_right_texture, "actors/bowser_key/bowser_key_right.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(breakable_box_seg8_texture_08011A90, "actors/breakable_box/crazy_box_surface.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(breakable_box_seg8_texture_08012290, "actors/breakable_box/cork_box_surface.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bub_seg6_texture_0600E2A8, "actors/bub/bub_eye_border.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bub_seg6_texture_0600EAA8, "actors/bub/bub_fins.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bub_seg6_texture_0600F2A8, "actors/bub/bub_eyes.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bub_seg6_texture_060102A8, "actors/bub/bub_scales.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bubba_seg5_texture_05000008, "actors/bubba/bubba_sunglasses.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bubba_seg5_texture_05000408, "actors/bubba/bubba_eyes_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bubba_seg5_texture_05001408, "actors/bubba/bubba_eye_border.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bubba_seg5_texture_05001C08, "actors/bubba/bubba_fins.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bubba_seg5_texture_05002408, "actors/bubba/bubba_scales.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bubble_seg4_texture_0401CD60, "actors/bubble/bubble.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bubble_seg4_texture_0401D560, "actors/bubble/mr_i_bubble.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bullet_bill_seg5_texture_0500BAA8, "actors/bullet_bill/bullet_bill_eye.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bullet_bill_seg5_texture_0500CAA8, "actors/bullet_bill/bullet_bill_mouth.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bully_seg5_texture_050000E0, "actors/bully/bully_horn.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bully_seg5_texture_05000468, "actors/bully/bully_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bully_seg5_texture_05001468, "actors/bully/bully_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bully_seg5_texture_05002468, "actors/bully/bully_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(burn_smoke_seg4_texture_04021800, "actors/burn_smoke/burn_smoke.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(butterfly_seg3_texture_030043A8, "actors/butterfly/butterfly_wing.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cannon_barrel_seg8_texture_080058A8, "actors/cannon_barrel/cannon_barrel.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cannon_base_seg8_texture_080049B8, "actors/cannon_base/cannon_base.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cannon_lid_seg8_texture_08004058, "actors/cannon_lid/cannon_lid.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(capswitch_seg5_texture_05001C48, "actors/capswitch/cap_switch_head.ia16.png", 32, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(capswitch_seg5_texture_05002C48, "actors/capswitch/cap_switch_base.rgba16.png", 16, 4, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chain_ball_seg6_texture_06020AE8, "actors/chain_ball/chain_ball.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chain_chomp_seg6_texture_060213D0, "actors/chain_chomp/chain_chomp_bright_shine.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chain_chomp_seg6_texture_06021BD0, "actors/chain_chomp/chain_chomp_dull_shine.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chain_chomp_seg6_texture_060223D0, "actors/chain_chomp/chain_chomp_tongue.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chain_chomp_seg6_texture_06022BD0, "actors/chain_chomp/chain_chomp_tooth.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chain_chomp_seg6_texture_060233D0, "actors/chain_chomp/chain_chomp_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chair_seg5_texture_05003060, "actors/chair/chair_front.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chair_seg5_texture_05003860, "actors/chair/chair_leg.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chair_seg5_texture_05004060, "actors/chair/chair_bottom.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chair_seg5_texture_05004460, "actors/chair/chair_surface_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(checkerboard_platform_seg8_texture_0800C840, "actors/checkerboard_platform/checkerboard_platform_side.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(checkerboard_platform_seg8_texture_0800CC40, "actors/checkerboard_platform/checkerboard_platform.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chilly_chief_seg6_texture_06000060, "actors/chillychief/chill_bully_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chilly_chief_seg6_texture_06001060, "actors/chillychief/chill_bully_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chilly_chief_seg6_texture_06002060, "actors/chillychief/chill_bully_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chuckya_seg8_texture_08006778, "actors/chuckya/chuckya_eyes.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chuckya_seg8_texture_08007778, "actors/chuckya/chuckya_hand_antenna.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chuckya_seg8_texture_08007F78, "actors/chuckya/chuckya_body_arm_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(chuckya_seg8_texture_08008F78, "actors/chuckya/chuckya_body_arm_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clam_shell_seg5_texture_05000030, "actors/clam_shell/clam_shell.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clam_shell_seg5_texture_05000830, "actors/clam_shell/clam_shell_mouth.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(coin_seg3_texture_03005780, "actors/coin/coin_front.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(coin_seg3_texture_03005F80, "actors/coin/coin_tilt_right.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(coin_seg3_texture_03006780, "actors/coin/coin_side.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(coin_seg3_texture_03006F80, "actors/coin/coin_tilt_left.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(cyan_fish_seg6_texture_0600D468, "actors/cyan_fish/cyan_fish.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(dirt_seg3_texture_0302BDF8, "actors/dirt/dirt_particle.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_03009D10, "actors/door/polished_wooden_door.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_0300AD10, "actors/door/polished_wooden_door_overlay.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_0300BD10, "actors/door/rough_wooden_door.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_0300CD10, "actors/door/rough_wooden_door_overlay.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_0300D510, "actors/door/metal_door.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_0300E510, "actors/door/metal_door_overlay.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_0300ED10, "actors/door/hmc_mural_door.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_0300FD10, "actors/door/hmc_mural_door_overlay.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_03010510, "actors/door/bbh_door.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_03011510, "actors/door/bbh_door_overlay.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_03011D10, "actors/door/zero_star_door_sign.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_03012510, "actors/door/one_star_door_sign.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_03012D10, "actors/door/three_star_door_sign.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(door_seg3_texture_03013510, "actors/door/door_lock.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(dorrie_seg6_texture_06009BA0, "actors/dorrie/dorrie_eye.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(dorrie_seg6_texture_06009DA0, "actors/dorrie/dorrie_skin.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(dorrie_seg6_texture_0600ADA0, "actors/dorrie/dorrie_tongue.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(exclamation_box_seg8_texture_08012E28, "actors/exclamation_box/vanish_cap_box_front.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(exclamation_box_seg8_texture_08013628, "actors/exclamation_box/vanish_cap_box_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(exclamation_box_seg8_texture_08014628, "actors/exclamation_box/metal_cap_box_front.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(exclamation_box_seg8_texture_08014E28, "actors/exclamation_box/metal_cap_box_side.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(exclamation_box_seg8_texture_08015E28, "actors/exclamation_box/wing_cap_box_front.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(exclamation_box_seg8_texture_08016628, "actors/exclamation_box/wing_cap_box_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(exclamation_box_seg8_texture_08017628, "actors/exclamation_box/exclamation_box_front.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(exclamation_box_seg8_texture_08017E28, "actors/exclamation_box/exclamation_box_side.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(exclamation_box_outline_seg8_texture_08025168, "actors/exclamation_box_outline/exclamation_box_outline.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(exclamation_box_outline_seg8_texture_08025A80, "actors/exclamation_box_outline/exclamation_point.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(explosion_seg3_texture_03000A08, "actors/explosion/explosion_0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(explosion_seg3_texture_03001208, "actors/explosion/explosion_1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(explosion_seg3_texture_03001A08, "actors/explosion/explosion_2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(explosion_seg3_texture_03002208, "actors/explosion/explosion_3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(explosion_seg3_texture_03002A08, "actors/explosion/explosion_4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(explosion_seg3_texture_03003208, "actors/explosion/explosion_5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(explosion_seg3_texture_03003A08, "actors/explosion/explosion_6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(eyerok_seg5_texture_05008D40, "actors/eyerok/eyerok_bricks.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(eyerok_seg5_texture_05009540, "actors/eyerok/eyerok_eye_open.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(eyerok_seg5_texture_05009D40, "actors/eyerok/eyerok_eye_mostly_open.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(eyerok_seg5_texture_0500A540, "actors/eyerok/eyerok_eye_mostly_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(eyerok_seg5_texture_0500AD40, "actors/eyerok/eyerok_eye_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg3_texture_03017320, "actors/flame/flame_0.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg3_texture_03017B20, "actors/flame/flame_1.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg3_texture_03018320, "actors/flame/flame_2.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg3_texture_03018B20, "actors/flame/flame_3.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg3_texture_03019320, "actors/flame/flame_4.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg3_texture_03019B20, "actors/flame/flame_5.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg3_texture_0301A320, "actors/flame/flame_6.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(flame_seg3_texture_0301AB20, "actors/flame/flame_7.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(flyguy_seg8_texture_0800E088, "actors/flyguy/flyguy_cloth_wrinkle.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flyguy_seg8_texture_0800F088, "actors/flyguy/flyguy_face.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(flyguy_seg8_texture_0800F888, "actors/flyguy/flyguy_propeller.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(fwoosh_seg5_texture_05015808, "actors/fwoosh/fwoosh_face.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(goomba_seg8_texture_08019530, "actors/goomba/goomba_body.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(goomba_seg8_texture_08019D30, "actors/goomba/goomba_face.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(goomba_seg8_texture_0801A530, "actors/goomba/goomba_face_blink.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(haunted_cage_seg5_texture_0500C288, "actors/haunted_cage/bbh_cage_floor.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(haunted_cage_seg5_texture_0500CA88, "actors/haunted_cage/bbh_cage_double_ornament.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(haunted_cage_seg5_texture_0500D288, "actors/haunted_cage/bbh_cage_ornament.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(haunted_cage_seg5_texture_0500D688, "actors/haunted_cage/bbh_cage_wooden_base.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(haunted_cage_seg5_texture_0500DA88, "actors/haunted_cage/bbh_cage_bars.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(haunted_cage_seg5_texture_0500E288, "actors/haunted_cage/bbh_cage_garbage.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(heart_seg8_texture_0800D7E0, "actors/heart/spinning_heart.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(heave_ho_seg5_texture_0500E9C8, "actors/heave_ho/heave-ho_face.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(heave_ho_seg5_texture_0500F1C8, "actors/heave_ho/heave-ho_platform.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(heave_ho_seg5_texture_0500F9C8, "actors/heave_ho/heave-ho_logo.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(heave_ho_seg5_texture_050109C8, "actors/heave_ho/heave-ho_arm_ornament.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(heave_ho_seg5_texture_050111C8, "actors/heave_ho/heave-ho_roller.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(heave_ho_seg5_texture_050113C8, "actors/heave_ho/heave-ho_turnkey.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hoot_seg5_texture_05000A20, "actors/hoot/hoot_eyes.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hoot_seg5_texture_05001E50, "actors/hoot/hoot_wing.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hoot_seg5_texture_05002650, "actors/hoot/hoot_wing_tip.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(impact_ring_seg6_texture_0601CA50, "actors/impact_ring/impact_ring_left_side.ia16.png", 32, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(impact_ring_seg6_texture_0601DA50, "actors/impact_ring/impact_ring_right_side.ia16.png", 32, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(king_bobomb_seg5_texture_05000078, "actors/king_bobomb/bob-omb_buddy_left_side_unused.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(king_bobomb_seg5_texture_05001078, "actors/king_bobomb/bob-omb_buddy_right_side_unused.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(king_bobomb_seg5_texture_05002078, "actors/king_bobomb/king_bob-omb_arm.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(king_bobomb_seg5_texture_05002878, "actors/king_bobomb/king_bob-omb_body_unused.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(king_bobomb_seg5_texture_05004878, "actors/king_bobomb/king_bob-omb_eyes.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(king_bobomb_seg5_texture_05005878, "actors/king_bobomb/king_bob-omb_hand.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(king_bobomb_seg5_texture_05006078, "actors/king_bobomb/king_bob-omb_crown_rim.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(king_bobomb_seg5_texture_05006478, "actors/king_bobomb/bob-omb_buddy_body_unused.rgba16.png", 64, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(king_bobomb_seg5_texture_05008478, "actors/king_bobomb/king_bob-omb_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(king_bobomb_seg5_texture_05009478, "actors/king_bobomb/king_bob-omb_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(klepto_seg5_texture_05000008, "actors/klepto/klepto_chest_tuft.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(klepto_seg5_texture_05000808, "actors/klepto/klepto_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(klepto_seg5_texture_05001008, "actors/klepto/klepto_beak.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(klepto_seg5_texture_05002008, "actors/klepto/klepto_wing.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(klepto_seg5_texture_05003008, "actors/klepto/klepto_wing_flap.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_seg6_texture_06002648, "actors/koopa/koopa_shell_front.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_seg6_texture_06002E48, "actors/koopa/koopa_shell_back.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_seg6_texture_06003648, "actors/koopa/koopa_shoe.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_seg6_texture_06003E48, "actors/koopa/koopa_shell_front_top.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_seg6_texture_06004648, "actors/koopa/koopa_eyes_open.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_seg6_texture_06004E48, "actors/koopa/koopa_eyes_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_seg6_texture_06005648, "actors/koopa/koopa_eye_border.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_seg6_texture_06005E48, "actors/koopa/koopa_nostrils.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_flag_seg6_texture_06000048, "actors/koopa_flag/koopa_flag_banner.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_shell_seg8_texture_080274A0, "actors/koopa_shell/koopa_shell_front.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(koopa_shell_seg8_texture_08027CA0, "actors/koopa_shell/koopa_shell_back.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_seg6_texture_06000000, "actors/lakitu_cameraman/lakitu_cameraman_cloud_face_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_seg6_texture_06000800, "actors/lakitu_cameraman/lakitu_cameraman_eyes_open.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_seg6_texture_06001800, "actors/lakitu_cameraman/lakitu_cameraman_eyes_closed.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_seg6_texture_06002800, "actors/lakitu_cameraman/lakitu_cameraman_shell.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_seg6_texture_06003000, "actors/lakitu_cameraman/lakitu_cameraman_frown.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_seg6_texture_06003800, "actors/lakitu_cameraman/lakitu_camera_lens.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_enemy_seg5_texture_0500ECE0, "actors/lakitu_enemy/lakitu_enemy_cloud_face_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_enemy_seg5_texture_0500F4E0, "actors/lakitu_enemy/lakitu_enemy_eyes_open.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_enemy_seg5_texture_050104E0, "actors/lakitu_enemy/lakitu_enemy_eyes_closed.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_enemy_seg5_texture_050114E0, "actors/lakitu_enemy/lakitu_enemy_shell.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lakitu_enemy_seg5_texture_05011CE0, "actors/lakitu_enemy/lakitu_enemy_frown.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(leaves_seg3_texture_0301CBE0, "actors/leaves/leaf.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mad_piano_seg5_texture_05006AF0, "actors/mad_piano/mad_piano_tooth.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mad_piano_seg5_texture_050072F0, "actors/mad_piano/mad_piano_body.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mad_piano_seg5_texture_050076F0, "actors/mad_piano/mad_piano_keys_corner.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mad_piano_seg5_texture_05007AF0, "actors/mad_piano/mad_piano_mouth.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mad_piano_seg5_texture_05007EF0, "actors/mad_piano/mad_piano_keys.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mad_piano_seg5_texture_050082F0, "actors/mad_piano/mad_piano_keys_edge.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(manta_seg5_texture_050017A0, "actors/manta/manta_fin_corner.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(manta_seg5_texture_05001FA0, "actors/manta/manta_gills.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(manta_seg5_texture_05002FA0, "actors/manta/manta_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(manta_seg5_texture_050037A0, "actors/manta/manta_fin_edge.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(metal_box_seg8_texture_08023998, "actors/metal_box/metal_box_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mips_seg6_texture_0600FB80, "actors/mips/mips_eyes.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mist_seg3_texture_03000080, "actors/mist/mist.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(moneybag_seg6_texture_060039B0, "actors/moneybag/moneybag_mouth.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(moneybag_seg6_texture_060049B0, "actors/moneybag/moneybag_eyes.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(monty_mole_seg5_texture_05000970, "actors/monty_mole/monty_mole_cheek.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(monty_mole_seg5_texture_05001170, "actors/monty_mole/monty_mole_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(monty_mole_seg5_texture_05001970, "actors/monty_mole/monty_mole_nose.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(monty_mole_seg5_texture_05002170, "actors/monty_mole/monty_mole_tooth.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(monty_mole_seg5_texture_05002970, "actors/monty_mole/monty_mole_claw.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(monty_mole_hole_seg5_texture_05000040, "actors/monty_mole_hole/monty_mole_hole.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(mr_i_eyeball_seg6_texture_06000080, "actors/mr_i_eyeball/mr_i_eyeball_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mr_i_eyeball_seg6_texture_06001080, "actors/mr_i_eyeball/mr_i_eyeball_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mr_i_iris_seg6_texture_06002170, "actors/mr_i_iris/mr_i_iris_open.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mr_i_iris_seg6_texture_06002970, "actors/mr_i_iris/mr_i_iris_mostly_open.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mr_i_iris_seg6_texture_06003170, "actors/mr_i_iris/mr_i_iris_mostly_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mr_i_iris_seg6_texture_06003970, "actors/mr_i_iris/mr_i_iris_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mushroom_1up_seg3_texture_03029628, "actors/mushroom_1up/1-up_mushroom.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(peach_seg5_texture_05000A28, "actors/peach/peach_eye_open.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(peach_seg5_texture_05001228, "actors/peach/peach_eye_mostly_open.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(peach_seg5_texture_05001A28, "actors/peach/peach_eye_mostly_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(peach_seg5_texture_05002228, "actors/peach/peach_eye_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(peach_seg5_texture_05002A28, "actors/peach/peach_crown_jewel.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(peach_seg5_texture_05002C28, "actors/peach/peach_chest_jewel.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(peach_seg5_texture_05002E28, "actors/peach/peach_lips_scrunched.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(peach_seg5_texture_05003628, "actors/peach/peach_lips.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(peach_seg5_texture_05003E28, "actors/peach/peach_nostril.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(peach_seg5_texture_05004028, "actors/peach/peach_dress.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(pebble_seg3_texture_0301C300, "actors/pebble/pebble.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(penguin_seg5_texture_05002DE0, "actors/penguin/penguin_eye_open.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(penguin_seg5_texture_050035E0, "actors/penguin/penguin_eye_half_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(penguin_seg5_texture_05003DE0, "actors/penguin/penguin_eye_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(penguin_seg5_texture_050045E0, "actors/penguin/penguin_eye_angry.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(penguin_seg5_texture_05004DE0, "actors/penguin/penguin_eye_angry_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(penguin_seg5_texture_050055E0, "actors/penguin/penguin_beak.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(piranha_plant_seg6_texture_060113F8, "actors/piranha_plant/piranha_plant_tongue.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(piranha_plant_seg6_texture_060123F8, "actors/piranha_plant/piranha_plant_skin.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(piranha_plant_seg6_texture_06012BF8, "actors/piranha_plant/piranha_plant_stem.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(piranha_plant_seg6_texture_060133F8, "actors/piranha_plant/piranha_plant_bottom_lip.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(piranha_plant_seg6_texture_06013BF8, "actors/piranha_plant/piranha_plant_tooth.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(piranha_plant_seg6_texture_060143F8, "actors/piranha_plant/piranha_plant_leaf.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(pokey_seg5_texture_05011750, "actors/pokey/pokey_face.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(pokey_seg5_texture_05011F50, "actors/pokey/pokey_face_blink.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(pokey_seg5_texture_05012878, "actors/pokey/pokey_body.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(poundable_pole_seg6_texture_06001050, "actors/poundable_pole/poundable_pole_top.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(poundable_pole_seg6_texture_06001850, "actors/poundable_pole/poundable_pole_side.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_power_meter_left_side, "actors/power_meter/power_meter_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_power_meter_right_side, "actors/power_meter/power_meter_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_power_meter_full, "actors/power_meter/power_meter_full.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_power_meter_seven_segments, "actors/power_meter/power_meter_seven_segments.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_power_meter_six_segments, "actors/power_meter/power_meter_six_segments.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_power_meter_five_segments, "actors/power_meter/power_meter_five_segments.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_power_meter_four_segments, "actors/power_meter/power_meter_four_segments.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_power_meter_three_segments, "actors/power_meter/power_meter_three_segments.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_power_meter_two_segments, "actors/power_meter/power_meter_two_segments.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_power_meter_one_segments, "actors/power_meter/power_meter_one_segment.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(purple_switch_seg8_texture_0800C0A8, "actors/purple_switch/purple_switch_base.rgba16.png", 16, 4, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(purple_switch_seg8_texture_0800C128, "actors/purple_switch/purple_switch_exclamation_point.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sand_seg3_texture_0302BAD0, "actors/sand/sand_particle.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(scuttlebug_seg6_texture_06010108, "actors/scuttlebug/scuttlebug_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(scuttlebug_seg6_texture_06010908, "actors/scuttlebug/scuttlebug_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(scuttlebug_seg6_texture_06011908, "actors/scuttlebug/scuttlebug_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(scuttlebug_seg6_texture_06012908, "actors/scuttlebug/scuttlebug_iris.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(scuttlebug_seg6_texture_06013108, "actors/scuttlebug/scuttlebug_leg.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(seaweed_seg6_texture_06007E10, "actors/seaweed/seaweed_tip.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(seaweed_seg6_texture_06008610, "actors/seaweed/seaweed_upper_center.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(seaweed_seg6_texture_06008E10, "actors/seaweed/seaweed_lower_center.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(seaweed_seg6_texture_06009610, "actors/seaweed/seaweed_base.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(skeeter_seg6_texture_06000090, "actors/skeeter/skeeter_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(skeeter_seg6_texture_06000890, "actors/skeeter/skeeter_iris.rgba16.png", 16, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(smoke_seg5_texture_050072C0, "actors/smoke/smoke.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(snowman_seg5_texture_05008C70, "actors/snowman/mr_blizzard_mitten.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snowman_seg5_texture_05009470, "actors/snowman/mr_blizzard_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snowman_seg5_texture_0500A470, "actors/snowman/mr_blizzard_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snowman_seg5_texture_0500B470, "actors/snowman/mr_blizzard_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snowman_seg5_texture_0500BC70, "actors/snowman/mr_blizzard_mouth.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snufit_seg6_texture_060070E0, "actors/snufit/snufit_body.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snufit_seg6_texture_060078E0, "actors/snufit/snufit_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snufit_seg6_texture_060080E0, "actors/snufit/snufit_mask_strap.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snufit_seg6_texture_060084E0, "actors/snufit/snufit_mouth.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_seg4_texture_04027490, "actors/sparkle/sparkle_0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_seg4_texture_04027C90, "actors/sparkle/sparkle_1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_seg4_texture_04028490, "actors/sparkle/sparkle_2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_seg4_texture_04028C90, "actors/sparkle/sparkle_3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_seg4_texture_04029490, "actors/sparkle/sparkle_4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_seg4_texture_04029C90, "actors/sparkle/sparkle_5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_animation_seg4_texture_04032A88, "actors/sparkle_animation/sparkle_animation_0.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_animation_seg4_texture_04033288, "actors/sparkle_animation/sparkle_animation_1.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_animation_seg4_texture_04033A88, "actors/sparkle_animation/sparkle_animation_2.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_animation_seg4_texture_04034288, "actors/sparkle_animation/sparkle_animation_3.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(sparkles_animation_seg4_texture_04034A88, "actors/sparkle_animation/sparkle_animation_4.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(spindrift_seg5_texture_050006D0, "actors/spindrift/spindrift_face.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spindrift_seg5_texture_05000ED0, "actors/spindrift/spindrift_petal.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spindrift_seg5_texture_050016D0, "actors/spindrift/spindrift_leaf.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spindrift_seg5_texture_05001ED0, "actors/spindrift/spindrift_head.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(springboard_seg5_texture_05000018, "actors/springboard/springboard_top_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(springboard_seg5_texture_05000818, "actors/springboard/springboard_base_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(star_seg3_texture_0302A6F0, "actors/star/star_surface.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(star_seg3_texture_0302AEF0, "actors/star/star_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(stomp_smoke_seg4_texture_04022148, "actors/stomp_smoke/stomp_smoke_0.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(stomp_smoke_seg4_texture_04022948, "actors/stomp_smoke/stomp_smoke_1.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(stomp_smoke_seg4_texture_04023148, "actors/stomp_smoke/stomp_smoke_2.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(stomp_smoke_seg4_texture_04023948, "actors/stomp_smoke/stomp_smoke_3.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(stomp_smoke_seg4_texture_04024148, "actors/stomp_smoke/stomp_smoke_4.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(stomp_smoke_seg4_texture_04024948, "actors/stomp_smoke/stomp_smoke_5.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(sushi_seg5_texture_05008ED0, "actors/sushi/sushi_snout.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sushi_seg5_texture_050096D0, "actors/sushi/sushi_eye.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sushi_seg5_texture_05009AD0, "actors/sushi/sushi_tooth.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(swoop_seg6_texture_06004270, "actors/swoop/swoop_body.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(swoop_seg6_texture_06004A70, "actors/swoop/swoop_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(swoop_seg6_texture_06005270, "actors/swoop/swoop_nose.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(swoop_seg6_texture_06005A70, "actors/swoop/swoop_wing.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(thwomp_seg5_texture_05009900, "actors/thwomp/thwomp_face.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(thwomp_seg5_texture_0500A900, "actors/thwomp/thwomp_surface.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(toad_seg6_texture_06005920, "actors/toad/toad_face.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(toad_seg6_texture_06006120, "actors/toad/toad_head.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(tornado_seg5_texture_05013128, "actors/tornado/tornado.ia16.png", 32, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(treasure_chest_seg6_texture_06013FA8, "actors/treasure_chest/treasure_chest_lock.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(treasure_chest_seg6_texture_060147A8, "actors/treasure_chest/treasure_chest_side.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(treasure_chest_seg6_texture_06014FA8, "actors/treasure_chest/treasure_chest_lock_top.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(treasure_chest_seg6_texture_060157A8, "actors/treasure_chest/treasure_chest_front.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(tree_seg3_texture_0302DE28, "actors/tree/tree_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(tree_seg3_texture_0302EE28, "actors/tree/tree_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(tree_seg3_texture_0302FF60, "actors/tree/pine_tree.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(tree_seg3_texture_03031048, "actors/tree/snowy_pine_tree.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(tree_seg3_texture_03032218, "actors/tree/palm_tree.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ukiki_seg5_texture_05007BC0, "actors/ukiki/ukiki_face.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ukiki_seg5_texture_05008BC0, "actors/ukiki/ukiki_face_blink.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ukiki_seg5_texture_05009BC0, "actors/ukiki/ukiki_butt.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ukiki_seg5_texture_0500A3C0, "actors/ukiki/ukiki_fur.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(unagi_seg5_texture_0500AF20, "actors/unagi/unagi_body.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(unagi_seg5_texture_0500B720, "actors/unagi/unagi_eye.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(unagi_seg5_texture_0500B920, "actors/unagi/unagi_head_base.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(unagi_seg5_texture_0500C120, "actors/unagi/unagi_tooth.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(unagi_seg5_texture_0500C320, "actors/unagi/unagi_mouth.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(unagi_seg5_texture_0500C3A0, "actors/unagi/unagi_tail.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(smoke_seg4_texture_0401DEA0, "actors/walk_smoke/walk_smoke_0.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(smoke_seg4_texture_0401E6A0, "actors/walk_smoke/walk_smoke_1.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(smoke_seg4_texture_0401EEA0, "actors/walk_smoke/walk_smoke_2.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(smoke_seg4_texture_0401F6A0, "actors/walk_smoke/walk_smoke_3.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(smoke_seg4_texture_0401FEA0, "actors/walk_smoke/walk_smoke_4.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(smoke_seg4_texture_040206A0, "actors/walk_smoke/walk_smoke_5.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(smoke_seg4_texture_04020EA0, "actors/walk_smoke/walk_smoke_6.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(warp_pipe_seg3_texture_03007E40, "actors/warp_pipe/warp_pipe_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(warp_pipe_seg3_texture_03009168, "actors/warp_pipe/warp_pipe_top.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_bubble_seg5_texture_0500FE80, "actors/water_bubble/water_bubble.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_mine_seg6_texture_0600A4F8, "actors/water_mine/water_mine_left_side_unused.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_mine_seg6_texture_0600B4F8, "actors/water_mine/water_mine_right_side_unused.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_mine_seg6_texture_0600C4F8, "actors/water_mine/water_mine_spike_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_ring_seg6_texture_06012380, "actors/water_ring/water_ring.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_splash_seg4_texture_0402A5C8, "actors/water_splash/water_splash_0.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_splash_seg4_texture_0402B5C8, "actors/water_splash/water_splash_1.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_splash_seg4_texture_0402C5C8, "actors/water_splash/water_splash_2.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_splash_seg4_texture_0402D5C8, "actors/water_splash/water_splash_3.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_splash_seg4_texture_0402E5C8, "actors/water_splash/water_splash_4.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_splash_seg4_texture_0402F5C8, "actors/water_splash/water_splash_5.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_splash_seg4_texture_040305C8, "actors/water_splash/water_splash_6.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_splash_seg4_texture_040315C8, "actors/water_splash/water_splash_7.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_wave_seg4_texture_04025358, "actors/water_wave/water_wave_0.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(water_wave_seg4_texture_04025B58, "actors/water_wave/water_wave_1.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(water_wave_seg4_texture_04026358, "actors/water_wave/water_wave_2.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(water_wave_seg4_texture_04026B58, "actors/water_wave/water_wave_3.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(whirlpool_seg5_texture_05012848, "actors/whirlpool/whirlpool.ia16.png", 32, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(white_particle_texture, "actors/white_particle/snow_particle.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(white_particle_small_texture, "actors/white_particle_small/small_snow_particle.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(whomp_seg6_texture_0601C360, "actors/whomp/whomp_back.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(whomp_seg6_texture_0601D360, "actors/whomp/whomp_face.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(whomp_seg6_texture_0601E360, "actors/whomp/whomp_hand.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(whomp_seg6_texture_0601EB60, "actors/whomp/whomp_surface.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wiggler_seg5_texture_05005A30, "actors/wiggler/wiggler_segment_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wiggler_seg5_texture_05006A30, "actors/wiggler/wiggler_segment_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wiggler_seg5_texture_05007A30, "actors/wiggler/wiggler_eye.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wiggler_seg5_texture_05008230, "actors/wiggler/wiggler_flower.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wiggler_seg5_texture_05008A30, "actors/wiggler/wiggler_frown.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wiggler_seg5_texture_05009230, "actors/wiggler/wiggler_nose_left_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wiggler_seg5_texture_0500A230, "actors/wiggler/wiggler_nose_right_side.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wooden_signpost_seg3_texture_0302C9C8, "actors/wooden_signpost/wooden_signpost_back.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wooden_signpost_seg3_texture_0302D1C8, "actors/wooden_signpost/wooden_signpost_front.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yellow_sphere_seg6_texture_0601EB88, "actors/yellow_sphere/yellow_sphere.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yellow_sphere_seg5_texture_05000040, "actors/yellow_sphere_small/small_yellow_sphere.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_seg5_texture_0501C4A0, "actors/yoshi/yoshi_eye.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_seg5_texture_0501C6A0, "actors/yoshi/yoshi_eye_blink.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_seg5_texture_0501C8A0, "actors/yoshi/yoshi_nostril.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_egg_seg5_texture_050057B8, "actors/yoshi_egg/yoshi_egg_0_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_egg_seg5_texture_05005FB8, "actors/yoshi_egg/yoshi_egg_1_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_egg_seg5_texture_050067B8, "actors/yoshi_egg/yoshi_egg_2_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_egg_seg5_texture_05006FB8, "actors/yoshi_egg/yoshi_egg_3_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_egg_seg5_texture_050077B8, "actors/yoshi_egg/yoshi_egg_4_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_egg_seg5_texture_05007FB8, "actors/yoshi_egg/yoshi_egg_5_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_egg_seg5_texture_050087B8, "actors/yoshi_egg/yoshi_egg_6_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(yoshi_egg_seg5_texture_05008FB8, "actors/yoshi_egg/yoshi_egg_7_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09000000, "textures/cave/hmc_textures.00000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09001000, "textures/cave/hmc_textures.01000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09001800, "textures/cave/hmc_textures.01800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09002800, "textures/cave/hmc_textures.02800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09003000, "textures/cave/hmc_textures.03000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09003800, "textures/cave/hmc_textures.03800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09004800, "textures/cave/hmc_textures.04800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09005800, "textures/cave/hmc_textures.05800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09006800, "textures/cave/hmc_textures.06800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09007000, "textures/cave/hmc_textures.07000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09007800, "textures/cave/hmc_textures.07800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09008800, "textures/cave/hmc_textures.08800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_09009800, "textures/cave/hmc_textures.09800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_0900A000, "textures/cave/hmc_textures.0A000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_0900A800, "textures/cave/hmc_textures.0A800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cave_0900B800, "textures/cave/hmc_textures.0B800.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(cave_0900C000, "textures/cave/hmc_textures.0C000.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B000008, "textures/effect/flower.00008.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B000808, "textures/effect/flower.00808.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B001008, "textures/effect/flower.01008.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B001808, "textures/effect/flower.01808.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B002020, "textures/effect/lava_bubble.02020.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B002820, "textures/effect/lava_bubble.02820.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B003020, "textures/effect/lava_bubble.03020.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B003820, "textures/effect/lava_bubble.03820.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B004020, "textures/effect/lava_bubble.04020.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B004820, "textures/effect/lava_bubble.04820.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B005020, "textures/effect/lava_bubble.05020.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B005820, "textures/effect/lava_bubble.05820.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B006048, "textures/effect/bubble.06048.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B00684C, "textures/effect/tiny_bubble.0684C.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(effect_0B006AD8, "textures/effect/tiny_bubble.06AD8.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09000000, "textures/fire/lll_textures.00000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09000800, "textures/fire/lll_textures.00800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09001000, "textures/fire/lll_textures.01000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09001800, "textures/fire/lll_textures.01800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09002000, "textures/fire/lll_textures.02000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09002800, "textures/fire/lll_textures.02800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09003000, "textures/fire/lll_textures.03000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09003800, "textures/fire/lll_textures.03800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09004000, "textures/fire/lll_textures.04000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09004800, "textures/fire/lll_textures.04800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09005000, "textures/fire/lll_textures.05000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09005800, "textures/fire/lll_textures.05800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09006000, "textures/fire/lll_textures.06000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09006800, "textures/fire/lll_textures.06800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09007000, "textures/fire/lll_textures.07000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09007800, "textures/fire/lll_textures.07800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09008000, "textures/fire/lll_textures.08000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09008800, "textures/fire/lll_textures.08800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09009000, "textures/fire/lll_textures.09000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_09009800, "textures/fire/lll_textures.09800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_0900A000, "textures/fire/lll_textures.0A000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_0900A800, "textures/fire/lll_textures.0A800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_0900B000, "textures/fire/lll_textures.0B000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(fire_0900B800, "textures/fire/lll_textures.0B800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09000000, "textures/generic/bob_textures.00000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09000800, "textures/generic/bob_textures.00800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09001000, "textures/generic/bob_textures.01000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09001800, "textures/generic/bob_textures.01800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09002000, "textures/generic/bob_textures.02000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09002800, "textures/generic/bob_textures.02800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09003000, "textures/generic/bob_textures.03000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09003800, "textures/generic/bob_textures.03800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09004000, "textures/generic/bob_textures.04000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09004800, "textures/generic/bob_textures.04800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09005000, "textures/generic/bob_textures.05000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09005800, "textures/generic/bob_textures.05800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09006000, "textures/generic/bob_textures.06000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09007000, "textures/generic/bob_textures.07000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09007800, "textures/generic/bob_textures.07800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09008000, "textures/generic/bob_textures.08000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09008800, "textures/generic/bob_textures.08800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09009000, "textures/generic/bob_textures.09000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_09009800, "textures/generic/bob_textures.09800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_0900A000, "textures/generic/bob_textures.0A000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_0900A800, "textures/generic/bob_textures.0A800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(generic_0900B000, "textures/generic/bob_textures.0B000.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(grass_09000000, "textures/grass/wf_textures.00000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09000800, "textures/grass/wf_textures.00800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09001000, "textures/grass/wf_textures.01000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09001800, "textures/grass/wf_textures.01800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09002000, "textures/grass/wf_textures.02000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09002800, "textures/grass/wf_textures.02800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09003000, "textures/grass/wf_textures.03000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09003800, "textures/grass/wf_textures.03800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09004000, "textures/grass/wf_textures.04000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09004800, "textures/grass/wf_textures.04800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09005000, "textures/grass/wf_textures.05000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09005800, "textures/grass/wf_textures.05800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09006000, "textures/grass/wf_textures.06000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09006800, "textures/grass/wf_textures.06800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09007000, "textures/grass/wf_textures.07000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09007800, "textures/grass/wf_textures.07800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09008000, "textures/grass/wf_textures.08000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09008800, "textures/grass/wf_textures.08800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09009000, "textures/grass/wf_textures.09000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_09009800, "textures/grass/wf_textures.09800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_0900A000, "textures/grass/wf_textures.0A000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_0900A800, "textures/grass/wf_textures.0A800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(grass_0900B000, "textures/grass/wf_textures.0B000.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(grass_0900B800, "textures/grass/wf_textures.0B800.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(inside_09000000, "textures/inside/inside_castle_textures.00000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09001000, "textures/inside/inside_castle_textures.01000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09002000, "textures/inside/inside_castle_textures.02000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09003000, "textures/inside/inside_castle_textures.03000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09003800, "textures/inside/inside_castle_textures.03800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09004000, "textures/inside/inside_castle_textures.04000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09004800, "textures/inside/inside_castle_textures.04800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09005000, "textures/inside/inside_castle_textures.05000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09005800, "textures/inside/inside_castle_textures.05800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09006000, "textures/inside/inside_castle_textures.06000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09007000, "textures/inside/inside_castle_textures.07000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09008000, "textures/inside/inside_castle_textures.08000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09008800, "textures/inside/inside_castle_textures.08800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_09009000, "textures/inside/inside_castle_textures.09000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_0900A000, "textures/inside/inside_castle_textures.0A000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_0900B000, "textures/inside/inside_castle_textures.0B000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_0900B800, "textures/inside/inside_castle_textures.0B800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09000000, "textures/machine/ttc_textures.00000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09000800, "textures/machine/ttc_textures.00800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09001000, "textures/machine/ttc_textures.01000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09001800, "textures/machine/ttc_textures.01800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09002000, "textures/machine/ttc_textures.02000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09002800, "textures/machine/ttc_textures.02800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09003000, "textures/machine/ttc_textures.03000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09003800, "textures/machine/ttc_textures.03800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09004000, "textures/machine/ttc_textures.04000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09005000, "textures/machine/ttc_textures.05000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09005800, "textures/machine/ttc_textures.05800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09006000, "textures/machine/ttc_textures.06000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09006800, "textures/machine/ttc_textures.06800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09007000, "textures/machine/ttc_textures.07000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09007800, "textures/machine/ttc_textures.07800.rgba16.png", 16, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09008000, "textures/machine/ttc_textures.08000.rgba16.png", 64, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(machine_09008400, "textures/machine/ttc_textures.08400.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09000000, "textures/mountain/ttm_textures.00000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09000800, "textures/mountain/ttm_textures.00800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09001800, "textures/mountain/ttm_textures.01800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09002800, "textures/mountain/ttm_textures.02800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09003000, "textures/mountain/ttm_textures.03000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09003800, "textures/mountain/ttm_textures.03800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09004000, "textures/mountain/ttm_textures.04000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09004800, "textures/mountain/ttm_textures.04800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09005000, "textures/mountain/ttm_textures.05000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09005800, "textures/mountain/ttm_textures.05800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09006800, "textures/mountain/ttm_textures.06800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09007000, "textures/mountain/ttm_textures.07000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09007800, "textures/mountain/ttm_textures.07800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09008000, "textures/mountain/ttm_textures.08000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09008800, "textures/mountain/ttm_textures.08800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_09009800, "textures/mountain/ttm_textures.09800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_0900A000, "textures/mountain/ttm_textures.0A000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_0900A800, "textures/mountain/ttm_textures.0A800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_0900B000, "textures/mountain/ttm_textures.0B000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_0900B800, "textures/mountain/ttm_textures.0B800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mountain_0900C000, "textures/mountain/ttm_textures.0C000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09000000, "textures/outside/castle_grounds_textures.00000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09000800, "textures/outside/castle_grounds_textures.00800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09001000, "textures/outside/castle_grounds_textures.01000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09002000, "textures/outside/castle_grounds_textures.02000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09003000, "textures/outside/castle_grounds_textures.03000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09003800, "textures/outside/castle_grounds_textures.03800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09004000, "textures/outside/castle_grounds_textures.04000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09004800, "textures/outside/castle_grounds_textures.04800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09005800, "textures/outside/castle_grounds_textures.05800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09006000, "textures/outside/castle_grounds_textures.06000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09006800, "textures/outside/castle_grounds_textures.06800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09007800, "textures/outside/castle_grounds_textures.07800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09008000, "textures/outside/castle_grounds_textures.08000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09008800, "textures/outside/castle_grounds_textures.08800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09009000, "textures/outside/castle_grounds_textures.09000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_09009800, "textures/outside/castle_grounds_textures.09800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_0900A000, "textures/outside/castle_grounds_textures.0A000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_0900A800, "textures/outside/castle_grounds_textures.0A800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_0900B000, "textures/outside/castle_grounds_textures.0B000.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_0900B400, "textures/outside/castle_grounds_textures.0B400.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(outside_0900BC00, "textures/outside/castle_grounds_textures.0BC00.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_0, "textures/segment2/segment2.00000.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_1, "textures/segment2/segment2.00200.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_2, "textures/segment2/segment2.00400.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_3, "textures/segment2/segment2.00600.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_4, "textures/segment2/segment2.00800.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_5, "textures/segment2/segment2.00A00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_6, "textures/segment2/segment2.00C00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_7, "textures/segment2/segment2.00E00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_8, "textures/segment2/segment2.01000.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_9, "textures/segment2/segment2.01200.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_A, "textures/segment2/segment2.01400.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_B, "textures/segment2/segment2.01600.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_C, "textures/segment2/segment2.01800.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_D, "textures/segment2/segment2.01A00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_E, "textures/segment2/segment2.01C00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_F, "textures/segment2/segment2.01E00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_G, "textures/segment2/segment2.02000.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_H, "textures/segment2/segment2.02200.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_I, "textures/segment2/segment2.02400.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_J, "textures/segment2/custom_hud_j.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_K, "textures/segment2/segment2.02800.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_L, "textures/segment2/segment2.02A00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_M, "textures/segment2/segment2.02C00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_N, "textures/segment2/segment2.02E00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_O, "textures/segment2/segment2.03000.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_P, "textures/segment2/segment2.03200.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_Q, "textures/segment2/custom_hud_q.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_R, "textures/segment2/segment2.03600.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_S, "textures/segment2/segment2.03800.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_T, "textures/segment2/segment2.03A00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_U, "textures/segment2/segment2.03C00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_V, "textures/segment2/custom_hud_v.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_W, "textures/segment2/segment2.04000.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_X, "textures/segment2/custom_hud_x.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_Y, "textures/segment2/segment2.04400.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_Z, "textures/segment2/custom_hud_z.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_apostrophe, "textures/segment2/segment2.04800.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_double_quote, "textures/segment2/segment2.04A00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), // define_builtin_tex(texture_hud_char_umlaut, "textures/segment2/segment2.umlaut.rgba16.png"), - define_builtin_tex(texture_hud_char_exclamation, "textures/segment2/custom_hud_exclamation.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_hashtag, "textures/segment2/custom_hud_hastag.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_question, "textures/segment2/segment2.05000.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_ampersand, "textures/segment2/custom_hud_ampersand.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_percent, "textures/segment2/custom_hud_percent.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_slash, "textures/segment2/custom_hud_slash.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_multiply, "textures/segment2/segment2.05600.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_coin, "textures/segment2/segment2.05800.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_mario_head, "textures/segment2/segment2.05A00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_luigi_head, "textures/segment2/custom_luigi_head.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_toad_head, "textures/segment2/custom_toad_head.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_waluigi_head, "textures/segment2/custom_waluigi_head.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_wario_head, "textures/segment2/custom_wario_head.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_star, "textures/segment2/segment2.05C00.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_period, "textures/segment2/custom_hud_period.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_key, "textures/segment2/custom_hud_key.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_comma, "textures/segment2/custom_hud_comma.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_dash, "textures/segment2/custom_hud_dash.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_divide, "textures/segment2/custom_hud_divide.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_period, "textures/segment2/custom_hud_period.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_plus, "textures/segment2/custom_hud_plus.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_credits_char_3, "textures/segment2/segment2.06200.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_4, "textures/segment2/segment2.06280.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_6, "textures/segment2/segment2.06300.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_A, "textures/segment2/segment2.06380.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_B, "textures/segment2/segment2.06400.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_C, "textures/segment2/segment2.06480.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_D, "textures/segment2/segment2.06500.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_E, "textures/segment2/segment2.06580.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_F, "textures/segment2/segment2.06600.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_G, "textures/segment2/segment2.06680.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_H, "textures/segment2/segment2.06700.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_I, "textures/segment2/segment2.06780.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_J, "textures/segment2/segment2.06800.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_K, "textures/segment2/segment2.06880.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_L, "textures/segment2/segment2.06900.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_M, "textures/segment2/segment2.06980.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_N, "textures/segment2/segment2.06A00.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_O, "textures/segment2/segment2.06A80.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_P, "textures/segment2/segment2.06B00.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_Q, "textures/segment2/segment2.06B80.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_R, "textures/segment2/segment2.06C00.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_S, "textures/segment2/segment2.06C80.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_T, "textures/segment2/segment2.06D00.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_U, "textures/segment2/segment2.06D80.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_V, "textures/segment2/segment2.06E00.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_W, "textures/segment2/segment2.06E80.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_X, "textures/segment2/segment2.06F00.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_Y, "textures/segment2/segment2.06F80.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_Z, "textures/segment2/segment2.07000.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_credits_char_period, "textures/segment2/segment2.07080.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_hud_char_camera, "textures/segment2/segment2.07B50.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_lakitu, "textures/segment2/segment2.07D50.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_no_camera, "textures/segment2/segment2.07F50.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_hud_char_arrow_up, "textures/segment2/segment2.08150.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_hud_char_arrow_down, "textures/segment2/segment2.081D0.rgba16.png", 8, 8, 16), - define_builtin_tex(texture_shadow_quarter_circle, "textures/segment2/shadow_quarter_circle.ia8.png", 16, 16, 8), - define_builtin_tex(texture_shadow_quarter_square, "textures/segment2/shadow_quarter_square.ia8.png", 16, 16, 8), - define_builtin_tex(texture_shadow_spike_ext, "textures/segment2/shadow_spike_custom.ia8.png", 16, 16, 8), - define_builtin_tex(texture_transition_star_half, "textures/segment2/segment2.0F458.ia8.png", 32, 64, 16), - define_builtin_tex(texture_transition_circle_half, "textures/segment2/segment2.0FC58.ia8.png", 32, 64, 16), - define_builtin_tex(texture_transition_mario, "textures/segment2/segment2.10458.ia8.png", 64, 64, 16), - define_builtin_tex(texture_transition_bowser_half, "textures/segment2/segment2.11458.ia8.png", 32, 64, 16), - define_builtin_tex(texture_waterbox_water, "textures/segment2/segment2.11C58.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_waterbox_jrb_water, "textures/segment2/segment2.12458.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_waterbox_unknown_water, "textures/segment2/segment2.12C58.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_waterbox_mist, "textures/segment2/segment2.13458.ia16.png", 32, 32, 16), - define_builtin_tex(texture_waterbox_lava, "textures/segment2/segment2.13C58.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_ia8_up_arrow, "textures/segment2/segment2.14838.ia8.png", 8, 8, 8), - define_builtin_tex(sky_09000000, "textures/sky/rr_textures.00000.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09000800, "textures/sky/rr_textures.00800.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09001000, "textures/sky/rr_textures.01000.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09001800, "textures/sky/rr_textures.01800.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09002000, "textures/sky/rr_textures.02000.rgba16.png", 32, 64, 16), - define_builtin_tex(sky_09003000, "textures/sky/rr_textures.03000.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09003800, "textures/sky/rr_textures.03800.rgba16.png", 64, 32, 16), - define_builtin_tex(sky_09004800, "textures/sky/rr_textures.04800.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09005000, "textures/sky/rr_textures.05000.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09005800, "textures/sky/rr_textures.05800.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09006000, "textures/sky/rr_textures.06000.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_metal_hole, "textures/sky/metal_hole.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09007000, "textures/sky/rr_textures.07000.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09007800, "textures/sky/rr_textures.07800.rgba16.png", 32, 32, 16), - define_builtin_tex(sky_09008000, "textures/sky/rr_textures.08000.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09000000, "textures/snow/ccm_textures.00000.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09000800, "textures/snow/ccm_textures.00800.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09001000, "textures/snow/ccm_textures.01000.rgba16.png", 32, 64, 16), - define_builtin_tex(snow_09002000, "textures/snow/ccm_textures.02000.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09002800, "textures/snow/ccm_textures.02800.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09003000, "textures/snow/ccm_textures.03000.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09003800, "textures/snow/ccm_textures.03800.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09004000, "textures/snow/ccm_textures.04000.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09004800, "textures/snow/ccm_textures.04800.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09005000, "textures/snow/ccm_textures.05000.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09005800, "textures/snow/ccm_textures.05800.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09006000, "textures/snow/ccm_textures.06000.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09006800, "textures/snow/ccm_textures.06800.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09007000, "textures/snow/ccm_textures.07000.rgba16.png", 64, 32, 16), - define_builtin_tex(snow_09008000, "textures/snow/ccm_textures.08000.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09008800, "textures/snow/ccm_textures.08800.rgba16.png", 32, 32, 16), - define_builtin_tex(snow_09009000, "textures/snow/ccm_textures.09000.ia16.png", 32, 32, 16), - define_builtin_tex(snow_09009800, "textures/snow/ccm_textures.09800.ia16.png", 32, 32, 16), - define_builtin_tex(spooky_09000000, "textures/spooky/bbh_textures.00000.rgba16.png", 32, 32, 16), - define_builtin_tex(spooky_09000800, "textures/spooky/bbh_textures.00800.rgba16.png", 32, 64, 16), - define_builtin_tex(spooky_09001800, "textures/spooky/bbh_textures.01800.rgba16.png", 32, 64, 16), - define_builtin_tex(spooky_09002800, "textures/spooky/bbh_textures.02800.rgba16.png", 32, 64, 16), - define_builtin_tex(spooky_09003800, "textures/spooky/bbh_textures.03800.rgba16.png", 32, 64, 16), - define_builtin_tex(spooky_09004800, "textures/spooky/bbh_textures.04800.rgba16.png", 32, 32, 16), - define_builtin_tex(spooky_09005000, "textures/spooky/bbh_textures.05000.rgba16.png", 32, 64, 16), - define_builtin_tex(spooky_09006000, "textures/spooky/bbh_textures.06000.rgba16.png", 32, 32, 16), - define_builtin_tex(spooky_09006800, "textures/spooky/bbh_textures.06800.rgba16.png", 32, 32, 16), - define_builtin_tex(spooky_09007000, "textures/spooky/bbh_textures.07000.rgba16.png", 64, 32, 16), - define_builtin_tex(spooky_09008000, "textures/spooky/bbh_textures.08000.rgba16.png", 32, 32, 16), - define_builtin_tex(spooky_09008800, "textures/spooky/bbh_textures.08800.rgba16.png", 32, 32, 16), - define_builtin_tex(spooky_09009000, "textures/spooky/bbh_textures.09000.rgba16.png", 64, 32, 16), - define_builtin_tex(spooky_0900A000, "textures/spooky/bbh_textures.0A000.rgba16.png", 32, 32, 16), - define_builtin_tex(spooky_0900A800, "textures/spooky/bbh_textures.0A800.ia16.png", 32, 32, 16), - define_builtin_tex(spooky_0900B000, "textures/spooky/bbh_textures.0B000.ia16.png", 32, 32, 16), - define_builtin_tex(spooky_0900B800, "textures/spooky/bbh_textures.0B800.ia16.png", 32, 64, 16), - define_builtin_tex(title_texture_0A0001C0, "textures/title_screen_bg/title_screen_bg.001C0.rgba16.png", 80, 20, 16), - define_builtin_tex(title_texture_0A000E40, "textures/title_screen_bg/title_screen_bg.00E40.rgba16.png", 80, 20, 16), - define_builtin_tex(title_texture_0A001AC0, "textures/title_screen_bg/title_screen_bg.01AC0.rgba16.png", 80, 20, 16), - define_builtin_tex(title_texture_0A002740, "textures/title_screen_bg/title_screen_bg.02740.rgba16.png", 80, 20, 16), - define_builtin_tex(title_texture_0A0033C0, "textures/title_screen_bg/title_screen_bg.033C0.rgba16.png", 80, 20, 16), - define_builtin_tex(title_texture_0A004040, "textures/title_screen_bg/title_screen_bg.04040.rgba16.png", 80, 20, 16), - define_builtin_tex(title_texture_0A004CC0, "textures/title_screen_bg/title_screen_bg.04CC0.rgba16.png", 80, 20, 16), - define_builtin_tex(title_texture_0A005940, "textures/title_screen_bg/title_screen_bg.05940.rgba16.png", 80, 20, 16), - define_builtin_tex(water_09000000, "textures/water/jrb_textures.00000.rgba16.png", 32, 32, 16), - define_builtin_tex(water_09000800, "textures/water/jrb_textures.00800.rgba16.png", 64, 32, 16), - define_builtin_tex(water_09001800, "textures/water/jrb_textures.01800.rgba16.png", 64, 32, 16), - define_builtin_tex(water_09002800, "textures/water/jrb_textures.02800.rgba16.png", 64, 32, 16), - define_builtin_tex(water_09003800, "textures/water/jrb_textures.03800.rgba16.png", 64, 32, 16), - define_builtin_tex(water_09004800, "textures/water/jrb_textures.04800.rgba16.png", 64, 32, 16), - define_builtin_tex(water_09005800, "textures/water/jrb_textures.05800.rgba16.png", 32, 32, 16), - define_builtin_tex(water_09006000, "textures/water/jrb_textures.06000.rgba16.png", 32, 32, 16), - define_builtin_tex(water_09006800, "textures/water/jrb_textures.06800.rgba16.png", 64, 32, 16), - define_builtin_tex(water_09007800, "textures/water/jrb_textures.07800.rgba16.png", 64, 32, 16), - define_builtin_tex(water_09008800, "textures/water/jrb_textures.08800.rgba16.png", 32, 32, 16), - define_builtin_tex(water_09009000, "textures/water/jrb_textures.09000.rgba16.png", 64, 32, 16), - define_builtin_tex(water_0900A000, "textures/water/jrb_textures.0A000.rgba16.png", 32, 32, 16), - define_builtin_tex(water_0900A800, "textures/water/jrb_textures.0A800.rgba16.png", 64, 32, 16), - define_builtin_tex(water_0900B800, "textures/water/jrb_textures.0B800.rgba16.png", 64, 32, 16), - define_builtin_tex(bbh_seg7_texture_07000000, "levels/bbh/0.rgba16.png", 32, 64, 16), - define_builtin_tex(bbh_seg7_texture_07001000, "levels/bbh/1.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_seg7_texture_07001800, "levels/bbh/2.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_seg7_texture_07002000, "levels/bbh/3.rgba16.png", 32, 64, 16), - define_builtin_tex(bbh_seg7_texture_07003000, "levels/bbh/4.rgba16.png", 16, 32, 16), - define_builtin_tex(bbh_seg7_texture_07003400, "levels/bbh/5.rgba16.png", 32, 64, 16), - define_builtin_tex(bbh_seg7_texture_07004400, "levels/bbh/6.rgba16.png", 16, 32, 16), - define_builtin_tex(bitdw_seg7_texture_07000000, "levels/bitdw/0.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_seg7_texture_07000800, "levels/bitdw/1.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_seg7_texture_07001000, "levels/bitdw/2.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_seg7_texture_07001800, "levels/bitdw/3.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_seg7_texture_07000000, "levels/bitfs/0.rgba16.png", 32, 64, 16), - define_builtin_tex(bitfs_seg7_texture_07001000, "levels/bitfs/1.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_seg7_texture_07001800, "levels/bitfs/2.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_seg7_texture_07000000, "levels/bits/0.rgba16.png", 32, 64, 16), - define_builtin_tex(bits_seg7_texture_07001000, "levels/bits/1.rgba16.png", 64, 32, 16), - define_builtin_tex(bits_seg7_texture_07002000, "levels/bits/2.rgba16.png", 32, 32, 16), - define_builtin_tex(bob_seg7_texture_07000000, "levels/bob/0.rgba16.png", 32, 32, 16), - define_builtin_tex(bob_seg7_texture_07000800, "levels/bob/1.rgba16.png", 32, 32, 16), - define_builtin_tex(bob_seg7_texture_07001000, "levels/bob/2.rgba16.png", 32, 32, 16), - define_builtin_tex(bob_seg7_texture_07001800, "levels/bob/3.rgba16.png", 32, 32, 16), - define_builtin_tex(bob_seg7_texture_07002000, "levels/bob/4.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_1_seg7_texture_07000000, "levels/bowser_1/0.rgba16.png", 32, 64, 16), - define_builtin_tex(bowser_1_seg7_texture_07001000, "levels/bowser_1/1.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_1_seg7_texture_07001800, "levels/bowser_1/2.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_2_seg7_texture_07000000, "levels/bowser_2/0.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_3_seg7_texture_07000000, "levels/bowser_3/0.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_3_seg7_texture_07000800, "levels/bowser_3/1.rgba16.png", 32, 32, 16), - define_builtin_tex(bowser_3_seg7_texture_07001000, "levels/bowser_3/2.rgba16.png", 32, 64, 16), - define_builtin_tex(castle_grounds_seg7_texture_0700C9E8, "levels/castle_grounds/3.rgba16.png", 32, 64, 16), - define_builtin_tex(castle_grounds_seg7_texture_0700D9E8, "levels/castle_grounds/4.rgba16.png", 32, 64, 16), - define_builtin_tex(castle_grounds_seg7_texture_07000000, "levels/castle_grounds/0.rgba16.png", 32, 64, 16), - define_builtin_tex(castle_grounds_seg7_texture_07001000, "levels/castle_grounds/1.rgba16.png", 64, 32, 16), - define_builtin_tex(castle_grounds_seg7_texture_07002000, "levels/castle_grounds/2.rgba16.png", 64, 32, 16), - define_builtin_tex(texture_castle_light, "levels/castle_inside/castle_light.ia16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07000800, "levels/castle_inside/1.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07001000, "levels/castle_inside/2.ia16.png", 32, 64, 16), - define_builtin_tex(inside_castle_seg7_texture_07002000, "levels/castle_inside/3.rgba16.png", 32, 64, 16), - define_builtin_tex(inside_castle_seg7_texture_07003000, "levels/castle_inside/4.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07003800, "levels/castle_inside/5.rgba16.png", 32, 64, 16), - define_builtin_tex(inside_castle_seg7_texture_07004800, "levels/castle_inside/6.rgba16.png", 32, 64, 16), - define_builtin_tex(inside_castle_seg7_texture_07005800, "levels/castle_inside/7.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07006000, "levels/castle_inside/8.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07006800, "levels/castle_inside/9.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07007000, "levels/castle_inside/10.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07007800, "levels/castle_inside/11.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07008000, "levels/castle_inside/12.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07008800, "levels/castle_inside/13.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07009000, "levels/castle_inside/14.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07009800, "levels/castle_inside/15.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0700A000, "levels/castle_inside/16.ia16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0700A800, "levels/castle_inside/17.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0700B800, "levels/castle_inside/18.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0700C800, "levels/castle_inside/19.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0700D800, "levels/castle_inside/20.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0700E800, "levels/castle_inside/21.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0700F800, "levels/castle_inside/22.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07012800, "levels/castle_inside/25.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07013800, "levels/castle_inside/26.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07014800, "levels/castle_inside/27.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07015800, "levels/castle_inside/28.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07016800, "levels/castle_inside/29.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07017000, "levels/castle_inside/30.rgba16.png", 32, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07017800, "levels/castle_inside/31.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07018800, "levels/castle_inside/32.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07019800, "levels/castle_inside/33.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0701A800, "levels/castle_inside/34.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0701B800, "levels/castle_inside/35.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0701C800, "levels/castle_inside/36.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0701D800, "levels/castle_inside/37.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0701E800, "levels/castle_inside/38.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_0701F800, "levels/castle_inside/39.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07020800, "levels/castle_inside/40.rgba16.png", 64, 32, 16), - define_builtin_tex(ccm_seg7_texture_07011958, "levels/ccm/12.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_seg7_texture_07000000, "levels/ccm/0.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_seg7_texture_07000800, "levels/ccm/1.rgba16.png", 32, 4, 16), - define_builtin_tex(ccm_seg7_texture_07000900, "levels/ccm/2.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_seg7_texture_07001100, "levels/ccm/3.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_seg7_texture_07001900, "levels/ccm/4.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_seg7_texture_07002100, "levels/ccm/5.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_seg7_texture_07002900, "levels/ccm/6.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_seg7_texture_07003100, "levels/ccm/7.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_seg7_texture_07003900, "levels/ccm/8.ia16.png", 16, 16, 16), - define_builtin_tex(ccm_seg7_texture_07003B00, "levels/ccm/9.ia16.png", 32, 32, 16), - define_builtin_tex(ccm_seg7_texture_07004300, "levels/ccm/10.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_seg7_texture_07004B00, "levels/ccm/11.rgba16.png", 32, 32, 16), - define_builtin_tex(cotmc_seg7_texture_07000000, "levels/cotmc/0.rgba16.png", 64, 32, 16), - define_builtin_tex(cotmc_seg7_texture_07001000, "levels/cotmc/1.rgba16.png", 32, 32, 16), - define_builtin_tex(cotmc_seg7_texture_07001800, "levels/cotmc/2.rgba16.png", 32, 32, 16), - define_builtin_tex(cotmc_seg7_texture_07002000, "levels/cotmc/3.rgba16.png", 32, 32, 16), - define_builtin_tex(cotmc_seg7_texture_07002800, "levels/cotmc/4.rgba16.png", 64, 16, 16), - define_builtin_tex(ddd_seg7_texture_07000000, "levels/ddd/0.rgba16.png", 32, 64, 16), - define_builtin_tex(ddd_seg7_texture_07001000, "levels/ddd/1.rgba16.png", 32, 32, 16), - define_builtin_tex(ddd_seg7_texture_07001800, "levels/ddd/2.rgba16.png", 32, 32, 16), - define_builtin_tex(ddd_seg7_texture_07002000, "levels/ddd/3.rgba16.png", 64, 32, 16), - define_builtin_tex(ddd_seg7_texture_07003000, "levels/ddd/4.rgba16.png", 32, 32, 16), - define_builtin_tex(hmc_seg7_texture_07024CE0, "levels/hmc/7.rgba16.png", 32, 32, 16), - define_builtin_tex(hmc_seg7_texture_07000000, "levels/hmc/0.rgba16.png", 32, 64, 16), - define_builtin_tex(hmc_seg7_texture_07001000, "levels/hmc/1.rgba16.png", 32, 64, 16), - define_builtin_tex(hmc_seg7_texture_07002000, "levels/hmc/2.rgba16.png", 32, 64, 16), - define_builtin_tex(hmc_seg7_texture_07003000, "levels/hmc/3.rgba16.png", 32, 32, 16), - define_builtin_tex(hmc_seg7_texture_07003800, "levels/hmc/4.rgba16.png", 32, 32, 16), - define_builtin_tex(hmc_seg7_texture_07004000, "levels/hmc/5.rgba16.png", 32, 32, 16), - define_builtin_tex(hmc_seg7_texture_07004800, "levels/hmc/6.rgba16.png", 32, 64, 16), - define_builtin_tex(intro_seg7_texture_07007EA0, "levels/intro/0.rgba16.png", 32, 32, 16), - define_builtin_tex(intro_seg7_texture_070086A0, "levels/intro/1.rgba16.png", 32, 32, 16), - define_builtin_tex(jrb_seg7_texture_07000000, "levels/jrb/0.rgba16.png", 32, 32, 16), - define_builtin_tex(jrb_seg7_texture_07000800, "levels/jrb/1.rgba16.png", 64, 32, 16), - define_builtin_tex(jrb_seg7_texture_07001800, "levels/jrb/2.rgba16.png", 32, 32, 16), - define_builtin_tex(jrb_seg7_texture_07002000, "levels/jrb/3.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07000000, "levels/lll/0.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07000800, "levels/lll/1.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07001000, "levels/lll/2.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07001800, "levels/lll/3.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07002000, "levels/lll/4.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07002800, "levels/lll/5.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07003000, "levels/lll/6.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07003800, "levels/lll/7.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07004000, "levels/lll/8.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07004800, "levels/lll/9.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07005000, "levels/lll/10.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07005800, "levels/lll/11.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07006000, "levels/lll/12.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07006800, "levels/lll/13.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07007000, "levels/lll/14.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07007800, "levels/lll/15.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07008000, "levels/lll/16.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07008800, "levels/lll/17.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07009000, "levels/lll/18.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_07009800, "levels/lll/19.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700A000, "levels/lll/20.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700A800, "levels/lll/21.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700B000, "levels/lll/22.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700B800, "levels/lll/23.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700C000, "levels/lll/24.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700C800, "levels/lll/25.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700D000, "levels/lll/26.rgba16.png", 16, 16, 16), - define_builtin_tex(lll_seg7_texture_0700D200, "levels/lll/27.ia16.png", 16, 16, 16), - define_builtin_tex(lll_seg7_texture_0700D400, "levels/lll/28.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700DC00, "levels/lll/29.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700E400, "levels/lll/30.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700EC00, "levels/lll/31.rgba16.png", 32, 32, 16), - define_builtin_tex(lll_seg7_texture_0700F400, "levels/lll/32.rgba16.png", 64, 16, 16), - define_builtin_tex(texture_menu_stone, "levels/menu/main_menu_seg7.00018.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_menu_dark_stone, "levels/menu/main_menu_seg7.00818.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_menu_mario_save, "levels/menu/main_menu_seg7.01018.rgba16.png", 64, 32, 16), - define_builtin_tex(texture_menu_mario_new, "levels/menu/main_menu_seg7.02018.rgba16.png", 64, 32, 16), - define_builtin_tex(texture_menu_erase, "levels/menu/main_menu_seg7.03468.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_menu_copy, "levels/menu/main_menu_seg7.03C68.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_menu_file, "levels/menu/main_menu_seg7.04468.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_menu_score, "levels/menu/main_menu_seg7.04C68.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_menu_sound, "levels/menu/main_menu_seg7.05468.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_menu_idle_hand, "levels/menu/main_menu_seg7.06328.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_menu_grabbing_hand, "levels/menu/main_menu_seg7.06B28.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_menu_hud_char_katakana_hu, "levels/menu/main_menu_seg7.073D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_small_a, "levels/menu/main_menu_seg7.075D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_i, "levels/menu/main_menu_seg7.077D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_ru, "levels/menu/main_menu_seg7.079D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_se, "levels/menu/main_menu_seg7.07BD0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_re, "levels/menu/main_menu_seg7.07DD0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_ku, "levels/menu/main_menu_seg7.07FD0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_to, "levels/menu/main_menu_seg7.081D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_hiragana_wo, "levels/menu/main_menu_seg7.083D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_ko, "levels/menu/main_menu_seg7.085D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_kana_handakuten_pi, "levels/menu/main_menu_seg7.087D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_choonpu, "levels/menu/main_menu_seg7.089D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_hiragana_su, "levels/menu/main_menu_seg7.08BD0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_hiragana_ru, "levels/menu/main_menu_seg7.08DD0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_hiragana_ke, "levels/menu/main_menu_seg7.08FD0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_ma, "levels/menu/main_menu_seg7.091D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_ri, "levels/menu/main_menu_seg7.093D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_o, "levels/menu/main_menu_seg7.095D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_su, "levels/menu/main_menu_seg7.097D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_a, "levels/menu/main_menu_seg7.099D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_hiragana_mi, "levels/menu/main_menu_seg7.09BD0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_hira_dakuten_do, "levels/menu/main_menu_seg7.09DD0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_hiragana_no, "levels/menu/main_menu_seg7.09FD0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_question, "levels/menu/main_menu_seg7.0A1D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_sa, "levels/menu/main_menu_seg7.0A3D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_u, "levels/menu/main_menu_seg7.0A5D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_katakana_n, "levels/menu/main_menu_seg7.0A7D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_hud_char_kana_dakuten_do, "levels/menu/main_menu_seg7.0A9D0.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_menu_course_upper, "levels/menu/main_menu_seg7.0D1A8.rgba16.png", 64, 32, 16), - define_builtin_tex(texture_menu_course_lower, "levels/menu/main_menu_seg7.0E1A8.rgba16.png", 64, 32, 16), - define_builtin_tex(pss_seg7_texture_07000000, "levels/pss/0.rgba16.png", 32, 32, 16), - define_builtin_tex(pss_seg7_texture_07000800, "levels/pss/1.ia16.png", 32, 32, 16), - define_builtin_tex(pss_seg7_texture_07001000, "levels/pss/2.rgba16.png", 32, 32, 16), - define_builtin_tex(texture_quarter_flying_carpet, "levels/rr/quarter_flying_carpet.rgba16.png", 32, 32, 16), - define_builtin_tex(rr_seg7_texture_07000800, "levels/rr/1.rgba16.png", 64, 32, 16), - define_builtin_tex(rr_seg7_texture_07001800, "levels/rr/2.rgba16.png", 32, 32, 16), - define_builtin_tex(sl_seg7_texture_07000000, "levels/sl/0.rgba16.png", 32, 32, 16), - define_builtin_tex(sl_seg7_texture_07000800, "levels/sl/1.rgba16.png", 32, 32, 16), - define_builtin_tex(sl_seg7_texture_07001000, "levels/sl/2.rgba16.png", 32, 32, 16), - define_builtin_tex(sl_seg7_texture_07001800, "levels/sl/3.rgba16.png", 32, 32, 16), - define_builtin_tex(sl_seg7_texture_07002000, "levels/sl/4.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_quicksand, "levels/ssl/7.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_seg7_texture_07000000, "levels/ssl/0.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_seg7_texture_07000800, "levels/ssl/1.ia16.png", 32, 32, 16), - define_builtin_tex(ssl_pyramid_sand, "levels/ssl/2.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_seg7_texture_07001800, "levels/ssl/3.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_seg7_texture_07002000, "levels/ssl/4.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_seg7_texture_07002800, "levels/ssl/5.rgba16.png", 32, 64, 16), - define_builtin_tex(ssl_seg7_texture_07003800, "levels/ssl/6.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_seg7_texture_0700BFA8, "levels/ssl/8.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_seg7_texture_0700C7A8, "levels/ssl/9.rgba16.png", 32, 64, 16), - define_builtin_tex(ssl_seg7_texture_0700D7A8, "levels/ssl/10.rgba16.png", 32, 64, 16), - define_builtin_tex(ssl_seg7_texture_0700E7A8, "levels/ssl/11.rgba16.png", 32, 64, 16), - define_builtin_tex(thi_seg7_texture_07000000, "levels/thi/0.rgba16.png", 32, 32, 16), - define_builtin_tex(thi_seg7_texture_07000800, "levels/thi/1.rgba16.png", 32, 32, 16), - define_builtin_tex(totwc_seg7_texture_07000000, "levels/totwc/0.rgba16.png", 32, 64, 16), - define_builtin_tex(totwc_seg7_texture_07001000, "levels/totwc/1.rgba16.png", 32, 32, 16), - define_builtin_tex(totwc_seg7_texture_07001800, "levels/totwc/2.rgba16.png", 32, 32, 16), - define_builtin_tex(totwc_seg7_texture_07002000, "levels/totwc/3.ia16.png", 32, 32, 16), - define_builtin_tex(ttc_yellow_triangle, "levels/ttc/2.rgba16.png", 32, 32, 16), - define_builtin_tex(ttc_seg7_texture_07000000, "levels/ttc/0.rgba16.png", 32, 32, 16), - define_builtin_tex(ttc_seg7_texture_07000800, "levels/ttc/1.rgba16.png", 16, 64, 16), - define_builtin_tex(ttm_seg7_texture_0702AD30, "levels/ttm/8.rgba16.png", 32, 32, 16), - define_builtin_tex(ttm_seg7_texture_07000000, "levels/ttm/0.ia16.png", 32, 32, 16), - define_builtin_tex(ttm_seg7_texture_07000800, "levels/ttm/1.rgba16.png", 32, 32, 16), - define_builtin_tex(ttm_seg7_texture_07001000, "levels/ttm/2.rgba16.png", 32, 32, 16), - define_builtin_tex(ttm_seg7_texture_07001800, "levels/ttm/3.rgba16.png", 32, 32, 16), - define_builtin_tex(ttm_seg7_texture_07002000, "levels/ttm/4.rgba16.png", 32, 32, 16), - define_builtin_tex(ttm_seg7_texture_07002800, "levels/ttm/5.rgba16.png", 32, 32, 16), - define_builtin_tex(ttm_seg7_texture_07003000, "levels/ttm/6.rgba16.png", 64, 32, 16), - define_builtin_tex(ttm_seg7_texture_07004000, "levels/ttm/7.rgba16.png", 64, 32, 16), - define_builtin_tex(vcutm_seg7_texture_07000000, "levels/vcutm/0.rgba16.png", 32, 32, 16), - define_builtin_tex(vcutm_seg7_texture_07000800, "levels/vcutm/1.rgba16.png", 64, 32, 16), - define_builtin_tex(vcutm_seg7_texture_07001800, "levels/vcutm/2.rgba16.png", 32, 64, 16), - define_builtin_tex(vcutm_seg7_texture_07002800, "levels/vcutm/3.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_seg7_texture_07000000, "levels/wdw/0.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_seg7_texture_07000800, "levels/wdw/1.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_seg7_texture_07001000, "levels/wdw/2.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_seg7_texture_07001800, "levels/wdw/3.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_seg7_texture_07002000, "levels/wdw/4.rgba16.png", 32, 32, 16), - define_builtin_tex(wf_seg7_texture_07000000, "levels/wf/0.rgba16.png", 32, 32, 16), - define_builtin_tex(wf_seg7_texture_07000800, "levels/wf/1.rgba16.png", 32, 32, 16), - define_builtin_tex(wf_seg7_texture_07001000, "levels/wf/2.rgba16.png", 32, 32, 16), - define_builtin_tex(wf_seg7_texture_07001800, "levels/wf/3.rgba16.png", 32, 32, 16), - define_builtin_tex(wf_seg7_texture_07002000, "levels/wf/4.rgba16.png", 32, 32, 16), - define_builtin_tex(wf_seg7_texture_07002800, "levels/wf/5.ia8.png", 16, 16, 8), - define_builtin_tex(wmotr_seg7_texture_07000000, "levels/wmotr/0.rgba16.png", 32, 32, 16), - define_builtin_tex(wmotr_seg7_texture_07000800, "levels/wmotr/1.rgba16.png", 32, 16, 16), - define_builtin_tex(wmotr_seg7_texture_07000C00, "levels/wmotr/2.rgba16.png", 32, 32, 16), - define_builtin_tex(wmotr_seg7_texture_07001400, "levels/wmotr/3.rgba16.png", 32, 8, 16), - define_builtin_tex(wmotr_seg7_texture_07001600, "levels/wmotr/4.rgba16.png", 8, 32, 16), - define_builtin_tex(mario_texture_metal_shade, "actors/mario/custom_mario_metal_shade.rgba16.png", 64, 32, 16), - define_builtin_tex(mario_texture_metal_light, "actors/mario/custom_mario_metal_light.rgba16.png", 64, 32, 16), - define_builtin_tex(mario_texture_yellow_button, "actors/mario/mario_overalls_button.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_m_logo, "actors/mario/custom_mario_logo.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_m_blend, "actors/mario/custom_mario_logo_blend.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_m_cap, "actors/mario/custom_mario_cap.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_hair_sideburn, "actors/mario/custom_mario_sideburn.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_add_sideburn, "actors/mario/custom_mario_sideburn_add.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_skin_sideburn, "actors/mario/custom_mario_skin.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_mustache, "actors/mario/mario_mustache.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_eyes_front, "actors/mario/mario_eyes_center.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_eyes_half_closed, "actors/mario/mario_eyes_half_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_eyes_closed, "actors/mario/mario_eyes_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_eyes_right, "actors/mario/mario_eyes_left_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_eyes_left, "actors/mario/mario_eyes_right_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_eyes_up, "actors/mario/mario_eyes_up_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_eyes_down, "actors/mario/mario_eyes_down_unused.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_eyes_dead, "actors/mario/mario_eyes_dead.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_texture_wings_half_1, "actors/mario/mario_wing.rgba16.png", 32, 64, 16), - define_builtin_tex(mario_texture_wings_half_2, "actors/mario/mario_wing_tip.rgba16.png", 32, 64, 16), - define_builtin_tex(mario_texture_metal_wings_half_1_shade, "actors/mario/custom_mario_metal_wing_shade.rgba16.png", 32, 64, 16), - define_builtin_tex(mario_texture_metal_wings_half_1_light, "actors/mario/custom_mario_metal_wing_light.rgba16.png", 32, 64, 16), - define_builtin_tex(mario_texture_metal_wings_half_2_shade, "actors/mario/custom_mario_metal_wing_tip_shade.rgba16.png", 32, 64, 16), - define_builtin_tex(mario_texture_metal_wings_half_2_light, "actors/mario/custom_mario_metal_wing_tip_light.rgba16.png", 32, 64, 16), - define_builtin_tex(mario_cap_seg3_texture_0301CF50, "actors/mario_cap/mario_cap_metal.rgba16.png", 64, 32, 16), - define_builtin_tex(mario_cap_seg3_texture_0301DF50, "actors/mario_cap/mario_cap_logo.rgba16.png", 32, 32, 16), - define_builtin_tex(mario_cap_seg3_texture_0301E750, "actors/mario_cap/mario_cap_wing.rgba16.png", 32, 64, 16), - define_builtin_tex(mario_cap_seg3_texture_0301F750, "actors/mario_cap/mario_cap_wing_tip.rgba16.png", 32, 64, 16), - define_builtin_tex(mario_cap_seg3_texture_03020750, "actors/mario_cap/mario_cap_metal_wing_unused.rgba16.png", 32, 64, 16), - define_builtin_tex(mario_cap_seg3_texture_03021750, "actors/mario_cap/mario_cap_metal_wing_tip_unused.rgba16.png", 32, 64, 16), - define_builtin_tex(impact_smoke_seg6_texture_0605AA28, "actors/impact_smoke/impact_smoke_0.ia16.png", 64, 64, 16), - define_builtin_tex(impact_smoke_seg6_texture_0605CA28, "actors/impact_smoke/impact_smoke_1.ia16.png", 64, 64, 16), - define_builtin_tex(impact_smoke_seg6_texture_0605EA28, "actors/impact_smoke/impact_smoke_2.ia16.png", 64, 64, 16), - define_builtin_tex(impact_smoke_seg6_texture_06060A28, "actors/impact_smoke/impact_smoke_3.ia16.png", 64, 64, 16), - define_builtin_tex(luigi_texture_l_logo, "actors/luigi/custom_luigi_logo.rgba16.png", 32, 32, 16), - define_builtin_tex(luigi_texture_l_blend, "actors/luigi/custom_luigi_logo_blend.rgba16.png", 32, 32, 16), - define_builtin_tex(luigi_texture_l_cap, "actors/luigi/custom_luigi_cap.rgba16.png", 32, 32, 16), - define_builtin_tex(luigi_texture_hair_sideburn, "actors/luigi/custom_luigi_sideburn.rgba16.png", 32, 32, 16), - define_builtin_tex(luigi_texture_add_sideburn, "actors/luigi/custom_luigi_sideburn_add.rgba16.png", 32, 32, 16), - define_builtin_tex(luigi_texture_skin_sideburn, "actors/luigi/custom_luigi_skin.rgba16.png", 32, 32, 16), - define_builtin_tex(luigi_texture_mustache, "actors/luigi/custom_luigi_mustache.rgba16.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_cap, "actors/toad_player/custom_toad_cap.ia16.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_spots, "actors/toad_player/custom_toad_spots.ia16.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_hair, "actors/toad_player/custom_toad_hair.ia16.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_face_neutral, "actors/toad_player/custom_toad_face_neutral.rgba32.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_face_dead, "actors/toad_player/custom_toad_face_dead.rgba32.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_eyes_front, "actors/toad_player/custom_toad_eyes_center.rgba32.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_eyes_half_closed, "actors/toad_player/custom_toad_eyes_half_closed.rgba32.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_eyes_closed, "actors/toad_player/custom_toad_eyes_closed.rgba32.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_eyes_right, "actors/toad_player/custom_toad_eyes_left.rgba32.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_eyes_left, "actors/toad_player/custom_toad_eyes_right.rgba32.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_eyes_up, "actors/toad_player/custom_toad_eyes_up.rgba32.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_eyes_down, "actors/toad_player/custom_toad_eyes_down.rgba32.png", 32, 32, 16), - define_builtin_tex(toad_player_texture_eyes_dead, "actors/toad_player/custom_toad_eyes_dead.rgba32.png", 32, 32, 16), - define_builtin_tex(wario_texture_white_button, "actors/wario/custom_wario_overalls_button.rgba16.png", 32, 32, 16), - define_builtin_tex(wario_texture_w_logo, "actors/wario/custom_wario_logo.rgba16.png", 32, 32, 16), - define_builtin_tex(wario_texture_w_blend, "actors/wario/custom_wario_logo_blend.rgba16.png", 32, 32, 16), - define_builtin_tex(wario_texture_w_cap, "actors/wario/custom_wario_cap.rgba16.png", 32, 32, 16), - define_builtin_tex(wario_texture_hair_sideburn, "actors/wario/custom_wario_sideburn.rgba16.png", 32, 32, 16), - define_builtin_tex(wario_texture_add_sideburn, "actors/wario/custom_wario_sideburn_add.rgba16.png", 32, 32, 16), - define_builtin_tex(wario_texture_skin_sideburn, "actors/wario/custom_wario_skin.rgba16.png", 32, 32, 16), - define_builtin_tex(wario_texture_mouth, "actors/wario/custom_wario_mouth.rgba16.png", 64, 32, 16), - define_builtin_tex(wario_texture_mouth_dead, "actors/wario/custom_wario_mouth_dead.rgba16.png", 64, 32, 16), - define_builtin_tex(wario_texture_eyes_front, "actors/wario/custom_wario_eyes_center.rgba16.png", 64, 32, 16), - define_builtin_tex(wario_texture_eyes_half_closed, "actors/wario/custom_wario_eyes_half_closed.rgba16.png", 64, 32, 16), - define_builtin_tex(wario_texture_eyes_closed, "actors/wario/custom_wario_eyes_closed.rgba16.png", 64, 32, 16), - define_builtin_tex(wario_texture_eyes_right, "actors/wario/custom_wario_eyes_left_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(wario_texture_eyes_left, "actors/wario/custom_wario_eyes_right_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(wario_texture_eyes_up, "actors/wario/custom_wario_eyes_up_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(wario_texture_eyes_down, "actors/wario/custom_wario_eyes_down_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(wario_texture_eyes_dead, "actors/wario/custom_wario_eyes_dead.rgba16.png", 64, 32, 16), - define_builtin_tex(waluigi_texture_r_logo, "actors/waluigi/custom_waluigi_logo.rgba16.png", 32, 32, 16), - define_builtin_tex(waluigi_texture_r_blend, "actors/waluigi/custom_waluigi_logo_blend.rgba16.png", 32, 32, 16), - define_builtin_tex(waluigi_texture_r_cap, "actors/waluigi/custom_waluigi_cap.rgba16.png", 32, 32, 16), - define_builtin_tex(waluigi_texture_hair_sideburn, "actors/waluigi/custom_waluigi_sideburn.rgba16.png", 32, 32, 16), - define_builtin_tex(waluigi_texture_add_sideburn, "actors/waluigi/custom_waluigi_sideburn_add.rgba16.png", 32, 32, 16), - define_builtin_tex(waluigi_texture_skin_sideburn, "actors/waluigi/custom_waluigi_skin.rgba16.png", 32, 32, 16), - define_builtin_tex(waluigi_texture_mouth, "actors/waluigi/custom_waluigi_mouth.rgba16.png", 64, 32, 16), - define_builtin_tex(waluigi_texture_mouth_dead, "actors/waluigi/custom_waluigi_mouth_dead.rgba16.png", 64, 32, 16), - define_builtin_tex(waluigi_texture_eyes_front, "actors/waluigi/custom_waluigi_eyes_center.rgba16.png", 64, 32, 16), - define_builtin_tex(waluigi_texture_eyes_half_closed, "actors/waluigi/custom_waluigi_eyes_half_closed.rgba16.png", 64, 32, 16), - define_builtin_tex(waluigi_texture_eyes_closed, "actors/waluigi/custom_waluigi_eyes_closed.rgba16.png", 64, 32, 16), - define_builtin_tex(waluigi_texture_eyes_right, "actors/waluigi/custom_waluigi_eyes_left_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(waluigi_texture_eyes_left, "actors/waluigi/custom_waluigi_eyes_right_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(waluigi_texture_eyes_up, "actors/waluigi/custom_waluigi_eyes_up_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(waluigi_texture_eyes_down, "actors/waluigi/custom_waluigi_eyes_down_unused.rgba16.png", 64, 32, 16), - define_builtin_tex(waluigi_texture_eyes_dead, "actors/waluigi/custom_waluigi_eyes_dead.rgba16.png", 64, 32, 16), + define_builtin_tex(texture_hud_char_exclamation, "textures/segment2/custom_hud_exclamation.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_hashtag, "textures/segment2/custom_hud_hastag.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_question, "textures/segment2/segment2.05000.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_ampersand, "textures/segment2/custom_hud_ampersand.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_percent, "textures/segment2/custom_hud_percent.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_slash, "textures/segment2/custom_hud_slash.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_multiply, "textures/segment2/segment2.05600.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_coin, "textures/segment2/segment2.05800.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_mario_head, "textures/segment2/segment2.05A00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_luigi_head, "textures/segment2/custom_luigi_head.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_toad_head, "textures/segment2/custom_toad_head.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_waluigi_head, "textures/segment2/custom_waluigi_head.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_wario_head, "textures/segment2/custom_wario_head.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_star, "textures/segment2/segment2.05C00.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_period, "textures/segment2/custom_hud_period.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_key, "textures/segment2/custom_hud_key.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_comma, "textures/segment2/custom_hud_comma.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_dash, "textures/segment2/custom_hud_dash.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_divide, "textures/segment2/custom_hud_divide.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_period, "textures/segment2/custom_hud_period.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_plus, "textures/segment2/custom_hud_plus.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_3, "textures/segment2/segment2.06200.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_4, "textures/segment2/segment2.06280.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_6, "textures/segment2/segment2.06300.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_A, "textures/segment2/segment2.06380.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_B, "textures/segment2/segment2.06400.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_C, "textures/segment2/segment2.06480.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_D, "textures/segment2/segment2.06500.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_E, "textures/segment2/segment2.06580.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_F, "textures/segment2/segment2.06600.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_G, "textures/segment2/segment2.06680.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_H, "textures/segment2/segment2.06700.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_I, "textures/segment2/segment2.06780.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_J, "textures/segment2/segment2.06800.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_K, "textures/segment2/segment2.06880.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_L, "textures/segment2/segment2.06900.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_M, "textures/segment2/segment2.06980.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_N, "textures/segment2/segment2.06A00.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_O, "textures/segment2/segment2.06A80.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_P, "textures/segment2/segment2.06B00.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_Q, "textures/segment2/segment2.06B80.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_R, "textures/segment2/segment2.06C00.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_S, "textures/segment2/segment2.06C80.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_T, "textures/segment2/segment2.06D00.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_U, "textures/segment2/segment2.06D80.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_V, "textures/segment2/segment2.06E00.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_W, "textures/segment2/segment2.06E80.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_X, "textures/segment2/segment2.06F00.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_Y, "textures/segment2/segment2.06F80.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_Z, "textures/segment2/segment2.07000.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_credits_char_period, "textures/segment2/segment2.07080.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_camera, "textures/segment2/segment2.07B50.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_lakitu, "textures/segment2/segment2.07D50.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_no_camera, "textures/segment2/segment2.07F50.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_arrow_up, "textures/segment2/segment2.08150.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_hud_char_arrow_down, "textures/segment2/segment2.081D0.rgba16.png", 8, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_shadow_quarter_circle, "textures/segment2/shadow_quarter_circle.ia8.png", 16, 16, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_shadow_quarter_square, "textures/segment2/shadow_quarter_square.ia8.png", 16, 16, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_shadow_spike_ext, "textures/segment2/shadow_spike_custom.ia8.png", 16, 16, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_transition_star_half, "textures/segment2/segment2.0F458.ia8.png", 32, 64, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_transition_circle_half, "textures/segment2/segment2.0FC58.ia8.png", 32, 64, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_transition_mario, "textures/segment2/segment2.10458.ia8.png", 64, 64, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_transition_bowser_half, "textures/segment2/segment2.11458.ia8.png", 32, 64, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_waterbox_water, "textures/segment2/segment2.11C58.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_waterbox_jrb_water, "textures/segment2/segment2.12458.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_waterbox_unknown_water, "textures/segment2/segment2.12C58.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_waterbox_mist, "textures/segment2/segment2.13458.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(texture_waterbox_lava, "textures/segment2/segment2.13C58.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_ia8_up_arrow, "textures/segment2/segment2.14838.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(sky_09000000, "textures/sky/rr_textures.00000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09000800, "textures/sky/rr_textures.00800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09001000, "textures/sky/rr_textures.01000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09001800, "textures/sky/rr_textures.01800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09002000, "textures/sky/rr_textures.02000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09003000, "textures/sky/rr_textures.03000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09003800, "textures/sky/rr_textures.03800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09004800, "textures/sky/rr_textures.04800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09005000, "textures/sky/rr_textures.05000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09005800, "textures/sky/rr_textures.05800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09006000, "textures/sky/rr_textures.06000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_metal_hole, "textures/sky/metal_hole.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09007000, "textures/sky/rr_textures.07000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09007800, "textures/sky/rr_textures.07800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sky_09008000, "textures/sky/rr_textures.08000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09000000, "textures/snow/ccm_textures.00000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09000800, "textures/snow/ccm_textures.00800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09001000, "textures/snow/ccm_textures.01000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09002000, "textures/snow/ccm_textures.02000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09002800, "textures/snow/ccm_textures.02800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09003000, "textures/snow/ccm_textures.03000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09003800, "textures/snow/ccm_textures.03800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09004000, "textures/snow/ccm_textures.04000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09004800, "textures/snow/ccm_textures.04800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09005000, "textures/snow/ccm_textures.05000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09005800, "textures/snow/ccm_textures.05800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09006000, "textures/snow/ccm_textures.06000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09006800, "textures/snow/ccm_textures.06800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09007000, "textures/snow/ccm_textures.07000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09008000, "textures/snow/ccm_textures.08000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09008800, "textures/snow/ccm_textures.08800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(snow_09009000, "textures/snow/ccm_textures.09000.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(snow_09009800, "textures/snow/ccm_textures.09800.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09000000, "textures/spooky/bbh_textures.00000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09000800, "textures/spooky/bbh_textures.00800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09001800, "textures/spooky/bbh_textures.01800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09002800, "textures/spooky/bbh_textures.02800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09003800, "textures/spooky/bbh_textures.03800.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09004800, "textures/spooky/bbh_textures.04800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09005000, "textures/spooky/bbh_textures.05000.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09006000, "textures/spooky/bbh_textures.06000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09006800, "textures/spooky/bbh_textures.06800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09007000, "textures/spooky/bbh_textures.07000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09008000, "textures/spooky/bbh_textures.08000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09008800, "textures/spooky/bbh_textures.08800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_09009000, "textures/spooky/bbh_textures.09000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_0900A000, "textures/spooky/bbh_textures.0A000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(spooky_0900A800, "textures/spooky/bbh_textures.0A800.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(spooky_0900B000, "textures/spooky/bbh_textures.0B000.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(spooky_0900B800, "textures/spooky/bbh_textures.0B800.ia16.png", 32, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(title_texture_0A0001C0, "textures/title_screen_bg/title_screen_bg.001C0.rgba16.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(title_texture_0A000E40, "textures/title_screen_bg/title_screen_bg.00E40.rgba16.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(title_texture_0A001AC0, "textures/title_screen_bg/title_screen_bg.01AC0.rgba16.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(title_texture_0A002740, "textures/title_screen_bg/title_screen_bg.02740.rgba16.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(title_texture_0A0033C0, "textures/title_screen_bg/title_screen_bg.033C0.rgba16.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(title_texture_0A004040, "textures/title_screen_bg/title_screen_bg.04040.rgba16.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(title_texture_0A004CC0, "textures/title_screen_bg/title_screen_bg.04CC0.rgba16.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(title_texture_0A005940, "textures/title_screen_bg/title_screen_bg.05940.rgba16.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09000000, "textures/water/jrb_textures.00000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09000800, "textures/water/jrb_textures.00800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09001800, "textures/water/jrb_textures.01800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09002800, "textures/water/jrb_textures.02800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09003800, "textures/water/jrb_textures.03800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09004800, "textures/water/jrb_textures.04800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09005800, "textures/water/jrb_textures.05800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09006000, "textures/water/jrb_textures.06000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09006800, "textures/water/jrb_textures.06800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09007800, "textures/water/jrb_textures.07800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09008800, "textures/water/jrb_textures.08800.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_09009000, "textures/water/jrb_textures.09000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_0900A000, "textures/water/jrb_textures.0A000.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_0900A800, "textures/water/jrb_textures.0A800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_0900B800, "textures/water/jrb_textures.0B800.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_seg7_texture_07000000, "levels/bbh/0.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_seg7_texture_07001000, "levels/bbh/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_seg7_texture_07001800, "levels/bbh/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_seg7_texture_07002000, "levels/bbh/3.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_seg7_texture_07003000, "levels/bbh/4.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_seg7_texture_07003400, "levels/bbh/5.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_seg7_texture_07004400, "levels/bbh/6.rgba16.png", 16, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_seg7_texture_07000000, "levels/bitdw/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_seg7_texture_07000800, "levels/bitdw/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_seg7_texture_07001000, "levels/bitdw/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_seg7_texture_07001800, "levels/bitdw/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_seg7_texture_07000000, "levels/bitfs/0.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_seg7_texture_07001000, "levels/bitfs/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_seg7_texture_07001800, "levels/bitfs/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_seg7_texture_07000000, "levels/bits/0.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_seg7_texture_07001000, "levels/bits/1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_seg7_texture_07002000, "levels/bits/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bob_seg7_texture_07000000, "levels/bob/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bob_seg7_texture_07000800, "levels/bob/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bob_seg7_texture_07001000, "levels/bob/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bob_seg7_texture_07001800, "levels/bob/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bob_seg7_texture_07002000, "levels/bob/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_1_seg7_texture_07000000, "levels/bowser_1/0.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_1_seg7_texture_07001000, "levels/bowser_1/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_1_seg7_texture_07001800, "levels/bowser_1/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_2_seg7_texture_07000000, "levels/bowser_2/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_3_seg7_texture_07000000, "levels/bowser_3/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_3_seg7_texture_07000800, "levels/bowser_3/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bowser_3_seg7_texture_07001000, "levels/bowser_3/2.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(castle_grounds_seg7_texture_0700C9E8, "levels/castle_grounds/3.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(castle_grounds_seg7_texture_0700D9E8, "levels/castle_grounds/4.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(castle_grounds_seg7_texture_07000000, "levels/castle_grounds/0.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(castle_grounds_seg7_texture_07001000, "levels/castle_grounds/1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(castle_grounds_seg7_texture_07002000, "levels/castle_grounds/2.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_castle_light, "levels/castle_inside/castle_light.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07000800, "levels/castle_inside/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07001000, "levels/castle_inside/2.ia16.png", 32, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07002000, "levels/castle_inside/3.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07003000, "levels/castle_inside/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07003800, "levels/castle_inside/5.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07004800, "levels/castle_inside/6.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07005800, "levels/castle_inside/7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07006000, "levels/castle_inside/8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07006800, "levels/castle_inside/9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07007000, "levels/castle_inside/10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07007800, "levels/castle_inside/11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07008000, "levels/castle_inside/12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07008800, "levels/castle_inside/13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07009000, "levels/castle_inside/14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07009800, "levels/castle_inside/15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0700A000, "levels/castle_inside/16.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0700A800, "levels/castle_inside/17.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0700B800, "levels/castle_inside/18.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0700C800, "levels/castle_inside/19.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0700D800, "levels/castle_inside/20.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0700E800, "levels/castle_inside/21.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0700F800, "levels/castle_inside/22.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07012800, "levels/castle_inside/25.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07013800, "levels/castle_inside/26.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07014800, "levels/castle_inside/27.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07015800, "levels/castle_inside/28.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07016800, "levels/castle_inside/29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07017000, "levels/castle_inside/30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07017800, "levels/castle_inside/31.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07018800, "levels/castle_inside/32.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07019800, "levels/castle_inside/33.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0701A800, "levels/castle_inside/34.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0701B800, "levels/castle_inside/35.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0701C800, "levels/castle_inside/36.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0701D800, "levels/castle_inside/37.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0701E800, "levels/castle_inside/38.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_0701F800, "levels/castle_inside/39.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07020800, "levels/castle_inside/40.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07011958, "levels/ccm/12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07000000, "levels/ccm/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07000800, "levels/ccm/1.rgba16.png", 32, 4, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07000900, "levels/ccm/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07001100, "levels/ccm/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07001900, "levels/ccm/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07002100, "levels/ccm/5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07002900, "levels/ccm/6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07003100, "levels/ccm/7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07003900, "levels/ccm/8.ia16.png", 16, 16, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07003B00, "levels/ccm/9.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07004300, "levels/ccm/10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_seg7_texture_07004B00, "levels/ccm/11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cotmc_seg7_texture_07000000, "levels/cotmc/0.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cotmc_seg7_texture_07001000, "levels/cotmc/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cotmc_seg7_texture_07001800, "levels/cotmc/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cotmc_seg7_texture_07002000, "levels/cotmc/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cotmc_seg7_texture_07002800, "levels/cotmc/4.rgba16.png", 64, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ddd_seg7_texture_07000000, "levels/ddd/0.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ddd_seg7_texture_07001000, "levels/ddd/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ddd_seg7_texture_07001800, "levels/ddd/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ddd_seg7_texture_07002000, "levels/ddd/3.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ddd_seg7_texture_07003000, "levels/ddd/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hmc_seg7_texture_07024CE0, "levels/hmc/7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hmc_seg7_texture_07000000, "levels/hmc/0.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hmc_seg7_texture_07001000, "levels/hmc/1.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hmc_seg7_texture_07002000, "levels/hmc/2.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hmc_seg7_texture_07003000, "levels/hmc/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hmc_seg7_texture_07003800, "levels/hmc/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hmc_seg7_texture_07004000, "levels/hmc/5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(hmc_seg7_texture_07004800, "levels/hmc/6.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(intro_seg7_texture_07007EA0, "levels/intro/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(intro_seg7_texture_070086A0, "levels/intro/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(jrb_seg7_texture_07000000, "levels/jrb/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(jrb_seg7_texture_07000800, "levels/jrb/1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(jrb_seg7_texture_07001800, "levels/jrb/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(jrb_seg7_texture_07002000, "levels/jrb/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07000000, "levels/lll/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07000800, "levels/lll/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07001000, "levels/lll/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07001800, "levels/lll/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07002000, "levels/lll/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07002800, "levels/lll/5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07003000, "levels/lll/6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07003800, "levels/lll/7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07004000, "levels/lll/8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07004800, "levels/lll/9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07005000, "levels/lll/10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07005800, "levels/lll/11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07006000, "levels/lll/12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07006800, "levels/lll/13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07007000, "levels/lll/14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07007800, "levels/lll/15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07008000, "levels/lll/16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07008800, "levels/lll/17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07009000, "levels/lll/18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_07009800, "levels/lll/19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700A000, "levels/lll/20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700A800, "levels/lll/21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700B000, "levels/lll/22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700B800, "levels/lll/23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700C000, "levels/lll/24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700C800, "levels/lll/25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700D000, "levels/lll/26.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700D200, "levels/lll/27.ia16.png", 16, 16, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700D400, "levels/lll/28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700DC00, "levels/lll/29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700E400, "levels/lll/30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700EC00, "levels/lll/31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(lll_seg7_texture_0700F400, "levels/lll/32.rgba16.png", 64, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_stone, "levels/menu/main_menu_seg7.00018.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_dark_stone, "levels/menu/main_menu_seg7.00818.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_mario_save, "levels/menu/main_menu_seg7.01018.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_mario_new, "levels/menu/main_menu_seg7.02018.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_erase, "levels/menu/main_menu_seg7.03468.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_copy, "levels/menu/main_menu_seg7.03C68.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_file, "levels/menu/main_menu_seg7.04468.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_score, "levels/menu/main_menu_seg7.04C68.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_sound, "levels/menu/main_menu_seg7.05468.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_idle_hand, "levels/menu/main_menu_seg7.06328.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_grabbing_hand, "levels/menu/main_menu_seg7.06B28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_hu, "levels/menu/main_menu_seg7.073D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_small_a, "levels/menu/main_menu_seg7.075D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_i, "levels/menu/main_menu_seg7.077D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_ru, "levels/menu/main_menu_seg7.079D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_se, "levels/menu/main_menu_seg7.07BD0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_re, "levels/menu/main_menu_seg7.07DD0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_ku, "levels/menu/main_menu_seg7.07FD0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_to, "levels/menu/main_menu_seg7.081D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_hiragana_wo, "levels/menu/main_menu_seg7.083D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_ko, "levels/menu/main_menu_seg7.085D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_kana_handakuten_pi, "levels/menu/main_menu_seg7.087D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_choonpu, "levels/menu/main_menu_seg7.089D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_hiragana_su, "levels/menu/main_menu_seg7.08BD0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_hiragana_ru, "levels/menu/main_menu_seg7.08DD0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_hiragana_ke, "levels/menu/main_menu_seg7.08FD0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_ma, "levels/menu/main_menu_seg7.091D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_ri, "levels/menu/main_menu_seg7.093D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_o, "levels/menu/main_menu_seg7.095D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_su, "levels/menu/main_menu_seg7.097D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_a, "levels/menu/main_menu_seg7.099D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_hiragana_mi, "levels/menu/main_menu_seg7.09BD0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_hira_dakuten_do, "levels/menu/main_menu_seg7.09DD0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_hiragana_no, "levels/menu/main_menu_seg7.09FD0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_question, "levels/menu/main_menu_seg7.0A1D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_sa, "levels/menu/main_menu_seg7.0A3D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_u, "levels/menu/main_menu_seg7.0A5D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_katakana_n, "levels/menu/main_menu_seg7.0A7D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_hud_char_kana_dakuten_do, "levels/menu/main_menu_seg7.0A9D0.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_course_upper, "levels/menu/main_menu_seg7.0D1A8.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_menu_course_lower, "levels/menu/main_menu_seg7.0E1A8.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(pss_seg7_texture_07000000, "levels/pss/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(pss_seg7_texture_07000800, "levels/pss/1.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(pss_seg7_texture_07001000, "levels/pss/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_quarter_flying_carpet, "levels/rr/quarter_flying_carpet.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(rr_seg7_texture_07000800, "levels/rr/1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(rr_seg7_texture_07001800, "levels/rr/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sl_seg7_texture_07000000, "levels/sl/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sl_seg7_texture_07000800, "levels/sl/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sl_seg7_texture_07001000, "levels/sl/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sl_seg7_texture_07001800, "levels/sl/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(sl_seg7_texture_07002000, "levels/sl/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_quicksand, "levels/ssl/7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_seg7_texture_07000000, "levels/ssl/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_seg7_texture_07000800, "levels/ssl/1.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(ssl_pyramid_sand, "levels/ssl/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_seg7_texture_07001800, "levels/ssl/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_seg7_texture_07002000, "levels/ssl/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_seg7_texture_07002800, "levels/ssl/5.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_seg7_texture_07003800, "levels/ssl/6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_seg7_texture_0700BFA8, "levels/ssl/8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_seg7_texture_0700C7A8, "levels/ssl/9.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_seg7_texture_0700D7A8, "levels/ssl/10.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_seg7_texture_0700E7A8, "levels/ssl/11.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(thi_seg7_texture_07000000, "levels/thi/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(thi_seg7_texture_07000800, "levels/thi/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(totwc_seg7_texture_07000000, "levels/totwc/0.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(totwc_seg7_texture_07001000, "levels/totwc/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(totwc_seg7_texture_07001800, "levels/totwc/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(totwc_seg7_texture_07002000, "levels/totwc/3.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(ttc_yellow_triangle, "levels/ttc/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ttc_seg7_texture_07000000, "levels/ttc/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ttc_seg7_texture_07000800, "levels/ttc/1.rgba16.png", 16, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ttm_seg7_texture_0702AD30, "levels/ttm/8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ttm_seg7_texture_07000000, "levels/ttm/0.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(ttm_seg7_texture_07000800, "levels/ttm/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ttm_seg7_texture_07001000, "levels/ttm/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ttm_seg7_texture_07001800, "levels/ttm/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ttm_seg7_texture_07002000, "levels/ttm/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ttm_seg7_texture_07002800, "levels/ttm/5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ttm_seg7_texture_07003000, "levels/ttm/6.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ttm_seg7_texture_07004000, "levels/ttm/7.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(vcutm_seg7_texture_07000000, "levels/vcutm/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(vcutm_seg7_texture_07000800, "levels/vcutm/1.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(vcutm_seg7_texture_07001800, "levels/vcutm/2.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(vcutm_seg7_texture_07002800, "levels/vcutm/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_seg7_texture_07000000, "levels/wdw/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_seg7_texture_07000800, "levels/wdw/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_seg7_texture_07001000, "levels/wdw/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_seg7_texture_07001800, "levels/wdw/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_seg7_texture_07002000, "levels/wdw/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wf_seg7_texture_07000000, "levels/wf/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wf_seg7_texture_07000800, "levels/wf/1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wf_seg7_texture_07001000, "levels/wf/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wf_seg7_texture_07001800, "levels/wf/3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wf_seg7_texture_07002000, "levels/wf/4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wf_seg7_texture_07002800, "levels/wf/5.ia8.png", 16, 16, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(wmotr_seg7_texture_07000000, "levels/wmotr/0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wmotr_seg7_texture_07000800, "levels/wmotr/1.rgba16.png", 32, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wmotr_seg7_texture_07000C00, "levels/wmotr/2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wmotr_seg7_texture_07001400, "levels/wmotr/3.rgba16.png", 32, 8, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wmotr_seg7_texture_07001600, "levels/wmotr/4.rgba16.png", 8, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_metal_shade, "actors/mario/custom_mario_metal_shade.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_metal_light, "actors/mario/custom_mario_metal_light.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_yellow_button, "actors/mario/mario_overalls_button.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_m_logo, "actors/mario/custom_mario_logo.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_m_blend, "actors/mario/custom_mario_logo_blend.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_m_cap, "actors/mario/custom_mario_cap.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_hair_sideburn, "actors/mario/custom_mario_sideburn.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_add_sideburn, "actors/mario/custom_mario_sideburn_add.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_skin_sideburn, "actors/mario/custom_mario_skin.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_mustache, "actors/mario/mario_mustache.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_eyes_front, "actors/mario/mario_eyes_center.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_eyes_half_closed, "actors/mario/mario_eyes_half_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_eyes_closed, "actors/mario/mario_eyes_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_eyes_right, "actors/mario/mario_eyes_left_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_eyes_left, "actors/mario/mario_eyes_right_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_eyes_up, "actors/mario/mario_eyes_up_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_eyes_down, "actors/mario/mario_eyes_down_unused.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_eyes_dead, "actors/mario/mario_eyes_dead.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_wings_half_1, "actors/mario/mario_wing.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_wings_half_2, "actors/mario/mario_wing_tip.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_metal_wings_half_1_shade, "actors/mario/custom_mario_metal_wing_shade.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_metal_wings_half_1_light, "actors/mario/custom_mario_metal_wing_light.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_metal_wings_half_2_shade, "actors/mario/custom_mario_metal_wing_tip_shade.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_texture_metal_wings_half_2_light, "actors/mario/custom_mario_metal_wing_tip_light.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_cap_seg3_texture_0301CF50, "actors/mario_cap/mario_cap_metal.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_cap_seg3_texture_0301DF50, "actors/mario_cap/mario_cap_logo.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_cap_seg3_texture_0301E750, "actors/mario_cap/mario_cap_wing.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_cap_seg3_texture_0301F750, "actors/mario_cap/mario_cap_wing_tip.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_cap_seg3_texture_03020750, "actors/mario_cap/mario_cap_metal_wing_unused.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(mario_cap_seg3_texture_03021750, "actors/mario_cap/mario_cap_metal_wing_tip_unused.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(impact_smoke_seg6_texture_0605AA28, "actors/impact_smoke/impact_smoke_0.ia16.png", 64, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(impact_smoke_seg6_texture_0605CA28, "actors/impact_smoke/impact_smoke_1.ia16.png", 64, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(impact_smoke_seg6_texture_0605EA28, "actors/impact_smoke/impact_smoke_2.ia16.png", 64, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(impact_smoke_seg6_texture_06060A28, "actors/impact_smoke/impact_smoke_3.ia16.png", 64, 64, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(luigi_texture_l_logo, "actors/luigi/custom_luigi_logo.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(luigi_texture_l_blend, "actors/luigi/custom_luigi_logo_blend.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(luigi_texture_l_cap, "actors/luigi/custom_luigi_cap.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(luigi_texture_hair_sideburn, "actors/luigi/custom_luigi_sideburn.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(luigi_texture_add_sideburn, "actors/luigi/custom_luigi_sideburn_add.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(luigi_texture_skin_sideburn, "actors/luigi/custom_luigi_skin.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(luigi_texture_mustache, "actors/luigi/custom_luigi_mustache.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(toad_player_texture_cap, "actors/toad_player/custom_toad_cap.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(toad_player_texture_spots, "actors/toad_player/custom_toad_spots.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(toad_player_texture_hair, "actors/toad_player/custom_toad_hair.ia16.png", 32, 32, G_IM_FMT_IA, G_IM_SIZ_16b), + define_builtin_tex(toad_player_texture_face_neutral, "actors/toad_player/custom_toad_face_neutral.rgba32.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(toad_player_texture_face_dead, "actors/toad_player/custom_toad_face_dead.rgba32.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(toad_player_texture_eyes_front, "actors/toad_player/custom_toad_eyes_center.rgba32.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(toad_player_texture_eyes_half_closed, "actors/toad_player/custom_toad_eyes_half_closed.rgba32.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(toad_player_texture_eyes_closed, "actors/toad_player/custom_toad_eyes_closed.rgba32.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(toad_player_texture_eyes_right, "actors/toad_player/custom_toad_eyes_left.rgba32.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(toad_player_texture_eyes_left, "actors/toad_player/custom_toad_eyes_right.rgba32.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(toad_player_texture_eyes_up, "actors/toad_player/custom_toad_eyes_up.rgba32.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(toad_player_texture_eyes_down, "actors/toad_player/custom_toad_eyes_down.rgba32.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(toad_player_texture_eyes_dead, "actors/toad_player/custom_toad_eyes_dead.rgba32.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(wario_texture_white_button, "actors/wario/custom_wario_overalls_button.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_w_logo, "actors/wario/custom_wario_logo.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_w_blend, "actors/wario/custom_wario_logo_blend.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_w_cap, "actors/wario/custom_wario_cap.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_hair_sideburn, "actors/wario/custom_wario_sideburn.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_add_sideburn, "actors/wario/custom_wario_sideburn_add.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_skin_sideburn, "actors/wario/custom_wario_skin.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_mouth, "actors/wario/custom_wario_mouth.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_mouth_dead, "actors/wario/custom_wario_mouth_dead.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_eyes_front, "actors/wario/custom_wario_eyes_center.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_eyes_half_closed, "actors/wario/custom_wario_eyes_half_closed.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_eyes_closed, "actors/wario/custom_wario_eyes_closed.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_eyes_right, "actors/wario/custom_wario_eyes_left_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_eyes_left, "actors/wario/custom_wario_eyes_right_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_eyes_up, "actors/wario/custom_wario_eyes_up_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_eyes_down, "actors/wario/custom_wario_eyes_down_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wario_texture_eyes_dead, "actors/wario/custom_wario_eyes_dead.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_r_logo, "actors/waluigi/custom_waluigi_logo.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_r_blend, "actors/waluigi/custom_waluigi_logo_blend.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_r_cap, "actors/waluigi/custom_waluigi_cap.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_hair_sideburn, "actors/waluigi/custom_waluigi_sideburn.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_add_sideburn, "actors/waluigi/custom_waluigi_sideburn_add.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_skin_sideburn, "actors/waluigi/custom_waluigi_skin.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_mouth, "actors/waluigi/custom_waluigi_mouth.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_mouth_dead, "actors/waluigi/custom_waluigi_mouth_dead.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_eyes_front, "actors/waluigi/custom_waluigi_eyes_center.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_eyes_half_closed, "actors/waluigi/custom_waluigi_eyes_half_closed.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_eyes_closed, "actors/waluigi/custom_waluigi_eyes_closed.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_eyes_right, "actors/waluigi/custom_waluigi_eyes_left_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_eyes_left, "actors/waluigi/custom_waluigi_eyes_right_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_eyes_up, "actors/waluigi/custom_waluigi_eyes_up_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_eyes_down, "actors/waluigi/custom_waluigi_eyes_down_unused.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(waluigi_texture_eyes_dead, "actors/waluigi/custom_waluigi_eyes_dead.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), // DJUI - define_builtin_tex(texture_font_normal, "textures/custom_font/custom_font_normal.rgba32.png", 256, 128, 32), - define_builtin_tex(texture_font_aliased, "textures/custom_font/custom_font_aliased.rgba32.png", 512, 256, 32), - define_builtin_tex(texture_font_title, "textures/custom_font/custom_font_title.rgba32.png", 1024, 512, 32), - define_builtin_tex(texture_font_hud, "textures/custom_font/custom_font_hud.rgba32.png", 512, 512, 32), - define_builtin_tex(texture_font_hud_recolor, "textures/custom_font/custom_font_hud_recolor.rgba32.png", 512, 512, 32), - define_builtin_tex(texture_font_special, "textures/custom_font/custom_font_special.rgba32.png", 512, 512, 32), - define_builtin_tex(texture_font_jp, "textures/custom_font/custom_font_jp.rgba32.png", 512, 1024, 32), - define_builtin_tex(texture_font_jp_aliased, "textures/custom_font/custom_font_jp_aliased.rgba32.png", 1024, 2048, 32), + define_builtin_tex(texture_font_normal, "textures/custom_font/custom_font_normal.rgba32.png", 256, 128, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(texture_font_aliased, "textures/custom_font/custom_font_aliased.rgba32.png", 512, 256, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(texture_font_title, "textures/custom_font/custom_font_title.rgba32.png", 1024, 512, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(texture_font_hud, "textures/custom_font/custom_font_hud.rgba32.png", 512, 512, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(texture_font_hud_recolor, "textures/custom_font/custom_font_hud_recolor.rgba32.png", 512, 512, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(texture_font_special, "textures/custom_font/custom_font_special.rgba32.png", 512, 512, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(texture_font_jp, "textures/custom_font/custom_font_jp.rgba32.png", 512, 1024, G_IM_FMT_RGBA, G_IM_SIZ_32b), + define_builtin_tex(texture_font_jp_aliased, "textures/custom_font/custom_font_jp_aliased.rgba32.png", 1024, 2048, G_IM_FMT_RGBA, G_IM_SIZ_32b), // Logo - define_builtin_tex(texture_selectionbox_back_icon, "textures/segment2/custom_selectionbox_back_icon.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_selectionbox_forward_icon, "textures/segment2/custom_selectionbox_forward_icon.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_coopdx_logo, "textures/segment2/custom_coopdx_logo.rgba32.png", 2048, 1024, 32), + define_builtin_tex(texture_selectionbox_back_icon, "textures/segment2/custom_selectionbox_back_icon.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_selectionbox_forward_icon, "textures/segment2/custom_selectionbox_forward_icon.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_coopdx_logo, "textures/segment2/custom_coopdx_logo.rgba32.png", 2048, 1024, G_IM_FMT_RGBA, G_IM_SIZ_32b), // Playerlist Exclusives - define_builtin_tex(texture_ping_empty, "textures/segment2/custom_ping_empty.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_ping_one, "textures/segment2/custom_ping_one.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_ping_two, "textures/segment2/custom_ping_two.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_ping_three, "textures/segment2/custom_ping_three.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_ping_four, "textures/segment2/custom_ping_four.rgba16.png", 16, 16, 16), - define_builtin_tex(texture_ping_full, "textures/segment2/custom_ping_full.rgba16.png", 16, 16, 16), + define_builtin_tex(texture_ping_empty, "textures/segment2/custom_ping_empty.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_ping_one, "textures/segment2/custom_ping_one.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_ping_two, "textures/segment2/custom_ping_two.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_ping_three, "textures/segment2/custom_ping_three.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_ping_four, "textures/segment2/custom_ping_four.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(texture_ping_full, "textures/segment2/custom_ping_full.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), // Goddard - define_builtin_tex(gd_texture_hand_open, "textures/intro_raw/hand_open.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_hand_closed, "textures/intro_raw/hand_closed.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_red_star_0, "textures/intro_raw/red_star_0.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_red_star_1, "textures/intro_raw/red_star_1.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_red_star_2, "textures/intro_raw/red_star_2.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_red_star_3, "textures/intro_raw/red_star_3.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_red_star_4, "textures/intro_raw/red_star_4.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_red_star_5, "textures/intro_raw/red_star_5.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_red_star_6, "textures/intro_raw/red_star_6.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_red_star_7, "textures/intro_raw/red_star_7.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_white_star_0, "textures/intro_raw/white_star_0.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_white_star_1, "textures/intro_raw/white_star_1.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_white_star_2, "textures/intro_raw/white_star_2.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_white_star_3, "textures/intro_raw/white_star_3.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_white_star_4, "textures/intro_raw/white_star_4.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_white_star_5, "textures/intro_raw/white_star_5.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_white_star_6, "textures/intro_raw/white_star_6.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_white_star_7, "textures/intro_raw/white_star_7.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_sparkle_0, "textures/intro_raw/sparkle_0.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_sparkle_1, "textures/intro_raw/sparkle_1.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_sparkle_2, "textures/intro_raw/sparkle_2.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_sparkle_3, "textures/intro_raw/sparkle_3.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_sparkle_4, "textures/intro_raw/sparkle_4.rgba16.png", 32, 32, 16), - define_builtin_tex(gd_texture_sparkle_5, "textures/intro_raw/sparkle_5.rgba16.png", 32, 32, 16), + define_builtin_tex(gd_texture_hand_open, "textures/intro_raw/hand_open.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_hand_closed, "textures/intro_raw/hand_closed.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_red_star_0, "textures/intro_raw/red_star_0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_red_star_1, "textures/intro_raw/red_star_1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_red_star_2, "textures/intro_raw/red_star_2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_red_star_3, "textures/intro_raw/red_star_3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_red_star_4, "textures/intro_raw/red_star_4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_red_star_5, "textures/intro_raw/red_star_5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_red_star_6, "textures/intro_raw/red_star_6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_red_star_7, "textures/intro_raw/red_star_7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_white_star_0, "textures/intro_raw/white_star_0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_white_star_1, "textures/intro_raw/white_star_1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_white_star_2, "textures/intro_raw/white_star_2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_white_star_3, "textures/intro_raw/white_star_3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_white_star_4, "textures/intro_raw/white_star_4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_white_star_5, "textures/intro_raw/white_star_5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_white_star_6, "textures/intro_raw/white_star_6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_white_star_7, "textures/intro_raw/white_star_7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_sparkle_0, "textures/intro_raw/sparkle_0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_sparkle_1, "textures/intro_raw/sparkle_1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_sparkle_2, "textures/intro_raw/sparkle_2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_sparkle_3, "textures/intro_raw/sparkle_3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_sparkle_4, "textures/intro_raw/sparkle_4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(gd_texture_sparkle_5, "textures/intro_raw/sparkle_5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), // Version Exclusives #if defined(VERSION_JP) @@ -1457,925 +1483,925 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { define_builtin_tex(texture_font_char_eu_Cedilla, "textures/segment2/font_graphics.06520.ia1.png", 16, 8, 16), define_builtin_tex(texture_font_char_eu_eszeet, "textures/segment2/font_graphics.06530.ia1.png", 16, 8, 16), - define_builtin_tex(cake_end_texture_eu_35, "levels/ending/eu_023000.rgba16.png", 64, 32, 16), - define_builtin_tex(cake_end_texture_eu_36, "levels/ending/eu_024000.rgba16.png", 64, 32, 16), - define_builtin_tex(cake_end_texture_eu_37, "levels/ending/eu_025000.rgba16.png", 64, 32, 16), - define_builtin_tex(cake_end_texture_eu_38, "levels/ending/eu_026000.rgba16.png", 64, 32, 16), - define_builtin_tex(cake_end_texture_eu_39, "levels/ending/eu_027000.rgba16.png", 64, 32, 16), - define_builtin_tex(cake_end_texture_eu_40, "levels/ending/eu_028000.rgba16.png", 64, 32, 16), + define_builtin_tex(cake_end_texture_eu_35, "levels/ending/eu_023000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_eu_36, "levels/ending/eu_024000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_eu_37, "levels/ending/eu_025000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_eu_38, "levels/ending/eu_026000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_eu_39, "levels/ending/eu_027000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_eu_40, "levels/ending/eu_028000.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), #else - define_builtin_tex(texture_font_char_us_0, "textures/segment2/font_graphics.05900.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_1, "textures/segment2/font_graphics.05940.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_2, "textures/segment2/font_graphics.05980.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_3, "textures/segment2/font_graphics.059C0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_4, "textures/segment2/font_graphics.05A00.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_5, "textures/segment2/font_graphics.05A40.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_6, "textures/segment2/font_graphics.05A80.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_7, "textures/segment2/font_graphics.05AC0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_8, "textures/segment2/font_graphics.05B00.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_9, "textures/segment2/font_graphics.05B40.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_A, "textures/segment2/font_graphics.05B80.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_B, "textures/segment2/font_graphics.05BC0.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_C, "textures/segment2/font_graphics.05C00.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_D, "textures/segment2/font_graphics.05C40.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_E, "textures/segment2/font_graphics.05C80.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_F, "textures/segment2/font_graphics.05CC0.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_G, "textures/segment2/font_graphics.05D00.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_H, "textures/segment2/font_graphics.05D40.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_I, "textures/segment2/font_graphics.05D80.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_J, "textures/segment2/font_graphics.05DC0.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_K, "textures/segment2/font_graphics.05E00.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_L, "textures/segment2/font_graphics.05E40.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_M, "textures/segment2/font_graphics.05E80.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_N, "textures/segment2/font_graphics.05EC0.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_O, "textures/segment2/font_graphics.05F00.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_P, "textures/segment2/font_graphics.05F40.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_Q, "textures/segment2/font_graphics.05F80.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_R, "textures/segment2/font_graphics.05FC0.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_S, "textures/segment2/font_graphics.06000.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_T, "textures/segment2/font_graphics.06040.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_U, "textures/segment2/font_graphics.06080.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_V, "textures/segment2/font_graphics.060C0.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_W, "textures/segment2/font_graphics.06100.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_X, "textures/segment2/font_graphics.06140.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_Y, "textures/segment2/font_graphics.06180.ia4.png", 16, 8, 16), - define_builtin_tex_(texture_font_char_us_Z, "textures/segment2/font_graphics.061C0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_a, "textures/segment2/font_graphics.06200.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_b, "textures/segment2/font_graphics.06240.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_c, "textures/segment2/font_graphics.06280.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_d, "textures/segment2/font_graphics.062C0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_e, "textures/segment2/font_graphics.06300.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_f, "textures/segment2/font_graphics.06340.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_g, "textures/segment2/font_graphics.06380.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_h, "textures/segment2/font_graphics.063C0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_i, "textures/segment2/font_graphics.06400.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_j, "textures/segment2/font_graphics.06440.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_k, "textures/segment2/font_graphics.06480.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_l, "textures/segment2/font_graphics.064C0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_m, "textures/segment2/font_graphics.06500.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_n, "textures/segment2/font_graphics.06540.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_o, "textures/segment2/font_graphics.06580.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_p, "textures/segment2/font_graphics.065C0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_q, "textures/segment2/font_graphics.06600.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_r, "textures/segment2/font_graphics.06640.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_s, "textures/segment2/font_graphics.06680.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_t, "textures/segment2/font_graphics.066C0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_u, "textures/segment2/font_graphics.06700.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_v, "textures/segment2/font_graphics.06740.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_w, "textures/segment2/font_graphics.06780.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_x, "textures/segment2/font_graphics.067C0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_y, "textures/segment2/font_graphics.06800.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_z, "textures/segment2/font_graphics.06840.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_left_right_arrow, "textures/segment2/font_graphics.06880.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_exclamation, "textures/segment2/font_graphics.068C0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_coin, "textures/segment2/font_graphics.06900.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_multiply, "textures/segment2/font_graphics.06940.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_open_parentheses, "textures/segment2/font_graphics.06980.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_close_open_parentheses, "textures/segment2/font_graphics.069C0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_close_parentheses, "textures/segment2/font_graphics.06A00.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_tilde, "textures/segment2/font_graphics.06A40.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_period, "textures/segment2/font_graphics.06A80.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_percent, "textures/segment2/font_graphics.06AC0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_interpunct, "textures/segment2/font_graphics.06B00.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_comma, "textures/segment2/font_graphics.06B40.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_apostrophe, "textures/segment2/font_graphics.06B80.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_question, "textures/segment2/font_graphics.06BC0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_star_filled, "textures/segment2/font_graphics.06C00.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_star_hollow, "textures/segment2/font_graphics.06C40.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_double_quote_open, "textures/segment2/font_graphics.06C80.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_double_quote_close, "textures/segment2/font_graphics.06CC0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_ellipsis, "textures/segment2/font_graphics.06D00.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_slash, "textures/segment2/font_graphics.06D40.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_ampersand, "textures/segment2/font_graphics.06D80.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_button_A, "textures/segment2/font_graphics.06DC0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_button_B, "textures/segment2/font_graphics.06E00.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_button_C, "textures/segment2/font_graphics.06E40.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_button_Z, "textures/segment2/font_graphics.06E80.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_button_R, "textures/segment2/font_graphics.06EC0.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_button_C_up, "textures/segment2/font_graphics.06F00.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_button_C_down, "textures/segment2/font_graphics.06F40.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_button_C_left, "textures/segment2/font_graphics.06F80.ia4.png", 16, 8, 16), - define_builtin_tex(texture_font_char_us_button_C_right, "textures/segment2/font_graphics.06FC0.ia4.png", 16, 8, 16), + define_builtin_tex(texture_font_char_us_0, "textures/segment2/font_graphics.05900.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_1, "textures/segment2/font_graphics.05940.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_2, "textures/segment2/font_graphics.05980.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_3, "textures/segment2/font_graphics.059C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_4, "textures/segment2/font_graphics.05A00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_5, "textures/segment2/font_graphics.05A40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_6, "textures/segment2/font_graphics.05A80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_7, "textures/segment2/font_graphics.05AC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_8, "textures/segment2/font_graphics.05B00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_9, "textures/segment2/font_graphics.05B40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_A, "textures/segment2/font_graphics.05B80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_B, "textures/segment2/font_graphics.05BC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_C, "textures/segment2/font_graphics.05C00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_D, "textures/segment2/font_graphics.05C40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_E, "textures/segment2/font_graphics.05C80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_F, "textures/segment2/font_graphics.05CC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_G, "textures/segment2/font_graphics.05D00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_H, "textures/segment2/font_graphics.05D40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_I, "textures/segment2/font_graphics.05D80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_J, "textures/segment2/font_graphics.05DC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_K, "textures/segment2/font_graphics.05E00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_L, "textures/segment2/font_graphics.05E40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_M, "textures/segment2/font_graphics.05E80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_N, "textures/segment2/font_graphics.05EC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_O, "textures/segment2/font_graphics.05F00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_P, "textures/segment2/font_graphics.05F40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_Q, "textures/segment2/font_graphics.05F80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_R, "textures/segment2/font_graphics.05FC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_S, "textures/segment2/font_graphics.06000.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_T, "textures/segment2/font_graphics.06040.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_U, "textures/segment2/font_graphics.06080.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_V, "textures/segment2/font_graphics.060C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_W, "textures/segment2/font_graphics.06100.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_X, "textures/segment2/font_graphics.06140.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_Y, "textures/segment2/font_graphics.06180.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex_(texture_font_char_us_Z, "textures/segment2/font_graphics.061C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_a, "textures/segment2/font_graphics.06200.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_b, "textures/segment2/font_graphics.06240.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_c, "textures/segment2/font_graphics.06280.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_d, "textures/segment2/font_graphics.062C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_e, "textures/segment2/font_graphics.06300.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_f, "textures/segment2/font_graphics.06340.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_g, "textures/segment2/font_graphics.06380.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_h, "textures/segment2/font_graphics.063C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_i, "textures/segment2/font_graphics.06400.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_j, "textures/segment2/font_graphics.06440.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_k, "textures/segment2/font_graphics.06480.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_l, "textures/segment2/font_graphics.064C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_m, "textures/segment2/font_graphics.06500.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_n, "textures/segment2/font_graphics.06540.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_o, "textures/segment2/font_graphics.06580.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_p, "textures/segment2/font_graphics.065C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_q, "textures/segment2/font_graphics.06600.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_r, "textures/segment2/font_graphics.06640.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_s, "textures/segment2/font_graphics.06680.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_t, "textures/segment2/font_graphics.066C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_u, "textures/segment2/font_graphics.06700.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_v, "textures/segment2/font_graphics.06740.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_w, "textures/segment2/font_graphics.06780.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_x, "textures/segment2/font_graphics.067C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_y, "textures/segment2/font_graphics.06800.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_z, "textures/segment2/font_graphics.06840.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_left_right_arrow, "textures/segment2/font_graphics.06880.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_exclamation, "textures/segment2/font_graphics.068C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_coin, "textures/segment2/font_graphics.06900.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_multiply, "textures/segment2/font_graphics.06940.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_open_parentheses, "textures/segment2/font_graphics.06980.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_close_open_parentheses, "textures/segment2/font_graphics.069C0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_close_parentheses, "textures/segment2/font_graphics.06A00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_tilde, "textures/segment2/font_graphics.06A40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_period, "textures/segment2/font_graphics.06A80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_percent, "textures/segment2/font_graphics.06AC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_interpunct, "textures/segment2/font_graphics.06B00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_comma, "textures/segment2/font_graphics.06B40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_apostrophe, "textures/segment2/font_graphics.06B80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_question, "textures/segment2/font_graphics.06BC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_star_filled, "textures/segment2/font_graphics.06C00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_star_hollow, "textures/segment2/font_graphics.06C40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_double_quote_open, "textures/segment2/font_graphics.06C80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_double_quote_close, "textures/segment2/font_graphics.06CC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_ellipsis, "textures/segment2/font_graphics.06D00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_slash, "textures/segment2/font_graphics.06D40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_ampersand, "textures/segment2/font_graphics.06D80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_button_A, "textures/segment2/font_graphics.06DC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_button_B, "textures/segment2/font_graphics.06E00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_button_C, "textures/segment2/font_graphics.06E40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_button_Z, "textures/segment2/font_graphics.06E80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_button_R, "textures/segment2/font_graphics.06EC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_button_C_up, "textures/segment2/font_graphics.06F00.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_button_C_down, "textures/segment2/font_graphics.06F40.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_button_C_left, "textures/segment2/font_graphics.06F80.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), + define_builtin_tex(texture_font_char_us_button_C_right, "textures/segment2/font_graphics.06FC0.ia4.png", 16, 8, G_IM_FMT_IA, G_IM_SIZ_4b), #endif - define_builtin_tex(water_skybox_texture_00000, "textures/skybox_tiles/water.0.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00001, "textures/skybox_tiles/water.1.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00002, "textures/skybox_tiles/water.2.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00003, "textures/skybox_tiles/water.3.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00004, "textures/skybox_tiles/water.4.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00005, "textures/skybox_tiles/water.5.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00006, "textures/skybox_tiles/water.6.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00007, "textures/skybox_tiles/water.7.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00008, "textures/skybox_tiles/water.8.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00009, "textures/skybox_tiles/water.9.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0000A, "textures/skybox_tiles/water.10.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0000B, "textures/skybox_tiles/water.11.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0000C, "textures/skybox_tiles/water.12.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0000D, "textures/skybox_tiles/water.13.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0000E, "textures/skybox_tiles/water.14.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0000F, "textures/skybox_tiles/water.15.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00010, "textures/skybox_tiles/water.16.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00011, "textures/skybox_tiles/water.17.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00012, "textures/skybox_tiles/water.18.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00013, "textures/skybox_tiles/water.19.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00014, "textures/skybox_tiles/water.20.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00015, "textures/skybox_tiles/water.21.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00016, "textures/skybox_tiles/water.22.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00017, "textures/skybox_tiles/water.23.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00018, "textures/skybox_tiles/water.24.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00019, "textures/skybox_tiles/water.25.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0001A, "textures/skybox_tiles/water.26.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0001B, "textures/skybox_tiles/water.27.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0001C, "textures/skybox_tiles/water.28.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0001D, "textures/skybox_tiles/water.29.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0001E, "textures/skybox_tiles/water.30.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0001F, "textures/skybox_tiles/water.31.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00020, "textures/skybox_tiles/water.32.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00021, "textures/skybox_tiles/water.33.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00022, "textures/skybox_tiles/water.34.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00023, "textures/skybox_tiles/water.35.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00024, "textures/skybox_tiles/water.36.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00025, "textures/skybox_tiles/water.37.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00026, "textures/skybox_tiles/water.38.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00027, "textures/skybox_tiles/water.39.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00028, "textures/skybox_tiles/water.40.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00029, "textures/skybox_tiles/water.41.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0002A, "textures/skybox_tiles/water.42.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0002B, "textures/skybox_tiles/water.43.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0002C, "textures/skybox_tiles/water.44.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0002D, "textures/skybox_tiles/water.45.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0002E, "textures/skybox_tiles/water.46.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0002F, "textures/skybox_tiles/water.47.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00030, "textures/skybox_tiles/water.48.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00031, "textures/skybox_tiles/water.49.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00032, "textures/skybox_tiles/water.50.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00033, "textures/skybox_tiles/water.51.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00034, "textures/skybox_tiles/water.52.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00035, "textures/skybox_tiles/water.53.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00036, "textures/skybox_tiles/water.54.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00037, "textures/skybox_tiles/water.55.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00038, "textures/skybox_tiles/water.56.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_00039, "textures/skybox_tiles/water.57.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0003A, "textures/skybox_tiles/water.58.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0003B, "textures/skybox_tiles/water.59.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0003C, "textures/skybox_tiles/water.60.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0003D, "textures/skybox_tiles/water.61.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0003E, "textures/skybox_tiles/water.62.rgba16.png", 32, 32, 16), - define_builtin_tex(water_skybox_texture_0003F, "textures/skybox_tiles/water.63.rgba16.png", 32, 32, 16), + define_builtin_tex(water_skybox_texture_00000, "textures/skybox_tiles/water.0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00001, "textures/skybox_tiles/water.1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00002, "textures/skybox_tiles/water.2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00003, "textures/skybox_tiles/water.3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00004, "textures/skybox_tiles/water.4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00005, "textures/skybox_tiles/water.5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00006, "textures/skybox_tiles/water.6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00007, "textures/skybox_tiles/water.7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00008, "textures/skybox_tiles/water.8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00009, "textures/skybox_tiles/water.9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0000A, "textures/skybox_tiles/water.10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0000B, "textures/skybox_tiles/water.11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0000C, "textures/skybox_tiles/water.12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0000D, "textures/skybox_tiles/water.13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0000E, "textures/skybox_tiles/water.14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0000F, "textures/skybox_tiles/water.15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00010, "textures/skybox_tiles/water.16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00011, "textures/skybox_tiles/water.17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00012, "textures/skybox_tiles/water.18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00013, "textures/skybox_tiles/water.19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00014, "textures/skybox_tiles/water.20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00015, "textures/skybox_tiles/water.21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00016, "textures/skybox_tiles/water.22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00017, "textures/skybox_tiles/water.23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00018, "textures/skybox_tiles/water.24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00019, "textures/skybox_tiles/water.25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0001A, "textures/skybox_tiles/water.26.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0001B, "textures/skybox_tiles/water.27.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0001C, "textures/skybox_tiles/water.28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0001D, "textures/skybox_tiles/water.29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0001E, "textures/skybox_tiles/water.30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0001F, "textures/skybox_tiles/water.31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00020, "textures/skybox_tiles/water.32.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00021, "textures/skybox_tiles/water.33.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00022, "textures/skybox_tiles/water.34.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00023, "textures/skybox_tiles/water.35.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00024, "textures/skybox_tiles/water.36.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00025, "textures/skybox_tiles/water.37.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00026, "textures/skybox_tiles/water.38.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00027, "textures/skybox_tiles/water.39.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00028, "textures/skybox_tiles/water.40.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00029, "textures/skybox_tiles/water.41.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0002A, "textures/skybox_tiles/water.42.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0002B, "textures/skybox_tiles/water.43.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0002C, "textures/skybox_tiles/water.44.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0002D, "textures/skybox_tiles/water.45.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0002E, "textures/skybox_tiles/water.46.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0002F, "textures/skybox_tiles/water.47.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00030, "textures/skybox_tiles/water.48.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00031, "textures/skybox_tiles/water.49.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00032, "textures/skybox_tiles/water.50.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00033, "textures/skybox_tiles/water.51.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00034, "textures/skybox_tiles/water.52.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00035, "textures/skybox_tiles/water.53.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00036, "textures/skybox_tiles/water.54.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00037, "textures/skybox_tiles/water.55.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00038, "textures/skybox_tiles/water.56.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_00039, "textures/skybox_tiles/water.57.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0003A, "textures/skybox_tiles/water.58.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0003B, "textures/skybox_tiles/water.59.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0003C, "textures/skybox_tiles/water.60.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0003D, "textures/skybox_tiles/water.61.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0003E, "textures/skybox_tiles/water.62.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(water_skybox_texture_0003F, "textures/skybox_tiles/water.63.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), - define_builtin_tex(bitfs_skybox_texture_00000, "textures/skybox_tiles/bitfs.0.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00001, "textures/skybox_tiles/bitfs.1.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00002, "textures/skybox_tiles/bitfs.2.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00003, "textures/skybox_tiles/bitfs.3.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00004, "textures/skybox_tiles/bitfs.4.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00005, "textures/skybox_tiles/bitfs.5.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00006, "textures/skybox_tiles/bitfs.6.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00007, "textures/skybox_tiles/bitfs.7.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00008, "textures/skybox_tiles/bitfs.8.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00009, "textures/skybox_tiles/bitfs.9.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0000A, "textures/skybox_tiles/bitfs.10.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0000B, "textures/skybox_tiles/bitfs.11.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0000C, "textures/skybox_tiles/bitfs.12.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0000D, "textures/skybox_tiles/bitfs.13.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0000E, "textures/skybox_tiles/bitfs.14.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0000F, "textures/skybox_tiles/bitfs.15.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00010, "textures/skybox_tiles/bitfs.16.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00011, "textures/skybox_tiles/bitfs.17.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00012, "textures/skybox_tiles/bitfs.18.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00013, "textures/skybox_tiles/bitfs.19.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00014, "textures/skybox_tiles/bitfs.20.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00015, "textures/skybox_tiles/bitfs.21.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00016, "textures/skybox_tiles/bitfs.22.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00017, "textures/skybox_tiles/bitfs.23.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00018, "textures/skybox_tiles/bitfs.24.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00019, "textures/skybox_tiles/bitfs.25.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0001A, "textures/skybox_tiles/bitfs.26.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0001B, "textures/skybox_tiles/bitfs.27.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0001C, "textures/skybox_tiles/bitfs.28.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0001D, "textures/skybox_tiles/bitfs.29.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0001E, "textures/skybox_tiles/bitfs.30.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0001F, "textures/skybox_tiles/bitfs.31.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00020, "textures/skybox_tiles/bitfs.32.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00021, "textures/skybox_tiles/bitfs.33.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00022, "textures/skybox_tiles/bitfs.34.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00023, "textures/skybox_tiles/bitfs.35.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00024, "textures/skybox_tiles/bitfs.36.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00025, "textures/skybox_tiles/bitfs.37.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00026, "textures/skybox_tiles/bitfs.38.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00027, "textures/skybox_tiles/bitfs.39.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00028, "textures/skybox_tiles/bitfs.40.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00029, "textures/skybox_tiles/bitfs.41.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0002A, "textures/skybox_tiles/bitfs.42.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0002B, "textures/skybox_tiles/bitfs.43.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0002C, "textures/skybox_tiles/bitfs.44.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0002D, "textures/skybox_tiles/bitfs.45.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0002E, "textures/skybox_tiles/bitfs.46.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_0002F, "textures/skybox_tiles/bitfs.47.rgba16.png", 32, 32, 16), - define_builtin_tex(bitfs_skybox_texture_00030, "textures/skybox_tiles/bitfs.48.rgba16.png", 32, 32, 16), + define_builtin_tex(bitfs_skybox_texture_00000, "textures/skybox_tiles/bitfs.0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00001, "textures/skybox_tiles/bitfs.1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00002, "textures/skybox_tiles/bitfs.2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00003, "textures/skybox_tiles/bitfs.3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00004, "textures/skybox_tiles/bitfs.4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00005, "textures/skybox_tiles/bitfs.5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00006, "textures/skybox_tiles/bitfs.6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00007, "textures/skybox_tiles/bitfs.7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00008, "textures/skybox_tiles/bitfs.8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00009, "textures/skybox_tiles/bitfs.9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0000A, "textures/skybox_tiles/bitfs.10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0000B, "textures/skybox_tiles/bitfs.11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0000C, "textures/skybox_tiles/bitfs.12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0000D, "textures/skybox_tiles/bitfs.13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0000E, "textures/skybox_tiles/bitfs.14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0000F, "textures/skybox_tiles/bitfs.15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00010, "textures/skybox_tiles/bitfs.16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00011, "textures/skybox_tiles/bitfs.17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00012, "textures/skybox_tiles/bitfs.18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00013, "textures/skybox_tiles/bitfs.19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00014, "textures/skybox_tiles/bitfs.20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00015, "textures/skybox_tiles/bitfs.21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00016, "textures/skybox_tiles/bitfs.22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00017, "textures/skybox_tiles/bitfs.23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00018, "textures/skybox_tiles/bitfs.24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00019, "textures/skybox_tiles/bitfs.25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0001A, "textures/skybox_tiles/bitfs.26.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0001B, "textures/skybox_tiles/bitfs.27.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0001C, "textures/skybox_tiles/bitfs.28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0001D, "textures/skybox_tiles/bitfs.29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0001E, "textures/skybox_tiles/bitfs.30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0001F, "textures/skybox_tiles/bitfs.31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00020, "textures/skybox_tiles/bitfs.32.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00021, "textures/skybox_tiles/bitfs.33.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00022, "textures/skybox_tiles/bitfs.34.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00023, "textures/skybox_tiles/bitfs.35.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00024, "textures/skybox_tiles/bitfs.36.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00025, "textures/skybox_tiles/bitfs.37.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00026, "textures/skybox_tiles/bitfs.38.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00027, "textures/skybox_tiles/bitfs.39.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00028, "textures/skybox_tiles/bitfs.40.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00029, "textures/skybox_tiles/bitfs.41.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0002A, "textures/skybox_tiles/bitfs.42.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0002B, "textures/skybox_tiles/bitfs.43.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0002C, "textures/skybox_tiles/bitfs.44.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0002D, "textures/skybox_tiles/bitfs.45.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0002E, "textures/skybox_tiles/bitfs.46.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_0002F, "textures/skybox_tiles/bitfs.47.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitfs_skybox_texture_00030, "textures/skybox_tiles/bitfs.48.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), - define_builtin_tex(wdw_skybox_texture_00000, "textures/skybox_tiles/wdw.0.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00001, "textures/skybox_tiles/wdw.1.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00002, "textures/skybox_tiles/wdw.2.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00003, "textures/skybox_tiles/wdw.3.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00004, "textures/skybox_tiles/wdw.4.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00005, "textures/skybox_tiles/wdw.5.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00006, "textures/skybox_tiles/wdw.6.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00007, "textures/skybox_tiles/wdw.7.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00008, "textures/skybox_tiles/wdw.8.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00009, "textures/skybox_tiles/wdw.9.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0000A, "textures/skybox_tiles/wdw.10.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0000B, "textures/skybox_tiles/wdw.11.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0000C, "textures/skybox_tiles/wdw.12.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0000D, "textures/skybox_tiles/wdw.13.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0000E, "textures/skybox_tiles/wdw.14.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0000F, "textures/skybox_tiles/wdw.15.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00010, "textures/skybox_tiles/wdw.16.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00011, "textures/skybox_tiles/wdw.17.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00012, "textures/skybox_tiles/wdw.18.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00013, "textures/skybox_tiles/wdw.19.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00014, "textures/skybox_tiles/wdw.20.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00015, "textures/skybox_tiles/wdw.21.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00016, "textures/skybox_tiles/wdw.22.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00017, "textures/skybox_tiles/wdw.23.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00018, "textures/skybox_tiles/wdw.24.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00019, "textures/skybox_tiles/wdw.25.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0001A, "textures/skybox_tiles/wdw.26.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0001B, "textures/skybox_tiles/wdw.27.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0001C, "textures/skybox_tiles/wdw.28.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0001D, "textures/skybox_tiles/wdw.29.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0001E, "textures/skybox_tiles/wdw.30.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0001F, "textures/skybox_tiles/wdw.31.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00020, "textures/skybox_tiles/wdw.32.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00021, "textures/skybox_tiles/wdw.33.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00022, "textures/skybox_tiles/wdw.34.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00023, "textures/skybox_tiles/wdw.35.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00024, "textures/skybox_tiles/wdw.36.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00025, "textures/skybox_tiles/wdw.37.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00026, "textures/skybox_tiles/wdw.38.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00027, "textures/skybox_tiles/wdw.39.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00028, "textures/skybox_tiles/wdw.40.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00029, "textures/skybox_tiles/wdw.41.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0002A, "textures/skybox_tiles/wdw.42.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0002B, "textures/skybox_tiles/wdw.43.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0002C, "textures/skybox_tiles/wdw.44.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0002D, "textures/skybox_tiles/wdw.45.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0002E, "textures/skybox_tiles/wdw.46.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0002F, "textures/skybox_tiles/wdw.47.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00030, "textures/skybox_tiles/wdw.48.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00031, "textures/skybox_tiles/wdw.49.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00032, "textures/skybox_tiles/wdw.50.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00033, "textures/skybox_tiles/wdw.51.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00034, "textures/skybox_tiles/wdw.52.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00035, "textures/skybox_tiles/wdw.53.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00036, "textures/skybox_tiles/wdw.54.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00037, "textures/skybox_tiles/wdw.55.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00038, "textures/skybox_tiles/wdw.56.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_00039, "textures/skybox_tiles/wdw.57.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0003A, "textures/skybox_tiles/wdw.58.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0003B, "textures/skybox_tiles/wdw.59.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0003C, "textures/skybox_tiles/wdw.60.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0003D, "textures/skybox_tiles/wdw.61.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0003E, "textures/skybox_tiles/wdw.62.rgba16.png", 32, 32, 16), - define_builtin_tex(wdw_skybox_texture_0003F, "textures/skybox_tiles/wdw.63.rgba16.png", 32, 32, 16), + define_builtin_tex(wdw_skybox_texture_00000, "textures/skybox_tiles/wdw.0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00001, "textures/skybox_tiles/wdw.1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00002, "textures/skybox_tiles/wdw.2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00003, "textures/skybox_tiles/wdw.3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00004, "textures/skybox_tiles/wdw.4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00005, "textures/skybox_tiles/wdw.5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00006, "textures/skybox_tiles/wdw.6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00007, "textures/skybox_tiles/wdw.7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00008, "textures/skybox_tiles/wdw.8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00009, "textures/skybox_tiles/wdw.9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0000A, "textures/skybox_tiles/wdw.10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0000B, "textures/skybox_tiles/wdw.11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0000C, "textures/skybox_tiles/wdw.12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0000D, "textures/skybox_tiles/wdw.13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0000E, "textures/skybox_tiles/wdw.14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0000F, "textures/skybox_tiles/wdw.15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00010, "textures/skybox_tiles/wdw.16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00011, "textures/skybox_tiles/wdw.17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00012, "textures/skybox_tiles/wdw.18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00013, "textures/skybox_tiles/wdw.19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00014, "textures/skybox_tiles/wdw.20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00015, "textures/skybox_tiles/wdw.21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00016, "textures/skybox_tiles/wdw.22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00017, "textures/skybox_tiles/wdw.23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00018, "textures/skybox_tiles/wdw.24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00019, "textures/skybox_tiles/wdw.25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0001A, "textures/skybox_tiles/wdw.26.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0001B, "textures/skybox_tiles/wdw.27.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0001C, "textures/skybox_tiles/wdw.28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0001D, "textures/skybox_tiles/wdw.29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0001E, "textures/skybox_tiles/wdw.30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0001F, "textures/skybox_tiles/wdw.31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00020, "textures/skybox_tiles/wdw.32.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00021, "textures/skybox_tiles/wdw.33.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00022, "textures/skybox_tiles/wdw.34.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00023, "textures/skybox_tiles/wdw.35.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00024, "textures/skybox_tiles/wdw.36.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00025, "textures/skybox_tiles/wdw.37.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00026, "textures/skybox_tiles/wdw.38.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00027, "textures/skybox_tiles/wdw.39.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00028, "textures/skybox_tiles/wdw.40.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00029, "textures/skybox_tiles/wdw.41.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0002A, "textures/skybox_tiles/wdw.42.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0002B, "textures/skybox_tiles/wdw.43.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0002C, "textures/skybox_tiles/wdw.44.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0002D, "textures/skybox_tiles/wdw.45.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0002E, "textures/skybox_tiles/wdw.46.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0002F, "textures/skybox_tiles/wdw.47.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00030, "textures/skybox_tiles/wdw.48.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00031, "textures/skybox_tiles/wdw.49.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00032, "textures/skybox_tiles/wdw.50.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00033, "textures/skybox_tiles/wdw.51.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00034, "textures/skybox_tiles/wdw.52.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00035, "textures/skybox_tiles/wdw.53.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00036, "textures/skybox_tiles/wdw.54.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00037, "textures/skybox_tiles/wdw.55.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00038, "textures/skybox_tiles/wdw.56.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_00039, "textures/skybox_tiles/wdw.57.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0003A, "textures/skybox_tiles/wdw.58.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0003B, "textures/skybox_tiles/wdw.59.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0003C, "textures/skybox_tiles/wdw.60.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0003D, "textures/skybox_tiles/wdw.61.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0003E, "textures/skybox_tiles/wdw.62.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(wdw_skybox_texture_0003F, "textures/skybox_tiles/wdw.63.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), - define_builtin_tex(cloud_floor_skybox_texture_00000, "textures/skybox_tiles/cloud_floor.0.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00001, "textures/skybox_tiles/cloud_floor.1.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00002, "textures/skybox_tiles/cloud_floor.2.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00003, "textures/skybox_tiles/cloud_floor.3.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00004, "textures/skybox_tiles/cloud_floor.4.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00005, "textures/skybox_tiles/cloud_floor.5.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00006, "textures/skybox_tiles/cloud_floor.6.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00007, "textures/skybox_tiles/cloud_floor.7.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00008, "textures/skybox_tiles/cloud_floor.8.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00009, "textures/skybox_tiles/cloud_floor.9.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0000A, "textures/skybox_tiles/cloud_floor.10.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0000B, "textures/skybox_tiles/cloud_floor.11.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0000C, "textures/skybox_tiles/cloud_floor.12.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0000D, "textures/skybox_tiles/cloud_floor.13.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0000E, "textures/skybox_tiles/cloud_floor.14.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0000F, "textures/skybox_tiles/cloud_floor.15.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00010, "textures/skybox_tiles/cloud_floor.16.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00011, "textures/skybox_tiles/cloud_floor.17.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00012, "textures/skybox_tiles/cloud_floor.18.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00013, "textures/skybox_tiles/cloud_floor.19.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00014, "textures/skybox_tiles/cloud_floor.20.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00015, "textures/skybox_tiles/cloud_floor.21.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00016, "textures/skybox_tiles/cloud_floor.22.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00017, "textures/skybox_tiles/cloud_floor.23.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00018, "textures/skybox_tiles/cloud_floor.24.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00019, "textures/skybox_tiles/cloud_floor.25.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0001A, "textures/skybox_tiles/cloud_floor.26.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0001B, "textures/skybox_tiles/cloud_floor.27.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0001C, "textures/skybox_tiles/cloud_floor.28.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0001D, "textures/skybox_tiles/cloud_floor.29.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0001E, "textures/skybox_tiles/cloud_floor.30.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0001F, "textures/skybox_tiles/cloud_floor.31.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00020, "textures/skybox_tiles/cloud_floor.32.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00021, "textures/skybox_tiles/cloud_floor.33.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00022, "textures/skybox_tiles/cloud_floor.34.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00023, "textures/skybox_tiles/cloud_floor.35.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00024, "textures/skybox_tiles/cloud_floor.36.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00025, "textures/skybox_tiles/cloud_floor.37.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00026, "textures/skybox_tiles/cloud_floor.38.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00027, "textures/skybox_tiles/cloud_floor.39.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00028, "textures/skybox_tiles/cloud_floor.40.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00029, "textures/skybox_tiles/cloud_floor.41.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0002A, "textures/skybox_tiles/cloud_floor.42.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0002B, "textures/skybox_tiles/cloud_floor.43.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0002C, "textures/skybox_tiles/cloud_floor.44.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0002D, "textures/skybox_tiles/cloud_floor.45.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0002E, "textures/skybox_tiles/cloud_floor.46.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0002F, "textures/skybox_tiles/cloud_floor.47.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00030, "textures/skybox_tiles/cloud_floor.48.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00031, "textures/skybox_tiles/cloud_floor.49.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00032, "textures/skybox_tiles/cloud_floor.50.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00033, "textures/skybox_tiles/cloud_floor.51.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00034, "textures/skybox_tiles/cloud_floor.52.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00035, "textures/skybox_tiles/cloud_floor.53.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00036, "textures/skybox_tiles/cloud_floor.54.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00037, "textures/skybox_tiles/cloud_floor.55.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00038, "textures/skybox_tiles/cloud_floor.56.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_00039, "textures/skybox_tiles/cloud_floor.57.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0003A, "textures/skybox_tiles/cloud_floor.58.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0003B, "textures/skybox_tiles/cloud_floor.59.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0003C, "textures/skybox_tiles/cloud_floor.60.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0003D, "textures/skybox_tiles/cloud_floor.61.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0003E, "textures/skybox_tiles/cloud_floor.62.rgba16.png", 32, 32, 16), - define_builtin_tex(cloud_floor_skybox_texture_0003F, "textures/skybox_tiles/cloud_floor.63.rgba16.png", 32, 32, 16), + define_builtin_tex(cloud_floor_skybox_texture_00000, "textures/skybox_tiles/cloud_floor.0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00001, "textures/skybox_tiles/cloud_floor.1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00002, "textures/skybox_tiles/cloud_floor.2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00003, "textures/skybox_tiles/cloud_floor.3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00004, "textures/skybox_tiles/cloud_floor.4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00005, "textures/skybox_tiles/cloud_floor.5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00006, "textures/skybox_tiles/cloud_floor.6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00007, "textures/skybox_tiles/cloud_floor.7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00008, "textures/skybox_tiles/cloud_floor.8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00009, "textures/skybox_tiles/cloud_floor.9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0000A, "textures/skybox_tiles/cloud_floor.10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0000B, "textures/skybox_tiles/cloud_floor.11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0000C, "textures/skybox_tiles/cloud_floor.12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0000D, "textures/skybox_tiles/cloud_floor.13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0000E, "textures/skybox_tiles/cloud_floor.14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0000F, "textures/skybox_tiles/cloud_floor.15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00010, "textures/skybox_tiles/cloud_floor.16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00011, "textures/skybox_tiles/cloud_floor.17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00012, "textures/skybox_tiles/cloud_floor.18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00013, "textures/skybox_tiles/cloud_floor.19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00014, "textures/skybox_tiles/cloud_floor.20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00015, "textures/skybox_tiles/cloud_floor.21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00016, "textures/skybox_tiles/cloud_floor.22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00017, "textures/skybox_tiles/cloud_floor.23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00018, "textures/skybox_tiles/cloud_floor.24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00019, "textures/skybox_tiles/cloud_floor.25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0001A, "textures/skybox_tiles/cloud_floor.26.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0001B, "textures/skybox_tiles/cloud_floor.27.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0001C, "textures/skybox_tiles/cloud_floor.28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0001D, "textures/skybox_tiles/cloud_floor.29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0001E, "textures/skybox_tiles/cloud_floor.30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0001F, "textures/skybox_tiles/cloud_floor.31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00020, "textures/skybox_tiles/cloud_floor.32.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00021, "textures/skybox_tiles/cloud_floor.33.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00022, "textures/skybox_tiles/cloud_floor.34.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00023, "textures/skybox_tiles/cloud_floor.35.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00024, "textures/skybox_tiles/cloud_floor.36.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00025, "textures/skybox_tiles/cloud_floor.37.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00026, "textures/skybox_tiles/cloud_floor.38.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00027, "textures/skybox_tiles/cloud_floor.39.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00028, "textures/skybox_tiles/cloud_floor.40.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00029, "textures/skybox_tiles/cloud_floor.41.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0002A, "textures/skybox_tiles/cloud_floor.42.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0002B, "textures/skybox_tiles/cloud_floor.43.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0002C, "textures/skybox_tiles/cloud_floor.44.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0002D, "textures/skybox_tiles/cloud_floor.45.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0002E, "textures/skybox_tiles/cloud_floor.46.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0002F, "textures/skybox_tiles/cloud_floor.47.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00030, "textures/skybox_tiles/cloud_floor.48.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00031, "textures/skybox_tiles/cloud_floor.49.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00032, "textures/skybox_tiles/cloud_floor.50.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00033, "textures/skybox_tiles/cloud_floor.51.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00034, "textures/skybox_tiles/cloud_floor.52.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00035, "textures/skybox_tiles/cloud_floor.53.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00036, "textures/skybox_tiles/cloud_floor.54.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00037, "textures/skybox_tiles/cloud_floor.55.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00038, "textures/skybox_tiles/cloud_floor.56.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_00039, "textures/skybox_tiles/cloud_floor.57.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0003A, "textures/skybox_tiles/cloud_floor.58.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0003B, "textures/skybox_tiles/cloud_floor.59.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0003C, "textures/skybox_tiles/cloud_floor.60.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0003D, "textures/skybox_tiles/cloud_floor.61.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0003E, "textures/skybox_tiles/cloud_floor.62.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cloud_floor_skybox_texture_0003F, "textures/skybox_tiles/cloud_floor.63.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), - define_builtin_tex(ccm_skybox_texture_00000, "textures/skybox_tiles/ccm.0.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00001, "textures/skybox_tiles/ccm.1.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00002, "textures/skybox_tiles/ccm.2.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00003, "textures/skybox_tiles/ccm.3.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00004, "textures/skybox_tiles/ccm.4.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00005, "textures/skybox_tiles/ccm.5.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00006, "textures/skybox_tiles/ccm.6.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00007, "textures/skybox_tiles/ccm.7.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00008, "textures/skybox_tiles/ccm.8.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00009, "textures/skybox_tiles/ccm.9.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0000A, "textures/skybox_tiles/ccm.10.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0000B, "textures/skybox_tiles/ccm.11.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0000C, "textures/skybox_tiles/ccm.12.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0000D, "textures/skybox_tiles/ccm.13.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0000E, "textures/skybox_tiles/ccm.14.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0000F, "textures/skybox_tiles/ccm.15.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00010, "textures/skybox_tiles/ccm.16.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00011, "textures/skybox_tiles/ccm.17.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00012, "textures/skybox_tiles/ccm.18.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00013, "textures/skybox_tiles/ccm.19.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00014, "textures/skybox_tiles/ccm.20.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00015, "textures/skybox_tiles/ccm.21.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00016, "textures/skybox_tiles/ccm.22.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00017, "textures/skybox_tiles/ccm.23.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00018, "textures/skybox_tiles/ccm.24.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00019, "textures/skybox_tiles/ccm.25.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0001A, "textures/skybox_tiles/ccm.26.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0001B, "textures/skybox_tiles/ccm.27.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0001C, "textures/skybox_tiles/ccm.28.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0001D, "textures/skybox_tiles/ccm.29.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0001E, "textures/skybox_tiles/ccm.30.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0001F, "textures/skybox_tiles/ccm.31.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00020, "textures/skybox_tiles/ccm.32.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00021, "textures/skybox_tiles/ccm.33.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00022, "textures/skybox_tiles/ccm.34.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00023, "textures/skybox_tiles/ccm.35.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00024, "textures/skybox_tiles/ccm.36.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00025, "textures/skybox_tiles/ccm.37.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00026, "textures/skybox_tiles/ccm.38.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00027, "textures/skybox_tiles/ccm.39.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00028, "textures/skybox_tiles/ccm.40.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00029, "textures/skybox_tiles/ccm.41.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0002A, "textures/skybox_tiles/ccm.42.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0002B, "textures/skybox_tiles/ccm.43.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0002C, "textures/skybox_tiles/ccm.44.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0002D, "textures/skybox_tiles/ccm.45.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0002E, "textures/skybox_tiles/ccm.46.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0002F, "textures/skybox_tiles/ccm.47.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00030, "textures/skybox_tiles/ccm.48.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00031, "textures/skybox_tiles/ccm.49.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00032, "textures/skybox_tiles/ccm.50.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00033, "textures/skybox_tiles/ccm.51.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00034, "textures/skybox_tiles/ccm.52.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00035, "textures/skybox_tiles/ccm.53.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00036, "textures/skybox_tiles/ccm.54.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00037, "textures/skybox_tiles/ccm.55.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00038, "textures/skybox_tiles/ccm.56.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_00039, "textures/skybox_tiles/ccm.57.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0003A, "textures/skybox_tiles/ccm.58.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0003B, "textures/skybox_tiles/ccm.59.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0003C, "textures/skybox_tiles/ccm.60.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0003D, "textures/skybox_tiles/ccm.61.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0003E, "textures/skybox_tiles/ccm.62.rgba16.png", 32, 32, 16), - define_builtin_tex(ccm_skybox_texture_0003F, "textures/skybox_tiles/ccm.63.rgba16.png", 32, 32, 16), + define_builtin_tex(ccm_skybox_texture_00000, "textures/skybox_tiles/ccm.0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00001, "textures/skybox_tiles/ccm.1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00002, "textures/skybox_tiles/ccm.2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00003, "textures/skybox_tiles/ccm.3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00004, "textures/skybox_tiles/ccm.4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00005, "textures/skybox_tiles/ccm.5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00006, "textures/skybox_tiles/ccm.6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00007, "textures/skybox_tiles/ccm.7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00008, "textures/skybox_tiles/ccm.8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00009, "textures/skybox_tiles/ccm.9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0000A, "textures/skybox_tiles/ccm.10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0000B, "textures/skybox_tiles/ccm.11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0000C, "textures/skybox_tiles/ccm.12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0000D, "textures/skybox_tiles/ccm.13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0000E, "textures/skybox_tiles/ccm.14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0000F, "textures/skybox_tiles/ccm.15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00010, "textures/skybox_tiles/ccm.16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00011, "textures/skybox_tiles/ccm.17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00012, "textures/skybox_tiles/ccm.18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00013, "textures/skybox_tiles/ccm.19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00014, "textures/skybox_tiles/ccm.20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00015, "textures/skybox_tiles/ccm.21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00016, "textures/skybox_tiles/ccm.22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00017, "textures/skybox_tiles/ccm.23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00018, "textures/skybox_tiles/ccm.24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00019, "textures/skybox_tiles/ccm.25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0001A, "textures/skybox_tiles/ccm.26.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0001B, "textures/skybox_tiles/ccm.27.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0001C, "textures/skybox_tiles/ccm.28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0001D, "textures/skybox_tiles/ccm.29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0001E, "textures/skybox_tiles/ccm.30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0001F, "textures/skybox_tiles/ccm.31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00020, "textures/skybox_tiles/ccm.32.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00021, "textures/skybox_tiles/ccm.33.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00022, "textures/skybox_tiles/ccm.34.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00023, "textures/skybox_tiles/ccm.35.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00024, "textures/skybox_tiles/ccm.36.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00025, "textures/skybox_tiles/ccm.37.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00026, "textures/skybox_tiles/ccm.38.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00027, "textures/skybox_tiles/ccm.39.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00028, "textures/skybox_tiles/ccm.40.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00029, "textures/skybox_tiles/ccm.41.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0002A, "textures/skybox_tiles/ccm.42.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0002B, "textures/skybox_tiles/ccm.43.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0002C, "textures/skybox_tiles/ccm.44.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0002D, "textures/skybox_tiles/ccm.45.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0002E, "textures/skybox_tiles/ccm.46.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0002F, "textures/skybox_tiles/ccm.47.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00030, "textures/skybox_tiles/ccm.48.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00031, "textures/skybox_tiles/ccm.49.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00032, "textures/skybox_tiles/ccm.50.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00033, "textures/skybox_tiles/ccm.51.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00034, "textures/skybox_tiles/ccm.52.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00035, "textures/skybox_tiles/ccm.53.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00036, "textures/skybox_tiles/ccm.54.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00037, "textures/skybox_tiles/ccm.55.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00038, "textures/skybox_tiles/ccm.56.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_00039, "textures/skybox_tiles/ccm.57.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0003A, "textures/skybox_tiles/ccm.58.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0003B, "textures/skybox_tiles/ccm.59.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0003C, "textures/skybox_tiles/ccm.60.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0003D, "textures/skybox_tiles/ccm.61.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0003E, "textures/skybox_tiles/ccm.62.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ccm_skybox_texture_0003F, "textures/skybox_tiles/ccm.63.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), - define_builtin_tex(ssl_skybox_texture_00000, "textures/skybox_tiles/ssl.0.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00001, "textures/skybox_tiles/ssl.1.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00002, "textures/skybox_tiles/ssl.2.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00003, "textures/skybox_tiles/ssl.3.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00004, "textures/skybox_tiles/ssl.4.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00005, "textures/skybox_tiles/ssl.5.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00006, "textures/skybox_tiles/ssl.6.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00007, "textures/skybox_tiles/ssl.7.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00008, "textures/skybox_tiles/ssl.8.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00009, "textures/skybox_tiles/ssl.9.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0000A, "textures/skybox_tiles/ssl.10.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0000B, "textures/skybox_tiles/ssl.11.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0000C, "textures/skybox_tiles/ssl.12.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0000D, "textures/skybox_tiles/ssl.13.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0000E, "textures/skybox_tiles/ssl.14.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0000F, "textures/skybox_tiles/ssl.15.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00010, "textures/skybox_tiles/ssl.16.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00011, "textures/skybox_tiles/ssl.17.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00012, "textures/skybox_tiles/ssl.18.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00013, "textures/skybox_tiles/ssl.19.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00014, "textures/skybox_tiles/ssl.20.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00015, "textures/skybox_tiles/ssl.21.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00016, "textures/skybox_tiles/ssl.22.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00017, "textures/skybox_tiles/ssl.23.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00018, "textures/skybox_tiles/ssl.24.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00019, "textures/skybox_tiles/ssl.25.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0001A, "textures/skybox_tiles/ssl.26.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0001B, "textures/skybox_tiles/ssl.27.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0001C, "textures/skybox_tiles/ssl.28.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0001D, "textures/skybox_tiles/ssl.29.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0001E, "textures/skybox_tiles/ssl.30.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0001F, "textures/skybox_tiles/ssl.31.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00020, "textures/skybox_tiles/ssl.32.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00021, "textures/skybox_tiles/ssl.33.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00022, "textures/skybox_tiles/ssl.34.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00023, "textures/skybox_tiles/ssl.35.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00024, "textures/skybox_tiles/ssl.36.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00025, "textures/skybox_tiles/ssl.37.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00026, "textures/skybox_tiles/ssl.38.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00027, "textures/skybox_tiles/ssl.39.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00028, "textures/skybox_tiles/ssl.40.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00029, "textures/skybox_tiles/ssl.41.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0002A, "textures/skybox_tiles/ssl.42.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0002B, "textures/skybox_tiles/ssl.43.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0002C, "textures/skybox_tiles/ssl.44.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0002D, "textures/skybox_tiles/ssl.45.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0002E, "textures/skybox_tiles/ssl.46.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0002F, "textures/skybox_tiles/ssl.47.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00030, "textures/skybox_tiles/ssl.48.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00031, "textures/skybox_tiles/ssl.49.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00032, "textures/skybox_tiles/ssl.50.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00033, "textures/skybox_tiles/ssl.51.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00034, "textures/skybox_tiles/ssl.52.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00035, "textures/skybox_tiles/ssl.53.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00036, "textures/skybox_tiles/ssl.54.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00037, "textures/skybox_tiles/ssl.55.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00038, "textures/skybox_tiles/ssl.56.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_00039, "textures/skybox_tiles/ssl.57.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0003A, "textures/skybox_tiles/ssl.58.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0003B, "textures/skybox_tiles/ssl.59.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0003C, "textures/skybox_tiles/ssl.60.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0003D, "textures/skybox_tiles/ssl.61.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0003E, "textures/skybox_tiles/ssl.62.rgba16.png", 32, 32, 16), - define_builtin_tex(ssl_skybox_texture_0003F, "textures/skybox_tiles/ssl.63.rgba16.png", 32, 32, 16), + define_builtin_tex(ssl_skybox_texture_00000, "textures/skybox_tiles/ssl.0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00001, "textures/skybox_tiles/ssl.1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00002, "textures/skybox_tiles/ssl.2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00003, "textures/skybox_tiles/ssl.3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00004, "textures/skybox_tiles/ssl.4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00005, "textures/skybox_tiles/ssl.5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00006, "textures/skybox_tiles/ssl.6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00007, "textures/skybox_tiles/ssl.7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00008, "textures/skybox_tiles/ssl.8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00009, "textures/skybox_tiles/ssl.9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0000A, "textures/skybox_tiles/ssl.10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0000B, "textures/skybox_tiles/ssl.11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0000C, "textures/skybox_tiles/ssl.12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0000D, "textures/skybox_tiles/ssl.13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0000E, "textures/skybox_tiles/ssl.14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0000F, "textures/skybox_tiles/ssl.15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00010, "textures/skybox_tiles/ssl.16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00011, "textures/skybox_tiles/ssl.17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00012, "textures/skybox_tiles/ssl.18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00013, "textures/skybox_tiles/ssl.19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00014, "textures/skybox_tiles/ssl.20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00015, "textures/skybox_tiles/ssl.21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00016, "textures/skybox_tiles/ssl.22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00017, "textures/skybox_tiles/ssl.23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00018, "textures/skybox_tiles/ssl.24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00019, "textures/skybox_tiles/ssl.25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0001A, "textures/skybox_tiles/ssl.26.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0001B, "textures/skybox_tiles/ssl.27.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0001C, "textures/skybox_tiles/ssl.28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0001D, "textures/skybox_tiles/ssl.29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0001E, "textures/skybox_tiles/ssl.30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0001F, "textures/skybox_tiles/ssl.31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00020, "textures/skybox_tiles/ssl.32.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00021, "textures/skybox_tiles/ssl.33.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00022, "textures/skybox_tiles/ssl.34.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00023, "textures/skybox_tiles/ssl.35.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00024, "textures/skybox_tiles/ssl.36.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00025, "textures/skybox_tiles/ssl.37.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00026, "textures/skybox_tiles/ssl.38.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00027, "textures/skybox_tiles/ssl.39.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00028, "textures/skybox_tiles/ssl.40.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00029, "textures/skybox_tiles/ssl.41.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0002A, "textures/skybox_tiles/ssl.42.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0002B, "textures/skybox_tiles/ssl.43.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0002C, "textures/skybox_tiles/ssl.44.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0002D, "textures/skybox_tiles/ssl.45.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0002E, "textures/skybox_tiles/ssl.46.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0002F, "textures/skybox_tiles/ssl.47.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00030, "textures/skybox_tiles/ssl.48.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00031, "textures/skybox_tiles/ssl.49.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00032, "textures/skybox_tiles/ssl.50.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00033, "textures/skybox_tiles/ssl.51.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00034, "textures/skybox_tiles/ssl.52.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00035, "textures/skybox_tiles/ssl.53.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00036, "textures/skybox_tiles/ssl.54.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00037, "textures/skybox_tiles/ssl.55.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00038, "textures/skybox_tiles/ssl.56.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_00039, "textures/skybox_tiles/ssl.57.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0003A, "textures/skybox_tiles/ssl.58.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0003B, "textures/skybox_tiles/ssl.59.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0003C, "textures/skybox_tiles/ssl.60.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0003D, "textures/skybox_tiles/ssl.61.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0003E, "textures/skybox_tiles/ssl.62.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(ssl_skybox_texture_0003F, "textures/skybox_tiles/ssl.63.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), - define_builtin_tex(bbh_skybox_texture_00000, "textures/skybox_tiles/bbh.0.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00001, "textures/skybox_tiles/bbh.1.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00002, "textures/skybox_tiles/bbh.2.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00003, "textures/skybox_tiles/bbh.3.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00004, "textures/skybox_tiles/bbh.4.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00005, "textures/skybox_tiles/bbh.5.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00006, "textures/skybox_tiles/bbh.6.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00007, "textures/skybox_tiles/bbh.7.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00008, "textures/skybox_tiles/bbh.8.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00009, "textures/skybox_tiles/bbh.9.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0000A, "textures/skybox_tiles/bbh.10.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0000B, "textures/skybox_tiles/bbh.11.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0000C, "textures/skybox_tiles/bbh.12.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0000D, "textures/skybox_tiles/bbh.13.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0000E, "textures/skybox_tiles/bbh.14.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0000F, "textures/skybox_tiles/bbh.15.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00010, "textures/skybox_tiles/bbh.16.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00011, "textures/skybox_tiles/bbh.17.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00012, "textures/skybox_tiles/bbh.18.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00013, "textures/skybox_tiles/bbh.19.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00014, "textures/skybox_tiles/bbh.20.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00015, "textures/skybox_tiles/bbh.21.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00016, "textures/skybox_tiles/bbh.22.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00017, "textures/skybox_tiles/bbh.23.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00018, "textures/skybox_tiles/bbh.24.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00019, "textures/skybox_tiles/bbh.25.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0001A, "textures/skybox_tiles/bbh.26.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0001B, "textures/skybox_tiles/bbh.27.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0001C, "textures/skybox_tiles/bbh.28.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0001D, "textures/skybox_tiles/bbh.29.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0001E, "textures/skybox_tiles/bbh.30.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_0001F, "textures/skybox_tiles/bbh.31.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00020, "textures/skybox_tiles/bbh.32.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00021, "textures/skybox_tiles/bbh.33.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00022, "textures/skybox_tiles/bbh.34.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00023, "textures/skybox_tiles/bbh.35.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00024, "textures/skybox_tiles/bbh.36.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00025, "textures/skybox_tiles/bbh.37.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00026, "textures/skybox_tiles/bbh.38.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00027, "textures/skybox_tiles/bbh.39.rgba16.png", 32, 32, 16), - define_builtin_tex(bbh_skybox_texture_00028, "textures/skybox_tiles/bbh.40.rgba16.png", 32, 32, 16), + define_builtin_tex(bbh_skybox_texture_00000, "textures/skybox_tiles/bbh.0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00001, "textures/skybox_tiles/bbh.1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00002, "textures/skybox_tiles/bbh.2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00003, "textures/skybox_tiles/bbh.3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00004, "textures/skybox_tiles/bbh.4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00005, "textures/skybox_tiles/bbh.5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00006, "textures/skybox_tiles/bbh.6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00007, "textures/skybox_tiles/bbh.7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00008, "textures/skybox_tiles/bbh.8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00009, "textures/skybox_tiles/bbh.9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0000A, "textures/skybox_tiles/bbh.10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0000B, "textures/skybox_tiles/bbh.11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0000C, "textures/skybox_tiles/bbh.12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0000D, "textures/skybox_tiles/bbh.13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0000E, "textures/skybox_tiles/bbh.14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0000F, "textures/skybox_tiles/bbh.15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00010, "textures/skybox_tiles/bbh.16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00011, "textures/skybox_tiles/bbh.17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00012, "textures/skybox_tiles/bbh.18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00013, "textures/skybox_tiles/bbh.19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00014, "textures/skybox_tiles/bbh.20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00015, "textures/skybox_tiles/bbh.21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00016, "textures/skybox_tiles/bbh.22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00017, "textures/skybox_tiles/bbh.23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00018, "textures/skybox_tiles/bbh.24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00019, "textures/skybox_tiles/bbh.25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0001A, "textures/skybox_tiles/bbh.26.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0001B, "textures/skybox_tiles/bbh.27.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0001C, "textures/skybox_tiles/bbh.28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0001D, "textures/skybox_tiles/bbh.29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0001E, "textures/skybox_tiles/bbh.30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_0001F, "textures/skybox_tiles/bbh.31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00020, "textures/skybox_tiles/bbh.32.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00021, "textures/skybox_tiles/bbh.33.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00022, "textures/skybox_tiles/bbh.34.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00023, "textures/skybox_tiles/bbh.35.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00024, "textures/skybox_tiles/bbh.36.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00025, "textures/skybox_tiles/bbh.37.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00026, "textures/skybox_tiles/bbh.38.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00027, "textures/skybox_tiles/bbh.39.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bbh_skybox_texture_00028, "textures/skybox_tiles/bbh.40.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), - define_builtin_tex(bitdw_skybox_texture_00000, "textures/skybox_tiles/bitdw.0.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00001, "textures/skybox_tiles/bitdw.1.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00002, "textures/skybox_tiles/bitdw.2.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00003, "textures/skybox_tiles/bitdw.3.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00004, "textures/skybox_tiles/bitdw.4.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00005, "textures/skybox_tiles/bitdw.5.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00006, "textures/skybox_tiles/bitdw.6.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00007, "textures/skybox_tiles/bitdw.7.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00008, "textures/skybox_tiles/bitdw.8.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00009, "textures/skybox_tiles/bitdw.9.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0000A, "textures/skybox_tiles/bitdw.10.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0000B, "textures/skybox_tiles/bitdw.11.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0000C, "textures/skybox_tiles/bitdw.12.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0000D, "textures/skybox_tiles/bitdw.13.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0000E, "textures/skybox_tiles/bitdw.14.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0000F, "textures/skybox_tiles/bitdw.15.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00010, "textures/skybox_tiles/bitdw.16.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00011, "textures/skybox_tiles/bitdw.17.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00012, "textures/skybox_tiles/bitdw.18.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00013, "textures/skybox_tiles/bitdw.19.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00014, "textures/skybox_tiles/bitdw.20.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00015, "textures/skybox_tiles/bitdw.21.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00016, "textures/skybox_tiles/bitdw.22.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00017, "textures/skybox_tiles/bitdw.23.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00018, "textures/skybox_tiles/bitdw.24.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00019, "textures/skybox_tiles/bitdw.25.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0001A, "textures/skybox_tiles/bitdw.26.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0001B, "textures/skybox_tiles/bitdw.27.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0001C, "textures/skybox_tiles/bitdw.28.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0001D, "textures/skybox_tiles/bitdw.29.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0001E, "textures/skybox_tiles/bitdw.30.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0001F, "textures/skybox_tiles/bitdw.31.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00020, "textures/skybox_tiles/bitdw.32.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00021, "textures/skybox_tiles/bitdw.33.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00022, "textures/skybox_tiles/bitdw.34.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00023, "textures/skybox_tiles/bitdw.35.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00024, "textures/skybox_tiles/bitdw.36.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00025, "textures/skybox_tiles/bitdw.37.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00026, "textures/skybox_tiles/bitdw.38.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00027, "textures/skybox_tiles/bitdw.39.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00028, "textures/skybox_tiles/bitdw.40.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00029, "textures/skybox_tiles/bitdw.41.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0002A, "textures/skybox_tiles/bitdw.42.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0002B, "textures/skybox_tiles/bitdw.43.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0002C, "textures/skybox_tiles/bitdw.44.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0002D, "textures/skybox_tiles/bitdw.45.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0002E, "textures/skybox_tiles/bitdw.46.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0002F, "textures/skybox_tiles/bitdw.47.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00030, "textures/skybox_tiles/bitdw.48.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00031, "textures/skybox_tiles/bitdw.49.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00032, "textures/skybox_tiles/bitdw.50.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00033, "textures/skybox_tiles/bitdw.51.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00034, "textures/skybox_tiles/bitdw.52.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00035, "textures/skybox_tiles/bitdw.53.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00036, "textures/skybox_tiles/bitdw.54.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00037, "textures/skybox_tiles/bitdw.55.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00038, "textures/skybox_tiles/bitdw.56.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_00039, "textures/skybox_tiles/bitdw.57.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0003A, "textures/skybox_tiles/bitdw.58.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0003B, "textures/skybox_tiles/bitdw.59.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0003C, "textures/skybox_tiles/bitdw.60.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0003D, "textures/skybox_tiles/bitdw.61.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0003E, "textures/skybox_tiles/bitdw.62.rgba16.png", 32, 32, 16), - define_builtin_tex(bitdw_skybox_texture_0003F, "textures/skybox_tiles/bitdw.63.rgba16.png", 32, 32, 16), + define_builtin_tex(bitdw_skybox_texture_00000, "textures/skybox_tiles/bitdw.0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00001, "textures/skybox_tiles/bitdw.1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00002, "textures/skybox_tiles/bitdw.2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00003, "textures/skybox_tiles/bitdw.3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00004, "textures/skybox_tiles/bitdw.4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00005, "textures/skybox_tiles/bitdw.5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00006, "textures/skybox_tiles/bitdw.6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00007, "textures/skybox_tiles/bitdw.7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00008, "textures/skybox_tiles/bitdw.8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00009, "textures/skybox_tiles/bitdw.9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0000A, "textures/skybox_tiles/bitdw.10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0000B, "textures/skybox_tiles/bitdw.11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0000C, "textures/skybox_tiles/bitdw.12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0000D, "textures/skybox_tiles/bitdw.13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0000E, "textures/skybox_tiles/bitdw.14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0000F, "textures/skybox_tiles/bitdw.15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00010, "textures/skybox_tiles/bitdw.16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00011, "textures/skybox_tiles/bitdw.17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00012, "textures/skybox_tiles/bitdw.18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00013, "textures/skybox_tiles/bitdw.19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00014, "textures/skybox_tiles/bitdw.20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00015, "textures/skybox_tiles/bitdw.21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00016, "textures/skybox_tiles/bitdw.22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00017, "textures/skybox_tiles/bitdw.23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00018, "textures/skybox_tiles/bitdw.24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00019, "textures/skybox_tiles/bitdw.25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0001A, "textures/skybox_tiles/bitdw.26.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0001B, "textures/skybox_tiles/bitdw.27.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0001C, "textures/skybox_tiles/bitdw.28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0001D, "textures/skybox_tiles/bitdw.29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0001E, "textures/skybox_tiles/bitdw.30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0001F, "textures/skybox_tiles/bitdw.31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00020, "textures/skybox_tiles/bitdw.32.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00021, "textures/skybox_tiles/bitdw.33.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00022, "textures/skybox_tiles/bitdw.34.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00023, "textures/skybox_tiles/bitdw.35.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00024, "textures/skybox_tiles/bitdw.36.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00025, "textures/skybox_tiles/bitdw.37.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00026, "textures/skybox_tiles/bitdw.38.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00027, "textures/skybox_tiles/bitdw.39.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00028, "textures/skybox_tiles/bitdw.40.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00029, "textures/skybox_tiles/bitdw.41.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0002A, "textures/skybox_tiles/bitdw.42.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0002B, "textures/skybox_tiles/bitdw.43.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0002C, "textures/skybox_tiles/bitdw.44.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0002D, "textures/skybox_tiles/bitdw.45.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0002E, "textures/skybox_tiles/bitdw.46.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0002F, "textures/skybox_tiles/bitdw.47.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00030, "textures/skybox_tiles/bitdw.48.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00031, "textures/skybox_tiles/bitdw.49.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00032, "textures/skybox_tiles/bitdw.50.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00033, "textures/skybox_tiles/bitdw.51.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00034, "textures/skybox_tiles/bitdw.52.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00035, "textures/skybox_tiles/bitdw.53.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00036, "textures/skybox_tiles/bitdw.54.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00037, "textures/skybox_tiles/bitdw.55.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00038, "textures/skybox_tiles/bitdw.56.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_00039, "textures/skybox_tiles/bitdw.57.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0003A, "textures/skybox_tiles/bitdw.58.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0003B, "textures/skybox_tiles/bitdw.59.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0003C, "textures/skybox_tiles/bitdw.60.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0003D, "textures/skybox_tiles/bitdw.61.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0003E, "textures/skybox_tiles/bitdw.62.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bitdw_skybox_texture_0003F, "textures/skybox_tiles/bitdw.63.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), - define_builtin_tex(clouds_skybox_texture_00000, "textures/skybox_tiles/clouds.0.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00001, "textures/skybox_tiles/clouds.1.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00002, "textures/skybox_tiles/clouds.2.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00003, "textures/skybox_tiles/clouds.3.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00004, "textures/skybox_tiles/clouds.4.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00005, "textures/skybox_tiles/clouds.5.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00006, "textures/skybox_tiles/clouds.6.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00007, "textures/skybox_tiles/clouds.7.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00008, "textures/skybox_tiles/clouds.8.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00009, "textures/skybox_tiles/clouds.9.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0000A, "textures/skybox_tiles/clouds.10.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0000B, "textures/skybox_tiles/clouds.11.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0000C, "textures/skybox_tiles/clouds.12.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0000D, "textures/skybox_tiles/clouds.13.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0000E, "textures/skybox_tiles/clouds.14.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0000F, "textures/skybox_tiles/clouds.15.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00010, "textures/skybox_tiles/clouds.16.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00011, "textures/skybox_tiles/clouds.17.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00012, "textures/skybox_tiles/clouds.18.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00013, "textures/skybox_tiles/clouds.19.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00014, "textures/skybox_tiles/clouds.20.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00015, "textures/skybox_tiles/clouds.21.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00016, "textures/skybox_tiles/clouds.22.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00017, "textures/skybox_tiles/clouds.23.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00018, "textures/skybox_tiles/clouds.24.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00019, "textures/skybox_tiles/clouds.25.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0001A, "textures/skybox_tiles/clouds.26.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0001B, "textures/skybox_tiles/clouds.27.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0001C, "textures/skybox_tiles/clouds.28.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0001D, "textures/skybox_tiles/clouds.29.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0001E, "textures/skybox_tiles/clouds.30.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_0001F, "textures/skybox_tiles/clouds.31.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00020, "textures/skybox_tiles/clouds.32.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00021, "textures/skybox_tiles/clouds.33.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00022, "textures/skybox_tiles/clouds.34.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00023, "textures/skybox_tiles/clouds.35.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00024, "textures/skybox_tiles/clouds.36.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00025, "textures/skybox_tiles/clouds.37.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00026, "textures/skybox_tiles/clouds.38.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00027, "textures/skybox_tiles/clouds.39.rgba16.png", 32, 32, 16), - define_builtin_tex(clouds_skybox_texture_00028, "textures/skybox_tiles/clouds.40.rgba16.png", 32, 32, 16), + define_builtin_tex(clouds_skybox_texture_00000, "textures/skybox_tiles/clouds.0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00001, "textures/skybox_tiles/clouds.1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00002, "textures/skybox_tiles/clouds.2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00003, "textures/skybox_tiles/clouds.3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00004, "textures/skybox_tiles/clouds.4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00005, "textures/skybox_tiles/clouds.5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00006, "textures/skybox_tiles/clouds.6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00007, "textures/skybox_tiles/clouds.7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00008, "textures/skybox_tiles/clouds.8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00009, "textures/skybox_tiles/clouds.9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0000A, "textures/skybox_tiles/clouds.10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0000B, "textures/skybox_tiles/clouds.11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0000C, "textures/skybox_tiles/clouds.12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0000D, "textures/skybox_tiles/clouds.13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0000E, "textures/skybox_tiles/clouds.14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0000F, "textures/skybox_tiles/clouds.15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00010, "textures/skybox_tiles/clouds.16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00011, "textures/skybox_tiles/clouds.17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00012, "textures/skybox_tiles/clouds.18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00013, "textures/skybox_tiles/clouds.19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00014, "textures/skybox_tiles/clouds.20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00015, "textures/skybox_tiles/clouds.21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00016, "textures/skybox_tiles/clouds.22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00017, "textures/skybox_tiles/clouds.23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00018, "textures/skybox_tiles/clouds.24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00019, "textures/skybox_tiles/clouds.25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0001A, "textures/skybox_tiles/clouds.26.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0001B, "textures/skybox_tiles/clouds.27.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0001C, "textures/skybox_tiles/clouds.28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0001D, "textures/skybox_tiles/clouds.29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0001E, "textures/skybox_tiles/clouds.30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_0001F, "textures/skybox_tiles/clouds.31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00020, "textures/skybox_tiles/clouds.32.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00021, "textures/skybox_tiles/clouds.33.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00022, "textures/skybox_tiles/clouds.34.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00023, "textures/skybox_tiles/clouds.35.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00024, "textures/skybox_tiles/clouds.36.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00025, "textures/skybox_tiles/clouds.37.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00026, "textures/skybox_tiles/clouds.38.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00027, "textures/skybox_tiles/clouds.39.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(clouds_skybox_texture_00028, "textures/skybox_tiles/clouds.40.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), - define_builtin_tex(bits_skybox_texture_00000, "textures/skybox_tiles/bits.0.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00001, "textures/skybox_tiles/bits.1.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00002, "textures/skybox_tiles/bits.2.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00003, "textures/skybox_tiles/bits.3.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00004, "textures/skybox_tiles/bits.4.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00005, "textures/skybox_tiles/bits.5.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00006, "textures/skybox_tiles/bits.6.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00007, "textures/skybox_tiles/bits.7.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00008, "textures/skybox_tiles/bits.8.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00009, "textures/skybox_tiles/bits.9.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0000A, "textures/skybox_tiles/bits.10.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0000B, "textures/skybox_tiles/bits.11.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0000C, "textures/skybox_tiles/bits.12.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0000D, "textures/skybox_tiles/bits.13.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0000E, "textures/skybox_tiles/bits.14.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0000F, "textures/skybox_tiles/bits.15.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00010, "textures/skybox_tiles/bits.16.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00011, "textures/skybox_tiles/bits.17.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00012, "textures/skybox_tiles/bits.18.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00013, "textures/skybox_tiles/bits.19.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00014, "textures/skybox_tiles/bits.20.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00015, "textures/skybox_tiles/bits.21.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00016, "textures/skybox_tiles/bits.22.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00017, "textures/skybox_tiles/bits.23.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00018, "textures/skybox_tiles/bits.24.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00019, "textures/skybox_tiles/bits.25.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0001A, "textures/skybox_tiles/bits.26.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0001B, "textures/skybox_tiles/bits.27.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0001C, "textures/skybox_tiles/bits.28.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0001D, "textures/skybox_tiles/bits.29.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0001E, "textures/skybox_tiles/bits.30.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0001F, "textures/skybox_tiles/bits.31.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00020, "textures/skybox_tiles/bits.32.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00021, "textures/skybox_tiles/bits.33.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00022, "textures/skybox_tiles/bits.34.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00023, "textures/skybox_tiles/bits.35.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00024, "textures/skybox_tiles/bits.36.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00025, "textures/skybox_tiles/bits.37.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00026, "textures/skybox_tiles/bits.38.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00027, "textures/skybox_tiles/bits.39.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00028, "textures/skybox_tiles/bits.40.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00029, "textures/skybox_tiles/bits.41.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0002A, "textures/skybox_tiles/bits.42.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0002B, "textures/skybox_tiles/bits.43.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0002C, "textures/skybox_tiles/bits.44.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0002D, "textures/skybox_tiles/bits.45.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0002E, "textures/skybox_tiles/bits.46.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0002F, "textures/skybox_tiles/bits.47.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00030, "textures/skybox_tiles/bits.48.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00031, "textures/skybox_tiles/bits.49.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00032, "textures/skybox_tiles/bits.50.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00033, "textures/skybox_tiles/bits.51.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00034, "textures/skybox_tiles/bits.52.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00035, "textures/skybox_tiles/bits.53.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00036, "textures/skybox_tiles/bits.54.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00037, "textures/skybox_tiles/bits.55.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00038, "textures/skybox_tiles/bits.56.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_00039, "textures/skybox_tiles/bits.57.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0003A, "textures/skybox_tiles/bits.58.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0003B, "textures/skybox_tiles/bits.59.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0003C, "textures/skybox_tiles/bits.60.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0003D, "textures/skybox_tiles/bits.61.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0003E, "textures/skybox_tiles/bits.62.rgba16.png", 32, 32, 16), - define_builtin_tex(bits_skybox_texture_0003F, "textures/skybox_tiles/bits.63.rgba16.png", 32, 32, 16), + define_builtin_tex(bits_skybox_texture_00000, "textures/skybox_tiles/bits.0.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00001, "textures/skybox_tiles/bits.1.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00002, "textures/skybox_tiles/bits.2.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00003, "textures/skybox_tiles/bits.3.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00004, "textures/skybox_tiles/bits.4.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00005, "textures/skybox_tiles/bits.5.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00006, "textures/skybox_tiles/bits.6.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00007, "textures/skybox_tiles/bits.7.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00008, "textures/skybox_tiles/bits.8.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00009, "textures/skybox_tiles/bits.9.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0000A, "textures/skybox_tiles/bits.10.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0000B, "textures/skybox_tiles/bits.11.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0000C, "textures/skybox_tiles/bits.12.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0000D, "textures/skybox_tiles/bits.13.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0000E, "textures/skybox_tiles/bits.14.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0000F, "textures/skybox_tiles/bits.15.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00010, "textures/skybox_tiles/bits.16.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00011, "textures/skybox_tiles/bits.17.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00012, "textures/skybox_tiles/bits.18.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00013, "textures/skybox_tiles/bits.19.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00014, "textures/skybox_tiles/bits.20.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00015, "textures/skybox_tiles/bits.21.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00016, "textures/skybox_tiles/bits.22.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00017, "textures/skybox_tiles/bits.23.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00018, "textures/skybox_tiles/bits.24.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00019, "textures/skybox_tiles/bits.25.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0001A, "textures/skybox_tiles/bits.26.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0001B, "textures/skybox_tiles/bits.27.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0001C, "textures/skybox_tiles/bits.28.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0001D, "textures/skybox_tiles/bits.29.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0001E, "textures/skybox_tiles/bits.30.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0001F, "textures/skybox_tiles/bits.31.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00020, "textures/skybox_tiles/bits.32.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00021, "textures/skybox_tiles/bits.33.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00022, "textures/skybox_tiles/bits.34.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00023, "textures/skybox_tiles/bits.35.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00024, "textures/skybox_tiles/bits.36.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00025, "textures/skybox_tiles/bits.37.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00026, "textures/skybox_tiles/bits.38.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00027, "textures/skybox_tiles/bits.39.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00028, "textures/skybox_tiles/bits.40.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00029, "textures/skybox_tiles/bits.41.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0002A, "textures/skybox_tiles/bits.42.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0002B, "textures/skybox_tiles/bits.43.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0002C, "textures/skybox_tiles/bits.44.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0002D, "textures/skybox_tiles/bits.45.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0002E, "textures/skybox_tiles/bits.46.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0002F, "textures/skybox_tiles/bits.47.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00030, "textures/skybox_tiles/bits.48.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00031, "textures/skybox_tiles/bits.49.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00032, "textures/skybox_tiles/bits.50.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00033, "textures/skybox_tiles/bits.51.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00034, "textures/skybox_tiles/bits.52.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00035, "textures/skybox_tiles/bits.53.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00036, "textures/skybox_tiles/bits.54.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00037, "textures/skybox_tiles/bits.55.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00038, "textures/skybox_tiles/bits.56.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_00039, "textures/skybox_tiles/bits.57.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0003A, "textures/skybox_tiles/bits.58.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0003B, "textures/skybox_tiles/bits.59.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0003C, "textures/skybox_tiles/bits.60.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0003D, "textures/skybox_tiles/bits.61.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0003E, "textures/skybox_tiles/bits.62.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(bits_skybox_texture_0003F, "textures/skybox_tiles/bits.63.rgba16.png", 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), - define_builtin_tex(cake_end_texture_0, "levels/ending/cake_end_texture_0.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_1, "levels/ending/cake_end_texture_1.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_2, "levels/ending/cake_end_texture_2.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_3, "levels/ending/cake_end_texture_3.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_4, "levels/ending/cake_end_texture_4.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_5, "levels/ending/cake_end_texture_5.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_6, "levels/ending/cake_end_texture_6.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_7, "levels/ending/cake_end_texture_7.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_8, "levels/ending/cake_end_texture_8.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_9, "levels/ending/cake_end_texture_9.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_10, "levels/ending/cake_end_texture_10.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_11, "levels/ending/cake_end_texture_11.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_12, "levels/ending/cake_end_texture_12.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_13, "levels/ending/cake_end_texture_13.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_14, "levels/ending/cake_end_texture_14.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_15, "levels/ending/cake_end_texture_15.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_16, "levels/ending/cake_end_texture_16.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_17, "levels/ending/cake_end_texture_17.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_18, "levels/ending/cake_end_texture_18.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_19, "levels/ending/cake_end_texture_19.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_20, "levels/ending/cake_end_texture_20.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_21, "levels/ending/cake_end_texture_21.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_22, "levels/ending/cake_end_texture_22.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_23, "levels/ending/cake_end_texture_23.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_24, "levels/ending/cake_end_texture_24.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_25, "levels/ending/cake_end_texture_25.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_26, "levels/ending/cake_end_texture_26.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_27, "levels/ending/cake_end_texture_27.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_28, "levels/ending/cake_end_texture_28.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_29, "levels/ending/cake_end_texture_29.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_30, "levels/ending/cake_end_texture_30.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_31, "levels/ending/cake_end_texture_31.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_32, "levels/ending/cake_end_texture_32.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_33, "levels/ending/cake_end_texture_33.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_34, "levels/ending/cake_end_texture_34.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_35, "levels/ending/cake_end_texture_35.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_36, "levels/ending/cake_end_texture_36.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_37, "levels/ending/cake_end_texture_37.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_38, "levels/ending/cake_end_texture_38.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_39, "levels/ending/cake_end_texture_39.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_40, "levels/ending/cake_end_texture_40.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_41, "levels/ending/cake_end_texture_41.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_42, "levels/ending/cake_end_texture_42.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_43, "levels/ending/cake_end_texture_43.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_44, "levels/ending/cake_end_texture_44.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_45, "levels/ending/cake_end_texture_45.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_46, "levels/ending/cake_end_texture_46.png", 80, 20, 16), - define_builtin_tex(cake_end_texture_47, "levels/ending/cake_end_texture_47.png", 80, 20, 16), + define_builtin_tex(cake_end_texture_0, "levels/ending/cake_end_texture_0.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_1, "levels/ending/cake_end_texture_1.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_2, "levels/ending/cake_end_texture_2.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_3, "levels/ending/cake_end_texture_3.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_4, "levels/ending/cake_end_texture_4.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_5, "levels/ending/cake_end_texture_5.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_6, "levels/ending/cake_end_texture_6.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_7, "levels/ending/cake_end_texture_7.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_8, "levels/ending/cake_end_texture_8.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_9, "levels/ending/cake_end_texture_9.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_10, "levels/ending/cake_end_texture_10.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_11, "levels/ending/cake_end_texture_11.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_12, "levels/ending/cake_end_texture_12.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_13, "levels/ending/cake_end_texture_13.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_14, "levels/ending/cake_end_texture_14.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_15, "levels/ending/cake_end_texture_15.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_16, "levels/ending/cake_end_texture_16.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_17, "levels/ending/cake_end_texture_17.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_18, "levels/ending/cake_end_texture_18.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_19, "levels/ending/cake_end_texture_19.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_20, "levels/ending/cake_end_texture_20.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_21, "levels/ending/cake_end_texture_21.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_22, "levels/ending/cake_end_texture_22.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_23, "levels/ending/cake_end_texture_23.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_24, "levels/ending/cake_end_texture_24.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_25, "levels/ending/cake_end_texture_25.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_26, "levels/ending/cake_end_texture_26.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_27, "levels/ending/cake_end_texture_27.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_28, "levels/ending/cake_end_texture_28.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_29, "levels/ending/cake_end_texture_29.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_30, "levels/ending/cake_end_texture_30.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_31, "levels/ending/cake_end_texture_31.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_32, "levels/ending/cake_end_texture_32.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_33, "levels/ending/cake_end_texture_33.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_34, "levels/ending/cake_end_texture_34.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_35, "levels/ending/cake_end_texture_35.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_36, "levels/ending/cake_end_texture_36.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_37, "levels/ending/cake_end_texture_37.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_38, "levels/ending/cake_end_texture_38.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_39, "levels/ending/cake_end_texture_39.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_40, "levels/ending/cake_end_texture_40.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_41, "levels/ending/cake_end_texture_41.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_42, "levels/ending/cake_end_texture_42.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_43, "levels/ending/cake_end_texture_43.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_44, "levels/ending/cake_end_texture_44.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_45, "levels/ending/cake_end_texture_45.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_46, "levels/ending/cake_end_texture_46.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(cake_end_texture_47, "levels/ending/cake_end_texture_47.png", 80, 20, G_IM_FMT_RGBA, G_IM_SIZ_16b), #if defined(VERSION_JP) - define_builtin_tex(texture_menu_font_char_jp_0, "levels/menu/main_menu_seg7.0AC48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_1, "levels/menu/main_menu_seg7.0AC88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_2, "levels/menu/main_menu_seg7.0ACC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_3, "levels/menu/main_menu_seg7.0AD08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_4, "levels/menu/main_menu_seg7.0AD48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_5, "levels/menu/main_menu_seg7.0AD88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_6, "levels/menu/main_menu_seg7.0ADC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_7, "levels/menu/main_menu_seg7.0AE08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_8, "levels/menu/main_menu_seg7.0AE48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_9, "levels/menu/main_menu_seg7.0AE88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_a, "levels/menu/main_menu_seg7.0AEC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_i, "levels/menu/main_menu_seg7.0AF08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_u, "levels/menu/main_menu_seg7.0AF48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_c, "levels/menu/main_menu_seg7.0AF88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_o, "levels/menu/main_menu_seg7.0AFC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ka, "levels/menu/main_menu_seg7.0B008.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ki, "levels/menu/main_menu_seg7.0B048.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ku, "levels/menu/main_menu_seg7.0B088.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ke, "levels/menu/main_menu_seg7.0B0C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ko, "levels/menu/main_menu_seg7.0B108.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_sa, "levels/menu/main_menu_seg7.0B148.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_shi, "levels/menu/main_menu_seg7.0B188.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_su, "levels/menu/main_menu_seg7.0B1C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_se, "levels/menu/main_menu_seg7.0B208.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_so, "levels/menu/main_menu_seg7.0B248.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ta, "levels/menu/main_menu_seg7.0B288.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_chi, "levels/menu/main_menu_seg7.0B2C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_tsu, "levels/menu/main_menu_seg7.0B308.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_te, "levels/menu/main_menu_seg7.0B348.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_to, "levels/menu/main_menu_seg7.0B388.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_na, "levels/menu/main_menu_seg7.0B3C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ni, "levels/menu/main_menu_seg7.0B408.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_nu, "levels/menu/main_menu_seg7.0B448.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ne, "levels/menu/main_menu_seg7.0B488.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_no, "levels/menu/main_menu_seg7.0B4C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ha, "levels/menu/main_menu_seg7.0B508.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_hi, "levels/menu/main_menu_seg7.0B548.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_hu, "levels/menu/main_menu_seg7.0B588.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_he, "levels/menu/main_menu_seg7.0B5C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ho, "levels/menu/main_menu_seg7.0B608.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ma, "levels/menu/main_menu_seg7.0B648.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_mi, "levels/menu/main_menu_seg7.0B688.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_mu, "levels/menu/main_menu_seg7.0B6C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_me, "levels/menu/main_menu_seg7.0B708.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_mo, "levels/menu/main_menu_seg7.0B748.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ya, "levels/menu/main_menu_seg7.0B788.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_yu, "levels/menu/main_menu_seg7.0B7C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_yo, "levels/menu/main_menu_seg7.0B808.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ra, "levels/menu/main_menu_seg7.0B848.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ri, "levels/menu/main_menu_seg7.0B888.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ru, "levels/menu/main_menu_seg7.0B8C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_re, "levels/menu/main_menu_seg7.0B908.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_ro, "levels/menu/main_menu_seg7.0B948.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_wa, "levels/menu/main_menu_seg7.0B988.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_wo, "levels/menu/main_menu_seg7.0B9C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_n, "levels/menu/main_menu_seg7.0BA08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_small_a, "levels/menu/main_menu_seg7.0BA48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_small_i, "levels/menu/main_menu_seg7.0BA88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_small_u, "levels/menu/main_menu_seg7.0BAC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_small_e, "levels/menu/main_menu_seg7.0BB08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_small_o, "levels/menu/main_menu_seg7.0BB48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_small_ka, "levels/menu/main_menu_seg7.0BB88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_small_yu, "levels/menu/main_menu_seg7.0BBC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_small_yo, "levels/menu/main_menu_seg7.0BC08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_hiragana_small_tsu, "levels/menu/main_menu_seg7.0BC48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_handakuten, "levels/menu/main_menu_seg7.0BC88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_dakuten, "levels/menu/main_menu_seg7.0BCC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_long_vowel, "levels/menu/main_menu_seg7.0BD08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_a, "levels/menu/main_menu_seg7.0BD48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_i, "levels/menu/main_menu_seg7.0BD88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_u, "levels/menu/main_menu_seg7.0BDC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_e, "levels/menu/main_menu_seg7.0BE08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_o, "levels/menu/main_menu_seg7.0BE48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ka, "levels/menu/main_menu_seg7.0BE88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ki, "levels/menu/main_menu_seg7.0BEC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ku, "levels/menu/main_menu_seg7.0BF08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ke, "levels/menu/main_menu_seg7.0BF48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ko, "levels/menu/main_menu_seg7.0BF88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_sa, "levels/menu/main_menu_seg7.0BFC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_shi, "levels/menu/main_menu_seg7.0C008.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_su, "levels/menu/main_menu_seg7.0C048.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_se, "levels/menu/main_menu_seg7.0C088.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_so, "levels/menu/main_menu_seg7.0C0C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ta, "levels/menu/main_menu_seg7.0C108.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_chi, "levels/menu/main_menu_seg7.0C148.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_tsu, "levels/menu/main_menu_seg7.0C188.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_te, "levels/menu/main_menu_seg7.0C1C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_to, "levels/menu/main_menu_seg7.0C208.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_na, "levels/menu/main_menu_seg7.0C248.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ni, "levels/menu/main_menu_seg7.0C288.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_nu, "levels/menu/main_menu_seg7.0C2C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ne, "levels/menu/main_menu_seg7.0C308.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_no, "levels/menu/main_menu_seg7.0C348.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ha, "levels/menu/main_menu_seg7.0C388.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_hi, "levels/menu/main_menu_seg7.0C3C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_hu, "levels/menu/main_menu_seg7.0C408.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_he, "levels/menu/main_menu_seg7.0C448.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ho, "levels/menu/main_menu_seg7.0C488.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ma, "levels/menu/main_menu_seg7.0C4C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_mi, "levels/menu/main_menu_seg7.0C508.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_mu, "levels/menu/main_menu_seg7.0C548.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_me, "levels/menu/main_menu_seg7.0C588.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_mo, "levels/menu/main_menu_seg7.0C5C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ya, "levels/menu/main_menu_seg7.0C608.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_yu, "levels/menu/main_menu_seg7.0C648.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_yo, "levels/menu/main_menu_seg7.0C688.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ra, "levels/menu/main_menu_seg7.0C6C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ri, "levels/menu/main_menu_seg7.0C708.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ru, "levels/menu/main_menu_seg7.0C748.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_re, "levels/menu/main_menu_seg7.0C788.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_ro, "levels/menu/main_menu_seg7.0C7C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_wa, "levels/menu/main_menu_seg7.0C808.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_wo, "levels/menu/main_menu_seg7.0C848.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_n, "levels/menu/main_menu_seg7.0C888.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_small_a, "levels/menu/main_menu_seg7.0C8C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_small_i, "levels/menu/main_menu_seg7.0C908.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_small_u, "levels/menu/main_menu_seg7.0C948.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_small_e, "levels/menu/main_menu_seg7.0C988.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_small_o, "levels/menu/main_menu_seg7.0C9C8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_small_ka, "levels/menu/main_menu_seg7.0CA08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_small_yu, "levels/menu/main_menu_seg7.0CA48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_small_yo, "levels/menu/main_menu_seg7.0CA88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_katakana_small_tsu, "levels/menu/main_menu_seg7.0CAC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_A, "levels/menu/main_menu_seg7.0CB08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_B, "levels/menu/main_menu_seg7.0CB48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_C, "levels/menu/main_menu_seg7.0CB88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_D, "levels/menu/main_menu_seg7.0CBC8.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_coin, "levels/menu/main_menu_seg7.0CC08.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_star_filled, "levels/menu/main_menu_seg7.0CC48.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_multiply, "levels/menu/main_menu_seg7.0CC88.ia8.png", 8, 8, 8), - define_builtin_tex(texture_menu_font_char_jp_exclamation, "levels/menu/main_menu_seg7.0CCC8.ia8.png", 8, 8, 8), + define_builtin_tex(texture_menu_font_char_jp_0, "levels/menu/main_menu_seg7.0AC48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_1, "levels/menu/main_menu_seg7.0AC88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_2, "levels/menu/main_menu_seg7.0ACC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_3, "levels/menu/main_menu_seg7.0AD08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_4, "levels/menu/main_menu_seg7.0AD48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_5, "levels/menu/main_menu_seg7.0AD88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_6, "levels/menu/main_menu_seg7.0ADC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_7, "levels/menu/main_menu_seg7.0AE08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_8, "levels/menu/main_menu_seg7.0AE48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_9, "levels/menu/main_menu_seg7.0AE88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_a, "levels/menu/main_menu_seg7.0AEC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_i, "levels/menu/main_menu_seg7.0AF08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_u, "levels/menu/main_menu_seg7.0AF48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_c, "levels/menu/main_menu_seg7.0AF88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_o, "levels/menu/main_menu_seg7.0AFC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ka, "levels/menu/main_menu_seg7.0B008.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ki, "levels/menu/main_menu_seg7.0B048.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ku, "levels/menu/main_menu_seg7.0B088.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ke, "levels/menu/main_menu_seg7.0B0C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ko, "levels/menu/main_menu_seg7.0B108.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_sa, "levels/menu/main_menu_seg7.0B148.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_shi, "levels/menu/main_menu_seg7.0B188.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_su, "levels/menu/main_menu_seg7.0B1C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_se, "levels/menu/main_menu_seg7.0B208.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_so, "levels/menu/main_menu_seg7.0B248.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ta, "levels/menu/main_menu_seg7.0B288.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_chi, "levels/menu/main_menu_seg7.0B2C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_tsu, "levels/menu/main_menu_seg7.0B308.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_te, "levels/menu/main_menu_seg7.0B348.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_to, "levels/menu/main_menu_seg7.0B388.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_na, "levels/menu/main_menu_seg7.0B3C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ni, "levels/menu/main_menu_seg7.0B408.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_nu, "levels/menu/main_menu_seg7.0B448.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ne, "levels/menu/main_menu_seg7.0B488.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_no, "levels/menu/main_menu_seg7.0B4C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ha, "levels/menu/main_menu_seg7.0B508.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_hi, "levels/menu/main_menu_seg7.0B548.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_hu, "levels/menu/main_menu_seg7.0B588.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_he, "levels/menu/main_menu_seg7.0B5C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ho, "levels/menu/main_menu_seg7.0B608.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ma, "levels/menu/main_menu_seg7.0B648.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_mi, "levels/menu/main_menu_seg7.0B688.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_mu, "levels/menu/main_menu_seg7.0B6C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_me, "levels/menu/main_menu_seg7.0B708.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_mo, "levels/menu/main_menu_seg7.0B748.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ya, "levels/menu/main_menu_seg7.0B788.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_yu, "levels/menu/main_menu_seg7.0B7C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_yo, "levels/menu/main_menu_seg7.0B808.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ra, "levels/menu/main_menu_seg7.0B848.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ri, "levels/menu/main_menu_seg7.0B888.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ru, "levels/menu/main_menu_seg7.0B8C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_re, "levels/menu/main_menu_seg7.0B908.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_ro, "levels/menu/main_menu_seg7.0B948.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_wa, "levels/menu/main_menu_seg7.0B988.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_wo, "levels/menu/main_menu_seg7.0B9C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_n, "levels/menu/main_menu_seg7.0BA08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_small_a, "levels/menu/main_menu_seg7.0BA48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_small_i, "levels/menu/main_menu_seg7.0BA88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_small_u, "levels/menu/main_menu_seg7.0BAC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_small_e, "levels/menu/main_menu_seg7.0BB08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_small_o, "levels/menu/main_menu_seg7.0BB48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_small_ka, "levels/menu/main_menu_seg7.0BB88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_small_yu, "levels/menu/main_menu_seg7.0BBC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_small_yo, "levels/menu/main_menu_seg7.0BC08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_hiragana_small_tsu, "levels/menu/main_menu_seg7.0BC48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_handakuten, "levels/menu/main_menu_seg7.0BC88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_dakuten, "levels/menu/main_menu_seg7.0BCC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_long_vowel, "levels/menu/main_menu_seg7.0BD08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_a, "levels/menu/main_menu_seg7.0BD48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_i, "levels/menu/main_menu_seg7.0BD88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_u, "levels/menu/main_menu_seg7.0BDC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_e, "levels/menu/main_menu_seg7.0BE08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_o, "levels/menu/main_menu_seg7.0BE48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ka, "levels/menu/main_menu_seg7.0BE88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ki, "levels/menu/main_menu_seg7.0BEC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ku, "levels/menu/main_menu_seg7.0BF08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ke, "levels/menu/main_menu_seg7.0BF48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ko, "levels/menu/main_menu_seg7.0BF88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_sa, "levels/menu/main_menu_seg7.0BFC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_shi, "levels/menu/main_menu_seg7.0C008.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_su, "levels/menu/main_menu_seg7.0C048.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_se, "levels/menu/main_menu_seg7.0C088.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_so, "levels/menu/main_menu_seg7.0C0C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ta, "levels/menu/main_menu_seg7.0C108.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_chi, "levels/menu/main_menu_seg7.0C148.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_tsu, "levels/menu/main_menu_seg7.0C188.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_te, "levels/menu/main_menu_seg7.0C1C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_to, "levels/menu/main_menu_seg7.0C208.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_na, "levels/menu/main_menu_seg7.0C248.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ni, "levels/menu/main_menu_seg7.0C288.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_nu, "levels/menu/main_menu_seg7.0C2C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ne, "levels/menu/main_menu_seg7.0C308.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_no, "levels/menu/main_menu_seg7.0C348.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ha, "levels/menu/main_menu_seg7.0C388.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_hi, "levels/menu/main_menu_seg7.0C3C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_hu, "levels/menu/main_menu_seg7.0C408.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_he, "levels/menu/main_menu_seg7.0C448.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ho, "levels/menu/main_menu_seg7.0C488.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ma, "levels/menu/main_menu_seg7.0C4C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_mi, "levels/menu/main_menu_seg7.0C508.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_mu, "levels/menu/main_menu_seg7.0C548.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_me, "levels/menu/main_menu_seg7.0C588.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_mo, "levels/menu/main_menu_seg7.0C5C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ya, "levels/menu/main_menu_seg7.0C608.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_yu, "levels/menu/main_menu_seg7.0C648.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_yo, "levels/menu/main_menu_seg7.0C688.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ra, "levels/menu/main_menu_seg7.0C6C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ri, "levels/menu/main_menu_seg7.0C708.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ru, "levels/menu/main_menu_seg7.0C748.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_re, "levels/menu/main_menu_seg7.0C788.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_ro, "levels/menu/main_menu_seg7.0C7C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_wa, "levels/menu/main_menu_seg7.0C808.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_wo, "levels/menu/main_menu_seg7.0C848.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_n, "levels/menu/main_menu_seg7.0C888.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_small_a, "levels/menu/main_menu_seg7.0C8C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_small_i, "levels/menu/main_menu_seg7.0C908.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_small_u, "levels/menu/main_menu_seg7.0C948.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_small_e, "levels/menu/main_menu_seg7.0C988.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_small_o, "levels/menu/main_menu_seg7.0C9C8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_small_ka, "levels/menu/main_menu_seg7.0CA08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_small_yu, "levels/menu/main_menu_seg7.0CA48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_small_yo, "levels/menu/main_menu_seg7.0CA88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_katakana_small_tsu, "levels/menu/main_menu_seg7.0CAC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_A, "levels/menu/main_menu_seg7.0CB08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_B, "levels/menu/main_menu_seg7.0CB48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_C, "levels/menu/main_menu_seg7.0CB88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_D, "levels/menu/main_menu_seg7.0CBC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_coin, "levels/menu/main_menu_seg7.0CC08.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_star_filled, "levels/menu/main_menu_seg7.0CC48.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_multiply, "levels/menu/main_menu_seg7.0CC88.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_jp_exclamation, "levels/menu/main_menu_seg7.0CCC8.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), #else - define_builtin_tex(texture_menu_font_char_0, "levels/menu/main_menu_seg7_us.0AC40.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_1, "levels/menu/main_menu_seg7_us.0AC80.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_2, "levels/menu/main_menu_seg7_us.0ACC0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_3, "levels/menu/main_menu_seg7_us.0AD00.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_4, "levels/menu/main_menu_seg7_us.0AD40.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_5, "levels/menu/main_menu_seg7_us.0AD80.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_6, "levels/menu/main_menu_seg7_us.0ADC0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_7, "levels/menu/main_menu_seg7_us.0AE00.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_8, "levels/menu/main_menu_seg7_us.0AE40.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_9, "levels/menu/main_menu_seg7_us.0AE80.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_A, "levels/menu/main_menu_seg7_us.0AEC0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_B, "levels/menu/main_menu_seg7_us.0AF00.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_C, "levels/menu/main_menu_seg7_us.0AF40.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_E, "levels/menu/main_menu_seg7_us.0AFC0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_F, "levels/menu/main_menu_seg7_us.0B000.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_G, "levels/menu/main_menu_seg7_us.0B040.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_H, "levels/menu/main_menu_seg7_us.0B080.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_I, "levels/menu/main_menu_seg7_us.0B0C0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_J, "levels/menu/main_menu_seg7_us.0B100.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_K, "levels/menu/main_menu_seg7_us.0B140.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_L, "levels/menu/main_menu_seg7_us.0B180.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_M, "levels/menu/main_menu_seg7_us.0B1C0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_N, "levels/menu/main_menu_seg7_us.0B200.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_O, "levels/menu/main_menu_seg7_us.0B240.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_P, "levels/menu/main_menu_seg7_us.0B280.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_Q, "levels/menu/main_menu_seg7_us.0B2C0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_R, "levels/menu/main_menu_seg7_us.0B300.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_S, "levels/menu/main_menu_seg7_us.0B340.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_T, "levels/menu/main_menu_seg7_us.0B380.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_U, "levels/menu/main_menu_seg7_us.0B3C0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_V, "levels/menu/main_menu_seg7_us.0B400.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_W, "levels/menu/main_menu_seg7_us.0B440.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_X, "levels/menu/main_menu_seg7_us.0B480.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_Y, "levels/menu/main_menu_seg7_us.0B4C0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_Z, "levels/menu/main_menu_seg7_us.0B500.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_coin, "levels/menu/main_menu_seg7_us.0B540.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_multiply, "levels/menu/main_menu_seg7_us.0B580.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_star_filled, "levels/menu/main_menu_seg7_us.0B5C0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_dash, "levels/menu/main_menu_seg7_us.0B600.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_comma, "levels/menu/main_menu_seg7_us.0B640.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_apostrophe, "levels/menu/main_menu_seg7_us.0B680.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_exclamation, "levels/menu/main_menu_seg7_us.0B6C0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_question, "levels/menu/main_menu_seg7_us.0B700.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_mface1, "levels/menu/main_menu_seg7_us.0B740.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_mface2, "levels/menu/main_menu_seg7_us.0B780.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_period, "levels/menu/main_menu_seg7_us.0B7C0.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_ampersand, "levels/menu/main_menu_seg7_us.0B800.ia8.png", 8, 8, 16), + define_builtin_tex(texture_menu_font_char_0, "levels/menu/main_menu_seg7_us.0AC40.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_1, "levels/menu/main_menu_seg7_us.0AC80.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_2, "levels/menu/main_menu_seg7_us.0ACC0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_3, "levels/menu/main_menu_seg7_us.0AD00.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_4, "levels/menu/main_menu_seg7_us.0AD40.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_5, "levels/menu/main_menu_seg7_us.0AD80.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_6, "levels/menu/main_menu_seg7_us.0ADC0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_7, "levels/menu/main_menu_seg7_us.0AE00.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_8, "levels/menu/main_menu_seg7_us.0AE40.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_9, "levels/menu/main_menu_seg7_us.0AE80.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_A, "levels/menu/main_menu_seg7_us.0AEC0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_B, "levels/menu/main_menu_seg7_us.0AF00.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_C, "levels/menu/main_menu_seg7_us.0AF40.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_E, "levels/menu/main_menu_seg7_us.0AFC0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_F, "levels/menu/main_menu_seg7_us.0B000.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_G, "levels/menu/main_menu_seg7_us.0B040.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_H, "levels/menu/main_menu_seg7_us.0B080.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_I, "levels/menu/main_menu_seg7_us.0B0C0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_J, "levels/menu/main_menu_seg7_us.0B100.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_K, "levels/menu/main_menu_seg7_us.0B140.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_L, "levels/menu/main_menu_seg7_us.0B180.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_M, "levels/menu/main_menu_seg7_us.0B1C0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_N, "levels/menu/main_menu_seg7_us.0B200.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_O, "levels/menu/main_menu_seg7_us.0B240.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_P, "levels/menu/main_menu_seg7_us.0B280.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_Q, "levels/menu/main_menu_seg7_us.0B2C0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_R, "levels/menu/main_menu_seg7_us.0B300.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_S, "levels/menu/main_menu_seg7_us.0B340.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_T, "levels/menu/main_menu_seg7_us.0B380.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_U, "levels/menu/main_menu_seg7_us.0B3C0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_V, "levels/menu/main_menu_seg7_us.0B400.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_W, "levels/menu/main_menu_seg7_us.0B440.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_X, "levels/menu/main_menu_seg7_us.0B480.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_Y, "levels/menu/main_menu_seg7_us.0B4C0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_Z, "levels/menu/main_menu_seg7_us.0B500.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_coin, "levels/menu/main_menu_seg7_us.0B540.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_multiply, "levels/menu/main_menu_seg7_us.0B580.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_star_filled, "levels/menu/main_menu_seg7_us.0B5C0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_dash, "levels/menu/main_menu_seg7_us.0B600.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_comma, "levels/menu/main_menu_seg7_us.0B640.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_apostrophe, "levels/menu/main_menu_seg7_us.0B680.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_exclamation, "levels/menu/main_menu_seg7_us.0B6C0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_question, "levels/menu/main_menu_seg7_us.0B700.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_mface1, "levels/menu/main_menu_seg7_us.0B740.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_mface2, "levels/menu/main_menu_seg7_us.0B780.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_period, "levels/menu/main_menu_seg7_us.0B7C0.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_ampersand, "levels/menu/main_menu_seg7_us.0B800.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), //define_builtin_tex(texture_menu_font_char_umlaut, "levels/menu/main_menu_seg7_eu.0B840.ia8.png"), //define_builtin_tex(texture_menu_font_char_cedilla_mayus, "levels/menu/main_menu_seg7_eu.0B880.ia8.png"), //define_builtin_tex(texture_menu_font_char_colon, "levels/menu/main_menu_seg7_eu.0B8C0.ia8.png"), @@ -2385,40 +2411,40 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { //define_builtin_tex(texture_menu_course_lower, "levels/menu/main_menu_seg7_eu.0EDA0.rgba16.png"), #ifdef ENHANCE_LEVEL_TEXTURES - define_builtin_tex(castle_courtyard_seg7_texture_07000000, "levels/castle_courtyard/0_custom.rgba16.png", 32, 64, 16), - define_builtin_tex(castle_grounds_seg7_texture_07003000, "levels/castle_grounds/6_custom.rgba16.png", 32, 64, 16), + define_builtin_tex(castle_courtyard_seg7_texture_07000000, "levels/castle_courtyard/0_custom.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(castle_grounds_seg7_texture_07003000, "levels/castle_grounds/6_custom.rgba16.png", 32, 64, G_IM_FMT_RGBA, G_IM_SIZ_16b), #endif #ifdef VERSION_EU - define_builtin_tex(texture_menu_font_char_D, "levels/menu/main_menu_seg7_eu.0AF80.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_comma, "levels/menu/main_menu_seg7_eu.0B640.ia8.png", 8, 8, 16), - define_builtin_tex(texture_menu_font_char_apostrophe, "levels/menu/main_menu_seg7_eu.0B680.ia8.png", 8, 8, 16), + define_builtin_tex(texture_menu_font_char_D, "levels/menu/main_menu_seg7_eu.0AF80.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_comma, "levels/menu/main_menu_seg7_eu.0B640.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), + define_builtin_tex(texture_menu_font_char_apostrophe, "levels/menu/main_menu_seg7_eu.0B680.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), #else - define_builtin_tex(texture_menu_font_char_D, "levels/menu/main_menu_seg7_us.0AF80.ia8.png", 8, 8, 16), + define_builtin_tex(texture_menu_font_char_D, "levels/menu/main_menu_seg7_us.0AF80.ia8.png", 8, 8, G_IM_FMT_IA, G_IM_SIZ_8b), #endif #endif #if defined(VERSION_JP) - define_builtin_tex(inside_castle_seg7_texture_07010800, "levels/castle_inside/23.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07011800, "levels/castle_inside/24.rgba16.png", 64, 32, 16), + define_builtin_tex(inside_castle_seg7_texture_07010800, "levels/castle_inside/23.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07011800, "levels/castle_inside/24.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), #else - define_builtin_tex(inside_castle_seg7_texture_07010800, "levels/castle_inside/23_us.rgba16.png", 64, 32, 16), - define_builtin_tex(inside_castle_seg7_texture_07011800, "levels/castle_inside/24_us.rgba16.png", 64, 32, 16), + define_builtin_tex(inside_castle_seg7_texture_07010800, "levels/castle_inside/23_us.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), + define_builtin_tex(inside_castle_seg7_texture_07011800, "levels/castle_inside/24_us.rgba16.png", 64, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b), #endif #ifndef VERSION_JP - define_builtin_tex(castle_grounds_seg7_us_texture_0700EAE8, "levels/castle_grounds/5.ia8.png", 64, 32, 8), + define_builtin_tex(castle_grounds_seg7_us_texture_0700EAE8, "levels/castle_grounds/5.ia8.png", 64, 32, G_IM_FMT_IA, G_IM_SIZ_8b), #endif #ifdef VERSION_EU - define_builtin_tex(intro_seg7_texture_0700B4A0, "levels/intro/2_eu_copyright.rgba16.png", 128, 16, 16), + define_builtin_tex(intro_seg7_texture_0700B4A0, "levels/intro/2_eu_copyright.rgba16.png", 128, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), #else - define_builtin_tex(intro_seg7_texture_0700B4A0, "levels/intro/2_copyright.rgba16.png", 128, 16, 16), + define_builtin_tex(intro_seg7_texture_0700B4A0, "levels/intro/2_copyright.rgba16.png", 128, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), #endif #ifndef VERSION_EU - define_builtin_tex(intro_seg7_texture_0700C4A0, "levels/intro/3_tm.rgba16.png", 16, 16, 16), + define_builtin_tex(intro_seg7_texture_0700C4A0, "levels/intro/3_tm.rgba16.png", 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b), #endif }; @@ -2426,8 +2452,8 @@ const Texture* DynOS_Builtin_Tex_GetFromName(const char* aDataName) { size_t count = sizeof(sDynosBuiltinTexs) / (sizeof(struct BuiltinTexInfo)); for (size_t i = 0; i < count; i++) { const struct BuiltinTexInfo* info = &sDynosBuiltinTexs[i]; - if (!strcmp(info->identifier, aDataName)) { - return (const Texture*)info->pointer; + if (!strcmp(info->info.name, aDataName)) { + return (const Texture*)info->info.texture; } } @@ -2438,8 +2464,8 @@ const char* DynOS_Builtin_Tex_GetFromData(const Texture* aData) { size_t count = sizeof(sDynosBuiltinTexs) / (sizeof(struct BuiltinTexInfo)); for (size_t i = 0; i < count; i++) { const struct BuiltinTexInfo* info = &sDynosBuiltinTexs[i]; - if (info->pointer == aData) { - return info->identifier; + if (info->info.texture == aData) { + return info->info.name; } } @@ -2451,31 +2477,31 @@ const char* DynOS_Builtin_Tex_GetNameFromFileName(const char* aDataName) { for (size_t i = 0; i < count; i++) { const struct BuiltinTexInfo* info = &sDynosBuiltinTexs[i]; if (!strcmp(info->path, aDataName)) { - return info->identifier; + return info->info.name; } } return NULL; } -const struct BuiltinTexInfo* DynOS_Builtin_Tex_GetInfoFromName(const char* aDataName) { +const struct TextureInfo* DynOS_Builtin_Tex_GetInfoFromName(const char* aDataName) { size_t count = sizeof(sDynosBuiltinTexs) / (sizeof(struct BuiltinTexInfo)); for (size_t i = 0; i < count; i++) { const struct BuiltinTexInfo* info = &sDynosBuiltinTexs[i]; - if (!strcmp(info->identifier, aDataName)) { - return info; + if (!strcmp(info->info.name, aDataName)) { + return &info->info; } } return NULL; } -const struct BuiltinTexInfo* DynOS_Builtin_Tex_GetInfoFromData(const Texture* aData) { +const struct TextureInfo* DynOS_Builtin_Tex_GetInfoFromData(const Texture* aData) { size_t count = sizeof(sDynosBuiltinTexs) / (sizeof(struct BuiltinTexInfo)); for (size_t i = 0; i < count; i++) { const struct BuiltinTexInfo* info = &sDynosBuiltinTexs[i]; - if (info->pointer == aData) { - return info; + if (info->info.texture == aData) { + return &info->info; } } diff --git a/data/dynos_mgr_col.cpp b/data/dynos_mgr_col.cpp index 9a6d5f4db..66bf497ae 100644 --- a/data/dynos_mgr_col.cpp +++ b/data/dynos_mgr_col.cpp @@ -1,17 +1,21 @@ #include "dynos.cpp.h" +extern "C" { +#include "pc/mods/mod_fs.h" +} + static Array*>>& DynosCollisions() { static Array*>> sDynosCollisions; return sDynosCollisions; } -void DynOS_Col_Activate(const SysPath &aFilename, const char *aCollisionName) { +bool DynOS_Col_Activate(const SysPath &aFilename, const char *aCollisionName) { auto& _DynosCollisions = DynosCollisions(); // check for duplicates for (s32 i = 0; i < _DynosCollisions.Count(); ++i) { if (!strcmp(_DynosCollisions[i].first, aCollisionName)) { - return; + return true; } } @@ -24,11 +28,12 @@ void DynOS_Col_Activate(const SysPath &aFilename, const char *aCollisionName) { DataNode* _Node = DynOS_Col_LoadFromBinary(aFilename, collisionName); if (!_Node) { free(collisionName); - return; + return false; } // Add to collisions _DynosCollisions.Add({ collisionName, _Node }); + return true; } Collision* DynOS_Col_Get(const char* collisionName) { @@ -51,6 +56,13 @@ Collision* DynOS_Col_Get(const char* collisionName) { } } + // check modfs file + if (is_mod_fs_file(collisionName)) { + if (DynOS_Col_Activate(collisionName, collisionName)) { + return DynOS_Col_Get(collisionName); + } + } + // check builtin collisions return (Collision*)DynOS_Builtin_Col_GetFromName(collisionName); } diff --git a/data/dynos_mgr_tex.cpp b/data/dynos_mgr_tex.cpp index 799af9ac9..287195f87 100644 --- a/data/dynos_mgr_tex.cpp +++ b/data/dynos_mgr_tex.cpp @@ -4,6 +4,7 @@ extern "C" { #include "pc/gfx/gfx.h" #include "pc/gfx/gfx_rendering_api.h" +#include "pc/mods/mod_fs.h" } struct OverrideTexture { @@ -423,13 +424,13 @@ void DynOS_Tex_Deactivate(DataNode* aNode) { _Schedule.Add(aNode); } -void DynOS_Tex_AddCustom(const SysPath &aFilename, const char *aTexName) { +bool DynOS_Tex_AddCustom(const SysPath &aFilename, const char *aTexName) { auto& _DynosCustomTexs = DynosCustomTexs(); // check for duplicates for (s32 i = 0; i < _DynosCustomTexs.Count(); ++i) { if (!strcmp(_DynosCustomTexs[i].first, aTexName)) { - return; + return true; } } @@ -444,19 +445,16 @@ void DynOS_Tex_AddCustom(const SysPath &aFilename, const char *aTexName) { free(_TexName); if (_Node) { DynOS_Tex_Activate(_Node, true); + return true; } + return false; } #define CONVERT_TEXINFO(texName) { \ - /* translate bit size */ \ - switch (_Data->mRawSize) { \ - case G_IM_SIZ_8b: aOutTexInfo->bitSize = 8; break; \ - case G_IM_SIZ_16b: aOutTexInfo->bitSize = 16; break; \ - case G_IM_SIZ_32b: aOutTexInfo->bitSize = 32; break; \ - default: return false; \ - } \ aOutTexInfo->width = _Data->mRawWidth; \ aOutTexInfo->height = _Data->mRawHeight; \ + aOutTexInfo->format = _Data->mRawFormat; \ + aOutTexInfo->size = _Data->mRawSize; \ aOutTexInfo->texture = _Data->mRawData.begin(); \ aOutTexInfo->name = texName; \ } @@ -488,8 +486,15 @@ bool DynOS_Tex_Get(const char* aTexName, struct TextureInfo* aOutTexInfo) { } } + // check modfs file + if (is_mod_fs_file(aTexName)) { + if (DynOS_Tex_AddCustom(aTexName, aTexName)) { + return DynOS_Tex_Get(aTexName, aOutTexInfo); + } + } + // check builtin textures - const struct BuiltinTexInfo* info = DynOS_Builtin_Tex_GetInfoFromName(aTexName); + const struct TextureInfo* info = DynOS_Builtin_Tex_GetInfoFromName(aTexName); if (!info) { for (DataNode* _Node : DynosValidTextures()) { // check valid textures if (_Node->mName == aTexName) { @@ -500,11 +505,7 @@ bool DynOS_Tex_Get(const char* aTexName, struct TextureInfo* aOutTexInfo) { } return false; } - aOutTexInfo->bitSize = info->bitSize; - aOutTexInfo->width = info->width; - aOutTexInfo->height = info->height; - aOutTexInfo->texture = (Texture*)info->pointer; - aOutTexInfo->name = aTexName; + *aOutTexInfo = *info; return true; } @@ -517,13 +518,9 @@ bool DynOS_Tex_GetFromData(const Texture *aTex, struct TextureInfo* aOutTexInfo) } // check builtin textures - const struct BuiltinTexInfo* info = DynOS_Builtin_Tex_GetInfoFromData(aTex); + const struct TextureInfo* info = DynOS_Builtin_Tex_GetInfoFromData(aTex); if (info) { - aOutTexInfo->bitSize = info->bitSize; - aOutTexInfo->width = info->width; - aOutTexInfo->height = info->height; - aOutTexInfo->texture = (Texture*)info->pointer; - aOutTexInfo->name = info->identifier; + *aOutTexInfo = *info; return true; } diff --git a/data/dynos_warps.cpp b/data/dynos_warps.cpp index 62273ac96..4e7fd725f 100644 --- a/data/dynos_warps.cpp +++ b/data/dynos_warps.cpp @@ -250,13 +250,10 @@ static void *DynOS_Warp_UpdateWarp(void *aCmd, bool aIsLevelInitDone) { } // Set music - if (sDynosWarpNodeNum == -1 || (sWarpDest.type != WARP_TYPE_SAME_AREA && sWarpDest.type != WARP_TYPE_NOT_WARPING)) { + if ((sWarpDest.type != WARP_TYPE_SAME_AREA && sWarpDest.type != WARP_TYPE_NOT_WARPING)) { if (gCurrentArea != NULL) { set_background_music(gCurrentArea->musicParam, gCurrentArea->musicParam2, 0); } - if (gMarioState->flags & MARIO_METAL_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.metalCapSequence)); - if (gMarioState->flags & MARIO_VANISH_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.vanishCapSequence)); - if (gMarioState->flags & MARIO_WING_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.wingCapSequence)); if (gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2 || gCurrLevelNum == LEVEL_BOWSER_3) { @@ -264,6 +261,11 @@ static void *DynOS_Warp_UpdateWarp(void *aCmd, bool aIsLevelInitDone) { } } + // Enable power-up cap music + if (gMarioState->flags & MARIO_METAL_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.metalCapSequence)); + if (gMarioState->flags & MARIO_VANISH_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.vanishCapSequence)); + if (gMarioState->flags & MARIO_WING_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.wingCapSequence)); + // lua hooks smlua_call_event_hooks(HOOK_ON_WARP, sBackupWarpDest.type, sDynosWarpLevelNum, sDynosWarpAreaNum, sDynosWarpNodeNum, sBackupWarpDest.arg); diff --git a/developer/dir2modfs.py b/developer/dir2modfs.py deleted file mode 100644 index af41a2abd..000000000 --- a/developer/dir2modfs.py +++ /dev/null @@ -1,190 +0,0 @@ -import os, sys, re - - -MOD_FS_MAGIC = "MODFSSM64COOPDX" -MOD_FS_HEADER_SIZE = 32 -MOD_FS_EXTENSION = ".modfs" -MOD_FS_VERSION = 1 -MOD_FS_MAX_SIZE = 0x1000000 -MOD_FS_MAX_FILES = 0x100 -MOD_FS_MAX_PATH = 0x100 - - -def usage(): - print(""" -Directory to modfs: - - python dir2modfs.py [--set-public] [--set-file-public ...] - - Parameters: - dirpath Path to directory to turn into a .modfs file - - Options: - --set-public Set modfs file as public (readable by other mods) - --set-file-public Set the provided files as public (readable by other mods) - -modfs to directory: - - python dir2modfs.py --extract - - Parameters: - filepath Path to modfs file to extract files from -""") - exit(0) - - -def is_binary_file(bytes: bytes): - textchars = bytearray({0x07, 0x08, 0x09, 0x0A, 0x0C, 0x0D, 0x1B} | set(range(0x20, 0x100)) - {0x7F}) - return bool(bytes.translate(None, textchars)) - - -def get_files(dirpath: str, public_files: list): - files = [] - for root, _, filenames in os.walk(dirpath): - for filename in filenames: - relpath = os.path.join(root, filename) - filepath = relpath.removeprefix(dirpath).strip("/\\").replace('\\', '/') - is_public = False - for public_file in public_files: - if re.match(public_file, relpath) or re.match(public_file, filepath): - is_public = True - break - files.append({ - "relpath": relpath, - "filepath": filepath, - "is_public": is_public, - "is_text": False, - "data": None - }) - return files - - -def convert(dirpath: str, set_public: bool, public_files: list): - dirpath = dirpath.rstrip("/\\") - files = sorted(get_files(dirpath, public_files), key=lambda file: file["filepath"]) - if len(files) > MOD_FS_MAX_FILES: - raise Exception(f"Max number of files exceeded: {len(files)} (max is: {MOD_FS_MAX_FILES})") - - total_size = 0 - for file in files: - filepath = file["filepath"] - if len(filepath) >= MOD_FS_MAX_PATH: - raise Exception(f"{filepath} - Exceeded filepath length: {len(filepath)} (max is: {MOD_FS_MAX_PATH-1})") - - with open(file["relpath"], "rb") as f: - data = f.read() - total_size += len(data) - if total_size > MOD_FS_MAX_SIZE: - raise Exception(f"{filepath} - Total size exceeded: {total_size} (max is: {MOD_FS_MAX_SIZE})") - - file["data"] = data - file["is_text"] = not is_binary_file(data) - - # write file - destpath = dirpath + MOD_FS_EXTENSION - with open(destpath, "wb") as f: - - # magic + version - f.write(MOD_FS_MAGIC.encode()) - f.write(MOD_FS_VERSION.to_bytes(1, byteorder="little", signed=False)) - - # header - f.write(len(files).to_bytes(2, byteorder="little", signed=False)) - f.write(set_public.to_bytes(1, byteorder="little", signed=False)) - - # padding (empty space for future versions) - padding = MOD_FS_HEADER_SIZE - f.tell() - f.write(b'\0' * padding) - - # files - for file in files: - - # filepath - f.write(len(file["filepath"]).to_bytes(2, byteorder="little", signed=False)) - f.write(file["filepath"].encode()) - - # data - f.write(len(file["data"]).to_bytes(4, byteorder="little", signed=False)) - f.write(file["is_public"].to_bytes(1, byteorder="little", signed=False)) - f.write(file["is_text"].to_bytes(1, byteorder="little", signed=False)) - f.write(file["data"]) - - # summary - print("") - print(f"Directory: {dirpath}") - print(f"Num files: {len(files)}") - print(f"Total size: {total_size}") - print(f"Is public: {set_public}") - - filepaths_max = max(8, len(max([file["filepath"] for file in files], key=len))) - sizes_max = max(4, len(max([str(len(file["data"])) for file in files], key=len))) - print("") - print(f"{'FILEPATH'.ljust(filepaths_max)} {'SIZE'.rjust(sizes_max)} {'TEXT'.rjust(5)} {'PUBLIC'.rjust(6)}") - print(f"{'--------'.ljust(filepaths_max)} {'----'.rjust(sizes_max)} {'----'.rjust(5)} {'------'.rjust(6)}") - for file in files: - filepath = file["filepath"] - size = str(len(file["data"])) - is_text = str(file["is_text"]) - is_public = str(file["is_public"]) - print(f"{filepath.ljust(filepaths_max)} {size.rjust(sizes_max)} {is_text.rjust(5)} {is_public.rjust(6)}") - - -def extract(filepath: str): - if not filepath.endswith(MOD_FS_EXTENSION): - raise Exception("Not a modfs file") - - with open(filepath, "rb") as f: - - # magic + version - magic = f.read(len(MOD_FS_MAGIC)).decode() - if magic != MOD_FS_MAGIC: - raise Exception("Not a modfs file") - version = int.from_bytes(f.read(1), byteorder="little", signed=False) - if version != MOD_FS_VERSION: - raise Exception("Version mismatch") - - # header - num_files = int.from_bytes(f.read(2), byteorder="little", signed=False) - is_public = bool.from_bytes(f.read(1), byteorder="little", signed=False) - - # padding (empty space for future versions) - f.seek(MOD_FS_HEADER_SIZE, 0) - - # create directory - dirpath = filepath.removesuffix(MOD_FS_EXTENSION) - os.makedirs(dirpath, exist_ok=True) - - # files - for _ in range(num_files): - - # filepath - filepath_len = int.from_bytes(f.read(2), byteorder="little", signed=False) - filepath = os.path.join(dirpath, f.read(filepath_len).decode()) - - # data - file_size = int.from_bytes(f.read(4), byteorder="little", signed=False) - file_is_public = bool.from_bytes(f.read(1), byteorder="little", signed=False) - file_is_text = bool.from_bytes(f.read(1), byteorder="little", signed=False) - file_data = f.read(file_size) - - # write file - os.makedirs(os.path.dirname(filepath), exist_ok=True) - with open(filepath, "wb") as g: - g.write(file_data) - print(f"Extracted file of size {file_size} to: {filepath}") - - -def main(argc: int, argv: list): - if argc < 2: - usage() - - if "--extract" in argv: - extract(argv[1]) - else: - set_public = "--set-public" in argv - set_file_public_index = argv.index("--set-file-public") if "--set-file-public" in argv else argc - convert(argv[1], set_public, argv[set_file_public_index+1:]) - - -if __name__ == "__main__": - main(len(sys.argv), sys.argv) diff --git a/docs/lua/constants.md b/docs/lua/constants.md index 744db5da8..7632878e6 100644 --- a/docs/lua/constants.md +++ b/docs/lua/constants.md @@ -1298,6 +1298,7 @@ ## [gbi_extension.h](#gbi_extension.h) - G_VTX_EXT +- G_SETENVRGB - G_PPARTTOCOLOR [:arrow_up_small:](#) @@ -1335,6 +1336,7 @@ - GRAPH_RENDER_CYLBOARD - GRAPH_RENDER_PLAYER - GRAPH_EXTRA_FORCE_3D +- GRAPH_EXTRA_ROTATE_HELD - GRAPH_NODE_TYPE_FUNCTIONAL - GRAPH_NODE_TYPE_400 - GRAPH_NODE_TYPE_ROOT @@ -2143,6 +2145,8 @@ - MOD_FS_MAX_SIZE - MOD_FS_MAX_FILES - MOD_FS_MAX_PATH +- MOD_FS_URI_PREFIX +- MOD_FS_URI_FORMAT ### [enum ModFsFileIntType](#ModFsFileIntType) | Identifier | Value | @@ -2969,6 +2973,7 @@
## [player_palette.h](#player_palette.h) +- PALETTES_DIRECTORY - MAX_PRESET_PALETTES ### [enum PlayerPart](#PlayerPart) @@ -4619,6 +4624,7 @@ - SURFACE_CLASS_NOT_SLIPPERY - SURFACE_FLAG_DYNAMIC - SURFACE_FLAG_NO_CAM_COLLISION +- SURFACE_FLAG_INTANGIBLE - SURFACE_FLAG_X_PROJECTION - HAZARD_TYPE_LAVA_FLOOR - HAZARD_TYPE_LAVA_WALL @@ -4720,6 +4726,12 @@ - VERSION_TEXT - VERSION_NUMBER - MINOR_VERSION_NUMBER +- GAME_NAME +- WINDOW_NAME +- GAME_NAME +- WINDOW_NAME +- GAME_NAME +- WINDOW_NAME - MAX_VERSION_LENGTH [:arrow_up_small:](#) diff --git a/docs/lua/examples/gfx-vtx-demo/actors/shape/model.inc.c b/docs/lua/examples/gfx-vtx-demo/actors/shape/model.inc.c index e29ce377a..0c50d2832 100644 --- a/docs/lua/examples/gfx-vtx-demo/actors/shape/model.inc.c +++ b/docs/lua/examples/gfx-vtx-demo/actors/shape/model.inc.c @@ -15,5 +15,6 @@ Gfx shape_template_dl[] = { /* [11] */ gsSPDisplayList(NULL), /* [12] */ gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), /* [13] */ gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), -/* [14] */ gsSPEndDisplayList(), +/* [14] */ gsSPGeometryMode(G_TEXTURE_GEN, G_LIGHTING | G_CULL_BACK), +/* [15] */ gsSPEndDisplayList(), }; diff --git a/docs/lua/functions-3.md b/docs/lua/functions-3.md index 5754e7d88..3a2751af1 100644 --- a/docs/lua/functions-3.md +++ b/docs/lua/functions-3.md @@ -2121,29 +2121,6 @@ Rotates the camera to avoid walls or other obstructions. Ensures clear visibilit
-## [find_mario_floor_and_ceil](#find_mario_floor_and_ceil) - -### Description -Finds the floor and ceiling directly above and below Mario's position. Updates Mario's geometry information for camera calculations - -### Lua Example -`find_mario_floor_and_ceil(pg)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pg | [PlayerGeometry](structs.md#PlayerGeometry) | - -### Returns -- None - -### C Prototype -`void find_mario_floor_and_ceil(struct PlayerGeometry *pg);` - -[:arrow_up_small:](#) - -
- ## [start_object_cutscene_without_focus](#start_object_cutscene_without_focus) ### Description @@ -3140,10 +3117,31 @@ Returns the y coordinate of the mouse relative to the screen
+## [djui_hud_is_mouse_locked](#djui_hud_is_mouse_locked) + +### Description +Checks if the cursor is locked to the window + +### Lua Example +`local booleanValue = djui_hud_is_mouse_locked()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool djui_hud_is_mouse_locked(void);` + +[:arrow_up_small:](#) + +
+ ## [djui_hud_set_mouse_locked](#djui_hud_set_mouse_locked) ### Description -Sets if the cursor is hidden and constrainted to the window +Locks (or unlocks) the cursor to the window ### Lua Example `djui_hud_set_mouse_locked(locked)` @@ -3271,7 +3269,7 @@ Returns the amount scrolled vertically (-down/up+) ## [djui_hud_set_viewport](#djui_hud_set_viewport) ### Description -Sets the viewport to the specified position and size, this will resize +Sets the viewport to the specified position and size, this will resize any subsequent DJUI graphics ### Lua Example `djui_hud_set_viewport(x, y, width, height)` @@ -3297,7 +3295,7 @@ Sets the viewport to the specified position and size, this will resize ## [djui_hud_reset_viewport](#djui_hud_reset_viewport) ### Description -put the description here +Resets the viewport to a fullscreen state ### Lua Example `djui_hud_reset_viewport()` @@ -3318,7 +3316,7 @@ put the description here ## [djui_hud_set_scissor](#djui_hud_set_scissor) ### Description -put the description here +Sets the scissor rectangle to the specified position and size, this will cut off any subsequent DJUI graphics not within the rectangle ### Lua Example `djui_hud_set_scissor(x, y, width, height)` @@ -3344,7 +3342,7 @@ put the description here ## [djui_hud_reset_scissor](#djui_hud_reset_scissor) ### Description -put the description here +Resets the scissor rectangle to a fullscreen state ### Lua Example `djui_hud_reset_scissor()` @@ -4933,6 +4931,29 @@ Sets the in-game menu state. 0-1 is the courses box with the castle secret stars
+## [handle_special_dialog_text](#handle_special_dialog_text) + +### Description +The internal function used by SM64 which plays a tune whenever boss, KtQ, etc dialog is read. + +### Lua Example +`handle_special_dialog_text(dialogID)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dialogID | `integer` | + +### Returns +- None + +### C Prototype +`void handle_special_dialog_text(s32 dialogID);` + +[:arrow_up_small:](#) + +
+ ## [set_min_dialog_width](#set_min_dialog_width) ### Description @@ -6586,6 +6607,27 @@ Returns if the level timer is running
+## [pressed_pause](#pressed_pause) + +### Description +Checks if the start button has been pressed as well as some other conditions for opening the pause menu depending on if pause anywhere is enabled + +### Lua Example +`local booleanValue = pressed_pause()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool pressed_pause(void);` + +[:arrow_up_small:](#) + +
+ ## [fade_into_special_warp](#fade_into_special_warp) ### Description @@ -6746,561 +6788,6 @@ Sets the level number and handles the act select screen. `param` is used for ove [:arrow_up_small:](#) -
- ---- -# functions from lighting_engine.h - -
- - -## [le_is_enabled](#le_is_enabled) - -### Description -Gets whether the lighting engine has been enabled or not. It becomes enabled once a light is added or the ambient color is set - -### Lua Example -`local booleanValue = le_is_enabled()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool le_is_enabled(void);` - -[:arrow_up_small:](#) - -
- -## [le_set_mode](#le_set_mode) - -### Description -Sets the lighting engine mode to `mode` - -### Lua Example -`le_set_mode(mode)` - -### Parameters -| Field | Type | -| ----- | ---- | -| mode | [enum LEMode](constants.md#enum-LEMode) | - -### Returns -- None - -### C Prototype -`void le_set_mode(enum LEMode mode);` - -[:arrow_up_small:](#) - -
- -## [le_get_mode](#le_get_mode) - -### Description -Gets the lighting engine mode - -### Lua Example -`local enumValue = le_get_mode()` - -### Parameters -- None - -### Returns -[enum LEMode](constants.md#enum-LEMode) - -### C Prototype -`enum LEMode le_get_mode(void);` - -[:arrow_up_small:](#) - -
- -## [le_set_tone_mapping](#le_set_tone_mapping) - -### Description -Sets the lighting engine's tone mapping mode to `toneMapping` - -### Lua Example -`le_set_tone_mapping(toneMapping)` - -### Parameters -| Field | Type | -| ----- | ---- | -| toneMapping | [enum LEToneMapping](constants.md#enum-LEToneMapping) | - -### Returns -- None - -### C Prototype -`void le_set_tone_mapping(enum LEToneMapping toneMapping);` - -[:arrow_up_small:](#) - -
- -## [le_get_ambient_color](#le_get_ambient_color) - -### Description -Outputs the lighting engine's ambient color to `out` - -### Lua Example -`le_get_ambient_color(out)` - -### Parameters -| Field | Type | -| ----- | ---- | -| out | [Color](structs.md#Color) | - -### Returns -- None - -### C Prototype -`void le_get_ambient_color(OUT Color out);` - -[:arrow_up_small:](#) - -
- -## [le_set_ambient_color](#le_set_ambient_color) - -### Description -Sets the lighting engine ambient color - -### Lua Example -`le_set_ambient_color(r, g, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| r | `integer` | -| g | `integer` | -| b | `integer` | - -### Returns -- None - -### C Prototype -`void le_set_ambient_color(u8 r, u8 g, u8 b);` - -[:arrow_up_small:](#) - -
- -## [le_calculate_lighting_color](#le_calculate_lighting_color) - -### Description -Calculates the lighting with `lightIntensityScalar` at a position and outputs the color in `out` - -### Lua Example -`le_calculate_lighting_color(pos, out, lightIntensityScalar)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pos | [Vec3f](structs.md#Vec3f) | -| out | [Color](structs.md#Color) | -| lightIntensityScalar | `number` | - -### Returns -- None - -### C Prototype -`void le_calculate_lighting_color(Vec3f pos, OUT Color out, f32 lightIntensityScalar);` - -[:arrow_up_small:](#) - -
- -## [le_calculate_lighting_color_with_normal](#le_calculate_lighting_color_with_normal) - -### Description -Calculates the lighting with `lightIntensityScalar` at a position and with a normal and outputs the color in `out` - -### Lua Example -`le_calculate_lighting_color_with_normal(pos, normal, out, lightIntensityScalar)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pos | [Vec3f](structs.md#Vec3f) | -| normal | [Vec3f](structs.md#Vec3f) | -| out | [Color](structs.md#Color) | -| lightIntensityScalar | `number` | - -### Returns -- None - -### C Prototype -`void le_calculate_lighting_color_with_normal(Vec3f pos, Vec3f normal, OUT Color out, f32 lightIntensityScalar);` - -[:arrow_up_small:](#) - -
- -## [le_calculate_lighting_dir](#le_calculate_lighting_dir) - -### Description -Calculates the lighting direction from a position and outputs the result in `out` - -### Lua Example -`le_calculate_lighting_dir(pos, out)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pos | [Vec3f](structs.md#Vec3f) | -| out | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void le_calculate_lighting_dir(Vec3f pos, OUT Vec3f out);` - -[:arrow_up_small:](#) - -
- -## [le_add_light](#le_add_light) - -### Description -Adds a lighting engine point light at `x`, `y`, `z` with color `r`, `g`, `b` and `radius` with `intensity` - -### Lua Example -`local integerValue = le_add_light(x, y, z, r, g, b, radius, intensity)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | -| y | `number` | -| z | `number` | -| r | `integer` | -| g | `integer` | -| b | `integer` | -| radius | `number` | -| intensity | `number` | - -### Returns -- `integer` - -### C Prototype -`s16 le_add_light(f32 x, f32 y, f32 z, u8 r, u8 g, u8 b, f32 radius, f32 intensity);` - -[:arrow_up_small:](#) - -
- -## [le_remove_light](#le_remove_light) - -### Description -Removes a lighting engine point light corresponding to `id` - -### Lua Example -`le_remove_light(id)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | - -### Returns -- None - -### C Prototype -`void le_remove_light(s16 id);` - -[:arrow_up_small:](#) - -
- -## [le_get_light_count](#le_get_light_count) - -### Description -Gets the total number of lights currently loaded in the lighting engine - -### Lua Example -`local integerValue = le_get_light_count()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 le_get_light_count(void);` - -[:arrow_up_small:](#) - -
- -## [le_light_exists](#le_light_exists) - -### Description -Checks if a lighting engine point light corresponding to `id` exists - -### Lua Example -`local booleanValue = le_light_exists(id)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | - -### Returns -- `boolean` - -### C Prototype -`bool le_light_exists(s16 id);` - -[:arrow_up_small:](#) - -
- -## [le_get_light_pos](#le_get_light_pos) - -### Description -Outputs a lighting engine point light's position to `out` - -### Lua Example -`le_get_light_pos(id, out)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | -| out | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void le_get_light_pos(s16 id, OUT Vec3f out);` - -[:arrow_up_small:](#) - -
- -## [le_set_light_pos](#le_set_light_pos) - -### Description -Sets a lighting engine point light's position to `x`, `y`, `z` - -### Lua Example -`le_set_light_pos(id, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | -| x | `number` | -| y | `number` | -| z | `number` | - -### Returns -- None - -### C Prototype -`void le_set_light_pos(s16 id, f32 x, f32 y, f32 z);` - -[:arrow_up_small:](#) - -
- -## [le_get_light_color](#le_get_light_color) - -### Description -Outputs a lighting engine point light's color to `out` - -### Lua Example -`le_get_light_color(id, out)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | -| out | [Color](structs.md#Color) | - -### Returns -- None - -### C Prototype -`void le_get_light_color(s16 id, OUT Color out);` - -[:arrow_up_small:](#) - -
- -## [le_set_light_color](#le_set_light_color) - -### Description -Sets a lighting engine point light's color to `r`, `g`, `b` - -### Lua Example -`le_set_light_color(id, r, g, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | -| r | `integer` | -| g | `integer` | -| b | `integer` | - -### Returns -- None - -### C Prototype -`void le_set_light_color(s16 id, u8 r, u8 g, u8 b);` - -[:arrow_up_small:](#) - -
- -## [le_get_light_radius](#le_get_light_radius) - -### Description -Gets a lighting engine point light's `radius` - -### Lua Example -`local numberValue = le_get_light_radius(id)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | - -### Returns -- `number` - -### C Prototype -`f32 le_get_light_radius(s16 id);` - -[:arrow_up_small:](#) - -
- -## [le_set_light_radius](#le_set_light_radius) - -### Description -Sets a lighting engine point light's `radius` - -### Lua Example -`le_set_light_radius(id, radius)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | -| radius | `number` | - -### Returns -- None - -### C Prototype -`void le_set_light_radius(s16 id, f32 radius);` - -[:arrow_up_small:](#) - -
- -## [le_get_light_intensity](#le_get_light_intensity) - -### Description -Gets a lighting engine point light's `intensity` - -### Lua Example -`local numberValue = le_get_light_intensity(id)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | - -### Returns -- `number` - -### C Prototype -`f32 le_get_light_intensity(s16 id);` - -[:arrow_up_small:](#) - -
- -## [le_set_light_intensity](#le_set_light_intensity) - -### Description -Sets a lighting engine point light's `intensity` - -### Lua Example -`le_set_light_intensity(id, intensity)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | -| intensity | `number` | - -### Returns -- None - -### C Prototype -`void le_set_light_intensity(s16 id, f32 intensity);` - -[:arrow_up_small:](#) - -
- -## [le_get_light_use_surface_normals](#le_get_light_use_surface_normals) - -### Description -Gets whether a lighting engine point light will use a surface's normals to determine its brightness with `useSurfaceNormals` - -### Lua Example -`local booleanValue = le_get_light_use_surface_normals(id)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | - -### Returns -- `boolean` - -### C Prototype -`bool le_get_light_use_surface_normals(s16 id);` - -[:arrow_up_small:](#) - -
- -## [le_set_light_use_surface_normals](#le_set_light_use_surface_normals) - -### Description -Sets whether a lighting engine point light will use a surface's normals to determine its brightness with `useSurfaceNormals` - -### Lua Example -`le_set_light_use_surface_normals(id, useSurfaceNormals)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | -| useSurfaceNormals | `boolean` | - -### Returns -- None - -### C Prototype -`void le_set_light_use_surface_normals(s16 id, bool useSurfaceNormals);` - -[:arrow_up_small:](#) -
--- diff --git a/docs/lua/functions-4.md b/docs/lua/functions-4.md index 358633568..d439877c6 100644 --- a/docs/lua/functions-4.md +++ b/docs/lua/functions-4.md @@ -5,6 +5,561 @@ [< prev](functions-3.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | 4 | [5](functions-5.md) | [6](functions-6.md) | [7](functions-7.md) | [next >](functions-5.md)] +--- +# functions from lighting_engine.h + +
+ + +## [le_is_enabled](#le_is_enabled) + +### Description +Gets whether the lighting engine has been enabled or not. It becomes enabled once a light is added or the ambient color is set + +### Lua Example +`local booleanValue = le_is_enabled()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool le_is_enabled(void);` + +[:arrow_up_small:](#) + +
+ +## [le_set_mode](#le_set_mode) + +### Description +Sets the lighting engine mode to `mode` + +### Lua Example +`le_set_mode(mode)` + +### Parameters +| Field | Type | +| ----- | ---- | +| mode | [enum LEMode](constants.md#enum-LEMode) | + +### Returns +- None + +### C Prototype +`void le_set_mode(enum LEMode mode);` + +[:arrow_up_small:](#) + +
+ +## [le_get_mode](#le_get_mode) + +### Description +Gets the lighting engine mode + +### Lua Example +`local enumValue = le_get_mode()` + +### Parameters +- None + +### Returns +[enum LEMode](constants.md#enum-LEMode) + +### C Prototype +`enum LEMode le_get_mode(void);` + +[:arrow_up_small:](#) + +
+ +## [le_set_tone_mapping](#le_set_tone_mapping) + +### Description +Sets the lighting engine's tone mapping mode to `toneMapping` + +### Lua Example +`le_set_tone_mapping(toneMapping)` + +### Parameters +| Field | Type | +| ----- | ---- | +| toneMapping | [enum LEToneMapping](constants.md#enum-LEToneMapping) | + +### Returns +- None + +### C Prototype +`void le_set_tone_mapping(enum LEToneMapping toneMapping);` + +[:arrow_up_small:](#) + +
+ +## [le_get_ambient_color](#le_get_ambient_color) + +### Description +Outputs the lighting engine's ambient color to `out` + +### Lua Example +`le_get_ambient_color(out)` + +### Parameters +| Field | Type | +| ----- | ---- | +| out | [Color](structs.md#Color) | + +### Returns +- None + +### C Prototype +`void le_get_ambient_color(OUT Color out);` + +[:arrow_up_small:](#) + +
+ +## [le_set_ambient_color](#le_set_ambient_color) + +### Description +Sets the lighting engine ambient color + +### Lua Example +`le_set_ambient_color(r, g, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| r | `integer` | +| g | `integer` | +| b | `integer` | + +### Returns +- None + +### C Prototype +`void le_set_ambient_color(u8 r, u8 g, u8 b);` + +[:arrow_up_small:](#) + +
+ +## [le_calculate_lighting_color](#le_calculate_lighting_color) + +### Description +Calculates the lighting with `lightIntensityScalar` at a position and outputs the color in `out` + +### Lua Example +`le_calculate_lighting_color(pos, out, lightIntensityScalar)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pos | [Vec3f](structs.md#Vec3f) | +| out | [Color](structs.md#Color) | +| lightIntensityScalar | `number` | + +### Returns +- None + +### C Prototype +`void le_calculate_lighting_color(Vec3f pos, OUT Color out, f32 lightIntensityScalar);` + +[:arrow_up_small:](#) + +
+ +## [le_calculate_lighting_color_with_normal](#le_calculate_lighting_color_with_normal) + +### Description +Calculates the lighting with `lightIntensityScalar` at a position and with a normal and outputs the color in `out` + +### Lua Example +`le_calculate_lighting_color_with_normal(pos, normal, out, lightIntensityScalar)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pos | [Vec3f](structs.md#Vec3f) | +| normal | [Vec3f](structs.md#Vec3f) | +| out | [Color](structs.md#Color) | +| lightIntensityScalar | `number` | + +### Returns +- None + +### C Prototype +`void le_calculate_lighting_color_with_normal(Vec3f pos, Vec3f normal, OUT Color out, f32 lightIntensityScalar);` + +[:arrow_up_small:](#) + +
+ +## [le_calculate_lighting_dir](#le_calculate_lighting_dir) + +### Description +Calculates the lighting direction from a position and outputs the result in `out` + +### Lua Example +`le_calculate_lighting_dir(pos, out)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pos | [Vec3f](structs.md#Vec3f) | +| out | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void le_calculate_lighting_dir(Vec3f pos, OUT Vec3f out);` + +[:arrow_up_small:](#) + +
+ +## [le_add_light](#le_add_light) + +### Description +Adds a lighting engine point light at `x`, `y`, `z` with color `r`, `g`, `b` and `radius` with `intensity` + +### Lua Example +`local integerValue = le_add_light(x, y, z, r, g, b, radius, intensity)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `number` | +| y | `number` | +| z | `number` | +| r | `integer` | +| g | `integer` | +| b | `integer` | +| radius | `number` | +| intensity | `number` | + +### Returns +- `integer` + +### C Prototype +`s16 le_add_light(f32 x, f32 y, f32 z, u8 r, u8 g, u8 b, f32 radius, f32 intensity);` + +[:arrow_up_small:](#) + +
+ +## [le_remove_light](#le_remove_light) + +### Description +Removes a lighting engine point light corresponding to `id` + +### Lua Example +`le_remove_light(id)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | + +### Returns +- None + +### C Prototype +`void le_remove_light(s16 id);` + +[:arrow_up_small:](#) + +
+ +## [le_get_light_count](#le_get_light_count) + +### Description +Gets the total number of lights currently loaded in the lighting engine + +### Lua Example +`local integerValue = le_get_light_count()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s16 le_get_light_count(void);` + +[:arrow_up_small:](#) + +
+ +## [le_light_exists](#le_light_exists) + +### Description +Checks if a lighting engine point light corresponding to `id` exists + +### Lua Example +`local booleanValue = le_light_exists(id)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool le_light_exists(s16 id);` + +[:arrow_up_small:](#) + +
+ +## [le_get_light_pos](#le_get_light_pos) + +### Description +Outputs a lighting engine point light's position to `out` + +### Lua Example +`le_get_light_pos(id, out)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | +| out | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void le_get_light_pos(s16 id, OUT Vec3f out);` + +[:arrow_up_small:](#) + +
+ +## [le_set_light_pos](#le_set_light_pos) + +### Description +Sets a lighting engine point light's position to `x`, `y`, `z` + +### Lua Example +`le_set_light_pos(id, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | +| x | `number` | +| y | `number` | +| z | `number` | + +### Returns +- None + +### C Prototype +`void le_set_light_pos(s16 id, f32 x, f32 y, f32 z);` + +[:arrow_up_small:](#) + +
+ +## [le_get_light_color](#le_get_light_color) + +### Description +Outputs a lighting engine point light's color to `out` + +### Lua Example +`le_get_light_color(id, out)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | +| out | [Color](structs.md#Color) | + +### Returns +- None + +### C Prototype +`void le_get_light_color(s16 id, OUT Color out);` + +[:arrow_up_small:](#) + +
+ +## [le_set_light_color](#le_set_light_color) + +### Description +Sets a lighting engine point light's color to `r`, `g`, `b` + +### Lua Example +`le_set_light_color(id, r, g, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | +| r | `integer` | +| g | `integer` | +| b | `integer` | + +### Returns +- None + +### C Prototype +`void le_set_light_color(s16 id, u8 r, u8 g, u8 b);` + +[:arrow_up_small:](#) + +
+ +## [le_get_light_radius](#le_get_light_radius) + +### Description +Gets a lighting engine point light's `radius` + +### Lua Example +`local numberValue = le_get_light_radius(id)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 le_get_light_radius(s16 id);` + +[:arrow_up_small:](#) + +
+ +## [le_set_light_radius](#le_set_light_radius) + +### Description +Sets a lighting engine point light's `radius` + +### Lua Example +`le_set_light_radius(id, radius)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | +| radius | `number` | + +### Returns +- None + +### C Prototype +`void le_set_light_radius(s16 id, f32 radius);` + +[:arrow_up_small:](#) + +
+ +## [le_get_light_intensity](#le_get_light_intensity) + +### Description +Gets a lighting engine point light's `intensity` + +### Lua Example +`local numberValue = le_get_light_intensity(id)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 le_get_light_intensity(s16 id);` + +[:arrow_up_small:](#) + +
+ +## [le_set_light_intensity](#le_set_light_intensity) + +### Description +Sets a lighting engine point light's `intensity` + +### Lua Example +`le_set_light_intensity(id, intensity)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | +| intensity | `number` | + +### Returns +- None + +### C Prototype +`void le_set_light_intensity(s16 id, f32 intensity);` + +[:arrow_up_small:](#) + +
+ +## [le_get_light_use_surface_normals](#le_get_light_use_surface_normals) + +### Description +Gets whether a lighting engine point light will use a surface's normals to determine its brightness with `useSurfaceNormals` + +### Lua Example +`local booleanValue = le_get_light_use_surface_normals(id)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool le_get_light_use_surface_normals(s16 id);` + +[:arrow_up_small:](#) + +
+ +## [le_set_light_use_surface_normals](#le_set_light_use_surface_normals) + +### Description +Sets whether a lighting engine point light will use a surface's normals to determine its brightness with `useSurfaceNormals` + +### Lua Example +`le_set_light_use_surface_normals(id, useSurfaceNormals)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | +| useSurfaceNormals | `boolean` | + +### Returns +- None + +### C Prototype +`void le_set_light_use_surface_normals(s16 id, bool useSurfaceNormals);` + +[:arrow_up_small:](#) + +
+ --- # functions from mario.h @@ -3923,32 +4478,6 @@ Reflects Mario off a wall if he is colliding with one and flips forward velocity
-## [init_bully_collision_data](#init_bully_collision_data) - -### Lua Example -`init_bully_collision_data(data, posX, posZ, forwardVel, yaw, conversionRatio, radius)` - -### Parameters -| Field | Type | -| ----- | ---- | -| data | [BullyCollisionData](structs.md#BullyCollisionData) | -| posX | `number` | -| posZ | `number` | -| forwardVel | `number` | -| yaw | `integer` | -| conversionRatio | `number` | -| radius | `number` | - -### Returns -- None - -### C Prototype -`void init_bully_collision_data(struct BullyCollisionData *data, f32 posX, f32 posZ, f32 forwardVel, s16 yaw, f32 conversionRatio, f32 radius);` - -[:arrow_up_small:](#) - -
- ## [mario_update_quicksand](#mario_update_quicksand) ### Description @@ -4070,7 +4599,7 @@ Sets all of Mario's velocity variables to 0 and sets his Y position to the floor ## [stationary_ground_step](#stationary_ground_step) ### Description -Performs a full Mario stationary physics step (4 substeps) and returns an `GROUND_STEP_*` result +Performs a full Mario stationary physics step (4 substeps) and returns a `GROUND_STEP_*` result ### Lua Example `local integerValue = stationary_ground_step(m)` @@ -4093,7 +4622,7 @@ Performs a full Mario stationary physics step (4 substeps) and returns an `GROUN ## [perform_ground_step](#perform_ground_step) ### Description -Performs a full Mario ground physics step (4 substeps) and returns an `GROUND_STEP_*` result +Performs a full Mario ground physics step (4 substeps) and returns a `GROUND_STEP_*` result ### Lua Example `local integerValue = perform_ground_step(m)` @@ -6217,545 +6746,6 @@ Converts a 3D integer vector `a` into a 3D short integer vector and stores the r [:arrow_up_small:](#) -
- ---- -# functions from math_util_vec3s.inl - -
- - -## [vec3s_zero](#vec3s_zero) - -### Description -Sets the components of the 3D short integer vector `v` to 0 - -### Lua Example -`local Vec3sValue = vec3s_zero(v)` - -### Parameters -| Field | Type | -| ----- | ---- | -| v | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_zero(OUT Vec3s v);` - -[:arrow_up_small:](#) - -
- -## [vec3s_copy](#vec3s_copy) - -### Description -Copies the contents of a 3D short integer vector (`src`) into another 3D short integer vector (`dest`) - -### Lua Example -`local Vec3sValue = vec3s_copy(dest, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| src | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_copy(OUT Vec3s dest, Vec3s src);` - -[:arrow_up_small:](#) - -
- -## [vec3s_set](#vec3s_set) - -### Description -Sets the values of the 3D short integer vector `dest` to the given x, y, and z values - -### Lua Example -`local Vec3sValue = vec3s_set(dest, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| x | `integer` | -| y | `integer` | -| z | `integer` | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_set(OUT Vec3s dest, s16 x, s16 y, s16 z);` - -[:arrow_up_small:](#) - -
- -## [vec3s_add](#vec3s_add) - -### Description -Adds the components of the 3D short integer vector `a` to `dest` - -### Lua Example -`local Vec3sValue = vec3s_add(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_add(OUT Vec3s dest, Vec3s a);` - -[:arrow_up_small:](#) - -
- -## [vec3s_sum](#vec3s_sum) - -### Description -Adds the components of two 3D short integer vectors `a` and `b` and stores the result in `dest` - -### Lua Example -`local Vec3sValue = vec3s_sum(dest, a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | [Vec3s](structs.md#Vec3s) | -| b | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_sum(OUT Vec3s dest, Vec3s a, Vec3s b);` - -[:arrow_up_small:](#) - -
- -## [vec3s_sub](#vec3s_sub) - -### Description -Subtracts the components of the 3D short integer vector `a` from `dest` - -### Lua Example -`local Vec3sValue = vec3s_sub(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_sub(OUT Vec3s dest, Vec3s a);` - -[:arrow_up_small:](#) - -
- -## [vec3s_dif](#vec3s_dif) - -### Description -Subtracts the components of the 3D short integer vector `b` from the components of `a` and stores the result in `dest` - -### Lua Example -`local Vec3sValue = vec3s_dif(dest, a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | [Vec3s](structs.md#Vec3s) | -| b | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_dif(OUT Vec3s dest, Vec3s a, Vec3s b);` - -[:arrow_up_small:](#) - -
- -## [vec3s_mul](#vec3s_mul) - -### Description -Multiplies each component of the 3D short integer vector `dest` by the scalar value `a` - -### Lua Example -`local Vec3sValue = vec3s_mul(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | `number` | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_mul(OUT Vec3s dest, f32 a);` - -[:arrow_up_small:](#) - -
- -## [vec3s_mult](#vec3s_mult) - -### Description -Multiplies the components of the 3D short integer vector `dest` with the components of `a` - -### Lua Example -`local Vec3sValue = vec3s_mult(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_mult(OUT Vec3s dest, Vec3s a);` - -[:arrow_up_small:](#) - -
- -## [vec3s_prod](#vec3s_prod) - -### Description -Multiplies the components of two 3D short integer vectors `a` and `b` and stores the result in `dest` - -### Lua Example -`local Vec3sValue = vec3s_prod(dest, a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | [Vec3s](structs.md#Vec3s) | -| b | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_prod(OUT Vec3s dest, Vec3s a, Vec3s b);` - -[:arrow_up_small:](#) - -
- -## [vec3s_div](#vec3s_div) - -### Description -Divides each component of the 3D short integer vector `dest` by the scalar value `a` - -### Lua Example -`local Vec3sValue = vec3s_div(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | `number` | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_div(OUT Vec3s dest, f32 a);` - -[:arrow_up_small:](#) - -
- -## [vec3s_length](#vec3s_length) - -### Description -Calculates the length (magnitude) of the 3D short integer vector `a` - -### Lua Example -`local numberValue = vec3s_length(a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a | [Vec3s](structs.md#Vec3s) | - -### Returns -- `number` - -### C Prototype -`f32 vec3s_length(Vec3s a);` - -[:arrow_up_small:](#) - -
- -## [vec3s_normalize](#vec3s_normalize) - -### Description -Normalizes the 3D short integer vector `v` so that its length (magnitude) becomes 1, while retaining its direction - -### Lua Example -`local Vec3sValue = vec3s_normalize(v)` - -### Parameters -| Field | Type | -| ----- | ---- | -| v | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_normalize(OUT Vec3s v);` - -[:arrow_up_small:](#) - -
- -## [vec3s_set_magnitude](#vec3s_set_magnitude) - -### Description -Sets the length (magnitude) of 3D short integer vector `v`, while retaining its direction - -### Lua Example -`local Vec3sValue = vec3s_set_magnitude(v, mag)` - -### Parameters -| Field | Type | -| ----- | ---- | -| v | [Vec3s](structs.md#Vec3s) | -| mag | `number` | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_set_magnitude(OUT Vec3s v, f32 mag);` - -[:arrow_up_small:](#) - -
- -## [vec3s_dot](#vec3s_dot) - -### Description -Computes the dot product of the two 3D short integer vectors `a` and `b` - -### Lua Example -`local numberValue = vec3s_dot(a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a | [Vec3s](structs.md#Vec3s) | -| b | [Vec3s](structs.md#Vec3s) | - -### Returns -- `number` - -### C Prototype -`f32 vec3s_dot(Vec3s a, Vec3s b);` - -[:arrow_up_small:](#) - -
- -## [vec3s_cross](#vec3s_cross) - -### Description -Computes the cross product of two 3D short integer vectors `a` and `b` and stores the result in `dest` - -### Lua Example -`local Vec3sValue = vec3s_cross(dest, a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | [Vec3s](structs.md#Vec3s) | -| b | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_cross(OUT Vec3s dest, Vec3s a, Vec3s b);` - -[:arrow_up_small:](#) - -
- -## [vec3s_combine](#vec3s_combine) - -### Description -Takes two 3D short integer vectors `vecA` and `vecB`, multiplies them by `sclA` and `sclB` respectively, adds the scaled vectors together and stores the result in `dest` - -### Lua Example -`local Vec3sValue = vec3s_combine(dest, vecA, vecB, sclA, sclB)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| vecA | [Vec3s](structs.md#Vec3s) | -| vecB | [Vec3s](structs.md#Vec3s) | -| sclA | `number` | -| sclB | `number` | - -### Returns -[Vec3s](structs.md#Vec3s) - -### C Prototype -`Vec3sp vec3s_combine(OUT Vec3s dest, Vec3s vecA, Vec3s vecB, f32 sclA, f32 sclB);` - -[:arrow_up_small:](#) - -
- -## [vec3s_dist](#vec3s_dist) - -### Description -Calculates the distance between two 3D short integer vectors `v1` and `v2` - -### Lua Example -`local numberValue = vec3s_dist(v1, v2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| v1 | [Vec3s](structs.md#Vec3s) | -| v2 | [Vec3s](structs.md#Vec3s) | - -### Returns -- `number` - -### C Prototype -`f32 vec3s_dist(Vec3s v1, Vec3s v2);` - -[:arrow_up_small:](#) - -
- -## [vec3s_hdist](#vec3s_hdist) - -### Description -Calculates the horizontal distance between two 3D short integer vectors `v1` and `v2`, as if their y component was 0 - -### Lua Example -`local numberValue = vec3s_hdist(v1, v2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| v1 | [Vec3s](structs.md#Vec3s) | -| v2 | [Vec3s](structs.md#Vec3s) | - -### Returns -- `number` - -### C Prototype -`f32 vec3s_hdist(Vec3s v1, Vec3s v2);` - -[:arrow_up_small:](#) - -
- -## [vec3s_is_zero](#vec3s_is_zero) - -### Description -Returns `true` if all components of the 3D short integer vector `v` are zero - -### Lua Example -`local booleanValue = vec3s_is_zero(v)` - -### Parameters -| Field | Type | -| ----- | ---- | -| v | [Vec3s](structs.md#Vec3s) | - -### Returns -- `boolean` - -### C Prototype -`bool vec3s_is_zero(Vec3s v);` - -[:arrow_up_small:](#) - -
- -## [vec3s_to_vec3f](#vec3s_to_vec3f) - -### Description -Converts a 3D short integer vector `a` into a 3D floating-point vector and stores the result in `dest` - -### Lua Example -`local Vec3fValue = vec3s_to_vec3f(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| a | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3f](structs.md#Vec3f) - -### C Prototype -`Vec3fp vec3s_to_vec3f(OUT Vec3f dest, Vec3s a);` - -[:arrow_up_small:](#) - -
- -## [vec3s_to_vec3i](#vec3s_to_vec3i) - -### Description -Converts a 3D short integer vector `a` into a 3D integer vector and stores the result in `dest` - -### Lua Example -`local Vec3iValue = vec3s_to_vec3i(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3i](structs.md#Vec3i) | -| a | [Vec3s](structs.md#Vec3s) | - -### Returns -[Vec3i](structs.md#Vec3i) - -### C Prototype -`Vec3ip vec3s_to_vec3i(OUT Vec3i dest, Vec3s a);` - -[:arrow_up_small:](#) -
--- diff --git a/docs/lua/functions-5.md b/docs/lua/functions-5.md index 53f109eba..21ef90e6f 100644 --- a/docs/lua/functions-5.md +++ b/docs/lua/functions-5.md @@ -5,6 +5,545 @@ [< prev](functions-4.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | 5 | [6](functions-6.md) | [7](functions-7.md) | [next >](functions-6.md)] +--- +# functions from math_util_vec3s.inl + +
+ + +## [vec3s_zero](#vec3s_zero) + +### Description +Sets the components of the 3D short integer vector `v` to 0 + +### Lua Example +`local Vec3sValue = vec3s_zero(v)` + +### Parameters +| Field | Type | +| ----- | ---- | +| v | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_zero(OUT Vec3s v);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_copy](#vec3s_copy) + +### Description +Copies the contents of a 3D short integer vector (`src`) into another 3D short integer vector (`dest`) + +### Lua Example +`local Vec3sValue = vec3s_copy(dest, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| src | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_copy(OUT Vec3s dest, Vec3s src);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_set](#vec3s_set) + +### Description +Sets the values of the 3D short integer vector `dest` to the given x, y, and z values + +### Lua Example +`local Vec3sValue = vec3s_set(dest, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| x | `integer` | +| y | `integer` | +| z | `integer` | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_set(OUT Vec3s dest, s16 x, s16 y, s16 z);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_add](#vec3s_add) + +### Description +Adds the components of the 3D short integer vector `a` to `dest` + +### Lua Example +`local Vec3sValue = vec3s_add(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_add(OUT Vec3s dest, Vec3s a);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_sum](#vec3s_sum) + +### Description +Adds the components of two 3D short integer vectors `a` and `b` and stores the result in `dest` + +### Lua Example +`local Vec3sValue = vec3s_sum(dest, a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | [Vec3s](structs.md#Vec3s) | +| b | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_sum(OUT Vec3s dest, Vec3s a, Vec3s b);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_sub](#vec3s_sub) + +### Description +Subtracts the components of the 3D short integer vector `a` from `dest` + +### Lua Example +`local Vec3sValue = vec3s_sub(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_sub(OUT Vec3s dest, Vec3s a);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_dif](#vec3s_dif) + +### Description +Subtracts the components of the 3D short integer vector `b` from the components of `a` and stores the result in `dest` + +### Lua Example +`local Vec3sValue = vec3s_dif(dest, a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | [Vec3s](structs.md#Vec3s) | +| b | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_dif(OUT Vec3s dest, Vec3s a, Vec3s b);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_mul](#vec3s_mul) + +### Description +Multiplies each component of the 3D short integer vector `dest` by the scalar value `a` + +### Lua Example +`local Vec3sValue = vec3s_mul(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | `number` | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_mul(OUT Vec3s dest, f32 a);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_mult](#vec3s_mult) + +### Description +Multiplies the components of the 3D short integer vector `dest` with the components of `a` + +### Lua Example +`local Vec3sValue = vec3s_mult(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_mult(OUT Vec3s dest, Vec3s a);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_prod](#vec3s_prod) + +### Description +Multiplies the components of two 3D short integer vectors `a` and `b` and stores the result in `dest` + +### Lua Example +`local Vec3sValue = vec3s_prod(dest, a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | [Vec3s](structs.md#Vec3s) | +| b | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_prod(OUT Vec3s dest, Vec3s a, Vec3s b);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_div](#vec3s_div) + +### Description +Divides each component of the 3D short integer vector `dest` by the scalar value `a` + +### Lua Example +`local Vec3sValue = vec3s_div(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | `number` | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_div(OUT Vec3s dest, f32 a);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_length](#vec3s_length) + +### Description +Calculates the length (magnitude) of the 3D short integer vector `a` + +### Lua Example +`local numberValue = vec3s_length(a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | [Vec3s](structs.md#Vec3s) | + +### Returns +- `number` + +### C Prototype +`f32 vec3s_length(Vec3s a);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_normalize](#vec3s_normalize) + +### Description +Normalizes the 3D short integer vector `v` so that its length (magnitude) becomes 1, while retaining its direction + +### Lua Example +`local Vec3sValue = vec3s_normalize(v)` + +### Parameters +| Field | Type | +| ----- | ---- | +| v | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_normalize(OUT Vec3s v);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_set_magnitude](#vec3s_set_magnitude) + +### Description +Sets the length (magnitude) of 3D short integer vector `v`, while retaining its direction + +### Lua Example +`local Vec3sValue = vec3s_set_magnitude(v, mag)` + +### Parameters +| Field | Type | +| ----- | ---- | +| v | [Vec3s](structs.md#Vec3s) | +| mag | `number` | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_set_magnitude(OUT Vec3s v, f32 mag);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_dot](#vec3s_dot) + +### Description +Computes the dot product of the two 3D short integer vectors `a` and `b` + +### Lua Example +`local numberValue = vec3s_dot(a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | [Vec3s](structs.md#Vec3s) | +| b | [Vec3s](structs.md#Vec3s) | + +### Returns +- `number` + +### C Prototype +`f32 vec3s_dot(Vec3s a, Vec3s b);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_cross](#vec3s_cross) + +### Description +Computes the cross product of two 3D short integer vectors `a` and `b` and stores the result in `dest` + +### Lua Example +`local Vec3sValue = vec3s_cross(dest, a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | [Vec3s](structs.md#Vec3s) | +| b | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_cross(OUT Vec3s dest, Vec3s a, Vec3s b);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_combine](#vec3s_combine) + +### Description +Takes two 3D short integer vectors `vecA` and `vecB`, multiplies them by `sclA` and `sclB` respectively, adds the scaled vectors together and stores the result in `dest` + +### Lua Example +`local Vec3sValue = vec3s_combine(dest, vecA, vecB, sclA, sclB)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| vecA | [Vec3s](structs.md#Vec3s) | +| vecB | [Vec3s](structs.md#Vec3s) | +| sclA | `number` | +| sclB | `number` | + +### Returns +[Vec3s](structs.md#Vec3s) + +### C Prototype +`Vec3sp vec3s_combine(OUT Vec3s dest, Vec3s vecA, Vec3s vecB, f32 sclA, f32 sclB);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_dist](#vec3s_dist) + +### Description +Calculates the distance between two 3D short integer vectors `v1` and `v2` + +### Lua Example +`local numberValue = vec3s_dist(v1, v2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| v1 | [Vec3s](structs.md#Vec3s) | +| v2 | [Vec3s](structs.md#Vec3s) | + +### Returns +- `number` + +### C Prototype +`f32 vec3s_dist(Vec3s v1, Vec3s v2);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_hdist](#vec3s_hdist) + +### Description +Calculates the horizontal distance between two 3D short integer vectors `v1` and `v2`, as if their y component was 0 + +### Lua Example +`local numberValue = vec3s_hdist(v1, v2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| v1 | [Vec3s](structs.md#Vec3s) | +| v2 | [Vec3s](structs.md#Vec3s) | + +### Returns +- `number` + +### C Prototype +`f32 vec3s_hdist(Vec3s v1, Vec3s v2);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_is_zero](#vec3s_is_zero) + +### Description +Returns `true` if all components of the 3D short integer vector `v` are zero + +### Lua Example +`local booleanValue = vec3s_is_zero(v)` + +### Parameters +| Field | Type | +| ----- | ---- | +| v | [Vec3s](structs.md#Vec3s) | + +### Returns +- `boolean` + +### C Prototype +`bool vec3s_is_zero(Vec3s v);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_to_vec3f](#vec3s_to_vec3f) + +### Description +Converts a 3D short integer vector `a` into a 3D floating-point vector and stores the result in `dest` + +### Lua Example +`local Vec3fValue = vec3s_to_vec3f(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| a | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3f](structs.md#Vec3f) + +### C Prototype +`Vec3fp vec3s_to_vec3f(OUT Vec3f dest, Vec3s a);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_to_vec3i](#vec3s_to_vec3i) + +### Description +Converts a 3D short integer vector `a` into a 3D integer vector and stores the result in `dest` + +### Lua Example +`local Vec3iValue = vec3s_to_vec3i(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3i](structs.md#Vec3i) | +| a | [Vec3s](structs.md#Vec3s) | + +### Returns +[Vec3i](structs.md#Vec3i) + +### C Prototype +`Vec3ip vec3s_to_vec3i(OUT Vec3i dest, Vec3s a);` + +[:arrow_up_small:](#) + +
+ --- # functions from misc.h @@ -342,71 +881,6 @@ Creates a modfs object for the active mod if it doesn't exist. Returns the modfs
-## [mod_fs_delete](#mod_fs_delete) - -### Description -Deletes the modfs object of the active mod if it exists. Returns true on success - -### Lua Example -`local booleanValue = mod_fs_delete()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool mod_fs_delete();` - -[:arrow_up_small:](#) - -
- -## [mod_fs_save](#mod_fs_save) - -### Description -Saves the modfs object of the active mod if it exists. Returns true on success - -### Lua Example -`local booleanValue = mod_fs_save()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool mod_fs_save();` - -[:arrow_up_small:](#) - -
- -## [mod_fs_set_public](#mod_fs_set_public) - -### Description -Marks the modfs object of the active mod as public (i.e. readable by other mods) if it exists. Returns true on success - -### Lua Example -`local booleanValue = mod_fs_set_public(pub)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pub | `boolean` | - -### Returns -- `boolean` - -### C Prototype -`bool mod_fs_set_public(bool pub);` - -[:arrow_up_small:](#) - -
- ## [mod_fs_get_filename](#mod_fs_get_filename) ### Description @@ -579,6 +1053,76 @@ Deletes all files of the provided `modFs`. Returns true on success
+## [mod_fs_save](#mod_fs_save) + +### Description +Saves the provided `modFs` to persistent storage. Returns true on success + +### Lua Example +`local booleanValue = mod_fs_save(modFs)` + +### Parameters +| Field | Type | +| ----- | ---- | +| modFs | [ModFs](structs.md#ModFs) | + +### Returns +- `boolean` + +### C Prototype +`bool mod_fs_save(struct ModFs *modFs);` + +[:arrow_up_small:](#) + +
+ +## [mod_fs_delete](#mod_fs_delete) + +### Description +Removes the provided `modFs` from persistent storage and deletes its object. Returns true on success + +### Lua Example +`local booleanValue = mod_fs_delete(modFs)` + +### Parameters +| Field | Type | +| ----- | ---- | +| modFs | [ModFs](structs.md#ModFs) | + +### Returns +- `boolean` + +### C Prototype +`bool mod_fs_delete(struct ModFs *modFs);` + +[:arrow_up_small:](#) + +
+ +## [mod_fs_set_public](#mod_fs_set_public) + +### Description +Marks the provided `modFs` as public (i.e. readable by other mods). Returns true on success + +### Lua Example +`local booleanValue = mod_fs_set_public(modFs, pub)` + +### Parameters +| Field | Type | +| ----- | ---- | +| modFs | [ModFs](structs.md#ModFs) | +| pub | `boolean` | + +### Returns +- `boolean` + +### C Prototype +`bool mod_fs_set_public(struct ModFs *modFs, bool pub);` + +[:arrow_up_small:](#) + +
+ ## [mod_fs_file_read_bool](#mod_fs_file_read_bool) ### Description @@ -891,6 +1435,29 @@ Sets the current position of a modfs `file`. If `origin` is `FILE_SEEK_SET`, fil
+## [mod_fs_file_rewind](#mod_fs_file_rewind) + +### Description +Sets the current position of a modfs `file` to its beginning. Returns true on success + +### Lua Example +`local booleanValue = mod_fs_file_rewind(file)` + +### Parameters +| Field | Type | +| ----- | ---- | +| file | [ModFsFile](structs.md#ModFsFile) | + +### Returns +- `boolean` + +### C Prototype +`bool mod_fs_file_rewind(struct ModFsFile *file);` + +[:arrow_up_small:](#) + +
+ ## [mod_fs_file_is_eof](#mod_fs_file_is_eof) ### Description @@ -963,6 +1530,30 @@ Erases `length` bytes or characters from a modfs `file`. Returns true on success
+## [mod_fs_file_set_text_mode](#mod_fs_file_set_text_mode) + +### Description +Marks the provided modfs `file` as text. Returns true on success + +### Lua Example +`local booleanValue = mod_fs_file_set_text_mode(file, text)` + +### Parameters +| Field | Type | +| ----- | ---- | +| file | [ModFsFile](structs.md#ModFsFile) | +| text | `boolean` | + +### Returns +- `boolean` + +### C Prototype +`bool mod_fs_file_set_text_mode(struct ModFsFile *file, bool text);` + +[:arrow_up_small:](#) + +
+ ## [mod_fs_file_set_public](#mod_fs_file_set_public) ### Description @@ -1178,6 +1769,27 @@ Loads a bool `value` from a `key` in mod storage
+## [mod_storage_load_all](#mod_storage_load_all) + +### Description +Loads all keys and values in mod storage as strings and returns them as a table + +### Lua Example +`local tableValue = mod_storage_load_all()` + +### Parameters +- None + +### Returns +- `table` + +### C Prototype +`LuaTable mod_storage_load_all(void);` + +[:arrow_up_small:](#) + +
+ ## [mod_storage_exists](#mod_storage_exists) ### Description @@ -3625,4584 +4237,6 @@ Moves the current object for specifically one second (`oTimer` < 30) [:arrow_up_small:](#) -
- ---- -# functions from object_helpers.c - -
- - -## [clear_move_flag](#clear_move_flag) - -### Lua Example -`local integerValue = clear_move_flag(bitSet, flag)` - -### Parameters -| Field | Type | -| ----- | ---- | -| bitSet | `Pointer` <`integer`> | -| flag | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 clear_move_flag(u32 *bitSet, s32 flag);` - -[:arrow_up_small:](#) - -
- -## [set_room_override](#set_room_override) - -### Description -Overrides the current room Mario is in. Set to -1 to reset override - -### Lua Example -`set_room_override(room)` - -### Parameters -| Field | Type | -| ----- | ---- | -| room | `integer` | - -### Returns -- None - -### C Prototype -`void set_room_override(s16 room);` - -[:arrow_up_small:](#) - -
- -## [obj_update_pos_from_parent_transformation](#obj_update_pos_from_parent_transformation) - -### Lua Example -`obj_update_pos_from_parent_transformation(a0, a1)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | [Mat4](structs.md#Mat4) | -| a1 | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_update_pos_from_parent_transformation(Mat4 a0, struct Object *a1);` - -[:arrow_up_small:](#) - -
- -## [obj_apply_scale_to_matrix](#obj_apply_scale_to_matrix) - -### Lua Example -`obj_apply_scale_to_matrix(obj, dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| dst | [Mat4](structs.md#Mat4) | -| src | [Mat4](structs.md#Mat4) | - -### Returns -- None - -### C Prototype -`void obj_apply_scale_to_matrix(struct Object *obj, OUT Mat4 dst, Mat4 src);` - -[:arrow_up_small:](#) - -
- -## [create_transformation_from_matrices](#create_transformation_from_matrices) - -### Lua Example -`create_transformation_from_matrices(a0, a1, a2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | [Mat4](structs.md#Mat4) | -| a1 | [Mat4](structs.md#Mat4) | -| a2 | [Mat4](structs.md#Mat4) | - -### Returns -- None - -### C Prototype -`void create_transformation_from_matrices(OUT Mat4 a0, Mat4 a1, Mat4 a2);` - -[:arrow_up_small:](#) - -
- -## [obj_set_held_state](#obj_set_held_state) - -### Lua Example -`obj_set_held_state(obj, heldBehavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| heldBehavior | `Pointer` <`BehaviorScript`> | - -### Returns -- None - -### C Prototype -`void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior);` - -[:arrow_up_small:](#) - -
- -## [lateral_dist_between_objects](#lateral_dist_between_objects) - -### Lua Example -`local numberValue = lateral_dist_between_objects(obj1, obj2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj1 | [Object](structs.md#Object) | -| obj2 | [Object](structs.md#Object) | - -### Returns -- `number` - -### C Prototype -`f32 lateral_dist_between_objects(struct Object *obj1, struct Object *obj2);` - -[:arrow_up_small:](#) - -
- -## [dist_between_objects](#dist_between_objects) - -### Lua Example -`local numberValue = dist_between_objects(obj1, obj2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj1 | [Object](structs.md#Object) | -| obj2 | [Object](structs.md#Object) | - -### Returns -- `number` - -### C Prototype -`f32 dist_between_objects(struct Object *obj1, struct Object *obj2);` - -[:arrow_up_small:](#) - -
- -## [dist_between_object_and_point](#dist_between_object_and_point) - -### Lua Example -`local numberValue = dist_between_object_and_point(obj, pointX, pointY, pointZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pointX | `number` | -| pointY | `number` | -| pointZ | `number` | - -### Returns -- `number` - -### C Prototype -`f32 dist_between_object_and_point(struct Object *obj, f32 pointX, f32 pointY, f32 pointZ);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_forward_vel_approach_upward](#cur_obj_forward_vel_approach_upward) - -### Lua Example -`cur_obj_forward_vel_approach_upward(target, increment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| target | `number` | -| increment | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_forward_vel_approach_upward(f32 target, f32 increment);` - -[:arrow_up_small:](#) - -
- -## [approach_f32_signed](#approach_f32_signed) - -### Lua Example -`local integerValue = approach_f32_signed(value, target, increment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `Pointer` <`number`> | -| target | `number` | -| increment | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 approach_f32_signed(f32 *value, f32 target, f32 increment);` - -[:arrow_up_small:](#) - -
- -## [approach_f32_symmetric](#approach_f32_symmetric) - -### Lua Example -`local numberValue = approach_f32_symmetric(value, target, increment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `number` | -| target | `number` | -| increment | `number` | - -### Returns -- `number` - -### C Prototype -`f32 approach_f32_symmetric(f32 value, f32 target, f32 increment);` - -[:arrow_up_small:](#) - -
- -## [approach_s16_symmetric](#approach_s16_symmetric) - -### Lua Example -`local integerValue = approach_s16_symmetric(value, target, increment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `integer` | -| target | `integer` | -| increment | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 approach_s16_symmetric(s16 value, s16 target, s16 increment);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_rotate_yaw_toward](#cur_obj_rotate_yaw_toward) - -### Lua Example -`local integerValue = cur_obj_rotate_yaw_toward(target, increment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| target | `integer` | -| increment | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_rotate_yaw_toward(s16 target, s16 increment);` - -[:arrow_up_small:](#) - -
- -## [obj_angle_to_object](#obj_angle_to_object) - -### Lua Example -`local integerValue = obj_angle_to_object(obj1, obj2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj1 | [Object](structs.md#Object) | -| obj2 | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s16 obj_angle_to_object(struct Object *obj1, struct Object *obj2);` - -[:arrow_up_small:](#) - -
- -## [obj_pitch_to_object](#obj_pitch_to_object) - -### Lua Example -`local integerValue = obj_pitch_to_object(obj, target)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| target | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s16 obj_pitch_to_object(struct Object* obj, struct Object* target);` - -[:arrow_up_small:](#) - -
- -## [obj_angle_to_point](#obj_angle_to_point) - -### Lua Example -`local integerValue = obj_angle_to_point(obj, pointX, pointZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pointX | `number` | -| pointZ | `number` | - -### Returns -- `integer` - -### C Prototype -`s16 obj_angle_to_point(struct Object *obj, f32 pointX, f32 pointZ);` - -[:arrow_up_small:](#) - -
- -## [obj_turn_toward_object](#obj_turn_toward_object) - -### Lua Example -`local integerValue = obj_turn_toward_object(obj, target, angleIndex, turnAmount)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| target | [Object](structs.md#Object) | -| angleIndex | `integer` | -| turnAmount | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleIndex, s16 turnAmount);` - -[:arrow_up_small:](#) - -
- -## [obj_set_parent_relative_pos](#obj_set_parent_relative_pos) - -### Lua Example -`obj_set_parent_relative_pos(obj, relX, relY, relZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| relX | `integer` | -| relY | `integer` | -| relZ | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_parent_relative_pos(struct Object *obj, s16 relX, s16 relY, s16 relZ);` - -[:arrow_up_small:](#) - -
- -## [obj_set_pos](#obj_set_pos) - -### Lua Example -`obj_set_pos(obj, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| x | `integer` | -| y | `integer` | -| z | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_pos(struct Object *obj, s16 x, s16 y, s16 z);` - -[:arrow_up_small:](#) - -
- -## [obj_set_angle](#obj_set_angle) - -### Lua Example -`obj_set_angle(obj, pitch, yaw, roll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pitch | `integer` | -| yaw | `integer` | -| roll | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` - -[:arrow_up_small:](#) - -
- -## [obj_set_move_angle](#obj_set_move_angle) - -### Lua Example -`obj_set_move_angle(obj, pitch, yaw, roll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pitch | `integer` | -| yaw | `integer` | -| roll | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_move_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` - -[:arrow_up_small:](#) - -
- -## [obj_set_face_angle](#obj_set_face_angle) - -### Lua Example -`obj_set_face_angle(obj, pitch, yaw, roll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pitch | `integer` | -| yaw | `integer` | -| roll | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_face_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` - -[:arrow_up_small:](#) - -
- -## [obj_set_gfx_angle](#obj_set_gfx_angle) - -### Lua Example -`obj_set_gfx_angle(obj, pitch, yaw, roll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pitch | `integer` | -| yaw | `integer` | -| roll | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_gfx_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` - -[:arrow_up_small:](#) - -
- -## [obj_set_gfx_pos](#obj_set_gfx_pos) - -### Lua Example -`obj_set_gfx_pos(obj, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| x | `number` | -| y | `number` | -| z | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_gfx_pos(struct Object *obj, f32 x, f32 y, f32 z);` - -[:arrow_up_small:](#) - -
- -## [obj_set_gfx_scale](#obj_set_gfx_scale) - -### Lua Example -`obj_set_gfx_scale(obj, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| x | `number` | -| y | `number` | -| z | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_gfx_scale(struct Object *obj, f32 x, f32 y, f32 z);` - -[:arrow_up_small:](#) - -
- -## [spawn_water_droplet](#spawn_water_droplet) - -### Lua Example -`local ObjectValue = spawn_water_droplet(parent, params)` - -### Parameters -| Field | Type | -| ----- | ---- | -| parent | [Object](structs.md#Object) | -| params | [WaterDropletParams](structs.md#WaterDropletParams) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *spawn_water_droplet(struct Object *parent, struct WaterDropletParams *params);` - -[:arrow_up_small:](#) - -
- -## [obj_build_relative_transform](#obj_build_relative_transform) - -### Lua Example -`obj_build_relative_transform(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_build_relative_transform(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_using_vel](#cur_obj_move_using_vel) - -### Lua Example -`cur_obj_move_using_vel()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_using_vel(void);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_graph_y_offset](#obj_copy_graph_y_offset) - -### Lua Example -`obj_copy_graph_y_offset(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_graph_y_offset(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_pos_and_angle](#obj_copy_pos_and_angle) - -### Lua Example -`obj_copy_pos_and_angle(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_pos_and_angle(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_pos](#obj_copy_pos) - -### Lua Example -`obj_copy_pos(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_pos(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_angle](#obj_copy_angle) - -### Lua Example -`obj_copy_angle(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_angle(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_set_gfx_pos_from_pos](#obj_set_gfx_pos_from_pos) - -### Lua Example -`obj_set_gfx_pos_from_pos(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_gfx_pos_from_pos(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_init_animation](#obj_init_animation) - -### Lua Example -`obj_init_animation(obj, animIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| animIndex | `integer` | - -### Returns -- None - -### C Prototype -`void obj_init_animation(struct Object *obj, s32 animIndex);` - -[:arrow_up_small:](#) - -
- -## [linear_mtxf_mul_vec3f](#linear_mtxf_mul_vec3f) - -### Description -Multiplies a vector by a matrix of the form: `| ? ? ? 0 |` `| ? ? ? 0 |` `| ? ? ? 0 |` `| 0 0 0 1 |` i.e. a matrix representing a linear transformation over 3 space - -### Lua Example -`linear_mtxf_mul_vec3f(m, dst, v)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [Mat4](structs.md#Mat4) | -| dst | [Vec3f](structs.md#Vec3f) | -| v | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void linear_mtxf_mul_vec3f(Mat4 m, OUT Vec3f dst, Vec3f v);` - -[:arrow_up_small:](#) - -
- -## [linear_mtxf_transpose_mul_vec3f](#linear_mtxf_transpose_mul_vec3f) - -### Description -Multiplies a vector by the transpose of a matrix of the form: `| ? ? ? 0 |` `| ? ? ? 0 |` `| ? ? ? 0 |` `| 0 0 0 1 |` i.e. a matrix representing a linear transformation over 3 space - -### Lua Example -`linear_mtxf_transpose_mul_vec3f(m, dst, v)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [Mat4](structs.md#Mat4) | -| dst | [Vec3f](structs.md#Vec3f) | -| v | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void linear_mtxf_transpose_mul_vec3f(Mat4 m, OUT Vec3f dst, Vec3f v);` - -[:arrow_up_small:](#) - -
- -## [obj_apply_scale_to_transform](#obj_apply_scale_to_transform) - -### Lua Example -`obj_apply_scale_to_transform(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_apply_scale_to_transform(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_scale](#obj_copy_scale) - -### Lua Example -`obj_copy_scale(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_scale(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_scale_xyz](#obj_scale_xyz) - -### Lua Example -`obj_scale_xyz(obj, xScale, yScale, zScale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| xScale | `number` | -| yScale | `number` | -| zScale | `number` | - -### Returns -- None - -### C Prototype -`void obj_scale_xyz(struct Object *obj, f32 xScale, f32 yScale, f32 zScale);` - -[:arrow_up_small:](#) - -
- -## [obj_scale](#obj_scale) - -### Lua Example -`obj_scale(obj, scale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| scale | `number` | - -### Returns -- None - -### C Prototype -`void obj_scale(struct Object *obj, f32 scale);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_scale](#cur_obj_scale) - -### Lua Example -`cur_obj_scale(scale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| scale | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_scale(f32 scale);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_init_animation](#cur_obj_init_animation) - -### Lua Example -`cur_obj_init_animation(animIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| animIndex | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_init_animation(s32 animIndex);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_init_animation_with_sound](#cur_obj_init_animation_with_sound) - -### Lua Example -`cur_obj_init_animation_with_sound(animIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| animIndex | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_init_animation_with_sound(s32 animIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_init_animation_with_accel_and_sound](#obj_init_animation_with_accel_and_sound) - -### Lua Example -`obj_init_animation_with_accel_and_sound(obj, animIndex, accel)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| animIndex | `integer` | -| accel | `number` | - -### Returns -- None - -### C Prototype -`void obj_init_animation_with_accel_and_sound(struct Object *obj, s32 animIndex, f32 accel);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_init_animation_with_accel_and_sound](#cur_obj_init_animation_with_accel_and_sound) - -### Lua Example -`cur_obj_init_animation_with_accel_and_sound(animIndex, accel)` - -### Parameters -| Field | Type | -| ----- | ---- | -| animIndex | `integer` | -| accel | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_init_animation_with_accel_and_sound(s32 animIndex, f32 accel);` - -[:arrow_up_small:](#) - -
- -## [obj_init_animation_with_sound](#obj_init_animation_with_sound) - -### Lua Example -`obj_init_animation_with_sound(obj, animations, animIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| animations | [AnimationTable](structs.md#AnimationTable) | -| animIndex | `integer` | - -### Returns -- None - -### C Prototype -`void obj_init_animation_with_sound(struct Object *obj, const struct AnimationTable* animations, s32 animIndex);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_enable_rendering_and_become_tangible](#cur_obj_enable_rendering_and_become_tangible) - -### Lua Example -`cur_obj_enable_rendering_and_become_tangible(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void cur_obj_enable_rendering_and_become_tangible(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_enable_rendering](#cur_obj_enable_rendering) - -### Lua Example -`cur_obj_enable_rendering()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_enable_rendering(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_disable_rendering_and_become_intangible](#cur_obj_disable_rendering_and_become_intangible) - -### Lua Example -`cur_obj_disable_rendering_and_become_intangible(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void cur_obj_disable_rendering_and_become_intangible(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_disable_rendering](#cur_obj_disable_rendering) - -### Lua Example -`cur_obj_disable_rendering()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_disable_rendering(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_unhide](#cur_obj_unhide) - -### Lua Example -`cur_obj_unhide()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_unhide(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_hide](#cur_obj_hide) - -### Lua Example -`cur_obj_hide()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_hide(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_relative](#cur_obj_set_pos_relative) - -### Lua Example -`cur_obj_set_pos_relative(other, dleft, dy, dforward)` - -### Parameters -| Field | Type | -| ----- | ---- | -| other | [Object](structs.md#Object) | -| dleft | `number` | -| dy | `number` | -| dforward | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_relative(struct Object *other, f32 dleft, f32 dy, f32 dforward);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_relative_to_parent](#cur_obj_set_pos_relative_to_parent) - -### Lua Example -`cur_obj_set_pos_relative_to_parent(dleft, dy, dforward)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dleft | `number` | -| dy | `number` | -| dforward | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_relative_to_parent(f32 dleft, f32 dy, f32 dforward);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_enable_rendering_2](#cur_obj_enable_rendering_2) - -### Lua Example -`cur_obj_enable_rendering_2()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_enable_rendering_2(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_unused_init_on_floor](#cur_obj_unused_init_on_floor) - -### Lua Example -`cur_obj_unused_init_on_floor()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_unused_init_on_floor(void);` - -[:arrow_up_small:](#) - -
- -## [obj_set_face_angle_to_move_angle](#obj_set_face_angle_to_move_angle) - -### Lua Example -`obj_set_face_angle_to_move_angle(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_face_angle_to_move_angle(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [get_object_list_from_behavior](#get_object_list_from_behavior) - -### Lua Example -`local integerValue = get_object_list_from_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- `integer` - -### C Prototype -`u32 get_object_list_from_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_nearest_object_with_behavior](#cur_obj_nearest_object_with_behavior) - -### Lua Example -`local ObjectValue = cur_obj_nearest_object_with_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *cur_obj_nearest_object_with_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_dist_to_nearest_object_with_behavior](#cur_obj_dist_to_nearest_object_with_behavior) - -### Lua Example -`local numberValue = cur_obj_dist_to_nearest_object_with_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_dist_to_nearest_object_with_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_find_nearest_pole](#cur_obj_find_nearest_pole) - -### Lua Example -`local ObjectValue = cur_obj_find_nearest_pole()` - -### Parameters -- None - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object* cur_obj_find_nearest_pole(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_find_nearest_object_with_behavior](#cur_obj_find_nearest_object_with_behavior) - -### Lua Example -`local ObjectValue = cur_obj_find_nearest_object_with_behavior(behavior, dist)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | -| dist | `Pointer` <`number`> | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *cur_obj_find_nearest_object_with_behavior(const BehaviorScript *behavior, f32 *dist);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_count_objects_with_behavior](#cur_obj_count_objects_with_behavior) - -### Lua Example -`local integerValue = cur_obj_count_objects_with_behavior(behavior, dist)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | -| dist | `number` | - -### Returns -- `integer` - -### C Prototype -`u16 cur_obj_count_objects_with_behavior(const BehaviorScript* behavior, f32 dist);` - -[:arrow_up_small:](#) - -
- -## [find_unimportant_object](#find_unimportant_object) - -### Lua Example -`local ObjectValue = find_unimportant_object()` - -### Parameters -- None - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *find_unimportant_object(void);` - -[:arrow_up_small:](#) - -
- -## [count_unimportant_objects](#count_unimportant_objects) - -### Lua Example -`local integerValue = count_unimportant_objects()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 count_unimportant_objects(void);` - -[:arrow_up_small:](#) - -
- -## [count_objects_with_behavior](#count_objects_with_behavior) - -### Lua Example -`local integerValue = count_objects_with_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- `integer` - -### C Prototype -`s32 count_objects_with_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [find_object_with_behavior](#find_object_with_behavior) - -### Lua Example -`local ObjectValue = find_object_with_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *find_object_with_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_find_nearby_held_actor](#cur_obj_find_nearby_held_actor) - -### Lua Example -`local ObjectValue = cur_obj_find_nearby_held_actor(behavior, maxDist)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | -| maxDist | `number` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *cur_obj_find_nearby_held_actor(const BehaviorScript *behavior, f32 maxDist);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_reset_timer_and_subaction](#cur_obj_reset_timer_and_subaction) - -### Lua Example -`cur_obj_reset_timer_and_subaction()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_reset_timer_and_subaction(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_change_action](#cur_obj_change_action) - -### Lua Example -`cur_obj_change_action(action)` - -### Parameters -| Field | Type | -| ----- | ---- | -| action | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_change_action(s32 action);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_vel_from_mario_vel](#cur_obj_set_vel_from_mario_vel) - -### Lua Example -`cur_obj_set_vel_from_mario_vel(m, f12, f14)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| f12 | `number` | -| f14 | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_vel_from_mario_vel(struct MarioState* m, f32 f12, f32 f14);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_reverse_animation](#cur_obj_reverse_animation) - -### Lua Example -`cur_obj_reverse_animation()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_reverse_animation(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_extend_animation_if_at_end](#cur_obj_extend_animation_if_at_end) - -### Lua Example -`cur_obj_extend_animation_if_at_end()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_extend_animation_if_at_end(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_check_if_near_animation_end](#cur_obj_check_if_near_animation_end) - -### Lua Example -`local integerValue = cur_obj_check_if_near_animation_end()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_if_near_animation_end(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_check_if_at_animation_end](#cur_obj_check_if_at_animation_end) - -### Lua Example -`local integerValue = cur_obj_check_if_at_animation_end()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_if_at_animation_end(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_check_anim_frame](#cur_obj_check_anim_frame) - -### Lua Example -`local integerValue = cur_obj_check_anim_frame(frame)` - -### Parameters -| Field | Type | -| ----- | ---- | -| frame | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_anim_frame(s32 frame);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_check_anim_frame_in_range](#cur_obj_check_anim_frame_in_range) - -### Lua Example -`local integerValue = cur_obj_check_anim_frame_in_range(startFrame, rangeLength)` - -### Parameters -| Field | Type | -| ----- | ---- | -| startFrame | `integer` | -| rangeLength | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_anim_frame_in_range(s32 startFrame, s32 rangeLength);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_check_frame_prior_current_frame](#cur_obj_check_frame_prior_current_frame) - -### Lua Example -`local integerValue = cur_obj_check_frame_prior_current_frame(a0)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | `Pointer` <`integer`> | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_frame_prior_current_frame(s16 *a0);` - -[:arrow_up_small:](#) - -
- -## [mario_is_in_air_action](#mario_is_in_air_action) - -### Lua Example -`local integerValue = mario_is_in_air_action(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 mario_is_in_air_action(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- -## [mario_is_dive_sliding](#mario_is_dive_sliding) - -### Lua Example -`local integerValue = mario_is_dive_sliding(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 mario_is_dive_sliding(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_y_vel_and_animation](#cur_obj_set_y_vel_and_animation) - -### Lua Example -`cur_obj_set_y_vel_and_animation(sp18, sp1C)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp18 | `number` | -| sp1C | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_y_vel_and_animation(f32 sp18, s32 sp1C);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_unrender_and_reset_state](#cur_obj_unrender_and_reset_state) - -### Lua Example -`cur_obj_unrender_and_reset_state(sp18, sp1C)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp18 | `integer` | -| sp1C | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_unrender_and_reset_state(s32 sp18, s32 sp1C);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_after_thrown_or_dropped](#cur_obj_move_after_thrown_or_dropped) - -### Lua Example -`cur_obj_move_after_thrown_or_dropped(forwardVel, velY)` - -### Parameters -| Field | Type | -| ----- | ---- | -| forwardVel | `number` | -| velY | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_move_after_thrown_or_dropped(f32 forwardVel, f32 velY);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_get_thrown_or_placed](#cur_obj_get_thrown_or_placed) - -### Lua Example -`cur_obj_get_thrown_or_placed(forwardVel, velY, thrownAction)` - -### Parameters -| Field | Type | -| ----- | ---- | -| forwardVel | `number` | -| velY | `number` | -| thrownAction | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_get_thrown_or_placed(f32 forwardVel, f32 velY, s32 thrownAction);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_get_dropped](#cur_obj_get_dropped) - -### Lua Example -`cur_obj_get_dropped()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_get_dropped(void);` - -[:arrow_up_small:](#) - -
- -## [mario_set_flag](#mario_set_flag) - -### Lua Example -`mario_set_flag(flag)` - -### Parameters -| Field | Type | -| ----- | ---- | -| flag | `integer` | - -### Returns -- None - -### C Prototype -`void mario_set_flag(s32 flag);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_clear_interact_status_flag](#cur_obj_clear_interact_status_flag) - -### Lua Example -`local integerValue = cur_obj_clear_interact_status_flag(flag)` - -### Parameters -| Field | Type | -| ----- | ---- | -| flag | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_clear_interact_status_flag(s32 flag);` - -[:arrow_up_small:](#) - -
- -## [obj_mark_for_deletion](#obj_mark_for_deletion) - -### Description -Marks an object to be unloaded at the end of the frame - -### Lua Example -`obj_mark_for_deletion(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_mark_for_deletion(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_disable](#cur_obj_disable) - -### Lua Example -`cur_obj_disable()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_disable(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_become_intangible](#cur_obj_become_intangible) - -### Lua Example -`cur_obj_become_intangible()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_become_intangible(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_become_tangible](#cur_obj_become_tangible) - -### Lua Example -`cur_obj_become_tangible()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_become_tangible(void);` - -[:arrow_up_small:](#) - -
- -## [obj_become_tangible](#obj_become_tangible) - -### Lua Example -`obj_become_tangible(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_become_tangible(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_update_floor_height](#cur_obj_update_floor_height) - -### Lua Example -`cur_obj_update_floor_height()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_update_floor_height(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_update_floor_height_and_get_floor](#cur_obj_update_floor_height_and_get_floor) - -### Lua Example -`local SurfaceValue = cur_obj_update_floor_height_and_get_floor()` - -### Parameters -- None - -### Returns -[Surface](structs.md#Surface) - -### C Prototype -`struct Surface *cur_obj_update_floor_height_and_get_floor(void);` - -[:arrow_up_small:](#) - -
- -## [apply_drag_to_value](#apply_drag_to_value) - -### Lua Example -`apply_drag_to_value(value, dragStrength)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `Pointer` <`number`> | -| dragStrength | `number` | - -### Returns -- None - -### C Prototype -`void apply_drag_to_value(f32 *value, f32 dragStrength);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_apply_drag_xz](#cur_obj_apply_drag_xz) - -### Lua Example -`cur_obj_apply_drag_xz(dragStrength)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dragStrength | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_apply_drag_xz(f32 dragStrength);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_xz](#cur_obj_move_xz) - -### Lua Example -`local integerValue = cur_obj_move_xz(steepSlopeNormalY, careAboutEdgesAndSteepSlopes)` - -### Parameters -| Field | Type | -| ----- | ---- | -| steepSlopeNormalY | `number` | -| careAboutEdgesAndSteepSlopes | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_move_xz(f32 steepSlopeNormalY, s32 careAboutEdgesAndSteepSlopes);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_update_underwater_flags](#cur_obj_move_update_underwater_flags) - -### Lua Example -`cur_obj_move_update_underwater_flags()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_update_underwater_flags(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_update_ground_air_flags](#cur_obj_move_update_ground_air_flags) - -### Lua Example -`cur_obj_move_update_ground_air_flags(gravity, bounciness)` - -### Parameters -| Field | Type | -| ----- | ---- | -| gravity | `number` | -| bounciness | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_move_update_ground_air_flags(UNUSED f32 gravity, f32 bounciness);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_y_and_get_water_level](#cur_obj_move_y_and_get_water_level) - -### Lua Example -`local numberValue = cur_obj_move_y_and_get_water_level(gravity, buoyancy)` - -### Parameters -| Field | Type | -| ----- | ---- | -| gravity | `number` | -| buoyancy | `number` | - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_move_y_and_get_water_level(f32 gravity, f32 buoyancy);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_y](#cur_obj_move_y) - -### Lua Example -`cur_obj_move_y(gravity, bounciness, buoyancy)` - -### Parameters -| Field | Type | -| ----- | ---- | -| gravity | `number` | -| bounciness | `number` | -| buoyancy | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_move_y(f32 gravity, f32 bounciness, f32 buoyancy);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_unused_resolve_wall_collisions](#cur_obj_unused_resolve_wall_collisions) - -### Lua Example -`cur_obj_unused_resolve_wall_collisions(offsetY, radius)` - -### Parameters -| Field | Type | -| ----- | ---- | -| offsetY | `number` | -| radius | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_unused_resolve_wall_collisions(f32 offsetY, f32 radius);` - -[:arrow_up_small:](#) - -
- -## [abs_angle_diff](#abs_angle_diff) - -### Lua Example -`local integerValue = abs_angle_diff(x0, x1)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x0 | `integer` | -| x1 | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 abs_angle_diff(s16 x0, s16 x1);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_xz_using_fvel_and_yaw](#cur_obj_move_xz_using_fvel_and_yaw) - -### Lua Example -`cur_obj_move_xz_using_fvel_and_yaw()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_xz_using_fvel_and_yaw(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_y_with_terminal_vel](#cur_obj_move_y_with_terminal_vel) - -### Lua Example -`cur_obj_move_y_with_terminal_vel()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_y_with_terminal_vel(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_compute_vel_xz](#cur_obj_compute_vel_xz) - -### Lua Example -`cur_obj_compute_vel_xz()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_compute_vel_xz(void);` - -[:arrow_up_small:](#) - -
- -## [increment_velocity_toward_range](#increment_velocity_toward_range) - -### Lua Example -`local numberValue = increment_velocity_toward_range(value, center, zeroThreshold, increment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `number` | -| center | `number` | -| zeroThreshold | `number` | -| increment | `number` | - -### Returns -- `number` - -### C Prototype -`f32 increment_velocity_toward_range(f32 value, f32 center, f32 zeroThreshold, f32 increment);` - -[:arrow_up_small:](#) - -
- -## [obj_check_if_collided_with_object](#obj_check_if_collided_with_object) - -### Lua Example -`local integerValue = obj_check_if_collided_with_object(obj1, obj2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj1 | [Object](structs.md#Object) | -| obj2 | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_check_if_collided_with_object(struct Object *obj1, struct Object *obj2);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_behavior](#cur_obj_set_behavior) - -### Lua Example -`cur_obj_set_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- None - -### C Prototype -`void cur_obj_set_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [obj_set_behavior](#obj_set_behavior) - -### Lua Example -`obj_set_behavior(obj, behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- None - -### C Prototype -`void obj_set_behavior(struct Object *obj, const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_has_behavior](#cur_obj_has_behavior) - -### Lua Example -`local integerValue = cur_obj_has_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_has_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [obj_has_behavior](#obj_has_behavior) - -### Lua Example -`local integerValue = obj_has_behavior(obj, behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- `integer` - -### C Prototype -`s32 obj_has_behavior(struct Object *obj, const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_lateral_dist_from_obj_to_home](#cur_obj_lateral_dist_from_obj_to_home) - -### Lua Example -`local numberValue = cur_obj_lateral_dist_from_obj_to_home(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_lateral_dist_from_obj_to_home(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_lateral_dist_from_mario_to_home](#cur_obj_lateral_dist_from_mario_to_home) - -### Lua Example -`local numberValue = cur_obj_lateral_dist_from_mario_to_home()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_lateral_dist_from_mario_to_home(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_lateral_dist_to_home](#cur_obj_lateral_dist_to_home) - -### Lua Example -`local numberValue = cur_obj_lateral_dist_to_home()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_lateral_dist_to_home(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_outside_home_square](#cur_obj_outside_home_square) - -### Lua Example -`local integerValue = cur_obj_outside_home_square(halfLength)` - -### Parameters -| Field | Type | -| ----- | ---- | -| halfLength | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_outside_home_square(f32 halfLength);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_outside_home_rectangle](#cur_obj_outside_home_rectangle) - -### Lua Example -`local integerValue = cur_obj_outside_home_rectangle(minX, maxX, minZ, maxZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| minX | `number` | -| maxX | `number` | -| minZ | `number` | -| maxZ | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_outside_home_rectangle(f32 minX, f32 maxX, f32 minZ, f32 maxZ);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_to_home](#cur_obj_set_pos_to_home) - -### Lua Example -`cur_obj_set_pos_to_home()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_to_home(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_to_home_and_stop](#cur_obj_set_pos_to_home_and_stop) - -### Lua Example -`cur_obj_set_pos_to_home_and_stop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_to_home_and_stop(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_shake_y](#cur_obj_shake_y) - -### Lua Example -`cur_obj_shake_y(amount)` - -### Parameters -| Field | Type | -| ----- | ---- | -| amount | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_shake_y(f32 amount);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_start_cam_event](#cur_obj_start_cam_event) - -### Lua Example -`cur_obj_start_cam_event(obj, cameraEvent)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| cameraEvent | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_start_cam_event(UNUSED struct Object *obj, s32 cameraEvent);` - -[:arrow_up_small:](#) - -
- -## [set_mario_interact_hoot_if_in_range](#set_mario_interact_hoot_if_in_range) - -### Lua Example -`set_mario_interact_hoot_if_in_range(sp0, sp4, sp8)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp0 | `integer` | -| sp4 | `integer` | -| sp8 | `number` | - -### Returns -- None - -### C Prototype -`void set_mario_interact_hoot_if_in_range(UNUSED s32 sp0, UNUSED s32 sp4, f32 sp8);` - -[:arrow_up_small:](#) - -
- -## [obj_set_billboard](#obj_set_billboard) - -### Lua Example -`obj_set_billboard(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_billboard(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_set_cylboard](#obj_set_cylboard) - -### Lua Example -`obj_set_cylboard(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_cylboard(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_billboard_if_vanilla_cam](#cur_obj_set_billboard_if_vanilla_cam) - -### Lua Example -`cur_obj_set_billboard_if_vanilla_cam()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_billboard_if_vanilla_cam(void);` - -[:arrow_up_small:](#) - -
- -## [obj_set_hitbox_radius_and_height](#obj_set_hitbox_radius_and_height) - -### Lua Example -`obj_set_hitbox_radius_and_height(o, radius, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| radius | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_hitbox_radius_and_height(struct Object *o, f32 radius, f32 height);` - -[:arrow_up_small:](#) - -
- -## [obj_set_hurtbox_radius_and_height](#obj_set_hurtbox_radius_and_height) - -### Lua Example -`obj_set_hurtbox_radius_and_height(o, radius, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| radius | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_hurtbox_radius_and_height(struct Object *o, f32 radius, f32 height);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_hitbox_radius_and_height](#cur_obj_set_hitbox_radius_and_height) - -### Lua Example -`cur_obj_set_hitbox_radius_and_height(radius, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| radius | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_hitbox_radius_and_height(f32 radius, f32 height);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_hurtbox_radius_and_height](#cur_obj_set_hurtbox_radius_and_height) - -### Lua Example -`cur_obj_set_hurtbox_radius_and_height(radius, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| radius | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_hurtbox_radius_and_height(f32 radius, f32 height);` - -[:arrow_up_small:](#) - -
- -## [obj_spawn_loot_coins](#obj_spawn_loot_coins) - -### Lua Example -`obj_spawn_loot_coins(obj, numCoins, sp30, coinBehavior, posJitter, model)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| numCoins | `integer` | -| sp30 | `number` | -| coinBehavior | `Pointer` <`BehaviorScript`> | -| posJitter | `integer` | -| model | `integer` | - -### Returns -- None - -### C Prototype -`void obj_spawn_loot_coins(struct Object *obj, s32 numCoins, f32 sp30, const BehaviorScript *coinBehavior, s16 posJitter, s16 model);` - -[:arrow_up_small:](#) - -
- -## [obj_spawn_loot_blue_coins](#obj_spawn_loot_blue_coins) - -### Lua Example -`obj_spawn_loot_blue_coins(obj, numCoins, sp28, posJitter)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| numCoins | `integer` | -| sp28 | `number` | -| posJitter | `integer` | - -### Returns -- None - -### C Prototype -`void obj_spawn_loot_blue_coins(struct Object *obj, s32 numCoins, f32 sp28, s16 posJitter);` - -[:arrow_up_small:](#) - -
- -## [obj_spawn_loot_yellow_coins](#obj_spawn_loot_yellow_coins) - -### Lua Example -`obj_spawn_loot_yellow_coins(obj, numCoins, sp28)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| numCoins | `integer` | -| sp28 | `number` | - -### Returns -- None - -### C Prototype -`void obj_spawn_loot_yellow_coins(struct Object *obj, s32 numCoins, f32 sp28);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_spawn_loot_coin_at_mario_pos](#cur_obj_spawn_loot_coin_at_mario_pos) - -### Lua Example -`cur_obj_spawn_loot_coin_at_mario_pos(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void cur_obj_spawn_loot_coin_at_mario_pos(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_abs_y_dist_to_home](#cur_obj_abs_y_dist_to_home) - -### Lua Example -`local numberValue = cur_obj_abs_y_dist_to_home()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_abs_y_dist_to_home(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_advance_looping_anim](#cur_obj_advance_looping_anim) - -### Lua Example -`local integerValue = cur_obj_advance_looping_anim()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_advance_looping_anim(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_detect_steep_floor](#cur_obj_detect_steep_floor) - -### Lua Example -`local integerValue = cur_obj_detect_steep_floor(steepAngleDegrees)` - -### Parameters -| Field | Type | -| ----- | ---- | -| steepAngleDegrees | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_detect_steep_floor(s16 steepAngleDegrees);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_resolve_wall_collisions](#cur_obj_resolve_wall_collisions) - -### Lua Example -`local integerValue = cur_obj_resolve_wall_collisions()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_resolve_wall_collisions(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_update_floor](#cur_obj_update_floor) - -### Lua Example -`cur_obj_update_floor()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_update_floor(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_update_floor_and_resolve_wall_collisions](#cur_obj_update_floor_and_resolve_wall_collisions) - -### Lua Example -`cur_obj_update_floor_and_resolve_wall_collisions(steepSlopeDegrees)` - -### Parameters -| Field | Type | -| ----- | ---- | -| steepSlopeDegrees | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_update_floor_and_resolve_wall_collisions(s16 steepSlopeDegrees);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_update_floor_and_walls](#cur_obj_update_floor_and_walls) - -### Lua Example -`cur_obj_update_floor_and_walls()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_update_floor_and_walls(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_standard](#cur_obj_move_standard) - -### Lua Example -`cur_obj_move_standard(steepSlopeAngleDegrees)` - -### Parameters -| Field | Type | -| ----- | ---- | -| steepSlopeAngleDegrees | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_move_standard(s16 steepSlopeAngleDegrees);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_within_12k_bounds](#cur_obj_within_12k_bounds) - -### Lua Example -`local integerValue = cur_obj_within_12k_bounds()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_within_12k_bounds(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_using_vel_and_gravity](#cur_obj_move_using_vel_and_gravity) - -### Lua Example -`cur_obj_move_using_vel_and_gravity()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_using_vel_and_gravity(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_using_fvel_and_gravity](#cur_obj_move_using_fvel_and_gravity) - -### Lua Example -`cur_obj_move_using_fvel_and_gravity()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_using_fvel_and_gravity(void);` - -[:arrow_up_small:](#) - -
- -## [obj_set_pos_relative](#obj_set_pos_relative) - -### Lua Example -`obj_set_pos_relative(obj, other, dleft, dy, dforward)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| other | [Object](structs.md#Object) | -| dleft | `number` | -| dy | `number` | -| dforward | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_pos_relative(struct Object *obj, struct Object *other, f32 dleft, f32 dy, f32 dforward);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_angle_to_home](#cur_obj_angle_to_home) - -### Lua Example -`local integerValue = cur_obj_angle_to_home()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 cur_obj_angle_to_home(void);` - -[:arrow_up_small:](#) - -
- -## [obj_set_gfx_pos_at_obj_pos](#obj_set_gfx_pos_at_obj_pos) - -### Lua Example -`obj_set_gfx_pos_at_obj_pos(obj1, obj2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj1 | [Object](structs.md#Object) | -| obj2 | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_gfx_pos_at_obj_pos(struct Object *obj1, struct Object *obj2);` - -[:arrow_up_small:](#) - -
- -## [obj_translate_local](#obj_translate_local) - -### Description -Transforms the vector at `localTranslateIndex` into the object's local coordinates, and then adds it to the vector at `posIndex` - -### Lua Example -`obj_translate_local(obj, posIndex, localTranslateIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| posIndex | `integer` | -| localTranslateIndex | `integer` | - -### Returns -- None - -### C Prototype -`void obj_translate_local(struct Object *obj, s16 posIndex, s16 localTranslateIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_build_transform_from_pos_and_angle](#obj_build_transform_from_pos_and_angle) - -### Lua Example -`obj_build_transform_from_pos_and_angle(obj, posIndex, angleIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| posIndex | `integer` | -| angleIndex | `integer` | - -### Returns -- None - -### C Prototype -`void obj_build_transform_from_pos_and_angle(struct Object *obj, s16 posIndex, s16 angleIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_set_throw_matrix_from_transform](#obj_set_throw_matrix_from_transform) - -### Lua Example -`obj_set_throw_matrix_from_transform(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_throw_matrix_from_transform(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_build_transform_relative_to_parent](#obj_build_transform_relative_to_parent) - -### Lua Example -`obj_build_transform_relative_to_parent(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_build_transform_relative_to_parent(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_create_transform_from_self](#obj_create_transform_from_self) - -### Lua Example -`obj_create_transform_from_self(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_create_transform_from_self(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_rotate_move_angle_using_vel](#cur_obj_rotate_move_angle_using_vel) - -### Lua Example -`cur_obj_rotate_move_angle_using_vel()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_rotate_move_angle_using_vel(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_rotate_face_angle_using_vel](#cur_obj_rotate_face_angle_using_vel) - -### Lua Example -`cur_obj_rotate_face_angle_using_vel()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_rotate_face_angle_using_vel(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_face_angle_to_move_angle](#cur_obj_set_face_angle_to_move_angle) - -### Lua Example -`cur_obj_set_face_angle_to_move_angle()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_face_angle_to_move_angle(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_follow_path](#cur_obj_follow_path) - -### Lua Example -`local integerValue = cur_obj_follow_path(unusedArg)` - -### Parameters -| Field | Type | -| ----- | ---- | -| unusedArg | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_follow_path(UNUSED s32 unusedArg);` - -[:arrow_up_small:](#) - -
- -## [chain_segment_init](#chain_segment_init) - -### Lua Example -`chain_segment_init(segment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| segment | [ChainSegment](structs.md#ChainSegment) | - -### Returns -- None - -### C Prototype -`void chain_segment_init(struct ChainSegment *segment);` - -[:arrow_up_small:](#) - -
- -## [random_f32_around_zero](#random_f32_around_zero) - -### Lua Example -`local numberValue = random_f32_around_zero(diameter)` - -### Parameters -| Field | Type | -| ----- | ---- | -| diameter | `number` | - -### Returns -- `number` - -### C Prototype -`f32 random_f32_around_zero(f32 diameter);` - -[:arrow_up_small:](#) - -
- -## [obj_scale_random](#obj_scale_random) - -### Lua Example -`obj_scale_random(obj, rangeLength, minScale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| rangeLength | `number` | -| minScale | `number` | - -### Returns -- None - -### C Prototype -`void obj_scale_random(struct Object *obj, f32 rangeLength, f32 minScale);` - -[:arrow_up_small:](#) - -
- -## [obj_translate_xyz_random](#obj_translate_xyz_random) - -### Lua Example -`obj_translate_xyz_random(obj, rangeLength)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| rangeLength | `number` | - -### Returns -- None - -### C Prototype -`void obj_translate_xyz_random(struct Object *obj, f32 rangeLength);` - -[:arrow_up_small:](#) - -
- -## [obj_translate_xz_random](#obj_translate_xz_random) - -### Lua Example -`obj_translate_xz_random(obj, rangeLength)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| rangeLength | `number` | - -### Returns -- None - -### C Prototype -`void obj_translate_xz_random(struct Object *obj, f32 rangeLength);` - -[:arrow_up_small:](#) - -
- -## [obj_build_vel_from_transform](#obj_build_vel_from_transform) - -### Lua Example -`obj_build_vel_from_transform(a0)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_build_vel_from_transform(struct Object *a0);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_via_transform](#cur_obj_set_pos_via_transform) - -### Lua Example -`cur_obj_set_pos_via_transform()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_via_transform(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_reflect_move_angle_off_wall](#cur_obj_reflect_move_angle_off_wall) - -### Lua Example -`local integerValue = cur_obj_reflect_move_angle_off_wall()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 cur_obj_reflect_move_angle_off_wall(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_spawn_particles](#cur_obj_spawn_particles) - -### Lua Example -`cur_obj_spawn_particles(info)` - -### Parameters -| Field | Type | -| ----- | ---- | -| info | [SpawnParticlesInfo](structs.md#SpawnParticlesInfo) | - -### Returns -- None - -### C Prototype -`void cur_obj_spawn_particles(struct SpawnParticlesInfo *info);` - -[:arrow_up_small:](#) - -
- -## [obj_set_hitbox](#obj_set_hitbox) - -### Lua Example -`obj_set_hitbox(obj, hitbox)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | - -### Returns -- None - -### C Prototype -`void obj_set_hitbox(struct Object *obj, struct ObjectHitbox *hitbox);` - -[:arrow_up_small:](#) - -
- -## [signum_positive](#signum_positive) - -### Lua Example -`local integerValue = signum_positive(x)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 signum_positive(s32 x);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_wait_then_blink](#cur_obj_wait_then_blink) - -### Lua Example -`local integerValue = cur_obj_wait_then_blink(timeUntilBlinking, numBlinks)` - -### Parameters -| Field | Type | -| ----- | ---- | -| timeUntilBlinking | `integer` | -| numBlinks | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_wait_then_blink(s32 timeUntilBlinking, s32 numBlinks);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_is_mario_ground_pounding_platform](#cur_obj_is_mario_ground_pounding_platform) - -### Lua Example -`local integerValue = cur_obj_is_mario_ground_pounding_platform()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_is_mario_ground_pounding_platform(void);` - -[:arrow_up_small:](#) - -
- -## [obj_is_mario_ground_pounding_platform](#obj_is_mario_ground_pounding_platform) - -### Lua Example -`local integerValue = obj_is_mario_ground_pounding_platform(m, obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| obj | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_is_mario_ground_pounding_platform(struct MarioState *m, struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [spawn_mist_particles](#spawn_mist_particles) - -### Lua Example -`spawn_mist_particles()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void spawn_mist_particles(void);` - -[:arrow_up_small:](#) - -
- -## [spawn_mist_particles_with_sound](#spawn_mist_particles_with_sound) - -### Lua Example -`spawn_mist_particles_with_sound(sp18)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp18 | `integer` | - -### Returns -- None - -### C Prototype -`void spawn_mist_particles_with_sound(u32 sp18);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_push_mario_away](#cur_obj_push_mario_away) - -### Lua Example -`cur_obj_push_mario_away(radius)` - -### Parameters -| Field | Type | -| ----- | ---- | -| radius | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_push_mario_away(f32 radius);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_push_mario_away_from_cylinder](#cur_obj_push_mario_away_from_cylinder) - -### Lua Example -`cur_obj_push_mario_away_from_cylinder(radius, extentY)` - -### Parameters -| Field | Type | -| ----- | ---- | -| radius | `number` | -| extentY | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_push_mario_away_from_cylinder(f32 radius, f32 extentY);` - -[:arrow_up_small:](#) - -
- -## [bhv_dust_smoke_loop](#bhv_dust_smoke_loop) - -### Lua Example -`bhv_dust_smoke_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_dust_smoke_loop(void);` - -[:arrow_up_small:](#) - -
- -## [stub_obj_helpers_3](#stub_obj_helpers_3) - -### Lua Example -`stub_obj_helpers_3(sp0, sp4)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp0 | `integer` | -| sp4 | `integer` | - -### Returns -- None - -### C Prototype -`void stub_obj_helpers_3(UNUSED s32 sp0, UNUSED s32 sp4);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_scale_over_time](#cur_obj_scale_over_time) - -### Lua Example -`cur_obj_scale_over_time(a0, a1, sp10, sp14)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | `integer` | -| a1 | `integer` | -| sp10 | `number` | -| sp14 | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_scale_over_time(s32 a0, s32 a1, f32 sp10, f32 sp14);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_to_home_with_debug](#cur_obj_set_pos_to_home_with_debug) - -### Lua Example -`cur_obj_set_pos_to_home_with_debug()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_to_home_with_debug(void);` - -[:arrow_up_small:](#) - -
- -## [stub_obj_helpers_4](#stub_obj_helpers_4) - -### Lua Example -`stub_obj_helpers_4()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void stub_obj_helpers_4(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_is_mario_on_platform](#cur_obj_is_mario_on_platform) - -### Lua Example -`local integerValue = cur_obj_is_mario_on_platform()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_is_mario_on_platform(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_is_any_player_on_platform](#cur_obj_is_any_player_on_platform) - -### Lua Example -`local integerValue = cur_obj_is_any_player_on_platform()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_is_any_player_on_platform(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_shake_y_until](#cur_obj_shake_y_until) - -### Lua Example -`local integerValue = cur_obj_shake_y_until(cycles, amount)` - -### Parameters -| Field | Type | -| ----- | ---- | -| cycles | `integer` | -| amount | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_shake_y_until(s32 cycles, s32 amount);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_up_and_down](#cur_obj_move_up_and_down) - -### Lua Example -`local integerValue = cur_obj_move_up_and_down(a0)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_move_up_and_down(s32 a0);` - -[:arrow_up_small:](#) - -
- -## [spawn_star_with_no_lvl_exit](#spawn_star_with_no_lvl_exit) - -### Lua Example -`local ObjectValue = spawn_star_with_no_lvl_exit(sp20, sp24)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp20 | `integer` | -| sp24 | `integer` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *spawn_star_with_no_lvl_exit(s32 sp20, s32 sp24);` - -[:arrow_up_small:](#) - -
- -## [spawn_base_star_with_no_lvl_exit](#spawn_base_star_with_no_lvl_exit) - -### Lua Example -`spawn_base_star_with_no_lvl_exit()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void spawn_base_star_with_no_lvl_exit(void);` - -[:arrow_up_small:](#) - -
- -## [bit_shift_left](#bit_shift_left) - -### Lua Example -`local integerValue = bit_shift_left(a0)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 bit_shift_left(s32 a0);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_mario_far_away](#cur_obj_mario_far_away) - -### Lua Example -`local integerValue = cur_obj_mario_far_away()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_mario_far_away(void);` - -[:arrow_up_small:](#) - -
- -## [is_mario_moving_fast_or_in_air](#is_mario_moving_fast_or_in_air) - -### Lua Example -`local integerValue = is_mario_moving_fast_or_in_air(speedThreshold)` - -### Parameters -| Field | Type | -| ----- | ---- | -| speedThreshold | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 is_mario_moving_fast_or_in_air(s32 speedThreshold);` - -[:arrow_up_small:](#) - -
- -## [is_item_in_array](#is_item_in_array) - -### Lua Example -`local integerValue = is_item_in_array(item, array)` - -### Parameters -| Field | Type | -| ----- | ---- | -| item | `integer` | -| array | `Pointer` <`integer`> | - -### Returns -- `integer` - -### C Prototype -`s32 is_item_in_array(s8 item, s8 *array);` - -[:arrow_up_small:](#) - -
- -## [bhv_init_room](#bhv_init_room) - -### Lua Example -`bhv_init_room()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_init_room(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_enable_rendering_if_mario_in_room](#cur_obj_enable_rendering_if_mario_in_room) - -### Lua Example -`cur_obj_enable_rendering_if_mario_in_room()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_enable_rendering_if_mario_in_room(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_hitbox_and_die_if_attacked](#cur_obj_set_hitbox_and_die_if_attacked) - -### Lua Example -`local integerValue = cur_obj_set_hitbox_and_die_if_attacked(hitbox, deathSound, noLootCoins)` - -### Parameters -| Field | Type | -| ----- | ---- | -| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | -| deathSound | `integer` | -| noLootCoins | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_set_hitbox_and_die_if_attacked(struct ObjectHitbox *hitbox, s32 deathSound, s32 noLootCoins);` - -[:arrow_up_small:](#) - -
- -## [obj_explode_and_spawn_coins](#obj_explode_and_spawn_coins) - -### Lua Example -`obj_explode_and_spawn_coins(sp18, sp1C)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp18 | `number` | -| sp1C | `integer` | - -### Returns -- None - -### C Prototype -`void obj_explode_and_spawn_coins(f32 sp18, s32 sp1C);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_if_hit_wall_bounce_away](#cur_obj_if_hit_wall_bounce_away) - -### Lua Example -`cur_obj_if_hit_wall_bounce_away()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_if_hit_wall_bounce_away(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_hide_if_mario_far_away_y](#cur_obj_hide_if_mario_far_away_y) - -### Lua Example -`local integerValue = cur_obj_hide_if_mario_far_away_y(distY)` - -### Parameters -| Field | Type | -| ----- | ---- | -| distY | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_hide_if_mario_far_away_y(f32 distY);` - -[:arrow_up_small:](#) - -
- -## [obj_is_hidden](#obj_is_hidden) - -### Lua Example -`local integerValue = obj_is_hidden(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_is_hidden(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [enable_time_stop](#enable_time_stop) - -### Lua Example -`enable_time_stop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void enable_time_stop(void);` - -[:arrow_up_small:](#) - -
- -## [enable_time_stop_if_alone](#enable_time_stop_if_alone) - -### Lua Example -`enable_time_stop_if_alone()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void enable_time_stop_if_alone(void);` - -[:arrow_up_small:](#) - -
- -## [disable_time_stop](#disable_time_stop) - -### Lua Example -`disable_time_stop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void disable_time_stop(void);` - -[:arrow_up_small:](#) - -
- -## [set_time_stop_flags](#set_time_stop_flags) - -### Lua Example -`set_time_stop_flags(flags)` - -### Parameters -| Field | Type | -| ----- | ---- | -| flags | `integer` | - -### Returns -- None - -### C Prototype -`void set_time_stop_flags(s32 flags);` - -[:arrow_up_small:](#) - -
- -## [set_time_stop_flags_if_alone](#set_time_stop_flags_if_alone) - -### Lua Example -`set_time_stop_flags_if_alone(flags)` - -### Parameters -| Field | Type | -| ----- | ---- | -| flags | `integer` | - -### Returns -- None - -### C Prototype -`void set_time_stop_flags_if_alone(s32 flags);` - -[:arrow_up_small:](#) - -
- -## [clear_time_stop_flags](#clear_time_stop_flags) - -### Lua Example -`clear_time_stop_flags(flags)` - -### Parameters -| Field | Type | -| ----- | ---- | -| flags | `integer` | - -### Returns -- None - -### C Prototype -`void clear_time_stop_flags(s32 flags);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_can_mario_activate_textbox](#cur_obj_can_mario_activate_textbox) - -### Lua Example -`local integerValue = cur_obj_can_mario_activate_textbox(m, radius, height, unused)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| radius | `number` | -| height | `number` | -| unused | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_can_mario_activate_textbox(struct MarioState* m, f32 radius, f32 height, UNUSED s32 unused);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_can_mario_activate_textbox_2](#cur_obj_can_mario_activate_textbox_2) - -### Lua Example -`local integerValue = cur_obj_can_mario_activate_textbox_2(m, radius, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| radius | `number` | -| height | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_can_mario_activate_textbox_2(struct MarioState* m, f32 radius, f32 height);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_end_dialog](#cur_obj_end_dialog) - -### Lua Example -`cur_obj_end_dialog(m, dialogFlags, dialogResult)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| dialogFlags | `integer` | -| dialogResult | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_end_dialog(struct MarioState* m, s32 dialogFlags, s32 dialogResult);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_has_model](#cur_obj_has_model) - -### Lua Example -`local integerValue = cur_obj_has_model(modelID)` - -### Parameters -| Field | Type | -| ----- | ---- | -| modelID | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_has_model(u16 modelID);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_align_gfx_with_floor](#cur_obj_align_gfx_with_floor) - -### Lua Example -`cur_obj_align_gfx_with_floor()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_align_gfx_with_floor(void);` - -[:arrow_up_small:](#) - -
- -## [mario_is_within_rectangle](#mario_is_within_rectangle) - -### Lua Example -`local integerValue = mario_is_within_rectangle(minX, maxX, minZ, maxZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| minX | `integer` | -| maxX | `integer` | -| minZ | `integer` | -| maxZ | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 mario_is_within_rectangle(s16 minX, s16 maxX, s16 minZ, s16 maxZ);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_shake_screen](#cur_obj_shake_screen) - -### Lua Example -`cur_obj_shake_screen(shake)` - -### Parameters -| Field | Type | -| ----- | ---- | -| shake | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_shake_screen(s32 shake);` - -[:arrow_up_small:](#) - -
- -## [obj_attack_collided_from_other_object](#obj_attack_collided_from_other_object) - -### Lua Example -`local integerValue = obj_attack_collided_from_other_object(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_attack_collided_from_other_object(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_was_attacked_or_ground_pounded](#cur_obj_was_attacked_or_ground_pounded) - -### Lua Example -`local integerValue = cur_obj_was_attacked_or_ground_pounded()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_was_attacked_or_ground_pounded(void);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_behavior_params](#obj_copy_behavior_params) - -### Lua Example -`obj_copy_behavior_params(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_behavior_params(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_init_animation_and_anim_frame](#cur_obj_init_animation_and_anim_frame) - -### Lua Example -`cur_obj_init_animation_and_anim_frame(animIndex, animFrame)` - -### Parameters -| Field | Type | -| ----- | ---- | -| animIndex | `integer` | -| animFrame | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_init_animation_and_anim_frame(s32 animIndex, s32 animFrame);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_init_animation_and_check_if_near_end](#cur_obj_init_animation_and_check_if_near_end) - -### Lua Example -`local integerValue = cur_obj_init_animation_and_check_if_near_end(animIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| animIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_init_animation_and_check_if_near_end(s32 animIndex);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_init_animation_and_extend_if_at_end](#cur_obj_init_animation_and_extend_if_at_end) - -### Lua Example -`cur_obj_init_animation_and_extend_if_at_end(animIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| animIndex | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_init_animation_and_extend_if_at_end(s32 animIndex);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_check_grabbed_mario](#cur_obj_check_grabbed_mario) - -### Lua Example -`local integerValue = cur_obj_check_grabbed_mario()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_grabbed_mario(void);` - -[:arrow_up_small:](#) - -
- -## [player_performed_grab_escape_action](#player_performed_grab_escape_action) - -### Lua Example -`local integerValue = player_performed_grab_escape_action()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 player_performed_grab_escape_action(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_unused_play_footstep_sound](#cur_obj_unused_play_footstep_sound) - -### Lua Example -`cur_obj_unused_play_footstep_sound(animFrame1, animFrame2, sound)` - -### Parameters -| Field | Type | -| ----- | ---- | -| animFrame1 | `integer` | -| animFrame2 | `integer` | -| sound | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_unused_play_footstep_sound(s32 animFrame1, s32 animFrame2, s32 sound);` - -[:arrow_up_small:](#) - -
- -## [enable_time_stop_including_mario](#enable_time_stop_including_mario) - -### Lua Example -`enable_time_stop_including_mario()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void enable_time_stop_including_mario(void);` - -[:arrow_up_small:](#) - -
- -## [disable_time_stop_including_mario](#disable_time_stop_including_mario) - -### Lua Example -`disable_time_stop_including_mario()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void disable_time_stop_including_mario(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_check_interacted](#cur_obj_check_interacted) - -### Lua Example -`local integerValue = cur_obj_check_interacted()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_interacted(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_spawn_loot_blue_coin](#cur_obj_spawn_loot_blue_coin) - -### Lua Example -`cur_obj_spawn_loot_blue_coin()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_spawn_loot_blue_coin(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_spawn_star_at_y_offset](#cur_obj_spawn_star_at_y_offset) - -### Lua Example -`cur_obj_spawn_star_at_y_offset(targetX, targetY, targetZ, offsetY)` - -### Parameters -| Field | Type | -| ----- | ---- | -| targetX | `number` | -| targetY | `number` | -| targetZ | `number` | -| offsetY | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_spawn_star_at_y_offset(f32 targetX, f32 targetY, f32 targetZ, f32 offsetY);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_home_once](#cur_obj_set_home_once) - -### Description -Sets the current object's home only the first time it's called - -### Lua Example -`cur_obj_set_home_once()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_home_once(void);` - -[:arrow_up_small:](#) - -
- -## [get_trajectory_length](#get_trajectory_length) - -### Description -Gets a trajectory's length - -### Lua Example -`local integerValue = get_trajectory_length(trajectory)` - -### Parameters -| Field | Type | -| ----- | ---- | -| trajectory | `Pointer` <`Trajectory`> | - -### Returns -- `integer` - -### C Prototype -`s32 get_trajectory_length(Trajectory* trajectory);` - -[:arrow_up_small:](#) -
--- diff --git a/docs/lua/functions-6.md b/docs/lua/functions-6.md index 713f1d2eb..925d9c5d3 100644 --- a/docs/lua/functions-6.md +++ b/docs/lua/functions-6.md @@ -5,6 +5,4562 @@ [< prev](functions-5.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | [5](functions-5.md) | 6 | [7](functions-7.md) | [next >](functions-7.md)] +--- +# functions from object_helpers.c + +
+ + +## [clear_move_flag](#clear_move_flag) + +### Lua Example +`local integerValue = clear_move_flag(bitSet, flag)` + +### Parameters +| Field | Type | +| ----- | ---- | +| bitSet | `Pointer` <`integer`> | +| flag | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 clear_move_flag(u32 *bitSet, s32 flag);` + +[:arrow_up_small:](#) + +
+ +## [set_room_override](#set_room_override) + +### Description +Overrides the current room Mario is in. Set to -1 to reset override + +### Lua Example +`set_room_override(room)` + +### Parameters +| Field | Type | +| ----- | ---- | +| room | `integer` | + +### Returns +- None + +### C Prototype +`void set_room_override(s16 room);` + +[:arrow_up_small:](#) + +
+ +## [obj_update_pos_from_parent_transformation](#obj_update_pos_from_parent_transformation) + +### Lua Example +`obj_update_pos_from_parent_transformation(a0, a1)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | [Mat4](structs.md#Mat4) | +| a1 | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_update_pos_from_parent_transformation(Mat4 a0, struct Object *a1);` + +[:arrow_up_small:](#) + +
+ +## [obj_apply_scale_to_matrix](#obj_apply_scale_to_matrix) + +### Lua Example +`obj_apply_scale_to_matrix(obj, dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| dst | [Mat4](structs.md#Mat4) | +| src | [Mat4](structs.md#Mat4) | + +### Returns +- None + +### C Prototype +`void obj_apply_scale_to_matrix(struct Object *obj, OUT Mat4 dst, Mat4 src);` + +[:arrow_up_small:](#) + +
+ +## [create_transformation_from_matrices](#create_transformation_from_matrices) + +### Lua Example +`create_transformation_from_matrices(a0, a1, a2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | [Mat4](structs.md#Mat4) | +| a1 | [Mat4](structs.md#Mat4) | +| a2 | [Mat4](structs.md#Mat4) | + +### Returns +- None + +### C Prototype +`void create_transformation_from_matrices(OUT Mat4 a0, Mat4 a1, Mat4 a2);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_held_state](#obj_set_held_state) + +### Lua Example +`obj_set_held_state(obj, heldBehavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| heldBehavior | `Pointer` <`BehaviorScript`> | + +### Returns +- None + +### C Prototype +`void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior);` + +[:arrow_up_small:](#) + +
+ +## [lateral_dist_between_objects](#lateral_dist_between_objects) + +### Lua Example +`local numberValue = lateral_dist_between_objects(obj1, obj2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj1 | [Object](structs.md#Object) | +| obj2 | [Object](structs.md#Object) | + +### Returns +- `number` + +### C Prototype +`f32 lateral_dist_between_objects(struct Object *obj1, struct Object *obj2);` + +[:arrow_up_small:](#) + +
+ +## [dist_between_objects](#dist_between_objects) + +### Lua Example +`local numberValue = dist_between_objects(obj1, obj2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj1 | [Object](structs.md#Object) | +| obj2 | [Object](structs.md#Object) | + +### Returns +- `number` + +### C Prototype +`f32 dist_between_objects(struct Object *obj1, struct Object *obj2);` + +[:arrow_up_small:](#) + +
+ +## [dist_between_object_and_point](#dist_between_object_and_point) + +### Lua Example +`local numberValue = dist_between_object_and_point(obj, pointX, pointY, pointZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pointX | `number` | +| pointY | `number` | +| pointZ | `number` | + +### Returns +- `number` + +### C Prototype +`f32 dist_between_object_and_point(struct Object *obj, f32 pointX, f32 pointY, f32 pointZ);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_forward_vel_approach_upward](#cur_obj_forward_vel_approach_upward) + +### Lua Example +`cur_obj_forward_vel_approach_upward(target, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| target | `number` | +| increment | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_forward_vel_approach_upward(f32 target, f32 increment);` + +[:arrow_up_small:](#) + +
+ +## [approach_f32_signed](#approach_f32_signed) + +### Lua Example +`local integerValue = approach_f32_signed(value, target, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `Pointer` <`number`> | +| target | `number` | +| increment | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 approach_f32_signed(f32 *value, f32 target, f32 increment);` + +[:arrow_up_small:](#) + +
+ +## [approach_f32_symmetric](#approach_f32_symmetric) + +### Lua Example +`local numberValue = approach_f32_symmetric(value, target, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `number` | +| target | `number` | +| increment | `number` | + +### Returns +- `number` + +### C Prototype +`f32 approach_f32_symmetric(f32 value, f32 target, f32 increment);` + +[:arrow_up_small:](#) + +
+ +## [approach_s16_symmetric](#approach_s16_symmetric) + +### Lua Example +`local integerValue = approach_s16_symmetric(value, target, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `integer` | +| target | `integer` | +| increment | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 approach_s16_symmetric(s16 value, s16 target, s16 increment);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_rotate_yaw_toward](#cur_obj_rotate_yaw_toward) + +### Lua Example +`local integerValue = cur_obj_rotate_yaw_toward(target, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| target | `integer` | +| increment | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_rotate_yaw_toward(s16 target, s16 increment);` + +[:arrow_up_small:](#) + +
+ +## [obj_angle_to_object](#obj_angle_to_object) + +### Lua Example +`local integerValue = obj_angle_to_object(obj1, obj2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj1 | [Object](structs.md#Object) | +| obj2 | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s16 obj_angle_to_object(struct Object *obj1, struct Object *obj2);` + +[:arrow_up_small:](#) + +
+ +## [obj_pitch_to_object](#obj_pitch_to_object) + +### Lua Example +`local integerValue = obj_pitch_to_object(obj, target)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| target | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s16 obj_pitch_to_object(struct Object* obj, struct Object* target);` + +[:arrow_up_small:](#) + +
+ +## [obj_angle_to_point](#obj_angle_to_point) + +### Lua Example +`local integerValue = obj_angle_to_point(obj, pointX, pointZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pointX | `number` | +| pointZ | `number` | + +### Returns +- `integer` + +### C Prototype +`s16 obj_angle_to_point(struct Object *obj, f32 pointX, f32 pointZ);` + +[:arrow_up_small:](#) + +
+ +## [obj_turn_toward_object](#obj_turn_toward_object) + +### Lua Example +`local integerValue = obj_turn_toward_object(obj, target, angleIndex, turnAmount)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| target | [Object](structs.md#Object) | +| angleIndex | `integer` | +| turnAmount | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleIndex, s16 turnAmount);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_parent_relative_pos](#obj_set_parent_relative_pos) + +### Lua Example +`obj_set_parent_relative_pos(obj, relX, relY, relZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| relX | `integer` | +| relY | `integer` | +| relZ | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_parent_relative_pos(struct Object *obj, s16 relX, s16 relY, s16 relZ);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_pos](#obj_set_pos) + +### Lua Example +`obj_set_pos(obj, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| x | `integer` | +| y | `integer` | +| z | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_pos(struct Object *obj, s16 x, s16 y, s16 z);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_angle](#obj_set_angle) + +### Lua Example +`obj_set_angle(obj, pitch, yaw, roll)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pitch | `integer` | +| yaw | `integer` | +| roll | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_move_angle](#obj_set_move_angle) + +### Lua Example +`obj_set_move_angle(obj, pitch, yaw, roll)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pitch | `integer` | +| yaw | `integer` | +| roll | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_move_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_face_angle](#obj_set_face_angle) + +### Lua Example +`obj_set_face_angle(obj, pitch, yaw, roll)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pitch | `integer` | +| yaw | `integer` | +| roll | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_face_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_gfx_angle](#obj_set_gfx_angle) + +### Lua Example +`obj_set_gfx_angle(obj, pitch, yaw, roll)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pitch | `integer` | +| yaw | `integer` | +| roll | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_gfx_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_gfx_pos](#obj_set_gfx_pos) + +### Lua Example +`obj_set_gfx_pos(obj, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| x | `number` | +| y | `number` | +| z | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_gfx_pos(struct Object *obj, f32 x, f32 y, f32 z);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_gfx_scale](#obj_set_gfx_scale) + +### Lua Example +`obj_set_gfx_scale(obj, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| x | `number` | +| y | `number` | +| z | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_gfx_scale(struct Object *obj, f32 x, f32 y, f32 z);` + +[:arrow_up_small:](#) + +
+ +## [spawn_water_droplet](#spawn_water_droplet) + +### Lua Example +`local ObjectValue = spawn_water_droplet(parent, params)` + +### Parameters +| Field | Type | +| ----- | ---- | +| parent | [Object](structs.md#Object) | +| params | [WaterDropletParams](structs.md#WaterDropletParams) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *spawn_water_droplet(struct Object *parent, struct WaterDropletParams *params);` + +[:arrow_up_small:](#) + +
+ +## [obj_build_relative_transform](#obj_build_relative_transform) + +### Lua Example +`obj_build_relative_transform(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_build_relative_transform(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_using_vel](#cur_obj_move_using_vel) + +### Lua Example +`cur_obj_move_using_vel()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_using_vel(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_graph_y_offset](#obj_copy_graph_y_offset) + +### Lua Example +`obj_copy_graph_y_offset(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_graph_y_offset(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_pos_and_angle](#obj_copy_pos_and_angle) + +### Lua Example +`obj_copy_pos_and_angle(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_pos_and_angle(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_pos](#obj_copy_pos) + +### Lua Example +`obj_copy_pos(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_pos(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_angle](#obj_copy_angle) + +### Lua Example +`obj_copy_angle(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_angle(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_gfx_pos_from_pos](#obj_set_gfx_pos_from_pos) + +### Lua Example +`obj_set_gfx_pos_from_pos(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_gfx_pos_from_pos(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [obj_init_animation](#obj_init_animation) + +### Lua Example +`obj_init_animation(obj, animIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| animIndex | `integer` | + +### Returns +- None + +### C Prototype +`void obj_init_animation(struct Object *obj, s32 animIndex);` + +[:arrow_up_small:](#) + +
+ +## [linear_mtxf_mul_vec3f](#linear_mtxf_mul_vec3f) + +### Description +Multiplies a vector by a matrix of the form: `| ? ? ? 0 |` `| ? ? ? 0 |` `| ? ? ? 0 |` `| 0 0 0 1 |` i.e. a matrix representing a linear transformation over 3 space + +### Lua Example +`linear_mtxf_mul_vec3f(m, dst, v)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [Mat4](structs.md#Mat4) | +| dst | [Vec3f](structs.md#Vec3f) | +| v | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void linear_mtxf_mul_vec3f(Mat4 m, OUT Vec3f dst, Vec3f v);` + +[:arrow_up_small:](#) + +
+ +## [linear_mtxf_transpose_mul_vec3f](#linear_mtxf_transpose_mul_vec3f) + +### Description +Multiplies a vector by the transpose of a matrix of the form: `| ? ? ? 0 |` `| ? ? ? 0 |` `| ? ? ? 0 |` `| 0 0 0 1 |` i.e. a matrix representing a linear transformation over 3 space + +### Lua Example +`linear_mtxf_transpose_mul_vec3f(m, dst, v)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [Mat4](structs.md#Mat4) | +| dst | [Vec3f](structs.md#Vec3f) | +| v | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void linear_mtxf_transpose_mul_vec3f(Mat4 m, OUT Vec3f dst, Vec3f v);` + +[:arrow_up_small:](#) + +
+ +## [obj_apply_scale_to_transform](#obj_apply_scale_to_transform) + +### Lua Example +`obj_apply_scale_to_transform(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_apply_scale_to_transform(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_scale](#obj_copy_scale) + +### Lua Example +`obj_copy_scale(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_scale(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [obj_scale_xyz](#obj_scale_xyz) + +### Lua Example +`obj_scale_xyz(obj, xScale, yScale, zScale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| xScale | `number` | +| yScale | `number` | +| zScale | `number` | + +### Returns +- None + +### C Prototype +`void obj_scale_xyz(struct Object *obj, f32 xScale, f32 yScale, f32 zScale);` + +[:arrow_up_small:](#) + +
+ +## [obj_scale](#obj_scale) + +### Lua Example +`obj_scale(obj, scale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| scale | `number` | + +### Returns +- None + +### C Prototype +`void obj_scale(struct Object *obj, f32 scale);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_scale](#cur_obj_scale) + +### Lua Example +`cur_obj_scale(scale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| scale | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_scale(f32 scale);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_init_animation](#cur_obj_init_animation) + +### Lua Example +`cur_obj_init_animation(animIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animIndex | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_init_animation(s32 animIndex);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_init_animation_with_sound](#cur_obj_init_animation_with_sound) + +### Lua Example +`cur_obj_init_animation_with_sound(animIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animIndex | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_init_animation_with_sound(s32 animIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_init_animation_with_accel_and_sound](#obj_init_animation_with_accel_and_sound) + +### Lua Example +`obj_init_animation_with_accel_and_sound(obj, animIndex, accel)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| animIndex | `integer` | +| accel | `number` | + +### Returns +- None + +### C Prototype +`void obj_init_animation_with_accel_and_sound(struct Object *obj, s32 animIndex, f32 accel);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_init_animation_with_accel_and_sound](#cur_obj_init_animation_with_accel_and_sound) + +### Lua Example +`cur_obj_init_animation_with_accel_and_sound(animIndex, accel)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animIndex | `integer` | +| accel | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_init_animation_with_accel_and_sound(s32 animIndex, f32 accel);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_enable_rendering_and_become_tangible](#cur_obj_enable_rendering_and_become_tangible) + +### Lua Example +`cur_obj_enable_rendering_and_become_tangible(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void cur_obj_enable_rendering_and_become_tangible(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_enable_rendering](#cur_obj_enable_rendering) + +### Lua Example +`cur_obj_enable_rendering()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_enable_rendering(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_disable_rendering_and_become_intangible](#cur_obj_disable_rendering_and_become_intangible) + +### Lua Example +`cur_obj_disable_rendering_and_become_intangible(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void cur_obj_disable_rendering_and_become_intangible(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_disable_rendering](#cur_obj_disable_rendering) + +### Lua Example +`cur_obj_disable_rendering()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_disable_rendering(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_unhide](#cur_obj_unhide) + +### Lua Example +`cur_obj_unhide()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_unhide(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_hide](#cur_obj_hide) + +### Lua Example +`cur_obj_hide()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_hide(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_relative](#cur_obj_set_pos_relative) + +### Lua Example +`cur_obj_set_pos_relative(other, dleft, dy, dforward)` + +### Parameters +| Field | Type | +| ----- | ---- | +| other | [Object](structs.md#Object) | +| dleft | `number` | +| dy | `number` | +| dforward | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_relative(struct Object *other, f32 dleft, f32 dy, f32 dforward);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_relative_to_parent](#cur_obj_set_pos_relative_to_parent) + +### Lua Example +`cur_obj_set_pos_relative_to_parent(dleft, dy, dforward)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dleft | `number` | +| dy | `number` | +| dforward | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_relative_to_parent(f32 dleft, f32 dy, f32 dforward);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_enable_rendering_2](#cur_obj_enable_rendering_2) + +### Lua Example +`cur_obj_enable_rendering_2()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_enable_rendering_2(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_unused_init_on_floor](#cur_obj_unused_init_on_floor) + +### Lua Example +`cur_obj_unused_init_on_floor()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_unused_init_on_floor(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_face_angle_to_move_angle](#obj_set_face_angle_to_move_angle) + +### Lua Example +`obj_set_face_angle_to_move_angle(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_face_angle_to_move_angle(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [get_object_list_from_behavior](#get_object_list_from_behavior) + +### Lua Example +`local integerValue = get_object_list_from_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- `integer` + +### C Prototype +`u32 get_object_list_from_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_nearest_object_with_behavior](#cur_obj_nearest_object_with_behavior) + +### Lua Example +`local ObjectValue = cur_obj_nearest_object_with_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *cur_obj_nearest_object_with_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_dist_to_nearest_object_with_behavior](#cur_obj_dist_to_nearest_object_with_behavior) + +### Lua Example +`local numberValue = cur_obj_dist_to_nearest_object_with_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_dist_to_nearest_object_with_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_find_nearest_pole](#cur_obj_find_nearest_pole) + +### Lua Example +`local ObjectValue = cur_obj_find_nearest_pole()` + +### Parameters +- None + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object* cur_obj_find_nearest_pole(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_find_nearest_object_with_behavior](#cur_obj_find_nearest_object_with_behavior) + +### Lua Example +`local ObjectValue = cur_obj_find_nearest_object_with_behavior(behavior, dist)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | +| dist | `Pointer` <`number`> | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *cur_obj_find_nearest_object_with_behavior(const BehaviorScript *behavior, f32 *dist);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_count_objects_with_behavior](#cur_obj_count_objects_with_behavior) + +### Lua Example +`local integerValue = cur_obj_count_objects_with_behavior(behavior, dist)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | +| dist | `number` | + +### Returns +- `integer` + +### C Prototype +`u16 cur_obj_count_objects_with_behavior(const BehaviorScript* behavior, f32 dist);` + +[:arrow_up_small:](#) + +
+ +## [find_unimportant_object](#find_unimportant_object) + +### Lua Example +`local ObjectValue = find_unimportant_object()` + +### Parameters +- None + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *find_unimportant_object(void);` + +[:arrow_up_small:](#) + +
+ +## [count_unimportant_objects](#count_unimportant_objects) + +### Lua Example +`local integerValue = count_unimportant_objects()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 count_unimportant_objects(void);` + +[:arrow_up_small:](#) + +
+ +## [count_objects_with_behavior](#count_objects_with_behavior) + +### Lua Example +`local integerValue = count_objects_with_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- `integer` + +### C Prototype +`s32 count_objects_with_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [find_object_with_behavior](#find_object_with_behavior) + +### Lua Example +`local ObjectValue = find_object_with_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *find_object_with_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_find_nearby_held_actor](#cur_obj_find_nearby_held_actor) + +### Lua Example +`local ObjectValue = cur_obj_find_nearby_held_actor(behavior, maxDist)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | +| maxDist | `number` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *cur_obj_find_nearby_held_actor(const BehaviorScript *behavior, f32 maxDist);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_reset_timer_and_subaction](#cur_obj_reset_timer_and_subaction) + +### Lua Example +`cur_obj_reset_timer_and_subaction()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_reset_timer_and_subaction(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_change_action](#cur_obj_change_action) + +### Lua Example +`cur_obj_change_action(action)` + +### Parameters +| Field | Type | +| ----- | ---- | +| action | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_change_action(s32 action);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_vel_from_mario_vel](#cur_obj_set_vel_from_mario_vel) + +### Lua Example +`cur_obj_set_vel_from_mario_vel(m, f12, f14)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| f12 | `number` | +| f14 | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_vel_from_mario_vel(struct MarioState* m, f32 f12, f32 f14);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_reverse_animation](#cur_obj_reverse_animation) + +### Lua Example +`cur_obj_reverse_animation()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_reverse_animation(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_extend_animation_if_at_end](#cur_obj_extend_animation_if_at_end) + +### Lua Example +`cur_obj_extend_animation_if_at_end()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_extend_animation_if_at_end(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_check_if_near_animation_end](#cur_obj_check_if_near_animation_end) + +### Lua Example +`local integerValue = cur_obj_check_if_near_animation_end()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_check_if_near_animation_end(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_check_if_at_animation_end](#cur_obj_check_if_at_animation_end) + +### Lua Example +`local integerValue = cur_obj_check_if_at_animation_end()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_check_if_at_animation_end(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_check_anim_frame](#cur_obj_check_anim_frame) + +### Lua Example +`local integerValue = cur_obj_check_anim_frame(frame)` + +### Parameters +| Field | Type | +| ----- | ---- | +| frame | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_check_anim_frame(s32 frame);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_check_anim_frame_in_range](#cur_obj_check_anim_frame_in_range) + +### Lua Example +`local integerValue = cur_obj_check_anim_frame_in_range(startFrame, rangeLength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| startFrame | `integer` | +| rangeLength | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_check_anim_frame_in_range(s32 startFrame, s32 rangeLength);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_check_frame_prior_current_frame](#cur_obj_check_frame_prior_current_frame) + +### Lua Example +`local integerValue = cur_obj_check_frame_prior_current_frame(a0)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | `Pointer` <`integer`> | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_check_frame_prior_current_frame(s16 *a0);` + +[:arrow_up_small:](#) + +
+ +## [mario_is_in_air_action](#mario_is_in_air_action) + +### Lua Example +`local integerValue = mario_is_in_air_action(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 mario_is_in_air_action(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ +## [mario_is_dive_sliding](#mario_is_dive_sliding) + +### Lua Example +`local integerValue = mario_is_dive_sliding(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 mario_is_dive_sliding(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_y_vel_and_animation](#cur_obj_set_y_vel_and_animation) + +### Lua Example +`cur_obj_set_y_vel_and_animation(sp18, sp1C)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp18 | `number` | +| sp1C | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_y_vel_and_animation(f32 sp18, s32 sp1C);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_unrender_and_reset_state](#cur_obj_unrender_and_reset_state) + +### Lua Example +`cur_obj_unrender_and_reset_state(sp18, sp1C)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp18 | `integer` | +| sp1C | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_unrender_and_reset_state(s32 sp18, s32 sp1C);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_after_thrown_or_dropped](#cur_obj_move_after_thrown_or_dropped) + +### Lua Example +`cur_obj_move_after_thrown_or_dropped(forwardVel, velY)` + +### Parameters +| Field | Type | +| ----- | ---- | +| forwardVel | `number` | +| velY | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_move_after_thrown_or_dropped(f32 forwardVel, f32 velY);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_get_thrown_or_placed](#cur_obj_get_thrown_or_placed) + +### Lua Example +`cur_obj_get_thrown_or_placed(forwardVel, velY, thrownAction)` + +### Parameters +| Field | Type | +| ----- | ---- | +| forwardVel | `number` | +| velY | `number` | +| thrownAction | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_get_thrown_or_placed(f32 forwardVel, f32 velY, s32 thrownAction);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_get_dropped](#cur_obj_get_dropped) + +### Lua Example +`cur_obj_get_dropped()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_get_dropped(void);` + +[:arrow_up_small:](#) + +
+ +## [mario_set_flag](#mario_set_flag) + +### Lua Example +`mario_set_flag(flag)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flag | `integer` | + +### Returns +- None + +### C Prototype +`void mario_set_flag(s32 flag);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_clear_interact_status_flag](#cur_obj_clear_interact_status_flag) + +### Lua Example +`local integerValue = cur_obj_clear_interact_status_flag(flag)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flag | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_clear_interact_status_flag(s32 flag);` + +[:arrow_up_small:](#) + +
+ +## [obj_mark_for_deletion](#obj_mark_for_deletion) + +### Description +Marks an object to be unloaded at the end of the frame + +### Lua Example +`obj_mark_for_deletion(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_mark_for_deletion(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_disable](#cur_obj_disable) + +### Lua Example +`cur_obj_disable()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_disable(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_become_intangible](#cur_obj_become_intangible) + +### Lua Example +`cur_obj_become_intangible()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_become_intangible(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_become_tangible](#cur_obj_become_tangible) + +### Lua Example +`cur_obj_become_tangible()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_become_tangible(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_become_tangible](#obj_become_tangible) + +### Lua Example +`obj_become_tangible(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_become_tangible(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_update_floor_height](#cur_obj_update_floor_height) + +### Lua Example +`cur_obj_update_floor_height()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_update_floor_height(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_update_floor_height_and_get_floor](#cur_obj_update_floor_height_and_get_floor) + +### Lua Example +`local SurfaceValue = cur_obj_update_floor_height_and_get_floor()` + +### Parameters +- None + +### Returns +[Surface](structs.md#Surface) + +### C Prototype +`struct Surface *cur_obj_update_floor_height_and_get_floor(void);` + +[:arrow_up_small:](#) + +
+ +## [apply_drag_to_value](#apply_drag_to_value) + +### Lua Example +`apply_drag_to_value(value, dragStrength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `Pointer` <`number`> | +| dragStrength | `number` | + +### Returns +- None + +### C Prototype +`void apply_drag_to_value(f32 *value, f32 dragStrength);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_apply_drag_xz](#cur_obj_apply_drag_xz) + +### Lua Example +`cur_obj_apply_drag_xz(dragStrength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dragStrength | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_apply_drag_xz(f32 dragStrength);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_xz](#cur_obj_move_xz) + +### Lua Example +`local integerValue = cur_obj_move_xz(steepSlopeNormalY, careAboutEdgesAndSteepSlopes)` + +### Parameters +| Field | Type | +| ----- | ---- | +| steepSlopeNormalY | `number` | +| careAboutEdgesAndSteepSlopes | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_move_xz(f32 steepSlopeNormalY, s32 careAboutEdgesAndSteepSlopes);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_update_underwater_flags](#cur_obj_move_update_underwater_flags) + +### Lua Example +`cur_obj_move_update_underwater_flags()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_update_underwater_flags(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_update_ground_air_flags](#cur_obj_move_update_ground_air_flags) + +### Lua Example +`cur_obj_move_update_ground_air_flags(gravity, bounciness)` + +### Parameters +| Field | Type | +| ----- | ---- | +| gravity | `number` | +| bounciness | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_move_update_ground_air_flags(UNUSED f32 gravity, f32 bounciness);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_y_and_get_water_level](#cur_obj_move_y_and_get_water_level) + +### Lua Example +`local numberValue = cur_obj_move_y_and_get_water_level(gravity, buoyancy)` + +### Parameters +| Field | Type | +| ----- | ---- | +| gravity | `number` | +| buoyancy | `number` | + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_move_y_and_get_water_level(f32 gravity, f32 buoyancy);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_y](#cur_obj_move_y) + +### Lua Example +`cur_obj_move_y(gravity, bounciness, buoyancy)` + +### Parameters +| Field | Type | +| ----- | ---- | +| gravity | `number` | +| bounciness | `number` | +| buoyancy | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_move_y(f32 gravity, f32 bounciness, f32 buoyancy);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_unused_resolve_wall_collisions](#cur_obj_unused_resolve_wall_collisions) + +### Lua Example +`cur_obj_unused_resolve_wall_collisions(offsetY, radius)` + +### Parameters +| Field | Type | +| ----- | ---- | +| offsetY | `number` | +| radius | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_unused_resolve_wall_collisions(f32 offsetY, f32 radius);` + +[:arrow_up_small:](#) + +
+ +## [abs_angle_diff](#abs_angle_diff) + +### Lua Example +`local integerValue = abs_angle_diff(x0, x1)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x0 | `integer` | +| x1 | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 abs_angle_diff(s16 x0, s16 x1);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_xz_using_fvel_and_yaw](#cur_obj_move_xz_using_fvel_and_yaw) + +### Lua Example +`cur_obj_move_xz_using_fvel_and_yaw()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_xz_using_fvel_and_yaw(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_y_with_terminal_vel](#cur_obj_move_y_with_terminal_vel) + +### Lua Example +`cur_obj_move_y_with_terminal_vel()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_y_with_terminal_vel(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_compute_vel_xz](#cur_obj_compute_vel_xz) + +### Lua Example +`cur_obj_compute_vel_xz()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_compute_vel_xz(void);` + +[:arrow_up_small:](#) + +
+ +## [increment_velocity_toward_range](#increment_velocity_toward_range) + +### Lua Example +`local numberValue = increment_velocity_toward_range(value, center, zeroThreshold, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `number` | +| center | `number` | +| zeroThreshold | `number` | +| increment | `number` | + +### Returns +- `number` + +### C Prototype +`f32 increment_velocity_toward_range(f32 value, f32 center, f32 zeroThreshold, f32 increment);` + +[:arrow_up_small:](#) + +
+ +## [obj_check_if_collided_with_object](#obj_check_if_collided_with_object) + +### Lua Example +`local integerValue = obj_check_if_collided_with_object(obj1, obj2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj1 | [Object](structs.md#Object) | +| obj2 | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_check_if_collided_with_object(struct Object *obj1, struct Object *obj2);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_behavior](#cur_obj_set_behavior) + +### Lua Example +`cur_obj_set_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- None + +### C Prototype +`void cur_obj_set_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_behavior](#obj_set_behavior) + +### Lua Example +`obj_set_behavior(obj, behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- None + +### C Prototype +`void obj_set_behavior(struct Object *obj, const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_has_behavior](#cur_obj_has_behavior) + +### Lua Example +`local integerValue = cur_obj_has_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_has_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [obj_has_behavior](#obj_has_behavior) + +### Lua Example +`local integerValue = obj_has_behavior(obj, behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- `integer` + +### C Prototype +`s32 obj_has_behavior(struct Object *obj, const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_lateral_dist_from_obj_to_home](#cur_obj_lateral_dist_from_obj_to_home) + +### Lua Example +`local numberValue = cur_obj_lateral_dist_from_obj_to_home(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_lateral_dist_from_obj_to_home(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_lateral_dist_from_mario_to_home](#cur_obj_lateral_dist_from_mario_to_home) + +### Lua Example +`local numberValue = cur_obj_lateral_dist_from_mario_to_home()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_lateral_dist_from_mario_to_home(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_lateral_dist_to_home](#cur_obj_lateral_dist_to_home) + +### Lua Example +`local numberValue = cur_obj_lateral_dist_to_home()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_lateral_dist_to_home(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_outside_home_square](#cur_obj_outside_home_square) + +### Lua Example +`local integerValue = cur_obj_outside_home_square(halfLength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| halfLength | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_outside_home_square(f32 halfLength);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_outside_home_rectangle](#cur_obj_outside_home_rectangle) + +### Lua Example +`local integerValue = cur_obj_outside_home_rectangle(minX, maxX, minZ, maxZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| minX | `number` | +| maxX | `number` | +| minZ | `number` | +| maxZ | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_outside_home_rectangle(f32 minX, f32 maxX, f32 minZ, f32 maxZ);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_to_home](#cur_obj_set_pos_to_home) + +### Lua Example +`cur_obj_set_pos_to_home()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_to_home(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_to_home_and_stop](#cur_obj_set_pos_to_home_and_stop) + +### Lua Example +`cur_obj_set_pos_to_home_and_stop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_to_home_and_stop(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_shake_y](#cur_obj_shake_y) + +### Lua Example +`cur_obj_shake_y(amount)` + +### Parameters +| Field | Type | +| ----- | ---- | +| amount | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_shake_y(f32 amount);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_start_cam_event](#cur_obj_start_cam_event) + +### Lua Example +`cur_obj_start_cam_event(obj, cameraEvent)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| cameraEvent | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_start_cam_event(UNUSED struct Object *obj, s32 cameraEvent);` + +[:arrow_up_small:](#) + +
+ +## [set_mario_interact_hoot_if_in_range](#set_mario_interact_hoot_if_in_range) + +### Lua Example +`set_mario_interact_hoot_if_in_range(sp0, sp4, sp8)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp0 | `integer` | +| sp4 | `integer` | +| sp8 | `number` | + +### Returns +- None + +### C Prototype +`void set_mario_interact_hoot_if_in_range(UNUSED s32 sp0, UNUSED s32 sp4, f32 sp8);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_billboard](#obj_set_billboard) + +### Lua Example +`obj_set_billboard(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_billboard(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_cylboard](#obj_set_cylboard) + +### Lua Example +`obj_set_cylboard(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_cylboard(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_billboard_if_vanilla_cam](#cur_obj_set_billboard_if_vanilla_cam) + +### Lua Example +`cur_obj_set_billboard_if_vanilla_cam()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_billboard_if_vanilla_cam(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_hitbox_radius_and_height](#obj_set_hitbox_radius_and_height) + +### Lua Example +`obj_set_hitbox_radius_and_height(o, radius, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| radius | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_hitbox_radius_and_height(struct Object *o, f32 radius, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_hurtbox_radius_and_height](#obj_set_hurtbox_radius_and_height) + +### Lua Example +`obj_set_hurtbox_radius_and_height(o, radius, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| radius | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_hurtbox_radius_and_height(struct Object *o, f32 radius, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_hitbox_radius_and_height](#cur_obj_set_hitbox_radius_and_height) + +### Lua Example +`cur_obj_set_hitbox_radius_and_height(radius, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| radius | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_hitbox_radius_and_height(f32 radius, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_hurtbox_radius_and_height](#cur_obj_set_hurtbox_radius_and_height) + +### Lua Example +`cur_obj_set_hurtbox_radius_and_height(radius, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| radius | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_hurtbox_radius_and_height(f32 radius, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [obj_spawn_loot_coins](#obj_spawn_loot_coins) + +### Lua Example +`obj_spawn_loot_coins(obj, numCoins, sp30, coinBehavior, posJitter, model)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| numCoins | `integer` | +| sp30 | `number` | +| coinBehavior | `Pointer` <`BehaviorScript`> | +| posJitter | `integer` | +| model | `integer` | + +### Returns +- None + +### C Prototype +`void obj_spawn_loot_coins(struct Object *obj, s32 numCoins, f32 sp30, const BehaviorScript *coinBehavior, s16 posJitter, s16 model);` + +[:arrow_up_small:](#) + +
+ +## [obj_spawn_loot_blue_coins](#obj_spawn_loot_blue_coins) + +### Lua Example +`obj_spawn_loot_blue_coins(obj, numCoins, sp28, posJitter)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| numCoins | `integer` | +| sp28 | `number` | +| posJitter | `integer` | + +### Returns +- None + +### C Prototype +`void obj_spawn_loot_blue_coins(struct Object *obj, s32 numCoins, f32 sp28, s16 posJitter);` + +[:arrow_up_small:](#) + +
+ +## [obj_spawn_loot_yellow_coins](#obj_spawn_loot_yellow_coins) + +### Lua Example +`obj_spawn_loot_yellow_coins(obj, numCoins, sp28)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| numCoins | `integer` | +| sp28 | `number` | + +### Returns +- None + +### C Prototype +`void obj_spawn_loot_yellow_coins(struct Object *obj, s32 numCoins, f32 sp28);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_spawn_loot_coin_at_mario_pos](#cur_obj_spawn_loot_coin_at_mario_pos) + +### Lua Example +`cur_obj_spawn_loot_coin_at_mario_pos(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void cur_obj_spawn_loot_coin_at_mario_pos(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_abs_y_dist_to_home](#cur_obj_abs_y_dist_to_home) + +### Lua Example +`local numberValue = cur_obj_abs_y_dist_to_home()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_abs_y_dist_to_home(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_advance_looping_anim](#cur_obj_advance_looping_anim) + +### Lua Example +`local integerValue = cur_obj_advance_looping_anim()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_advance_looping_anim(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_detect_steep_floor](#cur_obj_detect_steep_floor) + +### Lua Example +`local integerValue = cur_obj_detect_steep_floor(steepAngleDegrees)` + +### Parameters +| Field | Type | +| ----- | ---- | +| steepAngleDegrees | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_detect_steep_floor(s16 steepAngleDegrees);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_resolve_wall_collisions](#cur_obj_resolve_wall_collisions) + +### Lua Example +`local integerValue = cur_obj_resolve_wall_collisions()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_resolve_wall_collisions(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_update_floor](#cur_obj_update_floor) + +### Lua Example +`cur_obj_update_floor()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_update_floor(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_update_floor_and_resolve_wall_collisions](#cur_obj_update_floor_and_resolve_wall_collisions) + +### Lua Example +`cur_obj_update_floor_and_resolve_wall_collisions(steepSlopeDegrees)` + +### Parameters +| Field | Type | +| ----- | ---- | +| steepSlopeDegrees | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_update_floor_and_resolve_wall_collisions(s16 steepSlopeDegrees);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_update_floor_and_walls](#cur_obj_update_floor_and_walls) + +### Lua Example +`cur_obj_update_floor_and_walls()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_update_floor_and_walls(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_standard](#cur_obj_move_standard) + +### Lua Example +`cur_obj_move_standard(steepSlopeAngleDegrees)` + +### Parameters +| Field | Type | +| ----- | ---- | +| steepSlopeAngleDegrees | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_move_standard(s16 steepSlopeAngleDegrees);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_within_12k_bounds](#cur_obj_within_12k_bounds) + +### Lua Example +`local integerValue = cur_obj_within_12k_bounds()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_within_12k_bounds(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_using_vel_and_gravity](#cur_obj_move_using_vel_and_gravity) + +### Lua Example +`cur_obj_move_using_vel_and_gravity()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_using_vel_and_gravity(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_using_fvel_and_gravity](#cur_obj_move_using_fvel_and_gravity) + +### Lua Example +`cur_obj_move_using_fvel_and_gravity()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_using_fvel_and_gravity(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_pos_relative](#obj_set_pos_relative) + +### Lua Example +`obj_set_pos_relative(obj, other, dleft, dy, dforward)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| other | [Object](structs.md#Object) | +| dleft | `number` | +| dy | `number` | +| dforward | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_pos_relative(struct Object *obj, struct Object *other, f32 dleft, f32 dy, f32 dforward);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_angle_to_home](#cur_obj_angle_to_home) + +### Lua Example +`local integerValue = cur_obj_angle_to_home()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s16 cur_obj_angle_to_home(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_gfx_pos_at_obj_pos](#obj_set_gfx_pos_at_obj_pos) + +### Lua Example +`obj_set_gfx_pos_at_obj_pos(obj1, obj2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj1 | [Object](structs.md#Object) | +| obj2 | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_gfx_pos_at_obj_pos(struct Object *obj1, struct Object *obj2);` + +[:arrow_up_small:](#) + +
+ +## [obj_translate_local](#obj_translate_local) + +### Description +Transforms the vector at `localTranslateIndex` into the object's local coordinates, and then adds it to the vector at `posIndex` + +### Lua Example +`obj_translate_local(obj, posIndex, localTranslateIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| posIndex | `integer` | +| localTranslateIndex | `integer` | + +### Returns +- None + +### C Prototype +`void obj_translate_local(struct Object *obj, s16 posIndex, s16 localTranslateIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_build_transform_from_pos_and_angle](#obj_build_transform_from_pos_and_angle) + +### Lua Example +`obj_build_transform_from_pos_and_angle(obj, posIndex, angleIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| posIndex | `integer` | +| angleIndex | `integer` | + +### Returns +- None + +### C Prototype +`void obj_build_transform_from_pos_and_angle(struct Object *obj, s16 posIndex, s16 angleIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_throw_matrix_from_transform](#obj_set_throw_matrix_from_transform) + +### Lua Example +`obj_set_throw_matrix_from_transform(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_throw_matrix_from_transform(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [obj_build_transform_relative_to_parent](#obj_build_transform_relative_to_parent) + +### Lua Example +`obj_build_transform_relative_to_parent(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_build_transform_relative_to_parent(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [obj_create_transform_from_self](#obj_create_transform_from_self) + +### Lua Example +`obj_create_transform_from_self(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_create_transform_from_self(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_rotate_move_angle_using_vel](#cur_obj_rotate_move_angle_using_vel) + +### Lua Example +`cur_obj_rotate_move_angle_using_vel()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_rotate_move_angle_using_vel(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_rotate_face_angle_using_vel](#cur_obj_rotate_face_angle_using_vel) + +### Lua Example +`cur_obj_rotate_face_angle_using_vel()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_rotate_face_angle_using_vel(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_face_angle_to_move_angle](#cur_obj_set_face_angle_to_move_angle) + +### Lua Example +`cur_obj_set_face_angle_to_move_angle()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_face_angle_to_move_angle(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_follow_path](#cur_obj_follow_path) + +### Lua Example +`local integerValue = cur_obj_follow_path(unusedArg)` + +### Parameters +| Field | Type | +| ----- | ---- | +| unusedArg | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_follow_path(UNUSED s32 unusedArg);` + +[:arrow_up_small:](#) + +
+ +## [chain_segment_init](#chain_segment_init) + +### Lua Example +`chain_segment_init(segment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| segment | [ChainSegment](structs.md#ChainSegment) | + +### Returns +- None + +### C Prototype +`void chain_segment_init(struct ChainSegment *segment);` + +[:arrow_up_small:](#) + +
+ +## [random_f32_around_zero](#random_f32_around_zero) + +### Lua Example +`local numberValue = random_f32_around_zero(diameter)` + +### Parameters +| Field | Type | +| ----- | ---- | +| diameter | `number` | + +### Returns +- `number` + +### C Prototype +`f32 random_f32_around_zero(f32 diameter);` + +[:arrow_up_small:](#) + +
+ +## [obj_scale_random](#obj_scale_random) + +### Lua Example +`obj_scale_random(obj, rangeLength, minScale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| rangeLength | `number` | +| minScale | `number` | + +### Returns +- None + +### C Prototype +`void obj_scale_random(struct Object *obj, f32 rangeLength, f32 minScale);` + +[:arrow_up_small:](#) + +
+ +## [obj_translate_xyz_random](#obj_translate_xyz_random) + +### Lua Example +`obj_translate_xyz_random(obj, rangeLength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| rangeLength | `number` | + +### Returns +- None + +### C Prototype +`void obj_translate_xyz_random(struct Object *obj, f32 rangeLength);` + +[:arrow_up_small:](#) + +
+ +## [obj_translate_xz_random](#obj_translate_xz_random) + +### Lua Example +`obj_translate_xz_random(obj, rangeLength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| rangeLength | `number` | + +### Returns +- None + +### C Prototype +`void obj_translate_xz_random(struct Object *obj, f32 rangeLength);` + +[:arrow_up_small:](#) + +
+ +## [obj_build_vel_from_transform](#obj_build_vel_from_transform) + +### Lua Example +`obj_build_vel_from_transform(a0)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_build_vel_from_transform(struct Object *a0);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_via_transform](#cur_obj_set_pos_via_transform) + +### Lua Example +`cur_obj_set_pos_via_transform()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_via_transform(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_reflect_move_angle_off_wall](#cur_obj_reflect_move_angle_off_wall) + +### Lua Example +`local integerValue = cur_obj_reflect_move_angle_off_wall()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s16 cur_obj_reflect_move_angle_off_wall(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_spawn_particles](#cur_obj_spawn_particles) + +### Lua Example +`cur_obj_spawn_particles(info)` + +### Parameters +| Field | Type | +| ----- | ---- | +| info | [SpawnParticlesInfo](structs.md#SpawnParticlesInfo) | + +### Returns +- None + +### C Prototype +`void cur_obj_spawn_particles(struct SpawnParticlesInfo *info);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_hitbox](#obj_set_hitbox) + +### Lua Example +`obj_set_hitbox(obj, hitbox)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | + +### Returns +- None + +### C Prototype +`void obj_set_hitbox(struct Object *obj, struct ObjectHitbox *hitbox);` + +[:arrow_up_small:](#) + +
+ +## [signum_positive](#signum_positive) + +### Lua Example +`local integerValue = signum_positive(x)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 signum_positive(s32 x);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_wait_then_blink](#cur_obj_wait_then_blink) + +### Lua Example +`local integerValue = cur_obj_wait_then_blink(timeUntilBlinking, numBlinks)` + +### Parameters +| Field | Type | +| ----- | ---- | +| timeUntilBlinking | `integer` | +| numBlinks | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_wait_then_blink(s32 timeUntilBlinking, s32 numBlinks);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_is_mario_ground_pounding_platform](#cur_obj_is_mario_ground_pounding_platform) + +### Lua Example +`local integerValue = cur_obj_is_mario_ground_pounding_platform()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_is_mario_ground_pounding_platform(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_mario_ground_pounding_platform](#obj_is_mario_ground_pounding_platform) + +### Lua Example +`local integerValue = obj_is_mario_ground_pounding_platform(m, obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| obj | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_is_mario_ground_pounding_platform(struct MarioState *m, struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [spawn_mist_particles](#spawn_mist_particles) + +### Lua Example +`spawn_mist_particles()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void spawn_mist_particles(void);` + +[:arrow_up_small:](#) + +
+ +## [spawn_mist_particles_with_sound](#spawn_mist_particles_with_sound) + +### Lua Example +`spawn_mist_particles_with_sound(sp18)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp18 | `integer` | + +### Returns +- None + +### C Prototype +`void spawn_mist_particles_with_sound(u32 sp18);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_push_mario_away](#cur_obj_push_mario_away) + +### Lua Example +`cur_obj_push_mario_away(radius)` + +### Parameters +| Field | Type | +| ----- | ---- | +| radius | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_push_mario_away(f32 radius);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_push_mario_away_from_cylinder](#cur_obj_push_mario_away_from_cylinder) + +### Lua Example +`cur_obj_push_mario_away_from_cylinder(radius, extentY)` + +### Parameters +| Field | Type | +| ----- | ---- | +| radius | `number` | +| extentY | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_push_mario_away_from_cylinder(f32 radius, f32 extentY);` + +[:arrow_up_small:](#) + +
+ +## [bhv_dust_smoke_loop](#bhv_dust_smoke_loop) + +### Lua Example +`bhv_dust_smoke_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_dust_smoke_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [stub_obj_helpers_3](#stub_obj_helpers_3) + +### Lua Example +`stub_obj_helpers_3(sp0, sp4)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp0 | `integer` | +| sp4 | `integer` | + +### Returns +- None + +### C Prototype +`void stub_obj_helpers_3(UNUSED s32 sp0, UNUSED s32 sp4);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_scale_over_time](#cur_obj_scale_over_time) + +### Lua Example +`cur_obj_scale_over_time(a0, a1, sp10, sp14)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | `integer` | +| a1 | `integer` | +| sp10 | `number` | +| sp14 | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_scale_over_time(s32 a0, s32 a1, f32 sp10, f32 sp14);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_to_home_with_debug](#cur_obj_set_pos_to_home_with_debug) + +### Lua Example +`cur_obj_set_pos_to_home_with_debug()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_to_home_with_debug(void);` + +[:arrow_up_small:](#) + +
+ +## [stub_obj_helpers_4](#stub_obj_helpers_4) + +### Lua Example +`stub_obj_helpers_4()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void stub_obj_helpers_4(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_is_mario_on_platform](#cur_obj_is_mario_on_platform) + +### Lua Example +`local integerValue = cur_obj_is_mario_on_platform()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_is_mario_on_platform(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_is_any_player_on_platform](#cur_obj_is_any_player_on_platform) + +### Lua Example +`local integerValue = cur_obj_is_any_player_on_platform()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_is_any_player_on_platform(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_shake_y_until](#cur_obj_shake_y_until) + +### Lua Example +`local integerValue = cur_obj_shake_y_until(cycles, amount)` + +### Parameters +| Field | Type | +| ----- | ---- | +| cycles | `integer` | +| amount | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_shake_y_until(s32 cycles, s32 amount);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_up_and_down](#cur_obj_move_up_and_down) + +### Lua Example +`local integerValue = cur_obj_move_up_and_down(a0)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_move_up_and_down(s32 a0);` + +[:arrow_up_small:](#) + +
+ +## [spawn_star_with_no_lvl_exit](#spawn_star_with_no_lvl_exit) + +### Lua Example +`local ObjectValue = spawn_star_with_no_lvl_exit(sp20, sp24)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp20 | `integer` | +| sp24 | `integer` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *spawn_star_with_no_lvl_exit(s32 sp20, s32 sp24);` + +[:arrow_up_small:](#) + +
+ +## [spawn_base_star_with_no_lvl_exit](#spawn_base_star_with_no_lvl_exit) + +### Lua Example +`spawn_base_star_with_no_lvl_exit()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void spawn_base_star_with_no_lvl_exit(void);` + +[:arrow_up_small:](#) + +
+ +## [bit_shift_left](#bit_shift_left) + +### Lua Example +`local integerValue = bit_shift_left(a0)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 bit_shift_left(s32 a0);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_mario_far_away](#cur_obj_mario_far_away) + +### Lua Example +`local integerValue = cur_obj_mario_far_away()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_mario_far_away(void);` + +[:arrow_up_small:](#) + +
+ +## [is_mario_moving_fast_or_in_air](#is_mario_moving_fast_or_in_air) + +### Lua Example +`local integerValue = is_mario_moving_fast_or_in_air(speedThreshold)` + +### Parameters +| Field | Type | +| ----- | ---- | +| speedThreshold | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 is_mario_moving_fast_or_in_air(s32 speedThreshold);` + +[:arrow_up_small:](#) + +
+ +## [is_item_in_array](#is_item_in_array) + +### Lua Example +`local integerValue = is_item_in_array(item, array)` + +### Parameters +| Field | Type | +| ----- | ---- | +| item | `integer` | +| array | `Pointer` <`integer`> | + +### Returns +- `integer` + +### C Prototype +`s32 is_item_in_array(s8 item, s8 *array);` + +[:arrow_up_small:](#) + +
+ +## [bhv_init_room](#bhv_init_room) + +### Lua Example +`bhv_init_room()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_init_room(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_enable_rendering_if_mario_in_room](#cur_obj_enable_rendering_if_mario_in_room) + +### Lua Example +`cur_obj_enable_rendering_if_mario_in_room()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_enable_rendering_if_mario_in_room(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_hitbox_and_die_if_attacked](#cur_obj_set_hitbox_and_die_if_attacked) + +### Lua Example +`local integerValue = cur_obj_set_hitbox_and_die_if_attacked(hitbox, deathSound, noLootCoins)` + +### Parameters +| Field | Type | +| ----- | ---- | +| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | +| deathSound | `integer` | +| noLootCoins | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_set_hitbox_and_die_if_attacked(struct ObjectHitbox *hitbox, s32 deathSound, s32 noLootCoins);` + +[:arrow_up_small:](#) + +
+ +## [obj_explode_and_spawn_coins](#obj_explode_and_spawn_coins) + +### Lua Example +`obj_explode_and_spawn_coins(sp18, sp1C)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp18 | `number` | +| sp1C | `integer` | + +### Returns +- None + +### C Prototype +`void obj_explode_and_spawn_coins(f32 sp18, s32 sp1C);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_if_hit_wall_bounce_away](#cur_obj_if_hit_wall_bounce_away) + +### Lua Example +`cur_obj_if_hit_wall_bounce_away()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_if_hit_wall_bounce_away(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_hide_if_mario_far_away_y](#cur_obj_hide_if_mario_far_away_y) + +### Lua Example +`local integerValue = cur_obj_hide_if_mario_far_away_y(distY)` + +### Parameters +| Field | Type | +| ----- | ---- | +| distY | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_hide_if_mario_far_away_y(f32 distY);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_hidden](#obj_is_hidden) + +### Lua Example +`local integerValue = obj_is_hidden(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_is_hidden(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [enable_time_stop](#enable_time_stop) + +### Lua Example +`enable_time_stop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void enable_time_stop(void);` + +[:arrow_up_small:](#) + +
+ +## [enable_time_stop_if_alone](#enable_time_stop_if_alone) + +### Lua Example +`enable_time_stop_if_alone()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void enable_time_stop_if_alone(void);` + +[:arrow_up_small:](#) + +
+ +## [disable_time_stop](#disable_time_stop) + +### Lua Example +`disable_time_stop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void disable_time_stop(void);` + +[:arrow_up_small:](#) + +
+ +## [set_time_stop_flags](#set_time_stop_flags) + +### Lua Example +`set_time_stop_flags(flags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flags | `integer` | + +### Returns +- None + +### C Prototype +`void set_time_stop_flags(s32 flags);` + +[:arrow_up_small:](#) + +
+ +## [set_time_stop_flags_if_alone](#set_time_stop_flags_if_alone) + +### Lua Example +`set_time_stop_flags_if_alone(flags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flags | `integer` | + +### Returns +- None + +### C Prototype +`void set_time_stop_flags_if_alone(s32 flags);` + +[:arrow_up_small:](#) + +
+ +## [clear_time_stop_flags](#clear_time_stop_flags) + +### Lua Example +`clear_time_stop_flags(flags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flags | `integer` | + +### Returns +- None + +### C Prototype +`void clear_time_stop_flags(s32 flags);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_can_mario_activate_textbox](#cur_obj_can_mario_activate_textbox) + +### Lua Example +`local integerValue = cur_obj_can_mario_activate_textbox(m, radius, height, unused)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| radius | `number` | +| height | `number` | +| unused | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_can_mario_activate_textbox(struct MarioState* m, f32 radius, f32 height, UNUSED s32 unused);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_can_mario_activate_textbox_2](#cur_obj_can_mario_activate_textbox_2) + +### Lua Example +`local integerValue = cur_obj_can_mario_activate_textbox_2(m, radius, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| radius | `number` | +| height | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_can_mario_activate_textbox_2(struct MarioState* m, f32 radius, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_end_dialog](#cur_obj_end_dialog) + +### Lua Example +`cur_obj_end_dialog(m, dialogFlags, dialogResult)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| dialogFlags | `integer` | +| dialogResult | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_end_dialog(struct MarioState* m, s32 dialogFlags, s32 dialogResult);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_has_model](#cur_obj_has_model) + +### Lua Example +`local integerValue = cur_obj_has_model(modelID)` + +### Parameters +| Field | Type | +| ----- | ---- | +| modelID | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_has_model(u16 modelID);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_align_gfx_with_floor](#cur_obj_align_gfx_with_floor) + +### Lua Example +`cur_obj_align_gfx_with_floor()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_align_gfx_with_floor(void);` + +[:arrow_up_small:](#) + +
+ +## [mario_is_within_rectangle](#mario_is_within_rectangle) + +### Lua Example +`local integerValue = mario_is_within_rectangle(minX, maxX, minZ, maxZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| minX | `integer` | +| maxX | `integer` | +| minZ | `integer` | +| maxZ | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 mario_is_within_rectangle(s16 minX, s16 maxX, s16 minZ, s16 maxZ);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_shake_screen](#cur_obj_shake_screen) + +### Lua Example +`cur_obj_shake_screen(shake)` + +### Parameters +| Field | Type | +| ----- | ---- | +| shake | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_shake_screen(s32 shake);` + +[:arrow_up_small:](#) + +
+ +## [obj_attack_collided_from_other_object](#obj_attack_collided_from_other_object) + +### Lua Example +`local integerValue = obj_attack_collided_from_other_object(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_attack_collided_from_other_object(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_was_attacked_or_ground_pounded](#cur_obj_was_attacked_or_ground_pounded) + +### Lua Example +`local integerValue = cur_obj_was_attacked_or_ground_pounded()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_was_attacked_or_ground_pounded(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_behavior_params](#obj_copy_behavior_params) + +### Lua Example +`obj_copy_behavior_params(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_behavior_params(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_init_animation_and_anim_frame](#cur_obj_init_animation_and_anim_frame) + +### Lua Example +`cur_obj_init_animation_and_anim_frame(animIndex, animFrame)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animIndex | `integer` | +| animFrame | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_init_animation_and_anim_frame(s32 animIndex, s32 animFrame);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_init_animation_and_check_if_near_end](#cur_obj_init_animation_and_check_if_near_end) + +### Lua Example +`local integerValue = cur_obj_init_animation_and_check_if_near_end(animIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animIndex | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_init_animation_and_check_if_near_end(s32 animIndex);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_init_animation_and_extend_if_at_end](#cur_obj_init_animation_and_extend_if_at_end) + +### Lua Example +`cur_obj_init_animation_and_extend_if_at_end(animIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animIndex | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_init_animation_and_extend_if_at_end(s32 animIndex);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_check_grabbed_mario](#cur_obj_check_grabbed_mario) + +### Lua Example +`local integerValue = cur_obj_check_grabbed_mario()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_check_grabbed_mario(void);` + +[:arrow_up_small:](#) + +
+ +## [player_performed_grab_escape_action](#player_performed_grab_escape_action) + +### Lua Example +`local integerValue = player_performed_grab_escape_action()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 player_performed_grab_escape_action(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_unused_play_footstep_sound](#cur_obj_unused_play_footstep_sound) + +### Lua Example +`cur_obj_unused_play_footstep_sound(animFrame1, animFrame2, sound)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animFrame1 | `integer` | +| animFrame2 | `integer` | +| sound | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_unused_play_footstep_sound(s32 animFrame1, s32 animFrame2, s32 sound);` + +[:arrow_up_small:](#) + +
+ +## [enable_time_stop_including_mario](#enable_time_stop_including_mario) + +### Lua Example +`enable_time_stop_including_mario()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void enable_time_stop_including_mario(void);` + +[:arrow_up_small:](#) + +
+ +## [disable_time_stop_including_mario](#disable_time_stop_including_mario) + +### Lua Example +`disable_time_stop_including_mario()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void disable_time_stop_including_mario(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_check_interacted](#cur_obj_check_interacted) + +### Lua Example +`local integerValue = cur_obj_check_interacted()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_check_interacted(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_spawn_loot_blue_coin](#cur_obj_spawn_loot_blue_coin) + +### Lua Example +`cur_obj_spawn_loot_blue_coin()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_spawn_loot_blue_coin(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_spawn_star_at_y_offset](#cur_obj_spawn_star_at_y_offset) + +### Lua Example +`cur_obj_spawn_star_at_y_offset(targetX, targetY, targetZ, offsetY)` + +### Parameters +| Field | Type | +| ----- | ---- | +| targetX | `number` | +| targetY | `number` | +| targetZ | `number` | +| offsetY | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_spawn_star_at_y_offset(f32 targetX, f32 targetY, f32 targetZ, f32 offsetY);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_home_once](#cur_obj_set_home_once) + +### Description +Sets the current object's home only the first time it's called + +### Lua Example +`cur_obj_set_home_once()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_home_once(void);` + +[:arrow_up_small:](#) + +
+ +## [get_trajectory_length](#get_trajectory_length) + +### Description +Gets a trajectory's length + +### Lua Example +`local integerValue = get_trajectory_length(trajectory)` + +### Parameters +| Field | Type | +| ----- | ---- | +| trajectory | `Pointer` <`Trajectory`> | + +### Returns +- `integer` + +### C Prototype +`s32 get_trajectory_length(Trajectory* trajectory);` + +[:arrow_up_small:](#) + +
+ --- # functions from object_list_processor.h @@ -645,6 +5201,27 @@ Checks whether the cannon in the specified course is unlocked. Returns true if t
+## [save_file_set_cannon_unlocked](#save_file_set_cannon_unlocked) + +### Description +Unlocks the cannon in the current course + +### Lua Example +`save_file_set_cannon_unlocked()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void save_file_set_cannon_unlocked(void);` + +[:arrow_up_small:](#) + +
+ ## [save_file_get_cap_pos](#save_file_get_cap_pos) ### Description @@ -698,7 +5275,7 @@ Returns the current sound mode (e.g., stereo, mono) stored in the save file. Use ## [sequence_player_get_tempo](#sequence_player_get_tempo) ### Description -Gets the tempo of `player` +Gets the `tempo` of `player` ### Lua Example `local integerValue = sequence_player_get_tempo(player)` @@ -745,7 +5322,7 @@ Sets the `tempo` of `player`. Resets when another sequence is played ## [sequence_player_get_tempo_acc](#sequence_player_get_tempo_acc) ### Description -Gets the tempoAcc (tempo accumulation) of `player` +Gets the `tempoAcc` (tempo accumulation) of `player` ### Lua Example `local integerValue = sequence_player_get_tempo_acc(player)` @@ -792,7 +5369,7 @@ Sets the `tempoAcc` (tempo accumulation) of `player`. Resets when another sequen ## [sequence_player_get_transposition](#sequence_player_get_transposition) ### Description -Gets the transposition (pitch) of `player` +Gets the `transposition` (pitch) of `player` ### Lua Example `local integerValue = sequence_player_get_transposition(player)` @@ -3873,4644 +8450,6 @@ Deletes all vertex buffers created by `vtx_create` [:arrow_up_small:](#) -
- ---- -# functions from smlua_level_utils.h - -
- - -## [smlua_level_util_change_area](#smlua_level_util_change_area) - -### Description -Instantly changes the current area to `areaIndex` - -### Lua Example -`smlua_level_util_change_area(areaIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| areaIndex | `integer` | - -### Returns -- None - -### C Prototype -`void smlua_level_util_change_area(s32 areaIndex);` - -[:arrow_up_small:](#) - -
- -## [smlua_level_util_get_info](#smlua_level_util_get_info) - -### Description -Gets information on a custom level from `levelNum` - -### Lua Example -`local CustomLevelInfoValue = smlua_level_util_get_info(levelNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| levelNum | `integer` | - -### Returns -[CustomLevelInfo](structs.md#CustomLevelInfo) - -### C Prototype -`struct CustomLevelInfo* smlua_level_util_get_info(s16 levelNum);` - -[:arrow_up_small:](#) - -
- -## [smlua_level_util_get_info_from_short_name](#smlua_level_util_get_info_from_short_name) - -### Description -Gets information on a custom level from `shortName` - -### Lua Example -`local CustomLevelInfoValue = smlua_level_util_get_info_from_short_name(shortName)` - -### Parameters -| Field | Type | -| ----- | ---- | -| shortName | `string` | - -### Returns -[CustomLevelInfo](structs.md#CustomLevelInfo) - -### C Prototype -`struct CustomLevelInfo* smlua_level_util_get_info_from_short_name(const char* shortName);` - -[:arrow_up_small:](#) - -
- -## [smlua_level_util_get_info_from_course_num](#smlua_level_util_get_info_from_course_num) - -### Description -Gets information on a custom level from `courseNum` - -### Lua Example -`local CustomLevelInfoValue = smlua_level_util_get_info_from_course_num(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -[CustomLevelInfo](structs.md#CustomLevelInfo) - -### C Prototype -`struct CustomLevelInfo* smlua_level_util_get_info_from_course_num(u8 courseNum);` - -[:arrow_up_small:](#) - -
- -## [level_register](#level_register) - -### Description -Registers a fully custom level. Level ID begins at 50 - -### Lua Example -`local integerValue = level_register(scriptEntryName, courseNum, fullName, shortName, acousticReach, echoLevel1, echoLevel2, echoLevel3)` - -### Parameters -| Field | Type | -| ----- | ---- | -| scriptEntryName | `string` | -| courseNum | `integer` | -| fullName | `string` | -| shortName | `string` | -| acousticReach | `integer` | -| echoLevel1 | `integer` | -| echoLevel2 | `integer` | -| echoLevel3 | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 level_register(const char* scriptEntryName, s16 courseNum, const char* fullName, const char* shortName, u32 acousticReach, u32 echoLevel1, u32 echoLevel2, u32 echoLevel3);` - -[:arrow_up_small:](#) - -
- -## [level_is_vanilla_level](#level_is_vanilla_level) - -### Description -Checks if `levelNum` is a vanilla level - -### Lua Example -`local booleanValue = level_is_vanilla_level(levelNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| levelNum | `integer` | - -### Returns -- `boolean` - -### C Prototype -`bool level_is_vanilla_level(s16 levelNum);` - -[:arrow_up_small:](#) - -
- -## [warp_to_warpnode](#warp_to_warpnode) - -### Description -Warps to `aWarpId` of `aArea` in `aLevel` during `aAct` - -### Lua Example -`local booleanValue = warp_to_warpnode(aLevel, aArea, aAct, aWarpId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| aLevel | `integer` | -| aArea | `integer` | -| aAct | `integer` | -| aWarpId | `integer` | - -### Returns -- `boolean` - -### C Prototype -`bool warp_to_warpnode(s32 aLevel, s32 aArea, s32 aAct, s32 aWarpId);` - -[:arrow_up_small:](#) - -
- -## [warp_to_level](#warp_to_level) - -### Description -Warps to `aArea` of `aLevel` in `aAct` - -### Lua Example -`local booleanValue = warp_to_level(aLevel, aArea, aAct)` - -### Parameters -| Field | Type | -| ----- | ---- | -| aLevel | `integer` | -| aArea | `integer` | -| aAct | `integer` | - -### Returns -- `boolean` - -### C Prototype -`bool warp_to_level(s32 aLevel, s32 aArea, s32 aAct);` - -[:arrow_up_small:](#) - -
- -## [warp_restart_level](#warp_restart_level) - -### Description -Restarts the current level - -### Lua Example -`local booleanValue = warp_restart_level()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool warp_restart_level(void);` - -[:arrow_up_small:](#) - -
- -## [warp_to_start_level](#warp_to_start_level) - -### Description -Warps to the start level (Castle Grounds by default) - -### Lua Example -`local booleanValue = warp_to_start_level()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool warp_to_start_level(void);` - -[:arrow_up_small:](#) - -
- -## [warp_exit_level](#warp_exit_level) - -### Description -Exits the current level after `aDelay` - -### Lua Example -`local booleanValue = warp_exit_level(aDelay)` - -### Parameters -| Field | Type | -| ----- | ---- | -| aDelay | `integer` | - -### Returns -- `boolean` - -### C Prototype -`bool warp_exit_level(s32 aDelay);` - -[:arrow_up_small:](#) - -
- -## [warp_to_castle](#warp_to_castle) - -### Description -Warps back to the castle from `aLevel` - -### Lua Example -`local booleanValue = warp_to_castle(aLevel)` - -### Parameters -| Field | Type | -| ----- | ---- | -| aLevel | `integer` | - -### Returns -- `boolean` - -### C Prototype -`bool warp_to_castle(s32 aLevel);` - -[:arrow_up_small:](#) - -
- ---- -# functions from smlua_misc_utils.h - -
- - -## [get_network_area_timer](#get_network_area_timer) - -### Description -Gets the current area's networked timer - -### Lua Example -`local integerValue = get_network_area_timer()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 get_network_area_timer(void);` - -[:arrow_up_small:](#) - -
- -## [get_area_update_counter](#get_area_update_counter) - -### Description -Gets the area update counter incremented when objects are updated - -### Lua Example -`local integerValue = get_area_update_counter()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u16 get_area_update_counter(void);` - -[:arrow_up_small:](#) - -
- -## [get_temp_s32_pointer](#get_temp_s32_pointer) - -### Description -Returns a temporary signed 32-bit integer pointer with its value set to `initialValue` - -### Lua Example -`local PointerValue = get_temp_s32_pointer(initialValue)` - -### Parameters -| Field | Type | -| ----- | ---- | -| initialValue | `integer` | - -### Returns -- `Pointer` <`integer`> - -### C Prototype -`s32* get_temp_s32_pointer(s32 initialValue);` - -[:arrow_up_small:](#) - -
- -## [deref_s32_pointer](#deref_s32_pointer) - -### Description -Gets the signed 32-bit integer value from `pointer` - -### Lua Example -`local integerValue = deref_s32_pointer(pointer)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pointer | `Pointer` <`integer`> | - -### Returns -- `integer` - -### C Prototype -`s32 deref_s32_pointer(s32* pointer);` - -[:arrow_up_small:](#) - -
- -## [djui_popup_create_global](#djui_popup_create_global) - -### Description -Creates a DJUI popup that is broadcasted to every client - -### Lua Example -`djui_popup_create_global(message, lines)` - -### Parameters -| Field | Type | -| ----- | ---- | -| message | `string` | -| lines | `integer` | - -### Returns -- None - -### C Prototype -`void djui_popup_create_global(const char* message, int lines);` - -[:arrow_up_small:](#) - -
- -## [djui_is_popup_disabled](#djui_is_popup_disabled) - -### Description -Returns if popups are disabled - -### Lua Example -`local booleanValue = djui_is_popup_disabled()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool djui_is_popup_disabled(void);` - -[:arrow_up_small:](#) - -
- -## [djui_set_popup_disabled_override](#djui_set_popup_disabled_override) - -### Description -Sets if popups are disabled - -### Lua Example -`djui_set_popup_disabled_override(value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `boolean` | - -### Returns -- None - -### C Prototype -`void djui_set_popup_disabled_override(bool value);` - -[:arrow_up_small:](#) - -
- -## [djui_reset_popup_disabled_override](#djui_reset_popup_disabled_override) - -### Description -Resets if popups are disabled - -### Lua Example -`djui_reset_popup_disabled_override()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void djui_reset_popup_disabled_override(void);` - -[:arrow_up_small:](#) - -
- -## [djui_is_playerlist_open](#djui_is_playerlist_open) - -### Description -Checks if the DJUI playerlist is open - -### Lua Example -`local booleanValue = djui_is_playerlist_open()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool djui_is_playerlist_open(void);` - -[:arrow_up_small:](#) - -
- -## [djui_attempting_to_open_playerlist](#djui_attempting_to_open_playerlist) - -### Description -Checks if the DJUI playerlist is attempting to be opened - -### Lua Example -`local booleanValue = djui_attempting_to_open_playerlist()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool djui_attempting_to_open_playerlist(void);` - -[:arrow_up_small:](#) - -
- -## [djui_get_playerlist_page_index](#djui_get_playerlist_page_index) - -### Description -Gets the DJUI playerlist's page index - -### Lua Example -`local integerValue = djui_get_playerlist_page_index()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 djui_get_playerlist_page_index(void);` - -[:arrow_up_small:](#) - -
- -## [djui_menu_get_font](#djui_menu_get_font) - -### Description -Gets the DJUI menu font - -### Lua Example -`local enumValue = djui_menu_get_font()` - -### Parameters -- None - -### Returns -[enum DjuiFontType](constants.md#enum-DjuiFontType) - -### C Prototype -`enum DjuiFontType djui_menu_get_font(void);` - -[:arrow_up_small:](#) - -
- -## [djui_menu_get_theme](#djui_menu_get_theme) - -### Description -Gets the DJUI menu theme - -### Lua Example -`local DjuiThemeValue = djui_menu_get_theme()` - -### Parameters -- None - -### Returns -[DjuiTheme](structs.md#DjuiTheme) - -### C Prototype -`struct DjuiTheme* djui_menu_get_theme(void);` - -[:arrow_up_small:](#) - -
- -## [djui_is_playerlist_ping_visible](#djui_is_playerlist_ping_visible) - -### Description -Checks if the DJUI playerlist ping icon is visible - -### Lua Example -`local booleanValue = djui_is_playerlist_ping_visible()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool djui_is_playerlist_ping_visible(void);` - -[:arrow_up_small:](#) - -
- -## [get_dialog_box_state](#get_dialog_box_state) - -### Description -Gets the current state of the dialog box - -### Lua Example -`local integerValue = get_dialog_box_state()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s8 get_dialog_box_state(void);` - -[:arrow_up_small:](#) - -
- -## [get_dialog_id](#get_dialog_id) - -### Description -Gets the current dialog box ID - -### Lua Example -`local integerValue = get_dialog_id()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 get_dialog_id(void);` - -[:arrow_up_small:](#) - -
- -## [get_last_star_or_key](#get_last_star_or_key) - -### Description -Gets if the last objective collected was a star (0) or a key (1) - -### Lua Example -`local integerValue = get_last_star_or_key()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 get_last_star_or_key(void);` - -[:arrow_up_small:](#) - -
- -## [set_last_star_or_key](#set_last_star_or_key) - -### Description -Sets if the last objective collected was a star (0) or a key (1) - -### Lua Example -`set_last_star_or_key(value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void set_last_star_or_key(u8 value);` - -[:arrow_up_small:](#) - -
- -## [get_last_completed_course_num](#get_last_completed_course_num) - -### Description -Gets the last course a star or key was collected in - -### Lua Example -`local integerValue = get_last_completed_course_num()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 get_last_completed_course_num(void);` - -[:arrow_up_small:](#) - -
- -## [set_last_completed_course_num](#set_last_completed_course_num) - -### Description -Sets the last course a star or key was collected in - -### Lua Example -`set_last_completed_course_num(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -- None - -### C Prototype -`void set_last_completed_course_num(u8 courseNum);` - -[:arrow_up_small:](#) - -
- -## [get_last_completed_star_num](#get_last_completed_star_num) - -### Description -Gets the last collected star's number (1-7) - -### Lua Example -`local integerValue = get_last_completed_star_num()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 get_last_completed_star_num(void);` - -[:arrow_up_small:](#) - -
- -## [set_last_completed_star_num](#set_last_completed_star_num) - -### Description -Sets the last collected star's number (1-7) - -### Lua Example -`set_last_completed_star_num(starNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| starNum | `integer` | - -### Returns -- None - -### C Prototype -`void set_last_completed_star_num(u8 starNum);` - -[:arrow_up_small:](#) - -
- -## [get_got_file_coin_hi_score](#get_got_file_coin_hi_score) - -### Description -Checks if the save file's coin "HI SCORE" was obtained with the last star or key collection - -### Lua Example -`local booleanValue = get_got_file_coin_hi_score()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool get_got_file_coin_hi_score(void);` - -[:arrow_up_small:](#) - -
- -## [set_got_file_coin_hi_score](#set_got_file_coin_hi_score) - -### Description -Sets if the save file's coin "HI SCORE" was obtained with the last star or key collection - -### Lua Example -`set_got_file_coin_hi_score(value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `boolean` | - -### Returns -- None - -### C Prototype -`void set_got_file_coin_hi_score(bool value);` - -[:arrow_up_small:](#) - -
- -## [get_save_file_modified](#get_save_file_modified) - -### Description -Checks if the save file has been modified without saving - -### Lua Example -`local booleanValue = get_save_file_modified()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool get_save_file_modified(void);` - -[:arrow_up_small:](#) - -
- -## [set_save_file_modified](#set_save_file_modified) - -### Description -Sets if the save file has been modified without saving - -### Lua Example -`set_save_file_modified(value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `boolean` | - -### Returns -- None - -### C Prototype -`void set_save_file_modified(bool value);` - -[:arrow_up_small:](#) - -
- -## [hud_hide](#hud_hide) - -### Description -Hides the HUD - -### Lua Example -`hud_hide()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void hud_hide(void);` - -[:arrow_up_small:](#) - -
- -## [hud_show](#hud_show) - -### Description -Shows the HUD - -### Lua Example -`hud_show()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void hud_show(void);` - -[:arrow_up_small:](#) - -
- -## [hud_is_hidden](#hud_is_hidden) - -### Description -Checks if the HUD is hidden - -### Lua Example -`local booleanValue = hud_is_hidden()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool hud_is_hidden(void);` - -[:arrow_up_small:](#) - -
- -## [hud_get_value](#hud_get_value) - -### Description -Gets a HUD display value - -### Lua Example -`local integerValue = hud_get_value(type)` - -### Parameters -| Field | Type | -| ----- | ---- | -| type | [enum HudDisplayValue](constants.md#enum-HudDisplayValue) | - -### Returns -- `integer` - -### C Prototype -`s32 hud_get_value(enum HudDisplayValue type);` - -[:arrow_up_small:](#) - -
- -## [hud_set_value](#hud_set_value) - -### Description -Sets a HUD display value - -### Lua Example -`hud_set_value(type, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| type | [enum HudDisplayValue](constants.md#enum-HudDisplayValue) | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void hud_set_value(enum HudDisplayValue type, s32 value);` - -[:arrow_up_small:](#) - -
- -## [hud_render_power_meter](#hud_render_power_meter) - -### Description -Renders a power meter on the HUD - -### Lua Example -`hud_render_power_meter(health, x, y, width, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| health | `integer` | -| x | `number` | -| y | `number` | -| width | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void hud_render_power_meter(s32 health, f32 x, f32 y, f32 width, f32 height);` - -[:arrow_up_small:](#) - -
- -## [hud_render_power_meter_interpolated](#hud_render_power_meter_interpolated) - -### Description -Renders an interpolated power meter on the HUD - -### Lua Example -`hud_render_power_meter_interpolated(health, prevX, prevY, prevWidth, prevHeight, x, y, width, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| health | `integer` | -| prevX | `number` | -| prevY | `number` | -| prevWidth | `number` | -| prevHeight | `number` | -| x | `number` | -| y | `number` | -| width | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void hud_render_power_meter_interpolated(s32 health, f32 prevX, f32 prevY, f32 prevWidth, f32 prevHeight, f32 x, f32 y, f32 width, f32 height);` - -[:arrow_up_small:](#) - -
- -## [hud_get_flash](#hud_get_flash) - -### Description -Gets if the star counter on the HUD should flash - -### Lua Example -`local integerValue = hud_get_flash()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s8 hud_get_flash(void);` - -[:arrow_up_small:](#) - -
- -## [hud_set_flash](#hud_set_flash) - -### Description -Sets if the star counter on the HUD should flash - -### Lua Example -`hud_set_flash(value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void hud_set_flash(s8 value);` - -[:arrow_up_small:](#) - -
- -## [act_select_hud_hide](#act_select_hud_hide) - -### Description -Hides part of the Act Select HUD - -### Lua Example -`act_select_hud_hide(part)` - -### Parameters -| Field | Type | -| ----- | ---- | -| part | [enum ActSelectHudPart](constants.md#enum-ActSelectHudPart) | - -### Returns -- None - -### C Prototype -`void act_select_hud_hide(enum ActSelectHudPart part);` - -[:arrow_up_small:](#) - -
- -## [act_select_hud_show](#act_select_hud_show) - -### Description -Shows part of the Act Select HUD - -### Lua Example -`act_select_hud_show(part)` - -### Parameters -| Field | Type | -| ----- | ---- | -| part | [enum ActSelectHudPart](constants.md#enum-ActSelectHudPart) | - -### Returns -- None - -### C Prototype -`void act_select_hud_show(enum ActSelectHudPart part);` - -[:arrow_up_small:](#) - -
- -## [act_select_hud_is_hidden](#act_select_hud_is_hidden) - -### Description -Checks if part of the Act Select HUD is hidden - -### Lua Example -`local booleanValue = act_select_hud_is_hidden(part)` - -### Parameters -| Field | Type | -| ----- | ---- | -| part | [enum ActSelectHudPart](constants.md#enum-ActSelectHudPart) | - -### Returns -- `boolean` - -### C Prototype -`bool act_select_hud_is_hidden(enum ActSelectHudPart part);` - -[:arrow_up_small:](#) - -
- -## [is_game_paused](#is_game_paused) - -### Description -Checks if the game is paused - -### Lua Example -`local booleanValue = is_game_paused()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool is_game_paused(void);` - -[:arrow_up_small:](#) - -
- -## [is_transition_playing](#is_transition_playing) - -### Description -Checks if a screen transition is playing - -### Lua Example -`local booleanValue = is_transition_playing()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool is_transition_playing(void);` - -[:arrow_up_small:](#) - -
- -## [allocate_mario_action](#allocate_mario_action) - -### Description -Allocates an action ID with bitwise flags - -### Lua Example -`local integerValue = allocate_mario_action(actFlags)` - -### Parameters -| Field | Type | -| ----- | ---- | -| actFlags | `integer` | - -### Returns -- `integer` - -### C Prototype -`u32 allocate_mario_action(u32 actFlags);` - -[:arrow_up_small:](#) - -
- -## [get_hand_foot_pos_x](#get_hand_foot_pos_x) - -### Description -Gets the X coordinate of Mario's hand (0-1) or foot (2-3) but it is important to note that the positions are not updated off-screen - -### Lua Example -`local numberValue = get_hand_foot_pos_x(m, index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| index | `integer` | - -### Returns -- `number` - -### C Prototype -`f32 get_hand_foot_pos_x(struct MarioState* m, u8 index);` - -[:arrow_up_small:](#) - -
- -## [get_hand_foot_pos_y](#get_hand_foot_pos_y) - -### Description -Gets the Y coordinate of Mario's hand (0-1) or foot (2-3) but It is important to note that the positions are not updated off-screen - -### Lua Example -`local numberValue = get_hand_foot_pos_y(m, index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| index | `integer` | - -### Returns -- `number` - -### C Prototype -`f32 get_hand_foot_pos_y(struct MarioState* m, u8 index);` - -[:arrow_up_small:](#) - -
- -## [get_hand_foot_pos_z](#get_hand_foot_pos_z) - -### Description -Gets the Z coordinate of Mario's hand (0-1) or foot (2-3) but it is important to note that the positions are not updated off-screen - -### Lua Example -`local numberValue = get_hand_foot_pos_z(m, index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| index | `integer` | - -### Returns -- `number` - -### C Prototype -`f32 get_hand_foot_pos_z(struct MarioState* m, u8 index);` - -[:arrow_up_small:](#) - -
- -## [get_mario_anim_part_pos](#get_mario_anim_part_pos) - -### Description -Retrieves the animated part position associated to `animPart` from the MarioState `m` and stores it into `pos`. Returns `true` on success or `false` on failure - -### Lua Example -`local booleanValue = get_mario_anim_part_pos(m, animPart, pos)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| animPart | `integer` | -| pos | [Vec3f](structs.md#Vec3f) | - -### Returns -- `boolean` - -### C Prototype -`bool get_mario_anim_part_pos(struct MarioState *m, u32 animPart, OUT Vec3f pos);` - -[:arrow_up_small:](#) - -
- -## [get_current_save_file_num](#get_current_save_file_num) - -### Description -Gets the current save file number (1-indexed) - -### Lua Example -`local integerValue = get_current_save_file_num()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 get_current_save_file_num(void);` - -[:arrow_up_small:](#) - -
- -## [save_file_get_using_backup_slot](#save_file_get_using_backup_slot) - -### Description -Checks if the save file is using its backup slot - -### Lua Example -`local booleanValue = save_file_get_using_backup_slot()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool save_file_get_using_backup_slot(void);` - -[:arrow_up_small:](#) - -
- -## [save_file_set_using_backup_slot](#save_file_set_using_backup_slot) - -### Description -Sets if the save file should use its backup slot - -### Lua Example -`save_file_set_using_backup_slot(usingBackupSlot)` - -### Parameters -| Field | Type | -| ----- | ---- | -| usingBackupSlot | `boolean` | - -### Returns -- None - -### C Prototype -`void save_file_set_using_backup_slot(bool usingBackupSlot);` - -[:arrow_up_small:](#) - -
- -## [movtexqc_register](#movtexqc_register) - -### Description -Registers a custom moving texture entry (used for vanilla water boxes) - -### Lua Example -`movtexqc_register(name, level, area, type)` - -### Parameters -| Field | Type | -| ----- | ---- | -| name | `string` | -| level | `integer` | -| area | `integer` | -| type | `integer` | - -### Returns -- None - -### C Prototype -`void movtexqc_register(const char* name, s16 level, s16 area, s16 type);` - -[:arrow_up_small:](#) - -
- -## [get_water_level](#get_water_level) - -### Description -Gets the water level in an area corresponding to `index` (0-indexed) - -### Lua Example -`local integerValue = get_water_level(index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 get_water_level(u8 index);` - -[:arrow_up_small:](#) - -
- -## [set_water_level](#set_water_level) - -### Description -Sets the water level in an area corresponding to `index` (0-indexed) - -### Lua Example -`set_water_level(index, height, sync)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | -| height | `integer` | -| sync | `boolean` | - -### Returns -- None - -### C Prototype -`void set_water_level(u8 index, s16 height, bool sync);` - -[:arrow_up_small:](#) - -
- -## [course_is_main_course](#course_is_main_course) - -### Description -Checks if a course is a main course and not the castle or secret levels - -### Lua Example -`local booleanValue = course_is_main_course(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -- `boolean` - -### C Prototype -`bool course_is_main_course(u16 courseNum);` - -[:arrow_up_small:](#) - -
- -## [get_ttc_speed_setting](#get_ttc_speed_setting) - -### Description -Gets TTC's speed setting - -### Lua Example -`local integerValue = get_ttc_speed_setting()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 get_ttc_speed_setting(void);` - -[:arrow_up_small:](#) - -
- -## [set_ttc_speed_setting](#set_ttc_speed_setting) - -### Description -Sets TTC's speed setting (TTC_SPEED_*) - -### Lua Example -`set_ttc_speed_setting(speed)` - -### Parameters -| Field | Type | -| ----- | ---- | -| speed | `integer` | - -### Returns -- None - -### C Prototype -`void set_ttc_speed_setting(s16 speed);` - -[:arrow_up_small:](#) - -
- -## [get_time](#get_time) - -### Description -Gets the Unix Timestamp - -### Lua Example -`local integerValue = get_time()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s64 get_time(void);` - -[:arrow_up_small:](#) - -
- -## [get_date_and_time](#get_date_and_time) - -### Description -Gets the system clock's date and time - -### Lua Example -`local DateTimeValue = get_date_and_time()` - -### Parameters -- None - -### Returns -[DateTime](structs.md#DateTime) - -### C Prototype -`struct DateTime* get_date_and_time(void);` - -[:arrow_up_small:](#) - -
- -## [get_envfx](#get_envfx) - -### Description -Gets the non overridden environment effect (e.g. snow) - -### Lua Example -`local integerValue = get_envfx()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u16 get_envfx(void);` - -[:arrow_up_small:](#) - -
- -## [set_override_envfx](#set_override_envfx) - -### Description -Sets the override environment effect (e.g. snow) - -### Lua Example -`set_override_envfx(envfx)` - -### Parameters -| Field | Type | -| ----- | ---- | -| envfx | `integer` | - -### Returns -- None - -### C Prototype -`void set_override_envfx(s32 envfx);` - -[:arrow_up_small:](#) - -
- -## [get_global_timer](#get_global_timer) - -### Description -Gets the global timer that has been ticking at 30 frames per second since game boot - -### Lua Example -`local integerValue = get_global_timer()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 get_global_timer(void);` - -[:arrow_up_small:](#) - -
- -## [get_dialog_response](#get_dialog_response) - -### Description -Gets the choice selected inside of a dialog box (0-1) - -### Lua Example -`local integerValue = get_dialog_response()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 get_dialog_response(void);` - -[:arrow_up_small:](#) - -
- -## [get_local_discord_id](#get_local_discord_id) - -### Description -Gets the local discord ID if it isn't disabled, otherwise "0" is returned - -### Lua Example -`local stringValue = get_local_discord_id()` - -### Parameters -- None - -### Returns -- `string` - -### C Prototype -`const char* get_local_discord_id(void);` - -[:arrow_up_small:](#) - -
- -## [get_coopnet_id](#get_coopnet_id) - -### Description -Gets the CoopNet ID of a player with `localIndex` if CoopNet is being used and the player is connected, otherwise "-1" is returned - -### Lua Example -`local stringValue = get_coopnet_id(localIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| localIndex | `integer` | - -### Returns -- `string` - -### C Prototype -`const char* get_coopnet_id(s8 localIndex);` - -[:arrow_up_small:](#) - -
- -## [get_volume_master](#get_volume_master) - -### Description -Gets the master volume level - -### Lua Example -`local numberValue = get_volume_master()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 get_volume_master(void);` - -[:arrow_up_small:](#) - -
- -## [get_volume_level](#get_volume_level) - -### Description -Gets the volume level of music - -### Lua Example -`local numberValue = get_volume_level()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 get_volume_level(void);` - -[:arrow_up_small:](#) - -
- -## [get_volume_sfx](#get_volume_sfx) - -### Description -Gets the volume level of sound effects - -### Lua Example -`local numberValue = get_volume_sfx()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 get_volume_sfx(void);` - -[:arrow_up_small:](#) - -
- -## [get_volume_env](#get_volume_env) - -### Description -Gets the volume level of environment sounds effects - -### Lua Example -`local numberValue = get_volume_env()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 get_volume_env(void);` - -[:arrow_up_small:](#) - -
- -## [set_volume_master](#set_volume_master) - -### Description -Sets the master volume level - -### Lua Example -`set_volume_master(volume)` - -### Parameters -| Field | Type | -| ----- | ---- | -| volume | `number` | - -### Returns -- None - -### C Prototype -`void set_volume_master(f32 volume);` - -[:arrow_up_small:](#) - -
- -## [set_volume_level](#set_volume_level) - -### Description -Sets the volume level of music - -### Lua Example -`set_volume_level(volume)` - -### Parameters -| Field | Type | -| ----- | ---- | -| volume | `number` | - -### Returns -- None - -### C Prototype -`void set_volume_level(f32 volume);` - -[:arrow_up_small:](#) - -
- -## [set_volume_sfx](#set_volume_sfx) - -### Description -Sets the volume level of sound effects - -### Lua Example -`set_volume_sfx(volume)` - -### Parameters -| Field | Type | -| ----- | ---- | -| volume | `number` | - -### Returns -- None - -### C Prototype -`void set_volume_sfx(f32 volume);` - -[:arrow_up_small:](#) - -
- -## [set_volume_env](#set_volume_env) - -### Description -Sets the volume level of environment sounds effects - -### Lua Example -`set_volume_env(volume)` - -### Parameters -| Field | Type | -| ----- | ---- | -| volume | `number` | - -### Returns -- None - -### C Prototype -`void set_volume_env(f32 volume);` - -[:arrow_up_small:](#) - -
- -## [get_environment_region](#get_environment_region) - -### Description -Gets an environment region (gas/water boxes) height value - -### Lua Example -`local integerValue = get_environment_region(index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 get_environment_region(u8 index);` - -[:arrow_up_small:](#) - -
- -## [set_environment_region](#set_environment_region) - -### Description -Sets an environment region (gas/water boxes) height value - -### Lua Example -`set_environment_region(index, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void set_environment_region(u8 index, s16 value);` - -[:arrow_up_small:](#) - -
- -## [mod_file_exists](#mod_file_exists) - -### Description -Checks if a file exists inside of a mod - -### Lua Example -`local booleanValue = mod_file_exists(filename)` - -### Parameters -| Field | Type | -| ----- | ---- | -| filename | `string` | - -### Returns -- `boolean` - -### C Prototype -`bool mod_file_exists(const char* filename);` - -[:arrow_up_small:](#) - -
- -## [get_active_mod](#get_active_mod) - -### Description -Gets the mod currently being processed - -### Lua Example -`local ModValue = get_active_mod()` - -### Parameters -- None - -### Returns -[Mod](structs.md#Mod) - -### C Prototype -`struct Mod* get_active_mod(void);` - -[:arrow_up_small:](#) - -
- -## [set_window_title](#set_window_title) - -### Description -Sets the window title to a custom title - -### Lua Example -`set_window_title(title)` - -### Parameters -| Field | Type | -| ----- | ---- | -| title | `string` | - -### Returns -- None - -### C Prototype -`void set_window_title(const char* title);` - -[:arrow_up_small:](#) - -
- -## [reset_window_title](#reset_window_title) - -### Description -Resets the window title - -### Lua Example -`reset_window_title()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void reset_window_title(void);` - -[:arrow_up_small:](#) - -
- -## [get_os_name](#get_os_name) - -### Description -Gets the name of the operating system the game is running on - -### Lua Example -`local stringValue = get_os_name()` - -### Parameters -- None - -### Returns -- `string` - -### C Prototype -`const char* get_os_name(void);` - -[:arrow_up_small:](#) - -
- -## [geo_get_current_root](#geo_get_current_root) - -### Description -Gets the current GraphNodeRoot - -### Lua Example -`local GraphNodeRootValue = geo_get_current_root()` - -### Parameters -- None - -### Returns -[GraphNodeRoot](structs.md#GraphNodeRoot) - -### C Prototype -`struct GraphNodeRoot* geo_get_current_root(void);` - -[:arrow_up_small:](#) - -
- -## [geo_get_current_master_list](#geo_get_current_master_list) - -### Description -Gets the current GraphNodeMasterList - -### Lua Example -`local GraphNodeMasterListValue = geo_get_current_master_list()` - -### Parameters -- None - -### Returns -[GraphNodeMasterList](structs.md#GraphNodeMasterList) - -### C Prototype -`struct GraphNodeMasterList* geo_get_current_master_list(void);` - -[:arrow_up_small:](#) - -
- -## [geo_get_current_perspective](#geo_get_current_perspective) - -### Description -Gets the current GraphNodePerspective - -### Lua Example -`local GraphNodePerspectiveValue = geo_get_current_perspective()` - -### Parameters -- None - -### Returns -[GraphNodePerspective](structs.md#GraphNodePerspective) - -### C Prototype -`struct GraphNodePerspective* geo_get_current_perspective(void);` - -[:arrow_up_small:](#) - -
- -## [geo_get_current_camera](#geo_get_current_camera) - -### Description -Gets the current GraphNodeCamera - -### Lua Example -`local GraphNodeCameraValue = geo_get_current_camera()` - -### Parameters -- None - -### Returns -[GraphNodeCamera](structs.md#GraphNodeCamera) - -### C Prototype -`struct GraphNodeCamera* geo_get_current_camera(void);` - -[:arrow_up_small:](#) - -
- -## [geo_get_current_held_object](#geo_get_current_held_object) - -### Description -Gets the current GraphNodeHeldObject - -### Lua Example -`local GraphNodeHeldObjectValue = geo_get_current_held_object()` - -### Parameters -- None - -### Returns -[GraphNodeHeldObject](structs.md#GraphNodeHeldObject) - -### C Prototype -`struct GraphNodeHeldObject* geo_get_current_held_object(void);` - -[:arrow_up_small:](#) - -
- -## [texture_to_lua_table](#texture_to_lua_table) - -### Description -Converts a texture's pixels to a Lua table. Returns nil if failed. Otherwise, returns a table as a pure memory buffer. Supports rgba16 and rgba32 textures - -### Lua Example -`texture_to_lua_table(tex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| tex | `Pointer` <`Texture`> | - -### Returns -- None - -### C Prototype -`void texture_to_lua_table(const Texture *tex);` - -[:arrow_up_small:](#) - -
- -## [get_texture_name](#get_texture_name) - -### Description -Gets the name of the provided texture pointer `tex` - -### Lua Example -`local stringValue = get_texture_name(tex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| tex | `Pointer` <`Texture`> | - -### Returns -- `string` - -### C Prototype -`const char *get_texture_name(const Texture *tex);` - -[:arrow_up_small:](#) - -
- ---- -# functions from smlua_model_utils.h - -
- - -## [smlua_model_util_get_id](#smlua_model_util_get_id) - -### Description -Gets the extended model ID for the `name` of a `GeoLayout` - -### Lua Example -`local enumValue = smlua_model_util_get_id(name)` - -### Parameters -| Field | Type | -| ----- | ---- | -| name | `string` | - -### Returns -[enum ModelExtendedId](constants.md#enum-ModelExtendedId) - -### C Prototype -`enum ModelExtendedId smlua_model_util_get_id(const char* name);` - -[:arrow_up_small:](#) - -
- ---- -# functions from smlua_obj_utils.h - -
- - -## [spawn_sync_object](#spawn_sync_object) - -### Description -Spawns a synchronized object at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` - -### Lua Example -`local ObjectValue = spawn_sync_object(behaviorId, modelId, x, y, z, objSetupFunction)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | -| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | -| x | `number` | -| y | `number` | -| z | `number` | -| objSetupFunction | `Lua Function` () | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object* spawn_sync_object(enum BehaviorId behaviorId, enum ModelExtendedId modelId, f32 x, f32 y, f32 z, LuaFunction objSetupFunction);` - -[:arrow_up_small:](#) - -
- -## [spawn_non_sync_object](#spawn_non_sync_object) - -### Description -Spawns a non-synchronized object at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` - -### Lua Example -`local ObjectValue = spawn_non_sync_object(behaviorId, modelId, x, y, z, objSetupFunction)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | -| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | -| x | `number` | -| y | `number` | -| z | `number` | -| objSetupFunction | `Lua Function` () | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object* spawn_non_sync_object(enum BehaviorId behaviorId, enum ModelExtendedId modelId, f32 x, f32 y, f32 z, LuaFunction objSetupFunction);` - -[:arrow_up_small:](#) - -
- -## [obj_has_behavior_id](#obj_has_behavior_id) - -### Description -Checks if an object has `behaviorId` - -### Lua Example -`local integerValue = obj_has_behavior_id(o, behaviorId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_has_behavior_id(struct Object *o, enum BehaviorId behaviorId);` - -[:arrow_up_small:](#) - -
- -## [obj_has_model_extended](#obj_has_model_extended) - -### Description -Checks if an object's model is equal to `modelId` - -### Lua Example -`local integerValue = obj_has_model_extended(o, modelId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_has_model_extended(struct Object *o, enum ModelExtendedId modelId);` - -[:arrow_up_small:](#) - -
- -## [obj_get_model_id_extended](#obj_get_model_id_extended) - -### Description -Returns an object's extended model id - -### Lua Example -`local enumValue = obj_get_model_id_extended(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -[enum ModelExtendedId](constants.md#enum-ModelExtendedId) - -### C Prototype -`enum ModelExtendedId obj_get_model_id_extended(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_set_model_extended](#obj_set_model_extended) - -### Description -Sets an object's model to `modelId` - -### Lua Example -`obj_set_model_extended(o, modelId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | - -### Returns -- None - -### C Prototype -`void obj_set_model_extended(struct Object *o, enum ModelExtendedId modelId);` - -[:arrow_up_small:](#) - -
- -## [get_trajectory](#get_trajectory) - -### Description -Gets a trajectory by `name` - -### Lua Example -`local PointerValue = get_trajectory(name)` - -### Parameters -| Field | Type | -| ----- | ---- | -| name | `string` | - -### Returns -- `Pointer` <`Trajectory`> - -### C Prototype -`Trajectory* get_trajectory(const char* name);` - -[:arrow_up_small:](#) - -
- -## [geo_get_current_object](#geo_get_current_object) - -### Description -When used in a geo function, retrieve the current processed object - -### Lua Example -`local ObjectValue = geo_get_current_object()` - -### Parameters -- None - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *geo_get_current_object(void);` - -[:arrow_up_small:](#) - -
- -## [get_current_object](#get_current_object) - -### Description -Gets the object currently being processed - -### Lua Example -`local ObjectValue = get_current_object()` - -### Parameters -- None - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *get_current_object(void);` - -[:arrow_up_small:](#) - -
- -## [get_dialog_object](#get_dialog_object) - -### Description -Gets the NPC object Mario is talking to - -### Lua Example -`local ObjectValue = get_dialog_object()` - -### Parameters -- None - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *get_dialog_object(void);` - -[:arrow_up_small:](#) - -
- -## [get_cutscene_focus](#get_cutscene_focus) - -### Description -Gets the cutscene focus object - -### Lua Example -`local ObjectValue = get_cutscene_focus()` - -### Parameters -- None - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *get_cutscene_focus(void);` - -[:arrow_up_small:](#) - -
- -## [get_secondary_camera_focus](#get_secondary_camera_focus) - -### Description -Gets the secondary camera focus object - -### Lua Example -`local ObjectValue = get_secondary_camera_focus()` - -### Parameters -- None - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *get_secondary_camera_focus(void);` - -[:arrow_up_small:](#) - -
- -## [set_cutscene_focus](#set_cutscene_focus) - -### Description -Sets the cutscene focus object - -### Lua Example -`set_cutscene_focus(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void set_cutscene_focus(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [set_secondary_camera_focus](#set_secondary_camera_focus) - -### Description -Sets the secondary camera focus object - -### Lua Example -`set_secondary_camera_focus(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void set_secondary_camera_focus(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_get_first](#obj_get_first) - -### Description -Gets the first object in an object list - -### Lua Example -`local ObjectValue = obj_get_first(objList)` - -### Parameters -| Field | Type | -| ----- | ---- | -| objList | [enum ObjectList](constants.md#enum-ObjectList) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_first(enum ObjectList objList);` - -[:arrow_up_small:](#) - -
- -## [obj_get_first_with_behavior_id](#obj_get_first_with_behavior_id) - -### Description -Gets the first object loaded with `behaviorId` - -### Lua Example -`local ObjectValue = obj_get_first_with_behavior_id(behaviorId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_first_with_behavior_id(enum BehaviorId behaviorId);` - -[:arrow_up_small:](#) - -
- -## [obj_get_first_with_behavior_id_and_field_s32](#obj_get_first_with_behavior_id_and_field_s32) - -### Description -Gets the first object loaded with `behaviorId` and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) - -### Lua Example -`local ObjectValue = obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | -| fieldIndex | `integer` | -| value | `integer` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_first_with_behavior_id_and_field_s32(enum BehaviorId behaviorId, s32 fieldIndex, s32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_get_first_with_behavior_id_and_field_f32](#obj_get_first_with_behavior_id_and_field_f32) - -### Description -Gets the first object loaded with `behaviorId` and object float field (look in `object_fields.h` to get the index of a field) - -### Lua Example -`local ObjectValue = obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | -| fieldIndex | `integer` | -| value | `number` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_first_with_behavior_id_and_field_f32(enum BehaviorId behaviorId, s32 fieldIndex, f32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_get_next](#obj_get_next) - -### Description -Gets the next object in an object list - -### Lua Example -`local ObjectValue = obj_get_next(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_next(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_get_next_with_same_behavior_id](#obj_get_next_with_same_behavior_id) - -### Description -Gets the next object loaded with the same behavior ID - -### Lua Example -`local ObjectValue = obj_get_next_with_same_behavior_id(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_next_with_same_behavior_id(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_get_next_with_same_behavior_id_and_field_s32](#obj_get_next_with_same_behavior_id_and_field_s32) - -### Description -Gets the next object loaded with the same behavior ID and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) - -### Lua Example -`local ObjectValue = obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| value | `integer` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_next_with_same_behavior_id_and_field_s32(struct Object *o, s32 fieldIndex, s32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_get_next_with_same_behavior_id_and_field_f32](#obj_get_next_with_same_behavior_id_and_field_f32) - -### Description -Gets the next object loaded with the same behavior ID and object float field (look in `object_fields.h` to get the index of a field) - -### Lua Example -`local ObjectValue = obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| value | `number` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_next_with_same_behavior_id_and_field_f32(struct Object *o, s32 fieldIndex, f32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_get_nearest_object_with_behavior_id](#obj_get_nearest_object_with_behavior_id) - -### Description -Gets the nearest object with `behaviorId` to `o` - -### Lua Example -`local ObjectValue = obj_get_nearest_object_with_behavior_id(o, behaviorId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_nearest_object_with_behavior_id(struct Object *o, enum BehaviorId behaviorId);` - -[:arrow_up_small:](#) - -
- -## [obj_count_objects_with_behavior_id](#obj_count_objects_with_behavior_id) - -### Description -Counts every object with `behaviorId` - -### Lua Example -`local integerValue = obj_count_objects_with_behavior_id(behaviorId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_count_objects_with_behavior_id(enum BehaviorId behaviorId);` - -[:arrow_up_small:](#) - -
- -## [obj_get_collided_object](#obj_get_collided_object) - -### Description -Gets the corresponding collided object to an index from `o` - -### Lua Example -`local ObjectValue = obj_get_collided_object(o, index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| index | `integer` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_collided_object(struct Object *o, s16 index);` - -[:arrow_up_small:](#) - -
- -## [obj_get_field_u32](#obj_get_field_u32) - -### Description -Gets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` - -### Lua Example -`local integerValue = obj_get_field_u32(o, fieldIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`u32 obj_get_field_u32(struct Object *o, s32 fieldIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_get_field_s32](#obj_get_field_s32) - -### Description -Gets the signed 32-bit integer value from the field corresponding to `fieldIndex` - -### Lua Example -`local integerValue = obj_get_field_s32(o, fieldIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_get_field_s32(struct Object *o, s32 fieldIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_get_field_f32](#obj_get_field_f32) - -### Description -Sets the float value from the field corresponding to `fieldIndex` - -### Lua Example -`local numberValue = obj_get_field_f32(o, fieldIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | - -### Returns -- `number` - -### C Prototype -`f32 obj_get_field_f32(struct Object *o, s32 fieldIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_get_field_s16](#obj_get_field_s16) - -### Description -Gets the signed 32-bit integer value from the sub field corresponding to `fieldSubIndex` from the field corresponding to `fieldIndex` - -### Lua Example -`local integerValue = obj_get_field_s16(o, fieldIndex, fieldSubIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| fieldSubIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 obj_get_field_s16(struct Object *o, s32 fieldIndex, s32 fieldSubIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_set_field_u32](#obj_set_field_u32) - -### Description -Sets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` - -### Lua Example -`obj_set_field_u32(o, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_field_u32(struct Object *o, s32 fieldIndex, u32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_set_field_s32](#obj_set_field_s32) - -### Description -Sets the signed 32-bit integer value from the field corresponding to `fieldIndex` - -### Lua Example -`obj_set_field_s32(o, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_field_s32(struct Object *o, s32 fieldIndex, s32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_set_field_f32](#obj_set_field_f32) - -### Description -Sets the float value from the field corresponding to `fieldIndex` - -### Lua Example -`obj_set_field_f32(o, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| value | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_field_f32(struct Object *o, s32 fieldIndex, f32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_set_field_s16](#obj_set_field_s16) - -### Description -Sets the signed 32-bit integer value from the sub field corresponding to `fieldSubIndex` from the field corresponding to `fieldIndex` - -### Lua Example -`obj_set_field_s16(o, fieldIndex, fieldSubIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| fieldSubIndex | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_field_s16(struct Object *o, s32 fieldIndex, s32 fieldSubIndex, s16 value);` - -[:arrow_up_small:](#) - -
- -## [obj_get_temp_spawn_particles_info](#obj_get_temp_spawn_particles_info) - -### Description -Returns a temporary particle spawn info pointer with its model loaded in from `modelId` - -### Lua Example -`local SpawnParticlesInfoValue = obj_get_temp_spawn_particles_info(modelId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | - -### Returns -[SpawnParticlesInfo](structs.md#SpawnParticlesInfo) - -### C Prototype -`struct SpawnParticlesInfo* obj_get_temp_spawn_particles_info(enum ModelExtendedId modelId);` - -[:arrow_up_small:](#) - -
- -## [get_temp_object_hitbox](#get_temp_object_hitbox) - -### Description -Returns a temporary object hitbox pointer - -### Lua Example -`local ObjectHitboxValue = get_temp_object_hitbox()` - -### Parameters -- None - -### Returns -[ObjectHitbox](structs.md#ObjectHitbox) - -### C Prototype -`struct ObjectHitbox* get_temp_object_hitbox(void);` - -[:arrow_up_small:](#) - -
- -## [obj_is_attackable](#obj_is_attackable) - -### Description -Checks if `o` is attackable - -### Lua Example -`local booleanValue = obj_is_attackable(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_is_attackable(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_is_breakable_object](#obj_is_breakable_object) - -### Description -Checks if `o` is breakable - -### Lua Example -`local booleanValue = obj_is_breakable_object(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_is_breakable_object(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_is_bully](#obj_is_bully) - -### Description -Checks if `o` is a Bully - -### Lua Example -`local booleanValue = obj_is_bully(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_is_bully(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_is_coin](#obj_is_coin) - -### Description -Checks if `o` is a coin - -### Lua Example -`local booleanValue = obj_is_coin(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_is_coin(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_is_exclamation_box](#obj_is_exclamation_box) - -### Description -Checks if `o` is an exclamation box - -### Lua Example -`local booleanValue = obj_is_exclamation_box(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_is_exclamation_box(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_is_grabbable](#obj_is_grabbable) - -### Description -Checks if `o` is grabbable - -### Lua Example -`local booleanValue = obj_is_grabbable(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_is_grabbable(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_is_mushroom_1up](#obj_is_mushroom_1up) - -### Description -Checks if `o` is a 1-Up Mushroom - -### Lua Example -`local booleanValue = obj_is_mushroom_1up(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_is_mushroom_1up(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_is_secret](#obj_is_secret) - -### Description -Checks if `o` is a secret - -### Lua Example -`local booleanValue = obj_is_secret(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_is_secret(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_is_valid_for_interaction](#obj_is_valid_for_interaction) - -### Description -Checks if `o` is activated, tangible, and interactible - -### Lua Example -`local booleanValue = obj_is_valid_for_interaction(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_is_valid_for_interaction(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_check_hitbox_overlap](#obj_check_hitbox_overlap) - -### Description -Checks if `o1`'s hitbox is colliding with `o2`'s hitbox - -### Lua Example -`local booleanValue = obj_check_hitbox_overlap(o1, o2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o1 | [Object](structs.md#Object) | -| o2 | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_check_hitbox_overlap(struct Object *o1, struct Object *o2);` - -[:arrow_up_small:](#) - -
- -## [obj_check_overlap_with_hitbox_params](#obj_check_overlap_with_hitbox_params) - -### Description -Checks if `o`'s hitbox is colliding with the parameters of a hitbox - -### Lua Example -`local booleanValue = obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| x | `number` | -| y | `number` | -| z | `number` | -| h | `number` | -| r | `number` | -| d | `number` | - -### Returns -- `boolean` - -### C Prototype -`bool obj_check_overlap_with_hitbox_params(struct Object *o, f32 x, f32 y, f32 z, f32 h, f32 r, f32 d);` - -[:arrow_up_small:](#) - -
- -## [obj_set_vel](#obj_set_vel) - -### Description -Sets an object's velocity to `vx`, `vy`, and `vz` - -### Lua Example -`obj_set_vel(o, vx, vy, vz)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| vx | `number` | -| vy | `number` | -| vz | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_vel(struct Object *o, f32 vx, f32 vy, f32 vz);` - -[:arrow_up_small:](#) - -
- -## [obj_move_xyz](#obj_move_xyz) - -### Description -Moves the object in the direction of `dx`, `dy`, and `dz` - -### Lua Example -`obj_move_xyz(o, dx, dy, dz)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| dx | `number` | -| dy | `number` | -| dz | `number` | - -### Returns -- None - -### C Prototype -`void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz);` - -[:arrow_up_small:](#) - -
- -## [set_whirlpools](#set_whirlpools) - -### Description -Sets the parameters of one of the two whirlpools (0-indexed) in an area - -### Lua Example -`set_whirlpools(x, y, z, strength, area, index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | -| y | `number` | -| z | `number` | -| strength | `integer` | -| area | `integer` | -| index | `integer` | - -### Returns -- None - -### C Prototype -`void set_whirlpools(f32 x, f32 y, f32 z, s16 strength, s16 area, s32 index);` - -[:arrow_up_small:](#) - -
- ---- -# functions from smlua_text_utils.h - -
- - -## [smlua_text_utils_reset_all](#smlua_text_utils_reset_all) - -### Description -Resets every modified dialog back to vanilla - -### Lua Example -`smlua_text_utils_reset_all()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void smlua_text_utils_reset_all(void);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_dialog_get](#smlua_text_utils_dialog_get) - -### Description -Gets the DialogEntry struct for the given `dialogId` - -### Lua Example -`local DialogEntryValue = smlua_text_utils_dialog_get(dialogId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dialogId | [enum DialogId](constants.md#enum-DialogId) | - -### Returns -[DialogEntry](structs.md#DialogEntry) - -### C Prototype -`struct DialogEntry* smlua_text_utils_dialog_get(enum DialogId dialogId);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_dialog_replace](#smlua_text_utils_dialog_replace) - -### Description -Replaces `dialogId` with a custom one - -### Lua Example -`smlua_text_utils_dialog_replace(dialogId, unused, linesPerBox, leftOffset, width, str)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dialogId | [enum DialogId](constants.md#enum-DialogId) | -| unused | `integer` | -| linesPerBox | `integer` | -| leftOffset | `integer` | -| width | `integer` | -| str | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_dialog_replace(enum DialogId dialogId, u32 unused, s8 linesPerBox, s16 leftOffset, s16 width, const char* str);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_dialog_restore](#smlua_text_utils_dialog_restore) - -### Description -Restores a replaced DialogEntry to its original state. - -### Lua Example -`smlua_text_utils_dialog_restore(dialogId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dialogId | [enum DialogId](constants.md#enum-DialogId) | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_dialog_restore(enum DialogId dialogId);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_dialog_is_replaced](#smlua_text_utils_dialog_is_replaced) - -### Description -Returns whether the dialog with the given ID has been replaced - -### Lua Example -`local booleanValue = smlua_text_utils_dialog_is_replaced(dialogId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dialogId | [enum DialogId](constants.md#enum-DialogId) | - -### Returns -- `boolean` - -### C Prototype -`bool smlua_text_utils_dialog_is_replaced(enum DialogId dialogId);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_allocate_dialog](#smlua_text_utils_allocate_dialog) - -### Description -Allocates a new dialog entry - -### Lua Example -`local integerValue = smlua_text_utils_allocate_dialog()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 smlua_text_utils_allocate_dialog(void);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_course_acts_replace](#smlua_text_utils_course_acts_replace) - -### Description -Replaces the act names of `courseNum` - -### Lua Example -`smlua_text_utils_course_acts_replace(courseNum, courseName, act1, act2, act3, act4, act5, act6)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| courseName | `string` | -| act1 | `string` | -| act2 | `string` | -| act3 | `string` | -| act4 | `string` | -| act5 | `string` | -| act6 | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_course_acts_replace(s16 courseNum, const char* courseName, const char* act1, const char* act2, const char* act3, const char* act4, const char* act5, const char* act6);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_secret_star_replace](#smlua_text_utils_secret_star_replace) - -### Description -Replaces the secret star course name of `courseNum` with `courseName` - -### Lua Example -`smlua_text_utils_secret_star_replace(courseNum, courseName)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| courseName | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_secret_star_replace(s16 courseNum, const char* courseName);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_course_name_replace](#smlua_text_utils_course_name_replace) - -### Description -Replaces the name of `courseNum` with `name` - -### Lua Example -`smlua_text_utils_course_name_replace(courseNum, name)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| name | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_course_name_replace(s16 courseNum, const char* name);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_course_name_get](#smlua_text_utils_course_name_get) - -### Description -Gets the name of `courseNum` - -### Lua Example -`local stringValue = smlua_text_utils_course_name_get(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -- `string` - -### C Prototype -`const char* smlua_text_utils_course_name_get(s16 courseNum);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_course_name_mod_index](#smlua_text_utils_course_name_mod_index) - -### Description -Gets the index of the mod that replaced the name of `courseNum` - -### Lua Example -`local integerValue = smlua_text_utils_course_name_mod_index(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 smlua_text_utils_course_name_mod_index(s16 courseNum);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_course_name_reset](#smlua_text_utils_course_name_reset) - -### Description -Resets the name of `courseNum` - -### Lua Example -`smlua_text_utils_course_name_reset(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_course_name_reset(s16 courseNum);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_act_name_replace](#smlua_text_utils_act_name_replace) - -### Description -Replaces the act name of `actNum` in `courseNum` with `name` - -### Lua Example -`smlua_text_utils_act_name_replace(courseNum, actNum, name)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| actNum | `integer` | -| name | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_act_name_replace(s16 courseNum, u8 actNum, const char* name);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_act_name_get](#smlua_text_utils_act_name_get) - -### Description -Gets the act name of `actNum` in `courseNum` - -### Lua Example -`local stringValue = smlua_text_utils_act_name_get(courseNum, actNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| actNum | `integer` | - -### Returns -- `string` - -### C Prototype -`const char* smlua_text_utils_act_name_get(s16 courseNum, u8 actNum);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_act_name_mod_index](#smlua_text_utils_act_name_mod_index) - -### Description -Gets the index of the mod that replaced the act name of `actNum` in `courseNum` - -### Lua Example -`local integerValue = smlua_text_utils_act_name_mod_index(courseNum, actNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| actNum | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 smlua_text_utils_act_name_mod_index(s16 courseNum, u8 actNum);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_act_name_reset](#smlua_text_utils_act_name_reset) - -### Description -Resets the act name of `actNum` in `courseNum` - -### Lua Example -`smlua_text_utils_act_name_reset(courseNum, actNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| actNum | `integer` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_act_name_reset(s16 courseNum, u8 actNum);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_castle_secret_stars_replace](#smlua_text_utils_castle_secret_stars_replace) - -### Description -Replaces the castle secret stars text with `name` - -### Lua Example -`smlua_text_utils_castle_secret_stars_replace(name)` - -### Parameters -| Field | Type | -| ----- | ---- | -| name | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_castle_secret_stars_replace(const char* name);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_castle_secret_stars_get](#smlua_text_utils_castle_secret_stars_get) - -### Description -Gets the castle secret stars text - -### Lua Example -`local stringValue = smlua_text_utils_castle_secret_stars_get()` - -### Parameters -- None - -### Returns -- `string` - -### C Prototype -`const char* smlua_text_utils_castle_secret_stars_get();` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_castle_secret_stars_mod_index](#smlua_text_utils_castle_secret_stars_mod_index) - -### Description -Gets the index of the mod that replaced the castle secret stars text - -### Lua Example -`local integerValue = smlua_text_utils_castle_secret_stars_mod_index()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 smlua_text_utils_castle_secret_stars_mod_index();` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_castle_secret_stars_reset](#smlua_text_utils_castle_secret_stars_reset) - -### Description -Resets the castle secret stars text - -### Lua Example -`smlua_text_utils_castle_secret_stars_reset()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void smlua_text_utils_castle_secret_stars_reset();` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_extra_text_replace](#smlua_text_utils_extra_text_replace) - -### Description -Replace extra text (e.g. one of the castle's secret stars) with `text` - -### Lua Example -`smlua_text_utils_extra_text_replace(index, text)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | -| text | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_extra_text_replace(s16 index, const char* text);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_extra_text_get](#smlua_text_utils_extra_text_get) - -### Description -Gets the extra text at `index` - -### Lua Example -`local stringValue = smlua_text_utils_extra_text_get(index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | - -### Returns -- `string` - -### C Prototype -`const char* smlua_text_utils_extra_text_get(s16 index);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_extra_text_mod_index](#smlua_text_utils_extra_text_mod_index) - -### Description -Gets the index of the mod that replaced the extra text at `index` - -### Lua Example -`local integerValue = smlua_text_utils_extra_text_mod_index(index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 smlua_text_utils_extra_text_mod_index(s16 index);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_extra_text_reset](#smlua_text_utils_extra_text_reset) - -### Description -Resets the extra text at `index` - -### Lua Example -`smlua_text_utils_extra_text_reset(index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_extra_text_reset(s16 index);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_get_language](#smlua_text_utils_get_language) - -### Description -Gets the current language - -### Lua Example -`local stringValue = smlua_text_utils_get_language()` - -### Parameters -- None - -### Returns -- `string` - -### C Prototype -`const char* smlua_text_utils_get_language(void);` - -[:arrow_up_small:](#) - -
- ---- -# functions from sound_init.h - -
- - -## [reset_volume](#reset_volume) - -### Description -Resets if music volume has been lowered - -### Lua Example -`reset_volume()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void reset_volume(void);` - -[:arrow_up_small:](#) - -
- -## [raise_background_noise](#raise_background_noise) - -### Description -Raises music volume back up to normal levels - -### Lua Example -`raise_background_noise(a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a | `integer` | - -### Returns -- None - -### C Prototype -`void raise_background_noise(s32 a);` - -[:arrow_up_small:](#) - -
- -## [lower_background_noise](#lower_background_noise) - -### Description -Lowers the volume of music by 40% - -### Lua Example -`lower_background_noise(a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a | `integer` | - -### Returns -- None - -### C Prototype -`void lower_background_noise(s32 a);` - -[:arrow_up_small:](#) - -
- -## [disable_background_sound](#disable_background_sound) - -### Description -Disables background soundbanks - -### Lua Example -`disable_background_sound()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void disable_background_sound(void);` - -[:arrow_up_small:](#) - -
- -## [enable_background_sound](#enable_background_sound) - -### Description -Enables background soundbanks - -### Lua Example -`enable_background_sound()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void enable_background_sound(void);` - -[:arrow_up_small:](#) - -
- -## [play_menu_sounds](#play_menu_sounds) - -### Description -Play menu sounds from `SOUND_MENU_FLAG_*` constants and queues rumble if `SOUND_MENU_FLAG_LETGOMARIOFACE` is one of the flags - -### Lua Example -`play_menu_sounds(soundMenuFlags)` - -### Parameters -| Field | Type | -| ----- | ---- | -| soundMenuFlags | `integer` | - -### Returns -- None - -### C Prototype -`void play_menu_sounds(s16 soundMenuFlags);` - -[:arrow_up_small:](#) - -
- -## [play_painting_eject_sound](#play_painting_eject_sound) - -### Description -Plays the painting eject sound effect if it has not already been played - -### Lua Example -`play_painting_eject_sound()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_painting_eject_sound(void);` - -[:arrow_up_small:](#) - -
- -## [play_infinite_stairs_music](#play_infinite_stairs_music) - -### Description -Plays the infinite stairs music if you're in the endless stairs room and have less than `gLevelValues.infiniteStairsRequirement` stars - -### Lua Example -`play_infinite_stairs_music()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_infinite_stairs_music(void);` - -[:arrow_up_small:](#) - -
- -## [set_background_music](#set_background_music) - -### Description -Sets the background music to `seqArgs` on sequence player `a` with a fade in time of `fadeTimer` - -### Lua Example -`set_background_music(a, seqArgs, fadeTimer)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a | `integer` | -| seqArgs | `integer` | -| fadeTimer | `integer` | - -### Returns -- None - -### C Prototype -`void set_background_music(u16 a, u16 seqArgs, s16 fadeTimer);` - -[:arrow_up_small:](#) - -
- -## [fadeout_music](#fadeout_music) - -### Description -Fades out level, shell, and cap music - -### Lua Example -`fadeout_music(fadeOutTime)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fadeOutTime | `integer` | - -### Returns -- None - -### C Prototype -`void fadeout_music(s16 fadeOutTime);` - -[:arrow_up_small:](#) - -
- -## [fadeout_level_music](#fadeout_level_music) - -### Description -Fades out the level sequence player - -### Lua Example -`fadeout_level_music(fadeTimer)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fadeTimer | `integer` | - -### Returns -- None - -### C Prototype -`void fadeout_level_music(s16 fadeTimer);` - -[:arrow_up_small:](#) - -
- -## [play_cutscene_music](#play_cutscene_music) - -### Description -Plays and sets the current music to `seqArgs` - -### Lua Example -`play_cutscene_music(seqArgs)` - -### Parameters -| Field | Type | -| ----- | ---- | -| seqArgs | `integer` | - -### Returns -- None - -### C Prototype -`void play_cutscene_music(u16 seqArgs);` - -[:arrow_up_small:](#) - -
- -## [play_shell_music](#play_shell_music) - -### Description -Plays shell music - -### Lua Example -`play_shell_music()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_shell_music(void);` - -[:arrow_up_small:](#) - -
- -## [stop_shell_music](#stop_shell_music) - -### Description -Stops shell music completely - -### Lua Example -`stop_shell_music()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void stop_shell_music(void);` - -[:arrow_up_small:](#) - -
- -## [play_cap_music](#play_cap_music) - -### Description -Plays `seqArgs` as cap music - -### Lua Example -`play_cap_music(seqArgs)` - -### Parameters -| Field | Type | -| ----- | ---- | -| seqArgs | `integer` | - -### Returns -- None - -### C Prototype -`void play_cap_music(u16 seqArgs);` - -[:arrow_up_small:](#) - -
- -## [fadeout_cap_music](#fadeout_cap_music) - -### Description -Fades out cap music - -### Lua Example -`fadeout_cap_music()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void fadeout_cap_music(void);` - -[:arrow_up_small:](#) - -
- -## [stop_cap_music](#stop_cap_music) - -### Description -Stops cap music completely - -### Lua Example -`stop_cap_music()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void stop_cap_music(void);` - -[:arrow_up_small:](#) - -
- ---- -# functions from spawn_sound.h - -
- - -## [cur_obj_play_sound_1](#cur_obj_play_sound_1) - -### Description -Plays a sound if the current object is visible - -### Lua Example -`cur_obj_play_sound_1(soundMagic)` - -### Parameters -| Field | Type | -| ----- | ---- | -| soundMagic | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_play_sound_1(s32 soundMagic);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_play_sound_2](#cur_obj_play_sound_2) - -### Description -Plays a sound if the current object is visible and queues rumble for specific sounds - -### Lua Example -`cur_obj_play_sound_2(soundMagic)` - -### Parameters -| Field | Type | -| ----- | ---- | -| soundMagic | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_play_sound_2(s32 soundMagic);` - -[:arrow_up_small:](#) - -
- -## [create_sound_spawner](#create_sound_spawner) - -### Description -Create a sound spawner for objects that need a sound play once. (Breakable walls, King Bobomb exploding, etc) - -### Lua Example -`create_sound_spawner(soundMagic)` - -### Parameters -| Field | Type | -| ----- | ---- | -| soundMagic | `integer` | - -### Returns -- None - -### C Prototype -`void create_sound_spawner(s32 soundMagic);` - -[:arrow_up_small:](#) - -
- -## [calc_dist_to_volume_range_1](#calc_dist_to_volume_range_1) - -### Description -Unused vanilla function, calculates a volume based on `distance`. If `distance` is less than 500 then 127, if `distance` is greater than 1500 then 0, if `distance` is between 500 and 1500 then it ranges linearly from 60 to 124. What an even more strange and confusing function - -### Lua Example -`local integerValue = calc_dist_to_volume_range_1(distance)` - -### Parameters -| Field | Type | -| ----- | ---- | -| distance | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 calc_dist_to_volume_range_1(f32 distance);` - -[:arrow_up_small:](#) - -
- -## [calc_dist_to_volume_range_2](#calc_dist_to_volume_range_2) - -### Description -Unused vanilla function, calculates a volume based on `distance`. If `distance` is less than 1300 then 127, if `distance` is greater than 2300 then 0, if `distance` is between 1300 and 2300 then it ranges linearly from 60 to 127. What a strange and confusing function - -### Lua Example -`local integerValue = calc_dist_to_volume_range_2(distance)` - -### Parameters -| Field | Type | -| ----- | ---- | -| distance | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 calc_dist_to_volume_range_2(f32 distance);` - -[:arrow_up_small:](#) - -
- ---- -# functions from surface_collision.h - -
- - -## [find_wall_collisions](#find_wall_collisions) - -### Description -Detects wall collisions at a given position and adjusts the position based on the walls found. Returns the number of wall collisions detected - -### 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_ceil_height](#find_ceil_height) - -### Description -Finds the height of the highest ceiling above a given position (x, y, z). If no ceiling is found, returns the default height limit of `gLevelValues.cellHeightLimit`(20000 by default) - -### Lua Example -`local numberValue = find_ceil_height(x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | -| y | `number` | -| z | `number` | - -### Returns -- `number` - -### C Prototype -`f32 find_ceil_height(f32 x, f32 y, f32 z);` - -[:arrow_up_small:](#) - -
- -## [find_floor_height](#find_floor_height) - -### Description -Finds the height of the highest floor below a given position (x, y, z). If no floor is found, returns the default floor height of `gLevelValues.floorLowerLimit`(-11000 by default) - -### 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_water_level](#find_water_level) - -### Description -Finds the height of water at a given position (x, z), if the position is within a water region. If no water is found, returns the default height of `gLevelValues.floorLowerLimit`(-11000 by default) - -### 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:](#) - -
- -## [find_poison_gas_level](#find_poison_gas_level) - -### Description -Finds the height of the poison gas at a given position (x, z), if the position is within a gas region. If no gas is found, returns the default height of `gLevelValues.floorLowerLimit`(-11000 by default) - -### 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:](#) - -
- -## [set_find_wall_direction](#set_find_wall_direction) - -### Description -Sets whether collision finding functions should check wall directions. - -### Lua Example -`set_find_wall_direction(dir, active, airborne)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dir | [Vec3f](structs.md#Vec3f) | -| active | `boolean` | -| airborne | `boolean` | - -### Returns -- None - -### C Prototype -`void set_find_wall_direction(Vec3f dir, bool active, bool airborne);` - -[:arrow_up_small:](#) - -
- -## [closest_point_to_triangle](#closest_point_to_triangle) - -### Description -Gets the closest point of the triangle to `src` and returns it in `out`. - -### Lua Example -`closest_point_to_triangle(surf, src, out)` - -### Parameters -| Field | Type | -| ----- | ---- | -| surf | [Surface](structs.md#Surface) | -| src | [Vec3f](structs.md#Vec3f) | -| out | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void closest_point_to_triangle(struct Surface* surf, Vec3f src, OUT Vec3f out);` - -[:arrow_up_small:](#) -
--- diff --git a/docs/lua/functions-7.md b/docs/lua/functions-7.md index c1c05249a..3a762659f 100644 --- a/docs/lua/functions-7.md +++ b/docs/lua/functions-7.md @@ -5,6 +5,4775 @@ [< prev](functions-6.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | [5](functions-5.md) | [6](functions-6.md) | 7] +--- +# functions from smlua_level_utils.h + +
+ + +## [smlua_level_util_change_area](#smlua_level_util_change_area) + +### Description +Instantly changes the current area to `areaIndex` + +### Lua Example +`smlua_level_util_change_area(areaIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| areaIndex | `integer` | + +### Returns +- None + +### C Prototype +`void smlua_level_util_change_area(s32 areaIndex);` + +[:arrow_up_small:](#) + +
+ +## [smlua_level_util_get_info](#smlua_level_util_get_info) + +### Description +Gets information on a custom level from `levelNum` + +### Lua Example +`local CustomLevelInfoValue = smlua_level_util_get_info(levelNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| levelNum | `integer` | + +### Returns +[CustomLevelInfo](structs.md#CustomLevelInfo) + +### C Prototype +`struct CustomLevelInfo* smlua_level_util_get_info(s16 levelNum);` + +[:arrow_up_small:](#) + +
+ +## [smlua_level_util_get_info_from_short_name](#smlua_level_util_get_info_from_short_name) + +### Description +Gets information on a custom level from `shortName` + +### Lua Example +`local CustomLevelInfoValue = smlua_level_util_get_info_from_short_name(shortName)` + +### Parameters +| Field | Type | +| ----- | ---- | +| shortName | `string` | + +### Returns +[CustomLevelInfo](structs.md#CustomLevelInfo) + +### C Prototype +`struct CustomLevelInfo* smlua_level_util_get_info_from_short_name(const char* shortName);` + +[:arrow_up_small:](#) + +
+ +## [smlua_level_util_get_info_from_course_num](#smlua_level_util_get_info_from_course_num) + +### Description +Gets information on a custom level from `courseNum` + +### Lua Example +`local CustomLevelInfoValue = smlua_level_util_get_info_from_course_num(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +[CustomLevelInfo](structs.md#CustomLevelInfo) + +### C Prototype +`struct CustomLevelInfo* smlua_level_util_get_info_from_course_num(u8 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [level_register](#level_register) + +### Description +Registers a fully custom level. Level ID begins at 50 + +### Lua Example +`local integerValue = level_register(scriptEntryName, courseNum, fullName, shortName, acousticReach, echoLevel1, echoLevel2, echoLevel3)` + +### Parameters +| Field | Type | +| ----- | ---- | +| scriptEntryName | `string` | +| courseNum | `integer` | +| fullName | `string` | +| shortName | `string` | +| acousticReach | `integer` | +| echoLevel1 | `integer` | +| echoLevel2 | `integer` | +| echoLevel3 | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 level_register(const char* scriptEntryName, s16 courseNum, const char* fullName, const char* shortName, u32 acousticReach, u32 echoLevel1, u32 echoLevel2, u32 echoLevel3);` + +[:arrow_up_small:](#) + +
+ +## [level_is_vanilla_level](#level_is_vanilla_level) + +### Description +Checks if `levelNum` is a vanilla level + +### Lua Example +`local booleanValue = level_is_vanilla_level(levelNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| levelNum | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool level_is_vanilla_level(s16 levelNum);` + +[:arrow_up_small:](#) + +
+ +## [warp_to_warpnode](#warp_to_warpnode) + +### Description +Warps to `aWarpId` of `aArea` in `aLevel` during `aAct` + +### Lua Example +`local booleanValue = warp_to_warpnode(aLevel, aArea, aAct, aWarpId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| aLevel | `integer` | +| aArea | `integer` | +| aAct | `integer` | +| aWarpId | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool warp_to_warpnode(s32 aLevel, s32 aArea, s32 aAct, s32 aWarpId);` + +[:arrow_up_small:](#) + +
+ +## [warp_to_level](#warp_to_level) + +### Description +Warps to `aArea` of `aLevel` in `aAct` + +### Lua Example +`local booleanValue = warp_to_level(aLevel, aArea, aAct)` + +### Parameters +| Field | Type | +| ----- | ---- | +| aLevel | `integer` | +| aArea | `integer` | +| aAct | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool warp_to_level(s32 aLevel, s32 aArea, s32 aAct);` + +[:arrow_up_small:](#) + +
+ +## [warp_restart_level](#warp_restart_level) + +### Description +Restarts the current level + +### Lua Example +`local booleanValue = warp_restart_level()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool warp_restart_level(void);` + +[:arrow_up_small:](#) + +
+ +## [warp_to_start_level](#warp_to_start_level) + +### Description +Warps to the start level (Castle Grounds by default) + +### Lua Example +`local booleanValue = warp_to_start_level()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool warp_to_start_level(void);` + +[:arrow_up_small:](#) + +
+ +## [warp_exit_level](#warp_exit_level) + +### Description +Exits the current level after `aDelay` + +### Lua Example +`local booleanValue = warp_exit_level(aDelay)` + +### Parameters +| Field | Type | +| ----- | ---- | +| aDelay | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool warp_exit_level(s32 aDelay);` + +[:arrow_up_small:](#) + +
+ +## [warp_to_castle](#warp_to_castle) + +### Description +Warps back to the castle from `aLevel` + +### Lua Example +`local booleanValue = warp_to_castle(aLevel)` + +### Parameters +| Field | Type | +| ----- | ---- | +| aLevel | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool warp_to_castle(s32 aLevel);` + +[:arrow_up_small:](#) + +
+ +--- +# functions from smlua_misc_utils.h + +
+ + +## [get_network_area_timer](#get_network_area_timer) + +### Description +Gets the current area's networked timer + +### Lua Example +`local integerValue = get_network_area_timer()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 get_network_area_timer(void);` + +[:arrow_up_small:](#) + +
+ +## [get_area_update_counter](#get_area_update_counter) + +### Description +Gets the area update counter incremented when objects are updated + +### Lua Example +`local integerValue = get_area_update_counter()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u16 get_area_update_counter(void);` + +[:arrow_up_small:](#) + +
+ +## [get_temp_s32_pointer](#get_temp_s32_pointer) + +### Description +Returns a temporary signed 32-bit integer pointer with its value set to `initialValue` + +### Lua Example +`local PointerValue = get_temp_s32_pointer(initialValue)` + +### Parameters +| Field | Type | +| ----- | ---- | +| initialValue | `integer` | + +### Returns +- `Pointer` <`integer`> + +### C Prototype +`s32* get_temp_s32_pointer(s32 initialValue);` + +[:arrow_up_small:](#) + +
+ +## [deref_s32_pointer](#deref_s32_pointer) + +### Description +Gets the signed 32-bit integer value from `pointer` + +### Lua Example +`local integerValue = deref_s32_pointer(pointer)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pointer | `Pointer` <`integer`> | + +### Returns +- `integer` + +### C Prototype +`s32 deref_s32_pointer(s32* pointer);` + +[:arrow_up_small:](#) + +
+ +## [djui_popup_create_global](#djui_popup_create_global) + +### Description +Creates a DJUI popup that is broadcasted to every client + +### Lua Example +`djui_popup_create_global(message, lines)` + +### Parameters +| Field | Type | +| ----- | ---- | +| message | `string` | +| lines | `integer` | + +### Returns +- None + +### C Prototype +`void djui_popup_create_global(const char* message, int lines);` + +[:arrow_up_small:](#) + +
+ +## [djui_is_popup_disabled](#djui_is_popup_disabled) + +### Description +Returns if popups are disabled + +### Lua Example +`local booleanValue = djui_is_popup_disabled()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool djui_is_popup_disabled(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_set_popup_disabled_override](#djui_set_popup_disabled_override) + +### Description +Sets if popups are disabled + +### Lua Example +`djui_set_popup_disabled_override(value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `boolean` | + +### Returns +- None + +### C Prototype +`void djui_set_popup_disabled_override(bool value);` + +[:arrow_up_small:](#) + +
+ +## [djui_reset_popup_disabled_override](#djui_reset_popup_disabled_override) + +### Description +Resets if popups are disabled + +### Lua Example +`djui_reset_popup_disabled_override()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void djui_reset_popup_disabled_override(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_is_playerlist_open](#djui_is_playerlist_open) + +### Description +Checks if the DJUI playerlist is open + +### Lua Example +`local booleanValue = djui_is_playerlist_open()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool djui_is_playerlist_open(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_attempting_to_open_playerlist](#djui_attempting_to_open_playerlist) + +### Description +Checks if the DJUI playerlist is attempting to be opened + +### Lua Example +`local booleanValue = djui_attempting_to_open_playerlist()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool djui_attempting_to_open_playerlist(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_get_playerlist_page_index](#djui_get_playerlist_page_index) + +### Description +Gets the DJUI playerlist's page index + +### Lua Example +`local integerValue = djui_get_playerlist_page_index()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 djui_get_playerlist_page_index(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_is_chatbox_open](#djui_is_chatbox_open) + +### Description +Checks if the DJUI chatbox is open + +### Lua Example +`local booleanValue = djui_is_chatbox_open()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool djui_is_chatbox_open(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_menu_get_font](#djui_menu_get_font) + +### Description +Gets the DJUI menu font + +### Lua Example +`local enumValue = djui_menu_get_font()` + +### Parameters +- None + +### Returns +[enum DjuiFontType](constants.md#enum-DjuiFontType) + +### C Prototype +`enum DjuiFontType djui_menu_get_font(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_menu_get_theme](#djui_menu_get_theme) + +### Description +Gets the DJUI menu theme + +### Lua Example +`local DjuiThemeValue = djui_menu_get_theme()` + +### Parameters +- None + +### Returns +[DjuiTheme](structs.md#DjuiTheme) + +### C Prototype +`struct DjuiTheme* djui_menu_get_theme(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_is_playerlist_ping_visible](#djui_is_playerlist_ping_visible) + +### Description +Checks if the DJUI playerlist ping icon is visible + +### Lua Example +`local booleanValue = djui_is_playerlist_ping_visible()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool djui_is_playerlist_ping_visible(void);` + +[:arrow_up_small:](#) + +
+ +## [get_dialog_box_state](#get_dialog_box_state) + +### Description +Gets the current state of the dialog box + +### Lua Example +`local integerValue = get_dialog_box_state()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s8 get_dialog_box_state(void);` + +[:arrow_up_small:](#) + +
+ +## [get_dialog_id](#get_dialog_id) + +### Description +Gets the current dialog box ID + +### Lua Example +`local integerValue = get_dialog_id()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 get_dialog_id(void);` + +[:arrow_up_small:](#) + +
+ +## [get_last_star_or_key](#get_last_star_or_key) + +### Description +Gets if the last objective collected was a star (0) or a key (1) + +### Lua Example +`local integerValue = get_last_star_or_key()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 get_last_star_or_key(void);` + +[:arrow_up_small:](#) + +
+ +## [set_last_star_or_key](#set_last_star_or_key) + +### Description +Sets if the last objective collected was a star (0) or a key (1) + +### Lua Example +`set_last_star_or_key(value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void set_last_star_or_key(u8 value);` + +[:arrow_up_small:](#) + +
+ +## [get_last_completed_course_num](#get_last_completed_course_num) + +### Description +Gets the last course a star or key was collected in + +### Lua Example +`local integerValue = get_last_completed_course_num()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 get_last_completed_course_num(void);` + +[:arrow_up_small:](#) + +
+ +## [set_last_completed_course_num](#set_last_completed_course_num) + +### Description +Sets the last course a star or key was collected in + +### Lua Example +`set_last_completed_course_num(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +- None + +### C Prototype +`void set_last_completed_course_num(u8 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [get_last_completed_star_num](#get_last_completed_star_num) + +### Description +Gets the last collected star's number (1-7) + +### Lua Example +`local integerValue = get_last_completed_star_num()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 get_last_completed_star_num(void);` + +[:arrow_up_small:](#) + +
+ +## [set_last_completed_star_num](#set_last_completed_star_num) + +### Description +Sets the last collected star's number (1-7) + +### Lua Example +`set_last_completed_star_num(starNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| starNum | `integer` | + +### Returns +- None + +### C Prototype +`void set_last_completed_star_num(u8 starNum);` + +[:arrow_up_small:](#) + +
+ +## [get_got_file_coin_hi_score](#get_got_file_coin_hi_score) + +### Description +Checks if the save file's coin "HI SCORE" was obtained with the last star or key collection + +### Lua Example +`local booleanValue = get_got_file_coin_hi_score()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool get_got_file_coin_hi_score(void);` + +[:arrow_up_small:](#) + +
+ +## [set_got_file_coin_hi_score](#set_got_file_coin_hi_score) + +### Description +Sets if the save file's coin "HI SCORE" was obtained with the last star or key collection + +### Lua Example +`set_got_file_coin_hi_score(value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `boolean` | + +### Returns +- None + +### C Prototype +`void set_got_file_coin_hi_score(bool value);` + +[:arrow_up_small:](#) + +
+ +## [get_save_file_modified](#get_save_file_modified) + +### Description +Checks if the save file has been modified without saving + +### Lua Example +`local booleanValue = get_save_file_modified()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool get_save_file_modified(void);` + +[:arrow_up_small:](#) + +
+ +## [set_save_file_modified](#set_save_file_modified) + +### Description +Sets if the save file has been modified without saving + +### Lua Example +`set_save_file_modified(value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `boolean` | + +### Returns +- None + +### C Prototype +`void set_save_file_modified(bool value);` + +[:arrow_up_small:](#) + +
+ +## [hud_hide](#hud_hide) + +### Description +Hides the HUD + +### Lua Example +`hud_hide()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void hud_hide(void);` + +[:arrow_up_small:](#) + +
+ +## [hud_show](#hud_show) + +### Description +Shows the HUD + +### Lua Example +`hud_show()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void hud_show(void);` + +[:arrow_up_small:](#) + +
+ +## [hud_is_hidden](#hud_is_hidden) + +### Description +Checks if the HUD is hidden + +### Lua Example +`local booleanValue = hud_is_hidden()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool hud_is_hidden(void);` + +[:arrow_up_small:](#) + +
+ +## [hud_get_value](#hud_get_value) + +### Description +Gets a HUD display value + +### Lua Example +`local integerValue = hud_get_value(type)` + +### Parameters +| Field | Type | +| ----- | ---- | +| type | [enum HudDisplayValue](constants.md#enum-HudDisplayValue) | + +### Returns +- `integer` + +### C Prototype +`s32 hud_get_value(enum HudDisplayValue type);` + +[:arrow_up_small:](#) + +
+ +## [hud_set_value](#hud_set_value) + +### Description +Sets a HUD display value + +### Lua Example +`hud_set_value(type, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| type | [enum HudDisplayValue](constants.md#enum-HudDisplayValue) | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void hud_set_value(enum HudDisplayValue type, s32 value);` + +[:arrow_up_small:](#) + +
+ +## [hud_render_power_meter](#hud_render_power_meter) + +### Description +Renders a power meter on the HUD + +### Lua Example +`hud_render_power_meter(health, x, y, width, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| health | `integer` | +| x | `number` | +| y | `number` | +| width | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void hud_render_power_meter(s32 health, f32 x, f32 y, f32 width, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [hud_render_power_meter_interpolated](#hud_render_power_meter_interpolated) + +### Description +Renders an interpolated power meter on the HUD + +### Lua Example +`hud_render_power_meter_interpolated(health, prevX, prevY, prevWidth, prevHeight, x, y, width, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| health | `integer` | +| prevX | `number` | +| prevY | `number` | +| prevWidth | `number` | +| prevHeight | `number` | +| x | `number` | +| y | `number` | +| width | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void hud_render_power_meter_interpolated(s32 health, f32 prevX, f32 prevY, f32 prevWidth, f32 prevHeight, f32 x, f32 y, f32 width, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [hud_get_flash](#hud_get_flash) + +### Description +Gets if the star counter on the HUD should flash + +### Lua Example +`local integerValue = hud_get_flash()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s8 hud_get_flash(void);` + +[:arrow_up_small:](#) + +
+ +## [hud_set_flash](#hud_set_flash) + +### Description +Sets if the star counter on the HUD should flash + +### Lua Example +`hud_set_flash(value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void hud_set_flash(s8 value);` + +[:arrow_up_small:](#) + +
+ +## [act_select_hud_hide](#act_select_hud_hide) + +### Description +Hides part of the Act Select HUD + +### Lua Example +`act_select_hud_hide(part)` + +### Parameters +| Field | Type | +| ----- | ---- | +| part | [enum ActSelectHudPart](constants.md#enum-ActSelectHudPart) | + +### Returns +- None + +### C Prototype +`void act_select_hud_hide(enum ActSelectHudPart part);` + +[:arrow_up_small:](#) + +
+ +## [act_select_hud_show](#act_select_hud_show) + +### Description +Shows part of the Act Select HUD + +### Lua Example +`act_select_hud_show(part)` + +### Parameters +| Field | Type | +| ----- | ---- | +| part | [enum ActSelectHudPart](constants.md#enum-ActSelectHudPart) | + +### Returns +- None + +### C Prototype +`void act_select_hud_show(enum ActSelectHudPart part);` + +[:arrow_up_small:](#) + +
+ +## [act_select_hud_is_hidden](#act_select_hud_is_hidden) + +### Description +Checks if part of the Act Select HUD is hidden + +### Lua Example +`local booleanValue = act_select_hud_is_hidden(part)` + +### Parameters +| Field | Type | +| ----- | ---- | +| part | [enum ActSelectHudPart](constants.md#enum-ActSelectHudPart) | + +### Returns +- `boolean` + +### C Prototype +`bool act_select_hud_is_hidden(enum ActSelectHudPart part);` + +[:arrow_up_small:](#) + +
+ +## [is_game_paused](#is_game_paused) + +### Description +Checks if the game is paused + +### Lua Example +`local booleanValue = is_game_paused()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool is_game_paused(void);` + +[:arrow_up_small:](#) + +
+ +## [is_pause_menu_hidden](#is_pause_menu_hidden) + +### Description +Gets if the pause menu elements are hidden, useful for creating custom pause menus + +### Lua Example +`local booleanValue = is_pause_menu_hidden()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool is_pause_menu_hidden(void);` + +[:arrow_up_small:](#) + +
+ +## [set_pause_menu_hidden](#set_pause_menu_hidden) + +### Description +Sets if the pause menu elements are hidden, useful for creating custom pause menus + +### Lua Example +`set_pause_menu_hidden(hidden)` + +### Parameters +| Field | Type | +| ----- | ---- | +| hidden | `boolean` | + +### Returns +- None + +### C Prototype +`void set_pause_menu_hidden(bool hidden);` + +[:arrow_up_small:](#) + +
+ +## [game_pause](#game_pause) + +### Description +Pauses the game + +### Lua Example +`game_pause()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void game_pause(void);` + +[:arrow_up_small:](#) + +
+ +## [game_unpause](#game_unpause) + +### Description +Unpauses the game + +### Lua Example +`game_unpause()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void game_unpause(void);` + +[:arrow_up_small:](#) + +
+ +## [is_transition_playing](#is_transition_playing) + +### Description +Checks if a screen transition is playing + +### Lua Example +`local booleanValue = is_transition_playing()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool is_transition_playing(void);` + +[:arrow_up_small:](#) + +
+ +## [allocate_mario_action](#allocate_mario_action) + +### Description +Allocates an action ID with bitwise flags + +### Lua Example +`local integerValue = allocate_mario_action(actFlags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| actFlags | `integer` | + +### Returns +- `integer` + +### C Prototype +`u32 allocate_mario_action(u32 actFlags);` + +[:arrow_up_small:](#) + +
+ +## [get_hand_foot_pos_x](#get_hand_foot_pos_x) + +### Description +Gets the X coordinate of Mario's hand (0-1) or foot (2-3) but it is important to note that the positions are not updated off-screen + +### Lua Example +`local numberValue = get_hand_foot_pos_x(m, index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| index | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 get_hand_foot_pos_x(struct MarioState* m, u8 index);` + +[:arrow_up_small:](#) + +
+ +## [get_hand_foot_pos_y](#get_hand_foot_pos_y) + +### Description +Gets the Y coordinate of Mario's hand (0-1) or foot (2-3) but It is important to note that the positions are not updated off-screen + +### Lua Example +`local numberValue = get_hand_foot_pos_y(m, index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| index | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 get_hand_foot_pos_y(struct MarioState* m, u8 index);` + +[:arrow_up_small:](#) + +
+ +## [get_hand_foot_pos_z](#get_hand_foot_pos_z) + +### Description +Gets the Z coordinate of Mario's hand (0-1) or foot (2-3) but it is important to note that the positions are not updated off-screen + +### Lua Example +`local numberValue = get_hand_foot_pos_z(m, index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| index | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 get_hand_foot_pos_z(struct MarioState* m, u8 index);` + +[:arrow_up_small:](#) + +
+ +## [get_mario_anim_part_pos](#get_mario_anim_part_pos) + +### Description +Retrieves the animated part position associated to `animPart` from the MarioState `m` and stores it into `pos`. Returns `true` on success or `false` on failure + +### Lua Example +`local booleanValue = get_mario_anim_part_pos(m, animPart, pos)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| animPart | `integer` | +| pos | [Vec3f](structs.md#Vec3f) | + +### Returns +- `boolean` + +### C Prototype +`bool get_mario_anim_part_pos(struct MarioState *m, u32 animPart, OUT Vec3f pos);` + +[:arrow_up_small:](#) + +
+ +## [get_current_save_file_num](#get_current_save_file_num) + +### Description +Gets the current save file number (1-indexed) + +### Lua Example +`local integerValue = get_current_save_file_num()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s16 get_current_save_file_num(void);` + +[:arrow_up_small:](#) + +
+ +## [save_file_get_using_backup_slot](#save_file_get_using_backup_slot) + +### Description +Checks if the save file is using its backup slot + +### Lua Example +`local booleanValue = save_file_get_using_backup_slot()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool save_file_get_using_backup_slot(void);` + +[:arrow_up_small:](#) + +
+ +## [save_file_set_using_backup_slot](#save_file_set_using_backup_slot) + +### Description +Sets if the save file should use its backup slot + +### Lua Example +`save_file_set_using_backup_slot(usingBackupSlot)` + +### Parameters +| Field | Type | +| ----- | ---- | +| usingBackupSlot | `boolean` | + +### Returns +- None + +### C Prototype +`void save_file_set_using_backup_slot(bool usingBackupSlot);` + +[:arrow_up_small:](#) + +
+ +## [movtexqc_register](#movtexqc_register) + +### Description +Registers a custom moving texture entry (used for vanilla water boxes) + +### Lua Example +`movtexqc_register(name, level, area, type)` + +### Parameters +| Field | Type | +| ----- | ---- | +| name | `string` | +| level | `integer` | +| area | `integer` | +| type | `integer` | + +### Returns +- None + +### C Prototype +`void movtexqc_register(const char* name, s16 level, s16 area, s16 type);` + +[:arrow_up_small:](#) + +
+ +## [get_water_level](#get_water_level) + +### Description +Gets the water level in an area corresponding to `index` (0-indexed) + +### Lua Example +`local integerValue = get_water_level(index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 get_water_level(u8 index);` + +[:arrow_up_small:](#) + +
+ +## [set_water_level](#set_water_level) + +### Description +Sets the water level in an area corresponding to `index` (0-indexed) + +### Lua Example +`set_water_level(index, height, sync)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | +| height | `integer` | +| sync | `boolean` | + +### Returns +- None + +### C Prototype +`void set_water_level(u8 index, s16 height, bool sync);` + +[:arrow_up_small:](#) + +
+ +## [course_is_main_course](#course_is_main_course) + +### Description +Checks if a course is a main course and not the castle or secret levels + +### Lua Example +`local booleanValue = course_is_main_course(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool course_is_main_course(u16 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [get_ttc_speed_setting](#get_ttc_speed_setting) + +### Description +Gets TTC's speed setting + +### Lua Example +`local integerValue = get_ttc_speed_setting()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s16 get_ttc_speed_setting(void);` + +[:arrow_up_small:](#) + +
+ +## [set_ttc_speed_setting](#set_ttc_speed_setting) + +### Description +Sets TTC's speed setting (TTC_SPEED_*) + +### Lua Example +`set_ttc_speed_setting(speed)` + +### Parameters +| Field | Type | +| ----- | ---- | +| speed | `integer` | + +### Returns +- None + +### C Prototype +`void set_ttc_speed_setting(s16 speed);` + +[:arrow_up_small:](#) + +
+ +## [get_time](#get_time) + +### Description +Gets the Unix Timestamp + +### Lua Example +`local integerValue = get_time()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s64 get_time(void);` + +[:arrow_up_small:](#) + +
+ +## [get_date_and_time](#get_date_and_time) + +### Description +Gets the system clock's date and time + +### Lua Example +`local DateTimeValue = get_date_and_time()` + +### Parameters +- None + +### Returns +[DateTime](structs.md#DateTime) + +### C Prototype +`struct DateTime* get_date_and_time(void);` + +[:arrow_up_small:](#) + +
+ +## [get_envfx](#get_envfx) + +### Description +Gets the non overridden environment effect (e.g. snow) + +### Lua Example +`local integerValue = get_envfx()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u16 get_envfx(void);` + +[:arrow_up_small:](#) + +
+ +## [set_override_envfx](#set_override_envfx) + +### Description +Sets the override environment effect (e.g. snow) + +### Lua Example +`set_override_envfx(envfx)` + +### Parameters +| Field | Type | +| ----- | ---- | +| envfx | `integer` | + +### Returns +- None + +### C Prototype +`void set_override_envfx(s32 envfx);` + +[:arrow_up_small:](#) + +
+ +## [get_global_timer](#get_global_timer) + +### Description +Gets the global timer that has been ticking at 30 frames per second since game boot + +### Lua Example +`local integerValue = get_global_timer()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 get_global_timer(void);` + +[:arrow_up_small:](#) + +
+ +## [get_dialog_response](#get_dialog_response) + +### Description +Gets the choice selected inside of a dialog box (0-1) + +### Lua Example +`local integerValue = get_dialog_response()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 get_dialog_response(void);` + +[:arrow_up_small:](#) + +
+ +## [get_local_discord_id](#get_local_discord_id) + +### Description +Gets the local discord ID if it isn't disabled, otherwise "0" is returned + +### Lua Example +`local stringValue = get_local_discord_id()` + +### Parameters +- None + +### Returns +- `string` + +### C Prototype +`const char* get_local_discord_id(void);` + +[:arrow_up_small:](#) + +
+ +## [get_coopnet_id](#get_coopnet_id) + +### Description +Gets the CoopNet ID of a player with `localIndex` if CoopNet is being used and the player is connected, otherwise "-1" is returned + +### Lua Example +`local stringValue = get_coopnet_id(localIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| localIndex | `integer` | + +### Returns +- `string` + +### C Prototype +`const char* get_coopnet_id(s8 localIndex);` + +[:arrow_up_small:](#) + +
+ +## [get_volume_master](#get_volume_master) + +### Description +Gets the master volume level + +### Lua Example +`local numberValue = get_volume_master()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 get_volume_master(void);` + +[:arrow_up_small:](#) + +
+ +## [get_volume_level](#get_volume_level) + +### Description +Gets the volume level of music + +### Lua Example +`local numberValue = get_volume_level()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 get_volume_level(void);` + +[:arrow_up_small:](#) + +
+ +## [get_volume_sfx](#get_volume_sfx) + +### Description +Gets the volume level of sound effects + +### Lua Example +`local numberValue = get_volume_sfx()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 get_volume_sfx(void);` + +[:arrow_up_small:](#) + +
+ +## [get_volume_env](#get_volume_env) + +### Description +Gets the volume level of environment sounds effects + +### Lua Example +`local numberValue = get_volume_env()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 get_volume_env(void);` + +[:arrow_up_small:](#) + +
+ +## [set_volume_master](#set_volume_master) + +### Description +Sets the master volume level + +### Lua Example +`set_volume_master(volume)` + +### Parameters +| Field | Type | +| ----- | ---- | +| volume | `number` | + +### Returns +- None + +### C Prototype +`void set_volume_master(f32 volume);` + +[:arrow_up_small:](#) + +
+ +## [set_volume_level](#set_volume_level) + +### Description +Sets the volume level of music + +### Lua Example +`set_volume_level(volume)` + +### Parameters +| Field | Type | +| ----- | ---- | +| volume | `number` | + +### Returns +- None + +### C Prototype +`void set_volume_level(f32 volume);` + +[:arrow_up_small:](#) + +
+ +## [set_volume_sfx](#set_volume_sfx) + +### Description +Sets the volume level of sound effects + +### Lua Example +`set_volume_sfx(volume)` + +### Parameters +| Field | Type | +| ----- | ---- | +| volume | `number` | + +### Returns +- None + +### C Prototype +`void set_volume_sfx(f32 volume);` + +[:arrow_up_small:](#) + +
+ +## [set_volume_env](#set_volume_env) + +### Description +Sets the volume level of environment sounds effects + +### Lua Example +`set_volume_env(volume)` + +### Parameters +| Field | Type | +| ----- | ---- | +| volume | `number` | + +### Returns +- None + +### C Prototype +`void set_volume_env(f32 volume);` + +[:arrow_up_small:](#) + +
+ +## [get_environment_region](#get_environment_region) + +### Description +Gets an environment region (gas/water boxes) height value + +### Lua Example +`local integerValue = get_environment_region(index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 get_environment_region(u8 index);` + +[:arrow_up_small:](#) + +
+ +## [set_environment_region](#set_environment_region) + +### Description +Sets an environment region (gas/water boxes) height value + +### Lua Example +`set_environment_region(index, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void set_environment_region(u8 index, s16 value);` + +[:arrow_up_small:](#) + +
+ +## [mod_file_exists](#mod_file_exists) + +### Description +Checks if a file exists inside of a mod + +### Lua Example +`local booleanValue = mod_file_exists(filename)` + +### Parameters +| Field | Type | +| ----- | ---- | +| filename | `string` | + +### Returns +- `boolean` + +### C Prototype +`bool mod_file_exists(const char* filename);` + +[:arrow_up_small:](#) + +
+ +## [get_active_mod](#get_active_mod) + +### Description +Gets the mod currently being processed + +### Lua Example +`local ModValue = get_active_mod()` + +### Parameters +- None + +### Returns +[Mod](structs.md#Mod) + +### C Prototype +`struct Mod* get_active_mod(void);` + +[:arrow_up_small:](#) + +
+ +## [set_window_title](#set_window_title) + +### Description +Sets the window title to a custom title + +### Lua Example +`set_window_title(title)` + +### Parameters +| Field | Type | +| ----- | ---- | +| title | `string` | + +### Returns +- None + +### C Prototype +`void set_window_title(const char* title);` + +[:arrow_up_small:](#) + +
+ +## [reset_window_title](#reset_window_title) + +### Description +Resets the window title + +### Lua Example +`reset_window_title()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void reset_window_title(void);` + +[:arrow_up_small:](#) + +
+ +## [get_os_name](#get_os_name) + +### Description +Gets the name of the operating system the game is running on + +### Lua Example +`local stringValue = get_os_name()` + +### Parameters +- None + +### Returns +- `string` + +### C Prototype +`const char* get_os_name(void);` + +[:arrow_up_small:](#) + +
+ +## [geo_get_current_root](#geo_get_current_root) + +### Description +Gets the current GraphNodeRoot + +### Lua Example +`local GraphNodeRootValue = geo_get_current_root()` + +### Parameters +- None + +### Returns +[GraphNodeRoot](structs.md#GraphNodeRoot) + +### C Prototype +`struct GraphNodeRoot* geo_get_current_root(void);` + +[:arrow_up_small:](#) + +
+ +## [geo_get_current_master_list](#geo_get_current_master_list) + +### Description +Gets the current GraphNodeMasterList + +### Lua Example +`local GraphNodeMasterListValue = geo_get_current_master_list()` + +### Parameters +- None + +### Returns +[GraphNodeMasterList](structs.md#GraphNodeMasterList) + +### C Prototype +`struct GraphNodeMasterList* geo_get_current_master_list(void);` + +[:arrow_up_small:](#) + +
+ +## [geo_get_current_perspective](#geo_get_current_perspective) + +### Description +Gets the current GraphNodePerspective + +### Lua Example +`local GraphNodePerspectiveValue = geo_get_current_perspective()` + +### Parameters +- None + +### Returns +[GraphNodePerspective](structs.md#GraphNodePerspective) + +### C Prototype +`struct GraphNodePerspective* geo_get_current_perspective(void);` + +[:arrow_up_small:](#) + +
+ +## [geo_get_current_camera](#geo_get_current_camera) + +### Description +Gets the current GraphNodeCamera + +### Lua Example +`local GraphNodeCameraValue = geo_get_current_camera()` + +### Parameters +- None + +### Returns +[GraphNodeCamera](structs.md#GraphNodeCamera) + +### C Prototype +`struct GraphNodeCamera* geo_get_current_camera(void);` + +[:arrow_up_small:](#) + +
+ +## [geo_get_current_held_object](#geo_get_current_held_object) + +### Description +Gets the current GraphNodeHeldObject + +### Lua Example +`local GraphNodeHeldObjectValue = geo_get_current_held_object()` + +### Parameters +- None + +### Returns +[GraphNodeHeldObject](structs.md#GraphNodeHeldObject) + +### C Prototype +`struct GraphNodeHeldObject* geo_get_current_held_object(void);` + +[:arrow_up_small:](#) + +
+ +## [texture_to_lua_table](#texture_to_lua_table) + +### Description +Converts a texture's pixels to a Lua table. Returns nil if failed. Otherwise, returns a 1-indexed table of RGBA pixels + +### Lua Example +`local tableValue = texture_to_lua_table(tex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| tex | `Pointer` <`Texture`> | + +### Returns +- `table` + +### C Prototype +`LuaTable texture_to_lua_table(const Texture *tex);` + +[:arrow_up_small:](#) + +
+ +## [get_texture_name](#get_texture_name) + +### Description +Gets the name of the provided texture pointer `tex` + +### Lua Example +`local stringValue = get_texture_name(tex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| tex | `Pointer` <`Texture`> | + +### Returns +- `string` + +### C Prototype +`const char *get_texture_name(const Texture *tex);` + +[:arrow_up_small:](#) + +
+ +--- +# functions from smlua_model_utils.h + +
+ + +## [smlua_model_util_get_id](#smlua_model_util_get_id) + +### Description +Gets the extended model ID for the `name` of a `GeoLayout` + +### Lua Example +`local enumValue = smlua_model_util_get_id(name)` + +### Parameters +| Field | Type | +| ----- | ---- | +| name | `string` | + +### Returns +[enum ModelExtendedId](constants.md#enum-ModelExtendedId) + +### C Prototype +`enum ModelExtendedId smlua_model_util_get_id(const char* name);` + +[:arrow_up_small:](#) + +
+ +--- +# functions from smlua_obj_utils.h + +
+ + +## [spawn_sync_object](#spawn_sync_object) + +### Description +Spawns a synchronized object at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` + +### Lua Example +`local ObjectValue = spawn_sync_object(behaviorId, modelId, x, y, z, objSetupFunction)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | +| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | +| x | `number` | +| y | `number` | +| z | `number` | +| objSetupFunction | `Lua Function` () | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object* spawn_sync_object(enum BehaviorId behaviorId, enum ModelExtendedId modelId, f32 x, f32 y, f32 z, LuaFunction objSetupFunction);` + +[:arrow_up_small:](#) + +
+ +## [spawn_non_sync_object](#spawn_non_sync_object) + +### Description +Spawns a non-synchronized object at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` + +### Lua Example +`local ObjectValue = spawn_non_sync_object(behaviorId, modelId, x, y, z, objSetupFunction)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | +| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | +| x | `number` | +| y | `number` | +| z | `number` | +| objSetupFunction | `Lua Function` () | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object* spawn_non_sync_object(enum BehaviorId behaviorId, enum ModelExtendedId modelId, f32 x, f32 y, f32 z, LuaFunction objSetupFunction);` + +[:arrow_up_small:](#) + +
+ +## [obj_has_behavior_id](#obj_has_behavior_id) + +### Description +Checks if an object has `behaviorId` + +### Lua Example +`local integerValue = obj_has_behavior_id(o, behaviorId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_has_behavior_id(struct Object *o, enum BehaviorId behaviorId);` + +[:arrow_up_small:](#) + +
+ +## [obj_has_model_extended](#obj_has_model_extended) + +### Description +Checks if an object's model is equal to `modelId` + +### Lua Example +`local integerValue = obj_has_model_extended(o, modelId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_has_model_extended(struct Object *o, enum ModelExtendedId modelId);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_model_id_extended](#obj_get_model_id_extended) + +### Description +Returns an object's extended model id + +### Lua Example +`local enumValue = obj_get_model_id_extended(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +[enum ModelExtendedId](constants.md#enum-ModelExtendedId) + +### C Prototype +`enum ModelExtendedId obj_get_model_id_extended(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_model_extended](#obj_set_model_extended) + +### Description +Sets an object's model to `modelId` + +### Lua Example +`obj_set_model_extended(o, modelId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | + +### Returns +- None + +### C Prototype +`void obj_set_model_extended(struct Object *o, enum ModelExtendedId modelId);` + +[:arrow_up_small:](#) + +
+ +## [get_trajectory](#get_trajectory) + +### Description +Gets a trajectory by `name` + +### Lua Example +`local PointerValue = get_trajectory(name)` + +### Parameters +| Field | Type | +| ----- | ---- | +| name | `string` | + +### Returns +- `Pointer` <`Trajectory`> + +### C Prototype +`Trajectory* get_trajectory(const char* name);` + +[:arrow_up_small:](#) + +
+ +## [geo_get_current_object](#geo_get_current_object) + +### Description +When used in a geo function, retrieve the current processed object + +### Lua Example +`local ObjectValue = geo_get_current_object()` + +### Parameters +- None + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *geo_get_current_object(void);` + +[:arrow_up_small:](#) + +
+ +## [get_current_object](#get_current_object) + +### Description +Gets the object currently being processed + +### Lua Example +`local ObjectValue = get_current_object()` + +### Parameters +- None + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *get_current_object(void);` + +[:arrow_up_small:](#) + +
+ +## [get_dialog_object](#get_dialog_object) + +### Description +Gets the NPC object Mario is talking to + +### Lua Example +`local ObjectValue = get_dialog_object()` + +### Parameters +- None + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *get_dialog_object(void);` + +[:arrow_up_small:](#) + +
+ +## [get_cutscene_focus](#get_cutscene_focus) + +### Description +Gets the cutscene focus object + +### Lua Example +`local ObjectValue = get_cutscene_focus()` + +### Parameters +- None + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *get_cutscene_focus(void);` + +[:arrow_up_small:](#) + +
+ +## [get_secondary_camera_focus](#get_secondary_camera_focus) + +### Description +Gets the secondary camera focus object + +### Lua Example +`local ObjectValue = get_secondary_camera_focus()` + +### Parameters +- None + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *get_secondary_camera_focus(void);` + +[:arrow_up_small:](#) + +
+ +## [set_cutscene_focus](#set_cutscene_focus) + +### Description +Sets the cutscene focus object + +### Lua Example +`set_cutscene_focus(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void set_cutscene_focus(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [set_secondary_camera_focus](#set_secondary_camera_focus) + +### Description +Sets the secondary camera focus object + +### Lua Example +`set_secondary_camera_focus(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void set_secondary_camera_focus(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_first](#obj_get_first) + +### Description +Gets the first object in an object list + +### Lua Example +`local ObjectValue = obj_get_first(objList)` + +### Parameters +| Field | Type | +| ----- | ---- | +| objList | [enum ObjectList](constants.md#enum-ObjectList) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_first(enum ObjectList objList);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_first_with_behavior_id](#obj_get_first_with_behavior_id) + +### Description +Gets the first object loaded with `behaviorId` + +### Lua Example +`local ObjectValue = obj_get_first_with_behavior_id(behaviorId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_first_with_behavior_id(enum BehaviorId behaviorId);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_first_with_behavior_id_and_field_s32](#obj_get_first_with_behavior_id_and_field_s32) + +### Description +Gets the first object loaded with `behaviorId` and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) + +### Lua Example +`local ObjectValue = obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | +| fieldIndex | `integer` | +| value | `integer` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_first_with_behavior_id_and_field_s32(enum BehaviorId behaviorId, s32 fieldIndex, s32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_first_with_behavior_id_and_field_f32](#obj_get_first_with_behavior_id_and_field_f32) + +### Description +Gets the first object loaded with `behaviorId` and object float field (look in `object_fields.h` to get the index of a field) + +### Lua Example +`local ObjectValue = obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | +| fieldIndex | `integer` | +| value | `number` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_first_with_behavior_id_and_field_f32(enum BehaviorId behaviorId, s32 fieldIndex, f32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_next](#obj_get_next) + +### Description +Gets the next object in an object list + +### Lua Example +`local ObjectValue = obj_get_next(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_next(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_next_with_same_behavior_id](#obj_get_next_with_same_behavior_id) + +### Description +Gets the next object loaded with the same behavior ID + +### Lua Example +`local ObjectValue = obj_get_next_with_same_behavior_id(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_next_with_same_behavior_id(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_next_with_same_behavior_id_and_field_s32](#obj_get_next_with_same_behavior_id_and_field_s32) + +### Description +Gets the next object loaded with the same behavior ID and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) + +### Lua Example +`local ObjectValue = obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| value | `integer` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_next_with_same_behavior_id_and_field_s32(struct Object *o, s32 fieldIndex, s32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_next_with_same_behavior_id_and_field_f32](#obj_get_next_with_same_behavior_id_and_field_f32) + +### Description +Gets the next object loaded with the same behavior ID and object float field (look in `object_fields.h` to get the index of a field) + +### Lua Example +`local ObjectValue = obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| value | `number` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_next_with_same_behavior_id_and_field_f32(struct Object *o, s32 fieldIndex, f32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_nearest_object_with_behavior_id](#obj_get_nearest_object_with_behavior_id) + +### Description +Gets the nearest object with `behaviorId` to `o` + +### Lua Example +`local ObjectValue = obj_get_nearest_object_with_behavior_id(o, behaviorId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_nearest_object_with_behavior_id(struct Object *o, enum BehaviorId behaviorId);` + +[:arrow_up_small:](#) + +
+ +## [obj_count_objects_with_behavior_id](#obj_count_objects_with_behavior_id) + +### Description +Counts every object with `behaviorId` + +### Lua Example +`local integerValue = obj_count_objects_with_behavior_id(behaviorId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_count_objects_with_behavior_id(enum BehaviorId behaviorId);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_collided_object](#obj_get_collided_object) + +### Description +Gets the corresponding collided object to an index from `o` + +### Lua Example +`local ObjectValue = obj_get_collided_object(o, index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| index | `integer` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_collided_object(struct Object *o, s16 index);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_field_u32](#obj_get_field_u32) + +### Description +Gets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` + +### Lua Example +`local integerValue = obj_get_field_u32(o, fieldIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | + +### Returns +- `integer` + +### C Prototype +`u32 obj_get_field_u32(struct Object *o, s32 fieldIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_field_s32](#obj_get_field_s32) + +### Description +Gets the signed 32-bit integer value from the field corresponding to `fieldIndex` + +### Lua Example +`local integerValue = obj_get_field_s32(o, fieldIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 obj_get_field_s32(struct Object *o, s32 fieldIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_field_f32](#obj_get_field_f32) + +### Description +Sets the float value from the field corresponding to `fieldIndex` + +### Lua Example +`local numberValue = obj_get_field_f32(o, fieldIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 obj_get_field_f32(struct Object *o, s32 fieldIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_field_s16](#obj_get_field_s16) + +### Description +Gets the signed 32-bit integer value from the sub field corresponding to `fieldSubIndex` from the field corresponding to `fieldIndex` + +### Lua Example +`local integerValue = obj_get_field_s16(o, fieldIndex, fieldSubIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| fieldSubIndex | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 obj_get_field_s16(struct Object *o, s32 fieldIndex, s32 fieldSubIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_field_u32](#obj_set_field_u32) + +### Description +Sets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` + +### Lua Example +`obj_set_field_u32(o, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_field_u32(struct Object *o, s32 fieldIndex, u32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_field_s32](#obj_set_field_s32) + +### Description +Sets the signed 32-bit integer value from the field corresponding to `fieldIndex` + +### Lua Example +`obj_set_field_s32(o, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_field_s32(struct Object *o, s32 fieldIndex, s32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_field_f32](#obj_set_field_f32) + +### Description +Sets the float value from the field corresponding to `fieldIndex` + +### Lua Example +`obj_set_field_f32(o, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| value | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_field_f32(struct Object *o, s32 fieldIndex, f32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_field_s16](#obj_set_field_s16) + +### Description +Sets the signed 32-bit integer value from the sub field corresponding to `fieldSubIndex` from the field corresponding to `fieldIndex` + +### Lua Example +`obj_set_field_s16(o, fieldIndex, fieldSubIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| fieldSubIndex | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_field_s16(struct Object *o, s32 fieldIndex, s32 fieldSubIndex, s16 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_temp_spawn_particles_info](#obj_get_temp_spawn_particles_info) + +### Description +Returns a temporary particle spawn info pointer with its model loaded in from `modelId` + +### Lua Example +`local SpawnParticlesInfoValue = obj_get_temp_spawn_particles_info(modelId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | + +### Returns +[SpawnParticlesInfo](structs.md#SpawnParticlesInfo) + +### C Prototype +`struct SpawnParticlesInfo* obj_get_temp_spawn_particles_info(enum ModelExtendedId modelId);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_temp_water_droplet_params](#obj_get_temp_water_droplet_params) + +### Description +Returns a temporary water droplet params pointer with its model and behavior loaded in from `modelId` and `behaviorId` + +### Lua Example +`local WaterDropletParamsValue = obj_get_temp_water_droplet_params(modelId, behaviorId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | + +### Returns +[WaterDropletParams](structs.md#WaterDropletParams) + +### C Prototype +`struct WaterDropletParams* obj_get_temp_water_droplet_params(enum ModelExtendedId modelId, enum BehaviorId behaviorId);` + +[:arrow_up_small:](#) + +
+ +## [get_temp_object_hitbox](#get_temp_object_hitbox) + +### Description +Returns a temporary object hitbox pointer + +### Lua Example +`local ObjectHitboxValue = get_temp_object_hitbox()` + +### Parameters +- None + +### Returns +[ObjectHitbox](structs.md#ObjectHitbox) + +### C Prototype +`struct ObjectHitbox* get_temp_object_hitbox(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_attackable](#obj_is_attackable) + +### Description +Checks if `o` is attackable + +### Lua Example +`local booleanValue = obj_is_attackable(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `boolean` + +### C Prototype +`bool obj_is_attackable(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_breakable_object](#obj_is_breakable_object) + +### Description +Checks if `o` is breakable + +### Lua Example +`local booleanValue = obj_is_breakable_object(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `boolean` + +### C Prototype +`bool obj_is_breakable_object(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_bully](#obj_is_bully) + +### Description +Checks if `o` is a Bully + +### Lua Example +`local booleanValue = obj_is_bully(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `boolean` + +### C Prototype +`bool obj_is_bully(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_coin](#obj_is_coin) + +### Description +Checks if `o` is a coin + +### Lua Example +`local booleanValue = obj_is_coin(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `boolean` + +### C Prototype +`bool obj_is_coin(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_exclamation_box](#obj_is_exclamation_box) + +### Description +Checks if `o` is an exclamation box + +### Lua Example +`local booleanValue = obj_is_exclamation_box(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `boolean` + +### C Prototype +`bool obj_is_exclamation_box(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_grabbable](#obj_is_grabbable) + +### Description +Checks if `o` is grabbable + +### Lua Example +`local booleanValue = obj_is_grabbable(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `boolean` + +### C Prototype +`bool obj_is_grabbable(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_mushroom_1up](#obj_is_mushroom_1up) + +### Description +Checks if `o` is a 1-Up Mushroom + +### Lua Example +`local booleanValue = obj_is_mushroom_1up(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `boolean` + +### C Prototype +`bool obj_is_mushroom_1up(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_secret](#obj_is_secret) + +### Description +Checks if `o` is a secret + +### Lua Example +`local booleanValue = obj_is_secret(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `boolean` + +### C Prototype +`bool obj_is_secret(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_valid_for_interaction](#obj_is_valid_for_interaction) + +### Description +Checks if `o` is activated, tangible, and interactible + +### Lua Example +`local booleanValue = obj_is_valid_for_interaction(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `boolean` + +### C Prototype +`bool obj_is_valid_for_interaction(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_check_hitbox_overlap](#obj_check_hitbox_overlap) + +### Description +Checks if `o1`'s hitbox is colliding with `o2`'s hitbox + +### Lua Example +`local booleanValue = obj_check_hitbox_overlap(o1, o2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o1 | [Object](structs.md#Object) | +| o2 | [Object](structs.md#Object) | + +### Returns +- `boolean` + +### C Prototype +`bool obj_check_hitbox_overlap(struct Object *o1, struct Object *o2);` + +[:arrow_up_small:](#) + +
+ +## [obj_check_overlap_with_hitbox_params](#obj_check_overlap_with_hitbox_params) + +### Description +Checks if `o`'s hitbox is colliding with the parameters of a hitbox + +### Lua Example +`local booleanValue = obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| x | `number` | +| y | `number` | +| z | `number` | +| h | `number` | +| r | `number` | +| d | `number` | + +### Returns +- `boolean` + +### C Prototype +`bool obj_check_overlap_with_hitbox_params(struct Object *o, f32 x, f32 y, f32 z, f32 h, f32 r, f32 d);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_vel](#obj_set_vel) + +### Description +Sets an object's velocity to `vx`, `vy`, and `vz` + +### Lua Example +`obj_set_vel(o, vx, vy, vz)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| vx | `number` | +| vy | `number` | +| vz | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_vel(struct Object *o, f32 vx, f32 vy, f32 vz);` + +[:arrow_up_small:](#) + +
+ +## [obj_move_xyz](#obj_move_xyz) + +### Description +Moves the object in the direction of `dx`, `dy`, and `dz` + +### Lua Example +`obj_move_xyz(o, dx, dy, dz)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| dx | `number` | +| dy | `number` | +| dz | `number` | + +### Returns +- None + +### C Prototype +`void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz);` + +[:arrow_up_small:](#) + +
+ +## [set_whirlpools](#set_whirlpools) + +### Description +Sets the parameters of one of the two whirlpools (0-indexed) in an area + +### Lua Example +`set_whirlpools(x, y, z, strength, area, index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `number` | +| y | `number` | +| z | `number` | +| strength | `integer` | +| area | `integer` | +| index | `integer` | + +### Returns +- None + +### C Prototype +`void set_whirlpools(f32 x, f32 y, f32 z, s16 strength, s16 area, s32 index);` + +[:arrow_up_small:](#) + +
+ +--- +# functions from smlua_text_utils.h + +
+ + +## [smlua_text_utils_reset_all](#smlua_text_utils_reset_all) + +### Description +Resets every modified dialog back to vanilla + +### Lua Example +`smlua_text_utils_reset_all()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void smlua_text_utils_reset_all(void);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_dialog_get](#smlua_text_utils_dialog_get) + +### Description +Gets the DialogEntry struct for the given `dialogId` + +### Lua Example +`local DialogEntryValue = smlua_text_utils_dialog_get(dialogId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dialogId | [enum DialogId](constants.md#enum-DialogId) | + +### Returns +[DialogEntry](structs.md#DialogEntry) + +### C Prototype +`struct DialogEntry* smlua_text_utils_dialog_get(enum DialogId dialogId);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_dialog_replace](#smlua_text_utils_dialog_replace) + +### Description +Replaces `dialogId` with a custom one + +### Lua Example +`smlua_text_utils_dialog_replace(dialogId, unused, linesPerBox, leftOffset, width, str)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dialogId | [enum DialogId](constants.md#enum-DialogId) | +| unused | `integer` | +| linesPerBox | `integer` | +| leftOffset | `integer` | +| width | `integer` | +| str | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_dialog_replace(enum DialogId dialogId, u32 unused, s8 linesPerBox, s16 leftOffset, s16 width, const char* str);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_dialog_restore](#smlua_text_utils_dialog_restore) + +### Description +Restores a replaced DialogEntry to its original state. + +### Lua Example +`smlua_text_utils_dialog_restore(dialogId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dialogId | [enum DialogId](constants.md#enum-DialogId) | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_dialog_restore(enum DialogId dialogId);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_dialog_is_replaced](#smlua_text_utils_dialog_is_replaced) + +### Description +Returns whether the dialog with the given ID has been replaced + +### Lua Example +`local booleanValue = smlua_text_utils_dialog_is_replaced(dialogId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dialogId | [enum DialogId](constants.md#enum-DialogId) | + +### Returns +- `boolean` + +### C Prototype +`bool smlua_text_utils_dialog_is_replaced(enum DialogId dialogId);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_allocate_dialog](#smlua_text_utils_allocate_dialog) + +### Description +Allocates a new dialog entry + +### Lua Example +`local integerValue = smlua_text_utils_allocate_dialog()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 smlua_text_utils_allocate_dialog(void);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_course_acts_replace](#smlua_text_utils_course_acts_replace) + +### Description +Replaces the act names of `courseNum` + +### Lua Example +`smlua_text_utils_course_acts_replace(courseNum, courseName, act1, act2, act3, act4, act5, act6)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| courseName | `string` | +| act1 | `string` | +| act2 | `string` | +| act3 | `string` | +| act4 | `string` | +| act5 | `string` | +| act6 | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_course_acts_replace(s16 courseNum, const char* courseName, const char* act1, const char* act2, const char* act3, const char* act4, const char* act5, const char* act6);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_secret_star_replace](#smlua_text_utils_secret_star_replace) + +### Description +Replaces the secret star course name of `courseNum` with `courseName` + +### Lua Example +`smlua_text_utils_secret_star_replace(courseNum, courseName)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| courseName | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_secret_star_replace(s16 courseNum, const char* courseName);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_course_name_replace](#smlua_text_utils_course_name_replace) + +### Description +Replaces the name of `courseNum` with `name` + +### Lua Example +`smlua_text_utils_course_name_replace(courseNum, name)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| name | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_course_name_replace(s16 courseNum, const char* name);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_course_name_get](#smlua_text_utils_course_name_get) + +### Description +Gets the name of `courseNum` + +### Lua Example +`local stringValue = smlua_text_utils_course_name_get(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +- `string` + +### C Prototype +`const char* smlua_text_utils_course_name_get(s16 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_course_name_mod_index](#smlua_text_utils_course_name_mod_index) + +### Description +Gets the index of the mod that replaced the name of `courseNum` + +### Lua Example +`local integerValue = smlua_text_utils_course_name_mod_index(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 smlua_text_utils_course_name_mod_index(s16 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_course_name_reset](#smlua_text_utils_course_name_reset) + +### Description +Resets the name of `courseNum` + +### Lua Example +`smlua_text_utils_course_name_reset(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_course_name_reset(s16 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_act_name_replace](#smlua_text_utils_act_name_replace) + +### Description +Replaces the act name of `actNum` in `courseNum` with `name` + +### Lua Example +`smlua_text_utils_act_name_replace(courseNum, actNum, name)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| actNum | `integer` | +| name | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_act_name_replace(s16 courseNum, u8 actNum, const char* name);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_act_name_get](#smlua_text_utils_act_name_get) + +### Description +Gets the act name of `actNum` in `courseNum` + +### Lua Example +`local stringValue = smlua_text_utils_act_name_get(courseNum, actNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| actNum | `integer` | + +### Returns +- `string` + +### C Prototype +`const char* smlua_text_utils_act_name_get(s16 courseNum, u8 actNum);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_act_name_mod_index](#smlua_text_utils_act_name_mod_index) + +### Description +Gets the index of the mod that replaced the act name of `actNum` in `courseNum` + +### Lua Example +`local integerValue = smlua_text_utils_act_name_mod_index(courseNum, actNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| actNum | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 smlua_text_utils_act_name_mod_index(s16 courseNum, u8 actNum);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_act_name_reset](#smlua_text_utils_act_name_reset) + +### Description +Resets the act name of `actNum` in `courseNum` + +### Lua Example +`smlua_text_utils_act_name_reset(courseNum, actNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| actNum | `integer` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_act_name_reset(s16 courseNum, u8 actNum);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_castle_secret_stars_replace](#smlua_text_utils_castle_secret_stars_replace) + +### Description +Replaces the castle secret stars text with `name` + +### Lua Example +`smlua_text_utils_castle_secret_stars_replace(name)` + +### Parameters +| Field | Type | +| ----- | ---- | +| name | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_castle_secret_stars_replace(const char* name);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_castle_secret_stars_get](#smlua_text_utils_castle_secret_stars_get) + +### Description +Gets the castle secret stars text + +### Lua Example +`local stringValue = smlua_text_utils_castle_secret_stars_get()` + +### Parameters +- None + +### Returns +- `string` + +### C Prototype +`const char* smlua_text_utils_castle_secret_stars_get();` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_castle_secret_stars_mod_index](#smlua_text_utils_castle_secret_stars_mod_index) + +### Description +Gets the index of the mod that replaced the castle secret stars text + +### Lua Example +`local integerValue = smlua_text_utils_castle_secret_stars_mod_index()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 smlua_text_utils_castle_secret_stars_mod_index();` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_castle_secret_stars_reset](#smlua_text_utils_castle_secret_stars_reset) + +### Description +Resets the castle secret stars text + +### Lua Example +`smlua_text_utils_castle_secret_stars_reset()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void smlua_text_utils_castle_secret_stars_reset();` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_extra_text_replace](#smlua_text_utils_extra_text_replace) + +### Description +Replace extra text (e.g. one of the castle's secret stars) with `text` + +### Lua Example +`smlua_text_utils_extra_text_replace(index, text)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | +| text | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_extra_text_replace(s16 index, const char* text);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_extra_text_get](#smlua_text_utils_extra_text_get) + +### Description +Gets the extra text at `index` + +### Lua Example +`local stringValue = smlua_text_utils_extra_text_get(index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | + +### Returns +- `string` + +### C Prototype +`const char* smlua_text_utils_extra_text_get(s16 index);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_extra_text_mod_index](#smlua_text_utils_extra_text_mod_index) + +### Description +Gets the index of the mod that replaced the extra text at `index` + +### Lua Example +`local integerValue = smlua_text_utils_extra_text_mod_index(index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 smlua_text_utils_extra_text_mod_index(s16 index);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_extra_text_reset](#smlua_text_utils_extra_text_reset) + +### Description +Resets the extra text at `index` + +### Lua Example +`smlua_text_utils_extra_text_reset(index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_extra_text_reset(s16 index);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_get_language](#smlua_text_utils_get_language) + +### Description +Gets the current language + +### Lua Example +`local stringValue = smlua_text_utils_get_language()` + +### Parameters +- None + +### Returns +- `string` + +### C Prototype +`const char* smlua_text_utils_get_language(void);` + +[:arrow_up_small:](#) + +
+ +--- +# functions from sound_init.h + +
+ + +## [reset_volume](#reset_volume) + +### Description +Resets if music volume has been lowered + +### Lua Example +`reset_volume()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void reset_volume(void);` + +[:arrow_up_small:](#) + +
+ +## [raise_background_noise](#raise_background_noise) + +### Description +Raises music volume back up to normal levels + +### Lua Example +`raise_background_noise(a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | `integer` | + +### Returns +- None + +### C Prototype +`void raise_background_noise(s32 a);` + +[:arrow_up_small:](#) + +
+ +## [lower_background_noise](#lower_background_noise) + +### Description +Lowers the volume of music by 40% + +### Lua Example +`lower_background_noise(a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | `integer` | + +### Returns +- None + +### C Prototype +`void lower_background_noise(s32 a);` + +[:arrow_up_small:](#) + +
+ +## [disable_background_sound](#disable_background_sound) + +### Description +Disables background soundbanks + +### Lua Example +`disable_background_sound()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void disable_background_sound(void);` + +[:arrow_up_small:](#) + +
+ +## [enable_background_sound](#enable_background_sound) + +### Description +Enables background soundbanks + +### Lua Example +`enable_background_sound()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void enable_background_sound(void);` + +[:arrow_up_small:](#) + +
+ +## [play_menu_sounds](#play_menu_sounds) + +### Description +Play menu sounds from `SOUND_MENU_FLAG_*` constants and queues rumble if `SOUND_MENU_FLAG_LETGOMARIOFACE` is one of the flags + +### Lua Example +`play_menu_sounds(soundMenuFlags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| soundMenuFlags | `integer` | + +### Returns +- None + +### C Prototype +`void play_menu_sounds(s16 soundMenuFlags);` + +[:arrow_up_small:](#) + +
+ +## [play_painting_eject_sound](#play_painting_eject_sound) + +### Description +Plays the painting eject sound effect if it has not already been played + +### Lua Example +`play_painting_eject_sound()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_painting_eject_sound(void);` + +[:arrow_up_small:](#) + +
+ +## [play_infinite_stairs_music](#play_infinite_stairs_music) + +### Description +Plays the infinite stairs music if you're in the endless stairs room and have less than `gLevelValues.infiniteStairsRequirement` stars + +### Lua Example +`play_infinite_stairs_music()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_infinite_stairs_music(void);` + +[:arrow_up_small:](#) + +
+ +## [set_background_music](#set_background_music) + +### Description +Sets the background music to `seqArgs` on sequence player `a` with a fade in time of `fadeTimer` + +### Lua Example +`set_background_music(a, seqArgs, fadeTimer)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | `integer` | +| seqArgs | `integer` | +| fadeTimer | `integer` | + +### Returns +- None + +### C Prototype +`void set_background_music(u16 a, u16 seqArgs, s16 fadeTimer);` + +[:arrow_up_small:](#) + +
+ +## [fadeout_music](#fadeout_music) + +### Description +Fades out level, shell, and cap music + +### Lua Example +`fadeout_music(fadeOutTime)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fadeOutTime | `integer` | + +### Returns +- None + +### C Prototype +`void fadeout_music(s16 fadeOutTime);` + +[:arrow_up_small:](#) + +
+ +## [fadeout_level_music](#fadeout_level_music) + +### Description +Fades out the level sequence player + +### Lua Example +`fadeout_level_music(fadeTimer)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fadeTimer | `integer` | + +### Returns +- None + +### C Prototype +`void fadeout_level_music(s16 fadeTimer);` + +[:arrow_up_small:](#) + +
+ +## [play_cutscene_music](#play_cutscene_music) + +### Description +Plays and sets the current music to `seqArgs` + +### Lua Example +`play_cutscene_music(seqArgs)` + +### Parameters +| Field | Type | +| ----- | ---- | +| seqArgs | `integer` | + +### Returns +- None + +### C Prototype +`void play_cutscene_music(u16 seqArgs);` + +[:arrow_up_small:](#) + +
+ +## [play_shell_music](#play_shell_music) + +### Description +Plays shell music + +### Lua Example +`play_shell_music()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_shell_music(void);` + +[:arrow_up_small:](#) + +
+ +## [stop_shell_music](#stop_shell_music) + +### Description +Stops shell music completely + +### Lua Example +`stop_shell_music()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void stop_shell_music(void);` + +[:arrow_up_small:](#) + +
+ +## [play_cap_music](#play_cap_music) + +### Description +Plays `seqArgs` as cap music + +### Lua Example +`play_cap_music(seqArgs)` + +### Parameters +| Field | Type | +| ----- | ---- | +| seqArgs | `integer` | + +### Returns +- None + +### C Prototype +`void play_cap_music(u16 seqArgs);` + +[:arrow_up_small:](#) + +
+ +## [fadeout_cap_music](#fadeout_cap_music) + +### Description +Fades out cap music + +### Lua Example +`fadeout_cap_music()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void fadeout_cap_music(void);` + +[:arrow_up_small:](#) + +
+ +## [stop_cap_music](#stop_cap_music) + +### Description +Stops cap music completely + +### Lua Example +`stop_cap_music()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void stop_cap_music(void);` + +[:arrow_up_small:](#) + +
+ +--- +# functions from spawn_sound.h + +
+ + +## [cur_obj_play_sound_1](#cur_obj_play_sound_1) + +### Description +Plays a sound if the current object is visible + +### Lua Example +`cur_obj_play_sound_1(soundMagic)` + +### Parameters +| Field | Type | +| ----- | ---- | +| soundMagic | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_play_sound_1(s32 soundMagic);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_play_sound_2](#cur_obj_play_sound_2) + +### Description +Plays a sound if the current object is visible and queues rumble for specific sounds + +### Lua Example +`cur_obj_play_sound_2(soundMagic)` + +### Parameters +| Field | Type | +| ----- | ---- | +| soundMagic | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_play_sound_2(s32 soundMagic);` + +[:arrow_up_small:](#) + +
+ +## [create_sound_spawner](#create_sound_spawner) + +### Description +Create a sound spawner for objects that need a sound play once. (Breakable walls, King Bobomb exploding, etc) + +### Lua Example +`create_sound_spawner(soundMagic)` + +### Parameters +| Field | Type | +| ----- | ---- | +| soundMagic | `integer` | + +### Returns +- None + +### C Prototype +`void create_sound_spawner(s32 soundMagic);` + +[:arrow_up_small:](#) + +
+ +## [calc_dist_to_volume_range_1](#calc_dist_to_volume_range_1) + +### Description +Unused vanilla function, calculates a volume based on `distance`. If `distance` is less than 500 then 127, if `distance` is greater than 1500 then 0, if `distance` is between 500 and 1500 then it ranges linearly from 60 to 124. What an even more strange and confusing function + +### Lua Example +`local integerValue = calc_dist_to_volume_range_1(distance)` + +### Parameters +| Field | Type | +| ----- | ---- | +| distance | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 calc_dist_to_volume_range_1(f32 distance);` + +[:arrow_up_small:](#) + +
+ +## [calc_dist_to_volume_range_2](#calc_dist_to_volume_range_2) + +### Description +Unused vanilla function, calculates a volume based on `distance`. If `distance` is less than 1300 then 127, if `distance` is greater than 2300 then 0, if `distance` is between 1300 and 2300 then it ranges linearly from 60 to 127. What a strange and confusing function + +### Lua Example +`local integerValue = calc_dist_to_volume_range_2(distance)` + +### Parameters +| Field | Type | +| ----- | ---- | +| distance | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 calc_dist_to_volume_range_2(f32 distance);` + +[:arrow_up_small:](#) + +
+ +--- +# functions from surface_collision.h + +
+ + +## [find_wall_collisions](#find_wall_collisions) + +### Description +Detects wall collisions at a given position and adjusts the position based on the walls found. Returns the number of wall collisions detected + +### 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_ceil_height](#find_ceil_height) + +### Description +Finds the height of the highest ceiling above a given position (x, y, z). If no ceiling is found, returns the default height limit of `gLevelValues.cellHeightLimit`(20000 by default) + +### Lua Example +`local numberValue = find_ceil_height(x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `number` | +| y | `number` | +| z | `number` | + +### Returns +- `number` + +### C Prototype +`f32 find_ceil_height(f32 x, f32 y, f32 z);` + +[:arrow_up_small:](#) + +
+ +## [find_floor_height](#find_floor_height) + +### Description +Finds the height of the highest floor below a given position (x, y, z). If no floor is found, returns the default floor height of `gLevelValues.floorLowerLimit`(-11000 by default) + +### 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_water_level](#find_water_level) + +### Description +Finds the height of water at a given position (x, z), if the position is within a water region. If no water is found, returns the default height of `gLevelValues.floorLowerLimit`(-11000 by default) + +### 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:](#) + +
+ +## [find_poison_gas_level](#find_poison_gas_level) + +### Description +Finds the height of the poison gas at a given position (x, z), if the position is within a gas region. If no gas is found, returns the default height of `gLevelValues.floorLowerLimit`(-11000 by default) + +### 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:](#) + +
+ +## [set_find_wall_direction](#set_find_wall_direction) + +### Description +Sets whether collision finding functions should check wall directions. + +### Lua Example +`set_find_wall_direction(dir, active, airborne)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dir | [Vec3f](structs.md#Vec3f) | +| active | `boolean` | +| airborne | `boolean` | + +### Returns +- None + +### C Prototype +`void set_find_wall_direction(Vec3f dir, bool active, bool airborne);` + +[:arrow_up_small:](#) + +
+ +## [closest_point_to_triangle](#closest_point_to_triangle) + +### Description +Gets the closest point of the triangle to `src` and returns it in `out`. + +### Lua Example +`closest_point_to_triangle(surf, src, out)` + +### Parameters +| Field | Type | +| ----- | ---- | +| surf | [Surface](structs.md#Surface) | +| src | [Vec3f](structs.md#Vec3f) | +| out | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void closest_point_to_triangle(struct Surface* surf, Vec3f src, OUT Vec3f out);` + +[:arrow_up_small:](#) + +
+ --- # functions from surface_load.h @@ -32,6 +4801,75 @@ Loads the object's collision data into dynamic collision. You must run this ever
+## [load_static_object_collision](#load_static_object_collision) + +### Description +Loads the object's collision data into static collision. You may run this only once to capture the object's collision at that frame. + +### Lua Example +`local StaticObjectCollisionValue = load_static_object_collision()` + +### Parameters +- None + +### Returns +[StaticObjectCollision](structs.md#StaticObjectCollision) + +### C Prototype +`struct StaticObjectCollision *load_static_object_collision();` + +[:arrow_up_small:](#) + +
+ +## [toggle_static_object_collision](#toggle_static_object_collision) + +### Description +Toggles a collection of static object surfaces + +### Lua Example +`toggle_static_object_collision(col, tangible)` + +### Parameters +| Field | Type | +| ----- | ---- | +| col | [StaticObjectCollision](structs.md#StaticObjectCollision) | +| tangible | `boolean` | + +### Returns +- None + +### C Prototype +`void toggle_static_object_collision(struct StaticObjectCollision *col, bool tangible);` + +[:arrow_up_small:](#) + +
+ +## [get_static_object_surface](#get_static_object_surface) + +### Description +Gets a surface corresponding to `index` from the static object collision + +### Lua Example +`local SurfaceValue = get_static_object_surface(col, index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| col | [StaticObjectCollision](structs.md#StaticObjectCollision) | +| index | `integer` | + +### Returns +[Surface](structs.md#Surface) + +### C Prototype +`struct Surface *get_static_object_surface(struct StaticObjectCollision *col, u32 index);` + +[:arrow_up_small:](#) + +
+ ## [obj_get_surface_from_index](#obj_get_surface_from_index) ### Description diff --git a/docs/lua/functions.md b/docs/lua/functions.md index 4ec201ce2..672af20ac 100644 --- a/docs/lua/functions.md +++ b/docs/lua/functions.md @@ -711,7 +711,6 @@ - [camera_course_processing](functions-3.md#camera_course_processing) - [resolve_geometry_collisions](functions-3.md#resolve_geometry_collisions) - [rotate_camera_around_walls](functions-3.md#rotate_camera_around_walls) - - [find_mario_floor_and_ceil](functions-3.md#find_mario_floor_and_ceil) - [start_object_cutscene_without_focus](functions-3.md#start_object_cutscene_without_focus) - [cutscene_object_with_dialog](functions-3.md#cutscene_object_with_dialog) - [cutscene_object_without_dialog](functions-3.md#cutscene_object_without_dialog) @@ -770,6 +769,7 @@ - [djui_hud_get_mouse_y](functions-3.md#djui_hud_get_mouse_y) - [djui_hud_get_raw_mouse_x](functions-3.md#djui_hud_get_raw_mouse_x) - [djui_hud_get_raw_mouse_y](functions-3.md#djui_hud_get_raw_mouse_y) + - [djui_hud_is_mouse_locked](functions-3.md#djui_hud_is_mouse_locked) - [djui_hud_set_mouse_locked](functions-3.md#djui_hud_set_mouse_locked) - [djui_hud_get_mouse_buttons_down](functions-3.md#djui_hud_get_mouse_buttons_down) - [djui_hud_get_mouse_buttons_pressed](functions-3.md#djui_hud_get_mouse_buttons_pressed) @@ -869,6 +869,7 @@ - [create_dialog_box_with_response](functions-3.md#create_dialog_box_with_response) - [reset_dialog_render_state](functions-3.md#reset_dialog_render_state) - [set_menu_mode](functions-3.md#set_menu_mode) + - [handle_special_dialog_text](functions-3.md#handle_special_dialog_text) - [set_min_dialog_width](functions-3.md#set_min_dialog_width) - [set_dialog_override_pos](functions-3.md#set_dialog_override_pos) - [reset_dialog_override_pos](functions-3.md#reset_dialog_override_pos) @@ -956,6 +957,7 @@ - level_update.h - [level_control_timer_running](functions-3.md#level_control_timer_running) + - [pressed_pause](functions-3.md#pressed_pause) - [fade_into_special_warp](functions-3.md#fade_into_special_warp) - [get_instant_warp](functions-3.md#get_instant_warp) - [get_painting_warp_node](functions-3.md#get_painting_warp_node) @@ -967,29 +969,29 @@
- lighting_engine.h - - [le_is_enabled](functions-3.md#le_is_enabled) - - [le_set_mode](functions-3.md#le_set_mode) - - [le_get_mode](functions-3.md#le_get_mode) - - [le_set_tone_mapping](functions-3.md#le_set_tone_mapping) - - [le_get_ambient_color](functions-3.md#le_get_ambient_color) - - [le_set_ambient_color](functions-3.md#le_set_ambient_color) - - [le_calculate_lighting_color](functions-3.md#le_calculate_lighting_color) - - [le_calculate_lighting_color_with_normal](functions-3.md#le_calculate_lighting_color_with_normal) - - [le_calculate_lighting_dir](functions-3.md#le_calculate_lighting_dir) - - [le_add_light](functions-3.md#le_add_light) - - [le_remove_light](functions-3.md#le_remove_light) - - [le_get_light_count](functions-3.md#le_get_light_count) - - [le_light_exists](functions-3.md#le_light_exists) - - [le_get_light_pos](functions-3.md#le_get_light_pos) - - [le_set_light_pos](functions-3.md#le_set_light_pos) - - [le_get_light_color](functions-3.md#le_get_light_color) - - [le_set_light_color](functions-3.md#le_set_light_color) - - [le_get_light_radius](functions-3.md#le_get_light_radius) - - [le_set_light_radius](functions-3.md#le_set_light_radius) - - [le_get_light_intensity](functions-3.md#le_get_light_intensity) - - [le_set_light_intensity](functions-3.md#le_set_light_intensity) - - [le_get_light_use_surface_normals](functions-3.md#le_get_light_use_surface_normals) - - [le_set_light_use_surface_normals](functions-3.md#le_set_light_use_surface_normals) + - [le_is_enabled](functions-4.md#le_is_enabled) + - [le_set_mode](functions-4.md#le_set_mode) + - [le_get_mode](functions-4.md#le_get_mode) + - [le_set_tone_mapping](functions-4.md#le_set_tone_mapping) + - [le_get_ambient_color](functions-4.md#le_get_ambient_color) + - [le_set_ambient_color](functions-4.md#le_set_ambient_color) + - [le_calculate_lighting_color](functions-4.md#le_calculate_lighting_color) + - [le_calculate_lighting_color_with_normal](functions-4.md#le_calculate_lighting_color_with_normal) + - [le_calculate_lighting_dir](functions-4.md#le_calculate_lighting_dir) + - [le_add_light](functions-4.md#le_add_light) + - [le_remove_light](functions-4.md#le_remove_light) + - [le_get_light_count](functions-4.md#le_get_light_count) + - [le_light_exists](functions-4.md#le_light_exists) + - [le_get_light_pos](functions-4.md#le_get_light_pos) + - [le_set_light_pos](functions-4.md#le_set_light_pos) + - [le_get_light_color](functions-4.md#le_get_light_color) + - [le_set_light_color](functions-4.md#le_set_light_color) + - [le_get_light_radius](functions-4.md#le_get_light_radius) + - [le_set_light_radius](functions-4.md#le_set_light_radius) + - [le_get_light_intensity](functions-4.md#le_get_light_intensity) + - [le_set_light_intensity](functions-4.md#le_set_light_intensity) + - [le_get_light_use_surface_normals](functions-4.md#le_get_light_use_surface_normals) + - [le_set_light_use_surface_normals](functions-4.md#le_set_light_use_surface_normals)
@@ -1193,7 +1195,6 @@ - mario_step.h - [get_additive_y_vel_for_jumps](functions-4.md#get_additive_y_vel_for_jumps) - [mario_bonk_reflection](functions-4.md#mario_bonk_reflection) - - [init_bully_collision_data](functions-4.md#init_bully_collision_data) - [mario_update_quicksand](functions-4.md#mario_update_quicksand) - [mario_push_off_steep_floor](functions-4.md#mario_push_off_steep_floor) - [mario_update_moving_sand](functions-4.md#mario_update_moving_sand) @@ -1310,28 +1311,28 @@
- math_util_vec3s.inl - - [vec3s_zero](functions-4.md#vec3s_zero) - - [vec3s_copy](functions-4.md#vec3s_copy) - - [vec3s_set](functions-4.md#vec3s_set) - - [vec3s_add](functions-4.md#vec3s_add) - - [vec3s_sum](functions-4.md#vec3s_sum) - - [vec3s_sub](functions-4.md#vec3s_sub) - - [vec3s_dif](functions-4.md#vec3s_dif) - - [vec3s_mul](functions-4.md#vec3s_mul) - - [vec3s_mult](functions-4.md#vec3s_mult) - - [vec3s_prod](functions-4.md#vec3s_prod) - - [vec3s_div](functions-4.md#vec3s_div) - - [vec3s_length](functions-4.md#vec3s_length) - - [vec3s_normalize](functions-4.md#vec3s_normalize) - - [vec3s_set_magnitude](functions-4.md#vec3s_set_magnitude) - - [vec3s_dot](functions-4.md#vec3s_dot) - - [vec3s_cross](functions-4.md#vec3s_cross) - - [vec3s_combine](functions-4.md#vec3s_combine) - - [vec3s_dist](functions-4.md#vec3s_dist) - - [vec3s_hdist](functions-4.md#vec3s_hdist) - - [vec3s_is_zero](functions-4.md#vec3s_is_zero) - - [vec3s_to_vec3f](functions-4.md#vec3s_to_vec3f) - - [vec3s_to_vec3i](functions-4.md#vec3s_to_vec3i) + - [vec3s_zero](functions-5.md#vec3s_zero) + - [vec3s_copy](functions-5.md#vec3s_copy) + - [vec3s_set](functions-5.md#vec3s_set) + - [vec3s_add](functions-5.md#vec3s_add) + - [vec3s_sum](functions-5.md#vec3s_sum) + - [vec3s_sub](functions-5.md#vec3s_sub) + - [vec3s_dif](functions-5.md#vec3s_dif) + - [vec3s_mul](functions-5.md#vec3s_mul) + - [vec3s_mult](functions-5.md#vec3s_mult) + - [vec3s_prod](functions-5.md#vec3s_prod) + - [vec3s_div](functions-5.md#vec3s_div) + - [vec3s_length](functions-5.md#vec3s_length) + - [vec3s_normalize](functions-5.md#vec3s_normalize) + - [vec3s_set_magnitude](functions-5.md#vec3s_set_magnitude) + - [vec3s_dot](functions-5.md#vec3s_dot) + - [vec3s_cross](functions-5.md#vec3s_cross) + - [vec3s_combine](functions-5.md#vec3s_combine) + - [vec3s_dist](functions-5.md#vec3s_dist) + - [vec3s_hdist](functions-5.md#vec3s_hdist) + - [vec3s_is_zero](functions-5.md#vec3s_is_zero) + - [vec3s_to_vec3f](functions-5.md#vec3s_to_vec3f) + - [vec3s_to_vec3i](functions-5.md#vec3s_to_vec3i)
@@ -1354,9 +1355,6 @@ - [mod_fs_get](functions-5.md#mod_fs_get) - [mod_fs_reload](functions-5.md#mod_fs_reload) - [mod_fs_create](functions-5.md#mod_fs_create) - - [mod_fs_delete](functions-5.md#mod_fs_delete) - - [mod_fs_save](functions-5.md#mod_fs_save) - - [mod_fs_set_public](functions-5.md#mod_fs_set_public) - [mod_fs_get_filename](functions-5.md#mod_fs_get_filename) - [mod_fs_get_file](functions-5.md#mod_fs_get_file) - [mod_fs_create_file](functions-5.md#mod_fs_create_file) @@ -1364,6 +1362,9 @@ - [mod_fs_copy_file](functions-5.md#mod_fs_copy_file) - [mod_fs_delete_file](functions-5.md#mod_fs_delete_file) - [mod_fs_clear](functions-5.md#mod_fs_clear) + - [mod_fs_save](functions-5.md#mod_fs_save) + - [mod_fs_delete](functions-5.md#mod_fs_delete) + - [mod_fs_set_public](functions-5.md#mod_fs_set_public) - [mod_fs_file_read_bool](functions-5.md#mod_fs_file_read_bool) - [mod_fs_file_read_integer](functions-5.md#mod_fs_file_read_integer) - [mod_fs_file_read_number](functions-5.md#mod_fs_file_read_number) @@ -1377,9 +1378,11 @@ - [mod_fs_file_write_string](functions-5.md#mod_fs_file_write_string) - [mod_fs_file_write_line](functions-5.md#mod_fs_file_write_line) - [mod_fs_file_seek](functions-5.md#mod_fs_file_seek) + - [mod_fs_file_rewind](functions-5.md#mod_fs_file_rewind) - [mod_fs_file_is_eof](functions-5.md#mod_fs_file_is_eof) - [mod_fs_file_fill](functions-5.md#mod_fs_file_fill) - [mod_fs_file_erase](functions-5.md#mod_fs_file_erase) + - [mod_fs_file_set_text_mode](functions-5.md#mod_fs_file_set_text_mode) - [mod_fs_file_set_public](functions-5.md#mod_fs_file_set_public) - [mod_fs_hide_errors](functions-5.md#mod_fs_hide_errors) - [mod_fs_get_last_error](functions-5.md#mod_fs_get_last_error) @@ -1393,6 +1396,7 @@ - [mod_storage_load](functions-5.md#mod_storage_load) - [mod_storage_load_number](functions-5.md#mod_storage_load_number) - [mod_storage_load_bool](functions-5.md#mod_storage_load_bool) + - [mod_storage_load_all](functions-5.md#mod_storage_load_all) - [mod_storage_exists](functions-5.md#mod_storage_exists) - [mod_storage_remove](functions-5.md#mod_storage_remove) - [mod_storage_clear](functions-5.md#mod_storage_clear) @@ -1516,232 +1520,231 @@
- object_helpers.c - - [clear_move_flag](functions-5.md#clear_move_flag) - - [set_room_override](functions-5.md#set_room_override) - - [obj_update_pos_from_parent_transformation](functions-5.md#obj_update_pos_from_parent_transformation) - - [obj_apply_scale_to_matrix](functions-5.md#obj_apply_scale_to_matrix) - - [create_transformation_from_matrices](functions-5.md#create_transformation_from_matrices) - - [obj_set_held_state](functions-5.md#obj_set_held_state) - - [lateral_dist_between_objects](functions-5.md#lateral_dist_between_objects) - - [dist_between_objects](functions-5.md#dist_between_objects) - - [dist_between_object_and_point](functions-5.md#dist_between_object_and_point) - - [cur_obj_forward_vel_approach_upward](functions-5.md#cur_obj_forward_vel_approach_upward) - - [approach_f32_signed](functions-5.md#approach_f32_signed) - - [approach_f32_symmetric](functions-5.md#approach_f32_symmetric) - - [approach_s16_symmetric](functions-5.md#approach_s16_symmetric) - - [cur_obj_rotate_yaw_toward](functions-5.md#cur_obj_rotate_yaw_toward) - - [obj_angle_to_object](functions-5.md#obj_angle_to_object) - - [obj_pitch_to_object](functions-5.md#obj_pitch_to_object) - - [obj_angle_to_point](functions-5.md#obj_angle_to_point) - - [obj_turn_toward_object](functions-5.md#obj_turn_toward_object) - - [obj_set_parent_relative_pos](functions-5.md#obj_set_parent_relative_pos) - - [obj_set_pos](functions-5.md#obj_set_pos) - - [obj_set_angle](functions-5.md#obj_set_angle) - - [obj_set_move_angle](functions-5.md#obj_set_move_angle) - - [obj_set_face_angle](functions-5.md#obj_set_face_angle) - - [obj_set_gfx_angle](functions-5.md#obj_set_gfx_angle) - - [obj_set_gfx_pos](functions-5.md#obj_set_gfx_pos) - - [obj_set_gfx_scale](functions-5.md#obj_set_gfx_scale) - - [spawn_water_droplet](functions-5.md#spawn_water_droplet) - - [obj_build_relative_transform](functions-5.md#obj_build_relative_transform) - - [cur_obj_move_using_vel](functions-5.md#cur_obj_move_using_vel) - - [obj_copy_graph_y_offset](functions-5.md#obj_copy_graph_y_offset) - - [obj_copy_pos_and_angle](functions-5.md#obj_copy_pos_and_angle) - - [obj_copy_pos](functions-5.md#obj_copy_pos) - - [obj_copy_angle](functions-5.md#obj_copy_angle) - - [obj_set_gfx_pos_from_pos](functions-5.md#obj_set_gfx_pos_from_pos) - - [obj_init_animation](functions-5.md#obj_init_animation) - - [linear_mtxf_mul_vec3f](functions-5.md#linear_mtxf_mul_vec3f) - - [linear_mtxf_transpose_mul_vec3f](functions-5.md#linear_mtxf_transpose_mul_vec3f) - - [obj_apply_scale_to_transform](functions-5.md#obj_apply_scale_to_transform) - - [obj_copy_scale](functions-5.md#obj_copy_scale) - - [obj_scale_xyz](functions-5.md#obj_scale_xyz) - - [obj_scale](functions-5.md#obj_scale) - - [cur_obj_scale](functions-5.md#cur_obj_scale) - - [cur_obj_init_animation](functions-5.md#cur_obj_init_animation) - - [cur_obj_init_animation_with_sound](functions-5.md#cur_obj_init_animation_with_sound) - - [obj_init_animation_with_accel_and_sound](functions-5.md#obj_init_animation_with_accel_and_sound) - - [cur_obj_init_animation_with_accel_and_sound](functions-5.md#cur_obj_init_animation_with_accel_and_sound) - - [obj_init_animation_with_sound](functions-5.md#obj_init_animation_with_sound) - - [cur_obj_enable_rendering_and_become_tangible](functions-5.md#cur_obj_enable_rendering_and_become_tangible) - - [cur_obj_enable_rendering](functions-5.md#cur_obj_enable_rendering) - - [cur_obj_disable_rendering_and_become_intangible](functions-5.md#cur_obj_disable_rendering_and_become_intangible) - - [cur_obj_disable_rendering](functions-5.md#cur_obj_disable_rendering) - - [cur_obj_unhide](functions-5.md#cur_obj_unhide) - - [cur_obj_hide](functions-5.md#cur_obj_hide) - - [cur_obj_set_pos_relative](functions-5.md#cur_obj_set_pos_relative) - - [cur_obj_set_pos_relative_to_parent](functions-5.md#cur_obj_set_pos_relative_to_parent) - - [cur_obj_enable_rendering_2](functions-5.md#cur_obj_enable_rendering_2) - - [cur_obj_unused_init_on_floor](functions-5.md#cur_obj_unused_init_on_floor) - - [obj_set_face_angle_to_move_angle](functions-5.md#obj_set_face_angle_to_move_angle) - - [get_object_list_from_behavior](functions-5.md#get_object_list_from_behavior) - - [cur_obj_nearest_object_with_behavior](functions-5.md#cur_obj_nearest_object_with_behavior) - - [cur_obj_dist_to_nearest_object_with_behavior](functions-5.md#cur_obj_dist_to_nearest_object_with_behavior) - - [cur_obj_find_nearest_pole](functions-5.md#cur_obj_find_nearest_pole) - - [cur_obj_find_nearest_object_with_behavior](functions-5.md#cur_obj_find_nearest_object_with_behavior) - - [cur_obj_count_objects_with_behavior](functions-5.md#cur_obj_count_objects_with_behavior) - - [find_unimportant_object](functions-5.md#find_unimportant_object) - - [count_unimportant_objects](functions-5.md#count_unimportant_objects) - - [count_objects_with_behavior](functions-5.md#count_objects_with_behavior) - - [find_object_with_behavior](functions-5.md#find_object_with_behavior) - - [cur_obj_find_nearby_held_actor](functions-5.md#cur_obj_find_nearby_held_actor) - - [cur_obj_reset_timer_and_subaction](functions-5.md#cur_obj_reset_timer_and_subaction) - - [cur_obj_change_action](functions-5.md#cur_obj_change_action) - - [cur_obj_set_vel_from_mario_vel](functions-5.md#cur_obj_set_vel_from_mario_vel) - - [cur_obj_reverse_animation](functions-5.md#cur_obj_reverse_animation) - - [cur_obj_extend_animation_if_at_end](functions-5.md#cur_obj_extend_animation_if_at_end) - - [cur_obj_check_if_near_animation_end](functions-5.md#cur_obj_check_if_near_animation_end) - - [cur_obj_check_if_at_animation_end](functions-5.md#cur_obj_check_if_at_animation_end) - - [cur_obj_check_anim_frame](functions-5.md#cur_obj_check_anim_frame) - - [cur_obj_check_anim_frame_in_range](functions-5.md#cur_obj_check_anim_frame_in_range) - - [cur_obj_check_frame_prior_current_frame](functions-5.md#cur_obj_check_frame_prior_current_frame) - - [mario_is_in_air_action](functions-5.md#mario_is_in_air_action) - - [mario_is_dive_sliding](functions-5.md#mario_is_dive_sliding) - - [cur_obj_set_y_vel_and_animation](functions-5.md#cur_obj_set_y_vel_and_animation) - - [cur_obj_unrender_and_reset_state](functions-5.md#cur_obj_unrender_and_reset_state) - - [cur_obj_move_after_thrown_or_dropped](functions-5.md#cur_obj_move_after_thrown_or_dropped) - - [cur_obj_get_thrown_or_placed](functions-5.md#cur_obj_get_thrown_or_placed) - - [cur_obj_get_dropped](functions-5.md#cur_obj_get_dropped) - - [mario_set_flag](functions-5.md#mario_set_flag) - - [cur_obj_clear_interact_status_flag](functions-5.md#cur_obj_clear_interact_status_flag) - - [obj_mark_for_deletion](functions-5.md#obj_mark_for_deletion) - - [cur_obj_disable](functions-5.md#cur_obj_disable) - - [cur_obj_become_intangible](functions-5.md#cur_obj_become_intangible) - - [cur_obj_become_tangible](functions-5.md#cur_obj_become_tangible) - - [obj_become_tangible](functions-5.md#obj_become_tangible) - - [cur_obj_update_floor_height](functions-5.md#cur_obj_update_floor_height) - - [cur_obj_update_floor_height_and_get_floor](functions-5.md#cur_obj_update_floor_height_and_get_floor) - - [apply_drag_to_value](functions-5.md#apply_drag_to_value) - - [cur_obj_apply_drag_xz](functions-5.md#cur_obj_apply_drag_xz) - - [cur_obj_move_xz](functions-5.md#cur_obj_move_xz) - - [cur_obj_move_update_underwater_flags](functions-5.md#cur_obj_move_update_underwater_flags) - - [cur_obj_move_update_ground_air_flags](functions-5.md#cur_obj_move_update_ground_air_flags) - - [cur_obj_move_y_and_get_water_level](functions-5.md#cur_obj_move_y_and_get_water_level) - - [cur_obj_move_y](functions-5.md#cur_obj_move_y) - - [cur_obj_unused_resolve_wall_collisions](functions-5.md#cur_obj_unused_resolve_wall_collisions) - - [abs_angle_diff](functions-5.md#abs_angle_diff) - - [cur_obj_move_xz_using_fvel_and_yaw](functions-5.md#cur_obj_move_xz_using_fvel_and_yaw) - - [cur_obj_move_y_with_terminal_vel](functions-5.md#cur_obj_move_y_with_terminal_vel) - - [cur_obj_compute_vel_xz](functions-5.md#cur_obj_compute_vel_xz) - - [increment_velocity_toward_range](functions-5.md#increment_velocity_toward_range) - - [obj_check_if_collided_with_object](functions-5.md#obj_check_if_collided_with_object) - - [cur_obj_set_behavior](functions-5.md#cur_obj_set_behavior) - - [obj_set_behavior](functions-5.md#obj_set_behavior) - - [cur_obj_has_behavior](functions-5.md#cur_obj_has_behavior) - - [obj_has_behavior](functions-5.md#obj_has_behavior) - - [cur_obj_lateral_dist_from_obj_to_home](functions-5.md#cur_obj_lateral_dist_from_obj_to_home) - - [cur_obj_lateral_dist_from_mario_to_home](functions-5.md#cur_obj_lateral_dist_from_mario_to_home) - - [cur_obj_lateral_dist_to_home](functions-5.md#cur_obj_lateral_dist_to_home) - - [cur_obj_outside_home_square](functions-5.md#cur_obj_outside_home_square) - - [cur_obj_outside_home_rectangle](functions-5.md#cur_obj_outside_home_rectangle) - - [cur_obj_set_pos_to_home](functions-5.md#cur_obj_set_pos_to_home) - - [cur_obj_set_pos_to_home_and_stop](functions-5.md#cur_obj_set_pos_to_home_and_stop) - - [cur_obj_shake_y](functions-5.md#cur_obj_shake_y) - - [cur_obj_start_cam_event](functions-5.md#cur_obj_start_cam_event) - - [set_mario_interact_hoot_if_in_range](functions-5.md#set_mario_interact_hoot_if_in_range) - - [obj_set_billboard](functions-5.md#obj_set_billboard) - - [obj_set_cylboard](functions-5.md#obj_set_cylboard) - - [cur_obj_set_billboard_if_vanilla_cam](functions-5.md#cur_obj_set_billboard_if_vanilla_cam) - - [obj_set_hitbox_radius_and_height](functions-5.md#obj_set_hitbox_radius_and_height) - - [obj_set_hurtbox_radius_and_height](functions-5.md#obj_set_hurtbox_radius_and_height) - - [cur_obj_set_hitbox_radius_and_height](functions-5.md#cur_obj_set_hitbox_radius_and_height) - - [cur_obj_set_hurtbox_radius_and_height](functions-5.md#cur_obj_set_hurtbox_radius_and_height) - - [obj_spawn_loot_coins](functions-5.md#obj_spawn_loot_coins) - - [obj_spawn_loot_blue_coins](functions-5.md#obj_spawn_loot_blue_coins) - - [obj_spawn_loot_yellow_coins](functions-5.md#obj_spawn_loot_yellow_coins) - - [cur_obj_spawn_loot_coin_at_mario_pos](functions-5.md#cur_obj_spawn_loot_coin_at_mario_pos) - - [cur_obj_abs_y_dist_to_home](functions-5.md#cur_obj_abs_y_dist_to_home) - - [cur_obj_advance_looping_anim](functions-5.md#cur_obj_advance_looping_anim) - - [cur_obj_detect_steep_floor](functions-5.md#cur_obj_detect_steep_floor) - - [cur_obj_resolve_wall_collisions](functions-5.md#cur_obj_resolve_wall_collisions) - - [cur_obj_update_floor](functions-5.md#cur_obj_update_floor) - - [cur_obj_update_floor_and_resolve_wall_collisions](functions-5.md#cur_obj_update_floor_and_resolve_wall_collisions) - - [cur_obj_update_floor_and_walls](functions-5.md#cur_obj_update_floor_and_walls) - - [cur_obj_move_standard](functions-5.md#cur_obj_move_standard) - - [cur_obj_within_12k_bounds](functions-5.md#cur_obj_within_12k_bounds) - - [cur_obj_move_using_vel_and_gravity](functions-5.md#cur_obj_move_using_vel_and_gravity) - - [cur_obj_move_using_fvel_and_gravity](functions-5.md#cur_obj_move_using_fvel_and_gravity) - - [obj_set_pos_relative](functions-5.md#obj_set_pos_relative) - - [cur_obj_angle_to_home](functions-5.md#cur_obj_angle_to_home) - - [obj_set_gfx_pos_at_obj_pos](functions-5.md#obj_set_gfx_pos_at_obj_pos) - - [obj_translate_local](functions-5.md#obj_translate_local) - - [obj_build_transform_from_pos_and_angle](functions-5.md#obj_build_transform_from_pos_and_angle) - - [obj_set_throw_matrix_from_transform](functions-5.md#obj_set_throw_matrix_from_transform) - - [obj_build_transform_relative_to_parent](functions-5.md#obj_build_transform_relative_to_parent) - - [obj_create_transform_from_self](functions-5.md#obj_create_transform_from_self) - - [cur_obj_rotate_move_angle_using_vel](functions-5.md#cur_obj_rotate_move_angle_using_vel) - - [cur_obj_rotate_face_angle_using_vel](functions-5.md#cur_obj_rotate_face_angle_using_vel) - - [cur_obj_set_face_angle_to_move_angle](functions-5.md#cur_obj_set_face_angle_to_move_angle) - - [cur_obj_follow_path](functions-5.md#cur_obj_follow_path) - - [chain_segment_init](functions-5.md#chain_segment_init) - - [random_f32_around_zero](functions-5.md#random_f32_around_zero) - - [obj_scale_random](functions-5.md#obj_scale_random) - - [obj_translate_xyz_random](functions-5.md#obj_translate_xyz_random) - - [obj_translate_xz_random](functions-5.md#obj_translate_xz_random) - - [obj_build_vel_from_transform](functions-5.md#obj_build_vel_from_transform) - - [cur_obj_set_pos_via_transform](functions-5.md#cur_obj_set_pos_via_transform) - - [cur_obj_reflect_move_angle_off_wall](functions-5.md#cur_obj_reflect_move_angle_off_wall) - - [cur_obj_spawn_particles](functions-5.md#cur_obj_spawn_particles) - - [obj_set_hitbox](functions-5.md#obj_set_hitbox) - - [signum_positive](functions-5.md#signum_positive) - - [cur_obj_wait_then_blink](functions-5.md#cur_obj_wait_then_blink) - - [cur_obj_is_mario_ground_pounding_platform](functions-5.md#cur_obj_is_mario_ground_pounding_platform) - - [obj_is_mario_ground_pounding_platform](functions-5.md#obj_is_mario_ground_pounding_platform) - - [spawn_mist_particles](functions-5.md#spawn_mist_particles) - - [spawn_mist_particles_with_sound](functions-5.md#spawn_mist_particles_with_sound) - - [cur_obj_push_mario_away](functions-5.md#cur_obj_push_mario_away) - - [cur_obj_push_mario_away_from_cylinder](functions-5.md#cur_obj_push_mario_away_from_cylinder) - - [bhv_dust_smoke_loop](functions-5.md#bhv_dust_smoke_loop) - - [stub_obj_helpers_3](functions-5.md#stub_obj_helpers_3) - - [cur_obj_scale_over_time](functions-5.md#cur_obj_scale_over_time) - - [cur_obj_set_pos_to_home_with_debug](functions-5.md#cur_obj_set_pos_to_home_with_debug) - - [stub_obj_helpers_4](functions-5.md#stub_obj_helpers_4) - - [cur_obj_is_mario_on_platform](functions-5.md#cur_obj_is_mario_on_platform) - - [cur_obj_is_any_player_on_platform](functions-5.md#cur_obj_is_any_player_on_platform) - - [cur_obj_shake_y_until](functions-5.md#cur_obj_shake_y_until) - - [cur_obj_move_up_and_down](functions-5.md#cur_obj_move_up_and_down) - - [spawn_star_with_no_lvl_exit](functions-5.md#spawn_star_with_no_lvl_exit) - - [spawn_base_star_with_no_lvl_exit](functions-5.md#spawn_base_star_with_no_lvl_exit) - - [bit_shift_left](functions-5.md#bit_shift_left) - - [cur_obj_mario_far_away](functions-5.md#cur_obj_mario_far_away) - - [is_mario_moving_fast_or_in_air](functions-5.md#is_mario_moving_fast_or_in_air) - - [is_item_in_array](functions-5.md#is_item_in_array) - - [bhv_init_room](functions-5.md#bhv_init_room) - - [cur_obj_enable_rendering_if_mario_in_room](functions-5.md#cur_obj_enable_rendering_if_mario_in_room) - - [cur_obj_set_hitbox_and_die_if_attacked](functions-5.md#cur_obj_set_hitbox_and_die_if_attacked) - - [obj_explode_and_spawn_coins](functions-5.md#obj_explode_and_spawn_coins) - - [cur_obj_if_hit_wall_bounce_away](functions-5.md#cur_obj_if_hit_wall_bounce_away) - - [cur_obj_hide_if_mario_far_away_y](functions-5.md#cur_obj_hide_if_mario_far_away_y) - - [obj_is_hidden](functions-5.md#obj_is_hidden) - - [enable_time_stop](functions-5.md#enable_time_stop) - - [enable_time_stop_if_alone](functions-5.md#enable_time_stop_if_alone) - - [disable_time_stop](functions-5.md#disable_time_stop) - - [set_time_stop_flags](functions-5.md#set_time_stop_flags) - - [set_time_stop_flags_if_alone](functions-5.md#set_time_stop_flags_if_alone) - - [clear_time_stop_flags](functions-5.md#clear_time_stop_flags) - - [cur_obj_can_mario_activate_textbox](functions-5.md#cur_obj_can_mario_activate_textbox) - - [cur_obj_can_mario_activate_textbox_2](functions-5.md#cur_obj_can_mario_activate_textbox_2) - - [cur_obj_end_dialog](functions-5.md#cur_obj_end_dialog) - - [cur_obj_has_model](functions-5.md#cur_obj_has_model) - - [cur_obj_align_gfx_with_floor](functions-5.md#cur_obj_align_gfx_with_floor) - - [mario_is_within_rectangle](functions-5.md#mario_is_within_rectangle) - - [cur_obj_shake_screen](functions-5.md#cur_obj_shake_screen) - - [obj_attack_collided_from_other_object](functions-5.md#obj_attack_collided_from_other_object) - - [cur_obj_was_attacked_or_ground_pounded](functions-5.md#cur_obj_was_attacked_or_ground_pounded) - - [obj_copy_behavior_params](functions-5.md#obj_copy_behavior_params) - - [cur_obj_init_animation_and_anim_frame](functions-5.md#cur_obj_init_animation_and_anim_frame) - - [cur_obj_init_animation_and_check_if_near_end](functions-5.md#cur_obj_init_animation_and_check_if_near_end) - - [cur_obj_init_animation_and_extend_if_at_end](functions-5.md#cur_obj_init_animation_and_extend_if_at_end) - - [cur_obj_check_grabbed_mario](functions-5.md#cur_obj_check_grabbed_mario) - - [player_performed_grab_escape_action](functions-5.md#player_performed_grab_escape_action) - - [cur_obj_unused_play_footstep_sound](functions-5.md#cur_obj_unused_play_footstep_sound) - - [enable_time_stop_including_mario](functions-5.md#enable_time_stop_including_mario) - - [disable_time_stop_including_mario](functions-5.md#disable_time_stop_including_mario) - - [cur_obj_check_interacted](functions-5.md#cur_obj_check_interacted) - - [cur_obj_spawn_loot_blue_coin](functions-5.md#cur_obj_spawn_loot_blue_coin) - - [cur_obj_spawn_star_at_y_offset](functions-5.md#cur_obj_spawn_star_at_y_offset) - - [cur_obj_set_home_once](functions-5.md#cur_obj_set_home_once) - - [get_trajectory_length](functions-5.md#get_trajectory_length) + - [clear_move_flag](functions-6.md#clear_move_flag) + - [set_room_override](functions-6.md#set_room_override) + - [obj_update_pos_from_parent_transformation](functions-6.md#obj_update_pos_from_parent_transformation) + - [obj_apply_scale_to_matrix](functions-6.md#obj_apply_scale_to_matrix) + - [create_transformation_from_matrices](functions-6.md#create_transformation_from_matrices) + - [obj_set_held_state](functions-6.md#obj_set_held_state) + - [lateral_dist_between_objects](functions-6.md#lateral_dist_between_objects) + - [dist_between_objects](functions-6.md#dist_between_objects) + - [dist_between_object_and_point](functions-6.md#dist_between_object_and_point) + - [cur_obj_forward_vel_approach_upward](functions-6.md#cur_obj_forward_vel_approach_upward) + - [approach_f32_signed](functions-6.md#approach_f32_signed) + - [approach_f32_symmetric](functions-6.md#approach_f32_symmetric) + - [approach_s16_symmetric](functions-6.md#approach_s16_symmetric) + - [cur_obj_rotate_yaw_toward](functions-6.md#cur_obj_rotate_yaw_toward) + - [obj_angle_to_object](functions-6.md#obj_angle_to_object) + - [obj_pitch_to_object](functions-6.md#obj_pitch_to_object) + - [obj_angle_to_point](functions-6.md#obj_angle_to_point) + - [obj_turn_toward_object](functions-6.md#obj_turn_toward_object) + - [obj_set_parent_relative_pos](functions-6.md#obj_set_parent_relative_pos) + - [obj_set_pos](functions-6.md#obj_set_pos) + - [obj_set_angle](functions-6.md#obj_set_angle) + - [obj_set_move_angle](functions-6.md#obj_set_move_angle) + - [obj_set_face_angle](functions-6.md#obj_set_face_angle) + - [obj_set_gfx_angle](functions-6.md#obj_set_gfx_angle) + - [obj_set_gfx_pos](functions-6.md#obj_set_gfx_pos) + - [obj_set_gfx_scale](functions-6.md#obj_set_gfx_scale) + - [spawn_water_droplet](functions-6.md#spawn_water_droplet) + - [obj_build_relative_transform](functions-6.md#obj_build_relative_transform) + - [cur_obj_move_using_vel](functions-6.md#cur_obj_move_using_vel) + - [obj_copy_graph_y_offset](functions-6.md#obj_copy_graph_y_offset) + - [obj_copy_pos_and_angle](functions-6.md#obj_copy_pos_and_angle) + - [obj_copy_pos](functions-6.md#obj_copy_pos) + - [obj_copy_angle](functions-6.md#obj_copy_angle) + - [obj_set_gfx_pos_from_pos](functions-6.md#obj_set_gfx_pos_from_pos) + - [obj_init_animation](functions-6.md#obj_init_animation) + - [linear_mtxf_mul_vec3f](functions-6.md#linear_mtxf_mul_vec3f) + - [linear_mtxf_transpose_mul_vec3f](functions-6.md#linear_mtxf_transpose_mul_vec3f) + - [obj_apply_scale_to_transform](functions-6.md#obj_apply_scale_to_transform) + - [obj_copy_scale](functions-6.md#obj_copy_scale) + - [obj_scale_xyz](functions-6.md#obj_scale_xyz) + - [obj_scale](functions-6.md#obj_scale) + - [cur_obj_scale](functions-6.md#cur_obj_scale) + - [cur_obj_init_animation](functions-6.md#cur_obj_init_animation) + - [cur_obj_init_animation_with_sound](functions-6.md#cur_obj_init_animation_with_sound) + - [obj_init_animation_with_accel_and_sound](functions-6.md#obj_init_animation_with_accel_and_sound) + - [cur_obj_init_animation_with_accel_and_sound](functions-6.md#cur_obj_init_animation_with_accel_and_sound) + - [cur_obj_enable_rendering_and_become_tangible](functions-6.md#cur_obj_enable_rendering_and_become_tangible) + - [cur_obj_enable_rendering](functions-6.md#cur_obj_enable_rendering) + - [cur_obj_disable_rendering_and_become_intangible](functions-6.md#cur_obj_disable_rendering_and_become_intangible) + - [cur_obj_disable_rendering](functions-6.md#cur_obj_disable_rendering) + - [cur_obj_unhide](functions-6.md#cur_obj_unhide) + - [cur_obj_hide](functions-6.md#cur_obj_hide) + - [cur_obj_set_pos_relative](functions-6.md#cur_obj_set_pos_relative) + - [cur_obj_set_pos_relative_to_parent](functions-6.md#cur_obj_set_pos_relative_to_parent) + - [cur_obj_enable_rendering_2](functions-6.md#cur_obj_enable_rendering_2) + - [cur_obj_unused_init_on_floor](functions-6.md#cur_obj_unused_init_on_floor) + - [obj_set_face_angle_to_move_angle](functions-6.md#obj_set_face_angle_to_move_angle) + - [get_object_list_from_behavior](functions-6.md#get_object_list_from_behavior) + - [cur_obj_nearest_object_with_behavior](functions-6.md#cur_obj_nearest_object_with_behavior) + - [cur_obj_dist_to_nearest_object_with_behavior](functions-6.md#cur_obj_dist_to_nearest_object_with_behavior) + - [cur_obj_find_nearest_pole](functions-6.md#cur_obj_find_nearest_pole) + - [cur_obj_find_nearest_object_with_behavior](functions-6.md#cur_obj_find_nearest_object_with_behavior) + - [cur_obj_count_objects_with_behavior](functions-6.md#cur_obj_count_objects_with_behavior) + - [find_unimportant_object](functions-6.md#find_unimportant_object) + - [count_unimportant_objects](functions-6.md#count_unimportant_objects) + - [count_objects_with_behavior](functions-6.md#count_objects_with_behavior) + - [find_object_with_behavior](functions-6.md#find_object_with_behavior) + - [cur_obj_find_nearby_held_actor](functions-6.md#cur_obj_find_nearby_held_actor) + - [cur_obj_reset_timer_and_subaction](functions-6.md#cur_obj_reset_timer_and_subaction) + - [cur_obj_change_action](functions-6.md#cur_obj_change_action) + - [cur_obj_set_vel_from_mario_vel](functions-6.md#cur_obj_set_vel_from_mario_vel) + - [cur_obj_reverse_animation](functions-6.md#cur_obj_reverse_animation) + - [cur_obj_extend_animation_if_at_end](functions-6.md#cur_obj_extend_animation_if_at_end) + - [cur_obj_check_if_near_animation_end](functions-6.md#cur_obj_check_if_near_animation_end) + - [cur_obj_check_if_at_animation_end](functions-6.md#cur_obj_check_if_at_animation_end) + - [cur_obj_check_anim_frame](functions-6.md#cur_obj_check_anim_frame) + - [cur_obj_check_anim_frame_in_range](functions-6.md#cur_obj_check_anim_frame_in_range) + - [cur_obj_check_frame_prior_current_frame](functions-6.md#cur_obj_check_frame_prior_current_frame) + - [mario_is_in_air_action](functions-6.md#mario_is_in_air_action) + - [mario_is_dive_sliding](functions-6.md#mario_is_dive_sliding) + - [cur_obj_set_y_vel_and_animation](functions-6.md#cur_obj_set_y_vel_and_animation) + - [cur_obj_unrender_and_reset_state](functions-6.md#cur_obj_unrender_and_reset_state) + - [cur_obj_move_after_thrown_or_dropped](functions-6.md#cur_obj_move_after_thrown_or_dropped) + - [cur_obj_get_thrown_or_placed](functions-6.md#cur_obj_get_thrown_or_placed) + - [cur_obj_get_dropped](functions-6.md#cur_obj_get_dropped) + - [mario_set_flag](functions-6.md#mario_set_flag) + - [cur_obj_clear_interact_status_flag](functions-6.md#cur_obj_clear_interact_status_flag) + - [obj_mark_for_deletion](functions-6.md#obj_mark_for_deletion) + - [cur_obj_disable](functions-6.md#cur_obj_disable) + - [cur_obj_become_intangible](functions-6.md#cur_obj_become_intangible) + - [cur_obj_become_tangible](functions-6.md#cur_obj_become_tangible) + - [obj_become_tangible](functions-6.md#obj_become_tangible) + - [cur_obj_update_floor_height](functions-6.md#cur_obj_update_floor_height) + - [cur_obj_update_floor_height_and_get_floor](functions-6.md#cur_obj_update_floor_height_and_get_floor) + - [apply_drag_to_value](functions-6.md#apply_drag_to_value) + - [cur_obj_apply_drag_xz](functions-6.md#cur_obj_apply_drag_xz) + - [cur_obj_move_xz](functions-6.md#cur_obj_move_xz) + - [cur_obj_move_update_underwater_flags](functions-6.md#cur_obj_move_update_underwater_flags) + - [cur_obj_move_update_ground_air_flags](functions-6.md#cur_obj_move_update_ground_air_flags) + - [cur_obj_move_y_and_get_water_level](functions-6.md#cur_obj_move_y_and_get_water_level) + - [cur_obj_move_y](functions-6.md#cur_obj_move_y) + - [cur_obj_unused_resolve_wall_collisions](functions-6.md#cur_obj_unused_resolve_wall_collisions) + - [abs_angle_diff](functions-6.md#abs_angle_diff) + - [cur_obj_move_xz_using_fvel_and_yaw](functions-6.md#cur_obj_move_xz_using_fvel_and_yaw) + - [cur_obj_move_y_with_terminal_vel](functions-6.md#cur_obj_move_y_with_terminal_vel) + - [cur_obj_compute_vel_xz](functions-6.md#cur_obj_compute_vel_xz) + - [increment_velocity_toward_range](functions-6.md#increment_velocity_toward_range) + - [obj_check_if_collided_with_object](functions-6.md#obj_check_if_collided_with_object) + - [cur_obj_set_behavior](functions-6.md#cur_obj_set_behavior) + - [obj_set_behavior](functions-6.md#obj_set_behavior) + - [cur_obj_has_behavior](functions-6.md#cur_obj_has_behavior) + - [obj_has_behavior](functions-6.md#obj_has_behavior) + - [cur_obj_lateral_dist_from_obj_to_home](functions-6.md#cur_obj_lateral_dist_from_obj_to_home) + - [cur_obj_lateral_dist_from_mario_to_home](functions-6.md#cur_obj_lateral_dist_from_mario_to_home) + - [cur_obj_lateral_dist_to_home](functions-6.md#cur_obj_lateral_dist_to_home) + - [cur_obj_outside_home_square](functions-6.md#cur_obj_outside_home_square) + - [cur_obj_outside_home_rectangle](functions-6.md#cur_obj_outside_home_rectangle) + - [cur_obj_set_pos_to_home](functions-6.md#cur_obj_set_pos_to_home) + - [cur_obj_set_pos_to_home_and_stop](functions-6.md#cur_obj_set_pos_to_home_and_stop) + - [cur_obj_shake_y](functions-6.md#cur_obj_shake_y) + - [cur_obj_start_cam_event](functions-6.md#cur_obj_start_cam_event) + - [set_mario_interact_hoot_if_in_range](functions-6.md#set_mario_interact_hoot_if_in_range) + - [obj_set_billboard](functions-6.md#obj_set_billboard) + - [obj_set_cylboard](functions-6.md#obj_set_cylboard) + - [cur_obj_set_billboard_if_vanilla_cam](functions-6.md#cur_obj_set_billboard_if_vanilla_cam) + - [obj_set_hitbox_radius_and_height](functions-6.md#obj_set_hitbox_radius_and_height) + - [obj_set_hurtbox_radius_and_height](functions-6.md#obj_set_hurtbox_radius_and_height) + - [cur_obj_set_hitbox_radius_and_height](functions-6.md#cur_obj_set_hitbox_radius_and_height) + - [cur_obj_set_hurtbox_radius_and_height](functions-6.md#cur_obj_set_hurtbox_radius_and_height) + - [obj_spawn_loot_coins](functions-6.md#obj_spawn_loot_coins) + - [obj_spawn_loot_blue_coins](functions-6.md#obj_spawn_loot_blue_coins) + - [obj_spawn_loot_yellow_coins](functions-6.md#obj_spawn_loot_yellow_coins) + - [cur_obj_spawn_loot_coin_at_mario_pos](functions-6.md#cur_obj_spawn_loot_coin_at_mario_pos) + - [cur_obj_abs_y_dist_to_home](functions-6.md#cur_obj_abs_y_dist_to_home) + - [cur_obj_advance_looping_anim](functions-6.md#cur_obj_advance_looping_anim) + - [cur_obj_detect_steep_floor](functions-6.md#cur_obj_detect_steep_floor) + - [cur_obj_resolve_wall_collisions](functions-6.md#cur_obj_resolve_wall_collisions) + - [cur_obj_update_floor](functions-6.md#cur_obj_update_floor) + - [cur_obj_update_floor_and_resolve_wall_collisions](functions-6.md#cur_obj_update_floor_and_resolve_wall_collisions) + - [cur_obj_update_floor_and_walls](functions-6.md#cur_obj_update_floor_and_walls) + - [cur_obj_move_standard](functions-6.md#cur_obj_move_standard) + - [cur_obj_within_12k_bounds](functions-6.md#cur_obj_within_12k_bounds) + - [cur_obj_move_using_vel_and_gravity](functions-6.md#cur_obj_move_using_vel_and_gravity) + - [cur_obj_move_using_fvel_and_gravity](functions-6.md#cur_obj_move_using_fvel_and_gravity) + - [obj_set_pos_relative](functions-6.md#obj_set_pos_relative) + - [cur_obj_angle_to_home](functions-6.md#cur_obj_angle_to_home) + - [obj_set_gfx_pos_at_obj_pos](functions-6.md#obj_set_gfx_pos_at_obj_pos) + - [obj_translate_local](functions-6.md#obj_translate_local) + - [obj_build_transform_from_pos_and_angle](functions-6.md#obj_build_transform_from_pos_and_angle) + - [obj_set_throw_matrix_from_transform](functions-6.md#obj_set_throw_matrix_from_transform) + - [obj_build_transform_relative_to_parent](functions-6.md#obj_build_transform_relative_to_parent) + - [obj_create_transform_from_self](functions-6.md#obj_create_transform_from_self) + - [cur_obj_rotate_move_angle_using_vel](functions-6.md#cur_obj_rotate_move_angle_using_vel) + - [cur_obj_rotate_face_angle_using_vel](functions-6.md#cur_obj_rotate_face_angle_using_vel) + - [cur_obj_set_face_angle_to_move_angle](functions-6.md#cur_obj_set_face_angle_to_move_angle) + - [cur_obj_follow_path](functions-6.md#cur_obj_follow_path) + - [chain_segment_init](functions-6.md#chain_segment_init) + - [random_f32_around_zero](functions-6.md#random_f32_around_zero) + - [obj_scale_random](functions-6.md#obj_scale_random) + - [obj_translate_xyz_random](functions-6.md#obj_translate_xyz_random) + - [obj_translate_xz_random](functions-6.md#obj_translate_xz_random) + - [obj_build_vel_from_transform](functions-6.md#obj_build_vel_from_transform) + - [cur_obj_set_pos_via_transform](functions-6.md#cur_obj_set_pos_via_transform) + - [cur_obj_reflect_move_angle_off_wall](functions-6.md#cur_obj_reflect_move_angle_off_wall) + - [cur_obj_spawn_particles](functions-6.md#cur_obj_spawn_particles) + - [obj_set_hitbox](functions-6.md#obj_set_hitbox) + - [signum_positive](functions-6.md#signum_positive) + - [cur_obj_wait_then_blink](functions-6.md#cur_obj_wait_then_blink) + - [cur_obj_is_mario_ground_pounding_platform](functions-6.md#cur_obj_is_mario_ground_pounding_platform) + - [obj_is_mario_ground_pounding_platform](functions-6.md#obj_is_mario_ground_pounding_platform) + - [spawn_mist_particles](functions-6.md#spawn_mist_particles) + - [spawn_mist_particles_with_sound](functions-6.md#spawn_mist_particles_with_sound) + - [cur_obj_push_mario_away](functions-6.md#cur_obj_push_mario_away) + - [cur_obj_push_mario_away_from_cylinder](functions-6.md#cur_obj_push_mario_away_from_cylinder) + - [bhv_dust_smoke_loop](functions-6.md#bhv_dust_smoke_loop) + - [stub_obj_helpers_3](functions-6.md#stub_obj_helpers_3) + - [cur_obj_scale_over_time](functions-6.md#cur_obj_scale_over_time) + - [cur_obj_set_pos_to_home_with_debug](functions-6.md#cur_obj_set_pos_to_home_with_debug) + - [stub_obj_helpers_4](functions-6.md#stub_obj_helpers_4) + - [cur_obj_is_mario_on_platform](functions-6.md#cur_obj_is_mario_on_platform) + - [cur_obj_is_any_player_on_platform](functions-6.md#cur_obj_is_any_player_on_platform) + - [cur_obj_shake_y_until](functions-6.md#cur_obj_shake_y_until) + - [cur_obj_move_up_and_down](functions-6.md#cur_obj_move_up_and_down) + - [spawn_star_with_no_lvl_exit](functions-6.md#spawn_star_with_no_lvl_exit) + - [spawn_base_star_with_no_lvl_exit](functions-6.md#spawn_base_star_with_no_lvl_exit) + - [bit_shift_left](functions-6.md#bit_shift_left) + - [cur_obj_mario_far_away](functions-6.md#cur_obj_mario_far_away) + - [is_mario_moving_fast_or_in_air](functions-6.md#is_mario_moving_fast_or_in_air) + - [is_item_in_array](functions-6.md#is_item_in_array) + - [bhv_init_room](functions-6.md#bhv_init_room) + - [cur_obj_enable_rendering_if_mario_in_room](functions-6.md#cur_obj_enable_rendering_if_mario_in_room) + - [cur_obj_set_hitbox_and_die_if_attacked](functions-6.md#cur_obj_set_hitbox_and_die_if_attacked) + - [obj_explode_and_spawn_coins](functions-6.md#obj_explode_and_spawn_coins) + - [cur_obj_if_hit_wall_bounce_away](functions-6.md#cur_obj_if_hit_wall_bounce_away) + - [cur_obj_hide_if_mario_far_away_y](functions-6.md#cur_obj_hide_if_mario_far_away_y) + - [obj_is_hidden](functions-6.md#obj_is_hidden) + - [enable_time_stop](functions-6.md#enable_time_stop) + - [enable_time_stop_if_alone](functions-6.md#enable_time_stop_if_alone) + - [disable_time_stop](functions-6.md#disable_time_stop) + - [set_time_stop_flags](functions-6.md#set_time_stop_flags) + - [set_time_stop_flags_if_alone](functions-6.md#set_time_stop_flags_if_alone) + - [clear_time_stop_flags](functions-6.md#clear_time_stop_flags) + - [cur_obj_can_mario_activate_textbox](functions-6.md#cur_obj_can_mario_activate_textbox) + - [cur_obj_can_mario_activate_textbox_2](functions-6.md#cur_obj_can_mario_activate_textbox_2) + - [cur_obj_end_dialog](functions-6.md#cur_obj_end_dialog) + - [cur_obj_has_model](functions-6.md#cur_obj_has_model) + - [cur_obj_align_gfx_with_floor](functions-6.md#cur_obj_align_gfx_with_floor) + - [mario_is_within_rectangle](functions-6.md#mario_is_within_rectangle) + - [cur_obj_shake_screen](functions-6.md#cur_obj_shake_screen) + - [obj_attack_collided_from_other_object](functions-6.md#obj_attack_collided_from_other_object) + - [cur_obj_was_attacked_or_ground_pounded](functions-6.md#cur_obj_was_attacked_or_ground_pounded) + - [obj_copy_behavior_params](functions-6.md#obj_copy_behavior_params) + - [cur_obj_init_animation_and_anim_frame](functions-6.md#cur_obj_init_animation_and_anim_frame) + - [cur_obj_init_animation_and_check_if_near_end](functions-6.md#cur_obj_init_animation_and_check_if_near_end) + - [cur_obj_init_animation_and_extend_if_at_end](functions-6.md#cur_obj_init_animation_and_extend_if_at_end) + - [cur_obj_check_grabbed_mario](functions-6.md#cur_obj_check_grabbed_mario) + - [player_performed_grab_escape_action](functions-6.md#player_performed_grab_escape_action) + - [cur_obj_unused_play_footstep_sound](functions-6.md#cur_obj_unused_play_footstep_sound) + - [enable_time_stop_including_mario](functions-6.md#enable_time_stop_including_mario) + - [disable_time_stop_including_mario](functions-6.md#disable_time_stop_including_mario) + - [cur_obj_check_interacted](functions-6.md#cur_obj_check_interacted) + - [cur_obj_spawn_loot_blue_coin](functions-6.md#cur_obj_spawn_loot_blue_coin) + - [cur_obj_spawn_star_at_y_offset](functions-6.md#cur_obj_spawn_star_at_y_offset) + - [cur_obj_set_home_once](functions-6.md#cur_obj_set_home_once) + - [get_trajectory_length](functions-6.md#get_trajectory_length)
@@ -1784,6 +1787,7 @@ - [save_file_get_course_coin_score](functions-6.md#save_file_get_course_coin_score) - [save_file_set_course_coin_score](functions-6.md#save_file_set_course_coin_score) - [save_file_is_cannon_unlocked](functions-6.md#save_file_is_cannon_unlocked) + - [save_file_set_cannon_unlocked](functions-6.md#save_file_set_cannon_unlocked) - [save_file_get_cap_pos](functions-6.md#save_file_get_cap_pos) - [save_file_get_sound_mode](functions-6.md#save_file_get_sound_mode) @@ -1956,239 +1960,248 @@
- smlua_level_utils.h - - [smlua_level_util_change_area](functions-6.md#smlua_level_util_change_area) - - [smlua_level_util_get_info](functions-6.md#smlua_level_util_get_info) - - [smlua_level_util_get_info_from_short_name](functions-6.md#smlua_level_util_get_info_from_short_name) - - [smlua_level_util_get_info_from_course_num](functions-6.md#smlua_level_util_get_info_from_course_num) - - [level_register](functions-6.md#level_register) - - [level_is_vanilla_level](functions-6.md#level_is_vanilla_level) - - [warp_to_warpnode](functions-6.md#warp_to_warpnode) - - [warp_to_level](functions-6.md#warp_to_level) - - [warp_restart_level](functions-6.md#warp_restart_level) - - [warp_to_start_level](functions-6.md#warp_to_start_level) - - [warp_exit_level](functions-6.md#warp_exit_level) - - [warp_to_castle](functions-6.md#warp_to_castle) + - [smlua_level_util_change_area](functions-7.md#smlua_level_util_change_area) + - [smlua_level_util_get_info](functions-7.md#smlua_level_util_get_info) + - [smlua_level_util_get_info_from_short_name](functions-7.md#smlua_level_util_get_info_from_short_name) + - [smlua_level_util_get_info_from_course_num](functions-7.md#smlua_level_util_get_info_from_course_num) + - [level_register](functions-7.md#level_register) + - [level_is_vanilla_level](functions-7.md#level_is_vanilla_level) + - [warp_to_warpnode](functions-7.md#warp_to_warpnode) + - [warp_to_level](functions-7.md#warp_to_level) + - [warp_restart_level](functions-7.md#warp_restart_level) + - [warp_to_start_level](functions-7.md#warp_to_start_level) + - [warp_exit_level](functions-7.md#warp_exit_level) + - [warp_to_castle](functions-7.md#warp_to_castle)
- smlua_misc_utils.h - - [get_network_area_timer](functions-6.md#get_network_area_timer) - - [get_area_update_counter](functions-6.md#get_area_update_counter) - - [get_temp_s32_pointer](functions-6.md#get_temp_s32_pointer) - - [deref_s32_pointer](functions-6.md#deref_s32_pointer) - - [djui_popup_create_global](functions-6.md#djui_popup_create_global) - - [djui_is_popup_disabled](functions-6.md#djui_is_popup_disabled) - - [djui_set_popup_disabled_override](functions-6.md#djui_set_popup_disabled_override) - - [djui_reset_popup_disabled_override](functions-6.md#djui_reset_popup_disabled_override) - - [djui_is_playerlist_open](functions-6.md#djui_is_playerlist_open) - - [djui_attempting_to_open_playerlist](functions-6.md#djui_attempting_to_open_playerlist) - - [djui_get_playerlist_page_index](functions-6.md#djui_get_playerlist_page_index) - - [djui_menu_get_font](functions-6.md#djui_menu_get_font) - - [djui_menu_get_theme](functions-6.md#djui_menu_get_theme) - - [djui_is_playerlist_ping_visible](functions-6.md#djui_is_playerlist_ping_visible) - - [get_dialog_box_state](functions-6.md#get_dialog_box_state) - - [get_dialog_id](functions-6.md#get_dialog_id) - - [get_last_star_or_key](functions-6.md#get_last_star_or_key) - - [set_last_star_or_key](functions-6.md#set_last_star_or_key) - - [get_last_completed_course_num](functions-6.md#get_last_completed_course_num) - - [set_last_completed_course_num](functions-6.md#set_last_completed_course_num) - - [get_last_completed_star_num](functions-6.md#get_last_completed_star_num) - - [set_last_completed_star_num](functions-6.md#set_last_completed_star_num) - - [get_got_file_coin_hi_score](functions-6.md#get_got_file_coin_hi_score) - - [set_got_file_coin_hi_score](functions-6.md#set_got_file_coin_hi_score) - - [get_save_file_modified](functions-6.md#get_save_file_modified) - - [set_save_file_modified](functions-6.md#set_save_file_modified) - - [hud_hide](functions-6.md#hud_hide) - - [hud_show](functions-6.md#hud_show) - - [hud_is_hidden](functions-6.md#hud_is_hidden) - - [hud_get_value](functions-6.md#hud_get_value) - - [hud_set_value](functions-6.md#hud_set_value) - - [hud_render_power_meter](functions-6.md#hud_render_power_meter) - - [hud_render_power_meter_interpolated](functions-6.md#hud_render_power_meter_interpolated) - - [hud_get_flash](functions-6.md#hud_get_flash) - - [hud_set_flash](functions-6.md#hud_set_flash) - - [act_select_hud_hide](functions-6.md#act_select_hud_hide) - - [act_select_hud_show](functions-6.md#act_select_hud_show) - - [act_select_hud_is_hidden](functions-6.md#act_select_hud_is_hidden) - - [is_game_paused](functions-6.md#is_game_paused) - - [is_transition_playing](functions-6.md#is_transition_playing) - - [allocate_mario_action](functions-6.md#allocate_mario_action) - - [get_hand_foot_pos_x](functions-6.md#get_hand_foot_pos_x) - - [get_hand_foot_pos_y](functions-6.md#get_hand_foot_pos_y) - - [get_hand_foot_pos_z](functions-6.md#get_hand_foot_pos_z) - - [get_mario_anim_part_pos](functions-6.md#get_mario_anim_part_pos) - - [get_current_save_file_num](functions-6.md#get_current_save_file_num) - - [save_file_get_using_backup_slot](functions-6.md#save_file_get_using_backup_slot) - - [save_file_set_using_backup_slot](functions-6.md#save_file_set_using_backup_slot) - - [movtexqc_register](functions-6.md#movtexqc_register) - - [get_water_level](functions-6.md#get_water_level) - - [set_water_level](functions-6.md#set_water_level) - - [course_is_main_course](functions-6.md#course_is_main_course) - - [get_ttc_speed_setting](functions-6.md#get_ttc_speed_setting) - - [set_ttc_speed_setting](functions-6.md#set_ttc_speed_setting) - - [get_time](functions-6.md#get_time) - - [get_date_and_time](functions-6.md#get_date_and_time) - - [get_envfx](functions-6.md#get_envfx) - - [set_override_envfx](functions-6.md#set_override_envfx) - - [get_global_timer](functions-6.md#get_global_timer) - - [get_dialog_response](functions-6.md#get_dialog_response) - - [get_local_discord_id](functions-6.md#get_local_discord_id) - - [get_coopnet_id](functions-6.md#get_coopnet_id) - - [get_volume_master](functions-6.md#get_volume_master) - - [get_volume_level](functions-6.md#get_volume_level) - - [get_volume_sfx](functions-6.md#get_volume_sfx) - - [get_volume_env](functions-6.md#get_volume_env) - - [set_volume_master](functions-6.md#set_volume_master) - - [set_volume_level](functions-6.md#set_volume_level) - - [set_volume_sfx](functions-6.md#set_volume_sfx) - - [set_volume_env](functions-6.md#set_volume_env) - - [get_environment_region](functions-6.md#get_environment_region) - - [set_environment_region](functions-6.md#set_environment_region) - - [mod_file_exists](functions-6.md#mod_file_exists) - - [get_active_mod](functions-6.md#get_active_mod) - - [set_window_title](functions-6.md#set_window_title) - - [reset_window_title](functions-6.md#reset_window_title) - - [get_os_name](functions-6.md#get_os_name) - - [geo_get_current_root](functions-6.md#geo_get_current_root) - - [geo_get_current_master_list](functions-6.md#geo_get_current_master_list) - - [geo_get_current_perspective](functions-6.md#geo_get_current_perspective) - - [geo_get_current_camera](functions-6.md#geo_get_current_camera) - - [geo_get_current_held_object](functions-6.md#geo_get_current_held_object) - - [texture_to_lua_table](functions-6.md#texture_to_lua_table) - - [get_texture_name](functions-6.md#get_texture_name) + - [get_network_area_timer](functions-7.md#get_network_area_timer) + - [get_area_update_counter](functions-7.md#get_area_update_counter) + - [get_temp_s32_pointer](functions-7.md#get_temp_s32_pointer) + - [deref_s32_pointer](functions-7.md#deref_s32_pointer) + - [djui_popup_create_global](functions-7.md#djui_popup_create_global) + - [djui_is_popup_disabled](functions-7.md#djui_is_popup_disabled) + - [djui_set_popup_disabled_override](functions-7.md#djui_set_popup_disabled_override) + - [djui_reset_popup_disabled_override](functions-7.md#djui_reset_popup_disabled_override) + - [djui_is_playerlist_open](functions-7.md#djui_is_playerlist_open) + - [djui_attempting_to_open_playerlist](functions-7.md#djui_attempting_to_open_playerlist) + - [djui_get_playerlist_page_index](functions-7.md#djui_get_playerlist_page_index) + - [djui_is_chatbox_open](functions-7.md#djui_is_chatbox_open) + - [djui_menu_get_font](functions-7.md#djui_menu_get_font) + - [djui_menu_get_theme](functions-7.md#djui_menu_get_theme) + - [djui_is_playerlist_ping_visible](functions-7.md#djui_is_playerlist_ping_visible) + - [get_dialog_box_state](functions-7.md#get_dialog_box_state) + - [get_dialog_id](functions-7.md#get_dialog_id) + - [get_last_star_or_key](functions-7.md#get_last_star_or_key) + - [set_last_star_or_key](functions-7.md#set_last_star_or_key) + - [get_last_completed_course_num](functions-7.md#get_last_completed_course_num) + - [set_last_completed_course_num](functions-7.md#set_last_completed_course_num) + - [get_last_completed_star_num](functions-7.md#get_last_completed_star_num) + - [set_last_completed_star_num](functions-7.md#set_last_completed_star_num) + - [get_got_file_coin_hi_score](functions-7.md#get_got_file_coin_hi_score) + - [set_got_file_coin_hi_score](functions-7.md#set_got_file_coin_hi_score) + - [get_save_file_modified](functions-7.md#get_save_file_modified) + - [set_save_file_modified](functions-7.md#set_save_file_modified) + - [hud_hide](functions-7.md#hud_hide) + - [hud_show](functions-7.md#hud_show) + - [hud_is_hidden](functions-7.md#hud_is_hidden) + - [hud_get_value](functions-7.md#hud_get_value) + - [hud_set_value](functions-7.md#hud_set_value) + - [hud_render_power_meter](functions-7.md#hud_render_power_meter) + - [hud_render_power_meter_interpolated](functions-7.md#hud_render_power_meter_interpolated) + - [hud_get_flash](functions-7.md#hud_get_flash) + - [hud_set_flash](functions-7.md#hud_set_flash) + - [act_select_hud_hide](functions-7.md#act_select_hud_hide) + - [act_select_hud_show](functions-7.md#act_select_hud_show) + - [act_select_hud_is_hidden](functions-7.md#act_select_hud_is_hidden) + - [is_game_paused](functions-7.md#is_game_paused) + - [is_pause_menu_hidden](functions-7.md#is_pause_menu_hidden) + - [set_pause_menu_hidden](functions-7.md#set_pause_menu_hidden) + - [game_pause](functions-7.md#game_pause) + - [game_unpause](functions-7.md#game_unpause) + - [is_transition_playing](functions-7.md#is_transition_playing) + - [allocate_mario_action](functions-7.md#allocate_mario_action) + - [get_hand_foot_pos_x](functions-7.md#get_hand_foot_pos_x) + - [get_hand_foot_pos_y](functions-7.md#get_hand_foot_pos_y) + - [get_hand_foot_pos_z](functions-7.md#get_hand_foot_pos_z) + - [get_mario_anim_part_pos](functions-7.md#get_mario_anim_part_pos) + - [get_current_save_file_num](functions-7.md#get_current_save_file_num) + - [save_file_get_using_backup_slot](functions-7.md#save_file_get_using_backup_slot) + - [save_file_set_using_backup_slot](functions-7.md#save_file_set_using_backup_slot) + - [movtexqc_register](functions-7.md#movtexqc_register) + - [get_water_level](functions-7.md#get_water_level) + - [set_water_level](functions-7.md#set_water_level) + - [course_is_main_course](functions-7.md#course_is_main_course) + - [get_ttc_speed_setting](functions-7.md#get_ttc_speed_setting) + - [set_ttc_speed_setting](functions-7.md#set_ttc_speed_setting) + - [get_time](functions-7.md#get_time) + - [get_date_and_time](functions-7.md#get_date_and_time) + - [get_envfx](functions-7.md#get_envfx) + - [set_override_envfx](functions-7.md#set_override_envfx) + - [get_global_timer](functions-7.md#get_global_timer) + - [get_dialog_response](functions-7.md#get_dialog_response) + - [get_local_discord_id](functions-7.md#get_local_discord_id) + - [get_coopnet_id](functions-7.md#get_coopnet_id) + - [get_volume_master](functions-7.md#get_volume_master) + - [get_volume_level](functions-7.md#get_volume_level) + - [get_volume_sfx](functions-7.md#get_volume_sfx) + - [get_volume_env](functions-7.md#get_volume_env) + - [set_volume_master](functions-7.md#set_volume_master) + - [set_volume_level](functions-7.md#set_volume_level) + - [set_volume_sfx](functions-7.md#set_volume_sfx) + - [set_volume_env](functions-7.md#set_volume_env) + - [get_environment_region](functions-7.md#get_environment_region) + - [set_environment_region](functions-7.md#set_environment_region) + - [mod_file_exists](functions-7.md#mod_file_exists) + - [get_active_mod](functions-7.md#get_active_mod) + - [set_window_title](functions-7.md#set_window_title) + - [reset_window_title](functions-7.md#reset_window_title) + - [get_os_name](functions-7.md#get_os_name) + - [geo_get_current_root](functions-7.md#geo_get_current_root) + - [geo_get_current_master_list](functions-7.md#geo_get_current_master_list) + - [geo_get_current_perspective](functions-7.md#geo_get_current_perspective) + - [geo_get_current_camera](functions-7.md#geo_get_current_camera) + - [geo_get_current_held_object](functions-7.md#geo_get_current_held_object) + - [texture_to_lua_table](functions-7.md#texture_to_lua_table) + - [get_texture_name](functions-7.md#get_texture_name)
- smlua_model_utils.h - - [smlua_model_util_get_id](functions-6.md#smlua_model_util_get_id) + - [smlua_model_util_get_id](functions-7.md#smlua_model_util_get_id)
- smlua_obj_utils.h - - [spawn_sync_object](functions-6.md#spawn_sync_object) - - [spawn_non_sync_object](functions-6.md#spawn_non_sync_object) - - [obj_has_behavior_id](functions-6.md#obj_has_behavior_id) - - [obj_has_model_extended](functions-6.md#obj_has_model_extended) - - [obj_get_model_id_extended](functions-6.md#obj_get_model_id_extended) - - [obj_set_model_extended](functions-6.md#obj_set_model_extended) - - [get_trajectory](functions-6.md#get_trajectory) - - [geo_get_current_object](functions-6.md#geo_get_current_object) - - [get_current_object](functions-6.md#get_current_object) - - [get_dialog_object](functions-6.md#get_dialog_object) - - [get_cutscene_focus](functions-6.md#get_cutscene_focus) - - [get_secondary_camera_focus](functions-6.md#get_secondary_camera_focus) - - [set_cutscene_focus](functions-6.md#set_cutscene_focus) - - [set_secondary_camera_focus](functions-6.md#set_secondary_camera_focus) - - [obj_get_first](functions-6.md#obj_get_first) - - [obj_get_first_with_behavior_id](functions-6.md#obj_get_first_with_behavior_id) - - [obj_get_first_with_behavior_id_and_field_s32](functions-6.md#obj_get_first_with_behavior_id_and_field_s32) - - [obj_get_first_with_behavior_id_and_field_f32](functions-6.md#obj_get_first_with_behavior_id_and_field_f32) - - [obj_get_next](functions-6.md#obj_get_next) - - [obj_get_next_with_same_behavior_id](functions-6.md#obj_get_next_with_same_behavior_id) - - [obj_get_next_with_same_behavior_id_and_field_s32](functions-6.md#obj_get_next_with_same_behavior_id_and_field_s32) - - [obj_get_next_with_same_behavior_id_and_field_f32](functions-6.md#obj_get_next_with_same_behavior_id_and_field_f32) - - [obj_get_nearest_object_with_behavior_id](functions-6.md#obj_get_nearest_object_with_behavior_id) - - [obj_count_objects_with_behavior_id](functions-6.md#obj_count_objects_with_behavior_id) - - [obj_get_collided_object](functions-6.md#obj_get_collided_object) - - [obj_get_field_u32](functions-6.md#obj_get_field_u32) - - [obj_get_field_s32](functions-6.md#obj_get_field_s32) - - [obj_get_field_f32](functions-6.md#obj_get_field_f32) - - [obj_get_field_s16](functions-6.md#obj_get_field_s16) - - [obj_set_field_u32](functions-6.md#obj_set_field_u32) - - [obj_set_field_s32](functions-6.md#obj_set_field_s32) - - [obj_set_field_f32](functions-6.md#obj_set_field_f32) - - [obj_set_field_s16](functions-6.md#obj_set_field_s16) - - [obj_get_temp_spawn_particles_info](functions-6.md#obj_get_temp_spawn_particles_info) - - [get_temp_object_hitbox](functions-6.md#get_temp_object_hitbox) - - [obj_is_attackable](functions-6.md#obj_is_attackable) - - [obj_is_breakable_object](functions-6.md#obj_is_breakable_object) - - [obj_is_bully](functions-6.md#obj_is_bully) - - [obj_is_coin](functions-6.md#obj_is_coin) - - [obj_is_exclamation_box](functions-6.md#obj_is_exclamation_box) - - [obj_is_grabbable](functions-6.md#obj_is_grabbable) - - [obj_is_mushroom_1up](functions-6.md#obj_is_mushroom_1up) - - [obj_is_secret](functions-6.md#obj_is_secret) - - [obj_is_valid_for_interaction](functions-6.md#obj_is_valid_for_interaction) - - [obj_check_hitbox_overlap](functions-6.md#obj_check_hitbox_overlap) - - [obj_check_overlap_with_hitbox_params](functions-6.md#obj_check_overlap_with_hitbox_params) - - [obj_set_vel](functions-6.md#obj_set_vel) - - [obj_move_xyz](functions-6.md#obj_move_xyz) - - [set_whirlpools](functions-6.md#set_whirlpools) + - [spawn_sync_object](functions-7.md#spawn_sync_object) + - [spawn_non_sync_object](functions-7.md#spawn_non_sync_object) + - [obj_has_behavior_id](functions-7.md#obj_has_behavior_id) + - [obj_has_model_extended](functions-7.md#obj_has_model_extended) + - [obj_get_model_id_extended](functions-7.md#obj_get_model_id_extended) + - [obj_set_model_extended](functions-7.md#obj_set_model_extended) + - [get_trajectory](functions-7.md#get_trajectory) + - [geo_get_current_object](functions-7.md#geo_get_current_object) + - [get_current_object](functions-7.md#get_current_object) + - [get_dialog_object](functions-7.md#get_dialog_object) + - [get_cutscene_focus](functions-7.md#get_cutscene_focus) + - [get_secondary_camera_focus](functions-7.md#get_secondary_camera_focus) + - [set_cutscene_focus](functions-7.md#set_cutscene_focus) + - [set_secondary_camera_focus](functions-7.md#set_secondary_camera_focus) + - [obj_get_first](functions-7.md#obj_get_first) + - [obj_get_first_with_behavior_id](functions-7.md#obj_get_first_with_behavior_id) + - [obj_get_first_with_behavior_id_and_field_s32](functions-7.md#obj_get_first_with_behavior_id_and_field_s32) + - [obj_get_first_with_behavior_id_and_field_f32](functions-7.md#obj_get_first_with_behavior_id_and_field_f32) + - [obj_get_next](functions-7.md#obj_get_next) + - [obj_get_next_with_same_behavior_id](functions-7.md#obj_get_next_with_same_behavior_id) + - [obj_get_next_with_same_behavior_id_and_field_s32](functions-7.md#obj_get_next_with_same_behavior_id_and_field_s32) + - [obj_get_next_with_same_behavior_id_and_field_f32](functions-7.md#obj_get_next_with_same_behavior_id_and_field_f32) + - [obj_get_nearest_object_with_behavior_id](functions-7.md#obj_get_nearest_object_with_behavior_id) + - [obj_count_objects_with_behavior_id](functions-7.md#obj_count_objects_with_behavior_id) + - [obj_get_collided_object](functions-7.md#obj_get_collided_object) + - [obj_get_field_u32](functions-7.md#obj_get_field_u32) + - [obj_get_field_s32](functions-7.md#obj_get_field_s32) + - [obj_get_field_f32](functions-7.md#obj_get_field_f32) + - [obj_get_field_s16](functions-7.md#obj_get_field_s16) + - [obj_set_field_u32](functions-7.md#obj_set_field_u32) + - [obj_set_field_s32](functions-7.md#obj_set_field_s32) + - [obj_set_field_f32](functions-7.md#obj_set_field_f32) + - [obj_set_field_s16](functions-7.md#obj_set_field_s16) + - [obj_get_temp_spawn_particles_info](functions-7.md#obj_get_temp_spawn_particles_info) + - [obj_get_temp_water_droplet_params](functions-7.md#obj_get_temp_water_droplet_params) + - [get_temp_object_hitbox](functions-7.md#get_temp_object_hitbox) + - [obj_is_attackable](functions-7.md#obj_is_attackable) + - [obj_is_breakable_object](functions-7.md#obj_is_breakable_object) + - [obj_is_bully](functions-7.md#obj_is_bully) + - [obj_is_coin](functions-7.md#obj_is_coin) + - [obj_is_exclamation_box](functions-7.md#obj_is_exclamation_box) + - [obj_is_grabbable](functions-7.md#obj_is_grabbable) + - [obj_is_mushroom_1up](functions-7.md#obj_is_mushroom_1up) + - [obj_is_secret](functions-7.md#obj_is_secret) + - [obj_is_valid_for_interaction](functions-7.md#obj_is_valid_for_interaction) + - [obj_check_hitbox_overlap](functions-7.md#obj_check_hitbox_overlap) + - [obj_check_overlap_with_hitbox_params](functions-7.md#obj_check_overlap_with_hitbox_params) + - [obj_set_vel](functions-7.md#obj_set_vel) + - [obj_move_xyz](functions-7.md#obj_move_xyz) + - [set_whirlpools](functions-7.md#set_whirlpools)
- smlua_text_utils.h - - [smlua_text_utils_reset_all](functions-6.md#smlua_text_utils_reset_all) - - [smlua_text_utils_dialog_get](functions-6.md#smlua_text_utils_dialog_get) - - [smlua_text_utils_dialog_replace](functions-6.md#smlua_text_utils_dialog_replace) - - [smlua_text_utils_dialog_restore](functions-6.md#smlua_text_utils_dialog_restore) - - [smlua_text_utils_dialog_is_replaced](functions-6.md#smlua_text_utils_dialog_is_replaced) - - [smlua_text_utils_allocate_dialog](functions-6.md#smlua_text_utils_allocate_dialog) - - [smlua_text_utils_course_acts_replace](functions-6.md#smlua_text_utils_course_acts_replace) - - [smlua_text_utils_secret_star_replace](functions-6.md#smlua_text_utils_secret_star_replace) - - [smlua_text_utils_course_name_replace](functions-6.md#smlua_text_utils_course_name_replace) - - [smlua_text_utils_course_name_get](functions-6.md#smlua_text_utils_course_name_get) - - [smlua_text_utils_course_name_mod_index](functions-6.md#smlua_text_utils_course_name_mod_index) - - [smlua_text_utils_course_name_reset](functions-6.md#smlua_text_utils_course_name_reset) - - [smlua_text_utils_act_name_replace](functions-6.md#smlua_text_utils_act_name_replace) - - [smlua_text_utils_act_name_get](functions-6.md#smlua_text_utils_act_name_get) - - [smlua_text_utils_act_name_mod_index](functions-6.md#smlua_text_utils_act_name_mod_index) - - [smlua_text_utils_act_name_reset](functions-6.md#smlua_text_utils_act_name_reset) - - [smlua_text_utils_castle_secret_stars_replace](functions-6.md#smlua_text_utils_castle_secret_stars_replace) - - [smlua_text_utils_castle_secret_stars_get](functions-6.md#smlua_text_utils_castle_secret_stars_get) - - [smlua_text_utils_castle_secret_stars_mod_index](functions-6.md#smlua_text_utils_castle_secret_stars_mod_index) - - [smlua_text_utils_castle_secret_stars_reset](functions-6.md#smlua_text_utils_castle_secret_stars_reset) - - [smlua_text_utils_extra_text_replace](functions-6.md#smlua_text_utils_extra_text_replace) - - [smlua_text_utils_extra_text_get](functions-6.md#smlua_text_utils_extra_text_get) - - [smlua_text_utils_extra_text_mod_index](functions-6.md#smlua_text_utils_extra_text_mod_index) - - [smlua_text_utils_extra_text_reset](functions-6.md#smlua_text_utils_extra_text_reset) - - [smlua_text_utils_get_language](functions-6.md#smlua_text_utils_get_language) + - [smlua_text_utils_reset_all](functions-7.md#smlua_text_utils_reset_all) + - [smlua_text_utils_dialog_get](functions-7.md#smlua_text_utils_dialog_get) + - [smlua_text_utils_dialog_replace](functions-7.md#smlua_text_utils_dialog_replace) + - [smlua_text_utils_dialog_restore](functions-7.md#smlua_text_utils_dialog_restore) + - [smlua_text_utils_dialog_is_replaced](functions-7.md#smlua_text_utils_dialog_is_replaced) + - [smlua_text_utils_allocate_dialog](functions-7.md#smlua_text_utils_allocate_dialog) + - [smlua_text_utils_course_acts_replace](functions-7.md#smlua_text_utils_course_acts_replace) + - [smlua_text_utils_secret_star_replace](functions-7.md#smlua_text_utils_secret_star_replace) + - [smlua_text_utils_course_name_replace](functions-7.md#smlua_text_utils_course_name_replace) + - [smlua_text_utils_course_name_get](functions-7.md#smlua_text_utils_course_name_get) + - [smlua_text_utils_course_name_mod_index](functions-7.md#smlua_text_utils_course_name_mod_index) + - [smlua_text_utils_course_name_reset](functions-7.md#smlua_text_utils_course_name_reset) + - [smlua_text_utils_act_name_replace](functions-7.md#smlua_text_utils_act_name_replace) + - [smlua_text_utils_act_name_get](functions-7.md#smlua_text_utils_act_name_get) + - [smlua_text_utils_act_name_mod_index](functions-7.md#smlua_text_utils_act_name_mod_index) + - [smlua_text_utils_act_name_reset](functions-7.md#smlua_text_utils_act_name_reset) + - [smlua_text_utils_castle_secret_stars_replace](functions-7.md#smlua_text_utils_castle_secret_stars_replace) + - [smlua_text_utils_castle_secret_stars_get](functions-7.md#smlua_text_utils_castle_secret_stars_get) + - [smlua_text_utils_castle_secret_stars_mod_index](functions-7.md#smlua_text_utils_castle_secret_stars_mod_index) + - [smlua_text_utils_castle_secret_stars_reset](functions-7.md#smlua_text_utils_castle_secret_stars_reset) + - [smlua_text_utils_extra_text_replace](functions-7.md#smlua_text_utils_extra_text_replace) + - [smlua_text_utils_extra_text_get](functions-7.md#smlua_text_utils_extra_text_get) + - [smlua_text_utils_extra_text_mod_index](functions-7.md#smlua_text_utils_extra_text_mod_index) + - [smlua_text_utils_extra_text_reset](functions-7.md#smlua_text_utils_extra_text_reset) + - [smlua_text_utils_get_language](functions-7.md#smlua_text_utils_get_language)
- sound_init.h - - [reset_volume](functions-6.md#reset_volume) - - [raise_background_noise](functions-6.md#raise_background_noise) - - [lower_background_noise](functions-6.md#lower_background_noise) - - [disable_background_sound](functions-6.md#disable_background_sound) - - [enable_background_sound](functions-6.md#enable_background_sound) - - [play_menu_sounds](functions-6.md#play_menu_sounds) - - [play_painting_eject_sound](functions-6.md#play_painting_eject_sound) - - [play_infinite_stairs_music](functions-6.md#play_infinite_stairs_music) - - [set_background_music](functions-6.md#set_background_music) - - [fadeout_music](functions-6.md#fadeout_music) - - [fadeout_level_music](functions-6.md#fadeout_level_music) - - [play_cutscene_music](functions-6.md#play_cutscene_music) - - [play_shell_music](functions-6.md#play_shell_music) - - [stop_shell_music](functions-6.md#stop_shell_music) - - [play_cap_music](functions-6.md#play_cap_music) - - [fadeout_cap_music](functions-6.md#fadeout_cap_music) - - [stop_cap_music](functions-6.md#stop_cap_music) + - [reset_volume](functions-7.md#reset_volume) + - [raise_background_noise](functions-7.md#raise_background_noise) + - [lower_background_noise](functions-7.md#lower_background_noise) + - [disable_background_sound](functions-7.md#disable_background_sound) + - [enable_background_sound](functions-7.md#enable_background_sound) + - [play_menu_sounds](functions-7.md#play_menu_sounds) + - [play_painting_eject_sound](functions-7.md#play_painting_eject_sound) + - [play_infinite_stairs_music](functions-7.md#play_infinite_stairs_music) + - [set_background_music](functions-7.md#set_background_music) + - [fadeout_music](functions-7.md#fadeout_music) + - [fadeout_level_music](functions-7.md#fadeout_level_music) + - [play_cutscene_music](functions-7.md#play_cutscene_music) + - [play_shell_music](functions-7.md#play_shell_music) + - [stop_shell_music](functions-7.md#stop_shell_music) + - [play_cap_music](functions-7.md#play_cap_music) + - [fadeout_cap_music](functions-7.md#fadeout_cap_music) + - [stop_cap_music](functions-7.md#stop_cap_music)
- spawn_sound.h - - [cur_obj_play_sound_1](functions-6.md#cur_obj_play_sound_1) - - [cur_obj_play_sound_2](functions-6.md#cur_obj_play_sound_2) - - [create_sound_spawner](functions-6.md#create_sound_spawner) - - [calc_dist_to_volume_range_1](functions-6.md#calc_dist_to_volume_range_1) - - [calc_dist_to_volume_range_2](functions-6.md#calc_dist_to_volume_range_2) + - [cur_obj_play_sound_1](functions-7.md#cur_obj_play_sound_1) + - [cur_obj_play_sound_2](functions-7.md#cur_obj_play_sound_2) + - [create_sound_spawner](functions-7.md#create_sound_spawner) + - [calc_dist_to_volume_range_1](functions-7.md#calc_dist_to_volume_range_1) + - [calc_dist_to_volume_range_2](functions-7.md#calc_dist_to_volume_range_2)
- surface_collision.h - - [find_wall_collisions](functions-6.md#find_wall_collisions) - - [find_ceil_height](functions-6.md#find_ceil_height) - - [find_floor_height](functions-6.md#find_floor_height) - - [find_water_level](functions-6.md#find_water_level) - - [find_poison_gas_level](functions-6.md#find_poison_gas_level) - - [set_find_wall_direction](functions-6.md#set_find_wall_direction) - - [closest_point_to_triangle](functions-6.md#closest_point_to_triangle) + - [find_wall_collisions](functions-7.md#find_wall_collisions) + - [find_ceil_height](functions-7.md#find_ceil_height) + - [find_floor_height](functions-7.md#find_floor_height) + - [find_water_level](functions-7.md#find_water_level) + - [find_poison_gas_level](functions-7.md#find_poison_gas_level) + - [set_find_wall_direction](functions-7.md#set_find_wall_direction) + - [closest_point_to_triangle](functions-7.md#closest_point_to_triangle)
- surface_load.h - [load_object_collision_model](functions-7.md#load_object_collision_model) + - [load_static_object_collision](functions-7.md#load_static_object_collision) + - [toggle_static_object_collision](functions-7.md#toggle_static_object_collision) + - [get_static_object_surface](functions-7.md#get_static_object_surface) - [obj_get_surface_from_index](functions-7.md#obj_get_surface_from_index) - [surface_has_force](functions-7.md#surface_has_force) diff --git a/docs/lua/guides/lighting-engine.md b/docs/lua/guides/lighting-engine.md index 54c5963cf..1805a4201 100644 --- a/docs/lua/guides/lighting-engine.md +++ b/docs/lua/guides/lighting-engine.md @@ -1,3 +1,5 @@ +## [:rewind: Lua Reference](../lua.md) + # How to use the Lighting Engine ## Section 1: Preparation diff --git a/docs/lua/guides/mario-state.md b/docs/lua/guides/mario-state.md index 7b215e650..f24cd0dd0 100644 --- a/docs/lua/guides/mario-state.md +++ b/docs/lua/guides/mario-state.md @@ -1,3 +1,5 @@ +## [:rewind: Lua Reference](../lua.md) + # How to use `gMarioStates` ## Section 1: What is `gMarioStates`? diff --git a/docs/lua/guides/modfs.md b/docs/lua/guides/modfs.md new file mode 100644 index 000000000..41be978bb --- /dev/null +++ b/docs/lua/guides/modfs.md @@ -0,0 +1,272 @@ +## [:rewind: Lua Reference](../lua.md) + +# ModFS + +`ModFS` enables a small, sandboxed file system for mods. It allows to store and retrieve binary and text files, no matter their content.
+Each mod has its own file system, and can allow other mods to read its files. + +
+ +## Specs + +### File system + +Each ModFS file system: +- Has a maximum size of **32 MB** (`MOD_FS_MAX_SIZE`). Files can be any size, as long as the cumulative sum of file sizes doesn't exceed this limit. +- Can store at most **512 files** (`MOD_FS_MAX_FILES`). +- Is stored on disk as a `.modfs` file, which is a ZIP file, containing all files written in it. + +The ModFS files are located in the `sav` directory at the usual save file location: +- Windows: `%appdata%/sm64coopdx` +- Linux: `~/.local/share/sm64coopdx` +- MacOS: `~/Library/Application Support/sm64coopdx` + +### Files + +- The maximum filepath length is **256 characters** (`MOD_FS_MAX_PATH`), including the NUL terminator. +- Filepaths have the following restrictions: + - Cannot start, end or have two or more consecutive `/` + - Can contain only valid ASCII characters, no `*` or `\` + - Cannot be called `properties.json` (this name is reserved for ModFS internal properties) + - Only the following extensions (and extension-less files) are allowed: + - text: `.txt`, `.json`, `.ini`, `.sav` + - actors: `.bin`, `.col` + - behaviors: `.bhv` + - textures: `.tex`, `.png` + - levels: `.lvl` + - audio: `.m64`, `.aiff`, `.mp3`, `.ogg` + +
+ +## [`ModFs`](../structs.md#ModFs) + +The object holding the file system of the mod. + +### Fields + +All fields are immutable. + +| Name | Type | +| ----- | ---- | +| mod | [Mod](../structs.md#Mod) | +| modPath | `string` | +| numFiles | `integer` | +| totalSize | `integer` | +| isPublic | `boolean` | + +Fields can be accessed in Lua with the dot `.` character: +```lua +print("The ModFS " .. modFs.modPath .. " contains " .. modFs.numFiles .. " files.") +``` + +### Methods + +| Name | Reference | +| ---- | --------- | +| get_filename | [`mod_fs_get_filename`](../functions-5.md#mod_fs_get_filename) | +| get_file | [`mod_fs_get_file`](../functions-5.md#mod_fs_get_file) | +| create_file | [`mod_fs_create_file`](../functions-5.md#mod_fs_create_file) | +| move_file | [`mod_fs_move_file`](../functions-5.md#mod_fs_move_file) | +| copy_file | [`mod_fs_copy_file`](../functions-5.md#mod_fs_copy_file) | +| delete_file | [`mod_fs_delete_file`](../functions-5.md#mod_fs_delete_file) | +| clear | [`mod_fs_clear`](../functions-5.md#mod_fs_clear) | +| save | [`mod_fs_save`](../functions-5.md#mod_fs_save) | +| delete | [`mod_fs_delete`](../functions-5.md#mod_fs_delete) | +| set_public | [`mod_fs_set_public`](../functions-5.md#mod_fs_set_public) | + +Methods can be called in Lua with the colon `:` character: +```lua +print("The first file of ModFS " .. modFs.modPath .. " is named " .. modFs:get_filename(0) .. ".") +``` + +
+ +## [`ModFsFile`](../structs.md#ModFsFile) + +A handle to a ModFS file. + +### Fields + +All fields are immutable. + +| Field | Type | +| ----- | ---- | +| modFs | [ModFs](../structs.md#ModFs) | +| filepath | `string` | +| size | `integer` | +| offset | `integer` | +| isText | `boolean` | +| isPublic | `boolean` | + +Fields can be accessed in Lua with the dot `.` character: +```lua +print("The ModFS file " .. file.filepath .. " is " .. file.size .. " bytes long.") +``` + +### Methods + +| Name | Reference | +| ---- | --------- | +| read_bool | [`mod_fs_file_read_bool`](../functions-5.md#mod_fs_file_read_bool) | +| read_integer | [`mod_fs_file_read_integer`](../functions-5.md#mod_fs_file_read_integer) | +| read_number | [`mod_fs_file_read_number`](../functions-5.md#mod_fs_file_read_number) | +| read_bytes | [`mod_fs_file_read_bytes`](../functions-5.md#mod_fs_file_read_bytes) | +| read_string | [`mod_fs_file_read_string`](../functions-5.md#mod_fs_file_read_string) | +| read_line | [`mod_fs_file_read_line`](../functions-5.md#mod_fs_file_read_line) | +| write_bool | [`mod_fs_file_write_bool`](../functions-5.md#mod_fs_file_write_bool) | +| write_integer | [`mod_fs_file_write_integer`](../functions-5.md#mod_fs_file_write_integer) | +| write_number | [`mod_fs_file_write_number`](../functions-5.md#mod_fs_file_write_number) | +| write_bytes | [`mod_fs_file_write_bytes`](../functions-5.md#mod_fs_file_write_bytes) | +| write_string | [`mod_fs_file_write_string`](../functions-5.md#mod_fs_file_write_string) | +| write_line | [`mod_fs_file_write_line`](../functions-5.md#mod_fs_file_write_line) | +| seek | [`mod_fs_file_seek`](../functions-5.md#mod_fs_file_seek) | +| rewind | [`mod_fs_file_rewind`](../functions-5.md#mod_fs_file_rewind) | +| is_eof | [`mod_fs_file_is_eof`](../functions-5.md#mod_fs_file_is_eof) | +| fill | [`mod_fs_file_fill`](../functions-5.md#mod_fs_file_fill) | +| erase | [`mod_fs_file_erase`](../functions-5.md#mod_fs_file_erase) | +| set_text_mode | [`mod_fs_file_set_text_mode`](../functions-5.md#mod_fs_file_set_text_mode) | +| set_public | [`mod_fs_file_set_public`](../functions-5.md#mod_fs_file_set_public) | + +Methods can be called in Lua with the colon `:` character: +```lua +file:erase(file.size) +print("The ModFS file " .. file.filepath .. " is now empty.") +``` + +
+ +## Error handling + +All errors coming from ModFS functions are not blocking. However, they appear in the console and raise the "Mod has script errors" message. + +- The function [`mod_fs_hide_errors`](../functions-5.md#mod_fs_hide_errors) can suppress the ModFS errors from the console. +- Use the function [`mod_fs_get_last_error`](../functions-5.md#mod_fs_get_last_error) to retrieve the last error raised by ModFS. This function always return an error message if an error occurred, even if errors are hidden. + +
+ +## Usage with other sm64coopdx features + +One of the strengths of this feature is its interactions with other existing features of sm64coopdx: +- Load models with `smlua_model_util_get_id` +- Load textures with `get_texture_info` +- Load collisions with `smlua_collision_util_get` +- Load sequences with `smlua_audio_utils_replace_sequence` +- Load audio streams with `audio_stream_load` +- Load audio samples with `audio_sample_load` + +These functions can take a **ModFS URI** as argument instead of a resource name.
+Generate a ModFS URI from a `ModFs` object with the following code: +```lua +local uri = string.format(MOD_FS_URI_FORMAT, modFs.modPath, "") +``` + +Here are some examples: + +```lua +-- Models +local custom_geo_uri = string.format(MOD_FS_URI_FORMAT, modFs.modPath, "custom_geo.bin") +local E_MODEL_CUSTOM = smlua_model_util_get_id(custom_geo_uri) + +-- Textures (both PNG and TEX) +local texture_png_uri = string.format(MOD_FS_URI_FORMAT, modFs.modPath, "texture.png") +local TEXTURE_PNG = get_texture_info(texture_png_uri) +local texture_tex_uri = string.format(MOD_FS_URI_FORMAT, modFs.modPath, "texture.tex") +local TEXTURE_TEX = get_texture_info(texture_tex_uri) + +-- Collisions +local custom_col_uri = string.format(MOD_FS_URI_FORMAT, modFs.modPath, "custom_col.col") +local COL_CUSTOM = smlua_collision_util_get(custom_col_uri) + +-- Sequences +local custom_m64_uri = string.format(MOD_FS_URI_FORMAT, modFs.modPath, "custom.m64") +smlua_audio_utils_replace_sequence(SEQ_LEVEL_GRASS, 0x11, 0x80, custom_m64_uri) + +-- Streams +local custom_stream_uri = string.format(MOD_FS_URI_FORMAT, modFs.modPath, "custom_stream.mp3") +local custom_stream = audio_stream_load(custom_stream_uri) + +-- Samples +local custom_sample_uri = string.format(MOD_FS_URI_FORMAT, modFs.modPath, "custom_sample.mp3") +local custom_sample = audio_sample_load(custom_sample_uri) +``` + +
+ +## Good practices + +### Always valid `ModFs` object + +Use the following piece of code to always retrieve a valid `ModFs` object: +```lua +local modFs = mod_fs_get() or mod_fs_create() +``` +If the ModFS for the current mod doesn't exist, it will create one. + +
+ +### Always valid `ModFsFile` object + +Use the following piece of code to always retrieve a valid `ModFsFile` object: +```lua +local file = modFs:get_file("myfile.txt") or modFs:create_file("myfile.txt", true) +``` +Like previously, if the file doesn't exist, it will create one.
+ +To make sure the file is empty when requested, add the following line to clear the existing file content. +```lua +file:erase(file.size) +``` + +
+ +### Correctly initialize a file + +The `get_file` method of a `ModFs` object opens a file only if the file is not loaded yet. Subsequent calls with the same filename will return the file handle without resetting its offset or mode.
+For example, one function could write to a file while another could read from the same file, so it's better to set the appropriate file offset and mode when it's needed before starting reading/writing: +```lua +local file = modFs:get_file("myfile.txt") +file:set_text_mode(true) -- Set mode to text +file:rewind() -- Reset offset to the beginning of the file +``` + +
+ +### Methods over functions + +Always use `ModFs` and `ModFsFile` objects methods over regular functions.
+It's more clear that way and helps to reduce errors: +```lua +-- Don't +local file = mod_fs_create_file(modFs, "myfile.txt", true) + +-- Do +local file = modFs:create_file("myfile.txt", true) +``` +```lua +-- Don't +mod_fs_file_write_string(file, "some text") + +-- Do +file:write_string("some text") +``` + +
+ +### Handle possible failures + +In addition to error messages that can be retrieved with [`mod_fs_get_last_error`](../functions-5.md#mod_fs_get_last_error), almost all ModFS functions have a boolean return value indicating if the function succeeded or failed. +```lua +if not modFs:delete_file("somefile") then + print(mod_fs_get_last_error()) +end +``` + +
+ +### Don't forget to save + +ModFS are not saved automatically when writing to files.
+The mod has to explicitly call the method `save` to save its ModFS on the disk. +```lua +modFs:save() +``` diff --git a/docs/lua/guides/object-lists.md b/docs/lua/guides/object-lists.md index 3a9ab5fbe..1d8a77ed8 100644 --- a/docs/lua/guides/object-lists.md +++ b/docs/lua/guides/object-lists.md @@ -1,3 +1,5 @@ +## [:rewind: Lua Reference](../lua.md) + # Every Behavior's Object List | Behavior | Object List | diff --git a/docs/lua/lua.md b/docs/lua/lua.md index 05d165769..553659b33 100644 --- a/docs/lua/lua.md +++ b/docs/lua/lua.md @@ -34,6 +34,8 @@ Save file locations: - [Hooks](guides/hooks.md) - [gMarioStates](guides/mario-state.md) - [Behavior Object Lists](guides/object-lists.md) +- [Lighting Engine](guides/lighting-engine.md) +- [ModFS](guides/modfs.md) ## Important notes on player indices @@ -69,7 +71,11 @@ All of this is a holdover from when there were only two players. It was a reason - [Custom HUD Texture](examples/custom-hud-texture) - [Custom Audio Test](examples/audio-test) - [Custom Texture Overriding](examples/texture-override) +- [Custom Animations (DynOS)](examples/custom-animations-dynos) +- [Custom Animations (Lua)](examples/custom-animations-lua) - [Bytestring Packet Example](examples/bytestring-packet-example.lua) +- [Gfx/Vtx Demo](examples/gfx-vtx-demo) +- [Lighting Engine Demo](examples/lighting-engine-demo) ## Example Lua mods (large) - [Hide and Seek Gamemode](../../mods/hide-and-seek.lua) diff --git a/docs/lua/structs.md b/docs/lua/structs.md index 4050f958e..77a0e5f89 100644 --- a/docs/lua/structs.md +++ b/docs/lua/structs.md @@ -3,25 +3,16 @@ # Supported Structs - [AnimInfo](#AnimInfo) - [Animation](#Animation) -- [AnimationTable](#AnimationTable) - [Area](#Area) - [BehaviorDialogs](#BehaviorDialogs) - [BehaviorTrajectories](#BehaviorTrajectories) - [BehaviorValues](#BehaviorValues) -- [BullyCollisionData](#BullyCollisionData) - [Camera](#Camera) -- [CameraFOVStatus](#CameraFOVStatus) -- [CameraOverride](#CameraOverride) -- [CameraStoredInfo](#CameraStoredInfo) -- [CameraTrigger](#CameraTrigger) - [ChainSegment](#ChainSegment) - [Character](#Character) - [Color](#Color) - [Controller](#Controller) - [CustomLevelInfo](#CustomLevelInfo) -- [Cutscene](#Cutscene) -- [CutsceneSplinePoint](#CutsceneSplinePoint) -- [CutsceneVariable](#CutsceneVariable) - [DateTime](#DateTime) - [DialogEntry](#DialogEntry) - [DisplayListNode](#DisplayListNode) @@ -32,7 +23,6 @@ - [DjuiThreePanelTheme](#DjuiThreePanelTheme) - [ExclamationBoxContent](#ExclamationBoxContent) - [FirstPersonCamera](#FirstPersonCamera) -- [FloorGeometry](#FloorGeometry) - [FnGraphNode](#FnGraphNode) - [Gfx](#Gfx) - [GlobalObjectAnimations](#GlobalObjectAnimations) @@ -63,53 +53,38 @@ - [GraphNodeSwitchCase](#GraphNodeSwitchCase) - [GraphNodeTranslation](#GraphNodeTranslation) - [GraphNodeTranslationRotation](#GraphNodeTranslationRotation) -- [GraphNode_802A45E4](#GraphNode_802A45E4) -- [HandheldShakePoint](#HandheldShakePoint) - [HudUtilsRotation](#HudUtilsRotation) - [InstantWarp](#InstantWarp) - [LakituState](#LakituState) - [LevelValues](#LevelValues) -- [LinearTransitionPoint](#LinearTransitionPoint) -- [MarioAnimDmaRelatedThing](#MarioAnimDmaRelatedThing) - [MarioAnimation](#MarioAnimation) - [MarioBodyState](#MarioBodyState) - [MarioState](#MarioState) - [Mat4](#Mat4) - [Mod](#Mod) - [ModAudio](#ModAudio) -- [ModAudioSampleCopies](#ModAudioSampleCopies) -- [ModFile](#ModFile) - [ModFs](#ModFs) - [ModFsFile](#ModFsFile) -- [ModeTransitionInfo](#ModeTransitionInfo) - [NametagsSettings](#NametagsSettings) - [NetworkPlayer](#NetworkPlayer) - [Object](#Object) - [ObjectHitbox](#ObjectHitbox) - [ObjectNode](#ObjectNode) - [ObjectWarpNode](#ObjectWarpNode) -- [OffsetSizePair](#OffsetSizePair) - [Painting](#Painting) -- [PaintingMeshVertex](#PaintingMeshVertex) - [PaintingValues](#PaintingValues) -- [ParallelTrackingPoint](#ParallelTrackingPoint) - [PlayerCameraState](#PlayerCameraState) -- [PlayerGeometry](#PlayerGeometry) - [PlayerPalette](#PlayerPalette) - [RayIntersectionInfo](#RayIntersectionInfo) - [RomhackCameraSettings](#RomhackCameraSettings) -- [SPTask](#SPTask) - [ServerSettings](#ServerSettings) -- [SoundState](#SoundState) - [SpawnInfo](#SpawnInfo) - [SpawnParticlesInfo](#SpawnParticlesInfo) - [StarPositions](#StarPositions) - [StarsNeededForDialog](#StarsNeededForDialog) +- [StaticObjectCollision](#StaticObjectCollision) - [Surface](#Surface) - [TextureInfo](#TextureInfo) -- [TransitionInfo](#TransitionInfo) -- [UnusedArea28](#UnusedArea28) -- [VblankHandler](#VblankHandler) - [Vec2f](#Vec2f) - [Vec2i](#Vec2i) - [Vec2s](#Vec2s) @@ -120,11 +95,8 @@ - [Vec4i](#Vec4i) - [Vec4s](#Vec4s) - [Vtx](#Vtx) -- [Vtx_Interp](#Vtx_Interp) - [WallCollisionData](#WallCollisionData) - [WarpNode](#WarpNode) -- [WarpTransition](#WarpTransition) -- [WarpTransitionData](#WarpTransitionData) - [WaterDropletParams](#WaterDropletParams) - [Waypoint](#Waypoint) - [Whirlpool](#Whirlpool) @@ -170,16 +142,6 @@
-## [AnimationTable](#AnimationTable) - -| Field | Type | Access | -| ----- | ---- | ------ | -| count | `integer` | read-only | - -[:arrow_up_small:](#) - -
- ## [Area](#Area) | Field | Type | Access | @@ -383,21 +345,6 @@
-## [BullyCollisionData](#BullyCollisionData) - -| Field | Type | Access | -| ----- | ---- | ------ | -| conversionRatio | `number` | | -| radius | `number` | | -| posX | `number` | | -| posZ | `number` | | -| velX | `number` | | -| velZ | `number` | | - -[:arrow_up_small:](#) - -
- ## [Camera](#Camera) | Field | Type | Access | @@ -422,64 +369,6 @@
-## [CameraFOVStatus](#CameraFOVStatus) - -| Field | Type | Access | -| ----- | ---- | ------ | -| fovFunc | `integer` | | -| fov | `number` | | -| fovOffset | `number` | | -| unusedIsSleeping | `integer` | | -| shakeAmplitude | `number` | | -| shakePhase | `integer` | | -| shakeSpeed | `integer` | | -| decay | `integer` | | - -[:arrow_up_small:](#) - -
- -## [CameraOverride](#CameraOverride) - -| Field | Type | Access | -| ----- | ---- | ------ | -| value | `integer` | | -| override | `boolean` | | - -[:arrow_up_small:](#) - -
- -## [CameraStoredInfo](#CameraStoredInfo) - -| Field | Type | Access | -| ----- | ---- | ------ | -| pos | [Vec3f](structs.md#Vec3f) | read-only | -| focus | [Vec3f](structs.md#Vec3f) | read-only | -| panDist | `number` | | -| cannonYOffset | `number` | | - -[:arrow_up_small:](#) - -
- -## [CameraTrigger](#CameraTrigger) - -| Field | Type | Access | -| ----- | ---- | ------ | -| area | `integer` | | -| centerX | `integer` | | -| centerY | `integer` | | -| centerZ | `integer` | | -| boundsX | `integer` | | -| boundsY | `integer` | | -| boundsZ | `integer` | | -| boundsYaw | `integer` | | - -[:arrow_up_small:](#) - -
- ## [ChainSegment](#ChainSegment) | Field | Type | Access | @@ -726,6 +615,7 @@ | animReturnFromStarDance | `integer` | read-only | | animForwardSpinningFlip | `integer` | read-only | | animTripleJumpFly | `integer` | read-only | +| anims | `Array` <`integer`> | read-only | | soundFreqScale | `number` | read-only | | soundYahWahHoo | `integer` | read-only | | soundHoohoo | `integer` | read-only | @@ -771,6 +661,7 @@ | soundImaTired | `integer` | read-only | | soundLetsAGo | `integer` | read-only | | soundOkeyDokey | `integer` | read-only | +| sounds | `Array` <`integer`> | read-only | [:arrow_up_small:](#) @@ -829,42 +720,6 @@
-## [Cutscene](#Cutscene) - -| Field | Type | Access | -| ----- | ---- | ------ | -| duration | `integer` | | - -[:arrow_up_small:](#) - -
- -## [CutsceneSplinePoint](#CutsceneSplinePoint) - -| Field | Type | Access | -| ----- | ---- | ------ | -| index | `integer` | | -| speed | `integer` | | -| point | [Vec3s](structs.md#Vec3s) | read-only | - -[:arrow_up_small:](#) - -
- -## [CutsceneVariable](#CutsceneVariable) - -| Field | Type | Access | -| ----- | ---- | ------ | -| unused1 | `integer` | | -| point | [Vec3f](structs.md#Vec3f) | read-only | -| unusedPoint | [Vec3f](structs.md#Vec3f) | read-only | -| angle | [Vec3s](structs.md#Vec3s) | read-only | -| unused2 | `integer` | | - -[:arrow_up_small:](#) - -
- ## [DateTime](#DateTime) | Field | Type | Access | @@ -1004,20 +859,6 @@
-## [FloorGeometry](#FloorGeometry) - -| Field | Type | Access | -| ----- | ---- | ------ | -| unused | `Array` <`number`> | | -| normalX | `number` | | -| normalY | `number` | | -| normalZ | `number` | | -| originOffset | `number` | | - -[:arrow_up_small:](#) - -
- ## [FnGraphNode](#FnGraphNode) | Field | Type | Access | @@ -1585,33 +1426,6 @@
-## [GraphNode_802A45E4](#GraphNode_802A45E4) - -| Field | Type | Access | -| ----- | ---- | ------ | -| unk18 | `integer` | | -| unk1A | `integer` | | -| unk1C | `integer` | | -| unk1E | `integer` | | -| unk20 | `integer` | | -| unk22 | `integer` | | - -[:arrow_up_small:](#) - -
- -## [HandheldShakePoint](#HandheldShakePoint) - -| Field | Type | Access | -| ----- | ---- | ------ | -| index | `integer` | | -| pad | `integer` | | -| point | [Vec3s](structs.md#Vec3s) | read-only | - -[:arrow_up_small:](#) - -
- ## [HudUtilsRotation](#HudUtilsRotation) | Field | Type | Access | @@ -1751,20 +1565,6 @@
-## [LinearTransitionPoint](#LinearTransitionPoint) - -| Field | Type | Access | -| ----- | ---- | ------ | -| focus | [Vec3f](structs.md#Vec3f) | read-only | -| pos | [Vec3f](structs.md#Vec3f) | read-only | -| dist | `number` | | -| pitch | `integer` | | -| yaw | `integer` | | - -[:arrow_up_small:](#) - -
- ## [MarioAnimation](#MarioAnimation) | Field | Type | Access | @@ -1794,6 +1594,7 @@ | headPos | [Vec3f](structs.md#Vec3f) | read-only | | torsoPos | [Vec3f](structs.md#Vec3f) | read-only | | heldObjLastPosition | [Vec3f](structs.md#Vec3f) | read-only | +| animPartsPos | `Array` <`Vec3f`> | read-only | | currAnimPart | `integer` | read-only | | updateTorsoTime | `integer` | read-only | | updateHeadPosTime | `integer` | read-only | @@ -1945,6 +1746,7 @@ | renderBehindHud | `boolean` | read-only | | pausable | `boolean` | read-only | | ignoreScriptWarnings | `boolean` | read-only | +| size | `integer` | read-only | | customBehaviorIndex | `integer` | read-only | [:arrow_up_small:](#) @@ -1955,7 +1757,7 @@ | Field | Type | Access | | ----- | ---- | ------ | -| file | [ModFile](structs.md#ModFile) | | +| filepath | `string` | read-only | | isStream | `boolean` | read-only | | baseVolume | `number` | | | loaded | `boolean` | read-only | @@ -1964,33 +1766,6 @@
-## [ModAudioSampleCopies](#ModAudioSampleCopies) - -| Field | Type | Access | -| ----- | ---- | ------ | -| next | [ModAudioSampleCopies](structs.md#ModAudioSampleCopies) | | -| prev | [ModAudioSampleCopies](structs.md#ModAudioSampleCopies) | | -| parent | [ModAudio](structs.md#ModAudio) | | - -[:arrow_up_small:](#) - -
- -## [ModFile](#ModFile) - -| Field | Type | Access | -| ----- | ---- | ------ | -| relativePath | `string` | read-only | -| modifiedTimestamp | `integer` | read-only | -| isLoadedLuaModule | `boolean` | read-only | -| wroteBytes | `integer` | read-only | -| dataHash | `Array` <`integer`> | read-only | -| cachedPath | `string` | read-only | - -[:arrow_up_small:](#) - -
- ## [ModFs](#ModFs) | Field | Type | Access | @@ -2001,6 +1776,21 @@ | totalSize | `integer` | read-only | | isPublic | `boolean` | read-only | +**Functions:** + +| Name | Reference | +| ---- | --------- | +| get_filename | [`mod_fs_get_filename`](functions-5.md#mod_fs_get_filename) | +| get_file | [`mod_fs_get_file`](functions-5.md#mod_fs_get_file) | +| create_file | [`mod_fs_create_file`](functions-5.md#mod_fs_create_file) | +| move_file | [`mod_fs_move_file`](functions-5.md#mod_fs_move_file) | +| copy_file | [`mod_fs_copy_file`](functions-5.md#mod_fs_copy_file) | +| delete_file | [`mod_fs_delete_file`](functions-5.md#mod_fs_delete_file) | +| clear | [`mod_fs_clear`](functions-5.md#mod_fs_clear) | +| save | [`mod_fs_save`](functions-5.md#mod_fs_save) | +| delete | [`mod_fs_delete`](functions-5.md#mod_fs_delete) | +| set_public | [`mod_fs_set_public`](functions-5.md#mod_fs_set_public) | + [:arrow_up_small:](#)
@@ -2016,20 +1806,29 @@ | isText | `boolean` | read-only | | isPublic | `boolean` | read-only | -[:arrow_up_small:](#) +**Functions:** -
- -## [ModeTransitionInfo](#ModeTransitionInfo) - -| Field | Type | Access | -| ----- | ---- | ------ | -| newMode | `integer` | | -| lastMode | `integer` | | -| max | `integer` | | -| frame | `integer` | | -| transitionStart | [LinearTransitionPoint](structs.md#LinearTransitionPoint) | read-only | -| transitionEnd | [LinearTransitionPoint](structs.md#LinearTransitionPoint) | read-only | +| Name | Reference | +| ---- | --------- | +| read_bool | [`mod_fs_file_read_bool`](functions-5.md#mod_fs_file_read_bool) | +| read_integer | [`mod_fs_file_read_integer`](functions-5.md#mod_fs_file_read_integer) | +| read_number | [`mod_fs_file_read_number`](functions-5.md#mod_fs_file_read_number) | +| read_bytes | [`mod_fs_file_read_bytes`](functions-5.md#mod_fs_file_read_bytes) | +| read_string | [`mod_fs_file_read_string`](functions-5.md#mod_fs_file_read_string) | +| read_line | [`mod_fs_file_read_line`](functions-5.md#mod_fs_file_read_line) | +| write_bool | [`mod_fs_file_write_bool`](functions-5.md#mod_fs_file_write_bool) | +| write_integer | [`mod_fs_file_write_integer`](functions-5.md#mod_fs_file_write_integer) | +| write_number | [`mod_fs_file_write_number`](functions-5.md#mod_fs_file_write_number) | +| write_bytes | [`mod_fs_file_write_bytes`](functions-5.md#mod_fs_file_write_bytes) | +| write_string | [`mod_fs_file_write_string`](functions-5.md#mod_fs_file_write_string) | +| write_line | [`mod_fs_file_write_line`](functions-5.md#mod_fs_file_write_line) | +| seek | [`mod_fs_file_seek`](functions-5.md#mod_fs_file_seek) | +| rewind | [`mod_fs_file_rewind`](functions-5.md#mod_fs_file_rewind) | +| is_eof | [`mod_fs_file_is_eof`](functions-5.md#mod_fs_file_is_eof) | +| fill | [`mod_fs_file_fill`](functions-5.md#mod_fs_file_fill) | +| erase | [`mod_fs_file_erase`](functions-5.md#mod_fs_file_erase) | +| set_text_mode | [`mod_fs_file_set_text_mode`](functions-5.md#mod_fs_file_set_text_mode) | +| set_public | [`mod_fs_file_set_public`](functions-5.md#mod_fs_file_set_public) | [:arrow_up_small:](#) @@ -2097,6 +1896,7 @@ | collisionData | `Pointer` <`Collision`> | | | behavior | `Pointer` <`BehaviorScript`> | read-only | | curBhvCommand | `Pointer` <`BehaviorScript`> | read-only | +| bhvStack | `Array` <`integer`> | read-only | | bhvStackIndex | `integer` | read-only | | bhvDelayTimer | `integer` | | | activeFlags | `integer` | | @@ -2905,17 +2705,6 @@
-## [OffsetSizePair](#OffsetSizePair) - -| Field | Type | Access | -| ----- | ---- | ------ | -| offset | `integer` | | -| size | `integer` | | - -[:arrow_up_small:](#) - -
- ## [Painting](#Painting) | Field | Type | Access | @@ -2947,10 +2736,9 @@ | rippleTimer | `number` | | | rippleX | `number` | | | rippleY | `number` | | -| normalDisplayList | `Pointer` <`Gfx`> | read-only | +| textureArray | `Array` <`Pointer` <`Texture`>> | read-only | | textureWidth | `integer` | read-only | | textureHeight | `integer` | read-only | -| rippleDisplayList | `Pointer` <`Gfx`> | read-only | | rippleTrigger | `integer` | | | alpha | `integer` | | | marioWasUnder | `integer` | | @@ -2962,17 +2750,6 @@
-## [PaintingMeshVertex](#PaintingMeshVertex) - -| Field | Type | Access | -| ----- | ---- | ------ | -| pos | `Array` <`integer`> | | -| norm | `Array` <`integer`> | | - -[:arrow_up_small:](#) - -
- ## [PaintingValues](#PaintingValues) | Field | Type | Access | @@ -2998,19 +2775,6 @@
-## [ParallelTrackingPoint](#ParallelTrackingPoint) - -| Field | Type | Access | -| ----- | ---- | ------ | -| startOfPath | `integer` | | -| pos | [Vec3f](structs.md#Vec3f) | read-only | -| distThresh | `number` | | -| zoom | `number` | | - -[:arrow_up_small:](#) - -
- ## [PlayerCameraState](#PlayerCameraState) | Field | Type | Access | @@ -3027,32 +2791,11 @@
-## [PlayerGeometry](#PlayerGeometry) - -| Field | Type | Access | -| ----- | ---- | ------ | -| currFloor | [Surface](structs.md#Surface) | | -| currFloorHeight | `number` | | -| currFloorType | `integer` | | -| currCeil | [Surface](structs.md#Surface) | | -| currCeilType | `integer` | | -| currCeilHeight | `number` | | -| prevFloor | [Surface](structs.md#Surface) | | -| prevFloorHeight | `number` | | -| prevFloorType | `integer` | | -| prevCeil | [Surface](structs.md#Surface) | | -| prevCeilHeight | `number` | | -| prevCeilType | `integer` | | -| waterHeight | `number` | | - -[:arrow_up_small:](#) - -
- ## [PlayerPalette](#PlayerPalette) | Field | Type | Access | | ----- | ---- | ------ | +| parts | `Array` <`Color`> | read-only | [:arrow_up_small:](#) @@ -3110,19 +2853,6 @@
-## [SoundState](#SoundState) - -| Field | Type | Access | -| ----- | ---- | ------ | -| playSound | `integer` | | -| animFrame1 | `integer` | | -| animFrame2 | `integer` | | -| soundMagic | `integer` | | - -[:arrow_up_small:](#) - -
- ## [SpawnInfo](#SpawnInfo) | Field | Type | Access | @@ -3211,6 +2941,17 @@
+## [StaticObjectCollision](#StaticObjectCollision) + +| Field | Type | Access | +| ----- | ---- | ------ | +| index | `integer` | read-only | +| length | `integer` | read-only | + +[:arrow_up_small:](#) + +
+ ## [Surface](#Surface) | Field | Type | Access | @@ -3244,25 +2985,8 @@ | name | `string` | read-only | | width | `integer` | read-only | | height | `integer` | read-only | -| bitSize | `integer` | read-only | - -[:arrow_up_small:](#) - -
- -## [TransitionInfo](#TransitionInfo) - -| Field | Type | Access | -| ----- | ---- | ------ | -| posPitch | `integer` | | -| posYaw | `integer` | | -| posDist | `number` | | -| focPitch | `integer` | | -| focYaw | `integer` | | -| focDist | `number` | | -| framesLeft | `integer` | | -| marioPos | [Vec3f](structs.md#Vec3f) | read-only | -| pad | `integer` | | +| format | `integer` | read-only | +| size | `integer` | read-only | [:arrow_up_small:](#) @@ -3398,17 +3122,6 @@
-## [Vtx_Interp](#Vtx_Interp) - -| Field | Type | Access | -| ----- | ---- | ------ | -| ob | `Array` <`number`> | | -| n | `string` | | - -[:arrow_up_small:](#) - -
- ## [WallCollisionData](#WallCollisionData) | Field | Type | Access | @@ -3441,45 +3154,12 @@
-## [WarpTransition](#WarpTransition) - -| Field | Type | Access | -| ----- | ---- | ------ | -| isActive | `integer` | | -| type | `integer` | | -| time | `integer` | | -| pauseRendering | `integer` | | -| data | [WarpTransitionData](structs.md#WarpTransitionData) | read-only | - -[:arrow_up_small:](#) - -
- -## [WarpTransitionData](#WarpTransitionData) - -| Field | Type | Access | -| ----- | ---- | ------ | -| red | `integer` | | -| green | `integer` | | -| blue | `integer` | | -| startTexRadius | `integer` | | -| endTexRadius | `integer` | | -| startTexX | `integer` | | -| startTexY | `integer` | | -| endTexX | `integer` | | -| endTexY | `integer` | | -| texTimer | `integer` | | - -[:arrow_up_small:](#) - -
- ## [WaterDropletParams](#WaterDropletParams) | Field | Type | Access | | ----- | ---- | ------ | | flags | `integer` | | -| model | `integer` | | +| model | `integer` | read-only | | behavior | `Pointer` <`BehaviorScript`> | read-only | | moveAngleRange | `integer` | | | moveRange | `integer` | | diff --git a/include/PR/gbi_extension.h b/include/PR/gbi_extension.h index f87933cc0..bba474dd5 100644 --- a/include/PR/gbi_extension.h +++ b/include/PR/gbi_extension.h @@ -1,12 +1,56 @@ #pragma once +// +// GFX COMMANDS FREE SLOTS +// +// The following op codes are free to use for G_ commands. +// For RSP commands, use incrementing numbers starting from 00. +// For RDP commands, use decrementing numbers starting from ff. +// Please update the following table when implementing a new command. +// +// RSP -> 09 0a 0b 0c 0d 0e 0f +// 10 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f +// 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f +// 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f +// 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f +// 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f +// 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f +// 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f +// 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f +// 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f +// a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af +// b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf +// c0 c1 c2 c3 c4 c5 c6 c7 +// d0 <- RDP +// +// + /////////////////////// // G_SETGEOMETRYMODE // /////////////////////// +// +// GEOMETRY MODES FREE FLAGS +// +// The following flags are free to use for geometry modes. +// Please remove the corresponding flag from the list below when implementing a new geometry mode. +// Note: geometry mode flags have only 24 bits, the 8 upper bits cannot be used. +// +// 0x00000002 +// 0x00000008 +// 0x00000010 +// 0x00000020 +// 0x00001000 +// 0x00002000 +// 0x00008000 +// 0x00080000 // G_TEXTURE_GEN_LINEAR, but not implemented +// 0x00100000 // G_LOD, but not implemented +// 0x00800000 // G_CLIPPING, but not implemented + #define G_LIGHT_MAP_EXT 0x00000800 #define G_LIGHTING_ENGINE_EXT 0x00004000 #define G_PACKED_NORMALS_EXT 0x00000080 +#define G_CULL_INVERT_EXT 0x00000100 #define G_FRESNEL_COLOR_EXT 0x00000040 #define G_FRESNEL_ALPHA_EXT 0x00400000 @@ -36,11 +80,11 @@ _g->words.w1 = _SHIFTL(x2, 16, 8) | _SHIFTL(y2, 8, 8); \ } -#define gSetOverrideDjui(pkt, cmd, texture, w, h, bitSize) \ +#define gSetOverrideDjui(pkt, cmd, texture, w, h, fmt, siz) \ { \ Gfx *_g = (Gfx *)(pkt); \ _g->words.w0 = _SHIFTL(cmd, 24, 8) | _SHIFTL(w, 16, 8) | \ - _SHIFTL(h, 8, 8) | _SHIFTL(bitSize, 0, 8); \ + _SHIFTL(h, 8, 8) | _SHIFTL(fmt, 4, 4) | _SHIFTL(siz, 0, 4); \ _g->words.w1 = (uintptr_t)(texture); \ } @@ -93,8 +137,19 @@ ((height)-1) << G_TEXTURE_IMAGE_FRAC) \ } -#define gDPSetTextureClippingDjui(pkt, x1, y1, x2, y2) gSetClippingDjui(pkt, G_TEXCLIP_DJUI, x1, y1, x2, y2) -#define gDPSetTextureOverrideDjui(pkt, texture, w, h, bitSize) gSetOverrideDjui(pkt, G_TEXOVERRIDE_DJUI, texture, w, h, bitSize) +#define gDPSetTextureClippingDjui(pkt, x1, y1, x2, y2) gSetClippingDjui(pkt, G_TEXCLIP_DJUI, x1, y1, x2, y2) +#define gDPSetTextureOverrideDjui(pkt, texture, w, h, fmt, siz) gSetOverrideDjui(pkt, G_TEXOVERRIDE_DJUI, texture, w, h, fmt, siz) + +///////////////// +// G_SETENVRGB // +///////////////// + +#define G_SETENVRGB 0xd1 + +#define gDPSetEnvRGB(pkt, r, g, b) \ + DPRGBColor(pkt, G_SETENVRGB, r,g,b,255) +#define gsDPSetEnvRGB(r, g, b) \ + sDPRGBColor(G_SETENVRGB, r,g,b,255) //////////////////// // G_PPARTTOCOLOR // @@ -121,9 +176,9 @@ ((2 * ((part) + 1)) + 1 + offset) \ }} -//////////////////// -//// G_MOVEWORD //// -//////////////////// +//////////////// +// G_MOVEWORD // +//////////////// #define G_MW_FX 0x00 /* replaces G_MW_MATRIX which is no longer supported */ #define G_MWO_FRESNEL 0x0C diff --git a/include/gfx_symbols.h b/include/gfx_symbols.h index a12858e8d..b1678b102 100644 --- a/include/gfx_symbols.h +++ b/include/gfx_symbols.h @@ -33,6 +33,7 @@ define_gfx_symbol(gsSPGeometryMode, 2, false, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE define_gfx_symbol(gsSPGeometryModeSetFirst, 2, false, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT); define_gfx_symbol(gsDPSetPrimColor, 6, false, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT); define_gfx_symbol(gsDPSetEnvColor, 4, false, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT); +define_gfx_symbol(gsDPSetEnvRGB, 3, false, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT); define_gfx_symbol(gsDPSetFogColor, 4, false, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT); define_gfx_symbol(gsSPFogPosition, 2, false, GFX_PARAM_TYPE_INT, GFX_PARAM_TYPE_INT); define_gfx_symbol(gsDPSetAlphaCompare, 1, false, GFX_PARAM_TYPE_INT); diff --git a/include/surface_terrains.h b/include/surface_terrains.h index 091ed64d4..c43924a5f 100644 --- a/include/surface_terrains.h +++ b/include/surface_terrains.h @@ -163,6 +163,7 @@ #define SURFACE_FLAG_DYNAMIC (1 << 0) #define SURFACE_FLAG_NO_CAM_COLLISION (1 << 1) +#define SURFACE_FLAG_INTANGIBLE (1 << 2) #define SURFACE_FLAG_X_PROJECTION (1 << 3) #define HAZARD_TYPE_LAVA_FLOOR 1 diff --git a/include/types.h b/include/types.h index 53f07d508..e1fcc6c67 100644 --- a/include/types.h +++ b/include/types.h @@ -577,11 +577,12 @@ struct MarioState struct TextureInfo { - Texture *texture; + const Texture *texture; const char *name; u32 width; u32 height; - u8 bitSize; + u8 format; + u8 size; }; #define PLAY_MODE_NORMAL 0 diff --git a/lang/Russian.ini b/lang/Russian.ini index 51cc8619f..f86da4f3a 100644 --- a/lang/Russian.ini +++ b/lang/Russian.ini @@ -1,7 +1,7 @@ [NOTIF] CONNECTED = "@ подключился" DISCONNECTED = "@ отключился" -LEFT_THIS_LEVEL = "@ покинул уровень" +LEFT_THIS_LEVEL = "@ вышел из уровня" ENTERED_THIS_LEVEL = "@ вошел в уровень" ENTERED = "@ вошел в\n#" SERVER_CLOSED = "\\#ffa0a0\\Отключение:\\#dcdcdc\\ сервер закрыт" @@ -14,7 +14,7 @@ DISCONNECT_REJOIN = "\\#ffa0a0\\Отключение:\\#dcdcdc\\ перепод DISCONNECT_CLOSED = "\\#ffa0a0\\Отключение:\\#dcdcdc\\ Хост закрыл соединение." DISCONNECT_BIG_MOD = "На сервере слишком большой мод.\nВыходим." DIED = "@ умер" -DEBUG_FLY = "@ вошел в состояние свободного полета отладки" +DEBUG_FLY = "@ вошел в режим полета при отладке" IMPORT_MOD_SUCCESS = "\\#a0ffa0\\Импортирован мод\n\\#dcdcdc\\'@'" IMPORT_DYNOS_SUCCESS = "\\#a0ffa0\\Импортированнан пакет DynOS\n\\#dcdcdc\\'@'" IMPORT_PALETTE_SUCCESS = "\\#a0ffa0\\Импортированный предустановленный набор палитр\n\\#dcdcdc\\'@'" @@ -146,7 +146,7 @@ INVERT_RIGHT_Y = "Инвертировать правый стик по оси Y [DISPLAY] DISPLAY = "DISPLAY" FULLSCREEN = "Полноэкранный режим" -FORCE_4BY3 = "Экран 4:3" +FORCE_4BY3 = "Режим 4:3" PRELOAD_TEXTURES = "Предварительная загрузка текстур" VSYNC = "Вертикальная синхронизация" FRAMERATE_MODE = "Тип частоты кадров" @@ -187,7 +187,7 @@ FONT_NORMAL = "Обычный" FONT_ALIASED = "Гладкий" LIGHT_THEME = "Свет" DARK_THEME = "Темный" -MARIO_THEME = "Mario" +MARIO_THEME = "Марио" ODYSSEY_THEME = "Одиссеи" FILE_SELECT_THEME = "Выбор файла" diff --git a/lang/Spanish.ini b/lang/Spanish.ini index 8431abf9d..6f581991d 100644 --- a/lang/Spanish.ini +++ b/lang/Spanish.ini @@ -7,7 +7,7 @@ ENTERED = "@ ha entrado a \n#" SERVER_CLOSED = "\\#ffa0a0\\Desconectado:\\#dcdcdc\\ El servidor ha sido cerrado." DISCORD_ERROR = "Discord ha lanzado un error.\nPara solucionarlo, intenta: \n1. Cerrar el juego.\n2. Reiniciar Discord.\n3. Iniciar el juego." DISCORD_DETECT = "\\#ffa0a0\\Error:\\#dcdcdc\\ No se ha podido detectar Discord.\n\\#a0a0a0\\Prueba a cerrar el juego, reiniciar Discord, e iniciar el juego otra vez." -DISCONNECT_FULL = "\\#ffa0a0\\Desconectado:\\#dcdcdc\\ La partida está llena" +DISCONNECT_FULL = "\\#ffa0a0\\Desconectado:\\#dcdcdc\\ La partida está llena." DISCONNECT_KICK = "\\#ffa0a0\\Desconectado:\\#dcdcdc\\ has sido\nexpulsado del servidor" DISCONNECT_BAN = "\\#ffa0a0\\Desconectado:\\#dcdcdc\\ has sido\nbaneado del servidor" DISCONNECT_REJOIN = "\\#ffa0a0\\Desconectado:\\#dcdcdc\\ Uniéndose de nuevo..." @@ -17,7 +17,7 @@ DIED = "@ ha muerto." DEBUG_FLY = "@ Está en estado de vuelo libre debug." IMPORT_MOD_SUCCESS = "El mod \\#dcdcdc\\'@'\\#a0ffa0\\\nha sido importado con éxito." IMPORT_DYNOS_SUCCESS = "El pack de DynOS \\#dcdcdc\\'@'\\#a0ffa0\\\nha sido importado con éxito." -IMPORT_PALETTE_SUCCESS = "\\#a0ffa0\\Ajuste preestablecido de paleta importado\n\\#dcdcdc\\'@'" +IMPORT_PALETTE_SUCCESS = "\\#a0ffa0\\Paleta importada\n\\#dcdcdc\\'@'" IMPORT_FAIL = "\n\\#ffa0a0\\Error al importar el archivo. \\#dcdcdc\\\n'@'" IMPORT_FAIL_INGAME = "\\#ffa0a0\\No se pueden importar archivos\nen medio de una partida." COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\¡No se ha podido conectar a CoopNet!" @@ -34,28 +34,28 @@ LATEST_VERSION = "Última versión" YOUR_VERSION = "Su versión" [CHAT] -KICKING = "¡'@' ha sido expulsado!" -BANNING = "¡'@' ha sido baneado!" +KICKING = "'@' ha sido expulsado." +BANNING = "'@' ha sido baneado." SERVER_ONLY = "Solo el anfitrión puede usar este comando." -PERM_BANNING = "¡'@' ha sido baneado permanentemente!" -ADD_MODERATOR = "¡'@' ahora es un moderador!" +PERM_BANNING = "'@' ha sido baneado permanentemente." +ADD_MODERATOR = "'@' ahora es moderador." PLAYERS = "Jugadores" NO_PERMS = "No tienes permiso para usar este comando." PLAYER_NOT_FOUND = "No se ha podido encontrar al jugador." NAMETAGS_MISSING_PARAMETERS = "Parámetros faltantes: [OPCIÓN]" -SELF_KICK = "No te puedes expulsar a tí mismo." -SELF_BAN = "No te puedes banear a tí mismo." -SELF_MOD = "No puedes hacerte moderador a tí mismo." +SELF_KICK = "No puedes expulsarte a ti mismo." +SELF_BAN = "No puedes banearte a ti mismo." +SELF_MOD = "No puedes hacerte moderador a ti mismo." KICK_CONFIRM = "¿Seguro que quieres expulsar a '@'?\nEscribe '\\#a0ffa0\\/confirm\\#fff982\\' para expulsar." BAN_CONFIRM = "¿Seguro que quieres banear a '@'?\nEscribe '\\#a0ffa0\\/confirm\\#fff982\\' para banear." PERM_BAN_CONFIRM = "¿Seguro que quieres banear permanentemente a '@'?\nEscribe '\\#a0ffa0\\/confirm\\#fff982\\' para banear." -MOD_CONFIRM = "¿Seguro que quieres hacer moderador a '@'?\nEscribe '\\#a0ffa0\\/confirm\\#fff982\\'." +MOD_CONFIRM = "¿Seguro que quieres volver moderador a '@'?\nEscribe '\\#a0ffa0\\/confirm\\#fff982\\'." PLAYERS_DESC = "/players - Muestra la lista de todos los jugadores y sus IDs." -KICK_DESC = "/kick [NAME|ID] - Expulsa al jugador de la partida actual." -BAN_DESC = "/ban [NAME|ID] - Banea al jugador de la partida actual." -PERM_BAN_DESC = "/permban [NAME|ID] - Banea al jugador de todas tus partidas." -MOD_DESC = "/moderator [NAME|ID] - Permite a un jugador usar comandos como /kick, /ban o /permban de cualquier partida que crees." -NAMETAGS_DESC = "/nametags [show-tag|show-health] - Cambia si ves tu propia etiqueta y si ves la salud" +KICK_DESC = "/kick [NOMBRE|ID] - Expulsa a un jugador de la partida actual." +BAN_DESC = "/ban [NOMBRE|ID] - Banea a un jugador de la partida actual." +PERM_BAN_DESC = "/permban [NOMBRE|ID] - Banea a un jugador de todas tus partidas permanentemente." +MOD_DESC = "/moderator [NOMBRE|ID] - Permite a un jugador usar comandos como /kick o /ban de cualquier partida que crees." +NAMETAGS_DESC = "/nametags [show-tag|show-health] - Cambia si ves tu propia etiqueta y si ves la salud de los demás." UNRECOGNIZED = "Comando desconocido." MOD_GRANTED = "\\#fff982\\Ahora eres moderador." ALL_COMMANDS = "Todos los comandos" @@ -72,25 +72,25 @@ CAMERA = "CÁMARA" FREE_CAMERA = "Cámara libre" ANALOG_CAMERA = "Cámara analógica" FREE_CAMERA_TITLE = "CÁMARA LIBRE" -FREE_CAMERA_L_CENTERING = "Centrado L" -FREE_CAMERA_USE_DPAD = "Comportamiento del DPad" -FREE_CAMERA_COLLISION = "Colisiones de la cámara" -ROMHACK_CAMERA_TITLE = "CÁMARA\nROMHACK" -ROMHACK_CAMERA = "Cámara Romhack" -ROMHACK_CAMERA_AUTOMATIC = "Automática" -ROMHACK_CAMERA_ON = "Encendida" -ROMHACK_CAMERA_OFF = "Apagada" +FREE_CAMERA_L_CENTERING = "Centrar con L" +FREE_CAMERA_USE_DPAD = "Mover con Dpad" +FREE_CAMERA_COLLISION = "Colisiones de cámara" +ROMHACK_CAMERA_TITLE = "CÁMARA DE ROMHACK" +ROMHACK_CAMERA = "Cámara de Romhack" +ROMHACK_CAMERA_AUTOMATIC = "Automático" +ROMHACK_CAMERA_ON = "Activada" +ROMHACK_CAMERA_OFF = "Desactivada" ROMHACK_CAMERA_IN_BOWSER = "Usar en peleas con Bowser" ROMHACK_CAMERA_COLLISION = "Colisiones de cámara" -ROMHACK_CAMERA_L_CENTERING = "Centrado L" -ROMHACK_CAMERA_USE_DPAD = "Comportamiento del DPad" -ROMHACK_CAMERA_SLOW_FALL = "Caída lenta" -CAMERA_TOXIC_GAS = "Ajuste para gases tóxicos" -MOUSE_LOOK = "Movimiento con mouse" +ROMHACK_CAMERA_L_CENTERING = "Centrar con L" +ROMHACK_CAMERA_USE_DPAD = "Mover con Dpad" +ROMHACK_CAMERA_SLOW_FALL = "Descender lentamente" +CAMERA_TOXIC_GAS = "Ajustar para gases tóxicos" +MOUSE_LOOK = "Mover con el ratón" INVERT_X = "Invertir eje X" INVERT_Y = "Invertir eje Y" -X_SENSITIVITY = "Sensibilidad eje X" -Y_SENSITIVITY = "Sensibilidad eje Y" +X_SENSITIVITY = "Sensibilidad del eje X" +Y_SENSITIVITY = "Sensibilidad del eje Y" AGGRESSION = "Agresión" PAN_LEVEL = "Nivel de seguimiento" DECELERATION = "Deceleración" @@ -101,7 +101,7 @@ CONTROLS = "CONTROLES" N64_BINDS = "Botones de N64" EXTRA_BINDS = "Botones Adicionales" BACKGROUND_GAMEPAD = "Mando en segundo plano" -DISABLE_GAMEPADS = "Desactivar gamepads" +DISABLE_GAMEPADS = "Desactivar mandos" GAMEPAD = "Mando" DEADZONE = "Zona muerta" RUMBLE_STRENGTH = "Intensidad de vibración" @@ -109,14 +109,14 @@ RUMBLE_STRENGTH = "Intensidad de vibración" CHAT = "Chat" CHAT_COMMAND = "Chat (Comando)" PLAYERS = "Jugadores" -D_UP = "Cruz Arriba" -D_DOWN = "Cruz Abajo" -D_LEFT = "Cruz Izquierda" -D_RIGHT = "Cruz Derecha" +D_UP = "Dpad Arriba" +D_DOWN = "Dpad Abajo" +D_LEFT = "Dpad Izquierda" +D_RIGHT = "Dpad Derecha" X = "X" Y = "Y" CONSOLE = "Consola" -PREV = "Pagina Ant." +PREV = "Página Ant." NEXT = "Sig. Página" DISCONNECT = "Desconectar" @@ -137,12 +137,12 @@ C_RIGHT = "C Derecha" ANALOG_STICK_OPTIONS = "Opciones del mando analógico" -ROTATE_LEFT = "Gira el stick izquierdo 90 grados" -INVERT_LEFT_X = "Invertir eje X del stick izquierdo" -INVERT_LEFT_Y = "Invertir eje Y del stick izquierdo" -ROTATE_RIGHT = "Gira el stick derecho 90 grados" -INVERT_RIGHT_X = "Invertir Stick derecho eje X" -INVERT_RIGHT_Y = "Invertir el eje Y del stick derecho" +ROTATE_LEFT = "Girar la palanca izquierda 90 grados" +INVERT_LEFT_X = "Invertir eje X de la palanca izquierda" +INVERT_LEFT_Y = "Invertir eje Y de la palanca izquierda" +ROTATE_RIGHT = "Girar la palanca derecha 90 grados" +INVERT_RIGHT_X = "Invertir eje X de la palanca derecha" +INVERT_RIGHT_Y = "Invertir eje Y de la palanca derecha" [DISPLAY] DISPLAY = "PANTALLA" @@ -169,10 +169,10 @@ D3X = "3x" D10X = "10x" D100X = "100x" DRAW_DISTANCE = "Distancia de dibujado" -DYNOS_PACKS = "Packs de DynOS" +DYNOS_PACKS = "Packs DynOS" ANTIALIASING = "Anti-aliasing" OFF = "Desactivado" -MUST_RESTART = "Tienes que reiniciar el juego para que algunos cambios surtan efecto." +MUST_RESTART = "Tienes que reiniciar el juego para aplicar los cambios." SHOW_FPS = "Mostrar FPS" SHOW_PING = "Mostrar Ping" @@ -194,51 +194,51 @@ FILE_SELECT_THEME = "Selección de archivo" [DYNOS] DYNOS = "DYNOS" -LOCAL_PLAYER_MODEL_ONLY = "Solo modelo de jugador local" +LOCAL_PLAYER_MODEL_ONLY = "Solo reemplazar el modelo del jugador local" [HOST_MESSAGE] INFO_TITLE = "INFO" WARN_DISCORD = "Invita a amigos haciendo click derecho en su nombre en Discord y seleccionando\n'\\#d0d0ff\\Invitar a unirse\\#dcdcdc\\'.\n\nPuedes invitar en canales de un servidor también presionando el botón \\#d0d0ff\\+\\#dcdcdc\\ al lado del cuadro de texto del chat.\n\nEl estado de Actividad Actual \\#ffa0a0\\debe estar\\#dcdcdc\\ activado en tus ajustes de Discord.\n\nEstar invisible \\#ffa0a0\\te prevendrá\\#dcdcdc\\ de crear invitaciones." WARN_DISCORD2 = "\\#ffa0a0\\Error:\\#dcdcdc\\ No se ha detectado Discord.\n\n\\#a0a0a0\\Prueba a cerrar el juego,\nreiniciar Discord,\ny abrir el juego de nuevo." -WARN_SOCKET = "Asegúrate de que tu firewall esté configurado correctamente.\nLas conexiones directas \\#ffa0a0\\requieren que\\#dcdcdc\\ configures el reenvío de puertos en tu router para aceptar conexiones entrantes IPv4.\n\nReenvía el puerto '\\#d0d0ff\\%d\\#dcdcdc\\' para UDP. IPv6 también es suportado." +WARN_SOCKET = "Asegúrate de que tu firewall esté configurado correctamente.\nLas conexiones directas \\#ffa0a0\\requieren que\\#dcdcdc\\ configures el reenvío de puertos en tu router para aceptar conexiones entrantes IPv4.\n\nReenvía el puerto '\\#d0d0ff\\%d\\#dcdcdc\\' para UDP. IPv6 también es compatible." HOST = "Crear" [HOST_MODS] MODS = "MODS" -CATEGORIES = "Categorías" +CATEGORIES = "Categoría" WARNING = "\\#ffffa0\\Advertencia:\\#dcdcdc\\ Tienes 10 o más mods activados, por favor desactiva algunos para prevenir inestabilidad o lag." NO_MODS_FOUND = "No se han encontrado mods." [HOST_MOD_CATEGORIES] ALL = "Todos" -MISC = "Varios" +MISC = "Otros" ROMHACKS = "Romhacks" GAMEMODES = "Modos de juego" -MOVESETS = "Conjuntos de movimientos" +MOVESETS = "Movimientos" CHARACTER_SELECT = "Character Select" [HOST_SAVE] -SAVE_TITLE = "RANURAS DE\nGUARDADO" +SAVE_TITLE = "ARCHIVOS DE\nGUARDADO" ERASE_TITLE = "BORRAR" -CONFIRM = "¿Seguro que quieres borrar esta partida?" +CONFIRM = "¿Seguro que quieres borrar este archivo?" ERASE = "Borrar" EDIT = "Editar" EDIT_TITLE = "EDITAR" -EDIT_NAME = "Editar nombre del archivo guardado @:" +EDIT_NAME = "Editar nombre del archivo @:" [HOST_SETTINGS] SETTINGS = "AJUSTES" -NONSOLID = "No Sólida" +NONSOLID = "Ninguna" SOLID = "Sólida" FRIENDLY_FIRE = "Fuego Amigo" PLAYER_INTERACTION = "Interacción entre jugadores" -WEAK = "Poca" +WEAK = "Ligera" NORMAL = "Normal" -TOO_MUCH = "Demasiada" +TOO_MUCH = "Extrema" KNOCKBACK_STRENGTH = "Fuerza de retroceso" -CLASSIC_PVP = "Clásico" -REVAMPED_PVP = "Revisado" -PVP_MODE = "Modo Jugador contra Jugador" +CLASSIC_PVP = "Clasico" +REVAMPED_PVP = "Renovado" +PVP_MODE = "Modo de PVP" LEAVE_LEVEL = "Salir del nivel" STAY_IN_LEVEL = "Seguir en el nivel" NONSTOP = "Sin parar" @@ -248,12 +248,12 @@ ENABLE_CHEATS = "Habilitar trucos" BUBBLE_ON_DEATH = "Burbuja al morir" NAMETAGS = "Etiquetas de nombre" MOD_DEV_MODE = "Modo de desarrollo de mods" -BOUNCY_BOUNDS_ON_CAP = "Encendido (Limitado)" -BOUNCY_BOUNDS_ON = "Encendido" -BOUNCY_BOUNDS_OFF = "Apagado" -BOUNCY_LEVEL_BOUNDS = "Límites de Nivel Rebote" +BOUNCY_BOUNDS_ON_CAP = "Activado (Limitado)" +BOUNCY_BOUNDS_ON = "Activado" +BOUNCY_BOUNDS_OFF = "Desactivado" +BOUNCY_LEVEL_BOUNDS = "Límites del nivel rebotantes" AMOUNT_OF_PLAYERS = "Número de jugadores" -PAUSE_ANYWHERE = "Pausa en cualquier lugar" +PAUSE_ANYWHERE = "Pausa en cualquier momento" [HOST] SERVER_TITLE = "PARTIDA" @@ -264,10 +264,10 @@ DIRECT_CONNECTION = "Conexión Directa" NETWORK_SYSTEM = "Modo de conexión" PORT = "Puerto" PASSWORD = "Contraseña" -SAVE_SLOT = "Ranuras" +SAVE_SLOT = "Archivos" SETTINGS = "Ajustes" MODS = "Mods" -ROMHACKS = "Rom-Hacks" +ROMHACKS = "Romhacks" APPLY = "Aplicar" HOST = "Crear" @@ -285,11 +285,11 @@ DIRECT = "Conexión Directa" [RULES] RULES_TITLE = "REGLAS" -RULE_1 = "1. Debes tener 13 años o más para usar CoopNet." -RULE_2 = "2. Abstente de acosar, incitar al odio, emplear insultos, u otro tipo de lenguaje ofensivo." -RULE_3 = "3. Solo debes utilizar versiones sin modificar de sm64coopdx en CoopNet." +RULE_1 = "1. Debes tener 13 años o más para jugar en CoopNet." +RULE_2 = "2. Abstente de acosar, incitar al odio, utilizar insultos graves u otro tipo de lenguaje ofensivo." +RULE_3 = "3. Solo se permite utilizar versiones no modificadas de sm64coopdx en CoopNet." RULE_4 = "4. Está estrictamente prohibido utilizar herramientas externas para hacer trampas en el juego." -RULE_5 = "5. No utilices mods sin publicar sin consentimiento de los autores." +RULE_5 = "5. No utilices mods sin publicar sin consentimiento de los autores originales." RULE_6 = "6. No se tolerará el contenido pornográfico o fetichista. Esto incluye, pero no se limita, a mods, personajes, o roleplay erótico." SUBJECT_TO_CHANGE = "Estas reglas están sujetas a cambios en futuras actualizaciones." NOTICE = "Al conectarte a CoopNet, aceptas a cumplir estas normas mientras juegas en partidas públicas." @@ -304,12 +304,12 @@ OPTIONS = "Opciones" QUIT = "Salir" [MENU_OPTIONS] -MENU_TITLE = "MENÚ" +MENU_TITLE = "MENU" LEVEL = "Nivel" -STAFF_ROLL = "Créditos Finales" +STAFF_ROLL = "Mostrar los créditos" MUSIC = "Música" RANDOM_STAGE = "Nivel aleatorio" -PLAY_VANILLA_DEMOS = "Demos originales" +PLAY_VANILLA_DEMOS = "Mostrar las demos" [MISC] DEBUG_TITLE = "DEPURACIÓN" @@ -378,7 +378,7 @@ APPDATA = "Abrir AppData" [PAUSE] QUIT_TITLE = "SALIR" QUIT_HOST = "¿Seguro que quieres acabar la partida?" -QUIT_CLIENT = "¿Seguro que te quieres desconectar?" +QUIT_CLIENT = "¿Seguro que quieres desconectarte?" PAUSE_TITLE = "PAUSA" PLAYER = "Jugador" DYNOS_PACKS = "Packs de DynOS" @@ -409,17 +409,17 @@ GREEN = "Verde" BLUE = "Azul" PLAYER = "Jugador" NAME = "Nombre" -MODEL = "Modelo" -PALETTE_PRESET = "Paletas predeterminadas" +MODEL = "Personaje" +PALETTE_PRESET = "Paletas" EDIT_PALETTE = "Editar Paleta" ACTIVE_PALETTE = "Guardar la paleta actual como determinada" PRESET_NAME = "Nombre" DELETE_PRESET = "Eliminar" SAVE_PRESET = "Guardar" -CAP_TOGGLE = "Pulsa Z para poner o quitar la gorra." +CAP_TOGGLE = "Presiona Z para ponerte o quitarte la gorra." [PALETTE] -CUSTOM = "Personalizado" +CUSTOM = "Personalizada" [PLAYER_LIST] PLAYERS = "JUGADORES" @@ -429,12 +429,12 @@ ACT = "acto" [SOUND] SOUND = "SONIDO" -MASTER_VOLUME = "Volumen General" -MUSIC_VOLUME = "Volumen de Música" -SFX_VOLUME = "Volumen de Efectos de Sonido" -ENV_VOLUME = "Volumen de Entorno" -FADEOUT = "Disminuir sonidos lejanos" -MUTE_FOCUS_LOSS = "Silenciar sonido cuando la ventana está desenfocada" +MASTER_VOLUME = "Volumen general" +MUSIC_VOLUME = "Volumen de la música" +SFX_VOLUME = "Volumen de los sonidos" +ENV_VOLUME = "Volumen del entorno" +FADEOUT = "Silenciar sonidos lejanos" +MUTE_FOCUS_LOSS = "Silenciar sonido cuando la ventana esté desenfocada" [LANGUAGE] LANGUAGE = "IDIOMA" @@ -454,7 +454,7 @@ PUBLIC_LOBBIES = "PARTIDAS\nPÚBLICAS" PRIVATE_LOBBIES = "PARTIDAS\nPRIVADAS" REFRESH = "Refrescar" REFRESHING = "Refrescando..." -ENTER_PASSWORD = "Introduce la contraseña de la partida privada:" +ENTER_PASSWORD = "Escribe la contraseña de la partida privada:" SEARCH = "Buscar" NO_LOBBIES_FOUND = "No se han encontrado partidas." diff --git a/levels/castle_inside/painting.inc.c b/levels/castle_inside/painting.inc.c index fac982371..c12f799bc 100644 --- a/levels/castle_inside/painting.inc.c +++ b/levels/castle_inside/painting.inc.c @@ -1255,57 +1255,57 @@ static const Gfx inside_castle_seg7_painting_dl_070235B8[] = { gsSPBranchList(inside_castle_seg7_painting_dl_07023580), }; -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_070235C0[] = { - inside_castle_seg7_texture_0700B800, inside_castle_seg7_texture_0700A800, -}; +#define inside_castle_seg7_painting_textures_070235C0 { \ + inside_castle_seg7_texture_0700B800, inside_castle_seg7_texture_0700A800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_070235C8[] = { - inside_castle_seg7_texture_0700D800, inside_castle_seg7_texture_0700C800, -}; +#define inside_castle_seg7_painting_textures_070235C8 { \ + inside_castle_seg7_texture_0700D800, inside_castle_seg7_texture_0700C800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_070235D0[] = { - inside_castle_seg7_texture_0700F800, inside_castle_seg7_texture_0700E800, -}; +#define inside_castle_seg7_painting_textures_070235D0 { \ + inside_castle_seg7_texture_0700F800, inside_castle_seg7_texture_0700E800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_070235D8[] = { - inside_castle_seg7_texture_07011800, inside_castle_seg7_texture_07010800, -}; +#define inside_castle_seg7_painting_textures_070235D8 { \ + inside_castle_seg7_texture_07011800, inside_castle_seg7_texture_07010800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_070235E0[] = { - inside_castle_seg7_texture_07012800, inside_castle_seg7_texture_07013800, -}; +#define inside_castle_seg7_painting_textures_070235E0 { \ + inside_castle_seg7_texture_07012800, inside_castle_seg7_texture_07013800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_070235E8[] = { - inside_castle_seg7_texture_07015800, inside_castle_seg7_texture_07014800, -}; +#define inside_castle_seg7_painting_textures_070235E8 { \ + inside_castle_seg7_texture_07015800, inside_castle_seg7_texture_07014800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_070235F0[] = { - inside_castle_seg7_texture_07016800, -}; +#define inside_castle_seg7_painting_textures_070235F0 { \ + inside_castle_seg7_texture_07016800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_070235F4[] = { - inside_castle_seg7_texture_07017000, -}; +#define inside_castle_seg7_painting_textures_070235F4 { \ + inside_castle_seg7_texture_07017000, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_070235F8[] = { - inside_castle_seg7_texture_07018800, inside_castle_seg7_texture_07017800, -}; +#define inside_castle_seg7_painting_textures_070235F8 { \ + inside_castle_seg7_texture_07018800, inside_castle_seg7_texture_07017800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_07023600[] = { - inside_castle_seg7_texture_0701A800, inside_castle_seg7_texture_07019800, -}; +#define inside_castle_seg7_painting_textures_07023600 { \ + inside_castle_seg7_texture_0701A800, inside_castle_seg7_texture_07019800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_07023608[] = { - inside_castle_seg7_texture_0701C800, inside_castle_seg7_texture_0701B800, -}; +#define inside_castle_seg7_painting_textures_07023608 { \ + inside_castle_seg7_texture_0701C800, inside_castle_seg7_texture_0701B800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_07023610[] = { - inside_castle_seg7_texture_0701E800, inside_castle_seg7_texture_0701D800, -}; +#define inside_castle_seg7_painting_textures_07023610 { \ + inside_castle_seg7_texture_0701E800, inside_castle_seg7_texture_0701D800, \ +} -ALIGNED8 const Texture *const inside_castle_seg7_painting_textures_07023618[] = { - inside_castle_seg7_texture_07020800, inside_castle_seg7_texture_0701F800, -}; +#define inside_castle_seg7_painting_textures_07023618 { \ + inside_castle_seg7_texture_07020800, inside_castle_seg7_texture_0701F800, \ +} // 0x07023620 - 0x07023698 struct Painting bob_painting = { diff --git a/levels/hmc/areas/1/painting.inc.c b/levels/hmc/areas/1/painting.inc.c index ebad311eb..871750397 100644 --- a/levels/hmc/areas/1/painting.inc.c +++ b/levels/hmc/areas/1/painting.inc.c @@ -505,9 +505,9 @@ static const Gfx hmc_seg7_painting_dl_070254E0[] = { }; // 0x07025518 - 0x07025594 -const Texture *const hmc_seg7_painting_textures_07025518[] = { - hmc_seg7_texture_07024CE0, -}; +#define hmc_seg7_painting_textures_07025518 { \ + hmc_seg7_texture_07024CE0, \ +} // 0x0702551C (PaintingData) struct Painting cotmc_painting = { diff --git a/levels/ttm/areas/1/painting.inc.c b/levels/ttm/areas/1/painting.inc.c index fea728990..2ae5d05db 100644 --- a/levels/ttm/areas/1/painting.inc.c +++ b/levels/ttm/areas/1/painting.inc.c @@ -537,9 +537,9 @@ static const Gfx ttm_seg7_painting_dl_07012E98[] = { }; // 0x07012EF8 - 0x07012F78 -ALIGNED8 const Texture *const ttm_seg7_painting_textures_07012EF8[] = { - ttm_seg7_texture_07004000, ttm_seg7_texture_07003000, -}; +#define ttm_seg7_painting_textures_07012EF8 { \ + ttm_seg7_texture_07004000, ttm_seg7_texture_07003000, \ +} // 0x07012F00 (PaintingData) struct Painting ttm_slide_painting = { diff --git a/lib/coopnet/include/libcoopnet.h b/lib/coopnet/include/libcoopnet.h index 433ccab58..8fff4caef 100644 --- a/lib/coopnet/include/libcoopnet.h +++ b/lib/coopnet/include/libcoopnet.h @@ -5,6 +5,7 @@ #include extern "C" { class Connection; +class Lobby; #endif #include @@ -43,7 +44,8 @@ typedef struct { uint64_t (*DestIdFunction)(uint64_t aInput); #if defined(__cplusplus) bool (*ConnectionIsAllowed)(Connection*, bool); - void (*OnReceiveInfoBits)(Connection* aConnection, uint64_t aDestId, uint64_t aInfoBits, const char* aName); + bool (*LobbyConnectionIsAllowed)(Connection*, Lobby*); + void (*OnReceiveInfoBits)(Connection* aConnection, uint64_t aDestId, uint64_t aInfoBits, uint64_t aHash, const char* aName); #endif } CoopNetCallbacks; diff --git a/lib/coopnet/linux/libcoopnet-arm.a b/lib/coopnet/linux/libcoopnet-arm.a index aa64895ca..ed26e39dd 100644 Binary files a/lib/coopnet/linux/libcoopnet-arm.a and b/lib/coopnet/linux/libcoopnet-arm.a differ diff --git a/lib/coopnet/linux/libcoopnet-arm64.a b/lib/coopnet/linux/libcoopnet-arm64.a index 37cf815d1..bf2fadb65 100644 Binary files a/lib/coopnet/linux/libcoopnet-arm64.a and b/lib/coopnet/linux/libcoopnet-arm64.a differ diff --git a/lib/coopnet/linux/libcoopnet.a b/lib/coopnet/linux/libcoopnet.a index 40a7dbc7d..bed8d5435 100644 Binary files a/lib/coopnet/linux/libcoopnet.a and b/lib/coopnet/linux/libcoopnet.a differ diff --git a/lib/coopnet/linux/libjuice-arm.a b/lib/coopnet/linux/libjuice-arm.a index 42d37f1c1..e510856c8 100644 Binary files a/lib/coopnet/linux/libjuice-arm.a and b/lib/coopnet/linux/libjuice-arm.a differ diff --git a/lib/coopnet/linux/libjuice-arm64.a b/lib/coopnet/linux/libjuice-arm64.a index d49379be8..b631788ce 100644 Binary files a/lib/coopnet/linux/libjuice-arm64.a and b/lib/coopnet/linux/libjuice-arm64.a differ diff --git a/lib/coopnet/linux/libjuice.a b/lib/coopnet/linux/libjuice.a index 0f847c6dc..fe3144b56 100644 Binary files a/lib/coopnet/linux/libjuice.a and b/lib/coopnet/linux/libjuice.a differ diff --git a/lib/coopnet/mac_arm/libcoopnet.dylib b/lib/coopnet/mac_arm/libcoopnet.dylib index 324e4acac..8d8604a5e 100755 Binary files a/lib/coopnet/mac_arm/libcoopnet.dylib and b/lib/coopnet/mac_arm/libcoopnet.dylib differ diff --git a/lib/coopnet/mac_arm/libjuice.1.2.2.dylib b/lib/coopnet/mac_arm/libjuice.1.2.2.dylib deleted file mode 100755 index fceed5bff..000000000 Binary files a/lib/coopnet/mac_arm/libjuice.1.2.2.dylib and /dev/null differ diff --git a/lib/coopnet/mac_arm/libjuice.1.6.2.dylib b/lib/coopnet/mac_arm/libjuice.1.6.2.dylib new file mode 100644 index 000000000..488363745 Binary files /dev/null and b/lib/coopnet/mac_arm/libjuice.1.6.2.dylib differ diff --git a/lib/coopnet/mac_intel/libcoopnet.dylib b/lib/coopnet/mac_intel/libcoopnet.dylib index 372196103..c0dcdd5aa 100755 Binary files a/lib/coopnet/mac_intel/libcoopnet.dylib and b/lib/coopnet/mac_intel/libcoopnet.dylib differ diff --git a/lib/coopnet/mac_intel/libjuice.1.2.2.dylib b/lib/coopnet/mac_intel/libjuice.1.2.2.dylib deleted file mode 100755 index e28f26f86..000000000 Binary files a/lib/coopnet/mac_intel/libjuice.1.2.2.dylib and /dev/null differ diff --git a/lib/coopnet/mac_intel/libjuice.1.6.2.dylib b/lib/coopnet/mac_intel/libjuice.1.6.2.dylib new file mode 100644 index 000000000..7734ce9a5 Binary files /dev/null and b/lib/coopnet/mac_intel/libjuice.1.6.2.dylib differ diff --git a/lib/coopnet/win32/libcoopnet.a b/lib/coopnet/win32/libcoopnet.a index d90f75e64..1bd2e0509 100644 Binary files a/lib/coopnet/win32/libcoopnet.a and b/lib/coopnet/win32/libcoopnet.a differ diff --git a/lib/coopnet/win32/libjuice.a b/lib/coopnet/win32/libjuice.a index 8e7d880d4..43cfd480e 100644 Binary files a/lib/coopnet/win32/libjuice.a and b/lib/coopnet/win32/libjuice.a differ diff --git a/lib/coopnet/win64/libcoopnet.a b/lib/coopnet/win64/libcoopnet.a index 1613bb7c5..7f91e04d6 100644 Binary files a/lib/coopnet/win64/libcoopnet.a and b/lib/coopnet/win64/libcoopnet.a differ diff --git a/lib/coopnet/win64/libjuice.a b/lib/coopnet/win64/libjuice.a index 1bee9d6cf..0bd197237 100644 Binary files a/lib/coopnet/win64/libjuice.a and b/lib/coopnet/win64/libjuice.a differ diff --git a/src/audio/seqplayer.h b/src/audio/seqplayer.h index b2b863876..d70326ca1 100644 --- a/src/audio/seqplayer.h +++ b/src/audio/seqplayer.h @@ -15,15 +15,15 @@ void sequence_channel_set_volume(struct SequenceChannel *seqChannel, u8 volume); void process_sequences(s32 iterationsRemaining); void init_sequence_player(u32 player); void init_sequence_players(void); -/* |description|Gets the tempo of `player`|descriptionEnd| */ +/* |description|Gets the `tempo` of `player`|descriptionEnd| */ u16 sequence_player_get_tempo(u8 player); /* |description|Sets the `tempo` of `player`. Resets when another sequence is played|descriptionEnd| */ void sequence_player_set_tempo(u8 player, u16 tempo); -/* |description|Gets the tempoAcc (tempo accumulation) of `player`|descriptionEnd| */ +/* |description|Gets the `tempoAcc` (tempo accumulation) of `player`|descriptionEnd| */ u16 sequence_player_get_tempo_acc(u8 player); /* |description|Sets the `tempoAcc` (tempo accumulation) of `player`. Resets when another sequence is played|descriptionEnd| */ void sequence_player_set_tempo_acc(u8 player, u16 tempoAcc); -/* |description|Gets the transposition (pitch) of `player`|descriptionEnd| */ +/* |description|Gets the `transposition` (pitch) of `player`|descriptionEnd| */ u16 sequence_player_get_transposition(u8 player); /* |description|Sets the `transposition` (pitch) of `player`. Resets when another sequence is played|descriptionEnd| */ void sequence_player_set_transposition(u8 player, u16 transposition); diff --git a/src/engine/graph_node.h b/src/engine/graph_node.h index c044fa548..7e61e9f4c 100644 --- a/src/engine/graph_node.h +++ b/src/engine/graph_node.h @@ -20,6 +20,7 @@ // Extra, custom, flags #define GRAPH_EXTRA_FORCE_3D (1 << 0) +#define GRAPH_EXTRA_ROTATE_HELD (1 << 1) // Whether the node type has a function pointer of type GraphNodeFunc #define GRAPH_NODE_TYPE_FUNCTIONAL 0x100 diff --git a/src/engine/math_util.c b/src/engine/math_util.c index fc3562799..a5a82e602 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -233,6 +233,30 @@ OPTIMIZE_O3 s32 anim_spline_poll(struct MarioState* m, OUT Vec3f result) { return hasEnded; } + /////////// + // Vec2f // +/////////// + +Vec2f gVec2fZero = { 0.0f, 0.0f }; + +Vec2f gVec2fOne = { 1.0f, 1.0f }; + + /////////// + // Vec2i // +/////////// + +Vec2i gVec2iZero = { 0, 0 }; + +Vec2i gVec2iOne = { 1, 1 }; + + /////////// + // Vec2s // +/////////// + +Vec2s gVec2sZero = { 0, 0 }; + +Vec2s gVec2sOne = { 1, 1 }; + /////////// // Vec3f // /////////// diff --git a/src/engine/math_util.h b/src/engine/math_util.h index 72ead474d..16e30eba2 100644 --- a/src/engine/math_util.h +++ b/src/engine/math_util.h @@ -87,6 +87,12 @@ extern f32 gCosineTable[]; #endif +extern Vec2f gVec2fZero; +extern Vec2i gVec2iZero; +extern Vec2s gVec2sZero; +extern Vec2f gVec2fOne; +extern Vec2i gVec2iOne; +extern Vec2s gVec2sOne; extern Vec3f gVec3fZero; extern Vec3i gVec3iZero; extern Vec3s gVec3sZero; @@ -143,6 +149,24 @@ Advances the spline-based animation associated with `m` and stores the current i |descriptionEnd| */ OPTIMIZE_O3 s32 anim_spline_poll(struct MarioState* m, OUT Vec3f result); + /////////// + // Vec2f // +/////////// + +#include "math_util_vec2f.inl" + + /////////// + // Vec2i // +/////////// + +#include "math_util_vec2i.inl" + + /////////// + // Vec2s // +/////////// + +#include "math_util_vec2s.inl" + /////////// // Vec3f // /////////// diff --git a/src/engine/math_util_vec2.tmpl b/src/engine/math_util_vec2.tmpl new file mode 100644 index 000000000..bfb24f14a --- /dev/null +++ b/src/engine/math_util_vec2.tmpl @@ -0,0 +1,157 @@ +#pragma once + +/* |description| +Sets the components of the 2D {{desc}} vector `v` to 0 +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_zero(OUT Vec2{{suffix}} v) { + memset(v, 0, sizeof(Vec2{{suffix}})); + return v; +} + +/* |description| +Copies the contents of a 2D {{desc}} vector (`src`) into another 2D {{desc}} vector (`dest`) +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_copy(OUT Vec2{{suffix}} dest, Vec2{{suffix}} src) { + dest[0] = src[0]; + dest[1] = src[1]; + return dest; +} + +/* |description| +Sets the values of the 2D {{desc}} vector `dest` to the given x and y values +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_set(OUT Vec2{{suffix}} dest, {{type}} x, {{type}} y) { + dest[0] = x; + dest[1] = y; + return dest; +} + +/* |description| +Adds the components of the 2D {{desc}} vector `a` to `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_add(OUT Vec2{{suffix}} dest, Vec2{{suffix}} a) { + dest[0] += a[0]; + dest[1] += a[1]; + return dest; +} + +/* |description| +Adds the components of two 2D {{desc}} vectors `a` and `b` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_sum(OUT Vec2{{suffix}} dest, Vec2{{suffix}} a, Vec2{{suffix}} b) { + dest[0] = a[0] + b[0]; + dest[1] = a[1] + b[1]; + return dest; +} + +/* |description| +Subtracts the components of the 2D {{desc}} vector `a` from `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_sub(OUT Vec2{{suffix}} dest, Vec2{{suffix}} a) { + dest[0] -= a[0]; + dest[1] -= a[1]; + return dest; +} + +/* |description| +Subtracts the components of the 2D {{desc}} vector `b` from the components of `a` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_dif(OUT Vec2{{suffix}} dest, Vec2{{suffix}} a, Vec2{{suffix}} b) { + dest[0] = a[0] - b[0]; + dest[1] = a[1] - b[1]; + return dest; +} + +/* |description| +Multiplies each component of the 2D {{desc}} vector `dest` by the scalar value `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_mul(OUT Vec2{{suffix}} dest, f32 a) { + dest[0] *= a; + dest[1] *= a; + return dest; +} + +/* |description| +Multiplies the components of the 2D {{desc}} vector `dest` with the components of `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_mult(OUT Vec2{{suffix}} dest, Vec2{{suffix}} a) { + dest[0] *= a[0]; + dest[1] *= a[1]; + return dest; +} + +/* |description| +Multiplies the components of two 2D {{desc}} vectors `a` and `b` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_prod(OUT Vec2{{suffix}} dest, Vec2{{suffix}} a, Vec2{{suffix}} b) { + dest[0] = a[0] * b[0]; + dest[1] = a[1] * b[1]; + return dest; +} + +/* |description| +Divides each component of the 2D {{desc}} vector `dest` by the scalar value `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_div(OUT Vec2{{suffix}} dest, f32 a) { + if (a == 0) { return dest; } + dest[0] /= a; + dest[1] /= a; + return dest; +} + +/* |description| +Calculates the length (magnitude) of the 2D {{desc}} vector `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2{{suffix}}_length(Vec2{{suffix}} a) { + return sqrtf(a[0] * a[0] + a[1] * a[1]); +} + +/* |description| +Normalizes the 2D {{desc}} vector `v` so that its length (magnitude) becomes 1, while retaining its direction +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_normalize(OUT Vec2{{suffix}} v) { + f32 mag = vec2{{suffix}}_length(v); + vec2{{suffix}}_div(v, mag); + return v; +} + +/* |description| +Sets the length (magnitude) of 2D {{desc}} vector `v`, while retaining its direction +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_set_magnitude(OUT Vec2{{suffix}} v, f32 mag) { + vec2{{suffix}}_normalize(v); + vec2{{suffix}}_mul(v, mag); + return v; +} + +/* |description| +Computes the dot product of the two 2D {{desc}} vectors `a` and `b` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2{{suffix}}_dot(Vec2{{suffix}} a, Vec2{{suffix}} b) { + return (f32) (a[0] * b[0] + a[1] * b[1]); +} + +/* |description| +Takes two 2D {{desc}} vectors `vecA` and `vecB`, multiplies them by `sclA` and `sclB` respectively, adds the scaled vectors together and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2{{suffix}}p vec2{{suffix}}_combine(OUT Vec2{{suffix}} dest, Vec2{{suffix}} vecA, Vec2{{suffix}} vecB, f32 sclA, f32 sclB) { + dest[0] = vecA[0] * sclA + vecB[0] * sclB; + dest[1] = vecA[1] * sclA + vecB[1] * sclB; + return dest; +} + +/* |description| +Calculates the distance between two 2D {{desc}} vectors `v1` and `v2` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2{{suffix}}_dist(Vec2{{suffix}} v1, Vec2{{suffix}} v2) { + Vec2{{suffix}} diff; + vec2{{suffix}}_dif(diff, v1, v2); + return vec2{{suffix}}_length(diff); +} + +/* |description| +Returns `true` if all components of the 2D {{desc}} vector `v` are zero +|descriptionEnd| */ +INLINE OPTIMIZE_O3 bool vec2{{suffix}}_is_zero(Vec2{{suffix}} v) { + return memcmp(v, gVec2{{suffix}}Zero, sizeof(Vec2{{suffix}})) == 0; +} diff --git a/src/engine/math_util_vec2f.inl b/src/engine/math_util_vec2f.inl new file mode 100644 index 000000000..edea0385b --- /dev/null +++ b/src/engine/math_util_vec2f.inl @@ -0,0 +1,178 @@ +/* THIS FILE IS AUTO-GENERATED */ +/* DO NOT EDIT IT MANUALLY */ + +#pragma once + +/* |description| +Sets the components of the 2D floating-point vector `v` to 0 +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_zero(OUT Vec2f v) { + memset(v, 0, sizeof(Vec2f)); + return v; +} + +/* |description| +Copies the contents of a 2D floating-point vector (`src`) into another 2D floating-point vector (`dest`) +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_copy(OUT Vec2f dest, Vec2f src) { + dest[0] = src[0]; + dest[1] = src[1]; + return dest; +} + +/* |description| +Sets the values of the 2D floating-point vector `dest` to the given x and y values +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_set(OUT Vec2f dest, f32 x, f32 y) { + dest[0] = x; + dest[1] = y; + return dest; +} + +/* |description| +Adds the components of the 2D floating-point vector `a` to `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_add(OUT Vec2f dest, Vec2f a) { + dest[0] += a[0]; + dest[1] += a[1]; + return dest; +} + +/* |description| +Adds the components of two 2D floating-point vectors `a` and `b` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_sum(OUT Vec2f dest, Vec2f a, Vec2f b) { + dest[0] = a[0] + b[0]; + dest[1] = a[1] + b[1]; + return dest; +} + +/* |description| +Subtracts the components of the 2D floating-point vector `a` from `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_sub(OUT Vec2f dest, Vec2f a) { + dest[0] -= a[0]; + dest[1] -= a[1]; + return dest; +} + +/* |description| +Subtracts the components of the 2D floating-point vector `b` from the components of `a` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_dif(OUT Vec2f dest, Vec2f a, Vec2f b) { + dest[0] = a[0] - b[0]; + dest[1] = a[1] - b[1]; + return dest; +} + +/* |description| +Multiplies each component of the 2D floating-point vector `dest` by the scalar value `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_mul(OUT Vec2f dest, f32 a) { + dest[0] *= a; + dest[1] *= a; + return dest; +} + +/* |description| +Multiplies the components of the 2D floating-point vector `dest` with the components of `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_mult(OUT Vec2f dest, Vec2f a) { + dest[0] *= a[0]; + dest[1] *= a[1]; + return dest; +} + +/* |description| +Multiplies the components of two 2D floating-point vectors `a` and `b` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_prod(OUT Vec2f dest, Vec2f a, Vec2f b) { + dest[0] = a[0] * b[0]; + dest[1] = a[1] * b[1]; + return dest; +} + +/* |description| +Divides each component of the 2D floating-point vector `dest` by the scalar value `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_div(OUT Vec2f dest, f32 a) { + if (a == 0) { return dest; } + dest[0] /= a; + dest[1] /= a; + return dest; +} + +/* |description| +Calculates the length (magnitude) of the 2D floating-point vector `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2f_length(Vec2f a) { + return sqrtf(a[0] * a[0] + a[1] * a[1]); +} + +/* |description| +Normalizes the 2D floating-point vector `v` so that its length (magnitude) becomes 1, while retaining its direction +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_normalize(OUT Vec2f v) { + f32 mag = vec2f_length(v); + vec2f_div(v, mag); + return v; +} + +/* |description| +Sets the length (magnitude) of 2D floating-point vector `v`, while retaining its direction +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_set_magnitude(OUT Vec2f v, f32 mag) { + vec2f_normalize(v); + vec2f_mul(v, mag); + return v; +} + +/* |description| +Computes the dot product of the two 2D floating-point vectors `a` and `b` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2f_dot(Vec2f a, Vec2f b) { + return (f32) (a[0] * b[0] + a[1] * b[1]); +} + +/* |description| +Takes two 2D floating-point vectors `vecA` and `vecB`, multiplies them by `sclA` and `sclB` respectively, adds the scaled vectors together and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2f_combine(OUT Vec2f dest, Vec2f vecA, Vec2f vecB, f32 sclA, f32 sclB) { + dest[0] = vecA[0] * sclA + vecB[0] * sclB; + dest[1] = vecA[1] * sclA + vecB[1] * sclB; + return dest; +} + +/* |description| +Calculates the distance between two 2D floating-point vectors `v1` and `v2` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2f_dist(Vec2f v1, Vec2f v2) { + Vec2f diff; + vec2f_dif(diff, v1, v2); + return vec2f_length(diff); +} + +/* |description| +Returns `true` if all components of the 2D floating-point vector `v` are zero +|descriptionEnd| */ +INLINE OPTIMIZE_O3 bool vec2f_is_zero(Vec2f v) { + return memcmp(v, gVec2fZero, sizeof(Vec2f)) == 0; +} + +/* |description| +Converts a 2D floating-point vector `a` into a 2D integer vector and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2f_to_vec2i(OUT Vec2i dest, Vec2f a) { + dest[0] = a[0] + ((a[0] > 0) ? 0.5f : -0.5f); + dest[1] = a[1] + ((a[1] > 0) ? 0.5f : -0.5f); + return dest; +} + +/* |description| +Converts a 2D floating-point vector `a` into a 2D short integer vector and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2f_to_vec2s(OUT Vec2s dest, Vec2f a) { + dest[0] = a[0] + ((a[0] > 0) ? 0.5f : -0.5f); + dest[1] = a[1] + ((a[1] > 0) ? 0.5f : -0.5f); + return dest; +} diff --git a/src/engine/math_util_vec2i.inl b/src/engine/math_util_vec2i.inl new file mode 100644 index 000000000..774bedb38 --- /dev/null +++ b/src/engine/math_util_vec2i.inl @@ -0,0 +1,178 @@ +/* THIS FILE IS AUTO-GENERATED */ +/* DO NOT EDIT IT MANUALLY */ + +#pragma once + +/* |description| +Sets the components of the 2D integer vector `v` to 0 +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_zero(OUT Vec2i v) { + memset(v, 0, sizeof(Vec2i)); + return v; +} + +/* |description| +Copies the contents of a 2D integer vector (`src`) into another 2D integer vector (`dest`) +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_copy(OUT Vec2i dest, Vec2i src) { + dest[0] = src[0]; + dest[1] = src[1]; + return dest; +} + +/* |description| +Sets the values of the 2D integer vector `dest` to the given x and y values +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_set(OUT Vec2i dest, s32 x, s32 y) { + dest[0] = x; + dest[1] = y; + return dest; +} + +/* |description| +Adds the components of the 2D integer vector `a` to `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_add(OUT Vec2i dest, Vec2i a) { + dest[0] += a[0]; + dest[1] += a[1]; + return dest; +} + +/* |description| +Adds the components of two 2D integer vectors `a` and `b` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_sum(OUT Vec2i dest, Vec2i a, Vec2i b) { + dest[0] = a[0] + b[0]; + dest[1] = a[1] + b[1]; + return dest; +} + +/* |description| +Subtracts the components of the 2D integer vector `a` from `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_sub(OUT Vec2i dest, Vec2i a) { + dest[0] -= a[0]; + dest[1] -= a[1]; + return dest; +} + +/* |description| +Subtracts the components of the 2D integer vector `b` from the components of `a` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_dif(OUT Vec2i dest, Vec2i a, Vec2i b) { + dest[0] = a[0] - b[0]; + dest[1] = a[1] - b[1]; + return dest; +} + +/* |description| +Multiplies each component of the 2D integer vector `dest` by the scalar value `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_mul(OUT Vec2i dest, f32 a) { + dest[0] *= a; + dest[1] *= a; + return dest; +} + +/* |description| +Multiplies the components of the 2D integer vector `dest` with the components of `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_mult(OUT Vec2i dest, Vec2i a) { + dest[0] *= a[0]; + dest[1] *= a[1]; + return dest; +} + +/* |description| +Multiplies the components of two 2D integer vectors `a` and `b` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_prod(OUT Vec2i dest, Vec2i a, Vec2i b) { + dest[0] = a[0] * b[0]; + dest[1] = a[1] * b[1]; + return dest; +} + +/* |description| +Divides each component of the 2D integer vector `dest` by the scalar value `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_div(OUT Vec2i dest, f32 a) { + if (a == 0) { return dest; } + dest[0] /= a; + dest[1] /= a; + return dest; +} + +/* |description| +Calculates the length (magnitude) of the 2D integer vector `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2i_length(Vec2i a) { + return sqrtf(a[0] * a[0] + a[1] * a[1]); +} + +/* |description| +Normalizes the 2D integer vector `v` so that its length (magnitude) becomes 1, while retaining its direction +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_normalize(OUT Vec2i v) { + f32 mag = vec2i_length(v); + vec2i_div(v, mag); + return v; +} + +/* |description| +Sets the length (magnitude) of 2D integer vector `v`, while retaining its direction +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_set_magnitude(OUT Vec2i v, f32 mag) { + vec2i_normalize(v); + vec2i_mul(v, mag); + return v; +} + +/* |description| +Computes the dot product of the two 2D integer vectors `a` and `b` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2i_dot(Vec2i a, Vec2i b) { + return (f32) (a[0] * b[0] + a[1] * b[1]); +} + +/* |description| +Takes two 2D integer vectors `vecA` and `vecB`, multiplies them by `sclA` and `sclB` respectively, adds the scaled vectors together and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2i_combine(OUT Vec2i dest, Vec2i vecA, Vec2i vecB, f32 sclA, f32 sclB) { + dest[0] = vecA[0] * sclA + vecB[0] * sclB; + dest[1] = vecA[1] * sclA + vecB[1] * sclB; + return dest; +} + +/* |description| +Calculates the distance between two 2D integer vectors `v1` and `v2` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2i_dist(Vec2i v1, Vec2i v2) { + Vec2i diff; + vec2i_dif(diff, v1, v2); + return vec2i_length(diff); +} + +/* |description| +Returns `true` if all components of the 2D integer vector `v` are zero +|descriptionEnd| */ +INLINE OPTIMIZE_O3 bool vec2i_is_zero(Vec2i v) { + return memcmp(v, gVec2iZero, sizeof(Vec2i)) == 0; +} + +/* |description| +Converts a 2D integer vector `a` into a 2D floating-point vector and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2i_to_vec2f(OUT Vec2f dest, Vec2i a) { + dest[0] = a[0]; + dest[1] = a[1]; + return dest; +} + +/* |description| +Converts a 2D integer vector `a` into a 2D short integer vector and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2i_to_vec2s(OUT Vec2s dest, Vec2i a) { + dest[0] = a[0]; + dest[1] = a[1]; + return dest; +} diff --git a/src/engine/math_util_vec2s.inl b/src/engine/math_util_vec2s.inl new file mode 100644 index 000000000..2dde2fdbd --- /dev/null +++ b/src/engine/math_util_vec2s.inl @@ -0,0 +1,178 @@ +/* THIS FILE IS AUTO-GENERATED */ +/* DO NOT EDIT IT MANUALLY */ + +#pragma once + +/* |description| +Sets the components of the 2D short integer vector `v` to 0 +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_zero(OUT Vec2s v) { + memset(v, 0, sizeof(Vec2s)); + return v; +} + +/* |description| +Copies the contents of a 2D short integer vector (`src`) into another 2D short integer vector (`dest`) +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_copy(OUT Vec2s dest, Vec2s src) { + dest[0] = src[0]; + dest[1] = src[1]; + return dest; +} + +/* |description| +Sets the values of the 2D short integer vector `dest` to the given x and y values +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_set(OUT Vec2s dest, s16 x, s16 y) { + dest[0] = x; + dest[1] = y; + return dest; +} + +/* |description| +Adds the components of the 2D short integer vector `a` to `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_add(OUT Vec2s dest, Vec2s a) { + dest[0] += a[0]; + dest[1] += a[1]; + return dest; +} + +/* |description| +Adds the components of two 2D short integer vectors `a` and `b` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_sum(OUT Vec2s dest, Vec2s a, Vec2s b) { + dest[0] = a[0] + b[0]; + dest[1] = a[1] + b[1]; + return dest; +} + +/* |description| +Subtracts the components of the 2D short integer vector `a` from `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_sub(OUT Vec2s dest, Vec2s a) { + dest[0] -= a[0]; + dest[1] -= a[1]; + return dest; +} + +/* |description| +Subtracts the components of the 2D short integer vector `b` from the components of `a` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_dif(OUT Vec2s dest, Vec2s a, Vec2s b) { + dest[0] = a[0] - b[0]; + dest[1] = a[1] - b[1]; + return dest; +} + +/* |description| +Multiplies each component of the 2D short integer vector `dest` by the scalar value `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_mul(OUT Vec2s dest, f32 a) { + dest[0] *= a; + dest[1] *= a; + return dest; +} + +/* |description| +Multiplies the components of the 2D short integer vector `dest` with the components of `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_mult(OUT Vec2s dest, Vec2s a) { + dest[0] *= a[0]; + dest[1] *= a[1]; + return dest; +} + +/* |description| +Multiplies the components of two 2D short integer vectors `a` and `b` and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_prod(OUT Vec2s dest, Vec2s a, Vec2s b) { + dest[0] = a[0] * b[0]; + dest[1] = a[1] * b[1]; + return dest; +} + +/* |description| +Divides each component of the 2D short integer vector `dest` by the scalar value `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_div(OUT Vec2s dest, f32 a) { + if (a == 0) { return dest; } + dest[0] /= a; + dest[1] /= a; + return dest; +} + +/* |description| +Calculates the length (magnitude) of the 2D short integer vector `a` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2s_length(Vec2s a) { + return sqrtf(a[0] * a[0] + a[1] * a[1]); +} + +/* |description| +Normalizes the 2D short integer vector `v` so that its length (magnitude) becomes 1, while retaining its direction +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_normalize(OUT Vec2s v) { + f32 mag = vec2s_length(v); + vec2s_div(v, mag); + return v; +} + +/* |description| +Sets the length (magnitude) of 2D short integer vector `v`, while retaining its direction +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_set_magnitude(OUT Vec2s v, f32 mag) { + vec2s_normalize(v); + vec2s_mul(v, mag); + return v; +} + +/* |description| +Computes the dot product of the two 2D short integer vectors `a` and `b` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2s_dot(Vec2s a, Vec2s b) { + return (f32) (a[0] * b[0] + a[1] * b[1]); +} + +/* |description| +Takes two 2D short integer vectors `vecA` and `vecB`, multiplies them by `sclA` and `sclB` respectively, adds the scaled vectors together and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2sp vec2s_combine(OUT Vec2s dest, Vec2s vecA, Vec2s vecB, f32 sclA, f32 sclB) { + dest[0] = vecA[0] * sclA + vecB[0] * sclB; + dest[1] = vecA[1] * sclA + vecB[1] * sclB; + return dest; +} + +/* |description| +Calculates the distance between two 2D short integer vectors `v1` and `v2` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 f32 vec2s_dist(Vec2s v1, Vec2s v2) { + Vec2s diff; + vec2s_dif(diff, v1, v2); + return vec2s_length(diff); +} + +/* |description| +Returns `true` if all components of the 2D short integer vector `v` are zero +|descriptionEnd| */ +INLINE OPTIMIZE_O3 bool vec2s_is_zero(Vec2s v) { + return memcmp(v, gVec2sZero, sizeof(Vec2s)) == 0; +} + +/* |description| +Converts a 2D short integer vector `a` into a 2D floating-point vector and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2fp vec2s_to_vec2f(OUT Vec2f dest, Vec2s a) { + dest[0] = a[0]; + dest[1] = a[1]; + return dest; +} + +/* |description| +Converts a 2D short integer vector `a` into a 2D integer vector and stores the result in `dest` +|descriptionEnd| */ +INLINE OPTIMIZE_O3 Vec2ip vec2s_to_vec2i(OUT Vec2i dest, Vec2s a) { + dest[0] = a[0]; + dest[1] = a[1]; + return dest; +} diff --git a/src/engine/surface_collision.c b/src/engine/surface_collision.c index 96ef6cfcb..1e34afd7f 100644 --- a/src/engine/surface_collision.c +++ b/src/engine/surface_collision.c @@ -137,9 +137,8 @@ static s32 find_wall_collisions_from_list(struct SurfaceNode *surfaceNode, surfaceNode = surfaceNode->next; // Exclude a large number of walls immediately to optimize. - if (y < surf->lowerY || y > surf->upperY) { - continue; - } + if (y < surf->lowerY || y > surf->upperY) { continue; } + if (surf->flags & SURFACE_FLAG_INTANGIBLE) { continue; } if (gLevelValues.fixCollisionBugs && gLevelValues.fixCollisionBugsRoundedCorners && !gFindWallDirectionAirborne) { // Check AABB to exclude walls before doing expensive triangle check @@ -399,6 +398,8 @@ static struct Surface *find_ceil_from_list(struct SurfaceNode *surfaceNode, s32 surf = surfaceNode->surface; surfaceNode = surfaceNode->next; + if (surf->flags & SURFACE_FLAG_INTANGIBLE) { continue; } + x1 = surf->vertex1[0]; z1 = surf->vertex1[2]; z2 = surf->vertex2[2]; @@ -622,7 +623,8 @@ static struct Surface *find_floor_from_list(struct SurfaceNode *surfaceNode, s32 if (surf == NULL) { break; } surfaceNode = surfaceNode->next; interpolate = gInterpolatingSurfaces; - + + if (surf->flags & SURFACE_FLAG_INTANGIBLE) { continue; } if (gCheckingSurfaceCollisionsForObject != NULL) { if (surf->object != gCheckingSurfaceCollisionsForObject) { continue; diff --git a/src/engine/surface_collision.h b/src/engine/surface_collision.h index d954b847b..ff5257a57 100644 --- a/src/engine/surface_collision.h +++ b/src/engine/surface_collision.h @@ -38,6 +38,12 @@ struct FloorGeometry f32 originOffset; }; +struct StaticObjectCollision +{ + u32 index; + u16 length; +}; + extern Vec3f gFindWallDirection; extern u8 gFindWallDirectionActive; extern u8 gFindWallDirectionAirborne; diff --git a/src/engine/surface_load.c b/src/engine/surface_load.c index f74eb8110..e5296490e 100644 --- a/src/engine/surface_load.c +++ b/src/engine/surface_load.c @@ -28,12 +28,48 @@ SpatialPartitionCell gStaticSurfacePartition[NUM_CELLS][NUM_CELLS]; SpatialPartitionCell gDynamicSurfacePartition[NUM_CELLS][NUM_CELLS]; +/** + * The total number of surface nodes allocated (a node is allocated for each + * spatial partition cell that a surface intersects). + */ +s32 gSurfaceNodesAllocated; + +/** + * The total number of surfaces allocated. + */ +s32 gSurfacesAllocated; + +/** + * The number of nodes that have been created for static surfaces. + */ +s32 gNumStaticSurfaceNodes; + +/** + * The number of static surfaces in the pool. + */ +s32 gNumStaticSurfaces; + +/** + * The number of nodes that have been created for static object collision surfaces. + */ +s32 gNumSOCSurfaceNodes; + +/** + * The number of static object collision surfaces in the pool. + */ +s32 gNumSOCSurfaces; + /** * Pools of data to contain either surface nodes or surfaces. */ static struct GrowingArray *sSurfaceNodePool = NULL; static struct GrowingArray *sSurfacePool = NULL; +/** + * Pool of data for static object collisions. + */ +static struct GrowingArray *sSOCPool = NULL; + /** * Allocate the part of the surface node pool to contain a surface node. */ @@ -51,6 +87,10 @@ static struct Surface *alloc_surface(void) { return growing_array_alloc(sSurfacePool, sizeof(struct Surface)); } +static struct StaticObjectCollision *alloc_static_object_collision(void) { + return growing_array_alloc(sSOCPool, sizeof(struct StaticObjectCollision)); +} + /** * Iterates through the entire partition, clearing the surfaces. */ @@ -71,6 +111,7 @@ static void clear_spatial_partition(SpatialPartitionCell *cells) { */ static void clear_static_surfaces(void) { clear_spatial_partition(&gStaticSurfacePartition[0][0]); + sSOCPool = growing_array_init(sSOCPool, 0x100, malloc, smlua_free_soc); } /** @@ -479,6 +520,8 @@ void alloc_surface_pools(void) { gSurfacesAllocated = 0; gNumStaticSurfaceNodes = 0; gNumStaticSurfaces = 0; + gNumSOCSurfaceNodes = 0; + gNumSOCSurfaces = 0; gCCMEnteredSlide = 0; reset_red_coins_collected(); @@ -586,6 +629,8 @@ void load_area_terrain(s16 index, s16 *data, s8 *surfaceRooms, s16 *macroObjects gNumStaticSurfaceNodes = gSurfaceNodesAllocated; gNumStaticSurfaces = gSurfacesAllocated; + gNumSOCSurfaceNodes = 0; + gNumSOCSurfaces = 0; } /** @@ -593,8 +638,8 @@ void load_area_terrain(s16 index, s16 *data, s8 *surfaceRooms, s16 *macroObjects */ void clear_dynamic_surfaces(void) { if (!(gTimeStopState & TIME_STOP_ACTIVE)) { - gSurfacesAllocated = gNumStaticSurfaces; - gSurfaceNodesAllocated = gNumStaticSurfaceNodes; + gSurfacesAllocated = gNumStaticSurfaces + gNumSOCSurfaces; + gSurfaceNodesAllocated = gNumStaticSurfaceNodes + gNumSOCSurfaceNodes; clear_spatial_partition(&gDynamicSurfacePartition[0][0]); @@ -650,7 +695,7 @@ void transform_object_vertices(s16 **data, s16 *vertexData) { /** * Load in the surfaces for the gCurrentObject. This includes setting the flags, exertion, and room. */ -void load_object_surfaces(s16** data, s16* vertexData) { +void load_object_surfaces(s16** data, s16* vertexData, bool isSOC) { if (!gCurrentObject) { return; } s32 surfaceType; s32 i; @@ -682,15 +727,16 @@ void load_object_surfaces(s16** data, s16* vertexData) { struct Surface* surface = read_surface_data(vertexData, data); if (surface != NULL) { - - // Set index of first surface - if (gCurrentObject->firstSurface == 0) { - gCurrentObject->firstSurface = gSurfacesAllocated - 1; + if (!isSOC) { + // Set index of first surface + if (gCurrentObject->firstSurface == 0) { + gCurrentObject->firstSurface = gSurfacesAllocated - 1; + } + + // Increase surface count + gCurrentObject->numSurfaces++; } - // Increase surface count - gCurrentObject->numSurfaces++; - surface->object = gCurrentObject; surface->type = surfaceType; @@ -702,7 +748,7 @@ void load_object_surfaces(s16** data, s16* vertexData) { surface->flags |= flags; surface->room = (s8)room; - add_surface(surface, TRUE); + add_surface(surface, !isSOC); } if (hasForce) { @@ -716,9 +762,12 @@ void load_object_surfaces(s16** data, s16* vertexData) { /** * Transform an object's vertices, reload them, and render the object. */ -void load_object_collision_model(void) { +static void load_object_collision_model_internal(bool isSOC) { + static bool sIsLoadingCollision = false; + if (!gCurrentObject) { return; } if (gCurrentObject->collisionData == NULL) { return; } + if (sIsLoadingCollision) { return; } s32 numVertices = 64; if (gCurrentObject->collisionData[0] == COL_INIT()) { @@ -736,6 +785,9 @@ void load_object_collision_model(void) { static s32 sVertexDataCount = 0; static s16* sVertexData = NULL; + // start loading collision + sIsLoadingCollision = true; + // allocate vertex data if (numVertices > sVertexDataCount || sVertexData == NULL) { if (sVertexData) { free(sVertexData); } @@ -746,39 +798,99 @@ void load_object_collision_model(void) { } s16* collisionData = gCurrentObject->collisionData; - f32 tangibleDist = gCurrentObject->oCollisionDistance; u8 anyPlayerInTangibleRange = FALSE; - for (s32 i = 0; i < MAX_PLAYERS; i++) { - f32 dist = dist_between_objects(gCurrentObject, gMarioStates[i].marioObj); - if (dist < tangibleDist) { anyPlayerInTangibleRange = TRUE; } + if (!isSOC) { + f32 tangibleDist = gCurrentObject->oCollisionDistance; + + for (s32 i = 0; i < MAX_PLAYERS; i++) { + f32 dist = dist_between_objects(gCurrentObject, gMarioStates[i].marioObj); + if (dist < tangibleDist) { anyPlayerInTangibleRange = TRUE; } + } + + // If the object collision is supposed to be loaded more than the + // drawing distance of 4000, extend the drawing range. + if (gCurrentObject->oCollisionDistance > 4000.0f) { + gCurrentObject->oDrawingDistance = gCurrentObject->oCollisionDistance; + } } - // If the object collision is supposed to be loaded more than the - // drawing distance of 4000, extend the drawing range. - if (gCurrentObject->oCollisionDistance > 4000.0f) { - gCurrentObject->oDrawingDistance = gCurrentObject->oCollisionDistance; - } - - // Update if no Time Stop, in range, and in the current room. - if (!(gTimeStopState & TIME_STOP_ACTIVE) + // Update if no Time Stop, in range, and in the current room. (or if static) + if (isSOC || + (!(gTimeStopState & TIME_STOP_ACTIVE) && (anyPlayerInTangibleRange) - && !(gCurrentObject->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM)) { + && !(gCurrentObject->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM)) + ) { collisionData++; transform_object_vertices(&collisionData, sVertexData); // TERRAIN_LOAD_CONTINUE acts as an "end" to the terrain data. while (*collisionData != TERRAIN_LOAD_CONTINUE) { - load_object_surfaces(&collisionData, sVertexData); + load_object_surfaces(&collisionData, sVertexData, isSOC); } } - f32 marioDist = dist_between_objects(gCurrentObject, gMarioStates[0].marioObj); - if (marioDist < gCurrentObject->oDrawingDistance * draw_distance_scalar()) { - gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE; - } else { - gCurrentObject->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; + if (!isSOC) { + f32 marioDist = dist_between_objects(gCurrentObject, gMarioStates[0].marioObj); + if (marioDist < gCurrentObject->oDrawingDistance * draw_distance_scalar()) { + gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE; + } else { + gCurrentObject->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; + } } + + // stop loading collision + sIsLoadingCollision = false; +} + +void load_object_collision_model(void) { + load_object_collision_model_internal(false); +} + +struct StaticObjectCollision *load_static_object_collision() { + struct StaticObjectCollision *col; + u32 lastSurfaceIndex = gSurfacesAllocated; + u32 lastSurfaceNodeIndex = gSurfaceNodesAllocated; + u32 lastSOCSurfaceIndex = gNumStaticSurfaces + gNumSOCSurfaces; + u32 lastSOCSurfaceNodeIndex = gNumStaticSurfaceNodes + gNumSOCSurfaceNodes; + + load_object_collision_model_internal(true); + + // Reorder surfaces and nodes and update SOC variables + u32 addedSurfaces = gSurfacesAllocated - lastSurfaceIndex; + u32 addedSurfaceNodes = gSurfaceNodesAllocated - lastSurfaceNodeIndex; + if (addedSurfaces > 0) { + growing_array_move(sSurfacePool, lastSurfaceIndex, lastSOCSurfaceIndex, addedSurfaces); + gNumSOCSurfaces += addedSurfaces; + } + if (addedSurfaceNodes > 0) { + growing_array_move(sSurfaceNodePool, lastSurfaceNodeIndex, lastSOCSurfaceNodeIndex, addedSurfaceNodes); + gNumSOCSurfaceNodes += addedSurfaceNodes; + } + + col = alloc_static_object_collision(); + col->index = lastSOCSurfaceIndex; + col->length = addedSurfaces; + + return col; +} + +void toggle_static_object_collision(struct StaticObjectCollision *col, bool tangible) { + for (s32 i = 0; i < col->length; i++) { + struct Surface *surf = sSurfacePool->buffer[col->index + i]; + if (tangible) { + surf->flags &= ~SURFACE_FLAG_INTANGIBLE; + } else { + surf->flags |= SURFACE_FLAG_INTANGIBLE; + } + } +} + +struct Surface *get_static_object_surface(struct StaticObjectCollision *col, u32 index) { + if (!col) { return NULL; } + if (index >= col->length) { return NULL; } + struct Surface *surf = sSurfacePool->buffer[col->index + index]; + return surf; } struct Surface *obj_get_surface_from_index(struct Object *o, u32 index) { diff --git a/src/engine/surface_load.h b/src/engine/surface_load.h index 262958423..d0f2db1ad 100644 --- a/src/engine/surface_load.h +++ b/src/engine/surface_load.h @@ -27,6 +27,13 @@ typedef struct SurfaceNode SpatialPartitionCell[3]; extern SpatialPartitionCell gStaticSurfacePartition[NUM_CELLS][NUM_CELLS]; extern SpatialPartitionCell gDynamicSurfacePartition[NUM_CELLS][NUM_CELLS]; +extern s32 gSurfaceNodesAllocated; +extern s32 gSurfacesAllocated; +extern s32 gNumStaticSurfaceNodes; +extern s32 gNumStaticSurfaces; +extern s32 gNumSOCSurfaceNodes; +extern s32 gNumSOCSurfaces; + void alloc_surface_pools(void); u32 get_area_terrain_size(s16 *data); @@ -38,6 +45,15 @@ Loads the object's collision data into dynamic collision. You must run this every frame in your object's behavior loop for it to have collision |descriptionEnd| */ void load_object_collision_model(void); +/* |description| +Loads the object's collision data into static collision. +You may run this only once to capture the object's collision at that frame. +|descriptionEnd| */ +struct StaticObjectCollision *load_static_object_collision(); +/* |description|Toggles a collection of static object surfaces|descriptionEnd| */ +void toggle_static_object_collision(struct StaticObjectCollision *col, bool tangible); +/* |description|Gets a surface corresponding to `index` from the static object collision|descriptionEnd| */ +struct Surface *get_static_object_surface(struct StaticObjectCollision *col, u32 index); /* |description|Gets a surface corresponding to `index` from the surface pool buffer|descriptionEnd| */ struct Surface *obj_get_surface_from_index(struct Object *o, u32 index); /* |description|Checks if a surface has force|descriptionEnd| */ diff --git a/src/game/behaviors/bowser.inc.c b/src/game/behaviors/bowser.inc.c index 78a0daac8..52c474577 100644 --- a/src/game/behaviors/bowser.inc.c +++ b/src/game/behaviors/bowser.inc.c @@ -3,6 +3,7 @@ static u32 networkBowserAnimationIndex = 0; static u8 bowserIsDying = FALSE; static u8 bowserCutscenePlayed = FALSE; static u8 bowserIsCutscenePlayer = FALSE; +static u8 bowserCutsceneGlobalIndex = UNKNOWN_GLOBAL_INDEX; void bowser_tail_anchor_act_0(void) { struct Object* bowser = o->parentObj; @@ -777,6 +778,10 @@ void bowser_act_thrown_dropped(void) o->oAction = 4; else o->oAction = 12; + + if (is_nearest_mario_state_to_object(gMarioState, o)) { + network_send_object(o); + } } } @@ -1125,8 +1130,17 @@ void bowser_act_ride_tilting_platform(void) { cur_obj_extend_animation_if_at_end(); } -void bowser_act_nothing(void) { - +void bowser_act_nothing(void) { // start moving if cutscene player is inactive + if (bowserCutsceneGlobalIndex == UNKNOWN_GLOBAL_INDEX) { + return; + } + + struct NetworkPlayer* np = network_player_from_global_index(bowserCutsceneGlobalIndex); + if (np == NULL || !is_player_active(&gMarioStates[np->localIndex])) { + bowserCutscenePlayed = TRUE; + bowser_initialize_action(); + return; + } } s32 bowser_check_fallen_off_stage(void) // bowser off stage? @@ -1232,6 +1246,7 @@ void bowser_held_update(void) { return; } + o->parentObj = player; o->oBowserUnkF4 &= ~0x20000; cur_obj_become_intangible(); @@ -1385,6 +1400,13 @@ static u8 bhv_bowser_ignore_if_true(void) { return FALSE; } +static void bhv_bowser_on_received_post(UNUSED u8 localIndex) { + // prevent sync from putting bowser in text action instead of nothing action + if (!(bowserIsCutscenePlayer || bowserCutscenePlayed) && (o->oAction == 5 || o->oAction == 6)) { + o->oAction = 20; + } +} + void bhv_bowser_init(void) { bowserIsDying = FALSE; s32 level; // 0 is dw, 1 is fs, 2 is sky @@ -1408,9 +1430,11 @@ void bhv_bowser_init(void) { // Make sure we're the first to trigger Bowser. if (!is_other_player_active()) { bowserIsCutscenePlayer = TRUE; + bowserCutsceneGlobalIndex = gNetworkPlayerLocal->globalIndex; o->oAction = 5; // bowser_act_text_wait } else { // If we aren't do nothing till we get our sync. bowserIsCutscenePlayer = FALSE; + bowserCutsceneGlobalIndex = UNKNOWN_GLOBAL_INDEX; o->oAction = 20; // bowser_act_nothing } @@ -1419,9 +1443,11 @@ void bhv_bowser_init(void) { if (so) { so->override_ownership = bhv_bowser_override_ownership; so->ignore_if_true = bhv_bowser_ignore_if_true; + so->on_received_post = bhv_bowser_on_received_post; so->fullObjectSync = TRUE; sync_object_init_field_with_size(o, &o->header.gfx.node.flags, 16); sync_object_init_field_with_size(o, &o->header.gfx.animInfo.animFrame, 16); + sync_object_init_field_with_size(o, &bowserCutsceneGlobalIndex, 8); sync_object_init_field(o, &networkBowserAnimationIndex); sync_object_init_field(o, &o->header.gfx.scale[0]); sync_object_init_field(o, &o->header.gfx.scale[1]); diff --git a/src/game/behaviors/heave_ho.inc.c b/src/game/behaviors/heave_ho.inc.c index 94f8be6a7..62f27e81e 100644 --- a/src/game/behaviors/heave_ho.inc.c +++ b/src/game/behaviors/heave_ho.inc.c @@ -23,7 +23,7 @@ void bhv_heave_ho_throw_mario_loop(void) { if (player) { player->oInteractStatus |= INT_STATUS_MARIO_UNK2; } - if (marioState) { + if (marioState && marioState->action == ACT_GRABBED) { marioState->forwardVel = -45.0f; marioState->vel[1] = 95.0f; } diff --git a/src/game/bettercamera.inc.h b/src/game/bettercamera.inc.h index 995b81686..5a81b42b8 100644 --- a/src/game/bettercamera.inc.h +++ b/src/game/bettercamera.inc.h @@ -101,7 +101,7 @@ inline static s16 newcam_adjust_value(f32 var, f32 val, f32 limit) { inline static s32 newcam_ivrt(u8 axis) { return ( axis == 0 ? - (gNewCamera.invertX ? 1 : -1) : + (gNewCamera.invertX ? -1 : 1) : (gNewCamera.invertY ? -1 : 1) ); } @@ -313,7 +313,7 @@ static void newcam_zoom_button(void) { // When you press L, set the flag for centering the camera. Afterwards, start setting the yaw to the Player's yaw at the time. if (gNewCamera.LCentering && (gPlayer1Controller->buttonDown & L_TRIG)) { - gNewCamera.yawTarget = -gMarioState->faceAngle[1] - 0x4000; + gNewCamera.yawTarget = -gMarioState->statusForCamera->faceAngle[1] - 0x4000; gNewCamera.centering = true; } @@ -346,24 +346,24 @@ static void newcam_update_values(void) { if (gNewCamera.turnWait > 0 && gMarioState->vel[1] == 0) { gNewCamera.turnWait--; } else if (gMarioState->intendedMag > 0 && gMarioState->vel[1] == 0) { - gNewCamera.yaw = approach_s16_symmetric(gNewCamera.yaw, -gMarioState->faceAngle[1] - 0x4000, ((gNewCamera.aggression * (ABS(gPlayer1Controller->rawStickX / 10.f))) * (gMarioState->forwardVel / 32.f))); + gNewCamera.yaw = approach_s16_symmetric(gNewCamera.yaw, -gMarioState->statusForCamera->faceAngle[1] - 0x4000, ((gNewCamera.aggression * (ABS(gPlayer1Controller->rawStickX / 10.f))) * (gMarioState->forwardVel / 32.f))); } else { gNewCamera.turnWait = 10; } // During slide actions in slide levels, force centering if (gNewCamera.isSlide && ( - gMarioState->action == ACT_BUTT_SLIDE || - gMarioState->action == ACT_STOMACH_SLIDE || - gMarioState->action == ACT_HOLD_BUTT_SLIDE || - gMarioState->action == ACT_HOLD_STOMACH_SLIDE) + gMarioState->statusForCamera->action == ACT_BUTT_SLIDE || + gMarioState->statusForCamera->action == ACT_STOMACH_SLIDE || + gMarioState->statusForCamera->action == ACT_HOLD_BUTT_SLIDE || + gMarioState->statusForCamera->action == ACT_HOLD_STOMACH_SLIDE) ) { centering = (gMarioState->forwardVel > 8); ycentering = false; } // Force centering when flying - if ((gMarioState->action & ACT_FLAG_FLYING) == ACT_FLAG_FLYING) { + if ((gMarioState->statusForCamera->action & ACT_FLAG_FLYING) == ACT_FLAG_FLYING) { centering = true; } @@ -371,12 +371,12 @@ static void newcam_update_values(void) { // Place the camera behind Mario during the ACT_SHOT_FROM_CANNON action static u32 sLastAction = 0; static bool sForceCentering = false; - if (sLastAction != gMarioState->action) { - sLastAction = gMarioState->action; + if (sLastAction != gMarioState->statusForCamera->action) { + sLastAction = gMarioState->statusForCamera->action; sForceCentering = true; - switch (gMarioState->action) { + switch (gMarioState->statusForCamera->action) { case ACT_SHOT_FROM_CANNON: - gNewCamera.yaw = -gMarioState->faceAngle[1] - 0x4000; + gNewCamera.yaw = -gMarioState->statusForCamera->faceAngle[1] - 0x4000; break; } } @@ -392,14 +392,14 @@ static void newcam_update_values(void) { } // Force centering during non-still swimming actions - if (gMarioState->action & ACT_FLAG_SWIMMING && gMarioState->forwardVel > 2) { + if (gMarioState->statusForCamera->action & ACT_FLAG_SWIMMING && gMarioState->forwardVel > 2) { centering = true; } if (centering) { - gNewCamera.yaw = approach_s16_symmetric(gNewCamera.yaw, -gMarioState->faceAngle[1] - 0x4000, gMarioState->forwardVel * 128); + gNewCamera.yaw = approach_s16_symmetric(gNewCamera.yaw, -gMarioState->statusForCamera->faceAngle[1] - 0x4000, gMarioState->forwardVel * 128); if (gMarioState->forwardVel > 1 && ycentering) { - gNewCamera.tilt = approach_s16_symmetric(gNewCamera.tilt, (-gMarioState->faceAngle[0] * 0.8f) + NEWCAM_TILT_CENTERING, gMarioState->forwardVel * 32); + gNewCamera.tilt = approach_s16_symmetric(gNewCamera.tilt, (-gMarioState->statusForCamera->faceAngle[0] * 0.8f) + NEWCAM_TILT_CENTERING, gMarioState->forwardVel * 32); } else { gNewCamera.tilt = approach_s16_symmetric(gNewCamera.tilt, NEWCAM_TILT_CENTERING, 32); } @@ -508,12 +508,12 @@ static void newcam_set_pan(void) { } // Apply panning values based on Mario's direction. - if (gMarioState->action != ACT_HOLDING_BOWSER && - gMarioState->action != ACT_SLEEPING && - gMarioState->action != ACT_START_SLEEPING + if (gMarioState->statusForCamera->action != ACT_HOLDING_BOWSER && + gMarioState->statusForCamera->action != ACT_SLEEPING && + gMarioState->statusForCamera->action != ACT_START_SLEEPING ) { - approach_f32_asymptotic_bool(&gNewCamera.panX, newcam_lengthdir_x((160.f * gNewCamera.panLevel) / 100.f, -gMarioState->faceAngle[1] - 0x4000), 0.05f); - approach_f32_asymptotic_bool(&gNewCamera.panZ, newcam_lengthdir_y((160.f * gNewCamera.panLevel) / 100.f, -gMarioState->faceAngle[1] - 0x4000), 0.05f); + approach_f32_asymptotic_bool(&gNewCamera.panX, newcam_lengthdir_x((160.f * gNewCamera.panLevel) / 100.f, -gMarioState->statusForCamera->faceAngle[1] - 0x4000), 0.05f); + approach_f32_asymptotic_bool(&gNewCamera.panZ, newcam_lengthdir_y((160.f * gNewCamera.panLevel) / 100.f, -gMarioState->statusForCamera->faceAngle[1] - 0x4000), 0.05f); } else { approach_f32_asymptotic_bool(&gNewCamera.panX, 0, 0.05f); approach_f32_asymptotic_bool(&gNewCamera.panZ, 0, 0.05f); @@ -538,7 +538,7 @@ static void newcam_level_bounds(void) { static void newcam_position_cam(void) { f32 floorY = 0; f32 floorY2 = 0; - if (!(gMarioState->action & ACT_FLAG_SWIMMING)) { + if (!(gMarioState->statusForCamera->action & ACT_FLAG_SWIMMING)) { calc_y_to_curr_floor(&floorY, 1.f, 200.f, &floorY2, 0.9f, 200.f); } @@ -549,9 +549,9 @@ static void newcam_position_cam(void) { // Fetch Mario's current position. // Not hardcoded just for the sake of flexibility, though this specific bit is temp, // because it won't always want to be focusing on Mario. - gNewCamera.posTarget[0] = gMarioState->pos[0]; - gNewCamera.posTarget[1] = gMarioState->pos[1] + NEWCAM_MARIO_HEIGHT; - gNewCamera.posTarget[2] = gMarioState->pos[2]; + gNewCamera.posTarget[0] = gMarioState->statusForCamera->pos[0]; + gNewCamera.posTarget[1] = gMarioState->statusForCamera->pos[1] + NEWCAM_MARIO_HEIGHT; + gNewCamera.posTarget[2] = gMarioState->statusForCamera->pos[2]; // These will set the position of the camera to where Mario is supposed to be, // minus adjustments for where the camera should be, on top of. @@ -607,7 +607,7 @@ static void newcam_apply_values(struct Camera *c) { // The ingame cutscene system is such a spaghetti mess I actually have to resort to something as stupid as this to cover every base. static void newcam_update_camera_yaw(struct Camera *c, bool useMarioYaw) { if (useMarioYaw) { - gNewCamera.yaw = -gMarioState->faceAngle[1] - 0x4000; + gNewCamera.yaw = -gMarioState->statusForCamera->faceAngle[1] - 0x4000; } else { gNewCamera.yaw = -c->yaw + 0x4000; } diff --git a/src/game/camera.c b/src/game/camera.c index d455ef7fe..d806b3e91 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -1633,6 +1633,12 @@ s32 update_boss_fight_camera(struct Camera *c, Vec3f focus, Vec3f pos) { if ((o = gSecondCameraFocus) != NULL) { object_pos_to_vec3f(secondFocus, o); heldState = o->oHeldState; + + // for coop: if bowser is being held by someone else, don't alter the camera to prevent camera oscillations + if (gMarioStates[0].heldObj == NULL) { + heldState = 0; + } + } else { // If no boss is there, just rotate around the area's center point. secondFocus[0] = c->areaCenX; @@ -10947,10 +10953,12 @@ void cutscene_palette_editor(struct Camera *c) { return; } + bool capMissing = !(m->flags & (MARIO_CAP_ON_HEAD | MARIO_CAP_IN_HAND)); + // Press the Z bind to toggle cap static bool pressed = false; if (gInteractablePad.button & PAD_BUTTON_Z) { - if (!pressed && m->action == ACT_IDLE) { + if (!capMissing && !pressed && m->action == ACT_IDLE) { set_mario_action(m, ACT_PALETTE_EDITOR_CAP, (m->flags & MARIO_CAP_ON_HEAD) != 0); } pressed = true; @@ -10962,8 +10970,10 @@ void cutscene_palette_editor(struct Camera *c) { if (gDjuiPaletteToggle) { djui_base_set_visible( &gDjuiPaletteToggle->base, - m->action == ACT_IDLE || - m->action == ACT_PALETTE_EDITOR_CAP + ( + m->action == ACT_IDLE || + m->action == ACT_PALETTE_EDITOR_CAP + ) && !capMissing ); } @@ -12249,7 +12259,7 @@ static u8 rom_hack_cam_can_see_mario(Vec3f desiredPos) { f32 mDist; s16 mPitch; s16 mYaw; - vec3f_get_dist_and_angle(desiredPos, gMarioStates[0].pos, &mDist, &mPitch, &mYaw); + vec3f_get_dist_and_angle(desiredPos, sMarioCamState->pos, &mDist, &mPitch, &mYaw); s16 degreeMult = sRomHackZoom ? 7 : 5; @@ -12379,7 +12389,7 @@ void mode_rom_hack_camera(struct Camera *c) { // Thank you hackersm64 if (gRomhackCameraSettings.dpad) { if (gMarioStates[0].controller->buttonPressed & U_JPAD) { - sRomHackYaw = DEGREES(180 + 90) - gMarioStates[0].faceAngle[1]; + sRomHackYaw = DEGREES(180 + 90) - sMarioCamState->faceAngle[1]; } else if (gMarioStates[0].controller->buttonDown & L_JPAD) { sRomHackYaw -= DEGREES(0.5) * (camera_config_is_x_inverted() ? 1 : -1); } else if (gMarioStates[0].controller->buttonDown & R_JPAD) { @@ -12408,7 +12418,7 @@ void mode_rom_hack_camera(struct Camera *c) { // figure out desired position f32 desiredDist = sRomHackZoom ? gRomhackCameraSettings.zoomedInDist : gRomhackCameraSettings.zoomedOutDist; f32 desiredHeight = sRomHackZoom ? gRomhackCameraSettings.zoomedInHeight : gRomhackCameraSettings.zoomedOutHeight; - f32* mPos = &gMarioStates[0].pos[0]; + f32* mPos = &sMarioCamState->pos[0]; pos[0] = mPos[0] + coss(sRomHackYaw) * desiredDist; pos[1] = mPos[1] + desiredHeight; pos[2] = mPos[2] + sins(sRomHackYaw) * desiredDist; @@ -12443,9 +12453,9 @@ void mode_rom_hack_camera(struct Camera *c) { vec3f_normalize(dir); // start at mario - c->pos[0] = gMarioStates[0].pos[0]; - c->pos[1] = gMarioStates[0].pos[1] + 150; - c->pos[2] = gMarioStates[0].pos[2]; + c->pos[0] = sMarioCamState->pos[0]; + c->pos[1] = sMarioCamState->pos[1] + 150; + c->pos[2] = sMarioCamState->pos[2]; rom_hack_cam_walk(c->pos, dir, desiredDist); } @@ -12489,8 +12499,8 @@ s32 update_rom_hack_camera(struct Camera *c, Vec3f focus, Vec3f pos) { // if rom hack camera was just set, figure out the yaw to use if (!sRomHackIsUpdate) { sRomHackYaw = DEGREES(90) - atan2s( - c->pos[2] - gMarioStates[0].pos[2], - c->pos[0] - gMarioStates[0].pos[0]); + c->pos[2] - sMarioCamState->pos[2], + c->pos[0] - sMarioCamState->pos[0]); sRomHackYaw = (sRomHackYaw / DEGREES(45)) * DEGREES(45); } diff --git a/src/game/characters.c b/src/game/characters.c index d751fba7d..9e359ebef 100644 --- a/src/game/characters.c +++ b/src/game/characters.c @@ -35,7 +35,7 @@ struct Character gCharacters[CT_MAX] = { .type = CT_MARIO, .name = "Mario", .hudHead = '(', - .hudHeadTexture = { .texture = (Texture*)texture_hud_char_mario_head, .bitSize = 8, .width = 16, .height = 16, .name = "texture_hud_char_mario_head" }, + .hudHeadTexture = { .texture = texture_hud_char_mario_head, .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b, .name = "texture_hud_char_mario_head" }, .cameraHudHead = GLYPH_CAM_MARIO_HEAD, .modelId = MODEL_MARIO, .capModelId = MODEL_MARIOS_CAP, @@ -101,7 +101,7 @@ struct Character gCharacters[CT_MAX] = { .type = CT_LUIGI, .name = "Luigi", .hudHead = ')', - .hudHeadTexture = { .texture = (Texture*)texture_hud_char_luigi_head, .bitSize = 8, .width = 16, .height = 16, .name = "texture_hud_char_luigi_head" }, + .hudHeadTexture = { .texture = texture_hud_char_luigi_head, .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b, .name = "texture_hud_char_luigi_head" }, .cameraHudHead = GLYPH_CAM_LUIGI_HEAD, .modelId = MODEL_LUIGI, .capModelId = MODEL_LUIGIS_CAP, @@ -167,7 +167,7 @@ struct Character gCharacters[CT_MAX] = { .type = CT_TOAD, .name = "Toad", .hudHead = '|', - .hudHeadTexture = { .texture = (Texture*)texture_hud_char_toad_head, .bitSize = 8, .width = 16, .height = 16, .name = "texture_hud_char_toad_head" }, + .hudHeadTexture = { .texture = texture_hud_char_toad_head, .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b, .name = "texture_hud_char_toad_head" }, .cameraHudHead = GLYPH_CAM_TOAD_HEAD, .modelId = MODEL_TOAD_PLAYER, .capModelId = MODEL_TOADS_CAP, @@ -233,7 +233,7 @@ struct Character gCharacters[CT_MAX] = { .type = CT_WALUIGI, .name = "Waluigi", .hudHead = ']', - .hudHeadTexture = { .texture = (Texture*)texture_hud_char_waluigi_head, .bitSize = 8, .width = 16, .height = 16, .name = "texture_hud_char_waluigi_head" }, + .hudHeadTexture = { .texture = texture_hud_char_waluigi_head, .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b, .name = "texture_hud_char_waluigi_head" }, .cameraHudHead = GLYPH_CAM_WALUIGI_HEAD, .modelId = MODEL_WALUIGI, .capModelId = MODEL_WALUIGIS_CAP, @@ -299,7 +299,7 @@ struct Character gCharacters[CT_MAX] = { .type = CT_WARIO, .name = "Wario", .hudHead = '[', - .hudHeadTexture = { .texture = (Texture*)texture_hud_char_wario_head, .bitSize = 8, .width = 16, .height = 16, .name = "texture_hud_char_wario_head" }, + .hudHeadTexture = { .texture = texture_hud_char_wario_head, .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b, .name = "texture_hud_char_wario_head" }, .cameraHudHead = GLYPH_CAM_WARIO_HEAD, .modelId = MODEL_WARIO, .capModelId = MODEL_WARIOS_CAP, diff --git a/src/game/first_person_cam.c b/src/game/first_person_cam.c index 53f89d9b0..e59d245a3 100644 --- a/src/game/first_person_cam.c +++ b/src/game/first_person_cam.c @@ -63,8 +63,6 @@ static void first_person_camera_update(void) { struct MarioState *m = &gMarioStates[0]; f32 sensX = 0.3f * camera_config_get_x_sensitivity(); f32 sensY = 0.4f * camera_config_get_y_sensitivity(); - s16 invX = camera_config_is_x_inverted() ? 1 : -1; - s16 invY = camera_config_is_y_inverted() ? 1 : -1; if (mouse_relative_enabled) { // hack: make c buttons work for moving the camera @@ -79,7 +77,7 @@ static void first_person_camera_update(void) { // update pitch if (!gFirstPersonCamera.forcePitch) { - gFirstPersonCamera.pitch -= sensY * (invY * extStickY - 1.5f * mouse_y); + gFirstPersonCamera.pitch -= sensY * (extStickY - 1.5f * mouse_y); gFirstPersonCamera.pitch = clamp(gFirstPersonCamera.pitch, -0x3F00, 0x3F00); } @@ -88,7 +86,7 @@ static void first_person_camera_update(void) { if (m->controller->buttonDown & L_TRIG && gFirstPersonCamera.centerL) { gFirstPersonCamera.yaw = m->faceAngle[1] + 0x8000; } else { - gFirstPersonCamera.yaw += sensX * (invX * extStickX - 1.5f * mouse_x); + gFirstPersonCamera.yaw += sensX * (extStickX - 1.5f * mouse_x); } } } diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index 3a555da56..ac984fad6 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -141,6 +141,8 @@ u8 gMenuHoldKeyIndex = 0; u8 gMenuHoldKeyTimer = 0; s32 gDialogResponse = 0; +bool gPauseMenuHidden = false; + #if defined(VERSION_JP) || defined(VERSION_SH) || defined(VERSION_EU) #ifdef VERSION_EU #define CHCACHE_BUFLEN (8 * 8) // EU only converts 8x8 @@ -471,9 +473,10 @@ f32 get_generic_dialog_width(u8* dialog) { } f32 get_generic_ascii_string_width(const char* ascii) { - u8 dialog[256] = { DIALOG_CHAR_TERMINATOR }; - convert_string_ascii_to_sm64(dialog, ascii, false); - return get_generic_dialog_width(dialog); + u8 *str = convert_string_ascii_to_sm64(NULL, ascii, false); + f32 width = get_generic_dialog_width(str); + free(str); + return width; } f32 get_generic_dialog_height(u8* dialog) { @@ -487,15 +490,16 @@ f32 get_generic_dialog_height(u8* dialog) { } f32 get_generic_ascii_string_height(const char* ascii) { - u8 dialog[256] = { DIALOG_CHAR_TERMINATOR }; - convert_string_ascii_to_sm64(dialog, ascii, false); - return get_generic_dialog_height(dialog); + u8 *str = convert_string_ascii_to_sm64(NULL, ascii, false); + f32 height = get_generic_dialog_height(str); + free(str); + return height; } void print_generic_ascii_string(s16 x, s16 y, const char* ascii) { - u8 dialog[256] = { DIALOG_CHAR_TERMINATOR }; - convert_string_ascii_to_sm64(dialog, ascii, false); - print_generic_string(x, y, dialog); + u8 *str = convert_string_ascii_to_sm64(NULL, ascii, false); + print_generic_string(x, y, str); + free(str); } #if defined(VERSION_JP) || defined(VERSION_SH) @@ -1077,9 +1081,8 @@ void handle_special_dialog_text(s32 dialogID) { // dialog ID tables, in order } } -static u8 sHookString[255]; -static bool sOverrideDialogString = false; -void convert_string_ascii_to_sm64(u8 *str64, const char *strAscii, bool menu); +static u8 *sOverrideDialogHookString = NULL; + bool handle_dialog_hook(s32 dialogId) { bool openDialogBox = true; const char *dialogTextOverride = NULL; @@ -1088,8 +1091,13 @@ bool handle_dialog_hook(s32 dialogId) { if (gCamera->cutscene == CUTSCENE_READ_MESSAGE) { gCamera->cutscene = 0; } return false; } - sOverrideDialogString = dialogTextOverride != NULL; - if (sOverrideDialogString) { convert_string_ascii_to_sm64(sHookString, dialogTextOverride, false); } + + free(sOverrideDialogHookString); + if (dialogTextOverride != NULL) { + sOverrideDialogHookString = convert_string_ascii_to_sm64(NULL, dialogTextOverride, false); + } else { + sOverrideDialogHookString = NULL; + } return true; } @@ -1443,7 +1451,7 @@ void handle_dialog_text_and_pages(s8 colorMode, struct DialogEntry *dialog, s8 l u8 strChar; - u8 *str = sOverrideDialogString ? sHookString : segmented_to_virtual(dialog->str); + u8 *str = sOverrideDialogHookString != NULL ? sOverrideDialogHookString : segmented_to_virtual(dialog->str); s8 lineNum = 1; s8 totalLines; @@ -2179,7 +2187,7 @@ void do_cutscene_handler(void) { void print_peach_letter_message(void) { struct DialogEntry *dialog = dialog_table_get(gDialogID); - const u8* str = sOverrideDialogString ? sHookString : dialog->str; + const u8* str = sOverrideDialogHookString != NULL ? sOverrideDialogHookString : dialog->str; create_dl_translation_matrix(MENU_MTX_PUSH, 97.0f, 118.0f, 0); @@ -2969,7 +2977,7 @@ s16 render_pause_courses_and_castle(void) { } break; case DIALOG_STATE_VERTICAL: - if (!gDjuiPanelPauseCreated) { + if (!gDjuiPanelPauseCreated && !gPauseMenuHidden) { shade_screen(); render_pause_my_score_coins(); render_pause_red_coins(); @@ -3010,7 +3018,7 @@ s16 render_pause_courses_and_castle(void) { } break; case DIALOG_STATE_HORIZONTAL: - if (!gDjuiPanelPauseCreated) { + if (!gDjuiPanelPauseCreated && !gPauseMenuHidden) { shade_screen(); print_hud_pause_colorful_str(); diff --git a/src/game/ingame_menu.h b/src/game/ingame_menu.h index 6748a81a0..e2ed324df 100644 --- a/src/game/ingame_menu.h +++ b/src/game/ingame_menu.h @@ -111,6 +111,7 @@ enum DialogSpecialChars { DIALOG_CHAR_TERMINATOR = 0xFF }; +extern s8 gDialogBoxState; extern s32 gDialogResponse; extern u16 gDialogColorFadeTimer; extern s8 gLastDialogLineNum; @@ -133,13 +134,13 @@ extern u8 gDialogTextColorG; extern u8 gDialogTextColorB; extern u8 gDialogTextColorA; +extern s16 gMenuMode; + void create_dl_identity_matrix(void); void create_dl_translation_matrix(s8 pushOp, f32 x, f32 y, f32 z); void create_dl_rotation_matrix(s8 pushOp, f32 a, f32 x, f32 y, f32 z); void create_dl_ortho_matrix(void); void render_generic_char(u8 c); -u8 str_ascii_char_to_dialog(char c); -void str_ascii_to_dialog(const char* string, u8* dialog, u16 length); f32 get_generic_dialog_width(u8* dialog); f32 get_generic_ascii_string_width(const char* ascii); f32 get_generic_dialog_height(u8* dialog); @@ -184,6 +185,8 @@ void do_cutscene_handler(void); void render_hud_cannon_reticle(void); void reset_red_coins_collected(void); s16 render_menus_and_dialogs(void); +/* |description|The internal function used by SM64 which plays a tune whenever boss, KtQ, etc dialog is read.|descriptionEnd| */ +void handle_special_dialog_text(s32 dialogID); void create_dl_scale_matrix(s8 pushOp, f32 x, f32 y, f32 z); /* |description|Dialog box customization: Sets the minimum width for a dialog box|descriptionEnd| */ void set_min_dialog_width(s16 width); diff --git a/src/game/interaction.c b/src/game/interaction.c index 472fa4d80..d81651099 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -456,6 +456,7 @@ void mario_retrieve_cap(struct MarioState* m) { if (!m) { return; } mario_drop_held_object(m); save_file_clear_flags(SAVE_FLAG_CAP_ON_KLEPTO | SAVE_FLAG_CAP_ON_UKIKI); + m->cap &= ~(SAVE_FLAG_CAP_ON_KLEPTO | SAVE_FLAG_CAP_ON_UKIKI); m->flags &= ~MARIO_CAP_ON_HEAD; m->flags |= MARIO_NORMAL_CAP | MARIO_CAP_IN_HAND; } @@ -2156,6 +2157,10 @@ u32 interact_cap(struct MarioState *m, UNUSED u32 interactType, struct Object *o capTime = gLevelValues.wingCapDuration; capMusic = SEQUENCE_ARGS(4, gLevelValues.wingCapSequence); break; + + case MARIO_NORMAL_CAP: + m->cap = 0; + break; } if (capTime > m->capTimer) { diff --git a/src/game/level_info.c b/src/game/level_info.c index 1436f5518..0482d4866 100644 --- a/src/game/level_info.c +++ b/src/game/level_info.c @@ -17,107 +17,229 @@ extern s32 gInGameLanguage; #include "eu_translation.h" #endif -const struct { const char *str; u8 c; u8 menu; } sSm64CharMap[] = { - - // Digits - { "0", 0x00, 1 }, { "1", 0x01, 1 }, { "2", 0x02, 1 }, { "3", 0x03, 1 }, { "4", 0x04, 1 }, - { "5", 0x05, 1 }, { "6", 0x06, 1 }, { "7", 0x07, 1 }, { "8", 0x08, 1 }, { "9", 0x09, 1 }, - - // Capital letters - { "A", 0x0A, 1 }, { "B", 0x0B, 1 }, { "C", 0x0C, 1 }, { "D", 0x0D, 1 }, { "E", 0x0E, 1 }, - { "F", 0x0F, 1 }, { "G", 0x10, 1 }, { "H", 0x11, 1 }, { "I", 0x12, 1 }, { "J", 0x13, 1 }, - { "K", 0x14, 1 }, { "L", 0x15, 1 }, { "M", 0x16, 1 }, { "N", 0x17, 1 }, { "O", 0x18, 1 }, - { "P", 0x19, 1 }, { "Q", 0x1A, 1 }, { "R", 0x1B, 1 }, { "S", 0x1C, 1 }, { "T", 0x1D, 1 }, - { "U", 0x1E, 1 }, { "V", 0x1F, 1 }, { "W", 0x20, 1 }, { "X", 0x21, 1 }, { "Y", 0x22, 1 }, - { "Z", 0x23, 1 }, - - // Letters - { "a", 0x24, 0 }, { "b", 0x25, 0 }, { "c", 0x26, 0 }, { "d", 0x27, 0 }, { "e", 0x28, 0 }, - { "f", 0x29, 0 }, { "g", 0x2A, 0 }, { "h", 0x2B, 0 }, { "i", 0x2C, 0 }, { "j", 0x2D, 0 }, - { "k", 0x2E, 0 }, { "l", 0x2F, 0 }, { "m", 0x30, 0 }, { "n", 0x31, 0 }, { "o", 0x32, 0 }, - { "p", 0x33, 0 }, { "q", 0x34, 0 }, { "r", 0x35, 0 }, { "s", 0x36, 0 }, { "t", 0x37, 0 }, - { "u", 0x38, 0 }, { "v", 0x39, 0 }, { "w", 0x3A, 0 }, { "x", 0x3B, 0 }, { "y", 0x3C, 0 }, - { "z", 0x3D, 0 }, - - // Punctuation - { ":", 0xE6, 0 }, // colon - { ")(", 0xE2, 0 }, // close-open parentheses - { "<<", 0xF5, 0 }, // double quote open - { ">>", 0xF6, 0 }, // double quote close - { "\'", 0x3E, 1 }, // apostrophe - { ".", 0x3F, 1 }, // period - { ",", 0x6F, 1 }, // comma - { " ", 0x9E, 1 }, // space - { "-", 0x9F, 1 }, // dash - { "(", 0xE1, 0 }, // open parentheses - { ")", 0xE3, 0 }, // close parentheses - { "&", 0xE5, 1 }, // ampersand - { "!", 0xF2, 1 }, // exclamation mark - { "%", 0xF3, 0 }, // percent - { "?", 0xF4, 1 }, // question mark - { "~", 0xF7, 0 }, // tilde - - // Symbols - { "/", 0xD0, 0 }, - { "the", 0xD1, 0 }, - { "you", 0xD2, 0 }, - { "[%]", 0xE0, 0 }, // The number of extra stars required to unlock a star door - { "[A]", 0x54, 0 }, // bold A - { "[B]", 0x55, 0 }, // bold B - { "[C]", 0x56, 0 }, // bold C - { "[Z]", 0x57, 0 }, // bold Z - { "[R]", 0x58, 0 }, // bold R - { "+", 0xE4, 0 }, // left-right arrow - { "^", 0x50, 0 }, // up arrow - { "|", 0x51, 0 }, // down arrow - { "<", 0x52, 0 }, // left arrow - { ">", 0x53, 0 }, // right arrow - { "$", 0xF9, 1 }, // coin - { "★", 0xFA, 1 }, // star filled - { "@", 0xFA, 1 }, // star filled (both ★ and @ match 0xFA) - { "*", 0xFB, 1 }, // multiply - { "•", 0xFC, 0 }, // interpunct (unused) - { "=", 0xFD, 0 }, // star empty - { "\n", 0xFE, 1 }, // New line - { NULL, 0xFF, 1 }, // Null terminator +struct Sm64Char { + const char *str; + u32 len; + u8 c; + bool menu; }; +#define SM64_CHAR(_str, _c, _menu) { \ + .str = _str, \ + .len = sizeof(_str) - 1, \ + .c = _c, \ + .menu = _menu, \ +} + +static const struct Sm64Char sSm64CharMap[] = { + + // Digits + SM64_CHAR("0", 0x00, true), + SM64_CHAR("1", 0x01, true), + SM64_CHAR("2", 0x02, true), + SM64_CHAR("3", 0x03, true), + SM64_CHAR("4", 0x04, true), + SM64_CHAR("5", 0x05, true), + SM64_CHAR("6", 0x06, true), + SM64_CHAR("7", 0x07, true), + SM64_CHAR("8", 0x08, true), + SM64_CHAR("9", 0x09, true), + + // Capital letters + SM64_CHAR("A", 0x0A, true), + SM64_CHAR("B", 0x0B, true), + SM64_CHAR("C", 0x0C, true), + SM64_CHAR("D", 0x0D, true), + SM64_CHAR("E", 0x0E, true), + SM64_CHAR("F", 0x0F, true), + SM64_CHAR("G", 0x10, true), + SM64_CHAR("H", 0x11, true), + SM64_CHAR("I", 0x12, true), + SM64_CHAR("J", 0x13, true), + SM64_CHAR("K", 0x14, true), + SM64_CHAR("L", 0x15, true), + SM64_CHAR("M", 0x16, true), + SM64_CHAR("N", 0x17, true), + SM64_CHAR("O", 0x18, true), + SM64_CHAR("P", 0x19, true), + SM64_CHAR("Q", 0x1A, true), + SM64_CHAR("R", 0x1B, true), + SM64_CHAR("S", 0x1C, true), + SM64_CHAR("T", 0x1D, true), + SM64_CHAR("U", 0x1E, true), + SM64_CHAR("V", 0x1F, true), + SM64_CHAR("W", 0x20, true), + SM64_CHAR("X", 0x21, true), + SM64_CHAR("Y", 0x22, true), + SM64_CHAR("Z", 0x23, true), + + // Letters + SM64_CHAR("a", 0x24, false), + SM64_CHAR("b", 0x25, false), + SM64_CHAR("c", 0x26, false), + SM64_CHAR("d", 0x27, false), + SM64_CHAR("e", 0x28, false), + SM64_CHAR("f", 0x29, false), + SM64_CHAR("g", 0x2A, false), + SM64_CHAR("h", 0x2B, false), + SM64_CHAR("i", 0x2C, false), + SM64_CHAR("j", 0x2D, false), + SM64_CHAR("k", 0x2E, false), + SM64_CHAR("l", 0x2F, false), + SM64_CHAR("m", 0x30, false), + SM64_CHAR("n", 0x31, false), + SM64_CHAR("o", 0x32, false), + SM64_CHAR("p", 0x33, false), + SM64_CHAR("q", 0x34, false), + SM64_CHAR("r", 0x35, false), + SM64_CHAR("s", 0x36, false), + SM64_CHAR("t", 0x37, false), + SM64_CHAR("u", 0x38, false), + SM64_CHAR("v", 0x39, false), + SM64_CHAR("w", 0x3A, false), + SM64_CHAR("x", 0x3B, false), + SM64_CHAR("y", 0x3C, false), + SM64_CHAR("z", 0x3D, false), + + // Punctuation + SM64_CHAR(":", 0xE6, false), // colon + SM64_CHAR(")(", 0xE2, false), // close-open parentheses + SM64_CHAR("<<", 0xF5, false), // double quote open + SM64_CHAR(">>", 0xF6, false), // double quote close + SM64_CHAR("\'", 0x3E, true ), // apostrophe + SM64_CHAR(".", 0x3F, true ), // period + SM64_CHAR(",", 0x6F, true ), // comma + SM64_CHAR(" ", 0x9E, true ), // space + SM64_CHAR("-", 0x9F, true ), // dash + SM64_CHAR("(", 0xE1, false), // open parentheses + SM64_CHAR(")", 0xE3, false), // close parentheses + SM64_CHAR("&", 0xE5, true ), // ampersand + SM64_CHAR("!", 0xF2, true ), // exclamation mark + SM64_CHAR("%", 0xF3, false), // percent + SM64_CHAR("?", 0xF4, true ), // question mark + SM64_CHAR("~", 0xF7, false), // tilde + + // Symbols + SM64_CHAR("/", 0xD0, false), + SM64_CHAR("the", 0xD1, false), + SM64_CHAR("you", 0xD2, false), + SM64_CHAR("[%]", 0xE0, false), // The number of extra stars required to unlock a star door + SM64_CHAR("[A]", 0x54, false), // bold A + SM64_CHAR("[B]", 0x55, false), // bold B + SM64_CHAR("[C]", 0x56, false), // bold C + SM64_CHAR("[Z]", 0x57, false), // bold Z + SM64_CHAR("[R]", 0x58, false), // bold R + SM64_CHAR("+", 0xE4, false), // left-right arrow + SM64_CHAR("^", 0x50, false), // up arrow + SM64_CHAR("|", 0x51, false), // down arrow + SM64_CHAR("<", 0x52, false), // left arrow + SM64_CHAR(">", 0x53, false), // right arrow + SM64_CHAR("$", 0xF9, true ), // coin + SM64_CHAR("★", 0xFA, true ), // star filled + SM64_CHAR("@", 0xFA, true ), // star filled (both ★ and @ match 0xFA) + SM64_CHAR("*", 0xFB, true ), // multiply + SM64_CHAR("•", 0xFC, false), // interpunct (unused) + SM64_CHAR("=", 0xFD, false), // star empty + SM64_CHAR("\n", 0xFE, true ), // New line +// SM64_CHAR(NULL, 0xFF, true ), // Null terminator +}; + +#define ASCII_TO_SM64_MAX_CHAR_SIZE 1 +#define SM64_TO_ASCII_MAX_CHAR_SIZE 4 + static const char *ascii_to_sm64_char(u8 *str64, const char *strAscii, bool menu) { - for (s32 i = 0; sSm64CharMap[i].str != NULL; ++i) { - if (menu && !sSm64CharMap[i].menu) { continue; } - if (strstr(strAscii, sSm64CharMap[i].str) == strAscii) { - *str64 = sSm64CharMap[i].c; - return strAscii + strlen(sSm64CharMap[i].str); + for (u32 i = 0; i < ARRAY_COUNT(sSm64CharMap); ++i) { + const struct Sm64Char *ch = &sSm64CharMap[i]; + if (menu && !ch->menu) { + continue; + } + if (memcmp(strAscii, ch->str, ch->len) == 0) { + *str64 = ch->c; + return strAscii + ch->len; } } *str64 = 0x9E; return strAscii + 1; } -static char *sm64_to_ascii_char(char *strAscii, const u8 *str64) { - for (s32 i = 0; sSm64CharMap[i].str != NULL; ++i) { - if (sSm64CharMap[i].c == *str64) { - s32 l = strlen(sSm64CharMap[i].str); - memcpy(strAscii, sSm64CharMap[i].str, l); - return strAscii + l; +static char *sm64_to_ascii_char(char *strAscii, u8 c) { + for (u32 i = 0; i < ARRAY_COUNT(sSm64CharMap); ++i) { + const struct Sm64Char *ch = &sSm64CharMap[i]; + if (ch->c == c) { + memcpy(strAscii, ch->str, ch->len); + return strAscii + ch->len; } } *strAscii = ' '; return strAscii + 1; } -void convert_string_ascii_to_sm64(u8 *str64, const char *strAscii, bool menu) { - for (; *strAscii != 0; str64++) { - strAscii = ascii_to_sm64_char(str64, strAscii, menu); +u8 *convert_string_ascii_to_sm64(u8 *str64, const char *strAscii, bool menu) { + if (!strAscii) { return str64; } + + // allocate string with maximum size + bool shouldResizeString = false; + if (!str64) { + str64 = malloc(ASCII_TO_SM64_MAX_CHAR_SIZE * strlen(strAscii) + 1); + if (!str64) { + return NULL; + } + shouldResizeString = true; } - *str64 = 0xFF; + + // convert string + u8 *str64End = str64; + for (; *strAscii != 0; str64End++) { + strAscii = ascii_to_sm64_char(str64End, strAscii, menu); + } + *(str64End++) = 0xFF; + + // resize string if it was allocated by this function + if (shouldResizeString) { + u8 *resizedStr64 = realloc(str64, (size_t) (str64End - str64)); + if (resizedStr64) { + str64 = resizedStr64; + } + } + + return str64; } -void convert_string_sm64_to_ascii(char *strAscii, const u8 *str64) { - for (; *str64 != 0xFF; str64++) { - strAscii = sm64_to_ascii_char(strAscii, str64); +static inline size_t strlen64(const u8 *str64) { + const u8 *str64Begin = str64; + for (; *str64 != 0xFF; str64++); + return (size_t) (str64 - str64Begin); +} + +char *convert_string_sm64_to_ascii(char *strAscii, const u8 *str64) { + if (!str64) { return strAscii; } + + // allocate string with maximum size + bool shouldResizeString = false; + if (!strAscii) { + strAscii = malloc(SM64_TO_ASCII_MAX_CHAR_SIZE * strlen64(str64) + 1); + if (!strAscii) { + return NULL; + } + shouldResizeString = true; } - *strAscii = 0; + + // convert string + char *strAsciiEnd = strAscii; + for (; *str64 != 0xFF; str64++) { + strAsciiEnd = sm64_to_ascii_char(strAsciiEnd, *str64); + } + *(strAsciiEnd++) = 0; + + // resize string if it was allocated by this function + if (shouldResizeString) { + char *resizedStrAscii = realloc(strAscii, (size_t) (strAsciiEnd - strAscii)); + if (resizedStrAscii) { + strAscii = resizedStrAscii; + } + } + + return strAscii; } static void capitalize_string_ascii(char *strAscii) { diff --git a/src/game/level_info.h b/src/game/level_info.h index a9dd52958..156acbdce 100644 --- a/src/game/level_info.h +++ b/src/game/level_info.h @@ -7,8 +7,8 @@ void **get_course_name_table(void); void **get_course_name_table_original(void); void **get_act_name_table(void); void **get_act_name_table_original(void); -void convert_string_ascii_to_sm64(u8 *str64, const char *strAscii, bool menu); -void convert_string_sm64_to_ascii(char *strAscii, const u8 *str64); +u8 *convert_string_ascii_to_sm64(u8 *str64, const char *strAscii, bool menu); +char *convert_string_sm64_to_ascii(char *strAscii, const u8 *str64); /* |description| Returns the name of the level corresponding to `courseNum`, `levelNum` and `areaIndex` as an ASCII (human readable) string. Set `charCase` to 1 to capitalize or -1 to decapitalize the returned string diff --git a/src/game/level_update.c b/src/game/level_update.c index 722dd7a47..7a69632d3 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -249,7 +249,7 @@ u16 level_control_timer(s32 timerOp) { return gHudDisplay.timer; } -u32 pressed_pause(void) { +bool pressed_pause(void) { if (gServerSettings.pauseAnywhere) { if (get_dialog_id() == DIALOG_NONE && sCurrPlayMode == PLAY_MODE_NORMAL && sDelayedWarpOp == WARP_OP_NONE) { return gPlayer1Controller->buttonPressed & START_BUTTON; @@ -264,7 +264,7 @@ u32 pressed_pause(void) { } } - return FALSE; + return false; } void set_play_mode(s16 playMode) { diff --git a/src/game/level_update.h b/src/game/level_update.h index 164b2be68..5ffd5d242 100644 --- a/src/game/level_update.h +++ b/src/game/level_update.h @@ -178,6 +178,8 @@ enum HUDDisplayFlag { /* |description|Returns if the level timer is running|descriptionEnd| */ u8 level_control_timer_running(void); u16 level_control_timer(s32 timerOp); +/* |description|Checks if the start button has been pressed as well as some other conditions for opening the pause menu depending on if pause anywhere is enabled|descriptionEnd|*/ +bool pressed_pause(void); /* |description|Fades into a special warp with `arg` and using `color`|descriptionEnd| */ void fade_into_special_warp(u32 arg, u32 color); void load_level_init_text(u32 arg); diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index a06f5705f..51026b681 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -370,7 +370,6 @@ void cutscene_put_cap_on(struct MarioState *m) { m->flags &= ~MARIO_CAP_IN_HAND; m->flags |= MARIO_CAP_ON_HEAD; play_sound(SOUND_ACTION_UNKNOWN43E, m->marioObj->header.gfx.cameraToObject); - m->cap = 0; } /** diff --git a/src/game/mario_actions_stationary.c b/src/game/mario_actions_stationary.c index 05334b243..8fe099c85 100644 --- a/src/game/mario_actions_stationary.c +++ b/src/game/mario_actions_stationary.c @@ -1162,13 +1162,20 @@ s32 act_first_person(struct MarioState *m) { } s32 mario_exit_palette_editor(struct MarioState *m, struct Camera *c) { + if (!(m->flags & (MARIO_CAP_ON_HEAD | MARIO_CAP_IN_HAND))) { + return FALSE; + } + switch (c->paletteEditorCapState) { case 0: return FALSE; case 1: cutscene_put_cap_on(m); break; case 2: cutscene_take_cap_off(m); break; } c->paletteEditorCapState = 0; - return set_mario_action(m, ACT_IDLE, 0); + if (m->action == ACT_PALETTE_EDITOR_CAP) { + set_mario_action(m, ACT_IDLE, 0); + } + return TRUE; } s32 act_palette_editor_cap(struct MarioState *m) { diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index 2163116da..f2e742d69 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -788,8 +788,11 @@ static Gfx *geo_mario_create_player_colors_dl(s32 index, Gfx *capEnemyGfx, Gfx * if (gfx) { Gfx *gfxp = gfx; for (s32 part = 0; part != PLAYER_PART_MAX; ++part) { - gSPLight(gfxp++, &gNetworkPlayerColors[index].parts[part].l, (2 * (part + 1)) + 1); - gSPLight(gfxp++, &gNetworkPlayerColors[index].parts[part].a, (2 * (part + 1)) + 2); + Lights1 *light = alloc_display_list(sizeof(Lights1)); + if (!light) { return NULL; } + *light = gNetworkPlayerColors[index].parts[part]; + gSPLight(gfxp++, &light->l, (2 * (part + 1)) + 1); + gSPLight(gfxp++, &light->a, (2 * (part + 1)) + 2); } if (capEnemyGfx) { gSPDisplayList(gfxp++, capEnemyGfx); } if (capEnemyDecalGfx) { gSPDisplayList(gfxp++, capEnemyDecalGfx); } diff --git a/src/game/mario_step.h b/src/game/mario_step.h index 960e040d9..7ebbbfa0b 100644 --- a/src/game/mario_step.h +++ b/src/game/mario_step.h @@ -36,9 +36,9 @@ u32 mario_update_moving_sand(struct MarioState *m); u32 mario_update_windy_ground(struct MarioState *m); /* |description|Sets all of Mario's velocity variables to 0 and sets his Y position to the floor height|descriptionEnd| */ void stop_and_set_height_to_floor(struct MarioState *m); -/* |description|Performs a full Mario stationary physics step (4 substeps) and returns an `GROUND_STEP_*` result|descriptionEnd| */ +/* |description|Performs a full Mario stationary physics step (4 substeps) and returns a `GROUND_STEP_*` result|descriptionEnd| */ s32 stationary_ground_step(struct MarioState *m); -/* |description|Performs a full Mario ground physics step (4 substeps) and returns an `GROUND_STEP_*` result|descriptionEnd| */ +/* |description|Performs a full Mario ground physics step (4 substeps) and returns a `GROUND_STEP_*` result|descriptionEnd| */ s32 perform_ground_step(struct MarioState *m); /* |description|Performs a full Mario air physics step (4 substeps) and returns an `AIR_STEP_*` result|descriptionEnd| */ s32 perform_air_step(struct MarioState *m, u32 stepArg); diff --git a/src/game/memory.c b/src/game/memory.c index 6018a6e33..feca24fd1 100644 --- a/src/game/memory.c +++ b/src/game/memory.c @@ -220,6 +220,32 @@ void *growing_array_alloc(struct GrowingArray *array, u32 size) { return NULL; } +void growing_array_move(struct GrowingArray *array, u32 from, u32 to, u32 count) { + if (array && array->buffer && count > 0 && + (to < from || to > from + count) && + (from + count) <= array->count && to <= array->count) { + + void **temp = malloc(sizeof(void *) * count); + if (!temp) { return; } + + // Copy elements to move to temporary buffer + memcpy(temp, array->buffer + from, sizeof(void *) * count); + + // Remove copied elements from the array + memmove(array->buffer + from, array->buffer + (from + count), sizeof(void *) * (array->count - (from + count))); + + // Make place for the copied elements + // If moving left to right, account for the removed elements + if (to > from) { to -= count; } + memmove(array->buffer + (to + count), array->buffer + to, sizeof(void *) * (array->count - (to + count))); + + // Insert copied elements + memcpy(array->buffer + to, temp, sizeof(void *) * count); + + free(temp); + } +} + void growing_array_free(struct GrowingArray **array) { if (*array) { for (u32 i = 0; i != (*array)->capacity; ++i) { diff --git a/src/game/memory.h b/src/game/memory.h index dba8f7535..d8f469814 100644 --- a/src/game/memory.h +++ b/src/game/memory.h @@ -77,6 +77,7 @@ void growing_pool_free_pool(struct GrowingPool *pool); struct GrowingArray *growing_array_init(struct GrowingArray *array, u32 capacity, GrowingArrayAllocFunc alloc, GrowingArrayFreeFunc free); void *growing_array_alloc(struct GrowingArray *array, u32 size); +void growing_array_move(struct GrowingArray *array, u32 from, u32 to, u32 count); void growing_array_free(struct GrowingArray **array); void growing_array_debug_print(struct GrowingArray *array, const char *name, s32 x, s32 y); diff --git a/src/game/object_list_processor.c b/src/game/object_list_processor.c index 3e901bdc7..1752ae7b4 100644 --- a/src/game/object_list_processor.c +++ b/src/game/object_list_processor.c @@ -122,27 +122,6 @@ const BehaviorScript *gCurBhvCommand; */ s16 gPrevFrameObjectCount; -/** - * The total number of surface nodes allocated (a node is allocated for each - * spatial partition cell that a surface intersects). - */ -s32 gSurfaceNodesAllocated; - -/** - * The total number of surfaces allocated. - */ -s32 gSurfacesAllocated; - -/** - * The number of nodes that have been created for surfaces. - */ -s32 gNumStaticSurfaceNodes; - -/** - * The number of surfaces in the pool. - */ -s32 gNumStaticSurfaces; - struct Object* gCheckingSurfaceCollisionsForObject = NULL; s16 gCheckingSurfaceCollisionsForCamera; s16 gFindFloorIncludeSurfaceIntangible; diff --git a/src/game/object_list_processor.h b/src/game/object_list_processor.h index 24a1acf27..98cb25a95 100644 --- a/src/game/object_list_processor.h +++ b/src/game/object_list_processor.h @@ -91,11 +91,6 @@ extern struct Object *gCurrentObject; extern const BehaviorScript *gCurBhvCommand; extern s16 gPrevFrameObjectCount; -extern s32 gSurfaceNodesAllocated; -extern s32 gSurfacesAllocated; -extern s32 gNumStaticSurfaceNodes; -extern s32 gNumStaticSurfaces; - extern struct Object* gCheckingSurfaceCollisionsForObject; extern s16 gCheckingSurfaceCollisionsForCamera; extern s16 gFindFloorIncludeSurfaceIntangible; diff --git a/src/game/paintings.c b/src/game/paintings.c index 574e6bc45..071337531 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -20,6 +20,7 @@ #include "obj_behaviors.h" #include "level_update.h" #include "pc/network/network_player.h" +#include "pc/lua/utils/smlua_gfx_utils.h" #include "print.h" #include "hardcoded.h" @@ -1537,6 +1538,31 @@ Gfx *display_painting_rippling(struct Painting *painting) { return dlist; } +static Gfx *get_painting_normal_display_list(struct Painting *painting) { + const Gfx *normalDisplayList = painting->normalDisplayList; + if (!normalDisplayList) { + return NULL; + } + + u32 dlistLength = gfx_get_length_no_sentinel(normalDisplayList); + Gfx *dlist = alloc_display_list(dlistLength * sizeof(Gfx)); + if (!dlist) { + return NULL; + } + + Gfx *gfx = dlist; + s8 textureIndex = 0; + for (u32 i = 0; i < dlistLength; ++i, gfx++, normalDisplayList++) { + *gfx = *normalDisplayList; + + // Replace the texture pointer by the painting's corresponding texture + if (GFX_OP(normalDisplayList) == G_SETTIMG && textureIndex < painting->imageCount) { + gfx->words.w1 = (uintptr_t) painting->textureArray[textureIndex++]; + } + } + return dlist; +} + /** * Render a normal painting. */ @@ -1547,8 +1573,14 @@ Gfx *display_painting_not_rippling(struct Painting *painting) { if (dlist == NULL) { return dlist; } + + Gfx *normalDisplayList = get_painting_normal_display_list(painting); + if (!normalDisplayList) { + return NULL; + } + gSPDisplayList(gfx++, painting_model_view_transform(painting)); - gSPDisplayList(gfx++, painting->normalDisplayList); + gSPDisplayList(gfx++, normalDisplayList); gSPPopMatrix(gfx++, G_MTX_MODELVIEW); gSPEndDisplayList(gfx); return dlist; diff --git a/src/game/paintings.h b/src/game/paintings.h index 086c9fafd..98fe85fd8 100644 --- a/src/game/paintings.h +++ b/src/game/paintings.h @@ -109,7 +109,7 @@ struct Painting const s16 *const *textureMaps; // Texture data - const Texture *const *textureArray; + const Texture *textureArray[2]; s16 textureWidth; s16 textureHeight; diff --git a/src/game/player_palette.h b/src/game/player_palette.h index 139e2bbfc..fb56c277d 100644 --- a/src/game/player_palette.h +++ b/src/game/player_palette.h @@ -13,7 +13,7 @@ enum PlayerPart { #pragma pack(1) struct PlayerPalette { //rgb - u8 parts[PLAYER_PART_MAX][3]; + Color parts[PLAYER_PART_MAX]; }; #pragma pack() diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index cfebccc00..c6631b5db 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -185,7 +185,6 @@ static Vp sViewportPrev = { 0 }; static Vp sViewportInterp = { 0 }; Gfx* gBackgroundSkyboxGfx = NULL; -Vtx* gBackgroundSkyboxVerts[SKYBOX_TILES_Y][SKYBOX_TILES_X] = { 0 }; Mtx* gBackgroundSkyboxMtx = NULL; static struct GraphNodeBackground* sBackgroundNode = NULL; @@ -1090,7 +1089,7 @@ static void anim_process(Vec3f translation, Vec3s rotation, u8 *animType, s16 an rotation[1] += retrieve_animation_value(gCurAnim, animFrame, animAttribute); rotation[2] += retrieve_animation_value(gCurAnim, animFrame, animAttribute); if (gCurAnim->flags & ANIM_FLAG_BONE_TRANS) { - *animType = ANIM_TYPE_TRANSLATION; + *animType = ANIM_TYPE_TRANSLATION; } } } @@ -1628,6 +1627,7 @@ void geo_process_held_object(struct GraphNodeHeldObject *node) { Mat4 mat; Vec3f translation; Vec3f scalePrev; + Vec3s anglePrev; // Sanity check our stack index, If we above or equal to our stack size. Return to prevent OOB\. if ((gMatStackIndex + 1) >= MATRIX_STACK_SIZE) { LOG_ERROR("Preventing attempt to exceed the maximum size %i for our matrix stack with size of %i.", MATRIX_STACK_SIZE - 1, gMatStackIndex); return; } @@ -1648,19 +1648,29 @@ void geo_process_held_object(struct GraphNodeHeldObject *node) { if (gGlobalTimer == node->objNode->header.gfx.prevScaleTimestamp + 1) { vec3f_copy(scalePrev, node->objNode->header.gfx.prevScale); + vec3s_copy(anglePrev, node->objNode->header.gfx.prevAngle); } else { vec3f_copy(scalePrev, node->objNode->header.gfx.scale); + vec3s_copy(anglePrev, node->objNode->header.gfx.angle); } vec3f_copy(node->objNode->header.gfx.prevScale, node->objNode->header.gfx.scale); node->objNode->header.gfx.prevScaleTimestamp = gGlobalTimer; - mtxf_translate(mat, translation); + if (node->objNode->header.gfx.sharedChild->extraFlags & GRAPH_EXTRA_ROTATE_HELD) { + vec3s_copy(node->objNode->header.gfx.prevAngle, node->objNode->header.gfx.angle); + mtxf_rotate_zxy_and_translate(mat, translation, node->objNode->header.gfx.angle); + } else { + mtxf_translate(mat, translation); + } mtxf_copy(gMatStack[gMatStackIndex + 1], *gCurGraphNodeObject->throwMatrix); gMatStack[gMatStackIndex + 1][3][0] = gMatStack[gMatStackIndex][3][0]; gMatStack[gMatStackIndex + 1][3][1] = gMatStack[gMatStackIndex][3][1]; gMatStack[gMatStackIndex + 1][3][2] = gMatStack[gMatStackIndex][3][2]; mtxf_mul(gMatStack[gMatStackIndex + 1], mat, gMatStack[gMatStackIndex + 1]); mtxf_scale_vec3f(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex + 1], node->objNode->header.gfx.scale); + if (node->objNode->header.gfx.sharedChild->extraFlags & GRAPH_EXTRA_ROTATE_HELD) { + mtxf_rotate_zxy_and_translate(mat, translation, anglePrev); + } mtxf_copy(gMatStackPrev[gMatStackIndex + 1], (void *) gCurGraphNodeObject->throwMatrixPrev); gMatStackPrev[gMatStackIndex + 1][3][0] = gMatStackPrev[gMatStackIndex][3][0]; gMatStackPrev[gMatStackIndex + 1][3][1] = gMatStackPrev[gMatStackIndex][3][1]; @@ -1933,7 +1943,6 @@ static void geo_clear_interp_variables(void) { sBackgroundNode = NULL; gBackgroundSkyboxGfx = NULL; - memset(gBackgroundSkyboxVerts, 0, sizeof(Vtx*) * SKYBOX_TILES_Y * SKYBOX_TILES_X); gBackgroundSkyboxMtx = NULL; sBackgroundNodeRoot = NULL; @@ -2003,4 +2012,4 @@ void geo_process_root(struct GraphNodeRoot *node, Vp *b, Vp *c, s32 clearColor) gCurGraphNodeRoot = NULL; } -} \ No newline at end of file +} diff --git a/src/game/save_file.h b/src/game/save_file.h index 4f15a5f31..02fd80331 100644 --- a/src/game/save_file.h +++ b/src/game/save_file.h @@ -241,6 +241,7 @@ Useful for tracking course-specific progress and enabling shortcuts |descriptionEnd| */ s32 save_file_is_cannon_unlocked(s32 fileIndex, s32 courseIndex); +/* |description|Unlocks the cannon in the current course|descriptionEnd| */ void save_file_set_cannon_unlocked(void); void save_file_set_cap_pos(s16 x, s16 y, s16 z); diff --git a/src/game/skybox.c b/src/game/skybox.c index dc6cdb69e..424c58ab1 100644 --- a/src/game/skybox.c +++ b/src/game/skybox.c @@ -131,6 +131,10 @@ u8 sSkyboxColors[][3] = { */ #define SKYBOX_ROWS (8) +static u16 sSkyboxTileNumX = 5; +static const u16 sSkyboxTileNumY = 3; // Shouldn't need to change this + +struct GrowingArray *gBackgroundSkyboxVerts = NULL; /** * Convert the camera's yaw into an x position into the scaled skybox image. @@ -188,14 +192,13 @@ f32 calculate_skybox_scaled_y(s8 player, UNUSED f32 fov) { * SKYBOX_TILE_WIDTH to get a point in world space. */ Vtx *make_skybox_rect(s32 tileRow, s32 tileCol, s8 colorIndex, s32 row, s32 col) { - extern Vtx* gBackgroundSkyboxVerts[SKYBOX_TILES_Y][SKYBOX_TILES_X]; - + u16 index = row * sSkyboxTileNumX + col; Vtx *verts; if (gRenderingInterpolated) { - verts = gBackgroundSkyboxVerts[row][col]; + verts = gBackgroundSkyboxVerts->buffer[index]; } else { verts = alloc_display_list(4 * sizeof(*verts)); - gBackgroundSkyboxVerts[row][col] = verts; + gBackgroundSkyboxVerts->buffer[index] = verts; } f32 x = tileCol * SKYBOX_TILE_WIDTH; @@ -223,10 +226,11 @@ void draw_skybox_tile_grid(Gfx **dlist, s8 background, s8 player, s8 colorIndex) s32 row; s32 col; - for (row = 0; row < SKYBOX_TILES_Y; row++) { - for (col = 0; col < SKYBOX_TILES_X; col++) { + s32 colOffset = (sSkyboxTileNumX / 2) - 1; + for (row = 0; row < sSkyboxTileNumY; row++) { + for (col = 0; col < sSkyboxTileNumX; col++) { s32 tileRow = (s32) (((SKYBOX_HEIGHT - sSkyBoxInfo[player].scaledY) / SKYBOX_TILE_HEIGHT) + row) * SKYBOX_COLS; - s32 tileColTmp = ((floor(sSkyBoxInfo[player].scaledX / SKYBOX_TILE_WIDTH) + col) - 1); + s32 tileColTmp = ((floor(sSkyBoxInfo[player].scaledX / SKYBOX_TILE_WIDTH) + col) - colOffset); s32 tileCol = tileColTmp; if (tileCol >= SKYBOX_ROWS) { tileCol -= SKYBOX_ROWS; } if (tileCol < 0) { tileCol += SKYBOX_ROWS; } @@ -235,11 +239,11 @@ void draw_skybox_tile_grid(Gfx **dlist, s8 background, s8 player, s8 colorIndex) // UGLY HACK: if the camera moves weird after a level transition this can go too high if (tileIndex < 0) { tileIndex = 0; } if (tileIndex > 79) { tileIndex = 79; } - Texture* texture = NULL; + const Texture* texture = NULL; if (background < 0 || background >= 10) { texture = gCustomSkyboxPtrList[tileIndex]; } else { - texture = (Texture*)(*(SkyboxTexture *) segmented_to_virtual(sSkyboxTextures[background]))[tileIndex]; + texture = (*(SkyboxTexture *) segmented_to_virtual(sSkyboxTextures[background]))[tileIndex]; } Vtx *vertices = make_skybox_rect(tileRow, tileColTmp, colorIndex, row, col); @@ -266,15 +270,6 @@ void *create_skybox_ortho_matrix(s8 player) { gBackgroundSkyboxMtx = mtx; } - // Stretch the screen to hide sides of skybox - f32 half_width = (21.0f / 9.0f) / GFX_DIMENSIONS_ASPECT_RATIO * SCREEN_WIDTH / 2; - f32 center = (sSkyBoxInfo[player].scaledX + SCREEN_WIDTH / 2); - if (half_width < SCREEN_WIDTH / 2) { - // A wider screen than 21:9 - left = center - half_width; - right = center + half_width; - } - if (mtx != NULL) { guOrtho(mtx, left, right, bottom, top, 0.0f, 3.0f, 1.0f); } else { @@ -289,7 +284,7 @@ void *create_skybox_ortho_matrix(s8 player) { Gfx *init_skybox_display_list(s8 player, s8 background, s8 colorIndex) { extern Gfx* gBackgroundSkyboxGfx; - s32 dlCommandCount = 5 + (SKYBOX_TILES_Y * SKYBOX_TILES_X) * 7; // 5 for the start and end, plus the amount of skybox tiles + s32 dlCommandCount = 5 + (sSkyboxTileNumY * sSkyboxTileNumX) * 7; // 5 for the start and end, plus the amount of skybox tiles void *skybox; if (gRenderingInterpolated) { @@ -330,6 +325,28 @@ Gfx *init_skybox_display_list(s8 player, s8 background, s8 colorIndex) { Gfx *create_skybox_facing_camera(s8 player, s8 background, f32 fov, f32 posX, f32 posY, f32 posZ, f32 focX, f32 focY, f32 focZ) { + if (!gBackgroundSkyboxVerts) { + gBackgroundSkyboxVerts = growing_array_init(NULL, sSkyboxTileNumY * sSkyboxTileNumX, malloc, free); + gBackgroundSkyboxVerts->count = sSkyboxTileNumY * sSkyboxTileNumX; + if (!gBackgroundSkyboxVerts) { + sys_fatal("Cannot allocate skybox vertex buffer"); + } + } + + if (!gRenderingInterpolated) { + f32 skyboxAspectRatio = ((f32)sSkyboxTileNumX * (f32)SKYBOX_TILE_WIDTH) / ((f32)sSkyboxTileNumY * (f32)SKYBOX_TILE_HEIGHT); + f32 half_width = skyboxAspectRatio / GFX_DIMENSIONS_ASPECT_RATIO * SCREEN_WIDTH / 2; + if (half_width < SCREEN_WIDTH / 2) { + // how many horizontal tiles are needed to match the screen aspect ratio + f32 minTilesX = sSkyboxTileNumY * ((f32)SKYBOX_TILE_HEIGHT / (f32)SKYBOX_TILE_WIDTH) * GFX_DIMENSIONS_ASPECT_RATIO; + sSkyboxTileNumX = (u16) ceilf(minTilesX); + + // Update vertex buffer size + gBackgroundSkyboxVerts->count = sSkyboxTileNumY * sSkyboxTileNumX; + growing_array_alloc(gBackgroundSkyboxVerts, 0); + } + } + gReadOnlyBackground = background; background = gOverrideBackground == -1 ? background : gOverrideBackground; diff --git a/src/game/skybox.h b/src/game/skybox.h index 043020e8c..5bd617edc 100644 --- a/src/game/skybox.h +++ b/src/game/skybox.h @@ -4,8 +4,6 @@ #include #include -#define SKYBOX_TILES_X 5 -#define SKYBOX_TILES_Y 3 extern s8 gReadOnlyBackground; extern s8 gOverrideBackground; diff --git a/src/pc/chat_commands.c b/src/pc/chat_commands.c index 40d132b7d..adb2bec1e 100644 --- a/src/pc/chat_commands.c +++ b/src/pc/chat_commands.c @@ -8,6 +8,7 @@ #include "pc/network/moderator_list.h" #include "pc/debuglog.h" #include "pc/lua/utils/smlua_level_utils.h" +#include "pc/mods/mods_utils.h" #include "level_table.h" #ifdef DEVELOPMENT #include "pc/dev/chat.h" @@ -39,10 +40,6 @@ static struct NetworkPlayer* chat_get_network_player(const char* name) { return NULL; } -static bool str_starts_with(const char* pre, const char* str) { - return strncmp(pre, str, strlen(pre)) == 0; -} - static void chat_construct_player_message(struct NetworkPlayer* np, char* msg) { char built[256] = { 0 }; snprintf(built, 256, "\\#fff982\\"); @@ -124,7 +121,7 @@ bool exec_chat_command(char* command) { return true; } - if (str_starts_with("/kick ", command)) { + if (str_starts_with(command, "/kick ")) { if (gNetworkType != NT_SERVER && !npl->moderator) { djui_chat_message_create(DLANG(CHAT, NO_PERMS)); return true; @@ -152,7 +149,7 @@ bool exec_chat_command(char* command) { return true; } - if (str_starts_with("/ban ", command)) { + if (str_starts_with(command, "/ban ")) { if (gNetworkType != NT_SERVER && !npl->moderator) { djui_chat_message_create(DLANG(CHAT, NO_PERMS)); return true; @@ -180,7 +177,7 @@ bool exec_chat_command(char* command) { return true; } - if (str_starts_with("/permban ", command)) { + if (str_starts_with(command, "/permban ")) { if (gNetworkType != NT_SERVER && !npl->moderator) { djui_chat_message_create(DLANG(CHAT, NO_PERMS)); return true; @@ -208,7 +205,7 @@ bool exec_chat_command(char* command) { return true; } - if (str_starts_with("/moderator ", command)) { + if (str_starts_with(command, "/moderator ")) { if (gNetworkType != NT_SERVER) { djui_chat_message_create(DLANG(CHAT, SERVER_ONLY)); return true; @@ -237,7 +234,7 @@ bool exec_chat_command(char* command) { return true; } - if (str_starts_with("/nametags ", command)) { + if (str_starts_with(command, "/nametags ")) { char *option = &command[10]; if (strcmp("show-tag", option) == 0) { gNametagsSettings.showSelfTag = !gNametagsSettings.showSelfTag; diff --git a/src/pc/dev/chat.c b/src/pc/dev/chat.c index dc5a08fc1..7118c4665 100644 --- a/src/pc/dev/chat.c +++ b/src/pc/dev/chat.c @@ -8,15 +8,12 @@ #include "pc/network/moderator_list.h" #include "pc/debuglog.h" #include "pc/lua/utils/smlua_level_utils.h" +#include "pc/mods/mods_utils.h" #include "level_table.h" #include "game/save_file.h" #ifdef DEVELOPMENT -static bool str_starts_with(const char* pre, char* str) { - return strncmp(pre, str, strlen(pre)) == 0; -} - // For case insensitivity static const char *upper(char *str) { static char buffer[50]; @@ -74,7 +71,7 @@ bool exec_dev_chat_command(char* command) { return true; } - if (str_starts_with("/warp ", command)) { + if (str_starts_with(command, "/warp ")) { static const struct { const char *name; s32 num; } sLevelNumByName[] = { #undef STUB_LEVEL #undef DEFINE_LEVEL @@ -169,7 +166,7 @@ bool exec_dev_chat_command(char* command) { return true; } - if (str_starts_with("/lua ", command)) { + if (str_starts_with(command, "/lua ")) { smlua_exec_str(&command[5]); return true; } @@ -179,7 +176,7 @@ bool exec_dev_chat_command(char* command) { return true; } - if (str_starts_with("/luaf ", command)) { + if (str_starts_with(command, "/luaf ")) { smlua_exec_file(&command[6]); return true; } diff --git a/src/pc/dialog_table.c b/src/pc/dialog_table.c index 7602e9bd5..7f3f8b19f 100644 --- a/src/pc/dialog_table.c +++ b/src/pc/dialog_table.c @@ -5,6 +5,7 @@ #include "game/segment2.h" #include "pc/lua/utils/smlua_text_utils.h" #include "game/memory.h" +#include "game/level_info.h" #include "pc/platform.h" #include @@ -22,7 +23,7 @@ void dialog_table_init(void) { } memcpy(dialog, dialogOrig, sizeof(struct DialogEntry)); - dialog->text = get_dialog_text_ascii(dialog); + dialog->text = convert_string_sm64_to_ascii(NULL, dialog->str); } } diff --git a/src/pc/djui/djui.c b/src/pc/djui/djui.c index 96cbfc981..5c79ff3c6 100644 --- a/src/pc/djui/djui.c +++ b/src/pc/djui/djui.c @@ -18,6 +18,8 @@ #include "pc/utils/misc.h" static Gfx* sSavedDisplayListHead = NULL; +static Gfx* sHookHudRenderGfx = NULL; +static size_t sHookHudRenderGfxSize = 0; struct DjuiRoot* gDjuiRoot = NULL; struct DjuiText* gDjuiPauseOptions = NULL; @@ -69,7 +71,6 @@ void djui_shutdown(void) { void patch_djui_before(void) { sDjuiRendered60fps = false; sSavedDisplayListHead = NULL; - djui_cursor_interp_before(); } void patch_djui_interpolated(UNUSED f32 delta) { @@ -176,10 +177,10 @@ void djui_reset_hud_params(void) { void djui_render(void) { if (!sDjuiInited || gDjuiDisabled) { return; } - djui_reset_hud_params(); sSavedDisplayListHead = gDisplayListHead; gDjuiHudUtilsZ = 0; + djui_reset_hud_params(); create_dl_ortho_matrix(); djui_gfx_displaylist_begin(); @@ -188,7 +189,23 @@ void djui_render(void) { djui_base_render(&sDjuiRootBehind->base); } - smlua_call_event_hooks(HOOK_ON_HUD_RENDER, djui_reset_hud_params); + // To maintain consistency with other hooks, HOOK_ON_HUD_RENDER must run at 30 fps + // During interpolated frames, copy the generated display list without running the hook again + if (!sDjuiRendered60fps) { + Gfx *hookHudRenderStart = gDisplayListHead; + smlua_call_event_hooks(HOOK_ON_HUD_RENDER, djui_reset_hud_params); + size_t gfxSize = sizeof(Gfx) * (gDisplayListHead - hookHudRenderStart); + if (gfxSize > 0) { + if (gfxSize > sHookHudRenderGfxSize) { + sHookHudRenderGfx = realloc(sHookHudRenderGfx, gfxSize); + } + memcpy(sHookHudRenderGfx, hookHudRenderStart, gfxSize); + } + sHookHudRenderGfxSize = gfxSize; + } else if (sHookHudRenderGfx != NULL && sHookHudRenderGfxSize > 0) { + memcpy(gDisplayListHead, sHookHudRenderGfx, sHookHudRenderGfxSize); + gDisplayListHead += sHookHudRenderGfxSize / sizeof(Gfx); + } djui_panel_update(); djui_popup_update(); @@ -211,6 +228,11 @@ void djui_render(void) { djui_cursor_update(); djui_base_render(&gDjuiConsole->base); - djui_interactable_update(); + + // Be careful! Djui interactables update at 30hz to avoid display list corruption. + if (!sDjuiRendered60fps) { + djui_interactable_update(); + } + djui_gfx_displaylist_end(); } diff --git a/src/pc/djui/djui_cursor.c b/src/pc/djui/djui_cursor.c index 09ee38a88..7c336a74f 100644 --- a/src/pc/djui/djui_cursor.c +++ b/src/pc/djui/djui_cursor.c @@ -4,6 +4,8 @@ #include "pc/gfx/gfx_window_manager_api.h" #include "pc/pc_main.h" +#define CURSOR_GFX_MAX_SIZE 20 + extern ALIGNED8 u8 gd_texture_hand_open[]; extern ALIGNED8 u8 gd_texture_hand_closed[]; @@ -17,10 +19,10 @@ static f32 sSavedMouseY = 0; f32 gCursorX = 0; f32 gCursorY = 0; +static Gfx sDjuiCursorGfx[CURSOR_GFX_MAX_SIZE] = { 0 }; + static f32 sPrevCursorX = 0; static f32 sPrevCursorY = 0; -static Gfx* sSavedDisplayListHead = NULL; -static bool sInterpCursor = false; void djui_cursor_set_visible(bool visible) { if (sMouseCursor) { @@ -154,36 +156,42 @@ static void djui_cursor_update_position(void) { // set cursor sprite if ((gInteractablePad.button & PAD_BUTTON_A) || (mouse_window_buttons & MOUSE_BUTTON_1)) { - djui_image_set_image(sMouseCursor, gd_texture_hand_closed, 32, 32, 16); + sMouseCursor->textureInfo.texture = gd_texture_hand_closed; } else { - djui_image_set_image(sMouseCursor, gd_texture_hand_open, 32, 32, 16); + sMouseCursor->textureInfo.texture = gd_texture_hand_open; } #endif } -void djui_cursor_interp_before(void) { - sSavedDisplayListHead = NULL; - sInterpCursor = false; +static void djui_cursor_render_cursor(void) { + gDisplayListHead = sDjuiCursorGfx; + djui_base_render(&sMouseCursor->base); + gSPEndDisplayList(gDisplayListHead++); + if (gDisplayListHead - sDjuiCursorGfx >= CURSOR_GFX_MAX_SIZE) { + sys_fatal("CURSOR_GFX_MAX_SIZE is too small! %lu", gDisplayListHead - sDjuiCursorGfx); + } } +// This isn't actually interpolation, it just updates the cursor at a faster rate void djui_cursor_interp(void) { djui_cursor_update_position(); - if (sInterpCursor && (sPrevCursorX != gCursorX || sPrevCursorY != gCursorY)) { - if (sSavedDisplayListHead == NULL) { return; } - gDisplayListHead = sSavedDisplayListHead; - djui_base_render(&sMouseCursor->base); + + if (sPrevCursorX != gCursorX || sPrevCursorY != gCursorY) { + djui_cursor_render_cursor(); } } void djui_cursor_update(void) { djui_cursor_update_position(); - sSavedDisplayListHead = gDisplayListHead; - djui_base_render(&sMouseCursor->base); - sInterpCursor = gDisplayListHead != sSavedDisplayListHead; // Check that we actually rendered something + + Gfx *savedDisplayListHead = gDisplayListHead; + djui_cursor_render_cursor(); + gDisplayListHead = savedDisplayListHead; + gSPDisplayList(gDisplayListHead++, sDjuiCursorGfx); } void djui_cursor_create(void) { - sMouseCursor = djui_image_create(NULL, gd_texture_hand_open, 32, 32, 16); + sMouseCursor = djui_image_create(NULL, gd_texture_hand_open, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_16b); djui_base_set_location(&sMouseCursor->base, 0, 0); djui_base_set_size(&sMouseCursor->base, 64, 64); } diff --git a/src/pc/djui/djui_cursor.h b/src/pc/djui/djui_cursor.h index 19be80527..bc9374060 100644 --- a/src/pc/djui/djui_cursor.h +++ b/src/pc/djui/djui_cursor.h @@ -9,7 +9,6 @@ void djui_cursor_set_visible(bool visible); bool djui_cursor_inside_base(struct DjuiBase* base); void djui_cursor_input_controlled_center(struct DjuiBase* base); void djui_cursor_move(s8 xDir, s8 yDir); -void djui_cursor_interp_before(void); void djui_cursor_interp(void); void djui_cursor_update(void); void djui_cursor_create(void); diff --git a/src/pc/djui/djui_font.c b/src/pc/djui/djui_font.c index 2f23e2f26..f2d88cc88 100644 --- a/src/pc/djui/djui_font.c +++ b/src/pc/djui/djui_font.c @@ -18,12 +18,12 @@ static void djui_font_normal_render_char(char* c) { u32 tx = index % 64; u32 ty = index / 64; extern ALIGNED8 const Texture texture_font_jp[]; - djui_gfx_render_texture_tile(texture_font_jp, 512, 1024, 32, tx * 8, ty * 16, 8, 16, false, true); + djui_gfx_render_texture_tile(texture_font_jp, 512, 1024, G_IM_FMT_RGBA, G_IM_SIZ_32b, tx * 8, ty * 16, 8, 16, false, true); } else { u32 tx = index % 32; u32 ty = index / 32; extern ALIGNED8 const Texture texture_font_normal[]; - djui_gfx_render_texture_tile(texture_font_normal, 256, 128, 32, tx * 8, ty * 16, 8, 16, false, true); + djui_gfx_render_texture_tile(texture_font_normal, 256, 128, G_IM_FMT_RGBA, G_IM_SIZ_32b, tx * 8, ty * 16, 8, 16, false, true); } } @@ -64,7 +64,7 @@ static void djui_font_title_render_char(char* c) { u32 ty = index / 16; extern ALIGNED8 const Texture texture_font_title[]; - djui_gfx_render_texture_tile(texture_font_title, 1024, 512, 32, tx * 64, ty * 64, 64, 64, false, true); + djui_gfx_render_texture_tile(texture_font_title, 1024, 512, G_IM_FMT_RGBA, G_IM_SIZ_32b, tx * 64, ty * 64, 64, 64, false, true); } static f32 djui_font_title_char_width(char* text) { @@ -129,7 +129,7 @@ static void djui_font_hud_render_char(char* text) { if (c == ' ') { return; } c = djui_unicode_get_base_char(text); u8 index = djui_font_hud_index(c); - djui_gfx_render_texture(main_hud_lut[index], 16, 16, 16, djui_hud_get_filter()); + djui_gfx_render_texture(main_hud_lut[index], 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b, djui_hud_get_filter()); } static f32 djui_font_hud_char_width(UNUSED char* text) { @@ -163,12 +163,12 @@ static void djui_font_aliased_render_char(char* c) { u32 tx = index % 64; u32 ty = index / 64; extern ALIGNED8 const Texture texture_font_jp_aliased[]; - djui_gfx_render_texture_tile(texture_font_jp_aliased, 1024, 2048, 32, tx * 16, ty * 32, 16, 32, false, true); + djui_gfx_render_texture_tile(texture_font_jp_aliased, 1024, 2048, G_IM_FMT_RGBA, G_IM_SIZ_32b, tx * 16, ty * 32, 16, 32, false, true); } else { u32 tx = index % 32; u32 ty = index / 32; extern ALIGNED8 const Texture texture_font_aliased[]; - djui_gfx_render_texture_tile(texture_font_aliased, 512, 256, 32, tx * 16, ty * 32, 16, 32, false, true); + djui_gfx_render_texture_tile(texture_font_aliased, 512, 256, G_IM_FMT_RGBA, G_IM_SIZ_32b, tx * 16, ty * 32, 16, 32, false, true); } } @@ -204,7 +204,7 @@ static void djui_font_custom_hud_render_char(char* c) { u32 ty = index / 16; extern ALIGNED8 const Texture texture_font_hud[]; - djui_gfx_render_texture_tile(texture_font_hud, 512, 512, 32, tx * 32, ty * 32, 32, 32, false, true); + djui_gfx_render_texture_tile(texture_font_hud, 512, 512, G_IM_FMT_RGBA, G_IM_SIZ_32b, tx * 32, ty * 32, 32, 32, false, true); } static void djui_font_custom_hud_recolor_render_char(char* c) { @@ -217,7 +217,7 @@ static void djui_font_custom_hud_recolor_render_char(char* c) { u32 ty = index / 16; extern ALIGNED8 const Texture texture_font_hud_recolor[]; - djui_gfx_render_texture_tile(texture_font_hud_recolor, 512, 512, 32, tx * 32, ty * 32, 32, 32, false, true); + djui_gfx_render_texture_tile(texture_font_hud_recolor, 512, 512, G_IM_FMT_RGBA, G_IM_SIZ_32b, tx * 32, ty * 32, 32, 32, false, true); } static f32 djui_font_custom_hud_char_width(char* text) { @@ -266,12 +266,12 @@ static void djui_font_special_render_char(char* c) { u32 tx = index % 64; u32 ty = index / 64; extern ALIGNED8 const Texture texture_font_jp[]; - djui_gfx_render_texture_tile(texture_font_jp, 512, 1024, 32, tx * 8, ty * 16, 8, 16, false, true); + djui_gfx_render_texture_tile(texture_font_jp, 512, 1024, G_IM_FMT_RGBA, G_IM_SIZ_32b, tx * 8, ty * 16, 8, 16, false, true); } else { u32 tx = index % 32; u32 ty = index / 32; extern ALIGNED8 const Texture texture_font_special[]; - djui_gfx_render_texture_tile(texture_font_special, 256, 128, 32, tx * 8, ty * 16, 8, 16, false, true); + djui_gfx_render_texture_tile(texture_font_special, 256, 128, G_IM_FMT_RGBA, G_IM_SIZ_32b, tx * 8, ty * 16, 8, 16, false, true); } } diff --git a/src/pc/djui/djui_font.h b/src/pc/djui/djui_font.h index 34d2e1f27..02d3eef8a 100644 --- a/src/pc/djui/djui_font.h +++ b/src/pc/djui/djui_font.h @@ -8,7 +8,6 @@ struct DjuiFont { f32 xOffset; f32 yOffset; f32 defaultFontScale; - u8 textureBitSize; const Gfx* textBeginDisplayList; void (*render_char)(char*); f32 (*char_width)(char*); diff --git a/src/pc/djui/djui_gfx.c b/src/pc/djui/djui_gfx.c index 6e347b8e3..8ebd6c488 100644 --- a/src/pc/djui/djui_gfx.c +++ b/src/pc/djui/djui_gfx.c @@ -93,7 +93,7 @@ static const Vtx vertex_djui_image[] = { const Gfx dl_djui_image[] = { gsDPPipeSync(), - gsSPClearGeometryMode(G_LIGHTING), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BOTH), gsDPSetCombineMode(G_CC_FADEA, G_CC_FADEA), gsDPSetRenderMode(G_RM_XLU_SURF, G_RM_XLU_SURF2), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), @@ -104,32 +104,21 @@ const Gfx dl_djui_image[] = { gsSP2Triangles(0, 1, 2, 0x0, 0, 2, 3, 0x0), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; -static u8 djui_gfx_power_of_two(u32 value) { - switch (value) { - case 2: return 1; - case 4: return 2; - case 8: return 3; - case 16: return 4; - case 32: return 5; - case 64: return 6; - case 128: return 7; - case 256: return 8; - case 512: return 9; - case 1024: return 10; - default: return 11; - } +inline static u8 djui_gfx_power_of_two(u32 value) { + return (u8) log2f(value); } -void djui_gfx_render_texture(const Texture* texture, u32 w, u32 h, u32 bitSize, bool filter) { +void djui_gfx_render_texture(const Texture* texture, u32 w, u32 h, u8 fmt, u8 siz, bool filter) { gDPSetTextureFilter(gDisplayListHead++, filter ? G_TF_BILERP : G_TF_POINT); - gDPSetTextureOverrideDjui(gDisplayListHead++, texture, djui_gfx_power_of_two(w), djui_gfx_power_of_two(h), bitSize); + gDPSetTextureOverrideDjui(gDisplayListHead++, texture, djui_gfx_power_of_two(w), djui_gfx_power_of_two(h), fmt, siz); gSPDisplayList(gDisplayListHead++, dl_djui_image); } -void djui_gfx_render_texture_tile(const Texture* texture, u32 w, u32 h, u32 bitSize, u32 tileX, u32 tileY, u32 tileW, u32 tileH, bool filter, bool font) { +void djui_gfx_render_texture_tile(const Texture* texture, u32 w, u32 h, u8 fmt, u8 siz, u32 tileX, u32 tileY, u32 tileW, u32 tileH, bool filter, bool font) { if (!gDisplayListHead) { LOG_ERROR("Retrieved a null displaylist head"); return; @@ -157,14 +146,14 @@ void djui_gfx_render_texture_tile(const Texture* texture, u32 w, u32 h, u32 bitS vtx[1] = (Vtx) {{{ 1 * aspect, -1, 0 }, 0, { ((tileX + tileW) * 2048.0f) / (f32)w + offsetX, ((tileY + tileH) * 2048.0f) / (f32)h + offsetY }, { 0xff, 0xff, 0xff, 0xff }}}; vtx[3] = (Vtx) {{{ 0, 0, 0 }, 0, { ( tileX * 2048.0f) / (f32)w + offsetX, ( tileY * 2048.0f) / (f32)h + offsetY }, { 0xff, 0xff, 0xff, 0xff }}}; - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING | G_CULL_BOTH); gDPSetCombineMode(gDisplayListHead++, G_CC_FADEA, G_CC_FADEA); gDPSetRenderMode(gDisplayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2); gDPSetTextureFilter(gDisplayListHead++, filter ? G_TF_BILERP : G_TF_POINT); gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gDPSetTextureOverrideDjui(gDisplayListHead++, texture, djui_gfx_power_of_two(w), djui_gfx_power_of_two(h), bitSize); + gDPSetTextureOverrideDjui(gDisplayListHead++, texture, djui_gfx_power_of_two(w), djui_gfx_power_of_two(h), fmt, siz); gDPLoadTextureBlockWithoutTexture(gDisplayListHead++, NULL, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 64, 0, G_TX_CLAMP, G_TX_CLAMP, 0, 0, 0, 0); *(gDisplayListHead++) = (Gfx) gsSPExecuteDjui(G_TEXOVERRIDE_DJUI); @@ -175,6 +164,7 @@ void djui_gfx_render_texture_tile(const Texture* texture, u32 w, u32 h, u32 bitS gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF); gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE); + gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING | G_CULL_BACK); } ///////////////////////////////////////////// diff --git a/src/pc/djui/djui_gfx.h b/src/pc/djui/djui_gfx.h index 93622d0ad..8da361e3f 100644 --- a/src/pc/djui/djui_gfx.h +++ b/src/pc/djui/djui_gfx.h @@ -15,8 +15,8 @@ void djui_gfx_displaylist_end(void); f32 djui_gfx_get_scale(void); -void djui_gfx_render_texture(const Texture* texture, u32 w, u32 h, u32 bitSize, bool filter); -void djui_gfx_render_texture_tile(const Texture* texture, u32 w, u32 h, u32 bitSize, u32 tileX, u32 tileY, u32 tileW, u32 tileH, bool filter, bool font); +void djui_gfx_render_texture(const Texture* texture, u32 w, u32 h, u8 fmt, u8 siz, bool filter); +void djui_gfx_render_texture_tile(const Texture* texture, u32 w, u32 h, u8 fmt, u8 siz, u32 tileX, u32 tileY, u32 tileW, u32 tileH, bool filter, bool font); void gfx_get_dimensions(u32* width, u32* height); diff --git a/src/pc/djui/djui_hud_utils.c b/src/pc/djui/djui_hud_utils.c index ae2485891..06aa83e33 100644 --- a/src/pc/djui/djui_hud_utils.c +++ b/src/pc/djui/djui_hud_utils.c @@ -33,7 +33,7 @@ static struct DjuiColor sRefColor = { 255, 255, 255, 255 }; static bool sLegacy = false; f32 gDjuiHudUtilsZ = 0; -u8 gDjuiHudLockMouse = false; +bool gDjuiHudLockMouse = false; extern ALIGNED8 const u8 texture_hud_char_camera[]; extern ALIGNED8 const u8 texture_hud_char_lakitu[]; @@ -51,20 +51,20 @@ extern ALIGNED8 const u8 texture_hud_char_apostrophe[]; extern ALIGNED8 const u8 texture_hud_char_double_quote[]; struct GlobalTextures gGlobalTextures = { - .camera = { .texture = (Texture*)texture_hud_char_camera, "texture_hud_char_camera", .width = 16, .height = 16, .bitSize = 8 }, - .lakitu = { .texture = (Texture*)texture_hud_char_lakitu, "texture_hud_char_lakitu", .width = 16, .height = 16, .bitSize = 8 }, - .no_camera = { .texture = (Texture*)texture_hud_char_no_camera, "texture_hud_char_no_camera", .width = 16, .height = 16, .bitSize = 8 }, - .arrow_up = { .texture = (Texture*)texture_hud_char_arrow_up, "texture_hud_char_arrow_up", .width = 8, .height = 8, .bitSize = 8 }, - .arrow_down = { .texture = (Texture*)texture_hud_char_arrow_down, "texture_hud_char_arrow_down", .width = 8, .height = 8, .bitSize = 8 }, - .coin = { .texture = (Texture*)texture_hud_char_coin, "texture_hud_char_coin", .width = 16, .height = 16, .bitSize = 8 }, - .star = { .texture = (Texture*)texture_hud_char_star, "texture_hud_char_star", .width = 16, .height = 16, .bitSize = 8 }, - .apostrophe = { .texture = (Texture*)texture_hud_char_apostrophe, "texture_hud_char_apostrophe", .width = 16, .height = 16, .bitSize = 8 }, - .double_quote = { .texture = (Texture*)texture_hud_char_double_quote, "texture_hud_char_double_quote", .width = 16, .height = 16, .bitSize = 8 }, - .mario_head = { .texture = (Texture*)texture_hud_char_mario_head, "texture_hud_char_mario_head", .width = 16, .height = 16, .bitSize = 8 }, - .luigi_head = { .texture = (Texture*)texture_hud_char_luigi_head, "texture_hud_char_luigi_head", .width = 16, .height = 16, .bitSize = 8 }, - .toad_head = { .texture = (Texture*)texture_hud_char_toad_head, "texture_hud_char_toad_head", .width = 16, .height = 16, .bitSize = 8 }, - .waluigi_head = { .texture = (Texture*)texture_hud_char_waluigi_head, "texture_hud_char_waluigi_head", .width = 16, .height = 16, .bitSize = 8 }, - .wario_head = { .texture = (Texture*)texture_hud_char_wario_head, "texture_hud_char_wario_head", .width = 16, .height = 16, .bitSize = 8 } + .camera = { .texture = texture_hud_char_camera, "texture_hud_char_camera", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .lakitu = { .texture = texture_hud_char_lakitu, "texture_hud_char_lakitu", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .no_camera = { .texture = texture_hud_char_no_camera, "texture_hud_char_no_camera", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .arrow_up = { .texture = texture_hud_char_arrow_up, "texture_hud_char_arrow_up", .width = 8, .height = 8, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .arrow_down = { .texture = texture_hud_char_arrow_down, "texture_hud_char_arrow_down", .width = 8, .height = 8, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .coin = { .texture = texture_hud_char_coin, "texture_hud_char_coin", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .star = { .texture = texture_hud_char_star, "texture_hud_char_star", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .apostrophe = { .texture = texture_hud_char_apostrophe, "texture_hud_char_apostrophe", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .double_quote = { .texture = texture_hud_char_double_quote, "texture_hud_char_double_quote", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .mario_head = { .texture = texture_hud_char_mario_head, "texture_hud_char_mario_head", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .luigi_head = { .texture = texture_hud_char_luigi_head, "texture_hud_char_luigi_head", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .toad_head = { .texture = texture_hud_char_toad_head, "texture_hud_char_toad_head", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .waluigi_head = { .texture = texture_hud_char_waluigi_head, "texture_hud_char_waluigi_head", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + .wario_head = { .texture = texture_hud_char_wario_head, "texture_hud_char_wario_head", .width = 16, .height = 16, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b } }; static void djui_hud_position_translate(f32* x, f32* y) { @@ -297,6 +297,10 @@ f32 djui_hud_get_raw_mouse_y(void) { return mouse_y; } +bool djui_hud_is_mouse_locked(void) { + return gDjuiHudLockMouse; +} + void djui_hud_set_mouse_locked(bool locked) { gDjuiHudLockMouse = locked; } @@ -495,7 +499,7 @@ static inline bool is_power_of_two(u32 n) { return (n > 0) && ((n & (n - 1)) == 0); } -void djui_hud_render_texture_raw(const Texture* texture, u32 bitSize, u32 width, u32 height, f32 x, f32 y, f32 scaleW, f32 scaleH) { +static void djui_hud_render_texture_raw(const Texture* texture, u32 width, u32 height, u8 fmt, u8 siz, f32 x, f32 y, f32 scaleW, f32 scaleH) { if (!is_power_of_two(width) || !is_power_of_two(height)) { LOG_LUA_LINE("Tried to render DJUI HUD texture with NPOT width or height"); return; @@ -528,13 +532,13 @@ void djui_hud_render_texture_raw(const Texture* texture, u32 bitSize, u32 width, create_dl_scale_matrix(DJUI_MTX_NOPUSH, width * translatedW, height * translatedH, 1.0f); // render - djui_gfx_render_texture(texture, width, height, bitSize, sFilter); + djui_gfx_render_texture(texture, width, height, fmt, siz, sFilter); // pop gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } -void djui_hud_render_texture_tile_raw(const Texture* texture, u32 bitSize, u32 width, u32 height, f32 x, f32 y, f32 scaleW, f32 scaleH, u32 tileX, u32 tileY, u32 tileW, u32 tileH) { +static void djui_hud_render_texture_tile_raw(const Texture* texture, u32 width, u32 height, u8 fmt, u8 siz, f32 x, f32 y, f32 scaleW, f32 scaleH, u32 tileX, u32 tileY, u32 tileW, u32 tileH) { if (!texture) { return; } gDjuiHudUtilsZ += 0.01f; @@ -565,7 +569,7 @@ void djui_hud_render_texture_tile_raw(const Texture* texture, u32 bitSize, u32 w create_dl_scale_matrix(DJUI_MTX_NOPUSH, width * translatedW, height * translatedH, 1.0f); // render - djui_gfx_render_texture_tile(texture, width, height, bitSize, tileX, tileY, tileW, tileH, sFilter, false); + djui_gfx_render_texture_tile(texture, width, height, fmt, siz, tileX, tileY, tileW, tileH, sFilter, false); // pop gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); @@ -573,12 +577,12 @@ void djui_hud_render_texture_tile_raw(const Texture* texture, u32 bitSize, u32 w void djui_hud_render_texture(struct TextureInfo* texInfo, f32 x, f32 y, f32 scaleW, f32 scaleH) { if (!texInfo) { return; } - djui_hud_render_texture_raw(texInfo->texture, texInfo->bitSize, texInfo->width, texInfo->height, x, y, scaleW, scaleH); + djui_hud_render_texture_raw(texInfo->texture, texInfo->width, texInfo->height, texInfo->format, texInfo->size, x, y, scaleW, scaleH); } void djui_hud_render_texture_tile(struct TextureInfo* texInfo, f32 x, f32 y, f32 scaleW, f32 scaleH, u32 tileX, u32 tileY, u32 tileW, u32 tileH) { if (!texInfo) { return; } - djui_hud_render_texture_tile_raw(texInfo->texture, texInfo->bitSize, texInfo->width, texInfo->height, x, y, scaleW, scaleH, tileX, tileY, tileW, tileH); + djui_hud_render_texture_tile_raw(texInfo->texture, texInfo->width, texInfo->height, texInfo->format, texInfo->size, x, y, scaleW, scaleH, tileX, tileY, tileW, tileH); } void djui_hud_render_texture_interpolated(struct TextureInfo* texInfo, f32 prevX, f32 prevY, f32 prevScaleW, f32 prevScaleH, f32 x, f32 y, f32 scaleW, f32 scaleH) { @@ -587,7 +591,7 @@ void djui_hud_render_texture_interpolated(struct TextureInfo* texInfo, f32 prevX if (!texInfo) { return; } - djui_hud_render_texture_raw(texInfo->texture, texInfo->bitSize, texInfo->width, texInfo->height, prevX, prevY, prevScaleW, prevScaleH); + djui_hud_render_texture_raw(texInfo->texture, texInfo->width, texInfo->height, texInfo->format, texInfo->size, prevX, prevY, prevScaleW, prevScaleH); if (sInterpHudCount >= MAX_INTERP_HUD) { return; } struct InterpHud* interp = &sInterpHuds[sInterpHudCount++]; @@ -623,7 +627,7 @@ void djui_hud_render_texture_tile_interpolated(struct TextureInfo* texInfo, f32 prevScaleH *= ((f32)tileH / (f32)texInfo->height); } - djui_hud_render_texture_tile_raw(texInfo->texture, texInfo->bitSize, texInfo->width, texInfo->height, prevX, prevY, prevScaleW, prevScaleH, tileX, tileY, tileW, tileH); + djui_hud_render_texture_tile_raw(texInfo->texture, texInfo->width, texInfo->height, texInfo->format, texInfo->size, prevX, prevY, prevScaleW, prevScaleH, tileX, tileY, tileW, tileH); if (sInterpHudCount >= MAX_INTERP_HUD) { return; } struct InterpHud* interp = &sInterpHuds[sInterpHudCount++]; diff --git a/src/pc/djui/djui_hud_utils.h b/src/pc/djui/djui_hud_utils.h index 13efed6c8..a5c176741 100644 --- a/src/pc/djui/djui_hud_utils.h +++ b/src/pc/djui/djui_hud_utils.h @@ -52,7 +52,7 @@ struct GlobalTextures { extern struct GlobalTextures gGlobalTextures; extern f32 gDjuiHudUtilsZ; -extern u8 gDjuiHudLockMouse; +extern bool gDjuiHudLockMouse; /* |description|Gets the current DJUI HUD resolution|descriptionEnd| */ u8 djui_hud_get_resolution(void); @@ -92,7 +92,9 @@ f32 djui_hud_get_mouse_y(void); f32 djui_hud_get_raw_mouse_x(void); /* |description|Returns the y coordinate of the mouse relative to the screen|descriptionEnd| */ f32 djui_hud_get_raw_mouse_y(void); -/* |description|Sets if the cursor is hidden and constrainted to the window|descriptionEnd| */ +/* |description|Checks if the cursor is locked to the window|descriptionEnd| */ +bool djui_hud_is_mouse_locked(void); +/* |description|Locks (or unlocks) the cursor to the window|descriptionEnd| */ void djui_hud_set_mouse_locked(bool locked); /* |description|Returns the flags of the mouse buttons held down|descriptionEnd| */ u8 djui_hud_get_mouse_buttons_down(void); @@ -104,13 +106,13 @@ u8 djui_hud_get_mouse_buttons_released(void); f32 djui_hud_get_mouse_scroll_x(void); /* |description|Returns the amount scrolled vertically (-down/up+)|descriptionEnd| */ f32 djui_hud_get_mouse_scroll_y(void); -/* |description|Sets the viewport to the specified position and size, this will resize |descriptionEnd| */ +/* |description|Sets the viewport to the specified position and size, this will resize any subsequent DJUI graphics|descriptionEnd| */ void djui_hud_set_viewport(f32 x, f32 y, f32 width, f32 height); -/* |description|put the description here|descriptionEnd| */ +/* |description|Resets the viewport to a fullscreen state|descriptionEnd| */ void djui_hud_reset_viewport(void); -/* |description|put the description here|descriptionEnd| */ +/* |description|Sets the scissor rectangle to the specified position and size, this will cut off any subsequent DJUI graphics not within the rectangle|descriptionEnd| */ void djui_hud_set_scissor(f32 x, f32 y, f32 width, f32 height); -/* |description|put the description here|descriptionEnd| */ +/* |description|Resets the scissor rectangle to a fullscreen state|descriptionEnd| */ void djui_hud_reset_scissor(void); /* |description|Measures the length of `message` in the current font|descriptionEnd| */ @@ -121,10 +123,8 @@ void djui_hud_print_text(const char* message, f32 x, f32 y, f32 scale); void djui_hud_print_text_interpolated(const char* message, f32 prevX, f32 prevY, f32 prevScale, f32 x, f32 y, f32 scale); /* |description|Renders a DJUI HUD texture onto the screen|descriptionEnd| */ void djui_hud_render_texture(struct TextureInfo* texInfo, f32 x, f32 y, f32 scaleW, f32 scaleH); -void djui_hud_render_texture_raw(const Texture* texture, u32 bitSize, u32 width, u32 height, f32 x, f32 y, f32 scaleW, f32 scaleH); /* |description|Renders a DJUI HUD texture tile onto the screen|descriptionEnd| */ void djui_hud_render_texture_tile(struct TextureInfo* texInfo, f32 x, f32 y, f32 scaleW, f32 scaleH, u32 tileX, u32 tileY, u32 tileW, u32 tileH); -void djui_hud_render_texture_tile_raw(const Texture* texture, u32 bitSize, u32 width, u32 height, f32 x, f32 y, f32 scaleW, f32 scaleH, u32 tileX, u32 tileY, u32 tileW, u32 tileH); /* |description|Renders an interpolated DJUI HUD texture onto the screen|descriptionEnd| */ void djui_hud_render_texture_interpolated(struct TextureInfo* texInfo, f32 prevX, f32 prevY, f32 prevScaleW, f32 prevScaleH, f32 x, f32 y, f32 scaleW, f32 scaleH); /* |description|Renders an interpolated DJUI HUD texture tile onto the screen|descriptionEnd| */ diff --git a/src/pc/djui/djui_image.c b/src/pc/djui/djui_image.c index fa1101bc7..d082b06cd 100644 --- a/src/pc/djui/djui_image.c +++ b/src/pc/djui/djui_image.c @@ -2,17 +2,6 @@ #include "game/segment2.h" #include "pc/network/network.h" - //////////////// - // properties // -//////////////// - -void djui_image_set_image(struct DjuiImage* image, const Texture* texture, u16 textureWidth, u16 textureHeight, u16 textureBitSize) { - image->texture = texture; - image->textureWidth = textureWidth; - image->textureHeight = textureHeight; - image->textureBitSize = textureBitSize; -} - //////////// // events // //////////// @@ -35,8 +24,9 @@ static bool djui_image_render(struct DjuiBase* base) { // render if (!djui_gfx_add_clipping(base)) { + const struct TextureInfo *info = &image->textureInfo; gDPSetEnvColor(gDisplayListHead++, base->color.r, base->color.g, base->color.b, base->color.a); - djui_gfx_render_texture(image->texture, image->textureWidth, image->textureHeight, image->textureBitSize, false); + djui_gfx_render_texture(info->texture, info->width, info->height, info->format, info->size, false); } gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); @@ -48,13 +38,17 @@ static void djui_image_destroy(struct DjuiBase* base) { free(image); } -struct DjuiImage* djui_image_create(struct DjuiBase* parent, const Texture* texture, u16 textureWidth, u16 textureHeight, u16 textureBitSize) { +struct DjuiImage* djui_image_create(struct DjuiBase* parent, const Texture* texture, u16 width, u16 height, u8 fmt, u8 siz) { struct DjuiImage* image = calloc(1, sizeof(struct DjuiImage)); struct DjuiBase* base = &image->base; djui_base_init(parent, base, djui_image_render, djui_image_destroy); - djui_image_set_image(image, texture, textureWidth, textureHeight, textureBitSize); + image->textureInfo.texture = texture; + image->textureInfo.width = width; + image->textureInfo.height = height; + image->textureInfo.format = fmt; + image->textureInfo.size = siz; return image; } diff --git a/src/pc/djui/djui_image.h b/src/pc/djui/djui_image.h index 88b2d0b7d..e28800ca4 100644 --- a/src/pc/djui/djui_image.h +++ b/src/pc/djui/djui_image.h @@ -3,12 +3,7 @@ struct DjuiImage { struct DjuiBase base; - const Texture* texture; - u16 textureWidth; - u16 textureHeight; - u16 textureBitSize; + struct TextureInfo textureInfo; }; -void djui_image_set_image(struct DjuiImage* image, const Texture* texture, u16 textureWidth, u16 textureHeight, u16 textureBitSize); - -struct DjuiImage* djui_image_create(struct DjuiBase* parent, const Texture* texture, u16 textureWidth, u16 textureHeight, u16 textureBitSize); +struct DjuiImage* djui_image_create(struct DjuiBase* parent, const Texture* texture, u16 width, u16 height, u8 fmt, u8 siz); diff --git a/src/pc/djui/djui_interactable.c b/src/pc/djui/djui_interactable.c index e673cdc23..e3984e6e3 100644 --- a/src/pc/djui/djui_interactable.c +++ b/src/pc/djui/djui_interactable.c @@ -296,12 +296,6 @@ void djui_interactable_on_key_up(int scancode) { } } - if (scancode == SCANCODE_ESCAPE && djui_panel_is_active()) { - // pressed escape button on keyboard - djui_panel_back(); - return; - } - if (gDjuiPlayerList != NULL || gDjuiModList != NULL) { for (int i = 0; i < MAX_BINDS; i++) { if (scancode == (int)configKeyPlayerList[i]) { diff --git a/src/pc/djui/djui_panel_main.c b/src/pc/djui/djui_panel_main.c index 08b730d95..57707045c 100644 --- a/src/pc/djui/djui_panel_main.c +++ b/src/pc/djui/djui_panel_main.c @@ -30,7 +30,7 @@ void djui_panel_main_create(struct DjuiBase* caller) { struct DjuiBase* body = djui_three_panel_get_body(panel); { if (!configExCoopTheme) { - struct DjuiImage* logo = djui_image_create(body, texture_coopdx_logo, 2048, 1024, 32); + struct DjuiImage* logo = djui_image_create(body, texture_coopdx_logo, 2048, 1024, G_IM_FMT_RGBA, G_IM_SIZ_32b); if (configDjuiThemeCenter) { djui_base_set_size(&logo->base, 550, 275); } else { diff --git a/src/pc/djui/djui_panel_playerlist.c b/src/pc/djui/djui_panel_playerlist.c index 8b48fdbb9..7f65d5ff7 100644 --- a/src/pc/djui/djui_panel_playerlist.c +++ b/src/pc/djui/djui_panel_playerlist.c @@ -45,16 +45,16 @@ static void playerlist_update_row(u8 i, struct NetworkPlayer *np) { snprintf(sActNum, 7, "Done"); } if (charIndex >= CT_MAX) { charIndex = 0; } - djuiHeadIconImages[i]->texture = gCharacters[charIndex].hudHeadTexture.texture; + djuiHeadIconImages[i]->textureInfo.texture = gCharacters[charIndex].hudHeadTexture.texture; s16 pingValue = np->ping / 150; switch (pingValue) { - case 0: djuiPingImages[i]->texture = texture_ping_full; break; - case 1: djuiPingImages[i]->texture = texture_ping_four; break; - case 2: djuiPingImages[i]->texture = texture_ping_three; break; - case 3: djuiPingImages[i]->texture = texture_ping_two; break; - case 4: djuiPingImages[i]->texture = texture_ping_one; break; - default: djuiPingImages[i]->texture = texture_ping_empty; break; + case 0: djuiPingImages[i]->textureInfo.texture = texture_ping_full; break; + case 1: djuiPingImages[i]->textureInfo.texture = texture_ping_four; break; + case 2: djuiPingImages[i]->textureInfo.texture = texture_ping_three; break; + case 3: djuiPingImages[i]->textureInfo.texture = texture_ping_two; break; + case 4: djuiPingImages[i]->textureInfo.texture = texture_ping_one; break; + default: djuiPingImages[i]->textureInfo.texture = texture_ping_empty; break; } u8 visible = np->connected; @@ -141,11 +141,11 @@ void djui_panel_playerlist_create(UNUSED struct DjuiBase* caller) { djui_base_set_visible(&row->base, false); djuiRow[i] = row; - struct DjuiImage* i1 = djui_image_create(&row->base, texture_ping_empty, 16, 16, 8); + struct DjuiImage* i1 = djui_image_create(&row->base, texture_ping_empty, 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b); djui_base_set_size(&i1->base, 32, 32); djuiPingImages[i] = i1; - struct DjuiImage* i2 = djui_image_create(&row->base, texture_hud_char_mario_head, 16, 16, 8); + struct DjuiImage* i2 = djui_image_create(&row->base, texture_hud_char_mario_head, 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b); djui_base_set_size(&i2->base, 32, 32); djuiHeadIconImages[i] = i2; diff --git a/src/pc/djui/djui_selectionbox.c b/src/pc/djui/djui_selectionbox.c index 111c658b4..addb888ef 100644 --- a/src/pc/djui/djui_selectionbox.c +++ b/src/pc/djui/djui_selectionbox.c @@ -145,13 +145,13 @@ struct DjuiSelectionbox* djui_selectionbox_create(struct DjuiBase* parent, const djui_text_set_drop_shadow(rectText, 64, 64, 64, 100); selectionbox->rectText = rectText; - struct DjuiImage* rectImage = djui_image_create(&rect->base, texture_selectionbox_back_icon, 16, 16, 16); + struct DjuiImage* rectImage = djui_image_create(&rect->base, texture_selectionbox_back_icon, 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b); djui_base_set_location(&rectImage->base, 0, 0); djui_base_set_size(&rectImage->base, 16, 16); djui_base_set_alignment(&rectImage->base, DJUI_HALIGN_LEFT, DJUI_VALIGN_CENTER); selectionbox->rectImage = rectImage; - struct DjuiImage* rectImage2 = djui_image_create(&rect->base, texture_selectionbox_forward_icon, 16, 16, 16); + struct DjuiImage* rectImage2 = djui_image_create(&rect->base, texture_selectionbox_forward_icon, 16, 16, G_IM_FMT_RGBA, G_IM_SIZ_16b); djui_base_set_location(&rectImage2->base, 0, 0); djui_base_set_size(&rectImage2->base, 16, 16); djui_base_set_alignment(&rectImage2->base, DJUI_HALIGN_RIGHT, DJUI_VALIGN_CENTER); diff --git a/src/pc/gfx/gfx_pc.c b/src/pc/gfx/gfx_pc.c index 10cb2b500..18ef2966a 100644 --- a/src/pc/gfx/gfx_pc.c +++ b/src/pc/gfx/gfx_pc.c @@ -730,7 +730,7 @@ static void OPTIMIZE_O3 gfx_sp_vertex(size_t n_vertices, size_t dest_index, cons Vec3f globalLightCached[2]; Vec3f vertexColorCached; - if (rsp.geometry_mode & G_LIGHTING) { + if ((rsp.geometry_mode & G_LIGHTING) && !(rsp.geometry_mode & G_LIGHT_MAP_EXT)) { for (int i = 0; i < 2; i++) { for (int j = 0; j < 3; j++) globalLightCached[i][j] = gLightingColor[i][j] / 255.0f; @@ -911,7 +911,7 @@ static void OPTIMIZE_O3 gfx_sp_vertex(size_t n_vertices, size_t dest_index, cons d->color.b *= color[2] / 255.0f; } // if lighting engine is enabled and we should affect all vertex colored surfaces or the lighting engine geometry mode is on - } else if (le_is_enabled() && (affectAllVertexColored || (rsp.geometry_mode & G_LIGHTING_ENGINE_EXT))) { + } else if (le_is_enabled() && !(rsp.geometry_mode & G_LIGHT_MAP_EXT) && (affectAllVertexColored || (rsp.geometry_mode & G_LIGHTING_ENGINE_EXT))) { Color color = { gLEAmbientColor[0], gLEAmbientColor[1], gLEAmbientColor[2] }; CTX_BEGIN(CTX_LIGHTING); @@ -1028,6 +1028,11 @@ static void OPTIMIZE_O3 gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t cross = -cross; } + // Invert culling: back becomes front and front becomes back + if (rsp.geometry_mode & G_CULL_INVERT_EXT) { + cross = -cross; + } + switch (rsp.geometry_mode & G_CULL_BOTH) { case G_CULL_FRONT: if (cross <= 0) return; @@ -1504,6 +1509,12 @@ static void gfx_dp_set_env_color(uint8_t r, uint8_t g, uint8_t b, uint8_t a) { rdp.env_color.a = a; } +static void gfx_dp_set_env_rgb(uint8_t r, uint8_t g, uint8_t b) { + rdp.env_color.r = r; + rdp.env_color.g = g; + rdp.env_color.b = b; +} + static void gfx_dp_set_prim_color(uint8_t r, uint8_t g, uint8_t b, uint8_t a) { rdp.prim_color.r = r; rdp.prim_color.g = g; @@ -1843,6 +1854,9 @@ static void OPTIMIZE_O3 gfx_run_dl(Gfx* cmd) { case G_SETENVCOLOR: gfx_dp_set_env_color(C1(24, 8), C1(16, 8), C1(8, 8), C1(0, 8)); break; + case G_SETENVRGB: + gfx_dp_set_env_rgb(C1(24, 8), C1(16, 8), C1(8, 8)); + break; case G_SETPRIMCOLOR: gfx_dp_set_prim_color(C1(24, 8), C1(16, 8), C1(8, 8), C1(0, 8)); break; @@ -2051,17 +2065,26 @@ void gfx_shutdown(void) { // v custom for djui v // ///////////////////////// -static bool sDjuiClip = 0; -static uint8_t sDjuiClipX1 = 0; -static uint8_t sDjuiClipY1 = 0; -static uint8_t sDjuiClipX2 = 0; -static uint8_t sDjuiClipY2 = 0; +static const struct { + uint8_t LOAD_BLOCK; + uint8_t SHIFT; + uint8_t INCR; + uint8_t LINE_BYTES; +} G_IM_SIZ_[] = { + [G_IM_SIZ_4b] = { G_IM_SIZ_4b_LOAD_BLOCK, G_IM_SIZ_4b_SHIFT, G_IM_SIZ_4b_INCR, G_IM_SIZ_4b_LINE_BYTES }, + [G_IM_SIZ_8b] = { G_IM_SIZ_8b_LOAD_BLOCK, G_IM_SIZ_8b_SHIFT, G_IM_SIZ_8b_INCR, G_IM_SIZ_8b_LINE_BYTES }, + [G_IM_SIZ_16b] = { G_IM_SIZ_16b_LOAD_BLOCK, G_IM_SIZ_16b_SHIFT, G_IM_SIZ_16b_INCR, G_IM_SIZ_16b_LINE_BYTES }, + [G_IM_SIZ_32b] = { G_IM_SIZ_32b_LOAD_BLOCK, G_IM_SIZ_32b_SHIFT, G_IM_SIZ_32b_INCR, G_IM_SIZ_32b_LINE_BYTES }, +}; -static bool sDjuiOverride = false; -static void* sDjuiOverrideTexture = NULL; -static uint32_t sDjuiOverrideW = 0; -static uint32_t sDjuiOverrideH = 0; -static uint32_t sDjuiOverrideB = 0; +static bool sDjuiClip = 0; +static uint8_t sDjuiClipX1 = 0; +static uint8_t sDjuiClipY1 = 0; +static uint8_t sDjuiClipX2 = 0; +static uint8_t sDjuiClipY2 = 0; + +static bool sDjuiOverride = false; +static struct TextureInfo sDjuiOverrideTexture; static void OPTIMIZE_O3 djui_gfx_dp_execute_clipping(void) { if (!sDjuiClip) { return; } @@ -2127,29 +2150,19 @@ static void OPTIMIZE_O3 djui_gfx_dp_execute_override(void) { if (!sDjuiOverride) { return; } sDjuiOverride = false; - // gsDPSetTextureImage - uint8_t sizeLoadBlock = (sDjuiOverrideB == 32) ? 3 : 2; - rdp.texture_to_load.addr = sDjuiOverrideTexture; - rdp.texture_to_load.siz = sizeLoadBlock; + const Texture *texture = sDjuiOverrideTexture.texture; + uint32_t width = sDjuiOverrideTexture.width; + uint32_t height = sDjuiOverrideTexture.height; + uint8_t fmt = sDjuiOverrideTexture.format; + uint8_t siz = sDjuiOverrideTexture.size; - // gsDPSetTile - rdp.texture_tile.siz = sizeLoadBlock; + if (siz > G_IM_SIZ_32b) { return; } - // gsDPLoadBlock - uint32_t wordSizeShift = (sDjuiOverrideB == 32) ? 2 : 1; - uint32_t lrs = (sDjuiOverrideW * sDjuiOverrideH) - 1; - uint32_t sizeBytes = (lrs + 1) << wordSizeShift; - gfx_update_loaded_texture(rdp.texture_to_load.tile_number, sizeBytes, rdp.texture_to_load.addr); - - // gsDPSetTile - uint32_t line = (((sDjuiOverrideW * 2) + 7) >> 3); - rdp.texture_tile.line_size_bytes = line * 8; - - // gsDPSetTileSize - /*rdp.texture_tile.uls = 0; - rdp.texture_tile.ult = 0; - rdp.texture_tile.lrs = (sDjuiOverrideW - 1) << G_TEXTURE_IMAGE_FRAC; - rdp.texture_tile.lrt = (sDjuiOverrideH - 1) << G_TEXTURE_IMAGE_FRAC;*/ + // This is gDPLoadTextureBlock, but with some shortcuts and without texture size limitations + gfx_dp_set_texture_image(fmt, G_IM_SIZ_[siz].LOAD_BLOCK, width, texture); + gfx_dp_set_tile(fmt, siz, 0, 0, G_TX_LOADTILE, 0, 0, 0, 0, 0, 0, 0); + gfx_dp_load_block(0, 0, 0, ((width * height + G_IM_SIZ_[siz].INCR) >> G_IM_SIZ_[siz].SHIFT) - 1, 0); + gfx_dp_set_tile(fmt, siz, (((width * G_IM_SIZ_[siz].LINE_BYTES) + 7) >> 3), 0, G_TX_RENDERTILE, 0, 0, 0, 0, 0, 0, 0); } static void OPTIMIZE_O3 djui_gfx_dp_execute_djui(uint32_t opcode) { @@ -2184,12 +2197,13 @@ static void OPTIMIZE_O3 djui_gfx_dp_set_clipping(uint32_t x1, uint32_t y1, uint3 sDjuiClip = true; } -static void OPTIMIZE_O3 djui_gfx_dp_set_override(void* texture, uint32_t w, uint32_t h, uint32_t b) { - sDjuiOverrideTexture = texture; - sDjuiOverrideW = w; - sDjuiOverrideH = h; - sDjuiOverrideB = b; - sDjuiOverride = (texture != NULL); +static void OPTIMIZE_O3 djui_gfx_dp_set_override(void* texture, uint32_t w, uint32_t h, uint8_t fmt, uint8_t siz) { + sDjuiOverrideTexture.texture = texture; + sDjuiOverrideTexture.width = w; + sDjuiOverrideTexture.height = h; + sDjuiOverrideTexture.format = fmt; + sDjuiOverrideTexture.size = siz; + sDjuiOverride = (texture != NULL); } /*static void OPTIMIZE_O3 djui_gfx_sp_simple_vertex(size_t n_vertices, size_t dest_index, const Vtx *vertices) { @@ -2218,7 +2232,7 @@ void OPTIMIZE_O3 ext_gfx_run_dl(Gfx* cmd) { djui_gfx_dp_set_clipping(C0(16, 8), C0(8, 8), C1(16, 8), C1(8, 8)); break; case G_TEXOVERRIDE_DJUI: - djui_gfx_dp_set_override(seg_addr(cmd->words.w1), 1 << C0(16, 8), 1 << C0(8, 8), C0(0, 8)); + djui_gfx_dp_set_override(seg_addr(cmd->words.w1), 1 << C0(16, 8), 1 << C0(8, 8), C0(4, 4), C0(0, 4)); break; case G_VTX_EXT: #ifdef F3DEX_GBI_2 diff --git a/src/pc/loading.c b/src/pc/loading.c index dc3adcc03..b53b2cfba 100644 --- a/src/pc/loading.c +++ b/src/pc/loading.c @@ -121,7 +121,7 @@ static void init_loading_screen(void) { // splash image } else { - struct DjuiImage* splashImage = djui_image_create(base, texture_coopdx_logo, 2048, 1024, 32); + struct DjuiImage* splashImage = djui_image_create(base, texture_coopdx_logo, 2048, 1024, G_IM_FMT_RGBA, G_IM_SIZ_32b); djui_base_set_location_type(&splashImage->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE); djui_base_set_alignment(&splashImage->base, DJUI_HALIGN_CENTER, DJUI_VALIGN_TOP); djui_base_set_location(&splashImage->base, 0, -100); diff --git a/src/pc/lua/smlua.c b/src/pc/lua/smlua.c index b93b5679a..cd2502050 100644 --- a/src/pc/lua/smlua.c +++ b/src/pc/lua/smlua.c @@ -4,6 +4,8 @@ #include "game/hardcoded.h" #include "pc/mods/mods.h" #include "pc/mods/mods_utils.h" +#include "pc/mods/mod_storage.h" +#include "pc/mods/mod_fs.h" #include "pc/crash_handler.h" #include "pc/lua/utils/smlua_text_utils.h" #include "pc/lua/utils/smlua_audio_utils.h" @@ -352,7 +354,7 @@ void smlua_init(void) { for (int j = 0; j < mod->fileCount; j++) { struct ModFile* file = &mod->files[j]; // skip loading non-lua files - if (!(str_ends_with(file->relativePath, ".lua") || str_ends_with(file->relativePath, ".luac"))) { + if (!(path_ends_with(file->relativePath, ".lua") || path_ends_with(file->relativePath, ".luac"))) { continue; } @@ -362,7 +364,19 @@ void smlua_init(void) { } gLuaActiveModFile = file; - smlua_load_script(mod, file, i, true); + + // file has been required by some module before this + if (!smlua_get_cached_module_result(L, mod, file)) { + smlua_mark_module_as_loading(L, mod, file); + + s32 prevTop = lua_gettop(L); + int rc = smlua_load_script(mod, file, i, true); + + if (rc == LUA_OK) { + smlua_cache_module_result(L, mod, file, prevTop); + } + } + lua_settop(L, 0); } gLuaActiveMod = NULL; @@ -406,6 +420,8 @@ void smlua_shutdown(void) { smlua_model_util_clear(); smlua_level_util_reset(); smlua_anim_util_reset(); + mod_storage_shutdown(); + mod_fs_shutdown(); lua_State* L = gLuaState; if (L != NULL) { lua_close(L); diff --git a/src/pc/lua/smlua_autogen.h b/src/pc/lua/smlua_autogen.h index 53b49e5ed..5267c76e6 100644 --- a/src/pc/lua/smlua_autogen.h +++ b/src/pc/lua/smlua_autogen.h @@ -13,4 +13,7 @@ // Optional parameters must be contiguous until the last parameter (a mandatory parameter following an optional parameter is not allowed) #define OPTIONAL +// A macro to tell autogen the field `name` is a function member of the struct that calls `c_function` +#define FUNCTION(name, c_function) + #endif // SMLUA_AUTOGEN_H diff --git a/src/pc/lua/smlua_cobject.c b/src/pc/lua/smlua_cobject.c index 9b8d0b401..4f7da423a 100644 --- a/src/pc/lua/smlua_cobject.c +++ b/src/pc/lua/smlua_cobject.c @@ -98,7 +98,9 @@ static const char *sLuaLvtNames[] = { [LVT_TRAJECTORY_P] = "Trajectory Pointer", [LVT_TEXTURE_P] = "Texture Pointer", [LVT_LUAFUNCTION] = "LuaFunction", + [LVT_LUATABLE] = "LuaTable", [LVT_POINTER] = "Pointer", + [LVT_FUNCTION] = "Function", [LVT_MAX] = "Max", }; @@ -549,6 +551,14 @@ static int smlua__get_field(lua_State* L) { return 0; } + // CObject function members + if (data->valueType == LVT_FUNCTION) { + const char *function = (const char *) data->valueOffset; + lua_getglobal(L, function); + LUA_STACK_CHECK_END(L); + return 1; + } + u8* p = ((u8*)(intptr_t)pointer) + data->valueOffset; if (data->count == 1) { if (smlua_push_field(L, p, data)) { @@ -650,6 +660,12 @@ int smlua__eq(lua_State *L) { return 1; } +int smlua__bnot(lua_State *L) { + const CObject *a = lua_touserdata(L, 1); + lua_pushboolean(L, !a || a->freed); + return 1; +} + static int smlua_cpointer_get(lua_State* L) { const CPointer *cptr = lua_touserdata(L, 1); const char *key = lua_tostring(L, 2); @@ -690,6 +706,7 @@ void smlua_cobject_init_globals(void) { { "__index", smlua__get_field }, { "__newindex", smlua__set_field }, { "__eq", smlua__eq }, + { "__bnot", smlua__bnot }, { "__metatable", NULL }, { NULL, NULL } }; @@ -700,6 +717,7 @@ void smlua_cobject_init_globals(void) { { "__index", smlua_cpointer_get }, { "__newindex", smlua_cpointer_set }, { "__eq", smlua__eq }, + { "__bnot", smlua__bnot }, { "__metatable", NULL }, { NULL, NULL } }; diff --git a/src/pc/lua/smlua_cobject.h b/src/pc/lua/smlua_cobject.h index 8976d3670..83cac836d 100644 --- a/src/pc/lua/smlua_cobject.h +++ b/src/pc/lua/smlua_cobject.h @@ -1,6 +1,8 @@ #ifndef SMLUA_COBJECT_H #define SMLUA_COBJECT_H +#include "lua.h" + enum LuaValueType { LVT_BOOL, LVT_BOOL_P, @@ -31,7 +33,9 @@ enum LuaValueType { LVT_TRAJECTORY_P, LVT_TEXTURE_P, LVT_LUAFUNCTION, + LVT_LUATABLE, LVT_POINTER, + LVT_FUNCTION, LVT_MAX, }; diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index aced624c1..f2a37ee00 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -192,12 +192,6 @@ static struct LuaObjectField sAnimationFields[LUA_ANIMATION_FIELD_COUNT] = { { "valuesLength", LVT_U32, offsetof(struct Animation, valuesLength), true, LOT_NONE, 1, sizeof(u32) }, }; -#define LUA_ANIMATION_TABLE_FIELD_COUNT 1 -static struct LuaObjectField sAnimationTableFields[LUA_ANIMATION_TABLE_FIELD_COUNT] = { -// { "const anims", LVT_???, offsetof(struct AnimationTable, const anims), true, LOT_???, 1, sizeof(const struct Animation* []) }, <--- UNIMPLEMENTED - { "count", LVT_U32, offsetof(struct AnimationTable, count), true, LOT_NONE, 1, sizeof(u32) }, -}; - #define LUA_AREA_FIELD_COUNT 21 static struct LuaObjectField sAreaFields[LUA_AREA_FIELD_COUNT] = { { "camera", LVT_COBJECT_P, offsetof(struct Area, camera), false, LOT_CAMERA, 1, sizeof(struct Camera*) }, @@ -382,16 +376,6 @@ static struct LuaObjectField sBehaviorValuesFields[LUA_BEHAVIOR_VALUES_FIELD_COU { "trajectories", LVT_COBJECT, offsetof(struct BehaviorValues, trajectories), true, LOT_BEHAVIORTRAJECTORIES, 1, sizeof(struct BehaviorTrajectories) }, }; -#define LUA_BULLY_COLLISION_DATA_FIELD_COUNT 6 -static struct LuaObjectField sBullyCollisionDataFields[LUA_BULLY_COLLISION_DATA_FIELD_COUNT] = { - { "conversionRatio", LVT_F32, offsetof(struct BullyCollisionData, conversionRatio), false, LOT_NONE, 1, sizeof(f32) }, - { "posX", LVT_F32, offsetof(struct BullyCollisionData, posX), false, LOT_NONE, 1, sizeof(f32) }, - { "posZ", LVT_F32, offsetof(struct BullyCollisionData, posZ), false, LOT_NONE, 1, sizeof(f32) }, - { "radius", LVT_F32, offsetof(struct BullyCollisionData, radius), false, LOT_NONE, 1, sizeof(f32) }, - { "velX", LVT_F32, offsetof(struct BullyCollisionData, velX), false, LOT_NONE, 1, sizeof(f32) }, - { "velZ", LVT_F32, offsetof(struct BullyCollisionData, velZ), false, LOT_NONE, 1, sizeof(f32) }, -}; - #define LUA_CAMERA_FIELD_COUNT 15 static struct LuaObjectField sCameraFields[LUA_CAMERA_FIELD_COUNT] = { { "areaCenX", LVT_F32, offsetof(struct Camera, areaCenX), false, LOT_NONE, 1, sizeof(f32) }, @@ -411,45 +395,6 @@ static struct LuaObjectField sCameraFields[LUA_CAMERA_FIELD_COUNT] = { { "yaw", LVT_S16, offsetof(struct Camera, yaw), false, LOT_NONE, 1, sizeof(s16) }, }; -#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, 1, sizeof(s16) }, - { "fov", LVT_F32, offsetof(struct CameraFOVStatus, fov), false, LOT_NONE, 1, sizeof(f32) }, - { "fovFunc", LVT_U8, offsetof(struct CameraFOVStatus, fovFunc), false, LOT_NONE, 1, sizeof(u8) }, - { "fovOffset", LVT_F32, offsetof(struct CameraFOVStatus, fovOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "shakeAmplitude", LVT_F32, offsetof(struct CameraFOVStatus, shakeAmplitude), false, LOT_NONE, 1, sizeof(f32) }, - { "shakePhase", LVT_S16, offsetof(struct CameraFOVStatus, shakePhase), false, LOT_NONE, 1, sizeof(s16) }, - { "shakeSpeed", LVT_S16, offsetof(struct CameraFOVStatus, shakeSpeed), false, LOT_NONE, 1, sizeof(s16) }, - { "unusedIsSleeping", LVT_U32, offsetof(struct CameraFOVStatus, unusedIsSleeping), false, LOT_NONE, 1, sizeof(u32) }, -}; - -#define LUA_CAMERA_OVERRIDE_FIELD_COUNT 2 -static struct LuaObjectField sCameraOverrideFields[LUA_CAMERA_OVERRIDE_FIELD_COUNT] = { - { "override", LVT_BOOL, offsetof(struct CameraOverride, override), false, LOT_NONE, 1, sizeof(bool) }, - { "value", LVT_U32, offsetof(struct CameraOverride, value), false, LOT_NONE, 1, sizeof(unsigned int) }, -}; - -#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, 1, sizeof(f32) }, - { "focus", LVT_COBJECT, offsetof(struct CameraStoredInfo, focus), true, LOT_VEC3F, 1, sizeof(Vec3f) }, - { "panDist", LVT_F32, offsetof(struct CameraStoredInfo, panDist), false, LOT_NONE, 1, sizeof(f32) }, - { "pos", LVT_COBJECT, offsetof(struct CameraStoredInfo, pos), true, LOT_VEC3F, 1, sizeof(Vec3f) }, -}; - -#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, 1, sizeof(s8) }, - { "boundsX", LVT_S16, offsetof(struct CameraTrigger, boundsX), false, LOT_NONE, 1, sizeof(s16) }, - { "boundsY", LVT_S16, offsetof(struct CameraTrigger, boundsY), false, LOT_NONE, 1, sizeof(s16) }, - { "boundsYaw", LVT_S16, offsetof(struct CameraTrigger, boundsYaw), false, LOT_NONE, 1, sizeof(s16) }, - { "boundsZ", LVT_S16, offsetof(struct CameraTrigger, boundsZ), false, LOT_NONE, 1, sizeof(s16) }, - { "centerX", LVT_S16, offsetof(struct CameraTrigger, centerX), false, LOT_NONE, 1, sizeof(s16) }, - { "centerY", LVT_S16, offsetof(struct CameraTrigger, centerY), false, LOT_NONE, 1, sizeof(s16) }, - { "centerZ", LVT_S16, offsetof(struct CameraTrigger, centerZ), false, LOT_NONE, 1, sizeof(s16) }, -// { "event", LVT_???, offsetof(struct CameraTrigger, event), false, LOT_???, 1, sizeof(CameraEvent) }, <--- UNIMPLEMENTED -}; - #define LUA_CHAIN_SEGMENT_FIELD_COUNT 6 static struct LuaObjectField sChainSegmentFields[LUA_CHAIN_SEGMENT_FIELD_COUNT] = { { "pitch", LVT_S16, offsetof(struct ChainSegment, pitch), false, LOT_NONE, 1, sizeof(s16) }, @@ -460,282 +405,282 @@ static struct LuaObjectField sChainSegmentFields[LUA_CHAIN_SEGMENT_FIELD_COUNT] { "yaw", LVT_S16, offsetof(struct ChainSegment, yaw), false, LOT_NONE, 1, sizeof(s16) }, }; -#define LUA_CHARACTER_FIELD_COUNT 272 +#define LUA_CHARACTER_FIELD_COUNT 274 static struct LuaObjectField sCharacterFields[LUA_CHARACTER_FIELD_COUNT] = { - { "animAPose", LVT_S32, offsetof(struct Character, animAPose), true, LOT_NONE, 1, sizeof(s32) }, - { "animAirForwardKb", LVT_S32, offsetof(struct Character, animAirForwardKb), true, LOT_NONE, 1, sizeof(s32) }, - { "animAirKick", LVT_S32, offsetof(struct Character, animAirKick), true, LOT_NONE, 1, sizeof(s32) }, - { "animAirborneOnStomach", LVT_S32, offsetof(struct Character, animAirborneOnStomach), true, LOT_NONE, 1, sizeof(s32) }, - { "animBackflip", LVT_S32, offsetof(struct Character, animBackflip), true, LOT_NONE, 1, sizeof(s32) }, - { "animBackwardAirKb", LVT_S32, offsetof(struct Character, animBackwardAirKb), true, LOT_NONE, 1, sizeof(s32) }, - { "animBackwardKb", LVT_S32, offsetof(struct Character, animBackwardKb), true, LOT_NONE, 1, sizeof(s32) }, - { "animBackwardSpinning", LVT_S32, offsetof(struct Character, animBackwardSpinning), true, LOT_NONE, 1, sizeof(s32) }, - { "animBackwardsWaterKb", LVT_S32, offsetof(struct Character, animBackwardsWaterKb), true, LOT_NONE, 1, sizeof(s32) }, - { "animBeingGrabbed", LVT_S32, offsetof(struct Character, animBeingGrabbed), true, LOT_NONE, 1, sizeof(s32) }, - { "animBendKnessRidingShell", LVT_S32, offsetof(struct Character, animBendKnessRidingShell), true, LOT_NONE, 1, sizeof(s32) }, - { "animBottomStuckInGround", LVT_S32, offsetof(struct Character, animBottomStuckInGround), true, LOT_NONE, 1, sizeof(s32) }, - { "animBreakdance", LVT_S32, offsetof(struct Character, animBreakdance), true, LOT_NONE, 1, sizeof(s32) }, - { "animClimbDownLedge", LVT_S32, offsetof(struct Character, animClimbDownLedge), true, LOT_NONE, 1, sizeof(s32) }, - { "animClimbUpPole", LVT_S32, offsetof(struct Character, animClimbUpPole), true, LOT_NONE, 1, sizeof(s32) }, - { "animCoughing", LVT_S32, offsetof(struct Character, animCoughing), true, LOT_NONE, 1, sizeof(s32) }, - { "animCrawling", LVT_S32, offsetof(struct Character, animCrawling), true, LOT_NONE, 1, sizeof(s32) }, - { "animCreditsLookBackThenRun", LVT_S32, offsetof(struct Character, animCreditsLookBackThenRun), true, LOT_NONE, 1, sizeof(s32) }, - { "animCreditsLookUp", LVT_S32, offsetof(struct Character, animCreditsLookUp), true, LOT_NONE, 1, sizeof(s32) }, - { "animCreditsLowerHand", LVT_S32, offsetof(struct Character, animCreditsLowerHand), true, LOT_NONE, 1, sizeof(s32) }, - { "animCreditsPeaceSign", LVT_S32, offsetof(struct Character, animCreditsPeaceSign), true, LOT_NONE, 1, sizeof(s32) }, - { "animCreditsRaiseHand", LVT_S32, offsetof(struct Character, animCreditsRaiseHand), true, LOT_NONE, 1, sizeof(s32) }, - { "animCreditsReturnFromLookUp", LVT_S32, offsetof(struct Character, animCreditsReturnFromLookUp), true, LOT_NONE, 1, sizeof(s32) }, - { "animCreditsStartWalkLookUp", LVT_S32, offsetof(struct Character, animCreditsStartWalkLookUp), true, LOT_NONE, 1, sizeof(s32) }, - { "animCreditsTakeOffCap", LVT_S32, offsetof(struct Character, animCreditsTakeOffCap), true, LOT_NONE, 1, sizeof(s32) }, - { "animCreditsWaving", LVT_S32, offsetof(struct Character, animCreditsWaving), true, LOT_NONE, 1, sizeof(s32) }, - { "animCrouchFromFastLongjump", LVT_S32, offsetof(struct Character, animCrouchFromFastLongjump), true, LOT_NONE, 1, sizeof(s32) }, - { "animCrouchFromSlideKick", LVT_S32, offsetof(struct Character, animCrouchFromSlideKick), true, LOT_NONE, 1, sizeof(s32) }, - { "animCrouchFromSlowLongjump", LVT_S32, offsetof(struct Character, animCrouchFromSlowLongjump), true, LOT_NONE, 1, sizeof(s32) }, - { "animCrouching", LVT_S32, offsetof(struct Character, animCrouching), true, LOT_NONE, 1, sizeof(s32) }, - { "animDive", LVT_S32, offsetof(struct Character, animDive), true, LOT_NONE, 1, sizeof(s32) }, - { "animDoubleJumpFall", LVT_S32, offsetof(struct Character, animDoubleJumpFall), true, LOT_NONE, 1, sizeof(s32) }, - { "animDoubleJumpRise", LVT_S32, offsetof(struct Character, animDoubleJumpRise), true, LOT_NONE, 1, sizeof(s32) }, - { "animDrowningPart1", LVT_S32, offsetof(struct Character, animDrowningPart1), true, LOT_NONE, 1, sizeof(s32) }, - { "animDrowningPart2", LVT_S32, offsetof(struct Character, animDrowningPart2), true, LOT_NONE, 1, sizeof(s32) }, - { "animDyingFallOver", LVT_S32, offsetof(struct Character, animDyingFallOver), true, LOT_NONE, 1, sizeof(s32) }, - { "animDyingInQuicksand", LVT_S32, offsetof(struct Character, animDyingInQuicksand), true, LOT_NONE, 1, sizeof(s32) }, - { "animDyingOnBack", LVT_S32, offsetof(struct Character, animDyingOnBack), true, LOT_NONE, 1, sizeof(s32) }, - { "animDyingOnStomach", LVT_S32, offsetof(struct Character, animDyingOnStomach), true, LOT_NONE, 1, sizeof(s32) }, - { "animElectrocution", LVT_S32, offsetof(struct Character, animElectrocution), true, LOT_NONE, 1, sizeof(s32) }, - { "animFallFromSlide", LVT_S32, offsetof(struct Character, animFallFromSlide), true, LOT_NONE, 1, sizeof(s32) }, - { "animFallFromSlideKick", LVT_S32, offsetof(struct Character, animFallFromSlideKick), true, LOT_NONE, 1, sizeof(s32) }, - { "animFallFromSlidingWithLightObj", LVT_S32, offsetof(struct Character, animFallFromSlidingWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animFallFromWater", LVT_S32, offsetof(struct Character, animFallFromWater), true, LOT_NONE, 1, sizeof(s32) }, - { "animFallLandWithLightObj", LVT_S32, offsetof(struct Character, animFallLandWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animFallOverBackwards", LVT_S32, offsetof(struct Character, animFallOverBackwards), true, LOT_NONE, 1, sizeof(s32) }, - { "animFallWithLightObj", LVT_S32, offsetof(struct Character, animFallWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animFastLedgeGrab", LVT_S32, offsetof(struct Character, animFastLedgeGrab), true, LOT_NONE, 1, sizeof(s32) }, - { "animFastLongjump", LVT_S32, offsetof(struct Character, animFastLongjump), true, LOT_NONE, 1, sizeof(s32) }, - { "animFinalBowserRaiseHandSpin", LVT_S32, offsetof(struct Character, animFinalBowserRaiseHandSpin), true, LOT_NONE, 1, sizeof(s32) }, - { "animFinalBowserWingCapTakeOff", LVT_S32, offsetof(struct Character, animFinalBowserWingCapTakeOff), true, LOT_NONE, 1, sizeof(s32) }, - { "animFireLavaBurn", LVT_S32, offsetof(struct Character, animFireLavaBurn), true, LOT_NONE, 1, sizeof(s32) }, - { "animFirstPerson", LVT_S32, offsetof(struct Character, animFirstPerson), true, LOT_NONE, 1, sizeof(s32) }, - { "animFirstPunch", LVT_S32, offsetof(struct Character, animFirstPunch), true, LOT_NONE, 1, sizeof(s32) }, - { "animFirstPunchFast", LVT_S32, offsetof(struct Character, animFirstPunchFast), true, LOT_NONE, 1, sizeof(s32) }, - { "animFlutterkick", LVT_S32, offsetof(struct Character, animFlutterkick), true, LOT_NONE, 1, sizeof(s32) }, - { "animFlutterkickWithObj", LVT_S32, offsetof(struct Character, animFlutterkickWithObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animFlyFromCannon", LVT_S32, offsetof(struct Character, animFlyFromCannon), true, LOT_NONE, 1, sizeof(s32) }, - { "animForwardFlip", LVT_S32, offsetof(struct Character, animForwardFlip), true, LOT_NONE, 1, sizeof(s32) }, - { "animForwardKb", LVT_S32, offsetof(struct Character, animForwardKb), true, LOT_NONE, 1, sizeof(s32) }, - { "animForwardSpinning", LVT_S32, offsetof(struct Character, animForwardSpinning), true, LOT_NONE, 1, sizeof(s32) }, - { "animForwardSpinningFlip", LVT_S32, offsetof(struct Character, animForwardSpinningFlip), true, LOT_NONE, 1, sizeof(s32) }, - { "animGeneralFall", LVT_S32, offsetof(struct Character, animGeneralFall), true, LOT_NONE, 1, sizeof(s32) }, - { "animGeneralLand", LVT_S32, offsetof(struct Character, animGeneralLand), true, LOT_NONE, 1, sizeof(s32) }, - { "animGrabBowser", LVT_S32, offsetof(struct Character, animGrabBowser), true, LOT_NONE, 1, sizeof(s32) }, - { "animGrabHeavyObject", LVT_S32, offsetof(struct Character, animGrabHeavyObject), true, LOT_NONE, 1, sizeof(s32) }, - { "animGrabPoleShort", LVT_S32, offsetof(struct Character, animGrabPoleShort), true, LOT_NONE, 1, sizeof(s32) }, - { "animGrabPoleSwingPart1", LVT_S32, offsetof(struct Character, animGrabPoleSwingPart1), true, LOT_NONE, 1, sizeof(s32) }, - { "animGrabPoleSwingPart2", LVT_S32, offsetof(struct Character, animGrabPoleSwingPart2), true, LOT_NONE, 1, sizeof(s32) }, - { "animGroundBonk", LVT_S32, offsetof(struct Character, animGroundBonk), true, LOT_NONE, 1, sizeof(s32) }, - { "animGroundKick", LVT_S32, offsetof(struct Character, animGroundKick), true, LOT_NONE, 1, sizeof(s32) }, - { "animGroundPound", LVT_S32, offsetof(struct Character, animGroundPound), true, LOT_NONE, 1, sizeof(s32) }, - { "animGroundPoundLanding", LVT_S32, offsetof(struct Character, animGroundPoundLanding), true, LOT_NONE, 1, sizeof(s32) }, - { "animGroundThrow", LVT_S32, offsetof(struct Character, animGroundThrow), true, LOT_NONE, 1, sizeof(s32) }, - { "animHandstandIdle", LVT_S32, offsetof(struct Character, animHandstandIdle), true, LOT_NONE, 1, sizeof(s32) }, - { "animHandstandJump", LVT_S32, offsetof(struct Character, animHandstandJump), true, LOT_NONE, 1, sizeof(s32) }, - { "animHandstandLeft", LVT_S32, offsetof(struct Character, animHandstandLeft), true, LOT_NONE, 1, sizeof(s32) }, - { "animHandstandRight", LVT_S32, offsetof(struct Character, animHandstandRight), true, LOT_NONE, 1, sizeof(s32) }, - { "animHangOnCeiling", LVT_S32, offsetof(struct Character, animHangOnCeiling), true, LOT_NONE, 1, sizeof(s32) }, - { "animHangOnOwl", LVT_S32, offsetof(struct Character, animHangOnOwl), true, LOT_NONE, 1, sizeof(s32) }, - { "animHeadStuckInGround", LVT_S32, offsetof(struct Character, animHeadStuckInGround), true, LOT_NONE, 1, sizeof(s32) }, - { "animHeavyThrow", LVT_S32, offsetof(struct Character, animHeavyThrow), true, LOT_NONE, 1, sizeof(s32) }, - { "animHoldingBowser", LVT_S32, offsetof(struct Character, animHoldingBowser), true, LOT_NONE, 1, sizeof(s32) }, - { "animIdleHeadCenter", LVT_S32, offsetof(struct Character, animIdleHeadCenter), true, LOT_NONE, 1, sizeof(s32) }, - { "animIdleHeadLeft", LVT_S32, offsetof(struct Character, animIdleHeadLeft), true, LOT_NONE, 1, sizeof(s32) }, - { "animIdleHeadRight", LVT_S32, offsetof(struct Character, animIdleHeadRight), true, LOT_NONE, 1, sizeof(s32) }, - { "animIdleHeavyObj", LVT_S32, offsetof(struct Character, animIdleHeavyObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animIdleInQuicksand", LVT_S32, offsetof(struct Character, animIdleInQuicksand), true, LOT_NONE, 1, sizeof(s32) }, - { "animIdleOnLedge", LVT_S32, offsetof(struct Character, animIdleOnLedge), true, LOT_NONE, 1, sizeof(s32) }, - { "animIdleOnPole", LVT_S32, offsetof(struct Character, animIdleOnPole), true, LOT_NONE, 1, sizeof(s32) }, - { "animIdleWithLightObj", LVT_S32, offsetof(struct Character, animIdleWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animJumpLandWithLightObj", LVT_S32, offsetof(struct Character, animJumpLandWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animJumpRidingShell", LVT_S32, offsetof(struct Character, animJumpRidingShell), true, LOT_NONE, 1, sizeof(s32) }, - { "animJumpWithLightObj", LVT_S32, offsetof(struct Character, animJumpWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animLandFromDoubleJump", LVT_S32, offsetof(struct Character, animLandFromDoubleJump), true, LOT_NONE, 1, sizeof(s32) }, - { "animLandFromSingleJump", LVT_S32, offsetof(struct Character, animLandFromSingleJump), true, LOT_NONE, 1, sizeof(s32) }, - { "animLandOnStomach", LVT_S32, offsetof(struct Character, animLandOnStomach), true, LOT_NONE, 1, sizeof(s32) }, - { "animLegsStuckInGround", LVT_S32, offsetof(struct Character, animLegsStuckInGround), true, LOT_NONE, 1, sizeof(s32) }, - { "animMissingCap", LVT_S32, offsetof(struct Character, animMissingCap), true, LOT_NONE, 1, sizeof(s32) }, - { "animMoveInQuicksand", LVT_S32, offsetof(struct Character, animMoveInQuicksand), true, LOT_NONE, 1, sizeof(s32) }, - { "animMoveOnWireNetLeft", LVT_S32, offsetof(struct Character, animMoveOnWireNetLeft), true, LOT_NONE, 1, sizeof(s32) }, - { "animMoveOnWireNetRight", LVT_S32, offsetof(struct Character, animMoveOnWireNetRight), true, LOT_NONE, 1, sizeof(s32) }, - { "animOffsetEnabled", LVT_U8, offsetof(struct Character, animOffsetEnabled), true, LOT_NONE, 1, sizeof(u8) }, - { "animOffsetFeet", LVT_F32, offsetof(struct Character, animOffsetFeet), true, LOT_NONE, 1, sizeof(f32) }, - { "animOffsetHand", LVT_F32, offsetof(struct Character, animOffsetHand), true, LOT_NONE, 1, sizeof(f32) }, - { "animOffsetLowYPoint", LVT_F32, offsetof(struct Character, animOffsetLowYPoint), true, LOT_NONE, 1, sizeof(f32) }, - { "animPickUpLightObj", LVT_S32, offsetof(struct Character, animPickUpLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animPlaceLightObj", LVT_S32, offsetof(struct Character, animPlaceLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animPullDoorWalkIn", LVT_S32, offsetof(struct Character, animPullDoorWalkIn), true, LOT_NONE, 1, sizeof(s32) }, - { "animPushDoorWalkIn", LVT_S32, offsetof(struct Character, animPushDoorWalkIn), true, LOT_NONE, 1, sizeof(s32) }, - { "animPushing", LVT_S32, offsetof(struct Character, animPushing), true, LOT_NONE, 1, sizeof(s32) }, - { "animPutCapOn", LVT_S32, offsetof(struct Character, animPutCapOn), true, LOT_NONE, 1, sizeof(s32) }, - { "animQuicklyPutCapOn", LVT_S32, offsetof(struct Character, animQuicklyPutCapOn), true, LOT_NONE, 1, sizeof(s32) }, - { "animReachPocket", LVT_S32, offsetof(struct Character, animReachPocket), true, LOT_NONE, 1, sizeof(s32) }, - { "animReleaseBowser", LVT_S32, offsetof(struct Character, animReleaseBowser), true, LOT_NONE, 1, sizeof(s32) }, - { "animReturnFromHandstand", LVT_S32, offsetof(struct Character, animReturnFromHandstand), true, LOT_NONE, 1, sizeof(s32) }, - { "animReturnFromStarDance", LVT_S32, offsetof(struct Character, animReturnFromStarDance), true, LOT_NONE, 1, sizeof(s32) }, - { "animReturnFromWaterStarDance", LVT_S32, offsetof(struct Character, animReturnFromWaterStarDance), true, LOT_NONE, 1, sizeof(s32) }, - { "animReturnStarApproachDoor", LVT_S32, offsetof(struct Character, animReturnStarApproachDoor), true, LOT_NONE, 1, sizeof(s32) }, - { "animRidingShell", LVT_S32, offsetof(struct Character, animRidingShell), true, LOT_NONE, 1, sizeof(s32) }, - { "animRunWithLightObj", LVT_S32, offsetof(struct Character, animRunWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animRunning", LVT_S32, offsetof(struct Character, animRunning), true, LOT_NONE, 1, sizeof(s32) }, - { "animRunningUnused", LVT_S32, offsetof(struct Character, animRunningUnused), true, LOT_NONE, 1, sizeof(s32) }, - { "animSecondPunch", LVT_S32, offsetof(struct Character, animSecondPunch), true, LOT_NONE, 1, sizeof(s32) }, - { "animSecondPunchFast", LVT_S32, offsetof(struct Character, animSecondPunchFast), true, LOT_NONE, 1, sizeof(s32) }, - { "animShivering", LVT_S32, offsetof(struct Character, animShivering), true, LOT_NONE, 1, sizeof(s32) }, - { "animShiveringReturnToIdle", LVT_S32, offsetof(struct Character, animShiveringReturnToIdle), true, LOT_NONE, 1, sizeof(s32) }, - { "animShiveringWarmingHand", LVT_S32, offsetof(struct Character, animShiveringWarmingHand), true, LOT_NONE, 1, sizeof(s32) }, - { "animShocked", LVT_S32, offsetof(struct Character, animShocked), true, LOT_NONE, 1, sizeof(s32) }, - { "animSidestepLeft", LVT_S32, offsetof(struct Character, animSidestepLeft), true, LOT_NONE, 1, sizeof(s32) }, - { "animSidestepRight", LVT_S32, offsetof(struct Character, animSidestepRight), true, LOT_NONE, 1, sizeof(s32) }, - { "animSingleJump", LVT_S32, offsetof(struct Character, animSingleJump), true, LOT_NONE, 1, sizeof(s32) }, - { "animSkidOnGround", LVT_S32, offsetof(struct Character, animSkidOnGround), true, LOT_NONE, 1, sizeof(s32) }, - { "animSleepIdle", LVT_S32, offsetof(struct Character, animSleepIdle), true, LOT_NONE, 1, sizeof(s32) }, - { "animSleepLying", LVT_S32, offsetof(struct Character, animSleepLying), true, LOT_NONE, 1, sizeof(s32) }, - { "animSleepStartLying", LVT_S32, offsetof(struct Character, animSleepStartLying), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlide", LVT_S32, offsetof(struct Character, animSlide), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlideDive", LVT_S32, offsetof(struct Character, animSlideDive), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlideKick", LVT_S32, offsetof(struct Character, animSlideKick), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlideMotionless", LVT_S32, offsetof(struct Character, animSlideMotionless), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlideflip", LVT_S32, offsetof(struct Character, animSlideflip), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlideflipLand", LVT_S32, offsetof(struct Character, animSlideflipLand), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlidejump", LVT_S32, offsetof(struct Character, animSlidejump), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlidingOnBottomWithLightObj", LVT_S32, offsetof(struct Character, animSlidingOnBottomWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlowLandFromDive", LVT_S32, offsetof(struct Character, animSlowLandFromDive), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlowLedgeGrab", LVT_S32, offsetof(struct Character, animSlowLedgeGrab), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlowLongjump", LVT_S32, offsetof(struct Character, animSlowLongjump), true, LOT_NONE, 1, sizeof(s32) }, - { "animSlowWalkWithLightObj", LVT_S32, offsetof(struct Character, animSlowWalkWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animSoftBackKb", LVT_S32, offsetof(struct Character, animSoftBackKb), true, LOT_NONE, 1, sizeof(s32) }, - { "animSoftFrontKb", LVT_S32, offsetof(struct Character, animSoftFrontKb), true, LOT_NONE, 1, sizeof(s32) }, - { "animStandAgainstWall", LVT_S32, offsetof(struct Character, animStandAgainstWall), true, LOT_NONE, 1, sizeof(s32) }, - { "animStandUpFromLavaBoost", LVT_S32, offsetof(struct Character, animStandUpFromLavaBoost), true, LOT_NONE, 1, sizeof(s32) }, - { "animStandUpFromSlidingWithLightObj", LVT_S32, offsetof(struct Character, animStandUpFromSlidingWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animStarDance", LVT_S32, offsetof(struct Character, animStarDance), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartCrawling", LVT_S32, offsetof(struct Character, animStartCrawling), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartCrouching", LVT_S32, offsetof(struct Character, animStartCrouching), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartForwardSpinning", LVT_S32, offsetof(struct Character, animStartForwardSpinning), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartGroundPound", LVT_S32, offsetof(struct Character, animStartGroundPound), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartHandstand", LVT_S32, offsetof(struct Character, animStartHandstand), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartReachPocket", LVT_S32, offsetof(struct Character, animStartReachPocket), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartRidingShell", LVT_S32, offsetof(struct Character, animStartRidingShell), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartSleepIdle", LVT_S32, offsetof(struct Character, animStartSleepIdle), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartSleepScratch", LVT_S32, offsetof(struct Character, animStartSleepScratch), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartSleepSitting", LVT_S32, offsetof(struct Character, animStartSleepSitting), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartSleepYawn", LVT_S32, offsetof(struct Character, animStartSleepYawn), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartTiptoe", LVT_S32, offsetof(struct Character, animStartTiptoe), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartTwirl", LVT_S32, offsetof(struct Character, animStartTwirl), true, LOT_NONE, 1, sizeof(s32) }, - { "animStartWallkick", LVT_S32, offsetof(struct Character, animStartWallkick), true, LOT_NONE, 1, sizeof(s32) }, - { "animStopCrawling", LVT_S32, offsetof(struct Character, animStopCrawling), true, LOT_NONE, 1, sizeof(s32) }, - { "animStopCrouching", LVT_S32, offsetof(struct Character, animStopCrouching), true, LOT_NONE, 1, sizeof(s32) }, - { "animStopGrabObjWater", LVT_S32, offsetof(struct Character, animStopGrabObjWater), true, LOT_NONE, 1, sizeof(s32) }, - { "animStopReachPocket", LVT_S32, offsetof(struct Character, animStopReachPocket), true, LOT_NONE, 1, sizeof(s32) }, - { "animStopSkid", LVT_S32, offsetof(struct Character, animStopSkid), true, LOT_NONE, 1, sizeof(s32) }, - { "animStopSlide", LVT_S32, offsetof(struct Character, animStopSlide), true, LOT_NONE, 1, sizeof(s32) }, - { "animStopSlideLightObj", LVT_S32, offsetof(struct Character, animStopSlideLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animSuffocating", LVT_S32, offsetof(struct Character, animSuffocating), true, LOT_NONE, 1, sizeof(s32) }, - { "animSummonStar", LVT_S32, offsetof(struct Character, animSummonStar), true, LOT_NONE, 1, sizeof(s32) }, - { "animSwimPart1", LVT_S32, offsetof(struct Character, animSwimPart1), true, LOT_NONE, 1, sizeof(s32) }, - { "animSwimPart2", LVT_S32, offsetof(struct Character, animSwimPart2), true, LOT_NONE, 1, sizeof(s32) }, - { "animSwimWithObjPart1", LVT_S32, offsetof(struct Character, animSwimWithObjPart1), true, LOT_NONE, 1, sizeof(s32) }, - { "animSwimWithObjPart2", LVT_S32, offsetof(struct Character, animSwimWithObjPart2), true, LOT_NONE, 1, sizeof(s32) }, - { "animSwingingBowser", LVT_S32, offsetof(struct Character, animSwingingBowser), true, LOT_NONE, 1, sizeof(s32) }, - { "animTakeCapOffThenOn", LVT_S32, offsetof(struct Character, animTakeCapOffThenOn), true, LOT_NONE, 1, sizeof(s32) }, - { "animThrowCatchKey", LVT_S32, offsetof(struct Character, animThrowCatchKey), true, LOT_NONE, 1, sizeof(s32) }, - { "animThrowLightObject", LVT_S32, offsetof(struct Character, animThrowLightObject), true, LOT_NONE, 1, sizeof(s32) }, - { "animTiptoe", LVT_S32, offsetof(struct Character, animTiptoe), true, LOT_NONE, 1, sizeof(s32) }, - { "animTripleJump", LVT_S32, offsetof(struct Character, animTripleJump), true, LOT_NONE, 1, sizeof(s32) }, - { "animTripleJumpFly", LVT_S32, offsetof(struct Character, animTripleJumpFly), true, LOT_NONE, 1, sizeof(s32) }, - { "animTripleJumpGroundPound", LVT_S32, offsetof(struct Character, animTripleJumpGroundPound), true, LOT_NONE, 1, sizeof(s32) }, - { "animTripleJumpLand", LVT_S32, offsetof(struct Character, animTripleJumpLand), true, LOT_NONE, 1, sizeof(s32) }, - { "animTurningPart1", LVT_S32, offsetof(struct Character, animTurningPart1), true, LOT_NONE, 1, sizeof(s32) }, - { "animTurningPart2", LVT_S32, offsetof(struct Character, animTurningPart2), true, LOT_NONE, 1, sizeof(s32) }, - { "animTwirl", LVT_S32, offsetof(struct Character, animTwirl), true, LOT_NONE, 1, sizeof(s32) }, - { "animTwirlLand", LVT_S32, offsetof(struct Character, animTwirlLand), true, LOT_NONE, 1, sizeof(s32) }, - { "animUnlockDoor", LVT_S32, offsetof(struct Character, animUnlockDoor), true, LOT_NONE, 1, sizeof(s32) }, - { "animWakeFromLying", LVT_S32, offsetof(struct Character, animWakeFromLying), true, LOT_NONE, 1, sizeof(s32) }, - { "animWakeFromSleep", LVT_S32, offsetof(struct Character, animWakeFromSleep), true, LOT_NONE, 1, sizeof(s32) }, - { "animWalkPanting", LVT_S32, offsetof(struct Character, animWalkPanting), true, LOT_NONE, 1, sizeof(s32) }, - { "animWalkWithHeavyObj", LVT_S32, offsetof(struct Character, animWalkWithHeavyObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animWalkWithLightObj", LVT_S32, offsetof(struct Character, animWalkWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animWalking", LVT_S32, offsetof(struct Character, animWalking), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterActionEnd", LVT_S32, offsetof(struct Character, animWaterActionEnd), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterActionEndWithObj", LVT_S32, offsetof(struct Character, animWaterActionEndWithObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterDying", LVT_S32, offsetof(struct Character, animWaterDying), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterForwardKb", LVT_S32, offsetof(struct Character, animWaterForwardKb), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterGrabObjPart1", LVT_S32, offsetof(struct Character, animWaterGrabObjPart1), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterGrabObjPart2", LVT_S32, offsetof(struct Character, animWaterGrabObjPart2), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterIdle", LVT_S32, offsetof(struct Character, animWaterIdle), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterIdleWithObj", LVT_S32, offsetof(struct Character, animWaterIdleWithObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterPickUpObj", LVT_S32, offsetof(struct Character, animWaterPickUpObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterStarDance", LVT_S32, offsetof(struct Character, animWaterStarDance), true, LOT_NONE, 1, sizeof(s32) }, - { "animWaterThrowObj", LVT_S32, offsetof(struct Character, animWaterThrowObj), true, LOT_NONE, 1, sizeof(s32) }, - { "animWingCapFly", LVT_S32, offsetof(struct Character, animWingCapFly), true, LOT_NONE, 1, sizeof(s32) }, -// { "anims", LVT_???, offsetof(struct Character, anims), true, LOT_???, 1, sizeof(s32) }, <--- UNIMPLEMENTED - { "cameraHudHead", LVT_U32, offsetof(struct Character, cameraHudHead), true, LOT_NONE, 1, sizeof(u32) }, - { "capEnemyDecalGfx", LVT_COBJECT_P, offsetof(struct Character, capEnemyDecalGfx), true, LOT_GFX, 1, sizeof(Gfx*) }, - { "capEnemyGfx", LVT_COBJECT_P, offsetof(struct Character, capEnemyGfx), true, LOT_GFX, 1, sizeof(Gfx*) }, - { "capEnemyLayer", LVT_U8, offsetof(struct Character, capEnemyLayer), true, LOT_NONE, 1, sizeof(u8) }, - { "capMetalModelId", LVT_U32, offsetof(struct Character, capMetalModelId), true, LOT_NONE, 1, sizeof(u32) }, - { "capMetalWingModelId", LVT_U32, offsetof(struct Character, capMetalWingModelId), true, LOT_NONE, 1, sizeof(u32) }, - { "capModelId", LVT_U32, offsetof(struct Character, capModelId), true, LOT_NONE, 1, sizeof(u32) }, - { "capWingModelId", LVT_U32, offsetof(struct Character, capWingModelId), true, LOT_NONE, 1, sizeof(u32) }, - { "hudHead", LVT_U8, offsetof(struct Character, hudHead), true, LOT_NONE, 1, sizeof(char) }, - { "hudHeadTexture", LVT_COBJECT, offsetof(struct Character, hudHeadTexture), true, LOT_TEXTUREINFO, 1, sizeof(struct TextureInfo) }, - { "modelId", LVT_U32, offsetof(struct Character, modelId), true, LOT_NONE, 1, sizeof(u32) }, - { "name", LVT_STRING_P, offsetof(struct Character, name), true, LOT_NONE, 1, sizeof(char*) }, - { "soundAttacked", LVT_S32, offsetof(struct Character, soundAttacked), true, LOT_NONE, 1, sizeof(s32) }, - { "soundCoughing1", LVT_S32, offsetof(struct Character, soundCoughing1), true, LOT_NONE, 1, sizeof(s32) }, - { "soundCoughing2", LVT_S32, offsetof(struct Character, soundCoughing2), true, LOT_NONE, 1, sizeof(s32) }, - { "soundCoughing3", LVT_S32, offsetof(struct Character, soundCoughing3), true, LOT_NONE, 1, sizeof(s32) }, - { "soundDoh", LVT_S32, offsetof(struct Character, soundDoh), true, LOT_NONE, 1, sizeof(s32) }, - { "soundDrowning", LVT_S32, offsetof(struct Character, soundDrowning), true, LOT_NONE, 1, sizeof(s32) }, - { "soundDying", LVT_S32, offsetof(struct Character, soundDying), true, LOT_NONE, 1, sizeof(s32) }, - { "soundEeuh", LVT_S32, offsetof(struct Character, soundEeuh), true, LOT_NONE, 1, sizeof(s32) }, - { "soundFreqScale", LVT_F32, offsetof(struct Character, soundFreqScale), true, LOT_NONE, 1, sizeof(f32) }, - { "soundGameOver", LVT_S32, offsetof(struct Character, soundGameOver), true, LOT_NONE, 1, sizeof(s32) }, - { "soundGroundPoundWah", LVT_S32, offsetof(struct Character, soundGroundPoundWah), true, LOT_NONE, 1, sizeof(s32) }, - { "soundHaha", LVT_S32, offsetof(struct Character, soundHaha), true, LOT_NONE, 1, sizeof(s32) }, - { "soundHaha_2", LVT_S32, offsetof(struct Character, soundHaha_2), true, LOT_NONE, 1, sizeof(s32) }, - { "soundHello", LVT_S32, offsetof(struct Character, soundHello), true, LOT_NONE, 1, sizeof(s32) }, - { "soundHereWeGo", LVT_S32, offsetof(struct Character, soundHereWeGo), true, LOT_NONE, 1, sizeof(s32) }, - { "soundHoohoo", LVT_S32, offsetof(struct Character, soundHoohoo), true, LOT_NONE, 1, sizeof(s32) }, - { "soundHrmm", LVT_S32, offsetof(struct Character, soundHrmm), true, LOT_NONE, 1, sizeof(s32) }, - { "soundImaTired", LVT_S32, offsetof(struct Character, soundImaTired), true, LOT_NONE, 1, sizeof(s32) }, - { "soundLetsAGo", LVT_S32, offsetof(struct Character, soundLetsAGo), true, LOT_NONE, 1, sizeof(s32) }, - { "soundMamaMia", LVT_S32, offsetof(struct Character, soundMamaMia), true, LOT_NONE, 1, sizeof(s32) }, - { "soundOkeyDokey", LVT_S32, offsetof(struct Character, soundOkeyDokey), true, LOT_NONE, 1, sizeof(s32) }, - { "soundOnFire", LVT_S32, offsetof(struct Character, soundOnFire), true, LOT_NONE, 1, sizeof(s32) }, - { "soundOoof", LVT_S32, offsetof(struct Character, soundOoof), true, LOT_NONE, 1, sizeof(s32) }, - { "soundOoof2", LVT_S32, offsetof(struct Character, soundOoof2), true, LOT_NONE, 1, sizeof(s32) }, - { "soundPanting", LVT_S32, offsetof(struct Character, soundPanting), true, LOT_NONE, 1, sizeof(s32) }, - { "soundPantingCold", LVT_S32, offsetof(struct Character, soundPantingCold), true, LOT_NONE, 1, sizeof(s32) }, - { "soundPressStartToPlay", LVT_S32, offsetof(struct Character, soundPressStartToPlay), true, LOT_NONE, 1, sizeof(s32) }, - { "soundPunchHoo", LVT_S32, offsetof(struct Character, soundPunchHoo), true, LOT_NONE, 1, sizeof(s32) }, - { "soundPunchWah", LVT_S32, offsetof(struct Character, soundPunchWah), true, LOT_NONE, 1, sizeof(s32) }, - { "soundPunchYah", LVT_S32, offsetof(struct Character, soundPunchYah), true, LOT_NONE, 1, sizeof(s32) }, - { "soundSnoring1", LVT_S32, offsetof(struct Character, soundSnoring1), true, LOT_NONE, 1, sizeof(s32) }, - { "soundSnoring2", LVT_S32, offsetof(struct Character, soundSnoring2), true, LOT_NONE, 1, sizeof(s32) }, - { "soundSnoring3", LVT_S32, offsetof(struct Character, soundSnoring3), true, LOT_NONE, 1, sizeof(s32) }, - { "soundSoLongaBowser", LVT_S32, offsetof(struct Character, soundSoLongaBowser), true, LOT_NONE, 1, sizeof(s32) }, - { "soundTwirlBounce", LVT_S32, offsetof(struct Character, soundTwirlBounce), true, LOT_NONE, 1, sizeof(s32) }, - { "soundUh", LVT_S32, offsetof(struct Character, soundUh), true, LOT_NONE, 1, sizeof(s32) }, - { "soundUh2", LVT_S32, offsetof(struct Character, soundUh2), true, LOT_NONE, 1, sizeof(s32) }, - { "soundUh2_2", LVT_S32, offsetof(struct Character, soundUh2_2), true, LOT_NONE, 1, sizeof(s32) }, - { "soundWaaaooow", LVT_S32, offsetof(struct Character, soundWaaaooow), true, LOT_NONE, 1, sizeof(s32) }, - { "soundWah2", LVT_S32, offsetof(struct Character, soundWah2), true, LOT_NONE, 1, sizeof(s32) }, - { "soundWhoa", LVT_S32, offsetof(struct Character, soundWhoa), true, LOT_NONE, 1, sizeof(s32) }, - { "soundYahWahHoo", LVT_S32, offsetof(struct Character, soundYahWahHoo), true, LOT_NONE, 1, sizeof(s32) }, - { "soundYahoo", LVT_S32, offsetof(struct Character, soundYahoo), true, LOT_NONE, 1, sizeof(s32) }, - { "soundYahooWahaYippee", LVT_S32, offsetof(struct Character, soundYahooWahaYippee), true, LOT_NONE, 1, sizeof(s32) }, - { "soundYawning", LVT_S32, offsetof(struct Character, soundYawning), true, LOT_NONE, 1, sizeof(s32) }, -// { "sounds", LVT_???, offsetof(struct Character, sounds), true, LOT_???, 1, sizeof(s32) }, <--- UNIMPLEMENTED - { "torsoRotMult", LVT_F32, offsetof(struct Character, torsoRotMult), true, LOT_NONE, 1, sizeof(f32) }, - { "type", LVT_S32, offsetof(struct Character, type), true, LOT_NONE, 1, sizeof(enum CharacterType) }, + { "animAPose", LVT_S32, offsetof(struct Character, animAPose), true, LOT_NONE, 1, sizeof(s32) }, + { "animAirForwardKb", LVT_S32, offsetof(struct Character, animAirForwardKb), true, LOT_NONE, 1, sizeof(s32) }, + { "animAirKick", LVT_S32, offsetof(struct Character, animAirKick), true, LOT_NONE, 1, sizeof(s32) }, + { "animAirborneOnStomach", LVT_S32, offsetof(struct Character, animAirborneOnStomach), true, LOT_NONE, 1, sizeof(s32) }, + { "animBackflip", LVT_S32, offsetof(struct Character, animBackflip), true, LOT_NONE, 1, sizeof(s32) }, + { "animBackwardAirKb", LVT_S32, offsetof(struct Character, animBackwardAirKb), true, LOT_NONE, 1, sizeof(s32) }, + { "animBackwardKb", LVT_S32, offsetof(struct Character, animBackwardKb), true, LOT_NONE, 1, sizeof(s32) }, + { "animBackwardSpinning", LVT_S32, offsetof(struct Character, animBackwardSpinning), true, LOT_NONE, 1, sizeof(s32) }, + { "animBackwardsWaterKb", LVT_S32, offsetof(struct Character, animBackwardsWaterKb), true, LOT_NONE, 1, sizeof(s32) }, + { "animBeingGrabbed", LVT_S32, offsetof(struct Character, animBeingGrabbed), true, LOT_NONE, 1, sizeof(s32) }, + { "animBendKnessRidingShell", LVT_S32, offsetof(struct Character, animBendKnessRidingShell), true, LOT_NONE, 1, sizeof(s32) }, + { "animBottomStuckInGround", LVT_S32, offsetof(struct Character, animBottomStuckInGround), true, LOT_NONE, 1, sizeof(s32) }, + { "animBreakdance", LVT_S32, offsetof(struct Character, animBreakdance), true, LOT_NONE, 1, sizeof(s32) }, + { "animClimbDownLedge", LVT_S32, offsetof(struct Character, animClimbDownLedge), true, LOT_NONE, 1, sizeof(s32) }, + { "animClimbUpPole", LVT_S32, offsetof(struct Character, animClimbUpPole), true, LOT_NONE, 1, sizeof(s32) }, + { "animCoughing", LVT_S32, offsetof(struct Character, animCoughing), true, LOT_NONE, 1, sizeof(s32) }, + { "animCrawling", LVT_S32, offsetof(struct Character, animCrawling), true, LOT_NONE, 1, sizeof(s32) }, + { "animCreditsLookBackThenRun", LVT_S32, offsetof(struct Character, animCreditsLookBackThenRun), true, LOT_NONE, 1, sizeof(s32) }, + { "animCreditsLookUp", LVT_S32, offsetof(struct Character, animCreditsLookUp), true, LOT_NONE, 1, sizeof(s32) }, + { "animCreditsLowerHand", LVT_S32, offsetof(struct Character, animCreditsLowerHand), true, LOT_NONE, 1, sizeof(s32) }, + { "animCreditsPeaceSign", LVT_S32, offsetof(struct Character, animCreditsPeaceSign), true, LOT_NONE, 1, sizeof(s32) }, + { "animCreditsRaiseHand", LVT_S32, offsetof(struct Character, animCreditsRaiseHand), true, LOT_NONE, 1, sizeof(s32) }, + { "animCreditsReturnFromLookUp", LVT_S32, offsetof(struct Character, animCreditsReturnFromLookUp), true, LOT_NONE, 1, sizeof(s32) }, + { "animCreditsStartWalkLookUp", LVT_S32, offsetof(struct Character, animCreditsStartWalkLookUp), true, LOT_NONE, 1, sizeof(s32) }, + { "animCreditsTakeOffCap", LVT_S32, offsetof(struct Character, animCreditsTakeOffCap), true, LOT_NONE, 1, sizeof(s32) }, + { "animCreditsWaving", LVT_S32, offsetof(struct Character, animCreditsWaving), true, LOT_NONE, 1, sizeof(s32) }, + { "animCrouchFromFastLongjump", LVT_S32, offsetof(struct Character, animCrouchFromFastLongjump), true, LOT_NONE, 1, sizeof(s32) }, + { "animCrouchFromSlideKick", LVT_S32, offsetof(struct Character, animCrouchFromSlideKick), true, LOT_NONE, 1, sizeof(s32) }, + { "animCrouchFromSlowLongjump", LVT_S32, offsetof(struct Character, animCrouchFromSlowLongjump), true, LOT_NONE, 1, sizeof(s32) }, + { "animCrouching", LVT_S32, offsetof(struct Character, animCrouching), true, LOT_NONE, 1, sizeof(s32) }, + { "animDive", LVT_S32, offsetof(struct Character, animDive), true, LOT_NONE, 1, sizeof(s32) }, + { "animDoubleJumpFall", LVT_S32, offsetof(struct Character, animDoubleJumpFall), true, LOT_NONE, 1, sizeof(s32) }, + { "animDoubleJumpRise", LVT_S32, offsetof(struct Character, animDoubleJumpRise), true, LOT_NONE, 1, sizeof(s32) }, + { "animDrowningPart1", LVT_S32, offsetof(struct Character, animDrowningPart1), true, LOT_NONE, 1, sizeof(s32) }, + { "animDrowningPart2", LVT_S32, offsetof(struct Character, animDrowningPart2), true, LOT_NONE, 1, sizeof(s32) }, + { "animDyingFallOver", LVT_S32, offsetof(struct Character, animDyingFallOver), true, LOT_NONE, 1, sizeof(s32) }, + { "animDyingInQuicksand", LVT_S32, offsetof(struct Character, animDyingInQuicksand), true, LOT_NONE, 1, sizeof(s32) }, + { "animDyingOnBack", LVT_S32, offsetof(struct Character, animDyingOnBack), true, LOT_NONE, 1, sizeof(s32) }, + { "animDyingOnStomach", LVT_S32, offsetof(struct Character, animDyingOnStomach), true, LOT_NONE, 1, sizeof(s32) }, + { "animElectrocution", LVT_S32, offsetof(struct Character, animElectrocution), true, LOT_NONE, 1, sizeof(s32) }, + { "animFallFromSlide", LVT_S32, offsetof(struct Character, animFallFromSlide), true, LOT_NONE, 1, sizeof(s32) }, + { "animFallFromSlideKick", LVT_S32, offsetof(struct Character, animFallFromSlideKick), true, LOT_NONE, 1, sizeof(s32) }, + { "animFallFromSlidingWithLightObj", LVT_S32, offsetof(struct Character, animFallFromSlidingWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animFallFromWater", LVT_S32, offsetof(struct Character, animFallFromWater), true, LOT_NONE, 1, sizeof(s32) }, + { "animFallLandWithLightObj", LVT_S32, offsetof(struct Character, animFallLandWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animFallOverBackwards", LVT_S32, offsetof(struct Character, animFallOverBackwards), true, LOT_NONE, 1, sizeof(s32) }, + { "animFallWithLightObj", LVT_S32, offsetof(struct Character, animFallWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animFastLedgeGrab", LVT_S32, offsetof(struct Character, animFastLedgeGrab), true, LOT_NONE, 1, sizeof(s32) }, + { "animFastLongjump", LVT_S32, offsetof(struct Character, animFastLongjump), true, LOT_NONE, 1, sizeof(s32) }, + { "animFinalBowserRaiseHandSpin", LVT_S32, offsetof(struct Character, animFinalBowserRaiseHandSpin), true, LOT_NONE, 1, sizeof(s32) }, + { "animFinalBowserWingCapTakeOff", LVT_S32, offsetof(struct Character, animFinalBowserWingCapTakeOff), true, LOT_NONE, 1, sizeof(s32) }, + { "animFireLavaBurn", LVT_S32, offsetof(struct Character, animFireLavaBurn), true, LOT_NONE, 1, sizeof(s32) }, + { "animFirstPerson", LVT_S32, offsetof(struct Character, animFirstPerson), true, LOT_NONE, 1, sizeof(s32) }, + { "animFirstPunch", LVT_S32, offsetof(struct Character, animFirstPunch), true, LOT_NONE, 1, sizeof(s32) }, + { "animFirstPunchFast", LVT_S32, offsetof(struct Character, animFirstPunchFast), true, LOT_NONE, 1, sizeof(s32) }, + { "animFlutterkick", LVT_S32, offsetof(struct Character, animFlutterkick), true, LOT_NONE, 1, sizeof(s32) }, + { "animFlutterkickWithObj", LVT_S32, offsetof(struct Character, animFlutterkickWithObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animFlyFromCannon", LVT_S32, offsetof(struct Character, animFlyFromCannon), true, LOT_NONE, 1, sizeof(s32) }, + { "animForwardFlip", LVT_S32, offsetof(struct Character, animForwardFlip), true, LOT_NONE, 1, sizeof(s32) }, + { "animForwardKb", LVT_S32, offsetof(struct Character, animForwardKb), true, LOT_NONE, 1, sizeof(s32) }, + { "animForwardSpinning", LVT_S32, offsetof(struct Character, animForwardSpinning), true, LOT_NONE, 1, sizeof(s32) }, + { "animForwardSpinningFlip", LVT_S32, offsetof(struct Character, animForwardSpinningFlip), true, LOT_NONE, 1, sizeof(s32) }, + { "animGeneralFall", LVT_S32, offsetof(struct Character, animGeneralFall), true, LOT_NONE, 1, sizeof(s32) }, + { "animGeneralLand", LVT_S32, offsetof(struct Character, animGeneralLand), true, LOT_NONE, 1, sizeof(s32) }, + { "animGrabBowser", LVT_S32, offsetof(struct Character, animGrabBowser), true, LOT_NONE, 1, sizeof(s32) }, + { "animGrabHeavyObject", LVT_S32, offsetof(struct Character, animGrabHeavyObject), true, LOT_NONE, 1, sizeof(s32) }, + { "animGrabPoleShort", LVT_S32, offsetof(struct Character, animGrabPoleShort), true, LOT_NONE, 1, sizeof(s32) }, + { "animGrabPoleSwingPart1", LVT_S32, offsetof(struct Character, animGrabPoleSwingPart1), true, LOT_NONE, 1, sizeof(s32) }, + { "animGrabPoleSwingPart2", LVT_S32, offsetof(struct Character, animGrabPoleSwingPart2), true, LOT_NONE, 1, sizeof(s32) }, + { "animGroundBonk", LVT_S32, offsetof(struct Character, animGroundBonk), true, LOT_NONE, 1, sizeof(s32) }, + { "animGroundKick", LVT_S32, offsetof(struct Character, animGroundKick), true, LOT_NONE, 1, sizeof(s32) }, + { "animGroundPound", LVT_S32, offsetof(struct Character, animGroundPound), true, LOT_NONE, 1, sizeof(s32) }, + { "animGroundPoundLanding", LVT_S32, offsetof(struct Character, animGroundPoundLanding), true, LOT_NONE, 1, sizeof(s32) }, + { "animGroundThrow", LVT_S32, offsetof(struct Character, animGroundThrow), true, LOT_NONE, 1, sizeof(s32) }, + { "animHandstandIdle", LVT_S32, offsetof(struct Character, animHandstandIdle), true, LOT_NONE, 1, sizeof(s32) }, + { "animHandstandJump", LVT_S32, offsetof(struct Character, animHandstandJump), true, LOT_NONE, 1, sizeof(s32) }, + { "animHandstandLeft", LVT_S32, offsetof(struct Character, animHandstandLeft), true, LOT_NONE, 1, sizeof(s32) }, + { "animHandstandRight", LVT_S32, offsetof(struct Character, animHandstandRight), true, LOT_NONE, 1, sizeof(s32) }, + { "animHangOnCeiling", LVT_S32, offsetof(struct Character, animHangOnCeiling), true, LOT_NONE, 1, sizeof(s32) }, + { "animHangOnOwl", LVT_S32, offsetof(struct Character, animHangOnOwl), true, LOT_NONE, 1, sizeof(s32) }, + { "animHeadStuckInGround", LVT_S32, offsetof(struct Character, animHeadStuckInGround), true, LOT_NONE, 1, sizeof(s32) }, + { "animHeavyThrow", LVT_S32, offsetof(struct Character, animHeavyThrow), true, LOT_NONE, 1, sizeof(s32) }, + { "animHoldingBowser", LVT_S32, offsetof(struct Character, animHoldingBowser), true, LOT_NONE, 1, sizeof(s32) }, + { "animIdleHeadCenter", LVT_S32, offsetof(struct Character, animIdleHeadCenter), true, LOT_NONE, 1, sizeof(s32) }, + { "animIdleHeadLeft", LVT_S32, offsetof(struct Character, animIdleHeadLeft), true, LOT_NONE, 1, sizeof(s32) }, + { "animIdleHeadRight", LVT_S32, offsetof(struct Character, animIdleHeadRight), true, LOT_NONE, 1, sizeof(s32) }, + { "animIdleHeavyObj", LVT_S32, offsetof(struct Character, animIdleHeavyObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animIdleInQuicksand", LVT_S32, offsetof(struct Character, animIdleInQuicksand), true, LOT_NONE, 1, sizeof(s32) }, + { "animIdleOnLedge", LVT_S32, offsetof(struct Character, animIdleOnLedge), true, LOT_NONE, 1, sizeof(s32) }, + { "animIdleOnPole", LVT_S32, offsetof(struct Character, animIdleOnPole), true, LOT_NONE, 1, sizeof(s32) }, + { "animIdleWithLightObj", LVT_S32, offsetof(struct Character, animIdleWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animJumpLandWithLightObj", LVT_S32, offsetof(struct Character, animJumpLandWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animJumpRidingShell", LVT_S32, offsetof(struct Character, animJumpRidingShell), true, LOT_NONE, 1, sizeof(s32) }, + { "animJumpWithLightObj", LVT_S32, offsetof(struct Character, animJumpWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animLandFromDoubleJump", LVT_S32, offsetof(struct Character, animLandFromDoubleJump), true, LOT_NONE, 1, sizeof(s32) }, + { "animLandFromSingleJump", LVT_S32, offsetof(struct Character, animLandFromSingleJump), true, LOT_NONE, 1, sizeof(s32) }, + { "animLandOnStomach", LVT_S32, offsetof(struct Character, animLandOnStomach), true, LOT_NONE, 1, sizeof(s32) }, + { "animLegsStuckInGround", LVT_S32, offsetof(struct Character, animLegsStuckInGround), true, LOT_NONE, 1, sizeof(s32) }, + { "animMissingCap", LVT_S32, offsetof(struct Character, animMissingCap), true, LOT_NONE, 1, sizeof(s32) }, + { "animMoveInQuicksand", LVT_S32, offsetof(struct Character, animMoveInQuicksand), true, LOT_NONE, 1, sizeof(s32) }, + { "animMoveOnWireNetLeft", LVT_S32, offsetof(struct Character, animMoveOnWireNetLeft), true, LOT_NONE, 1, sizeof(s32) }, + { "animMoveOnWireNetRight", LVT_S32, offsetof(struct Character, animMoveOnWireNetRight), true, LOT_NONE, 1, sizeof(s32) }, + { "animOffsetEnabled", LVT_U8, offsetof(struct Character, animOffsetEnabled), true, LOT_NONE, 1, sizeof(u8) }, + { "animOffsetFeet", LVT_F32, offsetof(struct Character, animOffsetFeet), true, LOT_NONE, 1, sizeof(f32) }, + { "animOffsetHand", LVT_F32, offsetof(struct Character, animOffsetHand), true, LOT_NONE, 1, sizeof(f32) }, + { "animOffsetLowYPoint", LVT_F32, offsetof(struct Character, animOffsetLowYPoint), true, LOT_NONE, 1, sizeof(f32) }, + { "animPickUpLightObj", LVT_S32, offsetof(struct Character, animPickUpLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animPlaceLightObj", LVT_S32, offsetof(struct Character, animPlaceLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animPullDoorWalkIn", LVT_S32, offsetof(struct Character, animPullDoorWalkIn), true, LOT_NONE, 1, sizeof(s32) }, + { "animPushDoorWalkIn", LVT_S32, offsetof(struct Character, animPushDoorWalkIn), true, LOT_NONE, 1, sizeof(s32) }, + { "animPushing", LVT_S32, offsetof(struct Character, animPushing), true, LOT_NONE, 1, sizeof(s32) }, + { "animPutCapOn", LVT_S32, offsetof(struct Character, animPutCapOn), true, LOT_NONE, 1, sizeof(s32) }, + { "animQuicklyPutCapOn", LVT_S32, offsetof(struct Character, animQuicklyPutCapOn), true, LOT_NONE, 1, sizeof(s32) }, + { "animReachPocket", LVT_S32, offsetof(struct Character, animReachPocket), true, LOT_NONE, 1, sizeof(s32) }, + { "animReleaseBowser", LVT_S32, offsetof(struct Character, animReleaseBowser), true, LOT_NONE, 1, sizeof(s32) }, + { "animReturnFromHandstand", LVT_S32, offsetof(struct Character, animReturnFromHandstand), true, LOT_NONE, 1, sizeof(s32) }, + { "animReturnFromStarDance", LVT_S32, offsetof(struct Character, animReturnFromStarDance), true, LOT_NONE, 1, sizeof(s32) }, + { "animReturnFromWaterStarDance", LVT_S32, offsetof(struct Character, animReturnFromWaterStarDance), true, LOT_NONE, 1, sizeof(s32) }, + { "animReturnStarApproachDoor", LVT_S32, offsetof(struct Character, animReturnStarApproachDoor), true, LOT_NONE, 1, sizeof(s32) }, + { "animRidingShell", LVT_S32, offsetof(struct Character, animRidingShell), true, LOT_NONE, 1, sizeof(s32) }, + { "animRunWithLightObj", LVT_S32, offsetof(struct Character, animRunWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animRunning", LVT_S32, offsetof(struct Character, animRunning), true, LOT_NONE, 1, sizeof(s32) }, + { "animRunningUnused", LVT_S32, offsetof(struct Character, animRunningUnused), true, LOT_NONE, 1, sizeof(s32) }, + { "animSecondPunch", LVT_S32, offsetof(struct Character, animSecondPunch), true, LOT_NONE, 1, sizeof(s32) }, + { "animSecondPunchFast", LVT_S32, offsetof(struct Character, animSecondPunchFast), true, LOT_NONE, 1, sizeof(s32) }, + { "animShivering", LVT_S32, offsetof(struct Character, animShivering), true, LOT_NONE, 1, sizeof(s32) }, + { "animShiveringReturnToIdle", LVT_S32, offsetof(struct Character, animShiveringReturnToIdle), true, LOT_NONE, 1, sizeof(s32) }, + { "animShiveringWarmingHand", LVT_S32, offsetof(struct Character, animShiveringWarmingHand), true, LOT_NONE, 1, sizeof(s32) }, + { "animShocked", LVT_S32, offsetof(struct Character, animShocked), true, LOT_NONE, 1, sizeof(s32) }, + { "animSidestepLeft", LVT_S32, offsetof(struct Character, animSidestepLeft), true, LOT_NONE, 1, sizeof(s32) }, + { "animSidestepRight", LVT_S32, offsetof(struct Character, animSidestepRight), true, LOT_NONE, 1, sizeof(s32) }, + { "animSingleJump", LVT_S32, offsetof(struct Character, animSingleJump), true, LOT_NONE, 1, sizeof(s32) }, + { "animSkidOnGround", LVT_S32, offsetof(struct Character, animSkidOnGround), true, LOT_NONE, 1, sizeof(s32) }, + { "animSleepIdle", LVT_S32, offsetof(struct Character, animSleepIdle), true, LOT_NONE, 1, sizeof(s32) }, + { "animSleepLying", LVT_S32, offsetof(struct Character, animSleepLying), true, LOT_NONE, 1, sizeof(s32) }, + { "animSleepStartLying", LVT_S32, offsetof(struct Character, animSleepStartLying), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlide", LVT_S32, offsetof(struct Character, animSlide), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlideDive", LVT_S32, offsetof(struct Character, animSlideDive), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlideKick", LVT_S32, offsetof(struct Character, animSlideKick), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlideMotionless", LVT_S32, offsetof(struct Character, animSlideMotionless), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlideflip", LVT_S32, offsetof(struct Character, animSlideflip), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlideflipLand", LVT_S32, offsetof(struct Character, animSlideflipLand), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlidejump", LVT_S32, offsetof(struct Character, animSlidejump), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlidingOnBottomWithLightObj", LVT_S32, offsetof(struct Character, animSlidingOnBottomWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlowLandFromDive", LVT_S32, offsetof(struct Character, animSlowLandFromDive), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlowLedgeGrab", LVT_S32, offsetof(struct Character, animSlowLedgeGrab), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlowLongjump", LVT_S32, offsetof(struct Character, animSlowLongjump), true, LOT_NONE, 1, sizeof(s32) }, + { "animSlowWalkWithLightObj", LVT_S32, offsetof(struct Character, animSlowWalkWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animSoftBackKb", LVT_S32, offsetof(struct Character, animSoftBackKb), true, LOT_NONE, 1, sizeof(s32) }, + { "animSoftFrontKb", LVT_S32, offsetof(struct Character, animSoftFrontKb), true, LOT_NONE, 1, sizeof(s32) }, + { "animStandAgainstWall", LVT_S32, offsetof(struct Character, animStandAgainstWall), true, LOT_NONE, 1, sizeof(s32) }, + { "animStandUpFromLavaBoost", LVT_S32, offsetof(struct Character, animStandUpFromLavaBoost), true, LOT_NONE, 1, sizeof(s32) }, + { "animStandUpFromSlidingWithLightObj", LVT_S32, offsetof(struct Character, animStandUpFromSlidingWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animStarDance", LVT_S32, offsetof(struct Character, animStarDance), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartCrawling", LVT_S32, offsetof(struct Character, animStartCrawling), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartCrouching", LVT_S32, offsetof(struct Character, animStartCrouching), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartForwardSpinning", LVT_S32, offsetof(struct Character, animStartForwardSpinning), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartGroundPound", LVT_S32, offsetof(struct Character, animStartGroundPound), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartHandstand", LVT_S32, offsetof(struct Character, animStartHandstand), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartReachPocket", LVT_S32, offsetof(struct Character, animStartReachPocket), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartRidingShell", LVT_S32, offsetof(struct Character, animStartRidingShell), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartSleepIdle", LVT_S32, offsetof(struct Character, animStartSleepIdle), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartSleepScratch", LVT_S32, offsetof(struct Character, animStartSleepScratch), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartSleepSitting", LVT_S32, offsetof(struct Character, animStartSleepSitting), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartSleepYawn", LVT_S32, offsetof(struct Character, animStartSleepYawn), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartTiptoe", LVT_S32, offsetof(struct Character, animStartTiptoe), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartTwirl", LVT_S32, offsetof(struct Character, animStartTwirl), true, LOT_NONE, 1, sizeof(s32) }, + { "animStartWallkick", LVT_S32, offsetof(struct Character, animStartWallkick), true, LOT_NONE, 1, sizeof(s32) }, + { "animStopCrawling", LVT_S32, offsetof(struct Character, animStopCrawling), true, LOT_NONE, 1, sizeof(s32) }, + { "animStopCrouching", LVT_S32, offsetof(struct Character, animStopCrouching), true, LOT_NONE, 1, sizeof(s32) }, + { "animStopGrabObjWater", LVT_S32, offsetof(struct Character, animStopGrabObjWater), true, LOT_NONE, 1, sizeof(s32) }, + { "animStopReachPocket", LVT_S32, offsetof(struct Character, animStopReachPocket), true, LOT_NONE, 1, sizeof(s32) }, + { "animStopSkid", LVT_S32, offsetof(struct Character, animStopSkid), true, LOT_NONE, 1, sizeof(s32) }, + { "animStopSlide", LVT_S32, offsetof(struct Character, animStopSlide), true, LOT_NONE, 1, sizeof(s32) }, + { "animStopSlideLightObj", LVT_S32, offsetof(struct Character, animStopSlideLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animSuffocating", LVT_S32, offsetof(struct Character, animSuffocating), true, LOT_NONE, 1, sizeof(s32) }, + { "animSummonStar", LVT_S32, offsetof(struct Character, animSummonStar), true, LOT_NONE, 1, sizeof(s32) }, + { "animSwimPart1", LVT_S32, offsetof(struct Character, animSwimPart1), true, LOT_NONE, 1, sizeof(s32) }, + { "animSwimPart2", LVT_S32, offsetof(struct Character, animSwimPart2), true, LOT_NONE, 1, sizeof(s32) }, + { "animSwimWithObjPart1", LVT_S32, offsetof(struct Character, animSwimWithObjPart1), true, LOT_NONE, 1, sizeof(s32) }, + { "animSwimWithObjPart2", LVT_S32, offsetof(struct Character, animSwimWithObjPart2), true, LOT_NONE, 1, sizeof(s32) }, + { "animSwingingBowser", LVT_S32, offsetof(struct Character, animSwingingBowser), true, LOT_NONE, 1, sizeof(s32) }, + { "animTakeCapOffThenOn", LVT_S32, offsetof(struct Character, animTakeCapOffThenOn), true, LOT_NONE, 1, sizeof(s32) }, + { "animThrowCatchKey", LVT_S32, offsetof(struct Character, animThrowCatchKey), true, LOT_NONE, 1, sizeof(s32) }, + { "animThrowLightObject", LVT_S32, offsetof(struct Character, animThrowLightObject), true, LOT_NONE, 1, sizeof(s32) }, + { "animTiptoe", LVT_S32, offsetof(struct Character, animTiptoe), true, LOT_NONE, 1, sizeof(s32) }, + { "animTripleJump", LVT_S32, offsetof(struct Character, animTripleJump), true, LOT_NONE, 1, sizeof(s32) }, + { "animTripleJumpFly", LVT_S32, offsetof(struct Character, animTripleJumpFly), true, LOT_NONE, 1, sizeof(s32) }, + { "animTripleJumpGroundPound", LVT_S32, offsetof(struct Character, animTripleJumpGroundPound), true, LOT_NONE, 1, sizeof(s32) }, + { "animTripleJumpLand", LVT_S32, offsetof(struct Character, animTripleJumpLand), true, LOT_NONE, 1, sizeof(s32) }, + { "animTurningPart1", LVT_S32, offsetof(struct Character, animTurningPart1), true, LOT_NONE, 1, sizeof(s32) }, + { "animTurningPart2", LVT_S32, offsetof(struct Character, animTurningPart2), true, LOT_NONE, 1, sizeof(s32) }, + { "animTwirl", LVT_S32, offsetof(struct Character, animTwirl), true, LOT_NONE, 1, sizeof(s32) }, + { "animTwirlLand", LVT_S32, offsetof(struct Character, animTwirlLand), true, LOT_NONE, 1, sizeof(s32) }, + { "animUnlockDoor", LVT_S32, offsetof(struct Character, animUnlockDoor), true, LOT_NONE, 1, sizeof(s32) }, + { "animWakeFromLying", LVT_S32, offsetof(struct Character, animWakeFromLying), true, LOT_NONE, 1, sizeof(s32) }, + { "animWakeFromSleep", LVT_S32, offsetof(struct Character, animWakeFromSleep), true, LOT_NONE, 1, sizeof(s32) }, + { "animWalkPanting", LVT_S32, offsetof(struct Character, animWalkPanting), true, LOT_NONE, 1, sizeof(s32) }, + { "animWalkWithHeavyObj", LVT_S32, offsetof(struct Character, animWalkWithHeavyObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animWalkWithLightObj", LVT_S32, offsetof(struct Character, animWalkWithLightObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animWalking", LVT_S32, offsetof(struct Character, animWalking), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterActionEnd", LVT_S32, offsetof(struct Character, animWaterActionEnd), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterActionEndWithObj", LVT_S32, offsetof(struct Character, animWaterActionEndWithObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterDying", LVT_S32, offsetof(struct Character, animWaterDying), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterForwardKb", LVT_S32, offsetof(struct Character, animWaterForwardKb), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterGrabObjPart1", LVT_S32, offsetof(struct Character, animWaterGrabObjPart1), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterGrabObjPart2", LVT_S32, offsetof(struct Character, animWaterGrabObjPart2), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterIdle", LVT_S32, offsetof(struct Character, animWaterIdle), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterIdleWithObj", LVT_S32, offsetof(struct Character, animWaterIdleWithObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterPickUpObj", LVT_S32, offsetof(struct Character, animWaterPickUpObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterStarDance", LVT_S32, offsetof(struct Character, animWaterStarDance), true, LOT_NONE, 1, sizeof(s32) }, + { "animWaterThrowObj", LVT_S32, offsetof(struct Character, animWaterThrowObj), true, LOT_NONE, 1, sizeof(s32) }, + { "animWingCapFly", LVT_S32, offsetof(struct Character, animWingCapFly), true, LOT_NONE, 1, sizeof(s32) }, + { "anims", LVT_S32, offsetof(struct Character, anims), true, LOT_NONE, CHAR_ANIM_MAX, sizeof(s32) }, + { "cameraHudHead", LVT_U32, offsetof(struct Character, cameraHudHead), true, LOT_NONE, 1, sizeof(u32) }, + { "capEnemyDecalGfx", LVT_COBJECT_P, offsetof(struct Character, capEnemyDecalGfx), true, LOT_GFX, 1, sizeof(Gfx*) }, + { "capEnemyGfx", LVT_COBJECT_P, offsetof(struct Character, capEnemyGfx), true, LOT_GFX, 1, sizeof(Gfx*) }, + { "capEnemyLayer", LVT_U8, offsetof(struct Character, capEnemyLayer), true, LOT_NONE, 1, sizeof(u8) }, + { "capMetalModelId", LVT_U32, offsetof(struct Character, capMetalModelId), true, LOT_NONE, 1, sizeof(u32) }, + { "capMetalWingModelId", LVT_U32, offsetof(struct Character, capMetalWingModelId), true, LOT_NONE, 1, sizeof(u32) }, + { "capModelId", LVT_U32, offsetof(struct Character, capModelId), true, LOT_NONE, 1, sizeof(u32) }, + { "capWingModelId", LVT_U32, offsetof(struct Character, capWingModelId), true, LOT_NONE, 1, sizeof(u32) }, + { "hudHead", LVT_U8, offsetof(struct Character, hudHead), true, LOT_NONE, 1, sizeof(char) }, + { "hudHeadTexture", LVT_COBJECT, offsetof(struct Character, hudHeadTexture), true, LOT_TEXTUREINFO, 1, sizeof(struct TextureInfo) }, + { "modelId", LVT_U32, offsetof(struct Character, modelId), true, LOT_NONE, 1, sizeof(u32) }, + { "name", LVT_STRING_P, offsetof(struct Character, name), true, LOT_NONE, 1, sizeof(char*) }, + { "soundAttacked", LVT_S32, offsetof(struct Character, soundAttacked), true, LOT_NONE, 1, sizeof(s32) }, + { "soundCoughing1", LVT_S32, offsetof(struct Character, soundCoughing1), true, LOT_NONE, 1, sizeof(s32) }, + { "soundCoughing2", LVT_S32, offsetof(struct Character, soundCoughing2), true, LOT_NONE, 1, sizeof(s32) }, + { "soundCoughing3", LVT_S32, offsetof(struct Character, soundCoughing3), true, LOT_NONE, 1, sizeof(s32) }, + { "soundDoh", LVT_S32, offsetof(struct Character, soundDoh), true, LOT_NONE, 1, sizeof(s32) }, + { "soundDrowning", LVT_S32, offsetof(struct Character, soundDrowning), true, LOT_NONE, 1, sizeof(s32) }, + { "soundDying", LVT_S32, offsetof(struct Character, soundDying), true, LOT_NONE, 1, sizeof(s32) }, + { "soundEeuh", LVT_S32, offsetof(struct Character, soundEeuh), true, LOT_NONE, 1, sizeof(s32) }, + { "soundFreqScale", LVT_F32, offsetof(struct Character, soundFreqScale), true, LOT_NONE, 1, sizeof(f32) }, + { "soundGameOver", LVT_S32, offsetof(struct Character, soundGameOver), true, LOT_NONE, 1, sizeof(s32) }, + { "soundGroundPoundWah", LVT_S32, offsetof(struct Character, soundGroundPoundWah), true, LOT_NONE, 1, sizeof(s32) }, + { "soundHaha", LVT_S32, offsetof(struct Character, soundHaha), true, LOT_NONE, 1, sizeof(s32) }, + { "soundHaha_2", LVT_S32, offsetof(struct Character, soundHaha_2), true, LOT_NONE, 1, sizeof(s32) }, + { "soundHello", LVT_S32, offsetof(struct Character, soundHello), true, LOT_NONE, 1, sizeof(s32) }, + { "soundHereWeGo", LVT_S32, offsetof(struct Character, soundHereWeGo), true, LOT_NONE, 1, sizeof(s32) }, + { "soundHoohoo", LVT_S32, offsetof(struct Character, soundHoohoo), true, LOT_NONE, 1, sizeof(s32) }, + { "soundHrmm", LVT_S32, offsetof(struct Character, soundHrmm), true, LOT_NONE, 1, sizeof(s32) }, + { "soundImaTired", LVT_S32, offsetof(struct Character, soundImaTired), true, LOT_NONE, 1, sizeof(s32) }, + { "soundLetsAGo", LVT_S32, offsetof(struct Character, soundLetsAGo), true, LOT_NONE, 1, sizeof(s32) }, + { "soundMamaMia", LVT_S32, offsetof(struct Character, soundMamaMia), true, LOT_NONE, 1, sizeof(s32) }, + { "soundOkeyDokey", LVT_S32, offsetof(struct Character, soundOkeyDokey), true, LOT_NONE, 1, sizeof(s32) }, + { "soundOnFire", LVT_S32, offsetof(struct Character, soundOnFire), true, LOT_NONE, 1, sizeof(s32) }, + { "soundOoof", LVT_S32, offsetof(struct Character, soundOoof), true, LOT_NONE, 1, sizeof(s32) }, + { "soundOoof2", LVT_S32, offsetof(struct Character, soundOoof2), true, LOT_NONE, 1, sizeof(s32) }, + { "soundPanting", LVT_S32, offsetof(struct Character, soundPanting), true, LOT_NONE, 1, sizeof(s32) }, + { "soundPantingCold", LVT_S32, offsetof(struct Character, soundPantingCold), true, LOT_NONE, 1, sizeof(s32) }, + { "soundPressStartToPlay", LVT_S32, offsetof(struct Character, soundPressStartToPlay), true, LOT_NONE, 1, sizeof(s32) }, + { "soundPunchHoo", LVT_S32, offsetof(struct Character, soundPunchHoo), true, LOT_NONE, 1, sizeof(s32) }, + { "soundPunchWah", LVT_S32, offsetof(struct Character, soundPunchWah), true, LOT_NONE, 1, sizeof(s32) }, + { "soundPunchYah", LVT_S32, offsetof(struct Character, soundPunchYah), true, LOT_NONE, 1, sizeof(s32) }, + { "soundSnoring1", LVT_S32, offsetof(struct Character, soundSnoring1), true, LOT_NONE, 1, sizeof(s32) }, + { "soundSnoring2", LVT_S32, offsetof(struct Character, soundSnoring2), true, LOT_NONE, 1, sizeof(s32) }, + { "soundSnoring3", LVT_S32, offsetof(struct Character, soundSnoring3), true, LOT_NONE, 1, sizeof(s32) }, + { "soundSoLongaBowser", LVT_S32, offsetof(struct Character, soundSoLongaBowser), true, LOT_NONE, 1, sizeof(s32) }, + { "soundTwirlBounce", LVT_S32, offsetof(struct Character, soundTwirlBounce), true, LOT_NONE, 1, sizeof(s32) }, + { "soundUh", LVT_S32, offsetof(struct Character, soundUh), true, LOT_NONE, 1, sizeof(s32) }, + { "soundUh2", LVT_S32, offsetof(struct Character, soundUh2), true, LOT_NONE, 1, sizeof(s32) }, + { "soundUh2_2", LVT_S32, offsetof(struct Character, soundUh2_2), true, LOT_NONE, 1, sizeof(s32) }, + { "soundWaaaooow", LVT_S32, offsetof(struct Character, soundWaaaooow), true, LOT_NONE, 1, sizeof(s32) }, + { "soundWah2", LVT_S32, offsetof(struct Character, soundWah2), true, LOT_NONE, 1, sizeof(s32) }, + { "soundWhoa", LVT_S32, offsetof(struct Character, soundWhoa), true, LOT_NONE, 1, sizeof(s32) }, + { "soundYahWahHoo", LVT_S32, offsetof(struct Character, soundYahWahHoo), true, LOT_NONE, 1, sizeof(s32) }, + { "soundYahoo", LVT_S32, offsetof(struct Character, soundYahoo), true, LOT_NONE, 1, sizeof(s32) }, + { "soundYahooWahaYippee", LVT_S32, offsetof(struct Character, soundYahooWahaYippee), true, LOT_NONE, 1, sizeof(s32) }, + { "soundYawning", LVT_S32, offsetof(struct Character, soundYawning), true, LOT_NONE, 1, sizeof(s32) }, + { "sounds", LVT_S32, offsetof(struct Character, sounds), true, LOT_NONE, CHAR_SOUND_MAX, sizeof(s32) }, + { "torsoRotMult", LVT_F32, offsetof(struct Character, torsoRotMult), true, LOT_NONE, 1, sizeof(f32) }, + { "type", LVT_S32, offsetof(struct Character, type), true, LOT_NONE, 1, sizeof(enum CharacterType) }, }; #define LUA_CONTROLLER_FIELD_COUNT 11 @@ -771,28 +716,6 @@ static struct LuaObjectField sCustomLevelInfoFields[LUA_CUSTOM_LEVEL_INFO_FIELD_ { "shortName", LVT_STRING_P, offsetof(struct CustomLevelInfo, shortName), true, LOT_NONE, 1, sizeof(char*) }, }; -#define LUA_CUTSCENE_FIELD_COUNT 1 -static struct LuaObjectField sCutsceneFields[LUA_CUTSCENE_FIELD_COUNT] = { - { "duration", LVT_S16, offsetof(struct Cutscene, duration), false, LOT_NONE, 1, sizeof(s16) }, -// { "shot", LVT_???, offsetof(struct Cutscene, shot), false, LOT_???, 1, sizeof(CutsceneShot) }, <--- 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, 1, sizeof(s8) }, - { "point", LVT_COBJECT, offsetof(struct CutsceneSplinePoint, point), true, LOT_VEC3S, 1, sizeof(Vec3s) }, - { "speed", LVT_U8, offsetof(struct CutsceneSplinePoint, speed), false, LOT_NONE, 1, sizeof(u8) }, -}; - -#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, 1, sizeof(Vec3s) }, - { "point", LVT_COBJECT, offsetof(struct CutsceneVariable, point), true, LOT_VEC3F, 1, sizeof(Vec3f) }, - { "unused1", LVT_S32, offsetof(struct CutsceneVariable, unused1), false, LOT_NONE, 1, sizeof(s32) }, - { "unused2", LVT_S16, offsetof(struct CutsceneVariable, unused2), false, LOT_NONE, 1, sizeof(s16) }, - { "unusedPoint", LVT_COBJECT, offsetof(struct CutsceneVariable, unusedPoint), true, LOT_VEC3F, 1, sizeof(Vec3f) }, -}; - #define LUA_DATE_TIME_FIELD_COUNT 6 static struct LuaObjectField sDateTimeFields[LUA_DATE_TIME_FIELD_COUNT] = { { "day", LVT_S32, offsetof(struct DateTime, day), false, LOT_NONE, 1, sizeof(s32) }, @@ -884,15 +807,6 @@ static struct LuaObjectField sFirstPersonCameraFields[LUA_FIRST_PERSON_CAMERA_FI { "yaw", LVT_S16, offsetof(struct FirstPersonCamera, yaw), false, LOT_NONE, 1, sizeof(s16) }, }; -#define LUA_FLOOR_GEOMETRY_FIELD_COUNT 5 -static struct LuaObjectField sFloorGeometryFields[LUA_FLOOR_GEOMETRY_FIELD_COUNT] = { - { "normalX", LVT_F32, offsetof(struct FloorGeometry, normalX), false, LOT_NONE, 1, sizeof(f32) }, - { "normalY", LVT_F32, offsetof(struct FloorGeometry, normalY), false, LOT_NONE, 1, sizeof(f32) }, - { "normalZ", LVT_F32, offsetof(struct FloorGeometry, normalZ), false, LOT_NONE, 1, sizeof(f32) }, - { "originOffset", LVT_F32, offsetof(struct FloorGeometry, originOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "unused", LVT_F32, offsetof(struct FloorGeometry, unused), false, LOT_NONE, 4, sizeof(f32) }, -}; - #define LUA_FN_GRAPH_NODE_FIELD_COUNT 1 static struct LuaObjectField sFnGraphNodeFields[LUA_FN_GRAPH_NODE_FIELD_COUNT] = { // { "func", LVT_???, offsetof(struct FnGraphNode, func), false, LOT_???, 1, sizeof(GraphNodeFunc) }, <--- UNIMPLEMENTED @@ -1187,9 +1101,7 @@ static struct LuaObjectField sGraphNodeLevelOfDetailFields[LUA_GRAPH_NODE_LEVEL_ #define LUA_GRAPH_NODE_MASTER_LIST_FIELD_COUNT 1 static struct LuaObjectField sGraphNodeMasterListFields[LUA_GRAPH_NODE_MASTER_LIST_FIELD_COUNT] = { -// { "listHeads", LVT_???, offsetof(struct GraphNodeMasterList, listHeads), false, LOT_???, 1, sizeof(struct DisplayListNode*) }, <--- UNIMPLEMENTED -// { "listTails", LVT_???, offsetof(struct GraphNodeMasterList, listTails), false, LOT_???, 1, sizeof(struct DisplayListNode*) }, <--- UNIMPLEMENTED - { "node", LVT_COBJECT, offsetof(struct GraphNodeMasterList, node), true, LOT_GRAPHNODE, 1, sizeof(struct GraphNode) }, + { "node", LVT_COBJECT, offsetof(struct GraphNodeMasterList, node), true, LOT_GRAPHNODE, 1, sizeof(struct GraphNode) }, }; #define LUA_GRAPH_NODE_OBJECT_FIELD_COUNT 27 @@ -1315,24 +1227,6 @@ static struct LuaObjectField sGraphNodeTranslationRotationFields[LUA_GRAPH_NODE_ { "translation", LVT_COBJECT, offsetof(struct GraphNodeTranslationRotation, translation), true, LOT_VEC3S, 1, sizeof(Vec3s) }, }; -#define LUA_GRAPH_NODE_802_A45_E4_FIELD_COUNT 6 -static struct LuaObjectField sGraphNode_802A45E4Fields[LUA_GRAPH_NODE_802_A45_E4_FIELD_COUNT] = { -// { "0x00]", LVT_???, offsetof(struct GraphNode_802A45E4, 0x00]), false, LOT_???, 1, sizeof(s8 filler0[0x18 -) }, <--- UNIMPLEMENTED - { "unk18", LVT_S16, offsetof(struct GraphNode_802A45E4, unk18), false, LOT_NONE, 1, sizeof(s16) }, - { "unk1A", LVT_S16, offsetof(struct GraphNode_802A45E4, unk1A), false, LOT_NONE, 1, sizeof(s16) }, - { "unk1C", LVT_S16, offsetof(struct GraphNode_802A45E4, unk1C), false, LOT_NONE, 1, sizeof(s16) }, - { "unk1E", LVT_S16, offsetof(struct GraphNode_802A45E4, unk1E), false, LOT_NONE, 1, sizeof(s16) }, - { "unk20", LVT_S16, offsetof(struct GraphNode_802A45E4, unk20), false, LOT_NONE, 1, sizeof(s16) }, - { "unk22", LVT_S16, offsetof(struct GraphNode_802A45E4, unk22), false, LOT_NONE, 1, sizeof(s16) }, -}; - -#define LUA_HANDHELD_SHAKE_POINT_FIELD_COUNT 3 -static struct LuaObjectField sHandheldShakePointFields[LUA_HANDHELD_SHAKE_POINT_FIELD_COUNT] = { - { "index", LVT_S8, offsetof(struct HandheldShakePoint, index), false, LOT_NONE, 1, sizeof(s8) }, - { "pad", LVT_U32, offsetof(struct HandheldShakePoint, pad), false, LOT_NONE, 1, sizeof(u32) }, - { "point", LVT_COBJECT, offsetof(struct HandheldShakePoint, point), true, LOT_VEC3S, 1, sizeof(Vec3s) }, -}; - #define LUA_HUD_UTILS_ROTATION_FIELD_COUNT 6 static struct LuaObjectField sHudUtilsRotationFields[LUA_HUD_UTILS_ROTATION_FIELD_COUNT] = { { "pivotX", LVT_F32, offsetof(struct HudUtilsRotation, pivotX), false, LOT_NONE, 1, sizeof(f32) }, @@ -1452,15 +1346,6 @@ static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] = { "zoomOutCameraOnPause", LVT_U8, offsetof(struct LevelValues, zoomOutCameraOnPause), false, LOT_NONE, 1, sizeof(u8) }, }; -#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, 1, sizeof(f32) }, - { "focus", LVT_COBJECT, offsetof(struct LinearTransitionPoint, focus), true, LOT_VEC3F, 1, sizeof(Vec3f) }, - { "pitch", LVT_S16, offsetof(struct LinearTransitionPoint, pitch), false, LOT_NONE, 1, sizeof(s16) }, - { "pos", LVT_COBJECT, offsetof(struct LinearTransitionPoint, pos), true, LOT_VEC3F, 1, sizeof(Vec3f) }, - { "yaw", LVT_S16, offsetof(struct LinearTransitionPoint, yaw), false, LOT_NONE, 1, sizeof(s16) }, -}; - #define LUA_MARIO_ANIMATION_FIELD_COUNT 2 static struct LuaObjectField sMarioAnimationFields[LUA_MARIO_ANIMATION_FIELD_COUNT] = { // { "animDmaTable", LVT_COBJECT_P, offsetof(struct MarioAnimation, animDmaTable), true, LOT_???, 1, sizeof(struct MarioAnimDmaRelatedThing*) }, <--- UNIMPLEMENTED @@ -1468,36 +1353,36 @@ static struct LuaObjectField sMarioAnimationFields[LUA_MARIO_ANIMATION_FIELD_COU { "targetAnim", LVT_COBJECT_P, offsetof(struct MarioAnimation, targetAnim), false, LOT_ANIMATION, 1, sizeof(struct Animation*) }, }; -#define LUA_MARIO_BODY_STATE_FIELD_COUNT 27 +#define LUA_MARIO_BODY_STATE_FIELD_COUNT 28 static struct LuaObjectField sMarioBodyStateFields[LUA_MARIO_BODY_STATE_FIELD_COUNT] = { - { "action", LVT_U32, offsetof(struct MarioBodyState, action), false, LOT_NONE, 1, sizeof(u32) }, - { "allowPartRotation", LVT_U8, offsetof(struct MarioBodyState, allowPartRotation), false, LOT_NONE, 1, sizeof(u8) }, -// { "animPartsPos", LVT_???, offsetof(struct MarioBodyState, animPartsPos), true, LOT_???, 1, sizeof(Vec3f) }, <--- UNIMPLEMENTED - { "capState", LVT_S8, offsetof(struct MarioBodyState, capState), false, LOT_NONE, 1, sizeof(s8) }, - { "currAnimPart", LVT_U32, offsetof(struct MarioBodyState, currAnimPart), true, LOT_NONE, 1, sizeof(u32) }, - { "eyeState", LVT_S8, offsetof(struct MarioBodyState, eyeState), false, LOT_NONE, 1, sizeof(s8) }, - { "grabPos", LVT_S8, offsetof(struct MarioBodyState, grabPos), false, LOT_NONE, 1, sizeof(s8) }, - { "handState", LVT_S8, offsetof(struct MarioBodyState, handState), false, LOT_NONE, 1, sizeof(s8) }, - { "headAngle", LVT_COBJECT, offsetof(struct MarioBodyState, headAngle), true, LOT_VEC3S, 1, sizeof(Vec3s) }, - { "headPos", LVT_COBJECT, offsetof(struct MarioBodyState, headPos), true, LOT_VEC3F, 1, sizeof(Vec3f) }, - { "heldObjLastPosition", LVT_COBJECT, offsetof(struct MarioBodyState, heldObjLastPosition), true, LOT_VEC3F, 1, sizeof(Vec3f) }, - { "lightB", LVT_U16, offsetof(struct MarioBodyState, lightB), false, LOT_NONE, 1, sizeof(u16) }, - { "lightG", LVT_U16, offsetof(struct MarioBodyState, lightG), false, LOT_NONE, 1, sizeof(u16) }, - { "lightR", LVT_U16, offsetof(struct MarioBodyState, lightR), false, LOT_NONE, 1, sizeof(u16) }, - { "lightingDirX", LVT_F32, offsetof(struct MarioBodyState, lightingDirX), false, LOT_NONE, 1, sizeof(f32) }, - { "lightingDirY", LVT_F32, offsetof(struct MarioBodyState, lightingDirY), false, LOT_NONE, 1, sizeof(f32) }, - { "lightingDirZ", LVT_F32, offsetof(struct MarioBodyState, lightingDirZ), false, LOT_NONE, 1, sizeof(f32) }, - { "mirrorMario", LVT_BOOL, offsetof(struct MarioBodyState, mirrorMario), false, LOT_NONE, 1, sizeof(bool) }, - { "modelState", LVT_S16, offsetof(struct MarioBodyState, modelState), false, LOT_NONE, 1, sizeof(s16) }, - { "punchState", LVT_U8, offsetof(struct MarioBodyState, punchState), false, LOT_NONE, 1, sizeof(u8) }, - { "shadeB", LVT_U16, offsetof(struct MarioBodyState, shadeB), false, LOT_NONE, 1, sizeof(u16) }, - { "shadeG", LVT_U16, offsetof(struct MarioBodyState, shadeG), false, LOT_NONE, 1, sizeof(u16) }, - { "shadeR", LVT_U16, offsetof(struct MarioBodyState, shadeR), false, LOT_NONE, 1, sizeof(u16) }, - { "torsoAngle", LVT_COBJECT, offsetof(struct MarioBodyState, torsoAngle), true, LOT_VEC3S, 1, sizeof(Vec3s) }, - { "torsoPos", LVT_COBJECT, offsetof(struct MarioBodyState, torsoPos), true, LOT_VEC3F, 1, sizeof(Vec3f) }, - { "updateHeadPosTime", LVT_U32, offsetof(struct MarioBodyState, updateHeadPosTime), true, LOT_NONE, 1, sizeof(u32) }, - { "updateTorsoTime", LVT_U32, offsetof(struct MarioBodyState, updateTorsoTime), true, LOT_NONE, 1, sizeof(u32) }, - { "wingFlutter", LVT_S8, offsetof(struct MarioBodyState, wingFlutter), false, LOT_NONE, 1, sizeof(s8) }, + { "action", LVT_U32, offsetof(struct MarioBodyState, action), false, LOT_NONE, 1, sizeof(u32) }, + { "allowPartRotation", LVT_U8, offsetof(struct MarioBodyState, allowPartRotation), false, LOT_NONE, 1, sizeof(u8) }, + { "animPartsPos", LVT_COBJECT, offsetof(struct MarioBodyState, animPartsPos), true, LOT_VEC3F, MARIO_ANIM_PART_MAX, sizeof(Vec3f) }, + { "capState", LVT_S8, offsetof(struct MarioBodyState, capState), false, LOT_NONE, 1, sizeof(s8) }, + { "currAnimPart", LVT_U32, offsetof(struct MarioBodyState, currAnimPart), true, LOT_NONE, 1, sizeof(u32) }, + { "eyeState", LVT_S8, offsetof(struct MarioBodyState, eyeState), false, LOT_NONE, 1, sizeof(s8) }, + { "grabPos", LVT_S8, offsetof(struct MarioBodyState, grabPos), false, LOT_NONE, 1, sizeof(s8) }, + { "handState", LVT_S8, offsetof(struct MarioBodyState, handState), false, LOT_NONE, 1, sizeof(s8) }, + { "headAngle", LVT_COBJECT, offsetof(struct MarioBodyState, headAngle), true, LOT_VEC3S, 1, sizeof(Vec3s) }, + { "headPos", LVT_COBJECT, offsetof(struct MarioBodyState, headPos), true, LOT_VEC3F, 1, sizeof(Vec3f) }, + { "heldObjLastPosition", LVT_COBJECT, offsetof(struct MarioBodyState, heldObjLastPosition), true, LOT_VEC3F, 1, sizeof(Vec3f) }, + { "lightB", LVT_U16, offsetof(struct MarioBodyState, lightB), false, LOT_NONE, 1, sizeof(u16) }, + { "lightG", LVT_U16, offsetof(struct MarioBodyState, lightG), false, LOT_NONE, 1, sizeof(u16) }, + { "lightR", LVT_U16, offsetof(struct MarioBodyState, lightR), false, LOT_NONE, 1, sizeof(u16) }, + { "lightingDirX", LVT_F32, offsetof(struct MarioBodyState, lightingDirX), false, LOT_NONE, 1, sizeof(f32) }, + { "lightingDirY", LVT_F32, offsetof(struct MarioBodyState, lightingDirY), false, LOT_NONE, 1, sizeof(f32) }, + { "lightingDirZ", LVT_F32, offsetof(struct MarioBodyState, lightingDirZ), false, LOT_NONE, 1, sizeof(f32) }, + { "mirrorMario", LVT_BOOL, offsetof(struct MarioBodyState, mirrorMario), false, LOT_NONE, 1, sizeof(bool) }, + { "modelState", LVT_S16, offsetof(struct MarioBodyState, modelState), false, LOT_NONE, 1, sizeof(s16) }, + { "punchState", LVT_U8, offsetof(struct MarioBodyState, punchState), false, LOT_NONE, 1, sizeof(u8) }, + { "shadeB", LVT_U16, offsetof(struct MarioBodyState, shadeB), false, LOT_NONE, 1, sizeof(u16) }, + { "shadeG", LVT_U16, offsetof(struct MarioBodyState, shadeG), false, LOT_NONE, 1, sizeof(u16) }, + { "shadeR", LVT_U16, offsetof(struct MarioBodyState, shadeR), false, LOT_NONE, 1, sizeof(u16) }, + { "torsoAngle", LVT_COBJECT, offsetof(struct MarioBodyState, torsoAngle), true, LOT_VEC3S, 1, sizeof(Vec3s) }, + { "torsoPos", LVT_COBJECT, offsetof(struct MarioBodyState, torsoPos), true, LOT_VEC3F, 1, sizeof(Vec3f) }, + { "updateHeadPosTime", LVT_U32, offsetof(struct MarioBodyState, updateHeadPosTime), true, LOT_NONE, 1, sizeof(u32) }, + { "updateTorsoTime", LVT_U32, offsetof(struct MarioBodyState, updateTorsoTime), true, LOT_NONE, 1, sizeof(u32) }, + { "wingFlutter", LVT_S8, offsetof(struct MarioBodyState, wingFlutter), false, LOT_NONE, 1, sizeof(s8) }, }; #define LUA_MARIO_STATE_FIELD_COUNT 80 @@ -1584,7 +1469,7 @@ static struct LuaObjectField sMarioStateFields[LUA_MARIO_STATE_FIELD_COUNT] = { { "waterLevel", LVT_S16, offsetof(struct MarioState, waterLevel), false, LOT_NONE, 1, sizeof(s16) }, }; -#define LUA_MOD_FIELD_COUNT 16 +#define LUA_MOD_FIELD_COUNT 17 static struct LuaObjectField sModFields[LUA_MOD_FIELD_COUNT] = { { "basePath", LVT_STRING, offsetof(struct Mod, basePath), true, LOT_NONE, 1, sizeof(char) }, { "category", LVT_STRING_P, offsetof(struct Mod, category), true, LOT_NONE, 1, sizeof(char*) }, @@ -1602,65 +1487,94 @@ static struct LuaObjectField sModFields[LUA_MOD_FIELD_COUNT] = { { "relativePath", LVT_STRING, offsetof(struct Mod, relativePath), true, LOT_NONE, 1, sizeof(char) }, { "renderBehindHud", LVT_BOOL, offsetof(struct Mod, renderBehindHud), true, LOT_NONE, 1, sizeof(bool) }, { "selectable", LVT_BOOL, offsetof(struct Mod, selectable), true, LOT_NONE, 1, sizeof(bool) }, -// { "size", LVT_???, offsetof(struct Mod, size), true, LOT_???, 1, sizeof(size_t) }, <--- UNIMPLEMENTED + { "size", LVT_U64, offsetof(struct Mod, size), true, LOT_NONE, 1, sizeof(size_t) }, }; #define LUA_MOD_AUDIO_FIELD_COUNT 4 static struct LuaObjectField sModAudioFields[LUA_MOD_AUDIO_FIELD_COUNT] = { - { "baseVolume", LVT_F32, offsetof(struct ModAudio, baseVolume), false, LOT_NONE, 1, sizeof(f32) }, - { "file", LVT_COBJECT_P, offsetof(struct ModAudio, file), false, LOT_MODFILE, 1, sizeof(struct ModFile*) }, - { "isStream", LVT_BOOL, offsetof(struct ModAudio, isStream), true, LOT_NONE, 1, sizeof(bool) }, - { "loaded", LVT_BOOL, offsetof(struct ModAudio, loaded), true, LOT_NONE, 1, sizeof(bool) }, + { "baseVolume", LVT_F32, offsetof(struct ModAudio, baseVolume), false, LOT_NONE, 1, sizeof(f32) }, + { "filepath", LVT_STRING_P, offsetof(struct ModAudio, filepath), true, LOT_NONE, 1, sizeof(const char*) }, + { "isStream", LVT_BOOL, offsetof(struct ModAudio, isStream), true, LOT_NONE, 1, sizeof(bool) }, + { "loaded", LVT_BOOL, offsetof(struct ModAudio, loaded), true, LOT_NONE, 1, sizeof(bool) }, }; -#define LUA_MOD_AUDIO_SAMPLE_COPIES_FIELD_COUNT 3 -static struct LuaObjectField sModAudioSampleCopiesFields[LUA_MOD_AUDIO_SAMPLE_COPIES_FIELD_COUNT] = { -// { "decoder", LVT_???, offsetof(struct ModAudioSampleCopies, decoder), false, LOT_???, 1, sizeof(ma_decoder) }, <--- UNIMPLEMENTED - { "next", LVT_COBJECT_P, offsetof(struct ModAudioSampleCopies, next), false, LOT_MODAUDIOSAMPLECOPIES, 1, sizeof(struct ModAudioSampleCopies*) }, - { "parent", LVT_COBJECT_P, offsetof(struct ModAudioSampleCopies, parent), false, LOT_MODAUDIO, 1, sizeof(struct ModAudio*) }, - { "prev", LVT_COBJECT_P, offsetof(struct ModAudioSampleCopies, prev), false, LOT_MODAUDIOSAMPLECOPIES, 1, sizeof(struct ModAudioSampleCopies*) }, -// { "sound", LVT_???, offsetof(struct ModAudioSampleCopies, sound), false, LOT_???, 1, sizeof(ma_sound) }, <--- UNIMPLEMENTED -}; +static const char FUNCTION__mod_fs_clear[] = "mod_fs_clear"; +static const char FUNCTION__mod_fs_copy_file[] = "mod_fs_copy_file"; +static const char FUNCTION__mod_fs_create_file[] = "mod_fs_create_file"; +static const char FUNCTION__mod_fs_delete[] = "mod_fs_delete"; +static const char FUNCTION__mod_fs_delete_file[] = "mod_fs_delete_file"; +static const char FUNCTION__mod_fs_get_file[] = "mod_fs_get_file"; +static const char FUNCTION__mod_fs_get_filename[] = "mod_fs_get_filename"; +static const char FUNCTION__mod_fs_move_file[] = "mod_fs_move_file"; +static const char FUNCTION__mod_fs_save[] = "mod_fs_save"; +static const char FUNCTION__mod_fs_set_public[] = "mod_fs_set_public"; -#define LUA_MOD_FILE_FIELD_COUNT 6 -static struct LuaObjectField sModFileFields[LUA_MOD_FILE_FIELD_COUNT] = { - { "cachedPath", LVT_STRING_P, offsetof(struct ModFile, cachedPath), true, LOT_NONE, 1, sizeof(char*) }, - { "dataHash", LVT_U8, offsetof(struct ModFile, dataHash), true, LOT_NONE, 16, sizeof(u8) }, -// { "fp", LVT_???, offsetof(struct ModFile, fp), true, LOT_???, 1, sizeof(FILE*) }, <--- UNIMPLEMENTED - { "isLoadedLuaModule", LVT_BOOL, offsetof(struct ModFile, isLoadedLuaModule), true, LOT_NONE, 1, sizeof(bool) }, - { "modifiedTimestamp", LVT_U64, offsetof(struct ModFile, modifiedTimestamp), true, LOT_NONE, 1, sizeof(u64) }, - { "relativePath", LVT_STRING, offsetof(struct ModFile, relativePath), true, LOT_NONE, 1, sizeof(char) }, -// { "size", LVT_???, offsetof(struct ModFile, size), true, LOT_???, 1, sizeof(size_t) }, <--- UNIMPLEMENTED - { "wroteBytes", LVT_U64, offsetof(struct ModFile, wroteBytes), true, LOT_NONE, 1, sizeof(u64) }, -}; - -#define LUA_MOD_FS_FIELD_COUNT 5 +#define LUA_MOD_FS_FIELD_COUNT 15 static struct LuaObjectField sModFsFields[LUA_MOD_FS_FIELD_COUNT] = { - { "isPublic", LVT_BOOL, offsetof(struct ModFs, isPublic), true, LOT_NONE, 1, sizeof(bool) }, - { "mod", LVT_COBJECT_P, offsetof(struct ModFs, mod), true, LOT_MOD, 1, sizeof(struct Mod*) }, - { "modPath", LVT_STRING, offsetof(struct ModFs, modPath), true, LOT_NONE, 1, sizeof(char) }, - { "numFiles", LVT_U16, offsetof(struct ModFs, numFiles), true, LOT_NONE, 1, sizeof(u16) }, - { "totalSize", LVT_U32, offsetof(struct ModFs, totalSize), true, LOT_NONE, 1, sizeof(u32) }, + { "clear", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_clear, true, LOT_NONE, 1, sizeof(const char *) }, + { "copy_file", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_copy_file, true, LOT_NONE, 1, sizeof(const char *) }, + { "create_file", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_create_file, true, LOT_NONE, 1, sizeof(const char *) }, + { "delete", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_delete, true, LOT_NONE, 1, sizeof(const char *) }, + { "delete_file", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_delete_file, true, LOT_NONE, 1, sizeof(const char *) }, + { "get_file", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_get_file, true, LOT_NONE, 1, sizeof(const char *) }, + { "get_filename", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_get_filename, true, LOT_NONE, 1, sizeof(const char *) }, + { "isPublic", LVT_BOOL, offsetof(struct ModFs, isPublic), true, LOT_NONE, 1, sizeof(bool) }, + { "mod", LVT_COBJECT_P, offsetof(struct ModFs, mod), true, LOT_MOD, 1, sizeof(struct Mod*) }, + { "modPath", LVT_STRING, offsetof(struct ModFs, modPath), true, LOT_NONE, 1, sizeof(char) }, + { "move_file", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_move_file, true, LOT_NONE, 1, sizeof(const char *) }, + { "numFiles", LVT_U16, offsetof(struct ModFs, numFiles), true, LOT_NONE, 1, sizeof(u16) }, + { "save", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_save, true, LOT_NONE, 1, sizeof(const char *) }, + { "set_public", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_set_public, true, LOT_NONE, 1, sizeof(const char *) }, + { "totalSize", LVT_U32, offsetof(struct ModFs, totalSize), true, LOT_NONE, 1, sizeof(u32) }, }; -#define LUA_MOD_FS_FILE_FIELD_COUNT 6 +static const char FUNCTION__mod_fs_file_erase[] = "mod_fs_file_erase"; +static const char FUNCTION__mod_fs_file_fill[] = "mod_fs_file_fill"; +static const char FUNCTION__mod_fs_file_is_eof[] = "mod_fs_file_is_eof"; +static const char FUNCTION__mod_fs_file_read_bool[] = "mod_fs_file_read_bool"; +static const char FUNCTION__mod_fs_file_read_bytes[] = "mod_fs_file_read_bytes"; +static const char FUNCTION__mod_fs_file_read_integer[] = "mod_fs_file_read_integer"; +static const char FUNCTION__mod_fs_file_read_line[] = "mod_fs_file_read_line"; +static const char FUNCTION__mod_fs_file_read_number[] = "mod_fs_file_read_number"; +static const char FUNCTION__mod_fs_file_read_string[] = "mod_fs_file_read_string"; +static const char FUNCTION__mod_fs_file_rewind[] = "mod_fs_file_rewind"; +static const char FUNCTION__mod_fs_file_seek[] = "mod_fs_file_seek"; +static const char FUNCTION__mod_fs_file_set_public[] = "mod_fs_file_set_public"; +static const char FUNCTION__mod_fs_file_set_text_mode[] = "mod_fs_file_set_text_mode"; +static const char FUNCTION__mod_fs_file_write_bool[] = "mod_fs_file_write_bool"; +static const char FUNCTION__mod_fs_file_write_bytes[] = "mod_fs_file_write_bytes"; +static const char FUNCTION__mod_fs_file_write_integer[] = "mod_fs_file_write_integer"; +static const char FUNCTION__mod_fs_file_write_line[] = "mod_fs_file_write_line"; +static const char FUNCTION__mod_fs_file_write_number[] = "mod_fs_file_write_number"; +static const char FUNCTION__mod_fs_file_write_string[] = "mod_fs_file_write_string"; + +#define LUA_MOD_FS_FILE_FIELD_COUNT 25 static struct LuaObjectField sModFsFileFields[LUA_MOD_FS_FILE_FIELD_COUNT] = { - { "filepath", LVT_STRING, offsetof(struct ModFsFile, filepath), true, LOT_NONE, 1, sizeof(char) }, - { "isPublic", LVT_BOOL, offsetof(struct ModFsFile, isPublic), true, LOT_NONE, 1, sizeof(bool) }, - { "isText", LVT_BOOL, offsetof(struct ModFsFile, isText), true, LOT_NONE, 1, sizeof(bool) }, - { "modFs", LVT_COBJECT_P, offsetof(struct ModFsFile, modFs), true, LOT_MODFS, 1, sizeof(struct ModFs*) }, - { "offset", LVT_U32, offsetof(struct ModFsFile, offset), true, LOT_NONE, 1, sizeof(u32) }, - { "size", LVT_U32, offsetof(struct ModFsFile, size), true, LOT_NONE, 1, sizeof(u32) }, -}; - -#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, 1, sizeof(s16) }, - { "lastMode", LVT_S16, offsetof(struct ModeTransitionInfo, lastMode), false, LOT_NONE, 1, sizeof(s16) }, - { "max", LVT_S16, offsetof(struct ModeTransitionInfo, max), false, LOT_NONE, 1, sizeof(s16) }, - { "newMode", LVT_S16, offsetof(struct ModeTransitionInfo, newMode), false, LOT_NONE, 1, sizeof(s16) }, - { "transitionEnd", LVT_COBJECT, offsetof(struct ModeTransitionInfo, transitionEnd), true, LOT_LINEARTRANSITIONPOINT, 1, sizeof(struct LinearTransitionPoint) }, - { "transitionStart", LVT_COBJECT, offsetof(struct ModeTransitionInfo, transitionStart), true, LOT_LINEARTRANSITIONPOINT, 1, sizeof(struct LinearTransitionPoint) }, + { "erase", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_erase, true, LOT_NONE, 1, sizeof(const char *) }, + { "filepath", LVT_STRING, offsetof(struct ModFsFile, filepath), true, LOT_NONE, 1, sizeof(char) }, + { "fill", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_fill, true, LOT_NONE, 1, sizeof(const char *) }, + { "isPublic", LVT_BOOL, offsetof(struct ModFsFile, isPublic), true, LOT_NONE, 1, sizeof(bool) }, + { "isText", LVT_BOOL, offsetof(struct ModFsFile, isText), true, LOT_NONE, 1, sizeof(bool) }, + { "is_eof", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_is_eof, true, LOT_NONE, 1, sizeof(const char *) }, + { "modFs", LVT_COBJECT_P, offsetof(struct ModFsFile, modFs), true, LOT_MODFS, 1, sizeof(struct ModFs*) }, + { "offset", LVT_U32, offsetof(struct ModFsFile, offset), true, LOT_NONE, 1, sizeof(u32) }, + { "read_bool", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_read_bool, true, LOT_NONE, 1, sizeof(const char *) }, + { "read_bytes", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_read_bytes, true, LOT_NONE, 1, sizeof(const char *) }, + { "read_integer", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_read_integer, true, LOT_NONE, 1, sizeof(const char *) }, + { "read_line", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_read_line, true, LOT_NONE, 1, sizeof(const char *) }, + { "read_number", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_read_number, true, LOT_NONE, 1, sizeof(const char *) }, + { "read_string", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_read_string, true, LOT_NONE, 1, sizeof(const char *) }, + { "rewind", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_rewind, true, LOT_NONE, 1, sizeof(const char *) }, + { "seek", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_seek, true, LOT_NONE, 1, sizeof(const char *) }, + { "set_public", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_set_public, true, LOT_NONE, 1, sizeof(const char *) }, + { "set_text_mode", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_set_text_mode, true, LOT_NONE, 1, sizeof(const char *) }, + { "size", LVT_U32, offsetof(struct ModFsFile, size), true, LOT_NONE, 1, sizeof(u32) }, + { "write_bool", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_write_bool, true, LOT_NONE, 1, sizeof(const char *) }, + { "write_bytes", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_write_bytes, true, LOT_NONE, 1, sizeof(const char *) }, + { "write_integer", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_write_integer, true, LOT_NONE, 1, sizeof(const char *) }, + { "write_line", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_write_line, true, LOT_NONE, 1, sizeof(const char *) }, + { "write_number", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_write_number, true, LOT_NONE, 1, sizeof(const char *) }, + { "write_string", LVT_FUNCTION, (size_t) FUNCTION__mod_fs_file_write_string, true, LOT_NONE, 1, sizeof(const char *) }, }; #define LUA_NAMETAGS_SETTINGS_FIELD_COUNT 2 @@ -1702,790 +1616,788 @@ static struct LuaObjectField sNetworkPlayerFields[LUA_NETWORK_PLAYER_FIELD_COUNT { "palette", LVT_COBJECT, offsetof(struct NetworkPlayer, palette), true, LOT_PLAYERPALETTE, 1, sizeof(struct PlayerPalette) }, { "paletteIndex", LVT_U8, offsetof(struct NetworkPlayer, paletteIndex), true, LOT_NONE, 1, sizeof(u8) }, { "ping", LVT_U32, offsetof(struct NetworkPlayer, ping), true, LOT_NONE, 1, sizeof(u32) }, -// { "rxPacketHash", LVT_???, offsetof(struct NetworkPlayer, rxPacketHash), true, LOT_???, 1, sizeof(u32) }, <--- UNIMPLEMENTED -// { "rxSeqIds", LVT_???, offsetof(struct NetworkPlayer, rxSeqIds), true, LOT_???, 1, sizeof(u16) }, <--- UNIMPLEMENTED { "type", LVT_U8, offsetof(struct NetworkPlayer, type), true, LOT_NONE, 1, sizeof(u8) }, }; -#define LUA_OBJECT_FIELD_COUNT 762 +#define LUA_OBJECT_FIELD_COUNT 763 static struct LuaObjectField sObjectFields[LUA_OBJECT_FIELD_COUNT] = { - { "activeFlags", LVT_S16, offsetof(struct Object, activeFlags), false, LOT_NONE, 1, sizeof(s16) }, - { "allowRemoteInteractions", LVT_U8, offsetof(struct Object, allowRemoteInteractions), false, LOT_NONE, 1, sizeof(u8) }, - { "areaTimer", LVT_U32, offsetof(struct Object, areaTimer), false, LOT_NONE, 1, sizeof(u32) }, - { "areaTimerDuration", LVT_U32, offsetof(struct Object, areaTimerDuration), false, LOT_NONE, 1, sizeof(u32) }, -// { "areaTimerRunOnceCallback)(void)", LVT_???, offsetof(struct Object, areaTimerRunOnceCallback)(void)), false, LOT_???, 1, sizeof(void (*) }, <--- UNIMPLEMENTED - { "areaTimerType", LVT_S32, offsetof(struct Object, areaTimerType), false, LOT_NONE, 1, sizeof(enum AreaTimerType) }, - { "behavior", LVT_BEHAVIORSCRIPT_P, offsetof(struct Object, behavior), true, LOT_POINTER, 1, sizeof(const BehaviorScript*) }, - { "bhvDelayTimer", LVT_S16, offsetof(struct Object, bhvDelayTimer), false, LOT_NONE, 1, sizeof(s16) }, -// { "bhvStack", LVT_???, offsetof(struct Object, bhvStack), false, LOT_???, 1, sizeof(uintptr_t) }, <--- UNIMPLEMENTED - { "bhvStackIndex", LVT_U32, offsetof(struct Object, bhvStackIndex), true, LOT_NONE, 1, sizeof(u32) }, - { "collidedObjInteractTypes", LVT_U32, offsetof(struct Object, collidedObjInteractTypes), false, LOT_NONE, 1, sizeof(u32) }, - { "collidedObjs", LVT_COBJECT_P, offsetof(struct Object, collidedObjs), false, LOT_OBJECT, 4, sizeof(struct Object*) }, - { "collisionData", LVT_COLLISION_P, offsetof(struct Object, collisionData), false, LOT_POINTER, 1, sizeof(Collision*) }, - { "coopFlags", LVT_U8, offsetof(struct Object, coopFlags), true, LOT_NONE, 1, sizeof(u8) }, - { "ctx", LVT_U8, offsetof(struct Object, ctx), false, LOT_NONE, 1, sizeof(u8) }, - { "curBhvCommand", LVT_BEHAVIORSCRIPT_P, offsetof(struct Object, curBhvCommand), true, LOT_POINTER, 1, sizeof(const BehaviorScript*) }, - { "globalPlayerIndex", LVT_U8, offsetof(struct Object, globalPlayerIndex), false, LOT_NONE, 1, sizeof(u8) }, - { "header", LVT_COBJECT, offsetof(struct Object, header), true, LOT_OBJECTNODE, 1, sizeof(struct ObjectNode) }, - { "heldByPlayerIndex", LVT_U32, offsetof(struct Object, heldByPlayerIndex), false, LOT_NONE, 1, sizeof(u32) }, - { "hitboxDownOffset", LVT_F32, offsetof(struct Object, hitboxDownOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "hitboxHeight", LVT_F32, offsetof(struct Object, hitboxHeight), false, LOT_NONE, 1, sizeof(f32) }, - { "hitboxRadius", LVT_F32, offsetof(struct Object, hitboxRadius), false, LOT_NONE, 1, sizeof(f32) }, - { "hookRender", LVT_U8, offsetof(struct Object, hookRender), false, LOT_NONE, 1, sizeof(u8) }, - { "hurtboxHeight", LVT_F32, offsetof(struct Object, hurtboxHeight), false, LOT_NONE, 1, sizeof(f32) }, - { "hurtboxRadius", LVT_F32, offsetof(struct Object, hurtboxRadius), false, LOT_NONE, 1, sizeof(f32) }, - { "numCollidedObjs", LVT_S16, offsetof(struct Object, numCollidedObjs), false, LOT_NONE, 1, sizeof(s16) }, - { "numSurfaces", LVT_U32, offsetof(struct Object, numSurfaces), true, LOT_NONE, 1, sizeof(u32) }, - { "o1UpForceSpawn", LVT_S32, offsetof(struct Object, o1UpForceSpawn), false, LOT_NONE, 1, sizeof(s32) }, - { "o1UpHiddenUnkF4", LVT_S32, offsetof(struct Object, o1UpHiddenUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oAction", LVT_S32, offsetof(struct Object, oAction), false, LOT_NONE, 1, sizeof(s32) }, - { "oActivatedBackAndForthPlatformCountdown", LVT_S32, offsetof(struct Object, oActivatedBackAndForthPlatformCountdown), false, LOT_NONE, 1, sizeof(s32) }, - { "oActivatedBackAndForthPlatformFlipRotation", LVT_S32, offsetof(struct Object, oActivatedBackAndForthPlatformFlipRotation), false, LOT_NONE, 1, sizeof(s32) }, - { "oActivatedBackAndForthPlatformMaxOffset", LVT_F32, offsetof(struct Object, oActivatedBackAndForthPlatformMaxOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "oActivatedBackAndForthPlatformOffset", LVT_F32, offsetof(struct Object, oActivatedBackAndForthPlatformOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "oActivatedBackAndForthPlatformStartYaw", LVT_S32, offsetof(struct Object, oActivatedBackAndForthPlatformStartYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oActivatedBackAndForthPlatformVel", LVT_F32, offsetof(struct Object, oActivatedBackAndForthPlatformVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oActivatedBackAndForthPlatformVertical", LVT_S32, offsetof(struct Object, oActivatedBackAndForthPlatformVertical), false, LOT_NONE, 1, sizeof(s32) }, - { "oActiveParticleFlags", LVT_U32, offsetof(struct Object, oActiveParticleFlags), false, LOT_NONE, 1, sizeof(u32) }, - { "oAmpRadiusOfRotation", LVT_F32, offsetof(struct Object, oAmpRadiusOfRotation), false, LOT_NONE, 1, sizeof(f32) }, - { "oAmpYPhase", LVT_S32, offsetof(struct Object, oAmpYPhase), false, LOT_NONE, 1, sizeof(s32) }, - { "oAngleToHome", LVT_S32, offsetof(struct Object, oAngleToHome), false, LOT_NONE, 1, sizeof(s32) }, - { "oAngleToMario", LVT_S32, offsetof(struct Object, oAngleToMario), false, LOT_NONE, 1, sizeof(s32) }, - { "oAngleVelPitch", LVT_S32, offsetof(struct Object, oAngleVelPitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oAngleVelRoll", LVT_S32, offsetof(struct Object, oAngleVelRoll), false, LOT_NONE, 1, sizeof(s32) }, - { "oAngleVelYaw", LVT_S32, offsetof(struct Object, oAngleVelYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oAnimState", LVT_S32, offsetof(struct Object, oAnimState), false, LOT_NONE, 1, sizeof(s32) }, - { "oAnimations", LVT_OBJECTANIMPOINTER_P, offsetof(struct Object, oAnimations), false, LOT_POINTER, 1, sizeof(ObjectAnimPointer*) }, - { "oArrowLiftDisplacement", LVT_F32, offsetof(struct Object, oArrowLiftDisplacement), false, LOT_NONE, 1, sizeof(f32) }, - { "oArrowLiftUnk100", LVT_S32, offsetof(struct Object, oArrowLiftUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oBBallSpawnerMaxSpawnDist", LVT_F32, offsetof(struct Object, oBBallSpawnerMaxSpawnDist), false, LOT_NONE, 1, sizeof(f32) }, - { "oBBallSpawnerPeriodMinus1", LVT_S32, offsetof(struct Object, oBBallSpawnerPeriodMinus1), false, LOT_NONE, 1, sizeof(s32) }, - { "oBBallSpawnerSpawnOdds", LVT_F32, offsetof(struct Object, oBBallSpawnerSpawnOdds), false, LOT_NONE, 1, sizeof(f32) }, - { "oBackAndForthPlatformDirection", LVT_F32, offsetof(struct Object, oBackAndForthPlatformDirection), false, LOT_NONE, 1, sizeof(f32) }, - { "oBackAndForthPlatformDistance", LVT_F32, offsetof(struct Object, oBackAndForthPlatformDistance), false, LOT_NONE, 1, sizeof(f32) }, - { "oBackAndForthPlatformPathLength", LVT_F32, offsetof(struct Object, oBackAndForthPlatformPathLength), false, LOT_NONE, 1, sizeof(f32) }, - { "oBackAndForthPlatformVel", LVT_F32, offsetof(struct Object, oBackAndForthPlatformVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oBehParams", LVT_S32, offsetof(struct Object, oBehParams), false, LOT_NONE, 1, sizeof(s32) }, - { "oBehParams2ndByte", LVT_S32, offsetof(struct Object, oBehParams2ndByte), false, LOT_NONE, 1, sizeof(s32) }, - { "oBetaTrampolineMarioOnTrampoline", LVT_S32, offsetof(struct Object, oBetaTrampolineMarioOnTrampoline), false, LOT_NONE, 1, sizeof(s32) }, - { "oBigBooNumMinionBoosKilled", LVT_S32, offsetof(struct Object, oBigBooNumMinionBoosKilled), false, LOT_NONE, 1, sizeof(s32) }, - { "oBirdChirpChirpUnkF4", LVT_S32, offsetof(struct Object, oBirdChirpChirpUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oBirdSpeed", LVT_F32, offsetof(struct Object, oBirdSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oBirdTargetPitch", LVT_S32, offsetof(struct Object, oBirdTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oBirdTargetYaw", LVT_S32, offsetof(struct Object, oBirdTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oBlackSmokeBowserUnkF4", LVT_F32, offsetof(struct Object, oBlackSmokeBowserUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oBlueFishRandomAngle", LVT_F32, offsetof(struct Object, oBlueFishRandomAngle), false, LOT_NONE, 1, sizeof(f32) }, - { "oBlueFishRandomTime", LVT_S32, offsetof(struct Object, oBlueFishRandomTime), false, LOT_NONE, 1, sizeof(s32) }, - { "oBlueFishRandomVel", LVT_F32, offsetof(struct Object, oBlueFishRandomVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oBlueFlameNextScale", LVT_F32, offsetof(struct Object, oBlueFlameNextScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oBobombBlinkTimer", LVT_S32, offsetof(struct Object, oBobombBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oBobombBuddyBlinkTimer", LVT_S32, offsetof(struct Object, oBobombBuddyBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oBobombBuddyCannonStatus", LVT_S32, offsetof(struct Object, oBobombBuddyCannonStatus), false, LOT_NONE, 1, sizeof(s32) }, - { "oBobombBuddyHasTalkedToMario", LVT_S32, offsetof(struct Object, oBobombBuddyHasTalkedToMario), false, LOT_NONE, 1, sizeof(s32) }, - { "oBobombBuddyPosXCopy", LVT_F32, offsetof(struct Object, oBobombBuddyPosXCopy), false, LOT_NONE, 1, sizeof(f32) }, - { "oBobombBuddyPosYCopy", LVT_F32, offsetof(struct Object, oBobombBuddyPosYCopy), false, LOT_NONE, 1, sizeof(f32) }, - { "oBobombBuddyPosZCopy", LVT_F32, offsetof(struct Object, oBobombBuddyPosZCopy), false, LOT_NONE, 1, sizeof(f32) }, - { "oBobombBuddyRole", LVT_S32, offsetof(struct Object, oBobombBuddyRole), false, LOT_NONE, 1, sizeof(s32) }, - { "oBobombExpBubGfxExpRateX", LVT_S32, offsetof(struct Object, oBobombExpBubGfxExpRateX), false, LOT_NONE, 1, sizeof(s32) }, - { "oBobombExpBubGfxExpRateY", LVT_S32, offsetof(struct Object, oBobombExpBubGfxExpRateY), false, LOT_NONE, 1, sizeof(s32) }, - { "oBobombExpBubGfxScaleFacX", LVT_S32, offsetof(struct Object, oBobombExpBubGfxScaleFacX), false, LOT_NONE, 1, sizeof(s32) }, - { "oBobombExpBubGfxScaleFacY", LVT_S32, offsetof(struct Object, oBobombExpBubGfxScaleFacY), false, LOT_NONE, 1, sizeof(s32) }, - { "oBobombFuseLit", LVT_S32, offsetof(struct Object, oBobombFuseLit), false, LOT_NONE, 1, sizeof(s32) }, - { "oBobombFuseTimer", LVT_S32, offsetof(struct Object, oBobombFuseTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oBooBaseScale", LVT_F32, offsetof(struct Object, oBooBaseScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oBooDeathStatus", LVT_S32, offsetof(struct Object, oBooDeathStatus), false, LOT_NONE, 1, sizeof(s32) }, - { "oBooInitialMoveYaw", LVT_S32, offsetof(struct Object, oBooInitialMoveYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oBooMoveYawBeforeHit", LVT_F32, offsetof(struct Object, oBooMoveYawBeforeHit), false, LOT_NONE, 1, sizeof(f32) }, - { "oBooMoveYawDuringHit", LVT_S32, offsetof(struct Object, oBooMoveYawDuringHit), false, LOT_NONE, 1, sizeof(s32) }, - { "oBooNegatedAggressiveness", LVT_F32, offsetof(struct Object, oBooNegatedAggressiveness), false, LOT_NONE, 1, sizeof(f32) }, - { "oBooOscillationTimer", LVT_S32, offsetof(struct Object, oBooOscillationTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oBooParentBigBoo", LVT_COBJECT_P, offsetof(struct Object, oBooParentBigBoo), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "oBooTargetOpacity", LVT_S32, offsetof(struct Object, oBooTargetOpacity), false, LOT_NONE, 1, sizeof(s32) }, - { "oBooTurningSpeed", LVT_S16, offsetof(struct Object, oBooTurningSpeed), false, LOT_NONE, 1, sizeof(s16) }, - { "oBookSwitchManagerUnkF4", LVT_S32, offsetof(struct Object, oBookSwitchManagerUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oBookSwitchManagerUnkF8", LVT_S32, offsetof(struct Object, oBookSwitchManagerUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oBookSwitchUnkF4", LVT_F32, offsetof(struct Object, oBookSwitchUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oBookendUnkF4", LVT_S32, offsetof(struct Object, oBookendUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oBookendUnkF8", LVT_S32, offsetof(struct Object, oBookendUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oBounciness", LVT_F32, offsetof(struct Object, oBounciness), false, LOT_NONE, 1, sizeof(f32) }, - { "oBouncingFireBallUnkF4", LVT_S32, offsetof(struct Object, oBouncingFireBallUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oBowlingBallTargetYaw", LVT_S32, offsetof(struct Object, oBowlingBallTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oBowserAngleToCentre", LVT_S16, offsetof(struct Object, oBowserAngleToCentre), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserDistToCentre", LVT_F32, offsetof(struct Object, oBowserDistToCentre), false, LOT_NONE, 1, sizeof(f32) }, - { "oBowserEyesShut", LVT_S16, offsetof(struct Object, oBowserEyesShut), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserHeldAnglePitch", LVT_S16, offsetof(struct Object, oBowserHeldAnglePitch), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserHeldAngleVelYaw", LVT_S16, offsetof(struct Object, oBowserHeldAngleVelYaw), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserKeyScale", LVT_F32, offsetof(struct Object, oBowserKeyScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oBowserPuzzleCompletionFlags", LVT_S32, offsetof(struct Object, oBowserPuzzleCompletionFlags), false, LOT_NONE, 1, sizeof(s32) }, -// { "oBowserPuzzlePieceActionList", LVT_???, offsetof(struct Object, oBowserPuzzlePieceActionList), false, LOT_???, 1, sizeof(void*) }, <--- UNIMPLEMENTED - { "oBowserPuzzlePieceContinuePerformingAction", LVT_S32, offsetof(struct Object, oBowserPuzzlePieceContinuePerformingAction), false, LOT_NONE, 1, sizeof(s32) }, -// { "oBowserPuzzlePieceNextAction", LVT_???, offsetof(struct Object, oBowserPuzzlePieceNextAction), false, LOT_???, 1, sizeof(void*) }, <--- UNIMPLEMENTED - { "oBowserPuzzlePieceOffsetX", LVT_F32, offsetof(struct Object, oBowserPuzzlePieceOffsetX), false, LOT_NONE, 1, sizeof(f32) }, - { "oBowserPuzzlePieceOffsetY", LVT_F32, offsetof(struct Object, oBowserPuzzlePieceOffsetY), false, LOT_NONE, 1, sizeof(f32) }, - { "oBowserPuzzlePieceOffsetZ", LVT_F32, offsetof(struct Object, oBowserPuzzlePieceOffsetZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oBowserShockWaveUnkF4", LVT_F32, offsetof(struct Object, oBowserShockWaveUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oBowserUnk106", LVT_S16, offsetof(struct Object, oBowserUnk106), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserUnk108", LVT_S16, offsetof(struct Object, oBowserUnk108), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserUnk10E", LVT_S16, offsetof(struct Object, oBowserUnk10E), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserUnk110", LVT_S16, offsetof(struct Object, oBowserUnk110), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserUnk1AC", LVT_S16, offsetof(struct Object, oBowserUnk1AC), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserUnk1AE", LVT_S16, offsetof(struct Object, oBowserUnk1AE), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserUnk1B2", LVT_S16, offsetof(struct Object, oBowserUnk1B2), false, LOT_NONE, 1, sizeof(s16) }, - { "oBowserUnk88", LVT_S32, offsetof(struct Object, oBowserUnk88), false, LOT_NONE, 1, sizeof(s32) }, - { "oBowserUnkF4", LVT_S32, offsetof(struct Object, oBowserUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oBowserUnkF8", LVT_S32, offsetof(struct Object, oBowserUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oBreakableBoxSmallFramesSinceReleased", LVT_S32, offsetof(struct Object, oBreakableBoxSmallFramesSinceReleased), false, LOT_NONE, 1, sizeof(s32) }, - { "oBreakableBoxSmallReleased", LVT_S32, offsetof(struct Object, oBreakableBoxSmallReleased), false, LOT_NONE, 1, sizeof(s32) }, - { "oBreakableWallForce", LVT_S32, offsetof(struct Object, oBreakableWallForce), false, LOT_NONE, 1, sizeof(s32) }, - { "oBubbaUnk100", LVT_S32, offsetof(struct Object, oBubbaUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oBubbaUnk104", LVT_S32, offsetof(struct Object, oBubbaUnk104), false, LOT_NONE, 1, sizeof(s32) }, - { "oBubbaUnk108", LVT_F32, offsetof(struct Object, oBubbaUnk108), false, LOT_NONE, 1, sizeof(f32) }, - { "oBubbaUnk10C", LVT_F32, offsetof(struct Object, oBubbaUnk10C), false, LOT_NONE, 1, sizeof(f32) }, - { "oBubbaUnk1AC", LVT_S16, offsetof(struct Object, oBubbaUnk1AC), false, LOT_NONE, 1, sizeof(s16) }, - { "oBubbaUnk1AE", LVT_S16, offsetof(struct Object, oBubbaUnk1AE), false, LOT_NONE, 1, sizeof(s16) }, - { "oBubbaUnk1B0", LVT_S16, offsetof(struct Object, oBubbaUnk1B0), false, LOT_NONE, 1, sizeof(s16) }, - { "oBubbaUnk1B2", LVT_S16, offsetof(struct Object, oBubbaUnk1B2), false, LOT_NONE, 1, sizeof(s16) }, - { "oBubbaUnkF4", LVT_F32, offsetof(struct Object, oBubbaUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oBubbaUnkF8", LVT_S32, offsetof(struct Object, oBubbaUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oBubbaUnkFC", LVT_S32, offsetof(struct Object, oBubbaUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oBulletBillInitialMoveYaw", LVT_S32, offsetof(struct Object, oBulletBillInitialMoveYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oBullyKBTimerAndMinionKOCounter", LVT_S32, offsetof(struct Object, oBullyKBTimerAndMinionKOCounter), false, LOT_NONE, 1, sizeof(s32) }, - { "oBullyLastNetworkPlayerIndex", LVT_S16, offsetof(struct Object, oBullyLastNetworkPlayerIndex), false, LOT_NONE, 1, sizeof(s16) }, - { "oBullyMarioCollisionAngle", LVT_S32, offsetof(struct Object, oBullyMarioCollisionAngle), false, LOT_NONE, 1, sizeof(s32) }, - { "oBullyPrevX", LVT_F32, offsetof(struct Object, oBullyPrevX), false, LOT_NONE, 1, sizeof(f32) }, - { "oBullyPrevY", LVT_F32, offsetof(struct Object, oBullyPrevY), false, LOT_NONE, 1, sizeof(f32) }, - { "oBullyPrevZ", LVT_F32, offsetof(struct Object, oBullyPrevZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oBullySubtype", LVT_S32, offsetof(struct Object, oBullySubtype), false, LOT_NONE, 1, sizeof(s32) }, - { "oBuoyancy", LVT_F32, offsetof(struct Object, oBuoyancy), false, LOT_NONE, 1, sizeof(f32) }, - { "oButterflyYPhase", LVT_S32, offsetof(struct Object, oButterflyYPhase), false, LOT_NONE, 1, sizeof(s32) }, - { "oCameraLakituBlinkTimer", LVT_S32, offsetof(struct Object, oCameraLakituBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oCameraLakituCircleRadius", LVT_F32, offsetof(struct Object, oCameraLakituCircleRadius), false, LOT_NONE, 1, sizeof(f32) }, - { "oCameraLakituFinishedDialog", LVT_S32, offsetof(struct Object, oCameraLakituFinishedDialog), false, LOT_NONE, 1, sizeof(s32) }, - { "oCameraLakituPitchVel", LVT_S16, offsetof(struct Object, oCameraLakituPitchVel), false, LOT_NONE, 1, sizeof(s16) }, - { "oCameraLakituSpeed", LVT_F32, offsetof(struct Object, oCameraLakituSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "activeFlags", LVT_S16, offsetof(struct Object, activeFlags), false, LOT_NONE, 1, sizeof(s16) }, + { "allowRemoteInteractions", LVT_U8, offsetof(struct Object, allowRemoteInteractions), false, LOT_NONE, 1, sizeof(u8) }, + { "areaTimer", LVT_U32, offsetof(struct Object, areaTimer), false, LOT_NONE, 1, sizeof(u32) }, + { "areaTimerDuration", LVT_U32, offsetof(struct Object, areaTimerDuration), false, LOT_NONE, 1, sizeof(u32) }, +// { "areaTimerRunOnceCallback)(void)", LVT_???, offsetof(struct Object, areaTimerRunOnceCallback)(void)), false, LOT_???, 1, sizeof(void (*) }, <--- UNIMPLEMENTED + { "areaTimerType", LVT_S32, offsetof(struct Object, areaTimerType), false, LOT_NONE, 1, sizeof(enum AreaTimerType) }, + { "behavior", LVT_BEHAVIORSCRIPT_P, offsetof(struct Object, behavior), true, LOT_POINTER, 1, sizeof(const BehaviorScript*) }, + { "bhvDelayTimer", LVT_S16, offsetof(struct Object, bhvDelayTimer), false, LOT_NONE, 1, sizeof(s16) }, + { "bhvStack", LVT_U64, offsetof(struct Object, bhvStack), true, LOT_NONE, OBJECT_MAX_BHV_STACK, sizeof(uintptr_t) }, + { "bhvStackIndex", LVT_U32, offsetof(struct Object, bhvStackIndex), true, LOT_NONE, 1, sizeof(u32) }, + { "collidedObjInteractTypes", LVT_U32, offsetof(struct Object, collidedObjInteractTypes), false, LOT_NONE, 1, sizeof(u32) }, + { "collidedObjs", LVT_COBJECT_P, offsetof(struct Object, collidedObjs), false, LOT_OBJECT, 4, sizeof(struct Object*) }, + { "collisionData", LVT_COLLISION_P, offsetof(struct Object, collisionData), false, LOT_POINTER, 1, sizeof(Collision*) }, + { "coopFlags", LVT_U8, offsetof(struct Object, coopFlags), true, LOT_NONE, 1, sizeof(u8) }, + { "ctx", LVT_U8, offsetof(struct Object, ctx), false, LOT_NONE, 1, sizeof(u8) }, + { "curBhvCommand", LVT_BEHAVIORSCRIPT_P, offsetof(struct Object, curBhvCommand), true, LOT_POINTER, 1, sizeof(const BehaviorScript*) }, + { "globalPlayerIndex", LVT_U8, offsetof(struct Object, globalPlayerIndex), false, LOT_NONE, 1, sizeof(u8) }, + { "header", LVT_COBJECT, offsetof(struct Object, header), true, LOT_OBJECTNODE, 1, sizeof(struct ObjectNode) }, + { "heldByPlayerIndex", LVT_U32, offsetof(struct Object, heldByPlayerIndex), false, LOT_NONE, 1, sizeof(u32) }, + { "hitboxDownOffset", LVT_F32, offsetof(struct Object, hitboxDownOffset), false, LOT_NONE, 1, sizeof(f32) }, + { "hitboxHeight", LVT_F32, offsetof(struct Object, hitboxHeight), false, LOT_NONE, 1, sizeof(f32) }, + { "hitboxRadius", LVT_F32, offsetof(struct Object, hitboxRadius), false, LOT_NONE, 1, sizeof(f32) }, + { "hookRender", LVT_U8, offsetof(struct Object, hookRender), false, LOT_NONE, 1, sizeof(u8) }, + { "hurtboxHeight", LVT_F32, offsetof(struct Object, hurtboxHeight), false, LOT_NONE, 1, sizeof(f32) }, + { "hurtboxRadius", LVT_F32, offsetof(struct Object, hurtboxRadius), false, LOT_NONE, 1, sizeof(f32) }, + { "numCollidedObjs", LVT_S16, offsetof(struct Object, numCollidedObjs), false, LOT_NONE, 1, sizeof(s16) }, + { "numSurfaces", LVT_U32, offsetof(struct Object, numSurfaces), true, LOT_NONE, 1, sizeof(u32) }, + { "o1UpForceSpawn", LVT_S32, offsetof(struct Object, o1UpForceSpawn), false, LOT_NONE, 1, sizeof(s32) }, + { "o1UpHiddenUnkF4", LVT_S32, offsetof(struct Object, o1UpHiddenUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oAction", LVT_S32, offsetof(struct Object, oAction), false, LOT_NONE, 1, sizeof(s32) }, + { "oActivatedBackAndForthPlatformCountdown", LVT_S32, offsetof(struct Object, oActivatedBackAndForthPlatformCountdown), false, LOT_NONE, 1, sizeof(s32) }, + { "oActivatedBackAndForthPlatformFlipRotation", LVT_S32, offsetof(struct Object, oActivatedBackAndForthPlatformFlipRotation), false, LOT_NONE, 1, sizeof(s32) }, + { "oActivatedBackAndForthPlatformMaxOffset", LVT_F32, offsetof(struct Object, oActivatedBackAndForthPlatformMaxOffset), false, LOT_NONE, 1, sizeof(f32) }, + { "oActivatedBackAndForthPlatformOffset", LVT_F32, offsetof(struct Object, oActivatedBackAndForthPlatformOffset), false, LOT_NONE, 1, sizeof(f32) }, + { "oActivatedBackAndForthPlatformStartYaw", LVT_S32, offsetof(struct Object, oActivatedBackAndForthPlatformStartYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oActivatedBackAndForthPlatformVel", LVT_F32, offsetof(struct Object, oActivatedBackAndForthPlatformVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oActivatedBackAndForthPlatformVertical", LVT_S32, offsetof(struct Object, oActivatedBackAndForthPlatformVertical), false, LOT_NONE, 1, sizeof(s32) }, + { "oActiveParticleFlags", LVT_U32, offsetof(struct Object, oActiveParticleFlags), false, LOT_NONE, 1, sizeof(u32) }, + { "oAmpRadiusOfRotation", LVT_F32, offsetof(struct Object, oAmpRadiusOfRotation), false, LOT_NONE, 1, sizeof(f32) }, + { "oAmpYPhase", LVT_S32, offsetof(struct Object, oAmpYPhase), false, LOT_NONE, 1, sizeof(s32) }, + { "oAngleToHome", LVT_S32, offsetof(struct Object, oAngleToHome), false, LOT_NONE, 1, sizeof(s32) }, + { "oAngleToMario", LVT_S32, offsetof(struct Object, oAngleToMario), false, LOT_NONE, 1, sizeof(s32) }, + { "oAngleVelPitch", LVT_S32, offsetof(struct Object, oAngleVelPitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oAngleVelRoll", LVT_S32, offsetof(struct Object, oAngleVelRoll), false, LOT_NONE, 1, sizeof(s32) }, + { "oAngleVelYaw", LVT_S32, offsetof(struct Object, oAngleVelYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oAnimState", LVT_S32, offsetof(struct Object, oAnimState), false, LOT_NONE, 1, sizeof(s32) }, + { "oAnimations", LVT_OBJECTANIMPOINTER_P, offsetof(struct Object, oAnimations), false, LOT_POINTER, 1, sizeof(ObjectAnimPointer*) }, + { "oArrowLiftDisplacement", LVT_F32, offsetof(struct Object, oArrowLiftDisplacement), false, LOT_NONE, 1, sizeof(f32) }, + { "oArrowLiftUnk100", LVT_S32, offsetof(struct Object, oArrowLiftUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oBBallSpawnerMaxSpawnDist", LVT_F32, offsetof(struct Object, oBBallSpawnerMaxSpawnDist), false, LOT_NONE, 1, sizeof(f32) }, + { "oBBallSpawnerPeriodMinus1", LVT_S32, offsetof(struct Object, oBBallSpawnerPeriodMinus1), false, LOT_NONE, 1, sizeof(s32) }, + { "oBBallSpawnerSpawnOdds", LVT_F32, offsetof(struct Object, oBBallSpawnerSpawnOdds), false, LOT_NONE, 1, sizeof(f32) }, + { "oBackAndForthPlatformDirection", LVT_F32, offsetof(struct Object, oBackAndForthPlatformDirection), false, LOT_NONE, 1, sizeof(f32) }, + { "oBackAndForthPlatformDistance", LVT_F32, offsetof(struct Object, oBackAndForthPlatformDistance), false, LOT_NONE, 1, sizeof(f32) }, + { "oBackAndForthPlatformPathLength", LVT_F32, offsetof(struct Object, oBackAndForthPlatformPathLength), false, LOT_NONE, 1, sizeof(f32) }, + { "oBackAndForthPlatformVel", LVT_F32, offsetof(struct Object, oBackAndForthPlatformVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oBehParams", LVT_S32, offsetof(struct Object, oBehParams), false, LOT_NONE, 1, sizeof(s32) }, + { "oBehParams2ndByte", LVT_S32, offsetof(struct Object, oBehParams2ndByte), false, LOT_NONE, 1, sizeof(s32) }, + { "oBetaTrampolineMarioOnTrampoline", LVT_S32, offsetof(struct Object, oBetaTrampolineMarioOnTrampoline), false, LOT_NONE, 1, sizeof(s32) }, + { "oBigBooNumMinionBoosKilled", LVT_S32, offsetof(struct Object, oBigBooNumMinionBoosKilled), false, LOT_NONE, 1, sizeof(s32) }, + { "oBirdChirpChirpUnkF4", LVT_S32, offsetof(struct Object, oBirdChirpChirpUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oBirdSpeed", LVT_F32, offsetof(struct Object, oBirdSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oBirdTargetPitch", LVT_S32, offsetof(struct Object, oBirdTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oBirdTargetYaw", LVT_S32, offsetof(struct Object, oBirdTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oBlackSmokeBowserUnkF4", LVT_F32, offsetof(struct Object, oBlackSmokeBowserUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oBlueFishRandomAngle", LVT_F32, offsetof(struct Object, oBlueFishRandomAngle), false, LOT_NONE, 1, sizeof(f32) }, + { "oBlueFishRandomTime", LVT_S32, offsetof(struct Object, oBlueFishRandomTime), false, LOT_NONE, 1, sizeof(s32) }, + { "oBlueFishRandomVel", LVT_F32, offsetof(struct Object, oBlueFishRandomVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oBlueFlameNextScale", LVT_F32, offsetof(struct Object, oBlueFlameNextScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oBobombBlinkTimer", LVT_S32, offsetof(struct Object, oBobombBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oBobombBuddyBlinkTimer", LVT_S32, offsetof(struct Object, oBobombBuddyBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oBobombBuddyCannonStatus", LVT_S32, offsetof(struct Object, oBobombBuddyCannonStatus), false, LOT_NONE, 1, sizeof(s32) }, + { "oBobombBuddyHasTalkedToMario", LVT_S32, offsetof(struct Object, oBobombBuddyHasTalkedToMario), false, LOT_NONE, 1, sizeof(s32) }, + { "oBobombBuddyPosXCopy", LVT_F32, offsetof(struct Object, oBobombBuddyPosXCopy), false, LOT_NONE, 1, sizeof(f32) }, + { "oBobombBuddyPosYCopy", LVT_F32, offsetof(struct Object, oBobombBuddyPosYCopy), false, LOT_NONE, 1, sizeof(f32) }, + { "oBobombBuddyPosZCopy", LVT_F32, offsetof(struct Object, oBobombBuddyPosZCopy), false, LOT_NONE, 1, sizeof(f32) }, + { "oBobombBuddyRole", LVT_S32, offsetof(struct Object, oBobombBuddyRole), false, LOT_NONE, 1, sizeof(s32) }, + { "oBobombExpBubGfxExpRateX", LVT_S32, offsetof(struct Object, oBobombExpBubGfxExpRateX), false, LOT_NONE, 1, sizeof(s32) }, + { "oBobombExpBubGfxExpRateY", LVT_S32, offsetof(struct Object, oBobombExpBubGfxExpRateY), false, LOT_NONE, 1, sizeof(s32) }, + { "oBobombExpBubGfxScaleFacX", LVT_S32, offsetof(struct Object, oBobombExpBubGfxScaleFacX), false, LOT_NONE, 1, sizeof(s32) }, + { "oBobombExpBubGfxScaleFacY", LVT_S32, offsetof(struct Object, oBobombExpBubGfxScaleFacY), false, LOT_NONE, 1, sizeof(s32) }, + { "oBobombFuseLit", LVT_S32, offsetof(struct Object, oBobombFuseLit), false, LOT_NONE, 1, sizeof(s32) }, + { "oBobombFuseTimer", LVT_S32, offsetof(struct Object, oBobombFuseTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oBooBaseScale", LVT_F32, offsetof(struct Object, oBooBaseScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oBooDeathStatus", LVT_S32, offsetof(struct Object, oBooDeathStatus), false, LOT_NONE, 1, sizeof(s32) }, + { "oBooInitialMoveYaw", LVT_S32, offsetof(struct Object, oBooInitialMoveYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oBooMoveYawBeforeHit", LVT_F32, offsetof(struct Object, oBooMoveYawBeforeHit), false, LOT_NONE, 1, sizeof(f32) }, + { "oBooMoveYawDuringHit", LVT_S32, offsetof(struct Object, oBooMoveYawDuringHit), false, LOT_NONE, 1, sizeof(s32) }, + { "oBooNegatedAggressiveness", LVT_F32, offsetof(struct Object, oBooNegatedAggressiveness), false, LOT_NONE, 1, sizeof(f32) }, + { "oBooOscillationTimer", LVT_S32, offsetof(struct Object, oBooOscillationTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oBooParentBigBoo", LVT_COBJECT_P, offsetof(struct Object, oBooParentBigBoo), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oBooTargetOpacity", LVT_S32, offsetof(struct Object, oBooTargetOpacity), false, LOT_NONE, 1, sizeof(s32) }, + { "oBooTurningSpeed", LVT_S16, offsetof(struct Object, oBooTurningSpeed), false, LOT_NONE, 1, sizeof(s16) }, + { "oBookSwitchManagerUnkF4", LVT_S32, offsetof(struct Object, oBookSwitchManagerUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oBookSwitchManagerUnkF8", LVT_S32, offsetof(struct Object, oBookSwitchManagerUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oBookSwitchUnkF4", LVT_F32, offsetof(struct Object, oBookSwitchUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oBookendUnkF4", LVT_S32, offsetof(struct Object, oBookendUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oBookendUnkF8", LVT_S32, offsetof(struct Object, oBookendUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oBounciness", LVT_F32, offsetof(struct Object, oBounciness), false, LOT_NONE, 1, sizeof(f32) }, + { "oBouncingFireBallUnkF4", LVT_S32, offsetof(struct Object, oBouncingFireBallUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oBowlingBallTargetYaw", LVT_S32, offsetof(struct Object, oBowlingBallTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oBowserAngleToCentre", LVT_S16, offsetof(struct Object, oBowserAngleToCentre), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserDistToCentre", LVT_F32, offsetof(struct Object, oBowserDistToCentre), false, LOT_NONE, 1, sizeof(f32) }, + { "oBowserEyesShut", LVT_S16, offsetof(struct Object, oBowserEyesShut), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserHeldAnglePitch", LVT_S16, offsetof(struct Object, oBowserHeldAnglePitch), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserHeldAngleVelYaw", LVT_S16, offsetof(struct Object, oBowserHeldAngleVelYaw), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserKeyScale", LVT_F32, offsetof(struct Object, oBowserKeyScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oBowserPuzzleCompletionFlags", LVT_S32, offsetof(struct Object, oBowserPuzzleCompletionFlags), false, LOT_NONE, 1, sizeof(s32) }, +// { "oBowserPuzzlePieceActionList", LVT_???, offsetof(struct Object, oBowserPuzzlePieceActionList), false, LOT_???, 1, sizeof(void*) }, <--- UNIMPLEMENTED + { "oBowserPuzzlePieceContinuePerformingAction", LVT_S32, offsetof(struct Object, oBowserPuzzlePieceContinuePerformingAction), false, LOT_NONE, 1, sizeof(s32) }, +// { "oBowserPuzzlePieceNextAction", LVT_???, offsetof(struct Object, oBowserPuzzlePieceNextAction), false, LOT_???, 1, sizeof(void*) }, <--- UNIMPLEMENTED + { "oBowserPuzzlePieceOffsetX", LVT_F32, offsetof(struct Object, oBowserPuzzlePieceOffsetX), false, LOT_NONE, 1, sizeof(f32) }, + { "oBowserPuzzlePieceOffsetY", LVT_F32, offsetof(struct Object, oBowserPuzzlePieceOffsetY), false, LOT_NONE, 1, sizeof(f32) }, + { "oBowserPuzzlePieceOffsetZ", LVT_F32, offsetof(struct Object, oBowserPuzzlePieceOffsetZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oBowserShockWaveUnkF4", LVT_F32, offsetof(struct Object, oBowserShockWaveUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oBowserUnk106", LVT_S16, offsetof(struct Object, oBowserUnk106), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserUnk108", LVT_S16, offsetof(struct Object, oBowserUnk108), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserUnk10E", LVT_S16, offsetof(struct Object, oBowserUnk10E), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserUnk110", LVT_S16, offsetof(struct Object, oBowserUnk110), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserUnk1AC", LVT_S16, offsetof(struct Object, oBowserUnk1AC), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserUnk1AE", LVT_S16, offsetof(struct Object, oBowserUnk1AE), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserUnk1B2", LVT_S16, offsetof(struct Object, oBowserUnk1B2), false, LOT_NONE, 1, sizeof(s16) }, + { "oBowserUnk88", LVT_S32, offsetof(struct Object, oBowserUnk88), false, LOT_NONE, 1, sizeof(s32) }, + { "oBowserUnkF4", LVT_S32, offsetof(struct Object, oBowserUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oBowserUnkF8", LVT_S32, offsetof(struct Object, oBowserUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oBreakableBoxSmallFramesSinceReleased", LVT_S32, offsetof(struct Object, oBreakableBoxSmallFramesSinceReleased), false, LOT_NONE, 1, sizeof(s32) }, + { "oBreakableBoxSmallReleased", LVT_S32, offsetof(struct Object, oBreakableBoxSmallReleased), false, LOT_NONE, 1, sizeof(s32) }, + { "oBreakableWallForce", LVT_S32, offsetof(struct Object, oBreakableWallForce), false, LOT_NONE, 1, sizeof(s32) }, + { "oBubbaUnk100", LVT_S32, offsetof(struct Object, oBubbaUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oBubbaUnk104", LVT_S32, offsetof(struct Object, oBubbaUnk104), false, LOT_NONE, 1, sizeof(s32) }, + { "oBubbaUnk108", LVT_F32, offsetof(struct Object, oBubbaUnk108), false, LOT_NONE, 1, sizeof(f32) }, + { "oBubbaUnk10C", LVT_F32, offsetof(struct Object, oBubbaUnk10C), false, LOT_NONE, 1, sizeof(f32) }, + { "oBubbaUnk1AC", LVT_S16, offsetof(struct Object, oBubbaUnk1AC), false, LOT_NONE, 1, sizeof(s16) }, + { "oBubbaUnk1AE", LVT_S16, offsetof(struct Object, oBubbaUnk1AE), false, LOT_NONE, 1, sizeof(s16) }, + { "oBubbaUnk1B0", LVT_S16, offsetof(struct Object, oBubbaUnk1B0), false, LOT_NONE, 1, sizeof(s16) }, + { "oBubbaUnk1B2", LVT_S16, offsetof(struct Object, oBubbaUnk1B2), false, LOT_NONE, 1, sizeof(s16) }, + { "oBubbaUnkF4", LVT_F32, offsetof(struct Object, oBubbaUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oBubbaUnkF8", LVT_S32, offsetof(struct Object, oBubbaUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oBubbaUnkFC", LVT_S32, offsetof(struct Object, oBubbaUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oBulletBillInitialMoveYaw", LVT_S32, offsetof(struct Object, oBulletBillInitialMoveYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oBullyKBTimerAndMinionKOCounter", LVT_S32, offsetof(struct Object, oBullyKBTimerAndMinionKOCounter), false, LOT_NONE, 1, sizeof(s32) }, + { "oBullyLastNetworkPlayerIndex", LVT_S16, offsetof(struct Object, oBullyLastNetworkPlayerIndex), false, LOT_NONE, 1, sizeof(s16) }, + { "oBullyMarioCollisionAngle", LVT_S32, offsetof(struct Object, oBullyMarioCollisionAngle), false, LOT_NONE, 1, sizeof(s32) }, + { "oBullyPrevX", LVT_F32, offsetof(struct Object, oBullyPrevX), false, LOT_NONE, 1, sizeof(f32) }, + { "oBullyPrevY", LVT_F32, offsetof(struct Object, oBullyPrevY), false, LOT_NONE, 1, sizeof(f32) }, + { "oBullyPrevZ", LVT_F32, offsetof(struct Object, oBullyPrevZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oBullySubtype", LVT_S32, offsetof(struct Object, oBullySubtype), false, LOT_NONE, 1, sizeof(s32) }, + { "oBuoyancy", LVT_F32, offsetof(struct Object, oBuoyancy), false, LOT_NONE, 1, sizeof(f32) }, + { "oButterflyYPhase", LVT_S32, offsetof(struct Object, oButterflyYPhase), false, LOT_NONE, 1, sizeof(s32) }, + { "oCameraLakituBlinkTimer", LVT_S32, offsetof(struct Object, oCameraLakituBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oCameraLakituCircleRadius", LVT_F32, offsetof(struct Object, oCameraLakituCircleRadius), false, LOT_NONE, 1, sizeof(f32) }, + { "oCameraLakituFinishedDialog", LVT_S32, offsetof(struct Object, oCameraLakituFinishedDialog), false, LOT_NONE, 1, sizeof(s32) }, + { "oCameraLakituPitchVel", LVT_S16, offsetof(struct Object, oCameraLakituPitchVel), false, LOT_NONE, 1, sizeof(s16) }, + { "oCameraLakituSpeed", LVT_F32, offsetof(struct Object, oCameraLakituSpeed), false, LOT_NONE, 1, sizeof(f32) }, #ifndef VERSION_JP - { "oCameraLakituUnk104", LVT_S32, offsetof(struct Object, oCameraLakituUnk104), false, LOT_NONE, 1, sizeof(s32) }, + { "oCameraLakituUnk104", LVT_S32, offsetof(struct Object, oCameraLakituUnk104), false, LOT_NONE, 1, sizeof(s32) }, #endif - { "oCameraLakituYawVel", LVT_S16, offsetof(struct Object, oCameraLakituYawVel), false, LOT_NONE, 1, sizeof(s16) }, - { "oCannonBarrelBubblesUnkF4", LVT_F32, offsetof(struct Object, oCannonBarrelBubblesUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oCannonPlayerIndex", LVT_S32, offsetof(struct Object, oCannonPlayerIndex), false, LOT_NONE, 1, sizeof(s32) }, - { "oCannonUnk10C", LVT_S32, offsetof(struct Object, oCannonUnk10C), false, LOT_NONE, 1, sizeof(s32) }, - { "oCannonUnkF4", LVT_S32, offsetof(struct Object, oCannonUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oCannonUnkF8", LVT_S32, offsetof(struct Object, oCannonUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oCapUnkF4", LVT_S32, offsetof(struct Object, oCapUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oCapUnkF8", LVT_S32, offsetof(struct Object, oCapUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oCelebStarDiameterOfRotation", LVT_S32, offsetof(struct Object, oCelebStarDiameterOfRotation), false, LOT_NONE, 1, sizeof(s32) }, - { "oCelebStarUnkF4", LVT_S32, offsetof(struct Object, oCelebStarUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oChainChompDistToPivot", LVT_F32, offsetof(struct Object, oChainChompDistToPivot), false, LOT_NONE, 1, sizeof(f32) }, - { "oChainChompHitGate", LVT_S32, offsetof(struct Object, oChainChompHitGate), false, LOT_NONE, 1, sizeof(s32) }, - { "oChainChompMaxDistBetweenChainParts", LVT_F32, offsetof(struct Object, oChainChompMaxDistBetweenChainParts), false, LOT_NONE, 1, sizeof(f32) }, - { "oChainChompMaxDistFromPivotPerChainPart", LVT_F32, offsetof(struct Object, oChainChompMaxDistFromPivotPerChainPart), false, LOT_NONE, 1, sizeof(f32) }, - { "oChainChompNumLunges", LVT_S32, offsetof(struct Object, oChainChompNumLunges), false, LOT_NONE, 1, sizeof(s32) }, - { "oChainChompReleaseStatus", LVT_S32, offsetof(struct Object, oChainChompReleaseStatus), false, LOT_NONE, 1, sizeof(s32) }, - { "oChainChompRestrictedByChain", LVT_S32, offsetof(struct Object, oChainChompRestrictedByChain), false, LOT_NONE, 1, sizeof(s32) }, - { "oChainChompSegments", LVT_COBJECT_P, offsetof(struct Object, oChainChompSegments), true, LOT_CHAINSEGMENT, 1, sizeof(struct ChainSegment*) }, - { "oChainChompTargetPitch", LVT_S32, offsetof(struct Object, oChainChompTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oChainChompUnk104", LVT_F32, offsetof(struct Object, oChainChompUnk104), false, LOT_NONE, 1, sizeof(f32) }, - { "oCheckerBoardPlatformUnk1AC", LVT_F32, offsetof(struct Object, oCheckerBoardPlatformUnk1AC), false, LOT_NONE, 1, sizeof(f32) }, - { "oCheckerBoardPlatformUnkF8", LVT_S32, offsetof(struct Object, oCheckerBoardPlatformUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oCheckerBoardPlatformUnkFC", LVT_S32, offsetof(struct Object, oCheckerBoardPlatformUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oCheepCheepUnk104", LVT_F32, offsetof(struct Object, oCheepCheepUnk104), false, LOT_NONE, 1, sizeof(f32) }, - { "oCheepCheepUnk108", LVT_F32, offsetof(struct Object, oCheepCheepUnk108), false, LOT_NONE, 1, sizeof(f32) }, - { "oCheepCheepUnkF4", LVT_F32, offsetof(struct Object, oCheepCheepUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oCheepCheepUnkF8", LVT_F32, offsetof(struct Object, oCheepCheepUnkF8), false, LOT_NONE, 1, sizeof(f32) }, - { "oCheepCheepUnkFC", LVT_F32, offsetof(struct Object, oCheepCheepUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oChuckyaUnk100", LVT_S32, offsetof(struct Object, oChuckyaUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oChuckyaUnk88", LVT_S32, offsetof(struct Object, oChuckyaUnk88), false, LOT_NONE, 1, sizeof(s32) }, - { "oChuckyaUnkF8", LVT_S32, offsetof(struct Object, oChuckyaUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oChuckyaUnkFC", LVT_S32, offsetof(struct Object, oChuckyaUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oClamUnkF4", LVT_S32, offsetof(struct Object, oClamUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oCloudBlowing", LVT_S32, offsetof(struct Object, oCloudBlowing), false, LOT_NONE, 1, sizeof(s32) }, - { "oCloudCenterX", LVT_F32, offsetof(struct Object, oCloudCenterX), false, LOT_NONE, 1, sizeof(f32) }, - { "oCloudCenterY", LVT_F32, offsetof(struct Object, oCloudCenterY), false, LOT_NONE, 1, sizeof(f32) }, - { "oCloudFwooshMovementRadius", LVT_S16, offsetof(struct Object, oCloudFwooshMovementRadius), false, LOT_NONE, 1, sizeof(s16) }, - { "oCloudGrowSpeed", LVT_F32, offsetof(struct Object, oCloudGrowSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oCoinUnk110", LVT_F32, offsetof(struct Object, oCoinUnk110), false, LOT_NONE, 1, sizeof(f32) }, + { "oCameraLakituYawVel", LVT_S16, offsetof(struct Object, oCameraLakituYawVel), false, LOT_NONE, 1, sizeof(s16) }, + { "oCannonBarrelBubblesUnkF4", LVT_F32, offsetof(struct Object, oCannonBarrelBubblesUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oCannonPlayerIndex", LVT_S32, offsetof(struct Object, oCannonPlayerIndex), false, LOT_NONE, 1, sizeof(s32) }, + { "oCannonUnk10C", LVT_S32, offsetof(struct Object, oCannonUnk10C), false, LOT_NONE, 1, sizeof(s32) }, + { "oCannonUnkF4", LVT_S32, offsetof(struct Object, oCannonUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oCannonUnkF8", LVT_S32, offsetof(struct Object, oCannonUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oCapUnkF4", LVT_S32, offsetof(struct Object, oCapUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oCapUnkF8", LVT_S32, offsetof(struct Object, oCapUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oCelebStarDiameterOfRotation", LVT_S32, offsetof(struct Object, oCelebStarDiameterOfRotation), false, LOT_NONE, 1, sizeof(s32) }, + { "oCelebStarUnkF4", LVT_S32, offsetof(struct Object, oCelebStarUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oChainChompDistToPivot", LVT_F32, offsetof(struct Object, oChainChompDistToPivot), false, LOT_NONE, 1, sizeof(f32) }, + { "oChainChompHitGate", LVT_S32, offsetof(struct Object, oChainChompHitGate), false, LOT_NONE, 1, sizeof(s32) }, + { "oChainChompMaxDistBetweenChainParts", LVT_F32, offsetof(struct Object, oChainChompMaxDistBetweenChainParts), false, LOT_NONE, 1, sizeof(f32) }, + { "oChainChompMaxDistFromPivotPerChainPart", LVT_F32, offsetof(struct Object, oChainChompMaxDistFromPivotPerChainPart), false, LOT_NONE, 1, sizeof(f32) }, + { "oChainChompNumLunges", LVT_S32, offsetof(struct Object, oChainChompNumLunges), false, LOT_NONE, 1, sizeof(s32) }, + { "oChainChompReleaseStatus", LVT_S32, offsetof(struct Object, oChainChompReleaseStatus), false, LOT_NONE, 1, sizeof(s32) }, + { "oChainChompRestrictedByChain", LVT_S32, offsetof(struct Object, oChainChompRestrictedByChain), false, LOT_NONE, 1, sizeof(s32) }, + { "oChainChompSegments", LVT_COBJECT_P, offsetof(struct Object, oChainChompSegments), true, LOT_CHAINSEGMENT, 1, sizeof(struct ChainSegment*) }, + { "oChainChompTargetPitch", LVT_S32, offsetof(struct Object, oChainChompTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oChainChompUnk104", LVT_F32, offsetof(struct Object, oChainChompUnk104), false, LOT_NONE, 1, sizeof(f32) }, + { "oCheckerBoardPlatformUnk1AC", LVT_F32, offsetof(struct Object, oCheckerBoardPlatformUnk1AC), false, LOT_NONE, 1, sizeof(f32) }, + { "oCheckerBoardPlatformUnkF8", LVT_S32, offsetof(struct Object, oCheckerBoardPlatformUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oCheckerBoardPlatformUnkFC", LVT_S32, offsetof(struct Object, oCheckerBoardPlatformUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oCheepCheepUnk104", LVT_F32, offsetof(struct Object, oCheepCheepUnk104), false, LOT_NONE, 1, sizeof(f32) }, + { "oCheepCheepUnk108", LVT_F32, offsetof(struct Object, oCheepCheepUnk108), false, LOT_NONE, 1, sizeof(f32) }, + { "oCheepCheepUnkF4", LVT_F32, offsetof(struct Object, oCheepCheepUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oCheepCheepUnkF8", LVT_F32, offsetof(struct Object, oCheepCheepUnkF8), false, LOT_NONE, 1, sizeof(f32) }, + { "oCheepCheepUnkFC", LVT_F32, offsetof(struct Object, oCheepCheepUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oChuckyaUnk100", LVT_S32, offsetof(struct Object, oChuckyaUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oChuckyaUnk88", LVT_S32, offsetof(struct Object, oChuckyaUnk88), false, LOT_NONE, 1, sizeof(s32) }, + { "oChuckyaUnkF8", LVT_S32, offsetof(struct Object, oChuckyaUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oChuckyaUnkFC", LVT_S32, offsetof(struct Object, oChuckyaUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oClamUnkF4", LVT_S32, offsetof(struct Object, oClamUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oCloudBlowing", LVT_S32, offsetof(struct Object, oCloudBlowing), false, LOT_NONE, 1, sizeof(s32) }, + { "oCloudCenterX", LVT_F32, offsetof(struct Object, oCloudCenterX), false, LOT_NONE, 1, sizeof(f32) }, + { "oCloudCenterY", LVT_F32, offsetof(struct Object, oCloudCenterY), false, LOT_NONE, 1, sizeof(f32) }, + { "oCloudFwooshMovementRadius", LVT_S16, offsetof(struct Object, oCloudFwooshMovementRadius), false, LOT_NONE, 1, sizeof(s16) }, + { "oCloudGrowSpeed", LVT_F32, offsetof(struct Object, oCloudGrowSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oCoinUnk110", LVT_F32, offsetof(struct Object, oCoinUnk110), false, LOT_NONE, 1, sizeof(f32) }, #ifndef VERSION_JP - { "oCoinUnk1B0", LVT_S32, offsetof(struct Object, oCoinUnk1B0), false, LOT_NONE, 1, sizeof(s32) }, + { "oCoinUnk1B0", LVT_S32, offsetof(struct Object, oCoinUnk1B0), false, LOT_NONE, 1, sizeof(s32) }, #endif - { "oCoinUnkF4", LVT_S32, offsetof(struct Object, oCoinUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oCoinUnkF8", LVT_S32, offsetof(struct Object, oCoinUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oCollisionDistance", LVT_F32, offsetof(struct Object, oCollisionDistance), false, LOT_NONE, 1, sizeof(f32) }, - { "oCollisionParticleUnkF4", LVT_F32, offsetof(struct Object, oCollisionParticleUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oControllablePlatformUnk100", LVT_S32, offsetof(struct Object, oControllablePlatformUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oControllablePlatformUnkF8", LVT_S32, offsetof(struct Object, oControllablePlatformUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oControllablePlatformUnkFC", LVT_F32, offsetof(struct Object, oControllablePlatformUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oDDDPoleMaxOffset", LVT_F32, offsetof(struct Object, oDDDPoleMaxOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "oDDDPoleOffset", LVT_F32, offsetof(struct Object, oDDDPoleOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "oDDDPoleVel", LVT_F32, offsetof(struct Object, oDDDPoleVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oDamageOrCoinValue", LVT_S32, offsetof(struct Object, oDamageOrCoinValue), false, LOT_NONE, 1, sizeof(s32) }, - { "oDeathSound", LVT_S32, offsetof(struct Object, oDeathSound), false, LOT_NONE, 1, sizeof(s32) }, - { "oDialogResponse", LVT_S16, offsetof(struct Object, oDialogResponse), false, LOT_NONE, 1, sizeof(s16) }, - { "oDialogState", LVT_S16, offsetof(struct Object, oDialogState), false, LOT_NONE, 1, sizeof(s16) }, - { "oDistanceToMario", LVT_F32, offsetof(struct Object, oDistanceToMario), false, LOT_NONE, 1, sizeof(f32) }, - { "oDonutPlatformSpawnerSpawnedPlatforms", LVT_S32, offsetof(struct Object, oDonutPlatformSpawnerSpawnedPlatforms), false, LOT_NONE, 1, sizeof(s32) }, - { "oDoorUnk100", LVT_S32, offsetof(struct Object, oDoorUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oDoorUnk88", LVT_S32, offsetof(struct Object, oDoorUnk88), false, LOT_NONE, 1, sizeof(s32) }, - { "oDoorUnkF8", LVT_S32, offsetof(struct Object, oDoorUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oDoorUnkFC", LVT_S32, offsetof(struct Object, oDoorUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oDorrieAngleToHome", LVT_S16, offsetof(struct Object, oDorrieAngleToHome), false, LOT_NONE, 1, sizeof(s16) }, - { "oDorrieDistToHome", LVT_F32, offsetof(struct Object, oDorrieDistToHome), false, LOT_NONE, 1, sizeof(f32) }, - { "oDorrieForwardDistToMario", LVT_F32, offsetof(struct Object, oDorrieForwardDistToMario), false, LOT_NONE, 1, sizeof(f32) }, - { "oDorrieGroundPounded", LVT_S16, offsetof(struct Object, oDorrieGroundPounded), false, LOT_NONE, 1, sizeof(s16) }, - { "oDorrieHeadRaiseSpeed", LVT_S16, offsetof(struct Object, oDorrieHeadRaiseSpeed), false, LOT_NONE, 1, sizeof(s16) }, - { "oDorrieLiftingMario", LVT_S32, offsetof(struct Object, oDorrieLiftingMario), false, LOT_NONE, 1, sizeof(s32) }, - { "oDorrieNeckAngle", LVT_S16, offsetof(struct Object, oDorrieNeckAngle), false, LOT_NONE, 1, sizeof(s16) }, - { "oDorrieOffsetY", LVT_F32, offsetof(struct Object, oDorrieOffsetY), false, LOT_NONE, 1, sizeof(f32) }, - { "oDorrieVelY", LVT_F32, offsetof(struct Object, oDorrieVelY), false, LOT_NONE, 1, sizeof(f32) }, - { "oDorrieYawVel", LVT_S32, offsetof(struct Object, oDorrieYawVel), false, LOT_NONE, 1, sizeof(s32) }, - { "oDragStrength", LVT_F32, offsetof(struct Object, oDragStrength), false, LOT_NONE, 1, sizeof(f32) }, - { "oDrawingDistance", LVT_F32, offsetof(struct Object, oDrawingDistance), false, LOT_NONE, 1, sizeof(f32) }, - { "oElevatorUnk100", LVT_S32, offsetof(struct Object, oElevatorUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oElevatorUnkF4", LVT_F32, offsetof(struct Object, oElevatorUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oElevatorUnkF8", LVT_F32, offsetof(struct Object, oElevatorUnkF8), false, LOT_NONE, 1, sizeof(f32) }, - { "oElevatorUnkFC", LVT_F32, offsetof(struct Object, oElevatorUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oEndBirdUnk104", LVT_F32, offsetof(struct Object, oEndBirdUnk104), false, LOT_NONE, 1, sizeof(f32) }, - { "oEnemyLakituBlinkTimer", LVT_S32, offsetof(struct Object, oEnemyLakituBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oEnemyLakituFaceForwardCountdown", LVT_S32, offsetof(struct Object, oEnemyLakituFaceForwardCountdown), false, LOT_NONE, 1, sizeof(s32) }, - { "oEnemyLakituNumSpinies", LVT_S32, offsetof(struct Object, oEnemyLakituNumSpinies), false, LOT_NONE, 1, sizeof(s32) }, - { "oEnemyLakituSpinyCooldown", LVT_S32, offsetof(struct Object, oEnemyLakituSpinyCooldown), false, LOT_NONE, 1, sizeof(s32) }, - { "oExclamationBoxForce", LVT_S32, offsetof(struct Object, oExclamationBoxForce), false, LOT_NONE, 1, sizeof(s32) }, - { "oExclamationBoxUnkF4", LVT_F32, offsetof(struct Object, oExclamationBoxUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oExclamationBoxUnkF8", LVT_F32, offsetof(struct Object, oExclamationBoxUnkF8), false, LOT_NONE, 1, sizeof(f32) }, - { "oExclamationBoxUnkFC", LVT_S32, offsetof(struct Object, oExclamationBoxUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oEyerokBossActiveHand", LVT_S32, offsetof(struct Object, oEyerokBossActiveHand), false, LOT_NONE, 1, sizeof(s32) }, - { "oEyerokBossNumHands", LVT_S32, offsetof(struct Object, oEyerokBossNumHands), false, LOT_NONE, 1, sizeof(s32) }, - { "oEyerokBossUnk104", LVT_S32, offsetof(struct Object, oEyerokBossUnk104), false, LOT_NONE, 1, sizeof(s32) }, - { "oEyerokBossUnk108", LVT_F32, offsetof(struct Object, oEyerokBossUnk108), false, LOT_NONE, 1, sizeof(f32) }, - { "oEyerokBossUnk10C", LVT_F32, offsetof(struct Object, oEyerokBossUnk10C), false, LOT_NONE, 1, sizeof(f32) }, - { "oEyerokBossUnk110", LVT_F32, offsetof(struct Object, oEyerokBossUnk110), false, LOT_NONE, 1, sizeof(f32) }, - { "oEyerokBossUnk1AC", LVT_S32, offsetof(struct Object, oEyerokBossUnk1AC), false, LOT_NONE, 1, sizeof(s32) }, - { "oEyerokBossUnkFC", LVT_S32, offsetof(struct Object, oEyerokBossUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oEyerokHandDead", LVT_S32, offsetof(struct Object, oEyerokHandDead), false, LOT_NONE, 1, sizeof(s32) }, - { "oEyerokHandUnk100", LVT_S32, offsetof(struct Object, oEyerokHandUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oEyerokHandUnkFC", LVT_S32, offsetof(struct Object, oEyerokHandUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oEyerokHandWakeUpTimer", LVT_S32, offsetof(struct Object, oEyerokHandWakeUpTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oEyerokReceivedAttack", LVT_S32, offsetof(struct Object, oEyerokReceivedAttack), false, LOT_NONE, 1, sizeof(s32) }, - { "oFaceAnglePitch", LVT_S32, offsetof(struct Object, oFaceAnglePitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oFaceAngleRoll", LVT_S32, offsetof(struct Object, oFaceAngleRoll), false, LOT_NONE, 1, sizeof(s32) }, - { "oFaceAngleYaw", LVT_S32, offsetof(struct Object, oFaceAngleYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oFallingPillarPitchAcceleration", LVT_F32, offsetof(struct Object, oFallingPillarPitchAcceleration), false, LOT_NONE, 1, sizeof(f32) }, - { "oFirePiranhaPlantActive", LVT_S32, offsetof(struct Object, oFirePiranhaPlantActive), false, LOT_NONE, 1, sizeof(s32) }, - { "oFirePiranhaPlantDeathSpinTimer", LVT_S32, offsetof(struct Object, oFirePiranhaPlantDeathSpinTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oFirePiranhaPlantDeathSpinVel", LVT_F32, offsetof(struct Object, oFirePiranhaPlantDeathSpinVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oFirePiranhaPlantNeutralScale", LVT_F32, offsetof(struct Object, oFirePiranhaPlantNeutralScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oFirePiranhaPlantScale", LVT_F32, offsetof(struct Object, oFirePiranhaPlantScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oFireSpitterLastWaterY", LVT_F32, offsetof(struct Object, oFireSpitterLastWaterY), false, LOT_NONE, 1, sizeof(f32) }, - { "oFireSpitterScaleVel", LVT_F32, offsetof(struct Object, oFireSpitterScaleVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oFishActiveDistance", LVT_F32, offsetof(struct Object, oFishActiveDistance), false, LOT_NONE, 1, sizeof(f32) }, - { "oFishDepthDistance", LVT_F32, offsetof(struct Object, oFishDepthDistance), false, LOT_NONE, 1, sizeof(f32) }, - { "oFishGoalVel", LVT_F32, offsetof(struct Object, oFishGoalVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oFishGoalY", LVT_F32, offsetof(struct Object, oFishGoalY), false, LOT_NONE, 1, sizeof(f32) }, - { "oFishHeightOffset", LVT_F32, offsetof(struct Object, oFishHeightOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "oFishRoamDistance", LVT_F32, offsetof(struct Object, oFishRoamDistance), false, LOT_NONE, 1, sizeof(f32) }, - { "oFishWaterLevel", LVT_F32, offsetof(struct Object, oFishWaterLevel), false, LOT_NONE, 1, sizeof(f32) }, - { "oFishYawVel", LVT_S32, offsetof(struct Object, oFishYawVel), false, LOT_NONE, 1, sizeof(s32) }, - { "oFlags", LVT_U32, offsetof(struct Object, oFlags), false, LOT_NONE, 1, sizeof(u32) }, - { "oFlameBowser", LVT_COBJECT_P, offsetof(struct Object, oFlameBowser), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "oFlameScale", LVT_F32, offsetof(struct Object, oFlameScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oFlameSpeedTimerOffset", LVT_S32, offsetof(struct Object, oFlameSpeedTimerOffset), false, LOT_NONE, 1, sizeof(s32) }, - { "oFlameThowerFlameUnk110", LVT_S32, offsetof(struct Object, oFlameThowerFlameUnk110), false, LOT_NONE, 1, sizeof(s32) }, - { "oFlameThowerUnk110", LVT_S32, offsetof(struct Object, oFlameThowerUnk110), false, LOT_NONE, 1, sizeof(s32) }, - { "oFlameUnkFC", LVT_F32, offsetof(struct Object, oFlameUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oFloatingPlatformUnk100", LVT_S32, offsetof(struct Object, oFloatingPlatformUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oFloatingPlatformUnkF4", LVT_S32, offsetof(struct Object, oFloatingPlatformUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oFloatingPlatformUnkF8", LVT_F32, offsetof(struct Object, oFloatingPlatformUnkF8), false, LOT_NONE, 1, sizeof(f32) }, - { "oFloatingPlatformUnkFC", LVT_F32, offsetof(struct Object, oFloatingPlatformUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oFloor", LVT_COBJECT_P, offsetof(struct Object, oFloor), false, LOT_SURFACE, 1, sizeof(struct Surface*) }, - { "oFloorHeight", LVT_F32, offsetof(struct Object, oFloorHeight), false, LOT_NONE, 1, sizeof(f32) }, - { "oFloorRoom", LVT_S16, offsetof(struct Object, oFloorRoom), false, LOT_NONE, 1, sizeof(s16) }, - { "oFloorSwitchPressAnimationUnk100", LVT_S32, offsetof(struct Object, oFloorSwitchPressAnimationUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oFloorSwitchPressAnimationUnkF4", LVT_S32, offsetof(struct Object, oFloorSwitchPressAnimationUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oFloorSwitchPressAnimationUnkF8", LVT_S32, offsetof(struct Object, oFloorSwitchPressAnimationUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oFloorSwitchPressAnimationUnkFC", LVT_S32, offsetof(struct Object, oFloorSwitchPressAnimationUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oFloorType", LVT_S16, offsetof(struct Object, oFloorType), false, LOT_NONE, 1, sizeof(s16) }, - { "oFlyGuyIdleTimer", LVT_S32, offsetof(struct Object, oFlyGuyIdleTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oFlyGuyLungeTargetPitch", LVT_S32, offsetof(struct Object, oFlyGuyLungeTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oFlyGuyLungeYDecel", LVT_F32, offsetof(struct Object, oFlyGuyLungeYDecel), false, LOT_NONE, 1, sizeof(f32) }, - { "oFlyGuyOscTimer", LVT_S32, offsetof(struct Object, oFlyGuyOscTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oFlyGuyScaleVel", LVT_F32, offsetof(struct Object, oFlyGuyScaleVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oFlyGuyTargetRoll", LVT_S32, offsetof(struct Object, oFlyGuyTargetRoll), false, LOT_NONE, 1, sizeof(s32) }, - { "oFlyGuyUnusedJitter", LVT_S32, offsetof(struct Object, oFlyGuyUnusedJitter), false, LOT_NONE, 1, sizeof(s32) }, - { "oForwardVel", LVT_F32, offsetof(struct Object, oForwardVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oForwardVelS32", LVT_S32, offsetof(struct Object, oForwardVelS32), false, LOT_NONE, 1, sizeof(s32) }, - { "oFriction", LVT_F32, offsetof(struct Object, oFriction), false, LOT_NONE, 1, sizeof(f32) }, - { "oGoombaBlinkTimer", LVT_S32, offsetof(struct Object, oGoombaBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oGoombaJumpCooldown", LVT_U32, offsetof(struct Object, oGoombaJumpCooldown), false, LOT_NONE, 1, sizeof(u32) }, - { "oGoombaRelativeSpeed", LVT_F32, offsetof(struct Object, oGoombaRelativeSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oGoombaScale", LVT_F32, offsetof(struct Object, oGoombaScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oGoombaSize", LVT_S32, offsetof(struct Object, oGoombaSize), false, LOT_NONE, 1, sizeof(s32) }, - { "oGoombaTargetYaw", LVT_S32, offsetof(struct Object, oGoombaTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oGoombaTurningAwayFromWall", LVT_S32, offsetof(struct Object, oGoombaTurningAwayFromWall), false, LOT_NONE, 1, sizeof(s32) }, - { "oGoombaWalkTimer", LVT_S32, offsetof(struct Object, oGoombaWalkTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oGrandStarUnk108", LVT_S32, offsetof(struct Object, oGrandStarUnk108), false, LOT_NONE, 1, sizeof(s32) }, - { "oGraphYOffset", LVT_F32, offsetof(struct Object, oGraphYOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "oGravity", LVT_F32, offsetof(struct Object, oGravity), false, LOT_NONE, 1, sizeof(f32) }, - { "oHauntedBookshelfShouldOpen", LVT_S32, offsetof(struct Object, oHauntedBookshelfShouldOpen), false, LOT_NONE, 1, sizeof(s32) }, - { "oHauntedChairUnk100", LVT_S32_P, offsetof(struct Object, oHauntedChairUnk100), true, LOT_POINTER, 1, sizeof(s32*) }, - { "oHauntedChairUnk104", LVT_S32, offsetof(struct Object, oHauntedChairUnk104), false, LOT_NONE, 1, sizeof(s32) }, - { "oHauntedChairUnkF4", LVT_S32, offsetof(struct Object, oHauntedChairUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oHauntedChairUnkF8", LVT_F32, offsetof(struct Object, oHauntedChairUnkF8), false, LOT_NONE, 1, sizeof(f32) }, - { "oHauntedChairUnkFC", LVT_F32, offsetof(struct Object, oHauntedChairUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oHealth", LVT_S32, offsetof(struct Object, oHealth), false, LOT_NONE, 1, sizeof(s32) }, - { "oHeaveHoUnk88", LVT_S32, offsetof(struct Object, oHeaveHoUnk88), false, LOT_NONE, 1, sizeof(s32) }, - { "oHeaveHoUnkF4", LVT_F32, offsetof(struct Object, oHeaveHoUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oHeldState", LVT_U32, offsetof(struct Object, oHeldState), false, LOT_NONE, 1, sizeof(u32) }, - { "oHiddenBlueCoinSwitch", LVT_COBJECT_P, offsetof(struct Object, oHiddenBlueCoinSwitch), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "oHiddenObjectUnkF4", LVT_COBJECT_P, offsetof(struct Object, oHiddenObjectUnkF4), false, LOT_OBJECT, 1, sizeof(struct Object*) }, -// { "oHiddenStarLastInteractedObject", LVT_???, offsetof(struct Object, oHiddenStarLastInteractedObject), false, LOT_???, 1, sizeof(void*) }, <--- UNIMPLEMENTED - { "oHiddenStarTriggerCounter", LVT_S32, offsetof(struct Object, oHiddenStarTriggerCounter), false, LOT_NONE, 1, sizeof(s32) }, - { "oHomeX", LVT_F32, offsetof(struct Object, oHomeX), false, LOT_NONE, 1, sizeof(f32) }, - { "oHomeY", LVT_F32, offsetof(struct Object, oHomeY), false, LOT_NONE, 1, sizeof(f32) }, - { "oHomeZ", LVT_F32, offsetof(struct Object, oHomeZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oHomingAmpAvgY", LVT_F32, offsetof(struct Object, oHomingAmpAvgY), false, LOT_NONE, 1, sizeof(f32) }, - { "oHomingAmpLockedOn", LVT_S32, offsetof(struct Object, oHomingAmpLockedOn), false, LOT_NONE, 1, sizeof(s32) }, - { "oHootAvailability", LVT_S32, offsetof(struct Object, oHootAvailability), false, LOT_NONE, 1, sizeof(s32) }, - { "oHootMarioReleaseTime", LVT_S32, offsetof(struct Object, oHootMarioReleaseTime), false, LOT_NONE, 1, sizeof(s32) }, - { "oHorizontalGrindelDistToHome", LVT_F32, offsetof(struct Object, oHorizontalGrindelDistToHome), false, LOT_NONE, 1, sizeof(f32) }, - { "oHorizontalGrindelOnGround", LVT_S32, offsetof(struct Object, oHorizontalGrindelOnGround), false, LOT_NONE, 1, sizeof(s32) }, - { "oHorizontalGrindelTargetYaw", LVT_S32, offsetof(struct Object, oHorizontalGrindelTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oHorizontalMovementUnk100", LVT_F32, offsetof(struct Object, oHorizontalMovementUnk100), false, LOT_NONE, 1, sizeof(f32) }, - { "oHorizontalMovementUnk104", LVT_S32, offsetof(struct Object, oHorizontalMovementUnk104), false, LOT_NONE, 1, sizeof(s32) }, - { "oHorizontalMovementUnk108", LVT_F32, offsetof(struct Object, oHorizontalMovementUnk108), false, LOT_NONE, 1, sizeof(f32) }, - { "oHorizontalMovementUnkF4", LVT_S32, offsetof(struct Object, oHorizontalMovementUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oHorizontalMovementUnkF8", LVT_S32, offsetof(struct Object, oHorizontalMovementUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oIntangibleTimer", LVT_S32, offsetof(struct Object, oIntangibleTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oInteractStatus", LVT_S32, offsetof(struct Object, oInteractStatus), false, LOT_NONE, 1, sizeof(s32) }, - { "oInteractType", LVT_U32, offsetof(struct Object, oInteractType), false, LOT_NONE, 1, sizeof(u32) }, - { "oInteractionSubtype", LVT_U32, offsetof(struct Object, oInteractionSubtype), false, LOT_NONE, 1, sizeof(u32) }, - { "oIntroLakituCloud", LVT_COBJECT_P, offsetof(struct Object, oIntroLakituCloud), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "oIntroLakituSplineSegment", LVT_F32, offsetof(struct Object, oIntroLakituSplineSegment), false, LOT_NONE, 1, sizeof(f32) }, - { "oIntroLakituSplineSegmentProgress", LVT_F32, offsetof(struct Object, oIntroLakituSplineSegmentProgress), false, LOT_NONE, 1, sizeof(f32) }, - { "oIntroLakituUnk100", LVT_F32, offsetof(struct Object, oIntroLakituUnk100), false, LOT_NONE, 1, sizeof(f32) }, - { "oIntroLakituUnk104", LVT_F32, offsetof(struct Object, oIntroLakituUnk104), false, LOT_NONE, 1, sizeof(f32) }, - { "oIntroLakituUnk108", LVT_F32, offsetof(struct Object, oIntroLakituUnk108), false, LOT_NONE, 1, sizeof(f32) }, - { "oIntroLakituUnk10C", LVT_F32, offsetof(struct Object, oIntroLakituUnk10C), false, LOT_NONE, 1, sizeof(f32) }, - { "oIntroLakituUnk110", LVT_F32, offsetof(struct Object, oIntroLakituUnk110), false, LOT_NONE, 1, sizeof(f32) }, - { "oIntroPeachDistToCamera", LVT_F32, offsetof(struct Object, oIntroPeachDistToCamera), false, LOT_NONE, 1, sizeof(f32) }, - { "oIntroPeachPitchFromFocus", LVT_F32, offsetof(struct Object, oIntroPeachPitchFromFocus), false, LOT_NONE, 1, sizeof(f32) }, - { "oIntroPeachYawFromFocus", LVT_F32, offsetof(struct Object, oIntroPeachYawFromFocus), false, LOT_NONE, 1, sizeof(f32) }, - { "oJrbSlidingBoxUnkF4", LVT_COBJECT_P, offsetof(struct Object, oJrbSlidingBoxUnkF4), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "oJrbSlidingBoxUnkF8", LVT_S32, offsetof(struct Object, oJrbSlidingBoxUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oJrbSlidingBoxUnkFC", LVT_F32, offsetof(struct Object, oJrbSlidingBoxUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oJumpingBoxUnkF4", LVT_S32, offsetof(struct Object, oJumpingBoxUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oJumpingBoxUnkF8", LVT_S32, offsetof(struct Object, oJumpingBoxUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oKickableBoardF4", LVT_S32, offsetof(struct Object, oKickableBoardF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oKickableBoardF8", LVT_S32, offsetof(struct Object, oKickableBoardF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oKingBobombUnk100", LVT_S32, offsetof(struct Object, oKingBobombUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oKingBobombUnk104", LVT_S32, offsetof(struct Object, oKingBobombUnk104), false, LOT_NONE, 1, sizeof(s32) }, - { "oKingBobombUnk108", LVT_S32, offsetof(struct Object, oKingBobombUnk108), false, LOT_NONE, 1, sizeof(s32) }, - { "oKingBobombUnk88", LVT_S32, offsetof(struct Object, oKingBobombUnk88), false, LOT_NONE, 1, sizeof(s32) }, - { "oKingBobombUnkF8", LVT_S32, offsetof(struct Object, oKingBobombUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oKingBobombUnkFC", LVT_S32, offsetof(struct Object, oKingBobombUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oKleptoDistanceToTarget", LVT_F32, offsetof(struct Object, oKleptoDistanceToTarget), false, LOT_NONE, 1, sizeof(f32) }, - { "oKleptoSpeed", LVT_F32, offsetof(struct Object, oKleptoSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oKleptoStartPosX", LVT_F32, offsetof(struct Object, oKleptoStartPosX), false, LOT_NONE, 1, sizeof(f32) }, - { "oKleptoStartPosY", LVT_F32, offsetof(struct Object, oKleptoStartPosY), false, LOT_NONE, 1, sizeof(f32) }, - { "oKleptoStartPosZ", LVT_F32, offsetof(struct Object, oKleptoStartPosZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oKleptoTargetNumber", LVT_S16, offsetof(struct Object, oKleptoTargetNumber), false, LOT_NONE, 1, sizeof(s16) }, - { "oKleptoTimeUntilTargetChange", LVT_S32, offsetof(struct Object, oKleptoTimeUntilTargetChange), false, LOT_NONE, 1, sizeof(s32) }, - { "oKleptoUnk1AE", LVT_S16, offsetof(struct Object, oKleptoUnk1AE), false, LOT_NONE, 1, sizeof(s16) }, - { "oKleptoUnk1B0", LVT_S16, offsetof(struct Object, oKleptoUnk1B0), false, LOT_NONE, 1, sizeof(s16) }, - { "oKleptoUnkF8", LVT_F32, offsetof(struct Object, oKleptoUnkF8), false, LOT_NONE, 1, sizeof(f32) }, - { "oKleptoUnkFC", LVT_F32, offsetof(struct Object, oKleptoUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oKleptoYawToTarget", LVT_S16, offsetof(struct Object, oKleptoYawToTarget), false, LOT_NONE, 1, sizeof(s16) }, - { "oKoopaAgility", LVT_F32, offsetof(struct Object, oKoopaAgility), false, LOT_NONE, 1, sizeof(f32) }, - { "oKoopaAngleToMario", LVT_S32, offsetof(struct Object, oKoopaAngleToMario), false, LOT_NONE, 1, sizeof(s32) }, - { "oKoopaBlinkTimer", LVT_S32, offsetof(struct Object, oKoopaBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oKoopaCountdown", LVT_S16, offsetof(struct Object, oKoopaCountdown), false, LOT_NONE, 1, sizeof(s16) }, - { "oKoopaDistanceToMario", LVT_F32, offsetof(struct Object, oKoopaDistanceToMario), false, LOT_NONE, 1, sizeof(f32) }, - { "oKoopaMovementType", LVT_S32, offsetof(struct Object, oKoopaMovementType), false, LOT_NONE, 1, sizeof(s32) }, - { "oKoopaRaceEndpointKoopaFinished", LVT_S32, offsetof(struct Object, oKoopaRaceEndpointKoopaFinished), false, LOT_NONE, 1, sizeof(s32) }, - { "oKoopaRaceEndpointRaceBegun", LVT_S32, offsetof(struct Object, oKoopaRaceEndpointRaceBegun), false, LOT_NONE, 1, sizeof(s32) }, - { "oKoopaRaceEndpointRaceEnded", LVT_S32, offsetof(struct Object, oKoopaRaceEndpointRaceEnded), false, LOT_NONE, 1, sizeof(s32) }, - { "oKoopaRaceEndpointRaceStatus", LVT_S32, offsetof(struct Object, oKoopaRaceEndpointRaceStatus), false, LOT_NONE, 1, sizeof(s32) }, - { "oKoopaRaceEndpointUnk100", LVT_S32, offsetof(struct Object, oKoopaRaceEndpointUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oKoopaShellFlameUnkF4", LVT_F32, offsetof(struct Object, oKoopaShellFlameUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oKoopaShellFlameUnkF8", LVT_F32, offsetof(struct Object, oKoopaShellFlameUnkF8), false, LOT_NONE, 1, sizeof(f32) }, - { "oKoopaTargetYaw", LVT_S32, offsetof(struct Object, oKoopaTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oKoopaTheQuickInitTextboxCooldown", LVT_S16, offsetof(struct Object, oKoopaTheQuickInitTextboxCooldown), false, LOT_NONE, 1, sizeof(s16) }, - { "oKoopaTheQuickRaceIndex", LVT_S16, offsetof(struct Object, oKoopaTheQuickRaceIndex), false, LOT_NONE, 1, sizeof(s16) }, - { "oKoopaTurningAwayFromWall", LVT_S32, offsetof(struct Object, oKoopaTurningAwayFromWall), false, LOT_NONE, 1, sizeof(s32) }, - { "oKoopaUnshelledTimeUntilTurn", LVT_S32, offsetof(struct Object, oKoopaUnshelledTimeUntilTurn), false, LOT_NONE, 1, sizeof(s32) }, - { "oLightID", LVT_S32, offsetof(struct Object, oLightID), false, LOT_NONE, 1, sizeof(s32) }, - { "oLllRotatingHexFlameUnkF4", LVT_F32, offsetof(struct Object, oLllRotatingHexFlameUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oLllRotatingHexFlameUnkF8", LVT_F32, offsetof(struct Object, oLllRotatingHexFlameUnkF8), false, LOT_NONE, 1, sizeof(f32) }, - { "oLllRotatingHexFlameUnkFC", LVT_F32, offsetof(struct Object, oLllRotatingHexFlameUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oLllWoodPieceOscillationTimer", LVT_S32, offsetof(struct Object, oLllWoodPieceOscillationTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oMacroUnk108", LVT_F32, offsetof(struct Object, oMacroUnk108), false, LOT_NONE, 1, sizeof(f32) }, - { "oMacroUnk10C", LVT_F32, offsetof(struct Object, oMacroUnk10C), false, LOT_NONE, 1, sizeof(f32) }, - { "oMacroUnk110", LVT_F32, offsetof(struct Object, oMacroUnk110), false, LOT_NONE, 1, sizeof(f32) }, - { "oMantaTargetPitch", LVT_S32, offsetof(struct Object, oMantaTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oMantaTargetYaw", LVT_S32, offsetof(struct Object, oMantaTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioBurnTimer", LVT_S32, offsetof(struct Object, oMarioBurnTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioCannonInputYaw", LVT_S32, offsetof(struct Object, oMarioCannonInputYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioCannonObjectYaw", LVT_S32, offsetof(struct Object, oMarioCannonObjectYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioJumboStarCutscenePosZ", LVT_F32, offsetof(struct Object, oMarioJumboStarCutscenePosZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oMarioLongJumpIsSlow", LVT_S32, offsetof(struct Object, oMarioLongJumpIsSlow), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioParticleFlags", LVT_S32, offsetof(struct Object, oMarioParticleFlags), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioPolePos", LVT_F32, offsetof(struct Object, oMarioPolePos), false, LOT_NONE, 1, sizeof(f32) }, - { "oMarioPoleUnk108", LVT_S32, offsetof(struct Object, oMarioPoleUnk108), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioPoleYawVel", LVT_S32, offsetof(struct Object, oMarioPoleYawVel), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioReadingSignDPosX", LVT_F32, offsetof(struct Object, oMarioReadingSignDPosX), false, LOT_NONE, 1, sizeof(f32) }, - { "oMarioReadingSignDPosZ", LVT_F32, offsetof(struct Object, oMarioReadingSignDPosZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oMarioReadingSignDYaw", LVT_S32, offsetof(struct Object, oMarioReadingSignDYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioSteepJumpYaw", LVT_S32, offsetof(struct Object, oMarioSteepJumpYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioTornadoPosY", LVT_F32, offsetof(struct Object, oMarioTornadoPosY), false, LOT_NONE, 1, sizeof(f32) }, - { "oMarioTornadoYawVel", LVT_S32, offsetof(struct Object, oMarioTornadoYawVel), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioWalkingPitch", LVT_S32, offsetof(struct Object, oMarioWalkingPitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oMarioWhirlpoolPosY", LVT_F32, offsetof(struct Object, oMarioWhirlpoolPosY), false, LOT_NONE, 1, sizeof(f32) }, - { "oMenuButtonActionPhase", LVT_S32, offsetof(struct Object, oMenuButtonActionPhase), false, LOT_NONE, 1, sizeof(s32) }, - { "oMenuButtonIsCustom", LVT_S32, offsetof(struct Object, oMenuButtonIsCustom), false, LOT_NONE, 1, sizeof(s32) }, - { "oMenuButtonOrigPosX", LVT_F32, offsetof(struct Object, oMenuButtonOrigPosX), false, LOT_NONE, 1, sizeof(f32) }, - { "oMenuButtonOrigPosY", LVT_F32, offsetof(struct Object, oMenuButtonOrigPosY), false, LOT_NONE, 1, sizeof(f32) }, - { "oMenuButtonOrigPosZ", LVT_F32, offsetof(struct Object, oMenuButtonOrigPosZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oMenuButtonScale", LVT_F32, offsetof(struct Object, oMenuButtonScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oMenuButtonState", LVT_S32, offsetof(struct Object, oMenuButtonState), false, LOT_NONE, 1, sizeof(s32) }, - { "oMenuButtonTimer", LVT_S32, offsetof(struct Object, oMenuButtonTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oMerryGoRoundBooManagerNumBoosKilled", LVT_S32, offsetof(struct Object, oMerryGoRoundBooManagerNumBoosKilled), false, LOT_NONE, 1, sizeof(s32) }, - { "oMerryGoRoundBooManagerNumBoosSpawned", LVT_S32, offsetof(struct Object, oMerryGoRoundBooManagerNumBoosSpawned), false, LOT_NONE, 1, sizeof(s32) }, - { "oMerryGoRoundMarioIsOutside", LVT_S32, offsetof(struct Object, oMerryGoRoundMarioIsOutside), false, LOT_NONE, 1, sizeof(s32) }, - { "oMerryGoRoundMusicShouldPlay", LVT_S32, offsetof(struct Object, oMerryGoRoundMusicShouldPlay), false, LOT_NONE, 1, sizeof(s32) }, - { "oMerryGoRoundStopped", LVT_S32, offsetof(struct Object, oMerryGoRoundStopped), false, LOT_NONE, 1, sizeof(s32) }, - { "oMipsForwardVelocity", LVT_F32, offsetof(struct Object, oMipsForwardVelocity), false, LOT_NONE, 1, sizeof(f32) }, - { "oMipsStarStatus", LVT_S32, offsetof(struct Object, oMipsStarStatus), false, LOT_NONE, 1, sizeof(s32) }, - { "oMipsStartWaypointIndex", LVT_S32, offsetof(struct Object, oMipsStartWaypointIndex), false, LOT_NONE, 1, sizeof(s32) }, - { "oMoneybagJumpState", LVT_S32, offsetof(struct Object, oMoneybagJumpState), false, LOT_NONE, 1, sizeof(s32) }, - { "oMontyMoleCurrentHole", LVT_COBJECT_P, offsetof(struct Object, oMontyMoleCurrentHole), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "oMontyMoleHeightRelativeToFloor", LVT_F32, offsetof(struct Object, oMontyMoleHeightRelativeToFloor), false, LOT_NONE, 1, sizeof(f32) }, - { "oMontyMoleHoleCooldown", LVT_S32, offsetof(struct Object, oMontyMoleHoleCooldown), false, LOT_NONE, 1, sizeof(s32) }, - { "oMontyMoleHoleX", LVT_F32, offsetof(struct Object, oMontyMoleHoleX), false, LOT_NONE, 1, sizeof(f32) }, - { "oMontyMoleHoleY", LVT_F32, offsetof(struct Object, oMontyMoleHoleY), false, LOT_NONE, 1, sizeof(f32) }, - { "oMontyMoleHoleZ", LVT_F32, offsetof(struct Object, oMontyMoleHoleZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oMoveAnglePitch", LVT_S32, offsetof(struct Object, oMoveAnglePitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oMoveAngleRoll", LVT_S32, offsetof(struct Object, oMoveAngleRoll), false, LOT_NONE, 1, sizeof(s32) }, - { "oMoveAngleYaw", LVT_S32, offsetof(struct Object, oMoveAngleYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oMoveFlags", LVT_U32, offsetof(struct Object, oMoveFlags), false, LOT_NONE, 1, sizeof(u32) }, - { "oMovingFlameTimer", LVT_S32, offsetof(struct Object, oMovingFlameTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oMrBlizzardChangeInDizziness", LVT_F32, offsetof(struct Object, oMrBlizzardChangeInDizziness), false, LOT_NONE, 1, sizeof(f32) }, - { "oMrBlizzardDistFromHome", LVT_S32, offsetof(struct Object, oMrBlizzardDistFromHome), false, LOT_NONE, 1, sizeof(s32) }, - { "oMrBlizzardDizziness", LVT_F32, offsetof(struct Object, oMrBlizzardDizziness), false, LOT_NONE, 1, sizeof(f32) }, - { "oMrBlizzardGraphYOffset", LVT_F32, offsetof(struct Object, oMrBlizzardGraphYOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "oMrBlizzardGraphYVel", LVT_F32, offsetof(struct Object, oMrBlizzardGraphYVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oMrBlizzardHeldObj", LVT_COBJECT_P, offsetof(struct Object, oMrBlizzardHeldObj), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "oMrBlizzardScale", LVT_F32, offsetof(struct Object, oMrBlizzardScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oMrBlizzardTargetMoveYaw", LVT_S32, offsetof(struct Object, oMrBlizzardTargetMoveYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oMrBlizzardTimer", LVT_S32, offsetof(struct Object, oMrBlizzardTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oMrISize", LVT_F32, offsetof(struct Object, oMrISize), false, LOT_NONE, 1, sizeof(f32) }, - { "oMrIUnk100", LVT_S32, offsetof(struct Object, oMrIUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oMrIUnk104", LVT_S32, offsetof(struct Object, oMrIUnk104), false, LOT_NONE, 1, sizeof(s32) }, - { "oMrIUnk108", LVT_S32, offsetof(struct Object, oMrIUnk108), false, LOT_NONE, 1, sizeof(s32) }, - { "oMrIUnk110", LVT_S32, offsetof(struct Object, oMrIUnk110), false, LOT_NONE, 1, sizeof(s32) }, - { "oMrIUnkF4", LVT_S32, offsetof(struct Object, oMrIUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oMrIUnkFC", LVT_S32, offsetof(struct Object, oMrIUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oNumLootCoins", LVT_S32, offsetof(struct Object, oNumLootCoins), false, LOT_NONE, 1, sizeof(s32) }, - { "oOpacity", LVT_S32, offsetof(struct Object, oOpacity), false, LOT_NONE, 1, sizeof(s32) }, - { "oOpenableGrillUnk88", LVT_S32, offsetof(struct Object, oOpenableGrillUnk88), false, LOT_NONE, 1, sizeof(s32) }, - { "oOpenableGrillUnkF4", LVT_COBJECT_P, offsetof(struct Object, oOpenableGrillUnkF4), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "oParentRelativePosX", LVT_F32, offsetof(struct Object, oParentRelativePosX), false, LOT_NONE, 1, sizeof(f32) }, - { "oParentRelativePosY", LVT_F32, offsetof(struct Object, oParentRelativePosY), false, LOT_NONE, 1, sizeof(f32) }, - { "oParentRelativePosZ", LVT_F32, offsetof(struct Object, oParentRelativePosZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oPathedPrevWaypoint", LVT_COBJECT_P, offsetof(struct Object, oPathedPrevWaypoint), false, LOT_WAYPOINT, 1, sizeof(struct Waypoint*) }, - { "oPathedPrevWaypointFlags", LVT_S32, offsetof(struct Object, oPathedPrevWaypointFlags), false, LOT_NONE, 1, sizeof(s32) }, - { "oPathedStartWaypoint", LVT_COBJECT_P, offsetof(struct Object, oPathedStartWaypoint), false, LOT_WAYPOINT, 1, sizeof(struct Waypoint*) }, - { "oPathedTargetPitch", LVT_S32, offsetof(struct Object, oPathedTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oPathedTargetYaw", LVT_S32, offsetof(struct Object, oPathedTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oPiranhaPlantScale", LVT_F32, offsetof(struct Object, oPiranhaPlantScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oPiranhaPlantSleepMusicState", LVT_S32, offsetof(struct Object, oPiranhaPlantSleepMusicState), false, LOT_NONE, 1, sizeof(s32) }, - { "oPitouneUnkF4", LVT_F32, offsetof(struct Object, oPitouneUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oPitouneUnkF8", LVT_F32, offsetof(struct Object, oPitouneUnkF8), false, LOT_NONE, 1, sizeof(f32) }, - { "oPitouneUnkFC", LVT_F32, offsetof(struct Object, oPitouneUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oPlatformOnTrackBaseBallIndex", LVT_S32, offsetof(struct Object, oPlatformOnTrackBaseBallIndex), false, LOT_NONE, 1, sizeof(s32) }, - { "oPlatformOnTrackDistMovedSinceLastBall", LVT_F32, offsetof(struct Object, oPlatformOnTrackDistMovedSinceLastBall), false, LOT_NONE, 1, sizeof(f32) }, - { "oPlatformOnTrackIsNotHMC", LVT_S16, offsetof(struct Object, oPlatformOnTrackIsNotHMC), false, LOT_NONE, 1, sizeof(s16) }, - { "oPlatformOnTrackIsNotSkiLift", LVT_S16, offsetof(struct Object, oPlatformOnTrackIsNotSkiLift), false, LOT_NONE, 1, sizeof(s16) }, - { "oPlatformOnTrackOffsetY", LVT_F32, offsetof(struct Object, oPlatformOnTrackOffsetY), false, LOT_NONE, 1, sizeof(f32) }, - { "oPlatformOnTrackPitch", LVT_S32, offsetof(struct Object, oPlatformOnTrackPitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oPlatformOnTrackPrevWaypoint", LVT_COBJECT_P, offsetof(struct Object, oPlatformOnTrackPrevWaypoint), false, LOT_WAYPOINT, 1, sizeof(struct Waypoint*) }, - { "oPlatformOnTrackPrevWaypointFlags", LVT_S32, offsetof(struct Object, oPlatformOnTrackPrevWaypointFlags), false, LOT_NONE, 1, sizeof(s32) }, - { "oPlatformOnTrackSkiLiftRollVel", LVT_F32, offsetof(struct Object, oPlatformOnTrackSkiLiftRollVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oPlatformOnTrackStartWaypoint", LVT_COBJECT_P, offsetof(struct Object, oPlatformOnTrackStartWaypoint), false, LOT_WAYPOINT, 1, sizeof(struct Waypoint*) }, - { "oPlatformOnTrackType", LVT_S16, offsetof(struct Object, oPlatformOnTrackType), false, LOT_NONE, 1, sizeof(s16) }, - { "oPlatformOnTrackWasStoodOn", LVT_S16, offsetof(struct Object, oPlatformOnTrackWasStoodOn), false, LOT_NONE, 1, sizeof(s16) }, - { "oPlatformOnTrackYaw", LVT_S32, offsetof(struct Object, oPlatformOnTrackYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oPlatformSpawnerUnk100", LVT_F32, offsetof(struct Object, oPlatformSpawnerUnk100), false, LOT_NONE, 1, sizeof(f32) }, - { "oPlatformSpawnerUnk104", LVT_F32, offsetof(struct Object, oPlatformSpawnerUnk104), false, LOT_NONE, 1, sizeof(f32) }, - { "oPlatformSpawnerUnk108", LVT_F32, offsetof(struct Object, oPlatformSpawnerUnk108), false, LOT_NONE, 1, sizeof(f32) }, - { "oPlatformSpawnerUnkF4", LVT_S32, offsetof(struct Object, oPlatformSpawnerUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oPlatformSpawnerUnkF8", LVT_S32, offsetof(struct Object, oPlatformSpawnerUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oPlatformSpawnerUnkFC", LVT_S32, offsetof(struct Object, oPlatformSpawnerUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oPlatformTimer", LVT_S32, offsetof(struct Object, oPlatformTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oPlatformUnk10C", LVT_F32, offsetof(struct Object, oPlatformUnk10C), false, LOT_NONE, 1, sizeof(f32) }, - { "oPlatformUnk110", LVT_F32, offsetof(struct Object, oPlatformUnk110), false, LOT_NONE, 1, sizeof(f32) }, - { "oPlatformUnkF8", LVT_COBJECT_P, offsetof(struct Object, oPlatformUnkF8), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "oPlatformUnkFC", LVT_S32, offsetof(struct Object, oPlatformUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oPokeyAliveBodyPartFlags", LVT_U32, offsetof(struct Object, oPokeyAliveBodyPartFlags), false, LOT_NONE, 1, sizeof(u32) }, - { "oPokeyBodyPartBlinkTimer", LVT_S32, offsetof(struct Object, oPokeyBodyPartBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oPokeyBodyPartDeathDelayAfterHeadKilled", LVT_S32, offsetof(struct Object, oPokeyBodyPartDeathDelayAfterHeadKilled), false, LOT_NONE, 1, sizeof(s32) }, - { "oPokeyBottomBodyPartSize", LVT_F32, offsetof(struct Object, oPokeyBottomBodyPartSize), false, LOT_NONE, 1, sizeof(f32) }, - { "oPokeyChangeTargetTimer", LVT_S32, offsetof(struct Object, oPokeyChangeTargetTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oPokeyHeadWasKilled", LVT_S32, offsetof(struct Object, oPokeyHeadWasKilled), false, LOT_NONE, 1, sizeof(s32) }, - { "oPokeyNumAliveBodyParts", LVT_S32, offsetof(struct Object, oPokeyNumAliveBodyParts), false, LOT_NONE, 1, sizeof(s32) }, - { "oPokeyTargetYaw", LVT_S32, offsetof(struct Object, oPokeyTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oPokeyTurningAwayFromWall", LVT_S32, offsetof(struct Object, oPokeyTurningAwayFromWall), false, LOT_NONE, 1, sizeof(s32) }, - { "oPosX", LVT_F32, offsetof(struct Object, oPosX), false, LOT_NONE, 1, sizeof(f32) }, - { "oPosY", LVT_F32, offsetof(struct Object, oPosY), false, LOT_NONE, 1, sizeof(f32) }, - { "oPosZ", LVT_F32, offsetof(struct Object, oPosZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oPrevAction", LVT_S32, offsetof(struct Object, oPrevAction), false, LOT_NONE, 1, sizeof(s32) }, - { "oPyramidTopFragmentsScale", LVT_F32, offsetof(struct Object, oPyramidTopFragmentsScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oPyramidTopPillarsTouched", LVT_S32, offsetof(struct Object, oPyramidTopPillarsTouched), false, LOT_NONE, 1, sizeof(s32) }, - { "oRRCruiserWingUnkF4", LVT_S32, offsetof(struct Object, oRRCruiserWingUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oRRCruiserWingUnkF8", LVT_S32, offsetof(struct Object, oRRCruiserWingUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oRacingPenguinFinalTextbox", LVT_S16, offsetof(struct Object, oRacingPenguinFinalTextbox), false, LOT_NONE, 1, sizeof(s16) }, - { "oRacingPenguinInitTextCooldown", LVT_S32, offsetof(struct Object, oRacingPenguinInitTextCooldown), false, LOT_NONE, 1, sizeof(s32) }, - { "oRacingPenguinMarioCheated", LVT_S16, offsetof(struct Object, oRacingPenguinMarioCheated), false, LOT_NONE, 1, sizeof(s16) }, - { "oRacingPenguinMarioWon", LVT_S16, offsetof(struct Object, oRacingPenguinMarioWon), false, LOT_NONE, 1, sizeof(s16) }, - { "oRacingPenguinReachedBottom", LVT_S16, offsetof(struct Object, oRacingPenguinReachedBottom), false, LOT_NONE, 1, sizeof(s16) }, - { "oRacingPenguinWeightedNewTargetSpeed", LVT_F32, offsetof(struct Object, oRacingPenguinWeightedNewTargetSpeed), false, LOT_NONE, 1, sizeof(f32) }, -// { "oRespawnerBehaviorToRespawn", LVT_???, offsetof(struct Object, oRespawnerBehaviorToRespawn), true, LOT_???, 1, sizeof(const void*) }, <--- UNIMPLEMENTED - { "oRespawnerMinSpawnDist", LVT_F32, offsetof(struct Object, oRespawnerMinSpawnDist), false, LOT_NONE, 1, sizeof(f32) }, - { "oRespawnerModelToRespawn", LVT_S32, offsetof(struct Object, oRespawnerModelToRespawn), false, LOT_NONE, 1, sizeof(s32) }, - { "oRollingLogUnkF4", LVT_F32, offsetof(struct Object, oRollingLogUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oRoom", LVT_S32, offsetof(struct Object, oRoom), false, LOT_NONE, 1, sizeof(s32) }, - { "oSLSnowmanWindOriginalYaw", LVT_S32, offsetof(struct Object, oSLSnowmanWindOriginalYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oSLWalkingPenguinCurStep", LVT_S32, offsetof(struct Object, oSLWalkingPenguinCurStep), false, LOT_NONE, 1, sizeof(s32) }, - { "oSLWalkingPenguinCurStepTimer", LVT_S32, offsetof(struct Object, oSLWalkingPenguinCurStepTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oSLWalkingPenguinWindCollisionXPos", LVT_F32, offsetof(struct Object, oSLWalkingPenguinWindCollisionXPos), false, LOT_NONE, 1, sizeof(f32) }, - { "oSLWalkingPenguinWindCollisionZPos", LVT_F32, offsetof(struct Object, oSLWalkingPenguinWindCollisionZPos), false, LOT_NONE, 1, sizeof(f32) }, - { "oScuttlebugSpawnerUnk88", LVT_S32, offsetof(struct Object, oScuttlebugSpawnerUnk88), false, LOT_NONE, 1, sizeof(s32) }, - { "oScuttlebugSpawnerUnkF4", LVT_S32, offsetof(struct Object, oScuttlebugSpawnerUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oScuttlebugUnkF4", LVT_S32, offsetof(struct Object, oScuttlebugUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oScuttlebugUnkF8", LVT_S32, offsetof(struct Object, oScuttlebugUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oScuttlebugUnkFC", LVT_S32, offsetof(struct Object, oScuttlebugUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oSeesawPlatformPitchVel", LVT_F32, offsetof(struct Object, oSeesawPlatformPitchVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oShipPart3UnkF4", LVT_S32, offsetof(struct Object, oShipPart3UnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oShipPart3UnkF8", LVT_S32, offsetof(struct Object, oShipPart3UnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oSinkWhenSteppedOnUnk104", LVT_S32, offsetof(struct Object, oSinkWhenSteppedOnUnk104), false, LOT_NONE, 1, sizeof(s32) }, - { "oSinkWhenSteppedOnUnk108", LVT_F32, offsetof(struct Object, oSinkWhenSteppedOnUnk108), false, LOT_NONE, 1, sizeof(f32) }, - { "oSkeeterLastWaterY", LVT_F32, offsetof(struct Object, oSkeeterLastWaterY), false, LOT_NONE, 1, sizeof(f32) }, - { "oSkeeterTargetAngle", LVT_S32, offsetof(struct Object, oSkeeterTargetAngle), false, LOT_NONE, 1, sizeof(s32) }, - { "oSkeeterUnk1AC", LVT_S16, offsetof(struct Object, oSkeeterUnk1AC), false, LOT_NONE, 1, sizeof(s16) }, - { "oSkeeterUnkF8", LVT_S32, offsetof(struct Object, oSkeeterUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oSkeeterUnkFC", LVT_F32, offsetof(struct Object, oSkeeterUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oSkeeterWaitTime", LVT_S32, offsetof(struct Object, oSkeeterWaitTime), false, LOT_NONE, 1, sizeof(s32) }, - { "oSmallBompInitX", LVT_F32, offsetof(struct Object, oSmallBompInitX), false, LOT_NONE, 1, sizeof(f32) }, - { "oSmallPenguinUnk100", LVT_S32, offsetof(struct Object, oSmallPenguinUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oSmallPenguinUnk104", LVT_F32, offsetof(struct Object, oSmallPenguinUnk104), false, LOT_NONE, 1, sizeof(f32) }, - { "oSmallPenguinUnk108", LVT_F32, offsetof(struct Object, oSmallPenguinUnk108), false, LOT_NONE, 1, sizeof(f32) }, - { "oSmallPenguinUnk110", LVT_S32, offsetof(struct Object, oSmallPenguinUnk110), false, LOT_NONE, 1, sizeof(s32) }, - { "oSmallPenguinUnk88", LVT_S32, offsetof(struct Object, oSmallPenguinUnk88), false, LOT_NONE, 1, sizeof(s32) }, - { "oSmallPiranhaFlameEndSpeed", LVT_F32, offsetof(struct Object, oSmallPiranhaFlameEndSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oSmallPiranhaFlameModel", LVT_S32, offsetof(struct Object, oSmallPiranhaFlameModel), false, LOT_NONE, 1, sizeof(s32) }, - { "oSmallPiranhaFlameNextFlameTimer", LVT_S32, offsetof(struct Object, oSmallPiranhaFlameNextFlameTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oSmallPiranhaFlameSpeed", LVT_F32, offsetof(struct Object, oSmallPiranhaFlameSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oSmallPiranhaFlameStartSpeed", LVT_F32, offsetof(struct Object, oSmallPiranhaFlameStartSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oSmokeTimer", LVT_S32, offsetof(struct Object, oSmokeTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oSnowmansBottomUnk1AC", LVT_S32, offsetof(struct Object, oSnowmansBottomUnk1AC), false, LOT_NONE, 1, sizeof(s32) }, - { "oSnowmansBottomUnkF4", LVT_F32, offsetof(struct Object, oSnowmansBottomUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oSnowmansBottomUnkF8", LVT_S32, offsetof(struct Object, oSnowmansBottomUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oSnowmansHeadUnkF4", LVT_S32, offsetof(struct Object, oSnowmansHeadUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oSnufitBodyBaseScale", LVT_S32, offsetof(struct Object, oSnufitBodyBaseScale), false, LOT_NONE, 1, sizeof(s32) }, - { "oSnufitBodyScale", LVT_S16, offsetof(struct Object, oSnufitBodyScale), false, LOT_NONE, 1, sizeof(s16) }, - { "oSnufitBodyScalePeriod", LVT_S32, offsetof(struct Object, oSnufitBodyScalePeriod), false, LOT_NONE, 1, sizeof(s32) }, - { "oSnufitBullets", LVT_S32, offsetof(struct Object, oSnufitBullets), false, LOT_NONE, 1, sizeof(s32) }, - { "oSnufitCircularPeriod", LVT_S32, offsetof(struct Object, oSnufitCircularPeriod), false, LOT_NONE, 1, sizeof(s32) }, - { "oSnufitRecoil", LVT_S32, offsetof(struct Object, oSnufitRecoil), false, LOT_NONE, 1, sizeof(s32) }, - { "oSnufitScale", LVT_F32, offsetof(struct Object, oSnufitScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oSnufitXOffset", LVT_S16, offsetof(struct Object, oSnufitXOffset), false, LOT_NONE, 1, sizeof(s16) }, - { "oSnufitYOffset", LVT_S16, offsetof(struct Object, oSnufitYOffset), false, LOT_NONE, 1, sizeof(s16) }, - { "oSnufitZOffset", LVT_S16, offsetof(struct Object, oSnufitZOffset), false, LOT_NONE, 1, sizeof(s16) }, - { "oSoundEffectUnkF4", LVT_S32, offsetof(struct Object, oSoundEffectUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oSoundStateID", LVT_S32, offsetof(struct Object, oSoundStateID), false, LOT_NONE, 1, sizeof(s32) }, - { "oSparkleSpawnUnk1B0", LVT_S32, offsetof(struct Object, oSparkleSpawnUnk1B0), false, LOT_NONE, 1, sizeof(s32) }, - { "oSpindelUnkF4", LVT_S32, offsetof(struct Object, oSpindelUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oSpindelUnkF8", LVT_S32, offsetof(struct Object, oSpindelUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oSpinningHeartPlayedSound", LVT_S32, offsetof(struct Object, oSpinningHeartPlayedSound), false, LOT_NONE, 1, sizeof(s32) }, - { "oSpinningHeartTotalSpin", LVT_S32, offsetof(struct Object, oSpinningHeartTotalSpin), false, LOT_NONE, 1, sizeof(s32) }, - { "oSpinyTargetYaw", LVT_S32, offsetof(struct Object, oSpinyTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oSpinyTimeUntilTurn", LVT_S32, offsetof(struct Object, oSpinyTimeUntilTurn), false, LOT_NONE, 1, sizeof(s32) }, - { "oSpinyTurningAwayFromWall", LVT_S32, offsetof(struct Object, oSpinyTurningAwayFromWall), false, LOT_NONE, 1, sizeof(s32) }, -// { "oStarBehavior", LVT_???, offsetof(struct Object, oStarBehavior), true, LOT_???, 1, sizeof(const void*) }, <--- UNIMPLEMENTED - { "oStarSelectorSize", LVT_F32, offsetof(struct Object, oStarSelectorSize), false, LOT_NONE, 1, sizeof(f32) }, - { "oStarSelectorTimer", LVT_S32, offsetof(struct Object, oStarSelectorTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oStarSelectorType", LVT_S32, offsetof(struct Object, oStarSelectorType), false, LOT_NONE, 1, sizeof(s32) }, - { "oStarSpawnDisFromHome", LVT_F32, offsetof(struct Object, oStarSpawnDisFromHome), false, LOT_NONE, 1, sizeof(f32) }, - { "oStarSpawnExtCutsceneFlags", LVT_S16, offsetof(struct Object, oStarSpawnExtCutsceneFlags), false, LOT_NONE, 1, sizeof(s16) }, - { "oStarSpawnUnkFC", LVT_F32, offsetof(struct Object, oStarSpawnUnkFC), false, LOT_NONE, 1, sizeof(f32) }, - { "oStrongWindParticlePenguinObj", LVT_COBJECT_P, offsetof(struct Object, oStrongWindParticlePenguinObj), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "oSubAction", LVT_S32, offsetof(struct Object, oSubAction), false, LOT_NONE, 1, sizeof(s32) }, - { "oSushiSharkUnkF4", LVT_S32, offsetof(struct Object, oSushiSharkUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oSwingPlatformAngle", LVT_F32, offsetof(struct Object, oSwingPlatformAngle), false, LOT_NONE, 1, sizeof(f32) }, - { "oSwingPlatformSpeed", LVT_F32, offsetof(struct Object, oSwingPlatformSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oSwoopBonkCountdown", LVT_S32, offsetof(struct Object, oSwoopBonkCountdown), false, LOT_NONE, 1, sizeof(s32) }, - { "oSwoopTargetPitch", LVT_S32, offsetof(struct Object, oSwoopTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oSwoopTargetYaw", LVT_S32, offsetof(struct Object, oSwoopTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oSyncDeath", LVT_U32, offsetof(struct Object, oSyncDeath), false, LOT_NONE, 1, sizeof(u32) }, - { "oSyncID", LVT_U32, offsetof(struct Object, oSyncID), true, LOT_NONE, 1, sizeof(u32) }, - { "oTTC2DRotatorIncrement", LVT_S32, offsetof(struct Object, oTTC2DRotatorIncrement), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTC2DRotatorMinTimeUntilNextTurn", LVT_S32, offsetof(struct Object, oTTC2DRotatorMinTimeUntilNextTurn), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTC2DRotatorRandomDirTimer", LVT_S32, offsetof(struct Object, oTTC2DRotatorRandomDirTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTC2DRotatorSpeed", LVT_S32, offsetof(struct Object, oTTC2DRotatorSpeed), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTC2DRotatorTargetYaw", LVT_S32, offsetof(struct Object, oTTC2DRotatorTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCChangeDirTimer", LVT_S32, offsetof(struct Object, oTTCChangeDirTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCCogDir", LVT_F32, offsetof(struct Object, oTTCCogDir), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCCogSpeed", LVT_F32, offsetof(struct Object, oTTCCogSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCCogTargetVel", LVT_F32, offsetof(struct Object, oTTCCogTargetVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCElevatorDir", LVT_F32, offsetof(struct Object, oTTCElevatorDir), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCElevatorMoveTime", LVT_S32, offsetof(struct Object, oTTCElevatorMoveTime), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCElevatorPeakY", LVT_F32, offsetof(struct Object, oTTCElevatorPeakY), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCMovingBarDelay", LVT_S32, offsetof(struct Object, oTTCMovingBarDelay), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCMovingBarOffset", LVT_F32, offsetof(struct Object, oTTCMovingBarOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCMovingBarSpeed", LVT_F32, offsetof(struct Object, oTTCMovingBarSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCMovingBarStartOffset", LVT_F32, offsetof(struct Object, oTTCMovingBarStartOffset), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCMovingBarStoppedTimer", LVT_S32, offsetof(struct Object, oTTCMovingBarStoppedTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCPendulumAccelDir", LVT_F32, offsetof(struct Object, oTTCPendulumAccelDir), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCPendulumAngle", LVT_F32, offsetof(struct Object, oTTCPendulumAngle), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCPendulumAngleAccel", LVT_F32, offsetof(struct Object, oTTCPendulumAngleAccel), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCPendulumAngleVel", LVT_F32, offsetof(struct Object, oTTCPendulumAngleVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCPendulumDelay", LVT_S32, offsetof(struct Object, oTTCPendulumDelay), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCPendulumSoundTimer", LVT_S32, offsetof(struct Object, oTTCPendulumSoundTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCPitBlockDir", LVT_S32, offsetof(struct Object, oTTCPitBlockDir), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCPitBlockPeakY", LVT_F32, offsetof(struct Object, oTTCPitBlockPeakY), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCPitBlockWaitTime", LVT_S32, offsetof(struct Object, oTTCPitBlockWaitTime), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCRotatingSolidNumSides", LVT_S32, offsetof(struct Object, oTTCRotatingSolidNumSides), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCRotatingSolidNumTurns", LVT_S32, offsetof(struct Object, oTTCRotatingSolidNumTurns), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCRotatingSolidRotationDelay", LVT_S32, offsetof(struct Object, oTTCRotatingSolidRotationDelay), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCRotatingSolidSoundTimer", LVT_S32, offsetof(struct Object, oTTCRotatingSolidSoundTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCRotatingSolidVelY", LVT_F32, offsetof(struct Object, oTTCRotatingSolidVelY), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCSpinnerDir", LVT_S32, offsetof(struct Object, oTTCSpinnerDir), false, LOT_NONE, 1, sizeof(s32) }, - { "oTTCTreadmillBigSurface", LVT_S16_P, offsetof(struct Object, oTTCTreadmillBigSurface), true, LOT_POINTER, 1, sizeof(s16*) }, - { "oTTCTreadmillSmallSurface", LVT_S16_P, offsetof(struct Object, oTTCTreadmillSmallSurface), true, LOT_POINTER, 1, sizeof(s16*) }, - { "oTTCTreadmillSpeed", LVT_F32, offsetof(struct Object, oTTCTreadmillSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCTreadmillTargetSpeed", LVT_F32, offsetof(struct Object, oTTCTreadmillTargetSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oTTCTreadmillTimeUntilSwitch", LVT_S32, offsetof(struct Object, oTTCTreadmillTimeUntilSwitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oThwompRandomTimer", LVT_S32, offsetof(struct Object, oThwompRandomTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oTiltingPyramidMarioOnPlatform", LVT_S32, offsetof(struct Object, oTiltingPyramidMarioOnPlatform), false, LOT_NONE, 1, sizeof(s32) }, - { "oTiltingPyramidNormalX", LVT_F32, offsetof(struct Object, oTiltingPyramidNormalX), false, LOT_NONE, 1, sizeof(f32) }, - { "oTiltingPyramidNormalY", LVT_F32, offsetof(struct Object, oTiltingPyramidNormalY), false, LOT_NONE, 1, sizeof(f32) }, - { "oTiltingPyramidNormalZ", LVT_F32, offsetof(struct Object, oTiltingPyramidNormalZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oTimer", LVT_S32, offsetof(struct Object, oTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oToadMessageDialogId", LVT_S32, offsetof(struct Object, oToadMessageDialogId), false, LOT_NONE, 1, sizeof(s32) }, - { "oToadMessageRecentlyTalked", LVT_S32, offsetof(struct Object, oToadMessageRecentlyTalked), false, LOT_NONE, 1, sizeof(s32) }, - { "oToadMessageState", LVT_S32, offsetof(struct Object, oToadMessageState), false, LOT_NONE, 1, sizeof(s32) }, -// { "oToxBoxMovementPattern", LVT_???, offsetof(struct Object, oToxBoxMovementPattern), false, LOT_???, 1, sizeof(void*) }, <--- UNIMPLEMENTED - { "oToxBoxMovementStep", LVT_S32, offsetof(struct Object, oToxBoxMovementStep), false, LOT_NONE, 1, sizeof(s32) }, - { "oTreasureChestCurrentAnswer", LVT_S32, offsetof(struct Object, oTreasureChestCurrentAnswer), false, LOT_NONE, 1, sizeof(s32) }, - { "oTreasureChestIsAboveWater", LVT_S32, offsetof(struct Object, oTreasureChestIsAboveWater), false, LOT_NONE, 1, sizeof(s32) }, - { "oTreasureChestIsLastInteractionIncorrect", LVT_S32, offsetof(struct Object, oTreasureChestIsLastInteractionIncorrect), false, LOT_NONE, 1, sizeof(s32) }, - { "oTreasureChestLastNetworkPlayerIndex", LVT_S16, offsetof(struct Object, oTreasureChestLastNetworkPlayerIndex), false, LOT_NONE, 1, sizeof(s16) }, - { "oTreasureChestSound", LVT_S32, offsetof(struct Object, oTreasureChestSound), false, LOT_NONE, 1, sizeof(s32) }, - { "oTreeSnowOrLeafUnkF4", LVT_S32, offsetof(struct Object, oTreeSnowOrLeafUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oTreeSnowOrLeafUnkF8", LVT_S32, offsetof(struct Object, oTreeSnowOrLeafUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oTreeSnowOrLeafUnkFC", LVT_S32, offsetof(struct Object, oTreeSnowOrLeafUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oTripletButterflyBaseYaw", LVT_F32, offsetof(struct Object, oTripletButterflyBaseYaw), false, LOT_NONE, 1, sizeof(f32) }, - { "oTripletButterflyModel", LVT_S32, offsetof(struct Object, oTripletButterflyModel), false, LOT_NONE, 1, sizeof(s32) }, - { "oTripletButterflyScale", LVT_F32, offsetof(struct Object, oTripletButterflyScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oTripletButterflyScalePhase", LVT_S32, offsetof(struct Object, oTripletButterflyScalePhase), false, LOT_NONE, 1, sizeof(s32) }, - { "oTripletButterflySelectedButterfly", LVT_S32, offsetof(struct Object, oTripletButterflySelectedButterfly), false, LOT_NONE, 1, sizeof(s32) }, - { "oTripletButterflySpeed", LVT_F32, offsetof(struct Object, oTripletButterflySpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oTripletButterflyTargetPitch", LVT_S32, offsetof(struct Object, oTripletButterflyTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oTripletButterflyTargetYaw", LVT_S32, offsetof(struct Object, oTripletButterflyTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oTripletButterflyType", LVT_S32, offsetof(struct Object, oTripletButterflyType), false, LOT_NONE, 1, sizeof(s32) }, - { "oTumblingBridgeUnkF4", LVT_S32, offsetof(struct Object, oTumblingBridgeUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oTweesterScaleTimer", LVT_S32, offsetof(struct Object, oTweesterScaleTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oTweesterUnused", LVT_S32, offsetof(struct Object, oTweesterUnused), false, LOT_NONE, 1, sizeof(s32) }, - { "oUkikiCageNextAction", LVT_S32, offsetof(struct Object, oUkikiCageNextAction), false, LOT_NONE, 1, sizeof(s32) }, - { "oUkikiCageSpinTimer", LVT_S16, offsetof(struct Object, oUkikiCageSpinTimer), false, LOT_NONE, 1, sizeof(s16) }, - { "oUkikiChaseFleeRange", LVT_F32, offsetof(struct Object, oUkikiChaseFleeRange), false, LOT_NONE, 1, sizeof(f32) }, - { "oUkikiHasCap", LVT_S16, offsetof(struct Object, oUkikiHasCap), false, LOT_NONE, 1, sizeof(s16) }, - { "oUkikiTauntCounter", LVT_S16, offsetof(struct Object, oUkikiTauntCounter), false, LOT_NONE, 1, sizeof(s16) }, - { "oUkikiTauntsToBeDone", LVT_S16, offsetof(struct Object, oUkikiTauntsToBeDone), false, LOT_NONE, 1, sizeof(s16) }, - { "oUkikiTextState", LVT_S16, offsetof(struct Object, oUkikiTextState), false, LOT_NONE, 1, sizeof(s16) }, - { "oUkikiTextboxTimer", LVT_S16, offsetof(struct Object, oUkikiTextboxTimer), false, LOT_NONE, 1, sizeof(s16) }, - { "oUnagiUnk110", LVT_F32, offsetof(struct Object, oUnagiUnk110), false, LOT_NONE, 1, sizeof(f32) }, - { "oUnagiUnk1AC", LVT_F32, offsetof(struct Object, oUnagiUnk1AC), false, LOT_NONE, 1, sizeof(f32) }, - { "oUnagiUnk1B0", LVT_S16, offsetof(struct Object, oUnagiUnk1B0), false, LOT_NONE, 1, sizeof(s16) }, - { "oUnagiUnk1B2", LVT_S16, offsetof(struct Object, oUnagiUnk1B2), false, LOT_NONE, 1, sizeof(s16) }, - { "oUnagiUnkF4", LVT_F32, offsetof(struct Object, oUnagiUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oUnagiUnkF8", LVT_F32, offsetof(struct Object, oUnagiUnkF8), false, LOT_NONE, 1, sizeof(f32) }, - { "oUnk1A8", LVT_U32, offsetof(struct Object, oUnk1A8), false, LOT_NONE, 1, sizeof(u32) }, - { "oUnk94", LVT_U32, offsetof(struct Object, oUnk94), false, LOT_NONE, 1, sizeof(u32) }, - { "oUnkBC", LVT_F32, offsetof(struct Object, oUnkBC), false, LOT_NONE, 1, sizeof(f32) }, - { "oUnkC0", LVT_F32, offsetof(struct Object, oUnkC0), false, LOT_NONE, 1, sizeof(f32) }, - { "oUnlockDoorStarState", LVT_U32, offsetof(struct Object, oUnlockDoorStarState), false, LOT_NONE, 1, sizeof(u32) }, - { "oUnlockDoorStarTimer", LVT_S32, offsetof(struct Object, oUnlockDoorStarTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oUnlockDoorStarYawVel", LVT_S32, offsetof(struct Object, oUnlockDoorStarYawVel), false, LOT_NONE, 1, sizeof(s32) }, - { "oVelX", LVT_F32, offsetof(struct Object, oVelX), false, LOT_NONE, 1, sizeof(f32) }, - { "oVelY", LVT_F32, offsetof(struct Object, oVelY), false, LOT_NONE, 1, sizeof(f32) }, - { "oVelZ", LVT_F32, offsetof(struct Object, oVelZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oWFSlidBrickPtfmMovVel", LVT_F32, offsetof(struct Object, oWFSlidBrickPtfmMovVel), false, LOT_NONE, 1, sizeof(f32) }, - { "oWallAngle", LVT_S32, offsetof(struct Object, oWallAngle), false, LOT_NONE, 1, sizeof(s32) }, - { "oWallHitboxRadius", LVT_F32, offsetof(struct Object, oWallHitboxRadius), false, LOT_NONE, 1, sizeof(f32) }, - { "oWaterBombNumBounces", LVT_F32, offsetof(struct Object, oWaterBombNumBounces), false, LOT_NONE, 1, sizeof(f32) }, - { "oWaterBombOnGround", LVT_S32, offsetof(struct Object, oWaterBombOnGround), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterBombSpawnerBombActive", LVT_S32, offsetof(struct Object, oWaterBombSpawnerBombActive), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterBombSpawnerTimeToSpawn", LVT_S32, offsetof(struct Object, oWaterBombSpawnerTimeToSpawn), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterBombStretchSpeed", LVT_F32, offsetof(struct Object, oWaterBombStretchSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oWaterBombVerticalStretch", LVT_F32, offsetof(struct Object, oWaterBombVerticalStretch), false, LOT_NONE, 1, sizeof(f32) }, - { "oWaterCannonUnk100", LVT_S32, offsetof(struct Object, oWaterCannonUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterCannonUnkF4", LVT_S32, offsetof(struct Object, oWaterCannonUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterCannonUnkF8", LVT_S32, offsetof(struct Object, oWaterCannonUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterCannonUnkFC", LVT_S32, offsetof(struct Object, oWaterCannonUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterLevelPillarDrained", LVT_S32, offsetof(struct Object, oWaterLevelPillarDrained), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterLevelTriggerTargetWaterLevel", LVT_S32, offsetof(struct Object, oWaterLevelTriggerTargetWaterLevel), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterLevelTriggerUnkF4", LVT_S32, offsetof(struct Object, oWaterLevelTriggerUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterObjUnk100", LVT_S32, offsetof(struct Object, oWaterObjUnk100), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterObjUnkF4", LVT_S32, offsetof(struct Object, oWaterObjUnkF4), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterObjUnkF8", LVT_S32, offsetof(struct Object, oWaterObjUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterObjUnkFC", LVT_S32, offsetof(struct Object, oWaterObjUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterRingAvgScale", LVT_F32, offsetof(struct Object, oWaterRingAvgScale), false, LOT_NONE, 1, sizeof(f32) }, - { "oWaterRingIndex", LVT_S32, offsetof(struct Object, oWaterRingIndex), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterRingMarioDistInFront", LVT_F32, offsetof(struct Object, oWaterRingMarioDistInFront), false, LOT_NONE, 1, sizeof(f32) }, - { "oWaterRingMgrLastRingCollected", LVT_S32, offsetof(struct Object, oWaterRingMgrLastRingCollected), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterRingMgrNextRingIndex", LVT_S32, offsetof(struct Object, oWaterRingMgrNextRingIndex), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterRingNormalX", LVT_F32, offsetof(struct Object, oWaterRingNormalX), false, LOT_NONE, 1, sizeof(f32) }, - { "oWaterRingNormalY", LVT_F32, offsetof(struct Object, oWaterRingNormalY), false, LOT_NONE, 1, sizeof(f32) }, - { "oWaterRingNormalZ", LVT_F32, offsetof(struct Object, oWaterRingNormalZ), false, LOT_NONE, 1, sizeof(f32) }, - { "oWaterRingScalePhaseX", LVT_S32, offsetof(struct Object, oWaterRingScalePhaseX), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterRingScalePhaseY", LVT_S32, offsetof(struct Object, oWaterRingScalePhaseY), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterRingScalePhaseZ", LVT_S32, offsetof(struct Object, oWaterRingScalePhaseZ), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaterRingSpawnerRingsCollected", LVT_S32, offsetof(struct Object, oWaterRingSpawnerRingsCollected), false, LOT_NONE, 1, sizeof(s32) }, - { "oWaveTrailSize", LVT_F32, offsetof(struct Object, oWaveTrailSize), false, LOT_NONE, 1, sizeof(f32) }, - { "oWhirlpoolInitFacePitch", LVT_S32, offsetof(struct Object, oWhirlpoolInitFacePitch), false, LOT_NONE, 1, sizeof(s32) }, - { "oWhirlpoolInitFaceRoll", LVT_S32, offsetof(struct Object, oWhirlpoolInitFaceRoll), false, LOT_NONE, 1, sizeof(s32) }, - { "oWhirlpoolTimeout", LVT_S32, offsetof(struct Object, oWhirlpoolTimeout), false, LOT_NONE, 1, sizeof(s32) }, - { "oWhitePuffUnkF4", LVT_F32, offsetof(struct Object, oWhitePuffUnkF4), false, LOT_NONE, 1, sizeof(f32) }, - { "oWhitePuffUnkF8", LVT_S32, offsetof(struct Object, oWhitePuffUnkF8), false, LOT_NONE, 1, sizeof(s32) }, - { "oWhitePuffUnkFC", LVT_S32, offsetof(struct Object, oWhitePuffUnkFC), false, LOT_NONE, 1, sizeof(s32) }, - { "oWhompShakeVal", LVT_S32, offsetof(struct Object, oWhompShakeVal), false, LOT_NONE, 1, sizeof(s32) }, - { "oWigglerFallThroughFloorsHeight", LVT_F32, offsetof(struct Object, oWigglerFallThroughFloorsHeight), false, LOT_NONE, 1, sizeof(f32) }, - { "oWigglerSegments", LVT_COBJECT_P, offsetof(struct Object, oWigglerSegments), true, LOT_CHAINSEGMENT, 1, sizeof(struct ChainSegment*) }, - { "oWigglerSquishSpeed", LVT_F32, offsetof(struct Object, oWigglerSquishSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oWigglerTargetYaw", LVT_S32, offsetof(struct Object, oWigglerTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "oWigglerTextStatus", LVT_S16, offsetof(struct Object, oWigglerTextStatus), false, LOT_NONE, 1, sizeof(s16) }, - { "oWigglerTimeUntilRandomTurn", LVT_S32, offsetof(struct Object, oWigglerTimeUntilRandomTurn), false, LOT_NONE, 1, sizeof(s32) }, - { "oWigglerUnused", LVT_S16, offsetof(struct Object, oWigglerUnused), false, LOT_NONE, 1, sizeof(s16) }, - { "oWigglerWalkAnimSpeed", LVT_F32, offsetof(struct Object, oWigglerWalkAnimSpeed), false, LOT_NONE, 1, sizeof(f32) }, - { "oWigglerWalkAwayFromWallTimer", LVT_S32, offsetof(struct Object, oWigglerWalkAwayFromWallTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oWoodenPostMarioPounding", LVT_S32, offsetof(struct Object, oWoodenPostMarioPounding), false, LOT_NONE, 1, sizeof(s32) }, - { "oWoodenPostOffsetY", LVT_F32, offsetof(struct Object, oWoodenPostOffsetY), false, LOT_NONE, 1, sizeof(f32) }, - { "oWoodenPostPrevAngleToMario", LVT_S32, offsetof(struct Object, oWoodenPostPrevAngleToMario), false, LOT_NONE, 1, sizeof(s32) }, - { "oWoodenPostSpeedY", LVT_F32, offsetof(struct Object, oWoodenPostSpeedY), false, LOT_NONE, 1, sizeof(f32) }, - { "oWoodenPostTotalMarioAngle", LVT_S32, offsetof(struct Object, oWoodenPostTotalMarioAngle), false, LOT_NONE, 1, sizeof(s32) }, - { "oYoshiBlinkTimer", LVT_S32, offsetof(struct Object, oYoshiBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, - { "oYoshiChosenHome", LVT_S32, offsetof(struct Object, oYoshiChosenHome), false, LOT_NONE, 1, sizeof(s32) }, - { "oYoshiTargetYaw", LVT_S32, offsetof(struct Object, oYoshiTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, - { "parentObj", LVT_COBJECT_P, offsetof(struct Object, parentObj), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "platform", LVT_COBJECT_P, offsetof(struct Object, platform), false, LOT_OBJECT, 1, sizeof(struct Object*) }, - { "prevObj", LVT_COBJECT_P, offsetof(struct Object, prevObj), false, LOT_OBJECT, 1, sizeof(struct Object*) }, -// { "ptrData", LVT_???, offsetof(struct Object, ptrData), false, LOT_???, 1, sizeof(union { ... }) }, <--- UNIMPLEMENTED -// { "rawData", LVT_???, offsetof(struct Object, rawData), false, LOT_???, 1, sizeof(union { ... }) }, <--- UNIMPLEMENTED -// { "respawnInfo", LVT_???, offsetof(struct Object, respawnInfo), false, LOT_???, 1, sizeof(void*) }, <--- UNIMPLEMENTED - { "respawnInfoType", LVT_S16, offsetof(struct Object, respawnInfoType), true, LOT_NONE, 1, sizeof(s16) }, - { "setHome", LVT_U8, offsetof(struct Object, setHome), false, LOT_NONE, 1, sizeof(u8) }, - { "transform", LVT_COBJECT, offsetof(struct Object, transform), true, LOT_MAT4, 1, sizeof(Mat4) }, - { "unused1", LVT_U32, offsetof(struct Object, unused1), false, LOT_NONE, 1, sizeof(u32) }, - { "usingObj", LVT_COBJECT_P, offsetof(struct Object, usingObj), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oCoinUnkF4", LVT_S32, offsetof(struct Object, oCoinUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oCoinUnkF8", LVT_S32, offsetof(struct Object, oCoinUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oCollisionDistance", LVT_F32, offsetof(struct Object, oCollisionDistance), false, LOT_NONE, 1, sizeof(f32) }, + { "oCollisionParticleUnkF4", LVT_F32, offsetof(struct Object, oCollisionParticleUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oControllablePlatformUnk100", LVT_S32, offsetof(struct Object, oControllablePlatformUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oControllablePlatformUnkF8", LVT_S32, offsetof(struct Object, oControllablePlatformUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oControllablePlatformUnkFC", LVT_F32, offsetof(struct Object, oControllablePlatformUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oDDDPoleMaxOffset", LVT_F32, offsetof(struct Object, oDDDPoleMaxOffset), false, LOT_NONE, 1, sizeof(f32) }, + { "oDDDPoleOffset", LVT_F32, offsetof(struct Object, oDDDPoleOffset), false, LOT_NONE, 1, sizeof(f32) }, + { "oDDDPoleVel", LVT_F32, offsetof(struct Object, oDDDPoleVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oDamageOrCoinValue", LVT_S32, offsetof(struct Object, oDamageOrCoinValue), false, LOT_NONE, 1, sizeof(s32) }, + { "oDeathSound", LVT_S32, offsetof(struct Object, oDeathSound), false, LOT_NONE, 1, sizeof(s32) }, + { "oDialogResponse", LVT_S16, offsetof(struct Object, oDialogResponse), false, LOT_NONE, 1, sizeof(s16) }, + { "oDialogState", LVT_S16, offsetof(struct Object, oDialogState), false, LOT_NONE, 1, sizeof(s16) }, + { "oDistanceToMario", LVT_F32, offsetof(struct Object, oDistanceToMario), false, LOT_NONE, 1, sizeof(f32) }, + { "oDonutPlatformSpawnerSpawnedPlatforms", LVT_S32, offsetof(struct Object, oDonutPlatformSpawnerSpawnedPlatforms), false, LOT_NONE, 1, sizeof(s32) }, + { "oDoorUnk100", LVT_S32, offsetof(struct Object, oDoorUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oDoorUnk88", LVT_S32, offsetof(struct Object, oDoorUnk88), false, LOT_NONE, 1, sizeof(s32) }, + { "oDoorUnkF8", LVT_S32, offsetof(struct Object, oDoorUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oDoorUnkFC", LVT_S32, offsetof(struct Object, oDoorUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oDorrieAngleToHome", LVT_S16, offsetof(struct Object, oDorrieAngleToHome), false, LOT_NONE, 1, sizeof(s16) }, + { "oDorrieDistToHome", LVT_F32, offsetof(struct Object, oDorrieDistToHome), false, LOT_NONE, 1, sizeof(f32) }, + { "oDorrieForwardDistToMario", LVT_F32, offsetof(struct Object, oDorrieForwardDistToMario), false, LOT_NONE, 1, sizeof(f32) }, + { "oDorrieGroundPounded", LVT_S16, offsetof(struct Object, oDorrieGroundPounded), false, LOT_NONE, 1, sizeof(s16) }, + { "oDorrieHeadRaiseSpeed", LVT_S16, offsetof(struct Object, oDorrieHeadRaiseSpeed), false, LOT_NONE, 1, sizeof(s16) }, + { "oDorrieLiftingMario", LVT_S32, offsetof(struct Object, oDorrieLiftingMario), false, LOT_NONE, 1, sizeof(s32) }, + { "oDorrieNeckAngle", LVT_S16, offsetof(struct Object, oDorrieNeckAngle), false, LOT_NONE, 1, sizeof(s16) }, + { "oDorrieOffsetY", LVT_F32, offsetof(struct Object, oDorrieOffsetY), false, LOT_NONE, 1, sizeof(f32) }, + { "oDorrieVelY", LVT_F32, offsetof(struct Object, oDorrieVelY), false, LOT_NONE, 1, sizeof(f32) }, + { "oDorrieYawVel", LVT_S32, offsetof(struct Object, oDorrieYawVel), false, LOT_NONE, 1, sizeof(s32) }, + { "oDragStrength", LVT_F32, offsetof(struct Object, oDragStrength), false, LOT_NONE, 1, sizeof(f32) }, + { "oDrawingDistance", LVT_F32, offsetof(struct Object, oDrawingDistance), false, LOT_NONE, 1, sizeof(f32) }, + { "oElevatorUnk100", LVT_S32, offsetof(struct Object, oElevatorUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oElevatorUnkF4", LVT_F32, offsetof(struct Object, oElevatorUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oElevatorUnkF8", LVT_F32, offsetof(struct Object, oElevatorUnkF8), false, LOT_NONE, 1, sizeof(f32) }, + { "oElevatorUnkFC", LVT_F32, offsetof(struct Object, oElevatorUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oEndBirdUnk104", LVT_F32, offsetof(struct Object, oEndBirdUnk104), false, LOT_NONE, 1, sizeof(f32) }, + { "oEnemyLakituBlinkTimer", LVT_S32, offsetof(struct Object, oEnemyLakituBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oEnemyLakituFaceForwardCountdown", LVT_S32, offsetof(struct Object, oEnemyLakituFaceForwardCountdown), false, LOT_NONE, 1, sizeof(s32) }, + { "oEnemyLakituNumSpinies", LVT_S32, offsetof(struct Object, oEnemyLakituNumSpinies), false, LOT_NONE, 1, sizeof(s32) }, + { "oEnemyLakituSpinyCooldown", LVT_S32, offsetof(struct Object, oEnemyLakituSpinyCooldown), false, LOT_NONE, 1, sizeof(s32) }, + { "oExclamationBoxForce", LVT_S32, offsetof(struct Object, oExclamationBoxForce), false, LOT_NONE, 1, sizeof(s32) }, + { "oExclamationBoxUnkF4", LVT_F32, offsetof(struct Object, oExclamationBoxUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oExclamationBoxUnkF8", LVT_F32, offsetof(struct Object, oExclamationBoxUnkF8), false, LOT_NONE, 1, sizeof(f32) }, + { "oExclamationBoxUnkFC", LVT_S32, offsetof(struct Object, oExclamationBoxUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oEyerokBossActiveHand", LVT_S32, offsetof(struct Object, oEyerokBossActiveHand), false, LOT_NONE, 1, sizeof(s32) }, + { "oEyerokBossNumHands", LVT_S32, offsetof(struct Object, oEyerokBossNumHands), false, LOT_NONE, 1, sizeof(s32) }, + { "oEyerokBossUnk104", LVT_S32, offsetof(struct Object, oEyerokBossUnk104), false, LOT_NONE, 1, sizeof(s32) }, + { "oEyerokBossUnk108", LVT_F32, offsetof(struct Object, oEyerokBossUnk108), false, LOT_NONE, 1, sizeof(f32) }, + { "oEyerokBossUnk10C", LVT_F32, offsetof(struct Object, oEyerokBossUnk10C), false, LOT_NONE, 1, sizeof(f32) }, + { "oEyerokBossUnk110", LVT_F32, offsetof(struct Object, oEyerokBossUnk110), false, LOT_NONE, 1, sizeof(f32) }, + { "oEyerokBossUnk1AC", LVT_S32, offsetof(struct Object, oEyerokBossUnk1AC), false, LOT_NONE, 1, sizeof(s32) }, + { "oEyerokBossUnkFC", LVT_S32, offsetof(struct Object, oEyerokBossUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oEyerokHandDead", LVT_S32, offsetof(struct Object, oEyerokHandDead), false, LOT_NONE, 1, sizeof(s32) }, + { "oEyerokHandUnk100", LVT_S32, offsetof(struct Object, oEyerokHandUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oEyerokHandUnkFC", LVT_S32, offsetof(struct Object, oEyerokHandUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oEyerokHandWakeUpTimer", LVT_S32, offsetof(struct Object, oEyerokHandWakeUpTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oEyerokReceivedAttack", LVT_S32, offsetof(struct Object, oEyerokReceivedAttack), false, LOT_NONE, 1, sizeof(s32) }, + { "oFaceAnglePitch", LVT_S32, offsetof(struct Object, oFaceAnglePitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oFaceAngleRoll", LVT_S32, offsetof(struct Object, oFaceAngleRoll), false, LOT_NONE, 1, sizeof(s32) }, + { "oFaceAngleYaw", LVT_S32, offsetof(struct Object, oFaceAngleYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oFallingPillarPitchAcceleration", LVT_F32, offsetof(struct Object, oFallingPillarPitchAcceleration), false, LOT_NONE, 1, sizeof(f32) }, + { "oFirePiranhaPlantActive", LVT_S32, offsetof(struct Object, oFirePiranhaPlantActive), false, LOT_NONE, 1, sizeof(s32) }, + { "oFirePiranhaPlantDeathSpinTimer", LVT_S32, offsetof(struct Object, oFirePiranhaPlantDeathSpinTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oFirePiranhaPlantDeathSpinVel", LVT_F32, offsetof(struct Object, oFirePiranhaPlantDeathSpinVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oFirePiranhaPlantNeutralScale", LVT_F32, offsetof(struct Object, oFirePiranhaPlantNeutralScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oFirePiranhaPlantScale", LVT_F32, offsetof(struct Object, oFirePiranhaPlantScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oFireSpitterLastWaterY", LVT_F32, offsetof(struct Object, oFireSpitterLastWaterY), false, LOT_NONE, 1, sizeof(f32) }, + { "oFireSpitterScaleVel", LVT_F32, offsetof(struct Object, oFireSpitterScaleVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oFishActiveDistance", LVT_F32, offsetof(struct Object, oFishActiveDistance), false, LOT_NONE, 1, sizeof(f32) }, + { "oFishDepthDistance", LVT_F32, offsetof(struct Object, oFishDepthDistance), false, LOT_NONE, 1, sizeof(f32) }, + { "oFishGoalVel", LVT_F32, offsetof(struct Object, oFishGoalVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oFishGoalY", LVT_F32, offsetof(struct Object, oFishGoalY), false, LOT_NONE, 1, sizeof(f32) }, + { "oFishHeightOffset", LVT_F32, offsetof(struct Object, oFishHeightOffset), false, LOT_NONE, 1, sizeof(f32) }, + { "oFishRoamDistance", LVT_F32, offsetof(struct Object, oFishRoamDistance), false, LOT_NONE, 1, sizeof(f32) }, + { "oFishWaterLevel", LVT_F32, offsetof(struct Object, oFishWaterLevel), false, LOT_NONE, 1, sizeof(f32) }, + { "oFishYawVel", LVT_S32, offsetof(struct Object, oFishYawVel), false, LOT_NONE, 1, sizeof(s32) }, + { "oFlags", LVT_U32, offsetof(struct Object, oFlags), false, LOT_NONE, 1, sizeof(u32) }, + { "oFlameBowser", LVT_COBJECT_P, offsetof(struct Object, oFlameBowser), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oFlameScale", LVT_F32, offsetof(struct Object, oFlameScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oFlameSpeedTimerOffset", LVT_S32, offsetof(struct Object, oFlameSpeedTimerOffset), false, LOT_NONE, 1, sizeof(s32) }, + { "oFlameThowerFlameUnk110", LVT_S32, offsetof(struct Object, oFlameThowerFlameUnk110), false, LOT_NONE, 1, sizeof(s32) }, + { "oFlameThowerUnk110", LVT_S32, offsetof(struct Object, oFlameThowerUnk110), false, LOT_NONE, 1, sizeof(s32) }, + { "oFlameUnkFC", LVT_F32, offsetof(struct Object, oFlameUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oFloatingPlatformUnk100", LVT_S32, offsetof(struct Object, oFloatingPlatformUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oFloatingPlatformUnkF4", LVT_S32, offsetof(struct Object, oFloatingPlatformUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oFloatingPlatformUnkF8", LVT_F32, offsetof(struct Object, oFloatingPlatformUnkF8), false, LOT_NONE, 1, sizeof(f32) }, + { "oFloatingPlatformUnkFC", LVT_F32, offsetof(struct Object, oFloatingPlatformUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oFloor", LVT_COBJECT_P, offsetof(struct Object, oFloor), false, LOT_SURFACE, 1, sizeof(struct Surface*) }, + { "oFloorHeight", LVT_F32, offsetof(struct Object, oFloorHeight), false, LOT_NONE, 1, sizeof(f32) }, + { "oFloorRoom", LVT_S16, offsetof(struct Object, oFloorRoom), false, LOT_NONE, 1, sizeof(s16) }, + { "oFloorSwitchPressAnimationUnk100", LVT_S32, offsetof(struct Object, oFloorSwitchPressAnimationUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oFloorSwitchPressAnimationUnkF4", LVT_S32, offsetof(struct Object, oFloorSwitchPressAnimationUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oFloorSwitchPressAnimationUnkF8", LVT_S32, offsetof(struct Object, oFloorSwitchPressAnimationUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oFloorSwitchPressAnimationUnkFC", LVT_S32, offsetof(struct Object, oFloorSwitchPressAnimationUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oFloorType", LVT_S16, offsetof(struct Object, oFloorType), false, LOT_NONE, 1, sizeof(s16) }, + { "oFlyGuyIdleTimer", LVT_S32, offsetof(struct Object, oFlyGuyIdleTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oFlyGuyLungeTargetPitch", LVT_S32, offsetof(struct Object, oFlyGuyLungeTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oFlyGuyLungeYDecel", LVT_F32, offsetof(struct Object, oFlyGuyLungeYDecel), false, LOT_NONE, 1, sizeof(f32) }, + { "oFlyGuyOscTimer", LVT_S32, offsetof(struct Object, oFlyGuyOscTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oFlyGuyScaleVel", LVT_F32, offsetof(struct Object, oFlyGuyScaleVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oFlyGuyTargetRoll", LVT_S32, offsetof(struct Object, oFlyGuyTargetRoll), false, LOT_NONE, 1, sizeof(s32) }, + { "oFlyGuyUnusedJitter", LVT_S32, offsetof(struct Object, oFlyGuyUnusedJitter), false, LOT_NONE, 1, sizeof(s32) }, + { "oForwardVel", LVT_F32, offsetof(struct Object, oForwardVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oForwardVelS32", LVT_S32, offsetof(struct Object, oForwardVelS32), false, LOT_NONE, 1, sizeof(s32) }, + { "oFriction", LVT_F32, offsetof(struct Object, oFriction), false, LOT_NONE, 1, sizeof(f32) }, + { "oGoombaBlinkTimer", LVT_S32, offsetof(struct Object, oGoombaBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oGoombaJumpCooldown", LVT_U32, offsetof(struct Object, oGoombaJumpCooldown), false, LOT_NONE, 1, sizeof(u32) }, + { "oGoombaRelativeSpeed", LVT_F32, offsetof(struct Object, oGoombaRelativeSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oGoombaScale", LVT_F32, offsetof(struct Object, oGoombaScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oGoombaSize", LVT_S32, offsetof(struct Object, oGoombaSize), false, LOT_NONE, 1, sizeof(s32) }, + { "oGoombaTargetYaw", LVT_S32, offsetof(struct Object, oGoombaTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oGoombaTurningAwayFromWall", LVT_S32, offsetof(struct Object, oGoombaTurningAwayFromWall), false, LOT_NONE, 1, sizeof(s32) }, + { "oGoombaWalkTimer", LVT_S32, offsetof(struct Object, oGoombaWalkTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oGrandStarUnk108", LVT_S32, offsetof(struct Object, oGrandStarUnk108), false, LOT_NONE, 1, sizeof(s32) }, + { "oGraphYOffset", LVT_F32, offsetof(struct Object, oGraphYOffset), false, LOT_NONE, 1, sizeof(f32) }, + { "oGravity", LVT_F32, offsetof(struct Object, oGravity), false, LOT_NONE, 1, sizeof(f32) }, + { "oHauntedBookshelfShouldOpen", LVT_S32, offsetof(struct Object, oHauntedBookshelfShouldOpen), false, LOT_NONE, 1, sizeof(s32) }, + { "oHauntedChairUnk100", LVT_S32_P, offsetof(struct Object, oHauntedChairUnk100), true, LOT_POINTER, 1, sizeof(s32*) }, + { "oHauntedChairUnk104", LVT_S32, offsetof(struct Object, oHauntedChairUnk104), false, LOT_NONE, 1, sizeof(s32) }, + { "oHauntedChairUnkF4", LVT_S32, offsetof(struct Object, oHauntedChairUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oHauntedChairUnkF8", LVT_F32, offsetof(struct Object, oHauntedChairUnkF8), false, LOT_NONE, 1, sizeof(f32) }, + { "oHauntedChairUnkFC", LVT_F32, offsetof(struct Object, oHauntedChairUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oHealth", LVT_S32, offsetof(struct Object, oHealth), false, LOT_NONE, 1, sizeof(s32) }, + { "oHeaveHoUnk88", LVT_S32, offsetof(struct Object, oHeaveHoUnk88), false, LOT_NONE, 1, sizeof(s32) }, + { "oHeaveHoUnkF4", LVT_F32, offsetof(struct Object, oHeaveHoUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oHeldState", LVT_U32, offsetof(struct Object, oHeldState), false, LOT_NONE, 1, sizeof(u32) }, + { "oHiddenBlueCoinSwitch", LVT_COBJECT_P, offsetof(struct Object, oHiddenBlueCoinSwitch), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oHiddenObjectUnkF4", LVT_COBJECT_P, offsetof(struct Object, oHiddenObjectUnkF4), false, LOT_OBJECT, 1, sizeof(struct Object*) }, +// { "oHiddenStarLastInteractedObject", LVT_???, offsetof(struct Object, oHiddenStarLastInteractedObject), false, LOT_???, 1, sizeof(void*) }, <--- UNIMPLEMENTED + { "oHiddenStarTriggerCounter", LVT_S32, offsetof(struct Object, oHiddenStarTriggerCounter), false, LOT_NONE, 1, sizeof(s32) }, + { "oHomeX", LVT_F32, offsetof(struct Object, oHomeX), false, LOT_NONE, 1, sizeof(f32) }, + { "oHomeY", LVT_F32, offsetof(struct Object, oHomeY), false, LOT_NONE, 1, sizeof(f32) }, + { "oHomeZ", LVT_F32, offsetof(struct Object, oHomeZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oHomingAmpAvgY", LVT_F32, offsetof(struct Object, oHomingAmpAvgY), false, LOT_NONE, 1, sizeof(f32) }, + { "oHomingAmpLockedOn", LVT_S32, offsetof(struct Object, oHomingAmpLockedOn), false, LOT_NONE, 1, sizeof(s32) }, + { "oHootAvailability", LVT_S32, offsetof(struct Object, oHootAvailability), false, LOT_NONE, 1, sizeof(s32) }, + { "oHootMarioReleaseTime", LVT_S32, offsetof(struct Object, oHootMarioReleaseTime), false, LOT_NONE, 1, sizeof(s32) }, + { "oHorizontalGrindelDistToHome", LVT_F32, offsetof(struct Object, oHorizontalGrindelDistToHome), false, LOT_NONE, 1, sizeof(f32) }, + { "oHorizontalGrindelOnGround", LVT_S32, offsetof(struct Object, oHorizontalGrindelOnGround), false, LOT_NONE, 1, sizeof(s32) }, + { "oHorizontalGrindelTargetYaw", LVT_S32, offsetof(struct Object, oHorizontalGrindelTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oHorizontalMovementUnk100", LVT_F32, offsetof(struct Object, oHorizontalMovementUnk100), false, LOT_NONE, 1, sizeof(f32) }, + { "oHorizontalMovementUnk104", LVT_S32, offsetof(struct Object, oHorizontalMovementUnk104), false, LOT_NONE, 1, sizeof(s32) }, + { "oHorizontalMovementUnk108", LVT_F32, offsetof(struct Object, oHorizontalMovementUnk108), false, LOT_NONE, 1, sizeof(f32) }, + { "oHorizontalMovementUnkF4", LVT_S32, offsetof(struct Object, oHorizontalMovementUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oHorizontalMovementUnkF8", LVT_S32, offsetof(struct Object, oHorizontalMovementUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oIntangibleTimer", LVT_S32, offsetof(struct Object, oIntangibleTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oInteractStatus", LVT_S32, offsetof(struct Object, oInteractStatus), false, LOT_NONE, 1, sizeof(s32) }, + { "oInteractType", LVT_U32, offsetof(struct Object, oInteractType), false, LOT_NONE, 1, sizeof(u32) }, + { "oInteractionSubtype", LVT_U32, offsetof(struct Object, oInteractionSubtype), false, LOT_NONE, 1, sizeof(u32) }, + { "oIntroLakituCloud", LVT_COBJECT_P, offsetof(struct Object, oIntroLakituCloud), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oIntroLakituSplineSegment", LVT_F32, offsetof(struct Object, oIntroLakituSplineSegment), false, LOT_NONE, 1, sizeof(f32) }, + { "oIntroLakituSplineSegmentProgress", LVT_F32, offsetof(struct Object, oIntroLakituSplineSegmentProgress), false, LOT_NONE, 1, sizeof(f32) }, + { "oIntroLakituUnk100", LVT_F32, offsetof(struct Object, oIntroLakituUnk100), false, LOT_NONE, 1, sizeof(f32) }, + { "oIntroLakituUnk104", LVT_F32, offsetof(struct Object, oIntroLakituUnk104), false, LOT_NONE, 1, sizeof(f32) }, + { "oIntroLakituUnk108", LVT_F32, offsetof(struct Object, oIntroLakituUnk108), false, LOT_NONE, 1, sizeof(f32) }, + { "oIntroLakituUnk10C", LVT_F32, offsetof(struct Object, oIntroLakituUnk10C), false, LOT_NONE, 1, sizeof(f32) }, + { "oIntroLakituUnk110", LVT_F32, offsetof(struct Object, oIntroLakituUnk110), false, LOT_NONE, 1, sizeof(f32) }, + { "oIntroPeachDistToCamera", LVT_F32, offsetof(struct Object, oIntroPeachDistToCamera), false, LOT_NONE, 1, sizeof(f32) }, + { "oIntroPeachPitchFromFocus", LVT_F32, offsetof(struct Object, oIntroPeachPitchFromFocus), false, LOT_NONE, 1, sizeof(f32) }, + { "oIntroPeachYawFromFocus", LVT_F32, offsetof(struct Object, oIntroPeachYawFromFocus), false, LOT_NONE, 1, sizeof(f32) }, + { "oJrbSlidingBoxUnkF4", LVT_COBJECT_P, offsetof(struct Object, oJrbSlidingBoxUnkF4), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oJrbSlidingBoxUnkF8", LVT_S32, offsetof(struct Object, oJrbSlidingBoxUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oJrbSlidingBoxUnkFC", LVT_F32, offsetof(struct Object, oJrbSlidingBoxUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oJumpingBoxUnkF4", LVT_S32, offsetof(struct Object, oJumpingBoxUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oJumpingBoxUnkF8", LVT_S32, offsetof(struct Object, oJumpingBoxUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oKickableBoardF4", LVT_S32, offsetof(struct Object, oKickableBoardF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oKickableBoardF8", LVT_S32, offsetof(struct Object, oKickableBoardF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oKingBobombUnk100", LVT_S32, offsetof(struct Object, oKingBobombUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oKingBobombUnk104", LVT_S32, offsetof(struct Object, oKingBobombUnk104), false, LOT_NONE, 1, sizeof(s32) }, + { "oKingBobombUnk108", LVT_S32, offsetof(struct Object, oKingBobombUnk108), false, LOT_NONE, 1, sizeof(s32) }, + { "oKingBobombUnk88", LVT_S32, offsetof(struct Object, oKingBobombUnk88), false, LOT_NONE, 1, sizeof(s32) }, + { "oKingBobombUnkF8", LVT_S32, offsetof(struct Object, oKingBobombUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oKingBobombUnkFC", LVT_S32, offsetof(struct Object, oKingBobombUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oKleptoDistanceToTarget", LVT_F32, offsetof(struct Object, oKleptoDistanceToTarget), false, LOT_NONE, 1, sizeof(f32) }, + { "oKleptoSpeed", LVT_F32, offsetof(struct Object, oKleptoSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oKleptoStartPosX", LVT_F32, offsetof(struct Object, oKleptoStartPosX), false, LOT_NONE, 1, sizeof(f32) }, + { "oKleptoStartPosY", LVT_F32, offsetof(struct Object, oKleptoStartPosY), false, LOT_NONE, 1, sizeof(f32) }, + { "oKleptoStartPosZ", LVT_F32, offsetof(struct Object, oKleptoStartPosZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oKleptoTargetNumber", LVT_S16, offsetof(struct Object, oKleptoTargetNumber), false, LOT_NONE, 1, sizeof(s16) }, + { "oKleptoTimeUntilTargetChange", LVT_S32, offsetof(struct Object, oKleptoTimeUntilTargetChange), false, LOT_NONE, 1, sizeof(s32) }, + { "oKleptoUnk1AE", LVT_S16, offsetof(struct Object, oKleptoUnk1AE), false, LOT_NONE, 1, sizeof(s16) }, + { "oKleptoUnk1B0", LVT_S16, offsetof(struct Object, oKleptoUnk1B0), false, LOT_NONE, 1, sizeof(s16) }, + { "oKleptoUnkF8", LVT_F32, offsetof(struct Object, oKleptoUnkF8), false, LOT_NONE, 1, sizeof(f32) }, + { "oKleptoUnkFC", LVT_F32, offsetof(struct Object, oKleptoUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oKleptoYawToTarget", LVT_S16, offsetof(struct Object, oKleptoYawToTarget), false, LOT_NONE, 1, sizeof(s16) }, + { "oKoopaAgility", LVT_F32, offsetof(struct Object, oKoopaAgility), false, LOT_NONE, 1, sizeof(f32) }, + { "oKoopaAngleToMario", LVT_S32, offsetof(struct Object, oKoopaAngleToMario), false, LOT_NONE, 1, sizeof(s32) }, + { "oKoopaBlinkTimer", LVT_S32, offsetof(struct Object, oKoopaBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oKoopaCountdown", LVT_S16, offsetof(struct Object, oKoopaCountdown), false, LOT_NONE, 1, sizeof(s16) }, + { "oKoopaDistanceToMario", LVT_F32, offsetof(struct Object, oKoopaDistanceToMario), false, LOT_NONE, 1, sizeof(f32) }, + { "oKoopaMovementType", LVT_S32, offsetof(struct Object, oKoopaMovementType), false, LOT_NONE, 1, sizeof(s32) }, + { "oKoopaRaceEndpointKoopaFinished", LVT_S32, offsetof(struct Object, oKoopaRaceEndpointKoopaFinished), false, LOT_NONE, 1, sizeof(s32) }, + { "oKoopaRaceEndpointRaceBegun", LVT_S32, offsetof(struct Object, oKoopaRaceEndpointRaceBegun), false, LOT_NONE, 1, sizeof(s32) }, + { "oKoopaRaceEndpointRaceEnded", LVT_S32, offsetof(struct Object, oKoopaRaceEndpointRaceEnded), false, LOT_NONE, 1, sizeof(s32) }, + { "oKoopaRaceEndpointRaceStatus", LVT_S32, offsetof(struct Object, oKoopaRaceEndpointRaceStatus), false, LOT_NONE, 1, sizeof(s32) }, + { "oKoopaRaceEndpointUnk100", LVT_S32, offsetof(struct Object, oKoopaRaceEndpointUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oKoopaShellFlameUnkF4", LVT_F32, offsetof(struct Object, oKoopaShellFlameUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oKoopaShellFlameUnkF8", LVT_F32, offsetof(struct Object, oKoopaShellFlameUnkF8), false, LOT_NONE, 1, sizeof(f32) }, + { "oKoopaTargetYaw", LVT_S32, offsetof(struct Object, oKoopaTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oKoopaTheQuickInitTextboxCooldown", LVT_S16, offsetof(struct Object, oKoopaTheQuickInitTextboxCooldown), false, LOT_NONE, 1, sizeof(s16) }, + { "oKoopaTheQuickRaceIndex", LVT_S16, offsetof(struct Object, oKoopaTheQuickRaceIndex), false, LOT_NONE, 1, sizeof(s16) }, + { "oKoopaTurningAwayFromWall", LVT_S32, offsetof(struct Object, oKoopaTurningAwayFromWall), false, LOT_NONE, 1, sizeof(s32) }, + { "oKoopaUnshelledTimeUntilTurn", LVT_S32, offsetof(struct Object, oKoopaUnshelledTimeUntilTurn), false, LOT_NONE, 1, sizeof(s32) }, + { "oLightID", LVT_S32, offsetof(struct Object, oLightID), false, LOT_NONE, 1, sizeof(s32) }, + { "oLllRotatingHexFlameUnkF4", LVT_F32, offsetof(struct Object, oLllRotatingHexFlameUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oLllRotatingHexFlameUnkF8", LVT_F32, offsetof(struct Object, oLllRotatingHexFlameUnkF8), false, LOT_NONE, 1, sizeof(f32) }, + { "oLllRotatingHexFlameUnkFC", LVT_F32, offsetof(struct Object, oLllRotatingHexFlameUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oLllWoodPieceOscillationTimer", LVT_S32, offsetof(struct Object, oLllWoodPieceOscillationTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oMacroUnk108", LVT_F32, offsetof(struct Object, oMacroUnk108), false, LOT_NONE, 1, sizeof(f32) }, + { "oMacroUnk10C", LVT_F32, offsetof(struct Object, oMacroUnk10C), false, LOT_NONE, 1, sizeof(f32) }, + { "oMacroUnk110", LVT_F32, offsetof(struct Object, oMacroUnk110), false, LOT_NONE, 1, sizeof(f32) }, + { "oMantaTargetPitch", LVT_S32, offsetof(struct Object, oMantaTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oMantaTargetYaw", LVT_S32, offsetof(struct Object, oMantaTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioBurnTimer", LVT_S32, offsetof(struct Object, oMarioBurnTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioCannonInputYaw", LVT_S32, offsetof(struct Object, oMarioCannonInputYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioCannonObjectYaw", LVT_S32, offsetof(struct Object, oMarioCannonObjectYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioJumboStarCutscenePosZ", LVT_F32, offsetof(struct Object, oMarioJumboStarCutscenePosZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oMarioLongJumpIsSlow", LVT_S32, offsetof(struct Object, oMarioLongJumpIsSlow), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioParticleFlags", LVT_S32, offsetof(struct Object, oMarioParticleFlags), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioPolePos", LVT_F32, offsetof(struct Object, oMarioPolePos), false, LOT_NONE, 1, sizeof(f32) }, + { "oMarioPoleUnk108", LVT_S32, offsetof(struct Object, oMarioPoleUnk108), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioPoleYawVel", LVT_S32, offsetof(struct Object, oMarioPoleYawVel), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioReadingSignDPosX", LVT_F32, offsetof(struct Object, oMarioReadingSignDPosX), false, LOT_NONE, 1, sizeof(f32) }, + { "oMarioReadingSignDPosZ", LVT_F32, offsetof(struct Object, oMarioReadingSignDPosZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oMarioReadingSignDYaw", LVT_S32, offsetof(struct Object, oMarioReadingSignDYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioSteepJumpYaw", LVT_S32, offsetof(struct Object, oMarioSteepJumpYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioTornadoPosY", LVT_F32, offsetof(struct Object, oMarioTornadoPosY), false, LOT_NONE, 1, sizeof(f32) }, + { "oMarioTornadoYawVel", LVT_S32, offsetof(struct Object, oMarioTornadoYawVel), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioWalkingPitch", LVT_S32, offsetof(struct Object, oMarioWalkingPitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oMarioWhirlpoolPosY", LVT_F32, offsetof(struct Object, oMarioWhirlpoolPosY), false, LOT_NONE, 1, sizeof(f32) }, + { "oMenuButtonActionPhase", LVT_S32, offsetof(struct Object, oMenuButtonActionPhase), false, LOT_NONE, 1, sizeof(s32) }, + { "oMenuButtonIsCustom", LVT_S32, offsetof(struct Object, oMenuButtonIsCustom), false, LOT_NONE, 1, sizeof(s32) }, + { "oMenuButtonOrigPosX", LVT_F32, offsetof(struct Object, oMenuButtonOrigPosX), false, LOT_NONE, 1, sizeof(f32) }, + { "oMenuButtonOrigPosY", LVT_F32, offsetof(struct Object, oMenuButtonOrigPosY), false, LOT_NONE, 1, sizeof(f32) }, + { "oMenuButtonOrigPosZ", LVT_F32, offsetof(struct Object, oMenuButtonOrigPosZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oMenuButtonScale", LVT_F32, offsetof(struct Object, oMenuButtonScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oMenuButtonState", LVT_S32, offsetof(struct Object, oMenuButtonState), false, LOT_NONE, 1, sizeof(s32) }, + { "oMenuButtonTimer", LVT_S32, offsetof(struct Object, oMenuButtonTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oMerryGoRoundBooManagerNumBoosKilled", LVT_S32, offsetof(struct Object, oMerryGoRoundBooManagerNumBoosKilled), false, LOT_NONE, 1, sizeof(s32) }, + { "oMerryGoRoundBooManagerNumBoosSpawned", LVT_S32, offsetof(struct Object, oMerryGoRoundBooManagerNumBoosSpawned), false, LOT_NONE, 1, sizeof(s32) }, + { "oMerryGoRoundMarioIsOutside", LVT_S32, offsetof(struct Object, oMerryGoRoundMarioIsOutside), false, LOT_NONE, 1, sizeof(s32) }, + { "oMerryGoRoundMusicShouldPlay", LVT_S32, offsetof(struct Object, oMerryGoRoundMusicShouldPlay), false, LOT_NONE, 1, sizeof(s32) }, + { "oMerryGoRoundStopped", LVT_S32, offsetof(struct Object, oMerryGoRoundStopped), false, LOT_NONE, 1, sizeof(s32) }, + { "oMipsForwardVelocity", LVT_F32, offsetof(struct Object, oMipsForwardVelocity), false, LOT_NONE, 1, sizeof(f32) }, + { "oMipsStarStatus", LVT_S32, offsetof(struct Object, oMipsStarStatus), false, LOT_NONE, 1, sizeof(s32) }, + { "oMipsStartWaypointIndex", LVT_S32, offsetof(struct Object, oMipsStartWaypointIndex), false, LOT_NONE, 1, sizeof(s32) }, + { "oMoneybagJumpState", LVT_S32, offsetof(struct Object, oMoneybagJumpState), false, LOT_NONE, 1, sizeof(s32) }, + { "oMontyMoleCurrentHole", LVT_COBJECT_P, offsetof(struct Object, oMontyMoleCurrentHole), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oMontyMoleHeightRelativeToFloor", LVT_F32, offsetof(struct Object, oMontyMoleHeightRelativeToFloor), false, LOT_NONE, 1, sizeof(f32) }, + { "oMontyMoleHoleCooldown", LVT_S32, offsetof(struct Object, oMontyMoleHoleCooldown), false, LOT_NONE, 1, sizeof(s32) }, + { "oMontyMoleHoleX", LVT_F32, offsetof(struct Object, oMontyMoleHoleX), false, LOT_NONE, 1, sizeof(f32) }, + { "oMontyMoleHoleY", LVT_F32, offsetof(struct Object, oMontyMoleHoleY), false, LOT_NONE, 1, sizeof(f32) }, + { "oMontyMoleHoleZ", LVT_F32, offsetof(struct Object, oMontyMoleHoleZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oMoveAnglePitch", LVT_S32, offsetof(struct Object, oMoveAnglePitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oMoveAngleRoll", LVT_S32, offsetof(struct Object, oMoveAngleRoll), false, LOT_NONE, 1, sizeof(s32) }, + { "oMoveAngleYaw", LVT_S32, offsetof(struct Object, oMoveAngleYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oMoveFlags", LVT_U32, offsetof(struct Object, oMoveFlags), false, LOT_NONE, 1, sizeof(u32) }, + { "oMovingFlameTimer", LVT_S32, offsetof(struct Object, oMovingFlameTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oMrBlizzardChangeInDizziness", LVT_F32, offsetof(struct Object, oMrBlizzardChangeInDizziness), false, LOT_NONE, 1, sizeof(f32) }, + { "oMrBlizzardDistFromHome", LVT_S32, offsetof(struct Object, oMrBlizzardDistFromHome), false, LOT_NONE, 1, sizeof(s32) }, + { "oMrBlizzardDizziness", LVT_F32, offsetof(struct Object, oMrBlizzardDizziness), false, LOT_NONE, 1, sizeof(f32) }, + { "oMrBlizzardGraphYOffset", LVT_F32, offsetof(struct Object, oMrBlizzardGraphYOffset), false, LOT_NONE, 1, sizeof(f32) }, + { "oMrBlizzardGraphYVel", LVT_F32, offsetof(struct Object, oMrBlizzardGraphYVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oMrBlizzardHeldObj", LVT_COBJECT_P, offsetof(struct Object, oMrBlizzardHeldObj), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oMrBlizzardScale", LVT_F32, offsetof(struct Object, oMrBlizzardScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oMrBlizzardTargetMoveYaw", LVT_S32, offsetof(struct Object, oMrBlizzardTargetMoveYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oMrBlizzardTimer", LVT_S32, offsetof(struct Object, oMrBlizzardTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oMrISize", LVT_F32, offsetof(struct Object, oMrISize), false, LOT_NONE, 1, sizeof(f32) }, + { "oMrIUnk100", LVT_S32, offsetof(struct Object, oMrIUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oMrIUnk104", LVT_S32, offsetof(struct Object, oMrIUnk104), false, LOT_NONE, 1, sizeof(s32) }, + { "oMrIUnk108", LVT_S32, offsetof(struct Object, oMrIUnk108), false, LOT_NONE, 1, sizeof(s32) }, + { "oMrIUnk110", LVT_S32, offsetof(struct Object, oMrIUnk110), false, LOT_NONE, 1, sizeof(s32) }, + { "oMrIUnkF4", LVT_S32, offsetof(struct Object, oMrIUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oMrIUnkFC", LVT_S32, offsetof(struct Object, oMrIUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oNumLootCoins", LVT_S32, offsetof(struct Object, oNumLootCoins), false, LOT_NONE, 1, sizeof(s32) }, + { "oOpacity", LVT_S32, offsetof(struct Object, oOpacity), false, LOT_NONE, 1, sizeof(s32) }, + { "oOpenableGrillUnk88", LVT_S32, offsetof(struct Object, oOpenableGrillUnk88), false, LOT_NONE, 1, sizeof(s32) }, + { "oOpenableGrillUnkF4", LVT_COBJECT_P, offsetof(struct Object, oOpenableGrillUnkF4), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oParentRelativePosX", LVT_F32, offsetof(struct Object, oParentRelativePosX), false, LOT_NONE, 1, sizeof(f32) }, + { "oParentRelativePosY", LVT_F32, offsetof(struct Object, oParentRelativePosY), false, LOT_NONE, 1, sizeof(f32) }, + { "oParentRelativePosZ", LVT_F32, offsetof(struct Object, oParentRelativePosZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oPathedPrevWaypoint", LVT_COBJECT_P, offsetof(struct Object, oPathedPrevWaypoint), false, LOT_WAYPOINT, 1, sizeof(struct Waypoint*) }, + { "oPathedPrevWaypointFlags", LVT_S32, offsetof(struct Object, oPathedPrevWaypointFlags), false, LOT_NONE, 1, sizeof(s32) }, + { "oPathedStartWaypoint", LVT_COBJECT_P, offsetof(struct Object, oPathedStartWaypoint), false, LOT_WAYPOINT, 1, sizeof(struct Waypoint*) }, + { "oPathedTargetPitch", LVT_S32, offsetof(struct Object, oPathedTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oPathedTargetYaw", LVT_S32, offsetof(struct Object, oPathedTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oPiranhaPlantScale", LVT_F32, offsetof(struct Object, oPiranhaPlantScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oPiranhaPlantSleepMusicState", LVT_S32, offsetof(struct Object, oPiranhaPlantSleepMusicState), false, LOT_NONE, 1, sizeof(s32) }, + { "oPitouneUnkF4", LVT_F32, offsetof(struct Object, oPitouneUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oPitouneUnkF8", LVT_F32, offsetof(struct Object, oPitouneUnkF8), false, LOT_NONE, 1, sizeof(f32) }, + { "oPitouneUnkFC", LVT_F32, offsetof(struct Object, oPitouneUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oPlatformOnTrackBaseBallIndex", LVT_S32, offsetof(struct Object, oPlatformOnTrackBaseBallIndex), false, LOT_NONE, 1, sizeof(s32) }, + { "oPlatformOnTrackDistMovedSinceLastBall", LVT_F32, offsetof(struct Object, oPlatformOnTrackDistMovedSinceLastBall), false, LOT_NONE, 1, sizeof(f32) }, + { "oPlatformOnTrackIsNotHMC", LVT_S16, offsetof(struct Object, oPlatformOnTrackIsNotHMC), false, LOT_NONE, 1, sizeof(s16) }, + { "oPlatformOnTrackIsNotSkiLift", LVT_S16, offsetof(struct Object, oPlatformOnTrackIsNotSkiLift), false, LOT_NONE, 1, sizeof(s16) }, + { "oPlatformOnTrackOffsetY", LVT_F32, offsetof(struct Object, oPlatformOnTrackOffsetY), false, LOT_NONE, 1, sizeof(f32) }, + { "oPlatformOnTrackPitch", LVT_S32, offsetof(struct Object, oPlatformOnTrackPitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oPlatformOnTrackPrevWaypoint", LVT_COBJECT_P, offsetof(struct Object, oPlatformOnTrackPrevWaypoint), false, LOT_WAYPOINT, 1, sizeof(struct Waypoint*) }, + { "oPlatformOnTrackPrevWaypointFlags", LVT_S32, offsetof(struct Object, oPlatformOnTrackPrevWaypointFlags), false, LOT_NONE, 1, sizeof(s32) }, + { "oPlatformOnTrackSkiLiftRollVel", LVT_F32, offsetof(struct Object, oPlatformOnTrackSkiLiftRollVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oPlatformOnTrackStartWaypoint", LVT_COBJECT_P, offsetof(struct Object, oPlatformOnTrackStartWaypoint), false, LOT_WAYPOINT, 1, sizeof(struct Waypoint*) }, + { "oPlatformOnTrackType", LVT_S16, offsetof(struct Object, oPlatformOnTrackType), false, LOT_NONE, 1, sizeof(s16) }, + { "oPlatformOnTrackWasStoodOn", LVT_S16, offsetof(struct Object, oPlatformOnTrackWasStoodOn), false, LOT_NONE, 1, sizeof(s16) }, + { "oPlatformOnTrackYaw", LVT_S32, offsetof(struct Object, oPlatformOnTrackYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oPlatformSpawnerUnk100", LVT_F32, offsetof(struct Object, oPlatformSpawnerUnk100), false, LOT_NONE, 1, sizeof(f32) }, + { "oPlatformSpawnerUnk104", LVT_F32, offsetof(struct Object, oPlatformSpawnerUnk104), false, LOT_NONE, 1, sizeof(f32) }, + { "oPlatformSpawnerUnk108", LVT_F32, offsetof(struct Object, oPlatformSpawnerUnk108), false, LOT_NONE, 1, sizeof(f32) }, + { "oPlatformSpawnerUnkF4", LVT_S32, offsetof(struct Object, oPlatformSpawnerUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oPlatformSpawnerUnkF8", LVT_S32, offsetof(struct Object, oPlatformSpawnerUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oPlatformSpawnerUnkFC", LVT_S32, offsetof(struct Object, oPlatformSpawnerUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oPlatformTimer", LVT_S32, offsetof(struct Object, oPlatformTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oPlatformUnk10C", LVT_F32, offsetof(struct Object, oPlatformUnk10C), false, LOT_NONE, 1, sizeof(f32) }, + { "oPlatformUnk110", LVT_F32, offsetof(struct Object, oPlatformUnk110), false, LOT_NONE, 1, sizeof(f32) }, + { "oPlatformUnkF8", LVT_COBJECT_P, offsetof(struct Object, oPlatformUnkF8), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oPlatformUnkFC", LVT_S32, offsetof(struct Object, oPlatformUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oPokeyAliveBodyPartFlags", LVT_U32, offsetof(struct Object, oPokeyAliveBodyPartFlags), false, LOT_NONE, 1, sizeof(u32) }, + { "oPokeyBodyPartBlinkTimer", LVT_S32, offsetof(struct Object, oPokeyBodyPartBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oPokeyBodyPartDeathDelayAfterHeadKilled", LVT_S32, offsetof(struct Object, oPokeyBodyPartDeathDelayAfterHeadKilled), false, LOT_NONE, 1, sizeof(s32) }, + { "oPokeyBottomBodyPartSize", LVT_F32, offsetof(struct Object, oPokeyBottomBodyPartSize), false, LOT_NONE, 1, sizeof(f32) }, + { "oPokeyChangeTargetTimer", LVT_S32, offsetof(struct Object, oPokeyChangeTargetTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oPokeyHeadWasKilled", LVT_S32, offsetof(struct Object, oPokeyHeadWasKilled), false, LOT_NONE, 1, sizeof(s32) }, + { "oPokeyNumAliveBodyParts", LVT_S32, offsetof(struct Object, oPokeyNumAliveBodyParts), false, LOT_NONE, 1, sizeof(s32) }, + { "oPokeyTargetYaw", LVT_S32, offsetof(struct Object, oPokeyTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oPokeyTurningAwayFromWall", LVT_S32, offsetof(struct Object, oPokeyTurningAwayFromWall), false, LOT_NONE, 1, sizeof(s32) }, + { "oPosX", LVT_F32, offsetof(struct Object, oPosX), false, LOT_NONE, 1, sizeof(f32) }, + { "oPosY", LVT_F32, offsetof(struct Object, oPosY), false, LOT_NONE, 1, sizeof(f32) }, + { "oPosZ", LVT_F32, offsetof(struct Object, oPosZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oPrevAction", LVT_S32, offsetof(struct Object, oPrevAction), false, LOT_NONE, 1, sizeof(s32) }, + { "oPyramidTopFragmentsScale", LVT_F32, offsetof(struct Object, oPyramidTopFragmentsScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oPyramidTopPillarsTouched", LVT_S32, offsetof(struct Object, oPyramidTopPillarsTouched), false, LOT_NONE, 1, sizeof(s32) }, + { "oRRCruiserWingUnkF4", LVT_S32, offsetof(struct Object, oRRCruiserWingUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oRRCruiserWingUnkF8", LVT_S32, offsetof(struct Object, oRRCruiserWingUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oRacingPenguinFinalTextbox", LVT_S16, offsetof(struct Object, oRacingPenguinFinalTextbox), false, LOT_NONE, 1, sizeof(s16) }, + { "oRacingPenguinInitTextCooldown", LVT_S32, offsetof(struct Object, oRacingPenguinInitTextCooldown), false, LOT_NONE, 1, sizeof(s32) }, + { "oRacingPenguinMarioCheated", LVT_S16, offsetof(struct Object, oRacingPenguinMarioCheated), false, LOT_NONE, 1, sizeof(s16) }, + { "oRacingPenguinMarioWon", LVT_S16, offsetof(struct Object, oRacingPenguinMarioWon), false, LOT_NONE, 1, sizeof(s16) }, + { "oRacingPenguinReachedBottom", LVT_S16, offsetof(struct Object, oRacingPenguinReachedBottom), false, LOT_NONE, 1, sizeof(s16) }, + { "oRacingPenguinWeightedNewTargetSpeed", LVT_F32, offsetof(struct Object, oRacingPenguinWeightedNewTargetSpeed), false, LOT_NONE, 1, sizeof(f32) }, +// { "oRespawnerBehaviorToRespawn", LVT_???, offsetof(struct Object, oRespawnerBehaviorToRespawn), true, LOT_???, 1, sizeof(const void*) }, <--- UNIMPLEMENTED + { "oRespawnerMinSpawnDist", LVT_F32, offsetof(struct Object, oRespawnerMinSpawnDist), false, LOT_NONE, 1, sizeof(f32) }, + { "oRespawnerModelToRespawn", LVT_S32, offsetof(struct Object, oRespawnerModelToRespawn), false, LOT_NONE, 1, sizeof(s32) }, + { "oRollingLogUnkF4", LVT_F32, offsetof(struct Object, oRollingLogUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oRoom", LVT_S32, offsetof(struct Object, oRoom), false, LOT_NONE, 1, sizeof(s32) }, + { "oSLSnowmanWindOriginalYaw", LVT_S32, offsetof(struct Object, oSLSnowmanWindOriginalYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oSLWalkingPenguinCurStep", LVT_S32, offsetof(struct Object, oSLWalkingPenguinCurStep), false, LOT_NONE, 1, sizeof(s32) }, + { "oSLWalkingPenguinCurStepTimer", LVT_S32, offsetof(struct Object, oSLWalkingPenguinCurStepTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oSLWalkingPenguinWindCollisionXPos", LVT_F32, offsetof(struct Object, oSLWalkingPenguinWindCollisionXPos), false, LOT_NONE, 1, sizeof(f32) }, + { "oSLWalkingPenguinWindCollisionZPos", LVT_F32, offsetof(struct Object, oSLWalkingPenguinWindCollisionZPos), false, LOT_NONE, 1, sizeof(f32) }, + { "oScuttlebugSpawnerUnk88", LVT_S32, offsetof(struct Object, oScuttlebugSpawnerUnk88), false, LOT_NONE, 1, sizeof(s32) }, + { "oScuttlebugSpawnerUnkF4", LVT_S32, offsetof(struct Object, oScuttlebugSpawnerUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oScuttlebugUnkF4", LVT_S32, offsetof(struct Object, oScuttlebugUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oScuttlebugUnkF8", LVT_S32, offsetof(struct Object, oScuttlebugUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oScuttlebugUnkFC", LVT_S32, offsetof(struct Object, oScuttlebugUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oSeesawPlatformPitchVel", LVT_F32, offsetof(struct Object, oSeesawPlatformPitchVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oShipPart3UnkF4", LVT_S32, offsetof(struct Object, oShipPart3UnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oShipPart3UnkF8", LVT_S32, offsetof(struct Object, oShipPart3UnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oSinkWhenSteppedOnUnk104", LVT_S32, offsetof(struct Object, oSinkWhenSteppedOnUnk104), false, LOT_NONE, 1, sizeof(s32) }, + { "oSinkWhenSteppedOnUnk108", LVT_F32, offsetof(struct Object, oSinkWhenSteppedOnUnk108), false, LOT_NONE, 1, sizeof(f32) }, + { "oSkeeterLastWaterY", LVT_F32, offsetof(struct Object, oSkeeterLastWaterY), false, LOT_NONE, 1, sizeof(f32) }, + { "oSkeeterTargetAngle", LVT_S32, offsetof(struct Object, oSkeeterTargetAngle), false, LOT_NONE, 1, sizeof(s32) }, + { "oSkeeterUnk1AC", LVT_S16, offsetof(struct Object, oSkeeterUnk1AC), false, LOT_NONE, 1, sizeof(s16) }, + { "oSkeeterUnkF8", LVT_S32, offsetof(struct Object, oSkeeterUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oSkeeterUnkFC", LVT_F32, offsetof(struct Object, oSkeeterUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oSkeeterWaitTime", LVT_S32, offsetof(struct Object, oSkeeterWaitTime), false, LOT_NONE, 1, sizeof(s32) }, + { "oSmallBompInitX", LVT_F32, offsetof(struct Object, oSmallBompInitX), false, LOT_NONE, 1, sizeof(f32) }, + { "oSmallPenguinUnk100", LVT_S32, offsetof(struct Object, oSmallPenguinUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oSmallPenguinUnk104", LVT_F32, offsetof(struct Object, oSmallPenguinUnk104), false, LOT_NONE, 1, sizeof(f32) }, + { "oSmallPenguinUnk108", LVT_F32, offsetof(struct Object, oSmallPenguinUnk108), false, LOT_NONE, 1, sizeof(f32) }, + { "oSmallPenguinUnk110", LVT_S32, offsetof(struct Object, oSmallPenguinUnk110), false, LOT_NONE, 1, sizeof(s32) }, + { "oSmallPenguinUnk88", LVT_S32, offsetof(struct Object, oSmallPenguinUnk88), false, LOT_NONE, 1, sizeof(s32) }, + { "oSmallPiranhaFlameEndSpeed", LVT_F32, offsetof(struct Object, oSmallPiranhaFlameEndSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oSmallPiranhaFlameModel", LVT_S32, offsetof(struct Object, oSmallPiranhaFlameModel), false, LOT_NONE, 1, sizeof(s32) }, + { "oSmallPiranhaFlameNextFlameTimer", LVT_S32, offsetof(struct Object, oSmallPiranhaFlameNextFlameTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oSmallPiranhaFlameSpeed", LVT_F32, offsetof(struct Object, oSmallPiranhaFlameSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oSmallPiranhaFlameStartSpeed", LVT_F32, offsetof(struct Object, oSmallPiranhaFlameStartSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oSmokeTimer", LVT_S32, offsetof(struct Object, oSmokeTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oSnowmansBottomUnk1AC", LVT_S32, offsetof(struct Object, oSnowmansBottomUnk1AC), false, LOT_NONE, 1, sizeof(s32) }, + { "oSnowmansBottomUnkF4", LVT_F32, offsetof(struct Object, oSnowmansBottomUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oSnowmansBottomUnkF8", LVT_S32, offsetof(struct Object, oSnowmansBottomUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oSnowmansHeadUnkF4", LVT_S32, offsetof(struct Object, oSnowmansHeadUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oSnufitBodyBaseScale", LVT_S32, offsetof(struct Object, oSnufitBodyBaseScale), false, LOT_NONE, 1, sizeof(s32) }, + { "oSnufitBodyScale", LVT_S16, offsetof(struct Object, oSnufitBodyScale), false, LOT_NONE, 1, sizeof(s16) }, + { "oSnufitBodyScalePeriod", LVT_S32, offsetof(struct Object, oSnufitBodyScalePeriod), false, LOT_NONE, 1, sizeof(s32) }, + { "oSnufitBullets", LVT_S32, offsetof(struct Object, oSnufitBullets), false, LOT_NONE, 1, sizeof(s32) }, + { "oSnufitCircularPeriod", LVT_S32, offsetof(struct Object, oSnufitCircularPeriod), false, LOT_NONE, 1, sizeof(s32) }, + { "oSnufitRecoil", LVT_S32, offsetof(struct Object, oSnufitRecoil), false, LOT_NONE, 1, sizeof(s32) }, + { "oSnufitScale", LVT_F32, offsetof(struct Object, oSnufitScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oSnufitXOffset", LVT_S16, offsetof(struct Object, oSnufitXOffset), false, LOT_NONE, 1, sizeof(s16) }, + { "oSnufitYOffset", LVT_S16, offsetof(struct Object, oSnufitYOffset), false, LOT_NONE, 1, sizeof(s16) }, + { "oSnufitZOffset", LVT_S16, offsetof(struct Object, oSnufitZOffset), false, LOT_NONE, 1, sizeof(s16) }, + { "oSoundEffectUnkF4", LVT_S32, offsetof(struct Object, oSoundEffectUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oSoundStateID", LVT_S32, offsetof(struct Object, oSoundStateID), false, LOT_NONE, 1, sizeof(s32) }, + { "oSparkleSpawnUnk1B0", LVT_S32, offsetof(struct Object, oSparkleSpawnUnk1B0), false, LOT_NONE, 1, sizeof(s32) }, + { "oSpindelUnkF4", LVT_S32, offsetof(struct Object, oSpindelUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oSpindelUnkF8", LVT_S32, offsetof(struct Object, oSpindelUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oSpinningHeartPlayedSound", LVT_S32, offsetof(struct Object, oSpinningHeartPlayedSound), false, LOT_NONE, 1, sizeof(s32) }, + { "oSpinningHeartTotalSpin", LVT_S32, offsetof(struct Object, oSpinningHeartTotalSpin), false, LOT_NONE, 1, sizeof(s32) }, + { "oSpinyTargetYaw", LVT_S32, offsetof(struct Object, oSpinyTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oSpinyTimeUntilTurn", LVT_S32, offsetof(struct Object, oSpinyTimeUntilTurn), false, LOT_NONE, 1, sizeof(s32) }, + { "oSpinyTurningAwayFromWall", LVT_S32, offsetof(struct Object, oSpinyTurningAwayFromWall), false, LOT_NONE, 1, sizeof(s32) }, +// { "oStarBehavior", LVT_???, offsetof(struct Object, oStarBehavior), true, LOT_???, 1, sizeof(const void*) }, <--- UNIMPLEMENTED + { "oStarSelectorSize", LVT_F32, offsetof(struct Object, oStarSelectorSize), false, LOT_NONE, 1, sizeof(f32) }, + { "oStarSelectorTimer", LVT_S32, offsetof(struct Object, oStarSelectorTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oStarSelectorType", LVT_S32, offsetof(struct Object, oStarSelectorType), false, LOT_NONE, 1, sizeof(s32) }, + { "oStarSpawnDisFromHome", LVT_F32, offsetof(struct Object, oStarSpawnDisFromHome), false, LOT_NONE, 1, sizeof(f32) }, + { "oStarSpawnExtCutsceneFlags", LVT_S16, offsetof(struct Object, oStarSpawnExtCutsceneFlags), false, LOT_NONE, 1, sizeof(s16) }, + { "oStarSpawnUnkFC", LVT_F32, offsetof(struct Object, oStarSpawnUnkFC), false, LOT_NONE, 1, sizeof(f32) }, + { "oStrongWindParticlePenguinObj", LVT_COBJECT_P, offsetof(struct Object, oStrongWindParticlePenguinObj), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "oSubAction", LVT_S32, offsetof(struct Object, oSubAction), false, LOT_NONE, 1, sizeof(s32) }, + { "oSushiSharkUnkF4", LVT_S32, offsetof(struct Object, oSushiSharkUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oSwingPlatformAngle", LVT_F32, offsetof(struct Object, oSwingPlatformAngle), false, LOT_NONE, 1, sizeof(f32) }, + { "oSwingPlatformSpeed", LVT_F32, offsetof(struct Object, oSwingPlatformSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oSwoopBonkCountdown", LVT_S32, offsetof(struct Object, oSwoopBonkCountdown), false, LOT_NONE, 1, sizeof(s32) }, + { "oSwoopTargetPitch", LVT_S32, offsetof(struct Object, oSwoopTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oSwoopTargetYaw", LVT_S32, offsetof(struct Object, oSwoopTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oSyncDeath", LVT_U32, offsetof(struct Object, oSyncDeath), false, LOT_NONE, 1, sizeof(u32) }, + { "oSyncID", LVT_U32, offsetof(struct Object, oSyncID), true, LOT_NONE, 1, sizeof(u32) }, + { "oTTC2DRotatorIncrement", LVT_S32, offsetof(struct Object, oTTC2DRotatorIncrement), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTC2DRotatorMinTimeUntilNextTurn", LVT_S32, offsetof(struct Object, oTTC2DRotatorMinTimeUntilNextTurn), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTC2DRotatorRandomDirTimer", LVT_S32, offsetof(struct Object, oTTC2DRotatorRandomDirTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTC2DRotatorSpeed", LVT_S32, offsetof(struct Object, oTTC2DRotatorSpeed), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTC2DRotatorTargetYaw", LVT_S32, offsetof(struct Object, oTTC2DRotatorTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCChangeDirTimer", LVT_S32, offsetof(struct Object, oTTCChangeDirTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCCogDir", LVT_F32, offsetof(struct Object, oTTCCogDir), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCCogSpeed", LVT_F32, offsetof(struct Object, oTTCCogSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCCogTargetVel", LVT_F32, offsetof(struct Object, oTTCCogTargetVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCElevatorDir", LVT_F32, offsetof(struct Object, oTTCElevatorDir), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCElevatorMoveTime", LVT_S32, offsetof(struct Object, oTTCElevatorMoveTime), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCElevatorPeakY", LVT_F32, offsetof(struct Object, oTTCElevatorPeakY), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCMovingBarDelay", LVT_S32, offsetof(struct Object, oTTCMovingBarDelay), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCMovingBarOffset", LVT_F32, offsetof(struct Object, oTTCMovingBarOffset), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCMovingBarSpeed", LVT_F32, offsetof(struct Object, oTTCMovingBarSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCMovingBarStartOffset", LVT_F32, offsetof(struct Object, oTTCMovingBarStartOffset), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCMovingBarStoppedTimer", LVT_S32, offsetof(struct Object, oTTCMovingBarStoppedTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCPendulumAccelDir", LVT_F32, offsetof(struct Object, oTTCPendulumAccelDir), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCPendulumAngle", LVT_F32, offsetof(struct Object, oTTCPendulumAngle), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCPendulumAngleAccel", LVT_F32, offsetof(struct Object, oTTCPendulumAngleAccel), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCPendulumAngleVel", LVT_F32, offsetof(struct Object, oTTCPendulumAngleVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCPendulumDelay", LVT_S32, offsetof(struct Object, oTTCPendulumDelay), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCPendulumSoundTimer", LVT_S32, offsetof(struct Object, oTTCPendulumSoundTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCPitBlockDir", LVT_S32, offsetof(struct Object, oTTCPitBlockDir), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCPitBlockPeakY", LVT_F32, offsetof(struct Object, oTTCPitBlockPeakY), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCPitBlockWaitTime", LVT_S32, offsetof(struct Object, oTTCPitBlockWaitTime), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCRotatingSolidNumSides", LVT_S32, offsetof(struct Object, oTTCRotatingSolidNumSides), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCRotatingSolidNumTurns", LVT_S32, offsetof(struct Object, oTTCRotatingSolidNumTurns), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCRotatingSolidRotationDelay", LVT_S32, offsetof(struct Object, oTTCRotatingSolidRotationDelay), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCRotatingSolidSoundTimer", LVT_S32, offsetof(struct Object, oTTCRotatingSolidSoundTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCRotatingSolidVelY", LVT_F32, offsetof(struct Object, oTTCRotatingSolidVelY), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCSpinnerDir", LVT_S32, offsetof(struct Object, oTTCSpinnerDir), false, LOT_NONE, 1, sizeof(s32) }, + { "oTTCTreadmillBigSurface", LVT_S16_P, offsetof(struct Object, oTTCTreadmillBigSurface), true, LOT_POINTER, 1, sizeof(s16*) }, + { "oTTCTreadmillSmallSurface", LVT_S16_P, offsetof(struct Object, oTTCTreadmillSmallSurface), true, LOT_POINTER, 1, sizeof(s16*) }, + { "oTTCTreadmillSpeed", LVT_F32, offsetof(struct Object, oTTCTreadmillSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCTreadmillTargetSpeed", LVT_F32, offsetof(struct Object, oTTCTreadmillTargetSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oTTCTreadmillTimeUntilSwitch", LVT_S32, offsetof(struct Object, oTTCTreadmillTimeUntilSwitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oThwompRandomTimer", LVT_S32, offsetof(struct Object, oThwompRandomTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oTiltingPyramidMarioOnPlatform", LVT_S32, offsetof(struct Object, oTiltingPyramidMarioOnPlatform), false, LOT_NONE, 1, sizeof(s32) }, + { "oTiltingPyramidNormalX", LVT_F32, offsetof(struct Object, oTiltingPyramidNormalX), false, LOT_NONE, 1, sizeof(f32) }, + { "oTiltingPyramidNormalY", LVT_F32, offsetof(struct Object, oTiltingPyramidNormalY), false, LOT_NONE, 1, sizeof(f32) }, + { "oTiltingPyramidNormalZ", LVT_F32, offsetof(struct Object, oTiltingPyramidNormalZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oTimer", LVT_S32, offsetof(struct Object, oTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oToadMessageDialogId", LVT_S32, offsetof(struct Object, oToadMessageDialogId), false, LOT_NONE, 1, sizeof(s32) }, + { "oToadMessageRecentlyTalked", LVT_S32, offsetof(struct Object, oToadMessageRecentlyTalked), false, LOT_NONE, 1, sizeof(s32) }, + { "oToadMessageState", LVT_S32, offsetof(struct Object, oToadMessageState), false, LOT_NONE, 1, sizeof(s32) }, +// { "oToxBoxMovementPattern", LVT_???, offsetof(struct Object, oToxBoxMovementPattern), false, LOT_???, 1, sizeof(void*) }, <--- UNIMPLEMENTED + { "oToxBoxMovementStep", LVT_S32, offsetof(struct Object, oToxBoxMovementStep), false, LOT_NONE, 1, sizeof(s32) }, + { "oTreasureChestCurrentAnswer", LVT_S32, offsetof(struct Object, oTreasureChestCurrentAnswer), false, LOT_NONE, 1, sizeof(s32) }, + { "oTreasureChestIsAboveWater", LVT_S32, offsetof(struct Object, oTreasureChestIsAboveWater), false, LOT_NONE, 1, sizeof(s32) }, + { "oTreasureChestIsLastInteractionIncorrect", LVT_S32, offsetof(struct Object, oTreasureChestIsLastInteractionIncorrect), false, LOT_NONE, 1, sizeof(s32) }, + { "oTreasureChestLastNetworkPlayerIndex", LVT_S16, offsetof(struct Object, oTreasureChestLastNetworkPlayerIndex), false, LOT_NONE, 1, sizeof(s16) }, + { "oTreasureChestSound", LVT_S32, offsetof(struct Object, oTreasureChestSound), false, LOT_NONE, 1, sizeof(s32) }, + { "oTreeSnowOrLeafUnkF4", LVT_S32, offsetof(struct Object, oTreeSnowOrLeafUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oTreeSnowOrLeafUnkF8", LVT_S32, offsetof(struct Object, oTreeSnowOrLeafUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oTreeSnowOrLeafUnkFC", LVT_S32, offsetof(struct Object, oTreeSnowOrLeafUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oTripletButterflyBaseYaw", LVT_F32, offsetof(struct Object, oTripletButterflyBaseYaw), false, LOT_NONE, 1, sizeof(f32) }, + { "oTripletButterflyModel", LVT_S32, offsetof(struct Object, oTripletButterflyModel), false, LOT_NONE, 1, sizeof(s32) }, + { "oTripletButterflyScale", LVT_F32, offsetof(struct Object, oTripletButterflyScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oTripletButterflyScalePhase", LVT_S32, offsetof(struct Object, oTripletButterflyScalePhase), false, LOT_NONE, 1, sizeof(s32) }, + { "oTripletButterflySelectedButterfly", LVT_S32, offsetof(struct Object, oTripletButterflySelectedButterfly), false, LOT_NONE, 1, sizeof(s32) }, + { "oTripletButterflySpeed", LVT_F32, offsetof(struct Object, oTripletButterflySpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oTripletButterflyTargetPitch", LVT_S32, offsetof(struct Object, oTripletButterflyTargetPitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oTripletButterflyTargetYaw", LVT_S32, offsetof(struct Object, oTripletButterflyTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oTripletButterflyType", LVT_S32, offsetof(struct Object, oTripletButterflyType), false, LOT_NONE, 1, sizeof(s32) }, + { "oTumblingBridgeUnkF4", LVT_S32, offsetof(struct Object, oTumblingBridgeUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oTweesterScaleTimer", LVT_S32, offsetof(struct Object, oTweesterScaleTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oTweesterUnused", LVT_S32, offsetof(struct Object, oTweesterUnused), false, LOT_NONE, 1, sizeof(s32) }, + { "oUkikiCageNextAction", LVT_S32, offsetof(struct Object, oUkikiCageNextAction), false, LOT_NONE, 1, sizeof(s32) }, + { "oUkikiCageSpinTimer", LVT_S16, offsetof(struct Object, oUkikiCageSpinTimer), false, LOT_NONE, 1, sizeof(s16) }, + { "oUkikiChaseFleeRange", LVT_F32, offsetof(struct Object, oUkikiChaseFleeRange), false, LOT_NONE, 1, sizeof(f32) }, + { "oUkikiHasCap", LVT_S16, offsetof(struct Object, oUkikiHasCap), false, LOT_NONE, 1, sizeof(s16) }, + { "oUkikiTauntCounter", LVT_S16, offsetof(struct Object, oUkikiTauntCounter), false, LOT_NONE, 1, sizeof(s16) }, + { "oUkikiTauntsToBeDone", LVT_S16, offsetof(struct Object, oUkikiTauntsToBeDone), false, LOT_NONE, 1, sizeof(s16) }, + { "oUkikiTextState", LVT_S16, offsetof(struct Object, oUkikiTextState), false, LOT_NONE, 1, sizeof(s16) }, + { "oUkikiTextboxTimer", LVT_S16, offsetof(struct Object, oUkikiTextboxTimer), false, LOT_NONE, 1, sizeof(s16) }, + { "oUnagiUnk110", LVT_F32, offsetof(struct Object, oUnagiUnk110), false, LOT_NONE, 1, sizeof(f32) }, + { "oUnagiUnk1AC", LVT_F32, offsetof(struct Object, oUnagiUnk1AC), false, LOT_NONE, 1, sizeof(f32) }, + { "oUnagiUnk1B0", LVT_S16, offsetof(struct Object, oUnagiUnk1B0), false, LOT_NONE, 1, sizeof(s16) }, + { "oUnagiUnk1B2", LVT_S16, offsetof(struct Object, oUnagiUnk1B2), false, LOT_NONE, 1, sizeof(s16) }, + { "oUnagiUnkF4", LVT_F32, offsetof(struct Object, oUnagiUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oUnagiUnkF8", LVT_F32, offsetof(struct Object, oUnagiUnkF8), false, LOT_NONE, 1, sizeof(f32) }, + { "oUnk1A8", LVT_U32, offsetof(struct Object, oUnk1A8), false, LOT_NONE, 1, sizeof(u32) }, + { "oUnk94", LVT_U32, offsetof(struct Object, oUnk94), false, LOT_NONE, 1, sizeof(u32) }, + { "oUnkBC", LVT_F32, offsetof(struct Object, oUnkBC), false, LOT_NONE, 1, sizeof(f32) }, + { "oUnkC0", LVT_F32, offsetof(struct Object, oUnkC0), false, LOT_NONE, 1, sizeof(f32) }, + { "oUnlockDoorStarState", LVT_U32, offsetof(struct Object, oUnlockDoorStarState), false, LOT_NONE, 1, sizeof(u32) }, + { "oUnlockDoorStarTimer", LVT_S32, offsetof(struct Object, oUnlockDoorStarTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oUnlockDoorStarYawVel", LVT_S32, offsetof(struct Object, oUnlockDoorStarYawVel), false, LOT_NONE, 1, sizeof(s32) }, + { "oVelX", LVT_F32, offsetof(struct Object, oVelX), false, LOT_NONE, 1, sizeof(f32) }, + { "oVelY", LVT_F32, offsetof(struct Object, oVelY), false, LOT_NONE, 1, sizeof(f32) }, + { "oVelZ", LVT_F32, offsetof(struct Object, oVelZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oWFSlidBrickPtfmMovVel", LVT_F32, offsetof(struct Object, oWFSlidBrickPtfmMovVel), false, LOT_NONE, 1, sizeof(f32) }, + { "oWallAngle", LVT_S32, offsetof(struct Object, oWallAngle), false, LOT_NONE, 1, sizeof(s32) }, + { "oWallHitboxRadius", LVT_F32, offsetof(struct Object, oWallHitboxRadius), false, LOT_NONE, 1, sizeof(f32) }, + { "oWaterBombNumBounces", LVT_F32, offsetof(struct Object, oWaterBombNumBounces), false, LOT_NONE, 1, sizeof(f32) }, + { "oWaterBombOnGround", LVT_S32, offsetof(struct Object, oWaterBombOnGround), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterBombSpawnerBombActive", LVT_S32, offsetof(struct Object, oWaterBombSpawnerBombActive), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterBombSpawnerTimeToSpawn", LVT_S32, offsetof(struct Object, oWaterBombSpawnerTimeToSpawn), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterBombStretchSpeed", LVT_F32, offsetof(struct Object, oWaterBombStretchSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oWaterBombVerticalStretch", LVT_F32, offsetof(struct Object, oWaterBombVerticalStretch), false, LOT_NONE, 1, sizeof(f32) }, + { "oWaterCannonUnk100", LVT_S32, offsetof(struct Object, oWaterCannonUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterCannonUnkF4", LVT_S32, offsetof(struct Object, oWaterCannonUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterCannonUnkF8", LVT_S32, offsetof(struct Object, oWaterCannonUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterCannonUnkFC", LVT_S32, offsetof(struct Object, oWaterCannonUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterLevelPillarDrained", LVT_S32, offsetof(struct Object, oWaterLevelPillarDrained), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterLevelTriggerTargetWaterLevel", LVT_S32, offsetof(struct Object, oWaterLevelTriggerTargetWaterLevel), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterLevelTriggerUnkF4", LVT_S32, offsetof(struct Object, oWaterLevelTriggerUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterObjUnk100", LVT_S32, offsetof(struct Object, oWaterObjUnk100), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterObjUnkF4", LVT_S32, offsetof(struct Object, oWaterObjUnkF4), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterObjUnkF8", LVT_S32, offsetof(struct Object, oWaterObjUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterObjUnkFC", LVT_S32, offsetof(struct Object, oWaterObjUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterRingAvgScale", LVT_F32, offsetof(struct Object, oWaterRingAvgScale), false, LOT_NONE, 1, sizeof(f32) }, + { "oWaterRingIndex", LVT_S32, offsetof(struct Object, oWaterRingIndex), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterRingMarioDistInFront", LVT_F32, offsetof(struct Object, oWaterRingMarioDistInFront), false, LOT_NONE, 1, sizeof(f32) }, + { "oWaterRingMgrLastRingCollected", LVT_S32, offsetof(struct Object, oWaterRingMgrLastRingCollected), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterRingMgrNextRingIndex", LVT_S32, offsetof(struct Object, oWaterRingMgrNextRingIndex), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterRingNormalX", LVT_F32, offsetof(struct Object, oWaterRingNormalX), false, LOT_NONE, 1, sizeof(f32) }, + { "oWaterRingNormalY", LVT_F32, offsetof(struct Object, oWaterRingNormalY), false, LOT_NONE, 1, sizeof(f32) }, + { "oWaterRingNormalZ", LVT_F32, offsetof(struct Object, oWaterRingNormalZ), false, LOT_NONE, 1, sizeof(f32) }, + { "oWaterRingScalePhaseX", LVT_S32, offsetof(struct Object, oWaterRingScalePhaseX), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterRingScalePhaseY", LVT_S32, offsetof(struct Object, oWaterRingScalePhaseY), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterRingScalePhaseZ", LVT_S32, offsetof(struct Object, oWaterRingScalePhaseZ), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaterRingSpawnerRingsCollected", LVT_S32, offsetof(struct Object, oWaterRingSpawnerRingsCollected), false, LOT_NONE, 1, sizeof(s32) }, + { "oWaveTrailSize", LVT_F32, offsetof(struct Object, oWaveTrailSize), false, LOT_NONE, 1, sizeof(f32) }, + { "oWhirlpoolInitFacePitch", LVT_S32, offsetof(struct Object, oWhirlpoolInitFacePitch), false, LOT_NONE, 1, sizeof(s32) }, + { "oWhirlpoolInitFaceRoll", LVT_S32, offsetof(struct Object, oWhirlpoolInitFaceRoll), false, LOT_NONE, 1, sizeof(s32) }, + { "oWhirlpoolTimeout", LVT_S32, offsetof(struct Object, oWhirlpoolTimeout), false, LOT_NONE, 1, sizeof(s32) }, + { "oWhitePuffUnkF4", LVT_F32, offsetof(struct Object, oWhitePuffUnkF4), false, LOT_NONE, 1, sizeof(f32) }, + { "oWhitePuffUnkF8", LVT_S32, offsetof(struct Object, oWhitePuffUnkF8), false, LOT_NONE, 1, sizeof(s32) }, + { "oWhitePuffUnkFC", LVT_S32, offsetof(struct Object, oWhitePuffUnkFC), false, LOT_NONE, 1, sizeof(s32) }, + { "oWhompShakeVal", LVT_S32, offsetof(struct Object, oWhompShakeVal), false, LOT_NONE, 1, sizeof(s32) }, + { "oWigglerFallThroughFloorsHeight", LVT_F32, offsetof(struct Object, oWigglerFallThroughFloorsHeight), false, LOT_NONE, 1, sizeof(f32) }, + { "oWigglerSegments", LVT_COBJECT_P, offsetof(struct Object, oWigglerSegments), true, LOT_CHAINSEGMENT, 1, sizeof(struct ChainSegment*) }, + { "oWigglerSquishSpeed", LVT_F32, offsetof(struct Object, oWigglerSquishSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oWigglerTargetYaw", LVT_S32, offsetof(struct Object, oWigglerTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "oWigglerTextStatus", LVT_S16, offsetof(struct Object, oWigglerTextStatus), false, LOT_NONE, 1, sizeof(s16) }, + { "oWigglerTimeUntilRandomTurn", LVT_S32, offsetof(struct Object, oWigglerTimeUntilRandomTurn), false, LOT_NONE, 1, sizeof(s32) }, + { "oWigglerUnused", LVT_S16, offsetof(struct Object, oWigglerUnused), false, LOT_NONE, 1, sizeof(s16) }, + { "oWigglerWalkAnimSpeed", LVT_F32, offsetof(struct Object, oWigglerWalkAnimSpeed), false, LOT_NONE, 1, sizeof(f32) }, + { "oWigglerWalkAwayFromWallTimer", LVT_S32, offsetof(struct Object, oWigglerWalkAwayFromWallTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oWoodenPostMarioPounding", LVT_S32, offsetof(struct Object, oWoodenPostMarioPounding), false, LOT_NONE, 1, sizeof(s32) }, + { "oWoodenPostOffsetY", LVT_F32, offsetof(struct Object, oWoodenPostOffsetY), false, LOT_NONE, 1, sizeof(f32) }, + { "oWoodenPostPrevAngleToMario", LVT_S32, offsetof(struct Object, oWoodenPostPrevAngleToMario), false, LOT_NONE, 1, sizeof(s32) }, + { "oWoodenPostSpeedY", LVT_F32, offsetof(struct Object, oWoodenPostSpeedY), false, LOT_NONE, 1, sizeof(f32) }, + { "oWoodenPostTotalMarioAngle", LVT_S32, offsetof(struct Object, oWoodenPostTotalMarioAngle), false, LOT_NONE, 1, sizeof(s32) }, + { "oYoshiBlinkTimer", LVT_S32, offsetof(struct Object, oYoshiBlinkTimer), false, LOT_NONE, 1, sizeof(s32) }, + { "oYoshiChosenHome", LVT_S32, offsetof(struct Object, oYoshiChosenHome), false, LOT_NONE, 1, sizeof(s32) }, + { "oYoshiTargetYaw", LVT_S32, offsetof(struct Object, oYoshiTargetYaw), false, LOT_NONE, 1, sizeof(s32) }, + { "parentObj", LVT_COBJECT_P, offsetof(struct Object, parentObj), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "platform", LVT_COBJECT_P, offsetof(struct Object, platform), false, LOT_OBJECT, 1, sizeof(struct Object*) }, + { "prevObj", LVT_COBJECT_P, offsetof(struct Object, prevObj), false, LOT_OBJECT, 1, sizeof(struct Object*) }, +// { "ptrData", LVT_???, offsetof(struct Object, ptrData), false, LOT_???, 1, sizeof(union { ... }) }, <--- UNIMPLEMENTED +// { "rawData", LVT_???, offsetof(struct Object, rawData), false, LOT_???, 1, sizeof(union { ... }) }, <--- UNIMPLEMENTED +// { "respawnInfo", LVT_???, offsetof(struct Object, respawnInfo), false, LOT_???, 1, sizeof(void*) }, <--- UNIMPLEMENTED + { "respawnInfoType", LVT_S16, offsetof(struct Object, respawnInfoType), true, LOT_NONE, 1, sizeof(s16) }, + { "setHome", LVT_U8, offsetof(struct Object, setHome), false, LOT_NONE, 1, sizeof(u8) }, + { "transform", LVT_COBJECT, offsetof(struct Object, transform), true, LOT_MAT4, 1, sizeof(Mat4) }, + { "unused1", LVT_U32, offsetof(struct Object, unused1), false, LOT_NONE, 1, sizeof(u32) }, + { "usingObj", LVT_COBJECT_P, offsetof(struct Object, usingObj), false, LOT_OBJECT, 1, sizeof(struct Object*) }, }; #define LUA_OBJECT_HITBOX_FIELD_COUNT 9 @@ -2515,60 +2427,44 @@ static struct LuaObjectField sObjectWarpNodeFields[LUA_OBJECT_WARP_NODE_FIELD_CO { "object", LVT_COBJECT_P, offsetof(struct ObjectWarpNode, object), false, LOT_OBJECT, 1, sizeof(struct 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, 1, sizeof(u32) }, - { "size", LVT_U32, offsetof(struct OffsetSizePair, size), false, LOT_NONE, 1, sizeof(u32) }, -}; - -#define LUA_PAINTING_FIELD_COUNT 37 +#define LUA_PAINTING_FIELD_COUNT 36 static struct LuaObjectField sPaintingFields[LUA_PAINTING_FIELD_COUNT] = { - { "alpha", LVT_U8, offsetof(struct Painting, alpha), false, LOT_NONE, 1, sizeof(u8) }, - { "currFloor", LVT_S8, offsetof(struct Painting, currFloor), false, LOT_NONE, 1, sizeof(s8) }, - { "currRippleMag", LVT_F32, offsetof(struct Painting, currRippleMag), false, LOT_NONE, 1, sizeof(f32) }, - { "currRippleRate", LVT_F32, offsetof(struct Painting, currRippleRate), false, LOT_NONE, 1, sizeof(f32) }, - { "dispersionFactor", LVT_F32, offsetof(struct Painting, dispersionFactor), false, LOT_NONE, 1, sizeof(f32) }, - { "entryDispersionFactor", LVT_F32, offsetof(struct Painting, entryDispersionFactor), false, LOT_NONE, 1, sizeof(f32) }, - { "entryRippleDecay", LVT_F32, offsetof(struct Painting, entryRippleDecay), false, LOT_NONE, 1, sizeof(f32) }, - { "entryRippleMag", LVT_F32, offsetof(struct Painting, entryRippleMag), false, LOT_NONE, 1, sizeof(f32) }, - { "entryRippleRate", LVT_F32, offsetof(struct Painting, entryRippleRate), false, LOT_NONE, 1, sizeof(f32) }, - { "floorEntered", LVT_S8, offsetof(struct Painting, floorEntered), false, LOT_NONE, 1, sizeof(s8) }, - { "id", LVT_S16, offsetof(struct Painting, id), true, LOT_NONE, 1, sizeof(s16) }, - { "imageCount", LVT_S8, offsetof(struct Painting, imageCount), true, LOT_NONE, 1, sizeof(s8) }, - { "lastFloor", LVT_S8, offsetof(struct Painting, lastFloor), false, LOT_NONE, 1, sizeof(s8) }, - { "marioIsUnder", LVT_S8, offsetof(struct Painting, marioIsUnder), false, LOT_NONE, 1, sizeof(s8) }, - { "marioWasUnder", LVT_S8, offsetof(struct Painting, marioWasUnder), false, LOT_NONE, 1, sizeof(s8) }, - { "marioWentUnder", LVT_S8, offsetof(struct Painting, marioWentUnder), false, LOT_NONE, 1, sizeof(s8) }, - { "normalDisplayList", LVT_COBJECT_P, offsetof(struct Painting, normalDisplayList), true, LOT_GFX, 1, sizeof(const Gfx*) }, - { "passiveDispersionFactor", LVT_F32, offsetof(struct Painting, passiveDispersionFactor), false, LOT_NONE, 1, sizeof(f32) }, - { "passiveRippleDecay", LVT_F32, offsetof(struct Painting, passiveRippleDecay), false, LOT_NONE, 1, sizeof(f32) }, - { "passiveRippleMag", LVT_F32, offsetof(struct Painting, passiveRippleMag), false, LOT_NONE, 1, sizeof(f32) }, - { "passiveRippleRate", LVT_F32, offsetof(struct Painting, passiveRippleRate), false, LOT_NONE, 1, sizeof(f32) }, - { "pitch", LVT_F32, offsetof(struct Painting, pitch), false, LOT_NONE, 1, sizeof(f32) }, - { "posX", LVT_F32, offsetof(struct Painting, posX), false, LOT_NONE, 1, sizeof(f32) }, - { "posY", LVT_F32, offsetof(struct Painting, posY), false, LOT_NONE, 1, sizeof(f32) }, - { "posZ", LVT_F32, offsetof(struct Painting, posZ), false, LOT_NONE, 1, sizeof(f32) }, - { "rippleDecay", LVT_F32, offsetof(struct Painting, rippleDecay), false, LOT_NONE, 1, sizeof(f32) }, - { "rippleDisplayList", LVT_COBJECT_P, offsetof(struct Painting, rippleDisplayList), true, LOT_GFX, 1, sizeof(const Gfx*) }, - { "rippleTimer", LVT_F32, offsetof(struct Painting, rippleTimer), false, LOT_NONE, 1, sizeof(f32) }, - { "rippleTrigger", LVT_S8, offsetof(struct Painting, rippleTrigger), false, LOT_NONE, 1, sizeof(s8) }, - { "rippleX", LVT_F32, offsetof(struct Painting, rippleX), false, LOT_NONE, 1, sizeof(f32) }, - { "rippleY", LVT_F32, offsetof(struct Painting, rippleY), false, LOT_NONE, 1, sizeof(f32) }, -// { "ripples", LVT_???, offsetof(struct Painting, ripples), false, LOT_???, 1, sizeof(struct { ... }) }, <--- UNIMPLEMENTED - { "size", LVT_F32, offsetof(struct Painting, size), false, LOT_NONE, 1, sizeof(f32) }, - { "state", LVT_S8, offsetof(struct Painting, state), false, LOT_NONE, 1, sizeof(s8) }, -// { "textureArray", LVT_???, offsetof(struct Painting, textureArray), true, LOT_???, 1, sizeof(const Texture *const*) }, <--- UNIMPLEMENTED - { "textureHeight", LVT_S16, offsetof(struct Painting, textureHeight), true, LOT_NONE, 1, sizeof(s16) }, -// { "textureMaps", LVT_???, offsetof(struct Painting, textureMaps), true, LOT_???, 1, sizeof(const s16 *const*) }, <--- UNIMPLEMENTED - { "textureType", LVT_S8, offsetof(struct Painting, textureType), true, LOT_NONE, 1, sizeof(s8) }, - { "textureWidth", LVT_S16, offsetof(struct Painting, textureWidth), true, LOT_NONE, 1, sizeof(s16) }, - { "yaw", LVT_F32, offsetof(struct Painting, yaw), false, LOT_NONE, 1, sizeof(f32) }, -}; - -#define LUA_PAINTING_MESH_VERTEX_FIELD_COUNT 2 -static struct LuaObjectField sPaintingMeshVertexFields[LUA_PAINTING_MESH_VERTEX_FIELD_COUNT] = { - { "norm", LVT_S8, offsetof(struct PaintingMeshVertex, norm), false, LOT_NONE, 3, sizeof(s8) }, - { "pos", LVT_S16, offsetof(struct PaintingMeshVertex, pos), false, LOT_NONE, 3, sizeof(s16) }, + { "alpha", LVT_U8, offsetof(struct Painting, alpha), false, LOT_NONE, 1, sizeof(u8) }, + { "currFloor", LVT_S8, offsetof(struct Painting, currFloor), false, LOT_NONE, 1, sizeof(s8) }, + { "currRippleMag", LVT_F32, offsetof(struct Painting, currRippleMag), false, LOT_NONE, 1, sizeof(f32) }, + { "currRippleRate", LVT_F32, offsetof(struct Painting, currRippleRate), false, LOT_NONE, 1, sizeof(f32) }, + { "dispersionFactor", LVT_F32, offsetof(struct Painting, dispersionFactor), false, LOT_NONE, 1, sizeof(f32) }, + { "entryDispersionFactor", LVT_F32, offsetof(struct Painting, entryDispersionFactor), false, LOT_NONE, 1, sizeof(f32) }, + { "entryRippleDecay", LVT_F32, offsetof(struct Painting, entryRippleDecay), false, LOT_NONE, 1, sizeof(f32) }, + { "entryRippleMag", LVT_F32, offsetof(struct Painting, entryRippleMag), false, LOT_NONE, 1, sizeof(f32) }, + { "entryRippleRate", LVT_F32, offsetof(struct Painting, entryRippleRate), false, LOT_NONE, 1, sizeof(f32) }, + { "floorEntered", LVT_S8, offsetof(struct Painting, floorEntered), false, LOT_NONE, 1, sizeof(s8) }, + { "id", LVT_S16, offsetof(struct Painting, id), true, LOT_NONE, 1, sizeof(s16) }, + { "imageCount", LVT_S8, offsetof(struct Painting, imageCount), true, LOT_NONE, 1, sizeof(s8) }, + { "lastFloor", LVT_S8, offsetof(struct Painting, lastFloor), false, LOT_NONE, 1, sizeof(s8) }, + { "marioIsUnder", LVT_S8, offsetof(struct Painting, marioIsUnder), false, LOT_NONE, 1, sizeof(s8) }, + { "marioWasUnder", LVT_S8, offsetof(struct Painting, marioWasUnder), false, LOT_NONE, 1, sizeof(s8) }, + { "marioWentUnder", LVT_S8, offsetof(struct Painting, marioWentUnder), false, LOT_NONE, 1, sizeof(s8) }, + { "passiveDispersionFactor", LVT_F32, offsetof(struct Painting, passiveDispersionFactor), false, LOT_NONE, 1, sizeof(f32) }, + { "passiveRippleDecay", LVT_F32, offsetof(struct Painting, passiveRippleDecay), false, LOT_NONE, 1, sizeof(f32) }, + { "passiveRippleMag", LVT_F32, offsetof(struct Painting, passiveRippleMag), false, LOT_NONE, 1, sizeof(f32) }, + { "passiveRippleRate", LVT_F32, offsetof(struct Painting, passiveRippleRate), false, LOT_NONE, 1, sizeof(f32) }, + { "pitch", LVT_F32, offsetof(struct Painting, pitch), false, LOT_NONE, 1, sizeof(f32) }, + { "posX", LVT_F32, offsetof(struct Painting, posX), false, LOT_NONE, 1, sizeof(f32) }, + { "posY", LVT_F32, offsetof(struct Painting, posY), false, LOT_NONE, 1, sizeof(f32) }, + { "posZ", LVT_F32, offsetof(struct Painting, posZ), false, LOT_NONE, 1, sizeof(f32) }, + { "rippleDecay", LVT_F32, offsetof(struct Painting, rippleDecay), false, LOT_NONE, 1, sizeof(f32) }, + { "rippleTimer", LVT_F32, offsetof(struct Painting, rippleTimer), false, LOT_NONE, 1, sizeof(f32) }, + { "rippleTrigger", LVT_S8, offsetof(struct Painting, rippleTrigger), false, LOT_NONE, 1, sizeof(s8) }, + { "rippleX", LVT_F32, offsetof(struct Painting, rippleX), false, LOT_NONE, 1, sizeof(f32) }, + { "rippleY", LVT_F32, offsetof(struct Painting, rippleY), false, LOT_NONE, 1, sizeof(f32) }, + { "size", LVT_F32, offsetof(struct Painting, size), false, LOT_NONE, 1, sizeof(f32) }, + { "state", LVT_S8, offsetof(struct Painting, state), false, LOT_NONE, 1, sizeof(s8) }, + { "textureArray", LVT_TEXTURE_P, offsetof(struct Painting, textureArray), true, LOT_POINTER, 2, sizeof(const Texture*) }, + { "textureHeight", LVT_S16, offsetof(struct Painting, textureHeight), true, LOT_NONE, 1, sizeof(s16) }, + { "textureType", LVT_S8, offsetof(struct Painting, textureType), true, LOT_NONE, 1, sizeof(s8) }, + { "textureWidth", LVT_S16, offsetof(struct Painting, textureWidth), true, LOT_NONE, 1, sizeof(s16) }, + { "yaw", LVT_F32, offsetof(struct Painting, yaw), false, LOT_NONE, 1, sizeof(f32) }, }; #define LUA_PAINTING_VALUES_FIELD_COUNT 16 @@ -2591,14 +2487,6 @@ static struct LuaObjectField sPaintingValuesFields[LUA_PAINTING_VALUES_FIELD_COU { "wf_painting", LVT_COBJECT_P, offsetof(struct PaintingValues, wf_painting), false, LOT_PAINTING, 1, sizeof(struct Painting*) }, }; -#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, 1, sizeof(f32) }, - { "pos", LVT_COBJECT, offsetof(struct ParallelTrackingPoint, pos), true, LOT_VEC3F, 1, sizeof(Vec3f) }, - { "startOfPath", LVT_S16, offsetof(struct ParallelTrackingPoint, startOfPath), false, LOT_NONE, 1, sizeof(s16) }, - { "zoom", LVT_F32, offsetof(struct ParallelTrackingPoint, zoom), false, LOT_NONE, 1, sizeof(f32) }, -}; - #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, 1, sizeof(u32) }, @@ -2610,26 +2498,9 @@ static struct LuaObjectField sPlayerCameraStateFields[LUA_PLAYER_CAMERA_STATE_FI { "usedObj", LVT_COBJECT_P, offsetof(struct PlayerCameraState, usedObj), false, LOT_OBJECT, 1, sizeof(struct 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), false, LOT_SURFACE, 1, sizeof(struct Surface*) }, - { "currCeilHeight", LVT_F32, offsetof(struct PlayerGeometry, currCeilHeight), false, LOT_NONE, 1, sizeof(f32) }, - { "currCeilType", LVT_S16, offsetof(struct PlayerGeometry, currCeilType), false, LOT_NONE, 1, sizeof(s16) }, - { "currFloor", LVT_COBJECT_P, offsetof(struct PlayerGeometry, currFloor), false, LOT_SURFACE, 1, sizeof(struct Surface*) }, - { "currFloorHeight", LVT_F32, offsetof(struct PlayerGeometry, currFloorHeight), false, LOT_NONE, 1, sizeof(f32) }, - { "currFloorType", LVT_S16, offsetof(struct PlayerGeometry, currFloorType), false, LOT_NONE, 1, sizeof(s16) }, - { "prevCeil", LVT_COBJECT_P, offsetof(struct PlayerGeometry, prevCeil), false, LOT_SURFACE, 1, sizeof(struct Surface*) }, - { "prevCeilHeight", LVT_F32, offsetof(struct PlayerGeometry, prevCeilHeight), false, LOT_NONE, 1, sizeof(f32) }, - { "prevCeilType", LVT_S16, offsetof(struct PlayerGeometry, prevCeilType), false, LOT_NONE, 1, sizeof(s16) }, - { "prevFloor", LVT_COBJECT_P, offsetof(struct PlayerGeometry, prevFloor), false, LOT_SURFACE, 1, sizeof(struct Surface*) }, - { "prevFloorHeight", LVT_F32, offsetof(struct PlayerGeometry, prevFloorHeight), false, LOT_NONE, 1, sizeof(f32) }, - { "prevFloorType", LVT_S16, offsetof(struct PlayerGeometry, prevFloorType), false, LOT_NONE, 1, sizeof(s16) }, - { "waterHeight", LVT_F32, offsetof(struct PlayerGeometry, waterHeight), false, LOT_NONE, 1, sizeof(f32) }, -}; - -#define LUA_PLAYER_PALETTE_FIELD_COUNT 0 +#define LUA_PLAYER_PALETTE_FIELD_COUNT 1 static struct LuaObjectField sPlayerPaletteFields[LUA_PLAYER_PALETTE_FIELD_COUNT] = { -// { "parts", LVT_???, offsetof(struct PlayerPalette, parts), false, LOT_???, 1, sizeof(u8) }, <--- UNIMPLEMENTED + { "parts", LVT_COBJECT, offsetof(struct PlayerPalette, parts), true, LOT_COLOR, PLAYER_PART_MAX, sizeof(Color) }, }; #define LUA_RAY_INTERSECTION_INFO_FIELD_COUNT 2 @@ -2669,14 +2540,6 @@ static struct LuaObjectField sServerSettingsFields[LUA_SERVER_SETTINGS_FIELD_COU { "stayInLevelAfterStar", LVT_U8, offsetof(struct ServerSettings, stayInLevelAfterStar), false, LOT_NONE, 1, sizeof(u8) }, }; -#define LUA_SOUND_STATE_FIELD_COUNT 4 -static struct LuaObjectField sSoundStateFields[LUA_SOUND_STATE_FIELD_COUNT] = { - { "animFrame1", LVT_S8, offsetof(struct SoundState, animFrame1), false, LOT_NONE, 1, sizeof(s8) }, - { "animFrame2", LVT_S8, offsetof(struct SoundState, animFrame2), false, LOT_NONE, 1, sizeof(s8) }, - { "playSound", LVT_S16, offsetof(struct SoundState, playSound), false, LOT_NONE, 1, sizeof(s16) }, - { "soundMagic", LVT_S32, offsetof(struct SoundState, soundMagic), false, LOT_NONE, 1, sizeof(s32) }, -}; - #define LUA_SPAWN_INFO_FIELD_COUNT 8 static struct LuaObjectField sSpawnInfoFields[LUA_SPAWN_INFO_FIELD_COUNT] = { { "activeAreaIndex", LVT_S8, offsetof(struct SpawnInfo, activeAreaIndex), false, LOT_NONE, 1, sizeof(s8) }, @@ -2746,6 +2609,12 @@ static struct LuaObjectField sStarsNeededForDialogFields[LUA_STARS_NEEDED_FOR_DI { "dialog6", LVT_U16, offsetof(struct StarsNeededForDialog, dialog6), false, LOT_NONE, 1, sizeof(u16) }, }; +#define LUA_STATIC_OBJECT_COLLISION_FIELD_COUNT 2 +static struct LuaObjectField sStaticObjectCollisionFields[LUA_STATIC_OBJECT_COLLISION_FIELD_COUNT] = { + { "index", LVT_U32, offsetof(struct StaticObjectCollision, index), true, LOT_NONE, 1, sizeof(u32) }, + { "length", LVT_U16, offsetof(struct StaticObjectCollision, length), true, LOT_NONE, 1, sizeof(u16) }, +}; + #define LUA_SURFACE_FIELD_COUNT 16 static struct LuaObjectField sSurfaceFields[LUA_SURFACE_FIELD_COUNT] = { { "flags", LVT_S8, offsetof(struct Surface, flags), false, LOT_NONE, 1, sizeof(s8) }, @@ -2766,26 +2635,14 @@ static struct LuaObjectField sSurfaceFields[LUA_SURFACE_FIELD_COUNT] = { { "vertex3", LVT_COBJECT, offsetof(struct Surface, vertex3), true, LOT_VEC3S, 1, sizeof(Vec3s) }, }; -#define LUA_TEXTURE_INFO_FIELD_COUNT 5 +#define LUA_TEXTURE_INFO_FIELD_COUNT 6 static struct LuaObjectField sTextureInfoFields[LUA_TEXTURE_INFO_FIELD_COUNT] = { - { "bitSize", LVT_U8, offsetof(struct TextureInfo, bitSize), true, LOT_NONE, 1, sizeof(u8) }, - { "height", LVT_U32, offsetof(struct TextureInfo, height), true, LOT_NONE, 1, sizeof(u32) }, - { "name", LVT_STRING_P, offsetof(struct TextureInfo, name), true, LOT_NONE, 1, sizeof(const char*) }, - { "texture", LVT_TEXTURE_P, offsetof(struct TextureInfo, texture), true, LOT_POINTER, 1, sizeof(Texture*) }, - { "width", LVT_U32, offsetof(struct TextureInfo, width), true, LOT_NONE, 1, sizeof(u32) }, -}; - -#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, 1, sizeof(f32) }, - { "focPitch", LVT_S16, offsetof(struct TransitionInfo, focPitch), false, LOT_NONE, 1, sizeof(s16) }, - { "focYaw", LVT_S16, offsetof(struct TransitionInfo, focYaw), false, LOT_NONE, 1, sizeof(s16) }, - { "framesLeft", LVT_S32, offsetof(struct TransitionInfo, framesLeft), false, LOT_NONE, 1, sizeof(s32) }, - { "marioPos", LVT_COBJECT, offsetof(struct TransitionInfo, marioPos), true, LOT_VEC3F, 1, sizeof(Vec3f) }, - { "pad", LVT_U8, offsetof(struct TransitionInfo, pad), false, LOT_NONE, 1, sizeof(u8) }, - { "posDist", LVT_F32, offsetof(struct TransitionInfo, posDist), false, LOT_NONE, 1, sizeof(f32) }, - { "posPitch", LVT_S16, offsetof(struct TransitionInfo, posPitch), false, LOT_NONE, 1, sizeof(s16) }, - { "posYaw", LVT_S16, offsetof(struct TransitionInfo, posYaw), false, LOT_NONE, 1, sizeof(s16) }, + { "format", LVT_U8, offsetof(struct TextureInfo, format), true, LOT_NONE, 1, sizeof(u8) }, + { "height", LVT_U32, offsetof(struct TextureInfo, height), true, LOT_NONE, 1, sizeof(u32) }, + { "name", LVT_STRING_P, offsetof(struct TextureInfo, name), true, LOT_NONE, 1, sizeof(const char*) }, + { "size", LVT_U8, offsetof(struct TextureInfo, size), true, LOT_NONE, 1, sizeof(u8) }, + { "texture", LVT_TEXTURE_P, offsetof(struct TextureInfo, texture), true, LOT_POINTER, 1, sizeof(const Texture*) }, + { "width", LVT_U32, offsetof(struct TextureInfo, width), true, LOT_NONE, 1, sizeof(u32) }, }; #define LUA_VTX_FIELD_COUNT 13 @@ -2805,12 +2662,6 @@ static struct LuaObjectField sVtxFields[LUA_VTX_FIELD_COUNT] = { { "z", LVT_F32, offsetof(Vtx_L, z), false, LOT_NONE, 1, sizeof(float) }, }; -#define LUA_VTX__INTERP_FIELD_COUNT 2 -static struct LuaObjectField sVtx_InterpFields[LUA_VTX__INTERP_FIELD_COUNT] = { - { "n", LVT_STRING, offsetof(Vtx_Interp, n), false, LOT_NONE, 1, sizeof(signed char) }, - { "ob", LVT_F32, offsetof(Vtx_Interp, ob), false, LOT_NONE, 3, sizeof(float) }, -}; - #define LUA_WALL_COLLISION_DATA_FIELD_COUNT 10 static struct LuaObjectField sWallCollisionDataFields[LUA_WALL_COLLISION_DATA_FIELD_COUNT] = { { "normalAddition", LVT_COBJECT, offsetof(struct WallCollisionData, normalAddition), true, LOT_VEC3F, 1, sizeof(Vec3f) }, @@ -2833,34 +2684,11 @@ static struct LuaObjectField sWarpNodeFields[LUA_WARP_NODE_FIELD_COUNT] = { { "id", LVT_U8, offsetof(struct WarpNode, id), false, LOT_NONE, 1, sizeof(u8) }, }; -#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, 1, sizeof(struct WarpTransitionData) }, - { "isActive", LVT_U8, offsetof(struct WarpTransition, isActive), false, LOT_NONE, 1, sizeof(u8) }, - { "pauseRendering", LVT_U8, offsetof(struct WarpTransition, pauseRendering), false, LOT_NONE, 1, sizeof(u8) }, - { "time", LVT_U8, offsetof(struct WarpTransition, time), false, LOT_NONE, 1, sizeof(u8) }, - { "type", LVT_U8, offsetof(struct WarpTransition, type), false, LOT_NONE, 1, sizeof(u8) }, -}; - -#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, 1, sizeof(u8) }, - { "endTexRadius", LVT_S16, offsetof(struct WarpTransitionData, endTexRadius), false, LOT_NONE, 1, sizeof(s16) }, - { "endTexX", LVT_S16, offsetof(struct WarpTransitionData, endTexX), false, LOT_NONE, 1, sizeof(s16) }, - { "endTexY", LVT_S16, offsetof(struct WarpTransitionData, endTexY), false, LOT_NONE, 1, sizeof(s16) }, - { "green", LVT_U8, offsetof(struct WarpTransitionData, green), false, LOT_NONE, 1, sizeof(u8) }, - { "red", LVT_U8, offsetof(struct WarpTransitionData, red), false, LOT_NONE, 1, sizeof(u8) }, - { "startTexRadius", LVT_S16, offsetof(struct WarpTransitionData, startTexRadius), false, LOT_NONE, 1, sizeof(s16) }, - { "startTexX", LVT_S16, offsetof(struct WarpTransitionData, startTexX), false, LOT_NONE, 1, sizeof(s16) }, - { "startTexY", LVT_S16, offsetof(struct WarpTransitionData, startTexY), false, LOT_NONE, 1, sizeof(s16) }, - { "texTimer", LVT_S16, offsetof(struct WarpTransitionData, texTimer), false, LOT_NONE, 1, sizeof(s16) }, -}; - #define LUA_WATER_DROPLET_PARAMS_FIELD_COUNT 11 static struct LuaObjectField sWaterDropletParamsFields[LUA_WATER_DROPLET_PARAMS_FIELD_COUNT] = { { "behavior", LVT_BEHAVIORSCRIPT_P, offsetof(struct WaterDropletParams, behavior), true, LOT_POINTER, 1, sizeof(const BehaviorScript*) }, { "flags", LVT_S16, offsetof(struct WaterDropletParams, flags), false, LOT_NONE, 1, sizeof(s16) }, - { "model", LVT_S16, offsetof(struct WaterDropletParams, model), false, LOT_NONE, 1, sizeof(s16) }, + { "model", LVT_S16, offsetof(struct WaterDropletParams, model), true, LOT_NONE, 1, sizeof(s16) }, { "moveAngleRange", LVT_S16, offsetof(struct WaterDropletParams, moveAngleRange), false, LOT_NONE, 1, sizeof(s16) }, { "moveRange", LVT_S16, offsetof(struct WaterDropletParams, moveRange), false, LOT_NONE, 1, sizeof(s16) }, { "randForwardVelOffset", LVT_F32, offsetof(struct WaterDropletParams, randForwardVelOffset), false, LOT_NONE, 1, sizeof(f32) }, @@ -2886,24 +2714,15 @@ static struct LuaObjectField sWhirlpoolFields[LUA_WHIRLPOOL_FIELD_COUNT] = { struct LuaObjectTable sLuaObjectAutogenTable[LOT_AUTOGEN_MAX - LOT_AUTOGEN_MIN] = { { LOT_ANIMINFO, sAnimInfoFields, LUA_ANIM_INFO_FIELD_COUNT }, { LOT_ANIMATION, sAnimationFields, LUA_ANIMATION_FIELD_COUNT }, - { LOT_ANIMATIONTABLE, sAnimationTableFields, LUA_ANIMATION_TABLE_FIELD_COUNT }, { LOT_AREA, sAreaFields, LUA_AREA_FIELD_COUNT }, { LOT_BEHAVIORDIALOGS, sBehaviorDialogsFields, LUA_BEHAVIOR_DIALOGS_FIELD_COUNT }, { LOT_BEHAVIORTRAJECTORIES, sBehaviorTrajectoriesFields, LUA_BEHAVIOR_TRAJECTORIES_FIELD_COUNT }, { LOT_BEHAVIORVALUES, sBehaviorValuesFields, LUA_BEHAVIOR_VALUES_FIELD_COUNT }, - { LOT_BULLYCOLLISIONDATA, sBullyCollisionDataFields, LUA_BULLY_COLLISION_DATA_FIELD_COUNT }, { LOT_CAMERA, sCameraFields, LUA_CAMERA_FIELD_COUNT }, - { LOT_CAMERAFOVSTATUS, sCameraFOVStatusFields, LUA_CAMERA_FOVSTATUS_FIELD_COUNT }, - { LOT_CAMERAOVERRIDE, sCameraOverrideFields, LUA_CAMERA_OVERRIDE_FIELD_COUNT }, - { LOT_CAMERASTOREDINFO, sCameraStoredInfoFields, LUA_CAMERA_STORED_INFO_FIELD_COUNT }, - { LOT_CAMERATRIGGER, sCameraTriggerFields, LUA_CAMERA_TRIGGER_FIELD_COUNT }, { LOT_CHAINSEGMENT, sChainSegmentFields, LUA_CHAIN_SEGMENT_FIELD_COUNT }, { LOT_CHARACTER, sCharacterFields, LUA_CHARACTER_FIELD_COUNT }, { LOT_CONTROLLER, sControllerFields, LUA_CONTROLLER_FIELD_COUNT }, { LOT_CUSTOMLEVELINFO, sCustomLevelInfoFields, LUA_CUSTOM_LEVEL_INFO_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_DATETIME, sDateTimeFields, LUA_DATE_TIME_FIELD_COUNT }, { LOT_DIALOGENTRY, sDialogEntryFields, LUA_DIALOG_ENTRY_FIELD_COUNT }, { LOT_DISPLAYLISTNODE, sDisplayListNodeFields, LUA_DISPLAY_LIST_NODE_FIELD_COUNT }, @@ -2914,7 +2733,6 @@ struct LuaObjectTable sLuaObjectAutogenTable[LOT_AUTOGEN_MAX - LOT_AUTOGEN_MIN] { LOT_DJUITHREEPANELTHEME, sDjuiThreePanelThemeFields, LUA_DJUI_THREE_PANEL_THEME_FIELD_COUNT }, { LOT_EXCLAMATIONBOXCONTENT, sExclamationBoxContentFields, LUA_EXCLAMATION_BOX_CONTENT_FIELD_COUNT }, { LOT_FIRSTPERSONCAMERA, sFirstPersonCameraFields, LUA_FIRST_PERSON_CAMERA_FIELD_COUNT }, - { LOT_FLOORGEOMETRY, sFloorGeometryFields, LUA_FLOOR_GEOMETRY_FIELD_COUNT }, { LOT_FNGRAPHNODE, sFnGraphNodeFields, LUA_FN_GRAPH_NODE_FIELD_COUNT }, { LOT_GFX, sGfxFields, LUA_GFX_FIELD_COUNT }, { LOT_GLOBALOBJECTANIMATIONS, sGlobalObjectAnimationsFields, LUA_GLOBAL_OBJECT_ANIMATIONS_FIELD_COUNT }, @@ -2945,54 +2763,40 @@ struct LuaObjectTable sLuaObjectAutogenTable[LOT_AUTOGEN_MAX - LOT_AUTOGEN_MIN] { LOT_GRAPHNODESWITCHCASE, sGraphNodeSwitchCaseFields, LUA_GRAPH_NODE_SWITCH_CASE_FIELD_COUNT }, { LOT_GRAPHNODETRANSLATION, sGraphNodeTranslationFields, LUA_GRAPH_NODE_TRANSLATION_FIELD_COUNT }, { LOT_GRAPHNODETRANSLATIONROTATION, sGraphNodeTranslationRotationFields, LUA_GRAPH_NODE_TRANSLATION_ROTATION_FIELD_COUNT }, - { LOT_GRAPHNODE_802A45E4, sGraphNode_802A45E4Fields, LUA_GRAPH_NODE_802_A45_E4_FIELD_COUNT }, - { LOT_HANDHELDSHAKEPOINT, sHandheldShakePointFields, LUA_HANDHELD_SHAKE_POINT_FIELD_COUNT }, { LOT_HUDUTILSROTATION, sHudUtilsRotationFields, LUA_HUD_UTILS_ROTATION_FIELD_COUNT }, { LOT_INSTANTWARP, sInstantWarpFields, LUA_INSTANT_WARP_FIELD_COUNT }, { LOT_LAKITUSTATE, sLakituStateFields, LUA_LAKITU_STATE_FIELD_COUNT }, { LOT_LEVELVALUES, sLevelValuesFields, LUA_LEVEL_VALUES_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_MOD, sModFields, LUA_MOD_FIELD_COUNT }, { LOT_MODAUDIO, sModAudioFields, LUA_MOD_AUDIO_FIELD_COUNT }, - { LOT_MODAUDIOSAMPLECOPIES, sModAudioSampleCopiesFields, LUA_MOD_AUDIO_SAMPLE_COPIES_FIELD_COUNT }, - { LOT_MODFILE, sModFileFields, LUA_MOD_FILE_FIELD_COUNT }, { LOT_MODFS, sModFsFields, LUA_MOD_FS_FIELD_COUNT }, { LOT_MODFSFILE, sModFsFileFields, LUA_MOD_FS_FILE_FIELD_COUNT }, - { LOT_MODETRANSITIONINFO, sModeTransitionInfoFields, LUA_MODE_TRANSITION_INFO_FIELD_COUNT }, { LOT_NAMETAGSSETTINGS, sNametagsSettingsFields, LUA_NAMETAGS_SETTINGS_FIELD_COUNT }, { LOT_NETWORKPLAYER, sNetworkPlayerFields, LUA_NETWORK_PLAYER_FIELD_COUNT }, { LOT_OBJECT, sObjectFields, LUA_OBJECT_FIELD_COUNT }, { LOT_OBJECTHITBOX, sObjectHitboxFields, LUA_OBJECT_HITBOX_FIELD_COUNT }, { LOT_OBJECTNODE, sObjectNodeFields, LUA_OBJECT_NODE_FIELD_COUNT }, { LOT_OBJECTWARPNODE, sObjectWarpNodeFields, LUA_OBJECT_WARP_NODE_FIELD_COUNT }, - { LOT_OFFSETSIZEPAIR, sOffsetSizePairFields, LUA_OFFSET_SIZE_PAIR_FIELD_COUNT }, { LOT_PAINTING, sPaintingFields, LUA_PAINTING_FIELD_COUNT }, - { LOT_PAINTINGMESHVERTEX, sPaintingMeshVertexFields, LUA_PAINTING_MESH_VERTEX_FIELD_COUNT }, { LOT_PAINTINGVALUES, sPaintingValuesFields, LUA_PAINTING_VALUES_FIELD_COUNT }, - { LOT_PARALLELTRACKINGPOINT, sParallelTrackingPointFields, LUA_PARALLEL_TRACKING_POINT_FIELD_COUNT }, { LOT_PLAYERCAMERASTATE, sPlayerCameraStateFields, LUA_PLAYER_CAMERA_STATE_FIELD_COUNT }, - { LOT_PLAYERGEOMETRY, sPlayerGeometryFields, LUA_PLAYER_GEOMETRY_FIELD_COUNT }, { LOT_PLAYERPALETTE, sPlayerPaletteFields, LUA_PLAYER_PALETTE_FIELD_COUNT }, { LOT_RAYINTERSECTIONINFO, sRayIntersectionInfoFields, LUA_RAY_INTERSECTION_INFO_FIELD_COUNT }, { LOT_ROMHACKCAMERASETTINGS, sRomhackCameraSettingsFields, LUA_ROMHACK_CAMERA_SETTINGS_FIELD_COUNT }, { LOT_SERVERSETTINGS, sServerSettingsFields, LUA_SERVER_SETTINGS_FIELD_COUNT }, - { LOT_SOUNDSTATE, sSoundStateFields, LUA_SOUND_STATE_FIELD_COUNT }, { LOT_SPAWNINFO, sSpawnInfoFields, LUA_SPAWN_INFO_FIELD_COUNT }, { LOT_SPAWNPARTICLESINFO, sSpawnParticlesInfoFields, LUA_SPAWN_PARTICLES_INFO_FIELD_COUNT }, { LOT_STARPOSITIONS, sStarPositionsFields, LUA_STAR_POSITIONS_FIELD_COUNT }, { LOT_STARSNEEDEDFORDIALOG, sStarsNeededForDialogFields, LUA_STARS_NEEDED_FOR_DIALOG_FIELD_COUNT }, + { LOT_STATICOBJECTCOLLISION, sStaticObjectCollisionFields, LUA_STATIC_OBJECT_COLLISION_FIELD_COUNT }, { LOT_SURFACE, sSurfaceFields, LUA_SURFACE_FIELD_COUNT }, { LOT_TEXTUREINFO, sTextureInfoFields, LUA_TEXTURE_INFO_FIELD_COUNT }, - { LOT_TRANSITIONINFO, sTransitionInfoFields, LUA_TRANSITION_INFO_FIELD_COUNT }, { LOT_VTX, sVtxFields, LUA_VTX_FIELD_COUNT }, - { LOT_VTX_INTERP, sVtx_InterpFields, LUA_VTX__INTERP_FIELD_COUNT }, { LOT_WALLCOLLISIONDATA, sWallCollisionDataFields, LUA_WALL_COLLISION_DATA_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_WATERDROPLETPARAMS, sWaterDropletParamsFields, LUA_WATER_DROPLET_PARAMS_FIELD_COUNT }, { LOT_WAYPOINT, sWaypointFields, LUA_WAYPOINT_FIELD_COUNT }, { LOT_WHIRLPOOL, sWhirlpoolFields, LUA_WHIRLPOOL_FIELD_COUNT }, @@ -3016,24 +2820,15 @@ const char *sLuaLotNames[] = { [LOT_ANIMINFO] = "AnimInfo", [LOT_ANIMATION] = "Animation", - [LOT_ANIMATIONTABLE] = "AnimationTable", [LOT_AREA] = "Area", [LOT_BEHAVIORDIALOGS] = "BehaviorDialogs", [LOT_BEHAVIORTRAJECTORIES] = "BehaviorTrajectories", [LOT_BEHAVIORVALUES] = "BehaviorValues", - [LOT_BULLYCOLLISIONDATA] = "BullyCollisionData", [LOT_CAMERA] = "Camera", - [LOT_CAMERAFOVSTATUS] = "CameraFOVStatus", - [LOT_CAMERAOVERRIDE] = "CameraOverride", - [LOT_CAMERASTOREDINFO] = "CameraStoredInfo", - [LOT_CAMERATRIGGER] = "CameraTrigger", [LOT_CHAINSEGMENT] = "ChainSegment", [LOT_CHARACTER] = "Character", [LOT_CONTROLLER] = "Controller", [LOT_CUSTOMLEVELINFO] = "CustomLevelInfo", - [LOT_CUTSCENE] = "Cutscene", - [LOT_CUTSCENESPLINEPOINT] = "CutsceneSplinePoint", - [LOT_CUTSCENEVARIABLE] = "CutsceneVariable", [LOT_DATETIME] = "DateTime", [LOT_DIALOGENTRY] = "DialogEntry", [LOT_DISPLAYLISTNODE] = "DisplayListNode", @@ -3044,7 +2839,6 @@ const char *sLuaLotNames[] = { [LOT_DJUITHREEPANELTHEME] = "DjuiThreePanelTheme", [LOT_EXCLAMATIONBOXCONTENT] = "ExclamationBoxContent", [LOT_FIRSTPERSONCAMERA] = "FirstPersonCamera", - [LOT_FLOORGEOMETRY] = "FloorGeometry", [LOT_FNGRAPHNODE] = "FnGraphNode", [LOT_GFX] = "Gfx", [LOT_GLOBALOBJECTANIMATIONS] = "GlobalObjectAnimations", @@ -3075,54 +2869,40 @@ const char *sLuaLotNames[] = { [LOT_GRAPHNODESWITCHCASE] = "GraphNodeSwitchCase", [LOT_GRAPHNODETRANSLATION] = "GraphNodeTranslation", [LOT_GRAPHNODETRANSLATIONROTATION] = "GraphNodeTranslationRotation", - [LOT_GRAPHNODE_802A45E4] = "GraphNode_802A45E4", - [LOT_HANDHELDSHAKEPOINT] = "HandheldShakePoint", [LOT_HUDUTILSROTATION] = "HudUtilsRotation", [LOT_INSTANTWARP] = "InstantWarp", [LOT_LAKITUSTATE] = "LakituState", [LOT_LEVELVALUES] = "LevelValues", - [LOT_LINEARTRANSITIONPOINT] = "LinearTransitionPoint", [LOT_MARIOANIMATION] = "MarioAnimation", [LOT_MARIOBODYSTATE] = "MarioBodyState", [LOT_MARIOSTATE] = "MarioState", [LOT_MOD] = "Mod", [LOT_MODAUDIO] = "ModAudio", - [LOT_MODAUDIOSAMPLECOPIES] = "ModAudioSampleCopies", - [LOT_MODFILE] = "ModFile", [LOT_MODFS] = "ModFs", [LOT_MODFSFILE] = "ModFsFile", - [LOT_MODETRANSITIONINFO] = "ModeTransitionInfo", [LOT_NAMETAGSSETTINGS] = "NametagsSettings", [LOT_NETWORKPLAYER] = "NetworkPlayer", [LOT_OBJECT] = "Object", [LOT_OBJECTHITBOX] = "ObjectHitbox", [LOT_OBJECTNODE] = "ObjectNode", [LOT_OBJECTWARPNODE] = "ObjectWarpNode", - [LOT_OFFSETSIZEPAIR] = "OffsetSizePair", [LOT_PAINTING] = "Painting", - [LOT_PAINTINGMESHVERTEX] = "PaintingMeshVertex", [LOT_PAINTINGVALUES] = "PaintingValues", - [LOT_PARALLELTRACKINGPOINT] = "ParallelTrackingPoint", [LOT_PLAYERCAMERASTATE] = "PlayerCameraState", - [LOT_PLAYERGEOMETRY] = "PlayerGeometry", [LOT_PLAYERPALETTE] = "PlayerPalette", [LOT_RAYINTERSECTIONINFO] = "RayIntersectionInfo", [LOT_ROMHACKCAMERASETTINGS] = "RomhackCameraSettings", [LOT_SERVERSETTINGS] = "ServerSettings", - [LOT_SOUNDSTATE] = "SoundState", [LOT_SPAWNINFO] = "SpawnInfo", [LOT_SPAWNPARTICLESINFO] = "SpawnParticlesInfo", [LOT_STARPOSITIONS] = "StarPositions", [LOT_STARSNEEDEDFORDIALOG] = "StarsNeededForDialog", + [LOT_STATICOBJECTCOLLISION] = "StaticObjectCollision", [LOT_SURFACE] = "Surface", [LOT_TEXTUREINFO] = "TextureInfo", - [LOT_TRANSITIONINFO] = "TransitionInfo", [LOT_VTX] = "Vtx", - [LOT_VTX_INTERP] = "Vtx_Interp", [LOT_WALLCOLLISIONDATA] = "WallCollisionData", [LOT_WARPNODE] = "WarpNode", - [LOT_WARPTRANSITION] = "WarpTransition", - [LOT_WARPTRANSITIONDATA] = "WarpTransitionData", [LOT_WATERDROPLETPARAMS] = "WaterDropletParams", [LOT_WAYPOINT] = "Waypoint", [LOT_WHIRLPOOL] = "Whirlpool", diff --git a/src/pc/lua/smlua_cobject_autogen.h b/src/pc/lua/smlua_cobject_autogen.h index b5ec35d19..291e0f3ee 100644 --- a/src/pc/lua/smlua_cobject_autogen.h +++ b/src/pc/lua/smlua_cobject_autogen.h @@ -25,24 +25,15 @@ enum LuaObjectAutogenType { LOT_AUTOGEN_MIN = 1000, LOT_ANIMINFO, LOT_ANIMATION, - LOT_ANIMATIONTABLE, LOT_AREA, LOT_BEHAVIORDIALOGS, LOT_BEHAVIORTRAJECTORIES, LOT_BEHAVIORVALUES, - LOT_BULLYCOLLISIONDATA, LOT_CAMERA, - LOT_CAMERAFOVSTATUS, - LOT_CAMERAOVERRIDE, - LOT_CAMERASTOREDINFO, - LOT_CAMERATRIGGER, LOT_CHAINSEGMENT, LOT_CHARACTER, LOT_CONTROLLER, LOT_CUSTOMLEVELINFO, - LOT_CUTSCENE, - LOT_CUTSCENESPLINEPOINT, - LOT_CUTSCENEVARIABLE, LOT_DATETIME, LOT_DIALOGENTRY, LOT_DISPLAYLISTNODE, @@ -53,7 +44,6 @@ enum LuaObjectAutogenType { LOT_DJUITHREEPANELTHEME, LOT_EXCLAMATIONBOXCONTENT, LOT_FIRSTPERSONCAMERA, - LOT_FLOORGEOMETRY, LOT_FNGRAPHNODE, LOT_GFX, LOT_GLOBALOBJECTANIMATIONS, @@ -84,54 +74,40 @@ enum LuaObjectAutogenType { LOT_GRAPHNODESWITCHCASE, LOT_GRAPHNODETRANSLATION, LOT_GRAPHNODETRANSLATIONROTATION, - LOT_GRAPHNODE_802A45E4, - LOT_HANDHELDSHAKEPOINT, LOT_HUDUTILSROTATION, LOT_INSTANTWARP, LOT_LAKITUSTATE, LOT_LEVELVALUES, - LOT_LINEARTRANSITIONPOINT, LOT_MARIOANIMATION, LOT_MARIOBODYSTATE, LOT_MARIOSTATE, LOT_MOD, LOT_MODAUDIO, - LOT_MODAUDIOSAMPLECOPIES, - LOT_MODFILE, LOT_MODFS, LOT_MODFSFILE, - LOT_MODETRANSITIONINFO, LOT_NAMETAGSSETTINGS, LOT_NETWORKPLAYER, LOT_OBJECT, LOT_OBJECTHITBOX, LOT_OBJECTNODE, LOT_OBJECTWARPNODE, - LOT_OFFSETSIZEPAIR, LOT_PAINTING, - LOT_PAINTINGMESHVERTEX, LOT_PAINTINGVALUES, - LOT_PARALLELTRACKINGPOINT, LOT_PLAYERCAMERASTATE, - LOT_PLAYERGEOMETRY, LOT_PLAYERPALETTE, LOT_RAYINTERSECTIONINFO, LOT_ROMHACKCAMERASETTINGS, LOT_SERVERSETTINGS, - LOT_SOUNDSTATE, LOT_SPAWNINFO, LOT_SPAWNPARTICLESINFO, LOT_STARPOSITIONS, LOT_STARSNEEDEDFORDIALOG, + LOT_STATICOBJECTCOLLISION, LOT_SURFACE, LOT_TEXTUREINFO, - LOT_TRANSITIONINFO, LOT_VTX, - LOT_VTX_INTERP, LOT_WALLCOLLISIONDATA, LOT_WARPNODE, - LOT_WARPTRANSITION, - LOT_WARPTRANSITIONDATA, LOT_WATERDROPLETPARAMS, LOT_WAYPOINT, LOT_WHIRLPOOL, diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index f4ebbea66..f94175f1c 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -1523,6 +1523,7 @@ char gSmluaConstants[] = "" "G_TEXRECTFLIP=0xe5\n" "G_TEXRECT=0xe4\n" "G_VTX_EXT=0x11\n" +"G_SETENVRGB=0xd1\n" "G_PPARTTOCOLOR=0xd3\n" "BACKGROUND_OCEAN_SKY=0\n" "BACKGROUND_FLAMING_SKY=1\n" @@ -1544,6 +1545,7 @@ char gSmluaConstants[] = "" "GRAPH_RENDER_CYLBOARD=(1 << 6)\n" "GRAPH_RENDER_PLAYER=(1 << 7)\n" "GRAPH_EXTRA_FORCE_3D=(1 << 0)\n" +"GRAPH_EXTRA_ROTATE_HELD=(1 << 1)\n" "GRAPH_NODE_TYPE_FUNCTIONAL=0x100\n" "GRAPH_NODE_TYPE_400=0x400\n" "GRAPH_NODE_TYPE_ROOT=0x001\n" @@ -2238,9 +2240,11 @@ char gSmluaConstants[] = "" "GRAB_POS_LIGHT_OBJ=1\n" "GRAB_POS_HEAVY_OBJ=2\n" "GRAB_POS_BOWSER=3\n" -"MOD_FS_MAX_SIZE=0x1000000\n" -"MOD_FS_MAX_FILES=0x100\n" +"MOD_FS_MAX_SIZE=0x2000000\n" +"MOD_FS_MAX_FILES=0x200\n" "MOD_FS_MAX_PATH=0x100\n" +"MOD_FS_URI_PREFIX='modfs:/'\n" +"MOD_FS_URI_FORMAT='modfs:/%s/%s'\n" "INT_TYPE_U8=0\n" "INT_TYPE_U16=1\n" "INT_TYPE_U32=2\n" @@ -2977,6 +2981,7 @@ char gSmluaConstants[] = "" "L_CBUTTONS=CONT_C\n" "R_CBUTTONS=CONT_F\n" "D_CBUTTONS=CONT_D\n" +"PALETTES_DIRECTORY='palettes'\n" "MAX_PRESET_PALETTES=128\n" "PANTS=0\n" "SHIRT=1\n" @@ -4542,6 +4547,7 @@ char gSmluaConstants[] = "" "SURFACE_CLASS_NOT_SLIPPERY=0x0015\n" "SURFACE_FLAG_DYNAMIC=(1 << 0)\n" "SURFACE_FLAG_NO_CAM_COLLISION=(1 << 1)\n" +"SURFACE_FLAG_INTANGIBLE=(1 << 2)\n" "SURFACE_FLAG_X_PROJECTION=(1 << 3)\n" "HAZARD_TYPE_LAVA_FLOOR=1\n" "HAZARD_TYPE_LAVA_WALL=2\n" @@ -4619,5 +4625,7 @@ char gSmluaConstants[] = "" "VERSION_TEXT='v'\n" "VERSION_NUMBER=41\n" "MINOR_VERSION_NUMBER=0\n" +"GAME_NAME='sm64coopdx'\n" +"WINDOW_NAME='Super Mario 64 Coop Deluxe'\n" "MAX_VERSION_LENGTH=128\n" ; \ No newline at end of file diff --git a/src/pc/lua/smlua_functions.c b/src/pc/lua/smlua_functions.c index aae860717..dadf70c51 100644 --- a/src/pc/lua/smlua_functions.c +++ b/src/pc/lua/smlua_functions.c @@ -434,11 +434,7 @@ int smlua_func_get_texture_info(lua_State* L) { lua_newtable(L); lua_pushstring(L, "texture"); - smlua_push_pointer(L, LVT_TEXTURE_P, texInfo.texture, NULL); - lua_settable(L, -3); - - lua_pushstring(L, "bitSize"); - lua_pushinteger(L, texInfo.bitSize); + smlua_push_pointer(L, LVT_TEXTURE_P, (void *) texInfo.texture, NULL); lua_settable(L, -3); lua_pushstring(L, "width"); @@ -449,6 +445,14 @@ int smlua_func_get_texture_info(lua_State* L) { lua_pushinteger(L, texInfo.height); lua_settable(L, -3); + lua_pushstring(L, "format"); + lua_pushinteger(L, texInfo.format); + lua_settable(L, -3); + + lua_pushstring(L, "size"); + lua_pushinteger(L, texInfo.size); + lua_settable(L, -3); + lua_pushstring(L, "name"); lua_pushstring(L, texInfo.name); lua_settable(L, -3); diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index c28245176..8c88e94d6 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -11861,6 +11861,7 @@ int smlua_func_rotate_camera_around_walls(lua_State* L) { return 1; } +/* int smlua_func_find_mario_floor_and_ceil(lua_State* L) { if (L == NULL) { return 0; } @@ -11870,13 +11871,14 @@ int smlua_func_find_mario_floor_and_ceil(lua_State* L) { return 0; } - struct PlayerGeometry* pg = (struct PlayerGeometry*)smlua_to_cobject(L, 1, LOT_PLAYERGEOMETRY); +// struct PlayerGeometry* pg = (struct PlayerGeometry*)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_mario_floor_and_ceil"); return 0; } find_mario_floor_and_ceil(pg); return 1; } +*/ int smlua_func_start_object_cutscene_without_focus(lua_State* L) { if (L == NULL) { return 0; } @@ -12698,6 +12700,21 @@ int smlua_func_djui_hud_get_raw_mouse_y(UNUSED lua_State* L) { return 1; } +int smlua_func_djui_hud_is_mouse_locked(UNUSED lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_is_mouse_locked", 0, top); + return 0; + } + + + lua_pushboolean(L, djui_hud_is_mouse_locked()); + + return 1; +} + int smlua_func_djui_hud_set_mouse_locked(lua_State* L) { if (L == NULL) { return 0; } @@ -14129,6 +14146,23 @@ int smlua_func_set_menu_mode(lua_State* L) { return 1; } +int smlua_func_handle_special_dialog_text(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "handle_special_dialog_text", 1, top); + return 0; + } + + s32 dialogID = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "handle_special_dialog_text"); return 0; } + + handle_special_dialog_text(dialogID); + + return 1; +} + int smlua_func_set_min_dialog_width(lua_State* L) { if (L == NULL) { return 0; } @@ -15434,6 +15468,21 @@ int smlua_func_level_control_timer_running(UNUSED lua_State* L) { return 1; } +int smlua_func_pressed_pause(UNUSED lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "pressed_pause", 0, top); + return 0; + } + + + lua_pushboolean(L, pressed_pause()); + + return 1; +} + int smlua_func_fade_into_special_warp(lua_State* L) { if (L == NULL) { return 0; } @@ -19290,6 +19339,7 @@ int smlua_func_mario_bonk_reflection(lua_State* L) { return 1; } +/* int smlua_func_init_bully_collision_data(lua_State* L) { if (L == NULL) { return 0; } @@ -19299,7 +19349,7 @@ int smlua_func_init_bully_collision_data(lua_State* L) { return 0; } - struct BullyCollisionData* data = (struct BullyCollisionData*)smlua_to_cobject(L, 1, LOT_BULLYCOLLISIONDATA); +// struct BullyCollisionData* data = (struct BullyCollisionData*)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "init_bully_collision_data"); return 0; } f32 posX = smlua_to_number(L, 2); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "init_bully_collision_data"); return 0; } @@ -19318,6 +19368,7 @@ int smlua_func_init_bully_collision_data(lua_State* L) { return 1; } +*/ int smlua_func_mario_update_quicksand(lua_State* L) { if (L == NULL) { return 0; } @@ -22481,53 +22532,6 @@ int smlua_func_mod_fs_create(UNUSED lua_State* L) { return 1; } -int smlua_func_mod_fs_delete(UNUSED lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 0) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_fs_delete", 0, top); - return 0; - } - - - lua_pushboolean(L, mod_fs_delete()); - - return 1; -} - -int smlua_func_mod_fs_save(UNUSED lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 0) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_fs_save", 0, top); - return 0; - } - - - lua_pushboolean(L, mod_fs_save()); - - return 1; -} - -int smlua_func_mod_fs_set_public(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 1) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_fs_set_public", 1, top); - return 0; - } - - bool pub = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_fs_set_public"); return 0; } - - lua_pushboolean(L, mod_fs_set_public(pub)); - - return 1; -} - int smlua_func_mod_fs_get_filename(lua_State* L) { if (L == NULL) { return 0; } @@ -22669,6 +22673,59 @@ int smlua_func_mod_fs_clear(lua_State* L) { return 1; } +int smlua_func_mod_fs_save(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_fs_save", 1, top); + return 0; + } + + struct ModFs* modFs = (struct ModFs*)smlua_to_cobject(L, 1, LOT_MODFS); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_fs_save"); return 0; } + + lua_pushboolean(L, mod_fs_save(modFs)); + + return 1; +} + +int smlua_func_mod_fs_delete(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_fs_delete", 1, top); + return 0; + } + + struct ModFs* modFs = (struct ModFs*)smlua_to_cobject(L, 1, LOT_MODFS); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_fs_delete"); return 0; } + + lua_pushboolean(L, mod_fs_delete(modFs)); + + return 1; +} + +int smlua_func_mod_fs_set_public(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_fs_set_public", 2, top); + return 0; + } + + struct ModFs* modFs = (struct ModFs*)smlua_to_cobject(L, 1, LOT_MODFS); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_fs_set_public"); return 0; } + bool pub = smlua_to_boolean(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mod_fs_set_public"); return 0; } + + lua_pushboolean(L, mod_fs_set_public(modFs, pub)); + + return 1; +} + int smlua_func_mod_fs_file_read_bool(lua_State* L) { if (L == NULL) { return 0; } @@ -22916,6 +22973,23 @@ int smlua_func_mod_fs_file_seek(lua_State* L) { return 1; } +int smlua_func_mod_fs_file_rewind(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_fs_file_rewind", 1, top); + return 0; + } + + struct ModFsFile* file = (struct ModFsFile*)smlua_to_cobject(L, 1, LOT_MODFSFILE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_fs_file_rewind"); return 0; } + + lua_pushboolean(L, mod_fs_file_rewind(file)); + + return 1; +} + int smlua_func_mod_fs_file_is_eof(lua_State* L) { if (L == NULL) { return 0; } @@ -22973,6 +23047,25 @@ int smlua_func_mod_fs_file_erase(lua_State* L) { return 1; } +int smlua_func_mod_fs_file_set_text_mode(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_fs_file_set_text_mode", 2, top); + return 0; + } + + struct ModFsFile* file = (struct ModFsFile*)smlua_to_cobject(L, 1, LOT_MODFSFILE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_fs_file_set_text_mode"); return 0; } + bool text = smlua_to_boolean(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mod_fs_file_set_text_mode"); return 0; } + + lua_pushboolean(L, mod_fs_file_set_text_mode(file, text)); + + return 1; +} + int smlua_func_mod_fs_file_set_public(lua_State* L) { if (L == NULL) { return 0; } @@ -23136,6 +23229,21 @@ int smlua_func_mod_storage_load_bool(lua_State* L) { return 1; } +int smlua_func_mod_storage_load_all(UNUSED lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_storage_load_all", 0, top); + return 0; + } + + + smlua_push_lua_table(L, mod_storage_load_all()); + + return 1; +} + int smlua_func_mod_storage_exists(lua_State* L) { if (L == NULL) { return 0; } @@ -26380,6 +26488,7 @@ int smlua_func_cur_obj_init_animation_with_accel_and_sound(lua_State* L) { return 1; } +/* int smlua_func_obj_init_animation_with_sound(lua_State* L) { if (L == NULL) { return 0; } @@ -26391,7 +26500,7 @@ int smlua_func_obj_init_animation_with_sound(lua_State* L) { struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_init_animation_with_sound"); return 0; } - struct AnimationTable* animations = (struct AnimationTable*)smlua_to_cobject(L, 2, LOT_ANIMATIONTABLE); +// struct AnimationTable* animations = (struct AnimationTable*)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_init_animation_with_sound"); return 0; } s32 animIndex = smlua_to_integer(L, 3); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_init_animation_with_sound"); return 0; } @@ -26401,6 +26510,7 @@ int smlua_func_obj_init_animation_with_sound(lua_State* L) { return 1; } +*/ int smlua_func_cur_obj_enable_rendering_and_become_tangible(lua_State* L) { if (L == NULL) { return 0; } @@ -30254,6 +30364,21 @@ int smlua_func_save_file_is_cannon_unlocked(lua_State* L) { return 1; } +int smlua_func_save_file_set_cannon_unlocked(UNUSED lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "save_file_set_cannon_unlocked", 0, top); + return 0; + } + + + save_file_set_cannon_unlocked(); + + return 1; +} + int smlua_func_save_file_get_cap_pos(lua_State* L) { if (L == NULL) { return 0; } @@ -33207,6 +33332,21 @@ int smlua_func_djui_get_playerlist_page_index(UNUSED lua_State* L) { return 1; } +int smlua_func_djui_is_chatbox_open(UNUSED lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_is_chatbox_open", 0, top); + return 0; + } + + + lua_pushboolean(L, djui_is_chatbox_open()); + + return 1; +} + int smlua_func_djui_menu_get_font(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -33679,6 +33819,68 @@ int smlua_func_is_game_paused(UNUSED lua_State* L) { return 1; } +int smlua_func_is_pause_menu_hidden(UNUSED lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "is_pause_menu_hidden", 0, top); + return 0; + } + + + lua_pushboolean(L, is_pause_menu_hidden()); + + return 1; +} + +int smlua_func_set_pause_menu_hidden(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_pause_menu_hidden", 1, top); + return 0; + } + + bool hidden = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_pause_menu_hidden"); return 0; } + + set_pause_menu_hidden(hidden); + + return 1; +} + +int smlua_func_game_pause(UNUSED lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "game_pause", 0, top); + return 0; + } + + + game_pause(); + + return 1; +} + +int smlua_func_game_unpause(UNUSED lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "game_unpause", 0, top); + return 0; + } + + + game_unpause(); + + return 1; +} + int smlua_func_is_transition_playing(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -34404,7 +34606,7 @@ int smlua_func_texture_to_lua_table(lua_State* L) { Texture * tex = (Texture *)smlua_to_cpointer(L, 1, LVT_TEXTURE_P); if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "texture_to_lua_table"); return 0; } - texture_to_lua_table(tex); + smlua_push_lua_table(L, texture_to_lua_table(tex)); return 1; } @@ -35093,6 +35295,25 @@ int smlua_func_obj_get_temp_spawn_particles_info(lua_State* L) { return 1; } +int smlua_func_obj_get_temp_water_droplet_params(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_get_temp_water_droplet_params", 2, top); + return 0; + } + + int modelId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_temp_water_droplet_params"); return 0; } + int behaviorId = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_temp_water_droplet_params"); return 0; } + + smlua_push_object(L, LOT_WATERDROPLETPARAMS, obj_get_temp_water_droplet_params(modelId, behaviorId), NULL); + + return 1; +} + int smlua_func_get_temp_object_hitbox(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -36485,6 +36706,59 @@ int smlua_func_load_object_collision_model(UNUSED lua_State* L) { return 1; } +int smlua_func_load_static_object_collision(UNUSED lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "load_static_object_collision", 0, top); + return 0; + } + + + smlua_push_object(L, LOT_STATICOBJECTCOLLISION, load_static_object_collision(), NULL); + + return 1; +} + +int smlua_func_toggle_static_object_collision(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "toggle_static_object_collision", 2, top); + return 0; + } + + struct StaticObjectCollision* col = (struct StaticObjectCollision*)smlua_to_cobject(L, 1, LOT_STATICOBJECTCOLLISION); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "toggle_static_object_collision"); return 0; } + bool tangible = smlua_to_boolean(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "toggle_static_object_collision"); return 0; } + + toggle_static_object_collision(col, tangible); + + return 1; +} + +int smlua_func_get_static_object_surface(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_static_object_surface", 2, top); + return 0; + } + + struct StaticObjectCollision* col = (struct StaticObjectCollision*)smlua_to_cobject(L, 1, LOT_STATICOBJECTCOLLISION); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_static_object_surface"); return 0; } + u32 index = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_static_object_surface"); return 0; } + + smlua_push_object(L, LOT_SURFACE, get_static_object_surface(col, index), NULL); + + return 1; +} + int smlua_func_obj_get_surface_from_index(lua_State* L) { if (L == NULL) { return 0; } @@ -37268,7 +37542,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "camera_course_processing", smlua_func_camera_course_processing); smlua_bind_function(L, "resolve_geometry_collisions", smlua_func_resolve_geometry_collisions); smlua_bind_function(L, "rotate_camera_around_walls", smlua_func_rotate_camera_around_walls); - smlua_bind_function(L, "find_mario_floor_and_ceil", smlua_func_find_mario_floor_and_ceil); + //smlua_bind_function(L, "find_mario_floor_and_ceil", smlua_func_find_mario_floor_and_ceil); <--- UNIMPLEMENTED smlua_bind_function(L, "start_object_cutscene_without_focus", smlua_func_start_object_cutscene_without_focus); smlua_bind_function(L, "cutscene_object_with_dialog", smlua_func_cutscene_object_with_dialog); smlua_bind_function(L, "cutscene_object_without_dialog", smlua_func_cutscene_object_without_dialog); @@ -37321,6 +37595,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "djui_hud_get_mouse_y", smlua_func_djui_hud_get_mouse_y); smlua_bind_function(L, "djui_hud_get_raw_mouse_x", smlua_func_djui_hud_get_raw_mouse_x); smlua_bind_function(L, "djui_hud_get_raw_mouse_y", smlua_func_djui_hud_get_raw_mouse_y); + smlua_bind_function(L, "djui_hud_is_mouse_locked", smlua_func_djui_hud_is_mouse_locked); smlua_bind_function(L, "djui_hud_set_mouse_locked", smlua_func_djui_hud_set_mouse_locked); smlua_bind_function(L, "djui_hud_get_mouse_buttons_down", smlua_func_djui_hud_get_mouse_buttons_down); smlua_bind_function(L, "djui_hud_get_mouse_buttons_pressed", smlua_func_djui_hud_get_mouse_buttons_pressed); @@ -37408,6 +37683,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "create_dialog_box_with_response", smlua_func_create_dialog_box_with_response); smlua_bind_function(L, "reset_dialog_render_state", smlua_func_reset_dialog_render_state); smlua_bind_function(L, "set_menu_mode", smlua_func_set_menu_mode); + smlua_bind_function(L, "handle_special_dialog_text", smlua_func_handle_special_dialog_text); smlua_bind_function(L, "set_min_dialog_width", smlua_func_set_min_dialog_width); smlua_bind_function(L, "set_dialog_override_pos", smlua_func_set_dialog_override_pos); smlua_bind_function(L, "reset_dialog_override_pos", smlua_func_reset_dialog_override_pos); @@ -37485,6 +37761,7 @@ void smlua_bind_functions_autogen(void) { // level_update.h smlua_bind_function(L, "level_control_timer_running", smlua_func_level_control_timer_running); + smlua_bind_function(L, "pressed_pause", smlua_func_pressed_pause); smlua_bind_function(L, "fade_into_special_warp", smlua_func_fade_into_special_warp); smlua_bind_function(L, "get_instant_warp", smlua_func_get_instant_warp); smlua_bind_function(L, "get_painting_warp_node", smlua_func_get_painting_warp_node); @@ -37705,7 +37982,7 @@ void smlua_bind_functions_autogen(void) { // 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, "init_bully_collision_data", smlua_func_init_bully_collision_data); + //smlua_bind_function(L, "init_bully_collision_data", smlua_func_init_bully_collision_data); <--- UNIMPLEMENTED 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); @@ -37851,9 +38128,6 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "mod_fs_get", smlua_func_mod_fs_get); smlua_bind_function(L, "mod_fs_reload", smlua_func_mod_fs_reload); smlua_bind_function(L, "mod_fs_create", smlua_func_mod_fs_create); - smlua_bind_function(L, "mod_fs_delete", smlua_func_mod_fs_delete); - smlua_bind_function(L, "mod_fs_save", smlua_func_mod_fs_save); - smlua_bind_function(L, "mod_fs_set_public", smlua_func_mod_fs_set_public); smlua_bind_function(L, "mod_fs_get_filename", smlua_func_mod_fs_get_filename); smlua_bind_function(L, "mod_fs_get_file", smlua_func_mod_fs_get_file); smlua_bind_function(L, "mod_fs_create_file", smlua_func_mod_fs_create_file); @@ -37861,6 +38135,9 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "mod_fs_copy_file", smlua_func_mod_fs_copy_file); smlua_bind_function(L, "mod_fs_delete_file", smlua_func_mod_fs_delete_file); smlua_bind_function(L, "mod_fs_clear", smlua_func_mod_fs_clear); + smlua_bind_function(L, "mod_fs_save", smlua_func_mod_fs_save); + smlua_bind_function(L, "mod_fs_delete", smlua_func_mod_fs_delete); + smlua_bind_function(L, "mod_fs_set_public", smlua_func_mod_fs_set_public); smlua_bind_function(L, "mod_fs_file_read_bool", smlua_func_mod_fs_file_read_bool); smlua_bind_function(L, "mod_fs_file_read_integer", smlua_func_mod_fs_file_read_integer); smlua_bind_function(L, "mod_fs_file_read_number", smlua_func_mod_fs_file_read_number); @@ -37874,9 +38151,11 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "mod_fs_file_write_string", smlua_func_mod_fs_file_write_string); smlua_bind_function(L, "mod_fs_file_write_line", smlua_func_mod_fs_file_write_line); smlua_bind_function(L, "mod_fs_file_seek", smlua_func_mod_fs_file_seek); + smlua_bind_function(L, "mod_fs_file_rewind", smlua_func_mod_fs_file_rewind); smlua_bind_function(L, "mod_fs_file_is_eof", smlua_func_mod_fs_file_is_eof); smlua_bind_function(L, "mod_fs_file_fill", smlua_func_mod_fs_file_fill); smlua_bind_function(L, "mod_fs_file_erase", smlua_func_mod_fs_file_erase); + smlua_bind_function(L, "mod_fs_file_set_text_mode", smlua_func_mod_fs_file_set_text_mode); smlua_bind_function(L, "mod_fs_file_set_public", smlua_func_mod_fs_file_set_public); smlua_bind_function(L, "mod_fs_hide_errors", smlua_func_mod_fs_hide_errors); smlua_bind_function(L, "mod_fs_get_last_error", smlua_func_mod_fs_get_last_error); @@ -37888,6 +38167,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "mod_storage_load", smlua_func_mod_storage_load); smlua_bind_function(L, "mod_storage_load_number", smlua_func_mod_storage_load_number); smlua_bind_function(L, "mod_storage_load_bool", smlua_func_mod_storage_load_bool); + smlua_bind_function(L, "mod_storage_load_all", smlua_func_mod_storage_load_all); smlua_bind_function(L, "mod_storage_exists", smlua_func_mod_storage_exists); smlua_bind_function(L, "mod_storage_remove", smlua_func_mod_storage_remove); smlua_bind_function(L, "mod_storage_clear", smlua_func_mod_storage_clear); @@ -38055,7 +38335,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "cur_obj_init_animation_with_sound", smlua_func_cur_obj_init_animation_with_sound); smlua_bind_function(L, "obj_init_animation_with_accel_and_sound", smlua_func_obj_init_animation_with_accel_and_sound); smlua_bind_function(L, "cur_obj_init_animation_with_accel_and_sound", smlua_func_cur_obj_init_animation_with_accel_and_sound); - smlua_bind_function(L, "obj_init_animation_with_sound", smlua_func_obj_init_animation_with_sound); + //smlua_bind_function(L, "obj_init_animation_with_sound", smlua_func_obj_init_animation_with_sound); <--- UNIMPLEMENTED smlua_bind_function(L, "cur_obj_enable_rendering_and_become_tangible", smlua_func_cur_obj_enable_rendering_and_become_tangible); smlua_bind_function(L, "cur_obj_enable_rendering", smlua_func_cur_obj_enable_rendering); smlua_bind_function(L, "cur_obj_disable_rendering_and_become_intangible", smlua_func_cur_obj_disable_rendering_and_become_intangible); @@ -38274,6 +38554,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "save_file_get_course_coin_score", smlua_func_save_file_get_course_coin_score); smlua_bind_function(L, "save_file_set_course_coin_score", smlua_func_save_file_set_course_coin_score); smlua_bind_function(L, "save_file_is_cannon_unlocked", smlua_func_save_file_is_cannon_unlocked); + smlua_bind_function(L, "save_file_set_cannon_unlocked", smlua_func_save_file_set_cannon_unlocked); smlua_bind_function(L, "save_file_get_cap_pos", smlua_func_save_file_get_cap_pos); smlua_bind_function(L, "save_file_get_sound_mode", smlua_func_save_file_get_sound_mode); @@ -38461,6 +38742,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "djui_is_playerlist_open", smlua_func_djui_is_playerlist_open); smlua_bind_function(L, "djui_attempting_to_open_playerlist", smlua_func_djui_attempting_to_open_playerlist); smlua_bind_function(L, "djui_get_playerlist_page_index", smlua_func_djui_get_playerlist_page_index); + smlua_bind_function(L, "djui_is_chatbox_open", smlua_func_djui_is_chatbox_open); smlua_bind_function(L, "djui_menu_get_font", smlua_func_djui_menu_get_font); smlua_bind_function(L, "djui_menu_get_theme", smlua_func_djui_menu_get_theme); smlua_bind_function(L, "djui_is_playerlist_ping_visible", smlua_func_djui_is_playerlist_ping_visible); @@ -38489,6 +38771,10 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "act_select_hud_show", smlua_func_act_select_hud_show); smlua_bind_function(L, "act_select_hud_is_hidden", smlua_func_act_select_hud_is_hidden); smlua_bind_function(L, "is_game_paused", smlua_func_is_game_paused); + smlua_bind_function(L, "is_pause_menu_hidden", smlua_func_is_pause_menu_hidden); + smlua_bind_function(L, "set_pause_menu_hidden", smlua_func_set_pause_menu_hidden); + smlua_bind_function(L, "game_pause", smlua_func_game_pause); + smlua_bind_function(L, "game_unpause", smlua_func_game_unpause); smlua_bind_function(L, "is_transition_playing", smlua_func_is_transition_playing); smlua_bind_function(L, "allocate_mario_action", smlua_func_allocate_mario_action); smlua_bind_function(L, "get_hand_foot_pos_x", smlua_func_get_hand_foot_pos_x); @@ -38573,6 +38859,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "obj_set_field_f32", smlua_func_obj_set_field_f32); smlua_bind_function(L, "obj_set_field_s16", smlua_func_obj_set_field_s16); smlua_bind_function(L, "obj_get_temp_spawn_particles_info", smlua_func_obj_get_temp_spawn_particles_info); + smlua_bind_function(L, "obj_get_temp_water_droplet_params", smlua_func_obj_get_temp_water_droplet_params); smlua_bind_function(L, "get_temp_object_hitbox", smlua_func_get_temp_object_hitbox); smlua_bind_function(L, "obj_is_attackable", smlua_func_obj_is_attackable); smlua_bind_function(L, "obj_is_breakable_object", smlua_func_obj_is_breakable_object); @@ -38657,6 +38944,9 @@ void smlua_bind_functions_autogen(void) { // surface_load.h smlua_bind_function(L, "load_object_collision_model", smlua_func_load_object_collision_model); + smlua_bind_function(L, "load_static_object_collision", smlua_func_load_static_object_collision); + smlua_bind_function(L, "toggle_static_object_collision", smlua_func_toggle_static_object_collision); + smlua_bind_function(L, "get_static_object_surface", smlua_func_get_static_object_surface); smlua_bind_function(L, "obj_get_surface_from_index", smlua_func_obj_get_surface_from_index); smlua_bind_function(L, "surface_has_force", smlua_func_surface_has_force); diff --git a/src/pc/lua/smlua_hooks.c b/src/pc/lua/smlua_hooks.c index f08e156d3..6ec341c05 100644 --- a/src/pc/lua/smlua_hooks.c +++ b/src/pc/lua/smlua_hooks.c @@ -41,10 +41,10 @@ struct LuaHookedEvent { static struct LuaHookedEvent sHookedEvents[HOOK_MAX] = { 0 }; static const char* sLuaHookedEventTypeName[] = { -#define SMLUA_EVENT_HOOK(hookEventType, ...) #hookEventType, +#define SMLUA_EVENT_HOOK(hookEventType, ...) [hookEventType] = #hookEventType, #include "smlua_hook_events.inl" #undef SMLUA_EVENT_HOOK - "HOOK_MAX" + [HOOK_MAX] = "HOOK_MAX" }; int smlua_call_hook(lua_State* L, int nargs, int nresults, int errfunc, struct Mod* activeMod, struct ModFile* activeModFile) { @@ -100,6 +100,7 @@ int smlua_hook_event(lua_State* L) { hook->reference[hook->count] = ref; hook->mod[hook->count] = gLuaActiveMod; + hook->modFile[hook->count] = gLuaActiveModFile; hook->count++; return 1; diff --git a/src/pc/lua/smlua_live_reload.c b/src/pc/lua/smlua_live_reload.c index 809572f4d..2b967bfdd 100644 --- a/src/pc/lua/smlua_live_reload.c +++ b/src/pc/lua/smlua_live_reload.c @@ -1,5 +1,6 @@ #include #include "smlua.h" +#include "smlua_require.h" #include "pc/mods/mods.h" #include "pc/mods/mods_utils.h" @@ -343,16 +344,8 @@ static void smlua_reload_module(lua_State *L, struct Mod* mod, struct ModFile *f // only handle loaded Lua modules if (!file->isLoadedLuaModule) { return; } - // build registry key for this mod's loaded table - char registryKey[SYS_MAX_PATH + 16]; - snprintf(registryKey, sizeof(registryKey), "mod_loaded_%s", mod->relativePath); - // get per-mod "loaded" table - lua_getfield(L, LUA_REGISTRYINDEX, registryKey); // ..., loadedTable - if (!lua_istable(L, -1)) { - lua_pop(L, 1); - return; - } + smlua_get_or_create_mod_loaded_table(L, mod); // get the old module table: loadedTable[file->relativePath] lua_getfield(L, -1, file->relativePath); // ..., loadedTable, oldMod diff --git a/src/pc/lua/smlua_require.c b/src/pc/lua/smlua_require.c index 196f8cb76..5852ac54a 100644 --- a/src/pc/lua/smlua_require.c +++ b/src/pc/lua/smlua_require.c @@ -4,47 +4,89 @@ #include "pc/mods/mods_utils.h" #include "pc/fs/fmem.h" +#define LOADING_SENTINEL ((void*)-1) + // table to track loaded modules per mod -static void smlua_init_mod_loaded_table(lua_State* L, const char* modPath) { - // Create a unique registry key for this mod's loaded table - char registryKey[SYS_MAX_PATH + 16]; - snprintf(registryKey, sizeof(registryKey), "mod_loaded_%s", modPath); +void smlua_get_or_create_mod_loaded_table(lua_State* L, struct Mod* mod) { + char registryKey[SYS_MAX_PATH + 16] = ""; + snprintf(registryKey, sizeof(registryKey), "mod_loaded_%s", mod->relativePath); lua_getfield(L, LUA_REGISTRYINDEX, registryKey); if (lua_isnil(L, -1)) { lua_pop(L, 1); lua_newtable(L); + lua_pushvalue(L, -1); lua_setfield(L, LUA_REGISTRYINDEX, registryKey); - } else { - lua_pop(L, 1); } } +bool smlua_get_cached_module_result(lua_State* L, struct Mod* mod, struct ModFile* file) { + smlua_get_or_create_mod_loaded_table(L, mod); + lua_getfield(L, -1, file->relativePath); + + if (lua_touserdata(L, -1) == LOADING_SENTINEL) { + LOG_LUA_LINE("loop or previous error loading module '%s'", file->relativePath); + lua_pop(L, 1); // pop sentinel + lua_pushnil(L); + + return true; + } + + if (lua_isnil(L, -1)) { + // not cached + lua_pop(L, 2); // pop nil and loaded table + return false; + } + + // cached, remove loaded table and leave value on top + lua_remove(L, -2); + return true; +} + +void smlua_mark_module_as_loading(lua_State* L, struct Mod* mod, struct ModFile* file) { + smlua_get_or_create_mod_loaded_table(L, mod); + lua_pushlightuserdata(L, LOADING_SENTINEL); + lua_setfield(L, -2, file->relativePath); + lua_pop(L, 1); // pop loaded table +} + +void smlua_cache_module_result(lua_State* L, struct Mod* mod, struct ModFile* file, s32 prevTop) { + if (lua_gettop(L) == prevTop) { + lua_pushboolean(L, 1); + } else if (lua_isnil(L, -1)) { + lua_pop(L, 1); + lua_pushboolean(L, 1); + } + + smlua_get_or_create_mod_loaded_table(L, mod); + + lua_pushvalue(L, -2); // duplicate result + lua_setfield(L, -2, file->relativePath); // loaded[file->relativePath] = result + lua_pop(L, 1); // pop loaded table +} + static struct ModFile* smlua_find_mod_file(const char* moduleName) { - char relativeDir[SYS_MAX_PATH] = ""; + char basePath[SYS_MAX_PATH] = ""; + char absolutePath[SYS_MAX_PATH] = ""; if (!gLuaActiveMod) { return NULL; } + // get the directory of the current file if (gLuaActiveModFile) { - path_get_folder(gLuaActiveModFile->relativePath, relativeDir); + path_get_folder(gLuaActiveModFile->relativePath, basePath); } - bool hasRelativeDir = strlen(relativeDir) > 0; + // resolve moduleName to a path relative to mod root + resolve_relative_path(basePath, moduleName, absolutePath); - struct ModFile* bestPick = NULL; - int bestRelativeDepth = INT_MAX; - int bestTotalDepth = INT_MAX; - bool foundRelativeFile = false; - - char rawName[SYS_MAX_PATH] = ""; char luaName[SYS_MAX_PATH] = ""; char luacName[SYS_MAX_PATH] = ""; - snprintf(rawName, SYS_MAX_PATH, "/%s", moduleName); - snprintf(luaName, SYS_MAX_PATH, "/%s.lua", moduleName); - snprintf(luacName, SYS_MAX_PATH, "/%s.luac", moduleName); + snprintf(luaName, SYS_MAX_PATH, "%s.lua", absolutePath); + snprintf(luacName, SYS_MAX_PATH, "%s.luac", absolutePath); + // since mods' relativePaths are relative to the mod's root, we can do a direct comparison for (int i = 0; i < gLuaActiveMod->fileCount; i++) { struct ModFile* file = &gLuaActiveMod->files[i]; @@ -54,41 +96,17 @@ static struct ModFile* smlua_find_mod_file(const char* moduleName) { } // only consider lua files - if (!str_ends_with(file->relativePath, ".lua") && !str_ends_with(file->relativePath, ".luac")) { + if (!path_ends_with(file->relativePath, ".lua") && !path_ends_with(file->relativePath, ".luac")) { continue; } // check for match - if (!str_ends_with(file->relativePath, rawName) && !str_ends_with(file->relativePath, luaName) && !str_ends_with(file->relativePath, luacName)) { - continue; - } - - // get total path depth - int totalDepth = path_depth(file->relativePath); - - // make sure we never load the old-style lua files with require() - if (totalDepth < 1) { - continue; - } - - // get relative path depth - int relativeDepth = INT_MAX; - if (hasRelativeDir && path_is_relative_to(file->relativePath, relativeDir)) { - relativeDepth = path_depth(file->relativePath + strlen(relativeDir)); - foundRelativeFile = true; - } - - // pick new best - // relative files will always win against absolute files - // other than that, shallower files will win - if (relativeDepth < bestRelativeDepth || (!foundRelativeFile && totalDepth < bestTotalDepth)) { - bestPick = file; - bestRelativeDepth = relativeDepth; - bestTotalDepth = totalDepth; + if (!strcmp(file->relativePath, luaName) || !strcmp(file->relativePath, luacName)) { + return file; } } - return bestPick; + return NULL; } static int smlua_custom_require(lua_State* L) { @@ -96,69 +114,47 @@ static int smlua_custom_require(lua_State* L) { struct Mod* activeMod = gLuaActiveMod; if (!activeMod) { - LOG_LUA("require() called outside of mod context"); + LOG_LUA_LINE("require() called outside of mod context"); return 0; } - // create registry key for this mod's loaded table - char registryKey[SYS_MAX_PATH + 16] = ""; - snprintf(registryKey, sizeof(registryKey), "mod_loaded_%s", activeMod->relativePath); - - // get or create the mod's loaded table - lua_getfield(L, LUA_REGISTRYINDEX, registryKey); - if (lua_isnil(L, -1)) { - lua_pop(L, 1); - lua_newtable(L); - lua_pushvalue(L, -1); - lua_setfield(L, LUA_REGISTRYINDEX, registryKey); + if (path_ends_with(moduleName, "/") || path_ends_with(moduleName, "\\")) { + LOG_LUA_LINE("cannot require a directory"); + return 0; } // find the file in mod files struct ModFile* file = smlua_find_mod_file(moduleName); if (!file) { - LOG_LUA("module '%s' not found in mod files", moduleName); - lua_pop(L, 1); // pop table + LOG_LUA_LINE("module '%s' not found in mod files", moduleName); return 0; } - // check if module is already loaded - lua_getfield(L, -1, file->relativePath); - if (!lua_isnil(L, -1)) { - // module already loaded, return it - return 1; - } - lua_pop(L, 1); // pop nil value - - // mark module as "loading" to prevent recursion - lua_pushboolean(L, 1); - lua_setfield(L, -2, file->relativePath); - - // cache the previous mod file - struct ModFile* prevModFile = gLuaActiveModFile; - s32 prevTop = lua_gettop(L); - // tag it as a loaded lua module file->isLoadedLuaModule = true; - // load and execute - gLuaActiveModFile = file; - smlua_load_script(activeMod, file, activeMod->index, false); - gLuaActiveModFile = prevModFile; - - // if the module didn't return anything, use true - if (prevTop == lua_gettop(L)) { - lua_pushboolean(L, 1); - } else if (lua_isnil(L, -1)) { - lua_pop(L, 1); - lua_pushboolean(L, 1); + // check cache first + if (smlua_get_cached_module_result(L, activeMod, file)) { + return 1; } - // store in loaded table - lua_pushvalue(L, -1); // duplicate return value - lua_setfield(L, -3, file->relativePath); // loaded[file->relativePath] = return_value + // mark module as "loading" to prevent recursion + smlua_mark_module_as_loading(L, activeMod, file); - // clean up stack - lua_remove(L, -2); + // cache the previous mod file + struct ModFile* prevModFile = gLuaActiveModFile; + + // load and execute + gLuaActiveModFile = file; + s32 prevTop = lua_gettop(L); + + int rc = smlua_load_script(activeMod, file, activeMod->index, false); + + if (rc == LUA_OK) { + smlua_cache_module_result(L, activeMod, file, prevTop); + } + + gLuaActiveModFile = prevModFile; return 1; // return the module value } @@ -179,6 +175,7 @@ void smlua_init_require_system(void) { // initialize loaded tables for each mod for (int i = 0; i < gActiveMods.entryCount; i++) { struct Mod* mod = gActiveMods.entries[i]; - smlua_init_mod_loaded_table(L, mod->relativePath); + smlua_get_or_create_mod_loaded_table(L, mod); + lua_pop(L, 1); // pop loaded table } -} \ No newline at end of file +} diff --git a/src/pc/lua/smlua_require.h b/src/pc/lua/smlua_require.h index dcb8891cb..bb1b38df1 100644 --- a/src/pc/lua/smlua_require.h +++ b/src/pc/lua/smlua_require.h @@ -3,9 +3,11 @@ #include "smlua.h" -void smlua_require_update(lua_State* L); void smlua_bind_custom_require(lua_State* L); -void smlua_reload_module(lua_State *L, struct Mod* mod, struct ModFile *file); +void smlua_get_or_create_mod_loaded_table(lua_State* L, struct Mod* mod); +bool smlua_get_cached_module_result(lua_State* L, struct Mod* mod, struct ModFile* file); +void smlua_mark_module_as_loading(lua_State* L, struct Mod* mod, struct ModFile* file); +void smlua_cache_module_result(lua_State* L, struct Mod* mod, struct ModFile* file, s32 prevTop); void smlua_init_require_system(void); #endif \ No newline at end of file diff --git a/src/pc/lua/smlua_utils.c b/src/pc/lua/smlua_utils.c index 138a88e49..c6bd63a20 100644 --- a/src/pc/lua/smlua_utils.c +++ b/src/pc/lua/smlua_utils.c @@ -156,6 +156,22 @@ LuaFunction smlua_to_lua_function(lua_State* L, int index) { return luaL_ref(L, LUA_REGISTRYINDEX); } +LuaTable smlua_to_lua_table(lua_State* L, int index) { + if (lua_type(L, index) == LUA_TNIL) { + return 0; + } + + if (lua_type(L, index) != LUA_TTABLE) { + LOG_LUA_LINE("smlua_to_lua_table received improper type '%s'", luaL_typename(L, index)); + gSmLuaConvertSuccess = false; + return 0; + } + + gSmLuaConvertSuccess = true; + lua_pushvalue(L, index); + return luaL_ref(L, LUA_REGISTRYINDEX); +} + bool smlua_is_cobject(lua_State* L, int index, UNUSED u16 lot) { return lua_isuserdata(L, index); } @@ -225,19 +241,14 @@ struct LSTNetworkType smlua_to_lnt(lua_State* L, int index) { int valueType = lua_type(L, index); if (valueType == LUA_TNUMBER) { - lnt.type = LST_NETWORK_TYPE_INTEGER; - lnt.value.integer = lua_tointeger(L, index); - lnt.size = sizeof(u8) + sizeof(long long); - - if (lnt.value.integer == 0) { + if (lua_isinteger(L, index)) { + lnt.type = LST_NETWORK_TYPE_INTEGER; + lnt.value.integer = lua_tointeger(L, index); + lnt.size = sizeof(u8) + sizeof(long long); + } else { lnt.type = LST_NETWORK_TYPE_NUMBER; lnt.value.number = lua_tonumber(L, index); lnt.size = sizeof(u8) + sizeof(double); - - if (lnt.value.number == 0) { - lnt.type = LST_NETWORK_TYPE_INTEGER; - lnt.size = sizeof(u8) + sizeof(long long); - } } gSmLuaConvertSuccess = true; return lnt; @@ -497,6 +508,14 @@ void smlua_push_table_field(int index, const char* name) { /////////////////////////////////////////////////////////////////////////////////////////// +void smlua_push_lua_table(lua_State* L, LuaTable table) { + if (table != 0) { + lua_rawgeti(L, LUA_REGISTRYINDEX, table); + } else { + lua_pushnil(L); + } +} + void smlua_push_bytestring(lua_State* L, ByteString bytestring) { if (bytestring.bytes) { lua_pushlstring(L, bytestring.bytes, bytestring.length); diff --git a/src/pc/lua/smlua_utils.h b/src/pc/lua/smlua_utils.h index 25a76c81b..6324fc57f 100644 --- a/src/pc/lua/smlua_utils.h +++ b/src/pc/lua/smlua_utils.h @@ -6,6 +6,7 @@ extern u8 gSmLuaConvertSuccess; typedef int LuaFunction; +typedef int LuaTable; typedef struct ByteString { const char *bytes; @@ -27,6 +28,7 @@ lua_Number smlua_to_number(lua_State* L, int index); const char* smlua_to_string(lua_State* L, int index); ByteString smlua_to_bytestring(lua_State* L, int index); LuaFunction smlua_to_lua_function(lua_State* L, int index); +LuaTable smlua_to_lua_table(lua_State* L, int index); bool smlua_is_cobject(lua_State* L, int index, u16 lot); void* smlua_to_cobject(lua_State* L, int index, u16 lot); void* smlua_to_cpointer(lua_State* L, int index, u16 lvt); @@ -44,6 +46,7 @@ void smlua_push_string_field(int index, const char* name, const char* val); void smlua_push_nil_field(int index, const char* name); void smlua_push_table_field(int index, const char* name); +void smlua_push_lua_table(lua_State* L, LuaTable table); void smlua_push_bytestring(lua_State* L, ByteString bytestring); void smlua_push_lnt(struct LSTNetworkType* lnt); @@ -69,5 +72,6 @@ void smlua_free(void *ptr, u16 lot); static inline void smlua_free_##name(void *ptr) { smlua_free(ptr, lot); } smlua_free_lot(surface, LOT_SURFACE); +smlua_free_lot(soc, LOT_STATICOBJECTCOLLISION); #endif \ No newline at end of file diff --git a/src/pc/lua/utils/smlua_audio_utils.c b/src/pc/lua/utils/smlua_audio_utils.c index 2345b0878..e692476f4 100644 --- a/src/pc/lua/utils/smlua_audio_utils.c +++ b/src/pc/lua/utils/smlua_audio_utils.c @@ -10,6 +10,7 @@ #include "game/camera.h" #include "engine/math_util.h" #include "pc/mods/mods.h" +#include "pc/mods/mod_fs.h" #include "pc/lua/smlua.h" #include "pc/lua/utils/smlua_audio_utils.h" #include "pc/mods/mods_utils.h" @@ -78,27 +79,37 @@ bool smlua_audio_utils_override(u8 sequenceId, s32* bankId, void** seqData) { return true; } - static u8* buffer = NULL; - static long int length = 0; + u8* buffer = NULL; + u32 length = 0; - FILE* fp = f_open_r(override->filename); - if (!fp) { return false; } - f_seek(fp, 0L, SEEK_END); - length = f_tell(fp); + if (is_mod_fs_file(override->filename)) { + if (!mod_fs_read_file_from_uri(override->filename, (void **) &buffer, &length)) { + return false; + } + } else { + FILE* fp = f_open_r(override->filename); + if (!fp) { return false; } + f_seek(fp, 0L, SEEK_END); + length = f_tell(fp); + + buffer = malloc(length+1); + if (buffer == NULL) { + LOG_ERROR("Failed to malloc m64 sound file"); + f_close(fp); + f_delete(fp); + return false; + } + + f_seek(fp, 0L, SEEK_SET); + f_read(buffer, length, 1, fp); - buffer = malloc(length+1); - if (buffer == NULL) { - LOG_ERROR("Failed to malloc m64 sound file"); f_close(fp); f_delete(fp); - return false; } - f_seek(fp, 0L, SEEK_SET); - f_read(buffer, length, 1, fp); - - f_close(fp); - f_delete(fp); + if (!buffer || !length) { + return false; + } // cache override->loaded = true; @@ -110,6 +121,17 @@ bool smlua_audio_utils_override(u8 sequenceId, s32* bankId, void** seqData) { return true; } +static void smlua_audio_utils_create_audio_override(u8 sequenceId, u8 bankId, u8 defaultVolume, const char *filepath) { + struct AudioOverride* override = &sAudioOverrides[sequenceId]; + if (override->enabled) { audio_init(); } + smlua_audio_utils_reset(override); + LOG_INFO("Loading audio: %s", filepath); + override->filename = strdup(filepath); + override->enabled = true; + override->bank = bankId; + sound_set_background_music_default_volume(sequenceId, defaultVolume); +} + void smlua_audio_utils_replace_sequence(u8 sequenceId, u8 bankId, u8 defaultVolume, const char* m64Name) { if (gLuaActiveMod == NULL) { return; } if (sequenceId >= MAX_AUDIO_OVERRIDE) { @@ -122,6 +144,11 @@ void smlua_audio_utils_replace_sequence(u8 sequenceId, u8 bankId, u8 defaultVolu return; } + if (is_mod_fs_file(m64Name)) { + smlua_audio_utils_create_audio_override(sequenceId, bankId, defaultVolume, m64Name); + return; + } + char m64path[SYS_MAX_PATH] = { 0 }; if (snprintf(m64path, SYS_MAX_PATH-1, "sound/%s.m64", m64Name) < 0) { LOG_LUA_LINE("Could not concat m64path: %s", m64path); @@ -134,19 +161,8 @@ void smlua_audio_utils_replace_sequence(u8 sequenceId, u8 bankId, u8 defaultVolu char relPath[SYS_MAX_PATH] = { 0 }; snprintf(relPath, SYS_MAX_PATH-1, "%s", file->relativePath); normalize_path(relPath); - if (str_ends_with(relPath, m64path)) { - struct AudioOverride* override = &sAudioOverrides[sequenceId]; - if (override->enabled) { audio_init(); } - smlua_audio_utils_reset(override); - LOG_INFO("Loading audio: %s", file->cachedPath); - override->filename = strdup(file->cachedPath); - override->enabled = true; - override->bank = bankId; -#ifdef VERSION_EU - //sBackgroundMusicDefaultVolume[sequenceId] = defaultVolume; -#else - sound_set_background_music_default_volume(sequenceId, defaultVolume); -#endif + if (path_ends_with(relPath, m64path)) { + smlua_audio_utils_create_audio_override(sequenceId, bankId, defaultVolume, file->cachedPath); return; } } @@ -174,12 +190,12 @@ static void smlua_audio_custom_init(void) { } } -static struct ModAudio* find_mod_audio(struct ModFile* file) { +static struct ModAudio* find_mod_audio(const char *filepath) { struct DynamicPoolNode* node = sModAudioPool->tail; while (node) { struct DynamicPoolNode* prev = node->prev; struct ModAudio* audio = node->ptr; - if (audio->file == file) { return audio; } + if (strcmp(filepath, audio->filepath) == 0) { return audio; } node = prev; } return NULL; @@ -209,7 +225,7 @@ struct ModAudio* audio_load_internal(const char* filename, bool isStream) { const char* fileTypes[] = { ".mp3", ".aiff", ".ogg", NULL }; const char** ft = fileTypes; while (*ft != NULL) { - if (str_ends_with((char*)filename, (char*)*ft)) { + if (path_ends_with(filename, *ft)) { validFileType = true; break; } @@ -220,25 +236,35 @@ struct ModAudio* audio_load_internal(const char* filename, bool isStream) { return NULL; } - // find mod file in mod list - bool foundModFile = false; - struct ModFile* modFile = NULL; - u16 fileCount = gLuaActiveMod->fileCount; - for (u16 i = 0; i < fileCount; i++) { - struct ModFile* file = &gLuaActiveMod->files[i]; - if(str_ends_with(file->relativePath, (char*)filename)) { - foundModFile = true; - modFile = file; - break; + const char *filepath = filename; + if (!is_mod_fs_file(filename)) { + + // normalize filename + char normPath[SYS_MAX_PATH] = { 0 }; + snprintf(normPath, SYS_MAX_PATH, "%s", filename); + normalize_path(normPath); + + // find mod file in mod list + bool foundModFile = false; + struct ModFile* modFile = NULL; + u16 fileCount = gLuaActiveMod->fileCount; + for (u16 i = 0; i < fileCount; i++) { + struct ModFile* file = &gLuaActiveMod->files[i]; + if(path_ends_with(file->relativePath, normPath)) { + foundModFile = true; + modFile = file; + break; + } } - } - if (!foundModFile) { - LOG_LUA_LINE("Could not find audio file: '%s'", filename); - return NULL; + if (!foundModFile) { + LOG_LUA_LINE("Could not find audio file: '%s'", filename); + return NULL; + } + filepath = modFile->cachedPath; } // find stream in ModAudio list - struct ModAudio* audio = find_mod_audio(modFile); + struct ModAudio* audio = find_mod_audio(filepath); if (audio) { if (isStream == audio->isStream) { return audio; @@ -261,36 +287,52 @@ struct ModAudio* audio_load_internal(const char* filename, bool isStream) { } // remember file - audio->file = modFile; + audio->filepath = strdup(filepath); - // load audio - FILE *f = f_open_r(modFile->cachedPath); - if (!f) { - LOG_ERROR("failed to load audio file '%s': file not found", filename); - return NULL; - } + void *buffer = NULL; + u32 size = 0; - f_seek(f, 0, SEEK_END); - u32 size = f_tell(f); - f_rewind(f); - void *buffer = calloc(size, 1); - if (!buffer) { + if (is_mod_fs_file(filepath)) { + if (!mod_fs_read_file_from_uri(filepath, &buffer, &size)) { + LOG_ERROR("failed to load audio file '%s': an error occurred with modfs", filename); + return NULL; + } + } else { + + // load audio + FILE *f = f_open_r(filepath); + if (!f) { + LOG_ERROR("failed to load audio file '%s': file not found", filename); + return NULL; + } + + f_seek(f, 0, SEEK_END); + size = f_tell(f); + f_rewind(f); + buffer = calloc(size, 1); + if (!buffer) { + f_close(f); + f_delete(f); + LOG_ERROR("failed to load audio file '%s': cannot allocate buffer of size: %d", filename, size); + return NULL; + } + + // read the audio buffer + if (f_read(buffer, 1, size, f) < size) { + free(buffer); + f_close(f); + f_delete(f); + LOG_ERROR("failed to load audio file '%s': cannot read audio buffer of size: %d", filename, size); + return NULL; + } f_close(f); f_delete(f); - LOG_ERROR("failed to load audio file '%s': cannot allocate buffer of size: %d", filename, size); - return NULL; } - // read the audio buffer - if (f_read(buffer, 1, size, f) < size) { - free(buffer); - f_close(f); - f_delete(f); - LOG_ERROR("failed to load audio file '%s': cannot read audio buffer of size: %d", filename, size); + if (!buffer || !size) { + LOG_ERROR("failed to load audio file '%s': failed to read audio data", filename); return NULL; } - f_close(f); - f_delete(f); // decode the audio buffer ma_result result = ma_decoder_init_memory(buffer, size, NULL, &audio->decoder); @@ -604,6 +646,7 @@ void audio_custom_shutdown(void) { audio_sample_destroy_copies(audio); } ma_sound_uninit(&audio->sound); + free((void *) audio->filepath); } dynamic_pool_free(sModAudioPool, audio); node = prev; diff --git a/src/pc/lua/utils/smlua_audio_utils.h b/src/pc/lua/utils/smlua_audio_utils.h index 4fc276548..deca8b0d0 100644 --- a/src/pc/lua/utils/smlua_audio_utils.h +++ b/src/pc/lua/utils/smlua_audio_utils.h @@ -22,7 +22,7 @@ struct ModAudioSampleCopies { }; struct ModAudio { - struct ModFile* file; + const char *filepath; ma_sound sound; ma_decoder decoder; void *buffer; diff --git a/src/pc/lua/utils/smlua_camera_utils.c b/src/pc/lua/utils/smlua_camera_utils.c index d994a08e5..2a2b6c94f 100644 --- a/src/pc/lua/utils/smlua_camera_utils.c +++ b/src/pc/lua/utils/smlua_camera_utils.c @@ -2,6 +2,11 @@ #include "game/bettercamera.h" #include "game/object_list_processor.h" +struct CameraOverride { + u32 value; + bool override; +}; + static struct CameraOverride sOverrideCameraXSens = { 0 }; static struct CameraOverride sOverrideCameraYSens = { 0 }; static struct CameraOverride sOverrideCameraAggr = { 0 }; diff --git a/src/pc/lua/utils/smlua_camera_utils.h b/src/pc/lua/utils/smlua_camera_utils.h index 5065d6d07..b9090568b 100644 --- a/src/pc/lua/utils/smlua_camera_utils.h +++ b/src/pc/lua/utils/smlua_camera_utils.h @@ -4,11 +4,6 @@ #include "types.h" #include "game/camera.h" -struct CameraOverride { - unsigned int value; - bool override; -}; - /* |description|Resets camera config overrides|descriptionEnd| */ void camera_reset_overrides(void); /* |description|Freezes the camera by not updating it|descriptionEnd| */ diff --git a/src/pc/lua/utils/smlua_misc_utils.c b/src/pc/lua/utils/smlua_misc_utils.c index f953c458a..37ab42d83 100644 --- a/src/pc/lua/utils/smlua_misc_utils.c +++ b/src/pc/lua/utils/smlua_misc_utils.c @@ -28,6 +28,8 @@ #include "include/course_table.h" #include "game/level_geo.h" #include "game/first_person_cam.h" +#include "game/rumble_init.h" +#include "game/sound_init.h" #include "pc/lua/utils/smlua_audio_utils.h" #ifdef DISCORD_SDK @@ -110,6 +112,10 @@ u8 djui_get_playerlist_page_index(void) { return sPageIndex; } +bool djui_is_chatbox_open(void) { + return gDjuiChatBox->chatInput->base.visible; +} + enum DjuiFontType djui_menu_get_font(void) { return configDjuiThemeFont == 0 ? FONT_NORMAL : FONT_ALIASED; } @@ -241,16 +247,16 @@ extern const u8 texture_power_meter_two_segments[]; extern const u8 texture_power_meter_one_segments[]; static struct TextureInfo sPowerMeterTexturesInfo[] = { - { (Texture*)texture_power_meter_left_side, "texture_power_meter_left_side", 32, 64, 8 }, - { (Texture*)texture_power_meter_right_side, "texture_power_meter_right_side", 32, 64, 8 }, - { (Texture*)texture_power_meter_one_segments, "texture_power_meter_one_segments", 32, 32, 8 }, - { (Texture*)texture_power_meter_two_segments, "texture_power_meter_two_segments", 32, 32, 8 }, - { (Texture*)texture_power_meter_three_segments, "texture_power_meter_three_segments", 32, 32, 8 }, - { (Texture*)texture_power_meter_four_segments, "texture_power_meter_four_segments", 32, 32, 8 }, - { (Texture*)texture_power_meter_five_segments, "texture_power_meter_five_segments", 32, 32, 8 }, - { (Texture*)texture_power_meter_six_segments, "texture_power_meter_six_segments", 32, 32, 8 }, - { (Texture*)texture_power_meter_seven_segments, "texture_power_meter_seven_segments", 32, 32, 8 }, - { (Texture*)texture_power_meter_full, "texture_power_meter_full", 32, 32, 8 }, + { .texture = texture_power_meter_left_side, .name = "texture_power_meter_left_side", .width = 32, .height = 64, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + { .texture = texture_power_meter_right_side, .name = "texture_power_meter_right_side", .width = 32, .height = 64, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + { .texture = texture_power_meter_one_segments, .name = "texture_power_meter_one_segments", .width = 32, .height = 32, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + { .texture = texture_power_meter_two_segments, .name = "texture_power_meter_two_segments", .width = 32, .height = 32, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + { .texture = texture_power_meter_three_segments, .name = "texture_power_meter_three_segments", .width = 32, .height = 32, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + { .texture = texture_power_meter_four_segments, .name = "texture_power_meter_four_segments", .width = 32, .height = 32, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + { .texture = texture_power_meter_five_segments, .name = "texture_power_meter_five_segments", .width = 32, .height = 32, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + { .texture = texture_power_meter_six_segments, .name = "texture_power_meter_six_segments", .width = 32, .height = 32, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + { .texture = texture_power_meter_seven_segments, .name = "texture_power_meter_seven_segments", .width = 32, .height = 32, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, + { .texture = texture_power_meter_full, .name = "texture_power_meter_full", .width = 32, .height = 32, .format = G_IM_FMT_RGBA, .size = G_IM_SIZ_16b }, }; void hud_render_power_meter(s32 health, f32 x, f32 y, f32 width, f32 height) { @@ -294,6 +300,36 @@ bool is_game_paused(void) { return gMenuMode != -1; } +extern bool gPauseMenuHidden; +bool is_pause_menu_hidden(void) { + return gPauseMenuHidden; +} + +void set_pause_menu_hidden(bool hidden) { + gPauseMenuHidden = hidden; +} + +extern void set_play_mode(s16); +void game_pause(void) { + if (gMenuMode != -1) { return; } + + lower_background_noise(1); + cancel_rumble(); + gCameraMovementFlags |= CAM_MOVE_PAUSE_SCREEN; + set_play_mode(PLAY_MODE_PAUSED); +} + +extern s8 gDialogBoxState; +extern s16 gPauseScreenMode; +void game_unpause(void) { + if (gMenuMode == -1) { return; } + + level_set_transition(0, NULL); + gMenuMode = -1; + gDialogBoxState = 0; + gPauseScreenMode = 1; +} + /// bool is_transition_playing(void) { @@ -539,9 +575,17 @@ void set_environment_region(u8 index, s16 value) { bool mod_file_exists(const char* filename) { if (gLuaActiveMod == NULL) { return false; } + char normPath[SYS_MAX_PATH] = { 0 }; + + if (snprintf(normPath, sizeof(normPath), "%s", filename) < 0) { + LOG_ERROR("Failed to copy filename for normalization: %s", filename); + } + + normalize_path(normPath); + for (s32 i = 0; i < gLuaActiveMod->fileCount; i++) { struct ModFile* file = &gLuaActiveMod->files[i]; - if (!strcmp(file->relativePath, filename)) { + if (!strcmp(file->relativePath, normPath)) { return true; } } @@ -603,44 +647,43 @@ struct GraphNodeHeldObject* geo_get_current_held_object(void) { return gCurGraphNodeHeldObject; } -void texture_to_lua_table(const Texture *tex) { +LuaTable texture_to_lua_table(const Texture *tex) { lua_State *L = gLuaState; - if (!L || !tex) { return; } + if (!L) { return 0; } + + if (!tex) { + lua_pushnil(L); + return 0; + } struct TextureInfo texInfo; - if (!dynos_texture_get_from_data(tex, &texInfo)) { return; } + if (!dynos_texture_get_from_data(tex, &texInfo)) { + lua_pushnil(L); + return 0; + } - u32 bpp = texInfo.bitSize; - if (bpp != 16 && bpp != 32) { return; } + u8 *rgba = dynos_texture_convert_to_rgba32(texInfo.texture, texInfo.width, texInfo.height, texInfo.format, texInfo.size); + if (!rgba) { + lua_pushnil(L); + return 0; + } - u32 bytesPerPixel = bpp / 8; - const Texture *data = texInfo.texture; - u32 texSize = texInfo.width * texInfo.height * bytesPerPixel; + LUA_STACK_CHECK_BEGIN_NUM(L, 1); lua_newtable(L); - for (u32 i = 0; i < texSize; i += bytesPerPixel) { + const u8 *pixel = rgba; + for (u32 i = 0; i < texInfo.width * texInfo.height; ++i, pixel += 4) { lua_newtable(L); - - if (bpp == 16) { - u16 col = (data[i] << 8) | data[i + 1]; - u8 r = SCALE_5_8((col >> 11) & 0x1F); - u8 g = SCALE_5_8((col >> 6) & 0x1F); - u8 b = SCALE_5_8((col >> 1) & 0x1F); - u8 a = 0xFF * (col & 0x1); - - smlua_push_integer_field(-2, "r", r); - smlua_push_integer_field(-2, "g", g); - smlua_push_integer_field(-2, "b", b); - smlua_push_integer_field(-2, "a", a); - } else if (bpp == 32) { - smlua_push_integer_field(-2, "r", data[i]); - smlua_push_integer_field(-2, "g", data[i + 1]); - smlua_push_integer_field(-2, "b", data[i + 2]); - smlua_push_integer_field(-2, "a", data[i + 3]); - } - - lua_rawseti(L, -2, i / bytesPerPixel + 1); + smlua_push_integer_field(-2, "r", pixel[0]); + smlua_push_integer_field(-2, "g", pixel[1]); + smlua_push_integer_field(-2, "b", pixel[2]); + smlua_push_integer_field(-2, "a", pixel[3]); + lua_rawseti(L, -2, i + 1); } + free(rgba); + + LUA_STACK_CHECK_END(L); + return smlua_to_lua_table(L, -1); } const char *get_texture_name(const Texture *tex) { diff --git a/src/pc/lua/utils/smlua_misc_utils.h b/src/pc/lua/utils/smlua_misc_utils.h index 8332a2d48..b9413649a 100644 --- a/src/pc/lua/utils/smlua_misc_utils.h +++ b/src/pc/lua/utils/smlua_misc_utils.h @@ -3,6 +3,7 @@ #include "dialog_ids.h" #include "game/camera.h" +#include "pc/lua/smlua_utils.h" enum HudDisplayValue { HUD_DISPLAY_LIVES, @@ -75,6 +76,8 @@ bool djui_is_playerlist_open(void); bool djui_attempting_to_open_playerlist(void); /* |description|Gets the DJUI playerlist's page index|descriptionEnd| */ u8 djui_get_playerlist_page_index(void); +/* |description|Checks if the DJUI chatbox is open|descriptionEnd| */ +bool djui_is_chatbox_open(void); /* |description|Gets the DJUI menu font|descriptionEnd| */ enum DjuiFontType djui_menu_get_font(void); /* |description|Gets the DJUI menu theme|descriptionEnd| */ @@ -136,6 +139,14 @@ bool act_select_hud_is_hidden(enum ActSelectHudPart part); /* |description|Checks if the game is paused|descriptionEnd| */ bool is_game_paused(void); +/* |description|Gets if the pause menu elements are hidden, useful for creating custom pause menus|descriptionEnd| */ +bool is_pause_menu_hidden(void); +/* |description|Sets if the pause menu elements are hidden, useful for creating custom pause menus|descriptionEnd| */ +void set_pause_menu_hidden(bool hidden); +/* |description|Pauses the game|descriptionEnd| */ +void game_pause(void); +/* |description|Unpauses the game|descriptionEnd| */ +void game_unpause(void); /* |description|Checks if a screen transition is playing|descriptionEnd| */ bool is_transition_playing(void); @@ -252,8 +263,8 @@ struct GraphNodeCamera* geo_get_current_camera(void); /* |description|Gets the current GraphNodeHeldObject|descriptionEnd|*/ struct GraphNodeHeldObject* geo_get_current_held_object(void); -/* |description|Converts a texture's pixels to a Lua table. Returns nil if failed. Otherwise, returns a table as a pure memory buffer. Supports rgba16 and rgba32 textures|descriptionEnd|*/ -void texture_to_lua_table(const Texture *tex); +/* |description|Converts a texture's pixels to a Lua table. Returns nil if failed. Otherwise, returns a 1-indexed table of RGBA pixels|descriptionEnd|*/ +LuaTable texture_to_lua_table(const Texture *tex); /* |description|Gets the name of the provided texture pointer `tex`|descriptionEnd|*/ const char *get_texture_name(const Texture *tex); diff --git a/src/pc/lua/utils/smlua_obj_utils.c b/src/pc/lua/utils/smlua_obj_utils.c index c30fc40b1..6ddc020f8 100644 --- a/src/pc/lua/utils/smlua_obj_utils.c +++ b/src/pc/lua/utils/smlua_obj_utils.c @@ -367,6 +367,20 @@ struct SpawnParticlesInfo* obj_get_temp_spawn_particles_info(enum ModelExtendedI return &sTmpSpi; } +struct WaterDropletParams* obj_get_temp_water_droplet_params(enum ModelExtendedId modelId, enum BehaviorId behaviorId) { + static struct WaterDropletParams sTmpWdp = { 0 }; + memset(&sTmpWdp, 0, sizeof(struct WaterDropletParams)); + + s16 loadedModelId = smlua_model_util_load(modelId); + sTmpWdp.model = loadedModelId; + + const BehaviorScript *behavior = get_behavior_from_id(behaviorId); + behavior = smlua_override_behavior(behavior); + sTmpWdp.behavior = behavior; + + return &sTmpWdp; +} + struct ObjectHitbox* get_temp_object_hitbox(void) { static struct ObjectHitbox sTmpHitbox = { 0 }; memset(&sTmpHitbox, 0, sizeof(struct ObjectHitbox)); diff --git a/src/pc/lua/utils/smlua_obj_utils.h b/src/pc/lua/utils/smlua_obj_utils.h index fd8354a82..b0e75fbb0 100644 --- a/src/pc/lua/utils/smlua_obj_utils.h +++ b/src/pc/lua/utils/smlua_obj_utils.h @@ -118,6 +118,8 @@ void obj_set_field_s16(struct Object *o, s32 fieldIndex, s32 fieldSubIndex, s16 /* |description|Returns a temporary particle spawn info pointer with its model loaded in from `modelId`|descriptionEnd| */ struct SpawnParticlesInfo* obj_get_temp_spawn_particles_info(enum ModelExtendedId modelId); +/* |description|Returns a temporary water droplet params pointer with its model and behavior loaded in from `modelId` and `behaviorId`|descriptionEnd| */ +struct WaterDropletParams* obj_get_temp_water_droplet_params(enum ModelExtendedId modelId, enum BehaviorId behaviorId); /* |description|Returns a temporary object hitbox pointer|descriptionEnd| */ struct ObjectHitbox* get_temp_object_hitbox(void); diff --git a/src/pc/lua/utils/smlua_text_utils.c b/src/pc/lua/utils/smlua_text_utils.c index dbce0ed46..328530b45 100644 --- a/src/pc/lua/utils/smlua_text_utils.c +++ b/src/pc/lua/utils/smlua_text_utils.c @@ -19,36 +19,6 @@ extern s32 gInGameLanguage; #define INVALID_COURSE_NUM(courseNum) (smlua_level_util_get_info_from_course_num(courseNum) == NULL && !COURSE_IS_VALID_COURSE(courseNum)) -extern const struct { const char *str; u8 c; u8 menu; } sSm64CharMap[]; - -static size_t measure_converted_sm64_string(const u8* str64) { - size_t len = 0; - - for (size_t i = 0; str64[i] != 0xFF; i++) { - for (s32 j = 0; sSm64CharMap[j].str != NULL; j++) { - if (sSm64CharMap[j].c == str64[i]) { - len += strlen(sSm64CharMap[j].str); - break; - } - } - } - - return len; -} - -char* get_dialog_text_ascii(struct DialogEntry *dialog) { - if (!dialog) { return NULL; } - - size_t len = measure_converted_sm64_string(dialog->str); - - char* asciiStr = malloc(len + 1); - if (!asciiStr) { return NULL; } - - convert_string_sm64_to_ascii(asciiStr, dialog->str); - - return asciiStr; -} - /* --------------------------------------------------- Mapping gReplacedCourseActNameTable <-> seg2 tables @@ -136,9 +106,7 @@ void smlua_text_utils_shutdown(void) { } static u8* smlua_text_utils_convert(const char* str) { - u8* dialogStr = calloc(strlen(str) + 2, sizeof(u8)); - convert_string_ascii_to_sm64(dialogStr, str, false); - return dialogStr; + return convert_string_ascii_to_sm64(NULL, str, false); } // Checks the first 3 characters @@ -162,8 +130,8 @@ static void smlua_text_utils_reset_course_or_act_name(struct ReplacedName *name) name->modNum = 0; } -static void smlua_text_utils_replace_course_or_act_name(struct ReplacedName *name, const char *replacement, s32 modIndex) { - replacement += 3 * str_starts_with_spaces(replacement); +static void smlua_text_utils_replace_course_or_act_name(struct ReplacedName *name, const char *replacement, s32 modIndex, bool removeLeadingSpaces) { + if (removeLeadingSpaces) { replacement += 3 * str_starts_with_spaces(replacement); } if (name->name.get_table && name->orig.get_table) { void **tblName = name->name.get_table() + name->name.offset; void **tblOrig = name->orig.get_table() + name->orig.offset; @@ -180,7 +148,7 @@ void smlua_text_utils_reset_all(void) { dialog_table_reset(); if (sSmluaTextUtilsInited) { - for (s16 courseNum = 0; courseNum < COURSE_END; courseNum++) { + for (s16 courseNum = 0; courseNum <= COURSE_END; courseNum++) { // Restore vanilla course names struct ReplacedName *courseName = &gReplacedCourseActNameTable[courseNum].courseName; @@ -204,7 +172,7 @@ struct DialogEntry* smlua_text_utils_dialog_get(enum DialogId dialogId) { const struct DialogEntry* smlua_text_utils_dialog_get_unmodified(enum DialogId dialogId) { if (!IS_VALID_VANILLA_DIALOG(dialogId)) { return NULL; } - + void **dialogTableOrg; #ifdef VERSION_EU @@ -228,7 +196,7 @@ const struct DialogEntry* smlua_text_utils_dialog_get_unmodified(enum DialogId d void smlua_text_utils_dialog_replace(enum DialogId dialogId, UNUSED u32 unused, s8 linesPerBox, s16 leftOffset, s16 width, const char* str) { if (!IS_VALID_DIALOG(dialogId)) { return; } - + struct DialogEntry *dialog = smlua_text_utils_dialog_get(dialogId); if (!dialog) { return; } @@ -261,7 +229,7 @@ void smlua_text_utils_dialog_restore(enum DialogId dialogId) { free(dialog->text); memcpy(dialog, dialogOrig, sizeof(struct DialogEntry)); - dialog->text = get_dialog_text_ascii(dialog); + dialog->text = convert_string_sm64_to_ascii(NULL, dialog->str); } bool smlua_text_utils_dialog_is_replaced(enum DialogId dialogId) { @@ -286,10 +254,10 @@ void smlua_text_utils_course_acts_replace(s16 courseNum, const char* courseName, if (!COURSE_IS_VALID_COURSE(courseNum)) { return; } struct CourseActNames *courseActNames = &gReplacedCourseActNameTable[courseNum]; - smlua_text_utils_replace_course_or_act_name(&courseActNames->courseName, courseName, gLuaActiveMod->index); + smlua_text_utils_replace_course_or_act_name(&courseActNames->courseName, courseName + (3 * (strlen(courseName) > 3)), gLuaActiveMod->index, false); #define REPLACE_ACT_NAME(i) { \ - smlua_text_utils_replace_course_or_act_name(&courseActNames->actName[i - 1], act##i, gLuaActiveMod->index); \ + smlua_text_utils_replace_course_or_act_name(&courseActNames->actName[i - 1], act##i, gLuaActiveMod->index, false); \ } REPLACE_ACT_NAME(1); @@ -304,7 +272,7 @@ void smlua_text_utils_course_name_replace(s16 courseNum, const char* name) { if (!COURSE_IS_VALID_COURSE(courseNum)) { return; } struct CourseActNames *courseActNames = &gReplacedCourseActNameTable[courseNum]; - smlua_text_utils_replace_course_or_act_name(&courseActNames->courseName, name, gLuaActiveMod->index); + smlua_text_utils_replace_course_or_act_name(&courseActNames->courseName, name, gLuaActiveMod->index, false); } const char* smlua_text_utils_course_name_get(s16 courseNum) { @@ -331,7 +299,7 @@ void smlua_text_utils_act_name_replace(s16 courseNum, u8 actNum, const char* nam if (actNum < 1 || actNum > MAX_ACTS_AND_100_COINS) { return; } struct CourseActNames *courseActNames = &gReplacedCourseActNameTable[courseNum]; - smlua_text_utils_replace_course_or_act_name(&courseActNames->actName[actNum - 1], name, gLuaActiveMod->index); + smlua_text_utils_replace_course_or_act_name(&courseActNames->actName[actNum - 1], name, gLuaActiveMod->index, false); } const char* smlua_text_utils_act_name_get(s16 courseNum, u8 actNum) { @@ -359,12 +327,13 @@ void smlua_text_utils_act_name_reset(s16 courseNum, u8 actNum) { void smlua_text_utils_secret_star_replace(s16 courseNum, const char* courseName) { if (courseNum <= COURSE_STAGES_MAX || courseNum > COURSE_MAX) { return; } - smlua_text_utils_course_name_replace(courseNum, courseName); + struct CourseActNames *courseActNames = &gReplacedCourseActNameTable[courseNum]; + smlua_text_utils_replace_course_or_act_name(&courseActNames->courseName, courseName, gLuaActiveMod->index, true); } void smlua_text_utils_castle_secret_stars_replace(const char* name) { struct CourseActNames *courseActNames = &gReplacedCourseActNameTable[COURSE_END]; - smlua_text_utils_replace_course_or_act_name(&courseActNames->courseName, name, gLuaActiveMod->index); + smlua_text_utils_replace_course_or_act_name(&courseActNames->courseName, name, gLuaActiveMod->index, false); } const char* smlua_text_utils_castle_secret_stars_get() { @@ -384,7 +353,7 @@ void smlua_text_utils_extra_text_replace(s16 index, const char* text) { if (index < 0 || index > MAX_ACTS_AND_100_COINS) { return; } struct CourseActNames *courseActNames = &gReplacedCourseActNameTable[COURSE_END]; - smlua_text_utils_replace_course_or_act_name(&courseActNames->actName[index], text, gLuaActiveMod->index); + smlua_text_utils_replace_course_or_act_name(&courseActNames->actName[index], text, gLuaActiveMod->index, false); } const char* smlua_text_utils_extra_text_get(s16 index) { diff --git a/src/pc/lua/utils/smlua_text_utils.h b/src/pc/lua/utils/smlua_text_utils.h index ea2b7bfa9..203fefef0 100644 --- a/src/pc/lua/utils/smlua_text_utils.h +++ b/src/pc/lua/utils/smlua_text_utils.h @@ -27,8 +27,6 @@ struct CourseActNames { extern struct CourseActNames gReplacedCourseActNameTable[]; // indexed by COURSE_* constants -char* get_dialog_text_ascii(struct DialogEntry *dialog); - void smlua_text_utils_init(void); void smlua_text_utils_shutdown(void); /* |description|Resets every modified dialog back to vanilla|descriptionEnd|*/ diff --git a/src/pc/mods/mod.c b/src/pc/mods/mod.c index a0e5c817b..aca944c85 100644 --- a/src/pc/mods/mod.c +++ b/src/pc/mods/mod.c @@ -23,7 +23,7 @@ size_t mod_get_lua_size(struct Mod* mod) { for (int i = 0; i < mod->fileCount; i++) { struct ModFile* file = &mod->files[i]; - if (!(str_ends_with(file->relativePath, ".lua") || str_ends_with(file->relativePath, ".luac"))) { continue; } + if (!(path_ends_with(file->relativePath, ".lua") || path_ends_with(file->relativePath, ".luac"))) { continue; } size += file->size; } @@ -161,19 +161,19 @@ void mod_activate(struct Mod* mod) { mod_cache_update(mod, file); } - if (str_ends_with(file->relativePath, ".bin")) { + if (path_ends_with(file->relativePath, ".bin")) { mod_activate_bin(mod, file); } - if (str_ends_with(file->relativePath, ".col")) { + if (path_ends_with(file->relativePath, ".col")) { mod_activate_col(file); } - if (str_ends_with(file->relativePath, ".lvl")) { + if (path_ends_with(file->relativePath, ".lvl")) { mod_activate_lvl(mod, file); } - if (str_ends_with(file->relativePath, ".bhv")) { + if (path_ends_with(file->relativePath, ".bhv")) { mod_activate_bhv(mod, file); } - if (str_ends_with(file->relativePath, ".tex")) { + if (path_ends_with(file->relativePath, ".tex")) { mod_activate_tex(file); } } @@ -245,15 +245,22 @@ static struct ModFile* mod_allocate_file(struct Mod* mod, char* relativePath) { memset(file, 0, sizeof(struct ModFile)); // set relative path - if (snprintf(file->relativePath, SYS_MAX_PATH - 1, "%s", relativePath) < 0) { - LOG_ERROR("Failed to remember relative path '%s'", relativePath); + char normPath[SYS_MAX_PATH] = { 0 }; + if (snprintf(normPath, sizeof(normPath), "%s", relativePath) < 0) { + LOG_ERROR("Failed to copy relative path for normalization: %s", relativePath); + } + + normalize_path(normPath); + + if (snprintf(file->relativePath, SYS_MAX_PATH - 1, "%s", normPath) < 0) { + LOG_ERROR("Failed to remember relative path '%s'", normPath); return NULL; } // figure out full path char fullPath[SYS_MAX_PATH] = { 0 }; if (!mod_file_full_path(fullPath, mod, file)) { - LOG_ERROR("Failed to concat path: '%s' + '%s'", mod->basePath, relativePath); + LOG_ERROR("Failed to concat path: '%s' + '%s'", mod->basePath, normPath); return NULL; } @@ -330,7 +337,7 @@ static bool mod_load_files_dir(struct Mod* mod, char* fullPath, const char* subD bool fileTypeMatch = false; const char** ft = fileTypes; while (*ft != NULL) { - if (str_ends_with(path, (char*)*ft)) { + if (path_ends_with(path, (char*)*ft)) { fileTypeMatch = true; } ft++; @@ -555,7 +562,7 @@ bool mod_load(struct Mods* mods, char* basePath, char* modName) { bool isDirectory = fs_sys_dir_exists(fullPath); // make sure mod is valid - if (str_ends_with(modName, ".lua")) { + if (path_ends_with(modName, ".lua")) { valid = true; } else if (fs_sys_dir_exists(fullPath)) { char tmpPath[SYS_MAX_PATH] = { 0 }; diff --git a/src/pc/mods/mod_fs.cpp b/src/pc/mods/mod_fs.cpp index c141e64e0..1dcfb4305 100644 --- a/src/pc/mods/mod_fs.cpp +++ b/src/pc/mods/mod_fs.cpp @@ -2,20 +2,38 @@ extern "C" { #include "mod_fs.h" #include "src/pc/fs/fs.h" #include "src/pc/mods/mods_utils.h" +#include "pc/utils/miniz/miniz.h" } #include #include #include #include #include +#include "pc/utils/json.hpp" #define C_DEFINE extern "C" -static std::vector sModFsList = {}; -static char sModFsFileReadStringBuf[MOD_FS_MAX_SIZE + 1]; +using json = nlohmann::json; +static const json sEmptyJson = {}; -#define MOD_FS_MAGIC "MODFSSM64COOPDX" -#define MOD_FS_HEADER_SIZE 32 +static std::vector sModFsList = {}; + +#define MOD_FS_DIRECTORY "sav" +#define MOD_FS_EXTENSION ".modfs" +#define MOD_FS_PROPERTIES "properties.json" + +#define MOD_FS_IS_PUBLIC_DEFAULT false +#define MOD_FS_FILE_IS_PUBLIC_DEFAULT false + +static const char *MOD_FS_FILE_ALLOWED_EXTENSIONS[] = { + ".txt", ".json", ".ini", ".sav", // text + ".bin", ".col", // actors + ".bhv", // behaviors + ".tex", ".png", // textures + ".lvl", // levels + ".m64", ".aiff", ".mp3", ".ogg", // audio + NULL +}; // // Error handling @@ -37,7 +55,7 @@ static char sModFsErrorFunction[256]; } #define mod_fs_raise_error(fmt, ...) { \ - snprintf(sModFsLastError, sizeof(sModFsLastError), "%s: " fmt, sModFsErrorFunction, __VA_ARGS__); \ + snprintf(sModFsLastError, sizeof(sModFsLastError), "%s: " fmt, sModFsErrorFunction, ##__VA_ARGS__); \ if (!sModFsHideErrors) { \ LOG_LUA_LINE("%s", sModFsLastError); \ } \ @@ -123,6 +141,119 @@ static FILE *mod_fs_get_file_handle(const char *modPath, const char *mode) { return NULL; } +static int mod_fs_compare_filepaths(const void *l, const void *r) { + const struct ModFsFile *lfile = *((const struct ModFsFile **) l); + const struct ModFsFile *rfile = *((const struct ModFsFile **) r); + return strcmp(lfile->filepath, rfile->filepath); +} + +static bool mod_fs_check_filepath(struct ModFs *modFs, const char *filepath) { + + // check length + u32 filepathLength = strlen(filepath); + if (filepathLength == 0) { + mod_fs_raise_error( + "modPath: %s, filepath: %s - filepath length cannot be 0", modFs->modPath, filepath + ); + return false; + } + if (filepathLength > MOD_FS_MAX_PATH - 1) { + mod_fs_raise_error( + "modPath: %s, filepath: %s - exceeded filepath length: %u (max is: %u)", modFs->modPath, filepath, filepathLength, MOD_FS_MAX_PATH - 1 + ); + return false; + } + + // cannot be called properties.json + if (strcmp(filepath, MOD_FS_PROPERTIES) == 0) { + mod_fs_raise_error( + "modPath: %s, filepath: %s - forbidden filepath: \"" MOD_FS_PROPERTIES "\" is reserved", modFs->modPath, filepath + ); + return false; + } + + // check character validity + // only ascii chars, no control chars, no star, no backslash + for (u32 i = 0; i != filepathLength; ++i) { + char c = filepath[i]; + if (!isascii(c) || iscntrl(c) || c == '*' || c == '\\') { + mod_fs_raise_error( + "modPath: %s, filepath: %s - invalid character at position %d: '%c' (%02X)", modFs->modPath, filepath, i, c, (u8) c + ); + return false; + } + } + + // cannot start with a slash + if (filepath[0] == '/') { + mod_fs_raise_error( + "modPath: %s, filepath: %s - filepath cannot start with a slash '/'", modFs->modPath, filepath + ); + return false; + } + + // cannot end with a slash + if (filepath[filepathLength - 1] == '/') { + mod_fs_raise_error( + "modPath: %s, filepath: %s - filepath cannot end with a slash '/'", modFs->modPath, filepath + ); + return false; + } + + // no two consecutive slashes + if (strstr(filepath, "//")) { + mod_fs_raise_error( + "modPath: %s, filepath: %s - two or more consecutive slashes '/' are not allowed", modFs->modPath, filepath + ); + return false; + } + + // check extension + const char *lastSlash = strrchr(filepath, '/'); + const char *lastDot = strrchr(filepath, '.'); + if (lastDot > lastSlash) { + bool allowedExtension = false; + for (const char **ext = MOD_FS_FILE_ALLOWED_EXTENSIONS; *ext; ext++) { + if (strcasecmp(lastDot, *ext) == 0) { + allowedExtension = true; + break; + } + } + if (!allowedExtension) { + mod_fs_raise_error( + "modPath: %s, filepath: %s - file extension not allowed: %s", modFs->modPath, filepath, lastDot + ); + return false; + } + } + + return true; +} + +static bool mod_fs_check_file_content(struct ModFs *modFs, struct ModFsFile *file) { + if (!file->data.bin || file->size < 4) { + return true; + } + + // Reject Windows executable files + if (memcmp(file->data.bin, "MZ", 2) == 0) { + mod_fs_raise_error( + "modPath: %s, filepath: %s - Binary file cannot start with \"MZ\" bytes", modFs->modPath, file->filepath + ); + return false; + } + + // Reject ELF files + if (memcmp(file->data.bin, "\177ELF", 4) == 0) { + mod_fs_raise_error( + "modPath: %s, filepath: %s - Binary file cannot start with \"\\x7fELF\" bytes", modFs->modPath, file->filepath + ); + return false; + } + + return true; +} + // // ctor, dtor // @@ -132,7 +263,7 @@ static struct ModFs *mod_fs_new() { struct ModFs *modFs = mod_fs_alloc(); if (!modFs) { mod_fs_raise_error( - "failed to allocate modfs object", NULL + "failed to allocate modfs object" ); return NULL; } @@ -141,7 +272,7 @@ static struct ModFs *mod_fs_new() { modFs->files = NULL; modFs->numFiles = 0; modFs->totalSize = 0; - modFs->isPublic = false; + modFs->isPublic = MOD_FS_IS_PUBLIC_DEFAULT; return modFs; } return NULL; @@ -163,30 +294,169 @@ static void mod_fs_destroy(struct ModFs *modFs) { memset(modFs, 0, sizeof(struct ModFs)); } +// +// Properties +// + +template +T mod_fs_get_property_value(const json &property, const T &defaultValue); + +template <> +bool mod_fs_get_property_value(const json &property, const bool &defaultValue) { + if (property.is_boolean()) { + return (bool) property; + } + return defaultValue; +} + +const json &mod_fs_get_properties_at(const json &properties, const std::vector &propertyPath) { + const json *current = &properties; + for (const auto &key : propertyPath) { + if (!current->is_object() || !current->contains(key)) { + return sEmptyJson; + } + current = &(*current)[key]; + } + return *current; +} + +template +static T mod_fs_read_property(const json &properties, const std::vector &propertyPath, const T &defaultValue) { + return mod_fs_get_property_value( + mod_fs_get_properties_at(properties, propertyPath), + defaultValue + ); +} + +static bool mod_fs_get_wildcard_tokens(const char *path, char *prefix, char *suffix) { + const char *wildcard = strchr(path, '*'); + if (!wildcard) { + return false; + } + + // Multiple wildcards are not supported + if (strchr(wildcard + 1, '*') != NULL) { + return false; + } + + snprintf(prefix, SYS_MAX_PATH, "%.*s", (s32) (wildcard - path), path); + snprintf(suffix, SYS_MAX_PATH, "%s", wildcard + 1); + return true; +} + +static const json &mod_fs_read_properties_for_filepath(const json &properties, const char *filepath) { + + // Get all files properties + const json &filesProperties = mod_fs_get_properties_at(properties, { "files" }); + if (filesProperties.empty()) { + return sEmptyJson; + } + + // First, check for the exact path + const json &fileProperties = mod_fs_get_properties_at(filesProperties, { filepath }); + if (!fileProperties.empty()) { + return fileProperties; + } + + // If not found, look for wildcards + for (auto it = filesProperties.begin(); it != filesProperties.end(); it++) { + char prefix[SYS_MAX_PATH]; + char suffix[SYS_MAX_PATH]; + if (!mod_fs_get_wildcard_tokens(it.key().c_str(), prefix, suffix)) { + continue; + } + if (str_starts_with(filepath, prefix) && str_ends_with(filepath, suffix)) { + return it.value(); + } + } + + return sEmptyJson; +} + +static json mod_fs_get_properties_json(struct ModFs *modFs) { + json properties; + properties["isPublic"] = modFs->isPublic; + for (u16 i = 0; i != modFs->numFiles; ++i) { + struct ModFsFile *file = modFs->files[i]; + properties["files"][file->filepath] = { + { "isText", file->isText }, + { "isPublic", file->isPublic } + }; + } + return properties; +} + +static bool mod_fs_file_detect_text_mode(struct ModFsFile *file) { + for (u32 i = 0; i != file->size; ++i) { + u8 c = file->data.bin[i]; + if (iscntrl(c) && !isspace(c)) { + return false; + } + } + return true; +} + // // Read // -#define mod_fs_read_raise_error(modFs, f, ...) { \ - mod_fs_destroy(modFs); \ - fclose(f); \ +#define mod_fs_read_return(ret) { \ + if (zipBuf) { free(zipBuf); } \ + if (f) { fclose(f); } \ + mz_zip_reader_end(zip); \ + if (!ret) { mod_fs_destroy(modFs); } \ + return ret; \ +} + +#define mod_fs_read_raise_error(...) { \ mod_fs_raise_error(__VA_ARGS__); \ - return false; \ + mod_fs_read_return(false); \ } -#define mod_fs_read_fread_or_fail(modFs, f, buf, size, count, ...) { \ - if (fread(buf, size, count, f) < count) { \ - mod_fs_read_raise_error(modFs, f, __VA_ARGS__); \ - } \ +#define mod_fs_read_raise_error_zip() { \ + mod_fs_read_raise_error("modPath: %s - cannot read zip file: %s", modFs->modPath, mz_zip_get_error_string(mz_zip_get_last_error(zip))); \ } -static bool mod_fs_read(const char *modPath, struct ModFs *modFs, bool readHeaderOnly) { +static bool mod_fs_read_properties(mz_zip_archive *zip, json &properties, std::string &error) { + properties.clear(); + + // locate file in zip + s32 fileIndex = mz_zip_reader_locate_file(zip, MOD_FS_PROPERTIES, NULL, 0); + if (fileIndex < 0) { + return true; + } + + // read file + size_t fileSize; + void *fileBuf = mz_zip_reader_extract_to_heap(zip, fileIndex, &fileSize, 0); + if (!fileBuf) { + error = "cannot read file \"" MOD_FS_PROPERTIES "\": " + std::string(mz_zip_get_error_string(mz_zip_get_last_error(zip))); + return false; + } + std::string textBuf((const char *) fileBuf, fileSize); + mz_free(fileBuf); + + // parse json + try { + properties = json::parse(textBuf); + } catch (const json::parse_error& e) { + error = e.what(); + return false; + } + + // properties found + return true; +} + +static bool mod_fs_read(const char *modPath, struct ModFs *modFs, bool checkExistenceOnly) { FILE *f = mod_fs_get_file_handle(modPath, "rb"); if (f) { + mz_zip_archive zip[1] = {0}; + void *zipBuf = NULL; // get true modPath and mod if (!mod_fs_get_modpath(modPath, modFs->modPath)) { - mod_fs_read_raise_error(modFs, f, + mod_fs_read_raise_error( "unable to retrieve modPath from %s", modPath ); } @@ -197,147 +467,171 @@ static bool mod_fs_read(const char *modPath, struct ModFs *modFs, bool readHeade modFs->mod = NULL; } - // read magic (last byte is version) - char magic[sizeof(MOD_FS_MAGIC)] = {0}; - mod_fs_read_fread_or_fail(modFs, f, magic, 1, sizeof(magic), - "modPath: %s - cannot read file magic", modFs->modPath - ); - if (memcmp(magic, MOD_FS_MAGIC, sizeof(MOD_FS_MAGIC) - 1) != 0) { - mod_fs_read_raise_error(modFs, f, - "modPath: %s - not a modfs file", modFs->modPath + // read zip file + fseek(f, 0, SEEK_END); + size_t zipSize = ftell(f); + rewind(f); + zipBuf = malloc(zipSize); + if (!zipBuf || fread(zipBuf, 1, zipSize, f) < zipSize) { + mod_fs_read_raise_error( + "modPath: %s - cannot read zip file", modFs->modPath ); } - u8 version = (u8) magic[sizeof(MOD_FS_MAGIC) - 1]; - if (version == 0 || version > MOD_FS_VERSION) { - mod_fs_read_raise_error(modFs, f, - "modPath: %s - invalid version: %u (must be between 1 and %u)", modFs->modPath, version, MOD_FS_VERSION + fclose(f); + f = NULL; + + // initialize zip + if (!mz_zip_reader_init_mem(zip, zipBuf, zipSize, 0)) { + mod_fs_read_raise_error_zip(); + } + + // find and read properties file + json properties; + std::string error; + if (!mod_fs_read_properties(zip, properties, error)) { + mod_fs_read_raise_error( + "modPath: %s - %s", modFs->modPath, error.c_str() ); } - // read header - mod_fs_read_fread_or_fail(modFs, f, &modFs->numFiles, sizeof(modFs->numFiles), 1, - "modPath: %s - cannot read number of files", modFs->modPath - ); - mod_fs_read_fread_or_fail(modFs, f, &modFs->isPublic, sizeof(modFs->isPublic), 1, - "modPath: %s - cannot read public flag", modFs->modPath - ); - - // check validity - if (modFs->numFiles > MOD_FS_MAX_FILES) { - mod_fs_read_raise_error(modFs, f, - "modPath: %s - exceeded number of files: %u (max is: %u)", modFs->modPath, modFs->numFiles, MOD_FS_MAX_FILES - ); - } - - // check access + // check if modfs is public + modFs->isPublic = mod_fs_read_property(properties, { "isPublic" }, MOD_FS_IS_PUBLIC_DEFAULT); if (!mod_fs_is_active_mod(modFs) && !modFs->isPublic) { // don't raise an error, user should not know if a private modfs file exists - mod_fs_destroy(modFs); - fclose(f); - return false; + mod_fs_read_return (false); } - if (readHeaderOnly) { - fclose(f); - return true; + if (checkExistenceOnly) { + mod_fs_read_return (true); } - // padding (empty space for future versions) - if (fseek(f, MOD_FS_HEADER_SIZE, SEEK_SET) != 0) { - mod_fs_read_raise_error(modFs, f, - "modPath: %s - cannot read header", modFs->modPath - ); + modFs->numFiles = 0; + modFs->totalSize = 0; + u32 numFiles = mz_zip_reader_get_num_files(zip); + std::vector files; + + // retrieve files and start building them + // check filename, file size, total size and number of files here + for (u32 i = 0; i != numFiles; ++i) { + mz_zip_archive_file_stat fileStat; + if (!mz_zip_reader_is_file_a_directory(zip, i) && // not a directory + mz_zip_reader_file_stat(zip, i, &fileStat) && // valid file + strcmp(fileStat.m_filename, MOD_FS_PROPERTIES) != 0 // not properties.json + ) { + struct ModFsFile file = {0}; + file.offset = i; + + // check filepath + const char *filepath = fileStat.m_filename; + if (!mod_fs_check_filepath(modFs, filepath)) { + mod_fs_read_raise_error( + "modPath: %s - invalid filepath: %s", modFs->modPath, filepath + ); + } + memcpy(file.filepath, filepath, strlen(filepath)); + + // check file size + if (fileStat.m_uncomp_size > MOD_FS_MAX_SIZE) { + mod_fs_read_raise_error( + "modPath: %s, filepath: %s - exceeded file size: %llu (max is: %u)", modFs->modPath, file.filepath, (u64) fileStat.m_uncomp_size, MOD_FS_MAX_SIZE + ); + } + file.size = file.capacity = fileStat.m_uncomp_size; + + // check total size + modFs->totalSize += file.size; + if (modFs->totalSize > MOD_FS_MAX_SIZE) { + mod_fs_read_raise_error( + "modPath: %s - exceeded total size: %u (max is: %u)", modFs->modPath, modFs->totalSize, MOD_FS_MAX_SIZE + ); + } + + // read isPublic property + const json &fileProperties = mod_fs_read_properties_for_filepath(properties, file.filepath); + file.isPublic = mod_fs_read_property(fileProperties, { "isPublic" }, MOD_FS_FILE_IS_PUBLIC_DEFAULT); + + // skip file if it's private + if (!mod_fs_is_active_mod(modFs) && !file.isPublic) { + continue; + } + + files.push_back(file); + modFs->numFiles++; + + // check number of files + if (modFs->numFiles > MOD_FS_MAX_FILES) { + mod_fs_read_raise_error( + "modPath: %s - exceeded number of files: %u (max is: %u)", modFs->modPath, numFiles, MOD_FS_MAX_FILES + ); + } + } } - // read files and compute total size + // read files data if (modFs->numFiles) { modFs->files = (struct ModFsFile **) calloc(modFs->numFiles, sizeof(struct ModFsFile *)); if (!modFs->files) { - mod_fs_read_raise_error(modFs, f, + mod_fs_read_raise_error( "modPath: %s - failed to allocate buffer for modfs files", modFs->modPath ); } } else { modFs->files = NULL; } - modFs->totalSize = 0; - for (u16 i = 0; i != modFs->numFiles; ++i) { + for (u16 i = 0, j = 0; i != modFs->numFiles; ++i) { + const struct ModFsFile &fileRef = files[i]; - // check filepath length - u16 filepathLength; - mod_fs_read_fread_or_fail(modFs, f, &filepathLength, sizeof(filepathLength), 1, - "modPath: %s - cannot read filepath length", modFs->modPath - ); - if (filepathLength == 0) { - mod_fs_read_raise_error(modFs, f, - "modPath: %s - filepath length cannot be 0", modFs->modPath - ); + // read file + size_t fileSize; + void *fileBuf = mz_zip_reader_extract_to_heap(zip, fileRef.offset, &fileSize, 0); + if (!fileBuf) { + mod_fs_read_raise_error_zip(); } - if (filepathLength > MOD_FS_MAX_PATH - 1) { - mod_fs_read_raise_error(modFs, f, - "modPath: %s - exceeded filepath length: %u (max is: %u)", modFs->modPath, filepathLength, MOD_FS_MAX_PATH - 1 + + // check file size + if (fileSize != fileRef.size) { + mod_fs_read_raise_error( + "modPath: %s, filepath: %s - truncated data: read size is %llu (expected: %u)", modFs->modPath, fileRef.filepath, (u64) fileSize, fileRef.size ); } - // get filename - char filepath[MOD_FS_MAX_PATH] = {0}; - mod_fs_read_fread_or_fail(modFs, f, filepath, sizeof(char), filepathLength, - "modPath: %s - cannot read filepath", modFs->modPath - ); - - // read file header - struct ModFsFile fileHeader = {0}; - mod_fs_read_fread_or_fail(modFs, f, &fileHeader.size, sizeof(fileHeader.size), 1, - "modPath: %s, filepath: %s - cannot read file size", modFs->modPath, filepath - ); - mod_fs_read_fread_or_fail(modFs, f, &fileHeader.isPublic, sizeof(fileHeader.isPublic), 1, - "modPath: %s, filepath: %s - cannot read file public flag", modFs->modPath, filepath - ); - mod_fs_read_fread_or_fail(modFs, f, &fileHeader.isText, sizeof(fileHeader.isText), 1, - "modPath: %s, filepath: %s - cannot read file text flag", modFs->modPath, filepath - ); - - // don't create file if it's private - if (!mod_fs_is_active_mod(modFs) && !fileHeader.isPublic) { - modFs->numFiles--; - i--; - fseek(f, fileHeader.size, SEEK_CUR); - continue; - } - - // create file + // create modfs file struct ModFsFile *file = modFs->files[i] = mod_fs_alloc(); if (!file) { - mod_fs_read_raise_error(modFs, f, + mod_fs_read_raise_error( "modPath: %s, filepath: %s - failed to allocate modfs file object", modFs->modPath, file->filepath ); } - memcpy(file, &fileHeader, sizeof(struct ModFsFile)); - snprintf(file->filepath, MOD_FS_MAX_PATH, "%s", filepath); - modFs->totalSize += file->size; - if (modFs->totalSize > MOD_FS_MAX_SIZE) { - mod_fs_read_raise_error(modFs, f, - "modPath: %s - exceeded total size: %u (max is: %u)", modFs->modPath, modFs->totalSize, MOD_FS_MAX_SIZE - ); - } + memcpy(file, &fileRef, sizeof(struct ModFsFile)); file->offset = 0; - - // read file data - file->capacity = file->size; if (file->size > 0) { file->data.bin = (u8 *) malloc(file->capacity); if (!file->data.bin) { - mod_fs_read_raise_error(modFs, f, + mod_fs_read_raise_error( "modPath: %s, filepath: %s - failed to allocate buffer for modfs file data", modFs->modPath, file->filepath ); } - mod_fs_read_fread_or_fail(modFs, f, file->data.bin, 1, file->size, - "modPath: %s, filepath: %s - cannot read file data", modFs->modPath, file->filepath + memcpy(file->data.bin, fileBuf, file->size); + } + mz_free(fileBuf); + + // read isText property + const bool isText = mod_fs_file_detect_text_mode(file); + const json &fileProperties = mod_fs_read_properties_for_filepath(properties, file->filepath); + file->isText = mod_fs_read_property(fileProperties, { "isText" }, isText); + + // check file content if binary + if (!isText && !mod_fs_check_file_content(modFs, file)) { + mod_fs_read_raise_error( + "modPath: %s, filepath: %s - Invalid file data", modFs->modPath, file->filepath ); } } - fclose(f); - return true; + if (modFs->files) { + qsort(modFs->files, modFs->numFiles, sizeof(struct ModFsFile *), mod_fs_compare_filepaths); + } + + mod_fs_read_return (true); } return false; } @@ -346,50 +640,63 @@ static bool mod_fs_read(const char *modPath, struct ModFs *modFs, bool readHeade // Write // -#define mod_fs_write_fwrite_or_fail(f, buf, size, count) { \ - if (fwrite(buf, size, count, f) < count) { \ - fclose(f); \ - return false; \ - } \ +#define mod_fs_write_raise_error(...) { \ + mod_fs_raise_error("cannot save modfs for the active mod: " __VA_ARGS__); \ + mz_zip_writer_end(zip); \ + fclose(f); \ + return false; \ +} + +#define mod_fs_write_raise_error_zip() { \ + mod_fs_write_raise_error("%s", mz_zip_get_error_string(mz_zip_get_last_error(zip))); \ } static bool mod_fs_write(struct ModFs *modFs) { FILE *f = mod_fs_get_file_handle(modFs->modPath, "wb"); if (f) { + mz_zip_archive zip[1] = {0}; - // magic + version - const u8 version = MOD_FS_VERSION; - mod_fs_write_fwrite_or_fail(f, MOD_FS_MAGIC, 1, sizeof(MOD_FS_MAGIC) - 1); - mod_fs_write_fwrite_or_fail(f, &version, sizeof(u8), 1); + // initialize zip + if (!mz_zip_writer_init_heap(zip, 0, 0)) { + mod_fs_write_raise_error_zip(); + } - // header - mod_fs_write_fwrite_or_fail(f, &modFs->numFiles, sizeof(modFs->numFiles), 1); - mod_fs_write_fwrite_or_fail(f, &modFs->isPublic, sizeof(modFs->isPublic), 1); - - // padding (empty space for future versions) - const u8 padding[MOD_FS_HEADER_SIZE] = {0}; - u32 paddingLength = MOD_FS_HEADER_SIZE - ftell(f); - mod_fs_write_fwrite_or_fail(f, padding, 1, paddingLength); - - // files + // add each modfs file to the zip archive for (u16 i = 0; i != modFs->numFiles; ++i) { struct ModFsFile *file = modFs->files[i]; - // filepath - u16 filepathLength = strlen(file->filepath); - mod_fs_write_fwrite_or_fail(f, &filepathLength, sizeof(filepathLength), 1); - mod_fs_write_fwrite_or_fail(f, file->filepath, sizeof(char), filepathLength); + // check file content before writing if binary + const bool isText = mod_fs_file_detect_text_mode(file); + if (!isText && !mod_fs_check_file_content(modFs, file)) { + mod_fs_write_raise_error( + "filepath: %s - Invalid file data", file->filepath + ); + } - // data - mod_fs_write_fwrite_or_fail(f, &file->size, sizeof(file->size), 1); - mod_fs_write_fwrite_or_fail(f, &file->isPublic, sizeof(file->isPublic), 1); - mod_fs_write_fwrite_or_fail(f, &file->isText, sizeof(file->isText), 1); - if (file->data.bin) { - mod_fs_write_fwrite_or_fail(f, file->data.bin, 1, file->size); + if (!mz_zip_writer_add_mem(zip, file->filepath, file->data.bin, file->size, MZ_BEST_COMPRESSION)) { + mod_fs_write_raise_error_zip(); } } + // write properties file + std::string properties = mod_fs_get_properties_json(modFs).dump(4, ' ', true); + if (!mz_zip_writer_add_mem(zip, MOD_FS_PROPERTIES, properties.c_str(), properties.length(), MZ_BEST_COMPRESSION)) { + mod_fs_write_raise_error_zip(); + } + + // finalize and gets zip archive + void *zipBuf = NULL; + size_t zipSize = 0; + if (!mz_zip_writer_finalize_heap_archive(zip, &zipBuf, &zipSize)) { + mod_fs_write_raise_error_zip(); + } + + // write file and cleanup + fwrite(zipBuf, 1, zipSize, f); + mz_zip_writer_end(zip); + mz_free(zipBuf); fclose(f); + return true; } return false; @@ -413,7 +720,7 @@ static bool mod_fs_check_pointer(T *ptr, const char *typeName) { static bool mod_fs_check_write(struct ModFs *modFs, const char *action) { if (!mod_fs_is_active_mod(modFs)) { mod_fs_raise_error( - "modPath: %s - %s files in other mods modfs is not allowed", modFs->modPath, action + "modPath: %s - %s other mods modfs is not allowed", modFs->modPath, action ); return false; } @@ -430,22 +737,6 @@ static bool mod_fs_file_check_write(struct ModFsFile *file) { return true; } -static bool mod_fs_check_filepath_length(struct ModFs *modFs, u32 filepathLength) { - if (filepathLength == 0) { - mod_fs_raise_error( - "modPath: %s - filepath length cannot be 0", modFs->modPath - ); - return false; - } - if (filepathLength > MOD_FS_MAX_PATH - 1) { - mod_fs_raise_error( - "modPath: %s - exceeded filepath length: %u (max is: %u)", modFs->modPath, filepathLength, MOD_FS_MAX_PATH - 1 - ); - return false; - } - return true; -} - static bool mod_fs_file_check_file_type(struct ModFsFile *file, bool isText, bool write, const char *dataName) { if (file->isText != isText) { mod_fs_raise_error( @@ -472,11 +763,6 @@ static bool mod_fs_file_check_parameter(struct ModFsFile *file, u8 parameter, u8 return true; } - - - - - // // FS management // @@ -501,7 +787,7 @@ static struct ModFs *mod_fs_get_or_load(const char *modPath, bool loadIfNotFound struct ModFs *modFs = mod_fs_alloc(); if (!modFs) { mod_fs_raise_error( - "failed to allocate modfs object", NULL + "failed to allocate modfs object" ); return NULL; } @@ -551,18 +837,17 @@ C_DEFINE struct ModFs *mod_fs_reload(OPTIONAL const char *modPath) { } // reload - return mod_fs_get_or_load(modPath, true); + return mod_fs_get(modPath); } C_DEFINE struct ModFs *mod_fs_create() { mod_fs_reset_last_error(); - struct ModFs *modFs = mod_fs_get_or_load(NULL, false); - if (!modFs) { - modFs = mod_fs_new(); + if (!mod_fs_exists(NULL)) { + struct ModFs *modFs = mod_fs_new(); if (!modFs) { mod_fs_raise_error( - "cannot create modfs for the active mod", NULL + "cannot create modfs for the active mod" ); return NULL; } @@ -572,78 +857,15 @@ C_DEFINE struct ModFs *mod_fs_create() { } mod_fs_raise_error( - "a modfs already exists for the active mod; use `mod_fs_get()` instead", NULL + "a modfs already exists for the active mod; use `mod_fs_get()` instead" ); return NULL; } -C_DEFINE bool mod_fs_delete() { - mod_fs_reset_last_error(); - - struct ModFs *modFs = mod_fs_get_or_load(NULL, true); - if (modFs) { - char filename[SYS_MAX_PATH]; - if (mod_fs_get_physical_filename(modFs->modPath, filename) && fs_sys_file_exists(filename)) { - remove(filename); - } - - sModFsList.erase(std::find(sModFsList.begin(), sModFsList.end(), modFs)); - mod_fs_destroy(modFs); - mod_fs_free(modFs); - return true; - } - - mod_fs_raise_error( - "there is no modfs for the active mod", NULL - ); - return false; -} - -C_DEFINE bool mod_fs_save() { - mod_fs_reset_last_error(); - - struct ModFs *modFs = mod_fs_get_or_load(NULL, true); - if (modFs) { - if (!mod_fs_write(modFs)) { - mod_fs_raise_error( - "cannot save modfs for the active mod", NULL - ); - return false; - } - return true; - } - - mod_fs_raise_error( - "there is no modfs for the active mod; use `mod_fs_create()` to create one", NULL - ); - return false; -} - -C_DEFINE bool mod_fs_set_public(bool pub) { - mod_fs_reset_last_error(); - - struct ModFs *modFs = mod_fs_get_or_load(NULL, true); - if (modFs) { - modFs->isPublic = pub; - return true; - } - - mod_fs_raise_error( - "there is no modfs for the active mod; use `mod_fs_create()` to create one", NULL - ); - return false; -} - // // File management // -static int mod_fs_compare_filepaths(const void *l, const void *r) { - const struct ModFsFile *lfile = (const struct ModFsFile *) l; - const struct ModFsFile *rfile = (const struct ModFsFile *) r; - return strcmp(lfile->filepath, rfile->filepath); -} - C_DEFINE const char *mod_fs_get_filename(struct ModFs *modFs, u16 index) { mod_fs_reset_last_error(); @@ -685,7 +907,7 @@ C_DEFINE struct ModFsFile *mod_fs_create_file(struct ModFs *modFs, const char *f } // cannot create new files in other mods modfs - if (!mod_fs_check_write(modFs, "creating")) { + if (!mod_fs_check_write(modFs, "creating files in")) { return NULL; } @@ -698,8 +920,15 @@ C_DEFINE struct ModFsFile *mod_fs_create_file(struct ModFs *modFs, const char *f } // check filepath - u32 filepathLength = strlen(filepath); - if (!mod_fs_check_filepath_length(modFs, filepathLength)) { + if (!mod_fs_check_filepath(modFs, filepath)) { + return NULL; + } + + // check existing file + if (mod_fs_get_file(modFs, filepath)) { + mod_fs_raise_error( + "modPath: %s - file %s already exists; use `mod_fs_get_file` instead", modFs->modPath, filepath + ); return NULL; } @@ -717,7 +946,7 @@ C_DEFINE struct ModFsFile *mod_fs_create_file(struct ModFs *modFs, const char *f file->capacity = 0; file->offset = 0; file->isText = text; - file->isPublic = false; + file->isPublic = MOD_FS_FILE_IS_PUBLIC_DEFAULT; file->modFs = modFs; // add file and sort by filename @@ -745,13 +974,12 @@ C_DEFINE bool mod_fs_move_file(struct ModFs *modFs, const char *oldpath, const c } // cannot move files in other mods modfs - if (!mod_fs_check_write(modFs, "moving")) { + if (!mod_fs_check_write(modFs, "moving files in")) { return false; } // check new filepath - u32 newpathLength = strlen(newpath); - if (!mod_fs_check_filepath_length(modFs, newpathLength)) { + if (!mod_fs_check_filepath(modFs, newpath)) { return false; } @@ -789,13 +1017,12 @@ C_DEFINE bool mod_fs_copy_file(struct ModFs *modFs, const char *srcpath, const c } // cannot copy files in other mods modfs - if (!mod_fs_check_write(modFs, "copying")) { + if (!mod_fs_check_write(modFs, "copying files in")) { return false; } // check dest filepath - u32 dstpathLength = strlen(dstpath); - if (!mod_fs_check_filepath_length(modFs, dstpathLength)) { + if (!mod_fs_check_filepath(modFs, dstpath)) { return false; } @@ -831,7 +1058,7 @@ C_DEFINE bool mod_fs_copy_file(struct ModFs *modFs, const char *srcpath, const c modFs->totalSize = newTotalSize; // copy file - u8 *buffer = (u8 *) malloc(srcfile->capacity); + u8 *buffer = (u8 *) malloc(srcfile->size); if (!buffer) { mod_fs_raise_error( "modPath: %s, filepath: %s - failed to allocate buffer for modfs file data", modFs->modPath, dstfile->filepath @@ -850,6 +1077,7 @@ C_DEFINE bool mod_fs_copy_file(struct ModFs *modFs, const char *srcpath, const c memcpy(dstfile, srcfile, sizeof(struct ModFsFile)); snprintf(dstfile->filepath, MOD_FS_MAX_PATH, "%s", dstpath); memcpy(buffer, srcfile->data.bin, srcfile->size); + dstfile->size = dstfile->capacity = srcfile->size; dstfile->data.bin = buffer; dstfile->offset = 0; return true; @@ -863,7 +1091,7 @@ C_DEFINE bool mod_fs_delete_file(struct ModFs *modFs, const char *filepath) { } // cannot delete files in other mods modfs - if (!mod_fs_check_write(modFs, "deleting")) { + if (!mod_fs_check_write(modFs, "deleting files in")) { return false; } @@ -898,7 +1126,7 @@ C_DEFINE bool mod_fs_clear(struct ModFs *modFs) { } // cannot delete files in other mods modfs - if (!mod_fs_check_write(modFs, "deleting")) { + if (!mod_fs_check_write(modFs, "deleting files in")) { return false; } @@ -915,6 +1143,60 @@ C_DEFINE bool mod_fs_clear(struct ModFs *modFs) { return true; } +C_DEFINE bool mod_fs_save(struct ModFs *modFs) { + mod_fs_reset_last_error(); + + if (!mod_fs_check_pointer(modFs, "modfs")) { + return false; + } + + // cannot save other mods modfs + if (!mod_fs_check_write(modFs, "saving over")) { + return false; + } + + return mod_fs_write(modFs); +} + +C_DEFINE bool mod_fs_delete(struct ModFs *modFs) { + mod_fs_reset_last_error(); + + if (!mod_fs_check_pointer(modFs, "modfs")) { + return false; + } + + // cannot delete other mods modfs + if (!mod_fs_check_write(modFs, "deleting")) { + return false; + } + + char filename[SYS_MAX_PATH]; + if (mod_fs_get_physical_filename(modFs->modPath, filename) && fs_sys_file_exists(filename)) { + remove(filename); + } + + sModFsList.erase(std::find(sModFsList.begin(), sModFsList.end(), modFs)); + mod_fs_destroy(modFs); + mod_fs_free(modFs); + return true; +} + +C_DEFINE bool mod_fs_set_public(struct ModFs *modFs, bool pub) { + mod_fs_reset_last_error(); + + if (!mod_fs_check_pointer(modFs, "modfs")) { + return false; + } + + // cannot change public flag of other mods modfs + if (!mod_fs_check_write(modFs, "changing public flag of")) { + return false; + } + + modFs->isPublic = pub; + return true; +} + // // Read data // @@ -941,6 +1223,31 @@ static T mod_fs_file_read_data(struct ModFsFile *file, T defaultValue) { return value; } +static const char *mod_fs_file_read_string_buffer(struct ModFsFile *file, u32 length, bool skipNextChar) { + static char *sModFsFileReadStringBuf = NULL; + static u32 sModFsFileReadStringBufLength = 0; + + // grow buffer if needed + if (length > sModFsFileReadStringBufLength) { + free(sModFsFileReadStringBuf); + sModFsFileReadStringBuf = (char *) malloc(length + 1); + if (!sModFsFileReadStringBuf) { + sModFsFileReadStringBufLength = 0; + mod_fs_raise_error( + "modPath: %s, filepath: %s - unable to allocate temporary buffer of length: %u", + file->modFs->modPath, file->filepath, length + ); + return NULL; + } + sModFsFileReadStringBufLength = length; + } + + memcpy(sModFsFileReadStringBuf, file->data.bin + file->offset, length); + sModFsFileReadStringBuf[length] = 0; + file->offset = MIN(file->offset + length + skipNextChar, file->size); + return sModFsFileReadStringBuf; +} + C_DEFINE bool mod_fs_file_read_bool(struct ModFsFile *file) { mod_fs_reset_last_error(); @@ -1041,26 +1348,23 @@ C_DEFINE const char *mod_fs_file_read_string(struct ModFsFile *file) { return NULL; } - memset(sModFsFileReadStringBuf, 0, sizeof(sModFsFileReadStringBuf)); if (mod_fs_file_read_check_eof(file, 1)) { return NULL; } // for text files, returns the whole content from offset if (file->isText) { - memcpy(sModFsFileReadStringBuf, file->data.text + file->offset, file->size - file->offset); - file->offset = file->size; - return sModFsFileReadStringBuf; + return mod_fs_file_read_string_buffer(file, file->size - file->offset, false); } - // for binary, stops at the first NULL char or at the end of the file - char *buf = sModFsFileReadStringBuf; - for (char *c = (char *) (file->data.bin + file->offset); *c && file->offset < file->size; c++, file->offset++, buf++) { - *buf = *c; + // for binary, stops at the first NUL char or at the end of the file + u32 length = 0; + const char *start = (const char *) (file->data.bin + file->offset); + const char *end = (const char *) (file->data.bin + file->size); + for (const char *c = start; *c && c < end; c++) { + length++; } - *buf = 0; - file->offset = MIN(file->offset + 1, file->size); - return sModFsFileReadStringBuf; + return mod_fs_file_read_string_buffer(file, length, true); } C_DEFINE const char *mod_fs_file_read_line(struct ModFsFile *file) { @@ -1075,18 +1379,18 @@ C_DEFINE const char *mod_fs_file_read_line(struct ModFsFile *file) { return 0; } - memset(sModFsFileReadStringBuf, 0, sizeof(sModFsFileReadStringBuf)); if (mod_fs_file_read_check_eof(file, 1)) { return NULL; } - char *buf = sModFsFileReadStringBuf; - for (char *c = file->data.text + file->offset; *c != '\n' && file->offset < file->size; c++, file->offset++, buf++) { - *buf = *c; + // stops at the first newline or at the end of the file + u32 length = 0; + const char *start = (const char *) (file->data.text + file->offset); + const char *end = (const char *) (file->data.text + file->size); + for (const char *c = start; *c != '\n' && c < end; c++) { + length++; } - *buf = 0; - file->offset = MIN(file->offset + 1, file->size); - return sModFsFileReadStringBuf; + return mod_fs_file_read_string_buffer(file, length, true); } // @@ -1108,7 +1412,7 @@ static bool mod_fs_file_write_resize_buffer(struct ModFsFile *file, u32 size) { // resize data buffer if (file->offset + size > file->capacity) { - u32 newCapacity = MAX(file->capacity * 2, 32); + u32 newCapacity = MAX(file->capacity * 2, file->offset + size); u8 *buffer = (u8 *) realloc(file->data.bin, newCapacity); if (!buffer) { mod_fs_raise_error( @@ -1319,6 +1623,17 @@ C_DEFINE bool mod_fs_file_seek(struct ModFsFile *file, s32 offset, enum ModFsFil return true; } +C_DEFINE bool mod_fs_file_rewind(struct ModFsFile *file) { + mod_fs_reset_last_error(); + + if (!mod_fs_check_pointer(file, "modfs file")) { + return false; + } + + file->offset = 0; + return true; +} + C_DEFINE bool mod_fs_file_is_eof(struct ModFsFile *file) { mod_fs_reset_last_error(); @@ -1368,6 +1683,17 @@ C_DEFINE bool mod_fs_file_erase(struct ModFsFile *file, u32 length) { return true; } +C_DEFINE bool mod_fs_file_set_text_mode(struct ModFsFile *file, bool text) { + mod_fs_reset_last_error(); + + if (!mod_fs_check_pointer(file, "modfs file")) { + return false; + } + + file->isText = text; + return true; +} + C_DEFINE bool mod_fs_file_set_public(struct ModFsFile *file, bool pub) { mod_fs_reset_last_error(); @@ -1388,10 +1714,75 @@ C_DEFINE bool mod_fs_file_set_public(struct ModFsFile *file, bool pub) { // Errors // -void mod_fs_hide_errors(bool hide) { +C_DEFINE void mod_fs_hide_errors(bool hide) { sModFsHideErrors = hide; } -const char *mod_fs_get_last_error() { +C_DEFINE const char *mod_fs_get_last_error() { return *sModFsLastError ? sModFsLastError : NULL; } + +// +// Functions used by other C modules, not API +// + +static bool mod_fs_extract_modpath_and_filepath(const char *uri, char *modPath, char *filepath) { + + // check prefix + if (!is_mod_fs_file(uri)) { + return false; + } + + // get modPath + const char *modPathBegin = uri + sizeof(MOD_FS_URI_PREFIX) - 1; + const char *modPathEnd = strchr(modPathBegin, '/'); + if (!modPathEnd) { + return false; + } + snprintf(modPath, SYS_MAX_PATH, "%.*s", (s32) (modPathEnd - modPathBegin), modPathBegin); + + // get filepath + snprintf(filepath, MOD_FS_MAX_PATH, "%s", modPathEnd + 1); + + return true; +} + +C_DEFINE bool mod_fs_read_file_from_uri(const char *uri, void **buffer, u32 *length) { + char modPath[SYS_MAX_PATH]; + char filepath[MOD_FS_MAX_PATH]; + if (!mod_fs_extract_modpath_and_filepath(uri, modPath, filepath)) { + return false; + } + + struct ModFs *modFs = mod_fs_get(modPath); + if (!modFs) { + return false; + } + + struct ModFsFile *file = mod_fs_get_file(modFs, filepath); + if (!file || !file->data.bin || !file->size) { + return false; + } + + *buffer = malloc(file->size); + if (!*buffer) { + return false; + } + memcpy(*buffer, file->data.bin, file->size); + *length = file->size; + return true; +} + +C_DEFINE void mod_fs_shutdown() { + + // Close all modfs + for (auto &modFs : sModFsList) { + mod_fs_destroy(modFs); + mod_fs_free(modFs); + } + sModFsList.clear(); + + // Reset error state + mod_fs_reset_last_error(); + sModFsHideErrors = false; +} diff --git a/src/pc/mods/mod_fs.h b/src/pc/mods/mod_fs.h index 90daa1838..8cd45794f 100644 --- a/src/pc/mods/mod_fs.h +++ b/src/pc/mods/mod_fs.h @@ -4,12 +4,13 @@ #include "types.h" #include "src/pc/lua/smlua.h" -#define MOD_FS_MAX_SIZE 0x1000000 // 16 MB -#define MOD_FS_MAX_FILES 0x100 +#define MOD_FS_MAX_SIZE 0x2000000 // 32 MB +#define MOD_FS_MAX_FILES 0x200 #define MOD_FS_MAX_PATH 0x100 -#define MOD_FS_DIRECTORY "sav" -#define MOD_FS_EXTENSION ".modfs" -#define MOD_FS_VERSION 1 +#define MOD_FS_URI_PREFIX "modfs:/" +#define MOD_FS_URI_FORMAT "modfs:/%s/%s" // modPath, filepath + +#define is_mod_fs_file(filepath) (memcmp(filepath, MOD_FS_URI_PREFIX, sizeof(MOD_FS_URI_PREFIX) - 1) == 0) enum ModFsFileIntType { INT_TYPE_U8, @@ -53,6 +54,26 @@ struct ModFsFile { u32 offset; bool isText; bool isPublic; + + FUNCTION(read_bool, mod_fs_file_read_bool); + FUNCTION(read_integer, mod_fs_file_read_integer); + FUNCTION(read_number, mod_fs_file_read_number); + FUNCTION(read_bytes, mod_fs_file_read_bytes); + FUNCTION(read_string, mod_fs_file_read_string); + FUNCTION(read_line, mod_fs_file_read_line); + FUNCTION(write_bool, mod_fs_file_write_bool); + FUNCTION(write_integer, mod_fs_file_write_integer); + FUNCTION(write_number, mod_fs_file_write_number); + FUNCTION(write_bytes, mod_fs_file_write_bytes); + FUNCTION(write_string, mod_fs_file_write_string); + FUNCTION(write_line, mod_fs_file_write_line); + FUNCTION(seek, mod_fs_file_seek); + FUNCTION(rewind, mod_fs_file_rewind); + FUNCTION(is_eof, mod_fs_file_is_eof); + FUNCTION(fill, mod_fs_file_fill); + FUNCTION(erase, mod_fs_file_erase); + FUNCTION(set_text_mode, mod_fs_file_set_text_mode); + FUNCTION(set_public, mod_fs_file_set_public); }; struct ModFs { @@ -62,6 +83,17 @@ struct ModFs { u16 numFiles; u32 totalSize; bool isPublic; + + FUNCTION(get_filename, mod_fs_get_filename); + FUNCTION(get_file, mod_fs_get_file); + FUNCTION(create_file, mod_fs_create_file); + FUNCTION(move_file, mod_fs_move_file); + FUNCTION(copy_file, mod_fs_copy_file); + FUNCTION(delete_file, mod_fs_delete_file); + FUNCTION(clear, mod_fs_clear); + FUNCTION(save, mod_fs_save); + FUNCTION(delete, mod_fs_delete); + FUNCTION(set_public, mod_fs_set_public); }; /* |description| @@ -84,21 +116,6 @@ Creates a modfs object for the active mod if it doesn't exist. Returns the modfs |descriptionEnd| */ struct ModFs *mod_fs_create(); -/* |description| -Deletes the modfs object of the active mod if it exists. Returns true on success -|descriptionEnd| */ -bool mod_fs_delete(); - -/* |description| -Saves the modfs object of the active mod if it exists. Returns true on success -|descriptionEnd| */ -bool mod_fs_save(); - -/* |description| -Marks the modfs object of the active mod as public (i.e. readable by other mods) if it exists. Returns true on success -|descriptionEnd| */ -bool mod_fs_set_public(bool pub); - /* |description| Gets the filename at position `index` of the provided `modFs` |descriptionEnd| */ @@ -134,6 +151,21 @@ Deletes all files of the provided `modFs`. Returns true on success |descriptionEnd| */ bool mod_fs_clear(struct ModFs *modFs); +/* |description| +Saves the provided `modFs` to persistent storage. Returns true on success +|descriptionEnd| */ +bool mod_fs_save(struct ModFs *modFs); + +/* |description| +Removes the provided `modFs` from persistent storage and deletes its object. Returns true on success +|descriptionEnd| */ +bool mod_fs_delete(struct ModFs *modFs); + +/* |description| +Marks the provided `modFs` as public (i.e. readable by other mods). Returns true on success +|descriptionEnd| */ +bool mod_fs_set_public(struct ModFs *modFs, bool pub); + /* |description| Reads a boolean from a binary modfs `file` |descriptionEnd| */ @@ -203,6 +235,12 @@ Returns true on success |descriptionEnd| */ bool mod_fs_file_seek(struct ModFsFile *file, s32 offset, enum ModFsFileSeek origin); +/* |description| +Sets the current position of a modfs `file` to its beginning. +Returns true on success +|descriptionEnd| */ +bool mod_fs_file_rewind(struct ModFsFile *file); + /* |description| Returns true if the provided modfs `file` has reached its end of file |descriptionEnd| */ @@ -218,6 +256,11 @@ Erases `length` bytes or characters from a modfs `file`. Returns true on success |descriptionEnd| */ bool mod_fs_file_erase(struct ModFsFile *file, u32 length); +/* |description| +Marks the provided modfs `file` as text. Returns true on success +|descriptionEnd| */ +bool mod_fs_file_set_text_mode(struct ModFsFile *file, bool text); + /* |description| Marks the provided modfs `file` as public (i.e. readable by other mods). Returns true on success |descriptionEnd| */ @@ -233,4 +276,9 @@ Returns the last error message generated by `mod_fs` functions or nil if no erro |descriptionEnd| */ const char *mod_fs_get_last_error(); +// Functions used by other C modules, not API + +bool mod_fs_read_file_from_uri(const char *uri, void **buffer, u32 *length); +void mod_fs_shutdown(); + #endif // MOD_FS_H diff --git a/src/pc/mods/mod_import.c b/src/pc/mods/mod_import.c index 116893dad..ad9de35c7 100644 --- a/src/pc/mods/mod_import.c +++ b/src/pc/mods/mod_import.c @@ -124,15 +124,15 @@ static bool mod_import_zip(char* path, bool* isLua, bool* isDynos) { return false; } - if (str_ends_with(file_stat.m_filename, ".lua") || str_ends_with(file_stat.m_filename, ".luac")) { + if (path_ends_with(file_stat.m_filename, ".lua") || path_ends_with(file_stat.m_filename, ".luac")) { path_get_folder(file_stat.m_filename, luaPath); *isLua = true; break; - } else if (str_ends_with(file_stat.m_filename, ".tex")) { + } else if (path_ends_with(file_stat.m_filename, ".tex")) { *isDynos = true; - } else if (str_ends_with(file_stat.m_filename, ".png")) { + } else if (path_ends_with(file_stat.m_filename, ".png")) { *isDynos = true; - } else if (str_ends_with(file_stat.m_filename, ".bin")) { + } else if (path_ends_with(file_stat.m_filename, ".bin")) { *isDynos = true; } } @@ -258,18 +258,18 @@ bool mod_import_file(char* path) { bool isPalette = false; bool ret = false; - if (gNetworkType != NT_NONE && !str_ends_with(path, ".ini")) { + if (gNetworkType != NT_NONE && !path_ends_with(path, ".ini")) { djui_popup_create(DLANG(NOTIF, IMPORT_FAIL_INGAME), 2); return false; } - if (str_ends_with(path, ".lua") || str_ends_with(path, ".luac")) { + if (path_ends_with(path, ".lua") || path_ends_with(path, ".luac")) { isLua = true; ret = mod_import_lua(path); - } else if (str_ends_with(path, ".ini")) { + } else if (path_ends_with(path, ".ini")) { isPalette = true; ret = mod_import_palette(path); - } else if (str_ends_with(path, ".zip")) { + } else if (path_ends_with(path, ".zip")) { ret = mod_import_zip(path, &isLua, &isDynos); } diff --git a/src/pc/mods/mod_storage.cpp b/src/pc/mods/mod_storage.cpp index f75686df3..e64a9ff2a 100644 --- a/src/pc/mods/mod_storage.cpp +++ b/src/pc/mods/mod_storage.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "pc/mini.h" extern "C" { @@ -16,6 +17,8 @@ extern "C" { #define C_FIELD extern "C" +static std::map sModStorageFiles; + static void strdelete(char* string, const char* substr) { // i is used to loop through the string u16 i = 0; @@ -43,7 +46,7 @@ static void strdelete(char* string, const char* substr) { string[i] = '\0'; } -bool char_valid(const char* buffer, bool isKey) { +static bool char_valid(const char* buffer, bool isKey) { if (buffer[0] == '\0') { return false; } while (*buffer != '\0') { @@ -57,7 +60,7 @@ bool char_valid(const char* buffer, bool isKey) { return true; } -void mod_storage_get_filename(char* dest) { +static void mod_storage_get_filename(char* dest) { const char* path = fs_get_write_path(SAVE_DIRECTORY); // get user path snprintf(dest, SYS_MAX_PATH - 1, "%s/%s", path, gLuaActiveMod->relativePath); // append sav folder strdelete(dest, ".lua"); // delete ".lua" from sav name @@ -65,63 +68,63 @@ void mod_storage_get_filename(char* dest) { normalize_path(dest); // fix any out of place slashes } -C_FIELD bool mod_storage_save(const char* key, const char* value) { - if (gLuaActiveMod == NULL) { return false; } - if (strlen(key) > MAX_KEY_VALUE_LENGTH || strlen(value) > MAX_KEY_VALUE_LENGTH) { return false; } - if (!char_valid(key, true) || !char_valid(value, false)) { return false; } +static bool mod_storage_check_inputs(const char *key, const char *value, char *filename) { - char filename[SYS_MAX_PATH] = { 0 }; + // check active mod + if (gLuaActiveMod == NULL) { return false; } + + // retrieve filename mod_storage_get_filename(filename); - // ensure savPath exists - const char* savPath = fs_get_write_path(SAVE_DIRECTORY); - if (!fs_sys_dir_exists(savPath)) { fs_sys_mkdir(savPath); } + // check key validity + if (key != NULL) { + if (strlen(key) > MAX_KEY_VALUE_LENGTH) { return false; } + if (!char_valid(key, true)) { return false; } + } - mINI::INIFile file(filename); - mINI::INIStructure ini; - file.read(ini); + // check value validity + if (value != NULL) { + if (strlen(value) > MAX_KEY_VALUE_LENGTH) { return false; } + if (!char_valid(value, false)) { return false; } - if (ini["storage"].size() > MAX_KEYS) { return false; } + // write: ensure savPath exists + const char* savPath = fs_get_write_path(SAVE_DIRECTORY); + if (!fs_sys_dir_exists(savPath)) { fs_sys_mkdir(savPath); } + } - ini["storage"][key] = value; - - file.write(ini); - file.generate(ini); + // No value == read or delete, check if filename exists + else { + if (!fs_sys_path_exists(filename)) { return false; } + } return true; } -C_FIELD bool mod_storage_save_number(const char* key, f32 value) { - // Store string results in a temporary buffer - // this assumes mod_storage_load will only ever be called by Lua - static char str[MAX_KEY_VALUE_LENGTH]; - if (floor(value) == value) { - snprintf(str, MAX_KEY_VALUE_LENGTH, "%lld", (s64)value); - } else { - snprintf(str, MAX_KEY_VALUE_LENGTH, "%f", value); + ////////// + // read // +////////// + +static mINI::INIStructure &mod_storage_read_file(const char *filename) { + const auto &it = sModStorageFiles.find(filename); + if (it != sModStorageFiles.end()) { + return it->second; } - return mod_storage_save(key, str); -} - -C_FIELD bool mod_storage_save_bool(const char* key, bool value) { - return mod_storage_save(key, value ? "true" : "false"); -} - -C_FIELD const char* mod_storage_load(const char* key) { - if (gLuaActiveMod == NULL) { return NULL; } - if (strlen(key) > MAX_KEY_VALUE_LENGTH) { return NULL; } - if (!char_valid(key, true)) { return NULL; } - - char filename[SYS_MAX_PATH] = { 0 }; - mod_storage_get_filename(filename); - if (!fs_sys_path_exists(filename)) { return NULL; } - mINI::INIFile file(filename); mINI::INIStructure ini; file.read(ini); + sModStorageFiles[filename] = ini; + return sModStorageFiles[filename]; +} - std::string str = ini["storage"][key]; +C_FIELD const char* mod_storage_load(const char* key) { + char filename[SYS_MAX_PATH] = { 0 }; + if (!mod_storage_check_inputs(key, NULL, filename)) { + return NULL; + } + + const mINI::INIStructure &ini = mod_storage_read_file(filename); + std::string str = ini.get("storage").get(key); if (str.empty()) { return NULL; } // Store string results in a temporary buffer @@ -146,35 +149,83 @@ C_FIELD bool mod_storage_load_bool(const char* key) { } C_FIELD bool mod_storage_exists(const char* key) { - if (gLuaActiveMod == NULL) { return false; } - if (strlen(key) > MAX_KEY_VALUE_LENGTH) { return false; } - if (!char_valid(key, true)) { return false; } + return mod_storage_load(key) != NULL; +} + +C_FIELD LuaTable mod_storage_load_all(void) { + struct lua_State *L = gLuaState; + if (!L) { return 0; } char filename[SYS_MAX_PATH] = { 0 }; - mod_storage_get_filename(filename); - if (!fs_sys_path_exists(filename)) { return false; } + if (!mod_storage_check_inputs(NULL, NULL, filename)) { + lua_pushnil(L); + return 0; + } + + const mINI::INIStructure &ini = mod_storage_read_file(filename); + + LUA_STACK_CHECK_BEGIN_NUM(L, 1); + + lua_newtable(L); + for (const auto &kv : ini.get("storage")) { + lua_pushstring(L, kv.first.c_str()); + lua_pushstring(L, kv.second.c_str()); + lua_settable(L, -3); + } + + LUA_STACK_CHECK_END(L); + return smlua_to_lua_table(L, -1); +} + + /////////// + // write // +/////////// + +C_FIELD bool mod_storage_save(const char* key, const char* value) { + char filename[SYS_MAX_PATH] = { 0 }; + if (!mod_storage_check_inputs(key, value, filename)) { + return false; + } + + mINI::INIStructure &ini = mod_storage_read_file(filename); + if (!ini["storage"].has(key) && ini["storage"].size() >= MAX_KEYS) { return false; } + + ini["storage"][key] = value; mINI::INIFile file(filename); - mINI::INIStructure ini; - file.read(ini); + file.write(ini); + file.generate(ini); - return ini["storage"].has(key); + return true; +} + +C_FIELD bool mod_storage_save_number(const char* key, f32 value) { + // Store string results in a temporary buffer + // this assumes mod_storage_load will only ever be called by Lua + static char str[MAX_KEY_VALUE_LENGTH]; + if (floor(value) == value) { + snprintf(str, MAX_KEY_VALUE_LENGTH, "%lld", (s64)value); + } else { + snprintf(str, MAX_KEY_VALUE_LENGTH, "%f", value); + } + + return mod_storage_save(key, str); +} + +C_FIELD bool mod_storage_save_bool(const char* key, bool value) { + return mod_storage_save(key, value ? "true" : "false"); } C_FIELD bool mod_storage_remove(const char* key) { - if (gLuaActiveMod == NULL) { return false; } - if (strlen(key) > MAX_KEY_VALUE_LENGTH) { return false; } - if (!char_valid(key, true)) { return false; } - char filename[SYS_MAX_PATH] = { 0 }; - mod_storage_get_filename(filename); - if (!fs_sys_path_exists(filename)) { return false; } + if (!mod_storage_check_inputs(key, NULL, filename)) { + return false; + } - mINI::INIFile file(filename); - mINI::INIStructure ini; - file.read(ini); + mINI::INIStructure &ini = mod_storage_read_file(filename); if (ini["storage"].remove(key)) { + mINI::INIFile file(filename); file.write(ini); file.generate(ini); return true; @@ -184,22 +235,26 @@ C_FIELD bool mod_storage_remove(const char* key) { } C_FIELD bool mod_storage_clear(void) { - if (gLuaActiveMod == NULL) { return false; } - char filename[SYS_MAX_PATH] = { 0 }; - mod_storage_get_filename(filename); - if (!fs_sys_path_exists(filename)) { return false; } - - mINI::INIFile file(filename); - mINI::INIStructure ini; - file.read(ini); + if (!mod_storage_check_inputs(NULL, NULL, filename)) { + return false; + } + mINI::INIStructure &ini = mod_storage_read_file(filename); if (ini["storage"].size() == 0) { return false; } ini["storage"].clear(); + mINI::INIFile file(filename); file.write(ini); file.generate(ini); return true; } + +C_FIELD void mod_storage_shutdown(void) { + for (auto &file : sModStorageFiles) { + file.second.clear(); + } + sModStorageFiles.clear(); +} diff --git a/src/pc/mods/mod_storage.h b/src/pc/mods/mod_storage.h index 5c337c15e..a3762e3f7 100644 --- a/src/pc/mods/mod_storage.h +++ b/src/pc/mods/mod_storage.h @@ -6,6 +6,7 @@ #ifdef __cplusplus extern "C" { #endif +#include "pc/lua/smlua_utils.h" #define MAX_KEYS 4096 #define MAX_KEY_VALUE_LENGTH 1024 @@ -25,6 +26,8 @@ const char *mod_storage_load(const char* key); f32 mod_storage_load_number(const char* key); /* |description|Loads a bool `value` from a `key` in mod storage|descriptionEnd| */ bool mod_storage_load_bool(const char* key); +/* |description|Loads all keys and values in mod storage as strings and returns them as a table|descriptionEnd| */ +LuaTable mod_storage_load_all(void); /* |description|Checks if a `key` is in mod storage|descriptionEnd| */ bool mod_storage_exists(const char* key); @@ -33,6 +36,8 @@ bool mod_storage_remove(const char* key); /* |description|Clears the mod's data from mod storage|descriptionEnd| */ bool mod_storage_clear(void); +void mod_storage_shutdown(void); + #ifdef __cplusplus } #endif diff --git a/src/pc/mods/mods_utils.c b/src/pc/mods/mods_utils.c index 429a22628..6e8c2bcd9 100644 --- a/src/pc/mods/mods_utils.c +++ b/src/pc/mods/mods_utils.c @@ -160,21 +160,35 @@ bool mod_file_create_directories(struct Mod* mod, struct ModFile* modFile) { ////////////////////////////////////////////////////////////////////////////////////////// -bool str_ends_with(const char* string, const char* suffix) { +bool str_starts_with(const char *string, const char *prefix) { + if (string == NULL || prefix == NULL) { return false; } + + return strncmp(string, prefix, strlen(prefix)) == 0; +} + +bool str_ends_with(const char *string, const char *suffix) { if (string == NULL || suffix == NULL) { return false; } size_t stringLength = strlen(string); size_t suffixLength = strlen(suffix); + return stringLength >= suffixLength && strncmp(string + stringLength - suffixLength, suffix, suffixLength) == 0; +} - if (suffixLength > stringLength) { return false; } +bool path_ends_with(const char* path, const char* suffix) { + if (path == NULL || suffix == NULL) { return false; } + + size_t pathLength = strlen(path); + size_t suffixLength = strlen(suffix); + + if (suffixLength > pathLength) { return false; } #ifdef _WIN32 // Paths on Windows are case-insensitive and might have // upper-case or mixed-case endings. - return (0 == _stricmp(&(string[stringLength - suffixLength]), suffix)); + return (0 == _stricmp(&(path[pathLength - suffixLength]), suffix)); #else // Always expecting lower-case file paths and extensions - return (0 == strcmp(&(string[stringLength - suffixLength]), suffix)); + return (0 == strcmp(&(path[pathLength - suffixLength]), suffix)); #endif } @@ -244,6 +258,47 @@ int path_depth(const char* path) { return depth; } +void resolve_relative_path(const char* base, const char* path, char* output) { + char combined[SYS_MAX_PATH] = ""; + + // If path is absolute, copy as is. Otherwise, combine base and relative path + if (path[0] == '/' || path[0] == '\\') { + snprintf(combined, sizeof(combined), "%s", path); + } else { + snprintf(combined, sizeof(combined), "%s/%s", base, path); + } + + char* tokens[64]; + int tokenCount = 0; + + // Tokenize path by separators + char* token = strtok(combined, "/\\"); + while (token && tokenCount < 64) { + if (strcmp(token, "..") == 0) { + // Pop last token to go up a directory + if (tokenCount > 0) { tokenCount--; } + + // Ignore "." (current directory) or empty tokens + } else if (strcmp(token, ".") != 0 && token[0] != '\0') { + tokens[tokenCount++] = token; + } + + token = strtok(NULL, "/\\"); + } + + output[0] = '\0'; + + // Build output path from tokens + for (int i = 0; i < tokenCount; i++) { + if (i > 0) { + strncat(output, "/", SYS_MAX_PATH - strlen(output) - 1); + } + strncat(output, tokens[i], SYS_MAX_PATH - strlen(output) - 1); + } + + normalize_path(output); +} + bool path_is_relative_to(const char* fullPath, const char* baseDir) { return strncmp(fullPath, baseDir, strlen(baseDir)) == 0; } diff --git a/src/pc/mods/mods_utils.h b/src/pc/mods/mods_utils.h index ad07e8216..493965134 100644 --- a/src/pc/mods/mods_utils.h +++ b/src/pc/mods/mods_utils.h @@ -12,7 +12,10 @@ void mods_delete_tmp(void); bool mod_file_full_path(char* destination, struct Mod* mod, struct ModFile* modFile); bool mod_file_create_directories(struct Mod* mod, struct ModFile* modFile); -bool str_ends_with(const char* string, const char* suffix); +bool str_starts_with(const char *string, const char *prefix); +bool str_ends_with(const char *string, const char *suffix); + +bool path_ends_with(const char* path, const char* suffix); char* extract_lua_field(char* fieldName, char* buffer); @@ -21,6 +24,7 @@ bool concat_path(char* destination, char* path, char* fname); char* path_basename(char* path); void path_get_folder(char* path, char* outpath); int path_depth(const char* path); +void resolve_relative_path(const char* base, const char* path, char* output); bool path_is_relative_to(const char* fullPath, const char* baseDir); bool directory_sanity_check(struct dirent* dir, char* dirPath, char* outPath); diff --git a/src/pc/network/version.h b/src/pc/network/version.h index cb982a566..6f23a13f7 100644 --- a/src/pc/network/version.h +++ b/src/pc/network/version.h @@ -19,7 +19,7 @@ #endif #ifdef DEVELOPMENT -#define GAME_NAME "sm64coopdx-dev" +#define GAME_NAME "sm64coopdx-dev" #define WINDOW_NAME "Super Mario 64 Coop Deluxe (DEV)" #elif !defined(VERSION_US) #define GAME_NAME "sm64coopdx-intl" diff --git a/src/pc/rom_checker.cpp b/src/pc/rom_checker.cpp index 2024dd0de..ee6e4ce65 100644 --- a/src/pc/rom_checker.cpp +++ b/src/pc/rom_checker.cpp @@ -10,7 +10,7 @@ extern "C" { #include "platform.h" -#include "mods/mods_utils.h" // for str_ends_with +#include "mods/mods_utils.h" // for path_ends_with #include "mods/mod_cache.h" // for md5 hashing #include "mods/mods.h" #include "loading.h" @@ -81,7 +81,7 @@ static bool is_rom_valid(const std::string romPath) { inline static bool scan_path_for_rom(const char *dir) { for (const auto &entry: std::filesystem::directory_iterator(dir)) { std::string path = entry.path().generic_string(); - if (str_ends_with(path.c_str(), ".z64")) { + if (path_ends_with(path.c_str(), ".z64")) { if (is_rom_valid(path)) { return true; } } } diff --git a/src/pc/update_checker.c b/src/pc/update_checker.c index 1613c80f1..77d21abb5 100644 --- a/src/pc/update_checker.c +++ b/src/pc/update_checker.c @@ -14,6 +14,14 @@ #define URL "https://raw.githubusercontent.com/coop-deluxe/sm64coopdx/refs/heads/main/src/pc/network/version.h" #define VERSION_IDENTIFIER "#define SM64COOPDX_VERSION \"" +/* + +NOTE: This entire update checker process should be replaced with one that uses GitHub's API +to check for the latest release version. This would be more reliable and efficient than +downloading and parsing a source file. + +*/ + static char sVersionUpdateTextBuffer[256] = { 0 }; static char sRemoteVersion[8] = { 0 }; @@ -46,17 +54,21 @@ size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userdata) { void parse_version(const char *data) { const char *version = strstr(data, VERSION_IDENTIFIER); if (version == NULL) { return; } - u8 len = strlen(VERSION_IDENTIFIER); + size_t len = strlen(VERSION_IDENTIFIER); version += len; const char *end = strchr(version, '"'); - memcpy(sRemoteVersion, version, end - version); - sRemoteVersion[end - version] = '\0'; + size_t versionLength = (size_t)(end - version); + if (versionLength > sizeof(sRemoteVersion) - 1) { return; } + memcpy(sRemoteVersion, version, versionLength); + sRemoteVersion[versionLength] = '\0'; } // function to download a text file from the internet void get_version_remote(void) { + sRemoteVersion[0] = '\0'; + #if defined(_WIN32) || defined(_WIN64) - char buffer[0xFF]; + char buffer[0xFF] = { 0 }; // initialize WinINet HINTERNET hInternet = InternetOpenA("sm64coopdx", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); @@ -80,9 +92,9 @@ void get_version_remote(void) { DWORD dwSize = sizeof(contentLength); HttpQueryInfo(hUrl, HTTP_QUERY_CONTENT_LENGTH | HTTP_QUERY_FLAG_NUMBER, &contentLength, &dwSize, NULL); - // read data from the URL + // read data from the URL, making room in the buffer for the null-terminator DWORD bytesRead; - if (!InternetReadFile(hUrl, buffer, sizeof(buffer), &bytesRead)) { + if (!InternetReadFile(hUrl, buffer, sizeof(buffer) - 1, &bytesRead)) { printf("Failed to check for updates!\n"); InternetCloseHandle(hInternet); InternetCloseHandle(hUrl); @@ -90,7 +102,6 @@ void get_version_remote(void) { } buffer[bytesRead] = '\0'; - snprintf(sRemoteVersion, 8, "%s", buffer); // close handles InternetCloseHandle(hUrl); @@ -134,7 +145,7 @@ void check_for_updates(void) { LOADING_SCREEN_MUTEX(loading_screen_set_segment_text("Checking For Updates")); get_version_remote(); - if (sRemoteVersion[0] != '\0' && strcmp(sRemoteVersion, get_version())) { + if (sRemoteVersion[0] == 'v' && strcmp(sRemoteVersion, get_version())) { snprintf( sVersionUpdateTextBuffer, 256, "\\#ffffa0\\%s\n\\#dcdcdc\\%s: %s\n%s: %s", diff --git a/src/pc/utils/json.hpp b/src/pc/utils/json.hpp new file mode 100644 index 000000000..e66265542 --- /dev/null +++ b/src/pc/utils/json.hpp @@ -0,0 +1,25677 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + +/****************************************************************************\ + * Note on documentation: The source files contain links to the online * + * documentation of the public API at https://json.nlohmann.me. This URL * + * contains the most recent documentation and should also be applicable to * + * previous versions; documentation for deprecated functions is not * + * removed, but marked deprecated. See "Generate documentation" section in * + * file docs/README.md. * +\****************************************************************************/ + +#ifndef INCLUDE_NLOHMANN_JSON_HPP_ +#define INCLUDE_NLOHMANN_JSON_HPP_ + +#include // all_of, find, for_each +#include // nullptr_t, ptrdiff_t, size_t +#include // hash, less +#include // initializer_list +#ifndef JSON_NO_IO + #include // istream, ostream +#endif // JSON_NO_IO +#include // random_access_iterator_tag +#include // unique_ptr +#include // string, stoi, to_string +#include // declval, forward, move, pair, swap +#include // vector + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// This file contains all macro definitions affecting or depending on the ABI + +#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK + #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) + #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 12 || NLOHMANN_JSON_VERSION_PATCH != 0 + #warning "Already included a different version of the library!" + #endif + #endif +#endif + +#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_MINOR 12 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_PATCH 0 // NOLINT(modernize-macro-to-enum) + +#ifndef JSON_DIAGNOSTICS + #define JSON_DIAGNOSTICS 0 +#endif + +#ifndef JSON_DIAGNOSTIC_POSITIONS + #define JSON_DIAGNOSTIC_POSITIONS 0 +#endif + +#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 +#endif + +#if JSON_DIAGNOSTICS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS +#endif + +#if JSON_DIAGNOSTIC_POSITIONS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS _dp +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS +#endif + +#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp +#else + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION + #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 +#endif + +// Construct the namespace ABI tags component +#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) json_abi ## a ## b ## c +#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b, c) \ + NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) + +#define NLOHMANN_JSON_ABI_TAGS \ + NLOHMANN_JSON_ABI_TAGS_CONCAT( \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ + NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON, \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS) + +// Construct the namespace version component +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ + _v ## major ## _ ## minor ## _ ## patch +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) + +#if NLOHMANN_JSON_NAMESPACE_NO_VERSION +#define NLOHMANN_JSON_NAMESPACE_VERSION +#else +#define NLOHMANN_JSON_NAMESPACE_VERSION \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ + NLOHMANN_JSON_VERSION_MINOR, \ + NLOHMANN_JSON_VERSION_PATCH) +#endif + +// Combine namespace components +#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b +#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ + NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) + +#ifndef NLOHMANN_JSON_NAMESPACE +#define NLOHMANN_JSON_NAMESPACE \ + nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN +#define NLOHMANN_JSON_NAMESPACE_BEGIN \ + namespace nlohmann \ + { \ + inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) \ + { +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_END +#define NLOHMANN_JSON_NAMESPACE_END \ + } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ + } // namespace nlohmann +#endif + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // transform +#include // array +#include // forward_list +#include // inserter, front_inserter, end +#include // map +#include // string +#include // tuple, make_tuple +#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include // unordered_map +#include // pair, declval +#include // valarray + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // nullptr_t +#include // exception +#if JSON_DIAGNOSTICS + #include // accumulate +#endif +#include // runtime_error +#include // to_string +#include // vector + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // array +#include // size_t +#include // uint8_t +#include // string + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // declval, pair +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template struct make_void +{ + using type = void; +}; +template using void_t = typename make_void::type; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// https://en.cppreference.com/w/cpp/experimental/is_detected +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; +}; + +template class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +template class Op, class... Args> +using is_detected = typename detector::value_t; + +template class Op, class... Args> +struct is_detected_lazy : is_detected { }; + +template class Op, class... Args> +using detected_t = typename detector::type; + +template class Op, class... Args> +using detected_or = detector; + +template class Op, class... Args> +using detected_or_t = typename detected_or::type; + +template class Op, class... Args> +using is_detected_exact = std::is_same>; + +template class Op, class... Args> +using is_detected_convertible = + std::is_convertible, To>; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + + +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-FileCopyrightText: 2016 - 2021 Evan Nemerson +// SPDX-License-Identifier: MIT + +/* Hedley - https://nemequ.github.io/hedley + * Created by Evan Nemerson + */ + +#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15) +#if defined(JSON_HEDLEY_VERSION) + #undef JSON_HEDLEY_VERSION +#endif +#define JSON_HEDLEY_VERSION 15 + +#if defined(JSON_HEDLEY_STRINGIFY_EX) + #undef JSON_HEDLEY_STRINGIFY_EX +#endif +#define JSON_HEDLEY_STRINGIFY_EX(x) #x + +#if defined(JSON_HEDLEY_STRINGIFY) + #undef JSON_HEDLEY_STRINGIFY +#endif +#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) + +#if defined(JSON_HEDLEY_CONCAT_EX) + #undef JSON_HEDLEY_CONCAT_EX +#endif +#define JSON_HEDLEY_CONCAT_EX(a,b) a##b + +#if defined(JSON_HEDLEY_CONCAT) + #undef JSON_HEDLEY_CONCAT +#endif +#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b) + +#if defined(JSON_HEDLEY_CONCAT3_EX) + #undef JSON_HEDLEY_CONCAT3_EX +#endif +#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c + +#if defined(JSON_HEDLEY_CONCAT3) + #undef JSON_HEDLEY_CONCAT3 +#endif +#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c) + +#if defined(JSON_HEDLEY_VERSION_ENCODE) + #undef JSON_HEDLEY_VERSION_ENCODE +#endif +#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) + #undef JSON_HEDLEY_VERSION_DECODE_MAJOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) + #undef JSON_HEDLEY_VERSION_DECODE_MINOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) + #undef JSON_HEDLEY_VERSION_DECODE_REVISION +#endif +#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) + +#if defined(JSON_HEDLEY_GNUC_VERSION) + #undef JSON_HEDLEY_GNUC_VERSION +#endif +#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#elif defined(__GNUC__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) +#endif + +#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) + #undef JSON_HEDLEY_GNUC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GNUC_VERSION) + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION) + #undef JSON_HEDLEY_MSVC_VERSION +#endif +#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) +#elif defined(_MSC_FULL_VER) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) +#elif defined(_MSC_VER) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) + #undef JSON_HEDLEY_MSVC_VERSION_CHECK +#endif +#if !defined(JSON_HEDLEY_MSVC_VERSION) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) +#elif defined(_MSC_VER) && (_MSC_VER >= 1400) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) +#elif defined(_MSC_VER) && (_MSC_VER >= 1200) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) +#else + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor))) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION) + #undef JSON_HEDLEY_INTEL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) +#elif defined(__INTEL_COMPILER) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_VERSION) + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #undef JSON_HEDLEY_INTEL_CL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL) + #define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION) + #undef JSON_HEDLEY_PGI_VERSION +#endif +#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) + #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) + #undef JSON_HEDLEY_PGI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PGI_VERSION) + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #undef JSON_HEDLEY_SUNPRO_VERSION +#endif +#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10) +#elif defined(__SUNPRO_C) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) +#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10) +#elif defined(__SUNPRO_CC) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) + #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION +#endif +#if defined(__EMSCRIPTEN__) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION) + #undef JSON_HEDLEY_ARM_VERSION +#endif +#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100) +#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) + #undef JSON_HEDLEY_ARM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_ARM_VERSION) + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION) + #undef JSON_HEDLEY_IBM_VERSION +#endif +#if defined(__ibmxl__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) +#elif defined(__xlC__) && defined(__xlC_ver__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) +#elif defined(__xlC__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) + #undef JSON_HEDLEY_IBM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IBM_VERSION) + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_VERSION) + #undef JSON_HEDLEY_TI_VERSION +#endif +#if \ + defined(__TI_COMPILER_VERSION__) && \ + ( \ + defined(__TMS470__) || defined(__TI_ARM__) || \ + defined(__MSP430__) || \ + defined(__TMS320C2000__) \ + ) +#if (__TI_COMPILER_VERSION__ >= 16000000) + #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif +#endif + +#if defined(JSON_HEDLEY_TI_VERSION_CHECK) + #undef JSON_HEDLEY_TI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_VERSION) + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #undef JSON_HEDLEY_TI_CL2000_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__) + #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #undef JSON_HEDLEY_TI_CL430_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__) + #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #undef JSON_HEDLEY_TI_ARMCL_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__)) + #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK) + #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #undef JSON_HEDLEY_TI_CL6X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__) + #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #undef JSON_HEDLEY_TI_CL7X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__) + #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #undef JSON_HEDLEY_TI_CLPRU_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__) + #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION) + #undef JSON_HEDLEY_CRAY_VERSION +#endif +#if defined(_CRAYC) + #if defined(_RELEASE_PATCHLEVEL) + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) + #else + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) + #undef JSON_HEDLEY_CRAY_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_CRAY_VERSION) + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION) + #undef JSON_HEDLEY_IAR_VERSION +#endif +#if defined(__IAR_SYSTEMS_ICC__) + #if __VER__ > 1000 + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) + #else + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100, __VER__ % 100, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) + #undef JSON_HEDLEY_IAR_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IAR_VERSION) + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION) + #undef JSON_HEDLEY_TINYC_VERSION +#endif +#if defined(__TINYC__) + #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) + #undef JSON_HEDLEY_TINYC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION) + #undef JSON_HEDLEY_DMC_VERSION +#endif +#if defined(__DMC__) + #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) + #undef JSON_HEDLEY_DMC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_DMC_VERSION) + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #undef JSON_HEDLEY_COMPCERT_VERSION +#endif +#if defined(__COMPCERT_VERSION__) + #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) + #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION) + #undef JSON_HEDLEY_PELLES_VERSION +#endif +#if defined(__POCC__) + #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) + #undef JSON_HEDLEY_PELLES_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PELLES_VERSION) + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #undef JSON_HEDLEY_MCST_LCC_VERSION +#endif +#if defined(__LCC__) && defined(__LCC_MINOR__) + #define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK) + #undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION) + #undef JSON_HEDLEY_GCC_VERSION +#endif +#if \ + defined(JSON_HEDLEY_GNUC_VERSION) && \ + !defined(__clang__) && \ + !defined(JSON_HEDLEY_INTEL_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_ARM_VERSION) && \ + !defined(JSON_HEDLEY_CRAY_VERSION) && \ + !defined(JSON_HEDLEY_TI_VERSION) && \ + !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL430_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \ + !defined(__COMPCERT__) && \ + !defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_ATTRIBUTE +#endif +#if \ + defined(__has_attribute) && \ + ( \ + (!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9)) \ + ) +# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) +#else +# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE +#endif +#if \ + defined(__has_cpp_attribute) && \ + defined(__cplusplus) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS +#endif +#if !defined(__cplusplus) || !defined(__has_cpp_attribute) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#elif \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \ + (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_BUILTIN) + #undef JSON_HEDLEY_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) +#else + #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) + #undef JSON_HEDLEY_GNUC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) + #undef JSON_HEDLEY_GCC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_FEATURE) + #undef JSON_HEDLEY_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) +#else + #define JSON_HEDLEY_HAS_FEATURE(feature) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) + #undef JSON_HEDLEY_GNUC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) + #undef JSON_HEDLEY_GCC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_EXTENSION) + #undef JSON_HEDLEY_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) +#else + #define JSON_HEDLEY_HAS_EXTENSION(extension) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) + #undef JSON_HEDLEY_GNUC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) + #undef JSON_HEDLEY_GCC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_WARNING) + #undef JSON_HEDLEY_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) +#else + #define JSON_HEDLEY_HAS_WARNING(warning) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) + #undef JSON_HEDLEY_GNUC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_WARNING) + #undef JSON_HEDLEY_GCC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + defined(__clang__) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR)) + #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_PRAGMA(value) __pragma(value) +#else + #define JSON_HEDLEY_PRAGMA(value) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) + #undef JSON_HEDLEY_DIAGNOSTIC_PUSH +#endif +#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) + #undef JSON_HEDLEY_DIAGNOSTIC_POP +#endif +#if defined(__clang__) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) + #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) +#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_PUSH + #define JSON_HEDLEY_DIAGNOSTIC_POP +#endif + +/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") +# if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions") +# if JSON_HEDLEY_HAS_WARNING("-Wc++1z-extensions") +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# endif +#endif +#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x +#endif + +#if defined(JSON_HEDLEY_CONST_CAST) + #undef JSON_HEDLEY_CONST_CAST +#endif +#if defined(__cplusplus) +# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast(expr)) +#elif \ + JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_REINTERPRET_CAST) + #undef JSON_HEDLEY_REINTERPRET_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast(expr)) +#else + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_STATIC_CAST) + #undef JSON_HEDLEY_STATIC_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast(expr)) +#else + #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_CPP_CAST) + #undef JSON_HEDLEY_CPP_CAST +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast") +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \ + ((T) (expr)) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0) +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("diag_suppress=Pe137") \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr)) +# endif +#else +# define JSON_HEDLEY_CPP_CAST(T, expr) (expr) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:161)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068)) +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:1292)) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunused-function") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif + +#if defined(JSON_HEDLEY_DEPRECATED) + #undef JSON_HEDLEY_DEPRECATED +#endif +#if defined(JSON_HEDLEY_DEPRECATED_FOR) + #undef JSON_HEDLEY_DEPRECATED_FOR +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) +#elif \ + (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement))) +#elif defined(__cplusplus) && (__cplusplus >= 201402L) + #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") +#else + #define JSON_HEDLEY_DEPRECATED(since) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) +#endif + +#if defined(JSON_HEDLEY_UNAVAILABLE) + #undef JSON_HEDLEY_UNAVAILABLE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) +#else + #define JSON_HEDLEY_UNAVAILABLE(available_since) +#endif + +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT +#endif +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) +#elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) +#elif defined(_Check_return_) /* SAL */ + #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_ +#else + #define JSON_HEDLEY_WARN_UNUSED_RESULT + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) +#endif + +#if defined(JSON_HEDLEY_SENTINEL) + #undef JSON_HEDLEY_SENTINEL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) +#else + #define JSON_HEDLEY_SENTINEL(position) +#endif + +#if defined(JSON_HEDLEY_NO_RETURN) + #undef JSON_HEDLEY_NO_RETURN +#endif +#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NO_RETURN __noreturn +#elif \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L + #define JSON_HEDLEY_NO_RETURN _Noreturn +#elif defined(__cplusplus) && (__cplusplus >= 201103L) + #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#else + #define JSON_HEDLEY_NO_RETURN +#endif + +#if defined(JSON_HEDLEY_NO_ESCAPE) + #undef JSON_HEDLEY_NO_ESCAPE +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) + #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) +#else + #define JSON_HEDLEY_NO_ESCAPE +#endif + +#if defined(JSON_HEDLEY_UNREACHABLE) + #undef JSON_HEDLEY_UNREACHABLE +#endif +#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) + #undef JSON_HEDLEY_UNREACHABLE_RETURN +#endif +#if defined(JSON_HEDLEY_ASSUME) + #undef JSON_HEDLEY_ASSUME +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_ASSUME(expr) __assume(expr) +#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) + #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) +#elif \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #if defined(__cplusplus) + #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) + #else + #define JSON_HEDLEY_ASSUME(expr) _nassert(expr) + #endif +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() +#elif defined(JSON_HEDLEY_ASSUME) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif +#if !defined(JSON_HEDLEY_ASSUME) + #if defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1))) + #else + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr) + #endif +#endif +#if defined(JSON_HEDLEY_UNREACHABLE) + #if \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value)) + #else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() + #endif +#else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value) +#endif +#if !defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif + +JSON_HEDLEY_DIAGNOSTIC_PUSH +#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") + #pragma clang diagnostic ignored "-Wpedantic" +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) + #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif +#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0) + #if defined(__clang__) + #pragma clang diagnostic ignored "-Wvariadic-macros" + #elif defined(JSON_HEDLEY_GCC_VERSION) + #pragma GCC diagnostic ignored "-Wvariadic-macros" + #endif +#endif +#if defined(JSON_HEDLEY_NON_NULL) + #undef JSON_HEDLEY_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) +#else + #define JSON_HEDLEY_NON_NULL(...) +#endif +JSON_HEDLEY_DIAGNOSTIC_POP + +#if defined(JSON_HEDLEY_PRINTF_FORMAT) + #undef JSON_HEDLEY_PRINTF_FORMAT +#endif +#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check))) +#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(format) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check))) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) +#else + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) +#endif + +#if defined(JSON_HEDLEY_CONSTEXPR) + #undef JSON_HEDLEY_CONSTEXPR +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) + #endif +#endif +#if !defined(JSON_HEDLEY_CONSTEXPR) + #define JSON_HEDLEY_CONSTEXPR +#endif + +#if defined(JSON_HEDLEY_PREDICT) + #undef JSON_HEDLEY_PREDICT +#endif +#if defined(JSON_HEDLEY_LIKELY) + #undef JSON_HEDLEY_LIKELY +#endif +#if defined(JSON_HEDLEY_UNLIKELY) + #undef JSON_HEDLEY_UNLIKELY +#endif +#if defined(JSON_HEDLEY_UNPREDICTABLE) + #undef JSON_HEDLEY_UNPREDICTABLE +#endif +#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) + #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr)) +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) && !defined(JSON_HEDLEY_PGI_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1 , (probability)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0 , (probability)) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1 ) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0 ) +#elif \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PREDICT(expr, expected, probability) \ + (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ + })) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ + })) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) +#else +# define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_LIKELY(expr) (!!(expr)) +# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) +#endif +#if !defined(JSON_HEDLEY_UNPREDICTABLE) + #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) +#endif + +#if defined(JSON_HEDLEY_MALLOC) + #undef JSON_HEDLEY_MALLOC +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_MALLOC __declspec(restrict) +#else + #define JSON_HEDLEY_MALLOC +#endif + +#if defined(JSON_HEDLEY_PURE) + #undef JSON_HEDLEY_PURE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PURE __attribute__((__pure__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +# define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \ + ) +# define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") +#else +# define JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_CONST) + #undef JSON_HEDLEY_CONST +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(const) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_CONST __attribute__((__const__)) +#elif \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_CONST _Pragma("no_side_effect") +#else + #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_RESTRICT) + #undef JSON_HEDLEY_RESTRICT +#endif +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT restrict +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + defined(__clang__) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_RESTRICT __restrict +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT _Restrict +#else + #define JSON_HEDLEY_RESTRICT +#endif + +#if defined(JSON_HEDLEY_INLINE) + #undef JSON_HEDLEY_INLINE +#endif +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + (defined(__cplusplus) && (__cplusplus >= 199711L)) + #define JSON_HEDLEY_INLINE inline +#elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0) + #define JSON_HEDLEY_INLINE __inline__ +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_INLINE __inline +#else + #define JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_ALWAYS_INLINE) + #undef JSON_HEDLEY_ALWAYS_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) +# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_ALWAYS_INLINE __forceinline +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \ + ) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") +#else +# define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_NEVER_INLINE) + #undef JSON_HEDLEY_NEVER_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#else + #define JSON_HEDLEY_NEVER_INLINE +#endif + +#if defined(JSON_HEDLEY_PRIVATE) + #undef JSON_HEDLEY_PRIVATE +#endif +#if defined(JSON_HEDLEY_PUBLIC) + #undef JSON_HEDLEY_PUBLIC +#endif +#if defined(JSON_HEDLEY_IMPORT) + #undef JSON_HEDLEY_IMPORT +#endif +#if defined(_WIN32) || defined(__CYGWIN__) +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC __declspec(dllexport) +# define JSON_HEDLEY_IMPORT __declspec(dllimport) +#else +# if \ + JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + ( \ + defined(__TI_EABI__) && \ + ( \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \ + ) \ + ) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) +# define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) +# else +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC +# endif +# define JSON_HEDLEY_IMPORT extern +#endif + +#if defined(JSON_HEDLEY_NO_THROW) + #undef JSON_HEDLEY_NO_THROW +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NO_THROW __declspec(nothrow) +#else + #define JSON_HEDLEY_NO_THROW +#endif + +#if defined(JSON_HEDLEY_FALL_THROUGH) + #undef JSON_HEDLEY_FALL_THROUGH +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) +#elif defined(__fallthrough) /* SAL */ + #define JSON_HEDLEY_FALL_THROUGH __fallthrough +#else + #define JSON_HEDLEY_FALL_THROUGH +#endif + +#if defined(JSON_HEDLEY_RETURNS_NON_NULL) + #undef JSON_HEDLEY_RETURNS_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) +#elif defined(_Ret_notnull_) /* SAL */ + #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ +#else + #define JSON_HEDLEY_RETURNS_NON_NULL +#endif + +#if defined(JSON_HEDLEY_ARRAY_PARAM) + #undef JSON_HEDLEY_ARRAY_PARAM +#endif +#if \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ + !defined(__STDC_NO_VLA__) && \ + !defined(__cplusplus) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_ARRAY_PARAM(name) (name) +#else + #define JSON_HEDLEY_ARRAY_PARAM(name) +#endif + +#if defined(JSON_HEDLEY_IS_CONSTANT) + #undef JSON_HEDLEY_IS_CONSTANT +#endif +#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) + #undef JSON_HEDLEY_REQUIRE_CONSTEXPR +#endif +/* JSON_HEDLEY_IS_CONSTEXPR_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #undef JSON_HEDLEY_IS_CONSTEXPR_ +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) +#endif +#if !defined(__cplusplus) +# if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*) +#endif +# elif \ + ( \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ + !defined(JSON_HEDLEY_SUNPRO_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION)) || \ + (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0) +#endif +# elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + defined(JSON_HEDLEY_INTEL_VERSION) || \ + defined(JSON_HEDLEY_TINYC_VERSION) || \ + defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \ + defined(JSON_HEDLEY_TI_CL2000_VERSION) || \ + defined(JSON_HEDLEY_TI_CL6X_VERSION) || \ + defined(JSON_HEDLEY_TI_CL7X_VERSION) || \ + defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \ + defined(__clang__) +# define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \ + sizeof(void) != \ + sizeof(*( \ + 1 ? \ + ((void*) ((expr) * 0L) ) : \ +((struct { char v[sizeof(void) * 2]; } *) 1) \ + ) \ + ) \ + ) +# endif +#endif +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) +#else + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) (0) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) +#endif + +#if defined(JSON_HEDLEY_BEGIN_C_DECLS) + #undef JSON_HEDLEY_BEGIN_C_DECLS +#endif +#if defined(JSON_HEDLEY_END_C_DECLS) + #undef JSON_HEDLEY_END_C_DECLS +#endif +#if defined(JSON_HEDLEY_C_DECL) + #undef JSON_HEDLEY_C_DECL +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { + #define JSON_HEDLEY_END_C_DECLS } + #define JSON_HEDLEY_C_DECL extern "C" +#else + #define JSON_HEDLEY_BEGIN_C_DECLS + #define JSON_HEDLEY_END_C_DECLS + #define JSON_HEDLEY_C_DECL +#endif + +#if defined(JSON_HEDLEY_STATIC_ASSERT) + #undef JSON_HEDLEY_STATIC_ASSERT +#endif +#if \ + !defined(__cplusplus) && ( \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ + (JSON_HEDLEY_HAS_FEATURE(c_static_assert) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + defined(_Static_assert) \ + ) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) +#elif \ + (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) +#else +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) +#endif + +#if defined(JSON_HEDLEY_NULL) + #undef JSON_HEDLEY_NULL +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) + #elif defined(NULL) + #define JSON_HEDLEY_NULL NULL + #else + #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) + #endif +#elif defined(NULL) + #define JSON_HEDLEY_NULL NULL +#else + #define JSON_HEDLEY_NULL ((void*) 0) +#endif + +#if defined(JSON_HEDLEY_MESSAGE) + #undef JSON_HEDLEY_MESSAGE +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_MESSAGE(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(message msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) +#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_WARNING) + #undef JSON_HEDLEY_WARNING +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_WARNING(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(clang warning msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_REQUIRE) + #undef JSON_HEDLEY_REQUIRE +#endif +#if defined(JSON_HEDLEY_REQUIRE_MSG) + #undef JSON_HEDLEY_REQUIRE_MSG +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) +# if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") +# define JSON_HEDLEY_REQUIRE(expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), #expr, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), msg, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error"))) +# endif +#else +# define JSON_HEDLEY_REQUIRE(expr) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) +#endif + +#if defined(JSON_HEDLEY_FLAGS) + #undef JSON_HEDLEY_FLAGS +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) && (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion")) + #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) +#else + #define JSON_HEDLEY_FLAGS +#endif + +#if defined(JSON_HEDLEY_FLAGS_CAST) + #undef JSON_HEDLEY_FLAGS_CAST +#endif +#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0) +# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("warning(disable:188)") \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) +#endif + +#if defined(JSON_HEDLEY_EMPTY_BASES) + #undef JSON_HEDLEY_EMPTY_BASES +#endif +#if \ + (JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0)) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) +#else + #define JSON_HEDLEY_EMPTY_BASES +#endif + +/* Remaining macros are deprecated. */ + +#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK +#endif +#if defined(__clang__) + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0) +#else + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) + #undef JSON_HEDLEY_CLANG_HAS_BUILTIN +#endif +#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) + +#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) + #undef JSON_HEDLEY_CLANG_HAS_FEATURE +#endif +#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) + +#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) + #undef JSON_HEDLEY_CLANG_HAS_EXTENSION +#endif +#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) + +#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) + #undef JSON_HEDLEY_CLANG_HAS_WARNING +#endif +#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) + +#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ + + +// This file contains all internal macro definitions (except those affecting ABI) +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// #include + + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// C++ language standard detection +// if the user manually specified the used C++ version, this is skipped +#if !defined(JSON_HAS_CPP_26) && !defined(JSON_HAS_CPP_23) && !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) + #if (defined(__cplusplus) && __cplusplus > 202302L) || (defined(_MSVC_LANG) && _MSVC_LANG > 202302L) + #define JSON_HAS_CPP_26 + #define JSON_HAS_CPP_23 + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L) + #define JSON_HAS_CPP_23 + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG > 201703L) + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201402L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201103L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 + #endif + // the cpp 11 flag is always specified because it is the minimal required version + #define JSON_HAS_CPP_11 +#endif + +#ifdef __has_include + #if __has_include() + #include + #endif +#endif + +#if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM) + #ifdef JSON_HAS_CPP_17 + #if defined(__cpp_lib_filesystem) + #define JSON_HAS_FILESYSTEM 1 + #elif defined(__cpp_lib_experimental_filesystem) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif !defined(__has_include) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #endif + + // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ + #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before GCC 8: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before Clang 7: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__clang_major__) && __clang_major__ < 7 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support + #if defined(_MSC_VER) && _MSC_VER < 1914 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before iOS 13 + #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before macOS Catalina + #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + #endif +#endif + +#ifndef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_FILESYSTEM + #define JSON_HAS_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_THREE_WAY_COMPARISON + #if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L \ + && defined(__cpp_lib_three_way_comparison) && __cpp_lib_three_way_comparison >= 201907L + #define JSON_HAS_THREE_WAY_COMPARISON 1 + #else + #define JSON_HAS_THREE_WAY_COMPARISON 0 + #endif +#endif + +#ifndef JSON_HAS_RANGES + // ranges header shipping in GCC 11.1.0 (released 2021-04-27) has a syntax error + #if defined(__GLIBCXX__) && __GLIBCXX__ == 20210427 + #define JSON_HAS_RANGES 0 + #elif defined(__cpp_lib_ranges) + #define JSON_HAS_RANGES 1 + #else + #define JSON_HAS_RANGES 0 + #endif +#endif + +#ifndef JSON_HAS_STATIC_RTTI + #if !defined(_HAS_STATIC_RTTI) || _HAS_STATIC_RTTI != 0 + #define JSON_HAS_STATIC_RTTI 1 + #else + #define JSON_HAS_STATIC_RTTI 0 + #endif +#endif + +#ifdef JSON_HAS_CPP_17 + #define JSON_INLINE_VARIABLE inline +#else + #define JSON_INLINE_VARIABLE +#endif + +#if JSON_HEDLEY_HAS_ATTRIBUTE(no_unique_address) + #define JSON_NO_UNIQUE_ADDRESS [[no_unique_address]] +#else + #define JSON_NO_UNIQUE_ADDRESS +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdocumentation" + #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" +#endif + +// allow disabling exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #include + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// allow overriding assert +#if !defined(JSON_ASSERT) + #include // assert + #define JSON_ASSERT(x) assert(x) +#endif + +// allow accessing some private functions (needed by the test suite) +#if defined(JSON_TESTS_PRIVATE) + #define JSON_PRIVATE_UNLESS_TESTED public +#else + #define JSON_PRIVATE_UNLESS_TESTED private +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + /* NOLINTNEXTLINE(modernize-type-traits) we use C++11 */ \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + /* NOLINTNEXTLINE(modernize-avoid-c-arrays) we don't want to depend on */ \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + /* NOLINTNEXTLINE(modernize-type-traits) we use C++11 */ \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + /* NOLINTNEXTLINE(modernize-avoid-c-arrays) we don't want to depend on */ \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [&j](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer, \ + class BinaryType, \ + class CustomBaseClass> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + +// Macros to simplify conversion from/to types + +#define NLOHMANN_JSON_EXPAND( x ) x +#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME +#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \ + NLOHMANN_JSON_PASTE64, \ + NLOHMANN_JSON_PASTE63, \ + NLOHMANN_JSON_PASTE62, \ + NLOHMANN_JSON_PASTE61, \ + NLOHMANN_JSON_PASTE60, \ + NLOHMANN_JSON_PASTE59, \ + NLOHMANN_JSON_PASTE58, \ + NLOHMANN_JSON_PASTE57, \ + NLOHMANN_JSON_PASTE56, \ + NLOHMANN_JSON_PASTE55, \ + NLOHMANN_JSON_PASTE54, \ + NLOHMANN_JSON_PASTE53, \ + NLOHMANN_JSON_PASTE52, \ + NLOHMANN_JSON_PASTE51, \ + NLOHMANN_JSON_PASTE50, \ + NLOHMANN_JSON_PASTE49, \ + NLOHMANN_JSON_PASTE48, \ + NLOHMANN_JSON_PASTE47, \ + NLOHMANN_JSON_PASTE46, \ + NLOHMANN_JSON_PASTE45, \ + NLOHMANN_JSON_PASTE44, \ + NLOHMANN_JSON_PASTE43, \ + NLOHMANN_JSON_PASTE42, \ + NLOHMANN_JSON_PASTE41, \ + NLOHMANN_JSON_PASTE40, \ + NLOHMANN_JSON_PASTE39, \ + NLOHMANN_JSON_PASTE38, \ + NLOHMANN_JSON_PASTE37, \ + NLOHMANN_JSON_PASTE36, \ + NLOHMANN_JSON_PASTE35, \ + NLOHMANN_JSON_PASTE34, \ + NLOHMANN_JSON_PASTE33, \ + NLOHMANN_JSON_PASTE32, \ + NLOHMANN_JSON_PASTE31, \ + NLOHMANN_JSON_PASTE30, \ + NLOHMANN_JSON_PASTE29, \ + NLOHMANN_JSON_PASTE28, \ + NLOHMANN_JSON_PASTE27, \ + NLOHMANN_JSON_PASTE26, \ + NLOHMANN_JSON_PASTE25, \ + NLOHMANN_JSON_PASTE24, \ + NLOHMANN_JSON_PASTE23, \ + NLOHMANN_JSON_PASTE22, \ + NLOHMANN_JSON_PASTE21, \ + NLOHMANN_JSON_PASTE20, \ + NLOHMANN_JSON_PASTE19, \ + NLOHMANN_JSON_PASTE18, \ + NLOHMANN_JSON_PASTE17, \ + NLOHMANN_JSON_PASTE16, \ + NLOHMANN_JSON_PASTE15, \ + NLOHMANN_JSON_PASTE14, \ + NLOHMANN_JSON_PASTE13, \ + NLOHMANN_JSON_PASTE12, \ + NLOHMANN_JSON_PASTE11, \ + NLOHMANN_JSON_PASTE10, \ + NLOHMANN_JSON_PASTE9, \ + NLOHMANN_JSON_PASTE8, \ + NLOHMANN_JSON_PASTE7, \ + NLOHMANN_JSON_PASTE6, \ + NLOHMANN_JSON_PASTE5, \ + NLOHMANN_JSON_PASTE4, \ + NLOHMANN_JSON_PASTE3, \ + NLOHMANN_JSON_PASTE2, \ + NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) +#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) +#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) +#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) +#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) +#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) +#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) +#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) +#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) +#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) +#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) +#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) +#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) +#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) +#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) +#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) +#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) +#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) +#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) +#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) +#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) +#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) +#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) +#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) +#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) +#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) +#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) +#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) +#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) +#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) +#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) +#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) +#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) +#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) +#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) +#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) +#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) +#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) +#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) +#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) +#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) +#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) +#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) +#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) +#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) +#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) +#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) +#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) +#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) +#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) +#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) +#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) +#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) +#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) +#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) +#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) +#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) +#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) +#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) +#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) +#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) +#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) +#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) +#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) + +#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; +#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); +#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = !nlohmann_json_j.is_null() ? nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1) : nlohmann_json_default_obj.v1; + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE +@since version 3.9.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT +@since version 3.11.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE +@since version 3.11.3 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE +@since version 3.9.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT +@since version 3.11.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE +@since version 3.11.3 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +// inspired from https://stackoverflow.com/a/26745591 +// allows calling any std function as if (e.g., with begin): +// using std::begin; begin(x); +// +// it allows using the detected idiom to retrieve the return type +// of such an expression +#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name) \ + namespace detail { \ + using std::std_name; \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + } \ + \ + namespace detail2 { \ + struct std_name##_tag \ + { \ + }; \ + \ + template \ + std_name##_tag std_name(T&&...); \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + \ + template \ + struct would_call_std_##std_name \ + { \ + static constexpr auto const value = ::nlohmann::detail:: \ + is_detected_exact::value; \ + }; \ + } /* namespace detail2 */ \ + \ + template \ + struct would_call_std_##std_name : detail2::would_call_std_##std_name \ + { \ + } + +#ifndef JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_USE_IMPLICIT_CONVERSIONS 1 +#endif + +#if JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_EXPLICIT +#else + #define JSON_EXPLICIT explicit +#endif + +#ifndef JSON_DISABLE_ENUM_SERIALIZATION + #define JSON_DISABLE_ENUM_SERIALIZATION 0 +#endif + +#ifndef JSON_USE_GLOBAL_UDLS + #define JSON_USE_GLOBAL_UDLS 1 +#endif + +#if JSON_HAS_THREE_WAY_COMPARISON + #include // partial_ordering +#endif + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : std::uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + binary, ///< binary array (ordered collection of bytes) + discarded ///< discarded by the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string < binary +- furthermore, each type is not smaller than itself +- discarded values are not comparable +- binary is represented as a b"" string in python and directly comparable to a + string; however, making a binary array directly comparable with a string would + be surprising behavior in a JSON file. + +@since version 1.0.0 +*/ +#if JSON_HAS_THREE_WAY_COMPARISON + inline std::partial_ordering operator<=>(const value_t lhs, const value_t rhs) noexcept // *NOPAD* +#else + inline bool operator<(const value_t lhs, const value_t rhs) noexcept +#endif +{ + static constexpr std::array order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */, + 6 /* binary */ + } + }; + + const auto l_index = static_cast(lhs); + const auto r_index = static_cast(rhs); +#if JSON_HAS_THREE_WAY_COMPARISON + if (l_index < order.size() && r_index < order.size()) + { + return order[l_index] <=> order[r_index]; // *NOPAD* + } + return std::partial_ordering::unordered; +#else + return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; +#endif +} + +// GCC selects the built-in operator< over an operator rewritten from +// a user-defined spaceship operator +// Clang, MSVC, and ICC select the rewritten candidate +// (see GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105200) +#if JSON_HAS_THREE_WAY_COMPARISON && defined(__GNUC__) +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + return std::is_lt(lhs <=> rhs); // *NOPAD* +} +#endif + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief replace all occurrences of a substring by another string + +@param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t +@param[in] f the substring to replace with @a t +@param[in] t the string to replace @a f + +@pre The search string @a f must not be empty. **This precondition is +enforced with an assertion.** + +@since version 2.0.0 +*/ +template +inline void replace_substring(StringType& s, const StringType& f, + const StringType& t) +{ + JSON_ASSERT(!f.empty()); + for (auto pos = s.find(f); // find the first occurrence of f + pos != StringType::npos; // make sure f was found + s.replace(pos, f.size(), t), // replace with t, and + pos = s.find(f, pos + t.size())) // find the next occurrence of f + {} +} + +/*! + * @brief string escaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to escape + * @return escaped string + * + * Note the order of escaping "~" to "~0" and "/" to "~1" is important. + */ +template +inline StringType escape(StringType s) +{ + replace_substring(s, StringType{"~"}, StringType{"~0"}); + replace_substring(s, StringType{"/"}, StringType{"~1"}); + return s; +} + +/*! + * @brief string unescaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to unescape + * @return unescaped string + * + * Note the order of escaping "~1" to "/" and "~0" to "~" is important. + */ +template +inline void unescape(StringType& s) +{ + replace_substring(s, StringType{"~1"}, StringType{"/"}); + replace_substring(s, StringType{"~0"}, StringType{"~"}); +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // size_t + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-FileCopyrightText: 2018 The Abseil Authors +// SPDX-License-Identifier: MIT + + + +#include // array +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type +#include // index_sequence, make_index_sequence, index_sequence_for + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +using uncvref_t = typename std::remove_cv::type>::type; + +#ifdef JSON_HAS_CPP_14 + +// the following utilities are natively available in C++14 +using std::enable_if_t; +using std::index_sequence; +using std::make_index_sequence; +using std::index_sequence_for; + +#else + +// alias templates to reduce boilerplate +template +using enable_if_t = typename std::enable_if::type; + +// The following code is taken from https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h +// which is part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0. + +//// START OF CODE FROM GOOGLE ABSEIL + +// integer_sequence +// +// Class template representing a compile-time integer sequence. An instantiation +// of `integer_sequence` has a sequence of integers encoded in its +// type through its template arguments (which is a common need when +// working with C++11 variadic templates). `absl::integer_sequence` is designed +// to be a drop-in replacement for C++14's `std::integer_sequence`. +// +// Example: +// +// template< class T, T... Ints > +// void user_function(integer_sequence); +// +// int main() +// { +// // user_function's `T` will be deduced to `int` and `Ints...` +// // will be deduced to `0, 1, 2, 3, 4`. +// user_function(make_integer_sequence()); +// } +template +struct integer_sequence +{ + using value_type = T; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +// index_sequence +// +// A helper template for an `integer_sequence` of `size_t`, +// `absl::index_sequence` is designed to be a drop-in replacement for C++14's +// `std::index_sequence`. +template +using index_sequence = integer_sequence; + +namespace utility_internal +{ + +template +struct Extend; + +// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency. +template +struct Extend, SeqSize, 0> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)... >; +}; + +template +struct Extend, SeqSize, 1> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)..., 2 * SeqSize >; +}; + +// Recursion helper for 'make_integer_sequence'. +// 'Gen::type' is an alias for 'integer_sequence'. +template +struct Gen +{ + using type = + typename Extend < typename Gen < T, N / 2 >::type, N / 2, N % 2 >::type; +}; + +template +struct Gen +{ + using type = integer_sequence; +}; + +} // namespace utility_internal + +// Compile-time sequences of integers + +// make_integer_sequence +// +// This template alias is equivalent to +// `integer_sequence`, and is designed to be a drop-in +// replacement for C++14's `std::make_integer_sequence`. +template +using make_integer_sequence = typename utility_internal::Gen::type; + +// make_index_sequence +// +// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`, +// and is designed to be a drop-in replacement for C++14's +// `std::make_index_sequence`. +template +using make_index_sequence = make_integer_sequence; + +// index_sequence_for +// +// Converts a typename pack into an index sequence of the same length, and +// is designed to be a drop-in replacement for C++14's +// `std::index_sequence_for()` +template +using index_sequence_for = make_index_sequence; + +//// END OF CODE FROM GOOGLE ABSEIL + +#endif + +// dispatch utility (taken from ranges-v3) +template struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template +struct static_const +{ + static JSON_INLINE_VARIABLE constexpr T value{}; +}; + +#ifndef JSON_HAS_CPP_17 + template + constexpr T static_const::value; +#endif + +template +constexpr std::array make_array(Args&& ... args) +{ + return std::array {{static_cast(std::forward(args))...}}; +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // numeric_limits +#include // char_traits +#include // tuple +#include // false_type, is_constructible, is_integral, is_same, true_type +#include // declval +#if defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L + #include // byte +#endif +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // random_access_iterator_tag + +// #include + +// #include + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +struct iterator_types {}; + +template +struct iterator_types < + It, + void_t> +{ + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; +}; + +// This is required as some compilers implement std::iterator_traits in a way that +// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. +template +struct iterator_traits +{ +}; + +template +struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> + : iterator_types +{ +}; + +template +struct iterator_traits::value>> +{ + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); + +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); + +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + +#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ + #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + #include // int64_t, uint64_t + #include // map + #include // allocator + #include // string + #include // vector + + // #include + + + /*! + @brief namespace for Niels Lohmann + @see https://github.com/nlohmann + @since version 1.0.0 + */ + NLOHMANN_JSON_NAMESPACE_BEGIN + + /*! + @brief default JSONSerializer template argument + + This serializer ignores the template arguments and uses ADL + ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) + for serialization. + */ + template + struct adl_serializer; + + /// a class to store JSON values + /// @sa https://json.nlohmann.me/api/basic_json/ + template class ObjectType = + std::map, + template class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template class AllocatorType = std::allocator, + template class JSONSerializer = + adl_serializer, + class BinaryType = std::vector, // cppcheck-suppress syntaxError + class CustomBaseClass = void> + class basic_json; + + /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document + /// @sa https://json.nlohmann.me/api/json_pointer/ + template + class json_pointer; + + /*! + @brief default specialization + @sa https://json.nlohmann.me/api/json/ + */ + using json = basic_json<>; + + /// @brief a minimal map-like container that preserves insertion order + /// @sa https://json.nlohmann.me/api/ordered_map/ + template + struct ordered_map; + + /// @brief specialization that maintains the insertion order of object keys + /// @sa https://json.nlohmann.me/api/ordered_json/ + using ordered_json = basic_json; + + NLOHMANN_JSON_NAMESPACE_END + +#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + +NLOHMANN_JSON_NAMESPACE_BEGIN +/*! +@brief detail namespace with internal helper functions + +This namespace collects functions that should not be exposed, +implementations of some @ref basic_json methods, and meta-programming helpers. + +@since version 2.1.0 +*/ +namespace detail +{ + +///////////// +// helpers // +///////////// + +// Note to maintainers: +// +// Every trait in this file expects a non-CV-qualified type. +// The only exceptions are in the 'aliases for detected' section +// (i.e., those of the form: decltype(T::member_function(std::declval()))) +// +// In this case, T has to be properly CV-qualified to constraint the function arguments +// (e.g., to_json(BasicJsonType&, const T&)) + +template struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json : std::true_type {}; + +// used by exceptions create() member functions +// true_type for the pointer to possibly cv-qualified basic_json or std::nullptr_t +// false_type otherwise +template +struct is_basic_json_context : + std::integral_constant < bool, + is_basic_json::type>::type>::value + || std::is_same::value > +{}; + +////////////////////// +// json_ref helpers // +////////////////////// + +template +class json_ref; + +template +struct is_json_ref : std::false_type {}; + +template +struct is_json_ref> : std::true_type {}; + +////////////////////////// +// aliases for detected // +////////////////////////// + +template +using mapped_type_t = typename T::mapped_type; + +template +using key_type_t = typename T::key_type; + +template +using value_type_t = typename T::value_type; + +template +using difference_type_t = typename T::difference_type; + +template +using pointer_t = typename T::pointer; + +template +using reference_t = typename T::reference; + +template +using iterator_category_t = typename T::iterator_category; + +template +using to_json_function = decltype(T::to_json(std::declval()...)); + +template +using from_json_function = decltype(T::from_json(std::declval()...)); + +template +using get_template_function = decltype(std::declval().template get()); + +// trait checking if JSONSerializer::from_json(json const&, udt&) exists +template +struct has_from_json : std::false_type {}; + +// trait checking if j.get is valid +// use this trait instead of std::is_constructible or std::is_convertible, +// both rely on, or make use of implicit conversions, and thus fail when T +// has several constructors/operator= (see https://github.com/nlohmann/json/issues/958) +template +struct is_getable +{ + static constexpr bool value = is_detected::value; +}; + +template +struct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if JSONSerializer::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template +struct has_non_default_from_json : std::false_type {}; + +template +struct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if BasicJsonType::json_serializer::to_json exists +// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion. +template +struct has_to_json : std::false_type {}; + +template +struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +template +using detect_key_compare = typename T::key_compare; + +template +struct has_key_compare : std::integral_constant::value> {}; + +// obtains the actual object key comparator +template +struct actual_object_comparator +{ + using object_t = typename BasicJsonType::object_t; + using object_comparator_t = typename BasicJsonType::default_object_comparator_t; + using type = typename std::conditional < has_key_compare::value, + typename object_t::key_compare, object_comparator_t>::type; +}; + +template +using actual_object_comparator_t = typename actual_object_comparator::type; + +///////////////// +// char_traits // +///////////////// + +// Primary template of char_traits calls std char_traits +template +struct char_traits : std::char_traits +{}; + +// Explicitly define char traits for unsigned char since it is not standard +template<> +struct char_traits : std::char_traits +{ + using char_type = unsigned char; + using int_type = uint64_t; + + // Redefine to_int_type function + static int_type to_int_type(char_type c) noexcept + { + return static_cast(c); + } + + static char_type to_char_type(int_type i) noexcept + { + return static_cast(i); + } + + static constexpr int_type eof() noexcept + { + return static_cast(std::char_traits::eof()); + } +}; + +// Explicitly define char traits for signed char since it is not standard +template<> +struct char_traits : std::char_traits +{ + using char_type = signed char; + using int_type = uint64_t; + + // Redefine to_int_type function + static int_type to_int_type(char_type c) noexcept + { + return static_cast(c); + } + + static char_type to_char_type(int_type i) noexcept + { + return static_cast(i); + } + + static constexpr int_type eof() noexcept + { + return static_cast(std::char_traits::eof()); + } +}; + +#if defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L +template<> +struct char_traits : std::char_traits +{ + using char_type = std::byte; + using int_type = uint64_t; + + static int_type to_int_type(char_type c) noexcept + { + return static_cast(std::to_integer(c)); + } + + static char_type to_char_type(int_type i) noexcept + { + return std::byte(static_cast(i)); + } + + static constexpr int_type eof() noexcept + { + return static_cast(std::char_traits::eof()); + } +}; +#endif + +/////////////////// +// is_ functions // +/////////////////// + +// https://en.cppreference.com/w/cpp/types/conjunction +template struct conjunction : std::true_type { }; +template struct conjunction : B { }; +template +struct conjunction +: std::conditional(B::value), conjunction, B>::type {}; + +// https://en.cppreference.com/w/cpp/types/negation +template struct negation : std::integral_constant < bool, !B::value > { }; + +// Reimplementation of is_constructible and is_default_constructible, due to them being broken for +// std::pair and std::tuple until LWG 2367 fix (see https://cplusplus.github.io/LWG/lwg-defects.html#2367). +// This causes compile errors in e.g., Clang 3.5 or GCC 4.9. +template +struct is_default_constructible : std::is_default_constructible {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + +template +struct is_constructible : std::is_constructible {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_iterator_traits : std::false_type {}; + +template +struct is_iterator_traits> +{ + private: + using traits = iterator_traits; + + public: + static constexpr auto value = + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value; +}; + +template +struct is_range +{ + private: + using t_ref = typename std::add_lvalue_reference::type; + + using iterator = detected_t; + using sentinel = detected_t; + + // to be 100% correct, it should use https://en.cppreference.com/w/cpp/iterator/input_or_output_iterator + // and https://en.cppreference.com/w/cpp/iterator/sentinel_for + // but reimplementing these would be too much work, as a lot of other concepts are used underneath + static constexpr auto is_iterator_begin = + is_iterator_traits>::value; + + public: + static constexpr bool value = !std::is_same::value && !std::is_same::value && is_iterator_begin; +}; + +template +using iterator_t = enable_if_t::value, result_of_begin())>>; + +template +using range_value_t = value_type_t>>; + +// The following implementation of is_complete_type is taken from +// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/ +// and is written by Xiang Fan who agreed to use it in this library. + +template +struct is_complete_type : std::false_type {}; + +template +struct is_complete_type : std::true_type {}; + +template +struct is_compatible_object_type_impl : std::false_type {}; + +template +struct is_compatible_object_type_impl < + BasicJsonType, CompatibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + // macOS's is_constructible does not play well with nonesuch... + static constexpr bool value = + is_constructible::value && + is_constructible::value; +}; + +template +struct is_compatible_object_type + : is_compatible_object_type_impl {}; + +template +struct is_constructible_object_type_impl : std::false_type {}; + +template +struct is_constructible_object_type_impl < + BasicJsonType, ConstructibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + static constexpr bool value = + (is_default_constructible::value && + (std::is_move_assignable::value || + std::is_copy_assignable::value) && + (is_constructible::value && + std::is_same < + typename object_t::mapped_type, + typename ConstructibleObjectType::mapped_type >::value)) || + (has_from_json::value || + has_non_default_from_json < + BasicJsonType, + typename ConstructibleObjectType::mapped_type >::value); +}; + +template +struct is_constructible_object_type + : is_constructible_object_type_impl {}; + +template +struct is_compatible_string_type +{ + static constexpr auto value = + is_constructible::value; +}; + +template +struct is_constructible_string_type +{ + // launder type through decltype() to fix compilation failure on ICPC +#ifdef __INTEL_COMPILER + using laundered_type = decltype(std::declval()); +#else + using laundered_type = ConstructibleStringType; +#endif + + static constexpr auto value = + conjunction < + is_constructible, + is_detected_exact>::value; +}; + +template +struct is_compatible_array_type_impl : std::false_type {}; + +template +struct is_compatible_array_type_impl < + BasicJsonType, CompatibleArrayType, + enable_if_t < + is_detected::value&& + is_iterator_traits>>::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 + !std::is_same>::value >> +{ + static constexpr bool value = + is_constructible>::value; +}; + +template +struct is_compatible_array_type + : is_compatible_array_type_impl {}; + +template +struct is_constructible_array_type_impl : std::false_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t::value >> + : std::true_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t < !std::is_same::value&& + !is_compatible_string_type::value&& + is_default_constructible::value&& +(std::is_move_assignable::value || + std::is_copy_assignable::value)&& +is_detected::value&& +is_iterator_traits>>::value&& +is_detected::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 +!std::is_same>::value&& +is_complete_type < +detected_t>::value >> +{ + using value_type = range_value_t; + + static constexpr bool value = + std::is_same::value || + has_from_json::value || + has_non_default_from_json < + BasicJsonType, + value_type >::value; +}; + +template +struct is_constructible_array_type + : is_constructible_array_type_impl {}; + +template +struct is_compatible_integer_type_impl : std::false_type {}; + +template +struct is_compatible_integer_type_impl < + RealIntegerType, CompatibleNumberIntegerType, + enable_if_t < std::is_integral::value&& + std::is_integral::value&& + !std::is_same::value >> +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits; + using CompatibleLimits = std::numeric_limits; + + static constexpr auto value = + is_constructible::value && + CompatibleLimits::is_integer && + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template +struct is_compatible_integer_type + : is_compatible_integer_type_impl {}; + +template +struct is_compatible_type_impl: std::false_type {}; + +template +struct is_compatible_type_impl < + BasicJsonType, CompatibleType, + enable_if_t::value >> +{ + static constexpr bool value = + has_to_json::value; +}; + +template +struct is_compatible_type + : is_compatible_type_impl {}; + +template +struct is_constructible_tuple : std::false_type {}; + +template +struct is_constructible_tuple> : conjunction...> {}; + +template +struct is_json_iterator_of : std::false_type {}; + +template +struct is_json_iterator_of : std::true_type {}; + +template +struct is_json_iterator_of : std::true_type +{}; + +// checks if a given type T is a template specialization of Primary +template