diff --git a/asm/learn_move.s b/asm/learn_move.s index 1faff56373..ab3c84ec23 100644 --- a/asm/learn_move.s +++ b/asm/learn_move.s @@ -82,7 +82,7 @@ sub_81606A0: @ 81606A0 str r0, [r6] ldr r1, =gSpecialVar_0x8004 ldrh r1, [r1] - adds r0, 0x44 partymon + adds r0, 0x44 movs r5, 0 strb r1, [r0] ldr r0, =sub_8160624 @@ -129,7 +129,7 @@ sub_8160740: @ 8160740 bl ResetSpriteData bl FreeAllSpritePalettes bl ResetTasks - bl clear_scheduled_bg_copies_to_vram + bl clear_scheduled_bg_copies_to_vram // ldr r5, =gUnknown_0203BC34 movs r0, 0x8C lsls r0, 1 diff --git a/include/learn_move.h b/include/learn_move.h index da03fe5ae8..ed95b62060 100644 --- a/include/learn_move.h +++ b/include/learn_move.h @@ -1,5 +1,5 @@ -#ifndef GUARD_LEAN_MOVE_H -#define GUARD_LEAN_MOVE_H +#ifndef GUARD_LEARN_MOVE_H +#define GUARD_LEARN_MOVE_H struct LearnMoveStruct { @@ -39,4 +39,4 @@ void sub_8160638(void); void *gUnknown_0203BC38 = (void*)0x0203BC38; -#endif //GUARD_LEAN_MOVE_H +#endif //GUARD_LEARN_MOVE_H diff --git a/ld_script.txt b/ld_script.txt index 7ead2a863b..cbc58dc8df 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -210,6 +210,7 @@ SECTIONS { src/fldeff_sweetscent.o(.text); asm/battle_anim_815A0D4.o(.text); asm/learn_move.o(.text); + src/learn_move.o(.text); src/fldeff_softboiled.o(.text); src/decoration_inventory.o(.text); src/roamer.o(.text); diff --git a/src/learn_move.c b/src/learn_move.c index d75e0a4604..f837076249 100644 --- a/src/learn_move.c +++ b/src/learn_move.c @@ -17,6 +17,7 @@ extern struct LearnMoveStruct *gUnknown_0203BC34; static struct LearnMoveStruct *sLearnMoveStruct; static void sub_8160664(u8 taskId); void sub_81606A0(void); //CB2_InitLearnMove +void sub_8160740(void); void sub_8160624(void) //VBlankCB_LearnMove { @@ -56,7 +57,6 @@ void sub_81606A0(void) //CB2_InitLearnMove ResetTasks(); clear_scheduled_bg_copies_to_vram(); - //LearnMoveStruct** //r1 = &gSpecialVar_0x8004; //What is this global ? //u8* partyMon = gUnknown_0203BC34 + 0x44 //partyMon ? @@ -82,3 +82,17 @@ void sub_81606A0(void) //CB2_InitLearnMove FillPalette(0, 0, 2); SetMainCallback2(/*FIXME sub_816082C*/(void*)0x0816082C); } + +/* +void sub_8160740(void) +{ + ResetSpriteData(); + FreeAllSpritePalettes(); + ResetTasks(); + clear_scheduled_bg_copies_to_vram(); + + gUnknown_0203BC34 = AllocZeroed(0x118);//gUnknown_0203BC34 is a global pointer to LearnMoveStruct ? + gUnknown_0203BC34->partyMon = gSpecialVar_0x8004; + gUnknown_0203BC34->unk2C6 = gSpecialVar_0x8005; +} +*/