From 8e60cfa723ffe5f04e146fd39dc3a78371b15538 Mon Sep 17 00:00:00 2001 From: Pecusx Date: Wed, 6 Jul 2022 20:43:24 +0200 Subject: [PATCH] Better Napalms range calculation --- scorch.xex | Bin 40887 -> 40887 bytes weapons.asm | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scorch.xex b/scorch.xex index 51c474e755e39a41b75cbd132e72bec97845b74b..b0bd7c41fa0b08763429133b06af95ac936bbf67 100644 GIT binary patch delta 22 ecmdnKpK1GkrVRy-j6#zO9c37WHupJd#sL6kOb6ls delta 22 ecmdnKpK1GkrVRy-j7*aY9c37~H}^Se#sL6jVh76r diff --git a/weapons.asm b/weapons.asm index 0f0905c..055ecc5 100644 --- a/weapons.asm +++ b/weapons.asm @@ -304,7 +304,7 @@ NoLowerCircle sty magic RepeatNapalm ; external loop (for fire animation) mwa xcircle xdraw - sbw xdraw #(napalmRadius) ; 10 characters on left side hit point + sbw xdraw #(napalmRadius) ; 10 pixels on left side hit point ldy #0 sty magic+1 RepeatFlame ; internal loop (draw flames) @@ -351,7 +351,7 @@ CharOffTheScreen adw xdraw #1 ; next char 1 pixels to right inc magic+1 lda magic+1 - cmp #(2*napalmRadius+1) ; 10 chars on left, 10 chars on right and 1 in center + cmp #(2*napalmRadius+1) ; 10 pixels on left, 10 pixels on right and 1 in center jne RepeatFlame dec magic jpl RepeatNapalm @@ -365,7 +365,7 @@ BurnedCheckLoop beq EndNurnedCheckLoop ;here the tank exist ; calculate right edge of the fire - adw xcircle #(napalmRadius-8) xdraw ; 10 characters on right side hit point (right edge of the fire - character width) + adw xcircle #(napalmRadius+4+4) xdraw ; 10 pixels on right side hit point + half character width + correction ; now we compare tank position with right edge of the fire (napalm) lda XtankstableH,x cmp xdraw+1 @@ -375,7 +375,7 @@ BurnedCheckLoop @ bcs TankOutOfFire ; let's calculate left edge of the fire - sbw xcircle #(napalmRadius+1) xdraw ; 10 chars on left and 1 in center + sbw xcircle #(napalmRadius+8+4-4) xdraw ; 10 pixels on left + character width (tank) + half character - correction bpl @+ mwa #0 xdraw ; left screen edge @