mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
Napalm and Hot Napalm added
... but something is wrong
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ price_Funky_Bomb_____ = 293 ;_5
|
|||||||
price_MIRV___________ = 456 ;_6
|
price_MIRV___________ = 456 ;_6
|
||||||
price_Death_s_Head___ = 337 ;_7
|
price_Death_s_Head___ = 337 ;_7
|
||||||
price_Napalm_________ = 20 ;496 ;_8
|
price_Napalm_________ = 20 ;496 ;_8
|
||||||
price_Hot_Napalm_____ = $ffff ;511 ;_9
|
price_Hot_Napalm_____ = 40 ;511 ;_9
|
||||||
price_Tracer_________ = 102 ;_10
|
price_Tracer_________ = 102 ;_10
|
||||||
price_Smoke_Tracer___ = 291 ;_11
|
price_Smoke_Tracer___ = 291 ;_11
|
||||||
price_Baby_Roller____ = 211 ;_12
|
price_Baby_Roller____ = 211 ;_12
|
||||||
|
|||||||
BIN
Binary file not shown.
+79
-7
@@ -283,10 +283,18 @@ NoLowerCircle
|
|||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc napalm
|
.proc napalm
|
||||||
|
inc FallDown2
|
||||||
|
mva #(10+4) ExplosionRadius ; real radius + 4 pixels (half characrer width)
|
||||||
|
jsr CalculateExplosionRange
|
||||||
|
mva #0 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
|
||||||
jmp xnapalm
|
jmp xnapalm
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
.proc hotnapalm
|
.proc hotnapalm
|
||||||
|
inc FallDown2
|
||||||
|
mva #(10+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
|
||||||
; ------------------------
|
; ------------------------
|
||||||
@@ -296,7 +304,7 @@ NoLowerCircle
|
|||||||
sty magic
|
sty magic
|
||||||
RepeatNapalm ; external loop (for fire animation)
|
RepeatNapalm ; external loop (for fire animation)
|
||||||
mwa xcircle xdraw
|
mwa xcircle xdraw
|
||||||
sbw xdraw #(1*8) ; 8 characters on left side hit point
|
sbw xdraw #(1*10) ; 10 characters on left side hit point
|
||||||
ldy #0
|
ldy #0
|
||||||
sty magic+1
|
sty magic+1
|
||||||
RepeatFlame ; internal loop (draw flames)
|
RepeatFlame ; internal loop (draw flames)
|
||||||
@@ -304,8 +312,19 @@ RepeatFlame ; internal loop (draw flames)
|
|||||||
adw xdraw #mountaintable temp
|
adw xdraw #mountaintable temp
|
||||||
sty ydraw+1
|
sty ydraw+1
|
||||||
lda (temp),y
|
lda (temp),y
|
||||||
|
sec
|
||||||
|
sbc #1 ; over ground
|
||||||
sta ydraw
|
sta ydraw
|
||||||
sbw xdraw #4
|
lda xdraw
|
||||||
|
and ExplosionRadius ; if hotnapalm and x is odd:
|
||||||
|
:2 asl ; modify y position 4 pixels up
|
||||||
|
ldy ydraw
|
||||||
|
sta ydraw
|
||||||
|
tya
|
||||||
|
sec
|
||||||
|
sbc ydraw
|
||||||
|
sta ydraw
|
||||||
|
sbw xdraw #4 ; half character correction
|
||||||
; draw flame symbol
|
; draw flame symbol
|
||||||
lda magic ; if last repeat - clear flames
|
lda magic ; if last repeat - clear flames
|
||||||
beq LastNapalmRepeat
|
beq LastNapalmRepeat
|
||||||
@@ -318,16 +337,69 @@ LastNapalmRepeat
|
|||||||
lda #$4e ; clear flame symbol
|
lda #$4e ; clear flame symbol
|
||||||
PutFlameChar
|
PutFlameChar
|
||||||
sta CharCode
|
sta CharCode
|
||||||
|
; check coordinates
|
||||||
|
cpw xdraw #(screenwidth-7)
|
||||||
|
bcs CharOffTheScreen
|
||||||
|
lda ydraw
|
||||||
|
cmp #7
|
||||||
|
bcc CharOffTheScreen
|
||||||
|
cmp #(screenHeight-1)
|
||||||
|
bcs CharOffTheScreen
|
||||||
jsr TypeChar
|
jsr TypeChar
|
||||||
adw xdraw #4
|
CharOffTheScreen
|
||||||
adw xdraw #1 ; next char 1 pixels to right
|
adw xdraw #4 ; reverse half character correction (we need positon of character center)
|
||||||
|
adw xdraw #1 ; next char 1 pixels to right
|
||||||
inc magic+1
|
inc magic+1
|
||||||
lda magic+1
|
lda magic+1
|
||||||
cmp #17 ; 8 chars on left, 8 chars on right and 1 in center
|
cmp #21 ; 10 chars on left, 10 chars on right and 1 in center
|
||||||
bne RepeatFlame
|
jne RepeatFlame
|
||||||
dec magic
|
dec magic
|
||||||
bpl RepeatNapalm
|
jpl RepeatNapalm
|
||||||
|
inc FallDown2
|
||||||
|
;now we must check tanks in range
|
||||||
|
ldx NumberOfPlayers
|
||||||
|
BurnedCheckLoop
|
||||||
|
dex
|
||||||
|
lda eXistenZ,x
|
||||||
|
beq EndNurnedCheckLoop
|
||||||
|
;here the tank exist
|
||||||
|
mwa xcircle xdraw
|
||||||
|
; calculate right edge of the fire
|
||||||
|
adw xdraw #(1*10-8) ; 10 characters on left side hit point (right edge of the fire - character width)
|
||||||
|
; now we compare tank position with right edge of the fire (napalm)
|
||||||
|
lda XtankstableH,x
|
||||||
|
cmp xdraw+1
|
||||||
|
bne @+
|
||||||
|
lda XtankstableL,x
|
||||||
|
cmp xdraw
|
||||||
|
@
|
||||||
|
bcs TankOutOfFire
|
||||||
|
; let's calculate left edge of the fire
|
||||||
|
sbw xdraw #(21-8) ; 10 chars on left, 10 chars on right and 1 in center (- character width)
|
||||||
|
bpl @+
|
||||||
|
mwa #0 xdraw ; left screen edge
|
||||||
|
@
|
||||||
|
; now we compare tank position with left edge of the fire (napalm)
|
||||||
|
lda XtankstableH,x
|
||||||
|
cmp xdraw+1
|
||||||
|
bne @+
|
||||||
|
lda XtankstableL,x
|
||||||
|
cmp xdraw
|
||||||
|
@
|
||||||
|
bcc TankOutOfFire
|
||||||
|
|
||||||
|
ldy #40 ; energy decrease (napalm) - but if hotnapalm:
|
||||||
|
lda ExplosionRadius
|
||||||
|
beq NotHot
|
||||||
|
ldy #80 ; energy decrease (hotnapalm)
|
||||||
|
NotHot
|
||||||
|
; check shields ( joke :) )
|
||||||
|
jsr DecreaseEnergyX
|
||||||
|
TankOutOfFire
|
||||||
|
EndNurnedCheckLoop
|
||||||
|
txa
|
||||||
|
bne BurnedCheckLoop
|
||||||
|
mva #sfx_silencer sfx_effect
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
; ------------------------
|
; ------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user