Spare Change title animation

This commit is contained in:
4am 2019-09-28 08:35:48 -04:00
parent ac8966ba74
commit ba30ba75a9
18 changed files with 103 additions and 13 deletions

View File

@ -68,6 +68,8 @@ dsk: md asm
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/SS" "build/SS" >>build/log
rsync -aP res/demo/* build/DEMO >>build/log
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/DEMO" "build/DEMO" >>build/log
rsync -aP res/title.animated/* build/TITLE.ANIMATED >>build/log
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/TITLE.ANIMATED" "build/TITLE.ANIMATED" >>build/log
$(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.11" "SPCARTOON.1." >>build/log
$(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.22" "SPCARTOON.2." >>build/log
$(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.33" "SPCARTOON.3." >>build/log
@ -113,6 +115,7 @@ md:
mkdir -p build/ACTION.DHGR
mkdir -p build/ACTION.GR
mkdir -p build/ARTWORK.SHR
mkdir -p build/TITLE.ANIMATED
mkdir -p build/ATTRACT
mkdir -p build/SS
mkdir -p build/DEMO

Binary file not shown.

View File

@ -0,0 +1,2 @@
SPARE.CHANGE=Type(06),AuxType(0300),Access(C3)
SPARE.CHANGE.1=Type(F1),AuxType(0000),Access(C3)

Binary file not shown.

BIN
res/title.animated/spare.change.1 Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -82,8 +82,10 @@ ResetVector ; 6 bytes, copied to $100
; these routines will only be called after relocating to language card
!source "src/ui.search.mode.a"
!source "src/ui.browse.mode.a"
!source "src/prodos.path.a"
!source "src/ui.overlay.a"
!source "src/ui.offscreen.a"
!source "src/ui.animation.a"
!source "src/ui.credits.a"
!source "src/ui.attract.mode.a"
!source "src/ui.attract.hgr.a"
@ -91,7 +93,6 @@ ResetVector ; 6 bytes, copied to $100
!source "src/ui.attract.shr.a"
!source "src/ui.attract.gr.a"
!source "src/ui.cheats.a"
!source "src/prodos.path.a"
!source "src/glue.launch.a"
!source "src/glue.prorwts2.a"
!source "src/okvs.a"

View File

@ -16,6 +16,10 @@ kDHGRTitleDirectory
!byte 11
!raw "TITLE.DHGR/"
kAnimatedTitleDirectory
!byte 15
!raw "TITLE.ANIMATED/"
kHGRActionDirectory
!byte 11
!raw "ACTION.HGR/"
@ -141,6 +145,6 @@ AddToPath
@done
rts
!if >kTitleFile != >kCoverFile {
!error ">kTitleFile != >kCoverFile, uncomment LoadTitleOffscreen block in ui.offscreen and disable this check"
}
;!if >kTitleFile != >kCoverFile {
; !error ">kTitleFile != >kCoverFile, uncomment LoadTitleOffscreen block in ui.offscreen and disable this check"
;}

73
src/ui.animation.a Normal file
View File

@ -0,0 +1,73 @@
;License:MIT
;(c) 2018-9 by 4am
;
; functions for animated title screens
;
; - MaybeAnimateTitle
;
MaybeAnimateTitle
lda OffscreenPage
bne +
lda #$5F
+HIDE_NEXT_2_BYTES
+ lda #$3F
sta SAVE+1
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
beq +
rts
+
ldx #$20 ; copy new HGR screen to the other
ldy #$40
lda OffscreenPage
beq +
stx @a+2
sty @b+2
jmp ++
+ sty @a+2
stx @b+2
++ ldx #$20
ldy #0
@a lda $FD00,y ; SMC
@b sta $FD00,y ; SMC
iny
bne @a
inc @a+2
inc @b+2
dex
bne @a
+LDADDR gGamesListStore ; if so, load the animation routine
ldx gGameToLaunch ; which is stored in a subdirectory
jsr okvs_nth ; and keyed off the current game's
+STAY @fname ; filename
jsr LoadFile
!word kAnimatedTitleDirectory
@fname !word $FDFD
!word 0
ldy kAnimatedTitleDirectory
sty ProDOS_prefix ; temporarily set 'root' directory to
- lda kAnimatedTitleDirectory,y;/title.animated/ so animation file
sta ProDOS_prefix, y ; can load other files in the same subdirectory
dey
bne -
ldx #5 ; copy prelaunch code
- lda @titleAnimPrelaunch,x
sta $106,x
dex
bpl -
jsr Launch
jsr ResyncPage
clc ; tell caller not to refresh screen
rts
@titleAnimPrelaunch
bit $C082
jmp (SAVE)

View File

@ -111,7 +111,8 @@ ForceBrowseChanged
OnBrowseChanged
; in: X = game index
jsr LoadGameTitleOffscreen
jmp DrawUIWithoutDots
jsr DrawUIWithoutDots
jmp MaybeAnimateTitle
;------------------------------------------------------------------------------

View File

@ -8,6 +8,7 @@
; - LoadCoverOffscreen
; - LoadHelpOffscreen
; - LoadGameTitleOffscreen
; - ResyncPage
; - ShowOtherPage
; - ToggleOffscreenPage
; - ClearOffscreen
@ -47,15 +48,15 @@ GetOffscreenAddress
; out: all flags and registers clobbered
;------------------------------------------------------------------------------
LoadTitleOffscreen
;;!if >kTitleFile = >kCoverFile {
!if >kTitleFile = >kCoverFile {
lda #<kTitleFile
+HIDE_NEXT_2_BYTES
;;} else {
;; +LDADDR kTitleFile
;; bne + ; Always branches, because Y is loaded
;; ; last with the high byte of the address,
;; ; which is never 0. I miss my 65c02.
;;}
} else {
+LDADDR kTitleFile
bne + ; Always branches, because Y is loaded
; last with the high byte of the address,
; which is never 0. I miss my 65c02.
}
;------------------------------------------------------------------------------
; LoadHelpOffscreen
; load help screen in the HGR page that is currently not showing
@ -131,6 +132,10 @@ ClearHGR1
bne @a
rts
ResyncPage
jsr ToggleOffscreenPage
; execution falls through here
;------------------------------------------------------------------------------
; ShowOtherPage
; switch to the HGR page that is not currently showing

View File

@ -146,7 +146,8 @@ OnError
; in order to draw on the visible page.
bpl @noload ; (always branches)
+ jsr LoadGameTitleOffscreen
@noload jmp DrawUI
@noload jsr DrawUI
jmp MaybeAnimateTitle
;------------------------------------------------------------------------------
; IsSearchKey