mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-21 06:39:40 +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
|
||||
ldy #0
|
||||
lda (modify),y
|
||||
cmp #screenheight
|
||||
beq NoMountain
|
||||
sta ydraw
|
||||
jsr DrawLine
|
||||
NoMountain
|
||||
inw modify
|
||||
inw xdraw
|
||||
cpw xdraw #screenwidth
|
||||
@@ -941,14 +944,14 @@ EndDrawing
|
||||
; ****************************************************
|
||||
;--------------------------------------------------
|
||||
calculatemountains0 .proc
|
||||
; Only for testing - makes ground flat (one pixel)
|
||||
; Only for testing - makes ground flat (0 pixels)
|
||||
; and places tanks on it
|
||||
; remember to remove in final compilation :)
|
||||
;--------------------------------------------------
|
||||
mwa #0 xdraw
|
||||
nextPointDrawing
|
||||
adw xdraw #mountaintable modify
|
||||
lda #screenheight-1
|
||||
lda #screenheight
|
||||
ldy #0
|
||||
sta (modify),y
|
||||
inw xdraw
|
||||
@@ -957,7 +960,7 @@ nextPointDrawing
|
||||
ldx NumberOfPlayers
|
||||
dex
|
||||
SetYofNextTank
|
||||
lda #screenheight-2
|
||||
lda #screenheight-1
|
||||
sta ytankstable,x
|
||||
dex
|
||||
bpl SetYofNextTank
|
||||
|
||||
+1
-1
@@ -320,7 +320,7 @@ SettingEnergies
|
||||
jsr clearscreen ;let the screen be clean
|
||||
jsr placetanks ;let the tanks be evenly placed
|
||||
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 drawtanks ;finally draw tanks
|
||||
|
||||
|
||||
BIN
Binary file not shown.
+7
-5
@@ -1816,17 +1816,19 @@ NoUnPlot
|
||||
|
||||
Hit
|
||||
mwa XHit xdraw
|
||||
mwa YHit ydraw
|
||||
mva YHit ydraw ; one byte now
|
||||
|
||||
jsr unPlot
|
||||
EndOfFlight
|
||||
mwa xdraw xcircle ; we must store for a little while
|
||||
mva ydraw ycircle ; xdraw and ydraw
|
||||
; 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 #0 xdraw
|
||||
mva #screenheight-1 ydraw
|
||||
jsr unPlot
|
||||
mwa xcircle xdraw
|
||||
mva ycircle ydraw
|
||||
; mwa xcircle xdraw
|
||||
; mva ycircle ydraw
|
||||
mwa XHit xdraw
|
||||
mva YHit ydraw
|
||||
|
||||
ldy SmokeTracerFlag
|
||||
beq EndOfFlight2
|
||||
|
||||
Reference in New Issue
Block a user