summaryrefslogtreecommitdiff
path: root/engine/items
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-10-29 14:45:52 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-10-29 14:45:52 -0400
commit7062ce2ffaf439e611c0f3840b4b1974c712d2c6 (patch)
tree7b8d82e2309859734d905913ffc2af8a8dfe85a7 /engine/items
parentb47bfbd813cc7981ff3b99baa7913933f28d67b9 (diff)
Identify the remaining uses of another WRAM union
Diffstat (limited to 'engine/items')
-rw-r--r--engine/items/item_effects.asm29
1 files changed, 15 insertions, 14 deletions
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index f9eeebec..7b43eb82 100644
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -2132,11 +2132,12 @@ INCLUDE "data/items/x_stats.asm"
PokeFluteEffect:
ld a, [wBattleMode]
and a
- jr nz, .dummy
-.dummy
+ jr nz, .in_battle
+ ; overworld flute code was dummied out here
+.in_battle
xor a
- ld [wceed], a
+ ld [wPokeFluteCuredSleep], a
ld b, $ff ^ SLP
@@ -2159,7 +2160,7 @@ PokeFluteEffect:
and b
ld [hl], a
- ld a, [wceed]
+ ld a, [wPokeFluteCuredSleep]
and a
ld hl, .PlayedFluteText
jp z, PrintText
@@ -2168,22 +2169,22 @@ PokeFluteEffect:
ld a, [wLowHealthAlarm]
and 1 << DANGER_ON_F
- jr nz, .dummy2
-.dummy2
+ jr nz, .dummy
+ ; more code was dummied out here
+.dummy
ld hl, .FluteWakeUpText
jp PrintText
.CureSleep:
ld de, PARTYMON_STRUCT_LENGTH
ld c, PARTY_LENGTH
-
.loop
ld a, [hl]
push af
and SLP
jr z, .not_asleep
- ld a, 1
- ld [wceed], a
+ ld a, TRUE
+ ld [wPokeFluteCuredSleep], a
.not_asleep
pop af
and b
@@ -2252,7 +2253,7 @@ ItemfinderEffect:
RestorePPEffect:
ld a, [wCurItem]
- ld [wceed], a
+ ld [wTempRestorePPItem], a
.loop
; Party Screen opens to choose on which mon to use the Item
@@ -2261,14 +2262,14 @@ RestorePPEffect:
jp c, PPRestoreItem_Cancel
.loop2
- ld a, [wceed]
+ ld a, [wTempRestorePPItem]
cp MAX_ELIXER
jp z, Elixer_RestorePPofAllMoves
cp ELIXER
jp z, Elixer_RestorePPofAllMoves
ld hl, RaiseThePPOfWhichMoveText
- ld a, [wceed]
+ ld a, [wTempRestorePPItem]
cp PP_UP
jr z, .ppup
ld hl, RestoreThePPOfWhichMoveText
@@ -2299,7 +2300,7 @@ RestorePPEffect:
call CopyName1
pop hl
- ld a, [wceed]
+ ld a, [wTempRestorePPItem]
cp PP_UP
jp nz, Not_PP_Up
@@ -2448,7 +2449,7 @@ RestorePP:
cp b
jr nc, .dont_restore
- ld a, [wceed]
+ ld a, [wTempRestorePPItem]
cp MAX_ELIXER
jr z, .restore_all
cp MAX_ETHER