mem optimization, nicer explosions

This commit is contained in:
2022-04-27 09:09:07 -04:00
parent 5d86373b98
commit d57a8265db
5 changed files with 21 additions and 50 deletions
+2 -4
View File
@@ -55,12 +55,10 @@ dl ; MAIN game display list
.byte $4f
.word display
:100 .by $0f
.by $0f
:101 .by $0f
.by $4f
.wo display+$0ff0
:100 .byte $0f ;97
:97 .byte $0f ;1+101+1+97 = 200
.byte $41
.word dl
;-----------------------------------------------
+5 -34
View File
@@ -443,41 +443,12 @@ clearscreen .proc
;--------------------------------------------------
lda #0
tax
Loopi1
sta display,x
sta display+$100,x
sta display+$200,x
sta display+$300,x
sta display+$400,x
sta display+$500,x
sta display+$600,x
sta display+$700,x
sta display+$800,x
sta display+$900,x
sta display+$a00,x
sta display+$b00,x
sta display+$c00,x
sta display+$d00,x
sta display+$e00,x
sta display+$f00,x
sta display+$1000,x
sta display+$1100,x
sta display+$1200,x
sta display+$1300,x
sta display+$1400,x
sta display+$1500,x
sta display+$1600,x
sta display+$1700,x
sta display+$1800,x
sta display+$1900,x
sta display+$1a00,x
sta display+$1b00,x
sta display+$1c00,x
sta display+$1d00,x
sta display+$1e00,x
sta display+$1f00,x
@
:31 sta display+($100*#),x
sta display+$1e50,x ; this is so no space outside of the screen is cleared
; of course we are clearing $100 instead of $50, but who cares :]
inx
bne Loopi1
bne @-
rts
.endp
;-------------------------------*------------------
+4 -6
View File
@@ -81,16 +81,14 @@ displayposition = modify
icl 'artwork/HIMARS14.asm'
;Game loading address
ORG $3010 ;must be $2K after screen, because screen cleaning erases $2K
ORG $3000
WeaponFont
ins 'artwork/weapons_AW4.fnt' ; 'artwork/weapons.fnt'
;-----------------------------------------------
;Screen displays go first to avoid crossing 4kb barrier
;Screen displays go here to avoid crossing 4kb barrier
;-----------------------------------------------
icl 'display.asm'
;----------------------------------------------
.ALIGN $400
WeaponFont
ins 'artwork/weapons_AW4.fnt' ; 'artwork/weapons.fnt'
;--------------------------------------------------
; Game Code
BIN
View File
Binary file not shown.
+10 -6
View File
@@ -549,16 +549,20 @@ ExplosionLoop
lda radius
cmp ExplosionRadius
bcc ExplosionLoop
lda #0
sta color
ldx #0
stx color
inx
stx radius
ExplosionLoop2
jsr circle
dec radius
inc radius
lda radius
bne ExplosionLoop2
lda #1
sta color
cmp ExplosionRadius
bcc ExplosionLoop2
mva #1 color
;check tanks' distance from the centre of the explosion
mwa #DrawLen DrawJumpAddr