mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-21 06:39:40 +02:00
Faster clearscreen
This commit is contained in:
+15
-6
@@ -641,13 +641,22 @@ EndPut4x4
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc ClearScreen
|
.proc ClearScreen
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
mwa #display temp
|
ldy #<display
|
||||||
Go ldy #0
|
lda #0
|
||||||
@ lda #$ff
|
sta temp
|
||||||
|
lda #>display
|
||||||
|
sta temp+1
|
||||||
|
Go
|
||||||
|
loop lda #$ff
|
||||||
sta (temp),y
|
sta (temp),y
|
||||||
inw temp
|
iny
|
||||||
cpw temp #display+screenheight*screenBytes+1
|
bne @+
|
||||||
bne @-
|
inc temp+1
|
||||||
|
@ cpy #<(display+screenheight*screenBytes+1)
|
||||||
|
bne loop
|
||||||
|
lda temp+1
|
||||||
|
cmp #>(display+screenheight*screenBytes+1)
|
||||||
|
bne loop
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -16,7 +16,12 @@
|
|||||||
; - 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)
|
; we only need to clear last 60 lines (faster)
|
||||||
|
ldy #<(display+40*140)
|
||||||
|
lda #0
|
||||||
|
sta temp
|
||||||
|
lda #>(display+40*140)
|
||||||
|
sta temp+1
|
||||||
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
|
||||||
|
|
||||||
|
|||||||
@@ -598,6 +598,24 @@ EndPut4x4
|
|||||||
cpw temp #displayC64+screenheight*screenBytes+1
|
cpw temp #displayC64+screenheight*screenBytes+1
|
||||||
bne @-
|
bne @-
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
ldy #<displayC64
|
||||||
|
lda #0
|
||||||
|
sta temp
|
||||||
|
lda #>displayC64
|
||||||
|
sta temp+1
|
||||||
|
Go
|
||||||
|
loop lda #$ff
|
||||||
|
sta (temp),y
|
||||||
|
iny
|
||||||
|
bne @+
|
||||||
|
inc temp+1
|
||||||
|
@ cpy #<(displayC64+screenheight*screenBytes+1)
|
||||||
|
bne loop
|
||||||
|
lda temp+1
|
||||||
|
cmp #>(displayC64+screenheight*screenBytes+1)
|
||||||
|
bne loop
|
||||||
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user