shithub: pokecrystal

Download patch

ref: acdb3020359de30ccde3bd1227883902b18b60a9
parent: c82deab86fc984b6af4686d88b42042be4f6cd9e
author: mid-kid <[email protected]>
date: Sun May 6 09:48:04 EDT 2018

Fix rest of the givepokeitem/checkpokeitem references

--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -22,7 +22,7 @@
 	const HAVE_AMOUNT ; 1
 	const HAVE_LESS   ; 2
 
-; checkpokeitem return values
+; checkpokemail return values
 	const_def
 	const POKEMAIL_WRONG_MAIL ; 0
 	const POKEMAIL_CORRECT    ; 1
--- a/docs/event_commands.md
+++ b/docs/event_commands.md
@@ -99,9 +99,9 @@
 
 ## `$2E`: <code>giveegg <i>mon_id</i>, <i>level</i></code>
 
-## `$2F`: <code>givepokeitem <i>pointer</i></code>
+## `$2F`: <code>givepokemail <i>pointer</i></code>
 
-## `$30`: <code>checkpokeitem <i>pointer</i></code>
+## `$30`: <code>checkpokemail <i>pointer</i></code>
 
 ## `$31`: <code>checkevent <i>event_flag</i></code>
 
--- a/engine/overworld/scripting.asm
+++ b/engine/overworld/scripting.asm
@@ -112,8 +112,8 @@
 	dw Script_checkpoke                  ; 2c
 	dw Script_givepoke                   ; 2d
 	dw Script_giveegg                    ; 2e
-	dw Script_givepokeitem               ; 2f
-	dw Script_checkpokeitem              ; 30
+	dw Script_givepokemail               ; 2f
+	dw Script_checkpokemail              ; 30
 	dw Script_checkevent                 ; 31
 	dw Script_clearevent                 ; 32
 	dw Script_setevent                   ; 33
@@ -2019,7 +2019,7 @@
 	ld de, wStringBuffer2
 	jp ConvertMemToText
 
-Script_givepokeitem:
+Script_givepokemail:
 ; script command 0x2f
 ; parameters: pointer
 
@@ -2037,10 +2037,10 @@
 	ld a, [wScriptBank]
 	call FarCopyBytes
 	pop bc
-	farcall GivePokeItem
+	farcall GivePokeMail
 	ret
 
-Script_checkpokeitem:
+Script_checkpokemail:
 ; script command 0x30
 ; parameters: pointer
 
@@ -2050,7 +2050,7 @@
 	ld d, a
 	ld a, [wScriptBank]
 	ld b, a
-	farcall CheckPokeItem
+	farcall CheckPokeMail
 	ret
 
 Script_giveitem:
--- a/engine/pokemon/mail.asm
+++ b/engine/pokemon/mail.asm
@@ -124,7 +124,7 @@
 	jp CloseSRAM
 ; 44654
 
-CheckPokeItem:: ; 44654
+CheckPokeMail:: ; 44654
 	push bc
 	push de
 	farcall SelectMonFromParty
@@ -194,7 +194,7 @@
 ; 446cc
 
 
-GivePokeItem:: ; 446cc
+GivePokeMail:: ; 446cc
 	ld a, [wPartyCount]
 	dec a
 	push af
--- a/macros/legacy.asm
+++ b/macros/legacy.asm
@@ -51,6 +51,8 @@
 resetfuncs        EQUS "endall"
 storetext         EQUS "battletowertext"
 displaylocation   EQUS "landmarktotext"
+givepokeitem      EQUS "givepokemail"
+checkpokeitem     EQUS "checkpokemail"
 
 
 ; macros/scripts/maps.asm