diff --git a/scorch.asm b/scorch.asm index 4b130bc..c4d5d62 100644 --- a/scorch.asm +++ b/scorch.asm @@ -26,7 +26,7 @@ ;--------------------------------------------------- icl 'definitions.asm' ;--------------------------------------------------- -FirstZpageVariable = $60 +FirstZpageVariable = $61 .zpvar DliColorBack .byte = FirstZpageVariable .zpvar JoystickNumber .byte .zpvar xdraw .word ;= $64 ;variable X for plot @@ -87,7 +87,7 @@ FirstZpageVariable = $60 .zpvar decimal .word .zpvar NumberOfPlayers .byte ;current number of players (counted from 1) .zpvar Counter .byte ;temporary Counter for outside loops - .zpvar ExplosionRadius .word ;because when adding in xdraw it is double byte + .zpvar ExplosionRadius .byte .zpvar ResultY .byte .zpvar xcircle .word .zpvar ycircle .word diff --git a/scorch.bin b/scorch.bin index a20c88a..1905a07 100644 Binary files a/scorch.bin and b/scorch.bin differ diff --git a/scorch.xex b/scorch.xex index e883f35..9c3d7ea 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/weapons.asm b/weapons.asm index 6e6d6f8..016ff96 100644 --- a/weapons.asm +++ b/weapons.asm @@ -3008,14 +3008,34 @@ CalculateExplosionRange0 ;calculates total horizontal range of explosion by ;"summing up" ranges of all separate explosions - adw xdraw ExplosionRadius WeaponRangeRight - cpw WeaponRangeRight #screenwidth-1 - bcc NotOutOfTheScreenRight + ; WeaponRangeRight = xdraw + ExplosionRadius + clc + lda xdraw + adc ExplosionRadius + sta WeaponRangeRight + lda xdraw+1 + adc #$00 + sta WeaponRangeRight+1 + ; adw xdraw ExplosionRadius WeaponRangeRight ; Pozor! ExplosionRadius is one byte now + ; cpw WeaponRangeRight #screenwidth-1 + cmp #>(screenwidth-1) + bne @+ + lda WeaponRangeRight + cmp #<(screenwidth-1) +@ bcc NotOutOfTheScreenRight mwa #screenwidth-1 WeaponRangeRight NotOutOfTheScreenRight - sbw xdraw ExplosionRadius WeaponRangeLeft - lda WeaponRangeLeft+1 + ; WeaponRangeLeft = xdraw - ExplosionRadius + sec + lda xdraw + sbc ExplosionRadius + sta WeaponRangeLeft + lda xdraw+1 + sbc #$00 + sta WeaponRangeLeft+1 + ; sbw xdraw ExplosionRadius WeaponRangeLeft ; Pozor! ExplosionRadius is one byte now + ; lda WeaponRangeLeft+1 bpl NotOutOfTheScreenLeft lda #0 sta WeaponRangeLeft