mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
Opty!
VU Meters and Meteors work together
This commit is contained in:
+4
-5
@@ -155,17 +155,16 @@ KeyAutoReleased ; autorepeat
|
|||||||
mva #0 FirstKeypressDelay
|
mva #0 FirstKeypressDelay
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
/* ;--------------------------------------------------
|
||||||
.proc IsKeyPressed
|
.proc IsKeyPressed
|
||||||
; result: A=0 - yes , A>0 - no
|
; result: A=0 - yes , A>0 - no
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
and #%00000100
|
and #%00000100
|
||||||
beq @+
|
beq @+
|
||||||
lda #1
|
lda STRIG0
|
||||||
@ and STRIG0
|
@ rts
|
||||||
rts
|
.endp */
|
||||||
.endp
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc CheckStartKey
|
.proc CheckStartKey
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|||||||
+3
-2
@@ -1739,8 +1739,9 @@ FastTank
|
|||||||
; ldx TankNr
|
; ldx TankNr
|
||||||
dex
|
dex
|
||||||
bpl AllTanksFloatingDown
|
bpl AllTanksFloatingDown
|
||||||
jsr IsKeyPressed
|
jsr GetKeyFast
|
||||||
bne MainTanksFloatingLoop ; neverending loop
|
cmp #@kbcode._none
|
||||||
|
beq MainTanksFloatingLoop ; neverending loop
|
||||||
mva #$00 ScrollFlag ; credits scroll off
|
mva #$00 ScrollFlag ; credits scroll off
|
||||||
jmp MakeDarkScreen
|
jmp MakeDarkScreen
|
||||||
; jsr GameOverResultsClear
|
; jsr GameOverResultsClear
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ space = 0 ; space in screencodes
|
|||||||
KeyRepeatSpeed = 8 ; (max 127 !!!)
|
KeyRepeatSpeed = 8 ; (max 127 !!!)
|
||||||
FirstKeySpeed = 8 ; additional delay for first keypress
|
FirstKeySpeed = 8 ; additional delay for first keypress
|
||||||
|
|
||||||
VuMeterTime = 2 ; Time of inactivity for VU Meter (1=5sec)
|
VuMeterTime = 4 ; Time of inactivity for VU Meter (1=5sec)
|
||||||
|
|
||||||
;character codes for symbols (tank, parachute, etc. )
|
;character codes for symbols (tank, parachute, etc. )
|
||||||
; characters from tanks.fnt (graphics screen)
|
; characters from tanks.fnt (graphics screen)
|
||||||
|
|||||||
@@ -731,7 +731,7 @@ NotNegativeShieldEnergy
|
|||||||
sta ActiveDefenceWeapon,x
|
sta ActiveDefenceWeapon,x
|
||||||
sta ShieldEnergy,x
|
sta ShieldEnergy,x
|
||||||
jsr SetupXYdraw
|
jsr SetupXYdraw
|
||||||
lda #1 ; Missile
|
lda #ind_Missile ; Missile
|
||||||
jsr ExplosionDirect
|
jsr ExplosionDirect
|
||||||
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
|
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
|
||||||
.endp
|
.endp
|
||||||
@@ -756,11 +756,14 @@ NotNegativeShieldEnergy
|
|||||||
lda random
|
lda random
|
||||||
bmi @+
|
bmi @+
|
||||||
sec ; Wind = -Wind
|
sec ; Wind = -Wind
|
||||||
.rept 4
|
.rept 2
|
||||||
lda #$00
|
lda #$00
|
||||||
sbc Wind+#
|
sbc Wind+#
|
||||||
sta Wind+#
|
sta Wind+#
|
||||||
.endr
|
.endr
|
||||||
|
lda #$ff
|
||||||
|
sta Wind+2
|
||||||
|
sta Wind+3
|
||||||
@ rts
|
@ rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
@@ -769,25 +772,16 @@ NotNegativeShieldEnergy
|
|||||||
; Energy of tank X in A
|
; Energy of tank X in A
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
sta L1
|
sta L1
|
||||||
|
|
||||||
;DATA L1,L2
|
|
||||||
;Multiplication 8bit*8bit,
|
|
||||||
;result 16bit
|
|
||||||
;this algiorithm is a little longer than one in Ruszczyc 6502 book
|
|
||||||
;but it is faster
|
|
||||||
|
|
||||||
ldy #8
|
|
||||||
lda #0
|
lda #0
|
||||||
|
ldy #9
|
||||||
clc
|
clc
|
||||||
LP0 ror
|
CYK ror
|
||||||
ror L1
|
ror L1
|
||||||
bcc B0
|
bcc NIE
|
||||||
clc
|
clc
|
||||||
adc #10 ; (L2) multiplication by 10
|
adc #10 ; multiplication by 10
|
||||||
B0 dey
|
NIE dey
|
||||||
bne LP0
|
bne CYK
|
||||||
ror
|
|
||||||
ror L1
|
|
||||||
sta MaxForceTableH,x
|
sta MaxForceTableH,x
|
||||||
lda L1
|
lda L1
|
||||||
sta MaxForceTableL,x
|
sta MaxForceTableL,x
|
||||||
@@ -1439,7 +1433,7 @@ FinishResultDisplay
|
|||||||
; check timer
|
; check timer
|
||||||
lda RTCLOK
|
lda RTCLOK
|
||||||
cmp #VuMeterTime
|
cmp #VuMeterTime
|
||||||
bne EndMeter
|
bcc EndMeter
|
||||||
; store all angles
|
; store all angles
|
||||||
ldx NumberOfPlayers
|
ldx NumberOfPlayers
|
||||||
@ lda AngleTable,x
|
@ lda AngleTable,x
|
||||||
@@ -1471,8 +1465,8 @@ Meter
|
|||||||
jsr drawtanknr
|
jsr drawtanknr
|
||||||
EndMeterAndReset
|
EndMeterAndReset
|
||||||
lda #0
|
lda #0
|
||||||
sta RTCLOK+1
|
; sta RTCLOK+1
|
||||||
sta RTCLOK
|
sta RTCLOK ; only older byte
|
||||||
EndMeter
|
EndMeter
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|||||||
+14
-16
@@ -1433,7 +1433,7 @@ NothingToFall
|
|||||||
mwa #0 xdraw
|
mwa #0 xdraw
|
||||||
|
|
||||||
; starting point
|
; starting point
|
||||||
getrandomY ;getting random Y coordinate
|
/* getrandomY ;getting random Y coordinate
|
||||||
; sec ; ???
|
; sec ; ???
|
||||||
lda random
|
lda random
|
||||||
cmp #screenheight-(margin*4) ;it means that max line=199
|
cmp #screenheight-(margin*4) ;it means that max line=199
|
||||||
@@ -1441,8 +1441,8 @@ getrandomY ;getting random Y coordinate
|
|||||||
; clc ; C is clear
|
; clc ; C is clear
|
||||||
adc #(margin*2)
|
adc #(margin*2)
|
||||||
sta ydraw
|
sta ydraw
|
||||||
sta yfloat+1
|
sta yfloat+1 */
|
||||||
mva #0 yfloat ;yfloat equals to e.g. 140.0
|
sta yfloat ;yfloat equals to e.g. 140.0 (A=0)
|
||||||
mva #screenheight-margin-5 yfloat+1
|
mva #screenheight-margin-5 yfloat+1
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
|
||||||
@@ -1460,23 +1460,21 @@ NextPart
|
|||||||
sta delta+1 ; before the dot (delta+1.delta)
|
sta delta+1 ; before the dot (delta+1.delta)
|
||||||
|
|
||||||
lda random
|
lda random
|
||||||
and #$01 ;random sign (+/- or up/down)
|
; and #$01 ;random sign (+/- or up/down)
|
||||||
sta UpNdown
|
sta UpNdown
|
||||||
|
|
||||||
; theoretically we have here ready
|
; theoretically we have here ready
|
||||||
; fixed-point delta value
|
; fixed-point delta value
|
||||||
; (-1*(UpNdown))*(delta+1.delta)
|
; (-1*(UpNdown.7th.bit))*(delta+1.delta)
|
||||||
|
|
||||||
;loop drawing one line
|
;loop drawing one line
|
||||||
|
|
||||||
ChangingDirection
|
ChangingDirection
|
||||||
lda random ;length of the line
|
lda random ;length of the line
|
||||||
and #$0f ;max line length
|
and #$0f ;max line length
|
||||||
tax
|
clc
|
||||||
inx
|
adc #3
|
||||||
inx
|
sta deltaX
|
||||||
inx
|
|
||||||
stx deltaX
|
|
||||||
|
|
||||||
OnePart
|
OnePart
|
||||||
jsr placeTanks.CheckTank
|
jsr placeTanks.CheckTank
|
||||||
@@ -1493,8 +1491,8 @@ OnePart
|
|||||||
sta (modify),y
|
sta (modify),y
|
||||||
|
|
||||||
; Up or Down
|
; Up or Down
|
||||||
lda UpNdown
|
bit UpNdown
|
||||||
beq ToBottom
|
bpl ToBottom
|
||||||
|
|
||||||
ToTop ;it means substracting
|
ToTop ;it means substracting
|
||||||
;sbw yfloat delta
|
;sbw yfloat delta
|
||||||
@@ -1509,8 +1507,8 @@ ToTop ;it means substracting
|
|||||||
cmp #margin
|
cmp #margin
|
||||||
bcs @+
|
bcs @+
|
||||||
; if smaller than 10
|
; if smaller than 10
|
||||||
ldx #$00
|
; ldy #$00
|
||||||
stx UpNdown
|
sty UpNdown ; Y=0
|
||||||
jmp @+
|
jmp @+
|
||||||
|
|
||||||
ToBottom
|
ToBottom
|
||||||
@@ -1526,8 +1524,8 @@ ToBottom
|
|||||||
cmp #screenheight-margin
|
cmp #screenheight-margin
|
||||||
bcc @+
|
bcc @+
|
||||||
; if higher than screen
|
; if higher than screen
|
||||||
ldx #$01
|
dey ; Y=0
|
||||||
stx UpNdown
|
sty UpNdown ; Y=$ff
|
||||||
@
|
@
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@
|
|||||||
.ifndef CART_VERSION
|
.ifndef CART_VERSION
|
||||||
.def CART_VERSION = 0 ; if 1 - dual splash screen
|
.def CART_VERSION = 0 ; if 1 - dual splash screen
|
||||||
.endif
|
.endif
|
||||||
.def METEORS = 0 ; if 1 - meteors on game
|
.def METEORS = 1 ; if 1 - meteors on game
|
||||||
.def VU_METER = 1 ; if 1 - VU Meter on game
|
.def VU_METER = 1 ; if 1 - VU Meter on game
|
||||||
.def XCORRECTION_FOR_PM = 0 ; if 1 - active x position of tanks correction fo PMG
|
.def XCORRECTION_FOR_PM = 0 ; if 1 - active x position of tanks correction fo PMG
|
||||||
.def FASTER_GRAF_PROCS = 1 ; if 1 - activates faster graphics routines
|
.def FASTER_GRAF_PROCS = 1 ; if 1 - activates faster graphics routines
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user