4cade/src/ui.credits.a

70 lines
2.1 KiB
Plaintext
Raw Normal View History

2019-07-10 17:37:59 +00:00
;license:MIT
2020-03-13 00:03:37 +00:00
;(c) 2018-2020 by 4am
2019-07-10 17:37:59 +00:00
;
; credits page
;
; Public functions
; - Credits
2019-10-08 03:50:23 +00:00
; - Help
;
2019-07-10 17:37:59 +00:00
2019-10-14 02:22:47 +00:00
;------------------------------------------------------------------------------
; Credits
; display credits page and wait
;
; in: none
; out: C clear
; all other flags and registers clobbered
;------------------------------------------------------------------------------
2019-07-10 17:37:59 +00:00
Credits
2019-09-10 02:38:17 +00:00
jsr LoadFile ; load credits text into $8000
!word kRootDirectory
2019-09-21 22:04:38 +00:00
!word kCreditsFile
2019-09-10 02:38:17 +00:00
!word $8000
jsr ForceHGRMode
2019-07-10 17:37:59 +00:00
jsr ClearOffscreen
lda OffscreenPage
ror ; draw on offscreen page
+LDADDR $8000
2020-03-13 00:03:37 +00:00
tax
jsr DrawPage ; draw credits
jsr ShowOtherPage ; show credits
jsr WaitForKeyFor30Seconds; wait
2019-10-08 03:53:52 +00:00
-- bit CLEARKBD ; don't care about key
- sec ; if called from search mode, tell caller to refresh
2019-07-10 17:37:59 +00:00
rts
2019-10-14 02:22:47 +00:00
;------------------------------------------------------------------------------
; Help
; display global help page and wait
;
; in: none
; out: if user presses an arrow key within 30 seconds, this exits via BrowseMode
; otherwise this returns to caller with
; C clear, all other flags and registers clobbered
;------------------------------------------------------------------------------
Help
jsr LoadFile ; load help text into $8000
!word kRootDirectory
!word kHelpTextFile
!word $8000
jsr LoadHelpOffscreen
lda OffscreenPage
ror ; draw on offscreen page
+LDADDR $8000
ldx #8
jsr DrawPage ; draw help text
jsr ShowOtherPage
jsr WaitForKeyFor30Seconds
2019-10-08 03:53:52 +00:00
cmp #$88
2019-10-08 17:19:20 +00:00
beq BrowseMode
cmp #$83
2019-10-08 03:53:52 +00:00
beq -
cmp #$81
beq -
jsr IsUpDownOrRightArrow
2019-10-08 03:53:52 +00:00
beq -
jsr IsSearchKey
2019-10-08 03:53:52 +00:00
bne --
2019-10-10 01:02:46 +00:00
rts