combine DrawGameTitleInActionSlideshowHGR code

This commit is contained in:
4am 2020-03-08 15:10:07 -04:00
parent 3d816934af
commit 5fecf8bde9
3 changed files with 12 additions and 44 deletions

View File

@ -91,15 +91,13 @@ ResetVector ; 6 bytes, copied to $100
!source "src/ui.credits.a" ; \__ execution falls through
!source "src/ui.browse.mode.a" ; /
!source "src/ui.attract.hgr.a" ; \__ execution falls through
!source "src/ui.font.a" ; /
!source "src/ui.attract.hgr.a"
!source "src/ui.font.a"
!source "src/ui.overlay.a"
!source "src/ui.offscreen.a"
!source "src/ui.attract.mode.a"
!source "src/ui.attract.shr.a"
!source "src/ui.attract.gr.a"
!source "src/ui.cheats.a"
!source "src/glue.launch.a"
!source "src/okvs.a"

View File

@ -205,6 +205,12 @@ DHGRActionCallback
!word kDHGRActionDirectory
+ !word $FDFD
lda #$EA ; NOP
+HIDE_NEXT_2_BYTES
DrawGameTitleInActionSlideshowHGR
lda #$60 ; RTS
sta @fallThroughForDHGR
; display game name in the bottom-left corner
lda #22
sta VTAB
@ -245,10 +251,11 @@ DHGRActionCallback
+LDADDR gPathname
sec
jsr DrawString
;RedrawForDHGR
jsr SwitchToBank2
pla
@fallThroughForDHGR
nop ; SMC
sta HTAB
jsr SwitchToBank2
ldx gPathname
dex

View File

@ -158,41 +158,4 @@ HGRActionCallback
+ !word $FDFD ; SMC
!word $4000
; display game name in the bottom-left corner
lda #22
sta VTAB
lda #0 ; solid horizontal bar character
jsr @resetline
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
inc VTAB
lda #" "
jsr @resetline
lda (SAVE),y ; A = title length
tay
- lda (SAVE),y
sta gPathname+1,y
dey
bne -
lda #3 ; solid vertical bar character
jsr @drawline
jmp ExecuteTransitionAt6000AndWait
@resetline
ldy #40
- sta gPathname,y
dey
bne -
sty HTAB
rts
@drawline
ldy gPathname
sta gPathname,y
+LDADDR gPathname
sec
; /!\ execution falls through to ui.font/DrawString
jmp DrawGameTitleInActionSlideshowHGR