diff --git a/grafproc.asm b/grafproc.asm index 6fbd46e..35ca3db 100644 --- a/grafproc.asm +++ b/grafproc.asm @@ -554,7 +554,12 @@ NotHigherByte02 ; and clear lowest bit to be sure that the X coordinate is even ; (this is to have P/M background look nice) ; "AND" does not change "Carry" bit. + ; x correction for P/M + ; -- + .IF XCORRECTION_FOR_PM = 1 and #$fe + .ENDIF + ; -- sta xtankstableL,x bcs NotHigherByte01 dec xtankstableH,x @@ -1207,7 +1212,10 @@ DoNotDrawParachute ; If it is odd then it must be corrected because otherwise ; P/M graphics background would not look OK ; ldx TankNr - lda XtanksTableL,x + ; x correction for P/M + ; -- + .IF XCORRECTION_FOR_PM = 1 + lda XtanksTableL,x and #$01 beq EndOfFall ; if it is even then it is the end ; and if not, we push it one pixel the way it was falling before @@ -1221,6 +1229,8 @@ ForceFallLeft sta UnderTank1 sty UnderTank2 jmp TankFallsX + .ENDIF + ; -- EndOfFall mva #1 Erase ; ldx TankNr diff --git a/scorch.asm b/scorch.asm index 47a5a9f..13922cc 100644 --- a/scorch.asm +++ b/scorch.asm @@ -9,6 +9,9 @@ .def TARGET = 800 ;5200 ; or 800 ;atari800 -5200 -cart ${outputFilePath} -cart-type 4 ;atari800 -run ${outputFilePath} +;--------------------------------------------------- +.def XCORRECTION_FOR_PM = 0 +; if 1 - active x position of tanks correction fo PMG ;--------------------------------------------------- ;OPT r+ ; saves 12 bytes :O diff --git a/scorch.bin b/scorch.bin index b4696ae..f9855b9 100644 Binary files a/scorch.bin and b/scorch.bin differ diff --git a/scorch.xex b/scorch.xex index 3a35c5e..d6fffc7 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/textproc.asm b/textproc.asm index 6ee2faa..d103f4f 100644 --- a/textproc.asm +++ b/textproc.asm @@ -1944,7 +1944,12 @@ RandomizeTankPos randomize 0 180 sta AngleTable,x randomize 0 (49-8) - and #%11111110 ; correction for PMG + ; x correction for P/M + ; -- + .IF XCORRECTION_FOR_PM = 1 + and #%11111110 + .ENDIF + ; -- clc adc XtankOffsetGO_L,x sta XtankstableL,x diff --git a/weapons.asm b/weapons.asm index bf81331..a90f1b0 100644 --- a/weapons.asm +++ b/weapons.asm @@ -2653,8 +2653,7 @@ KeyboardAndJoyCheck mva #sfx_tank_move sfx_effect lda ShieldEnergy,x cmp #20 - bne notpressed - nop + bne LotOfFuel ; display text 4x4 - low fuel mwa #hoverEmpty LineAddress4x4 @@ -2665,9 +2664,9 @@ KeyboardAndJoyCheck sbc #12 sta LineYdraw jsr TypeLine4x4.variableLength - ldx TankNr +LotOfFuel notpressed ; let's animate "engine" jsr DrawTankEngine @@ -2819,7 +2818,7 @@ CheckCollisionWithTankLoop ; it is tricky but fast and much shorter lda xtankstableL,x sec - sbc #9 ; 2 pixels more on left side + tan width + sbc #9 ; 2 pixels more on left side + tank width tay lda xtankstableH,x sbc #0 @@ -2875,9 +2874,14 @@ ItIsMe mva #1 Erase jsr DrawTankNr mva #0 Erase + ; x correction for P/M + ; -- + .IF XCORRECTION_FOR_PM = 1 lda XtankstableL,x and #%11111110 ; correction for PM sta XtankstableL,x + .ENDIF + ; -- GoDown mwa #mountaintable temp