mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-21 14:48:43 +13:00
mini update
- Tiles now animate correctly while still being sped up (credit to jojobear13!) - Fixed issues with certain cave maps being glitched after importing the new tileset for Seafoam - Gave Celeste Hill Cave the same palette as the exterior areas - Fixed an inconsistency in Koga's pre-fight script
This commit is contained in:
parent
31c17f04cd
commit
7c5c2a3047
18 changed files with 108 additions and 47 deletions
|
|
@ -20,7 +20,7 @@ LoadSpinnerArrowTiles::
|
|||
ld de, 6 * 4
|
||||
add hl, de
|
||||
.alternateGraphics
|
||||
ld a, 1
|
||||
ld a, $4
|
||||
ld bc, $0
|
||||
.loop
|
||||
push af
|
||||
|
|
@ -38,7 +38,8 @@ LoadSpinnerArrowTiles::
|
|||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
call CopyVideoData
|
||||
;call CopyVideoData
|
||||
call CopySpinnerTiles
|
||||
pop bc
|
||||
ld a, $6
|
||||
add c
|
||||
|
|
@ -47,6 +48,54 @@ LoadSpinnerArrowTiles::
|
|||
pop af
|
||||
dec a
|
||||
jr nz, .loop
|
||||
call DelayFrame ;Delay a frame because CopySpinnerTiles does not do this like CopyVideoData
|
||||
ret
|
||||
|
||||
CopySpinnerTiles:
|
||||
di ;prevent vblank functions from running
|
||||
|
||||
;back up destination address
|
||||
ld b, h
|
||||
ld c, l
|
||||
;back up stack pointer
|
||||
ld hl, sp + 0
|
||||
ld a, h
|
||||
ld [hstemp], a
|
||||
ld a, l
|
||||
ld [hstemp + 1], a
|
||||
;set stack pointer to source address
|
||||
ld h, d
|
||||
ld l, e
|
||||
ld sp, hl
|
||||
;restore destination address
|
||||
ld h, b
|
||||
ld l, c
|
||||
|
||||
;Stack Pointer = tile source address
|
||||
;HL = tile destination address
|
||||
|
||||
ld c, 8
|
||||
.loop
|
||||
pop de
|
||||
.waitVRAM
|
||||
ldh a, [rSTAT] ;read from stat register to get the mode
|
||||
and %10
|
||||
jr nz, .waitVRAM
|
||||
ld [hl], e
|
||||
inc l
|
||||
ld [hl], d
|
||||
inc l
|
||||
dec c
|
||||
jr nz, .loop
|
||||
|
||||
;restore stack spointer
|
||||
ld a, [hstemp]
|
||||
ld h, a
|
||||
ld a, [hstemp + 1]
|
||||
ld l, a
|
||||
ld sp, hl
|
||||
|
||||
ei ;re-enable vblank functions
|
||||
ret
|
||||
|
||||
INCLUDE "data/tilesets/spinner_tiles.asm"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue