Fixed bugs in LiqudDirt and Roller

Correct operation of dirt at the edges of the screen, and now dirt counter is two bytes (more and more dirt is possible).
Correction of the roller's (and LiquidDirtoperation on the right side of the screen. (old stiupid error)
This commit is contained in:
Pecusx
2022-05-09 17:58:07 +02:00
parent 2de2c24373
commit 860d0917ad
3 changed files with 15 additions and 13 deletions
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -152,7 +152,7 @@ digtabyL .DS [8]
digtabyH .DS [8]
; liquiddirt
TempXfill .ds 2
FillCounter .ds 1
FillCounter .ds 2
;sandhog
sandhogflag .DS 1 ; (0 digger, 8 sandhog)
;ofdirt
+13 -11
View File
@@ -523,6 +523,12 @@ DiggerCharacter
jmp cleanDirt
.endp
; ------------------------
.proc liquiddirt
mva #sfx_liquid_dirt sfx_effect
mwa #254 FillCounter
jmp xliquiddirt
.endp
; ------------------------
.proc laser
ldx TankNr
lda AngleTable,x
@@ -746,13 +752,13 @@ UpNotYet
beq HowMuchToFallRight2
.nowarn dew xdraw
lda xdraw
bne RollinContinues
bne RollinContinues ; like cpw xdraw #0
lda xdraw+1
jne RollinContinues
beq ExplodeNow
HowMuchToFallRight2
inw xdraw
cpw xdraw screenwidth
cpw xdraw #screenwidth
jne RollinContinues
ExplodeNow
mwa xdraw xcircle ; we must store somewhere (BAD)
@@ -890,10 +896,8 @@ EndOfTheDirt
rts
.endp
; ----------------
.proc liquiddirt ;
mva #sfx_liquid_dirt sfx_effect
.proc xliquiddirt ;
mva xdraw TempXfill
mva #254 FillCounter
RepeatFill
mva TempXfill xdraw
jsr checkRollDirection
@@ -911,7 +915,6 @@ RollinContinuesLiquid
ldy #0
lda (tempXROLLER),y
sta ydraw
beq FillNow
cmp HeightRol
beq UpNotYet2
bcc FillNow
@@ -924,14 +927,12 @@ UpNotYet2
cmp #1
beq HowMuchToFallRight3
.NOWARN dew xdraw
lda xdraw
bne RollinContinuesLiquid
lda xdraw+1
cpw xdraw #$ffff
jne RollinContinuesLiquid
beq FillNow
HowMuchToFallRight3
inw xdraw
cpw xdraw screenwidth
cpw xdraw #(screenwidth+1)
jne RollinContinuesLiquid
FillNow
; finally one pixel more
@@ -953,7 +954,8 @@ FillHole
sta (tempXROLLER),y ;mountaintable update
mva #1 color
jsr plot
dec FillCounter
.nowarn dew FillCounter
cpw FillCounter #0
jne RepeatFill
rts
.endp