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