Use more palette(s) constants

This commit is contained in:
xCrystal 2018-01-01 14:47:16 +01:00
parent 8c3905c4cd
commit 6e12a51503
13 changed files with 37 additions and 37 deletions

View File

@ -50,7 +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
; BG Map attribute flags
PALETTE_MASK EQU %111
VRAM_BANK_1 EQU 1 << OAM_TILE_BANK ; $08
OBP_NUM EQU 1 << OAM_OBP_NUM ; $10
@ -60,7 +60,7 @@ BEHIND_BG EQU 1 << OAM_PRIORITY ; $80
; Other useful constants
LCDC_DEFAULT EQU %11100011
LY_VBLANK EQU 144
LY_VBLANK EQU 144
; Hardware registers
rJOYP EQU $ff00 ; Joypad (R/W)

View File

@ -2588,8 +2588,8 @@ BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52)
ld b, a
ld c, $1
call CopyPals
ld hl, OBPals + 8
ld de, UnknOBPals + 8
ld hl, OBPals palette 1
ld de, UnknOBPals palette 1
pop af
ld b, a
ld c, $1
@ -2610,8 +2610,8 @@ BGEffects_LoadBGPal1_OBPal0: ; c8e7f (32:4e7f)
ld a, h
push bc
push af
ld hl, BGPals + 8
ld de, UnknBGPals + 8
ld hl, BGPals palette 1
ld de, UnknBGPals palette 1
ld b, a
ld c, $1
call CopyPals

View File

@ -1532,7 +1532,7 @@ Intro_Scene24_ApplyPaletteFade: ; e5172 (39:5172)
ld b, 8 ; number of BG pals
.loop1
push hl
ld c, 8 ; number of bytes per pal
ld c, 1 palettes
.loop2
ld a, [hli]
ld [de], a
@ -1735,7 +1735,7 @@ Intro_Scene20_AppearUnown: ; e5348 (39:5348)
adc d
ld d, a
ld bc, 8
ld bc, 1 palettes
call CopyBytes
pop bc
@ -1747,7 +1747,7 @@ Intro_Scene20_AppearUnown: ; e5348 (39:5348)
adc d
ld d, a
ld bc, 8
ld bc, 1 palettes
call CopyBytes
pop af
@ -1950,7 +1950,7 @@ Intro_ClearBGPals: ; e54a3 (39:54a3)
ld [rSVBK], a
ld hl, BGPals
ld bc, 16 * 8
ld bc, 16 palettes
xor a
call ByteFill

View File

@ -1202,10 +1202,10 @@ Function82236: ; 82236
ld [rSVBK], a
ld hl, BGPals
ld a, [wcf64]
ld bc, 8
ld bc, 1 palettes
call AddNTimes
ld de, wc608
ld bc, 8
ld bc, 1 palettes
call CopyBytes
pop af
ld [rSVBK], a
@ -1232,12 +1232,12 @@ Function822a3: ; 822a3
ld [rSVBK], a
ld hl, BGPals
ld a, [wcf64]
ld bc, 8
ld bc, 1 palettes
call AddNTimes
ld e, l
ld d, h
ld hl, wc608
ld bc, 8
ld bc, 1 palettes
call CopyBytes
hlcoord 1, 0
ld de, wc608

View File

@ -29,7 +29,7 @@ LoadPoisonBGPals: ; cbcdd
ld a, $5
ld [rSVBK], a
ld hl, BGPals
ld c, $20
ld c, 4 palettes
.loop
; RGB 28, 21, 31
ld a, LOW(palred 28 + palgreen 21 + palblue 31)

View File

@ -2351,7 +2351,7 @@ Pokedex_BlackOutBG: ; 41401 (10:5401)
ld a, $5
ld [rSVBK], a
ld hl, UnknBGPals
ld bc, $40
ld bc, 8 palettes
xor a
call ByteFill
pop af

View File

@ -621,7 +621,7 @@ Function8b6bb: ; 8b6bb
ld [rSVBK], a
ld hl, Palette_8b6d5
ld de, UnknBGPals
ld bc, $0018
ld bc, 3 palettes
call CopyBytes
pop af
ld [rSVBK], a

