mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-21 21:34:20 +02:00
Small bugfix and optymalisation
Bugfix in drawnountains (now ground 0 is possible: ) ) Otymized flight proc - explosions no wrap around screen - why? :)
This commit is contained in:
+6
-3
@@ -681,8 +681,11 @@ drawmountains .proc
|
|||||||
drawmountainsloop
|
drawmountainsloop
|
||||||
ldy #0
|
ldy #0
|
||||||
lda (modify),y
|
lda (modify),y
|
||||||
|
cmp #screenheight
|
||||||
|
beq NoMountain
|
||||||
sta ydraw
|
sta ydraw
|
||||||
jsr DrawLine
|
jsr DrawLine
|
||||||
|
NoMountain
|
||||||
inw modify
|
inw modify
|
||||||
inw xdraw
|
inw xdraw
|
||||||
cpw xdraw #screenwidth
|
cpw xdraw #screenwidth
|
||||||
@@ -941,14 +944,14 @@ EndDrawing
|
|||||||
; ****************************************************
|
; ****************************************************
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
calculatemountains0 .proc
|
calculatemountains0 .proc
|
||||||
; Only for testing - makes ground flat (one pixel)
|
; Only for testing - makes ground flat (0 pixels)
|
||||||
; and places tanks on it
|
; and places tanks on it
|
||||||
; remember to remove in final compilation :)
|
; remember to remove in final compilation :)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
mwa #0 xdraw
|
mwa #0 xdraw
|
||||||
nextPointDrawing
|
nextPointDrawing
|
||||||
adw xdraw #mountaintable modify
|
adw xdraw #mountaintable modify
|
||||||
lda #screenheight-1
|
lda #screenheight
|
||||||
ldy #0
|
ldy #0
|
||||||
sta (modify),y
|
sta (modify),y
|
||||||
inw xdraw
|
inw xdraw
|
||||||
@@ -957,7 +960,7 @@ nextPointDrawing
|
|||||||
ldx NumberOfPlayers
|
ldx NumberOfPlayers
|
||||||
dex
|
dex
|
||||||
SetYofNextTank
|
SetYofNextTank
|
||||||
lda #screenheight-2
|
lda #screenheight-1
|
||||||
sta ytankstable,x
|
sta ytankstable,x
|
||||||
dex
|
dex
|
||||||
bpl SetYofNextTank
|
bpl SetYofNextTank
|
||||||
|
|||||||
+1
-1
@@ -320,7 +320,7 @@ SettingEnergies
|
|||||||
jsr clearscreen ;let the screen be clean
|
jsr clearscreen ;let the screen be clean
|
||||||
jsr placetanks ;let the tanks be evenly placed
|
jsr placetanks ;let the tanks be evenly placed
|
||||||
jsr calculatemountains ;let mountains be nice for the eye
|
jsr calculatemountains ;let mountains be nice for the eye
|
||||||
; jsr calculatemountains0 ;only fort tests - makes mountains flat and one pixel height
|
; jsr calculatemountains0 ;only fort tests - makes mountains flat and 0 height
|
||||||
jsr drawmountains ;draw them
|
jsr drawmountains ;draw them
|
||||||
jsr drawtanks ;finally draw tanks
|
jsr drawtanks ;finally draw tanks
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
+7
-5
@@ -1816,17 +1816,19 @@ NoUnPlot
|
|||||||
|
|
||||||
Hit
|
Hit
|
||||||
mwa XHit xdraw
|
mwa XHit xdraw
|
||||||
mwa YHit ydraw
|
mva YHit ydraw ; one byte now
|
||||||
|
|
||||||
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
|
; mva ydraw ycircle ; xdraw and ydraw .... but this values are in YHit and XHit !!!
|
||||||
mwa #0 xdraw
|
mwa #0 xdraw
|
||||||
mva #screenheight-1 ydraw
|
mva #screenheight-1 ydraw
|
||||||
jsr unPlot
|
jsr unPlot
|
||||||
mwa xcircle xdraw
|
; mwa xcircle xdraw
|
||||||
mva ycircle ydraw
|
; mva ycircle ydraw
|
||||||
|
mwa XHit xdraw
|
||||||
|
mva YHit ydraw
|
||||||
|
|
||||||
ldy SmokeTracerFlag
|
ldy SmokeTracerFlag
|
||||||
beq EndOfFlight2
|
beq EndOfFlight2
|
||||||
|
|||||||
Reference in New Issue
Block a user