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
|
||||
; (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
|
||||
|
||||
@@ -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
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+6
-1
@@ -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
|
||||
|
||||
+8
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user