mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Optimizations - 69 bytes saved!
This commit is contained in:
+3
-2
@@ -26,7 +26,7 @@
|
|||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
icl 'definitions.asm'
|
icl 'definitions.asm'
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
FirstZpageVariable = $5C
|
FirstZpageVariable = $5B
|
||||||
.zpvar DliColorBack .byte = FirstZpageVariable
|
.zpvar DliColorBack .byte = FirstZpageVariable
|
||||||
.zpvar GradientNr .byte
|
.zpvar GradientNr .byte
|
||||||
.zpvar GradientColors .word
|
.zpvar GradientColors .word
|
||||||
@@ -92,6 +92,7 @@ FirstZpageVariable = $5C
|
|||||||
.zpvar NumberOfPlayers .byte ;current number of players (counted from 1)
|
.zpvar NumberOfPlayers .byte ;current number of players (counted from 1)
|
||||||
.zpvar Counter .byte ;temporary Counter for outside loops
|
.zpvar Counter .byte ;temporary Counter for outside loops
|
||||||
.zpvar ExplosionRadius .byte
|
.zpvar ExplosionRadius .byte
|
||||||
|
.zpvar FunkyBombCounter .byte
|
||||||
.zpvar ResultY .byte
|
.zpvar ResultY .byte
|
||||||
.zpvar xcircle .word
|
.zpvar xcircle .word
|
||||||
.zpvar ycircle .word
|
.zpvar ycircle .word
|
||||||
@@ -129,7 +130,7 @@ FirstZpageVariable = $5C
|
|||||||
.zpvar goleft .byte
|
.zpvar goleft .byte
|
||||||
.zpvar OffsetDL1 .byte
|
.zpvar OffsetDL1 .byte
|
||||||
.zpvar L1 .byte
|
.zpvar L1 .byte
|
||||||
|
HotNapalmFlag = FunkyBombCounter ; reuse variable!
|
||||||
;* RMT ZeroPage addresses in artwork/sfx/rmtplayr.a65
|
;* RMT ZeroPage addresses in artwork/sfx/rmtplayr.a65
|
||||||
|
|
||||||
displayposition = modify
|
displayposition = modify
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -261,7 +261,6 @@ oldplotL .DS [5]
|
|||||||
oldora .DS [5]
|
oldora .DS [5]
|
||||||
oldply .DS [5]
|
oldply .DS [5]
|
||||||
OldOraTemp .DS 1
|
OldOraTemp .DS 1
|
||||||
FunkyBombCounter .DS 1
|
|
||||||
xtrajfb .DS 2
|
xtrajfb .DS 2
|
||||||
ytrajfb .DS 2
|
ytrajfb .DS 2
|
||||||
;
|
;
|
||||||
|
|||||||
+17
-29
@@ -239,22 +239,20 @@ GoXmissileWithSaveXYdraw
|
|||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc napalm
|
.proc napalm
|
||||||
mva #sfx_napalm sfx_effect
|
mva #0 HotNapalmFlag ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
|
||||||
mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width)
|
|
||||||
jsr CalculateExplosionRange
|
|
||||||
mva #0 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
|
|
||||||
beq xnapalm
|
beq xnapalm
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc hotnapalm
|
.proc hotnapalm
|
||||||
mva #sfx_napalm sfx_effect
|
mva #1 HotNapalmFlag ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
|
||||||
mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width)
|
|
||||||
jsr CalculateExplosionRange
|
|
||||||
mva #1 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
|
|
||||||
; jmp xnapalm
|
; jmp xnapalm
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc xnapalm
|
.proc xnapalm
|
||||||
|
mva #sfx_napalm sfx_effect
|
||||||
|
mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width)
|
||||||
|
jsr CalculateExplosionRange
|
||||||
|
;
|
||||||
mwa xdraw xcircle ; store hitpoint for future repeats
|
mwa xdraw xcircle ; store hitpoint for future repeats
|
||||||
ldy #30 ; repeat 30 times
|
ldy #30 ; repeat 30 times
|
||||||
sty magic
|
sty magic
|
||||||
@@ -272,7 +270,7 @@ RepeatFlame ; internal loop (draw flames)
|
|||||||
sbc #1 ; over ground
|
sbc #1 ; over ground
|
||||||
sta ydraw
|
sta ydraw
|
||||||
lda xdraw
|
lda xdraw
|
||||||
and ExplosionRadius ; if hotnapalm and x is odd:
|
and HotNapalmFlag ; if hotnapalm and x is odd:
|
||||||
:2 asl ; modify y position 4 pixels up
|
:2 asl ; modify y position 4 pixels up
|
||||||
ldy ydraw
|
ldy ydraw
|
||||||
sta ydraw
|
sta ydraw
|
||||||
@@ -344,7 +342,7 @@ BurnedCheckLoop
|
|||||||
bcc TankOutOfFire
|
bcc TankOutOfFire
|
||||||
|
|
||||||
ldy #40 ; energy decrease (napalm) - but if hotnapalm:
|
ldy #40 ; energy decrease (napalm) - but if hotnapalm:
|
||||||
lda ExplosionRadius
|
lda HotNapalmFlag
|
||||||
beq NotHot
|
beq NotHot
|
||||||
ldy #80 ; energy decrease (hotnapalm)
|
ldy #80 ; energy decrease (hotnapalm)
|
||||||
NotHot
|
NotHot
|
||||||
@@ -386,50 +384,40 @@ EndNurnedCheckLoop
|
|||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc babydigger
|
.proc babydigger
|
||||||
mva #sfx_digger sfx_effect
|
mva #1 diggery ; how many branches (-1)
|
||||||
|
GoBabydiggerSFX
|
||||||
|
mva #sfx_digger sfx_effect
|
||||||
mva #0 sandhogflag
|
mva #0 sandhogflag
|
||||||
mva #13 DigLong
|
mva #13 DigLong
|
||||||
mva #1 diggery ; how many branches (-1)
|
|
||||||
bne xdigger
|
bne xdigger
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc digger ;
|
.proc digger ;
|
||||||
mva #sfx_digger sfx_effect
|
|
||||||
mva #0 sandhogflag
|
|
||||||
mva #13 DigLong
|
|
||||||
mva #3 diggery ; how many branches (-1)
|
mva #3 diggery ; how many branches (-1)
|
||||||
bne xdigger
|
bne babydigger.GoBabydiggerSFX
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc heavydigger
|
.proc heavydigger
|
||||||
mva #sfx_digger sfx_effect
|
|
||||||
mva #0 sandhogflag
|
|
||||||
mva #13 DigLong
|
|
||||||
mva #7 diggery ; how many branches (-1)
|
mva #7 diggery ; how many branches (-1)
|
||||||
bne xdigger
|
bne babydigger.GoBabydiggerSFX
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc babysandhog
|
.proc babysandhog
|
||||||
mva #sfx_sandhog sfx_effect
|
|
||||||
mva #char_sandhog_offset sandhogflag
|
|
||||||
mva #13 DigLong
|
|
||||||
mva #1 diggery ; how many branches (-1)
|
mva #1 diggery ; how many branches (-1)
|
||||||
bne xdigger
|
bne heavysandhog.GoHeavysandhogSFX
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc sandhog
|
.proc sandhog
|
||||||
mva #sfx_sandhog sfx_effect
|
|
||||||
mva #char_sandhog_offset sandhogflag
|
|
||||||
mva #13 DigLong
|
|
||||||
mva #3 diggery ; how many branches (-1)
|
mva #3 diggery ; how many branches (-1)
|
||||||
bne xdigger
|
bne heavysandhog.GoHeavysandhogSFX
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc heavysandhog
|
.proc heavysandhog
|
||||||
|
mva #5 diggery ; how many branches (-1)
|
||||||
|
GoHeavysandhogSFX
|
||||||
mva #sfx_sandhog sfx_effect
|
mva #sfx_sandhog sfx_effect
|
||||||
mva #char_sandhog_offset sandhogflag
|
mva #char_sandhog_offset sandhogflag
|
||||||
mva #13 DigLong
|
mva #13 DigLong
|
||||||
mva #5 diggery ; how many branches (-1)
|
|
||||||
; jmp xdigger
|
; jmp xdigger
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user