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

@@ -475,10 +475,10 @@ AnimateWaterTile: ; fc402
add a
add a
add WaterTileFrames % $100
add LOW(WaterTileFrames)
ld l, a
ld a, 0
adc WaterTileFrames / $100
adc HIGH(WaterTileFrames)
ld h, a
; Stack now points to the start of the tile for this frame.
@@ -513,10 +513,10 @@ ForestTreeLeftAnimation: ; fc45c
add a
add a
add a
add ForestTreeLeftFrames % $100
add LOW(ForestTreeLeftFrames)
ld l, a
ld a, 0
adc ForestTreeLeftFrames / $100
adc HIGH(ForestTreeLeftFrames)
ld h, a
.asm_fc47d
@@ -555,10 +555,10 @@ ForestTreeRightAnimation: ; fc4c4
add a
add a
add a
add ForestTreeLeftFrames % $100
add LOW(ForestTreeLeftFrames)
ld l, a
ld a, 0
adc ForestTreeLeftFrames / $100
adc HIGH(ForestTreeLeftFrames)
ld h, a
push bc
ld bc, ForestTreeRightFrames - ForestTreeLeftFrames
@@ -591,10 +591,10 @@ ForestTreeLeftAnimation2: ; fc4f2
add a
add a
add a
add ForestTreeLeftFrames % $100
add LOW(ForestTreeLeftFrames)
ld l, a
ld a, 0
adc ForestTreeLeftFrames / $100
adc HIGH(ForestTreeLeftFrames)
ld h, a
.asm_fc515
@@ -623,10 +623,10 @@ ForestTreeRightAnimation2: ; fc51c
add a
add a
add a
add ForestTreeLeftFrames % $100
add LOW(ForestTreeLeftFrames)
ld l, a
ld a, 0
adc ForestTreeLeftFrames / $100
adc HIGH(ForestTreeLeftFrames)
ld h, a
push bc
ld bc, ForestTreeRightFrames - ForestTreeLeftFrames