diff --git a/C64/gr_basics.asm b/C64/gr_basics.asm index 06a1242..129d9c0 100644 --- a/C64/gr_basics.asm +++ b/C64/gr_basics.asm @@ -304,6 +304,16 @@ NoMountain rts .endp ;-------------------------------------------------- +.proc SoilDownTurbo +;-------------------------------------------------- +; fast SoilDown froc - test + jsr ClearTanks +NoClearTanks +; jsr CalcAndDrawMountains + jmp DrawTanks + ;rts +.endp +;-------------------------------------------------- .proc TypeChar ; puts char on the graphics screen ; in: CharCode diff --git a/definitions.asm b/definitions.asm index c6e589e..eddde64 100644 --- a/definitions.asm +++ b/definitions.asm @@ -25,7 +25,7 @@ TextBackgroundColor = $02 ; REAL constans - use: LDA #TextBackgroundColor TextForegroundColor = $0A space = 0 ; space in screencodes -KeyRepeatSpeed = 10 ; (max 127 !!!) +KeyRepeatSpeed = 8 ; (max 127 !!!) ;character codes for symbols (tank, parachute, etc. ) ; characters from tanks.fnt (graphics screen) diff --git a/grafproc.asm b/grafproc.asm index f9c3059..2c587c9 100644 --- a/grafproc.asm +++ b/grafproc.asm @@ -59,21 +59,25 @@ DrawOnTheScreen sta XI+1 sta YI sta YI+1 - + + sta HowToDraw ; reset flags + sta DrawDirFactor ; reset flags + ; setting the direction controll bits cpw ydraw ybyte bcc LineDown ; here one line up - ; we are setting bit 0 - mva #1 HowToDraw ;here we can because it's first operation ; we are subctracting Yend from Ybegin (reverse order) ; DY=YI-YK sbw ydraw ybyte DY - jmp CheckDirectionX + ; we are setting bit 7 + lda #%10000000 + sta HowToDraw ;here we can because it's first operation + bne CheckDirectionX ; JMP LineDown ; one line down here - ; we are setting bit 0 - mva #0 HowToDraw ;here we can because it's first operation + ; we are clearing bit 7 (it's cleared :) ) +; mva #0 HowToDraw ;here we can because it's first operation ; substract Ybegin from Yend (normal order) ; DY=YK-YI sbw ybyte ydraw DY @@ -81,22 +85,21 @@ CheckDirectionX cpw xdraw xbyte bcc LineRight ; here goes line to the left - ; we set bit 1 - - lda HowToDraw - ora #$02 - sta HowToDraw ; substract Xend from Xbegin (reverse) ; DX=XI-XK sbw xdraw xbyte DX - jmp CheckDirectionFactor + ; we set bit 6 + lda HowToDraw + ora #%01000000 + sta HowToDraw + bne CheckDirectionFactor ; JMP LineRight ; here goes one line to the right - ; we clear bit 0 + ; we clear bit 6 ; we can do nothing because the bit is cleared! ;lda HowToDraw - ;and #$FD + ;and #%10111111 ;sta HowToDraw ; substracting Xbegin from Xend (normal way) @@ -111,17 +114,7 @@ CheckDirectionFactor ; we already have DX in A cpw DX DY - bcc SwapXY - ; 'a' factor is fire, so we copy parameters - ; XK=DX - mwa DX XK - ; and clearing bit 2 - ; and bit 2 clear - ; (is not needed because already cleared) - ;lda HowToDraw - ;and #$FB - ;sta HowToDraw - jmp LineParametersReady + bcs NoSwapXY SwapXY ; not this half of a quarter! - parameters must be swapped ; XK=DY @@ -132,10 +125,18 @@ SwapXY mwa DX DY mwa XK DX - ; and let's set bit 2 - lda HowToDraw - ora #$04 - sta HowToDraw + ; and let's set bit 7 of DrawDirFactor + dec DrawDirFactor +; bmi LineParametersReady ; JMP - but we don't need JMP :) +NoSwapXY + ; 'a' factor is fire, so we copy parameters + ; XK=DX + mwa DX XK + ; and clearing bit 7 of DrawDirFactor + ; and bit 7 clear + ; (is not needed because already cleared) + ;lda #0 + ;sta DrawDirFactor LineParametersReady ; let's check if length is not zero lda DX @@ -191,9 +192,8 @@ drplot ; Our plot that checks how to calculate pixels. ; and YI to temp) - lda HowToDraw - and #$04 - bne SwappedXY + bit DrawDirFactor + bmi SwappedXY mwa XI temp mwa YI temp2 jmp CheckPlotY @@ -201,9 +201,8 @@ SwappedXY mwa XI temp2 mwa YI temp CheckPlotY - lda HowToDraw - and #01 - bne LineGoesUp + bit HowToDraw + bmi LineGoesUp ; here we know that line goes down and we are not changing Y adw temp2 ytempDRAW ydraw ; YI jmp CheckPlotX @@ -211,9 +210,8 @@ LineGoesUp ; line goes up here - we are reversing Y sbw ytempDRAW temp2 ydraw ; YI CheckPlotX - lda HowToDraw - and #02 - bne LineGoesLeft + bit HowToDraw + bvs LineGoesLeft ; here we know that line goes right and we are not changing X adw temp xtempDRAW xdraw ; XI jmp PutPixelinDraw diff --git a/scorch.asm b/scorch.asm index f45e472..e44c725 100644 --- a/scorch.asm +++ b/scorch.asm @@ -38,7 +38,7 @@ icl 'definitions.asm' ;--------------------------------------------------- -FirstZpageVariable = $53 +FirstZpageVariable = $52 .zpvar DliColorBack .byte = FirstZpageVariable .zpvar ClearSky .byte ; $ff - Crear sky during drawmountains, 0 - no clear sky .zpvar PaddleState .byte ; old state 2nd button for 2 buttons joysticks @@ -142,6 +142,7 @@ FirstZpageVariable = $53 .zpvar Multiplier .word .zpvar Multiplier_ .byte ; 3 bytes .zpvar HowToDraw .byte + .zpvar DrawDirFactor .byte .zpvar gravity .byte .zpvar LineLength .word .zpvar tracerflag .byte diff --git a/scorch.bin b/scorch.bin index 07aec41..831e846 100644 Binary files a/scorch.bin and b/scorch.bin differ diff --git a/scorch.xex b/scorch.xex index 3c4d6a0..7a0235c 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/scorchC64.asm b/scorchC64.asm index 8963785..fc777ae 100644 --- a/scorchC64.asm +++ b/scorchC64.asm @@ -24,7 +24,7 @@ ;--------------------------------------------------- .macro build - dta d"1.32" ; number of this build (4 bytes) + dta d"1.33" ; number of this build (4 bytes) .endm .macro RMTSong @@ -35,11 +35,12 @@ icl 'definitions.asm' ;--------------------------------------------------- -FirstZpageVariable = $58 ; $57 +FirstZpageVariable = $56 ; $57 .zpvar DliColorBack .byte = FirstZpageVariable .zpvar GradientNr .byte .zpvar GradientColors .word .zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn) + .zpvar RandomMountains .byte ; mountains type change after each turn flag - (0 - round only, >0 - each turn) .zpvar JoystickNumber .byte .zpvar LazyFlag .byte ; 7 bit - run Lazy Darwin, 6 bit - run Lazy Boy or Darwin (!) after inventory, 0 - nothing .zpvar SpyHardFlag .byte ; >$7f - run SpyHard after inventory @@ -135,6 +136,7 @@ FirstZpageVariable = $58 ; $57 .zpvar Multiplier .word .zpvar Multiplier_ .byte ; 3 bytes .zpvar HowToDraw .byte + .zpvar DrawDirFactor .byte .zpvar gravity .byte .zpvar LineLength .word .zpvar tracerflag .byte @@ -334,7 +336,8 @@ MakeDarkScreen .endp ;-------------------------------------------------- .proc ShellDelay - ldx flyDelay + ldy flyDelay +Y DelayLoop lda $d012 @ cmp $d012 @@ -342,7 +345,7 @@ DelayLoop lda $d012 @ cmp $d012 beq @- - dex + dey bne DelayLoop noShellDelay rts diff --git a/scorchC64.prg b/scorchC64.prg index 54ad6cf..395eabf 100644 Binary files a/scorchC64.prg and b/scorchC64.prg differ