mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-21 06:39:40 +02:00
Minor optimizations
This commit is contained in:
+5
-7
@@ -16,9 +16,9 @@
|
|||||||
; - money each player has on the beginning of the game (moneyL i moneyH)
|
; - money each player has on the beginning of the game (moneyL i moneyH)
|
||||||
; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight
|
; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight
|
||||||
|
|
||||||
; mwa #(display+40*140) temp ; we only need to clear last 60 lines (faster)
|
mwa #(display+40*140) temp ; we only need to clear last 60 lines (faster)
|
||||||
; jsr clearscreen.Go ;let the screen be clean
|
jsr clearscreen.Go ;let the screen be clean
|
||||||
jsr clearscreen ;let the screen be clean
|
; jsr clearscreen ;let the screen be clean
|
||||||
|
|
||||||
mwa #DisplayCopyRom temp
|
mwa #DisplayCopyRom temp
|
||||||
mwa #display temp2
|
mwa #display temp2
|
||||||
@@ -29,9 +29,8 @@
|
|||||||
|
|
||||||
lda #%00111110 ; normal screen width, DL on, P/M on
|
lda #%00111110 ; normal screen width, DL on, P/M on
|
||||||
sta dmactls
|
sta dmactls
|
||||||
jsr SetPMWidth
|
jsr SetPMWidthAndColors
|
||||||
mva #TextBackgroundColor COLOR2
|
mva #TextBackgroundColor COLOR2
|
||||||
jsr ColorsOfSprites
|
|
||||||
mva #$ca COLOR1
|
mva #$ca COLOR1
|
||||||
mva #$00 COLBAKS ; set color of background
|
mva #$00 COLBAKS ; set color of background
|
||||||
|
|
||||||
@@ -1538,8 +1537,7 @@ displayloop1
|
|||||||
sta dmactls
|
sta dmactls
|
||||||
lda #%00100100 ; playfield before P/M
|
lda #%00100100 ; playfield before P/M
|
||||||
sta GPRIOR
|
sta GPRIOR
|
||||||
jsr SetPMWidth
|
jsr SetPMWidthAndColors
|
||||||
jsr ColorsOfSprites
|
|
||||||
mva #0 COLOR1
|
mva #0 COLOR1
|
||||||
sta COLBAKS ; set color of background
|
sta COLBAKS ; set color of background
|
||||||
sta CreditsVScrol
|
sta CreditsVScrol
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ eskipzeroing
|
|||||||
|
|
||||||
RmtSong song_ingame
|
RmtSong song_ingame
|
||||||
|
|
||||||
jsr SetPMWidth ; A=0
|
jsr SetPMWidthAndColors ; A=0
|
||||||
lda #0
|
lda #0
|
||||||
sta AfterBFGflag ; reset BFG flag
|
sta AfterBFGflag ; reset BFG flag
|
||||||
sta COLOR2 ; status line "off"
|
sta COLOR2 ; status line "off"
|
||||||
@@ -243,7 +243,6 @@ SettingEnergies
|
|||||||
jsr CopyFromROM
|
jsr CopyFromROM
|
||||||
|
|
||||||
jsr SetMainScreen
|
jsr SetMainScreen
|
||||||
jsr ColorsOfSprites
|
|
||||||
|
|
||||||
jsr drawmountains ;draw them
|
jsr drawmountains ;draw them
|
||||||
jsr drawtanks ;finally draw tanks
|
jsr drawtanks ;finally draw tanks
|
||||||
@@ -857,7 +856,7 @@ SetunPlots
|
|||||||
sta pmbase
|
sta pmbase
|
||||||
lda #$03 ; P/M on
|
lda #$03 ; P/M on
|
||||||
sta GRACTL
|
sta GRACTL
|
||||||
jsr SetPMWidth
|
jsr SetPMWidthAndColors
|
||||||
lda #%00100001 ; P/M priorities (multicolor players on) - prior=1
|
lda #%00100001 ; P/M priorities (multicolor players on) - prior=1
|
||||||
sta GPRIOR
|
sta GPRIOR
|
||||||
jsr PMoutofScreen
|
jsr PMoutofScreen
|
||||||
|
|||||||
+7
-14
@@ -2078,26 +2078,19 @@ ybarrel
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc ColorsOfSprites
|
.proc SetPMWidthAndColors
|
||||||
|
lda #%01010101
|
||||||
|
sta sizem ; all missiles, double width
|
||||||
ldy #3
|
ldy #3
|
||||||
@ lda TankColoursTable,y ; colours of sprites under tanks
|
@ lda #$00
|
||||||
sta PCOLR0,y
|
sta sizep0,y ; P0-P3 widths
|
||||||
|
lda TankColoursTable,y ; colours of sprites under tanks
|
||||||
|
sta PCOLR0,y
|
||||||
dey
|
dey
|
||||||
bpl @-
|
bpl @-
|
||||||
LDA TankColoursTable+4
|
LDA TankColoursTable+4
|
||||||
STA COLOR3 ; joined missiles (5th tank)
|
STA COLOR3 ; joined missiles (5th tank)
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
|
||||||
.proc SetPMWidth
|
|
||||||
lda #%01010101
|
|
||||||
sta sizem ; all missiles, double width
|
|
||||||
lda #$00
|
|
||||||
sta sizep0 ; P0-P3 widths
|
|
||||||
sta sizep0+1
|
|
||||||
sta sizep0+2
|
|
||||||
sta sizep0+3
|
|
||||||
rts
|
|
||||||
.endp
|
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user