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) ;here we clear offensive text (after a shoot)
ldy TankNr ldy TankNr
mva #$00 plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
NextPlayerShoots NextPlayerShoots
@@ -568,8 +567,8 @@ TextAfterBFG
sta TextNumberOff sta TextNumberOff
inc CurrentResult ; ... but increase result of winner (BFG) inc CurrentResult ; ... but increase result of winner (BFG)
ldy TankTempY ldy TankTempY
mva #$ff plot4x4color lda #$ff
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr.notZero
; tank flash ; tank flash
ldy TankTempY ldy TankTempY
mva TankNr temp2 ; not elegant, and probably unnecessary mva TankNr temp2 ; not elegant, and probably unnecessary
@@ -580,7 +579,6 @@ TextAfterBFG
;Deffensive text cleanup ;Deffensive text cleanup
;here we clear Deffensive text (after a shoot) ;here we clear Deffensive text (after a shoot)
ldy TankTempY ldy TankTempY
mva #$00 plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
; calculate position of the explosion (the post-death one) ; 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. ; all text start from `talk` and end with an inverse.
; we go through the `talk`, count number of inverses. ; we go through the `talk`, count number of inverses.
; if equal to TextNumberOff, it is our text, printit ; if equal to TextNumberOff, it is our text, printit
lda #0
notZero
sta plot4x4color
tya tya
tax ; save Y tax ; save Y
mwa #(talk-1) LineAddress4x4 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 sta TextNumberOff
ldy TankNr ldy TankNr
mva #$ff plot4x4color lda #$ff
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr.notZero
AfterOffensiveText AfterOffensiveText
mva #0 LaserFlag ; $ff - Laser mva #0 LaserFlag ; $ff - Laser
@@ -1651,7 +1651,6 @@ ShotUnderGround
;here we clear offensive text (after a shoot) ;here we clear offensive text (after a shoot)
ClearOffensiveText ClearOffensiveText
ldy TankNr ldy TankNr
mva #$00 plot4x4color
jmp DisplayOffensiveTextNr jmp DisplayOffensiveTextNr
; rts ; rts
.endp .endp
@@ -2472,7 +2471,6 @@ MIRValreadyAll
;first clean the offensive text... ;first clean the offensive text...
ldy TankNr ldy TankNr
mva #$00 plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
; temporary removing tanks from the screen (otherwise they will fall down with soil) ; temporary removing tanks from the screen (otherwise they will fall down with soil)