match palette on each byte of initial screen in HGR slideshows

This commit is contained in:
4am 2019-11-28 22:34:14 -05:00
parent ab01bf67b2
commit d12ee7028d
2 changed files with 36 additions and 6 deletions

View File

@ -18,6 +18,8 @@
; graphics mode still displaying hi-res screen with last picture visible
;------------------------------------------------------------------------------
HGRTitleSlideshow
lda #$20
sta HGRTitleCallbackMatchPalette
jsr LoadHGRTransition ; load transition effect code at $6000
jsr okvs_iter ; cycle through all listed HGR files
!word gSlideshowStore
@ -33,6 +35,8 @@ HGRTitleSlideshow
; graphics mode still displaying hi-res screen with last picture visible
;------------------------------------------------------------------------------
HGRActionSlideshow
lda #$20
sta HGRActionCallbackMatchPalette
jsr LoadHGRTransition ; load transition effect code at $6000
jsr okvs_iter ; cycle through all listed HGR files
!word gSlideshowStore
@ -123,6 +127,10 @@ HGRTitleCallback
+ !word $FDFD ; SMC
!word $4000
HGRTitleCallbackMatchPalette
jsr MatchPalette
lda #$2C
sta HGRTitleCallbackMatchPalette
jmp ExecuteTransitionAt6000AndWait
;------------------------------------------------------------------------------
@ -162,17 +170,17 @@ HGRActionCallback
lda #22
sta VTAB
lda #0 ; solid horizontal bar character
jsr @resetline
jsr HGRActionResetLine
lda (SAVE),y ; (SAVE) -> game title, Y = 0, so A = title length
clc
adc #$03
sta gPathname
lda #7 ; top-right rounded corner character
jsr @drawline
jsr HGRActionDrawLine
inc VTAB
lda #" "
jsr @resetline
jsr HGRActionResetLine
lda (SAVE),y ; A = title length
tay
- lda (SAVE),y
@ -180,17 +188,21 @@ HGRActionCallback
dey
bne -
lda #3 ; solid vertical bar character
jsr @drawline
jsr HGRActionDrawLine
HGRActionCallbackMatchPalette
jsr MatchPalette
lda #$2C
sta HGRActionCallbackMatchPalette
jmp ExecuteTransitionAt6000AndWait
@resetline
HGRActionResetLine
ldy #40
- sta gPathname,y
dey
bne -
sty HTAB
rts
@drawline
HGRActionDrawLine
ldy gPathname
sta gPathname,y
+LDADDR gPathname

View File

@ -145,3 +145,21 @@ IsUpDownOrRightArrow
beq @done
cmp #$8A ; down arrow
@done rts
MatchPalette
lda #$40
sta @a+2
lsr
sta @b+2
tax
ldy #0
@a lda $FD00,y
and #$80
@b sta $FD00,y
iny
bne @a
inc @a+2
inc @b+2
dex
bne @a
rts