mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
First attempt to 2 bytes Y
This commit is contained in:
+36
-32
@@ -38,14 +38,10 @@ draw .proc ;;fuxxing good draw :)
|
|||||||
bcs DrawOutOfTheScreen
|
bcs DrawOutOfTheScreen
|
||||||
cpw xbyte #screenwidth
|
cpw xbyte #screenwidth
|
||||||
bcs DrawOutOfTheScreen
|
bcs DrawOutOfTheScreen
|
||||||
;cpw ydraw #screenheight
|
cpw ydraw #screenheight
|
||||||
;bcs DrawOutOfTheScreen
|
bcs DrawOutOfTheScreen
|
||||||
;cpw ybyte #screenheight
|
cpw ybyte #screenheight
|
||||||
;bcc DrawOnTheScreen
|
bcc DrawOnTheScreen
|
||||||
lda ydraw+1
|
|
||||||
bne DrawOutOfTheScreen
|
|
||||||
lda ybyte+1
|
|
||||||
beq DrawOnTheScreen
|
|
||||||
DrawOutOfTheScreen
|
DrawOutOfTheScreen
|
||||||
;jsr DrawJumpPad
|
;jsr DrawJumpPad
|
||||||
rts
|
rts
|
||||||
@@ -225,7 +221,7 @@ PutPixelinDraw
|
|||||||
|
|
||||||
EndOfDraw
|
EndOfDraw
|
||||||
mwa xtempDRAW xdraw
|
mwa xtempDRAW xdraw
|
||||||
mva ytempDRAW ydraw
|
mwa ytempDRAW ydraw
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
@@ -298,7 +294,7 @@ circle .proc ;fxxxing good circle drawing :)
|
|||||||
; 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 +350,7 @@ endcircleloop
|
|||||||
jsr splot8
|
jsr splot8
|
||||||
|
|
||||||
mwa xcircle xdraw
|
mwa xcircle xdraw
|
||||||
mva ycircle ydraw
|
mwa ycircle ydraw
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;----
|
;----
|
||||||
@@ -379,14 +375,14 @@ splot8 .proc
|
|||||||
;clc
|
;clc
|
||||||
lda ycircle
|
lda ycircle
|
||||||
adc YC
|
adc YC
|
||||||
sta ydraw
|
sta ydraw ; lower byte only !!!
|
||||||
sta tempcir
|
sta tempcir
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
lda ycircle
|
lda ycircle
|
||||||
sbc YC
|
sbc YC
|
||||||
sta ydraw
|
sta ydraw ; lower byte only !!!
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
@@ -399,7 +395,7 @@ splot8 .proc
|
|||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
lda tempcir
|
lda tempcir
|
||||||
sta ydraw
|
sta ydraw ; lower byte only !!!
|
||||||
jsr plot
|
jsr plot
|
||||||
;---
|
;---
|
||||||
clc
|
clc
|
||||||
@@ -412,14 +408,14 @@ splot8 .proc
|
|||||||
;clc
|
;clc
|
||||||
lda ycircle
|
lda ycircle
|
||||||
adc xC
|
adc xC
|
||||||
sta ydraw
|
sta ydraw ; lower byte only !!!
|
||||||
sta tempcir
|
sta tempcir
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
lda ycircle
|
lda ycircle
|
||||||
sbc xC
|
sbc xC
|
||||||
sta ydraw
|
sta ydraw ; lower byte only !!!
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
@@ -432,7 +428,7 @@ splot8 .proc
|
|||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
lda tempcir
|
lda tempcir
|
||||||
sta ydraw
|
sta ydraw ; lower byte only !!!
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
@@ -549,7 +545,7 @@ CheckNextTank
|
|||||||
lda xtankstableH,x
|
lda xtankstableH,x
|
||||||
cmp xdraw+1
|
cmp xdraw+1
|
||||||
bne UnequalTanks
|
bne UnequalTanks
|
||||||
lda ydraw
|
lda ydraw ; lower byte only !!!
|
||||||
;sec
|
;sec
|
||||||
;sbc #$01 ; minus 1, because it was 1 pixel too high
|
;sbc #$01 ; minus 1, because it was 1 pixel too high
|
||||||
sta ytankstable,x ; what's the heck is that????!!!!
|
sta ytankstable,x ; what's the heck is that????!!!!
|
||||||
@@ -618,6 +614,7 @@ DrawTankNrX
|
|||||||
sta xdraw+1
|
sta xdraw+1
|
||||||
lda ytankstable,x
|
lda ytankstable,x
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
mva #0 ydraw+1
|
||||||
|
|
||||||
jsr TypeChar
|
jsr TypeChar
|
||||||
|
|
||||||
@@ -644,7 +641,7 @@ NoMissile
|
|||||||
sta xbyte+1
|
sta xbyte+1
|
||||||
|
|
||||||
; calculate start position of the tank
|
; calculate start position of the tank
|
||||||
lda ydraw
|
lda ydraw ; lower byte only !!!!
|
||||||
clc
|
clc
|
||||||
adc #PMOffset
|
adc #PMOffset
|
||||||
sta temp
|
sta temp
|
||||||
@@ -675,7 +672,11 @@ DoNotDrawTankNr
|
|||||||
drawmountains .proc
|
drawmountains .proc
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|
||||||
mwa #0 xdraw
|
lda #0
|
||||||
|
sta xdraw
|
||||||
|
sta xdraw+1
|
||||||
|
sta ydraw ; not necessary but....
|
||||||
|
sta ydraw+1
|
||||||
mwa #mountaintable modify
|
mwa #mountaintable modify
|
||||||
mva #1 color
|
mva #1 color
|
||||||
|
|
||||||
@@ -696,7 +697,11 @@ NoMountain
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
drawmountainspixel
|
drawmountainspixel
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
mwa #0 xdraw
|
lda #0
|
||||||
|
sta xdraw
|
||||||
|
sta xdraw+1
|
||||||
|
sta ydraw ; not necessary but....
|
||||||
|
sta ydraw+1
|
||||||
mwa #mountaintable modify
|
mwa #mountaintable modify
|
||||||
|
|
||||||
|
|
||||||
@@ -750,23 +755,23 @@ SoilDown2 .proc
|
|||||||
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
|
||||||
ldy #0
|
ldy #0
|
||||||
lda ydraw
|
lda ydraw ; lower byte only !!!
|
||||||
sta (tempor2),y
|
sta (tempor2),y
|
||||||
sta (temp),y
|
sta (temp),y
|
||||||
jmp FoundPeek1
|
jmp FoundPeek1
|
||||||
StillNothing
|
StillNothing
|
||||||
inc ydraw
|
inc ydraw ; lower byte only !!!
|
||||||
lda ydraw
|
lda ydraw
|
||||||
cmp #screenheight
|
cmp #screenheight
|
||||||
bne NextPoint1
|
bne NextPoint1
|
||||||
; no pixels on whole column !!!
|
; no pixels on whole column !!!
|
||||||
ldy #0
|
ldy #0
|
||||||
lda ydraw
|
lda ydraw ; lower byte only !!!
|
||||||
sta (tempor2),y
|
sta (tempor2),y
|
||||||
sta (temp),y
|
sta (temp),y
|
||||||
jmp FoundPeek1
|
jmp FoundPeek1
|
||||||
@@ -803,7 +808,7 @@ FalloutOfLine
|
|||||||
adc #1
|
adc #1
|
||||||
sta (tempor2),y
|
sta (tempor2),y
|
||||||
; and checking if there is a pixel there
|
; and checking if there is a pixel there
|
||||||
sta ydraw
|
sta ydraw ; lower byte only !!!
|
||||||
jsr point
|
jsr point
|
||||||
bne ThereIsPixelHere
|
bne ThereIsPixelHere
|
||||||
; if no pixel we plot it
|
; if no pixel we plot it
|
||||||
@@ -814,7 +819,6 @@ FalloutOfLine
|
|||||||
ldy #0
|
ldy #0
|
||||||
lda (temp),y
|
lda (temp),y
|
||||||
sta ydraw
|
sta ydraw
|
||||||
lda (temp),y
|
|
||||||
clc
|
clc
|
||||||
adc #1
|
adc #1
|
||||||
sta (temp),y
|
sta (temp),y
|
||||||
@@ -854,7 +858,7 @@ getrandomY ;getting random Y coordinate
|
|||||||
bcs getrandomY
|
bcs getrandomY
|
||||||
clc
|
clc
|
||||||
adc #(margin*2)
|
adc #(margin*2)
|
||||||
sta ydraw
|
sta ydraw ; lower byte only !!!
|
||||||
sta yfloat+1
|
sta yfloat+1
|
||||||
mva #0 yfloat ;yfloat equals to e.g. 140.0
|
mva #0 yfloat ;yfloat equals to e.g. 140.0
|
||||||
|
|
||||||
@@ -1014,7 +1018,7 @@ MakeUnPlot
|
|||||||
sta oldply,x
|
sta oldply,x
|
||||||
|
|
||||||
|
|
||||||
ldx ydraw
|
ldx ydraw ; lower byte only !!!
|
||||||
lda linetableL,x
|
lda linetableL,x
|
||||||
sta xbyte
|
sta xbyte
|
||||||
sta oldplot
|
sta oldplot
|
||||||
@@ -1111,7 +1115,7 @@ MakePlot
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ldx ydraw
|
ldx ydraw ; lower byte only !!!
|
||||||
lda linetableL,x
|
lda linetableL,x
|
||||||
sta xbyte
|
sta xbyte
|
||||||
lda linetableH,x
|
lda linetableH,x
|
||||||
@@ -1157,7 +1161,7 @@ point .proc
|
|||||||
|
|
||||||
;---
|
;---
|
||||||
|
|
||||||
ldx ydraw
|
ldx ydraw ; lower byte only !!!
|
||||||
lda linetableL,x
|
lda linetableL,x
|
||||||
sta xbyte
|
sta xbyte
|
||||||
lda linetableH,x
|
lda linetableH,x
|
||||||
@@ -1251,7 +1255,7 @@ CopyMask
|
|||||||
;---
|
;---
|
||||||
ldy xbyte
|
ldy xbyte
|
||||||
|
|
||||||
lda ydraw ; y = y - 7 because left lower. shouldn't it be 8?
|
lda ydraw ; y = y - 7 because left lower. shouldn't it be 8? - lower byte only !!!
|
||||||
sec
|
sec
|
||||||
sbc #7
|
sbc #7
|
||||||
tax
|
tax
|
||||||
|
|||||||
@@ -1324,6 +1324,8 @@ DOTNcharloop
|
|||||||
sta Xdraw+1
|
sta Xdraw+1
|
||||||
lda TextPositionY
|
lda TextPositionY
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
lda #0
|
||||||
|
sta ydraw+1
|
||||||
jsr PutChar4x4
|
jsr PutChar4x4
|
||||||
|
|
||||||
inc TextCounter
|
inc TextCounter
|
||||||
@@ -1357,6 +1359,8 @@ TypeLine4x4Loop
|
|||||||
sta CharCode4x4
|
sta CharCode4x4
|
||||||
mwa LineXdraw Xdraw
|
mwa LineXdraw Xdraw
|
||||||
mva LineYdraw Ydraw
|
mva LineYdraw Ydraw
|
||||||
|
lda #0
|
||||||
|
sta ydraw+1
|
||||||
jsr PutChar4x4FULL ;type empty pixels as well!
|
jsr PutChar4x4FULL ;type empty pixels as well!
|
||||||
adw LineXdraw #4
|
adw LineXdraw #4
|
||||||
inc LineCharNr
|
inc LineCharNr
|
||||||
|
|||||||
Reference in New Issue
Block a user