Minor optimizations

This commit is contained in:
Pecusx
2023-05-25 21:40:06 +02:00
parent 1edf0d5a1e
commit 1389675fce
4 changed files with 8 additions and 10 deletions
+8 -10
View File
@@ -1401,7 +1401,6 @@ FalloutOfLine
ldy #0 ldy #0
lda (temp),y lda (temp),y
sta ydraw sta ydraw
lda (temp),y
clc clc
adc #1 adc #1
sta (temp),y sta (temp),y
@@ -1441,11 +1440,11 @@ NothingToFall
; starting point ; starting point
getrandomY ;getting random Y coordinate getrandomY ;getting random Y coordinate
sec ; sec ; ???
lda random lda random
cmp #screenheight-(margin*4) ;it means that max line=199 cmp #screenheight-(margin*4) ;it means that max line=199
bcs getrandomY bcs getrandomY
clc ; clc ; C is clear
adc #(margin*2) adc #(margin*2)
sta ydraw sta ydraw
sta yfloat+1 sta yfloat+1
@@ -1762,16 +1761,15 @@ DOTOldLowestValue
:3 asl ; *8 :3 asl ; *8
clc clc
adc #<TanksNames adc #<TanksNames
sta temp ; TextAddress sta LineAddress4x4 ; TextAddress
lda #0 lda #0
adc #>Tanksnames adc #>Tanksnames
sta temp+1 ; TextAddress+1 sta LineAddress4x4+1 ; TextAddress+1
mwa temp LineAddress4x4
;find length of the tank's name ;find length of the tank's name
ldy #7 ldy #7
@ @
lda (temp),y lda (LineAddress4x4),y
bne end_found bne end_found
dey dey
bne @- bne @-
@@ -1926,7 +1924,7 @@ quit_seppuku
lda ytankstable,x lda ytankstable,x
sta ydraw sta ydraw
mva #0 ydraw+1 mva #0 ydraw+1
X lda XtanksTableL,x X lda XtanksTableL,x
sta xdraw sta xdraw
lda XtanksTableH,x lda XtanksTableH,x
sta xdraw+1 sta xdraw+1
@@ -2075,7 +2073,7 @@ ybarrel
;-------------------------------------------------- ;--------------------------------------------------
lda #$00 ; let all P/M disappear lda #$00 ; let all P/M disappear
ldy #7 ldy #7
@ sta hposp0,y @ sta hposp0,y
dey dey
bpl @- bpl @-
;:8 sta hposp0+# ; optimized... but Y! ;:8 sta hposp0+# ; optimized... but Y!
@@ -2084,7 +2082,7 @@ ybarrel
;-------------------------------------------------- ;--------------------------------------------------
.proc ColorsOfSprites .proc ColorsOfSprites
ldy #3 ldy #3
@ lda TankColoursTable,y ; colours of sprites under tanks @ lda TankColoursTable,y ; colours of sprites under tanks
sta PCOLR0,y sta PCOLR0,y
dey dey
bpl @- bpl @-
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.