Merge branch 'develop' of https://github.com/pkali/scorch_src into develop

This commit is contained in:
Pecusx
2023-08-24 22:21:23 +02:00
3 changed files with 21 additions and 13 deletions
+21 -13
View File
@@ -34,13 +34,12 @@
; by dividing positions by 4 ; by dividing positions by 4
ldy #MaxPlayers-1 ldy #MaxPlayers-1
loop loop
lda xtankstableL,y
sta temp
lda xtankstableH,y
sta temp+1
;= /4 ;= /4
:2 lsrw temp lda xtankstableH,y
lda temp lsr
lda xtankstableL,y
ror ;just one bit over 256. Max screenwidth = 512!!!
lsr
sta LowResDistances,y sta LowResDistances,y
dey dey
bpl loop bpl loop
@@ -1084,18 +1083,27 @@ loop
.endp .endp
;---------------------------------------------- ;----------------------------------------------
.proc GetDistance .proc GetDistance
; calculates lores ( /4 ) distance from tank X to TargetTankNr(Y) ; calculates lores ( /4 ) distance from tank X to last plot
; (explosion position after Flight proc)
; This procedure must be called immediately after targeting.
; xdraw value should remain unchanged from the end of the Flight procedure.
;
; result in A ; result in A
;---------------------------------------------- ;----------------------------------------------
ldy TargetTankNr ;xdraw/4
lda xdraw+1
lsr
lda xdraw
ror ;just one bit over 256. Max screenwidth = 512!!!
lsr
;
sec sec
lda LowResDistances,x sbc LowResDistances,x
sbc LowResDistances,y bcs XisLower
bcs YisLower YisLower
XisLower
eor #$ff eor #$ff
adc #1 adc #1
YisLower XisLower
rts rts
.endp .endp
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.