First attempt to 2 bytes Y

Not everywhere yet, but in the most important procedures.
This commit is contained in:
Pecusx
2022-06-02 10:01:06 +02:00
parent 6d9b2907c5
commit 9569b3365a
4 changed files with 43 additions and 21 deletions
+24 -4
View File
@@ -272,7 +272,7 @@ ContinueDraw
EndOfDraw EndOfDraw
mwa xtempDRAW xdraw mwa xtempDRAW xdraw
mva ytempDRAW ydraw mwa ytempDRAW ydraw
rts rts
.endp .endp
@@ -298,7 +298,7 @@ EndOfDraw
; splot8 ; splot8
mwa xdraw xcircle mwa xdraw xcircle
mva ydraw ycircle mwa ydraw ycircle
mwa #0 xc mwa #0 xc
mva radius yc mva radius yc
@@ -354,7 +354,7 @@ endcircleloop
jsr splot8 jsr splot8
mwa xcircle xdraw mwa xcircle xdraw
mva ycircle ydraw mwa ycircle ydraw
rts rts
.endp .endp
;---- ;----
@@ -381,12 +381,19 @@ splot8 .proc
adc YC adc YC
sta ydraw sta ydraw
sta tempcir sta tempcir
lda ycircle+1
adc #$00
sta ydraw+1
sta tempcir+1
jsr plot jsr plot
sec sec
lda ycircle lda ycircle
sbc YC sbc YC
sta ydraw sta ydraw
lda ycircle+1
sbc #$00
sta ydraw+1
jsr plot jsr plot
sec sec
@@ -400,6 +407,8 @@ splot8 .proc
lda tempcir lda tempcir
sta ydraw sta ydraw
lda tempcir+1
sta ydraw+1
jsr plot jsr plot
;--- ;---
clc clc
@@ -414,12 +423,19 @@ splot8 .proc
adc xC adc xC
sta ydraw sta ydraw
sta tempcir sta tempcir
lda ycircle+1
adc #$00
sta ydraw+1
sta tempcir+1
jsr plot jsr plot
sec sec
lda ycircle lda ycircle
sbc xC sbc xC
sta ydraw sta ydraw
lda ycircle+1
sbc #$00
sta ydraw+1
jsr plot jsr plot
sec sec
@@ -433,6 +449,8 @@ splot8 .proc
lda tempcir lda tempcir
sta ydraw sta ydraw
lda tempcir+1
sta ydraw+1
jsr plot jsr plot
RTS RTS
@@ -707,6 +725,7 @@ drawmountainsloop
cmp #screenheight cmp #screenheight
beq NoMountain beq NoMountain
sta ydraw sta ydraw
sty ydraw+1
jsr DrawLine jsr DrawLine
NoMountain NoMountain
inw modify inw modify
@@ -725,6 +744,7 @@ drawmountainspixelloop
ldy #0 ldy #0
lda (modify),y lda (modify),y
sta ydraw sta ydraw
sty ydraw+1
jsr plot jsr plot
inw modify inw modify
inw xdraw inw xdraw
@@ -771,7 +791,7 @@ drawmountainspixelloop
adw RangeLeft #mountaintable2 tempor2 adw RangeLeft #mountaintable2 tempor2
NextColumn1 NextColumn1
mva #0 ydraw mwa #0 ydraw
NextPoint1 NextPoint1
jsr point jsr point
beq StillNothing beq StillNothing
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -173,7 +173,7 @@ LineLength .DS 2
;circle ;circle
radius .DS 1 radius .DS 1
xcircle .DS 2 xcircle .DS 2
ycircle .DS 1 ycircle .DS 2
tempcir .DS 2 tempcir .DS 2
;TankFalls ;TankFalls
IfFallDown .DS 1 IfFallDown .DS 1
+18 -16
View File
@@ -262,7 +262,7 @@ NoExplosionInFunkyBomb
mva #sfx_nuke sfx_effect mva #sfx_nuke sfx_effect
jsr xmissile jsr xmissile
NoUpperCircle NoUpperCircle
adb ydraw #70 adw ydraw #70
;jsr CalculateExplosionRange ;jsr CalculateExplosionRange
cpw ydraw #screenHeight cpw ydraw #screenHeight
bcs NoLowerCircle bcs NoLowerCircle
@@ -677,9 +677,9 @@ EndOfDistanceCheckLoop
sta color sta color
dirtLoop dirtLoop
jsr circle jsr circle
inc ydraw inw ydraw
jsr circle jsr circle
dec ydraw dew ydraw
inc radius inc radius
lda radius lda radius
cmp ExplosionRadius cmp ExplosionRadius
@@ -725,6 +725,7 @@ RollinContinues
ldy #0 ldy #0
lda (tempXROLLER),y lda (tempXROLLER),y
sta ydraw sta ydraw
sty ydraw+1
beq ExplodeNow beq ExplodeNow
cmp HeightRol cmp HeightRol
beq UpNotYet beq UpNotYet
@@ -760,12 +761,12 @@ HowMuchToFallRight2
jne RollinContinues jne RollinContinues
ExplodeNow ExplodeNow
mwa xdraw xcircle ; we must store somewhere (BAD) mwa xdraw xcircle ; we must store somewhere (BAD)
mva ydraw ycircle ; xdraw and ydraw (BAD) mwa ydraw ycircle ; xdraw and ydraw (BAD)
mwa #0 xdraw mwa #0 xdraw
mva #screenheight-1 ydraw mwa #screenheight-1 ydraw
jsr unPlot jsr unPlot
mwa xcircle xdraw ;(bad) mwa xcircle xdraw ;(bad)
mva ycircle ydraw ;(bad) mwa ycircle ydraw ;(bad)
; finally a little explosion ; finally a little explosion
jsr CalculateExplosionRange jsr CalculateExplosionRange
@@ -782,6 +783,7 @@ ExplodeNow
adw tempXROLLER xdraw adw tempXROLLER xdraw
lda (tempXROLLER),y lda (tempXROLLER),y
sta ydraw sta ydraw
sty ydraw+1
lda vx+3 lda vx+3
; if horizontal velocity is negative then change the direction ; if horizontal velocity is negative then change the direction
@@ -852,7 +854,7 @@ DirectionChecked
mva #1 color mva #1 color
NoColor ; jump here with color=0 to clean dirt NoColor ; jump here with color=0 to clean dirt
mwa xdraw xcircle mwa xdraw xcircle
mva ydraw ycircle mwa ydraw ycircle
lda #1 lda #1
; current dirt width ; current dirt width
sta magic sta magic
@@ -890,7 +892,7 @@ DoNotPlot
bne NextRow bne NextRow
EndOfTheDirt EndOfTheDirt
mwa xcircle xdraw mwa xcircle xdraw
mva ycircle ydraw mwa ycircle ydraw
rts rts
.endp .endp
; ---------------- ; ----------------
@@ -1808,12 +1810,12 @@ Hit
jsr unPlot jsr unPlot
EndOfFlight EndOfFlight
mwa xdraw xcircle ; we must store for a little while mwa xdraw xcircle ; we must store for a little while
mva ydraw ycircle ; xdraw and ydraw .... but this values are in YHit and XHit !!! mwa ydraw ycircle ; xdraw and ydraw .... but this values are in YHit and XHit !!!
mwa #0 xdraw mwa #0 xdraw
mva #screenheight-1 ydraw mwa #screenheight-1 ydraw
jsr unPlot jsr unPlot
mwa xcircle xdraw mwa xcircle xdraw
mva ycircle ydraw mwa ycircle ydraw
; mwa XHit xdraw ; mwa XHit xdraw
; mva YHit ydraw ; mva YHit ydraw
@@ -2126,7 +2128,7 @@ MIRVYunderscreen
MIRVcontinueFly MIRVcontinueFly
mwa #0 xdraw mwa #0 xdraw
mva #screenheight-1 ydraw mwa #screenheight-1 ydraw
bit XposFlag bit XposFlag
bmi @+ ; no pixels to plot bmi @+ ; no pixels to plot
; plot bullets over the screen ; plot bullets over the screen
@@ -2209,7 +2211,7 @@ mrHit
mrEndOfFlight mrEndOfFlight
ldx MirvMissileCounter ldx MirvMissileCounter
mwa #0 xdraw mwa #0 xdraw
mva #screenheight-1 ydraw mwa #screenheight-1 ydraw
jsr unPlot.unPlotAfterX jsr unPlot.unPlotAfterX
ldx MirvMissileCounter ldx MirvMissileCounter
lda #1 lda #1
@@ -2227,13 +2229,13 @@ MIRVstillNotAll
jmp mrLoopi jmp mrLoopi
MIRValreadyAll MIRValreadyAll
mwa xdraw xcircle ; we must store them (for a while) mwa xdraw xcircle ; we must store them (for a while)
mva ydraw ycircle ; xdraw and ydraw mwa ydraw ycircle ; xdraw and ydraw
mwa #0 xdraw mwa #0 xdraw
mva #screenheight-1 ydraw mwa #screenheight-1 ydraw
ldx MirvMissileCounter ldx MirvMissileCounter
jsr unPlot.unPlotAfterX jsr unPlot.unPlotAfterX
mwa xcircle xdraw mwa xcircle xdraw
mva ycircle ydraw mwa ycircle ydraw
; we must do it manually because of the VOID pointer ; we must do it manually because of the VOID pointer