smol optimization by setting default color value for DisplayOffTextNr

This commit is contained in:
2023-06-03 23:43:40 -04:00
parent 790bfd51b5
commit a52ce70cd1
6 changed files with 7 additions and 8 deletions
+2 -4
View File
@@ -467,7 +467,6 @@ missed
;here we clear offensive text (after a shoot)
ldy TankNr
mva #$00 plot4x4color
jsr DisplayOffensiveTextNr
NextPlayerShoots
@@ -568,8 +567,8 @@ TextAfterBFG
sta TextNumberOff
inc CurrentResult ; ... but increase result of winner (BFG)
ldy TankTempY
mva #$ff plot4x4color
jsr DisplayOffensiveTextNr
lda #$ff
jsr DisplayOffensiveTextNr.notZero
; tank flash
ldy TankTempY
mva TankNr temp2 ; not elegant, and probably unnecessary
@@ -580,7 +579,6 @@ TextAfterBFG
;Deffensive text cleanup
;here we clear Deffensive text (after a shoot)
ldy TankTempY
mva #$00 plot4x4color
jsr DisplayOffensiveTextNr
; calculate position of the explosion (the post-death one)
+3
View File
@@ -1599,6 +1599,9 @@ NotHigher
; all text start from `talk` and end with an inverse.
; we go through the `talk`, count number of inverses.
; if equal to TextNumberOff, it is our text, printit
lda #0
notZero
sta plot4x4color
tya
tax ; save Y
mwa #(talk-1) LineAddress4x4
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+2 -4
View File
@@ -1594,8 +1594,8 @@ RandomizeOffensiveText
sta TextNumberOff
ldy TankNr
mva #$ff plot4x4color
jsr DisplayOffensiveTextNr
lda #$ff
jsr DisplayOffensiveTextNr.notZero
AfterOffensiveText
mva #0 LaserFlag ; $ff - Laser
@@ -1651,7 +1651,6 @@ ShotUnderGround
;here we clear offensive text (after a shoot)
ClearOffensiveText
ldy TankNr
mva #$00 plot4x4color
jmp DisplayOffensiveTextNr
; rts
.endp
@@ -2472,7 +2471,6 @@ MIRValreadyAll
;first clean the offensive text...
ldy TankNr
mva #$00 plot4x4color
jsr DisplayOffensiveTextNr
; temporary removing tanks from the screen (otherwise they will fall down with soil)