Resolve #428: Use HIGH(X) and LOW(X) instead of X / $100 and X % $100 or X >> 8 and X & $ff

This commit is contained in:
Remy Oukaour
2017-12-25 13:40:10 -05:00
parent da2b01a36c
commit e34e68095d
71 changed files with 435 additions and 398 deletions

View File

@@ -644,10 +644,10 @@ CardFlip_BlankDiscardedCardSlot: ; e0534
ld a, e
and $1c ; get level
srl a
add .Jumptable % $100
add LOW(.Jumptable)
ld l, a
ld a, 0
adc .Jumptable / $100
adc HIGH(.Jumptable)
ld h, a
ld a, [hli]
ld h, [hl]
@@ -1185,14 +1185,14 @@ CardFlip_CheckWinCondition: ; e0637
.IsCoinCaseFull: ; e0833
ld a, [Coins]
cp MAX_COINS / $100
cp HIGH(MAX_COINS)
jr c, .less
jr z, .check_low
jr .more
.check_low
ld a, [Coins + 1]
cp MAX_COINS % $100
cp LOW(MAX_COINS)
jr c, .less
.more