ref: f0cf86777ba012485003a05fb5988a9812051808
parent: d05adc4f9881c2d5516a8884740a3c4128c29642
author: yenatch <[email protected]>
date: Sat Sep 7 21:35:10 EDT 2013
fix item asm labels CheckItem was called PickUpItem by mistake Also label TossItem and ReceiveItem
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -539,7 +539,7 @@
ld a, [de]
ld [$d10c], a
ld hl, $d892
- call Function2f66
+ call ReceiveItem
ld a, $1
jr c, .asm_96fb0 ; 0x96fad $1
xor a
@@ -2320,7 +2320,7 @@
call GetScriptByte
ld [$d10c], a
ld hl, $d892
- call Function2f66
+ call ReceiveItem
jr nc, .asm_977eb ; 0x977e3 $6
ld a, $1
ld [$c2dd], a
@@ -2346,7 +2346,7 @@
ld a, $ff
ld [$d107], a
ld hl, $d892
- call Function2f53
+ call TossItem
ret nc
ld a, $1
ld [$c2dd], a
@@ -2363,7 +2363,7 @@
call GetScriptByte
ld [$d106], a
ld hl, $d892
- call PickUpItem
+ call CheckItem
ret nc
ld a, $1
ld [$c2dd], a
--- a/main.asm
+++ b/main.asm
@@ -823,20 +823,20 @@
ret
; 2f53
-Function2f53: ; 2f53
+TossItem: ; 2f53
push hl
push de
push bc
ld a, [hROMBank]
push af
- ld a, $3
+ ld a, BANK(_TossItem)
rst Bankswitch
- call $520d
+ call _TossItem
+
pop bc
ld a, b
rst Bankswitch
-
pop bc
pop de
pop hl
@@ -843,36 +843,36 @@
ret
; 2f66
-Function2f66: ; 2f66
+ReceiveItem: ; 2f66
push bc
ld a, [hROMBank]
push af
- ld a, $3
+ ld a, BANK(_ReceiveItem)
rst Bankswitch
-
push hl
push de
- call $51d5
+
+ call _ReceiveItem
+
pop de
pop hl
pop bc
ld a, b
rst Bankswitch
-
pop bc
ret
; 2f79
-PickUpItem: ; 2f79
+CheckItem: ; 2f79
push hl
push de
push bc
ld a, [hROMBank]
push af
- ld a, BANK(_PickUpItem)
+ ld a, BANK(_CheckItem)
rst Bankswitch
- call _PickUpItem
+ call _CheckItem
pop bc
ld a, b
@@ -14138,7 +14138,7 @@
ld a, $1
ld [$d10c], a
ld hl, NumItems
- call Function2f66
+ call ReceiveItem
jr nc, .asm_c33d
xor a
ld [$abe2], a
@@ -14238,7 +14238,7 @@
ld a, $36
ld [CurItem], a
ld hl, NumItems
- call PickUpItem
+ call CheckItem
jr nc, .asm_c3c9
and a
ret
@@ -16271,7 +16271,7 @@
; 0xd1d5
-Functiond1d5: ; d1d5
+_ReceiveItem: ; d1d5
call Functiond27b
jp nz, Functiond29c
push hl
@@ -16318,7 +16318,7 @@
; d20d
-Functiond20d: ; d20d
+_TossItem: ; d20d
call Functiond27b
jr nz, .asm_d241
push hl
@@ -16366,7 +16366,7 @@
jp Functiond2ff
; d244
-_PickUpItem: ; d244
+_CheckItem: ; d244
call Functiond27b
jr nz, .asm_d278
push hl
@@ -16424,7 +16424,7 @@
; d283
Functiond283: ; d283
- ld c, $14
+ ld c, 20
ld a, e
cp TMsHMsEnd % $100
jr nz, .asm_d28e
@@ -16433,7 +16433,7 @@
ret z
.asm_d28e
- ld c, $32
+ ld c, 50
ld a, e
cp BallsEnd % $100
jr nz, .asm_d299
@@ -19469,7 +19469,7 @@
ld hl, NumItems
ld a, $1
ld [$d10c], a
- jp Function2f53
+ jp TossItem
; f7a0
Functionf7a0: ; f7a0
@@ -22296,7 +22296,7 @@
ld a, $1
ld [$d10c], a
ld hl, NumItems
- jp Function2f66
+ jp ReceiveItem
; 12cea
INCBIN "baserom.gbc", $12cea, $12cf5 - $12cea
@@ -27034,7 +27034,7 @@
ld a, [$d107]
ld [Buffer2], a
ld hl, NumItems
- call Function2f66
+ call ReceiveItem
jr nc, .PackFull
ld a, [Buffer1]
ld [$d10c], a
@@ -27041,7 +27041,7 @@
ld a, [Buffer2]
ld [$d107], a
ld hl, PCItems
- call Function2f53
+ call TossItem
ld a, $3b
call Predef
ld hl, .WithdrewText
@@ -27215,7 +27215,7 @@
ld a, [$d107]
ld [Buffer2], a
ld hl, PCItems
- call Function2f66
+ call ReceiveItem
jr nc, .asm_15965
ld a, [Buffer1]
ld [$d10c], a
@@ -27222,7 +27222,7 @@
ld a, [Buffer2]
ld [$d107], a
ld hl, NumItems
- call Function2f53
+ call TossItem
ld a, $3b
call Predef
ld hl, .DepositText
@@ -27790,7 +27790,7 @@
call Function1600b
jr c, .asm_15d79
ld hl, NumItems
- call Function2f66
+ call ReceiveItem
jr nc, .asm_15d6f
ld a, [$d107]
ld e, a
@@ -28008,7 +28008,7 @@
call Function15fd7
ld a, [$d107]
ld hl, NumItems
- call Function2f53
+ call TossItem
ld a, $3b
call Predef
ld hl, $c5b9
@@ -31297,7 +31297,7 @@
push hl
ld [CurItem], a
ld hl, NumItems
- call PickUpItem
+ call CheckItem
pop hl
jr nc, .asm_24c89
ld a, [hl]
@@ -50166,7 +50166,7 @@
ld a, $1
ld [$d10c], a
ld hl, NumItems
- call Function2f66
+ call ReceiveItem
jr c, .asm_4489e
ld hl, .PackFullText
jp Function1d67
@@ -51580,12 +51580,12 @@
ld a, [ScriptVar]
ld [CurItem], a
ld hl, PCItems
- call PickUpItem
+ call CheckItem
jr c, .asm_4a948
ld a, [ScriptVar]
ld [CurItem], a
ld hl, NumItems
- call PickUpItem
+ call CheckItem
jr c, .asm_4a948
xor a
ld [ScriptVar], a
@@ -60621,7 +60621,7 @@
ld hl, NumItems
ld a, b
ld [$d10c], a
- call Function2f53
+ call TossItem
pop bc
ld a, c
sub b
@@ -62461,7 +62461,7 @@
ld a, WATER_STONE
ld [CurItem], a
ld hl, NumItems
- call PickUpItem
+ call CheckItem
jr c, .asm_8ae24
ld a, [PartyCount]
@@ -62781,7 +62781,7 @@
ld a, $1
ld [$d10c], a
ld hl, NumItems
- call Function2f66
+ call ReceiveItem
pop hl
jr nc, .asm_8b04c
ld a, [hl]
@@ -76543,7 +76543,7 @@
ld a, $1
ld [$d10c], a
ld hl, PCItems
- call Function2f66
+ call ReceiveItem
ret
; fd0eb
--- a/stats/odd_eggs.asm
+++ b/stats/odd_eggs.asm
@@ -45,7 +45,7 @@
ld a, $ff
ld [$d107], a
ld hl, NumItems
- call Function2f53
+ call TossItem
ld a, EGG
ld [$cd2a], a
ld a, $29