summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2017-12-29 18:53:21 +0100
committerxCrystal <rgr.crystal@gmail.com>2017-12-29 18:53:21 +0100
commit3c6c80f1b24487ae4aa9d250d1dff290f09c231e (patch)
tree5d6567d4f9fd6044bb3b7ea4af8f8dc70d8a5401 /engine
parent69762a2bfd6b6134b99a24b3c8f091ff6a410ef9 (diff)
LY_BLANK and rLCDC constants
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/core.asm4
-rw-r--r--engine/color.asm8
-rwxr-xr-xengine/dummy_game.asm2
-rwxr-xr-xengine/intro_menu.asm2
-rwxr-xr-xengine/mystery_gift.asm10
-rwxr-xr-xengine/namingscreen.asm4
-rwxr-xr-xengine/pokegear.asm4
-rw-r--r--engine/routines/getsquareroot.asm6
-rw-r--r--engine/routines/phonering_copytilemapatonce.asm4
-rwxr-xr-xengine/slot_machine.asm4
-rw-r--r--engine/title.asm2
-rwxr-xr-xengine/unown_puzzle.asm4
-rw-r--r--engine/unused_title.asm4
13 files changed, 29 insertions, 29 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 2937755a6..08021fc8b 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -8395,11 +8395,11 @@ BattleIntro: ; 3f4dd
ld b, SCGB_BATTLE_GRAYSCALE
call GetSGBLayout
ld hl, rLCDC
- res 6, [hl]
+ res rLCDC_WINDOW_TILEMAP, [hl] ; select 9800-9BFF
call InitBattleDisplay
call BattleStartMessage
ld hl, rLCDC
- set 6, [hl]
+ set rLCDC_WINDOW_TILEMAP, [hl] ; select 9C00-9FFF
xor a
ld [hBGMapMode], a
call EmptyBattleTextBox
diff --git a/engine/color.asm b/engine/color.asm
index 1f563df53..35358934a 100644
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -617,7 +617,7 @@ ApplyPals:
ApplyAttrMap:
ld a, [rLCDC]
- bit 7, a
+ bit rLCDC_ENABLE, a
jr z, .UpdateVBank1
ld a, [hBGMapMode]
push af
@@ -1073,7 +1073,7 @@ SGBBorder_PushBGPals:
ld bc, $100 tiles
call CopyData
call DrawDefaultTiles
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
ld hl, PalPacket_9d06
call PushSGBPals
@@ -1107,7 +1107,7 @@ SGBBorder_MorePalPushing:
ld bc, 16 palettes
call CopyData
call DrawDefaultTiles
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
ld hl, PalPacket_9d46
call PushSGBPals
@@ -1131,7 +1131,7 @@ SGBBorder_YetMorePalPushing:
dec b
jr nz, .loop
call DrawDefaultTiles
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
ld hl, PalPacket_9d36
call PushSGBPals
diff --git a/engine/dummy_game.asm b/engine/dummy_game.asm
index 4a1972ec3..e5cc97dec 100755
--- a/engine/dummy_game.asm
+++ b/engine/dummy_game.asm
@@ -34,7 +34,7 @@ _DummyGame: ; e1e5b (38:5e5b)
ld [wJumptableIndex], a
ld a, $1
ld [hBGMapMode], a
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
ld a, $e4
call DmgToCgbBGPals
diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm
index faa5748dd..7d17b62e5 100755
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -1035,7 +1035,7 @@ StartTitleScreen: ; 6219
ld [rSVBK], a
ld hl, rLCDC
- res 2, [hl]
+ res rLCDC_SPRITE_SIZE, [hl] ; 8x8
call ClearScreen
call WaitBGMap2
xor a
diff --git a/engine/mystery_gift.asm b/engine/mystery_gift.asm
index e6d4504c2..574436b15 100755
--- a/engine/mystery_gift.asm
+++ b/engine/mystery_gift.asm
@@ -116,7 +116,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
.PrintTextAndExit: ; 1049c5 (41:49c5)
call PrintText
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
ret
; 1049cd (41:49cd)
@@ -262,7 +262,7 @@ Function104a95: ; 104a95 (41:4a95)
; Delay frame
.ly_loop
ld a, [rLY]
- cp $90
+ cp LY_VBLANK
jr c, .ly_loop
ld c, LOW(rRP)
ld a, $c0
@@ -281,14 +281,14 @@ Function104a95: ; 104a95 (41:4a95)
and b
ld b, a
ld a, [rLY]
- cp $90
+ cp LY_VBLANK
jr nc, .ly_loop2
.ly_loop3
ld a, [$ff00+c]
and b
ld b, a
ld a, [rLY]
- cp $90
+ cp LY_VBLANK
jr c, .ly_loop3
ld a, b
@@ -1497,7 +1497,7 @@ Function10571a: ; 10571a (41:571a)
asm_105726: ; 105726 (41:5726)
call PrintText
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
ret
; 10572e (41:572e)
diff --git a/engine/namingscreen.asm b/engine/namingscreen.asm
index a01c02c31..7eeed34a6 100755
--- a/engine/namingscreen.asm
+++ b/engine/namingscreen.asm
@@ -48,7 +48,7 @@ NamingScreen: ; 116c1
call DisableLCD
call LoadNamingScreenGFX
call NamingScreen_InitText
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
call .GetNamingScreenSetup
call WaitBGMap
@@ -1017,7 +1017,7 @@ _ComposeMailMessage: ; 11e75 (mail?)
add hl, bc
ld [hl], $0
call .InitCharset
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
call .initwNamingScreenMaxNameLength
ld b, SCGB_DIPLOMA
diff --git a/engine/pokegear.asm b/engine/pokegear.asm
index e4227aa0c..fff5174bd 100755
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -59,7 +59,7 @@ PokeGear: ; 90b8d (24:4b8d)
call InitPokegearModeIndicatorArrow
ld a, 8
call SkipMusic
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
call TownMap_InitCursorAndPlayerIconPositions
xor a
@@ -1851,7 +1851,7 @@ _TownMap: ; 9191c
farcall ClearSpriteAnims
ld a, 8
call SkipMusic
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
call TownMap_GetCurrentLandmark
ld [wTownMapPlayerIconLandmark], a
diff --git a/engine/routines/getsquareroot.asm b/engine/routines/getsquareroot.asm
index 009d9f4fe..0ba2e50a5 100644
--- a/engine/routines/getsquareroot.asm
+++ b/engine/routines/getsquareroot.asm
@@ -23,8 +23,8 @@ GetSquareRoot: ; 13b87
ret
.Squares: ; 13b98
-root set 1
+root = 1
rept $ff
- dw root*root
-root set root+1
+ dw root * root
+root = root + 1
endr
diff --git a/engine/routines/phonering_copytilemapatonce.asm b/engine/routines/phonering_copytilemapatonce.asm
index b1a726675..cefe9a66d 100644
--- a/engine/routines/phonering_copytilemapatonce.asm
+++ b/engine/routines/phonering_copytilemapatonce.asm
@@ -17,7 +17,7 @@ PhoneRing_CopyTilemapAtOnce: ; 4d188
ld [hMapAnims], a
.wait
ld a, [rLY]
- cp $8f
+ cp LY_VBLANK - 1
jr c, .wait
di
@@ -31,7 +31,7 @@ PhoneRing_CopyTilemapAtOnce: ; 4d188
call .CopyTilemapAtOnce
.wait2
ld a, [rLY]
- cp $8f
+ cp LY_VBLANK - 1
jr c, .wait2
ei
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index 5eb11f011..aea08f16a 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -89,7 +89,7 @@ _SlotMachine:
ld hl, Options
res NO_TEXT_SCROLL, [hl]
ld hl, rLCDC
- res 2, [hl]
+ res rLCDC_SPRITE_SIZE, [hl] ; 8x8
ret
.InitGFX: ; 926f7 (24:66f7)
@@ -134,7 +134,7 @@ _SlotMachine:
call CopyBytes
ld hl, rLCDC
- set 2, [hl]
+ set rLCDC_SPRITE_SIZE, [hl] ; 8x16
call EnableLCD
ld hl, wSlots
ld bc, wSlotsEnd - wSlots
diff --git a/engine/title.asm b/engine/title.asm
index 2ea588cd0..6b015300f 100644
--- a/engine/title.asm
+++ b/engine/title.asm
@@ -201,7 +201,7 @@ _TitleScreen: ; 10ed67
; Set sprite size to 8x16
ld a, [rLCDC]
- set 2, a
+ set rLCDC_SPRITE_SIZE, a
ld [rLCDC], a
ld a, +112
diff --git a/engine/unown_puzzle.asm b/engine/unown_puzzle.asm
index fd2b25c84..3f76c7041 100755
--- a/engine/unown_puzzle.asm
+++ b/engine/unown_puzzle.asm
@@ -45,7 +45,7 @@ UnownPuzzle: ; e1190
ld [wHoldingUnownPuzzlePiece], a
ld [wUnownPuzzleCursorPosition], a
ld [wUnownPuzzleHeldPiece], a
- ld a, $93
+ ld a, %10010011
ld [rLCDC], a
call WaitBGMap
ld b, SCGB_UNOWN_PUZZLE
@@ -85,7 +85,7 @@ UnownPuzzle: ; e1190
call ClearBGPalettes
call ClearTileMap
call ClearSprites
- ld a, $e3
+ ld a, rLCDC_DEFAULT
ld [rLCDC], a
ret
; e124e
diff --git a/engine/unused_title.asm b/engine/unused_title.asm
index ca508b593..0b7dc690d 100644
--- a/engine/unused_title.asm
+++ b/engine/unused_title.asm
@@ -55,8 +55,8 @@ UnusedTitleScreen: ; 10c000
call EnableLCD
ld a, [rLCDC]
- set 1, a
- set 2, a
+ set rLCDC_SPRITE_ENABLE, a
+ set rLCDC_SPRITE_SIZE, a
ld [rLCDC], a
call DelayFrame