summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarijn van der Werf <marijn.vanderwerf@gmail.com>2017-05-06 03:59:09 +0200
committerYamaArashi <YamaArashi@users.noreply.github.com>2017-05-05 20:06:57 -0700
commit12ef81ae0df9f1ab1ae26f3f3e390495c781fdc2 (patch)
tree138c62b8b7b83013e9141a8d0c004eda999a010b
parente0834dfec6f3d24d229622a61080949aaf1dc618 (diff)
Various German patches
-rw-r--r--asm/crt0.s30
-rw-r--r--include/global.h4
-rw-r--r--src/battle_ai.c4
-rw-r--r--src/link.c3
-rw-r--r--src/main.c6
-rw-r--r--src/main_menu.c11
-rw-r--r--src/money.c2
7 files changed, 41 insertions, 19 deletions
diff --git a/asm/crt0.s b/asm/crt0.s
index e1d47e2f0..121b11744 100644
--- a/asm/crt0.s
+++ b/asm/crt0.s
@@ -49,24 +49,18 @@ GPIOPortReadEnable: @ 80000C8
.4byte 0xFFFFFFFF
.4byte 2
.4byte 5
- .4byte 0x656B6F70
- .4byte 0x206E6F6D
- .4byte 0x79627572
- .4byte 0x72657620
- .4byte 0x6E6F6973
- .4byte 0
- .4byte 0
- .4byte 0
- .4byte 0x81F52D0
- .4byte 0x81F6770
- .4byte 0x81F7530
- .4byte 0x81F82F0
- .4byte 0x83C7C30
- .4byte 0x83C8310
- .4byte 0x83C84C8
- .4byte 0x82040E8
- .4byte 0x820529C
- .4byte 0x83F7BF0
+ .ascii "pokemon ruby version"
+ .space 12
+ .4byte gMonFrontPicTable
+ .4byte gMonBackPicTable
+ .4byte gMonPaletteTable
+ .4byte gMonShinyPaletteTable
+ .4byte gMonIconTable
+ .4byte gMonIconPaletteIndices
+ .4byte gMonIconPaletteTable
+ .4byte gSpeciesNames
+ .4byte gMoveNames
+ .4byte gDecorations
.4byte 0x1220
.4byte 0x1340
.4byte 0x18
diff --git a/include/global.h b/include/global.h
index 62e557ef4..4d9c837fa 100644
--- a/include/global.h
+++ b/include/global.h
@@ -28,7 +28,11 @@ enum LanguageId {
LANGUAGE_GERMAN = 5,
};
+#if defined(ENGLISH)
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
+#elif defined(GERMAN)
+#define GAME_LANGUAGE (LANGUAGE_GERMAN)
+#endif
enum
{
diff --git a/src/battle_ai.c b/src/battle_ai.c
index bd320904f..9bbaf908e 100644
--- a/src/battle_ai.c
+++ b/src/battle_ai.c
@@ -334,6 +334,10 @@ void BattleAI_SetupAIData(void)
AI_THINKING_STRUCT->aiFlags = 0x20000000;
else if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
AI_THINKING_STRUCT->aiFlags = 0x80000000;
+#ifdef GERMAN
+ else if (gBattleTypeFlags & 0x900 || gTrainerBattleOpponent == 0x400)
+ AI_THINKING_STRUCT->aiFlags = 7;
+#endif
else // otherwise, just set aiFlags to whatever flags the trainer has set in their data.
AI_THINKING_STRUCT->aiFlags = gTrainers[gTrainerBattleOpponent].aiFlags;
}
diff --git a/src/link.c b/src/link.c
index 2a9fcc770..336616f1a 100644
--- a/src/link.c
+++ b/src/link.c
@@ -689,6 +689,9 @@ void OpenLinkTimed(void)
{
sPlayerDataExchangeStatus = EXCHANGE_NOT_STARTED;
gLinkTimeOutCounter = 0;
+#if defined(GERMAN)
+ ResetBlockSend();
+#endif
OpenLink();
}
diff --git a/src/main.c b/src/main.c
index 3275c817e..114fc171f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,9 +31,13 @@ static void IntrDummy(void);
const u8 gGameVersion = GAME_VERSION;
-const u8 gGameLanguage = GAME_LANGUAGE; // English
+const u8 gGameLanguage = GAME_LANGUAGE;
+#if defined(ENGLISH)
const char BuildDateTime[] = "2002 10 15 20:34";
+#elif defined(GERMAN)
+const char BuildDateTime[] = "$Name: debug-Euro-2003-05-09-A $";
+#endif
const IntrFunc gIntrTableTemplate[] =
{
diff --git a/src/main_menu.c b/src/main_menu.c
index 284fbac52..294d33620 100644
--- a/src/main_menu.c
+++ b/src/main_menu.c
@@ -692,10 +692,17 @@ void PrintPlayTime(void)
u8 playTime[16];
u8 alignedPlayTime[32];
+#if defined(ENGLISH)
MenuPrint(gMainMenuString_Time, 16, 3);
FormatPlayTime(playTime, gSaveBlock2.playTimeHours, gSaveBlock2.playTimeMinutes, 1);
sub_8072C74(alignedPlayTime, playTime, 48, 1);
MenuPrint(alignedPlayTime, 22, 3);
+#elif defined(GERMAN)
+ MenuPrint_PixelCoords(gMainMenuString_Time, 124, 24, TRUE);
+ FormatPlayTime(playTime, gSaveBlock2.playTimeHours, gSaveBlock2.playTimeMinutes, 1);
+ sub_8072C74(alignedPlayTime, playTime, 40, 1);
+ MenuPrint(alignedPlayTime, 23, 3);
+#endif
}
void PrintPokedexCount(void)
@@ -711,7 +718,11 @@ void PrintBadgeCount(void)
{
u8 buffer[16];
+#if defined(ENGLISH)
MenuPrint(gMainMenuString_Badges, 16, 5);
+#elif defined(GERMAN)
+ MenuPrint_PixelCoords(gMainMenuString_Badges, 124, 40, TRUE);
+#endif
ConvertIntToDecimalString(buffer, GetBadgeCount());
MenuPrint_PixelCoords(buffer, 205, 40, 1);
}
diff --git a/src/money.c b/src/money.c
index e73ee506a..de0730951 100644
--- a/src/money.c
+++ b/src/money.c
@@ -138,10 +138,12 @@ void sub_80B7AEC(u32 arg0, u8 left, u8 top)
MenuPrint_RightAligned(buffer, left, top);
+#ifdef ENGLISH
ptr[0] = 0xFC;
ptr[1] = 0x14;
ptr[2] = 0x00;
ptr[3] = 0xFF;
+#endif
}
__attribute__((naked))