You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Remove unnecessary DMG and SGB checking (#7)
This commit is contained in:
@@ -670,12 +670,7 @@ AnimateFlowerTile:
|
||||
; A cycle of 2 frames, updating every other tick
|
||||
ld a, [wTileAnimationTimer]
|
||||
and %10
|
||||
|
||||
; CGB has different tile graphics for flowers
|
||||
ld e, a
|
||||
ldh a, [hCGB]
|
||||
and 1
|
||||
add e
|
||||
srl a
|
||||
|
||||
; hl = .FlowerTileFrames + a * 16
|
||||
swap a
|
||||
@@ -690,9 +685,7 @@ AnimateFlowerTile:
|
||||
jp WriteTile
|
||||
|
||||
.FlowerTileFrames:
|
||||
INCBIN "gfx/tilesets/flower/dmg_1.2bpp"
|
||||
INCBIN "gfx/tilesets/flower/cgb_1.2bpp"
|
||||
INCBIN "gfx/tilesets/flower/dmg_2.2bpp"
|
||||
INCBIN "gfx/tilesets/flower/cgb_2.2bpp"
|
||||
|
||||
AnimateLavaBubbleTile1:
|
||||
@@ -905,11 +898,6 @@ endr
|
||||
AnimateWaterPalette:
|
||||
; Transition between color values 0-2 for color 0 in palette 3.
|
||||
|
||||
; Don't update the palette on DMG
|
||||
ldh a, [hCGB]
|
||||
and a
|
||||
ret z
|
||||
|
||||
; Don't update a non-standard palette order
|
||||
ldh a, [rBGP]
|
||||
cp %11100100
|
||||
@@ -968,11 +956,6 @@ AnimateWaterPalette:
|
||||
ret
|
||||
|
||||
FlickeringCaveEntrancePalette:
|
||||
; Don't update the palette on DMG
|
||||
ldh a, [hCGB]
|
||||
and a
|
||||
ret z
|
||||
|
||||
; Don't update a non-standard palette order
|
||||
ldh a, [rBGP]
|
||||
cp %11100100
|
||||
|
||||
@@ -298,82 +298,11 @@ ConvertTimePalsDecHL:
|
||||
ret
|
||||
|
||||
GetTimePalFade:
|
||||
; check cgb
|
||||
ldh a, [hCGB]
|
||||
and a
|
||||
jr nz, .cgb
|
||||
|
||||
; else: dmg
|
||||
|
||||
; index
|
||||
ld a, [wTimeOfDayPal]
|
||||
and %11
|
||||
|
||||
; get fade table
|
||||
push bc
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, .dmgfades
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
pop bc
|
||||
|
||||
; get place in fade table
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ret
|
||||
|
||||
.cgb
|
||||
ld hl, .cgbfade
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ret
|
||||
|
||||
.dmgfades
|
||||
dw .morn
|
||||
dw .day
|
||||
dw .nite
|
||||
dw .darkness
|
||||
|
||||
.morn
|
||||
dc 3,3,3,3, 3,3,3,3, 3,3,3,3
|
||||
dc 3,3,3,2, 3,3,3,2, 3,3,3,2
|
||||
dc 3,3,2,1, 3,2,1,0, 3,2,1,0
|
||||
dc 3,2,1,0, 3,1,0,0, 3,1,0,0
|
||||
dc 2,1,0,0, 2,0,0,0, 2,0,0,0
|
||||
dc 1,0,0,0, 1,0,0,0, 1,0,0,0
|
||||
dc 0,0,0,0, 0,0,0,0, 0,0,0,0
|
||||
|
||||
.day
|
||||
dc 3,3,3,3, 3,3,3,3, 3,3,3,3
|
||||
dc 3,3,3,2, 3,3,3,2, 3,3,3,2
|
||||
dc 3,3,2,1, 3,2,1,0, 3,2,1,0
|
||||
dc 3,2,1,0, 3,1,0,0, 3,1,0,0
|
||||
dc 2,1,0,0, 2,0,0,0, 2,0,0,0
|
||||
dc 1,0,0,0, 1,0,0,0, 1,0,0,0
|
||||
dc 0,0,0,0, 0,0,0,0, 0,0,0,0
|
||||
|
||||
.nite
|
||||
dc 3,3,3,3, 3,3,3,3, 3,3,3,3
|
||||
dc 3,3,3,2, 3,3,3,2, 3,3,3,2
|
||||
dc 3,3,2,1, 3,2,1,0, 3,2,1,0
|
||||
dc 3,2,2,1, 3,1,0,0, 3,1,0,0
|
||||
dc 2,1,0,0, 2,0,0,0, 2,0,0,0
|
||||
dc 1,0,0,0, 1,0,0,0, 1,0,0,0
|
||||
dc 0,0,0,0, 0,0,0,0, 0,0,0,0
|
||||
|
||||
.darkness
|
||||
dc 3,3,3,3, 3,3,3,3, 3,3,3,3
|
||||
dc 3,3,3,2, 3,3,3,2, 3,3,3,3
|
||||
dc 3,3,3,2, 3,2,1,0, 3,3,3,3
|
||||
dc 3,3,3,1, 3,1,0,0, 3,3,3,3
|
||||
dc 3,3,3,1, 2,0,0,0, 3,3,3,3
|
||||
dc 0,0,0,0, 1,0,0,0, 0,0,0,0
|
||||
dc 0,0,0,0, 0,0,0,0, 0,0,0,0
|
||||
|
||||
.cgbfade
|
||||
dc 3,3,3,3, 3,3,3,3, 3,3,3,3
|
||||
dc 3,3,3,2, 3,3,3,2, 3,3,3,2
|
||||
|
||||
Reference in New Issue
Block a user