mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
No X-tank position correction (PM graphics).
This commit is contained in:
+11
-1
@@ -554,7 +554,12 @@ NotHigherByte02
|
|||||||
; and clear lowest bit to be sure that the X coordinate is even
|
; and clear lowest bit to be sure that the X coordinate is even
|
||||||
; (this is to have P/M background look nice)
|
; (this is to have P/M background look nice)
|
||||||
; "AND" does not change "Carry" bit.
|
; "AND" does not change "Carry" bit.
|
||||||
|
; x correction for P/M
|
||||||
|
; --
|
||||||
|
.IF XCORRECTION_FOR_PM = 1
|
||||||
and #$fe
|
and #$fe
|
||||||
|
.ENDIF
|
||||||
|
; --
|
||||||
sta xtankstableL,x
|
sta xtankstableL,x
|
||||||
bcs NotHigherByte01
|
bcs NotHigherByte01
|
||||||
dec xtankstableH,x
|
dec xtankstableH,x
|
||||||
@@ -1207,7 +1212,10 @@ DoNotDrawParachute
|
|||||||
; If it is odd then it must be corrected because otherwise
|
; If it is odd then it must be corrected because otherwise
|
||||||
; P/M graphics background would not look OK
|
; P/M graphics background would not look OK
|
||||||
; ldx TankNr
|
; ldx TankNr
|
||||||
lda XtanksTableL,x
|
; x correction for P/M
|
||||||
|
; --
|
||||||
|
.IF XCORRECTION_FOR_PM = 1
|
||||||
|
lda XtanksTableL,x
|
||||||
and #$01
|
and #$01
|
||||||
beq EndOfFall ; if it is even then it is the end
|
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
|
; and if not, we push it one pixel the way it was falling before
|
||||||
@@ -1221,6 +1229,8 @@ ForceFallLeft
|
|||||||
sta UnderTank1
|
sta UnderTank1
|
||||||
sty UnderTank2
|
sty UnderTank2
|
||||||
jmp TankFallsX
|
jmp TankFallsX
|
||||||
|
.ENDIF
|
||||||
|
; --
|
||||||
EndOfFall
|
EndOfFall
|
||||||
mva #1 Erase
|
mva #1 Erase
|
||||||
; ldx TankNr
|
; ldx TankNr
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
.def TARGET = 800 ;5200 ; or 800
|
.def TARGET = 800 ;5200 ; or 800
|
||||||
;atari800 -5200 -cart ${outputFilePath} -cart-type 4
|
;atari800 -5200 -cart ${outputFilePath} -cart-type 4
|
||||||
;atari800 -run ${outputFilePath}
|
;atari800 -run ${outputFilePath}
|
||||||
|
;---------------------------------------------------
|
||||||
|
.def XCORRECTION_FOR_PM = 0
|
||||||
|
; if 1 - active x position of tanks correction fo PMG
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
|
|
||||||
;OPT r+ ; saves 12 bytes :O
|
;OPT r+ ; saves 12 bytes :O
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+6
-1
@@ -1944,7 +1944,12 @@ RandomizeTankPos
|
|||||||
randomize 0 180
|
randomize 0 180
|
||||||
sta AngleTable,x
|
sta AngleTable,x
|
||||||
randomize 0 (49-8)
|
randomize 0 (49-8)
|
||||||
and #%11111110 ; correction for PMG
|
; x correction for P/M
|
||||||
|
; --
|
||||||
|
.IF XCORRECTION_FOR_PM = 1
|
||||||
|
and #%11111110
|
||||||
|
.ENDIF
|
||||||
|
; --
|
||||||
clc
|
clc
|
||||||
adc XtankOffsetGO_L,x
|
adc XtankOffsetGO_L,x
|
||||||
sta XtankstableL,x
|
sta XtankstableL,x
|
||||||
|
|||||||
+8
-4
@@ -2653,8 +2653,7 @@ KeyboardAndJoyCheck
|
|||||||
mva #sfx_tank_move sfx_effect
|
mva #sfx_tank_move sfx_effect
|
||||||
lda ShieldEnergy,x
|
lda ShieldEnergy,x
|
||||||
cmp #20
|
cmp #20
|
||||||
bne notpressed
|
bne LotOfFuel
|
||||||
nop
|
|
||||||
|
|
||||||
; display text 4x4 - low fuel
|
; display text 4x4 - low fuel
|
||||||
mwa #hoverEmpty LineAddress4x4
|
mwa #hoverEmpty LineAddress4x4
|
||||||
@@ -2665,9 +2664,9 @@ KeyboardAndJoyCheck
|
|||||||
sbc #12
|
sbc #12
|
||||||
sta LineYdraw
|
sta LineYdraw
|
||||||
jsr TypeLine4x4.variableLength
|
jsr TypeLine4x4.variableLength
|
||||||
|
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
|
|
||||||
|
LotOfFuel
|
||||||
notpressed
|
notpressed
|
||||||
; let's animate "engine"
|
; let's animate "engine"
|
||||||
jsr DrawTankEngine
|
jsr DrawTankEngine
|
||||||
@@ -2819,7 +2818,7 @@ CheckCollisionWithTankLoop
|
|||||||
; it is tricky but fast and much shorter
|
; it is tricky but fast and much shorter
|
||||||
lda xtankstableL,x
|
lda xtankstableL,x
|
||||||
sec
|
sec
|
||||||
sbc #9 ; 2 pixels more on left side + tan width
|
sbc #9 ; 2 pixels more on left side + tank width
|
||||||
tay
|
tay
|
||||||
lda xtankstableH,x
|
lda xtankstableH,x
|
||||||
sbc #0
|
sbc #0
|
||||||
@@ -2875,9 +2874,14 @@ ItIsMe
|
|||||||
mva #1 Erase
|
mva #1 Erase
|
||||||
jsr DrawTankNr
|
jsr DrawTankNr
|
||||||
mva #0 Erase
|
mva #0 Erase
|
||||||
|
; x correction for P/M
|
||||||
|
; --
|
||||||
|
.IF XCORRECTION_FOR_PM = 1
|
||||||
lda XtankstableL,x
|
lda XtankstableL,x
|
||||||
and #%11111110 ; correction for PM
|
and #%11111110 ; correction for PM
|
||||||
sta XtankstableL,x
|
sta XtankstableL,x
|
||||||
|
.ENDIF
|
||||||
|
; --
|
||||||
GoDown
|
GoDown
|
||||||
|
|
||||||
mwa #mountaintable temp
|
mwa #mountaintable temp
|
||||||
|
|||||||
Reference in New Issue
Block a user