Magic of the "." key :)

This commit is contained in:
Pecusx
2022-12-16 12:39:52 +01:00
parent 54a4dcf7d8
commit 328a147225
4 changed files with 37 additions and 20 deletions
+1 -1
View File
@@ -617,7 +617,7 @@ RepeatAim
lda #ind_Baby_Missile___ lda #ind_Baby_Missile___
sta ActiveWeapon,x sta ActiveWeapon,x
; now we have initial valuses ; now we have initial valuses
mva #$ff TestFlightFlag mva #%11000000 TestFlightFlag
; check targeting direction ; check targeting direction
lda tempor2 lda tempor2
jne AimingLeft jne AimingLeft
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+36 -19
View File
@@ -1124,8 +1124,10 @@ ContinueToCheckMaxForce2
jsr WaitOneFrame ; best after drawing a tank jsr WaitOneFrame ; best after drawing a tank
bit TestFlightFlag
bpl @+
jsr Shoot.AfterOffensiveText
@
;keyboard reading ;keyboard reading
; KBCODE keeps code of last keybi ; KBCODE keeps code of last keybi
; SKSTAT $ff - nothing pressed ; SKSTAT $ff - nothing pressed
@@ -1204,6 +1206,7 @@ NoSpyHard
jsr WaitForKeyRelease jsr WaitForKeyRelease
jmp BeforeFire jmp BeforeFire
@ @
ldx TankNr ; for optimize
cmp #$80|@kbcode._up cmp #$80|@kbcode._up
jeq CTRLPressedUp jeq CTRLPressedUp
cmp #$80|@kbcode._down cmp #$80|@kbcode._down
@@ -1229,6 +1232,10 @@ jumpFromStick
jeq pressedM jeq pressedM
cmp #@kbcode._S ; $3e ; S cmp #@kbcode._S ; $3e ; S
jeq pressedS jeq pressedS
.IF TARGET = 800
cmp #34 ; dot key :)
jeq pressedDot
.ENDIF
jmp notpressed jmp notpressed
checkJoy checkJoy
;------------JOY------------- ;------------JOY-------------
@@ -1258,7 +1265,7 @@ pressedUp
;force increaseeee! ;force increaseeee!
ldx TankNr ;ldx TankNr ; optimized
inc ForceTableL,x inc ForceTableL,x
bne CheckingMaxForce bne CheckingMaxForce
inc ForceTableH,x inc ForceTableH,x
@@ -1282,7 +1289,7 @@ FurtherCheckMaxForce
jmp BeforeFire jmp BeforeFire
CTRLPressedUp CTRLPressedUp
ldx TankNr ;ldx TankNr ; optimized
lda ForceTableL,x lda ForceTableL,x
clc clc
adc #10 adc #10
@@ -1300,7 +1307,7 @@ pressedDown
mva #sfx_set_power_1 sfx_effect mva #sfx_set_power_1 sfx_effect
ldx TankNr ;ldx TankNr ; optimized
dec ForceTableL,x dec ForceTableL,x
lda ForceTableL,x lda ForceTableL,x
cmp #$ff cmp #$ff
@@ -1317,7 +1324,7 @@ ForceGoesZero
CTRLPressedDown CTRLPressedDown
mva #sfx_set_power_1 sfx_effect mva #sfx_set_power_1 sfx_effect
ldx TankNr ;ldx TankNr ; optimized
sec sec
lda ForceTableL,x lda ForceTableL,x
sbc #10 sbc #10
@@ -1328,7 +1335,7 @@ CTRLPressedDown
jmp BeforeFire jmp BeforeFire
pressedRight pressedRight
ldx TankNr ;ldx TankNr ; optimized
lda pressTimer lda pressTimer
spl:mva #0 pressTimer ; if >128 then reset to 0 spl:mva #0 pressTimer ; if >128 then reset to 0
cmp #25 ; 1/2s cmp #25 ; 1/2s
@@ -1345,7 +1352,7 @@ pressedRight
jmp BeforeFire jmp BeforeFire
CTRLPressedRight CTRLPressedRight
ldx TankNr ;ldx TankNr ; optimized
mva #sfx_set_power_2 sfx_effect mva #sfx_set_power_2 sfx_effect
mva #1 Erase mva #1 Erase
jsr DrawTankNr.BarrelChange jsr DrawTankNr.BarrelChange
@@ -1361,7 +1368,7 @@ CTRLPressedRight
pressedLeft pressedLeft
ldx TankNr ;ldx TankNr ; optimized
lda pressTimer lda pressTimer
spl:mva #0 pressTimer ; if >128 then reset to 0 spl:mva #0 pressTimer ; if >128 then reset to 0
cmp #25 ; 1/2s cmp #25 ; 1/2s
@@ -1379,7 +1386,7 @@ pressedLeft
jmp BeforeFire jmp BeforeFire
CTRLPressedLeft CTRLPressedLeft
ldx TankNr ;ldx TankNr ; optimized
mva #sfx_set_power_2 sfx_effect mva #sfx_set_power_2 sfx_effect
mva #1 Erase mva #1 Erase
jsr DrawTankNr.BarrelChange jsr DrawTankNr.BarrelChange
@@ -1395,7 +1402,7 @@ CTRLPressedLeft
pressedTAB pressedTAB
mva #sfx_purchase sfx_effect mva #sfx_purchase sfx_effect
ldx TankNr ;ldx TankNr ; optimized
lda ActiveWeapon,x lda ActiveWeapon,x
cmp #last_offensive_____ ; the last possible offensive weapon cmp #last_offensive_____ ; the last possible offensive weapon
bne ?notlasttofirst bne ?notlasttofirst
@@ -1413,7 +1420,7 @@ pressedTAB
CTRLpressedTAB CTRLpressedTAB
mva #sfx_purchase sfx_effect mva #sfx_purchase sfx_effect
ldx TankNr ;ldx TankNr ; optimized
lda ActiveWeapon,x lda ActiveWeapon,x
cmp #first_offensive____ ; #0 cmp #first_offensive____ ; #0
bne ?notfirsttolast bne ?notfirsttolast
@@ -1444,6 +1451,12 @@ pressedS
jsr WaitForKeyRelease jsr WaitForKeyRelease
jmp BeforeFire jmp BeforeFire
pressedDot
lda TestFlightFlag
eor #%10000000
sta TestFlightFlag
jsr WaitForKeyRelease
jmp BeforeFire
pressedSpace pressedSpace
;================================= ;=================================
@@ -1469,6 +1482,8 @@ fire
;with much more separate blocks, but you know - ;with much more separate blocks, but you know -
;- do not touch it if it works... ;- do not touch it if it works...
mva #0 TestFlightFlag
;the latest addition to this routine is ;the latest addition to this routine is
;displaying offensive texts! ;displaying offensive texts!
@@ -1481,7 +1496,8 @@ RandomizeOffensiveText
ldy TankNr ldy TankNr
mva #$ff plot4x4color mva #$ff plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
AfterOffensiveText
mva #0 LaserFlag ; $ff - Laser mva #0 LaserFlag ; $ff - Laser
ldx TankNr ldx TankNr
lda ActiveWeapon,x lda ActiveWeapon,x
@@ -1499,6 +1515,8 @@ NotStrongShoot
sta Force sta Force
lda ForceTableH,x lda ForceTableH,x
sta Force+1 sta Force+1
bit TestFlightFlag
bmi AfterStrongShoot
mva #sfx_shoot sfx_effect mva #sfx_shoot sfx_effect
AfterStrongShoot AfterStrongShoot
lda AngleTable,x lda AngleTable,x
@@ -1517,7 +1535,6 @@ AfterStrongShoot
sta ytraj+2 sta ytraj+2
sta xtraj sta xtraj
sta ytraj sta ytraj
sta TestFlightFlag
; checking if the shot is underground (no Flight but Hit :) ) ; checking if the shot is underground (no Flight but Hit :) )
tay ; A=0 ! tay ; A=0 !
@@ -1538,7 +1555,9 @@ ShotUnderGround
;-------------------------------------------------- ;--------------------------------------------------
.proc Flight ; Force(byte.byte), Wind(0.word) .proc Flight ; Force(byte.byte), Wind(0.word)
; Angle(byte) 128=0, 255=maxright, 0=maxleft ; Angle(byte) 128=0, 255=maxright, 0=maxleft
; if TestFlightFlag is set ($ff) ne real flight - hit test only (for AI) ; if 7bit and 6bit of TestFlightFlag is set no real flight - hit test only (for AI)
; 7bit - fast, test flight
; 6bit - invisible bullet
;-------------------------------------------------- ;--------------------------------------------------
;g=-0.1 ;g=-0.1
;vx=Force*cos(Angle) ;vx=Force*cos(Angle)
@@ -1553,8 +1572,6 @@ ShotUnderGround
;goto begin- ;goto begin-
; smoke tracer :) ; smoke tracer :)
ldy #0 ldy #0
ldx TankNr ldx TankNr
@@ -1820,7 +1837,7 @@ SkipCollisionCheck
mwa ytraj+1 ydraw mwa ytraj+1 ydraw
bit TestFlightFlag bit TestFlightFlag
bmi NoUnPlot bvs NoUnPlot
lda tracerflag lda tracerflag
bne NoUnPlot bne NoUnPlot
@@ -1834,7 +1851,7 @@ Hit
mwa XHit xdraw mwa XHit xdraw
mwa YHit ydraw mwa YHit ydraw
bit TestFlightFlag bit TestFlightFlag
bmi EndOfFlight bvs EndOfFlight
jsr unPlot jsr unPlot
EndOfFlight EndOfFlight
mwa xdraw xcircle ; we must store for a little while mwa xdraw xcircle ; we must store for a little while