Upper branches death

This commit is contained in:
Pecusx
2025-02-19 15:35:40 +01:00
parent ba97078674
commit fd555aab29
2 changed files with 24 additions and 1 deletions
+24 -1
View File
@@ -28,6 +28,7 @@ display = $a000
.zpvar PowerValue .byte ; power: 0 - 48 .zpvar PowerValue .byte ; power: 0 - 48
.zpvar PowerTimer .byte .zpvar PowerTimer .byte
.zpvar PowerDownSpeed .byte .zpvar PowerDownSpeed .byte
.zpvar LumberjackDir .byte ; 2 - on left , 1 - on right
.zpvar PaddleState .byte .zpvar PaddleState .byte
.zpvar LowCharsetBase .byte .zpvar LowCharsetBase .byte
.zpvar displayposition .word .zpvar displayposition .word
@@ -275,6 +276,9 @@ loop
; other keys or no key ; other keys or no key
lda PowerValue lda PowerValue
beq LevelDeath beq LevelDeath
lda branches_list+5
cmp LumberjackDir ; branch and Lumerjack ?
beq LevelDeath
jmp loop jmp loop
right_pressed right_pressed
jsr ScoreUp jsr ScoreUp
@@ -292,7 +296,10 @@ LevelDeath
cmp #@kbcode._space cmp #@kbcode._space
bne LevelDeath bne LevelDeath
; restart game ; restart game
mva #24 PowerValue jsr InitBranches
jsr draw_branches
mva #24 PowerValue ; half power
jsr draw_PowerBar
jmp loop jmp loop
LevelOver LevelOver
; level over ; level over
@@ -335,6 +342,7 @@ LevelOver
waitRTC waitRTC
waitRTC waitRTC
mwa #gamescreen_lower1r animation_addr mwa #gamescreen_lower1r animation_addr
mva #1 LumberjackDir ; right side
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
@@ -372,6 +380,7 @@ LevelOver
waitRTC waitRTC
waitRTC waitRTC
mwa #gamescreen_lower1l animation_addr mwa #gamescreen_lower1l animation_addr
mva #2 LumberjackDir ; left side
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
@@ -413,11 +422,13 @@ LevelOver
JSR AudioInit JSR AudioInit
jsr InitBranches
jsr draw_branches jsr draw_branches
mva #24 PowerValue ; half power mva #24 PowerValue ; half power
jsr draw_PowerBar jsr draw_PowerBar
mva #20 PowerDownSpeed mva #20 PowerDownSpeed
sta PowerTimer sta PowerTimer
mva #1 LumberjackDir ; right side
/* ;RMT INIT /* ;RMT INIT
ldx #<MODUL ;low byte of RMT module to X reg ldx #<MODUL ;low byte of RMT module to X reg
@@ -891,6 +902,18 @@ KeyReleased
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc InitBranches
;--------------------------------------------------
ldy #5
@ lda initial_branches_list,y
sta branches_list,y
dey
bpl @-
rts
.endp
;--------------------------------------------------
initial_branches_list
.by 1,0,2,0,1,0 ;
branch_addr_tableL branch_addr_tableL
.by <branch0 .by <branch0
BIN
View File
Binary file not shown.