Old way of displaying angle #105

This commit is contained in:
Pecusx
2022-07-05 13:09:29 +02:00
parent f2c7b9c5a5
commit a5add9d9c4
2 changed files with 26 additions and 25 deletions
BIN
View File
Binary file not shown.
+26 -25
View File
@@ -1906,37 +1906,38 @@ NoShieldEnergy
; (for future display) ; (for future display)
ldx TankNr ldx TankNr
lda AngleTable,x lda AngleTable,x
bmi AngleToLeft cmp #90
beq VerticallyUp
lda AngleTable,x bcs AngleToLeft
AngleToRight
; now we have values from 0 to 89 and right angle
sta decimal sta decimal
;lda #$7f ; (tab) character lda #$7f ; (tab) character
;sta textbuffer+40+25 sta textbuffer+40+25
lda #0 ;space lda #0 ;space
;sta textbuffer+40+22 sta textbuffer+40+22
sta decimal+1 ; angle is single byte, but displayed with displaydec (word) routine beq AngleDisplay
;lda #90
;sec
;sbc AngleTable,x
tay
lda BarrelTable,y
sta CharCode
bne AngleDisplay ;like jmp, because code always <>0
AngleToLeft AngleToLeft
;sec sec
;sbc #(255-90) lda #180
sbc AngleTable,x
; angles 180 - 91 converted to 0 - 89
sta decimal sta decimal
tay lda #$7e ;(del) char
lda BarrelTable,y sta textbuffer+40+22
sta CharCode lda #0 ;space
;lda #$7e ;(del) char sta textbuffer+40+25
;sta textbuffer+40+22 beq AngleDisplay
;lda #0 ;space VerticallyUp
;sta textbuffer+40+25 ; now we have value 90
sta decimal
lda #0 ;space
sta textbuffer+40+25
sta textbuffer+40+22
AngleDisplay AngleDisplay
mwa #textbuffer+40+21 displayposition mwa #textbuffer+40+23 displayposition
jsr displaydec jsr displaybyte
;========================= ;=========================
;display Wind ;display Wind