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