mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-07 16:45:24 +13:00
First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
This commit is contained in:
commit
2f8a41f833
4618 changed files with 480386 additions and 0 deletions
48
engine/events/poisonstep_pals.asm
Normal file
48
engine/events/poisonstep_pals.asm
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
LoadPoisonBGPals:
|
||||
call .LoadPals
|
||||
ldh a, [hCGB]
|
||||
and a
|
||||
ret nz
|
||||
; code was probably dummied out here
|
||||
ret
|
||||
|
||||
.LoadPals:
|
||||
ldh a, [hCGB]
|
||||
and a
|
||||
jr nz, .cgb
|
||||
ld a, [wTimeOfDayPal]
|
||||
maskbits NUM_DAYTIMES
|
||||
cp DARKNESS_F
|
||||
ld a, %00000000
|
||||
jr z, .convert_pals
|
||||
ld a, %10101010
|
||||
|
||||
.convert_pals
|
||||
call DmgToCgbBGPals
|
||||
ld c, 4
|
||||
call DelayFrames
|
||||
farcall _UpdateTimePals
|
||||
ret
|
||||
|
||||
.cgb
|
||||
ldh a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(wBGPals2)
|
||||
ldh [rSVBK], a
|
||||
ld hl, wBGPals2
|
||||
ld c, 4 palettes
|
||||
.loop
|
||||
ld a, LOW(palred 28 + palgreen 21 + palblue 31)
|
||||
ld [hli], a
|
||||
ld a, HIGH(palred 28 + palgreen 21 + palblue 31)
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .loop
|
||||
pop af
|
||||
ldh [rSVBK], a
|
||||
ld a, TRUE
|
||||
ldh [hCGBPalUpdate], a
|
||||
ld c, 4
|
||||
call DelayFrames
|
||||
farcall _UpdateTimePals
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue