mirror of
https://github.com/Pecusx/dino-game.git
synced 2026-05-21 06:39:38 +02:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a6478ae361 | |||
| fe0e9640af | |||
| 8a789527b1 | |||
| 5d39d86ea1 | |||
| 5f2bd3130d | |||
| 6ff92bb0da | |||
| cc878e35a6 |
Binary file not shown.
@@ -1,5 +1,5 @@
|
|||||||
SCR_HEIGHT = 8
|
SCR_HEIGHT = 8
|
||||||
WORLD_LENGTH = 48
|
WORLD_LENGTH = 44
|
||||||
DIFF_LEVELS = 20
|
DIFF_LEVELS = 20
|
||||||
.IFNDEF ALONE
|
.IFNDEF ALONE
|
||||||
.def ALONE = 1 ; standalone version
|
.def ALONE = 1 ; standalone version
|
||||||
@@ -24,6 +24,7 @@ swap_table=$0600 ; table for swap bytes in left characters :)
|
|||||||
.zpvar JumpPhase .byte
|
.zpvar JumpPhase .byte
|
||||||
.zpvar Hit .byte
|
.zpvar Hit .byte
|
||||||
.zpvar Level .byte
|
.zpvar Level .byte
|
||||||
|
.zpvar PaddleState .byte
|
||||||
.zpvar play_flag .byte
|
.zpvar play_flag .byte
|
||||||
.zpvar NTSCounter .byte
|
.zpvar NTSCounter .byte
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
@@ -132,6 +133,8 @@ FirstSTART
|
|||||||
mva #$ff portb
|
mva #$ff portb
|
||||||
; and wait one frame :)
|
; and wait one frame :)
|
||||||
waitRTC ; or waitRTC ?
|
waitRTC ; or waitRTC ?
|
||||||
|
jsr Check2button ; reset JoyB2+ state
|
||||||
|
sta PaddleState
|
||||||
jsr ClearScreen
|
jsr ClearScreen
|
||||||
jsr GenerateCharsets
|
jsr GenerateCharsets
|
||||||
jsr GenerateClouds
|
jsr GenerateClouds
|
||||||
@@ -407,7 +410,7 @@ SwapLoop
|
|||||||
.endp
|
.endp
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
.proc ClearScreen
|
.proc ClearScreen
|
||||||
ldy #44 ; visible screen len
|
ldy #WORLD_LENGTH ; visible screen len
|
||||||
lda #0
|
lda #0
|
||||||
ClearLoop
|
ClearLoop
|
||||||
;sta screen+$0700,y
|
;sta screen+$0700,y
|
||||||
@@ -443,7 +446,7 @@ NothingToDraw
|
|||||||
jsr ClearScreen
|
jsr ClearScreen
|
||||||
ldx #0 ; start position (world)
|
ldx #0 ; start position (world)
|
||||||
stx temp_b
|
stx temp_b
|
||||||
lda #42 ; start position (screen)
|
lda #WORLD_LENGTH-1 ; start position (screen)
|
||||||
sta temp_b2
|
sta temp_b2
|
||||||
ToScreenLoop
|
ToScreenLoop
|
||||||
lda WorldTable,x
|
lda WorldTable,x
|
||||||
@@ -452,10 +455,9 @@ ToScreenLoop
|
|||||||
ldx temp_b2
|
ldx temp_b2
|
||||||
jsr ShowObjectL
|
jsr ShowObjectL
|
||||||
NothingToDraw
|
NothingToDraw
|
||||||
dec temp_b2
|
|
||||||
inc:ldx temp_b
|
inc:ldx temp_b
|
||||||
cpx #WORLD_LENGTH
|
dec temp_b2
|
||||||
bne ToScreenLoop
|
bpl ToScreenLoop
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
@@ -1080,6 +1082,8 @@ DinoLoop4
|
|||||||
beq Up
|
beq Up
|
||||||
lda TRIG0 ; Fire = Up
|
lda TRIG0 ; Fire = Up
|
||||||
beq Up
|
beq Up
|
||||||
|
jsr Check2button ; 2nd button = down
|
||||||
|
bcc Down
|
||||||
; check keyboard
|
; check keyboard
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$f7 ; SHIFT
|
cmp #$f7 ; SHIFT
|
||||||
@@ -1327,6 +1331,13 @@ pressed
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
Check2button
|
||||||
|
lda PADDL0
|
||||||
|
and #$c0
|
||||||
|
eor #$C0
|
||||||
|
cmp PaddleState
|
||||||
|
rts
|
||||||
|
;--------------------------------------------------
|
||||||
.proc PrepareMusicPlayer
|
.proc PrepareMusicPlayer
|
||||||
jsr StopMusic
|
jsr StopMusic
|
||||||
VMAIN VBLinterrupt,7 ; jsr SetVBL
|
VMAIN VBLinterrupt,7 ; jsr SetVBL
|
||||||
@@ -1413,9 +1424,11 @@ screen
|
|||||||
.align $100
|
.align $100
|
||||||
MUSIC1_DATA
|
MUSIC1_DATA
|
||||||
ins 'music/InGame.lzss' ; ingame music
|
ins 'music/InGame.lzss' ; ingame music
|
||||||
|
.ds 1
|
||||||
MUSIC1_DATA_END
|
MUSIC1_DATA_END
|
||||||
.align $100
|
.align $100
|
||||||
MUSIC2_DATA
|
MUSIC2_DATA
|
||||||
ins 'music/GameOver.lzss' ; game over music
|
ins 'music/GameOver.lzss' ; game over music
|
||||||
|
.ds 1
|
||||||
MUSIC2_DATA_END
|
MUSIC2_DATA_END
|
||||||
run FirstSTART
|
run FirstSTART
|
||||||
|
|||||||
Reference in New Issue
Block a user