first ball shoots from the racquet pos + X direction randomizing

This commit is contained in:
2024-12-09 20:04:18 -05:00
parent 93efc3a2d5
commit 595c118a2b
2 changed files with 18 additions and 8 deletions
+17 -7
View File
@@ -179,7 +179,7 @@ jNotRight
JNotFire JNotFire
*/ */
lda racquetPos ;lda racquetPos
sec sec
lda #screenWidth-1 lda #screenWidth-1
@@ -331,7 +331,7 @@ EndOfLife
lda Lives lda Lives
cmp #"0" cmp #"0"
beq gameOver ; if no lives - game over beq gameOver ; if no lives - game over
jsr NextLive jsr NextLife
jmp gameloop jmp gameloop
gameOver gameOver
;game over ;game over
@@ -375,7 +375,7 @@ EndOfStartScreen
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc NextLive .proc NextLife
;-------------------------------------------------- ;--------------------------------------------------
ldy #maxBalls ldy #maxBalls
sty eXistenZstackPtr sty eXistenZstackPtr
@@ -1247,6 +1247,8 @@ brickcolorTab
mva #$7C COLBAKS mva #$7C COLBAKS
mva #screenWidth/2-racquetSize/4 racquetPos
mva #0 dliCount mva #0 dliCount
sta RMT_blocked sta RMT_blocked
@@ -1334,7 +1336,7 @@ eXistenZstackFill
;previously the whole band of ballz ;previously the whole band of ballz
;VBI ;VBI
mva #screenWidth/2-racquetSize/4 racquetPos
vmain vint,7 vmain vint,7
mva #1 color mva #1 color
@@ -1375,16 +1377,24 @@ drawBricksLoop
lda #1 lda #1
sta balleXistenZ,x sta balleXistenZ,x
randomize 10 70 ;randomize 10 70
;lda #40 lda racquetPos
adc #2 ; do not care about curry, just move the baby to the right
sta xposTableH,x sta xposTableH,x
;randomize margin*2+maxBrickLines maxLines-margin*4 ;randomize margin*2+maxBrickLines maxLines-margin*4
lda #50 lda #54
sta yposTableH,x sta yposTableH,x
; random initial speed and direction ; random initial speed and direction
;randomize 0 maxSpeed-1 ;randomize 0 maxSpeed-1
lda random
and #%1
beq xneg
lda #1 ;easy start lda #1 ;easy start
bne @+ ; jmp
xneg
lda #-1
@
sta dxTableH,x sta dxTableH,x
lda random lda random
sta dxTableL,x sta dxTableL,x
BIN
View File
Binary file not shown.