ref: 6ca9439c651672a306d42659cd0772439b6450f9
parent: cdaf8e3d9a8fe4c3e9c53269424aada468fdb6ab
author: Sawakita <[email protected]>
date: Tue Jan 10 18:54:38 EST 2012
Function $3493, former CheckBagItemExist, is now called IsItemInBag (consistency). Added base routine for text-special id $F7 hg-commit-id: 105c01affa23
--- a/constants.asm
+++ b/constants.asm
@@ -2,6 +2,8 @@
BLUE EQU 0
GREEN EQU 0
+;\1 = X
+;\2 = Y
FuncCoord: MACRO
Coord = $C3A0 + 20 * \2 + \1
ENDM
@@ -153,6 +155,9 @@
W_YCOORD EQU $D361 ; player’s position on the current map
W_XCOORD EQU $D362
+
+W_PLAYERCOINS1 EQU $D5A4
+W_PLAYERCOINS2 EQU $D5A5
W_RIVALSTARTER EQU $D715
--- a/pokered.asm
+++ b/pokered.asm
@@ -1113,9 +1113,19 @@
HiddenPrefix:
db "HM"
-INCBIN "baserom.gbc",$3040,$3493 - $3040
+INCBIN "baserom.gbc",$3040,$3474 - $3040
-CheckBagItemExist: ; $3493: ; 3493
+FuncTX_F7: ; 3474
+; XXX find a better name for this function
+; special_F7
+ ld b,BANK(CeladonPrizeMenu)
+ ld hl,CeladonPrizeMenu
+ call Bankswitch
+ jp $29DF ; continue to main text-engine function
+
+INCBIN "baserom.gbc",$347F,$3493 - $347F
+
+IsItemInBag: ; 3493
; given an item_id in b
; set zero flag if item isn't in player's bag
; else reset zero flag
@@ -12172,7 +12182,7 @@
cp a,$95 ; Pokémon Tower
jr nc,.next\@
ld b,SILPH_SCOPE
- call CheckBagItemExist ; $3493
+ call IsItemInBag ; $3493
ret z
.next\@
ld a,1
@@ -17310,7 +17320,11 @@
; warp-to
EVENT_DISP $f, $16, $17 ; MANSION_1
-INCBIN "baserom.gbc",$524dd,$1b23
+INCBIN "baserom.gbc",$524DD,$5271B - $524DD
+
+CeladonPrizeMenu: ; 14:671B
+INCBIN "baserom.gbc",$5271B,$54000 - $5271B
+;INCBIN "baserom.gbc",$52996,$54000 - $52996
SECTION "bank15",DATA,BANK[$15]