diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_ai_script_commands.c | 2 | ||||
-rw-r--r-- | src/battle_main.c | 97 | ||||
-rw-r--r-- | src/berry_blender.c | 2 | ||||
-rw-r--r-- | src/data/graphics.c | 8 | ||||
-rw-r--r-- | src/debug/mori_debug_menu.c | 6 | ||||
-rw-r--r-- | src/debug/nakamura_debug_menu.c | 20 | ||||
-rw-r--r-- | src/debug/nohara_debug_menu.c | 257 | ||||
-rw-r--r-- | src/debug/start_menu_debug.c | 144 | ||||
-rw-r--r-- | src/debug/tomomichi_debug_menu.c | 57 | ||||
-rw-r--r-- | src/debug/watanabe_debug_menu.c | 19 | ||||
-rw-r--r-- | src/main.c | 11 | ||||
-rw-r--r-- | src/pokemon_1.c | 3 | ||||
-rw-r--r-- | src/pokemon_summary_screen.c | 63 | ||||
-rw-r--r-- | src/roulette.c | 45 | ||||
-rw-r--r-- | src/save.c | 4 | ||||
-rw-r--r-- | src/save_failed_screen.c | 4 | ||||
-rw-r--r-- | src/slot_machine.c | 4 | ||||
-rw-r--r-- | src/text.c | 9 |
18 files changed, 568 insertions, 187 deletions
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index bf5444cf6..956cc2f6e 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -334,7 +334,7 @@ void BattleAI_SetupAIData(void) AI_THINKING_STRUCT->aiFlags = 0x20000000; else if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) AI_THINKING_STRUCT->aiFlags = 0x80000000; -#ifdef GERMAN +#if GERMAN || (ENGLISH && DEBUG && REVISION == 0) else if (gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER) || gTrainerBattleOpponent == SECRET_BASE_OPPONENT) AI_THINKING_STRUCT->aiFlags = 7; #endif diff --git a/src/battle_main.c b/src/battle_main.c index 721aa7f9f..b34beeb98 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -1378,7 +1378,7 @@ void debug_sub_8011EA0(u8); void debug_sub_8012294(void); void debug_sub_80123D8(u8); void debug_sub_8012540(void); -void debug_nullsub_3(void); +void debug_ShowCurrentAnimAudioOptions(void); void debug_sub_80125A0(void); void debug_sub_80125E4(void); void debug_sub_8012628(void); @@ -1478,7 +1478,7 @@ void debug_sub_80108B8(void) debug_sub_8012294(); debug_sub_80123D8(gUnknown_Debug_030043A4 * 5); debug_sub_8012540(); - debug_nullsub_3(); + debug_ShowCurrentAnimAudioOptions(); gUnknown_Debug_030043A8 = 0; debug_sub_80125A0(); if (gUnknown_Debug_2023A76[0][0x22] == 8) @@ -1612,7 +1612,7 @@ void debug_sub_8010CAC(void) gSaveBlock2.optionsBattleSceneOff = (r5 & 1); gSaveBlock2.optionsSound = (r5 & 2) >> 1; SetPokemonCryStereo(gSaveBlock2.optionsSound); - debug_nullsub_3(); + debug_ShowCurrentAnimAudioOptions(); } } if (gMain.newKeysRaw == START_BUTTON) @@ -1690,7 +1690,7 @@ void debug_sub_8010CAC(void) debug_sub_8011E5C(); debug_sub_8011E74(); debug_sub_8012540(); - debug_nullsub_3(); + debug_ShowCurrentAnimAudioOptions(); debug_sub_80123D8(gUnknown_Debug_030043A4 * 5); break; case 32: @@ -1698,7 +1698,7 @@ void debug_sub_8010CAC(void) debug_sub_8011E5C(); debug_sub_8011E74(); debug_sub_8012540(); - debug_nullsub_3(); + debug_ShowCurrentAnimAudioOptions(); debug_sub_80123D8(gUnknown_Debug_030043A4 * 5); break; case 33: @@ -1751,7 +1751,7 @@ void debug_sub_8010CAC(void) debug_sub_8011E5C(); debug_sub_8011E74(); debug_sub_8012540(); - debug_nullsub_3(); + debug_ShowCurrentAnimAudioOptions(); debug_sub_80123D8(gUnknown_Debug_030043A4 * 5); break; case 32: @@ -1759,7 +1759,7 @@ void debug_sub_8010CAC(void) debug_sub_8011E5C(); debug_sub_8011E74(); debug_sub_8012540(); - debug_nullsub_3(); + debug_ShowCurrentAnimAudioOptions(); debug_sub_80123D8(gUnknown_Debug_030043A4 * 5); break; case 33: @@ -2214,7 +2214,12 @@ void debug_sub_8011EA0(u8 a) case 15: case 20: case 25: +// TODO: check other revisions +#if (ENGLISH && REVISION == 0) + debug_sub_8010A7C(0, 8); +#else debug_sub_8010A7C(0, 20); +#endif Text_InitWindow( &gUnknown_Debug_03004370, gBattleTextBuff1, @@ -2223,6 +2228,8 @@ void debug_sub_8011EA0(u8 a) gUnknown_Debug_821F424[a][2]); Text_PrintWindow8002F44(&gUnknown_Debug_03004370); ConvertIntToDecimalStringN(gBattleTextBuff1, gUnknown_Debug_2023A76[gUnknown_Debug_03004360][a], 2, 3); +// TODO: check other revisions +#if !(ENGLISH && REVISION == 0) Text_InitWindow( &gUnknown_Debug_03004370, gBattleTextBuff1, @@ -2231,6 +2238,7 @@ void debug_sub_8011EA0(u8 a) 0); Text_PrintWindow8002F44(&gUnknown_Debug_03004370); gBattleTextBuff1[0] = EOS; +#endif StringAppend(gBattleTextBuff1, gSpeciesNames[gUnknown_Debug_2023A76[gUnknown_Debug_03004360][a]]); Text_InitWindow( &gUnknown_Debug_03004370, @@ -2262,7 +2270,12 @@ void debug_sub_8011EA0(u8 a) case 17: case 22: case 27: +// TODO: check other revisions +#if (ENGLISH && REVISION == 0) + debug_sub_8010A7C(0, 11); +#else debug_sub_8010A7C(0, 24); +#endif Text_InitWindow( &gUnknown_Debug_03004370, gBattleTextBuff1, @@ -2271,6 +2284,8 @@ void debug_sub_8011EA0(u8 a) gUnknown_Debug_821F424[a][2]); Text_PrintWindow8002F44(&gUnknown_Debug_03004370); ConvertIntToDecimalStringN(gBattleTextBuff1, gUnknown_Debug_2023A76[gUnknown_Debug_03004360][a], 2, 3); +// TODO: check other revisions +#if !(ENGLISH && REVISION == 0) Text_InitWindow( &gUnknown_Debug_03004370, gBattleTextBuff1, @@ -2279,6 +2294,7 @@ void debug_sub_8011EA0(u8 a) 0); Text_PrintWindow8002F44(&gUnknown_Debug_03004370); gBattleTextBuff1[0] = EOS; +#endif if (gUnknown_Debug_2023A76[gUnknown_Debug_03004360][a] != 0) StringAppend(gBattleTextBuff1, ItemId_GetName(gUnknown_Debug_2023A76[gUnknown_Debug_03004360][a])); else @@ -2297,7 +2313,12 @@ void debug_sub_8011EA0(u8 a) case 19: case 24: case 29: +// TODO: check other revisions +#if (ENGLISH && REVISION == 0) + debug_sub_8010A7C(0, 2); +#else debug_sub_8010A7C(0, 4); +#endif Text_InitWindow( &gUnknown_Debug_03004370, gBattleTextBuff1, @@ -2370,7 +2391,12 @@ void debug_sub_8012294(void) if (r5 < 30) { +// TODO: check other revisions +#if (ENGLISH && REVISION == 0) + debug_sub_8010A7C(0, 10); +#else debug_sub_8010A7C(0, 24); +#endif Text_InitWindow( &gUnknown_Debug_03004370, gBattleTextBuff1, @@ -2379,6 +2405,8 @@ void debug_sub_8012294(void) gUnknown_Debug_821F564[gUnknown_Debug_030043A8][2]); Text_PrintWindow8002F44(&gUnknown_Debug_03004370); ConvertIntToDecimalStringN(gBattleTextBuff1, gUnknown_Debug_2023B02[gUnknown_Debug_03004360][r5 / 5][gUnknown_Debug_030043A8], 2, 3); +// TODO: check other revisions +#if !(ENGLISH && REVISION == 0) Text_InitWindow( &gUnknown_Debug_03004370, gBattleTextBuff1, @@ -2387,6 +2415,7 @@ void debug_sub_8012294(void) 0); Text_PrintWindow8002F44(&gUnknown_Debug_03004370); gBattleTextBuff1[0] = EOS; +#endif StringAppend(gBattleTextBuff1, gMoveNames[gUnknown_Debug_2023B02[gUnknown_Debug_03004360][r5 / 5][gUnknown_Debug_030043A8]]); Text_InitWindow( &gUnknown_Debug_03004370, @@ -2404,7 +2433,12 @@ void debug_sub_80123D8(u8 a) { if (a < 30) { +// TODO: check other revisions +#if (ENGLISH && REVISION == 0) + debug_sub_8010A7C(0, 7); +#else debug_sub_8010A7C(0, 18); +#endif Text_InitWindow( &gUnknown_Debug_03004370, gBattleTextBuff1, @@ -2420,7 +2454,12 @@ void debug_sub_80123D8(u8 a) gUnknown_Debug_821F58C[1], gUnknown_Debug_821F58C[2]); Text_PrintWindow8002F44(&gUnknown_Debug_03004370); +// TODO: check other revisions +#if (ENGLISH && REVISION == 0) + debug_sub_8010A7C(0, 7); +#else debug_sub_8010A7C(0, 18); +#endif Text_InitWindow( &gUnknown_Debug_03004370, gBattleTextBuff1, @@ -2469,8 +2508,50 @@ void debug_sub_8012540(void) Text_PrintWindow8002F44(&gUnknown_Debug_03004370); } -void debug_nullsub_3(void) +// TODO: check other revisions +#if (ENGLISH && REVISION == 0) +extern const u8 Str_821F64D[]; +extern const u8 Str_821F652[]; +extern const u8 Str_821F655[]; +extern const u8 Str_821F65A[]; +#endif + +void debug_ShowCurrentAnimAudioOptions(void) { +// TODO: check other revisions +#if (ENGLISH && REVISION == 0) + if (gSaveBlock2.optionsBattleSceneOff) + Text_InitWindow( + &gUnknown_Debug_03004370, + Str_821F652, + 418, + gUnknown_Debug_03004360 * 32 + 21, + 0); + else + Text_InitWindow( + &gUnknown_Debug_03004370, + Str_821F64D, + 418, + gUnknown_Debug_03004360 * 32 + 21, + 0); + Text_PrintWindow8002F44(&gUnknown_Debug_03004370); + + if (gSaveBlock2.optionsSound) + Text_InitWindow( + &gUnknown_Debug_03004370, + Str_821F65A, + 422, + gUnknown_Debug_03004360 * 32 + 24, + 0); + else + Text_InitWindow( + &gUnknown_Debug_03004370, + Str_821F655, + 422, + gUnknown_Debug_03004360 * 32 + 24, + 0); + Text_PrintWindow8002F44(&gUnknown_Debug_03004370); +#endif } extern const u32 gUnknown_Debug_821F680[][0x23]; diff --git a/src/berry_blender.c b/src/berry_blender.c index a0300ed1f..a0d69f3e4 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -3272,7 +3272,7 @@ void debug_sub_80524BC(void) } // Partially fixes the clipping on longer names. -#if DEBUG_TRANSLATE && DEBUG +#if DEBUG_FIX # define BLENDER_DEBUG_BERRY_LEN 12 #else # define BLENDER_DEBUG_BERRY_LEN 6 diff --git a/src/data/graphics.c b/src/data/graphics.c index 9cb0a83d6..0e98195cd 100644 --- a/src/data/graphics.c +++ b/src/data/graphics.c @@ -10,10 +10,10 @@ const u8 gMonBackPic_CircledQuestionMark[] = INCBIN_U8("graphics/pokemon/circled const u16 gMonPalette_CircledQuestionMark[] = INCBIN_U16("graphics/pokemon/circled_question_mark/normal.gbapal.lz"); const u16 gMonShinyPalette_CircledQuestionMark[] = INCBIN_U16("graphics/pokemon/circled_question_mark/shiny.gbapal.lz"); -// The test menu debug battle tileset. This uses the old Crystal charmap and -// rendering method (it uses tiles instead of text). -// Oddly, the English version is in Japanese and the German version is in English. -#if DEBUG_TRANSLATE || GERMAN +// The test menu debug battle tileset. This uses the old Crystal +// charmap and rendering method (it uses tiles instead of text). +// The non-English releases use translated graphics. +#if DEBUG_FIX || !ENGLISH const u8 gDebugBattleCharmap_Gfx_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.4bpp.lz"); const u8 gDebugBattleCharmap_Tilemap_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.bin.lz"); const u8 gDebugBattleCharmap_Pal_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.gbapal.lz"); diff --git a/src/debug/mori_debug_menu.c b/src/debug/mori_debug_menu.c index dfa2487a5..7d6553e0e 100644 --- a/src/debug/mori_debug_menu.c +++ b/src/debug/mori_debug_menu.c @@ -42,10 +42,10 @@ const u8 Text_39B28B[] = _("10000 steps"); const u8 Text_39B297[] = _("MOVE TUTOR"); const u8 Text_39B2A2[] = _("Breed an egg"); const u8 Text_39B2AF[] = _("Long name"); -#ifdef GERMAN -const u8 Text_39B2B9[] = _("Delete {POKEBLOCK}"); +#if (ENGLISH && REVISION == 0) +const u8 Text_39B2B9[] = _("ポロックけす"); #else -const u8 Text_39B2B9[] = DTR("ポロックけす", "Delete {POKEBLOCK}"); +const u8 Text_39B2B9[] = _("Delete {POKEBLOCK}"); #endif const struct MenuAction gMoriDebugMenuActions[] = diff --git a/src/debug/nakamura_debug_menu.c b/src/debug/nakamura_debug_menu.c index a56fab2b7..e8f40f08e 100644 --- a/src/debug/nakamura_debug_menu.c +++ b/src/debug/nakamura_debug_menu.c @@ -100,7 +100,9 @@ static bool8 TopMenu_HandleJoypad(void) if (gMain.newKeys & A_BUTTON) { MenuFunc func = sNakamuraTopMenuActions[Menu_GetCursorPos()].func; +#if !(ENGLISH && REVISION == 0) Menu_DestroyCursor(); +#endif return func(); } @@ -739,6 +741,17 @@ static bool8 GiveAllDecorations(void) // FISHING POINTS (Feebas) // ======================================================= +#if (ENGLISH && REVISION == 0) +static const u8 Str_843E58D[] = _( + "つりばしょ R119\n" + " Y1\n" + " Y2\n" + " Y3\n" + "エンカウントばしょ\n" + "\n" + "\n" + "じぶんのまえ"); +#else static const u8 Str_843E58D[] = _( "Fishing location R119\n" " Y1\n" @@ -748,6 +761,7 @@ static const u8 Str_843E58D[] = _( "\n" "\n" "front of you"); +#endif static u16 FishingPoints_CountFishingTilesInMapThird(u8 a0) { @@ -974,7 +988,13 @@ static void NakaGenderTest_AdjustLevel(u8 i, s8 dirn) if (sNakaGenderTestData[i].level < 1) sNakaGenderTestData[i].level = 100; SetMonData(gPlayerParty + i, MON_DATA_EXP, gExperienceTables[gBaseStats[sNakaGenderTestData[i].species].growthRate] + sNakaGenderTestData[i].level); +// TODO: check other revisions +#if (ENGLISH && REVISION == 0) + CalculateMonStats(gPlayerParty + i); +#else + // Same function, but without the Shedninja specific code. Nakamura_NakaGenderTest_RecalcStats(gPlayerParty + i); +#endif } } diff --git a/src/debug/nohara_debug_menu.c b/src/debug/nohara_debug_menu.c index d26d6038c..e89cb144e 100644 --- a/src/debug/nohara_debug_menu.c +++ b/src/debug/nohara_debug_menu.c @@ -104,8 +104,13 @@ bool8 debug_sub_808F414(void) } } +#if (ENGLISH && REVISION == 0) +const u8 gUnknown_Debug_083C4980[] = _("ひみつがたを すぐみれるように ひだりキーで\n" + "データタイプを へんこうしますか? きりかえ"); +#else const u8 gUnknown_Debug_083C4980[] = _("Want to change data type{CLEAR_TO 143}Press Left\n" "to see secret type now?{CLEAR_TO 143}to switch"); +#endif const u8 gUnknown_Debug_083C49CA[] = _("Choose the TV data you wish to\n" "create to check a transmission。"); @@ -470,6 +475,11 @@ void debug_sub_808FA88(u8 a0, u8 a1) u8 leadMonIndex = GetLeadMonIndex(); u8 channel; +// This is garbage. +#define GF_ACCESS(x) ((struct x*)(&(gSaveBlock1.tvShows[a0]))) +#define TERU_ACCESS(x) show->x +#define DECLARE_TERU_POINTER TVShow * show = gSaveBlock1.tvShows + a0 + gSaveBlock1.tvShows[a0].common.kind = a1; gSaveBlock1.tvShows[a0].common.active = TRUE; for (i = 0; i < 0x22; i++) @@ -480,34 +490,135 @@ void debug_sub_808FA88(u8 a0, u8 a1) { case 2: case 4: - sub_80BE160(gSaveBlock1.tvShows + a0); + sub_80BE160(&gSaveBlock1.tvShows[a0]); break; case 3: - sub_80BE138(gSaveBlock1.tvShows + a0); + sub_80BE138(&gSaveBlock1.tvShows[a0]); break; } +#if (ENGLISH && REVISION == 0) switch (a1) { case TVSHOW_FAN_CLUB_LETTER: case TVSHOW_RECENT_HAPPENINGS: { - TVShow * show = gSaveBlock1.tvShows + a0; + GF_ACCESS(TVShowFanClubLetter)->species = SPECIES_BULBASAUR; + StringCopy(GF_ACCESS(TVShowFanClubLetter)->playerName, gSaveBlock2.playerName); + GF_ACCESS(TVShowFanClubLetter)->language = GAME_LANGUAGE; + break; + } + case TVSHOW_PKMN_FAN_CLUB_OPINIONS: + { + GF_ACCESS(TVShowFanclubOpinions)->var02 = 1; + StringCopy(GF_ACCESS(TVShowFanclubOpinions)->playerName, gSaveBlock2.playerName); + GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowFanclubOpinions)->var10); + GF_ACCESS(TVShowFanclubOpinions)->language = GAME_LANGUAGE; + GF_ACCESS(TVShowFanclubOpinions)->var0E = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE); + break; + } + case TVSHOW_UNKN_SHOWTYPE_04: + { + break; + } + case TVSHOW_NAME_RATER_SHOW: + { + GF_ACCESS(TVShowNameRaterShow)->species = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_SPECIES); + GF_ACCESS(TVShowNameRaterShow)->var1C = 1; + StringCopy(GF_ACCESS(TVShowNameRaterShow)->trainerName, gSaveBlock2.playerName); + GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowNameRaterShow)->pokemonName); + GF_ACCESS(TVShowNameRaterShow)->language = GAME_LANGUAGE; + GF_ACCESS(TVShowNameRaterShow)->pokemonNameLanguage = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE); + break; + } + case TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE: + { + GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->species = SPECIES_BULBASAUR; + StringCopy(GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->playerName, gSaveBlock2.playerName); + GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->pokemonNickname); + GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->language = GAME_LANGUAGE; + GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->var1f = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE); + break; + } + case TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE: + { + GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->species = SPECIES_BULBASAUR; + GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->defeatedSpecies = SPECIES_BULBASAUR; + StringCopy(GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->trainerName, gSaveBlock2.playerName); + StringCopy(GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->enemyTrainerName, gSaveBlock2.playerName); + GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->language = GAME_LANGUAGE; + break; + } + case TVSHOW_MASS_OUTBREAK: + { + GF_ACCESS(TVShowMassOutbreak)->species = SPECIES_BULBASAUR; + GF_ACCESS(TVShowMassOutbreak)->daysLeft = 1; + break; + } + case TVSHOW_POKEMON_TODAY_CAUGHT: + { + GF_ACCESS(TVShowPokemonToday)->species = SPECIES_BULBASAUR; + StringCopy(GF_ACCESS(TVShowPokemonToday)->playerName, gSaveBlock2.playerName); + GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowPokemonToday)->nickname); + GF_ACCESS(TVShowPokemonToday)->language = GAME_LANGUAGE; + GF_ACCESS(TVShowPokemonToday)->language2 = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE); + break; + } + case TVSHOW_SMART_SHOPPER: + { + StringCopy(GF_ACCESS(TVShowSmartShopper)->playerName, gSaveBlock2.playerName); + GF_ACCESS(TVShowSmartShopper)->language = GAME_LANGUAGE; + break; + } + case TVSHOW_POKEMON_TODAY_FAILED: + { + GF_ACCESS(TVShowPokemonTodayFailed)->species = SPECIES_BULBASAUR; + GF_ACCESS(TVShowPokemonTodayFailed)->species2 = SPECIES_BULBASAUR; + StringCopy(GF_ACCESS(TVShowPokemonTodayFailed)->playerName, gSaveBlock2.playerName); + GF_ACCESS(TVShowPokemonTodayFailed)->language = GAME_LANGUAGE; + break; + } + case TVSHOW_FISHING_ADVICE: + { + GF_ACCESS(TVShowPokemonAngler)->var04 = SPECIES_BULBASAUR; + StringCopy(GF_ACCESS(TVShowPokemonAngler)->playerName, gSaveBlock2.playerName); + GF_ACCESS(TVShowPokemonAngler)->language = GAME_LANGUAGE; + break; + } + case TVSHOW_WORLD_OF_MASTERS: + { + GF_ACCESS(TVShowWorldOfMasters)->var04 = SPECIES_BULBASAUR; + GF_ACCESS(TVShowWorldOfMasters)->var08 = SPECIES_BULBASAUR; + StringCopy(GF_ACCESS(TVShowWorldOfMasters)->playerName, gSaveBlock2.playerName); + GF_ACCESS(TVShowWorldOfMasters)->language = GAME_LANGUAGE; + break; + } + } +#else +// Murakawa must have really hated working with GF code. He devised his own, less complicated +// access method after US rev0. Also, this iteration of the code has his self inserts: TERUKUN, +// TERU, and TERUDA. Who all love Wigglytuff. + switch (a1) + { + case TVSHOW_FAN_CLUB_LETTER: + case TVSHOW_RECENT_HAPPENINGS: + { + DECLARE_TERU_POINTER; - show->fanclubLetter.species = SPECIES_BULBASAUR; - StringCopy(gSaveBlock1.tvShows[a0].fanclubLetter.playerName, gSaveBlock2.playerName); - show->fanclubLetter.language = GAME_LANGUAGE; + GF_ACCESS(TVShowFanClubLetter)->species = SPECIES_BULBASAUR; // Yet he didn't change Game Freak's lines. + StringCopy(GF_ACCESS(TVShowFanClubLetter)->playerName, gSaveBlock2.playerName); + TERU_ACCESS(fanclubLetter).language = GAME_LANGUAGE; break; } case TVSHOW_PKMN_FAN_CLUB_OPINIONS: { - TVShow * show = gSaveBlock1.tvShows + a0; + DECLARE_TERU_POINTER; - show->fanclubOpinions.var02 = 1; - StringCopy(gSaveBlock1.tvShows[a0].fanclubOpinions.playerName, gSaveBlock2.playerName); - GetMonData(gPlayerParty + leadMonIndex, MON_DATA_NICKNAME, gSaveBlock1.tvShows[a0].fanclubOpinions.var10); - show->fanclubOpinions.language = GAME_LANGUAGE; - show->fanclubOpinions.var0E = GetMonData(gPlayerParty + leadMonIndex, MON_DATA_LANGUAGE); + GF_ACCESS(TVShowFanclubOpinions)->var02 = 1; + StringCopy(GF_ACCESS(TVShowFanclubOpinions)->playerName, gSaveBlock2.playerName); + GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowFanclubOpinions)->var10); + TERU_ACCESS(fanclubOpinions).language = GAME_LANGUAGE; + TERU_ACCESS(fanclubOpinions).var0E = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE); break; } case TVSHOW_UNKN_SHOWTYPE_04: @@ -516,120 +627,118 @@ void debug_sub_808FA88(u8 a0, u8 a1) } case TVSHOW_NAME_RATER_SHOW: { - u16 species = GetMonData(gPlayerParty + leadMonIndex, MON_DATA_SPECIES); - TVShow * show = gSaveBlock1.tvShows + a0; + u16 species = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_SPECIES); + DECLARE_TERU_POINTER; - show->nameRaterShow.species = species; - show->nameRaterShow.var1C = 1; - StringCopy(gSaveBlock1.tvShows[a0].nameRaterShow.trainerName, gSaveBlock2.playerName); - GetMonData(gPlayerParty + leadMonIndex, MON_DATA_NICKNAME, gSaveBlock1.tvShows[a0].nameRaterShow.pokemonName); - show->nameRaterShow.language = GAME_LANGUAGE; - show->nameRaterShow.pokemonNameLanguage = GetMonData(gPlayerParty + leadMonIndex, MON_DATA_LANGUAGE); + GF_ACCESS(TVShowNameRaterShow)->species = species; + GF_ACCESS(TVShowNameRaterShow)->var1C = 1; + StringCopy(GF_ACCESS(TVShowNameRaterShow)->trainerName, gSaveBlock2.playerName); + GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowNameRaterShow)->pokemonName); + TERU_ACCESS(nameRaterShow).language = GAME_LANGUAGE; + TERU_ACCESS(nameRaterShow).pokemonNameLanguage = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE); break; } case TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE: { - TVShow * show = gSaveBlock1.tvShows + a0; + DECLARE_TERU_POINTER; - show->bravoTrainer.species = SPECIES_BULBASAUR; - StringCopy(gSaveBlock1.tvShows[a0].bravoTrainer.playerName, gSaveBlock2.playerName); - GetMonData(gPlayerParty + leadMonIndex, MON_DATA_NICKNAME, gSaveBlock1.tvShows[a0].bravoTrainer.pokemonNickname); - show->bravoTrainer.language = GAME_LANGUAGE; - show->bravoTrainer.var1f = GetMonData(gPlayerParty + leadMonIndex, MON_DATA_LANGUAGE); + GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->species = SPECIES_BULBASAUR; + StringCopy(GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->playerName, gSaveBlock2.playerName); + GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->pokemonNickname); + TERU_ACCESS(bravoTrainer).language = GAME_LANGUAGE; + TERU_ACCESS(bravoTrainer).var1f = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE); break; } case TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE: { - TVShow * show = gSaveBlock1.tvShows + a0; + DECLARE_TERU_POINTER; - show->bravoTrainerTower.species = SPECIES_BULBASAUR; - show->bravoTrainerTower.defeatedSpecies = SPECIES_BULBASAUR; - StringCopy(gSaveBlock1.tvShows[a0].bravoTrainerTower.trainerName, gSaveBlock2.playerName); - StringCopy(gSaveBlock1.tvShows[a0].bravoTrainerTower.enemyTrainerName, gSaveBlock2.playerName); - show->bravoTrainerTower.language = GAME_LANGUAGE; + GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->species = SPECIES_BULBASAUR; + GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->defeatedSpecies = SPECIES_BULBASAUR; + StringCopy(GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->trainerName, gSaveBlock2.playerName); + StringCopy(GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->enemyTrainerName, gSaveBlock2.playerName); + TERU_ACCESS(bravoTrainerTower).language = GAME_LANGUAGE; break; } case TVSHOW_MASS_OUTBREAK: { - TVShow * show = gSaveBlock1.tvShows + a0; - - show->massOutbreak.species = SPECIES_BULBASAUR; - show->massOutbreak.daysLeft = 1; + GF_ACCESS(TVShowMassOutbreak)->species = SPECIES_BULBASAUR; + GF_ACCESS(TVShowMassOutbreak)->daysLeft = 1; break; } case TVSHOW_POKEMON_TODAY_CAUGHT: { - TVShow * show = gSaveBlock1.tvShows + a0; + DECLARE_TERU_POINTER; u8 gUnknown_Debug_083C4C64[] = _("TERUKUN"); u8 gUnknown_Debug_083C4C6C[] = _("TERUTERUDA"); - show->pokemonToday.var12 = 255; - StringCopy(show->pokemonToday.playerName, gUnknown_Debug_083C4C64); - StringCopy(show->pokemonToday.nickname, gUnknown_Debug_083C4C6C); - show->pokemonToday.ball = ITEM_PREMIER_BALL; - show->pokemonToday.species = SPECIES_WIGGLYTUFF; - show->pokemonToday.language = GAME_LANGUAGE; - show->pokemonToday.language2 = GAME_LANGUAGE; + TERU_ACCESS(pokemonToday).var12 = 255; + StringCopy(TERU_ACCESS(pokemonToday).playerName, gUnknown_Debug_083C4C64); + StringCopy(TERU_ACCESS(pokemonToday).nickname, gUnknown_Debug_083C4C6C); + TERU_ACCESS(pokemonToday).ball = ITEM_PREMIER_BALL; + TERU_ACCESS(pokemonToday).species = SPECIES_WIGGLYTUFF; + TERU_ACCESS(pokemonToday).language = GAME_LANGUAGE; + TERU_ACCESS(pokemonToday).language2 = GAME_LANGUAGE; break; } case TVSHOW_SMART_SHOPPER: { - TVShow * show = gSaveBlock1.tvShows + a0; + DECLARE_TERU_POINTER; u8 gUnknown_Debug_083C4C64[] = _("TERUKUN"); int ii; for (ii = 0; ii < 3; ii++) - show->smartshopperShow.itemAmounts[ii] = 254; - show->smartshopperShow.priceReduced = TRUE; - show->smartshopperShow.shopLocation = 40; + TERU_ACCESS(smartshopperShow).itemAmounts[ii] = 254; + TERU_ACCESS(smartshopperShow).priceReduced = TRUE; + TERU_ACCESS(smartshopperShow).shopLocation = 40; for (ii = 0; ii < 3; ii++) - show->smartshopperShow.itemIds[ii] = ITEM_ENERGY_POWDER; - StringCopy(show->smartshopperShow.playerName, gUnknown_Debug_083C4C64); - show->smartshopperShow.language = GAME_LANGUAGE; + TERU_ACCESS(smartshopperShow).itemIds[ii] = ITEM_ENERGY_POWDER; + StringCopy(TERU_ACCESS(smartshopperShow).playerName, gUnknown_Debug_083C4C64); + TERU_ACCESS(smartshopperShow).language = GAME_LANGUAGE; break; } case TVSHOW_POKEMON_TODAY_FAILED: { - TVShow * show = gSaveBlock1.tvShows + a0; + DECLARE_TERU_POINTER; u8 gUnknown_Debug_083C4C64[] = _("TERUKUN"); - show->pokemonTodayFailed.species = SPECIES_WIGGLYTUFF; - show->pokemonTodayFailed.species2 = SPECIES_WIGGLYTUFF; - show->pokemonTodayFailed.var12 = 3; - show->pokemonTodayFailed.var10 = 0xff; - show->pokemonTodayFailed.var11 = 1; - StringCopy(show->pokemonTodayFailed.playerName, gUnknown_Debug_083C4C64); - show->pokemonTodayFailed.language = GAME_LANGUAGE; + TERU_ACCESS(pokemonTodayFailed).species = SPECIES_WIGGLYTUFF; + TERU_ACCESS(pokemonTodayFailed).species2 = SPECIES_WIGGLYTUFF; + TERU_ACCESS(pokemonTodayFailed).var12 = 3; + TERU_ACCESS(pokemonTodayFailed).var10 = 0xff; + TERU_ACCESS(pokemonTodayFailed).var11 = 1; + StringCopy(TERU_ACCESS(pokemonTodayFailed).playerName, gUnknown_Debug_083C4C64); + TERU_ACCESS(pokemonTodayFailed).language = GAME_LANGUAGE; break; } case TVSHOW_FISHING_ADVICE: { - TVShow * show = gSaveBlock1.tvShows + a0; + DECLARE_TERU_POINTER; u8 gUnknown_Debug_083C4C64[] = _("TERUKUN"); - show->pokemonAngler.var02 = 0xff; - show->pokemonAngler.var03 = 0; - show->pokemonAngler.var04 = 40; - StringCopy(show->pokemonAngler.playerName, gUnknown_Debug_083C4C64); - show->pokemonAngler.language = GAME_LANGUAGE; + TERU_ACCESS(pokemonAngler).var02 = 0xff; + TERU_ACCESS(pokemonAngler).var03 = 0; + TERU_ACCESS(pokemonAngler).var04 = 40; + StringCopy(TERU_ACCESS(pokemonAngler).playerName, gUnknown_Debug_083C4C64); + TERU_ACCESS(pokemonAngler).language = GAME_LANGUAGE; break; } case TVSHOW_WORLD_OF_MASTERS: { - TVShow * show = gSaveBlock1.tvShows + a0; + DECLARE_TERU_POINTER; u8 gUnknown_Debug_083C4C64[] = _("TERUKUN"); - show->worldOfMasters.var02 = 0xffff; - show->worldOfMasters.var06 = 0xffff; - show->worldOfMasters.var04 = 40; - show->worldOfMasters.var08 = 40; - show->worldOfMasters.var0a = 3; - StringCopy(show->worldOfMasters.playerName, gUnknown_Debug_083C4C64); - show->worldOfMasters.language = GAME_LANGUAGE; + TERU_ACCESS(worldOfMasters).var02 = 0xffff; + TERU_ACCESS(worldOfMasters).var06 = 0xffff; + TERU_ACCESS(worldOfMasters).var04 = 40; + TERU_ACCESS(worldOfMasters).var08 = 40; + TERU_ACCESS(worldOfMasters).var0a = 3; + StringCopy(TERU_ACCESS(worldOfMasters).playerName, gUnknown_Debug_083C4C64); + TERU_ACCESS(worldOfMasters).language = GAME_LANGUAGE; break; } - } +#endif } bool8 debug_sub_808FEBC(void) diff --git a/src/debug/start_menu_debug.c b/src/debug/start_menu_debug.c index 940f21ac7..ef83fc3f0 100644 --- a/src/debug/start_menu_debug.c +++ b/src/debug/start_menu_debug.c @@ -51,7 +51,8 @@ extern void Debug_SetUpFieldMove_Cut(void); extern void Debug_SetUpFieldMove_SecretPower(void); void debug_sub_8076BB4(u8); -void debug_sub_8077CF4(u8 x, u8 y); +void DebugMenu_DisplayBuildDate(u8 x, u8 y); +void DebugMenu_DisplayContinuousDate(u8 x, u8 y); u8 DebugMenu_807706C(void); u8 DebugMenu_807709C(void); void DebugMenu_807719C(void); @@ -133,7 +134,9 @@ u8 DebugMenu_EndSequenceDemo(void); u8 DebugMenu_RandomNumberTest(void); u8 DebugMenu_MeTooBackupMan(void); u8 DebugMenu_OpenMurakawa(void); +#if !(ENGLISH && REVISION == 0) u8 DebugMenu_OpenKiwa(void); +#endif u8 DebugMenu_8076CBC(void); u8 DebugMenu_8076CC0(void); u8 DebugMenu_8076CD4(void); @@ -204,7 +207,9 @@ const u8 Str_839B972[] = _("End sequence demo"); const u8 Str_839B984[] = _("Random number test"); const u8 Str_839B997[] = _("Me-too BackupMan"); const u8 Str_839B9A8[] = _("MURAKAWA"); +#if !(ENGLISH && REVISION == 0) const u8 Str_839B9B1[] = _("KINA(FONT)"); +#endif const struct MenuAction gDebug0x839B9BC[] = { @@ -260,18 +265,34 @@ const struct MenuAction gDebug0x839B9BC[] = { Str_839B984, DebugMenu_RandomNumberTest }, { Str_839B997, DebugMenu_MeTooBackupMan }, { Str_839B9A8, DebugMenu_OpenMurakawa }, +#if !(ENGLISH && REVISION == 0) { Str_839B9B1, DebugMenu_OpenKiwa }, +#endif }; +#if (ENGLISH && REVISION == 0) +const u8 gUnknown_Debug_839BB64[] = +{ + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x00, 0x0b, 0x0c, 0x0d, 0x0e, 0x1f, 0x12, 0x13, 0x00, 0x08, 0x09, 0x0a, 0x1e, 0x10, 0x24, 0x0f, 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00, + 0x1c, 0x1d, 0x14, 0x20, 0x21, 0x22, 0x23, 0x00, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x00, 0x11, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#else const u8 gUnknown_Debug_839BB64[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x00, 0x0b, 0x0c, 0x0d, 0x0e, 0x1f, 0x12, 0x13, 0x00, 0x08, 0x09, 0x0a, 0x1e, 0x10, 0x24, 0x0f, 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00, 0x1c, 0x1d, 0x14, 0x20, 0x21, 0x22, 0x23, 0x00, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x00, 0x11, 0x33, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, }; +#endif -const u8 gUnknown_Debug_0839BBA4[] = _("Debugging Version"); -const u8 gUnknown_Debug_0839BBB6[] = _("{VERSION} Version"); -const u8 gUnknown_Debug_0839BBC1[] = _("Normal RTC compatible"); +#if ENGLISH +const u8 gDebugCreatedString[] = _("Created"); +const u8 gDebugContinuousString[] = _("Continuous play\n" + "available from"); +#else +const u8 gDebugRomString[] = _("Debugging Version"); +#endif +const u8 gDebugVersionString[] = _("{VERSION} Version"); +const u8 gDebugRTCString[] = _("Normal RTC compatible"); const u8 gTestMenu_TestMenuHeaderText[] = DTR("か の じっけん", "TEST MENU"); // 科の実験 (Test section) const u8 gTestMenu_Test2Text[] = DTR("じっけん2", "Test2"); @@ -345,6 +366,7 @@ extern const u8 Str_839BD4C[]; static u8 gUnknown_030006B8; +#ifndef ENGLISH struct DebugBuildDateInfo { s32 max; s32 digitMultiplier; @@ -353,6 +375,7 @@ struct DebugBuildDateInfo { }; static const struct DebugBuildDateInfo *gDebugBuildDate; +#endif static u8 gUnknown_030006C0; static u8 gUnknown_030006C1; static const u8 * gUnknown_030006C4; @@ -382,10 +405,17 @@ void debug_sub_8076B4C(void) // Initializes test menu void debug_sub_8076B68(void) { - Menu_PrintText(gUnknown_Debug_0839BBB6, 1, 1); - Menu_PrintText(gUnknown_Debug_0839BBC1, 1, 3); - Menu_PrintText(gUnknown_Debug_0839BBA4, 1, 9); - debug_sub_8077CF4(4, 11); + Menu_PrintText(gDebugVersionString, 1, 1); + Menu_PrintText(gDebugRTCString, 1, 3); +#if ENGLISH + Menu_PrintText(gDebugCreatedString, 1, 7); + DebugMenu_DisplayBuildDate(3, 9); + Menu_PrintText(gDebugContinuousString, 1, 12); + DebugMenu_DisplayContinuousDate(3, 16); +#else + Menu_PrintText(gDebugRomString, 1, 9); + DebugMenu_DisplayBuildDate(4, 11); +#endif debug_sub_8076AC8(0); CreateTask(debug_sub_8076BB4, 1); } @@ -699,6 +729,9 @@ void DebugMenu_8077048(void) u8 DebugMenu_807706C(void) { +#if (ENGLISH && REVISION == 0) + gUnknown_Debug_Murakawa2 = 1; +#endif InitMenuWindow(&gMenuTextWindowTemplate); DebugMenu_8077004(); DebugMenu_807719C(); @@ -710,6 +743,8 @@ u8 DebugMenu_807706C(void) u8 DebugMenu_807709C(void) { + u8 actionRet; + if (gMain.newKeys & DPAD_UP) { PlaySE(SE_SELECT); @@ -743,11 +778,21 @@ u8 DebugMenu_807709C(void) if (gMain.newKeys & A_BUTTON) { PlaySE(SE_SELECT); - return gDebug0x839B9BC[gUnknown_030006C4[gUnknown_030006C0]].func(); + actionRet = gDebug0x839B9BC[gUnknown_030006C4[gUnknown_030006C0]].func(); +// TODO: see if this is in rev1+ +#if (ENGLISH && REVISION == 0) + if (actionRet == 1) + gUnknown_Debug_Murakawa2 = 0; +#endif + return actionRet; } if (gMain.newKeys & (B_BUTTON | START_BUTTON)) { CloseMenu(); +// TODO: see if this is in rev1+ +#if (ENGLISH && REVISION == 0) + gUnknown_Debug_Murakawa2 = 0; +#endif return TRUE; } return FALSE; @@ -1389,15 +1434,47 @@ u8 DebugMenu_8077C14(void) const u8 Str_839BFDC[] = DTR(" じかん ふん びょう", " HOURS MINUTES SECONDS"); +#if ENGLISH +const u8 ContinousDateTime[] = "2002 08 01 20:25"; +#else static const struct DebugBuildDateInfo gDebugBuildDateInfo[] = { { 99, 10, 2, 23 }, { 99, 10, 2, 26 } }; +#endif // Parses the version code in a highly inefficient and unsafe way. -void DebugMenu_ConvertBuildDate(const char *buildDateStr, u8 *out) +void DebugMenu_ConvertBuildDate(const u8 *buildDateStr, u8 *out) { - int i; + s32 i; +#if ENGLISH + u16 year; + u16 month; + u16 day; + u16 hour; + u16 minutes; + + for (year = 0, i = 0; i < 2; i++) + { + year *= 10; + year += (buildDateStr[i+2] - '0'); + } + + month = (buildDateStr[5] - '0') * 10 + (buildDateStr[6] - '0'); + day = (buildDateStr[8] - '0') * 10 + (buildDateStr[9] - '0'); + hour = (buildDateStr[11] - '0') * 10 + (buildDateStr[12] - '0'); + minutes = (buildDateStr[14] - '0') * 10 + (buildDateStr[15] - '0'); + + out = ConvertIntToDecimalStringN(out, year, STR_CONV_MODE_LEADING_ZEROS, 2); + *out++ = CHAR_SLASH; + out = ConvertIntToDecimalStringN(out, month, STR_CONV_MODE_LEADING_ZEROS, 2); + *out++ = CHAR_SLASH; + out = ConvertIntToDecimalStringN(out, day, STR_CONV_MODE_LEADING_ZEROS, 2); + *out++ = CHAR_SPACE; + out = ConvertIntToDecimalStringN(out, hour, STR_CONV_MODE_LEADING_ZEROS, 2); + *out++ = CHAR_COLON; + out = ConvertIntToDecimalStringN(out, minutes, STR_CONV_MODE_LEADING_ZEROS, 2); +#else // Prevents register allocation swap // Intended: r7 = out, r6 = gDebugBuildDate->numDigits // Observed: r6 = out, r7 = gDebugBuildDate->numDigits @@ -1408,8 +1485,8 @@ void DebugMenu_ConvertBuildDate(const char *buildDateStr, u8 *out) *out++ = CHAR_SPACE; for (i = 0; i < 2; i++, gDebugBuildDate++) { - int j; - int mul; + s32 j; + s32 mul; u32 date = 0; for (mul = gDebugBuildDate->digitMultiplier, j = 0; j < gDebugBuildDate->numDigits; j++, mul /= 10) date += (buildDateStr[gDebugBuildDate->offset + j] - '0') * mul; @@ -1421,14 +1498,23 @@ void DebugMenu_ConvertBuildDate(const char *buildDateStr, u8 *out) if (out[0] > 0xf6) // prevent special characters out[0] = 0xf6; out[1] = EOS; +#endif } -void debug_sub_8077CF4(u8 x, u8 y) +void DebugMenu_DisplayBuildDate(u8 x, u8 y) { DebugMenu_ConvertBuildDate(BuildDateTime, gStringVar4); Menu_PrintText(gStringVar4, x, y); } +#if ENGLISH +void DebugMenu_DisplayContinuousDate(u8 x, u8 y) +{ + DebugMenu_ConvertBuildDate(ContinousDateTime, gStringVar4); + Menu_PrintText(gStringVar4, x, y); +} +#endif + void DebugMenu_8077D24(const struct MenuAction *menuAction, u8 width, u8 itemCount) { Menu_EraseScreen(); @@ -2591,14 +2677,22 @@ u8 DebugMenu_PTime(void) return TRUE; } +#if (ENGLISH && REVISION == 0) +const u8 gDebug0x839C60C[] = _("switch DISP mode"); +#else const u8 gDebug0x839C60C[] = _("Set FLASH ERR"); +#endif void DebugMenu_8079058(u8 taskId) { switch (gTasks[taskId].data[0]) { case 0: +#if (ENGLISH && REVISION == 0) + gUnknown_Debug_Murakawa2 = 1; +#else gUnknown_Debug_03004BD0 = 0; +#endif Menu_DisplayDialogueFrame(); gTasks[taskId].data[0]++; break; @@ -2619,6 +2713,9 @@ void DebugMenu_8079058(u8 taskId) gUnknown_Debug_03004BD0 = 0; break; } +#if (ENGLISH && REVISION == 0) + gUnknown_Debug_Murakawa2 = 0; +#endif Menu_EraseScreen(); ScriptContext2_Disable(); DestroyTask(taskId); @@ -2634,13 +2731,17 @@ u8 DebugMenu_OpenMurakawa(void) return TRUE; } -const u8 Str_839C61A[] = _("abcde; abcde: ABCDE; ABCDE:\p" - "Tableaux des verbes du 2{SUPER_E} groupe.\p" - "La1{SUPER_RE} chose à apprendre c'est de lire.\p" - "Tableaux des verbes du 1{SUPER_ER} groupe.\p" - "“あいうえおかきくけコさしすせそたちつてとな”\n" - "<にぬネのはひふへほマみむめもやゆよらりるれろわャッ>\p" - "をんゃゅょアイウエオカキクケサシスルレロワ,"); +#if !(ENGLISH && REVISION == 0) +const u8 Str_839C61A[] = _( +#if GERMAN + "abcde; abcde: ABCDE; ABCDE:\p" +#endif + "Tableaux des verbes du 2{SUPER_E} groupe.\p" + "La1{SUPER_RE} chose à apprendre c'est de lire.\p" + "Tableaux des verbes du 1{SUPER_ER} groupe.\p" + "“あいうえおかきくけコさしすせそたちつてとな”\n" + "<にぬネのはひふへほマみむめもやゆよらりるれろわャッ>\p" + "をんゃゅょアイウエオカキクケサシスルレロワ,"); void DebugMenu_8079110(u8 taskId) { @@ -2672,5 +2773,6 @@ u8 DebugMenu_OpenKiwa(void) ScriptContext2_Enable(); // return TRUE; } +#endif #endif diff --git a/src/debug/tomomichi_debug_menu.c b/src/debug/tomomichi_debug_menu.c index c9804c638..d9f5a3f5b 100644 --- a/src/debug/tomomichi_debug_menu.c +++ b/src/debug/tomomichi_debug_menu.c @@ -245,12 +245,21 @@ static const struct MenuAction sMenuActions_TopMenu[] = { {sString_ControlWORK, ControlWorks}, }; +#if (ENGLISH && REVISION == 0) +static const u8 sString_ContestMenuTitle[] = _("コンテスト"); + +static const u8 sString_Contest_PokemonNo[] = _("ポケモンナンバー"); +static const u8 sString_Contest_Personality[] = _("こせいらんすう"); +static const u8 sString_Contest_Type[] = _("コンテストしゅるい"); +static const u8 sString_Contest_PokeArt[] = _("ひょうじ"); +#else static const u8 sString_ContestMenuTitle[] = _("Contest"); static const u8 sString_Contest_PokemonNo[] = _("Pokémon No."); static const u8 sString_Contest_Personality[] = _("ID rnd. digit"); static const u8 sString_Contest_Type[] = _("Contest Type"); static const u8 sString_Contest_PokeArt[] = _("Poké Art"); +#endif static const struct MenuAction sMenuActions_ContestPicTest[] = { {sString_Contest_PokemonNo, DummyMenuAction}, @@ -259,12 +268,21 @@ static const struct MenuAction sMenuActions_ContestPicTest[] = { {sString_Contest_PokeArt, ContestGraphics_Show} }; +#if (ENGLISH && REVISION == 0) +static const u8 sString_Contest_ArtMuseumTitle[] = _("びじゅつかん"); + +static const u8 sString_Contest_ArtMuseum_PokemonNo[] = _("ポケモンナンバー"); +static const u8 sString_Contest_ArtMuseum_Personality[] = _("こせいらんすう"); +static const u8 sString_Contest_ArtMuseum_Type[] = _("タイトルしゅるい"); +static const u8 sString_Contest_ArtMuseum_PokeArt[] = _("ひょうじ"); +#else static const u8 sString_Contest_ArtMuseumTitle[] = _("Art Mus."); static const u8 sString_Contest_ArtMuseum_PokemonNo[] = _("Pokémon No."); static const u8 sString_Contest_ArtMuseum_Personality[] = _("ID rnd. digit"); static const u8 sString_Contest_ArtMuseum_Type[] = _("Title Type"); static const u8 sString_Contest_ArtMuseum_PokeArt[] = _("Poké Art"); +#endif static const struct MenuAction sMenuActions_ArtMuseumPicTest[] = { {sString_Contest_ArtMuseum_PokemonNo, DummyMenuAction}, @@ -273,12 +291,21 @@ static const struct MenuAction sMenuActions_ArtMuseumPicTest[] = { {sString_Contest_ArtMuseum_PokeArt, MuseumGraphics_Show} }; +#if (ENGLISH && REVISION == 0) +static const u8 sString_Contest_PreviewTitle[] = _("プレビュー"); + +static const u8 sString_Contest_Preview_PokemonNo[] = _("ポケモンナンバー"); +static const u8 sString_Contest_Preview_Personality[] = _("こせいらんすう"); +static const u8 sString_Contest_Preview_Type[] = _("しゅるい"); +static const u8 sString_Contest_Preview_PokeArt[] = _("ひょうじ"); +#else static const u8 sString_Contest_PreviewTitle[] = _("Preview"); static const u8 sString_Contest_Preview_PokemonNo[] = _("Pokémon No."); static const u8 sString_Contest_Preview_Personality[] = _("ID rnd. digit"); static const u8 sString_Contest_Preview_Type[] = _("Type"); static const u8 sString_Contest_Preview_PokeArt[] = _("Poké Art"); +#endif static const struct MenuAction sMenuActions_PreviewPicTest[] = { {sString_Contest_Preview_PokemonNo, DummyMenuAction}, @@ -287,10 +314,19 @@ static const struct MenuAction sMenuActions_PreviewPicTest[] = { {sString_Contest_Preview_PokeArt, PreviewGraphics_Show} }; +#if (ENGLISH && REVISION == 0) +static const u8 sString_TrickRelated[] = _("カラクリかんれん"); +#else static const u8 sString_TrickRelated[] = _("Trick related"); +#endif static const u8 sString_TrickRelated_Level[] = _("Level"); + +#if (ENGLISH && REVISION == 0) +static const u8 sString_TrickRelated_TrickMaster[] = _("MASTER"); +#else static const u8 sString_TrickRelated_TrickMaster[] = _("Trick Master"); +#endif static const struct MenuAction sMenuActions_TrickRelated[] = { {sString_TrickRelated_Level, TrickRelated_Level_InitSubmenu}, @@ -1841,6 +1877,17 @@ static const u16 gUnknown_Debug_083C478E[][9] = { {VAR_TEMP_9, VAR_TEMP_A, VAR_TEMP_B, VAR_TEMP_C, VAR_TEMP_D, VAR_TEMP_E, VAR_TEMP_F} }; +#if (ENGLISH && REVISION == 0) +static const u8 gUnknown_Debug_083C47B2[] = _("レベル"); +static const u8 gUnknown_Debug_083C47B8[] = _("シーン1"); +static const u8 gUnknown_Debug_083C47BF[] = _("シーン2"); +static const u8 gUnknown_Debug_083C47C6[] = _("シーン3"); +static const u8 gUnknown_Debug_083C47CD[] = _("シーン4"); +static const u8 gUnknown_Debug_083C47D4[] = _("シーン5"); +static const u8 gUnknown_Debug_083C47DB[] = _("シーン6"); +static const u8 gUnknown_Debug_083C47E2[] = _("シーン7"); +static const u8 gUnknown_Debug_083C47E9[] = _("シーン8"); +#else static const u8 gUnknown_Debug_083C47B2[] = _("Level"); static const u8 gUnknown_Debug_083C47B8[] = _("Scene1"); static const u8 gUnknown_Debug_083C47BF[] = _("Scene2"); @@ -1850,6 +1897,7 @@ static const u8 gUnknown_Debug_083C47D4[] = _("Scene5"); static const u8 gUnknown_Debug_083C47DB[] = _("Scene6"); static const u8 gUnknown_Debug_083C47E2[] = _("Scene7"); static const u8 gUnknown_Debug_083C47E9[] = _("Scene8"); +#endif static const struct MenuAction gUnknown_Debug_083C47F0[] = { {gUnknown_Debug_083C47B8, DummyMenuAction}, @@ -1862,7 +1910,11 @@ static const struct MenuAction gUnknown_Debug_083C47F0[] = { {gUnknown_Debug_083C47E9, DummyMenuAction} }; +#if (ENGLISH && REVISION == 0) +static const u8 gUnknown_Debug_083C4830[] = _("カラクリだいおう"); +#else static const u8 gUnknown_Debug_083C4830[] = _("Trick Master"); +#endif static const u8 gUnknown_Debug_083C483D[] = _("Hidden MASTER"); static const u8 gUnknown_Debug_083C484B[] = _("Inside the HOUSE"); @@ -1878,8 +1930,13 @@ static const struct MenuAction gUnknown_Debug_083C4888[] = { {gUnknown_Debug_083C4876, DummyMenuAction} }; +#if (ENGLISH && REVISION == 0) +static const u8 sDummyNickname[] = _("ポケモンめい"); +static const u8 sDummyTrainerName[] = _("ブリーダーめい"); +#else static const u8 sDummyNickname[] = _("PMNICKNAME"); static const u8 sDummyTrainerName[] = _("BREEDER"); +#endif bool8 InitTomomichiDebugWindow(void) { diff --git a/src/debug/watanabe_debug_menu.c b/src/debug/watanabe_debug_menu.c index c055781fb..205d4d5e3 100644 --- a/src/debug/watanabe_debug_menu.c +++ b/src/debug/watanabe_debug_menu.c @@ -1812,6 +1812,15 @@ const struct WatanabeDebugMenuItem gUnknown_Debug_083F8698[] = { {gUnknown_Debug_083F868F, {.type3 = 0x6}} }; +#if (ENGLISH && REVISION == 0) +const u8 gUnknown_Debug_083F86C8[] = _("ふつう"); +const u8 gUnknown_Debug_083F86CC[] = _("ねむり"); +const u8 gUnknown_Debug_083F86D0[] = _("どく"); +const u8 gUnknown_Debug_083F86D4[] = _("やけど"); +const u8 gUnknown_Debug_083F86D8[] = _("こおり"); +const u8 gUnknown_Debug_083F86DC[] = _("まひ"); +const u8 gUnknown_Debug_083F86E0[] = _("どくどく"); +#else const u8 gUnknown_Debug_083F86C8[] = _("ーーー"); const u8 gUnknown_Debug_083F86CC[] = _("SLP"); const u8 gUnknown_Debug_083F86D0[] = _("PSN"); @@ -1819,6 +1828,7 @@ const u8 gUnknown_Debug_083F86D4[] = _("BRN"); const u8 gUnknown_Debug_083F86D8[] = _("FRZ"); const u8 gUnknown_Debug_083F86DC[] = _("PAR"); const u8 gUnknown_Debug_083F86E0[] = _("PSN2"); +#endif const struct WatanabeDebugMenuItem gUnknown_Debug_083F86E8[] = { {gUnknown_Debug_083F86C8, {.type3 = 0x0}}, @@ -1830,8 +1840,13 @@ const struct WatanabeDebugMenuItem gUnknown_Debug_083F86E8[] = { {gUnknown_Debug_083F86E0, {.type3 = 0x80}} }; +#if (ENGLISH && REVISION == 0) +const u8 gUnknown_Debug_083F8720[] = _("ポケモンを てもちに くわえました"); +const u8 gUnknown_Debug_083F872A[] = _("ポケモンを ボックスに くわえました"); +#else const u8 gUnknown_Debug_083F8720[] = _("PKMN{RIGHT_ARROW}LIST"); const u8 gUnknown_Debug_083F872A[] = _("PKMN{RIGHT_ARROW}BOX"); +#endif void InitCreatePokemon(void) { u8 sp04[] = _("Create POKéMON LR:Shift START:Add"); @@ -2196,7 +2211,11 @@ void debug_80C5FFC(void) { u32 ivs; u8 sp10[] = DTR("たまご", "EGG"); +#if (ENGLISH && REVISION == 0) + u8 sp14[] = _("デバッグポケ1"); +#else u8 sp14[] = _("DebugーG"); +#endif u8 one; u16 ff; diff --git a/src/main.c b/src/main.c index b778631f3..a4335425d 100644 --- a/src/main.c +++ b/src/main.c @@ -34,12 +34,11 @@ const u8 gGameVersion = GAME_VERSION; const u8 gGameLanguage = GAME_LANGUAGE; -// The debug menu expects this exact format. With the English build string, it -// will overflow on the title debug menu, outputting '9999ィ'. -#if defined(GERMAN) || DEBUG -const char BuildDateTime[] = "$Name: debug-Euro-2003-05-09-A $"; -#elif defined(ENGLISH) -const char BuildDateTime[] = "2002 10 15 20:34"; +// International versions of the debug menu use a different format. +#if defined(ENGLISH) +const u8 BuildDateTime[] = "2002 10 15 20:34"; +#elif defined(GERMAN) +const u8 BuildDateTime[] = "$Name: debug-Euro-2003-05-09-A $"; #endif const IntrFunc gIntrTableTemplate[] = diff --git a/src/pokemon_1.c b/src/pokemon_1.c index 1883c8754..aeeb6080d 100644 --- a/src/pokemon_1.c +++ b/src/pokemon_1.c @@ -1764,6 +1764,8 @@ void CalculateMonStats(struct Pokemon *mon) } #if DEBUG +// TODO: check other revisions +#if !(ENGLISH && REVISION == 0) void Nakamura_NakaGenderTest_RecalcStats(struct Pokemon *mon) { s32 currentHP = GetMonData(mon, MON_DATA_HP, NULL); @@ -1809,6 +1811,7 @@ void Nakamura_NakaGenderTest_RecalcStats(struct Pokemon *mon) SetMonData(mon, MON_DATA_HP, ¤tHP); } #endif +#endif void ExpandBoxMon(const struct BoxPokemon *src, struct Pokemon *dest) { diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 64ae716d3..a6e007618 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -4183,7 +4183,6 @@ u8 GetMonStatusAndPokerus(struct Pokemon *mon) return statusAilment; } -#ifdef NONMATCHING void sub_80A1D18(void) { struct Pokemon mon; @@ -4196,9 +4195,6 @@ void sub_80A1D18(void) if (statusAndPkrs) { statusAndPkrs2 = statusAndPkrs - 1; - - if (ewram1A000[29] == 0xFF) - ewram1A000[29] = CreateSprite(&sSpriteTemplate_StatusCondition, 64, 152, 0); } else { @@ -4206,65 +4202,10 @@ void sub_80A1D18(void) return; } + if (ewram1A000[29] == 0xFF) + ewram1A000[29] = CreateSprite(&sSpriteTemplate_StatusCondition, 64, 152, 0); StartSpriteAnim(&gSprites[ewram1A000[29]], statusAndPkrs2); } -#else -NAKED -void sub_80A1D18(void) -{ - asm(".syntax unified\n\ - push {r4,r5,lr}\n\ - sub sp, 0x64\n\ - mov r0, sp\n\ - bl SummaryScreen_GetPokemon\n\ - mov r0, sp\n\ - bl GetMonStatusAndPokerus\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - cmp r0, 0\n\ - beq _080A1D58\n\ - subs r0, 0x1\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ - ldr r4, _080A1D50 @ =gSharedMem + 0x1A01D\n\ - ldrb r0, [r4]\n\ - cmp r0, 0xFF\n\ - bne _080A1D60\n\ - ldr r0, _080A1D54 @ =sSpriteTemplate_StatusCondition\n\ - movs r1, 0x40\n\ - movs r2, 0x98\n\ - movs r3, 0\n\ - bl CreateSprite\n\ - strb r0, [r4]\n\ - b _080A1D60\n\ - .align 2, 0\n\ -_080A1D50: .4byte gSharedMem + 0x1A01D\n\ -_080A1D54: .4byte sSpriteTemplate_StatusCondition\n\ -_080A1D58:\n\ - movs r0, 0x1D\n\ - bl sub_80A18E4\n\ - b _080A1D74\n\ -_080A1D60:\n\ - ldr r0, _080A1D7C @ =gSharedMem + 0x1A01D\n\ - ldrb r1, [r0]\n\ - lsls r0, r1, 4\n\ - adds r0, r1\n\ - lsls r0, 2\n\ - ldr r1, _080A1D80 @ =gSprites\n\ - adds r0, r1\n\ - adds r1, r5, 0\n\ - bl StartSpriteAnim\n\ -_080A1D74:\n\ - add sp, 0x64\n\ - pop {r4,r5}\n\ - pop {r0}\n\ - bx r0\n\ - .align 2, 0\n\ -_080A1D7C: .4byte gSharedMem + 0x1A01D\n\ -_080A1D80: .4byte gSprites\n\ - .syntax divided\n"); -} -#endif // NONMATCHING static void sub_80A1D84(struct Pokemon *mon) { diff --git a/src/roulette.c b/src/roulette.c index c4f6067a1..40acd41c8 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -1661,16 +1661,31 @@ void Task_Roulette_0(u8 taskid) #if DEBUG +#if (ENGLISH && REVISION == 0) + static const u8 gUnknown_Debug_0842510D[] = _("コインの かず STARTで きめて\nAーp1 Bーm1 R:Lー×10"); +#else + static const u8 gUnknown_Debug_0842510D[] = _("Set COIN and Press START\nAーp1 Bーm1 R:Lー×10"); +#endif + void debug_sub_812CDE4(u8 taskId) { +#if (ENGLISH && REVISION == 0) + u8 coinText[] = {0xFD, 0x02, 0xFF}; +#endif + if (gMain.newKeys & A_BUTTON) { gTasks[taskId].data[13]++; if (gTasks[taskId].data[13] == 10000) gTasks[taskId].data[13] = 0; ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4); +#if (ENGLISH && REVISION == 0) + StringExpandPlaceholders(gStringVar4, coinText); + Menu_PrintText(gStringVar4, 2, 1); +#else StringExpandPlaceholders(gStringVar4, gOtherText_Coins); MenuPrint_RightAligned(gStringVar4, 9, 1); +#endif } else if (gMain.newKeys & B_BUTTON) { @@ -1678,8 +1693,13 @@ void debug_sub_812CDE4(u8 taskId) if (gTasks[taskId].data[13] == -1) gTasks[taskId].data[13] = 9999; ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4); +#if (ENGLISH && REVISION == 0) + StringExpandPlaceholders(gStringVar4, coinText); + Menu_PrintText(gStringVar4, 2, 1); +#else StringExpandPlaceholders(gStringVar4, gOtherText_Coins); MenuPrint_RightAligned(gStringVar4, 9, 1); +#endif } else if (gMain.newKeys & R_BUTTON) { @@ -1687,8 +1707,13 @@ void debug_sub_812CDE4(u8 taskId) if (gTasks[taskId].data[13] > 9999) gTasks[taskId].data[13] -= 9999; ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4); +#if (ENGLISH && REVISION == 0) + StringExpandPlaceholders(gStringVar4, coinText); + Menu_PrintText(gStringVar4, 2, 1); +#else StringExpandPlaceholders(gStringVar4, gOtherText_Coins); MenuPrint_RightAligned(gStringVar4, 9, 1); +#endif } else if (gMain.newKeys & L_BUTTON) { @@ -1696,16 +1721,26 @@ void debug_sub_812CDE4(u8 taskId) if (gTasks[taskId].data[13] < 0) gTasks[taskId].data[13] += 9999; ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4); +#if (ENGLISH && REVISION == 0) + StringExpandPlaceholders(gStringVar4, coinText); + Menu_PrintText(gStringVar4, 2, 1); +#else StringExpandPlaceholders(gStringVar4, gOtherText_Coins); MenuPrint_RightAligned(gStringVar4, 9, 1); +#endif } else if (gMain.newKeys & START_BUTTON) { gSaveBlock1.coins = gTasks[taskId].data[13]; gTasks[taskId].func = Task_Roulette_0; ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4); +#if (ENGLISH && REVISION == 0) + StringExpandPlaceholders(gStringVar4, coinText); + Menu_PrintText(gStringVar4, 2, 1); +#else StringExpandPlaceholders(gStringVar4, gOtherText_Coins); MenuPrint_RightAligned(gStringVar4, 9, 1); +#endif unk_2039560 = 0; } else if (gMain.newKeys & SELECT_BUTTON) @@ -1713,22 +1748,30 @@ void debug_sub_812CDE4(u8 taskId) gSaveBlock1.coins = gTasks[taskId].data[13]; gTasks[taskId].func = Task_Roulette_0; ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4); +#if (ENGLISH && REVISION == 0) + StringExpandPlaceholders(gStringVar4, coinText); + Menu_PrintText(gStringVar4, 2, 1); +#else StringExpandPlaceholders(gStringVar4, gOtherText_Coins); MenuPrint_RightAligned(gStringVar4, 9, 1); +#endif unk_2039560 = 1; } } void debug_sub_812CFE8(u8 taskId) { - static const u8 gUnknown_Debug_0842510D[] = _("Set COIN and Press START\nAーp1 Bーm1 R:Lー×10"); gTasks[taskId].data[13] = gSaveBlock1.coins; if (Random() & 1) gSpecialVar_0x8004 |= 128; ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4); StringExpandPlaceholders(gStringVar4, gOtherText_Coins); Menu_DrawStdWindowFrame(0, 0, 9, 3); +#if (ENGLISH && REVISION == 0) + Menu_PrintText(gStringVar4, 2, 1); +#else MenuPrint_RightAligned(gStringVar4, 9, 1); +#endif Menu_DrawStdWindowFrame(0, 14, 29, 19); Menu_PrintText(gUnknown_Debug_0842510D, 1, 15); gTasks[taskId].func = debug_sub_812CDE4; diff --git a/src/save.c b/src/save.c index 3eeea88de..3b6cabe6a 100644 --- a/src/save.c +++ b/src/save.c @@ -738,7 +738,7 @@ u8 Save_WriteDataInternal(u8 saveType) return 0; } -#if DEBUG +#if (DEBUG && GERMAN) extern u32 gUnknown_Debug_03004BD0; #endif @@ -749,7 +749,7 @@ u8 Save_WriteData(u8 saveType) // TrySave Save_WriteDataInternal(saveType); if (!gDamagedSaveSectors -#if DEBUG +#if (DEBUG && GERMAN) && gUnknown_Debug_03004BD0 == 0 #endif ) diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index f5544bc65..9ef5f541c 100644 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -155,7 +155,7 @@ static void CB2_WipeSave(void) gSaveFailedClockInfo[0] = TRUE; -#if DEBUG +#if (DEBUG && !(ENGLISH && REVISION == 0)) if (gUnknown_Debug_03004BD0 != 0) gDamagedSaveSectors = 1; #endif @@ -277,7 +277,7 @@ static bool8 IsSectorNonEmpty(u16 sector) ReadFlash(sector, 0, ptr, 4096); -#if DEBUG // Don't verify the sector wipe? +#if (DEBUG && !(ENGLISH && REVISION == 0)) // Don't verify the sector wipe? for (i = 0; i < 0x400; i++, ptr++) ; return gUnknown_Debug_03004BD0; diff --git a/src/slot_machine.c b/src/slot_machine.c index c03ae0dfa..c6cbdb1c8 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -5677,7 +5677,7 @@ void debug_sub_811B310(void) PRINT_NUMBER(eSlotMachine->unk6C, 10, 5); PRINT_NUMBER(eSlotMachine->unk10, 10, 7); -#if DEBUG_TRANSLATE +#if DEBUG_FIX #define OFFSET 24 // wider window #else #define OFFSET 20 @@ -5785,7 +5785,7 @@ static void debug_sub_811B654(u8 taskId) switch (task->data[0]) { case 0: -#if DEBUG_TRANSLATE +#if DEBUG_FIX Menu_DrawStdWindowFrame(0, 0, 28, 19); // wider window #else Menu_DrawStdWindowFrame(0, 0, 24, 19); diff --git a/src/text.c b/src/text.c index dbf74ab61..d963045df 100644 --- a/src/text.c +++ b/src/text.c @@ -6,6 +6,7 @@ #include "constants/songs.h" #include "sound.h" #include "string_util.h" +#include "start_menu.h" enum { @@ -2078,7 +2079,7 @@ static u8 sub_8002FA0(struct Window *win, const u8 *text) static u8 PrintNextChar(struct Window *win) { - u8 c = win->text[win->textIndex++]; + u32 c = win->text[win->textIndex++]; // Handle special control characters switch (c) @@ -2106,6 +2107,12 @@ static u8 PrintNextChar(struct Window *win) return HandleExtCtrlCode(win); } +// TODO: see if this is in rev1+ +#if (DEBUG && ENGLISH && REVISION == 0) + // Code related to the Murakawa task. + if ((gUnknown_Debug_03004BD0) && (!gUnknown_Debug_Murakawa2)) + c = win->textMode + CHAR_0; +#endif sPrintGlyphFuncs[win->textMode](win, c); return 1; } |