mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-21 06:39:46 +02:00
DirectHits and EarnedMoney counters added (for summary)
This commit is contained in:
+1
-1
@@ -210,5 +210,5 @@ purchaseTextEnd
|
|||||||
GameOverTitle
|
GameOverTitle
|
||||||
dta d" game over "*
|
dta d" game over "*
|
||||||
GameOverTitle2
|
GameOverTitle2
|
||||||
dta d" Player Points Hits Money "
|
dta d" Player Points Hits Earned Money "
|
||||||
.endif
|
.endif
|
||||||
+37
-2
@@ -225,10 +225,41 @@ zeromoney
|
|||||||
lda #0
|
lda #0
|
||||||
sta moneyL,x
|
sta moneyL,x
|
||||||
sta moneyH,x
|
sta moneyH,x
|
||||||
|
|
||||||
skipzeroing
|
skipzeroing
|
||||||
|
; and earned money for summary
|
||||||
|
clc
|
||||||
|
lda EarnedMoneyL,x
|
||||||
|
adc gainL,x
|
||||||
|
sta EarnedMoneyL,x
|
||||||
|
lda EarnedMoneyH,x
|
||||||
|
adc gainH,x
|
||||||
|
sta EarnedMoneyH,x
|
||||||
|
; substract lose
|
||||||
|
; if lose is greater than money then zero money
|
||||||
|
lda EarnedMoneyH,x
|
||||||
|
cmp loseH,x
|
||||||
|
bcc ezeromoney
|
||||||
|
bne esubstractlose
|
||||||
|
lda EarnedMoneyL,x
|
||||||
|
cmp loseL,x
|
||||||
|
bcc ezeromoney
|
||||||
|
esubstractlose
|
||||||
|
sec
|
||||||
|
lda EarnedMoneyL,x
|
||||||
|
sbc loseL,x
|
||||||
|
sta EarnedMoneyL,x
|
||||||
|
lda EarnedMoneyH,x
|
||||||
|
sbc loseH,x
|
||||||
|
sta EarnedMoneyH,x
|
||||||
|
jmp eskipzeroing
|
||||||
|
ezeromoney
|
||||||
|
lda #0
|
||||||
|
sta EarnedMoneyL,x
|
||||||
|
sta EarnedMoneyH,x
|
||||||
|
eskipzeroing
|
||||||
|
|
||||||
dex
|
dex
|
||||||
bpl CalculateGains
|
jpl CalculateGains
|
||||||
|
|
||||||
lda GameIsOver
|
lda GameIsOver
|
||||||
beq NoGameOverYet
|
beq NoGameOverYet
|
||||||
@@ -934,6 +965,10 @@ MakeTanksVisible
|
|||||||
txa
|
txa
|
||||||
ClearResults
|
ClearResults
|
||||||
sta ResultsTable,x
|
sta ResultsTable,x
|
||||||
|
sta DirectHitsL,x
|
||||||
|
sta DirectHitsH,x
|
||||||
|
sta EarnedMoneyL,x
|
||||||
|
sta EarnedMoneyH,x
|
||||||
inx
|
inx
|
||||||
cpx #MaxPlayers
|
cpx #MaxPlayers
|
||||||
bne ClearResults
|
bne ClearResults
|
||||||
|
|||||||
BIN
Binary file not shown.
+18
-4
@@ -1882,13 +1882,27 @@ NextChar
|
|||||||
adw temp #11 displayposition
|
adw temp #11 displayposition
|
||||||
jsr displaydec
|
jsr displaydec
|
||||||
mva #0 displayposition ; overwrite first digit
|
mva #0 displayposition ; overwrite first digit
|
||||||
|
; put hits points on the screen
|
||||||
|
ldx TankNr
|
||||||
;
|
lda DirectHitsL,x
|
||||||
|
sta decimal
|
||||||
|
lda DirectHitsH,x
|
||||||
|
sta decimal+1
|
||||||
|
adw temp #20 displayposition
|
||||||
|
jsr displaydec
|
||||||
|
mva #0 displayposition ; overwrite first digit
|
||||||
|
; put earned money on the screen
|
||||||
|
ldx TankNr
|
||||||
|
lda EarnedMoneyL,x
|
||||||
|
sta decimal
|
||||||
|
lda EarnedMoneyH,x
|
||||||
|
sta decimal+1
|
||||||
|
adw temp #28 displayposition
|
||||||
|
jsr displaydec
|
||||||
ply
|
ply
|
||||||
iny
|
iny
|
||||||
dec ResultOfTankNr
|
dec ResultOfTankNr
|
||||||
bpl FinalResultOfTheNextPlayer
|
jpl FinalResultOfTheNextPlayer
|
||||||
MakeBlackLines
|
MakeBlackLines
|
||||||
cpy #$06
|
cpy #$06
|
||||||
beq AllLinesReady
|
beq AllLinesReady
|
||||||
|
|||||||
@@ -88,6 +88,14 @@ ResultsTable ;the results in the gameeeeee
|
|||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
TempResults
|
TempResults
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
|
DirectHitsH
|
||||||
|
.DS [MaxPlayers]
|
||||||
|
DirectHitsL
|
||||||
|
.DS [MaxPlayers]
|
||||||
|
EarnedMoneyH
|
||||||
|
.DS [MaxPlayers]
|
||||||
|
EarnedMoneyL
|
||||||
|
.DS [MaxPlayers]
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
ForceTableL ;shooting Force of the tank during the round
|
ForceTableL ;shooting Force of the tank during the round
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
|
|||||||
+10
@@ -1855,6 +1855,16 @@ EndOfFlight2
|
|||||||
lda HitFlag
|
lda HitFlag
|
||||||
jeq NoHitAtEndOfFight ; RTS only !!!
|
jeq NoHitAtEndOfFight ; RTS only !!!
|
||||||
jmi NoTankHitAtEndOfFight
|
jmi NoTankHitAtEndOfFight
|
||||||
|
; tank hit - increase direct hits points
|
||||||
|
ldx TankNr
|
||||||
|
inx
|
||||||
|
cpx HitFlag ; we don't count suicides :)
|
||||||
|
beq @+
|
||||||
|
dex
|
||||||
|
inc DirectHitsL,x
|
||||||
|
bne @+
|
||||||
|
inc DirectHitsH,x
|
||||||
|
@
|
||||||
; tank hit - check defensive weapon of this tank
|
; tank hit - check defensive weapon of this tank
|
||||||
tax
|
tax
|
||||||
dex ; index of tank in X
|
dex ; index of tank in X
|
||||||
|
|||||||
Reference in New Issue
Block a user