diff options
| author | entrpntr <12521136+entrpntr@users.noreply.github.com> | 2020-06-03 19:56:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-03 19:56:39 -0400 |
| commit | 1210a5ef54141eeeebf79132a3124a8392c35c4e (patch) | |
| tree | 954c9cf0cbfad8207399563d36fd64d02c6f16ce /engine/events | |
| parent | 3ceee7fd9ee3eccbe86652e24e9896dbeff52302 (diff) | |
| parent | 7cc52fe23bac6ab9b2d58667e825aef62dd74e03 (diff) | |
Merge branch 'master' into bank23
Diffstat (limited to 'engine/events')
| -rwxr-xr-x | engine/events/poisonstep_pals.asm | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/engine/events/poisonstep_pals.asm b/engine/events/poisonstep_pals.asm new file mode 100755 index 00000000..2752f5a7 --- /dev/null +++ b/engine/events/poisonstep_pals.asm @@ -0,0 +1,41 @@ +LoadPoisonBGPals: + call .LoadPals + ldh a, [hCGB] + and a + ret nz + 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 + 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 + ld a, $1 + ldh [hCGBPalUpdate], a + ld c, 4 + call DelayFrames + farcall _UpdateTimePals + ret |
