summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNieDzejkob <niedzejkob@gmail.com>2017-05-14 17:50:01 +0200
committerNieDzejkob <niedzejkob@gmail.com>2017-05-21 19:31:18 +0200
commitb60ad4ccba10b7c570b633edcdb74c64055a0aa4 (patch)
tree16888ffecbc1aec186c43b74f1eea8e02c6bf00f
parent8e8e4334ce637e98bcc8348be3d73c19a747ec70 (diff)
Make it build with all the label changes
-rw-r--r--include/asm.inc.h2
-rw-r--r--include/global.h4
-rw-r--r--src/daycare.c12
3 files changed, 9 insertions, 9 deletions
diff --git a/include/asm.inc.h b/include/asm.inc.h
index c28050929..9a404db59 100644
--- a/include/asm.inc.h
+++ b/include/asm.inc.h
@@ -31,7 +31,7 @@ void StoreWordInTwoHalfwords(u16 *, u32);
void LoadWordFromTwoHalfwords(u16 *, u32 *);
// src/daycare.o
-u8 daycare_count_pokemon(u8 *);
+u8 daycare_count_pokemon(struct BoxPokemon *);
// asm/daycare.o
void sub_8041324(struct BoxPokemon *, void *);
diff --git a/include/global.h b/include/global.h
index 2045f5b43..443b2a1d2 100644
--- a/include/global.h
+++ b/include/global.h
@@ -536,8 +536,8 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2D94*/ OldMan oldMan;
/*0x2DC0*/ u8 unk_2DC0[0x14];
/*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff
- /*0x2DFC*/ u8 filler_2DFC[0x100];
- /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5];
+ /*0x2DFC*/ u8 filler_2DFC[0x8];
+ /*0x2E04*/ SB_Struct sbStruct;
/*0x2F9C*/ struct BoxPokemon filler_2F9C[2]; // daycare related
/*0x303C*/ u8 filler_303C[0x38];
/*0x3074*/ u8 filler_3074[0x42];
diff --git a/src/daycare.c b/src/daycare.c
index e1ce7fb77..ca480329b 100644
--- a/src/daycare.c
+++ b/src/daycare.c
@@ -3,7 +3,7 @@
#include "string_util.h"
#include "asm.h"
-extern u8 gUnknown_03005CE0;
+extern u8 gLastFieldPokeMenuOpened;
u8 *pokemon_get_nick(struct Pokemon *mon, u8 *dest)
{
@@ -115,7 +115,7 @@ s8 daycare_empty_slot(struct BoxPokemon * daycare_data)
s8 empty_slot;
empty_slot = daycare_empty_slot(daycare_data);
- if(sub_80A2B94(mon) != 0){ // if the mon holds a mail?
+ if(MonHasMail(mon) != 0){ // if the mon holds a mail?
u8 empty_slot_times_56 = empty_slot * 56;
u8 * something2 = ((u8 *) (daycare_data + 2)) + empty_slot_times_56 + 36;
StringCopy(something2, gSaveBlock2);
@@ -145,7 +145,7 @@ void sub_80413C8()
lsrs r4, r0, 24\n\
mov r9, r4\n\
adds r0, r7, 0\n\
- bl sub_80A2B94\n\
+ bl MonHasMail\n\
lsls r0, 24\n\
cmp r0, 0\n\
beq _0804144A\n\
@@ -190,7 +190,7 @@ void sub_80413C8()
ldm r1!, {r0,r2,r3}\n\
stm r4!, {r0,r2,r3}\n\
adds r0, r7, 0\n\
- bl sub_80A2DF8\n\
+ bl TakeMailFromMon\n\
_0804144A:\n\
mov r2, r9\n\
lsls r4, r2, 24\n\
@@ -204,7 +204,7 @@ _0804144A:\n\
movs r2, 0x50\n\
bl memcpy\n\
adds r0, r4, 0\n\
- bl pokemon_restore_pp\n\
+ bl BoxMonRestorePP\n\
movs r0, 0x88\n\
lsls r0, 1\n\
add r0, r8\n\
@@ -230,7 +230,7 @@ _08041498: .4byte 0x00002b4c\n\
void daycare_send()
{
- sub_80413C8(gPlayerParty + gUnknown_03005CE0, gSaveBlock1.filler_2F9C);
+ sub_80413C8(gPlayerParty + gLastFieldPokeMenuOpened, gSaveBlock1.filler_2F9C);
}
void sub_80417F4(u8 *);