diff --git a/display.asm b/display.asm index c3ecec9..5deb05c 100644 --- a/display.asm +++ b/display.asm @@ -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 \ No newline at end of file diff --git a/scorch.asm b/scorch.asm index c476ff8..c6a40e1 100644 --- a/scorch.asm +++ b/scorch.asm @@ -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 diff --git a/scorch.xex b/scorch.xex index 0169b45..f99cf4c 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/textproc.asm b/textproc.asm index a46b098..f254cb7 100644 --- a/textproc.asm +++ b/textproc.asm @@ -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 diff --git a/variables.asm b/variables.asm index 28bd887..7149620 100644 --- a/variables.asm +++ b/variables.asm @@ -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] diff --git a/weapons.asm b/weapons.asm index 1dcd243..0a612b4 100644 --- a/weapons.asm +++ b/weapons.asm @@ -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