summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/copy.asm8
-rw-r--r--home/init.asm4
-rw-r--r--home/lcd.asm8
-rw-r--r--home/text.asm2
-rw-r--r--home/video.asm12
5 files changed, 17 insertions, 17 deletions
diff --git a/home/copy.asm b/home/copy.asm
index 210fb773e..33268b6bf 100644
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -3,7 +3,7 @@
Get2bpp_2:: ; dc9
ld a, [rLCDC]
- bit 7, a
+ bit rLCDC_ENABLE, a
jp z, Copy2bpp
homecall _Get2bpp
@@ -13,7 +13,7 @@ Get2bpp_2:: ; dc9
Get1bpp_2:: ; ddc
ld a, [rLCDC]
- bit 7, a
+ bit rLCDC_ENABLE, a
jp z, Copy1bpp
homecall _Get1bpp
@@ -361,7 +361,7 @@ Request1bpp:: ; f1e
Get2bpp:: ; f82
ld a, [rLCDC]
- bit 7, a
+ bit rLCDC_ENABLE, a
jp nz, Request2bpp
Copy2bpp:: ; f89
@@ -392,7 +392,7 @@ Copy2bpp:: ; f89
Get1bpp:: ; f9d
ld a, [rLCDC]
- bit 7, a
+ bit rLCDC_ENABLE, a
jp nz, Request1bpp
Copy1bpp:: ; fa4
diff --git a/home/init.asm b/home/init.asm
index f71c247cd..8895da0f9 100644
--- a/home/init.asm
+++ b/home/init.asm
@@ -62,7 +62,7 @@ Init:: ; 17d
.wait
ld a, [rLY]
- cp 145
+ cp LY_VBLANK + 1
jr nz, .wait
xor a
@@ -125,7 +125,7 @@ Init:: ; 17d
ld [hWX], a
ld [rWX], a
- ld a, %11100011
+ ld a, LCDC_DEFAULT ; %11100011
; LCD on
; Win tilemap 1
; Win on
diff --git a/home/lcd.asm b/home/lcd.asm
index 8ec1e02ce..dfb174ee1 100644
--- a/home/lcd.asm
+++ b/home/lcd.asm
@@ -43,7 +43,7 @@ DisableLCD:: ; 568
; Don't need to do anything if the LCD is already off
ld a, [rLCDC]
- bit 7, a ; lcd enable
+ bit rLCDC_ENABLE, a
ret z
xor a
@@ -58,11 +58,11 @@ DisableLCD:: ; 568
.wait
; Wait until VBlank would normally happen
ld a, [rLY]
- cp 145
+ cp LY_VBLANK + 1
jr nz, .wait
ld a, [rLCDC]
- and %01111111 ; lcd enable off
+ and $ff ^ (1 << rLCDC_ENABLE)
ld [rLCDC], a
xor a
@@ -75,7 +75,7 @@ DisableLCD:: ; 568
EnableLCD:: ; 58a
ld a, [rLCDC]
- set 7, a ; lcd enable
+ set rLCDC_ENABLE, a
ld [rLCDC], a
ret
; 591
diff --git a/home/text.asm b/home/text.asm
index 2c3504e6e..191c96172 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -31,7 +31,7 @@ ClearTileMap:: ; fc8
; Update the BG Map.
ld a, [rLCDC]
- bit 7, a
+ bit rLCDC_ENABLE, a
ret z
jp WaitBGMap
; fdb
diff --git a/home/video.asm b/home/video.asm
index 4a25f41e0..8f14dfeee 100644
--- a/home/video.asm
+++ b/home/video.asm
@@ -291,9 +291,9 @@ Serve1bppRequest:: ; 170a
; Back out if we're too far into VBlank
ld a, [rLY]
- cp 144
+ cp LY_VBLANK
ret c
- cp 146
+ cp LY_VBLANK + 2
ret nc
; Copy [Requested1bpp] 1bpp tiles from [Requested1bppSource] to [Requested1bppDest]
@@ -372,9 +372,9 @@ Serve2bppRequest:: ; 1769
; Back out if we're too far into VBlank
ld a, [rLY]
- cp 144
+ cp LY_VBLANK
ret c
- cp 146
+ cp LY_VBLANK + 2
ret nc
jr _Serve2bppRequest
@@ -454,9 +454,9 @@ AnimateTileset:: ; 17d3
; Back out if we're too far into VBlank
ld a, [rLY]
- cp 144
+ cp LY_VBLANK
ret c
- cp 151
+ cp LY_VBLANK + 7
ret nc
ld a, [hROMBank]