diff options
-rw-r--r-- | asm/trade.s | 34 | ||||
-rw-r--r-- | include/trade.h | 1 | ||||
-rw-r--r-- | src/trade.c | 8 |
3 files changed, 9 insertions, 34 deletions
diff --git a/asm/trade.s b/asm/trade.s index 7e341c9a4..ac7baa083 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -5141,38 +5141,4 @@ _0804D894: .4byte gTradeBallVerticalVelocityTable _0804D898: .4byte SpriteCallbackDummy thumb_func_end sub_804D80C - thumb_func_start sub_804D89C -sub_804D89C: @ 804D89C - push {r4-r6,lr} - ldr r0, _0804D8D0 @ =gSpecialVar_0x8004 - ldrh r0, [r0] - lsls r4, r0, 4 - subs r4, r0 - lsls r4, 2 - ldr r0, _0804D8D4 @ =gIngameTrades - adds r4, r0 - ldr r0, _0804D8D8 @ =gStringVar1 - ldrh r1, [r4, 0x38] - movs r6, 0xB - muls r1, r6 - ldr r5, _0804D8DC @ =gSpeciesNames - adds r1, r5 - bl StringCopy - ldr r0, _0804D8E0 @ =gStringVar2 - ldrh r1, [r4, 0xC] - muls r1, r6 - adds r1, r5 - bl StringCopy - ldrh r0, [r4, 0x38] - pop {r4-r6} - pop {r1} - bx r1 - .align 2, 0 -_0804D8D0: .4byte gSpecialVar_0x8004 -_0804D8D4: .4byte gIngameTrades -_0804D8D8: .4byte gStringVar1 -_0804D8DC: .4byte gSpeciesNames -_0804D8E0: .4byte gStringVar2 - thumb_func_end sub_804D89C - .align 2, 0 @ Don't pad with nop. diff --git a/include/trade.h b/include/trade.h index 5fa13ad03..909d17dab 100644 --- a/include/trade.h +++ b/include/trade.h @@ -10,5 +10,6 @@ u16 sub_804DB2C(void); void sub_804DB68(void); void sub_804E174(void); void sub_804E22C(void); +u16 sub_804D89C(void); #endif //POKERUBY_TRADE_H diff --git a/src/trade.c b/src/trade.c index 592b3f3e8..960a1b6bc 100644 --- a/src/trade.c +++ b/src/trade.c @@ -3171,6 +3171,14 @@ static bool8 sub_804ABF8(void) asm(".section .text.sub_804DAD4"); +u16 sub_804D89C(void) +{ + const struct InGameTrade *inGameTrade = &gIngameTrades[gSpecialVar_0x8004]; + StringCopy(gStringVar1, gSpeciesNames[inGameTrade->playerSpecies]); + StringCopy(gStringVar2, gSpeciesNames[inGameTrade->species]); + return inGameTrade->playerSpecies; +} + /*static*/ void sub_804D8E4(void) { u8 nickname[32]; |