mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
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:
BIN
Binary file not shown.
+1
-1
@@ -152,7 +152,7 @@ digtabyL .DS [8]
|
|||||||
digtabyH .DS [8]
|
digtabyH .DS [8]
|
||||||
; liquiddirt
|
; liquiddirt
|
||||||
TempXfill .ds 2
|
TempXfill .ds 2
|
||||||
FillCounter .ds 1
|
FillCounter .ds 2
|
||||||
;sandhog
|
;sandhog
|
||||||
sandhogflag .DS 1 ; (0 digger, 8 sandhog)
|
sandhogflag .DS 1 ; (0 digger, 8 sandhog)
|
||||||
;ofdirt
|
;ofdirt
|
||||||
|
|||||||
+14
-12
@@ -523,6 +523,12 @@ DiggerCharacter
|
|||||||
jmp cleanDirt
|
jmp cleanDirt
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
|
.proc liquiddirt
|
||||||
|
mva #sfx_liquid_dirt sfx_effect
|
||||||
|
mwa #254 FillCounter
|
||||||
|
jmp xliquiddirt
|
||||||
|
.endp
|
||||||
|
; ------------------------
|
||||||
.proc laser
|
.proc laser
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda AngleTable,x
|
lda AngleTable,x
|
||||||
@@ -746,13 +752,13 @@ UpNotYet
|
|||||||
beq HowMuchToFallRight2
|
beq HowMuchToFallRight2
|
||||||
.nowarn dew xdraw
|
.nowarn dew xdraw
|
||||||
lda xdraw
|
lda xdraw
|
||||||
bne RollinContinues
|
bne RollinContinues ; like cpw xdraw #0
|
||||||
lda xdraw+1
|
lda xdraw+1
|
||||||
jne RollinContinues
|
jne RollinContinues
|
||||||
beq ExplodeNow
|
beq ExplodeNow
|
||||||
HowMuchToFallRight2
|
HowMuchToFallRight2
|
||||||
inw xdraw
|
inw xdraw
|
||||||
cpw xdraw screenwidth
|
cpw xdraw #screenwidth
|
||||||
jne RollinContinues
|
jne RollinContinues
|
||||||
ExplodeNow
|
ExplodeNow
|
||||||
mwa xdraw xcircle ; we must store somewhere (BAD)
|
mwa xdraw xcircle ; we must store somewhere (BAD)
|
||||||
@@ -890,17 +896,15 @@ EndOfTheDirt
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
; ----------------
|
; ----------------
|
||||||
.proc liquiddirt ;
|
.proc xliquiddirt ;
|
||||||
mva #sfx_liquid_dirt sfx_effect
|
|
||||||
mva xdraw TempXfill
|
mva xdraw TempXfill
|
||||||
mva #254 FillCounter
|
|
||||||
RepeatFill
|
RepeatFill
|
||||||
mva TempXfill xdraw
|
mva TempXfill xdraw
|
||||||
jsr checkRollDirection
|
jsr checkRollDirection
|
||||||
; HowMuchToFall - direction
|
; HowMuchToFall - direction
|
||||||
; $FF - we are in a hole (flying in missile direction)
|
; $FF - we are in a hole (flying in missile direction)
|
||||||
; 1 - right, 2 - left
|
; 1 - right, 2 - left
|
||||||
adw xdraw #mountaintable tempXROLLER
|
adw xdraw #mountaintable tempXROLLER
|
||||||
ldy #0
|
ldy #0
|
||||||
lda (tempXROLLER),y
|
lda (tempXROLLER),y
|
||||||
sta HeightRol ; relative point
|
sta HeightRol ; relative point
|
||||||
@@ -911,7 +915,6 @@ RollinContinuesLiquid
|
|||||||
ldy #0
|
ldy #0
|
||||||
lda (tempXROLLER),y
|
lda (tempXROLLER),y
|
||||||
sta ydraw
|
sta ydraw
|
||||||
beq FillNow
|
|
||||||
cmp HeightRol
|
cmp HeightRol
|
||||||
beq UpNotYet2
|
beq UpNotYet2
|
||||||
bcc FillNow
|
bcc FillNow
|
||||||
@@ -924,14 +927,12 @@ UpNotYet2
|
|||||||
cmp #1
|
cmp #1
|
||||||
beq HowMuchToFallRight3
|
beq HowMuchToFallRight3
|
||||||
.NOWARN dew xdraw
|
.NOWARN dew xdraw
|
||||||
lda xdraw
|
cpw xdraw #$ffff
|
||||||
bne RollinContinuesLiquid
|
|
||||||
lda xdraw+1
|
|
||||||
jne RollinContinuesLiquid
|
jne RollinContinuesLiquid
|
||||||
beq FillNow
|
beq FillNow
|
||||||
HowMuchToFallRight3
|
HowMuchToFallRight3
|
||||||
inw xdraw
|
inw xdraw
|
||||||
cpw xdraw screenwidth
|
cpw xdraw #(screenwidth+1)
|
||||||
jne RollinContinuesLiquid
|
jne RollinContinuesLiquid
|
||||||
FillNow
|
FillNow
|
||||||
; finally one pixel more
|
; finally one pixel more
|
||||||
@@ -953,7 +954,8 @@ FillHole
|
|||||||
sta (tempXROLLER),y ;mountaintable update
|
sta (tempXROLLER),y ;mountaintable update
|
||||||
mva #1 color
|
mva #1 color
|
||||||
jsr plot
|
jsr plot
|
||||||
dec FillCounter
|
.nowarn dew FillCounter
|
||||||
|
cpw FillCounter #0
|
||||||
jne RepeatFill
|
jne RepeatFill
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|||||||
Reference in New Issue
Block a user