View File

@ -658,7 +658,7 @@ Function11636e: ; 11636e
ld [rSVBK], a
ld hl, BGPals
ld de, UnknBGPals
ld bc, $0040
ld bc, 8 palettes
call CopyBytes
pop af
ld [rSVBK], a

View File

@ -243,7 +243,7 @@ Function16c943: ; 16c943
ld a, $5
ld [rSVBK], a
ld a, $ff
ld bc, $0008
ld bc, 1 palettes
ld hl, UnknBGPals
call ByteFill
pop af

View File

@ -717,7 +717,7 @@ Function171ccd: ; 171ccd (5c:5ccd)
ld [rSVBK], a
ld hl, Palette_171d71
ld de, UnknBGPals
ld bc, $40
ld bc, 8 palettes
call CopyBytes
ld hl, EngineBuffer5
ld a, $ff
@ -885,11 +885,11 @@ Function172eb9:
ld [rSVBK], a
ld hl, Palette_172edf
ld de, UnknBGPals
ld bc, $40
ld bc, 8 palettes
call CopyBytes
ld hl, Palette_172edf
ld de, BGPals
ld bc, $40
ld bc, 8 palettes
call CopyBytes
call SetPalettes
pop af

View File

@ -765,22 +765,22 @@ Function17abcf: ; 17abcf (5e:6bcf)
ld hl, Palette_17ac55
ld de, UnknBGPals ; $d000
ld bc, $30
ld bc, 6 palettes
call CopyBytes
ld hl, Palette_17ac95
ld de, UnknOBPals
ld bc, $40
ld bc, 8 palettes
call CopyBytes
ld hl, GFX_17afa5 + $510
ld de, UnknOBPals + 2 * 4
ld bc, $10
ld de, UnknOBPals palette 1
ld bc, 2 palettes
call CopyBytes
ld hl, MapObjectPals + 8
ld de, UnknOBPals + 6 * 4
ld bc, $8
ld hl, MapObjectPals palette 1
ld de, UnknOBPals palette 3
ld bc, 1 palettes
ld a, BANK(MapObjectPals)
call FarCopyBytes

View File

@ -49,7 +49,7 @@ Function17c000: ; 17c000
ld hl, HaveWantPals
ld de, UnknBGPals
ld bc, $80
ld bc, 16 palettes
call CopyBytes
pop af
@ -1964,8 +1964,8 @@ Function17dcaf:
ld a, $5
ld [rSVBK], a
ld hl, UnknBGPals
ld de, $8
ld c, $8
ld de, 1 palettes
ld c, 8
.asm_17dcbb
push hl
ld a, $ff

View File

@ -954,7 +954,7 @@ TileAnimationPalette: ; fc6d7
jr z, .color2
.color1
ld hl, UnknBGPals + $1a ; pal 3 color 1
ld hl, UnknBGPals + palette 3 + 2
ld a, [hli]
ld [rBGPD], a
ld a, [hli]
@ -962,7 +962,7 @@ TileAnimationPalette: ; fc6d7
jr .end
.color0
ld hl, UnknBGPals + $18 ; pal 3 color 0
ld hl, UnknBGPals + palette 3
ld a, [hli]
ld [rBGPD], a
ld a, [hli]
@ -970,7 +970,7 @@ TileAnimationPalette: ; fc6d7
jr .end
.color2
ld hl, UnknBGPals + $1c ; pal 3 color 2
ld hl, UnknBGPals + palette 3 + 4
ld a, [hli]
ld [rBGPD], a
ld a, [hli]
@ -1007,11 +1007,11 @@ FlickeringCaveEntrancePalette: ; fc71e
ld a, [hVBlankCounter]
and %00000010
jr nz, .bit1set
ld hl, UnknBGPals + $20 ; pal 4 color 0
ld hl, UnknBGPals + palette 4
jr .okay
.bit1set
ld hl, UnknBGPals + $22 ; pal 4 color 2
ld hl, UnknBGPals + palette 4 + 2
.okay
ld a, [hli]