summaryrefslogtreecommitdiff
path: root/engine/items/items.asm
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-07-14 23:16:06 -0700
committerYamaArashi <shadow962@live.com>2015-07-14 23:16:06 -0700
commit994c2cbf289efa2e23eabf1af96ba62e4f066005 (patch)
tree74674d580b4ca868d727aae9ac71795d8d98b9c7 /engine/items/items.asm
parent07dd7056372288de7bb5b64f9416d741adb3b499 (diff)
named wram variables
Diffstat (limited to 'engine/items/items.asm')
-rwxr-xr-xengine/items/items.asm32
1 files changed, 16 insertions, 16 deletions
diff --git a/engine/items/items.asm b/engine/items/items.asm
index c632f57d..6ae4e228 100755
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -1,6 +1,6 @@
UseItem_: ; d5c7 (3:55c7)
ld a,1
- ld [wcd6a],a
+ ld [wActionResultOrTookBattleTurn],a ; initialise to success value
ld a,[wcf91] ;contains item_ID
cp a,HM_01
jp nc,ItemUseTMHM
@@ -661,7 +661,7 @@ ItemUseEvoStone: ; da5b (3:5a5b)
call ItemUseNoEffect
.canceledItemUse
xor a
- ld [wcd6a],a
+ ld [wActionResultOrTookBattleTurn],a ; item not used
pop af
ret
@@ -691,7 +691,7 @@ ItemUseMedicine: ; dabb (3:5abb)
.emptyParty
ld hl,.emptyPartyText
xor a
- ld [wcd6a],a ; item use failed
+ ld [wActionResultOrTookBattleTurn],a ; item use failed
jp PrintText
.emptyPartyText
text "You don't have"
@@ -706,7 +706,7 @@ ItemUseMedicine: ; dabb (3:5abb)
ld a,[wWhichPokemon]
call AddNTimes
ld a,[wWhichPokemon]
- ld [wcf06],a
+ ld [wUsedItemOnWhichPokemon],a
ld d,a
ld a,[wcf91]
ld e,a
@@ -803,7 +803,7 @@ ItemUseMedicine: ; dabb (3:5abb)
push hl
push de
push bc
- ld a,[wcf06]
+ ld a,[wUsedItemOnWhichPokemon]
ld c,a
ld hl,wPartyFoughtCurrentEnemyFlags
ld b,$02
@@ -811,7 +811,7 @@ ItemUseMedicine: ; dabb (3:5abb)
ld a,c
and a
jr z,.next
- ld a,[wcf06]
+ ld a,[wUsedItemOnWhichPokemon]
ld c,a
ld hl,wPartyGainExpFlags
ld b,$01
@@ -1106,7 +1106,7 @@ ItemUseMedicine: ; dabb (3:5abb)
jr .done
.canceledItemUse
xor a
- ld [wcd6a],a ; item use failed
+ ld [wActionResultOrTookBattleTurn],a ; item use failed
pop af
pop af
.done
@@ -1384,7 +1384,7 @@ ItemUseEscapeRope: ; dfaf (3:5faf)
ld [W_SAFARIZONEENTRANCECURSCRIPT],a
inc a
ld [wEscapedFromBattle],a
- ld [wcd6a],a ; item used
+ ld [wActionResultOrTookBattleTurn],a ; item used
ld a,[wd152]
and a ; using Dig?
ret nz ; if so, return
@@ -1550,7 +1550,7 @@ ItemUseXStat: ; e104 (3:6104)
jr nz,.inBattle
call ItemUseNotTime
ld a,2
- ld [wcd6a],a ; item not used
+ ld [wActionResultOrTookBattleTurn],a ; item not used
ret
.inBattle
ld hl,W_PLAYERMOVENUM
@@ -2043,7 +2043,7 @@ ItemUsePPRestore: ; e31e (3:631e)
call GoPAL_SET_CF1C
pop af
xor a
- ld [wcd6a],a ; item use failed
+ ld [wActionResultOrTookBattleTurn],a ; item use failed
ret
RaisePPWhichTechniqueText: ; e45d (3:645d)
@@ -2104,7 +2104,7 @@ ItemUseTMHM: ; e479 (3:6479)
and a
jr z,.useMachine
ld a,2
- ld [wcd6a],a ; item not used
+ ld [wActionResultOrTookBattleTurn],a ; item not used
ret
.useMachine
ld a,[wWhichPokemon]
@@ -2234,7 +2234,7 @@ SurfingAttemptFailed: ; e5b6 (3:65b6)
ItemUseFailed: ; e5b9 (3:65b9)
xor a
- ld [wcd6a],a ; item use failed
+ ld [wActionResultOrTookBattleTurn],a ; item use failed
jp PrintText
ItemUseNotTimeText: ; e5c0 (3:65c0)
@@ -2301,13 +2301,13 @@ RestoreBonusPP: ; e606 (3:6606)
ld a,[wWhichPokemon]
call AddNTimes
push hl
- ld de,wcd78 - 1
- predef LoadMovePPs ; loads the normal max PP of each of the pokemon's moves to wcd78
+ ld de,wNormalMaxPPList - 1
+ predef LoadMovePPs ; loads the normal max PP of each of the pokemon's moves to wNormalMaxPPList
pop hl
ld c,21
ld b,0
add hl,bc ; hl now points to move 1 PP
- ld de,wcd78
+ ld de,wNormalMaxPPList
ld b,0 ; initialize move counter to zero
; loop through the pokemon's moves
.loop
@@ -2420,7 +2420,7 @@ GetMaxPP: ; e677 (3:6677)
ld de,wcd6d
ld a,BANK(Moves)
call FarCopyData
- ld de,wcd72
+ ld de,wcd6d + 5 ; PP is byte 5 of move data
ld a,[de]
ld b,a ; b = normal max PP
pop hl