summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2020-01-12 14:18:22 -0500
committerGitHub <noreply@github.com>2020-01-12 14:18:22 -0500
commit74fa8075ee4018ba9b7e610212cf7c7777c4edb4 (patch)
treeff905ff37f845cdb34f1632d8fa0d1235c062b7f
parent519558ddd32c04da00b88b4343d32ac04a8a73d1 (diff)
parente300f2ece0bd3c5c0967ac635a48ccd8ef13cf50 (diff)
Merge pull request #210 from jiangzhengwenjz/party_menu
script_pokemon_util_80BF8FC
-rw-r--r--asm/script_pokemon_util_80BF8FC.s422
-rw-r--r--data/maps/FuchsiaCity_House3/scripts.inc12
-rw-r--r--data/maps/TwoIsland_House/scripts.inc4
-rw-r--r--data/specials.inc12
-rw-r--r--include/pokemon.h1
-rw-r--r--include/pokemon_summary_screen.h1
-rw-r--r--include/script_pokemon_80F8.h12
-rw-r--r--include/script_pokemon_81B9.h8
-rw-r--r--include/script_pokemon_util_80A0058.h1
-rw-r--r--ld_script.txt2
-rw-r--r--src/party_menu_specials.c111
-rw-r--r--src/scrcmd.c1
12 files changed, 129 insertions, 458 deletions
diff --git a/asm/script_pokemon_util_80BF8FC.s b/asm/script_pokemon_util_80BF8FC.s
deleted file mode 100644
index a909758c2..000000000
--- a/asm/script_pokemon_util_80BF8FC.s
+++ /dev/null
@@ -1,422 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start Special_ChooseMonFromParty
-Special_ChooseMonFromParty: @ 80BF8FC
- push {lr}
- sub sp, 0x4
- bl ScriptContext2_Enable
- ldr r0, _080BF934 @ =sub_80BF97C
- movs r1, 0xA
- bl CreateTask
- lsls r0, 24
- lsrs r0, 24
- ldr r2, _080BF938 @ =gTasks
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- adds r1, r2
- movs r2, 0
- movs r0, 0x3
- strh r0, [r1, 0x8]
- subs r0, 0x4
- str r2, [sp]
- movs r1, 0
- movs r3, 0x10
- bl BeginNormalPaletteFade
- add sp, 0x4
- pop {r0}
- bx r0
- .align 2, 0
-_080BF934: .4byte sub_80BF97C
-_080BF938: .4byte gTasks
- thumb_func_end Special_ChooseMonFromParty
-
- thumb_func_start SelectMoveTutorMon
-SelectMoveTutorMon: @ 80BF93C
- push {lr}
- sub sp, 0x4
- bl ScriptContext2_Enable
- ldr r0, _080BF974 @ =sub_80BF97C
- movs r1, 0xA
- bl CreateTask
- lsls r0, 24
- lsrs r0, 24
- ldr r2, _080BF978 @ =gTasks
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- adds r1, r2
- movs r2, 0
- movs r0, 0x7
- strh r0, [r1, 0x8]
- subs r0, 0x8
- str r2, [sp]
- movs r1, 0
- movs r3, 0x10
- bl BeginNormalPaletteFade
- add sp, 0x4
- pop {r0}
- bx r0
- .align 2, 0
-_080BF974: .4byte sub_80BF97C
-_080BF978: .4byte gTasks
- thumb_func_end SelectMoveTutorMon
-
- thumb_func_start sub_80BF97C
-sub_80BF97C: @ 80BF97C
- push {r4,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- ldr r2, _080BF9B4 @ =gPaletteFade
- ldrb r1, [r2, 0x7]
- movs r0, 0x80
- ands r0, r1
- cmp r0, 0
- bne _080BF9AC
- ldrb r0, [r2, 0x8]
- movs r1, 0x80
- orrs r0, r1
- strb r0, [r2, 0x8]
- ldr r1, _080BF9B8 @ =gTasks
- lsls r0, r4, 2
- adds r0, r4
- lsls r0, 3
- adds r0, r1
- ldrb r0, [r0, 0x8]
- bl ChoosePartyMonByMenuType
- adds r0, r4, 0
- bl DestroyTask
-_080BF9AC:
- pop {r4}
- pop {r0}
- bx r0
- .align 2, 0
-_080BF9B4: .4byte gPaletteFade
-_080BF9B8: .4byte gTasks
- thumb_func_end sub_80BF97C
-
- thumb_func_start SelectMove
-SelectMove: @ 80BF9BC
- push {r4,lr}
- sub sp, 0x4
- ldr r0, _080BF9F0 @ =gPlayerParty
- ldr r1, _080BF9F4 @ =gSpecialVar_0x8004
- ldrb r1, [r1]
- ldr r2, _080BF9F8 @ =gPlayerPartyCount
- ldrb r2, [r2]
- subs r2, 0x1
- lsls r2, 24
- lsrs r2, 24
- ldr r3, _080BF9FC @ =CB2_ReturnToField
- movs r4, 0
- str r4, [sp]
- bl ShowSelectMovePokemonSummaryScreen
- movs r0, 0x3
- bl sub_8138B38
- ldr r1, _080BFA00 @ =gFieldCallback
- ldr r0, _080BFA04 @ =FieldCallback_ReturnToEventScript2
- str r0, [r1]
- add sp, 0x4
- pop {r4}
- pop {r0}
- bx r0
- .align 2, 0
-_080BF9F0: .4byte gPlayerParty
-_080BF9F4: .4byte gSpecialVar_0x8004
-_080BF9F8: .4byte gPlayerPartyCount
-_080BF9FC: .4byte CB2_ReturnToField
-_080BFA00: .4byte gFieldCallback
-_080BFA04: .4byte FieldCallback_ReturnToEventScript2
- thumb_func_end SelectMove
-
- thumb_func_start ScrSpecial_CountPokemonMoves
-ScrSpecial_CountPokemonMoves: @ 80BFA08
- push {r4,r5,lr}
- ldr r1, _080BFA44 @ =gSpecialVar_Result
- movs r0, 0
- strh r0, [r1]
- movs r4, 0
- adds r5, r1, 0
-_080BFA14:
- ldr r0, _080BFA48 @ =gSpecialVar_0x8004
- ldrh r1, [r0]
- movs r0, 0x64
- muls r0, r1
- ldr r1, _080BFA4C @ =gPlayerParty
- adds r0, r1
- adds r1, r4, 0
- adds r1, 0xD
- bl GetMonData
- cmp r0, 0
- beq _080BFA32
- ldrh r0, [r5]
- adds r0, 0x1
- strh r0, [r5]
-_080BFA32:
- adds r0, r4, 0x1
- lsls r0, 24
- lsrs r4, r0, 24
- cmp r4, 0x3
- bls _080BFA14
- pop {r4,r5}
- pop {r0}
- bx r0
- .align 2, 0
-_080BFA44: .4byte gSpecialVar_Result
-_080BFA48: .4byte gSpecialVar_0x8004
-_080BFA4C: .4byte gPlayerParty
- thumb_func_end ScrSpecial_CountPokemonMoves
-
- thumb_func_start ScrSpecial_GetPokemonNicknameAndMoveName
-ScrSpecial_GetPokemonNicknameAndMoveName: @ 80BFA50
- push {r4,r5,lr}
- ldr r0, _080BFA90 @ =gSpecialVar_0x8004
- ldrh r1, [r0]
- movs r0, 0x64
- adds r5, r1, 0
- muls r5, r0
- ldr r0, _080BFA94 @ =gPlayerParty
- adds r5, r0
- ldr r0, _080BFA98 @ =gSpecialVar_0x8005
- ldrh r1, [r0]
- adds r1, 0xD
- adds r0, r5, 0
- bl GetMonData
- adds r4, r0, 0
- lsls r4, 16
- lsrs r4, 16
- ldr r1, _080BFA9C @ =gStringVar1
- adds r0, r5, 0
- bl GetMonNickname
- ldr r0, _080BFAA0 @ =gStringVar2
- movs r1, 0xD
- muls r1, r4
- ldr r2, _080BFAA4 @ =gMoveNames
- adds r1, r2
- bl StringCopy
- pop {r4,r5}
- pop {r0}
- bx r0
- .align 2, 0
-_080BFA90: .4byte gSpecialVar_0x8004
-_080BFA94: .4byte gPlayerParty
-_080BFA98: .4byte gSpecialVar_0x8005
-_080BFA9C: .4byte gStringVar1
-_080BFAA0: .4byte gStringVar2
-_080BFAA4: .4byte gMoveNames
- thumb_func_end ScrSpecial_GetPokemonNicknameAndMoveName
-
- thumb_func_start sub_80BFAA8
-sub_80BFAA8: @ 80BFAA8
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x20
- mov r8, r0
- adds r5, r1, 0
- adds r4, r2, 0
- lsls r5, 24
- lsrs r5, 24
- lsls r4, 24
- lsrs r4, 24
- adds r0, r5, 0
- adds r0, 0xD
- str r0, [sp, 0x8]
- mov r0, r8
- ldr r1, [sp, 0x8]
- bl GetMonData
- mov r1, sp
- adds r1, 0x2
- str r1, [sp, 0x14]
- strh r0, [r1]
- adds r3, r4, 0
- adds r3, 0xD
- str r3, [sp, 0xC]
- mov r0, r8
- adds r1, r3, 0
- bl GetMonData
- mov r1, sp
- strh r0, [r1]
- adds r7, r5, 0
- adds r7, 0x11
- str r7, [sp, 0x10]
- mov r0, r8
- adds r1, r7, 0
- bl GetMonData
- mov r1, sp
- adds r1, 0x5
- str r1, [sp, 0x18]
- strb r0, [r1]
- adds r3, r4, 0
- adds r3, 0x11
- str r3, [sp, 0x1C]
- mov r0, r8
- adds r1, r3, 0
- bl GetMonData
- add r7, sp, 0x4
- mov r10, r7
- strb r0, [r7]
- mov r0, r8
- movs r1, 0x15
- bl GetMonData
- mov r6, sp
- adds r6, 0x6
- strb r0, [r6]
- ldr r1, _080BFBA4 @ =gPPUpGetMask
- adds r0, r5, r1
- ldrb r0, [r0]
- mov r9, r0
- ldrb r0, [r6]
- adds r2, r0, 0
- mov r3, r9
- ands r2, r3
- lsls r5, 1
- asrs r2, r5
- lsls r2, 24
- lsrs r2, 24
- adds r1, r4, r1
- ldrb r3, [r1]
- adds r1, r0, 0
- ands r1, r3
- lsls r4, 1
- asrs r1, r4
- lsls r1, 24
- lsrs r1, 24
- mov r7, r9
- bics r0, r7
- strb r0, [r6]
- ldrb r0, [r6]
- bics r0, r3
- strb r0, [r6]
- lsls r2, r4
- lsls r1, r5
- adds r2, r1
- ldrb r0, [r6]
- orrs r0, r2
- strb r0, [r6]
- mov r0, r8
- ldr r1, [sp, 0x8]
- mov r2, sp
- bl SetMonData
- mov r0, r8
- ldr r1, [sp, 0xC]
- ldr r2, [sp, 0x14]
- bl SetMonData
- mov r0, r8
- ldr r1, [sp, 0x10]
- mov r2, r10
- bl SetMonData
- mov r0, r8
- ldr r1, [sp, 0x1C]
- ldr r2, [sp, 0x18]
- bl SetMonData
- mov r0, r8
- movs r1, 0x15
- adds r2, r6, 0
- bl SetMonData
- add sp, 0x20
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- .align 2, 0
-_080BFBA4: .4byte gPPUpGetMask
- thumb_func_end sub_80BFAA8
-
- thumb_func_start DeleteMonMove
-DeleteMonMove: @ 80BFBA8
- push {r4-r6,lr}
- mov r6, r8
- push {r6}
- ldr r0, _080BFC08 @ =gSpecialVar_0x8004
- mov r8, r0
- ldrh r0, [r0]
- movs r6, 0x64
- muls r0, r6
- ldr r5, _080BFC0C @ =gPlayerParty
- adds r0, r5
- ldr r4, _080BFC10 @ =gSpecialVar_0x8005
- ldrb r2, [r4]
- movs r1, 0
- bl SetMonMoveSlot
- mov r1, r8
- ldrh r0, [r1]
- muls r0, r6
- adds r0, r5
- ldrb r1, [r4]
- bl RemoveMonPPBonus
- ldrh r4, [r4]
- cmp r4, 0x2
- bhi _080BFBFC
-_080BFBDA:
- ldr r0, _080BFC08 @ =gSpecialVar_0x8004
- ldrh r1, [r0]
- movs r0, 0x64
- muls r0, r1
- ldr r1, _080BFC0C @ =gPlayerParty
- adds r0, r1
- lsls r1, r4, 24
- lsrs r1, 24
- adds r4, 0x1
- lsls r2, r4, 24
- lsrs r2, 24
- bl sub_80BFAA8
- lsls r4, 16
- lsrs r4, 16
- cmp r4, 0x2
- bls _080BFBDA
-_080BFBFC:
- pop {r3}
- mov r8, r3
- pop {r4-r6}
- pop {r0}
- bx r0
- .align 2, 0
-_080BFC08: .4byte gSpecialVar_0x8004
-_080BFC0C: .4byte gPlayerParty
-_080BFC10: .4byte gSpecialVar_0x8005
- thumb_func_end DeleteMonMove
-
- thumb_func_start IsSelectedMonEgg
-IsSelectedMonEgg: @ 80BFC14
- push {lr}
- ldr r0, _080BFC38 @ =gSpecialVar_0x8004
- ldrh r1, [r0]
- movs r0, 0x64
- muls r0, r1
- ldr r1, _080BFC3C @ =gPlayerParty
- adds r0, r1
- movs r1, 0x2D
- bl GetMonData
- adds r1, r0, 0
- cmp r1, 0
- beq _080BFC44
- ldr r1, _080BFC40 @ =gSpecialVar_Result
- movs r0, 0x1
- strh r0, [r1]
- b _080BFC48
- .align 2, 0
-_080BFC38: .4byte gSpecialVar_0x8004
-_080BFC3C: .4byte gPlayerParty
-_080BFC40: .4byte gSpecialVar_Result
-_080BFC44:
- ldr r0, _080BFC4C @ =gSpecialVar_Result
- strh r1, [r0]
-_080BFC48:
- pop {r0}
- bx r0
- .align 2, 0
-_080BFC4C: .4byte gSpecialVar_Result
- thumb_func_end IsSelectedMonEgg
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/data/maps/FuchsiaCity_House3/scripts.inc b/data/maps/FuchsiaCity_House3/scripts.inc
index da4f19e60..dfbfd1365 100644
--- a/data/maps/FuchsiaCity_House3/scripts.inc
+++ b/data/maps/FuchsiaCity_House3/scripts.inc
@@ -16,19 +16,19 @@ EventScript_16D8B0:: @ 816D8B0
waitstate
compare_var_to_value VAR_0x8004, 6
goto_if ge, EventScript_16D941
- special IsSelectedMonEgg
+ special Special_IsSelectedMonEgg
compare_var_to_value VAR_RESULT, 1
goto_if eq, EventScript_16D937
- special ScrSpecial_CountPokemonMoves
+ special Special_GetNumMovesSelectedMonHas
compare_var_to_value VAR_RESULT, 1
goto_if eq, EventScript_16D92A
msgbox gUnknown_8199445
fadescreen 1
- special SelectMove
+ special Special_SelectMove
fadescreen 0
compare_var_to_value VAR_0x8005, 4
goto_if eq, EventScript_16D8B0
- special ScrSpecial_GetPokemonNicknameAndMoveName
+ special Special_BufferMoveDeleterNicknameAndMove
msgbox gUnknown_8199485, MSGBOX_YESNO
compare_var_to_value VAR_RESULT, 1
goto_if eq, EventScript_16D919
@@ -36,7 +36,7 @@ EventScript_16D8B0:: @ 816D8B0
end
EventScript_16D919:: @ 816D919
- special DeleteMonMove
+ special Special_MoveDeleterForgetMove
playfanfare MUS_ME_WASURE
waitfanfare
msgbox gUnknown_81994B1
@@ -44,7 +44,7 @@ EventScript_16D919:: @ 816D919
end
EventScript_16D92A:: @ 816D92A
- special ScrSpecial_GetPokemonNicknameAndMoveName
+ special Special_BufferMoveDeleterNicknameAndMove
msgbox gUnknown_8199465
release
end
diff --git a/data/maps/TwoIsland_House/scripts.inc b/data/maps/TwoIsland_House/scripts.inc
index 40c68cb7e..3841620b0 100644
--- a/data/maps/TwoIsland_House/scripts.inc
+++ b/data/maps/TwoIsland_House/scripts.inc
@@ -53,11 +53,11 @@ EventScript_1716A5:: @ 81716A5
EventScript_1716BE:: @ 81716BE
msgbox gUnknown_81A2CC3
- special SelectMoveTutorMon
+ special Special_SelectMoveTutorMon
waitstate
compare_var_to_value VAR_0x8004, 6
goto_if ge, EventScript_17179E
- special IsSelectedMonEgg
+ special Special_IsSelectedMonEgg
compare_var_to_value VAR_RESULT, 1
goto_if eq, EventScript_171790
compare_var_to_value VAR_0x8005, 0
diff --git a/data/specials.inc b/data/specials.inc
index f7ca055ef..922d9677e 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -227,11 +227,11 @@ gSpecials:: @ 815FD60
def_special Special_GetElevatorFloor
def_special nullsub_75
def_special nullsub_75
- def_special SelectMoveTutorMon
- def_special SelectMove
- def_special DeleteMonMove
- def_special ScrSpecial_GetPokemonNicknameAndMoveName
- def_special ScrSpecial_CountPokemonMoves
+ def_special Special_SelectMoveTutorMon
+ def_special Special_SelectMove
+ def_special Special_MoveDeleterForgetMove
+ def_special Special_BufferMoveDeleterNicknameAndMove
+ def_special Special_GetNumMovesSelectedMonHas
def_special DisplayMoveTutorMenu
def_special nullsub_75
def_special nullsub_75
@@ -336,7 +336,7 @@ gSpecials:: @ 815FD60
def_special nullsub_75
def_special nullsub_75
def_special Special_GetSpeciesOfPartySlot_x8004
- def_special IsSelectedMonEgg
+ def_special Special_IsSelectedMonEgg
def_special nullsub_75
def_special nullsub_75
def_special LoadPlayerBag
diff --git a/include/pokemon.h b/include/pokemon.h
index 7bc1239f1..999879880 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -513,6 +513,7 @@ extern const u16 *const gLevelUpLearnsets[];
extern const u8 gFacilityClassToPicIndex[];
extern const u8 gFacilityClassToTrainerClass[];
extern const struct SpriteTemplate gUnknown_825DEF0[];
+extern const u8 gPPUpGetMask[];
void ZeroBoxMonData(struct BoxPokemon *boxMon);
void ZeroMonData(struct Pokemon *mon);
diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h
index 3695d46df..2b8f96316 100644
--- a/include/pokemon_summary_screen.h
+++ b/include/pokemon_summary_screen.h
@@ -34,5 +34,6 @@ enum PokemonSummaryScreenPage
s32 GetLastViewedMonIndex(void);
void ShowPokemonSummaryScreen(struct Pokemon * party, u8 cursorPos, u8 lastIdx, void (*callback)(void), u8 a4);
+void sub_8138B38(u8);
#endif // GUARD_POKEMON_SUMMARY_SCREEN_H
diff --git a/include/script_pokemon_80F8.h b/include/script_pokemon_80F8.h
deleted file mode 100644
index 8a5bb12e1..000000000
--- a/include/script_pokemon_80F8.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef GUARD_SCRIPTPOKE80F8_H
-#define GUARD_SCRIPTPOKE80F8_H
-
-#include "global.h"
-
-void ShowContestWinner(void);
-u8 ScriptGiveMon(u16, u8, u16, u32, u32, u8);
-u8 ScriptGiveEgg(u16);
-void CreateScriptedWildMon(u16, u8, u16);
-void ScriptSetMonMoveSlot(u8, u16, u8);
-
-#endif
diff --git a/include/script_pokemon_81B9.h b/include/script_pokemon_81B9.h
deleted file mode 100644
index d49095fcc..000000000
--- a/include/script_pokemon_81B9.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef GUARD_SCRIPTPOKE81B9_H
-#define GUARD_SCRIPTPOKE81B9_H
-
-#include "global.h"
-
-void sub_81B9404(void);
-
-#endif
diff --git a/include/script_pokemon_util_80A0058.h b/include/script_pokemon_util_80A0058.h
index b63a7b0ef..75e826e93 100644
--- a/include/script_pokemon_util_80A0058.h
+++ b/include/script_pokemon_util_80A0058.h
@@ -6,5 +6,6 @@ bool8 ScriptGiveEgg(u16 species);
void ScriptSetMonMoveSlot(u8 partyIdx, u16 move, u8 slot);
void sp000_heal_pokemon(void);
void ReducePlayerPartyToThree(void);
+void CreateScriptedWildMon(u16 species, u8 level, u16 item);
#endif //GUARD_SCRIPT_POKEMON_UTIL_80A0058_H
diff --git a/ld_script.txt b/ld_script.txt
index e60d95f81..b18f0d5f2 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -178,7 +178,7 @@ SECTIONS {
src/mon_markings.o(.text);
src/mail.o(.text);
src/menu_helpers.o(.text);
- asm/script_pokemon_util_80BF8FC.o(.text);
+ src/party_menu_specials.o(.text);
src/heal_location.o(.text);
src/region_map.o(.text);
src/image_processing_effects.o(.text);
diff --git a/src/party_menu_specials.c b/src/party_menu_specials.c
new file mode 100644
index 000000000..751684bd5
--- /dev/null
+++ b/src/party_menu_specials.c
@@ -0,0 +1,111 @@
+#include "global.h"
+#include "data.h"
+#include "script.h"
+#include "overworld.h"
+#include "battle.h"
+#include "palette.h"
+#include "pokemon.h"
+#include "party_menu.h"
+#include "field_fadetransition.h"
+#include "pokemon_summary_screen.h"
+#include "event_data.h"
+#include "string_util.h"
+#include "constants/moves.h"
+
+static void sub_80BF97C(u8 taskId);
+
+void Special_ChooseMonFromParty(void)
+{
+ u8 taskId;
+
+ ScriptContext2_Enable();
+ taskId = CreateTask(sub_80BF97C, 10);
+ gTasks[taskId].data[0] = PARTY_MENU_TYPE_CHOOSE_MON;
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
+}
+
+void Special_SelectMoveTutorMon(void)
+{
+ u8 taskId;
+
+ ScriptContext2_Enable();
+ taskId = CreateTask(sub_80BF97C, 10);
+ gTasks[taskId].data[0] = PARTY_MENU_TYPE_MOVE_RELEARNER;
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
+}
+
+static void sub_80BF97C(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ gPaletteFade.bufferTransferDisabled = TRUE;
+ ChoosePartyMonByMenuType((u8)gTasks[taskId].data[0]);
+ DestroyTask(taskId);
+ }
+}
+
+void Special_SelectMove(void)
+{
+ ShowSelectMovePokemonSummaryScreen(gPlayerParty, gSpecialVar_0x8004, gPlayerPartyCount - 1, CB2_ReturnToField, 0);
+ sub_8138B38(3);
+ gFieldCallback = FieldCallback_ReturnToEventScript2;
+}
+
+void Special_GetNumMovesSelectedMonHas(void)
+{
+ u8 i;
+
+ gSpecialVar_Result = 0;
+ for (i = 0; i < MAX_MON_MOVES; ++i)
+ if (GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_MOVE1 + i) != MOVE_NONE)
+ ++gSpecialVar_Result;
+}
+
+void Special_BufferMoveDeleterNicknameAndMove(void)
+{
+ struct Pokemon *mon = &gPlayerParty[gSpecialVar_0x8004];
+ u16 move = GetMonData(mon, MON_DATA_MOVE1 + gSpecialVar_0x8005);
+
+ GetMonNickname(mon, gStringVar1);
+ StringCopy(gStringVar2, gMoveNames[move]);
+}
+
+static void ShiftMoveSlot(struct Pokemon *mon, u8 slotTo, u8 slotFrom)
+{
+ u16 move1 = GetMonData(mon, MON_DATA_MOVE1 + slotTo);
+ u16 move0 = GetMonData(mon, MON_DATA_MOVE1 + slotFrom);
+ u8 pp1 = GetMonData(mon, MON_DATA_PP1 + slotTo);
+ u8 pp0 = GetMonData(mon, MON_DATA_PP1 + slotFrom);
+ u8 ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES);
+ u8 ppBonusMask1 = gPPUpGetMask[slotTo];
+ u8 ppBonusMove1 = (ppBonuses & ppBonusMask1) >> (slotTo * 2);
+ u8 ppBonusMask2 = gPPUpGetMask[slotFrom];
+ u8 ppBonusMove2 = (ppBonuses & ppBonusMask2) >> (slotFrom * 2);
+
+ ppBonuses &= ~ppBonusMask1;
+ ppBonuses &= ~ppBonusMask2;
+ ppBonuses |= (ppBonusMove1 << (slotFrom * 2)) + (ppBonusMove2 << (slotTo * 2));
+ SetMonData(mon, MON_DATA_MOVE1 + slotTo, &move0);
+ SetMonData(mon, MON_DATA_MOVE1 + slotFrom, &move1);
+ SetMonData(mon, MON_DATA_PP1 + slotTo, &pp0);
+ SetMonData(mon, MON_DATA_PP1 + slotFrom, &pp1);
+ SetMonData(mon, MON_DATA_PP_BONUSES, &ppBonuses);
+}
+
+void Special_MoveDeleterForgetMove(void)
+{
+ u16 i;
+
+ SetMonMoveSlot(&gPlayerParty[gSpecialVar_0x8004], MOVE_NONE, gSpecialVar_0x8005);
+ RemoveMonPPBonus(&gPlayerParty[gSpecialVar_0x8004], gSpecialVar_0x8005);
+ for (i = gSpecialVar_0x8005; i < MAX_MON_MOVES - 1; ++i)
+ ShiftMoveSlot(&gPlayerParty[gSpecialVar_0x8004], i, i + 1);
+}
+
+void Special_IsSelectedMonEgg(void)
+{
+ if (GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_IS_EGG))
+ gSpecialVar_Result = TRUE;
+ else
+ gSpecialVar_Result = FALSE;
+}
diff --git a/src/scrcmd.c b/src/scrcmd.c
index fad30a6a8..6d2b1f430 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -34,7 +34,6 @@
#include "coins.h"
#include "battle_setup.h"
#include "shop.h"
-#include "script_pokemon_80F8.h"
#include "slot_machine.h"
#include "field_effect.h"
#include "fieldmap.h"