diff --git a/Atari/gr_basics.asm b/Atari/gr_basics.asm index c2bd0ef..82d0bc2 100644 --- a/Atari/gr_basics.asm +++ b/Atari/gr_basics.asm @@ -161,6 +161,36 @@ ClearPlot rts .endp +; ----------------------------------------- +.proc ExPlot ;ExPlot (EplotX, EplotY) +; EOR plot: +; Inverts color of a pixel +; Note: No coordinate control!!! +; With off-screen coordinates, it can damage main program. +; ----------------------------------------- + ; let's calculate coordinates from xdraw and ydraw + ;xbyte = xbyte/8 + lda EplotX+1 + lsr + lda EplotX + ror ;just one bit over 256. Max screenwidth = 512!!! + lsr + lsr + sta EplotByte + ;--- + ldx EplotY + ldy linetableL,x + lda linetableH,x + sta EplotByte+1 + + ldx EplotX ; optimization (256 bytes long bittable) + + lda (EplotByte),y + eor bittable1_long,x + sta (EplotByte),y + rts +.endp + ; ----------------------------------------- .proc point_plot ; ----------------------------------------- diff --git a/Atari/interrupts.asm b/Atari/interrupts.asm index f774bc3..3f6d350 100644 --- a/Atari/interrupts.asm +++ b/Atari/interrupts.asm @@ -142,6 +142,54 @@ lab2 jsr RASTERMUSICTRACKER+3 ;1 play ; ------- RMT ------- SkipRMTVBL + ; ------ meteors ------ start + bit Mcounter + bpl MeteorOnSky + bit MeteorsFlag + bmi SkipMeteors + ; randomize meteor + lda random + and #%11111111 + bne SkipMeteors + lda random + sta Mpoint1X + sta Mpoint2X + lda #0 + sta Mpoint1X+1 + sta Mpoint2X+1 + lda random + and #$1f + sta Mpoint1Y + sta Mpoint2Y + mva #10 Mcounter +MeteorOnSky + lda Mpoint1Y + cmp #64 + beq NoFirstPlot + sta EplotY + inc Mpoint1Y + mwa Mpoint1X EplotX + inw Mpoint1X + jsr Explot +NoFirstPlot + lda Mcounter + beq @+ + dec Mcounter + bpl SkipSecondPlot +@ lda Mpoint2Y + cmp #64 + bne GoSecondPlot + mva #$ff Mcounter + bmi SkipMeteors +GoSecondPlot + sta EplotY + inc Mpoint2Y + mwa Mpoint2X EplotX + inw Mpoint2X + jsr Explot +SkipSecondPlot +SkipMeteors + ; ------ meteors ------ end bit ScrollFlag bpl EndOfCreditsVBI CreditsVBI diff --git a/artwork/talk.asm b/artwork/talk.asm index 0c07932..0378cab 100644 --- a/artwork/talk.asm +++ b/artwork/talk.asm @@ -45,7 +45,7 @@ dta d"HASTA LA VISTA, BABY!"^ dta d"THIS IS YOUR BRAIN ON SCORCH."^ dta d"TAKE THIS!"^ - dta d"THIS SCREEN AIN'T BIG ENOUGH FOR THE BOTH OF US."^ + dta d"THIS SCREEN AIN'T BIG ENOUGH FOR US."^ dta d"DIE, ALIEN SWINE!"^ dta d"AWRUK!!!"^ dta d"I SHALL OIL MY TURRET WITH YOUR BLOOD."^ @@ -78,12 +78,12 @@ dta d"OH MAN!"^ dta d"DOOUGH!"^ dta d"NEW DAY, NEW BOMB."^ - dta d"THIS IS THE END, MY ONLY FRIEND."^ + dta d"THIS IS END."^ dta d"VERY FUNNY."^ dta d"THE FAT LADY SANG."^ - dta d"WHY DOES EVERYTHING HAPPEN TO ME?"^ + dta d"WHY DOES HAPPEN TO ME?"^ dta d"I'M GOING DOWN."^ - dta d"I'VE GOT A BAD FEELING ABOUT THIS."^ + dta d"I'VE GOT A BAD FEELING."^ dta d"CRAPOLA."^ dta d"POW!"^ dta d"BIF!"^ diff --git a/game.asm b/game.asm index 617d621..eeaf0b8 100644 --- a/game.asm +++ b/game.asm @@ -42,6 +42,7 @@ MainGameLoop jsr RoundInit jsr MainRoundLoop + mva #$ff MeteorsFlag bit escFlag jvs GoGameOver bmi START @@ -360,6 +361,8 @@ CheckNextTankAD jsr PutTankNameOnScreen ; jsr DisplayStatus ; There is no need anymore, it is always after PutTankNameOnScreen + mva #0 MeteorsFlag + lda SkillTable,x beq ManualShooting @@ -392,6 +395,7 @@ ManualShooting spl:rts ; keys Esc or O AfterManualShooting + mva #$ff MeteorsFlag mva #$00 plot4x4color jsr DisplayTankNameAbove ; defensive weapons without flight handling diff --git a/scorch.asm b/scorch.asm index f0ee556..d7fed75 100644 --- a/scorch.asm +++ b/scorch.asm @@ -26,7 +26,7 @@ ;--------------------------------------------------- .macro build - dta d"1.37" ; number of this build (4 bytes) + dta d"1.38" ; number of this build (4 bytes) .endm .macro RMTSong @@ -37,6 +37,17 @@ ;--------------------------------------------------- icl 'definitions.asm' ;--------------------------------------------------- +AdditionalZPvariables = $20 + .zpvar EplotX .word = AdditionalZPvariables + .zpvar EplotByte .word + .zpvar EplotY .byte + .zpvar Mpoint1X .word ; meteor first point X position + .zpvar Mpoint1Y .byte ; meteor first point Y position + .zpvar Mpoint2X .word ; meteor last point X position + .zpvar Mpoint2Y .byte ; meteor last point Y position + .zpvar Mcounter .byte ; meteor length counter ( $ff - no meteor on sky ) + .zpvar MeteorsFlag .byte ; $ff - block meteors + FirstZpageVariable = $51 .zpvar DliColorBack .byte = FirstZpageVariable @@ -374,7 +385,9 @@ NoRMT_PALchange lda #$ff ; initial value sta sfx_effect - + sta Mcounter + sta MeteorsFlag + RMTSong 0 .IF TARGET = 5200 diff --git a/scorch.xex b/scorch.xex index 42102da..6347f92 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/scorchC64.asm b/scorchC64.asm index 1fb2bfd..cc14708 100644 --- a/scorchC64.asm +++ b/scorchC64.asm @@ -35,8 +35,9 @@ icl 'definitions.asm' ;--------------------------------------------------- -FirstZpageVariable = $55 ; $57 +FirstZpageVariable = $54 ; $57 .zpvar DliColorBack .byte = FirstZpageVariable + .zpvar MeteorsFlag .byte .zpvar GradientNr .byte .zpvar GradientColors .word .zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn) diff --git a/scorchC64.prg b/scorchC64.prg index 59c975c..dbc1d7d 100644 Binary files a/scorchC64.prg and b/scorchC64.prg differ