diff options
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/battle/core.asm | 16 | ||||
| -rw-r--r-- | engine/battle/effects.asm | 2 | ||||
| -rw-r--r-- | engine/events/heal_party.asm | 2 | ||||
| -rw-r--r-- | engine/items/item_effects.asm | 10 | ||||
| -rw-r--r-- | engine/pokemon/status_screen.asm | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index f304af10..4fe7880f 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2644,7 +2644,7 @@ SelectMenuItem: ld b, $0 add hl, bc ld a, [hl] - and $3f + and PP_MASK jr z, .noPP ld a, [wPlayerDisabledMove] swap a @@ -2724,7 +2724,7 @@ AnyMoveToSelect: or [hl] inc hl or [hl] - and $3f + and PP_MASK ret nz jr .noMovesLeft .handleDisabledMove @@ -2878,7 +2878,7 @@ PrintMenuItem: ld hl, wBattleMonPP add hl, bc ld a, [hl] - and $3f + and PP_MASK ld [wBattleMenuCurrentPP], a ; print TYPE/<type> and <curPP>/<maxPP> hlcoord 1, 9 @@ -4071,18 +4071,18 @@ CheckForDisobedience: ld hl, wBattleMonPP push hl ld a, [hli] - and $3f + and PP_MASK ld b, a ld a, [hli] - and $3f + and PP_MASK add b ld b, a ld a, [hli] - and $3f + and PP_MASK add b ld b, a ld a, [hl] - and $3f + and PP_MASK add b pop hl push af @@ -4091,7 +4091,7 @@ CheckForDisobedience: ld b, $0 add hl, bc ld a, [hl] - and $3f + and PP_MASK ld b, a pop af cp b diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm index 439e41e2..5782a3f0 100644 --- a/engine/battle/effects.asm +++ b/engine/battle/effects.asm @@ -1332,7 +1332,7 @@ DisableEffect: or [hl] inc hl or [hl] - and $3f + and PP_MASK pop hl ; wBattleMonPP or wEnemyMonPP jr z, .moveMissedPopHL ; nothing to do if all moves have no PP left add hl, bc diff --git a/engine/events/heal_party.asm b/engine/events/heal_party.asm index 8bf162a7..e6551bcd 100644 --- a/engine/events/heal_party.asm +++ b/engine/events/heal_party.asm @@ -50,7 +50,7 @@ HealParty: push bc ld b, a ld a, [hl] - and $c0 + and PP_UP_MASK add b ld [hl], a pop bc diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 162e79a7..98f1b066 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2058,7 +2058,7 @@ ItemUsePPRestore: cp MAX_ETHER jr z, .fullyRestorePP ld a, [hl] ; move PP - and %00111111 ; lower 6 bit bits store current PP + and PP_MASK cp b ; does current PP equal max PP? ret z ; if so, return add 10 ; increase current PP by 10 @@ -2071,7 +2071,7 @@ ItemUsePPRestore: ld b, a .storeNewAmount ld a, [hl] ; move PP - and %11000000 ; PP Up counter bits + and PP_UP_MASK add b ld [hl], a ret @@ -2403,7 +2403,7 @@ RestoreBonusPP: jr nz, .nextMove .skipMenuItemIDCheck ld a, [hl] - and %11000000 ; have any PP Ups been used? + and PP_UP_MASK call nz, AddBonusPP ; if so, add bonus PP .nextMove inc hl @@ -2509,7 +2509,7 @@ GetMaxPP: .addPPOffset add hl, bc ld a, [hl] ; a = current PP - and %11000000 ; get PP Up count + and PP_UP_MASK pop bc or b ; place normal max PP in 6 lower bits of a ASSERT wMoveData + MOVE_PP + 1 == wPPUpCountAndMaxPP @@ -2521,7 +2521,7 @@ GetMaxPP: ld [wUsingPPUp], a call AddBonusPP ; add bonus PP from PP Ups ld a, [hl] - and %00111111 ; mask out the PP Up count + and PP_MASK ld [wMaxPP], a ; store max PP ret diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm index 447db8fd..0649949c 100644 --- a/engine/pokemon/status_screen.asm +++ b/engine/pokemon/status_screen.asm @@ -364,7 +364,7 @@ StatusScreen2: ld bc, wPartyMon1PP - wPartyMon1Moves - 1 add hl, bc ld a, [hl] - and $3f + and PP_MASK ld [wStatusScreenCurrentPP], a ld h, d ld l, e |
