summaryrefslogtreecommitdiff
path: root/src/battle_main.c
diff options
context:
space:
mode:
authorKaz <kazbloxmc@gmail.com>2020-06-08 04:12:23 -0400
committerKaz <kazbloxmc@gmail.com>2020-06-08 04:12:23 -0400
commit2ec8ae4bec77ae4c5dac798a44e497d33be5dd7f (patch)
treefc96f4194c338567494e42343c7f0283a5bf4da4 /src/battle_main.c
parent575440fb78a4a8fe0b5e8243a363c66addcfb05b (diff)
Preliminary support for English rev0 debug. Matching but still needs
cleaning up. Rename DEBUG_TRANSLATE to DEBUG_FIX now that we have actual English Debug ROMs. Add Sapphire German "first edition" debug support, now that we have a hash for it. Fix an obvious nonmatching.
Diffstat (limited to 'src/battle_main.c')
-rw-r--r--src/battle_main.c97
1 files changed, 89 insertions, 8 deletions
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];