summaryrefslogtreecommitdiff
path: root/engine/items
diff options
context:
space:
mode:
authorjd-0 <44876081+jd-0@users.noreply.github.com>2020-09-20 12:07:01 -0700
committerjd-0 <44876081+jd-0@users.noreply.github.com>2020-09-20 12:07:01 -0700
commit8900eb7ad06931b78dcb91e0c2e7db583090aa06 (patch)
treea08cd946f4b421f2d25e246df3d6d3375dc5ea05 /engine/items
parente789ee48b65e8cc08104ef06de4b08c9ef9d117d (diff)
Remove address comments
Regex patterns used: ; [0-9a-f]{1,5} \([0-9a-f]{1,2}:[0-9a-f]{1,4}\) ; [0-9a-f]{1,2}:[0-9a-f]{4} ; [0-9a-f]{4,5} ;[0-9a-f]{4,5} ;[0-9a-f]{1,2}:[0-9a-f]{1,4}
Diffstat (limited to 'engine/items')
-rwxr-xr-xengine/items/inventory.asm100
-rwxr-xr-xengine/items/item_effects.asm4
-rw-r--r--engine/items/tmhm.asm4
3 files changed, 54 insertions, 54 deletions
diff --git a/engine/items/inventory.asm b/engine/items/inventory.asm
index 33b5e4d..78417e2 100755
--- a/engine/items/inventory.asm
+++ b/engine/items/inventory.asm
@@ -2,7 +2,7 @@ INCLUDE "constants.asm"
SECTION "engine/items/inventory.asm@Inventory", ROMX
-_ReceiveItem: ; 03:4AA1
+_ReceiveItem:
call DoesHLEqualwNumBagItems
jp nz, PutItemInPocket
push hl
@@ -12,28 +12,28 @@ _ReceiveItem: ; 03:4AA1
ld hl, .Pockets
jp CallJumptable
-.Pockets: ; 03:4ABA
+.Pockets:
dw .Item
dw .KeyItem
dw .Ball
dw .TMHM
-.Item: ; 03:4AC2
+.Item:
pop hl
jp PutItemInPocket
-.KeyItem: ; 03:4AC6
+.KeyItem:
pop hl
jp ReceiveKeyItem
-.Ball: ; 03:4ACA
+.Ball:
pop hl
ld a, [wCurItem]
ld c, a
call GetBallIndex
jp ReceiveBall
-.TMHM: ; 03:4AD5
+.TMHM:
pop hl
ld a, [wCurItem]
ld c, a
@@ -41,7 +41,7 @@ _ReceiveItem: ; 03:4AA1
jp ReceiveTMHM
-_TossItem: ; 03:4AE0
+_TossItem:
call DoesHLEqualwNumBagItems
jr nz, .remove_item
push hl
@@ -51,38 +51,38 @@ _TossItem: ; 03:4AE0
ld hl, .Pockets
jp CallJumptable
-.Pockets ; 03:4AF8
+.Pockets
dw .Item
dw .KeyItem
dw .Ball
dw .TMHM
-.Ball ; 03:4B00
+.Ball
pop hl
ld a, [wCurItem]
ld c, a
call GetBallIndex
jp TossBall
-.TMHM ; 03:4B0B
+.TMHM
pop hl
ld a, [wCurItem]
ld c, a
call GetTMHMNumber
jp TossTMHM
-.KeyItem ; 03:4B16
+.KeyItem
pop hl
jp TossKeyItem
-.Item ; 03:4B1A
+.Item
pop hl
-.remove_item ; 03:4B1B
+.remove_item
jp RemoveItemFromPocket
-_CheckItem: ; 03:4B1E
+_CheckItem:
call DoesHLEqualwNumBagItems
jr nz, .not_bag
push hl
@@ -92,38 +92,38 @@ _CheckItem: ; 03:4B1E
ld hl, .Pockets
jp CallJumptable
-.Pockets ; 03:4B36
+.Pockets
dw .Item
dw .KeyItem
dw .Ball
dw .TMHM
-.Ball ; 03:4B3E
+.Ball
pop hl
ld a, [wCurItem]
ld c, a
call GetBallIndex
jp CheckBall
-.TMHM ; 03:4B49
+.TMHM
pop hl
ld a, [wCurItem]
ld c, a
call GetTMHMNumber
jp CheckTMHM
-.KeyItem ; 03:4B54
+.KeyItem
pop hl
jp CheckKeyItems
-.Item ; 03:4B58
+.Item
pop hl
.not_bag
jp CheckTheItem
-DoesHLEqualwNumBagItems: ; 03:4B5C
+DoesHLEqualwNumBagItems:
ld a, l
cp LOW(wNumBagItems)
ret nz
@@ -132,7 +132,7 @@ DoesHLEqualwNumBagItems: ; 03:4B5C
ret
-PutItemInPocket: ; 03:4B64
+PutItemInPocket:
ld d, h
ld e, l
inc hl
@@ -217,7 +217,7 @@ PutItemInPocket: ; 03:4B64
ret
-GetPocketCapacity: ; 03:4BC1
+GetPocketCapacity:
ld c, MAX_ITEMS
ld a, e
cp a, LOW(wNumBagItems)
@@ -231,7 +231,7 @@ GetPocketCapacity: ; 03:4BC1
ret
-RemoveItemFromPocket: ;03:4BCF
+RemoveItemFromPocket:
ld d, h
ld e, l
inc hl
@@ -280,7 +280,7 @@ RemoveItemFromPocket: ;03:4BCF
ret
-CheckTheItem: ; 03:4BFD
+CheckTheItem:
ld a, [wCurItem]
ld c, a
@@ -300,7 +300,7 @@ CheckTheItem: ; 03:4BFD
ret
-ReceiveKeyItem: ; 03:4C0E
+ReceiveKeyItem:
ld hl, wNumKeyItems
ld a, [hli]
cp a, MAX_KEY_ITEMS
@@ -321,7 +321,7 @@ ReceiveKeyItem: ; 03:4C0E
ret
-TossKeyItem: ; 03:4C28
+TossKeyItem:
ld hl, wNumKeyItems
dec [hl]
inc hl
@@ -345,7 +345,7 @@ TossKeyItem: ; 03:4C28
ret
-CheckKeyItems: ; 03:4C40
+CheckKeyItems:
ld a, [wCurItem]
ld c, a
ld hl, wKeyItems
@@ -366,7 +366,7 @@ CheckKeyItems: ; 03:4C40
; get index of ball item id c from BallItems
-GetBallIndex: ; 03:4C53
+GetBallIndex:
ld a, c
push hl
push de
@@ -383,7 +383,7 @@ GetBallIndex: ; 03:4C53
; get ball item id at index c in BallItems
-GetBallByIndex: ; 03:4c66
+GetBallByIndex:
push bc
push hl
ld b, 0
@@ -396,7 +396,7 @@ GetBallByIndex: ; 03:4c66
ret
-BallItems: ; 03:4C73
+BallItems:
db ITEM_MASTER_BALL
db ITEM_ULTRA_BALL
db ITEM_GREAT_BALL
@@ -409,7 +409,7 @@ BallItems: ; 03:4C73
; Note, the ball pocket appears to be
; a fixed length, not -1 terminated
-EmptyBallPocket: ; 03:4C78
+EmptyBallPocket:
ld hl, wNumBallItems
xor a
ld [hli], a
@@ -417,7 +417,7 @@ EmptyBallPocket: ; 03:4C78
ret
-ReceiveBall: ; 03:4C80
+ReceiveBall:
ld hl, wBallQuantities
ld b, 0
add hl, bc
@@ -446,7 +446,7 @@ ReceiveBall: ; 03:4C80
ret
-TossBall: ; 03:4C9F
+TossBall:
ld hl, wBallQuantities
ld b, 0
add hl, bc
@@ -476,7 +476,7 @@ TossBall: ; 03:4C9F
ret
-CheckBall: ; 03:4CC0
+CheckBall:
ld hl, wBallQuantities
ld b, 0
add hl, bc
@@ -487,7 +487,7 @@ CheckBall: ; 03:4CC0
ret
-ReceiveTMHM: ; 03:4CCB
+ReceiveTMHM:
ld b, 0
ld hl, wTMsHMs
add hl, bc
@@ -504,7 +504,7 @@ ReceiveTMHM: ; 03:4CCB
ret
-TossTMHM: ; 03:4CDE
+TossTMHM:
ld b, 0
ld hl, wTMsHMs
add hl, bc
@@ -524,7 +524,7 @@ TossTMHM: ; 03:4CDE
ret
-CheckTMHM: ; 03:4CF4
+CheckTMHM:
ld b, 0
ld hl, wTMsHMs
add hl, bc
@@ -534,7 +534,7 @@ CheckTMHM: ; 03:4CF4
scf
ret
-GetTMHMNumber: ; 03:4CFF
+GetTMHMNumber:
ld a, c
ld c, 0
@@ -565,7 +565,7 @@ GetTMHMNumber: ; 03:4CFF
and a
ret
-GetNumberedTMHM: ; 03:4D1A
+GetNumberedTMHM:
; Return the item id of a TM/HM by number c.
ld a, c
ld c, 0
@@ -592,7 +592,7 @@ SECTION "engine/items/inventory.asm@GetItemAmount", ROMX
; Returns carry if user has the item
; and the amount in b
-GetItemAmount: ; 03:4e10
+GetItemAmount:
call CheckAmountInItemPocket
ret c
call CheckAmountInKeyItems
@@ -602,7 +602,7 @@ GetItemAmount: ; 03:4e10
ret
; Returns the amount of item b in b
-CheckAmountInItemPocket: ; 03:4E1C
+CheckAmountInItemPocket:
ld hl, wItems
.loop
inc hl
@@ -618,7 +618,7 @@ CheckAmountInItemPocket: ; 03:4E1C
ret
; Returns the amount of item b in b
-CheckAmountInKeyItems: ; 03:4E2B
+CheckAmountInKeyItems:
ld hl, wNumKeyItems
ld a, [hli]
and a
@@ -638,7 +638,7 @@ SECTION "engine/items/inventory.asm@_CheckTossableItem", ROMX
; Return 1 in wItemAttributeParamBuffer and
; carry if wCurItem can't be removed from the bag.
-_CheckTossableItem: ; 03:53AD
+_CheckTossableItem:
ld a, ITEMATTR_PERMISSIONS
call GetItemAttr
bit CANT_TOSS_F, a
@@ -648,7 +648,7 @@ _CheckTossableItem: ; 03:53AD
; Return 1 in wItemAttributeParamBuffer
; and carry if wCurItem can't be selected.
-CheckSelectableItem: ; 03:53B8
+CheckSelectableItem:
ld a, ITEMATTR_PERMISSIONS
call GetItemAttr
bit CANT_SELECT_F, a
@@ -657,7 +657,7 @@ CheckSelectableItem: ; 03:53B8
ret
; Return the pocket for wCurItem in wItemAttributeParamBuffer.
-CheckItemPocket: ; 03:53C3
+CheckItemPocket:
ld a, ITEMATTR_POCKET
call GetItemAttr
and $f
@@ -665,7 +665,7 @@ CheckItemPocket: ; 03:53C3
ret
; Return the context for wCurItem in wItemAttributeParamBuffer.
-CheckItemContext: ; 03:53CE
+CheckItemContext:
ld a, ITEMATTR_HELP
call GetItemAttr
and $f
@@ -673,7 +673,7 @@ CheckItemContext: ; 03:53CE
ret
; Return the menu for wCurItem in wItemAttributeParamBuffer.
-CheckItemMenu: ; 03:53D9
+CheckItemMenu:
ld a, ITEMATTR_HELP
call GetItemAttr
swap a
@@ -682,7 +682,7 @@ CheckItemMenu: ; 03:53D9
ret
; Get attribute a of wCurItem.
-GetItemAttr: ; 03:53E6
+GetItemAttr:
push hl
push bc
ld hl, ItemAttributes
@@ -702,14 +702,14 @@ GetItemAttr: ; 03:53E6
pop hl
ret
-ItemAttr_ReturnCarry: ; 03:5405
+ItemAttr_ReturnCarry:
ld a, 1
ld [wItemAttributeParamBuffer], a
scf
ret
; Return the price of wCurItem in de.
-GetItemPrice: ; 03:540C
+GetItemPrice:
push hl
push bc
ld a, ITEMATTR_PRICE
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index afd2ce3..a165473 100755
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -2,7 +2,7 @@ INCLUDE "constants.asm"
SECTION "engine/items/item_effects.asm", ROMX
-ApplyPPUp: ; 03:78f6
+ApplyPPUp:
ld a, MON_MOVES
call GetPartyParamLocation
push hl
@@ -35,7 +35,7 @@ ApplyPPUp: ; 03:78f6
inc de
jr .loop
-ComputeMaxPP: ; 03:792B
+ComputeMaxPP:
push bc
; Divide the base PP by 5.
ld a, [de]
diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm
index f3290fe..b49b929 100644
--- a/engine/items/tmhm.asm
+++ b/engine/items/tmhm.asm
@@ -2,7 +2,7 @@ INCLUDE "constants.asm"
SECTION "engine/items/tmhm.asm", ROMX
-CanLearnTMHMMove: ; 04:528f
+CanLearnTMHMMove:
; Gets the index of TM or HM with move ID wce32,
; then checks the corresponding flag in wMonDexIndex's learnset.
; Sets register c to 1 if TM/HM is in learnset OR if debug is enabled.
@@ -37,7 +37,7 @@ CanLearnTMHMMove: ; 04:528f
pop de
ret
-GetTMHMMove: ; 04:52C1
+GetTMHMMove:
; converts TM/HM list index to TM/HM move ID
ld a, [wNamedObjectIndexBuffer]
dec a