diff options
Diffstat (limited to 'src/trade.c')
-rw-r--r-- | src/trade.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/src/trade.c b/src/trade.c index 1f99db519..656cba37b 100644 --- a/src/trade.c +++ b/src/trade.c @@ -411,7 +411,7 @@ static const u8 gUnknown_8261E92[] = { }; const u8 sText_Dummy[] = _(""); -const u8 sText_ClrDkGryHltTranspShdwRed[] = _("{COLOR DARK_GREY}{HIGHLIGHT TRANSPARENT}{SHADOW RED}"); +const u8 sText_ClrWhtHltTranspShdwDrkGry[] = _("{COLOR WHITE}{HIGHLIGHT TRANSPARENT}{SHADOW DARK_GRAY}"); const u8 gText_MaleSymbol4[] = _("♂"); const u8 gText_FemaleSymbol4[] = _("♀"); const u8 gText_GenderlessSymbol[] = _(""); @@ -455,7 +455,7 @@ static const u8 *const sTradeErrorOrStatusMessagePtrs[] = { gText_OtherTrainersPkmnCantBeTraded // The other TRAINER's POKéMON can't be traded now }; -static const u8 sTextColor_PartyMonNickname[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY }; +static const u8 sTextColor_PartyMonNickname[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; static const struct BgTemplate sBgTemplates[] = { { @@ -674,7 +674,7 @@ static const u8 gUnknown_8262055[][2] = { static void InitTradeMenuResources(void) { int i; - static vu16 dummy; + static u16 dummy; ResetSpriteData(); FreeAllSpritePalettes(); @@ -723,11 +723,6 @@ static void CB2_ReturnFromLinkTrade2(void) u8 id; s32 width; u32 xPos; -#ifndef NONMATCHING - register u32 r0 asm("r0"); -#else - u32 r0; -#endif u8 *name; switch (gMain.state) @@ -895,7 +890,8 @@ static void CB2_ReturnFromLinkTrade2(void) gMain.state++; break; case 12: - width = GetStringWidth(1, gSaveBlock2Ptr->playerName, 0); + name = gSaveBlock2Ptr->playerName; + width = GetStringWidth(1, name, 0); xPos = (56 - width) / 2; for (i = 0; i < 3; i++) { @@ -904,9 +900,8 @@ static void CB2_ReturnFromLinkTrade2(void) CreateSprite(&temp, xPos + sTradeUnknownSpriteCoords[LANGUAGE_ENGLISH - 1][0] + (i * 32), sTradeUnknownSpriteCoords[LANGUAGE_ENGLISH - 1][1], 1); } id = GetMultiplayerId(); - r0 = (id ^ 1) * sizeof(*gLinkPlayers); - name = gLinkPlayers->name; - width = GetStringWidth(1, name + r0, 0); + name = gLinkPlayers[id ^ 1].name; + width = GetStringWidth(1, name, 0); xPos = (56 - width) / 2; for (i = 0; i < 3; i++) { @@ -999,11 +994,6 @@ void CB2_ReturnToTradeMenuFromSummary(void) u8 id; s32 width; u32 xPos; -#ifndef NONMATCHING - register u32 r0 asm("r0"); -#else - u32 r0; -#endif u8 *name; switch (gMain.state) @@ -1095,7 +1085,8 @@ void CB2_ReturnToTradeMenuFromSummary(void) } break; case 12: - width = GetStringWidth(1, gSaveBlock2Ptr->playerName, 0); + name = gSaveBlock2Ptr->playerName; + width = GetStringWidth(1, name, 0); xPos = (56 - width) / 2; for (i = 0; i < 3; i++) { @@ -1104,9 +1095,8 @@ void CB2_ReturnToTradeMenuFromSummary(void) CreateSprite(&temp, xPos + sTradeUnknownSpriteCoords[LANGUAGE_ENGLISH - 1][0] + (i * 32), sTradeUnknownSpriteCoords[LANGUAGE_ENGLISH - 1][1], 1); } id = GetMultiplayerId(); - r0 = (id ^ 1) * sizeof(*gLinkPlayers); - name = gLinkPlayers->name; - width = GetStringWidth(1, name + r0, 0); + name = gLinkPlayers[id ^ 1].name; + width = GetStringWidth(1, name, 0); xPos = (56 - width) / 2; for (i = 0; i < 3; i++) { |