mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Teams sortnig and earned money bug fix
This commit is contained in:
+1
-1
@@ -1699,10 +1699,10 @@ NextChar
|
||||
adw temp #19 displayposition
|
||||
jsr displaydec5
|
||||
mva #0 displayposition ; overwrite first digit
|
||||
ldx TankNr
|
||||
bit TeamGame
|
||||
bvs TeamsNoJoy
|
||||
; put AI symbol or joystick only if no Teams
|
||||
ldx TankNr
|
||||
ldy SkillTable,x
|
||||
bne ThisIsAI
|
||||
ldy JoyNumber,x
|
||||
|
||||
@@ -1188,8 +1188,28 @@ Bubble
|
||||
ldx #0 ;i=x
|
||||
stx temp2 ; sortflag=temp2
|
||||
inx ; because NumberOfPlayers start from 1 (not 0)
|
||||
|
||||
BubbleBobble
|
||||
jsr SortOnePass
|
||||
inx
|
||||
cpx NumberOfPlayers ; if no team game
|
||||
bne BubbleBobble
|
||||
|
||||
lda temp2 ; sortflag
|
||||
bne Bubble
|
||||
|
||||
; amd Teams sorting
|
||||
bit TeamGame
|
||||
bvc NoTeamsSort
|
||||
ldx #MaxPlayers+1 ;i=x
|
||||
jsr SortOnePass ; for 2 Teams one pass is sufficient
|
||||
NoTeamsSort
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
.proc SortOnePass
|
||||
; optimalisation for 2 sorting procedures
|
||||
;--------------------------------------------------
|
||||
ldy TankSequence-1,x ; x count from 1 to NumberOfPlayers (we need cout from 0 to NumberOfPlayers-1)
|
||||
lda ResultsTable,y
|
||||
ldy TankSequence,x
|
||||
@@ -1232,14 +1252,6 @@ swapvalues
|
||||
sta TankSequence,x
|
||||
inc temp2
|
||||
nextishigher
|
||||
inx
|
||||
cpx NumberOfPlayers
|
||||
bne BubbleBobble
|
||||
|
||||
lda temp2
|
||||
|
||||
bne Bubble
|
||||
|
||||
rts
|
||||
.endp
|
||||
;--------------------------------------------------
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user