elaborate fix of a simple issue... #92

This commit is contained in:
2022-06-18 20:17:16 -04:00
parent ffa748fb68
commit 98e866abdd
6 changed files with 23 additions and 43 deletions
+1 -1
View File
@@ -899,7 +899,7 @@ DefensiveEnergy = * - 48
.by 00 ; Fuel Tank .by 00 ; Fuel Tank
.by 00 ; Contact Trigger .by 00 ; Contact Trigger
weaponsOfDeath weaponsOfDeath
dta 1,2,3,7,15,16,17,18,19,20,21,22,23,24,25,26,27 dta 1,2,3,7,17,18,19,20,21,22,23,24,25,26,27
weaponsOfDeathEnd weaponsOfDeathEnd
joyToKeyTable joyToKeyTable
; .by 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15 ; .by 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15
+3 -3
View File
@@ -1451,7 +1451,7 @@ EndPutChar
; ------------------------------------------ ; ------------------------------------------
.proc PutChar4x4 .proc PutChar4x4
; puts 4x4 pixels char on the graphics screen ; puts 4x4 pixels char on the graphics screen
; in: xdraw, ydraw (LOWER left corner of the char) ; in: dx, dy (LOWER left corner of the char)
; in: CharCode4x4 (.sbyte) ; in: CharCode4x4 (.sbyte)
; in: plot4x4color (0/1) ; in: plot4x4color (0/1)
; all pixels are being drawn ; all pixels are being drawn
@@ -1505,7 +1505,7 @@ GetUpper4bits
bpl CopyChar bpl CopyChar
; calculating coordinates from xdraw and ydraw ; calculating coordinates from xdraw and ydraw
mwa xdraw xbyte mwa dx xbyte
lda xbyte lda xbyte
and #$7 and #$7
@@ -1516,7 +1516,7 @@ GetUpper4bits
rorw xbyte rorw xbyte
;--- ;---
ldy xbyte ldy xbyte
lda ydraw ; y = y - 3 because left lower. lda dy ; y = y - 3 because left lower.
sec sec
sbc #3 sbc #3
tax tax
+7 -3
View File
@@ -427,6 +427,10 @@ AfterManualShooting
ShootNow ShootNow
jsr Shoot jsr Shoot
;here we clear offensive text (after a shoot)
ldy TankNr
mva #0 plot4x4color
jsr DisplayOffensiveTextNr
lda HitFlag ;0 if missed lda HitFlag ;0 if missed
beq missed beq missed
@@ -438,9 +442,9 @@ ShootNow
continueMainRoundLoopAfterSeppuku continueMainRoundLoopAfterSeppuku
;here we clear offensive text (after a shoot) ;here we clear offensive text (after a shoot)
ldy TankNr ;ldy TankNr
mva #0 plot4x4color ;mva #0 plot4x4color
jsr DisplayOffensiveTextNr ;jsr DisplayOffensiveTextNr
AfterExplode AfterExplode
BIN
View File
Binary file not shown.
+12 -23
View File
@@ -1305,6 +1305,8 @@ space dta d" "
;that's easy because we have number of tank ;that's easy because we have number of tank
;and xtankstableL and H keep X position of a given tank ;and xtankstableL and H keep X position of a given tank
;save vars (messed when printing...)
lda xtankstableL,y lda xtankstableL,y
sta temp sta temp
lda xtankstableH,y lda xtankstableH,y
@@ -1425,12 +1427,12 @@ DOTNcharloop
asl asl
clc clc
adc TextPositionX adc TextPositionX
sta Xdraw sta dx
lda #0 lda #0
adc TextPositionX+1 adc TextPositionX+1
sta Xdraw+1 sta dx+1
lda TextPositionY lda TextPositionY
sta ydraw sta dy
jsr PutChar4x4 jsr PutChar4x4
inc TextCounter inc TextCounter
@@ -1448,6 +1450,7 @@ DOTNcharloop
;address in LineAddress4x4 ;address in LineAddress4x4
;starting from LineXdraw, LineYdraw ;starting from LineXdraw, LineYdraw
ldy #0 ldy #0
sty LineCharNr sty LineCharNr
@@ -1460,8 +1463,8 @@ TypeLine4x4Loop
beq EndOfTypeLine4x4 beq EndOfTypeLine4x4
sta CharCode4x4 sta CharCode4x4
mwa LineXdraw Xdraw mwa LineXdraw dx
mva LineYdraw Ydraw mva LineYdraw dy
mva #1 plot4x4color mva #1 plot4x4color
jsr PutChar4x4 ;type empty pixels as well! jsr PutChar4x4 ;type empty pixels as well!
adw LineXdraw #4 adw LineXdraw #4
@@ -1477,10 +1480,6 @@ EndOfTypeLine4x4
.proc AreYouSure .proc AreYouSure
;using 4x4 font ;using 4x4 font
;save vars (messed in TypeLine4x4)
mwa Xdraw xk
mva Ydraw yc
mva #4 ResultY ; where seppuku text starts Y-wise on the screen mva #4 ResultY ; where seppuku text starts Y-wise on the screen
;top frame ;top frame
@@ -1510,7 +1509,7 @@ EndOfTypeLine4x4
skip01 skip01
;clean ;clean
mva #3 dx mva #3 di
mva #4 ResultY mva #4 ResultY
@ @
mva #1 plot4x4color mva #1 plot4x4color
@@ -1520,23 +1519,16 @@ skip01
jsr TypeLine4x4 jsr TypeLine4x4
adb ResultY #4 ;next line adb ResultY #4 ;next line
dec dx dec di
bne @- bne @-
quit_areyousure quit_areyousure
;restore vars
mva yc Ydraw
mwa xk Xdraw
rts rts
.endp .endp
;-------------------------------- ;--------------------------------
.proc DisplaySeppuku .proc DisplaySeppuku
;using 4x4 font ;using 4x4 font
;save vars (messed in TypeLine4x4)
mwa Xdraw xk
mva Ydraw yc
mva #20 fs ; temp, how many times blink the billboard mva #20 fs ; temp, how many times blink the billboard
seppuku_loop seppuku_loop
@@ -1564,7 +1556,7 @@ seppuku_loop
;clean seppuku ;clean seppuku
mva #3 dx mva #3 di
mva #4 ResultY mva #4 ResultY
@ @
mwa #lineClear LineAddress4x4 mwa #lineClear LineAddress4x4
@@ -1573,16 +1565,13 @@ seppuku_loop
jsr TypeLine4x4 jsr TypeLine4x4
adb ResultY #4 ;next line adb ResultY #4 ;next line
dec dx dec di
bne @- bne @-
dec fs dec fs
jne seppuku_loop jne seppuku_loop
quit_seppuku quit_seppuku
;restore vars
mva yc Ydraw
mwa xk Xdraw
rts rts
.endp .endp
;-------------------------------- ;--------------------------------
-13
View File
@@ -102,14 +102,7 @@ VOID
jsr xmissile jsr xmissile
; soil must fall down now! there is no other way... ; soil must fall down now! there is no other way...
;first clean the offensive text...
ldy TankNr
mva #0 plot4x4color
jsr DisplayOffensiveTextNr
; hide tanks or they fall down with soil ; hide tanks or they fall down with soil
lda TankNr lda TankNr
pha pha
mva #1 Erase mva #1 Erase
@@ -186,10 +179,6 @@ EndOfLeapping
mva #21 ExplosionRadius mva #21 ExplosionRadius
jsr CalculateExplosionRange0 jsr CalculateExplosionRange0
jsr xmissile jsr xmissile
ldy TankNr
mva #0 plot4x4color
jsr DisplayOffensiveTextNr
lda TankNr lda TankNr
pha pha
@@ -1832,8 +1821,6 @@ EndOfFlight
jsr unPlot jsr unPlot
mwa xcircle xdraw mwa xcircle xdraw
mwa ycircle ydraw mwa ycircle ydraw
; mwa XHit xdraw
; mva YHit ydraw
ldy SmokeTracerFlag ldy SmokeTracerFlag
beq EndOfFlight2 beq EndOfFlight2