earth scroller

This commit is contained in:
Dagen Brock 2012-12-02 03:03:35 -06:00
parent ad6ec87e62
commit 60afd0d334
2 changed files with 120 additions and 21 deletions

View File

@ -44,8 +44,8 @@ DemoSubroutineTable
dw HandleProdrop dw HandleProdrop
dw HandleDigawrite dw HandleDigawrite
dw HandleShortWait dw HandleShortWait
dw HandleProdrop
dw HandleStarScroll dw HandleStarScroll
dw HandleProdrop
dw HandleSwipeWrite dw HandleSwipeWrite
dw HandleShortWait dw HandleShortWait
dw HandleShortWait dw HandleShortWait
@ -82,20 +82,96 @@ DemoSubroutineTable
dw P8Quit dw P8Quit
HandleStarScroll HandleStarScroll
ldx #100 lda #$1e
:loop phx :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 ScrollLeft
jsr GenStarRight jsr GenStarRight
lda _earthOffset
jsr DrawEarthLine
inc _earthOffset
lda #$14 lda #$14
tax tax
tay tay
jsr SimpleWait jsr SimpleWait
plx plx
dex 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 inc GDemoState
jmp DemoMain 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 GenStarRight
_maxStarHeight equ #24 _maxStarHeight equ #24

View File

@ -25,9 +25,31 @@ FireText
asc " LET'S GO!",00 asc " LET'S GO!",00
EarthTextWidth equ #24 EarthTextWidth equ #20
EarthTextHeight equ #10 EarthTextHeight equ #10
EarthText 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 " .-'. ':'-. " asc " .-'. ':'-. "
asc " .''::: .: '. " asc " .''::: .: '. "
@ -133,22 +155,23 @@ _sprData_E db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$0
db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01 db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01
_sprWidth_S equ #18 _sprWidth_S equ #18
_sprHeight_S equ #16 _sprHeight_S equ #16
_sprData_S db $00,$00,$00,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$00 _sprData_S db $00,$00,$00,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$00
db $00,$01,$01,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$01 db $00,$01,$01,$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,$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,$01,$01,$00,$00,$01,$01,$01,$01,$01,$01,$01,$01 db $01,$0F,$0F,$0F,$0F,$0F,$01,$01,$00,$00,$01,$01,$01,$01,$01,$01,$01,$01
db $01,$0F,$0F,$0F,$0F,$0F,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $01,$0F,$0F,$0F,$0F,$0F,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $01,$0F,$0F,$0F,$0F,$0F,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $01,$0F,$0F,$0F,$0F,$0F,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$00,$0F,$0F,$0F,$0F,$01,$01,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$0F,$0F,$0F,$0F,$01,$01,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$00,$01,$01,$0F,$0F,$0F,$0F,$0F,$0F,$01,$01,$01,$01,$00,$00,$00,$00 db $00,$00,$01,$01,$0F,$0F,$0F,$0F,$0F,$0F,$01,$01,$01,$01,$00,$00,$00,$00
db $00,$00,$00,$00,$01,$01,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$01,$01,$00,$00 db $00,$00,$00,$00,$01,$01,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$01,$01,$00,$00
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,$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 $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,$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,$01,$01,$01,$0F,$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 $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 db $00,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$00,$00
_sprWidth_T equ #18 _sprWidth_T equ #18
_sprHeight_T equ #16 _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 _sprData_T db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01