diff options
-rw-r--r-- | asm/trade.s | 32 | ||||
-rw-r--r-- | include/trade.h | 1 | ||||
-rw-r--r-- | src/trade.c | 8 |
3 files changed, 9 insertions, 32 deletions
diff --git a/asm/trade.s b/asm/trade.s index 5d8dcbe19..8b1162583 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -5395,38 +5395,6 @@ _0804DAD0: .4byte gEnemyParty .section .text.sub_804DB2C - thumb_func_start sub_804DB2C -sub_804DB2C: @ 804DB2C - push {r4-r6,lr} - ldr r6, _0804DB58 @ =gSpecialVar_0x8005 - ldrh r0, [r6] - movs r5, 0x64 - muls r0, r5 - ldr r4, _0804DB5C @ =gPlayerParty - adds r0, r4 - movs r1, 0x2D - bl GetMonData - cmp r0, 0 - bne _0804DB60 - ldrh r0, [r6] - muls r0, r5 - adds r0, r4 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - b _0804DB62 - .align 2, 0 -_0804DB58: .4byte gSpecialVar_0x8005 -_0804DB5C: .4byte gPlayerParty -_0804DB60: - movs r0, 0 -_0804DB62: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_804DB2C - thumb_func_start sub_804DB68 sub_804DB68: @ 804DB68 push {lr} diff --git a/include/trade.h b/include/trade.h index 04f474194..591c50e8a 100644 --- a/include/trade.h +++ b/include/trade.h @@ -6,5 +6,6 @@ #define POKERUBY_TRADE_H void sub_8047CD8(void); +u16 sub_804DB2C(void); #endif //POKERUBY_TRADE_H diff --git a/src/trade.c b/src/trade.c index 0eb05bb52..6b85ecb05 100644 --- a/src/trade.c +++ b/src/trade.c @@ -24,6 +24,7 @@ #include "rom4.h" #include "rom_8077ABC.h" #include "daycare.h" +#include "event_data.h" #include "trade.h" #ifdef ENGLISH @@ -3155,3 +3156,10 @@ asm(".section .text.sub_804DAD4"); arg0->species = trade->species; arg0->heldItem = trade->heldItem; } + +u16 sub_804DB2C(void) +{ + if (GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_IS_EGG)) + return SPECIES_NONE; + return GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_SPECIES); +} |