mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Clean up changes in 3c6c80f
This commit is contained in:
parent
3c6c80f1b2
commit
2a7ba6685a
@ -50,6 +50,7 @@ OAM_X_FLIP EQU 5
|
||||
OAM_Y_FLIP EQU 6
|
||||
OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3)
|
||||
|
||||
; BP Map attribute flags
|
||||
PALETTE_MASK EQU %111
|
||||
VRAM_BANK_1 EQU 1 << OAM_TILE_BANK ; $08
|
||||
OBP_NUM EQU 1 << OAM_OBP_NUM ; $10
|
||||
@ -57,6 +58,10 @@ X_FLIP EQU 1 << OAM_X_FLIP ; $20
|
||||
Y_FLIP EQU 1 << OAM_Y_FLIP ; $40
|
||||
BEHIND_BG EQU 1 << OAM_PRIORITY ; $80
|
||||
|
||||
; Other useful constants
|
||||
LCDC_DEFAULT EQU %11100011
|
||||
LY_VBLANK EQU 144
|
||||
|
||||
; Hardware registers
|
||||
rJOYP EQU $ff00 ; Joypad (R/W)
|
||||
rSB EQU $ff01 ; Serial transfer data (R/W)
|
||||
@ -114,16 +119,14 @@ rWave_d EQU $ff3d
|
||||
rWave_e EQU $ff3e
|
||||
rWave_f EQU $ff3f
|
||||
rLCDC EQU $ff40 ; LCD Control (R/W)
|
||||
rLCDC_SPRITE_ENABLE EQU 1
|
||||
rLCDC_SPRITE_SIZE EQU 2
|
||||
rLCDC_WINDOW_TILEMAP EQU 6
|
||||
rLCDC_ENABLE EQU 7
|
||||
rLCDC_DEFAULT EQU %11100011
|
||||
rLCDC_SPRITES_ENABLE EQU 1 ; 0=Off, 1=On
|
||||
rLCDC_SPRITE_SIZE EQU 2 ; 0=8x8, 1=8x16
|
||||
rLCDC_WINDOW_TILEMAP EQU 6 ; 0=9800-9BFF, 1=9C00-9FFF
|
||||
rLCDC_ENABLE EQU 7 ; 0=Off, 1=On
|
||||
rSTAT EQU $ff41 ; LCDC Status (R/W)
|
||||
rSCY EQU $ff42 ; Scroll Y (R/W)
|
||||
rSCX EQU $ff43 ; Scroll X (R/W)
|
||||
rLY EQU $ff44 ; LCDC Y-Coordinate (R)
|
||||
LY_VBLANK EQU 144
|
||||
rLYC EQU $ff45 ; LY Compare (R/W)
|
||||
rDMA EQU $ff46 ; DMA Transfer and Start Address (W)
|
||||
rBGP EQU $ff47 ; BG Palette Data (R/W) - Non CGB Mode Only
|
||||
|
@ -1073,7 +1073,7 @@ SGBBorder_PushBGPals:
|
||||
ld bc, $100 tiles
|
||||
call CopyData
|
||||
call DrawDefaultTiles
|
||||
ld a, rLCDC_DEFAULT
|
||||
ld a, LCDC_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, rLCDC_DEFAULT
|
||||
ld a, LCDC_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, rLCDC_DEFAULT
|
||||
ld a, LCDC_DEFAULT
|
||||
ld [rLCDC], a
|
||||
ld hl, PalPacket_9d36
|
||||
call PushSGBPals
|
||||
|
@ -34,7 +34,7 @@ _DummyGame: ; e1e5b (38:5e5b)
|
||||
ld [wJumptableIndex], a
|
||||
ld a, $1
|
||||
ld [hBGMapMode], a
|
||||
ld a, rLCDC_DEFAULT
|
||||
ld a, LCDC_DEFAULT
|
||||
ld [rLCDC], a
|
||||
ld a, $e4
|
||||
call DmgToCgbBGPals
|
||||
|
@ -116,7 +116,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
|
||||
|
||||
.PrintTextAndExit: ; 1049c5 (41:49c5)
|
||||
call PrintText
|
||||
ld a, rLCDC_DEFAULT
|
||||
ld a, LCDC_DEFAULT
|
||||
ld [rLCDC], a
|
||||
ret
|
||||
; 1049cd (41:49cd)
|
||||
@ -1497,7 +1497,7 @@ Function10571a: ; 10571a (41:571a)
|
||||
|
||||
asm_105726: ; 105726 (41:5726)
|
||||
call PrintText
|
||||
ld a, rLCDC_DEFAULT
|
||||
ld a, LCDC_DEFAULT
|
||||
ld [rLCDC], a
|
||||
ret
|
||||
; 10572e (41:572e)
|
||||
|
@ -48,7 +48,7 @@ NamingScreen: ; 116c1
|
||||
call DisableLCD
|
||||
call LoadNamingScreenGFX
|
||||
call NamingScreen_InitText
|
||||
ld a, rLCDC_DEFAULT
|
||||
ld a, LCDC_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, rLCDC_DEFAULT
|
||||
ld a, LCDC_DEFAULT
|
||||
ld [rLCDC], a
|
||||
call .initwNamingScreenMaxNameLength
|
||||
ld b, SCGB_DIPLOMA
|
||||
|
@ -59,7 +59,7 @@ PokeGear: ; 90b8d (24:4b8d)
|
||||
call InitPokegearModeIndicatorArrow
|
||||
ld a, 8
|
||||
call SkipMusic
|
||||
ld a, rLCDC_DEFAULT
|
||||
ld a, LCDC_DEFAULT
|
||||
ld [rLCDC], a
|
||||
call TownMap_InitCursorAndPlayerIconPositions
|
||||
xor a
|
||||
@ -1851,7 +1851,7 @@ _TownMap: ; 9191c
|
||||
farcall ClearSpriteAnims
|
||||
ld a, 8
|
||||
call SkipMusic
|
||||
ld a, rLCDC_DEFAULT
|
||||
ld a, LCDC_DEFAULT
|
||||
ld [rLCDC], a
|
||||
call TownMap_GetCurrentLandmark
|
||||
ld [wTownMapPlayerIconLandmark], a
|
||||
|
@ -85,7 +85,7 @@ UnownPuzzle: ; e1190
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
ld a, rLCDC_DEFAULT
|
||||
ld a, LCDC_DEFAULT
|
||||
ld [rLCDC], a
|
||||
ret
|
||||
; e124e
|
||||
|
@ -55,7 +55,7 @@ UnusedTitleScreen: ; 10c000
|
||||
|
||||
call EnableLCD
|
||||
ld a, [rLCDC]
|
||||
set rLCDC_SPRITE_ENABLE, a
|
||||
set rLCDC_SPRITES_ENABLE, a
|
||||
set rLCDC_SPRITE_SIZE, a
|
||||
ld [rLCDC], a
|
||||
|
||||
|
@ -125,7 +125,7 @@ Init:: ; 17d
|
||||
ld [hWX], a
|
||||
ld [rWX], a
|
||||
|
||||
ld a, rLCDC_DEFAULT ; %11100011
|
||||
ld a, LCDC_DEFAULT ; %11100011
|
||||
; LCD on
|
||||
; Win tilemap 1
|
||||
; Win on
|
||||
|
@ -62,7 +62,7 @@ DisableLCD:: ; 568
|
||||
jr nz, .wait
|
||||
|
||||
ld a, [rLCDC]
|
||||
and $ff ^ 1 << rLCDC_ENABLE
|
||||
and $ff ^ (1 << rLCDC_ENABLE)
|
||||
ld [rLCDC], a
|
||||
|
||||
xor a
|
||||
|
Loading…
Reference in New Issue
Block a user