From ee3a7018aba031f9fec8c968685ea1466b2274ff Mon Sep 17 00:00:00 2001 From: Prince Frizzy Date: Wed, 3 May 2023 03:54:25 -0400 Subject: [PATCH] Adds support for compiling other regions (#378) * Initial support for compiling with EU. * Fix EU text. * JP now compiles, TODO: Fix Autogen to fix JP and fix text in djui. * audio: Prevent crash in EU. * audio: Sync EU audio to 60 Hz instead of 50 Hz * Add logging and remove sanity check to hopefully track EU crash. * Various improvements for EU Improve some memory debugging Improve sound debugging Initalize some variables in load.c for the sound system Synchronize the EU cutscenes with the US version. * Fix credits music playing in EU, Document some EU audio code. * Autogen now supports version excluded object fields and functions. Reran autogen in accordance. * Fix some potentional shifting issues due to version differences. * Decrease the sleep times in some spots, We do not need them to be so long. (#373) * Add the region to the version string. --------- Co-authored-by: djoslin0 --- Makefile | 6 + autogen/autogen.sh | 2 +- autogen/convert_functions.py | 24 +- autogen/convert_structs.py | 20 +- bin/eu/translation_de.c | 3 + bin/eu/translation_en.c | 3 + bin/eu/translation_fr.c | 3 + bin/segment2.c | 8 +- data/behavior_table.c | 2 + data/dynos_bin_common.cpp | 6 +- data/dynos_level.cpp | 13 + data/dynos_mgr_builtin.cpp | 6 + data/dynos_mgr_builtin_tex.cpp | 1152 ++++++++++++------------ include/eu_translation.h | 29 +- levels/menu/script.c | 6 +- levels/scripts.c | 2 +- src/audio/data.c | 4 +- src/audio/data.h | 4 +- src/audio/external.c | 158 ++-- src/audio/external.h | 7 + src/audio/heap.c | 22 +- src/audio/load.c | 38 +- src/audio/playback.c | 20 +- src/audio/port_eu.c | 53 +- src/audio/unk_shindou_audio_file.c | 14 +- src/game/behaviors/camera_lakitu.inc.c | 4 +- src/game/camera.c | 49 +- src/game/ingame_menu.c | 38 +- src/game/level_info.c | 9 +- src/game/level_update.c | 2 +- src/game/mario_actions_cutscene.c | 30 +- src/game/memory.c | 16 +- src/game/sound_init.c | 1 + src/pc/lua/smlua_cobject_autogen.c | 4 + src/pc/lua/smlua_constants_autogen.c | 27 + src/pc/lua/smlua_functions_autogen.c | 12 + src/pc/lua/utils/smlua_audio_utils.c | 15 + src/pc/lua/utils/smlua_text_utils.c | 175 +++- src/pc/network/version.c | 6 +- src/pc/network/version.h | 14 +- src/pc/pc_main.c | 4 +- 41 files changed, 1197 insertions(+), 814 deletions(-) diff --git a/Makefile b/Makefile index ba7dcaa4..c47b8356 100644 --- a/Makefile +++ b/Makefile @@ -1307,6 +1307,12 @@ ifeq ($(VERSION),eu) $(BUILD_DIR)/levels/menu/leveldata.o: $(BUILD_DIR)/text/us/define_courses.inc.c $(BUILD_DIR)/levels/menu/leveldata.o: $(BUILD_DIR)/text/de/define_courses.inc.c $(BUILD_DIR)/levels/menu/leveldata.o: $(BUILD_DIR)/text/fr/define_courses.inc.c + $(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/include/text_strings.h + $(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/us/define_courses.inc.c + $(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/de/define_courses.inc.c + $(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/fr/define_courses.inc.c + + O_FILES += $(BUILD_DIR)/bin/eu/translation_en.o $(BUILD_DIR)/bin/eu/translation_de.o $(BUILD_DIR)/bin/eu/translation_fr.o else ifeq ($(VERSION),sh) TEXT_DIRS := text/jp diff --git a/autogen/autogen.sh b/autogen/autogen.sh index 0cae629f..ab67e26f 100755 --- a/autogen/autogen.sh +++ b/autogen/autogen.sh @@ -1,4 +1,4 @@ #!/usr/bin/bash python3 ./autogen/convert_structs.py python3 ./autogen/convert_functions.py -python3 ./autogen/convert_constants.py +python3 ./autogen/convert_constants.py \ No newline at end of file diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py index 8f90c70b..cbe31fe9 100644 --- a/autogen/convert_functions.py +++ b/autogen/convert_functions.py @@ -113,6 +113,12 @@ override_hide_functions = { "smlua_deprecated.h" : [ ".*" ], } +override_function_version_excludes = { + "bhv_play_music_track_when_touched_loop": "VERSION_JP", + "play_knockback_sound": "VERSION_JP", + "cur_obj_spawn_star_at_y_offset": "VERSION_JP" +} + lua_function_params = { "src/pc/lua/utils/smlua_obj_utils.h::spawn_object_sync::objSetupFunction": [ "struct Object*" ] } @@ -596,11 +602,14 @@ def build_call(function): def build_function(function, do_extern): s = '' fid = function['identifier'] + + if fid in override_function_version_excludes: + s += '#ifndef ' + override_function_version_excludes[fid] + '\n' if len(function['params']) <= 0: - s = 'int smlua_func_%s(UNUSED lua_State* L) {\n' % function['identifier'] + s += 'int smlua_func_%s(UNUSED lua_State* L) {\n' % function['identifier'] else: - s = 'int smlua_func_%s(lua_State* L) {\n' % function['identifier'] + s += 'int smlua_func_%s(lua_State* L) {\n' % function['identifier'] s += """ if (L == NULL) { return 0; }\n int top = lua_gettop(L); @@ -628,6 +637,9 @@ def build_function(function, do_extern): s += '\n' s += ' return 1;\n}\n' + + if fid in override_function_version_excludes: + s += '#endif\n' function['implemented'] = 'UNIMPLEMENTED' not in s if 'UNIMPLEMENTED' in s: @@ -648,9 +660,15 @@ def build_functions(processed_files): return s def build_bind(function): - s = 'smlua_bind_function(L, "%s", smlua_func_%s);' % (function['identifier'], function['identifier']) + fid = function['identifier'] + s = 'smlua_bind_function(L, "%s", smlua_func_%s);' % (fid, fid) if function['implemented']: s = ' ' + s + # There is no point in adding the ifndef statement if the function is commented out here anyways. + # So we only do it on implemented functions. + if fid in override_function_version_excludes: + s = '#ifndef ' + override_function_version_excludes[fid] + '\n' + s + s += '\n#endif' else: s = ' //' + s + ' <--- UNIMPLEMENTED' return s + "\n" diff --git a/autogen/convert_structs.py b/autogen/convert_structs.py index a7ae26d4..c190119f 100644 --- a/autogen/convert_structs.py +++ b/autogen/convert_structs.py @@ -98,6 +98,11 @@ override_field_immutable = { "SpawnInfo": [ "syncID" ] } +override_field_version_excludes = { + "oCameraLakituUnk104": "VERSION_JP", + "oCoinUnk1B0": "VERSION_JP" +} + override_allowed_structs = { "src/pc/network/network.h": [ 'ServerSettings' ], } @@ -157,6 +162,8 @@ def table_to_string(table): for row in table: for i in range(columns): + if '#' in row[i]: + continue if len(row[i]) > column_width[i]: column_width[i] = len(row[i]) @@ -268,15 +275,24 @@ def build_struct(struct): if sid in override_field_invisible: if fid in override_field_invisible[sid]: continue + + version = None row = [] - row.append(' { ' ) + + startStr = '' + endStr = ' },' + if fid in override_field_version_excludes: + 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(struct %s, %s), ' % (sid, field['identifier']) ) row.append('%s, ' % fimmutable ) row.append("%s" % lot ) - row.append(' },' ) + row.append(endStr ) field_table.append(row) field_table_str, field_count = table_to_string(field_table) diff --git a/bin/eu/translation_de.c b/bin/eu/translation_de.c index d7c1f597..ba232c0d 100644 --- a/bin/eu/translation_de.c +++ b/bin/eu/translation_de.c @@ -9,7 +9,10 @@ // Include text/define_text.inc.c, preprocessed with -I text/de/ to get the // right translation strings, with symbols renamed as below. #define seg2_course_name_table course_name_table_eu_de +#define seg2_course_name_table_original course_name_table_eu_de_original #define seg2_act_name_table act_name_table_eu_de +#define seg2_act_name_table_original act_name_table_eu_de_original #define seg2_dialog_table dialog_table_eu_de +#define seg2_dialog_original dialog_table_eu_de_original #include "text/de/define_text.inc.c" diff --git a/bin/eu/translation_en.c b/bin/eu/translation_en.c index 9817bc5a..208e1b9a 100644 --- a/bin/eu/translation_en.c +++ b/bin/eu/translation_en.c @@ -9,7 +9,10 @@ // Include text/define_text.inc.c, preprocessed with -I text/us/ to get the // right translation strings, with symbols renamed as below. #define seg2_course_name_table course_name_table_eu_en +#define seg2_course_name_table_original course_name_table_eu_en_original #define seg2_act_name_table act_name_table_eu_en +#define seg2_act_name_table_original act_name_table_eu_en_original #define seg2_dialog_table dialog_table_eu_en +#define seg2_dialog_original dialog_table_eu_en_original #include "text/us/define_text.inc.c" diff --git a/bin/eu/translation_fr.c b/bin/eu/translation_fr.c index 119839c9..e7217e28 100644 --- a/bin/eu/translation_fr.c +++ b/bin/eu/translation_fr.c @@ -9,7 +9,10 @@ // Include text/define_text.inc.c, preprocessed with -I text/fr/ to get the // right translation strings, with symbols renamed as below. #define seg2_course_name_table course_name_table_eu_fr +#define seg2_course_name_table_original course_name_table_eu_fr_original #define seg2_act_name_table act_name_table_eu_fr +#define seg2_act_name_table_original act_name_table_eu_fr_original #define seg2_dialog_table dialog_table_eu_fr +#define seg2_dialog_original dialog_table_eu_fr_original #include "text/fr/define_text.inc.c" diff --git a/bin/segment2.c b/bin/segment2.c index 6aace4c0..3d320610 100644 --- a/bin/segment2.c +++ b/bin/segment2.c @@ -86,14 +86,14 @@ ALIGNED8 const Texture texture_hud_char_I[] = { #include "textures/segment2/segment2.02400.rgba16.inc.c" }; -ALIGNED8 static const u8 texture_hud_char_J[] = { -#include "textures/segment2/custom_hud_j.rgba16.inc.c" -}; - #if defined(VERSION_JP) || defined(VERSION_SH) ALIGNED8 const Texture texture_hud_char_J[] = { #include "textures/segment2/segment2.02600.rgba16.inc.c" }; +#else +ALIGNED8 static const u8 texture_hud_char_J[] = { +#include "textures/segment2/custom_hud_j.rgba16.inc.c" +}; #endif ALIGNED8 const Texture texture_hud_char_K[] = { diff --git a/data/behavior_table.c b/data/behavior_table.c index c383ef58..2f8c3684 100644 --- a/data/behavior_table.c +++ b/data/behavior_table.c @@ -341,7 +341,9 @@ const struct BehaviorTableEntry gBehaviorTable[id_bhv_max_count] = { BHV_ENTRY(bhvPiranhaPlantWakingBubbles), BHV_ENTRY(bhvPitBowlingBall), BHV_ENTRY(bhvPlatformOnTrack), +#ifndef VERSION_JP BHV_ENTRY(bhvPlaysMusicTrackWhenTouched), +#endif BHV_ENTRY(bhvPlungeBubble), BHV_ENTRY(bhvPokey), BHV_ENTRY(bhvPokeyBodyPart), diff --git a/data/dynos_bin_common.cpp b/data/dynos_bin_common.cpp index 15b76a82..b8c13849 100644 --- a/data/dynos_bin_common.cpp +++ b/data/dynos_bin_common.cpp @@ -256,7 +256,6 @@ s64 DynOS_Common_ParseBhvConstants(const String &_Arg, bool *found) { common_constant(bhvTweesterSandParticle); common_constant(bhvTweester); common_constant(bhvMerryGoRoundBooManager); - common_constant(bhvPlaysMusicTrackWhenTouched); common_constant(bhvAnimatedTexture); common_constant(bhvBooInCastle); common_constant(bhvBooWithCage); @@ -556,6 +555,11 @@ s64 DynOS_Common_ParseBhvConstants(const String &_Arg, bool *found) { common_legacy_constant(bhvFish2, bhvManyBlueFishSpawner); common_legacy_constant(bhvFish3, bhvFewBlueFishSpawner); common_legacy_constant(bhvLargeFishGroup, bhvFishSpawner); + + // Version exclusive behaviors +#ifndef VERSION_JP + common_constant(bhvPlaysMusicTrackWhenTouched); +#endif *found = false; return 0; diff --git a/data/dynos_level.cpp b/data/dynos_level.cpp index 0d45717f..f69fa488 100644 --- a/data/dynos_level.cpp +++ b/data/dynos_level.cpp @@ -4,6 +4,11 @@ extern "C" { #include "game/save_file.h" #include "levels/scripts.h" #include "pc/lua/utils/smlua_level_utils.h" + +#ifdef VERSION_EU +#include "eu_translation.h" +#endif + } // @@ -310,7 +315,11 @@ const u8 *DynOS_Level_GetName(s32 aLevel, bool aDecaps, bool aAddCourseNumber) { } else if (_Course >= COURSE_CAKE_END) { SetConvertedTextToBuffer(sBuffer, DYNOS_LEVEL_TEXT_CASTLE); } else { +#ifdef VERSION_EU + const u8 *_CourseName = ((const u8 **) course_name_table_eu_en)[_Course - COURSE_BOB] + 3; +#else const u8 *_CourseName = ((const u8 **) seg2_course_name_table)[_Course - COURSE_BOB] + 3; +#endif memcpy(sBuffer, _CourseName, DynOS_String_Length(_CourseName)); } @@ -356,7 +365,11 @@ const u8 *DynOS_Level_GetActName(s32 aLevel, s32 aAct, bool aDecaps, bool aAddSt } else if (aAct >= 7) { SetConvertedTextToBuffer(sBuffer, DYNOS_LEVEL_TEXT_100_COINS_STAR); } else { +#ifdef VERSION_EU + const u8 *_ActName = ((const u8 **) act_name_table_eu_en)[(_Course - COURSE_BOB) * 6 + (aAct - 1)]; +#else const u8 *_ActName = ((const u8 **) seg2_act_name_table)[(_Course - COURSE_BOB) * 6 + (aAct - 1)]; +#endif memcpy(sBuffer, _ActName, DynOS_String_Length(_ActName)); } diff --git a/data/dynos_mgr_builtin.cpp b/data/dynos_mgr_builtin.cpp index b9156f3d..5ce78da8 100644 --- a/data/dynos_mgr_builtin.cpp +++ b/data/dynos_mgr_builtin.cpp @@ -3,6 +3,7 @@ extern "C" { #include "behavior_table.h" #include "levels/scripts.h" #include "object_fields.h" +#include "engine/behavior_script.h" #include "engine/level_script.h" #include "engine/surface_load.h" #include "game/object_helpers.h" @@ -1584,7 +1585,12 @@ static const void* sDynosBuiltinFuncs[] = { define_builtin(bhv_bbh_tilting_trap_platform_loop), define_builtin(bhv_haunted_bookshelf_loop), define_builtin(bhv_merry_go_round_loop), + // We can't move this without forcing all old mods to possibly need to recompile. How annoying. +#ifndef VERSION_JP define_builtin(bhv_play_music_track_when_touched_loop), +#else + (const void *) "bhv_play_music_track_when_touched_loop", (const void *) stub_behavior_script_2, +#endif define_builtin(bhv_beta_bowser_anchor_loop), define_builtin(bhv_static_checkered_platform_loop), define_builtin(bhv_castle_floor_trap_init), diff --git a/data/dynos_mgr_builtin_tex.cpp b/data/dynos_mgr_builtin_tex.cpp index 1d97577f..16eccb39 100644 --- a/data/dynos_mgr_builtin_tex.cpp +++ b/data/dynos_mgr_builtin_tex.cpp @@ -713,363 +713,6 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { 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_font_char_jp_0, "textures/segment2/segment2.07100.ia1.png"), - //define_builtin_tex(texture_font_char_jp_1, "textures/segment2/segment2.07110.ia1.png"), - //define_builtin_tex(texture_font_char_jp_2, "textures/segment2/segment2.07120.ia1.png"), - //define_builtin_tex(texture_font_char_jp_3, "textures/segment2/segment2.07130.ia1.png"), - //define_builtin_tex(texture_font_char_jp_4, "textures/segment2/segment2.07140.ia1.png"), - //define_builtin_tex(texture_font_char_jp_5, "textures/segment2/segment2.07150.ia1.png"), - //define_builtin_tex(texture_font_char_jp_6, "textures/segment2/segment2.07160.ia1.png"), - //define_builtin_tex(texture_font_char_jp_7, "textures/segment2/segment2.07170.ia1.png"), - //define_builtin_tex(texture_font_char_jp_8, "textures/segment2/segment2.07180.ia1.png"), - //define_builtin_tex(texture_font_char_jp_9, "textures/segment2/segment2.07190.ia1.png"), - //define_builtin_tex(texture_font_char_jp_A, "textures/segment2/segment2.071A0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_B, "textures/segment2/segment2.071B0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_C, "textures/segment2/segment2.071C0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_D, "textures/segment2/segment2.071D0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_E, "textures/segment2/segment2.071E0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_F, "textures/segment2/segment2.071F0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_G, "textures/segment2/segment2.07200.ia1.png"), - //define_builtin_tex(texture_font_char_jp_H, "textures/segment2/segment2.07210.ia1.png"), - //define_builtin_tex(texture_font_char_jp_I, "textures/segment2/segment2.07220.ia1.png"), - //define_builtin_tex(texture_font_char_jp_J, "textures/segment2/segment2.07230.ia1.png"), - //define_builtin_tex(texture_font_char_jp_K, "textures/segment2/segment2.07240.ia1.png"), - //define_builtin_tex(texture_font_char_jp_L, "textures/segment2/segment2.07250.ia1.png"), - //define_builtin_tex(texture_font_char_jp_M, "textures/segment2/segment2.07260.ia1.png"), - //define_builtin_tex(texture_font_char_jp_N, "textures/segment2/segment2.07270.ia1.png"), - //define_builtin_tex(texture_font_char_jp_O, "textures/segment2/segment2.07280.ia1.png"), - //define_builtin_tex(texture_font_char_jp_P, "textures/segment2/segment2.07290.ia1.png"), - //define_builtin_tex(texture_font_char_jp_Q, "textures/segment2/segment2.072A0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_R, "textures/segment2/segment2.072B0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_S, "textures/segment2/segment2.072C0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_T, "textures/segment2/segment2.072D0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_U, "textures/segment2/segment2.072E0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_V, "textures/segment2/segment2.072F0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_W, "textures/segment2/segment2.07300.ia1.png"), - //define_builtin_tex(texture_font_char_jp_X, "textures/segment2/segment2.07310.ia1.png"), - //define_builtin_tex(texture_font_char_jp_Y, "textures/segment2/segment2.07320.ia1.png"), - //define_builtin_tex(texture_font_char_jp_Z, "textures/segment2/segment2.07330.ia1.png"), - //define_builtin_tex(texture_font_char_jp_long_vowel, "textures/segment2/segment2.07340.ia1.png"), - //define_builtin_tex(texture_font_char_jp_exclamation, "textures/segment2/segment2.07350.ia1.png"), - //define_builtin_tex(texture_font_char_jp_dakuten, "textures/segment2/segment2.07360.ia1.png"), - //define_builtin_tex(texture_font_char_jp_handakuten, "textures/segment2/segment2.07370.ia1.png"), - //define_builtin_tex(texture_font_char_jp_percent, "textures/segment2/segment2.07380.ia1.png"), - //define_builtin_tex(texture_font_char_jp_question, "textures/segment2/segment2.07390.ia1.png"), - //define_builtin_tex(texture_font_char_jp_left_right_arrow, "textures/segment2/segment2.073A0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_open_parentheses, "textures/segment2/segment2.073B0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_close_open_parentheses, "textures/segment2/segment2.073C0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_close_parentheses, "textures/segment2/segment2.073D0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_coin, "textures/segment2/segment2.073E0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_multiply, "textures/segment2/segment2.073F0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_star_filled, "textures/segment2/segment2.07400.ia1.png"), - //define_builtin_tex(texture_font_char_jp_star_hollow, "textures/segment2/segment2.07410.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_a, "textures/segment2/segment2.07420.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_i, "textures/segment2/segment2.07430.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_u, "textures/segment2/segment2.07440.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_c, "textures/segment2/segment2.07450.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_o, "textures/segment2/segment2.07460.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ka, "textures/segment2/segment2.07470.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ki, "textures/segment2/segment2.07480.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ku, "textures/segment2/segment2.07490.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ke, "textures/segment2/segment2.074A0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ko, "textures/segment2/segment2.074B0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_sa, "textures/segment2/segment2.074C0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_shi, "textures/segment2/segment2.074D0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_su, "textures/segment2/segment2.074E0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_se, "textures/segment2/segment2.074F0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_so, "textures/segment2/segment2.07500.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ta, "textures/segment2/segment2.07510.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_chi, "textures/segment2/segment2.07520.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_tsu, "textures/segment2/segment2.07530.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_te, "textures/segment2/segment2.07540.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_to, "textures/segment2/segment2.07550.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_na, "textures/segment2/segment2.07560.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ni, "textures/segment2/segment2.07570.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_nu, "textures/segment2/segment2.07580.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ne, "textures/segment2/segment2.07590.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_no, "textures/segment2/segment2.075A0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ha, "textures/segment2/segment2.075B0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_hi, "textures/segment2/segment2.075C0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_hu, "textures/segment2/segment2.075D0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_he, "textures/segment2/segment2.075E0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ho, "textures/segment2/segment2.075F0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ma, "textures/segment2/segment2.07600.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_mi, "textures/segment2/segment2.07610.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_mu, "textures/segment2/segment2.07620.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_me, "textures/segment2/segment2.07630.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_mo, "textures/segment2/segment2.07640.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ya, "textures/segment2/segment2.07650.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_yu, "textures/segment2/segment2.07660.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_yo, "textures/segment2/segment2.07670.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ra, "textures/segment2/segment2.07680.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ri, "textures/segment2/segment2.07690.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ru, "textures/segment2/segment2.076A0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_re, "textures/segment2/segment2.076B0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_ro, "textures/segment2/segment2.076C0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_wa, "textures/segment2/segment2.076D0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_wo, "textures/segment2/segment2.076E0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_n, "textures/segment2/segment2.076F0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_small_e, "textures/segment2/segment2.07700.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_small_tsu, "textures/segment2/segment2.07710.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_small_ya, "textures/segment2/segment2.07720.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_small_yu, "textures/segment2/segment2.07730.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_small_yo, "textures/segment2/segment2.07740.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_small_a, "textures/segment2/segment2.07750.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_small_i, "textures/segment2/segment2.07760.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_small_o, "textures/segment2/segment2.07770.ia1.png"), - //define_builtin_tex(texture_font_char_jp_hiragana_small_u, "textures/segment2/segment2.07780.ia1.png"), - //define_builtin_tex(texture_font_char_jp_interpunct, "textures/segment2/segment2.07790.ia1.png"), - //define_builtin_tex(texture_font_char_jp_comma, "textures/segment2/segment2.077A0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_a, "textures/segment2/segment2.077B0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_i, "textures/segment2/segment2.077C0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_u, "textures/segment2/segment2.077D0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_e, "textures/segment2/segment2.077E0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_o, "textures/segment2/segment2.077F0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ka, "textures/segment2/segment2.07800.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ki, "textures/segment2/segment2.07810.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ku, "textures/segment2/segment2.07820.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ke, "textures/segment2/segment2.07830.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ko, "textures/segment2/segment2.07840.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_sa, "textures/segment2/segment2.07850.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_shi, "textures/segment2/segment2.07860.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_su, "textures/segment2/segment2.07870.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_se, "textures/segment2/segment2.07880.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_so, "textures/segment2/segment2.07890.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ta, "textures/segment2/segment2.078A0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_chi, "textures/segment2/segment2.078B0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_tsu, "textures/segment2/segment2.078C0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_te, "textures/segment2/segment2.078D0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_to, "textures/segment2/segment2.078E0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_na, "textures/segment2/segment2.078F0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ni, "textures/segment2/segment2.07900.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_nu, "textures/segment2/segment2.07910.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ne, "textures/segment2/segment2.07920.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_no, "textures/segment2/segment2.07930.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ha, "textures/segment2/segment2.07940.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_hi, "textures/segment2/segment2.07950.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_hu, "textures/segment2/segment2.07960.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_he, "textures/segment2/segment2.07970.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ho, "textures/segment2/segment2.07980.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ma, "textures/segment2/segment2.07990.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_mi, "textures/segment2/segment2.079A0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_mu, "textures/segment2/segment2.079B0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_me, "textures/segment2/segment2.079C0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_mo, "textures/segment2/segment2.079D0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ya, "textures/segment2/segment2.079E0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_yu, "textures/segment2/segment2.079F0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_yo, "textures/segment2/segment2.07A00.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ra, "textures/segment2/segment2.07A10.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ri, "textures/segment2/segment2.07A20.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ru, "textures/segment2/segment2.07A30.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_re, "textures/segment2/segment2.07A40.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_ro, "textures/segment2/segment2.07A50.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_wa, "textures/segment2/segment2.07A60.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_n, "textures/segment2/segment2.07A70.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_small_e, "textures/segment2/segment2.07A80.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_small_tsu, "textures/segment2/segment2.07A90.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_small_ya, "textures/segment2/segment2.07AA0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_small_yu, "textures/segment2/segment2.07AB0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_small_yo, "textures/segment2/segment2.07AC0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_small_a, "textures/segment2/segment2.07AD0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_small_i, "textures/segment2/segment2.07AE0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_small_u, "textures/segment2/segment2.07AF0.ia1.png"), - //define_builtin_tex(texture_font_char_jp_katakana_small_o, "textures/segment2/segment2.07B00.ia1.png"), - //define_builtin_tex(texture_font_char_jp_double_quotation_open, "textures/segment2/segment2.07B10.ia1.png"), - //define_builtin_tex(texture_font_char_jp_double_quotation_close, "textures/segment2/segment2.07B20.ia1.png"), - //define_builtin_tex(texture_font_char_jp_wave_dash, "textures/segment2/segment2.07B30.ia1.png"), - //define_builtin_tex(texture_font_char_jp_ellipsis, "textures/segment2/segment2.07B40.ia1.png"), - //define_builtin_tex(texture_font_char_eu_0, "textures/segment2/font_graphics.05F00.ia1.png"), - //define_builtin_tex(texture_font_char_eu_1, "textures/segment2/font_graphics.05F10.ia1.png"), - //define_builtin_tex(texture_font_char_eu_2, "textures/segment2/font_graphics.05F20.ia1.png"), - //define_builtin_tex(texture_font_char_eu_3, "textures/segment2/font_graphics.05F30.ia1.png"), - //define_builtin_tex(texture_font_char_eu_4, "textures/segment2/font_graphics.05F40.ia1.png"), - //define_builtin_tex(texture_font_char_eu_5, "textures/segment2/font_graphics.05F50.ia1.png"), - //define_builtin_tex(texture_font_char_eu_6, "textures/segment2/font_graphics.05F60.ia1.png"), - //define_builtin_tex(texture_font_char_eu_7, "textures/segment2/font_graphics.05F70.ia1.png"), - //define_builtin_tex(texture_font_char_eu_8, "textures/segment2/font_graphics.05F80.ia1.png"), - //define_builtin_tex(texture_font_char_eu_9, "textures/segment2/font_graphics.05F90.ia1.png"), - //define_builtin_tex(texture_font_char_eu_A, "textures/segment2/font_graphics.05FA0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_B, "textures/segment2/font_graphics.05FB0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_C, "textures/segment2/font_graphics.05FC0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_D, "textures/segment2/font_graphics.05FD0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_E, "textures/segment2/font_graphics.05FE0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_F, "textures/segment2/font_graphics.05FF0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_G, "textures/segment2/font_graphics.06000.ia1.png"), - //define_builtin_tex(texture_font_char_eu_H, "textures/segment2/font_graphics.06010.ia1.png"), - //define_builtin_tex(texture_font_char_eu_I, "textures/segment2/font_graphics.06020.ia1.png"), - //define_builtin_tex(texture_font_char_eu_J, "textures/segment2/font_graphics.06030.ia1.png"), - //define_builtin_tex(texture_font_char_eu_K, "textures/segment2/font_graphics.06040.ia1.png"), - //define_builtin_tex(texture_font_char_eu_L, "textures/segment2/font_graphics.06050.ia1.png"), - //define_builtin_tex(texture_font_char_eu_M, "textures/segment2/font_graphics.06060.ia1.png"), - //define_builtin_tex(texture_font_char_eu_N, "textures/segment2/font_graphics.06070.ia1.png"), - //define_builtin_tex(texture_font_char_eu_O, "textures/segment2/font_graphics.06080.ia1.png"), - //define_builtin_tex(texture_font_char_eu_P, "textures/segment2/font_graphics.06090.ia1.png"), - //define_builtin_tex(texture_font_char_eu_Q, "textures/segment2/font_graphics.060A0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_R, "textures/segment2/font_graphics.060B0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_S, "textures/segment2/font_graphics.060C0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_T, "textures/segment2/font_graphics.060D0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_U, "textures/segment2/font_graphics.060E0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_V, "textures/segment2/font_graphics.060F0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_W, "textures/segment2/font_graphics.06100.ia1.png"), - //define_builtin_tex(texture_font_char_eu_X, "textures/segment2/font_graphics.06110.ia1.png"), - //define_builtin_tex(texture_font_char_eu_Y, "textures/segment2/font_graphics.06120.ia1.png"), - //define_builtin_tex(texture_font_char_eu_Z, "textures/segment2/font_graphics.06130.ia1.png"), - //define_builtin_tex(texture_font_char_eu_a, "textures/segment2/font_graphics.06140.ia1.png"), - //define_builtin_tex(texture_font_char_eu_b, "textures/segment2/font_graphics.06150.ia1.png"), - //define_builtin_tex(texture_font_char_eu_c, "textures/segment2/font_graphics.06160.ia1.png"), - //define_builtin_tex(texture_font_char_eu_d, "textures/segment2/font_graphics.06170.ia1.png"), - //define_builtin_tex(texture_font_char_eu_e, "textures/segment2/font_graphics.06180.ia1.png"), - //define_builtin_tex(texture_font_char_eu_f, "textures/segment2/font_graphics.06190.ia1.png"), - //define_builtin_tex(texture_font_char_eu_g, "textures/segment2/font_graphics.061A0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_h, "textures/segment2/font_graphics.061B0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_i, "textures/segment2/font_graphics.061C0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_j, "textures/segment2/font_graphics.061D0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_k, "textures/segment2/font_graphics.061E0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_l, "textures/segment2/font_graphics.061F0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_m, "textures/segment2/font_graphics.06200.ia1.png"), - //define_builtin_tex(texture_font_char_eu_n, "textures/segment2/font_graphics.06210.ia1.png"), - //define_builtin_tex(texture_font_char_eu_o, "textures/segment2/font_graphics.06220.ia1.png"), - //define_builtin_tex(texture_font_char_eu_p, "textures/segment2/font_graphics.06230.ia1.png"), - //define_builtin_tex(texture_font_char_eu_q, "textures/segment2/font_graphics.06240.ia1.png"), - //define_builtin_tex(texture_font_char_eu_r, "textures/segment2/font_graphics.06250.ia1.png"), - //define_builtin_tex(texture_font_char_eu_s, "textures/segment2/font_graphics.06260.ia1.png"), - //define_builtin_tex(texture_font_char_eu_t, "textures/segment2/font_graphics.06270.ia1.png"), - //define_builtin_tex(texture_font_char_eu_u, "textures/segment2/font_graphics.06280.ia1.png"), - //define_builtin_tex(texture_font_char_eu_v, "textures/segment2/font_graphics.06290.ia1.png"), - //define_builtin_tex(texture_font_char_eu_w, "textures/segment2/font_graphics.062A0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_x, "textures/segment2/font_graphics.062B0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_y, "textures/segment2/font_graphics.062C0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_z, "textures/segment2/font_graphics.062D0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_left_right_arrow, "textures/segment2/font_graphics.062E0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_ampersand, "textures/segment2/font_graphics.062F0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_exclamation, "textures/segment2/font_graphics.06300.ia1.png"), - //define_builtin_tex(texture_font_char_eu_coin, "textures/segment2/font_graphics.06310.ia1.png"), - //define_builtin_tex(texture_font_char_eu_multiply, "textures/segment2/font_graphics.06320.ia1.png"), - //define_builtin_tex(texture_font_char_eu_open_parentheses, "textures/segment2/font_graphics.06330.ia1.png"), - //define_builtin_tex(texture_font_char_eu_close_open_parentheses, "textures/segment2/font_graphics.06340.ia1.png"), - //define_builtin_tex(texture_font_char_eu_close_parentheses, "textures/segment2/font_graphics.06350.ia1.png"), - //define_builtin_tex(texture_font_char_eu_tilde, "textures/segment2/font_graphics.06360.ia1.png"), - //define_builtin_tex(texture_font_char_eu_period, "textures/segment2/font_graphics.06370.ia1.png"), - //define_builtin_tex(texture_font_char_eu_percent, "textures/segment2/font_graphics.06380.ia1.png"), - //define_builtin_tex(texture_font_char_eu_interpunct, "textures/segment2/font_graphics.06390.ia1.png"), - //define_builtin_tex(texture_font_char_eu_comma, "textures/segment2/font_graphics.063A0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_apostrophe, "textures/segment2/font_graphics.063B0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_question, "textures/segment2/font_graphics.063C0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_star_filled, "textures/segment2/font_graphics.063D0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_star_hollow, "textures/segment2/font_graphics.063E0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_double_quote_open, "textures/segment2/font_graphics.063F0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_double_quote_close, "textures/segment2/font_graphics.06400.ia1.png"), - //define_builtin_tex(texture_font_char_eu_colon, "textures/segment2/font_graphics.06410.ia1.png"), - //define_builtin_tex(texture_font_char_EU_slash, "textures/segment2/font_graphics.06420.ia1.png"), - //define_builtin_tex(texture_font_char_eu_button_A, "textures/segment2/font_graphics.06430.ia1.png"), - //define_builtin_tex(texture_font_char_eu_button_B, "textures/segment2/font_graphics.06440.ia1.png"), - //define_builtin_tex(texture_font_char_eu_button_C, "textures/segment2/font_graphics.06450.ia1.png"), - //define_builtin_tex(texture_font_char_eu_button_Z, "textures/segment2/font_graphics.06460.ia1.png"), - //define_builtin_tex(texture_font_char_eu_button_R, "textures/segment2/font_graphics.06470.ia1.png"), - //define_builtin_tex(texture_font_char_eu_button_C_up, "textures/segment2/font_graphics.06480.ia1.png"), - //define_builtin_tex(texture_font_char_eu_button_C_down, "textures/segment2/font_graphics.06490.ia1.png"), - //define_builtin_tex(texture_font_char_eu_button_C_left, "textures/segment2/font_graphics.064A0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_button_C_right, "textures/segment2/font_graphics.064B0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_umlaut, "textures/segment2/font_graphics.064C0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_circumflex, "textures/segment2/font_graphics.064D0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_grave, "textures/segment2/font_graphics.064E0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_acute, "textures/segment2/font_graphics.064F0.ia1.png"), - //define_builtin_tex(texture_font_char_eu_cedilla, "textures/segment2/font_graphics.06500.ia1.png"), - //define_builtin_tex(texture_font_char_eu_unknown, "textures/segment2/font_graphics.06510.ia1.png"), - //define_builtin_tex(texture_font_char_eu_Cedilla, "textures/segment2/font_graphics.06520.ia1.png"), - //define_builtin_tex(texture_font_char_eu_eszeet, "textures/segment2/font_graphics.06530.ia1.png"), - 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_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), @@ -1192,7 +835,6 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { 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_us_texture_0700EAE8, "levels/castle_grounds/5.ia8.png", 64, 32, 8), 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), @@ -1219,10 +861,6 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { 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_07010800, "levels/castle_inside/23.rgba16.png"), - //define_builtin_tex(inside_castle_seg7_texture_07011800, "levels/castle_inside/24.rgba16.png"), - 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_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), @@ -1262,12 +900,6 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { 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(cake_end_texture_eu_35, "levels/ending/eu_023000.rgba16.png"), - //define_builtin_tex(cake_end_texture_eu_36, "levels/ending/eu_024000.rgba16.png"), - //define_builtin_tex(cake_end_texture_eu_37, "levels/ending/eu_025000.rgba16.png"), - //define_builtin_tex(cake_end_texture_eu_38, "levels/ending/eu_026000.rgba16.png"), - //define_builtin_tex(cake_end_texture_eu_39, "levels/ending/eu_027000.rgba16.png"), - //define_builtin_tex(cake_end_texture_eu_40, "levels/ending/eu_028000.rgba16.png"), 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), @@ -1278,9 +910,6 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { 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(intro_seg7_texture_0700B4A0, "levels/intro/2_eu_copyright.rgba16.png"), - define_builtin_tex(intro_seg7_texture_0700B4A0, "levels/intro/2_copyright.rgba16.png", 128, 16, 16), - define_builtin_tex(intro_seg7_texture_0700C4A0, "levels/intro/3_tm.rgba16.png", 16, 16, 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), @@ -1357,195 +986,6 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { 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_font_char_jp_0, "levels/menu/main_menu_seg7.0AC48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_1, "levels/menu/main_menu_seg7.0AC88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_2, "levels/menu/main_menu_seg7.0ACC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_3, "levels/menu/main_menu_seg7.0AD08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_4, "levels/menu/main_menu_seg7.0AD48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_5, "levels/menu/main_menu_seg7.0AD88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_6, "levels/menu/main_menu_seg7.0ADC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_7, "levels/menu/main_menu_seg7.0AE08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_8, "levels/menu/main_menu_seg7.0AE48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_9, "levels/menu/main_menu_seg7.0AE88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_a, "levels/menu/main_menu_seg7.0AEC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_i, "levels/menu/main_menu_seg7.0AF08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_u, "levels/menu/main_menu_seg7.0AF48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_c, "levels/menu/main_menu_seg7.0AF88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_o, "levels/menu/main_menu_seg7.0AFC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ka, "levels/menu/main_menu_seg7.0B008.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ki, "levels/menu/main_menu_seg7.0B048.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ku, "levels/menu/main_menu_seg7.0B088.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ke, "levels/menu/main_menu_seg7.0B0C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ko, "levels/menu/main_menu_seg7.0B108.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_sa, "levels/menu/main_menu_seg7.0B148.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_shi, "levels/menu/main_menu_seg7.0B188.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_su, "levels/menu/main_menu_seg7.0B1C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_se, "levels/menu/main_menu_seg7.0B208.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_so, "levels/menu/main_menu_seg7.0B248.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ta, "levels/menu/main_menu_seg7.0B288.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_chi, "levels/menu/main_menu_seg7.0B2C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_tsu, "levels/menu/main_menu_seg7.0B308.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_te, "levels/menu/main_menu_seg7.0B348.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_to, "levels/menu/main_menu_seg7.0B388.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_na, "levels/menu/main_menu_seg7.0B3C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ni, "levels/menu/main_menu_seg7.0B408.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_nu, "levels/menu/main_menu_seg7.0B448.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ne, "levels/menu/main_menu_seg7.0B488.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_no, "levels/menu/main_menu_seg7.0B4C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ha, "levels/menu/main_menu_seg7.0B508.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_hi, "levels/menu/main_menu_seg7.0B548.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_hu, "levels/menu/main_menu_seg7.0B588.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_he, "levels/menu/main_menu_seg7.0B5C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ho, "levels/menu/main_menu_seg7.0B608.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ma, "levels/menu/main_menu_seg7.0B648.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_mi, "levels/menu/main_menu_seg7.0B688.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_mu, "levels/menu/main_menu_seg7.0B6C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_me, "levels/menu/main_menu_seg7.0B708.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_mo, "levels/menu/main_menu_seg7.0B748.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ya, "levels/menu/main_menu_seg7.0B788.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_yu, "levels/menu/main_menu_seg7.0B7C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_yo, "levels/menu/main_menu_seg7.0B808.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ra, "levels/menu/main_menu_seg7.0B848.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ri, "levels/menu/main_menu_seg7.0B888.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ru, "levels/menu/main_menu_seg7.0B8C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_re, "levels/menu/main_menu_seg7.0B908.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_ro, "levels/menu/main_menu_seg7.0B948.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_wa, "levels/menu/main_menu_seg7.0B988.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_wo, "levels/menu/main_menu_seg7.0B9C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_n, "levels/menu/main_menu_seg7.0BA08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_small_a, "levels/menu/main_menu_seg7.0BA48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_small_i, "levels/menu/main_menu_seg7.0BA88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_small_u, "levels/menu/main_menu_seg7.0BAC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_small_e, "levels/menu/main_menu_seg7.0BB08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_small_o, "levels/menu/main_menu_seg7.0BB48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_small_ka, "levels/menu/main_menu_seg7.0BB88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_small_yu, "levels/menu/main_menu_seg7.0BBC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_small_yo, "levels/menu/main_menu_seg7.0BC08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_hiragana_small_tsu, "levels/menu/main_menu_seg7.0BC48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_handakuten, "levels/menu/main_menu_seg7.0BC88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_dakuten, "levels/menu/main_menu_seg7.0BCC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_long_vowel, "levels/menu/main_menu_seg7.0BD08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_a, "levels/menu/main_menu_seg7.0BD48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_i, "levels/menu/main_menu_seg7.0BD88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_u, "levels/menu/main_menu_seg7.0BDC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_e, "levels/menu/main_menu_seg7.0BE08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_o, "levels/menu/main_menu_seg7.0BE48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ka, "levels/menu/main_menu_seg7.0BE88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ki, "levels/menu/main_menu_seg7.0BEC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ku, "levels/menu/main_menu_seg7.0BF08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ke, "levels/menu/main_menu_seg7.0BF48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ko, "levels/menu/main_menu_seg7.0BF88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_sa, "levels/menu/main_menu_seg7.0BFC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_shi, "levels/menu/main_menu_seg7.0C008.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_su, "levels/menu/main_menu_seg7.0C048.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_se, "levels/menu/main_menu_seg7.0C088.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_so, "levels/menu/main_menu_seg7.0C0C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ta, "levels/menu/main_menu_seg7.0C108.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_chi, "levels/menu/main_menu_seg7.0C148.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_tsu, "levels/menu/main_menu_seg7.0C188.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_te, "levels/menu/main_menu_seg7.0C1C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_to, "levels/menu/main_menu_seg7.0C208.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_na, "levels/menu/main_menu_seg7.0C248.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ni, "levels/menu/main_menu_seg7.0C288.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_nu, "levels/menu/main_menu_seg7.0C2C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ne, "levels/menu/main_menu_seg7.0C308.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_no, "levels/menu/main_menu_seg7.0C348.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ha, "levels/menu/main_menu_seg7.0C388.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_hi, "levels/menu/main_menu_seg7.0C3C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_hu, "levels/menu/main_menu_seg7.0C408.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_he, "levels/menu/main_menu_seg7.0C448.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ho, "levels/menu/main_menu_seg7.0C488.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ma, "levels/menu/main_menu_seg7.0C4C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_mi, "levels/menu/main_menu_seg7.0C508.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_mu, "levels/menu/main_menu_seg7.0C548.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_me, "levels/menu/main_menu_seg7.0C588.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_mo, "levels/menu/main_menu_seg7.0C5C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ya, "levels/menu/main_menu_seg7.0C608.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_yu, "levels/menu/main_menu_seg7.0C648.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_yo, "levels/menu/main_menu_seg7.0C688.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ra, "levels/menu/main_menu_seg7.0C6C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ri, "levels/menu/main_menu_seg7.0C708.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ru, "levels/menu/main_menu_seg7.0C748.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_re, "levels/menu/main_menu_seg7.0C788.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_ro, "levels/menu/main_menu_seg7.0C7C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_wa, "levels/menu/main_menu_seg7.0C808.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_wo, "levels/menu/main_menu_seg7.0C848.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_n, "levels/menu/main_menu_seg7.0C888.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_small_a, "levels/menu/main_menu_seg7.0C8C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_small_i, "levels/menu/main_menu_seg7.0C908.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_small_u, "levels/menu/main_menu_seg7.0C948.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_small_e, "levels/menu/main_menu_seg7.0C988.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_small_o, "levels/menu/main_menu_seg7.0C9C8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_small_ka, "levels/menu/main_menu_seg7.0CA08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_small_yu, "levels/menu/main_menu_seg7.0CA48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_small_yo, "levels/menu/main_menu_seg7.0CA88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_katakana_small_tsu, "levels/menu/main_menu_seg7.0CAC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_A, "levels/menu/main_menu_seg7.0CB08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_B, "levels/menu/main_menu_seg7.0CB48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_C, "levels/menu/main_menu_seg7.0CB88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_D, "levels/menu/main_menu_seg7.0CBC8.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_coin, "levels/menu/main_menu_seg7.0CC08.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_star_filled, "levels/menu/main_menu_seg7.0CC48.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_multiply, "levels/menu/main_menu_seg7.0CC88.ia8.png"), - //define_builtin_tex(texture_menu_font_char_jp_exclamation, "levels/menu/main_menu_seg7.0CCC8.ia8.png"), - 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_D, "levels/menu/main_menu_seg7_eu.0AF80.ia8.png"), - 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_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_eu.0B640.ia8.png"), - //define_builtin_tex(texture_menu_font_char_apostrophe, "levels/menu/main_menu_seg7_eu.0B680.ia8.png"), - 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_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"), - //define_builtin_tex(texture_menu_course_upper, "levels/menu/main_menu_seg7_eu.0BDA0.rgba16.png"), - //define_builtin_tex(texture_menu_niveau_upper, "levels/menu/main_menu_seg7_eu.0CDA0.rgba16.png"), - //define_builtin_tex(texture_menu_kurs_upper, "levels/menu/main_menu_seg7_eu.0DDA0.rgba16.png"), - //define_builtin_tex(texture_menu_course_lower, "levels/menu/main_menu_seg7_eu.0EDA0.rgba16.png"), 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), @@ -1695,7 +1135,7 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { define_builtin_tex(texture_font_normal, "textures/custom_font/custom_font_normal.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_tiny, "textures/custom_font/custom_font_tiny.rgba32.png", 256, 128, 32), - + // 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), @@ -1721,6 +1161,596 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { 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), + + // Version Exclusives +#if defined(VERSION_JP) + define_builtin_tex(texture_font_char_jp_0, "textures/segment2/segment2.07100.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_1, "textures/segment2/segment2.07110.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_2, "textures/segment2/segment2.07120.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_3, "textures/segment2/segment2.07130.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_4, "textures/segment2/segment2.07140.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_5, "textures/segment2/segment2.07150.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_6, "textures/segment2/segment2.07160.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_7, "textures/segment2/segment2.07170.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_8, "textures/segment2/segment2.07180.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_9, "textures/segment2/segment2.07190.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_A, "textures/segment2/segment2.071A0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_B, "textures/segment2/segment2.071B0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_C, "textures/segment2/segment2.071C0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_D, "textures/segment2/segment2.071D0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_E, "textures/segment2/segment2.071E0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_F, "textures/segment2/segment2.071F0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_G, "textures/segment2/segment2.07200.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_H, "textures/segment2/segment2.07210.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_I, "textures/segment2/segment2.07220.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_J, "textures/segment2/segment2.07230.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_K, "textures/segment2/segment2.07240.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_L, "textures/segment2/segment2.07250.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_M, "textures/segment2/segment2.07260.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_N, "textures/segment2/segment2.07270.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_O, "textures/segment2/segment2.07280.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_P, "textures/segment2/segment2.07290.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_Q, "textures/segment2/segment2.072A0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_R, "textures/segment2/segment2.072B0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_S, "textures/segment2/segment2.072C0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_T, "textures/segment2/segment2.072D0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_U, "textures/segment2/segment2.072E0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_V, "textures/segment2/segment2.072F0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_W, "textures/segment2/segment2.07300.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_X, "textures/segment2/segment2.07310.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_Y, "textures/segment2/segment2.07320.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_Z, "textures/segment2/segment2.07330.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_long_vowel, "textures/segment2/segment2.07340.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_exclamation, "textures/segment2/segment2.07350.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_dakuten, "textures/segment2/segment2.07360.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_handakuten, "textures/segment2/segment2.07370.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_percent, "textures/segment2/segment2.07380.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_question, "textures/segment2/segment2.07390.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_left_right_arrow, "textures/segment2/segment2.073A0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_open_parentheses, "textures/segment2/segment2.073B0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_close_open_parentheses, "textures/segment2/segment2.073C0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_close_parentheses, "textures/segment2/segment2.073D0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_coin, "textures/segment2/segment2.073E0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_multiply, "textures/segment2/segment2.073F0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_star_filled, "textures/segment2/segment2.07400.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_star_hollow, "textures/segment2/segment2.07410.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_a, "textures/segment2/segment2.07420.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_i, "textures/segment2/segment2.07430.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_u, "textures/segment2/segment2.07440.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_c, "textures/segment2/segment2.07450.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_o, "textures/segment2/segment2.07460.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ka, "textures/segment2/segment2.07470.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ki, "textures/segment2/segment2.07480.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ku, "textures/segment2/segment2.07490.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ke, "textures/segment2/segment2.074A0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ko, "textures/segment2/segment2.074B0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_sa, "textures/segment2/segment2.074C0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_shi, "textures/segment2/segment2.074D0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_su, "textures/segment2/segment2.074E0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_se, "textures/segment2/segment2.074F0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_so, "textures/segment2/segment2.07500.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ta, "textures/segment2/segment2.07510.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_chi, "textures/segment2/segment2.07520.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_tsu, "textures/segment2/segment2.07530.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_te, "textures/segment2/segment2.07540.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_to, "textures/segment2/segment2.07550.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_na, "textures/segment2/segment2.07560.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ni, "textures/segment2/segment2.07570.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_nu, "textures/segment2/segment2.07580.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ne, "textures/segment2/segment2.07590.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_no, "textures/segment2/segment2.075A0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ha, "textures/segment2/segment2.075B0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_hi, "textures/segment2/segment2.075C0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_hu, "textures/segment2/segment2.075D0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_he, "textures/segment2/segment2.075E0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ho, "textures/segment2/segment2.075F0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ma, "textures/segment2/segment2.07600.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_mi, "textures/segment2/segment2.07610.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_mu, "textures/segment2/segment2.07620.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_me, "textures/segment2/segment2.07630.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_mo, "textures/segment2/segment2.07640.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ya, "textures/segment2/segment2.07650.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_yu, "textures/segment2/segment2.07660.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_yo, "textures/segment2/segment2.07670.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ra, "textures/segment2/segment2.07680.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ri, "textures/segment2/segment2.07690.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ru, "textures/segment2/segment2.076A0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_re, "textures/segment2/segment2.076B0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_ro, "textures/segment2/segment2.076C0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_wa, "textures/segment2/segment2.076D0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_wo, "textures/segment2/segment2.076E0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_n, "textures/segment2/segment2.076F0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_small_e, "textures/segment2/segment2.07700.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_small_tsu, "textures/segment2/segment2.07710.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_small_ya, "textures/segment2/segment2.07720.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_small_yu, "textures/segment2/segment2.07730.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_small_yo, "textures/segment2/segment2.07740.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_small_a, "textures/segment2/segment2.07750.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_small_i, "textures/segment2/segment2.07760.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_small_o, "textures/segment2/segment2.07770.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_hiragana_small_u, "textures/segment2/segment2.07780.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_interpunct, "textures/segment2/segment2.07790.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_comma, "textures/segment2/segment2.077A0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_a, "textures/segment2/segment2.077B0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_i, "textures/segment2/segment2.077C0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_u, "textures/segment2/segment2.077D0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_e, "textures/segment2/segment2.077E0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_o, "textures/segment2/segment2.077F0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ka, "textures/segment2/segment2.07800.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ki, "textures/segment2/segment2.07810.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ku, "textures/segment2/segment2.07820.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ke, "textures/segment2/segment2.07830.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ko, "textures/segment2/segment2.07840.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_sa, "textures/segment2/segment2.07850.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_shi, "textures/segment2/segment2.07860.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_su, "textures/segment2/segment2.07870.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_se, "textures/segment2/segment2.07880.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_so, "textures/segment2/segment2.07890.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ta, "textures/segment2/segment2.078A0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_chi, "textures/segment2/segment2.078B0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_tsu, "textures/segment2/segment2.078C0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_te, "textures/segment2/segment2.078D0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_to, "textures/segment2/segment2.078E0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_na, "textures/segment2/segment2.078F0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ni, "textures/segment2/segment2.07900.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_nu, "textures/segment2/segment2.07910.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ne, "textures/segment2/segment2.07920.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_no, "textures/segment2/segment2.07930.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ha, "textures/segment2/segment2.07940.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_hi, "textures/segment2/segment2.07950.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_hu, "textures/segment2/segment2.07960.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_he, "textures/segment2/segment2.07970.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ho, "textures/segment2/segment2.07980.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ma, "textures/segment2/segment2.07990.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_mi, "textures/segment2/segment2.079A0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_mu, "textures/segment2/segment2.079B0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_me, "textures/segment2/segment2.079C0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_mo, "textures/segment2/segment2.079D0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ya, "textures/segment2/segment2.079E0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_yu, "textures/segment2/segment2.079F0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_yo, "textures/segment2/segment2.07A00.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ra, "textures/segment2/segment2.07A10.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ri, "textures/segment2/segment2.07A20.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ru, "textures/segment2/segment2.07A30.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_re, "textures/segment2/segment2.07A40.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_ro, "textures/segment2/segment2.07A50.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_wa, "textures/segment2/segment2.07A60.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_n, "textures/segment2/segment2.07A70.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_small_e, "textures/segment2/segment2.07A80.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_small_tsu, "textures/segment2/segment2.07A90.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_small_ya, "textures/segment2/segment2.07AA0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_small_yu, "textures/segment2/segment2.07AB0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_small_yo, "textures/segment2/segment2.07AC0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_small_a, "textures/segment2/segment2.07AD0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_small_i, "textures/segment2/segment2.07AE0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_small_u, "textures/segment2/segment2.07AF0.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_katakana_small_o, "textures/segment2/segment2.07B00.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_double_quotation_open, "textures/segment2/segment2.07B10.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_double_quotation_close, "textures/segment2/segment2.07B20.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_wave_dash, "textures/segment2/segment2.07B30.ia1.png", 8, 8, 16), + define_builtin_tex(texture_font_char_jp_ellipsis, "textures/segment2/segment2.07B40.ia1.png", 8, 8, 16), +#elif defined(VERSION_EU) + define_builtin_tex(texture_font_char_eu_0, "textures/segment2/font_graphics.05F00.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_1, "textures/segment2/font_graphics.05F10.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_2, "textures/segment2/font_graphics.05F20.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_3, "textures/segment2/font_graphics.05F30.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_4, "textures/segment2/font_graphics.05F40.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_5, "textures/segment2/font_graphics.05F50.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_6, "textures/segment2/font_graphics.05F60.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_7, "textures/segment2/font_graphics.05F70.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_8, "textures/segment2/font_graphics.05F80.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_9, "textures/segment2/font_graphics.05F90.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_A, "textures/segment2/font_graphics.05FA0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_B, "textures/segment2/font_graphics.05FB0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_C, "textures/segment2/font_graphics.05FC0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_D, "textures/segment2/font_graphics.05FD0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_E, "textures/segment2/font_graphics.05FE0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_F, "textures/segment2/font_graphics.05FF0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_G, "textures/segment2/font_graphics.06000.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_H, "textures/segment2/font_graphics.06010.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_I, "textures/segment2/font_graphics.06020.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_J, "textures/segment2/font_graphics.06030.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_K, "textures/segment2/font_graphics.06040.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_L, "textures/segment2/font_graphics.06050.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_M, "textures/segment2/font_graphics.06060.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_N, "textures/segment2/font_graphics.06070.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_O, "textures/segment2/font_graphics.06080.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_P, "textures/segment2/font_graphics.06090.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_Q, "textures/segment2/font_graphics.060A0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_R, "textures/segment2/font_graphics.060B0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_S, "textures/segment2/font_graphics.060C0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_T, "textures/segment2/font_graphics.060D0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_U, "textures/segment2/font_graphics.060E0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_V, "textures/segment2/font_graphics.060F0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_W, "textures/segment2/font_graphics.06100.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_X, "textures/segment2/font_graphics.06110.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_Y, "textures/segment2/font_graphics.06120.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_Z, "textures/segment2/font_graphics.06130.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_a, "textures/segment2/font_graphics.06140.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_b, "textures/segment2/font_graphics.06150.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_c, "textures/segment2/font_graphics.06160.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_d, "textures/segment2/font_graphics.06170.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_e, "textures/segment2/font_graphics.06180.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_f, "textures/segment2/font_graphics.06190.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_g, "textures/segment2/font_graphics.061A0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_h, "textures/segment2/font_graphics.061B0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_i, "textures/segment2/font_graphics.061C0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_j, "textures/segment2/font_graphics.061D0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_k, "textures/segment2/font_graphics.061E0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_l, "textures/segment2/font_graphics.061F0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_m, "textures/segment2/font_graphics.06200.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_n, "textures/segment2/font_graphics.06210.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_o, "textures/segment2/font_graphics.06220.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_p, "textures/segment2/font_graphics.06230.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_q, "textures/segment2/font_graphics.06240.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_r, "textures/segment2/font_graphics.06250.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_s, "textures/segment2/font_graphics.06260.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_t, "textures/segment2/font_graphics.06270.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_u, "textures/segment2/font_graphics.06280.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_v, "textures/segment2/font_graphics.06290.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_w, "textures/segment2/font_graphics.062A0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_x, "textures/segment2/font_graphics.062B0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_y, "textures/segment2/font_graphics.062C0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_z, "textures/segment2/font_graphics.062D0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_left_right_arrow, "textures/segment2/font_graphics.062E0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_ampersand, "textures/segment2/font_graphics.062F0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_exclamation, "textures/segment2/font_graphics.06300.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_coin, "textures/segment2/font_graphics.06310.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_multiply, "textures/segment2/font_graphics.06320.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_open_parentheses, "textures/segment2/font_graphics.06330.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_close_open_parentheses, "textures/segment2/font_graphics.06340.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_close_parentheses, "textures/segment2/font_graphics.06350.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_tilde, "textures/segment2/font_graphics.06360.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_period, "textures/segment2/font_graphics.06370.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_percent, "textures/segment2/font_graphics.06380.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_interpunct, "textures/segment2/font_graphics.06390.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_comma, "textures/segment2/font_graphics.063A0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_apostrophe, "textures/segment2/font_graphics.063B0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_question, "textures/segment2/font_graphics.063C0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_star_filled, "textures/segment2/font_graphics.063D0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_star_hollow, "textures/segment2/font_graphics.063E0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_double_quote_open, "textures/segment2/font_graphics.063F0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_double_quote_close, "textures/segment2/font_graphics.06400.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_colon, "textures/segment2/font_graphics.06410.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_EU_slash, "textures/segment2/font_graphics.06420.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_button_A, "textures/segment2/font_graphics.06430.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_button_B, "textures/segment2/font_graphics.06440.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_button_C, "textures/segment2/font_graphics.06450.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_button_Z, "textures/segment2/font_graphics.06460.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_button_R, "textures/segment2/font_graphics.06470.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_button_C_up, "textures/segment2/font_graphics.06480.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_button_C_down, "textures/segment2/font_graphics.06490.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_button_C_left, "textures/segment2/font_graphics.064A0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_button_C_right, "textures/segment2/font_graphics.064B0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_umlaut, "textures/segment2/font_graphics.064C0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_circumflex, "textures/segment2/font_graphics.064D0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_grave, "textures/segment2/font_graphics.064E0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_acute, "textures/segment2/font_graphics.064F0.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_cedilla, "textures/segment2/font_graphics.06500.ia1.png", 16, 8, 16), + define_builtin_tex(texture_font_char_eu_unknown, "textures/segment2/font_graphics.06510.ia1.png", 16, 8, 16), + 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), +#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), +#endif + +#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), +#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_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"), + //define_builtin_tex(texture_menu_course_upper, "levels/menu/main_menu_seg7_eu.0BDA0.rgba16.png"), + //define_builtin_tex(texture_menu_niveau_upper, "levels/menu/main_menu_seg7_eu.0CDA0.rgba16.png"), + //define_builtin_tex(texture_menu_kurs_upper, "levels/menu/main_menu_seg7_eu.0DDA0.rgba16.png"), + //define_builtin_tex(texture_menu_course_lower, "levels/menu/main_menu_seg7_eu.0EDA0.rgba16.png"), + +#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), +#else + define_builtin_tex(texture_menu_font_char_D, "levels/menu/main_menu_seg7_us.0AF80.ia8.png", 8, 8, 16), +#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), +#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), +#endif + +#ifndef VERSION_JP + define_builtin_tex(castle_grounds_seg7_us_texture_0700EAE8, "levels/castle_grounds/5.ia8.png", 64, 32, 8), +#endif + +#ifdef VERSION_EU + define_builtin_tex(intro_seg7_texture_0700B4A0, "levels/intro/2_eu_copyright.rgba16.png", 128, 16, 16), +#else + define_builtin_tex(intro_seg7_texture_0700B4A0, "levels/intro/2_copyright.rgba16.png", 128, 16, 16), +#endif + +#ifndef VERSION_EU + define_builtin_tex(intro_seg7_texture_0700C4A0, "levels/intro/3_tm.rgba16.png", 16, 16, 16), +#endif }; const Texture* DynOS_Builtin_Tex_GetFromName(const char* aDataName) { diff --git a/include/eu_translation.h b/include/eu_translation.h index 19686825..02611b37 100644 --- a/include/eu_translation.h +++ b/include/eu_translation.h @@ -1,6 +1,8 @@ #ifndef EU_TRANSLATION_H #define EU_TRANSLATION_H +#include "types.h" + // EU changes most text to arrays for each language. This define allows these // differences to be combined. #ifdef VERSION_EU @@ -9,16 +11,25 @@ #define LANGUAGE_ARRAY(cmd) cmd #endif -extern void *dialog_table_eu_en[]; -extern void *course_name_table_eu_en[]; -extern void *act_name_table_eu_en[]; +extern u8 *dialog_table_eu_en[]; +extern u8 *course_name_table_eu_en[]; +extern u8 *act_name_table_eu_en[]; +extern u8 *dialog_table_eu_en_original[]; +extern u8 *course_name_table_eu_en_original[]; +extern u8 *act_name_table_eu_en_original[]; -extern void *dialog_table_eu_fr[]; -extern void *course_name_table_eu_fr[]; -extern void *act_name_table_eu_fr[]; +extern u8 *dialog_table_eu_fr[]; +extern u8 *course_name_table_eu_fr[]; +extern u8 *act_name_table_eu_fr[]; +extern u8 *dialog_table_eu_fr_original[]; +extern u8 *course_name_table_eu_fr_original[]; +extern u8 *act_name_table_eu_fr_original[]; -extern void *dialog_table_eu_de[]; -extern void *course_name_table_eu_de[]; -extern void *act_name_table_eu_de[]; +extern u8 *dialog_table_eu_de[]; +extern u8 *course_name_table_eu_de[]; +extern u8 *act_name_table_eu_de[]; +extern u8 *dialog_table_eu_de_original[]; +extern u8 *course_name_table_eu_de_original[]; +extern u8 *act_name_table_eu_de_original[]; #endif // EU_TRANSLATION_H diff --git a/levels/menu/script.c b/levels/menu/script.c index 4e955c12..c191ac8c 100644 --- a/levels/menu/script.c +++ b/levels/menu/script.c @@ -50,7 +50,7 @@ const LevelScript level_main_menu_entry_1[] = { GET_OR_SET(/*op*/ OP_SET, /*var*/ VAR_CURR_SAVE_FILE_NUM), STOP_MUSIC(/*fadeOutTime*/ 0x00BE), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), - SLEEP(/*frames*/ 16), + SLEEP(/*frames*/ 8), // Was 16 frames CLEAR_LEVEL(), SLEEP_BEFORE_EXIT(/*frames*/ 1), SET_REG(/*value*/ LEVEL_CASTLE_GROUNDS), @@ -80,13 +80,13 @@ const LevelScript level_main_menu_entry_2[] = { CALL(/*arg*/ 0, /*func*/ lvl_init_act_selector_values_and_stars), /*27*/ TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), - /*29*/ SLEEP(/*frames*/ 16), + /*29*/ SLEEP(/*frames*/ 8), // Was 16 frames /*30*/ SET_MENU_MUSIC(/*seq*/ 0x000D), /*33*/ CALL_LOOP(/*arg*/ 0, /*func*/ lvl_update_obj_and_load_act_button_actions), /*35*/ GET_OR_SET(/*op*/ OP_SET, /*var*/ VAR_CURR_ACT_NUM), /*36*/ STOP_MUSIC(/*fadeOutTime*/ 0x00BE), /*37*/ TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), - /*39*/ SLEEP(/*frames*/ 16), + /*39*/ SLEEP(/*frames*/ 10), // Was 16 frames /*40*/ CLEAR_LEVEL(), /*41*/ SLEEP_BEFORE_EXIT(/*frames*/ 1), // L1: diff --git a/levels/scripts.c b/levels/scripts.c index c0f7a231..f48c4d9e 100644 --- a/levels/scripts.c +++ b/levels/scripts.c @@ -151,7 +151,7 @@ const LevelScript level_main_scripts_entry[] = { LOOP_BEGIN(), EXECUTE(/*seg*/ 0x14, _menuSegmentRomStart, _menuSegmentRomEnd, level_main_menu_entry_2), JUMP_LINK(script_exec_level_table), - SLEEP(/*frames*/ 1), + //SLEEP(/*frames*/ 1), LOOP_UNTIL(/*op*/ OP_LT, /*arg*/ 0), JUMP_IF(/*op*/ OP_EQ, /*arg*/ -1, script_L2), JUMP_IF(/*op*/ OP_EQ, /*arg*/ -2, goto_mario_head_regular), diff --git a/src/audio/data.c b/src/audio/data.c index 7bf9fb8a..258e615b 100644 --- a/src/audio/data.c +++ b/src/audio/data.c @@ -902,8 +902,8 @@ volatile s32 gAudioLoadLock = AUDIO_LOCK_UNINITIALIZED; #if defined(VERSION_EU) u8 bufferDelete2[12] = { 0 }; -u8 D_EU_80302010 = 0; -u8 D_EU_80302014 = 0; +u8 gQueuedAudioCmdCount = 0; +u8 gLastQueuedAudioCmdCount = 0; struct OSMesgQueue *OSMesgQueues[4] = { &OSMesgQueue0, &OSMesgQueue1, &OSMesgQueue2, &OSMesgQueue3 }; #elif defined(VERSION_JP) || defined(VERSION_US) diff --git a/src/audio/data.h b/src/audio/data.h index 16be47c9..1267516e 100644 --- a/src/audio/data.h +++ b/src/audio/data.h @@ -122,8 +122,8 @@ extern u32 gAudioRandom; #define AUDIO_INIT_POOL_SIZE (0x2500 + EXT_AUDIO_INIT_POOL_SIZE) #endif -// Normal Heap Size, Extended Heap Size, Extended Audio Init Pool Size -#define AUDIO_HEAP_SIZE (AUDIO_HEAP_BASE + EXT_AUDIO_HEAP_SIZE + EXT_AUDIO_INIT_POOL_SIZE) +// Normal Heap Size, Extended Heap Size +#define AUDIO_HEAP_SIZE (AUDIO_HEAP_BASE + EXT_AUDIO_HEAP_SIZE) #ifdef VERSION_SH extern f32 unk_sh_data_1[]; diff --git a/src/audio/external.c b/src/audio/external.c index fbf7d26d..c66352bf 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -14,6 +14,7 @@ #include "seq_ids.h" #include "dialog_ids.h" #include "level_table.h" +#include "pc/debuglog.h" #include "pc/lua/utils/smlua_level_utils.h" #if defined(VERSION_EU) || defined(VERSION_SH) @@ -281,7 +282,7 @@ u16 sLevelAcousticReaches[LEVEL_COUNT] = { #define VOLUME_RANGE_UNK2 0.8f #endif -const u8 sBackgroundMusicDefaultVolumeDefault[] = { +const u8 sBackgroundMusicDefaultVolumeDefault[35] = { 127, // SEQ_SOUND_PLAYER 80, // SEQ_EVENT_CUTSCENE_COLLECT_STAR 80, // SEQ_MENU_TITLE_SCREEN @@ -451,7 +452,7 @@ OSPiHandle DriveRomHandle; // used in osDriveRomInit.c. Why here? s8 D_SH_80343E48_pad[0x8]; #endif -struct Sound sSoundRequests[0x100]; +struct Sound sSoundRequests[0x100] = { 0 }; struct ChannelVolumeScaleFade D_80360928[SEQUENCE_PLAYERS][CHANNELS_MAX] = { 0 }; u8 sUsedChannelsForSoundBank[SOUND_BANK_COUNT] = { 0 }; u8 sCurrentSound[SOUND_BANK_COUNT][MAX_CHANNELS_PER_SOUND_BANK] = { 0 }; // index into sSoundBanks @@ -464,10 +465,10 @@ u8 sCurrentSound[SOUND_BANK_COUNT][MAX_CHANNELS_PER_SOUND_BANK] = { 0 }; // inde */ struct SoundCharacteristics sSoundBanks[SOUND_BANK_COUNT][SOUND_INDEX_COUNT] = { 0 }; -u8 sSoundMovingSpeed[SOUND_BANK_COUNT]; +u8 sSoundMovingSpeed[SOUND_BANK_COUNT] = { 0 }; u8 sBackgroundMusicTargetVolume; static u8 sLowerBackgroundMusicVolume; -struct SequenceQueueItem sBackgroundMusicQueue[MAX_BACKGROUND_MUSIC_QUEUE_SIZE]; +struct SequenceQueueItem sBackgroundMusicQueue[MAX_BACKGROUND_MUSIC_QUEUE_SIZE] = { 0 }; #if defined(VERSION_EU) || defined(VERSION_SH) s32 unk_sh_8034754C; @@ -480,7 +481,7 @@ OSMesgQueue OSMesgQueue2; OSMesgQueue OSMesgQueue3; extern OSMesgQueue *OSMesgQueues[]; -struct EuAudioCmd sAudioCmd[0x100]; +struct EuAudioCmd sAudioCmd[0x100] = { 0 }; OSMesg OSMesg0; s32 pad1; // why is there 1 s32 here @@ -500,9 +501,9 @@ typedef s32 FadeT; #endif // some sort of main thread -> sound thread dispatchers -extern void func_802ad728(u32 bits, f32 arg); -extern void func_802ad74c(u32 bits, u32 arg); -extern void func_802ad770(u32 bits, s8 arg); +extern void queue_audio_cmd_f32(u32 bits, f32 arg); +extern void queue_audio_cmd_u32(u32 bits, u32 arg); +extern void queue_audio_cmd_s8(u32 bits, s8 arg); static void update_background_music_after_sound(u8 bank, u8 soundIndex); static void update_game_sound(void); @@ -684,7 +685,7 @@ static void seq_player_fade_to_zero_volume(s32 player, FadeT fadeDuration) { /** * Called from threads: thread4_sound, thread5_game_loop */ -static void func_8031D690(s32 player, FadeT fadeInTime) { +static void seq_player_fade_from_zero_volume(s32 player, FadeT fadeInTime) { struct SequencePlayer *seqPlayer = &gSequencePlayers[player]; if (fadeInTime == 0 || seqPlayer->state == SEQUENCE_PLAYER_STATE_FADE_OUT) { @@ -796,7 +797,7 @@ static void seq_player_fade_to_target_volume(s32 player, FadeT fadeDuration, u8 #if defined(VERSION_EU) || defined(VERSION_SH) #ifdef VERSION_EU -extern void func_802ad7a0(void); +extern void send_process_queued_audio_cmds(void); #else extern void func_sh_802F64C8(void); #endif @@ -810,7 +811,7 @@ void maybe_tick_game_sound(void) { sGameLoopTicked = 0; } #ifdef VERSION_EU - func_802ad7a0(); + send_process_queued_audio_cmds(); #else func_sh_802F64C8(); // moved in SH #endif @@ -819,7 +820,7 @@ void maybe_tick_game_sound(void) { void func_eu_802e9bec(s32 player, s32 channel, s32 arg2) { // EU verson of unused_803209D8 // chan->stopSomething2 = arg2? - func_802ad770(0x08000000 | (player & 0xff) << 16 | (channel & 0xff) << 8, (s8) arg2); + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x08, player, channel, 0), (s8)arg2); } #else @@ -1428,8 +1429,8 @@ static void update_game_sound(void) { if (!(sSoundBanks[bank][soundIndex].soundBits & SOUND_CONSTANT_FREQUENCY)) { if (sSoundMovingSpeed[bank] > 8) { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728( - 0x02020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32( + AUDIO_CMD_ARGS(0x02, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_volume(bank, soundIndex, VOLUME_RANGE_UNK1)); #else value = get_sound_volume(bank, soundIndex, VOLUME_RANGE_UNK1); @@ -1438,7 +1439,7 @@ static void update_game_sound(void) { #endif } else { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728(0x02020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x02, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_volume(bank, soundIndex, VOLUME_RANGE_UNK1) * ((sSoundMovingSpeed[bank] + 8.0f) / 16)); #else @@ -1448,7 +1449,7 @@ static void update_game_sound(void) { #endif } #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad770(0x03020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x03, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_pan(*sSoundBanks[bank][soundIndex].x, *sSoundBanks[bank][soundIndex].z)); #else @@ -1460,8 +1461,8 @@ static void update_game_sound(void) { if ((sSoundBanks[bank][soundIndex].soundBits & SOUNDARGS_MASK_SOUNDID) == (SOUND_MOVING_FLYING & SOUNDARGS_MASK_SOUNDID)) { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728( - 0x04020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32( + AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_freq_scale(bank, soundIndex) + ((f32) sSoundMovingSpeed[bank] / US_FLOAT(80.0))); #else @@ -1471,8 +1472,8 @@ static void update_game_sound(void) { #endif } else { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728( - 0x04020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32( + AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_freq_scale(bank, soundIndex) + ((f32) sSoundMovingSpeed[bank] / US_FLOAT(400.0))); #else @@ -1482,7 +1483,7 @@ static void update_game_sound(void) { #endif } #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad770(0x05020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x05, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_reverb(bank, soundIndex, channelIndex)); #else gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->reverb = @@ -1494,9 +1495,9 @@ static void update_game_sound(void) { // fallthrough case SOUND_BANK_MENU: #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728(0x02020000 | ((channelIndex & 0xff) << 8), 1); - func_802ad770(0x03020000 | ((channelIndex & 0xff) << 8), 64); - func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x02, SEQ_PLAYER_SFX, channelIndex, 0), 1); + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x03, SEQ_PLAYER_SFX, channelIndex, 0), 64); + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_freq_scale(bank, soundIndex)); #else gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = 1.0f; @@ -1509,16 +1510,14 @@ static void update_game_sound(void) { case SOUND_BANK_LUIGI_VOICE: case SOUND_BANK_WARIO_VOICE: #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad770(0x05020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x05, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_reverb(bank, soundIndex, channelIndex)); - func_802ad728(0x02020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x02, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_volume(bank, soundIndex, VOLUME_RANGE_UNK1)); - func_802ad770(0x03020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x03, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_pan(*sSoundBanks[bank][soundIndex].x, - *sSoundBanks[bank][soundIndex].z) - * 127.0f - + 0.5f); - func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), + *sSoundBanks[bank][soundIndex].z) * 127.0f + 0.5f); + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_freq_scale(bank, soundIndex)); #else gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = @@ -1539,16 +1538,14 @@ static void update_game_sound(void) { case SOUND_BANK_GENERAL2: case SOUND_BANK_OBJ2: #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad770(0x05020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x05, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_reverb(bank, soundIndex, channelIndex)); - func_802ad728(0x02020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x02, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_volume(bank, soundIndex, VOLUME_RANGE_UNK2)); - func_802ad770(0x03020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x03, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_pan(*sSoundBanks[bank][soundIndex].x, - *sSoundBanks[bank][soundIndex].z) - * 127.0f - + 0.5f); - func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), + *sSoundBanks[bank][soundIndex].z) * 127.0f + 0.5f); + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_freq_scale(bank, soundIndex)); #else gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->reverb = @@ -1605,8 +1602,8 @@ static void update_game_sound(void) { if (!(sSoundBanks[bank][soundIndex].soundBits & SOUND_CONSTANT_FREQUENCY)) { if (sSoundMovingSpeed[bank] > 8) { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728( - 0x02020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32( + AUDIO_CMD_ARGS(0x02, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_volume(bank, soundIndex, VOLUME_RANGE_UNK1)); #else value = get_sound_volume(bank, soundIndex, VOLUME_RANGE_UNK1); @@ -1615,7 +1612,7 @@ static void update_game_sound(void) { #endif } else { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728(0x02020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x02, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_volume(bank, soundIndex, VOLUME_RANGE_UNK1) * ((sSoundMovingSpeed[bank] + 8.0f) / 16)); #else @@ -1625,7 +1622,7 @@ static void update_game_sound(void) { #endif } #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad770(0x03020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x03, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_pan(*sSoundBanks[bank][soundIndex].x, *sSoundBanks[bank][soundIndex].z)); #else @@ -1637,8 +1634,8 @@ static void update_game_sound(void) { if ((sSoundBanks[bank][soundIndex].soundBits & SOUNDARGS_MASK_SOUNDID) == (SOUND_MOVING_FLYING & SOUNDARGS_MASK_SOUNDID)) { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728( - 0x04020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32( + AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_freq_scale(bank, soundIndex) + ((f32) sSoundMovingSpeed[bank] / US_FLOAT(80.0))); #else @@ -1648,8 +1645,8 @@ static void update_game_sound(void) { #endif } else { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728( - 0x04020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32( + AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_freq_scale(bank, soundIndex) + ((f32) sSoundMovingSpeed[bank] / US_FLOAT(400.0))); #else @@ -1659,7 +1656,7 @@ static void update_game_sound(void) { #endif } #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad770(0x05020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x05, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_reverb(bank, soundIndex, channelIndex)); #else gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->reverb = @@ -1671,9 +1668,9 @@ static void update_game_sound(void) { // fallthrough case SOUND_BANK_MENU: #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728(0x02020000 | ((channelIndex & 0xff) << 8), 1); - func_802ad770(0x03020000 | ((channelIndex & 0xff) << 8), 64); - func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x02, SEQ_PLAYER_SFX, channelIndex, 0), 1); + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x03, SEQ_PLAYER_SFX, channelIndex, 0), 64); + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_freq_scale(bank, soundIndex)); #else gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = 1.0f; @@ -1684,16 +1681,14 @@ static void update_game_sound(void) { case SOUND_BANK_ACTION: case SOUND_BANK_MARIO_VOICE: #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad770(0x05020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x05, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_reverb(bank, soundIndex, channelIndex)); - func_802ad728(0x02020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x02, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_volume(bank, soundIndex, VOLUME_RANGE_UNK1)); - func_802ad770(0x03020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x03, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_pan(*sSoundBanks[bank][soundIndex].x, - *sSoundBanks[bank][soundIndex].z) - * 127.0f - + 0.5f); - func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), + *sSoundBanks[bank][soundIndex].z) * 127.0f + 0.5f); + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_freq_scale(bank, soundIndex)); #else gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = @@ -1714,16 +1709,14 @@ static void update_game_sound(void) { case SOUND_BANK_GENERAL2: case SOUND_BANK_OBJ2: #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad770(0x05020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x05, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_reverb(bank, soundIndex, channelIndex)); - func_802ad728(0x02020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x02, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_volume(bank, soundIndex, VOLUME_RANGE_UNK2)); - func_802ad770(0x03020000 | ((channelIndex & 0xff) << 8), + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x03, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_pan(*sSoundBanks[bank][soundIndex].x, - *sSoundBanks[bank][soundIndex].z) - * 127.0f - + 0.5f); - func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), + *sSoundBanks[bank][soundIndex].z) * 127.0f + 0.5f); + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), get_sound_freq_scale(bank, soundIndex)); #else gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->reverb = @@ -1743,7 +1736,13 @@ static void update_game_sound(void) { // add custom pitch bend if (soundIndex < SOUND_INDEX_COUNT && sSoundBanks[bank][soundIndex].customFreqScale != 0) { +#if defined(VERSION_EU) || defined(VERSION_SH) + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x04, SEQ_PLAYER_SFX, channelIndex, 0), + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale + * sSoundBanks[bank][soundIndex].customFreqScale); +#else gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale *= sSoundBanks[bank][soundIndex].customFreqScale; +#endif } // Increment to the next channel that this bank owns @@ -1777,8 +1776,8 @@ static void seq_player_play_sequence(u8 player, u8 seqId, u16 arg2) { } #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad770(0x46000000 | ((u8)(u32) player) << 16, seqId & SEQ_VARIATION); - func_802ad74c(0x82000000 | ((u8)(u32) player) << 16 | ((u8)(seqId & SEQ_BASE_ID)) << 8, arg2); + queue_audio_cmd_s8(AUDIO_CMD_ARGS(0x46, player, 0, 0), seqId & SEQ_VARIATION); + queue_audio_cmd_u32(AUDIO_CMD_ARGS(0x82, player, seqId & SEQ_BASE_ID, 0), arg2); if (player == SEQ_PLAYER_LEVEL) { targetVolume = begin_background_music_fade(0); @@ -1798,7 +1797,7 @@ static void seq_player_play_sequence(u8 player, u8 seqId, u16 arg2) { gSequencePlayers[SEQ_PLAYER_LEVEL].fadeVolume = (f32) targetVolume / US_FLOAT(127.0); } } else { - func_8031D690(player, arg2); + seq_player_fade_from_zero_volume(player, arg2); } #endif } @@ -1811,12 +1810,12 @@ void seq_player_fade_out(u8 player, u16 fadeDuration) { #ifdef VERSION_EU u32 fd = fadeDuration; #else - s32 fd = fadeDuration; // will also match if we change function signature func_802ad74c to use s32 as arg1 + s32 fd = fadeDuration; // will also match if we change function signature queue_audio_cmd_u32 to use s32 as arg1 #endif if (!player) { sCurrentBackgroundMusicSeqId = SEQUENCE_NONE; } - func_802ad74c(0x83000000 | (player & 0xff) << 16, fd); + queue_audio_cmd_u32(AUDIO_CMD_ARGS(0x83, player, 0, 0), fd); #else if (player == SEQ_PLAYER_LEVEL) { sCurrentBackgroundMusicSeqId = SEQUENCE_NONE; @@ -1864,7 +1863,7 @@ static void func_8031F96C(u8 player) { && D_80360928[player][i].remainingFrames != 0) { D_80360928[player][i].current += D_80360928[player][i].velocity; #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad728(0x01000000 | (player & 0xff) << 16 | (i & 0xff) << 8, + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x01, player, i, 0), D_80360928[player][i].current); #else gSequencePlayers[player].channels[i]->volumeScale = D_80360928[player][i].current; @@ -1872,10 +1871,10 @@ static void func_8031F96C(u8 player) { D_80360928[player][i].remainingFrames--; if (D_80360928[player][i].remainingFrames == 0) { #if defined(VERSION_EU) - func_802ad728(0x01000000 | (player & 0xff) << 16 | (i & 0xff) << 8, + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x01, player, i, 0), FLOAT_CAST(D_80360928[player][i].target) / 127.0); #elif defined(VERSION_SH) - func_802ad728(0x01000000 | (player & 0xff) << 16 | (i & 0xff) << 8, + queue_audio_cmd_f32(AUDIO_CMD_ARGS(0x01, player, i, 0), FLOAT_CAST(D_80360928[player][i].target) / 127.0f); #else gSequencePlayers[player].channels[i]->volumeScale = @@ -2150,9 +2149,9 @@ void set_audio_muted(u8 muted) { for (i = 0; i < SEQUENCE_PLAYERS; i++) { #if defined(VERSION_EU) || defined(VERSION_SH) if (muted) - func_802ad74c(0xf1000000, 0); + queue_audio_cmd_u32(AUDIO_CMD_ARGS(0xf1, 0, 0, 0), 0); else - func_802ad74c(0xf2000000, 0); + queue_audio_cmd_u32(AUDIO_CMD_ARGS(0xf2, 0, 0, 0), 0); #else gSequencePlayers[i].muted = muted; #endif @@ -2426,6 +2425,8 @@ void play_music(u8 player, u16 seqArgs, u16 fadeTimer) { u8 priority = seqArgs >> 8; u8 i; u8 foundIndex = 0; + + //LOG_DEBUG("Playing music with arguments: %d, 0x%X, %d, %d", player, seqId, priority, fadeTimer); // Except for the background music player, we don't support queued // sequences. Just play them immediately, stopping any old sequence. @@ -2436,6 +2437,7 @@ void play_music(u8 player, u16 seqArgs, u16 fadeTimer) { // Abort if the queue is already full. if (sBackgroundMusicQueueSize == MAX_BACKGROUND_MUSIC_QUEUE_SIZE) { + LOG_DEBUG("Background music queue reached max size! Ignoring request to queue sequence %d.", seqId); return; } @@ -2449,6 +2451,7 @@ void play_music(u8 player, u16 seqArgs, u16 fadeTimer) { } else if (!gSequencePlayers[SEQ_PLAYER_LEVEL].enabled) { stop_background_music(sBackgroundMusicQueue[0].seqId); } + //LOG_DEBUG("Sequence 0x%X is already in the background music queue!", seqId); return; } } @@ -2465,6 +2468,7 @@ void play_music(u8 player, u16 seqArgs, u16 fadeTimer) { // one more entry in the queue. if (foundIndex == 0) { seq_player_play_sequence(SEQ_PLAYER_LEVEL, seqId, fadeTimer); + //LOG_DEBUG("Playing sequence 0x%X as it's first in the background music queue!", seqId); sBackgroundMusicQueueSize++; } @@ -2671,7 +2675,7 @@ void func_803210D4(u16 fadeDuration) { if (gSequencePlayers[SEQ_PLAYER_LEVEL].enabled == TRUE) { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad74c(0x83000000, fadeDuration); + queue_audio_cmd_u32(AUDIO_CMD_ARGS(0x83, 0, 0, 0), fadeDuration); #else seq_player_fade_to_zero_volume(SEQ_PLAYER_LEVEL, fadeDuration); #endif @@ -2679,7 +2683,7 @@ void func_803210D4(u16 fadeDuration) { if (gSequencePlayers[SEQ_PLAYER_ENV].enabled == TRUE) { #if defined(VERSION_EU) || defined(VERSION_SH) - func_802ad74c(0x83010000, fadeDuration); + queue_audio_cmd_u32(AUDIO_CMD_ARGS(0x83, SEQ_PLAYER_ENV, 0, 0), fadeDuration); #else seq_player_fade_to_zero_volume(SEQ_PLAYER_ENV, fadeDuration); #endif @@ -2799,7 +2803,7 @@ void sound_reset(u8 presetId) { disable_all_sequence_players(); sound_init(); #ifdef VERSION_SH - func_802ad74c(0xF2000000, 0); + queue_audio_cmd_u32(AUDIO_CMD_ARGS(0xF2, 0, 0, 0), 0); #endif #if defined(VERSION_JP) || defined(VERSION_US) audio_reset_session(&gAudioSessionPresets[presetId]); diff --git a/src/audio/external.h b/src/audio/external.h index 61f5c032..3330e5f7 100644 --- a/src/audio/external.h +++ b/src/audio/external.h @@ -10,6 +10,10 @@ // bit which may be read by the sequence script. #define SEQUENCE_ARGS(priority, seqId) ((priority << 8) | seqId) +#if defined(VERSION_EU) || defined(VERSION_SH) +#define AUDIO_CMD_ARGS(cmd, arg1, arg2, arg3) (((cmd & 0xff) << 24) | ((arg1 & 0xff) << 16) | ((arg2 & 0xff) << 8) | (arg3 & 0xff)) +#endif + #define SOUND_MODE_STEREO 0 #define SOUND_MODE_MONO 3 #define SOUND_MODE_HEADSET 1 @@ -21,6 +25,9 @@ extern s32 gAudioErrorFlags; extern f32 gGlobalSoundSource[3]; +extern const u8 sBackgroundMusicDefaultVolumeDefault[35]; +extern u8 sBackgroundMusicDefaultVolume[64]; + // defined in data.c, used by the game extern u32 gAudioRandom; diff --git a/src/audio/heap.c b/src/audio/heap.c index 0dbf90dc..bff3517f 100644 --- a/src/audio/heap.c +++ b/src/audio/heap.c @@ -8,6 +8,8 @@ #include "seqplayer.h" #include "effects.h" +#include "pc/debuglog.h" + #define ALIGN16(val) (((val) + 0xF) & ~0xF) struct PoolSplit { @@ -248,16 +250,23 @@ void discard_sequence(s32 seqId) { void *soundAlloc(struct SoundAllocPool *pool, u32 size) { #if defined(VERSION_EU) || defined(VERSION_SH) - u8 *start; - u8 *pos; u32 alignedSize = ALIGN16(size); + + if (pool == NULL || pool->cur == NULL) { + LOG_ERROR("Failed to allocate for sound pool! Pool is NULL!"); + return NULL; + } - start = pool->cur; + u8 *start = pool->cur; if (start + alignedSize <= pool->start + pool->size) { bzero(start, alignedSize); pool->cur += alignedSize; } else { - fprintf(stderr, "soundAlloc failed: tried to alloc %u bytes at %p (%i free)\n", ALIGN16(size), (void*)pool, pool->start + pool->size - pool->cur); + LOG_ERROR("Tried to alloc %u bytes at %p (%i free) and failed!", ALIGN16(size), (void*)pool, pool->start + pool->size - pool->cur); + return NULL; + } + if (start == NULL) { + LOG_ERROR("An unknown error occured when allocating %u bytes at %p (%i free)!", ALIGN16(size), (void*)pool, pool->start + pool->size - pool->cur); return NULL; } #ifdef VERSION_SH @@ -268,7 +277,7 @@ void *soundAlloc(struct SoundAllocPool *pool, u32 size) { u32 alignedSize = ALIGN16(size); if (pool == NULL || pool->cur == NULL) { - fprintf(stderr, "soundAlloc failed: pull was invalid\n"); + LOG_ERROR("Failed to allocate for sound pool! Pool is NULL!"); return NULL; } @@ -277,7 +286,7 @@ void *soundAlloc(struct SoundAllocPool *pool, u32 size) { bzero(start, alignedSize); pool->cur += alignedSize; } else { - fprintf(stderr, "soundAlloc failed: tried to alloc %u bytes at %p (%i free)\n", (unsigned int)ALIGN16(size), (void*)pool, (int)(pool->start + pool->size - pool->cur)); + LOG_ERROR("Tried to alloc %u bytes at %p (%i free) and failed!", (unsigned int)ALIGN16(size), (void*)pool, (int)(pool->start + pool->size - pool->cur)); return NULL; } return start; @@ -1199,6 +1208,7 @@ void audio_reset_session(void) { gAudioBufferParameters.samplesPerFrameTarget = ALIGN16(gAudioBufferParameters.frequency / gRefreshRate); gAudioBufferParameters.minAiBufferLength = gAudioBufferParameters.samplesPerFrameTarget - 0x10; gAudioBufferParameters.maxAiBufferLength = gAudioBufferParameters.samplesPerFrameTarget + 0x10; + //printf("samplesPerFrameTarget: %d, maxAiBufferLength: %d, minAiBufferLength: %d\n", gAudioBufferParameters.samplesPerFrameTarget, gAudioBufferParameters.maxAiBufferLength, gAudioBufferParameters.minAiBufferLength); #ifdef VERSION_SH gAudioBufferParameters.updatesPerFrame = (gAudioBufferParameters.samplesPerFrameTarget + 0x10) / 192 + 1; gAudioBufferParameters.samplesPerUpdate = (gAudioBufferParameters.samplesPerFrameTarget / gAudioBufferParameters.updatesPerFrame) & -8; diff --git a/src/audio/load.c b/src/audio/load.c index ecd22edd..4a26478d 100644 --- a/src/audio/load.c +++ b/src/audio/load.c @@ -1,3 +1,4 @@ +#include #include #include "data.h" @@ -32,7 +33,7 @@ void func_sh_802f6a9c(void); void func_sh_802f51d4(struct AudioBankSound *sound, struct AudioBank *memBase, struct PatchStruct *patchInfo); #endif -struct Note *gNotes; +struct Note *gNotes = NULL; #if defined(VERSION_EU) || defined(VERSION_SH) static u8 pad[4]; @@ -76,27 +77,31 @@ OSMesg gUnkMesgBufs2[0x10]; #endif OSMesgQueue gCurrAudioFrameDmaQueue; -OSMesg gCurrAudioFrameDmaMesgBufs[AUDIO_FRAME_DMA_QUEUE_SIZE]; -OSIoMesg gCurrAudioFrameDmaIoMesgBufs[AUDIO_FRAME_DMA_QUEUE_SIZE]; +OSMesg gCurrAudioFrameDmaMesgBufs[AUDIO_FRAME_DMA_QUEUE_SIZE] = { 0 }; +OSIoMesg gCurrAudioFrameDmaIoMesgBufs[AUDIO_FRAME_DMA_QUEUE_SIZE] = { 0 }; OSMesgQueue gAudioDmaMesgQueue; OSMesg gAudioDmaMesg; OSIoMesg gAudioDmaIoMesg; +#ifdef VERSION_EU +#define SAMPLE_DMA_COUNT 0x100 +#else #define SAMPLE_DMA_COUNT 0x90 +#endif #ifdef VERSION_SH -struct SharedDma *sSampleDmas; // sh: 0x803503D0 +struct SharedDma *sSampleDmas = NULL; // sh: 0x803503D0 #else -struct SharedDma sSampleDmas[SAMPLE_DMA_COUNT]; +struct SharedDma sSampleDmas[SAMPLE_DMA_COUNT] = { 0 }; #endif u32 gSampleDmaNumListItems; // sh: 0x803503D4 u32 sSampleDmaListSize1; // sh: 0x803503D8 u32 sUnused80226B40; // set to 0, never read, sh: 0x803503DC // Circular buffer of DMAs with ttl = 0. tail <= head, wrapping around mod 256. -u8 sSampleDmaReuseQueue1[256]; -u8 sSampleDmaReuseQueue2[256]; +u8 sSampleDmaReuseQueue1[256] = { 0 }; +u8 sSampleDmaReuseQueue2[256] = { 0 }; u8 sSampleDmaReuseQueueTail1; u8 sSampleDmaReuseQueueTail2; u8 sSampleDmaReuseQueueHead1; // sh: 0x803505E2 @@ -104,11 +109,11 @@ u8 sSampleDmaReuseQueueHead2; // sh: 0x803505E3 // bss correct up to here -ALSeqFile *gSeqFileHeader; -ALSeqFile *gAlCtlHeader; -ALSeqFile *gAlTbl; -u8 *gAlBankSets; -u16 gSequenceCount; +ALSeqFile *gSeqFileHeader = NULL; +ALSeqFile *gAlCtlHeader = NULL; +ALSeqFile *gAlTbl = NULL; +u8 *gAlBankSets = NULL; +u16 gSequenceCount = 0; struct CtlEntry *gCtlEntries; // sh: 0x803505F8 @@ -417,6 +422,9 @@ void init_sample_dma_buffers(UNUSED s32 arg0) { sDmaBufSize = 144 * 9 * 4; #endif + // Sanity check to prevent a buffer overflow into memory we're not supposed to touch. + assert(gSampleDmaNumListItems < SAMPLE_DMA_COUNT); + #if defined(VERSION_EU) || defined(VERSION_SH) for (s32 i = 0; i < gMaxSimultaneousNotes * 3 * gAudioBufferParameters.presetUnk4; i++) #else @@ -1850,8 +1858,10 @@ void audio_init() { } #ifdef VERSION_EU - D_EU_802298D0 = 20.03042f; - gRefreshRate = 50; + // We want the refresh rate to be 60 FPS on PC. + // We shouldn't need to worry about PAL specfic computers anymore. + D_EU_802298D0 = 16.713f; + gRefreshRate = 60; port_eu_init(); if (k) { } diff --git a/src/audio/playback.c b/src/audio/playback.c index 6f52d20b..1c2498fb 100644 --- a/src/audio/playback.c +++ b/src/audio/playback.c @@ -346,24 +346,21 @@ void process_notes(void) { f32 cap; #endif #endif - struct Note *note; + struct Note *note = NULL; #if defined(VERSION_EU) || defined(VERSION_SH) - struct NotePlaybackState *playbackState; - struct NoteSubEu *noteSubEu; + struct NotePlaybackState *playbackState = NULL; + struct NoteSubEu *noteSubEu = NULL; #ifndef VERSION_SH - UNUSED u8 pad[12]; u8 reverb; - UNUSED u8 pad3; u8 pan; #else - u8 pad[8]; struct ReverbInfo reverbInfo; #endif u8 bookOffset; #endif - struct NoteAttributes *attributes; + struct NoteAttributes *attributes = NULL; #if defined(VERSION_JP) || defined(VERSION_US) - struct AudioListItem *it; + struct AudioListItem *it = NULL; #endif s32 i; @@ -443,9 +440,6 @@ void process_notes(void) { #endif d: if (playbackState->priority != NOTE_PRIORITY_DISABLED) { -#ifdef VERSION_SH - if (1) {} -#endif noteSubEu = ¬e->noteSubEu; #ifdef VERSION_SH if (playbackState->unkSH34 >= 1 || noteSubEu->finished) { @@ -477,10 +471,6 @@ void process_notes(void) { goto skip; } } -#ifndef VERSION_SH - if (1) { - } -#endif } else if (playbackState->adsr.state == ADSR_STATE_DISABLED) { note_disable(note); audio_list_remove(¬e->listItem); diff --git a/src/audio/port_eu.c b/src/audio/port_eu.c index 91c62028..05572f08 100644 --- a/src/audio/port_eu.c +++ b/src/audio/port_eu.c @@ -4,6 +4,7 @@ #include "data.h" #include "seqplayer.h" #include "synthesis.h" +#include "pc/debuglog.h" #ifdef VERSION_EU @@ -27,12 +28,12 @@ extern u8 gAudioResetPresetIdToLoad; extern OSMesgQueue *OSMesgQueues[]; extern struct EuAudioCmd sAudioCmd[0x100]; -void func_8031D690(s32 player, FadeT fadeInTime); +void seq_player_fade_from_zero_volume(s32 player, FadeT fadeInTime); void seq_player_fade_to_zero_volume(s32 player, FadeT fadeOutTime); void port_eu_init_queues(void); void decrease_sample_dma_ttls(void); s32 audio_shut_down_and_reset_step(void); -void func_802ad7ec(u32); +void process_queued_audio_cmds(u32); struct SPTask *create_next_audio_frame_task(void) { return NULL; @@ -40,9 +41,10 @@ struct SPTask *create_next_audio_frame_task(void) { void create_next_audio_buffer(s16 *samples, u32 num_samples) { s32 writtenCmds; OSMesg msg; + gAudioFrameCount++; decrease_sample_dma_ttls(); - if (osRecvMesg(OSMesgQueues[2], &msg, 0) != -1) { + if (osRecvMesg(OSMesgQueues[2], &msg, OS_MESG_NOBLOCK) != -1) { gAudioResetPresetIdToLoad = (u8) (s32) msg; gAudioResetStatus = 5; } @@ -52,7 +54,7 @@ void create_next_audio_buffer(s16 *samples, u32 num_samples) { gAudioResetStatus = 0; } if (osRecvMesg(OSMesgQueues[1], &msg, OS_MESG_NOBLOCK) != -1) { - func_802ad7ec((u32) msg); + process_queued_audio_cmds((u32) msg); } synthesis_execute(gAudioCmdBuffers[0], &writtenCmds, samples, num_samples); gAudioRandom = ((gAudioRandom + gAudioFrameCount) * gAudioFrameCount); @@ -70,7 +72,8 @@ void eu_process_audio_cmd(struct EuAudioCmd *cmd) { case 0x82: case 0x88: load_sequence(cmd->u.s.arg1, cmd->u.s.arg2, cmd->u.s.arg3); - func_8031D690(cmd->u.s.arg1, cmd->u2.as_s32); + seq_player_fade_from_zero_volume(cmd->u.s.arg1, cmd->u2.as_s32); + //LOG_DEBUG("Playing sequence with arguments: %d, 0x%X, %d", cmd->u.s.arg1, cmd->u.s.arg2, cmd->u.s.arg3); break; case 0x83: @@ -107,8 +110,8 @@ void eu_process_audio_cmd(struct EuAudioCmd *cmd) { const char undefportcmd[] = "Undefined Port Command %d\n"; extern OSMesgQueue *OSMesgQueues[]; -extern u8 D_EU_80302010; -extern u8 D_EU_80302014; +extern u8 gQueuedAudioCmdCount; +extern u8 gLastQueuedAudioCmdCount; extern OSMesg OSMesg0; extern OSMesg OSMesg1; extern OSMesg OSMesg2; @@ -119,14 +122,14 @@ void seq_player_fade_to_zero_volume(s32 player, FadeT fadeOutTime) { fadeOutTime = 1; } gSequencePlayers[player].fadeVelocity = -(gSequencePlayers[player].fadeVolume / fadeOutTime); - gSequencePlayers[player].state = 2; + gSequencePlayers[player].state = 2; // These are reversed compared to USA, Which is 2 for a fade in and 1 for a fade out. gSequencePlayers[player].fadeRemainingFrames = fadeOutTime; } -void func_8031D690(s32 player, FadeT fadeInTime) { +void seq_player_fade_from_zero_volume(s32 player, FadeT fadeInTime) { if (fadeInTime != 0) { - gSequencePlayers[player].state = 1; + gSequencePlayers[player].state = 1; // These are reversed compared to USA, Which is 2 for a fade in and 1 for a fade out. gSequencePlayers[player].fadeTimerUnkEu = fadeInTime; gSequencePlayers[player].fadeRemainingFrames = fadeInTime; gSequencePlayers[player].fadeVolume = 0.0f; @@ -135,42 +138,42 @@ void func_8031D690(s32 player, FadeT fadeInTime) { } void port_eu_init_queues(void) { - D_EU_80302010 = 0; - D_EU_80302014 = 0; + gQueuedAudioCmdCount = 0; + gLastQueuedAudioCmdCount = 0; osCreateMesgQueue(OSMesgQueues[0], &OSMesg0, 1); osCreateMesgQueue(OSMesgQueues[1], &OSMesg1, 4); osCreateMesgQueue(OSMesgQueues[2], &OSMesg2, 1); osCreateMesgQueue(OSMesgQueues[3], &OSMesg3, 1); } -void func_802ad6f0(s32 arg0, s32 *arg1) { - struct EuAudioCmd *cmd = &sAudioCmd[D_EU_80302010 & 0xff]; +void queue_audio_cmd(s32 arg0, s32 *arg1) { + struct EuAudioCmd *cmd = &sAudioCmd[gQueuedAudioCmdCount & 0xff]; cmd->u.first = arg0; cmd->u2.as_u32 = *arg1; - D_EU_80302010++; + gQueuedAudioCmdCount++; } -void func_802ad728(u32 arg0, f32 arg1) { - func_802ad6f0(arg0, (s32*) &arg1); +void queue_audio_cmd_f32(u32 arg0, f32 arg1) { + queue_audio_cmd(arg0, (s32*) &arg1); } -void func_802ad74c(u32 arg0, u32 arg1) { - func_802ad6f0(arg0, (s32*) &arg1); +void queue_audio_cmd_u32(u32 arg0, u32 arg1) { + queue_audio_cmd(arg0, (s32*) &arg1); } -void func_802ad770(u32 arg0, s8 arg1) { +void queue_audio_cmd_s8(u32 arg0, s8 arg1) { s32 sp1C = arg1 << 24; - func_802ad6f0(arg0, &sp1C); + queue_audio_cmd(arg0, &sp1C); } -void func_802ad7a0(void) { +void send_process_queued_audio_cmds(void) { osSendMesg(OSMesgQueues[1], - (OSMesg)(u32)((D_EU_80302014 & 0xff) << 8 | (D_EU_80302010 & 0xff)), + (OSMesg)(u32)((gLastQueuedAudioCmdCount & 0xff) << 8 | (gQueuedAudioCmdCount & 0xff)), OS_MESG_NOBLOCK); - D_EU_80302014 = D_EU_80302010; + gLastQueuedAudioCmdCount = gQueuedAudioCmdCount; } -void func_802ad7ec(u32 arg0) { +void process_queued_audio_cmds(u32 arg0) { struct EuAudioCmd *cmd; struct SequencePlayer *seqPlayer; struct SequenceChannel *chan; diff --git a/src/audio/unk_shindou_audio_file.c b/src/audio/unk_shindou_audio_file.c index c2ed3159..ece801d4 100644 --- a/src/audio/unk_shindou_audio_file.c +++ b/src/audio/unk_shindou_audio_file.c @@ -259,7 +259,7 @@ void func_sh_802f6330(void) { } extern struct EuAudioCmd sAudioCmd[0x100]; // sAudioCmd, maybe? -void func_802ad6f0(s32 arg0, s32 *arg1) { // func_sh_802f63f8 +void queue_audio_cmd(s32 arg0, s32 *arg1) { // func_sh_802f63f8 struct EuAudioCmd *cmd = &sAudioCmd[D_SH_80350F18 & 0xff]; cmd->u.first = arg0; cmd->u2.as_u32 = *arg1; @@ -269,17 +269,17 @@ void func_802ad6f0(s32 arg0, s32 *arg1) { // func_sh_802f63f8 } } -void func_802ad728(u32 arg0, f32 arg1) { // func_sh_802f6450 - func_802ad6f0(arg0, (s32 *) &arg1); +void queue_audio_cmd_f32(u32 arg0, f32 arg1) { // func_sh_802f6450 + queue_audio_cmd(arg0, (s32 *) &arg1); } -void func_802ad74c(u32 arg0, u32 arg1) { // func_sh_802f6474 - func_802ad6f0(arg0, (s32 *) &arg1); +void queue_audio_cmd_u32(u32 arg0, u32 arg1) { // func_sh_802f6474 + queue_audio_cmd(arg0, (s32 *) &arg1); } -void func_802ad770(u32 arg0, s8 arg1) { // func_sh_802f6498 +void queue_audio_cmd_s8(u32 arg0, s8 arg1) { // func_sh_802f6498 s32 sp1C = arg1 << 24; - func_802ad6f0(arg0, &sp1C); + queue_audio_cmd(arg0, &sp1C); } char shindouDebugPrint133[] = "AudioSend: %d -> %d (%d)\n"; diff --git a/src/game/behaviors/camera_lakitu.inc.c b/src/game/behaviors/camera_lakitu.inc.c index 08929a27..eec0059b 100644 --- a/src/game/behaviors/camera_lakitu.inc.c +++ b/src/game/behaviors/camera_lakitu.inc.c @@ -51,8 +51,10 @@ void bhv_camera_lakitu_init(void) { sync_object_init_field(o, &o->oCameraLakituSpeed); sync_object_init_field(o, &o->oCameraLakituCircleRadius); sync_object_init_field(o, &o->oCameraLakituFinishedDialog); - sync_object_init_field(o, &o->oCameraLakituUnk104); sync_object_init_field(o, &o->oCameraLakituPitchVel); +#ifndef VERSION_JP + sync_object_init_field(o, &o->oCameraLakituUnk104); +#endif } } } diff --git a/src/game/camera.c b/src/game/camera.c index ff68369c..fc54fc27 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -6560,7 +6560,7 @@ struct CutsceneSplinePoint sIntroPipeToDialogPosition[] = { /** * Describes the spline that the camera's focus follows, during the same part of the intro as the above. */ -#ifdef VERSION_EU +/**#ifdef VERSION_EU struct CutsceneSplinePoint sIntroPipeToDialogFocus[] = { { 0, 25, { -1248, 450, 4596 } }, { 1, 71, { -1258, 485, 4606 } }, { 2, 71, { -1379, 344, 4769 } }, { 3, 22, { -1335, 366, 4815 } }, { 4, 23, { -1315, 370, 4450 } }, { 5, 40, { -1322, 333, 4591 } }, @@ -6568,7 +6568,7 @@ struct CutsceneSplinePoint sIntroPipeToDialogFocus[] = { { 9, 21, { -1321, 346, 4098 } }, { 0, 0, { -1328, 385, 4354 } }, { 0, 0, { -1328, 385, 4354 } }, { 0, 0, { -1328, 385, 4354 } }, { -1, 0, { -1328, 385, 4354 } } }; -#else +#else**/ struct CutsceneSplinePoint sIntroPipeToDialogFocus[] = { { 0, 20, { -1248, 450, 4596 } }, { 1, 59, { -1258, 485, 4606 } }, { 2, 59, { -1379, 344, 4769 } }, { 3, 20, { -1335, 366, 4815 } }, { 4, 23, { -1315, 370, 4450 } }, { 5, 40, { -1322, 333, 4591 } }, @@ -6576,7 +6576,7 @@ struct CutsceneSplinePoint sIntroPipeToDialogFocus[] = { { 9, 21, { -1321, 346, 4098 } }, { 0, 0, { -1328, 385, 4354 } }, { 0, 0, { -1328, 385, 4354 } }, { 0, 0, { -1328, 385, 4354 } }, { -1, 0, { -1328, 385, 4354 } } }; -#endif +//#endif struct CutsceneSplinePoint sEndingFlyToWindowPos[] = { { 0, 0, { -86, 876, 640 } }, { 1, 0, { -86, 876, 610 } }, { 2, 0, { -66, 945, 393 } }, @@ -6621,11 +6621,11 @@ struct CutsceneSplinePoint sEndingLookUpAtCastle[] = { }; struct CutsceneSplinePoint sEndingLookAtSkyFocus[] = { -#ifdef VERSION_EU - { 0, 50, { 484, 1368, -868 } }, { 0, 72, { 479, 1372, -872 } }, { 0, 50, { 351, 1817, -918 } }, -#else +//#ifdef VERSION_EU +// { 0, 50, { 484, 1368, -868 } }, { 0, 72, { 479, 1372, -872 } }, { 0, 50, { 351, 1817, -918 } }, +//#else { 0, 50, { 484, 1368, -888 } }, { 0, 72, { 479, 1372, -892 } }, { 0, 50, { 351, 1817, -918 } }, -#endif +//#endif { 0, 50, { 351, 1922, -598 } }, { 0, 0, { 636, 2027, -415 } }, { 0, 0, { 636, 2027, -415 } }, { -1, 0, { 636, 2027, -415 } } }; @@ -7543,15 +7543,15 @@ BAD_RETURN(s32) cutscene_ending_look_up_at_castle(UNUSED struct Camera *c) { BAD_RETURN(s32) cutscene_ending_peach_wakeup(struct Camera *c) { cutscene_event(cutscene_ending_reset_spline, c, 0, 0); cutscene_event(cutscene_ending_look_up_at_castle, c, 0, 0); -#ifdef VERSION_EU +/**#ifdef VERSION_EU cutscene_event(cutscene_ending_look_up_at_castle, c, 265, -1); cutscene_spawn_obj(7, 315); cutscene_spawn_obj(9, 355); -#else +#else**/ cutscene_event(cutscene_ending_look_up_at_castle, c, 250, -1); cutscene_spawn_obj(7, 300); cutscene_spawn_obj(9, 340); -#endif +//#endif vec3f_set(c->pos, -163.f, 978.f, -1082.f); player2_rotate_cam(c, -0x800, 0x2000, -0x2000, 0x2000); } @@ -7595,11 +7595,11 @@ BAD_RETURN(s32) cutscene_ending_kiss_here_we_go(struct Camera *c) { */ BAD_RETURN(s32) cutscene_ending_kiss(struct Camera *c) { cutscene_event(cutscene_ending_kiss_closeup, c, 0, 0); -#ifdef VERSION_EU +/**#ifdef VERSION_EU cutscene_event(cutscene_ending_kiss_here_we_go, c, 185, -1); -#else +#else**/ cutscene_event(cutscene_ending_kiss_here_we_go, c, 155, -1); -#endif +//#endif player2_rotate_cam(c, -0x800, 0x2000, -0x2000, 0x2000); } @@ -9779,16 +9779,17 @@ BAD_RETURN(s32) cutscene_intro_peach_fly_to_pipe(struct Camera *c) { #if defined(VERSION_US) || defined(VERSION_SH) cutscene_event(play_sound_intro_turn_on_hud, c, 818, 818); #elif defined(VERSION_EU) - cutscene_event(play_sound_intro_turn_on_hud, c, 673, 673); + //cutscene_event(play_sound_intro_turn_on_hud, c, 673, 673); + cutscene_event(play_sound_intro_turn_on_hud, c, 818, 818); #endif cutscene_spawn_obj(6, 1); cutscene_event(cutscene_intro_peach_start_flying_music, c, 0, 0); cutscene_event(cutscene_intro_peach_start_to_pipe_spline, c, 0, -1); -#ifdef VERSION_EU +/**#ifdef VERSION_EU cutscene_event(cutscene_intro_peach_clear_cutscene_status, c, 572, 572); -#else +#else**/ cutscene_event(cutscene_intro_peach_clear_cutscene_status, c, 717, 717); -#endif +//#endif clamp_pitch(c->pos, c->focus, 0x3B00, -0x3B00); sCutsceneVars[1].point[1] = 400.f; } @@ -10571,7 +10572,7 @@ BAD_RETURN(s32) cutscene_door_mode(struct Camera *c) { struct Cutscene sCutsceneEnding[] = { { cutscene_ending_mario_fall, 170 }, { cutscene_ending_mario_land, 70 }, -#ifdef VERSION_EU +/**#ifdef VERSION_EU { cutscene_ending_mario_land_closeup, 0x44 }, { cutscene_ending_stars_free_peach, 0x15c }, { cutscene_ending_peach_appears, 0x6d }, @@ -10580,7 +10581,7 @@ struct Cutscene sCutsceneEnding[] = { { cutscene_ending_peach_wakeup, 0x1a4 }, { cutscene_ending_dialog, 0x114 }, { cutscene_ending_kiss, 0x10b }, -#else +#else**/ { cutscene_ending_mario_land_closeup, 75 }, #ifdef VERSION_SH { cutscene_ending_stars_free_peach, 431 }, @@ -10598,7 +10599,7 @@ struct Cutscene sCutsceneEnding[] = { { cutscene_ending_dialog, 236 }, #endif { cutscene_ending_kiss, 245 }, -#endif +//#endif { cutscene_ending_cake_for_mario, CUTSCENE_LOOP }, { cutscene_ending_stop, 0 } }; @@ -10742,11 +10743,11 @@ struct Cutscene sCutsceneUnusedExit[] = { struct Cutscene sCutsceneIntroPeach[] = { { cutscene_intro_peach_letter, CUTSCENE_LOOP }, { cutscene_intro_peach_reset_fov, 35 }, -#ifdef VERSION_EU - { cutscene_intro_peach_fly_to_pipe, 675 }, -#else +//#ifdef VERSION_EU +// { cutscene_intro_peach_fly_to_pipe, 675 }, +//#else { cutscene_intro_peach_fly_to_pipe, 820 }, -#endif +//#endif { cutscene_intro_peach_mario_appears, 270 }, { cutscene_intro_peach_dialog, CUTSCENE_LOOP } }; diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index 212b4e6b..dda979aa 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -514,6 +514,9 @@ void str_ascii_to_dialog(const char* string, u8* dialog, u16 length) { } f32 get_generic_dialog_width(u8* dialog) { +#ifdef VERSION_JP + return 0; +#else f32 largestWidth = 0; f32 width = 0; u8* d = dialog; @@ -528,6 +531,7 @@ f32 get_generic_dialog_width(u8* dialog) { d++; } return largestWidth; +#endif } f32 get_generic_ascii_string_width(const char* ascii) { @@ -2881,9 +2885,11 @@ static u32 pause_castle_get_stars(s32 index) { static void render_pause_castle_course_name(const u8 *courseName, s16 x, s16 y) { s16 width = 0; +#ifndef VERSION_JP for (const u8 *c = courseName; *c != DIALOG_CHAR_TERMINATOR; c++) { width += gDialogCharWidths[*c]; } +#endif print_generic_string(x - width / 2, y, courseName); } @@ -2985,10 +2991,28 @@ void render_pause_castle_main_strings_extended(s16 x, s16 y) { gSPDisplayList(gDisplayListHead++, dl_ia_text_begin); gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); + + void **courseNameTbl = NULL; + +#ifdef VERSION_EU + switch (gInGameLanguage) { + case LANGUAGE_ENGLISH: + courseNameTbl = segmented_to_virtual(course_name_table_eu_en); + break; + case LANGUAGE_FRENCH: + courseNameTbl = segmented_to_virtual(course_name_table_eu_fr); + break; + case LANGUAGE_GERMAN: + courseNameTbl = segmented_to_virtual(course_name_table_eu_de); + break; + } +#else + courseNameTbl = segmented_to_virtual(seg2_course_name_table); +#endif // Main courses (0-14) if (gDialogLineNum < COURSE_STAGES_COUNT) { - const u8 *courseName = seg2_course_name_table[gDialogLineNum]; + const u8 *courseName = courseNameTbl[gDialogLineNum]; const u8 textCoin[] = { TEXT_COIN_X }; u8 textCoinCount[8]; render_pause_castle_course_name(courseName, 160, y + 30); @@ -3000,14 +3024,14 @@ void render_pause_castle_main_strings_extended(s16 x, s16 y) { // Secret courses (15-24) else if (gDialogLineNum >= COURSE_STAGES_COUNT && gDialogLineNum < INDEX_CASTLE_STARS) { - const u8 *courseName = seg2_course_name_table[gDialogLineNum]; + const u8 *courseName = courseNameTbl[gDialogLineNum]; render_pause_castle_course_name(courseName + 3, 160, y + 30); render_pause_castle_course_stars_extended(x + 20, y); } // Castle stars (25) else if (gDialogLineNum == INDEX_CASTLE_STARS) { - const u8 *courseName = seg2_course_name_table[COURSE_MAX]; + const u8 *courseName = courseNameTbl[COURSE_MAX]; const u8 textStar[] = { TEXT_STAR_X }; u8 textStarCount[8]; render_pause_castle_course_name(courseName + 3, 160, y + 30); @@ -3409,24 +3433,24 @@ void render_save_confirmation(s16 x, s16 y, s8 *index, s16 sp6e) #endif { #ifdef VERSION_EU - u8 textSaveAndContinueArr[][24] = { + u8 textSaveAndContinueArr[][30] = { { TEXT_SAVE_AND_CONTINUE }, { TEXT_SAVE_AND_CONTINUE_FR }, { TEXT_SAVE_AND_CONTINUE_DE } }; - u8 textSaveAndQuitArr[][22] = { + u8 textSaveAndQuitArr[][30] = { { TEXT_SAVE_AND_QUIT }, { TEXT_SAVE_AND_QUIT_FR }, { TEXT_SAVE_AND_QUIT_DE } }; - u8 textSaveExitGame[][26] = { // New function to exit game + u8 textSaveExitGame[][30] = { // New function to exit game { TEXT_SAVE_EXIT_GAME }, { TEXT_SAVE_EXIT_GAME_FR }, { TEXT_SAVE_EXIT_GAME_DE } }; - u8 textContinueWithoutSaveArr[][27] = { + u8 textContinueWithoutSaveArr[][30] = { { TEXT_CONTINUE_WITHOUT_SAVING }, { TEXT_CONTINUE_WITHOUT_SAVING_FR }, { TEXT_CONTINUE_WITHOUT_SAVING_DE } diff --git a/src/game/level_info.c b/src/game/level_info.c index 7409ce3e..7af399d9 100644 --- a/src/game/level_info.c +++ b/src/game/level_info.c @@ -6,16 +6,13 @@ #include "game/memory.h" #include "level_info.h" #include "level_table.h" +#include "save_file.h" #include "types.h" #include "pc/lua/utils/smlua_level_utils.h" #ifdef VERSION_EU -extern u8 *course_name_table_eu_en[]; -extern u8 *course_name_table_eu_fr[]; -extern u8 *course_name_table_eu_de[]; -extern u8 *act_name_table_eu_en[]; -extern u8 *act_name_table_eu_fr[]; -extern u8 *act_name_table_eu_de[]; +extern s32 gInGameLanguage; +#include "eu_translation.h" #else extern u8 *seg2_course_name_table[]; extern u8 *seg2_act_name_table[]; diff --git a/src/game/level_update.c b/src/game/level_update.c index 3a884a5d..b11c2692 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -278,7 +278,7 @@ void fade_into_special_warp(u32 arg, u32 color) { fadeout_music(190); play_transition(WARP_TRANSITION_FADE_INTO_COLOR, 0x10, color, color, color); - level_set_transition(30, NULL); + level_set_transition(16, NULL); warp_special(arg); } diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index b2897eab..e9eaab79 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -1880,7 +1880,8 @@ static void intro_cutscene_hide_hud_and_mario(struct MarioState *m) { } #ifdef VERSION_EU - #define TIMER_SPAWN_PIPE 47 + //#define TIMER_SPAWN_PIPE 47 + #define TIMER_SPAWN_PIPE 37 #else #define TIMER_SPAWN_PIPE 37 #endif @@ -1900,7 +1901,8 @@ static void intro_cutscene_peach_lakitu_scene(struct MarioState *m) { #undef TIMER_SPAWN_PIPE #ifdef VERSION_EU - #define TIMER_RAISE_PIPE 28 + //#define TIMER_RAISE_PIPE 28 + #define TIMER_RAISE_PIPE 38 #else #define TIMER_RAISE_PIPE 38 #endif @@ -2317,8 +2319,10 @@ static void end_peach_cutscene_summon_jumbo_star(struct MarioState *m) { } #if defined(VERSION_EU) - #define TIMER_FADE_IN_PEACH 201 - #define TIMER_DESCEND_PEACH 280 + //#define TIMER_FADE_IN_PEACH 201 + //#define TIMER_DESCEND_PEACH 280 + #define TIMER_FADE_IN_PEACH 276 + #define TIMER_DESCEND_PEACH 355 #elif defined(VERSION_SH) #define TIMER_FADE_IN_PEACH 276 #define TIMER_DESCEND_PEACH 400 @@ -2380,7 +2384,8 @@ static void end_peach_cutscene_spawn_peach(struct MarioState *m) { } #ifdef VERSION_EU - #define TIMER_RUN_TO_PEACH 531 + //#define TIMER_RUN_TO_PEACH 531 + #define TIMER_RUN_TO_PEACH 584 #else #define TIMER_RUN_TO_PEACH 584 #endif @@ -2532,8 +2537,10 @@ static void end_peach_cutscene_dialog_1(struct MarioState *m) { } #if defined(VERSION_EU) - #define TIMER_SOMETHING_SPECIAL 150 - #define TIMER_PEACH_KISS 260 + //#define TIMER_SOMETHING_SPECIAL 150 + //#define TIMER_PEACH_KISS 260 + #define TIMER_SOMETHING_SPECIAL 130 + #define TIMER_PEACH_KISS 200 #elif defined(VERSION_SH) #define TIMER_SOMETHING_SPECIAL 170 #define TIMER_PEACH_KISS 250 @@ -2848,9 +2855,12 @@ static s32 act_end_peach_cutscene(struct MarioState *m) { } #if defined(VERSION_EU) - #define TIMER_CREDITS_SHOW 51 - #define TIMER_CREDITS_PROGRESS 80 - #define TIMER_CREDITS_WARP 160 + //#define TIMER_CREDITS_SHOW 51 + //#define TIMER_CREDITS_PROGRESS 80 + //#define TIMER_CREDITS_WARP 160 + #define TIMER_CREDITS_SHOW 61 + #define TIMER_CREDITS_PROGRESS 90 + #define TIMER_CREDITS_WARP 200 #elif defined(VERSION_SH) #define TIMER_CREDITS_SHOW 61 #define TIMER_CREDITS_PROGRESS 90 diff --git a/src/game/memory.c b/src/game/memory.c index 61d34e10..b42a5a9f 100644 --- a/src/game/memory.c +++ b/src/game/memory.c @@ -134,7 +134,7 @@ void *main_pool_alloc(u32 size, u32 side) { } } if (addr == NULL) { - LOG_ERROR("Main pool alloc failed!"); + LOG_ERROR("Main pool failed to allocate memory of size 0x%X on side %d.", size, side); } return addr; } @@ -182,7 +182,7 @@ void *main_pool_realloc(void *addr, u32 size) { newAddr = main_pool_alloc(size, MEMORY_POOL_LEFT); } if (addr == NULL) { - LOG_ERROR("Main pool realloc failed!"); + LOG_ERROR("Main pool failed to reallocate memory of size 0x%X at %p!", size, addr); } return newAddr; } @@ -267,7 +267,7 @@ struct AllocOnlyPool *alloc_only_pool_init(u32 size, u32 side) { subPool->freePtr = (u8 *) addr + sizeof(struct AllocOnlyPool); } if (addr == NULL) { - LOG_ERROR("Alloc only pool init failed!"); + LOG_ERROR("Allocate only pool failed to initalize memory of size 0x%X on side %d.", size, side); } return subPool; } @@ -286,7 +286,7 @@ void *alloc_only_pool_alloc(struct AllocOnlyPool *pool, s32 size) { pool->usedSpace += size; } if (addr == NULL) { - LOG_ERROR("Alloc only pool alloc failed!"); + LOG_ERROR("Allocate only pool failed to allocate memory of size 0x%X on at pool %p.", size, pool); } return addr; } @@ -306,7 +306,7 @@ struct AllocOnlyPool *alloc_only_pool_resize(struct AllocOnlyPool *pool, u32 siz pool->totalSpace = size; } if (newPool == NULL) { - LOG_ERROR("Alloc only pool realloc failed!"); + LOG_ERROR("Allocate only pool failed to reallocate memory of size 0x%X on at pool %p.", size, pool); } return newPool; } @@ -335,7 +335,7 @@ struct MemoryPool *mem_pool_init(u32 size, u32 side) { block->size = pool->totalSpace; } if (addr == NULL) { - LOG_ERROR("Mem pool init failed!"); + LOG_ERROR("Memory pool failed to initalize memory of size 0x%X on side %d.", size, side); } return pool; } @@ -365,7 +365,7 @@ void *mem_pool_alloc(struct MemoryPool *pool, u32 size) { freeBlock = freeBlock->next; } if (addr == NULL) { - LOG_ERROR("Mem pool alloc failed!"); + LOG_ERROR("Memory pool failed to allocate memory of size 0x%X on at pool %p.", size, pool); } return addr; } @@ -420,7 +420,7 @@ void *alloc_display_list(u32 size) { gGfxPoolEnd -= size; ptr = gGfxPoolEnd; } else { - LOG_ERROR("Failed to alloc display list!"); + LOG_ERROR("Failed to allocate display list of size 0x%X!", size); } return ptr; } diff --git a/src/game/sound_init.c b/src/game/sound_init.c index 0d6352ee..704b6110 100644 --- a/src/game/sound_init.c +++ b/src/game/sound_init.c @@ -15,6 +15,7 @@ #include "sm64.h" #include "sound_init.h" #include "rumble_init.h" +#include "pc/debuglog.h" #define MUSIC_NONE 0xFFFF diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index 64964d4e..ec464c47 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -1120,7 +1120,9 @@ static struct LuaObjectField sObjectFields[LUA_OBJECT_FIELD_COUNT] = { { "oCameraLakituFinishedDialog", LVT_S32, offsetof(struct Object, oCameraLakituFinishedDialog), false, LOT_NONE }, { "oCameraLakituPitchVel", LVT_S16, offsetof(struct Object, oCameraLakituPitchVel), false, LOT_NONE }, { "oCameraLakituSpeed", LVT_F32, offsetof(struct Object, oCameraLakituSpeed), false, LOT_NONE }, +#ifndef VERSION_JP { "oCameraLakituUnk104", LVT_S32, offsetof(struct Object, oCameraLakituUnk104), false, LOT_NONE }, +#endif { "oCameraLakituYawVel", LVT_S16, offsetof(struct Object, oCameraLakituYawVel), false, LOT_NONE }, { "oCannonBarrelBubblesUnkF4", LVT_F32, offsetof(struct Object, oCannonBarrelBubblesUnkF4), false, LOT_NONE }, { "oCannonPlayerIndex", LVT_S32, offsetof(struct Object, oCannonPlayerIndex), false, LOT_NONE }, @@ -1160,7 +1162,9 @@ static struct LuaObjectField sObjectFields[LUA_OBJECT_FIELD_COUNT] = { { "oCloudFwooshMovementRadius", LVT_S16, offsetof(struct Object, oCloudFwooshMovementRadius), false, LOT_NONE }, { "oCloudGrowSpeed", LVT_F32, offsetof(struct Object, oCloudGrowSpeed), false, LOT_NONE }, { "oCoinUnk110", LVT_F32, offsetof(struct Object, oCoinUnk110), false, LOT_NONE }, +#ifndef VERSION_JP { "oCoinUnk1B0", LVT_S32, offsetof(struct Object, oCoinUnk1B0), false, LOT_NONE }, +#endif { "oCoinUnkF4", LVT_S32, offsetof(struct Object, oCoinUnkF4), false, LOT_NONE }, { "oCoinUnkF8", LVT_S32, offsetof(struct Object, oCoinUnkF8), false, LOT_NONE }, { "oCollisionDistance", LVT_F32, offsetof(struct Object, oCollisionDistance), false, LOT_NONE }, diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index 1508aa8f..5160001c 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -10,6 +10,7 @@ char gSmluaConstants[] = "" " return a['_pointer'] == b['_pointer'] and a['_lot'] == b['_lot'] and a['_pointer'] ~= nil and a['_lot'] ~= nil\n" " end\n" "}\n" +"\n" "_CPointer = {\n" " __index = function (t,k)\n" " return nil\n" @@ -23,6 +24,7 @@ char gSmluaConstants[] = "" " return a['_pointer'] == b['_pointer'] and a['_pointer'] ~= nil and a['_lvt'] ~= nil\n" " end\n" "}\n" +"\n" "_SyncTable = {\n" " __index = function (t,k)\n" " local _table = rawget(t, '_table')\n" @@ -34,6 +36,7 @@ char gSmluaConstants[] = "" " _set_sync_table_field(t, k, v)\n" " end\n" "}\n" +"\n" "_ReadOnlyTable = {\n" " __index = function (t,k)\n" " local _table = rawget(t, '_table')\n" @@ -42,6 +45,7 @@ char gSmluaConstants[] = "" " __newindex = function (t,k,v)\n" " end\n" "}\n" +"\n" "--- @param dest Vec3f\n" "--- @param src Vec3f\n" "--- @return Vec3f\n" @@ -51,6 +55,7 @@ char gSmluaConstants[] = "" " dest.z = src.z\n" " return dest\n" "end\n" +"\n" "--- @param dest Vec3f\n" "--- @param x number\n" "--- @param y number\n" @@ -62,6 +67,7 @@ char gSmluaConstants[] = "" " dest.z = z\n" " return dest\n" "end\n" +"\n" "--- @param dest Vec3f\n" "--- @param a Vec3f\n" "--- @return Vec3f\n" @@ -71,6 +77,7 @@ char gSmluaConstants[] = "" " dest.z = dest.z + a.z\n" " return dest\n" "end\n" +"\n" "--- @param dest Vec3f\n" "--- @param a Vec3f\n" "--- @param b Vec3f\n" @@ -81,6 +88,7 @@ char gSmluaConstants[] = "" " dest.z = a.z + b.z\n" " return dest\n" "end\n" +"\n" "--- @param dest Vec3f\n" "--- @param a number\n" "--- @return Vec3f\n" @@ -90,6 +98,7 @@ char gSmluaConstants[] = "" " dest.z = dest.z * a\n" " return dest\n" "end\n" +"\n" "--- @param dest Vec3f\n" "--- @return Vec3f\n" "function vec3f_normalize(dest)\n" @@ -97,23 +106,28 @@ char gSmluaConstants[] = "" " if divisor == 0 then\n" " return dest\n" " end\n" +"\n" " local invsqrt = 1.0 / divisor\n" " dest.x = dest.x * invsqrt\n" " dest.y = dest.y * invsqrt\n" " dest.z = dest.z * invsqrt\n" +"\n" " return dest\n" "end\n" +"\n" "--- @param a Vec3f\n" "--- @return number\n" "function vec3f_length(a)\n" " return math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z)\n" "end\n" +"\n" "--- @param a Vec3f\n" "--- @param b Vec3f\n" "--- @return number\n" "function vec3f_dot(a, b)\n" " return a.x * b.x + a.y * b.y + a.z * b.z\n" "end\n" +"\n" "--- @param vec Vec3f\n" "--- @param onto Vec3f\n" "--- @return Vec3f\n" @@ -125,6 +139,7 @@ char gSmluaConstants[] = "" " vec3f_mul(out, numerator / denominator)\n" " return out\n" "end\n" +"\n" "--- @param v1 Vec3f\n" "--- @param v2 Vec3f\n" "--- @return number\n" @@ -134,6 +149,7 @@ char gSmluaConstants[] = "" " dz = v1.z - v2.z\n" " return math.sqrt(dx * dx + dy * dy + dz * dz)\n" "end\n" +"\n" "--- @param dest Vec3s\n" "--- @param src Vec3s\n" "--- @return Vec3s\n" @@ -143,6 +159,7 @@ char gSmluaConstants[] = "" " dest.z = src.z\n" " return dest\n" "end\n" +"\n" "--- @param dest Vec3s\n" "--- @param x number\n" "--- @param y number\n" @@ -154,6 +171,7 @@ char gSmluaConstants[] = "" " dest.z = z\n" " return dest\n" "end\n" +"\n" "--- @param dest Vec3s\n" "--- @param a Vec3s\n" "--- @return Vec3s\n" @@ -163,6 +181,7 @@ char gSmluaConstants[] = "" " dest.z = dest.z + a.z\n" " return dest\n" "end\n" +"\n" "--- @param dest Vec3s\n" "--- @param a Vec3s\n" "--- @param b Vec3s\n" @@ -173,6 +192,7 @@ char gSmluaConstants[] = "" " dest.z = a.z + b.z\n" " return dest\n" "end\n" +"\n" "--- @param dest Vec3s\n" "--- @param a number\n" "--- @return Vec3s\n" @@ -182,6 +202,7 @@ char gSmluaConstants[] = "" " dest.z = dest.z * a\n" " return dest\n" "end\n" +"\n" "--- @param v1 Vec3s\n" "--- @param v2 Vec3s\n" "--- @return number\n" @@ -191,6 +212,7 @@ char gSmluaConstants[] = "" " dz = v1.z - v2.z\n" " return math.sqrt(dx * dx + dy * dy + dz * dz)\n" "end\n" +"\n" "--- @param current number\n" "--- @param target number\n" "--- @param inc number\n" @@ -210,6 +232,7 @@ char gSmluaConstants[] = "" " end\n" " return current;\n" "end\n" +"\n" "--- @param current number\n" "--- @param target number\n" "--- @param inc number\n" @@ -227,6 +250,7 @@ char gSmluaConstants[] = "" " current = target\n" " end\n" " end\n" +"\n" " -- keep within 32 bits\n" " if current > 2147483647 then\n" " current = -2147483648 + (current - 2147483647)\n" @@ -235,6 +259,7 @@ char gSmluaConstants[] = "" " end\n" " return current;\n" "end\n" +"\n" "--- @param bank number\n" "--- @param soundID number\n" "--- @param priority number\n" @@ -244,9 +269,11 @@ char gSmluaConstants[] = "" " if flags == nil then flags = 0 end\n" " return (bank << 28) | (soundID << 16) | (priority << 8) | flags | SOUND_STATUS_WAITING\n" "end\n" +"\n" "-------------\n" "-- courses --\n" "-------------\n" +"\n" "--- @type integer\n" "COURSE_NONE = 0\n" "--- @type integer\n" diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index ac697a1f..b9c5a493 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -5298,6 +5298,7 @@ int smlua_func_bhv_platform_on_track_update(UNUSED lua_State* L) { return 1; } +#ifndef VERSION_JP int smlua_func_bhv_play_music_track_when_touched_loop(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -5312,6 +5313,7 @@ int smlua_func_bhv_play_music_track_when_touched_loop(UNUSED lua_State* L) { return 1; } +#endif int smlua_func_bhv_pokey_body_part_update(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -14171,6 +14173,7 @@ int smlua_func_play_flip_sounds(lua_State* L) { return 1; } +#ifndef VERSION_JP int smlua_func_play_knockback_sound(lua_State* L) { if (L == NULL) { return 0; } @@ -14188,6 +14191,7 @@ int smlua_func_play_knockback_sound(lua_State* L) { return 1; } +#endif int smlua_func_should_get_stuck_in_ground(lua_State* L) { if (L == NULL) { return 0; } @@ -22913,6 +22917,7 @@ int smlua_func_cur_obj_spawn_particles(lua_State* L) { return 1; } +#ifndef VERSION_JP int smlua_func_cur_obj_spawn_star_at_y_offset(lua_State* L) { if (L == NULL) { return 0; } @@ -22936,6 +22941,7 @@ int smlua_func_cur_obj_spawn_star_at_y_offset(lua_State* L) { return 1; } +#endif int smlua_func_cur_obj_start_cam_event(lua_State* L) { if (L == NULL) { return 0; } @@ -29704,7 +29710,9 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "bhv_platform_normals_init", smlua_func_bhv_platform_normals_init); smlua_bind_function(L, "bhv_platform_on_track_init", smlua_func_bhv_platform_on_track_init); smlua_bind_function(L, "bhv_platform_on_track_update", smlua_func_bhv_platform_on_track_update); +#ifndef VERSION_JP smlua_bind_function(L, "bhv_play_music_track_when_touched_loop", smlua_func_bhv_play_music_track_when_touched_loop); +#endif smlua_bind_function(L, "bhv_pokey_body_part_update", smlua_func_bhv_pokey_body_part_update); smlua_bind_function(L, "bhv_pokey_update", smlua_func_bhv_pokey_update); smlua_bind_function(L, "bhv_pole_base_loop", smlua_func_bhv_pole_base_loop); @@ -30203,7 +30211,9 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "mario_execute_airborne_action", smlua_func_mario_execute_airborne_action); smlua_bind_function(L, "play_far_fall_sound", smlua_func_play_far_fall_sound); smlua_bind_function(L, "play_flip_sounds", smlua_func_play_flip_sounds); +#ifndef VERSION_JP smlua_bind_function(L, "play_knockback_sound", smlua_func_play_knockback_sound); +#endif smlua_bind_function(L, "should_get_stuck_in_ground", smlua_func_should_get_stuck_in_ground); smlua_bind_function(L, "update_air_with_turn", smlua_func_update_air_with_turn); smlua_bind_function(L, "update_air_without_turn", smlua_func_update_air_without_turn); @@ -30607,7 +30617,9 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "cur_obj_spawn_loot_blue_coin", smlua_func_cur_obj_spawn_loot_blue_coin); smlua_bind_function(L, "cur_obj_spawn_loot_coin_at_mario_pos", smlua_func_cur_obj_spawn_loot_coin_at_mario_pos); smlua_bind_function(L, "cur_obj_spawn_particles", smlua_func_cur_obj_spawn_particles); +#ifndef VERSION_JP smlua_bind_function(L, "cur_obj_spawn_star_at_y_offset", smlua_func_cur_obj_spawn_star_at_y_offset); +#endif smlua_bind_function(L, "cur_obj_start_cam_event", smlua_func_cur_obj_start_cam_event); smlua_bind_function(L, "cur_obj_unhide", smlua_func_cur_obj_unhide); smlua_bind_function(L, "cur_obj_unrender_and_reset_state", smlua_func_cur_obj_unrender_and_reset_state); diff --git a/src/pc/lua/utils/smlua_audio_utils.c b/src/pc/lua/utils/smlua_audio_utils.c index 2628d183..37288778 100644 --- a/src/pc/lua/utils/smlua_audio_utils.c +++ b/src/pc/lua/utils/smlua_audio_utils.c @@ -1,4 +1,5 @@ #include "types.h" +#include "seq_ids.h" #include "audio/external.h" #include "game/camera.h" #include "engine/math_util.h" @@ -45,7 +46,17 @@ static void smlua_audio_utils_reset(struct AudioOverride* override) { void smlua_audio_utils_reset_all(void) { audio_init(); for (s32 i = 0; i < MAX_AUDIO_OVERRIDE; i++) { +#ifdef VERSION_EU + if (sAudioOverrides[i].enabled) { + if (i >= SEQ_EVENT_CUTSCENE_LAKITU) { + sBackgroundMusicDefaultVolume[i] = 75; + return; + } + sBackgroundMusicDefaultVolume[i] = sBackgroundMusicDefaultVolumeDefault[i]; + } +#else if (sAudioOverrides[i].enabled) { sound_reset_background_music_default_volume(i); } +#endif smlua_audio_utils_reset(&sAudioOverrides[i]); } } @@ -123,7 +134,11 @@ void smlua_audio_utils_replace_sequence(u8 sequenceId, u8 bankId, u8 defaultVolu 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 return; } } diff --git a/src/pc/lua/utils/smlua_text_utils.c b/src/pc/lua/utils/smlua_text_utils.c index a95e3c7e..03868025 100644 --- a/src/pc/lua/utils/smlua_text_utils.c +++ b/src/pc/lua/utils/smlua_text_utils.c @@ -3,8 +3,14 @@ #include "course_table.h" #include "game/memory.h" #include "game/ingame_menu.h" +#include "game/save_file.h" #include "game/segment2.h" +#ifdef VERSION_EU +extern s32 gInGameLanguage; +#include "eu_translation.h" +#endif + static bool sReplacedDialog[DIALOG_COUNT] = { 0 }; static bool sReplacedCourseName[COURSE_COUNT+2] = { 0 }; static bool sReplacedActName[(COURSE_RR+2)*6] = { 0 }; @@ -17,35 +23,93 @@ static u8* smlua_text_utils_convert(const char* str) { } void smlua_text_utils_reset_all(void) { - void **dialogTable = segmented_to_virtual(seg2_dialog_table); + void **dialogTable = NULL; + void **actNameTbl = NULL; + void **courseNameTbl = NULL; + void **dialogTableOrg = NULL; + void **actNameTblOrg = NULL; + void **courseNameTblOrg = NULL; + +#ifdef VERSION_EU + switch (gInGameLanguage) { + case LANGUAGE_ENGLISH: + dialogTable = segmented_to_virtual(dialog_table_eu_en); + actNameTbl = segmented_to_virtual(act_name_table_eu_en); + courseNameTbl = segmented_to_virtual(course_name_table_eu_en); + dialogTableOrg = segmented_to_virtual(dialog_table_eu_en_original); + actNameTblOrg = segmented_to_virtual(act_name_table_eu_en_original); + courseNameTblOrg = segmented_to_virtual(course_name_table_eu_en_original); + break; + case LANGUAGE_FRENCH: + dialogTable = segmented_to_virtual(dialog_table_eu_fr); + actNameTbl = segmented_to_virtual(act_name_table_eu_fr); + courseNameTbl = segmented_to_virtual(course_name_table_eu_fr); + dialogTableOrg = segmented_to_virtual(dialog_table_eu_fr_original); + actNameTblOrg = segmented_to_virtual(act_name_table_eu_fr_original); + courseNameTblOrg = segmented_to_virtual(course_name_table_eu_fr_original); + break; + case LANGUAGE_GERMAN: + dialogTable = segmented_to_virtual(dialog_table_eu_de); + actNameTbl = segmented_to_virtual(act_name_table_eu_de); + courseNameTbl = segmented_to_virtual(course_name_table_eu_de); + dialogTableOrg = segmented_to_virtual(dialog_table_eu_de_original); + actNameTblOrg = segmented_to_virtual(act_name_table_eu_de_original); + courseNameTblOrg = segmented_to_virtual(course_name_table_eu_de_original); + break; + } +#else + dialogTable = segmented_to_virtual(seg2_dialog_table); + actNameTbl = segmented_to_virtual(seg2_act_name_table); + courseNameTbl = segmented_to_virtual(seg2_course_name_table); + dialogTableOrg = segmented_to_virtual(seg2_dialog_original); + actNameTblOrg = segmented_to_virtual(seg2_act_name_table_original); + courseNameTblOrg = segmented_to_virtual(seg2_course_name_table_original); +#endif for (s32 i = 0; i < DIALOG_COUNT; i++) { if (!sReplacedDialog[i]) { continue; } struct DialogEntry *dialog = segmented_to_virtual(dialogTable[i]); free((u8*)dialog->str); - dialog->str = seg2_dialog_original[i]; + dialog->str = dialogTableOrg[i]; sReplacedDialog[i] = false; } for (s32 i = 0; i < COURSE_COUNT+2; i++) { if (!sReplacedCourseName[i]) { continue; } - free((u8*)seg2_course_name_table[i]); - seg2_course_name_table[i] = seg2_course_name_table_original[i]; + free((u8*)courseNameTbl[i]); + courseNameTbl[i] = segmented_to_virtual(courseNameTblOrg[i]); sReplacedCourseName[i] = false; } for (s32 i = 0; i < (COURSE_RR+2)*6; i++) { if (!sReplacedActName[i]) { continue; } - free((u8*)seg2_act_name_table[i]); - seg2_act_name_table[i] = seg2_act_name_table_original[i]; + free((u8*)actNameTbl[i]); + actNameTbl[i] = segmented_to_virtual(actNameTblOrg[i]); sReplacedActName[i] = false; } } void smlua_text_utils_dialog_replace(enum DialogId dialogId, UNUSED u32 unused, s8 linesPerBox, s16 leftOffset, s16 width, const char* str) { if (dialogId >= DIALOG_COUNT) { return; } + + void **dialogTable = NULL; + +#ifdef VERSION_EU + switch (gInGameLanguage) { + case LANGUAGE_ENGLISH: + dialogTable = segmented_to_virtual(dialog_table_eu_en); + break; + case LANGUAGE_FRENCH: + dialogTable = segmented_to_virtual(dialog_table_eu_fr); + break; + case LANGUAGE_GERMAN: + dialogTable = segmented_to_virtual(dialog_table_eu_de); + break; + } +#else + dialogTable = segmented_to_virtual(seg2_dialog_table); +#endif - void **dialogTable = segmented_to_virtual(seg2_dialog_table); struct DialogEntry *dialog = segmented_to_virtual(dialogTable[dialogId]); if (sReplacedDialog[dialogId]) { @@ -63,12 +127,35 @@ void smlua_text_utils_dialog_replace(enum DialogId dialogId, UNUSED u32 unused, 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) { if (courseNum <= 0 || courseNum > COURSE_RR) { return; } s16 courseOffset = courseNum - 1; + + void **actNameTbl = NULL; + void **courseNameTbl = NULL; + +#ifdef VERSION_EU + switch (gInGameLanguage) { + case LANGUAGE_ENGLISH: + actNameTbl = segmented_to_virtual(act_name_table_eu_en); + courseNameTbl = segmented_to_virtual(course_name_table_eu_en); + break; + case LANGUAGE_FRENCH: + actNameTbl = segmented_to_virtual(act_name_table_eu_fr); + courseNameTbl = segmented_to_virtual(course_name_table_eu_fr); + break; + case LANGUAGE_GERMAN: + actNameTbl = segmented_to_virtual(act_name_table_eu_de); + courseNameTbl = segmented_to_virtual(course_name_table_eu_de); + break; + } +#else + actNameTbl = segmented_to_virtual(seg2_act_name_table); + courseNameTbl = segmented_to_virtual(seg2_course_name_table); +#endif // replace course name if (sReplacedCourseName[courseOffset]) { - free(seg2_course_name_table[courseOffset]); + free(courseNameTbl[courseOffset]); } - seg2_course_name_table[courseOffset] = smlua_text_utils_convert(courseName); + courseNameTbl[courseOffset] = smlua_text_utils_convert(courseName); sReplacedCourseName[courseOffset] = true; // replace act names @@ -77,10 +164,10 @@ void smlua_text_utils_course_acts_replace(s16 courseNum, const char* courseName, s32 index = (courseOffset * 6 + i); if (sReplacedActName[index]) { - free(seg2_act_name_table[index]); + free(actNameTbl[index]); } - seg2_act_name_table[index] = smlua_text_utils_convert(newActs[i]); + actNameTbl[index] = smlua_text_utils_convert(newActs[i]); sReplacedActName[index] = true; } } @@ -88,35 +175,89 @@ void smlua_text_utils_course_acts_replace(s16 courseNum, const char* courseName, void smlua_text_utils_secret_star_replace(s16 courseNum, const char* courseName) { if (courseNum <= COURSE_RR || courseNum > COURSE_COUNT) { return; } s16 courseOffset = courseNum - 1; + + void **courseNameTbl = NULL; + +#ifdef VERSION_EU + switch (gInGameLanguage) { + case LANGUAGE_ENGLISH: + courseNameTbl = segmented_to_virtual(course_name_table_eu_en); + break; + case LANGUAGE_FRENCH: + courseNameTbl = segmented_to_virtual(course_name_table_eu_fr); + break; + case LANGUAGE_GERMAN: + courseNameTbl = segmented_to_virtual(course_name_table_eu_de); + break; + } +#else + courseNameTbl = segmented_to_virtual(seg2_course_name_table); +#endif if (sReplacedCourseName[courseOffset]) { - free(seg2_course_name_table[courseOffset]); + free(courseNameTbl[courseOffset]); } - seg2_course_name_table[courseOffset] = smlua_text_utils_convert(courseName); + courseNameTbl[courseOffset] = smlua_text_utils_convert(courseName); sReplacedCourseName[courseOffset] = true; } void smlua_text_utils_castle_secret_stars_replace(const char* name) { s16 courseOffset = COURSE_COUNT; + + void **courseNameTbl = NULL; + +#ifdef VERSION_EU + switch (gInGameLanguage) { + case LANGUAGE_ENGLISH: + courseNameTbl = segmented_to_virtual(course_name_table_eu_en); + break; + case LANGUAGE_FRENCH: + courseNameTbl = segmented_to_virtual(course_name_table_eu_fr); + break; + case LANGUAGE_GERMAN: + courseNameTbl = segmented_to_virtual(course_name_table_eu_de); + break; + } +#else + courseNameTbl = segmented_to_virtual(seg2_course_name_table); +#endif if (sReplacedCourseName[courseOffset]) { - free(seg2_course_name_table[courseOffset]); + free(courseNameTbl[courseOffset]); } - seg2_course_name_table[courseOffset] = smlua_text_utils_convert(name); + courseNameTbl[courseOffset] = smlua_text_utils_convert(name); sReplacedCourseName[courseOffset] = true; } void smlua_text_utils_extra_text_replace(s16 index, const char* text) { if (index < 0 || index > 6) { return; } index = (COURSE_RR * 6 + index); + + void **actNameTbl = NULL; + +#ifdef VERSION_EU + switch (gInGameLanguage) { + case LANGUAGE_ENGLISH: + actNameTbl = segmented_to_virtual(act_name_table_eu_en); + break; + case LANGUAGE_FRENCH: + actNameTbl = segmented_to_virtual(act_name_table_eu_fr); + break; + case LANGUAGE_GERMAN: + actNameTbl = segmented_to_virtual(act_name_table_eu_de); + break; + } +#else + actNameTbl = segmented_to_virtual(seg2_act_name_table); +#endif if (sReplacedActName[index]) { - free(seg2_act_name_table[index]); + free(actNameTbl[index]); } - seg2_act_name_table[index] = smlua_text_utils_convert(text); + actNameTbl[index] = smlua_text_utils_convert(text); sReplacedActName[index] = true; } diff --git a/src/pc/network/version.c b/src/pc/network/version.c index a820a6ab..98b51f49 100644 --- a/src/pc/network/version.c +++ b/src/pc/network/version.c @@ -7,9 +7,9 @@ static char sLocalVersionString[MAX_LOCAL_VERSION_LENGTH] = { 0 }; char* get_version(void) { if (MINOR_VERSION_NUMBER > 0) { - snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER); + snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %d.%d %s", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER, VERSION_REGION); } else { - snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %d", VERSION_TEXT, VERSION_NUMBER); + snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %d %s", VERSION_TEXT, VERSION_NUMBER, VERSION_REGION); } return sVersionString; } @@ -18,6 +18,6 @@ char* get_version_local(void) { if (PATCH_VERSION_NUMBER <= 0) { return get_version(); } - snprintf(sLocalVersionString, MAX_LOCAL_VERSION_LENGTH, "%s %d.%d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER, PATCH_VERSION_NUMBER); + snprintf(sLocalVersionString, MAX_LOCAL_VERSION_LENGTH, "%s %d.%d.%d %s", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER, PATCH_VERSION_NUMBER, VERSION_REGION); return sLocalVersionString; } diff --git a/src/pc/network/version.h b/src/pc/network/version.h index 06b803cc..0785b2e6 100644 --- a/src/pc/network/version.h +++ b/src/pc/network/version.h @@ -6,8 +6,18 @@ #define MINOR_VERSION_NUMBER 1 #define PATCH_VERSION_NUMBER 0 -#define MAX_VERSION_LENGTH 28 -#define MAX_LOCAL_VERSION_LENGTH 32 +#if defined(VERSION_JP) + #define VERSION_REGION "JP" +#elif defined(VERSION_EU) + #define VERSION_REGION "EU" +#elif defined(VERSION_SH) + #define VERSION_REGION "SH" +#else + #define VERSION_REGION "US" +#endif + +#define MAX_VERSION_LENGTH 32 +#define MAX_LOCAL_VERSION_LENGTH 36 char* get_version(void); char* get_version_local(void); diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index cc8a5b09..9f73f6e8 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -110,8 +110,8 @@ void send_display_list(struct SPTask *spTask) { } #ifdef VERSION_EU -#define SAMPLES_HIGH 656 -#define SAMPLES_LOW 640 +#define SAMPLES_HIGH 560 // gAudioBufferParameters.maxAiBufferLength +#define SAMPLES_LOW 528 // gAudioBufferParameters.minAiBufferLength #else #define SAMPLES_HIGH 544 #define SAMPLES_LOW 528