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

@@ -11,7 +11,7 @@ LoadPushOAM:: ; 4031
ret
.PushOAM: ; 403f
ld a, Sprites / $100
ld a, HIGH(Sprites)
ld [rDMA], a
ld a, (SpritesEnd - Sprites) / 4 ; 40
.pushoam_loop

View File

@@ -50,7 +50,7 @@ PhoneRing_CopyTilemapAtOnce: ; 4d188
ld a, SCREEN_HEIGHT
ld [hTilesPerCycle], a
ld b, 1 << 1 ; not in v/hblank
ld c, rSTAT % $100
ld c, LOW(rSTAT)
.loop
rept SCREEN_WIDTH / 2

View File

@@ -47,7 +47,7 @@ SaveMenu_CopyTilemapAtOnce: ; 4cf45 (13:4f45)
ld a, SCREEN_HEIGHT
ld [hTilesPerCycle], a
ld b, 1 << 1
ld c, rSTAT % $100
ld c, LOW(rSTAT)
.loop
rept SCREEN_WIDTH / 2