mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
+32
-36
@@ -38,10 +38,14 @@ 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
|
||||||
@@ -221,7 +225,7 @@ PutPixelinDraw
|
|||||||
|
|
||||||
EndOfDraw
|
EndOfDraw
|
||||||
mwa xtempDRAW xdraw
|
mwa xtempDRAW xdraw
|
||||||
mwa ytempDRAW ydraw
|
mva ytempDRAW ydraw
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
@@ -294,7 +298,7 @@ circle .proc ;fxxxing good circle drawing :)
|
|||||||
; splot8
|
; splot8
|
||||||
|
|
||||||
mwa xdraw xcircle
|
mwa xdraw xcircle
|
||||||
mwa ydraw ycircle
|
mva ydraw ycircle
|
||||||
|
|
||||||
mwa #0 xc
|
mwa #0 xc
|
||||||
mva radius yc
|
mva radius yc
|
||||||
@@ -350,7 +354,7 @@ endcircleloop
|
|||||||
jsr splot8
|
jsr splot8
|
||||||
|
|
||||||
mwa xcircle xdraw
|
mwa xcircle xdraw
|
||||||
mwa ycircle ydraw
|
mva ycircle ydraw
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;----
|
;----
|
||||||
@@ -375,14 +379,14 @@ splot8 .proc
|
|||||||
;clc
|
;clc
|
||||||
lda ycircle
|
lda ycircle
|
||||||
adc YC
|
adc YC
|
||||||
sta ydraw ; lower byte only !!!
|
sta ydraw
|
||||||
sta tempcir
|
sta tempcir
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
lda ycircle
|
lda ycircle
|
||||||
sbc YC
|
sbc YC
|
||||||
sta ydraw ; lower byte only !!!
|
sta ydraw
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
@@ -395,7 +399,7 @@ splot8 .proc
|
|||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
lda tempcir
|
lda tempcir
|
||||||
sta ydraw ; lower byte only !!!
|
sta ydraw
|
||||||
jsr plot
|
jsr plot
|
||||||
;---
|
;---
|
||||||
clc
|
clc
|
||||||
@@ -408,14 +412,14 @@ splot8 .proc
|
|||||||
;clc
|
;clc
|
||||||
lda ycircle
|
lda ycircle
|
||||||
adc xC
|
adc xC
|
||||||
sta ydraw ; lower byte only !!!
|
sta ydraw
|
||||||
sta tempcir
|
sta tempcir
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
lda ycircle
|
lda ycircle
|
||||||
sbc xC
|
sbc xC
|
||||||
sta ydraw ; lower byte only !!!
|
sta ydraw
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
@@ -428,7 +432,7 @@ splot8 .proc
|
|||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
lda tempcir
|
lda tempcir
|
||||||
sta ydraw ; lower byte only !!!
|
sta ydraw
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
@@ -545,7 +549,7 @@ CheckNextTank
|
|||||||
lda xtankstableH,x
|
lda xtankstableH,x
|
||||||
cmp xdraw+1
|
cmp xdraw+1
|
||||||
bne UnequalTanks
|
bne UnequalTanks
|
||||||
lda ydraw ; lower byte only !!!
|
lda ydraw
|
||||||
;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????!!!!
|
||||||
@@ -614,7 +618,6 @@ 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
|
||||||
|
|
||||||
@@ -641,7 +644,7 @@ NoMissile
|
|||||||
sta xbyte+1
|
sta xbyte+1
|
||||||
|
|
||||||
; calculate start position of the tank
|
; calculate start position of the tank
|
||||||
lda ydraw ; lower byte only !!!!
|
lda ydraw
|
||||||
clc
|
clc
|
||||||
adc #PMOffset
|
adc #PMOffset
|
||||||
sta temp
|
sta temp
|
||||||
@@ -672,11 +675,7 @@ DoNotDrawTankNr
|
|||||||
drawmountains .proc
|
drawmountains .proc
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|
||||||
lda #0
|
mwa #0 xdraw
|
||||||
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
|
||||||
|
|
||||||
@@ -697,11 +696,7 @@ NoMountain
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
drawmountainspixel
|
drawmountainspixel
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda #0
|
mwa #0 xdraw
|
||||||
sta xdraw
|
|
||||||
sta xdraw+1
|
|
||||||
sta ydraw ; not necessary but....
|
|
||||||
sta ydraw+1
|
|
||||||
mwa #mountaintable modify
|
mwa #mountaintable modify
|
||||||
|
|
||||||
|
|
||||||
@@ -755,23 +750,23 @@ SoilDown2 .proc
|
|||||||
adw RangeLeft #mountaintable2 tempor2
|
adw RangeLeft #mountaintable2 tempor2
|
||||||
|
|
||||||
NextColumn1
|
NextColumn1
|
||||||
mwa #0 ydraw
|
mva #0 ydraw
|
||||||
NextPoint1
|
NextPoint1
|
||||||
jsr point
|
jsr point
|
||||||
beq StillNothing
|
beq StillNothing
|
||||||
ldy #0
|
ldy #0
|
||||||
lda ydraw ; lower byte only !!!
|
lda ydraw
|
||||||
sta (tempor2),y
|
sta (tempor2),y
|
||||||
sta (temp),y
|
sta (temp),y
|
||||||
jmp FoundPeek1
|
jmp FoundPeek1
|
||||||
StillNothing
|
StillNothing
|
||||||
inc ydraw ; lower byte only !!!
|
inc ydraw
|
||||||
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 ; lower byte only !!!
|
lda ydraw
|
||||||
sta (tempor2),y
|
sta (tempor2),y
|
||||||
sta (temp),y
|
sta (temp),y
|
||||||
jmp FoundPeek1
|
jmp FoundPeek1
|
||||||
@@ -808,7 +803,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 ; lower byte only !!!
|
sta ydraw
|
||||||
jsr point
|
jsr point
|
||||||
bne ThereIsPixelHere
|
bne ThereIsPixelHere
|
||||||
; if no pixel we plot it
|
; if no pixel we plot it
|
||||||
@@ -819,6 +814,7 @@ 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
|
||||||
@@ -858,7 +854,7 @@ getrandomY ;getting random Y coordinate
|
|||||||
bcs getrandomY
|
bcs getrandomY
|
||||||
clc
|
clc
|
||||||
adc #(margin*2)
|
adc #(margin*2)
|
||||||
sta ydraw ; lower byte only !!!
|
sta ydraw
|
||||||
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
|
||||||
|
|
||||||
@@ -1018,7 +1014,7 @@ MakeUnPlot
|
|||||||
sta oldply,x
|
sta oldply,x
|
||||||
|
|
||||||
|
|
||||||
ldx ydraw ; lower byte only !!!
|
ldx ydraw
|
||||||
lda linetableL,x
|
lda linetableL,x
|
||||||
sta xbyte
|
sta xbyte
|
||||||
sta oldplot
|
sta oldplot
|
||||||
@@ -1115,7 +1111,7 @@ MakePlot
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ldx ydraw ; lower byte only !!!
|
ldx ydraw
|
||||||
lda linetableL,x
|
lda linetableL,x
|
||||||
sta xbyte
|
sta xbyte
|
||||||
lda linetableH,x
|
lda linetableH,x
|
||||||
@@ -1161,7 +1157,7 @@ point .proc
|
|||||||
|
|
||||||
;---
|
;---
|
||||||
|
|
||||||
ldx ydraw ; lower byte only !!!
|
ldx ydraw
|
||||||
lda linetableL,x
|
lda linetableL,x
|
||||||
sta xbyte
|
sta xbyte
|
||||||
lda linetableH,x
|
lda linetableH,x
|
||||||
@@ -1255,7 +1251,7 @@ CopyMask
|
|||||||
;---
|
;---
|
||||||
ldy xbyte
|
ldy xbyte
|
||||||
|
|
||||||
lda ydraw ; y = y - 7 because left lower. shouldn't it be 8? - lower byte only !!!
|
lda ydraw ; y = y - 7 because left lower. shouldn't it be 8?
|
||||||
sec
|
sec
|
||||||
sbc #7
|
sbc #7
|
||||||
tax
|
tax
|
||||||
|
|||||||
@@ -1324,8 +1324,6 @@ 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
|
||||||
@@ -1359,8 +1357,6 @@ 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