mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
DirectHits and EarnedMoney counters added (for summary)
This commit is contained in:
+1
-1
@@ -210,5 +210,5 @@ purchaseTextEnd
|
||||
GameOverTitle
|
||||
dta d" game over "*
|
||||
GameOverTitle2
|
||||
dta d" Player Points Hits Money "
|
||||
dta d" Player Points Hits Earned Money "
|
||||
.endif
|
||||
+37
-2
@@ -225,10 +225,41 @@ zeromoney
|
||||
lda #0
|
||||
sta moneyL,x
|
||||
sta moneyH,x
|
||||
|
||||
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
|
||||
bpl CalculateGains
|
||||
jpl CalculateGains
|
||||
|
||||
lda GameIsOver
|
||||
beq NoGameOverYet
|
||||
@@ -934,6 +965,10 @@ MakeTanksVisible
|
||||
txa
|
||||
ClearResults
|
||||
sta ResultsTable,x
|
||||
sta DirectHitsL,x
|
||||
sta DirectHitsH,x
|
||||
sta EarnedMoneyL,x
|
||||
sta EarnedMoneyH,x
|
||||
inx
|
||||
cpx #MaxPlayers
|
||||
bne ClearResults
|
||||
|
||||
BIN
Binary file not shown.
+18
-4
@@ -1882,13 +1882,27 @@ NextChar
|
||||
adw temp #11 displayposition
|
||||
jsr displaydec
|
||||
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
|
||||
iny
|
||||
dec ResultOfTankNr
|
||||
bpl FinalResultOfTheNextPlayer
|
||||
jpl FinalResultOfTheNextPlayer
|
||||
MakeBlackLines
|
||||
cpy #$06
|
||||
beq AllLinesReady
|
||||
|
||||
@@ -88,6 +88,14 @@ ResultsTable ;the results in the gameeeeee
|
||||
.DS [MaxPlayers]
|
||||
TempResults
|
||||
.DS [MaxPlayers]
|
||||
DirectHitsH
|
||||
.DS [MaxPlayers]
|
||||
DirectHitsL
|
||||
.DS [MaxPlayers]
|
||||
EarnedMoneyH
|
||||
.DS [MaxPlayers]
|
||||
EarnedMoneyL
|
||||
.DS [MaxPlayers]
|
||||
;----------------------------------------------------
|
||||
ForceTableL ;shooting Force of the tank during the round
|
||||
.DS [MaxPlayers]
|
||||
|
||||
+10
@@ -1855,6 +1855,16 @@ EndOfFlight2
|
||||
lda HitFlag
|
||||
jeq NoHitAtEndOfFight ; RTS only !!!
|
||||
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
|
||||
tax
|
||||
dex ; index of tank in X
|
||||
|
||||
Reference in New Issue
Block a user