4cade/src/ui.animation.a

62 lines
1.5 KiB
Plaintext
Raw Normal View History

2019-09-28 12:35:48 +00:00
;License:MIT
;(c) 2018-9 by 4am
;
; functions for animated title screens
;
; - MaybeAnimateTitle
;
2019-10-08 17:19:20 +00:00
; /!\ execution falls through from ui.search.mode/FindMatchingTitle
2019-09-28 12:35:48 +00:00
MaybeAnimateTitle
2019-10-10 01:02:46 +00:00
jsr SwitchToBank2
jsr DisableAcceleratorAndSwitchToBank1
2019-10-08 04:03:37 +00:00
; out: C clear
2019-10-09 02:25:22 +00:00
lda #$3F
ldy OffscreenPage
2019-09-28 12:35:48 +00:00
bne +
2019-10-09 02:25:22 +00:00
eor #$60
+ sta SAVE+1
and #$60
sta @a+2
eor #$60
sta @b+2
2019-09-28 12:35:48 +00:00
lda #$FD
sta SAVE
ldy #0
lda (SAVE),y ; see if there is a hidden JMP to an
cmp #$4C ; animation routine for this screen
2019-10-08 04:03:37 +00:00
bne @exit
2019-10-09 02:25:22 +00:00
ldx #$20
2019-09-28 12:35:48 +00:00
@a lda $FD00,y ; SMC
@b sta $FD00,y ; SMC
iny
bne @a
inc @a+2
inc @b+2
dex
bne @a
2019-10-08 18:43:41 +00:00
jsr GetGameToLaunch ; load the animation routine, which is
; stored in a subdirectory by filename
+STAY +
2019-09-28 12:35:48 +00:00
jsr LoadFile
!word kAnimatedTitleDirectory
2019-10-08 18:43:41 +00:00
+ !word $FDFD
2019-09-28 12:35:48 +00:00
!word 0
ldx #5 ; copy prelaunch code
- lda @titleAnimPrelaunch,x
sta $106,x
dex
bpl -
jsr Launch
jsr ResyncPage
2019-10-08 04:03:37 +00:00
@exit clc ; tell caller not to refresh screen
2019-09-28 12:35:48 +00:00
rts
@titleAnimPrelaunch
bit $C082
jmp (SAVE)