draw jmp(indirect) ellimination
This commit is contained in:
@@ -123,11 +123,11 @@ tankIsOnTheRight
|
|||||||
forceNow
|
forceNow
|
||||||
mwa #100 RandBoundaryLow
|
mwa #100 RandBoundaryLow
|
||||||
mwa #800 RandBoundaryHigh
|
mwa #800 RandBoundaryHigh
|
||||||
ldx TankNr
|
ldx TankNr ;this is possibly not necessary
|
||||||
jsr RandomizeForce
|
jsr RandomizeForce
|
||||||
|
|
||||||
endo
|
endo
|
||||||
;ldx TankNr ;this is possibly not necessary
|
ldx TankNr ;this is possibly not necessary
|
||||||
lda NewAngle
|
lda NewAngle
|
||||||
sta PreviousAngle,x
|
sta PreviousAngle,x
|
||||||
lda EnergyTableL,x
|
lda EnergyTableL,x
|
||||||
|
|||||||
+28
-33
@@ -214,37 +214,20 @@ LineGoesLeft
|
|||||||
; line goes left - we are reversing X
|
; line goes left - we are reversing X
|
||||||
sbw xtempDRAW temp xdraw ; XI
|
sbw xtempDRAW temp xdraw ; XI
|
||||||
PutPixelinDraw
|
PutPixelinDraw
|
||||||
jsr DrawJumpPad
|
|
||||||
; end of the special PLOT for DRAW
|
|
||||||
|
|
||||||
; XI=XI+1
|
|
||||||
; UNTIL XI=XK
|
|
||||||
inw XI
|
|
||||||
cpw XI XK
|
|
||||||
jne DrawLoop
|
|
||||||
|
|
||||||
EndOfDraw
|
|
||||||
mwa xtempDRAW xdraw
|
|
||||||
mva ytempDRAW ydraw
|
|
||||||
rts
|
|
||||||
.endp
|
|
||||||
|
|
||||||
;-------------JumpPad-------------
|
|
||||||
DrawJumpPad
|
|
||||||
jmp (DrawJumpAddr)
|
|
||||||
Drawplot
|
|
||||||
jmp plot
|
|
||||||
DrawLen
|
|
||||||
inw LineLength
|
|
||||||
rts
|
|
||||||
;-------------JumpPad-------------
|
|
||||||
|
|
||||||
DrawCheck .proc
|
; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
|
||||||
lda tracerflag
|
bit drawFunction
|
||||||
ora SmokeTracerFlag
|
bpl @+
|
||||||
|
inw LineLength
|
||||||
|
bne ContinueDraw ; ==jmp
|
||||||
|
@
|
||||||
|
bvc @+
|
||||||
|
DrawCheck
|
||||||
|
lda tracerflag
|
||||||
|
ora SmokeTracerFlag
|
||||||
yestrace
|
yestrace
|
||||||
beq notrace
|
beq notrace
|
||||||
jsr plot
|
jsr plot
|
||||||
notrace
|
notrace
|
||||||
;aftertrace
|
;aftertrace
|
||||||
lda HitFlag
|
lda HitFlag
|
||||||
@@ -267,14 +250,26 @@ CheckCollisionDraw
|
|||||||
cmp (temp),y
|
cmp (temp),y
|
||||||
bcc StopHitChecking
|
bcc StopHitChecking
|
||||||
|
|
||||||
mva #1 HitFlag
|
|
||||||
mwa xdraw XHit
|
mwa xdraw XHit
|
||||||
mwa ydraw YHit
|
mwa ydraw YHit
|
||||||
|
mva #1 HitFlag
|
||||||
|
|
||||||
StopHitChecking
|
StopHitChecking
|
||||||
|
jmp ContinueDraw
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
|
||||||
|
ContinueDraw
|
||||||
|
; XI=XI+1
|
||||||
|
; UNTIL XI=XK
|
||||||
|
inw XI
|
||||||
|
cpw XI XK
|
||||||
|
jne DrawLoop
|
||||||
|
|
||||||
|
EndOfDraw
|
||||||
|
mwa xtempDRAW xdraw
|
||||||
|
mva ytempDRAW ydraw
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
circle .proc ;fxxxing good circle drawing :)
|
circle .proc ;fxxxing good circle drawing :)
|
||||||
|
|||||||
BIN
Binary file not shown.
+2
-1
@@ -33,6 +33,8 @@ RoundNrDisplay
|
|||||||
.byte $ff
|
.byte $ff
|
||||||
|
|
||||||
variablesStart ; zeroing starts here
|
variablesStart ; zeroing starts here
|
||||||
|
drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
|
||||||
|
;--------------
|
||||||
escFlag .ds 1
|
escFlag .ds 1
|
||||||
;--------------
|
;--------------
|
||||||
sfx_effect .ds 1
|
sfx_effect .ds 1
|
||||||
@@ -159,7 +161,6 @@ sandhogflag .DS 1 ; (0 digger, 8 sandhog)
|
|||||||
;ofdirt
|
;ofdirt
|
||||||
magic .DS 2 ; was tempor2, but it was not compiling!!! (bug in OMC65)
|
magic .DS 2 ; was tempor2, but it was not compiling!!! (bug in OMC65)
|
||||||
;draw
|
;draw
|
||||||
DrawJumpAddr .DS 2
|
|
||||||
HowToDraw .DS 1
|
HowToDraw .DS 1
|
||||||
; bits here mean
|
; bits here mean
|
||||||
; 0 - negative X (go up)
|
; 0 - negative X (go up)
|
||||||
|
|||||||
+3
-3
@@ -544,7 +544,7 @@ DiggerCharacter
|
|||||||
sbc EndOfTheBarrelY,y
|
sbc EndOfTheBarrelY,y
|
||||||
sta ybyte
|
sta ybyte
|
||||||
mva #0 ybyte+1
|
mva #0 ybyte+1
|
||||||
mwa #Drawplot DrawJumpAddr
|
mva #0 drawFunction
|
||||||
mwa xdraw LaserCoordinate
|
mwa xdraw LaserCoordinate
|
||||||
mwa ydraw LaserCoordinate+2
|
mwa ydraw LaserCoordinate+2
|
||||||
mwa xbyte LaserCoordinate+4
|
mwa xbyte LaserCoordinate+4
|
||||||
@@ -615,7 +615,7 @@ ExplosionLoop2
|
|||||||
|
|
||||||
;check tanks' distance from the centre of the explosion
|
;check tanks' distance from the centre of the explosion
|
||||||
|
|
||||||
mwa #DrawLen DrawJumpAddr
|
mva #%10000000 drawFunction
|
||||||
;the above switches Draw to measuring length
|
;the above switches Draw to measuring length
|
||||||
;trick is easy - how many pixels does it take to draw
|
;trick is easy - how many pixels does it take to draw
|
||||||
;a line from one point to another
|
;a line from one point to another
|
||||||
@@ -1535,7 +1535,7 @@ noSmokeTracer
|
|||||||
RepeatIfSmokeTracer
|
RepeatIfSmokeTracer
|
||||||
mwa ytraj+1 Ytrajold+1
|
mwa ytraj+1 Ytrajold+1
|
||||||
mwa xtraj+1 Xtrajold+1
|
mwa xtraj+1 Xtrajold+1
|
||||||
mwa #DrawCheck DrawJumpAddr
|
mwa #%01000000 drawFunction
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sta Result
|
sta Result
|
||||||
|
|||||||
Reference in New Issue
Block a user