mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +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
|
adw temp #19 displayposition
|
||||||
jsr displaydec5
|
jsr displaydec5
|
||||||
mva #0 displayposition ; overwrite first digit
|
mva #0 displayposition ; overwrite first digit
|
||||||
|
ldx TankNr
|
||||||
bit TeamGame
|
bit TeamGame
|
||||||
bvs TeamsNoJoy
|
bvs TeamsNoJoy
|
||||||
; put AI symbol or joystick only if no Teams
|
; put AI symbol or joystick only if no Teams
|
||||||
ldx TankNr
|
|
||||||
ldy SkillTable,x
|
ldy SkillTable,x
|
||||||
bne ThisIsAI
|
bne ThisIsAI
|
||||||
ldy JoyNumber,x
|
ldy JoyNumber,x
|
||||||
|
|||||||
@@ -1188,8 +1188,28 @@ Bubble
|
|||||||
ldx #0 ;i=x
|
ldx #0 ;i=x
|
||||||
stx temp2 ; sortflag=temp2
|
stx temp2 ; sortflag=temp2
|
||||||
inx ; because NumberOfPlayers start from 1 (not 0)
|
inx ; because NumberOfPlayers start from 1 (not 0)
|
||||||
|
|
||||||
BubbleBobble
|
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)
|
ldy TankSequence-1,x ; x count from 1 to NumberOfPlayers (we need cout from 0 to NumberOfPlayers-1)
|
||||||
lda ResultsTable,y
|
lda ResultsTable,y
|
||||||
ldy TankSequence,x
|
ldy TankSequence,x
|
||||||
@@ -1232,14 +1252,6 @@ swapvalues
|
|||||||
sta TankSequence,x
|
sta TankSequence,x
|
||||||
inc temp2
|
inc temp2
|
||||||
nextishigher
|
nextishigher
|
||||||
inx
|
|
||||||
cpx NumberOfPlayers
|
|
||||||
bne BubbleBobble
|
|
||||||
|
|
||||||
lda temp2
|
|
||||||
|
|
||||||
bne Bubble
|
|
||||||
|
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user