mirror of
https://github.com/digarok/festro.git
synced 2025-01-14 12:33:51 +00:00
earth scroller
This commit is contained in:
parent
ad6ec87e62
commit
60afd0d334
84
festro.s
84
festro.s
@ -44,8 +44,8 @@ DemoSubroutineTable
|
||||
dw HandleProdrop
|
||||
dw HandleDigawrite
|
||||
dw HandleShortWait
|
||||
dw HandleProdrop
|
||||
dw HandleStarScroll
|
||||
dw HandleProdrop
|
||||
dw HandleSwipeWrite
|
||||
dw HandleShortWait
|
||||
dw HandleShortWait
|
||||
@ -82,20 +82,96 @@ DemoSubroutineTable
|
||||
dw P8Quit
|
||||
|
||||
HandleStarScroll
|
||||
ldx #100
|
||||
:loop phx
|
||||
lda #$1e
|
||||
:slowing ldx #5
|
||||
pha
|
||||
jsr StarScrollAuto
|
||||
pla
|
||||
dec
|
||||
cmp #$14
|
||||
bne :slowing
|
||||
lda #$14
|
||||
jsr StarScrollAuto
|
||||
ldx #55
|
||||
lda #$14
|
||||
jsr StarScrollAuto
|
||||
* second loop inserts planet
|
||||
ldx #EarthTextWidth
|
||||
:loop2 phx
|
||||
jsr ScrollLeft
|
||||
jsr GenStarRight
|
||||
lda _earthOffset
|
||||
jsr DrawEarthLine
|
||||
inc _earthOffset
|
||||
lda #$14
|
||||
tax
|
||||
tay
|
||||
jsr SimpleWait
|
||||
plx
|
||||
dex
|
||||
bne :loop
|
||||
bne :loop2
|
||||
* third loop scrolls onto screen more
|
||||
ldx #$05
|
||||
:loop3 phx
|
||||
jsr ScrollLeft
|
||||
lda #$14
|
||||
tax
|
||||
tay
|
||||
jsr SimpleWait
|
||||
plx
|
||||
dex
|
||||
bne :loop3
|
||||
|
||||
lda #$64
|
||||
tax
|
||||
tay
|
||||
jsr SimpleWait
|
||||
|
||||
inc GDemoState
|
||||
jmp DemoMain
|
||||
_earthOffset db #$00
|
||||
|
||||
* A = wait , X = reps
|
||||
StarScrollAuto
|
||||
sta _starScrollAutoWait
|
||||
:loop phx
|
||||
jsr ScrollLeft
|
||||
jsr GenStarRight
|
||||
lda _starScrollAutoWait
|
||||
tax
|
||||
tay
|
||||
jsr SimpleWait
|
||||
plx
|
||||
dex
|
||||
bne :loop
|
||||
rts
|
||||
_starScrollAutoWait db 0
|
||||
|
||||
* Always draws a line on the right
|
||||
_drawEarthLineXOffset equ #39
|
||||
DrawEarthLine
|
||||
tax
|
||||
lda EarthTextWidth*0+EarthText,x
|
||||
sta Lo07+_drawEarthLineXOffset
|
||||
lda EarthTextWidth*1+EarthText,x
|
||||
sta Lo08+_drawEarthLineXOffset
|
||||
lda EarthTextWidth*2+EarthText,x
|
||||
sta Lo09+_drawEarthLineXOffset
|
||||
lda EarthTextWidth*3+EarthText,x
|
||||
sta Lo10+_drawEarthLineXOffset
|
||||
lda EarthTextWidth*4+EarthText,x
|
||||
sta Lo11+_drawEarthLineXOffset
|
||||
lda EarthTextWidth*5+EarthText,x
|
||||
sta Lo12+_drawEarthLineXOffset
|
||||
lda EarthTextWidth*6+EarthText,x
|
||||
sta Lo13+_drawEarthLineXOffset
|
||||
lda EarthTextWidth*7+EarthText,x
|
||||
sta Lo14+_drawEarthLineXOffset
|
||||
lda EarthTextWidth*8+EarthText,x
|
||||
sta Lo15+_drawEarthLineXOffset
|
||||
lda EarthTextWidth*9+EarthText,x
|
||||
sta Lo16+_drawEarthLineXOffset
|
||||
rts
|
||||
|
||||
GenStarRight
|
||||
_maxStarHeight equ #24
|
||||
|
29
festrodata.s
29
festrodata.s
@ -25,9 +25,31 @@ FireText
|
||||
asc " LET'S GO!",00
|
||||
|
||||
|
||||
EarthTextWidth equ #24
|
||||
EarthTextWidth equ #20
|
||||
EarthTextHeight equ #10
|
||||
EarthText
|
||||
asc " ____ "
|
||||
asc " .'. ':'. "
|
||||
asc " .''::: .: '. "
|
||||
asc " / :::::' \ "
|
||||
asc " ;. ':' ` ; "
|
||||
asc " | '.. | "
|
||||
asc " ; ' ::::. ; "
|
||||
asc " \ ':::: / "
|
||||
asc " '. ::: .' "
|
||||
asc " '.__'_.' "
|
||||
EarthText2
|
||||
asc " _____ "
|
||||
asc " .'. ':'. "
|
||||
asc " .''::: .: '. "
|
||||
asc " / :::::' \ "
|
||||
asc " ;. ':' ` ; "
|
||||
asc " | '.. | "
|
||||
asc " ; ' ::::. ; "
|
||||
asc " \ ':::: / "
|
||||
asc " '. ::: .' "
|
||||
asc " '.___'_.' "
|
||||
EarthTextOrig
|
||||
asc " _____ "
|
||||
asc " .-'. ':'-. "
|
||||
asc " .''::: .: '. "
|
||||
@ -145,10 +167,11 @@ _sprData_S db $00,$00,$00,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$0
|
||||
db $00,$00,$00,$00,$00,$00,$01,$01,$01,$01,$01,$01,$0F,$0F,$0F,$0F,$00,$00
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$0F,$0F,$0F,$0F,$0F,$01
|
||||
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$0F,$0F,$0F,$0F,$0F,$01
|
||||
db $01,$01,$01,$01,$01,$01,$00,$00,$00,$00,$01,$0F,$0F,$0F,$0F,$0F,$0F,$01
|
||||
db $01,$0F,$0F,$0F,$0F,$0F,$0F,$01,$01,$01,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$01
|
||||
db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$0F,$0F,$0F,$0F,$0F,$0F,$01
|
||||
db $01,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$01
|
||||
db $01,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$01,$01,$00
|
||||
db $00,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$00,$00
|
||||
|
||||
_sprWidth_T equ #18
|
||||
_sprHeight_T equ #16
|
||||
_sprData_T db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01
|
||||
|
Loading…
x
Reference in New Issue
Block a user