mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Options screen is now separate from setting the game's initial variables.
For easier porting to the C64 or others.
This commit is contained in:
@@ -316,6 +316,7 @@ START
|
|||||||
RMTSong song_main_menu
|
RMTSong song_main_menu
|
||||||
|
|
||||||
jsr Options ;startup screen
|
jsr Options ;startup screen
|
||||||
|
jsr SetVariablesFromOptions
|
||||||
jsr MakeDarkScreen
|
jsr MakeDarkScreen
|
||||||
bit escFlag
|
bit escFlag
|
||||||
bmi START
|
bmi START
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+62
-58
@@ -109,7 +109,7 @@ OptionsNoLeft
|
|||||||
OptionsNoRight
|
OptionsNoRight
|
||||||
cmp #@kbcode._ret ; $c ;Return key
|
cmp #@kbcode._ret ; $c ;Return key
|
||||||
bne OptionsNoReturn
|
bne OptionsNoReturn
|
||||||
jmp OptionsFinished
|
rts ; options selected
|
||||||
|
|
||||||
OptionsNoReturn
|
OptionsNoReturn
|
||||||
cmp #@kbcode._tab ; Tab key
|
cmp #@kbcode._tab ; Tab key
|
||||||
@@ -119,63 +119,7 @@ OptionsNoReturn
|
|||||||
sta Gradient
|
sta Gradient
|
||||||
OptionsNoTab
|
OptionsNoTab
|
||||||
jmp OptionsMainLoop
|
jmp OptionsMainLoop
|
||||||
|
.endp
|
||||||
OptionsFinished
|
|
||||||
;first option
|
|
||||||
ldy OptionsTable
|
|
||||||
iny
|
|
||||||
iny
|
|
||||||
sty NumberOfPlayers ;1=1 player (but minimum is 2)
|
|
||||||
|
|
||||||
;second option (cash)
|
|
||||||
|
|
||||||
|
|
||||||
ldy OptionsTable+1
|
|
||||||
ldx #0
|
|
||||||
@
|
|
||||||
lda CashOptionL,y
|
|
||||||
sta moneyL,x
|
|
||||||
lda CashOptionH,y
|
|
||||||
sta moneyH,x
|
|
||||||
inx
|
|
||||||
cpx NumberOfPlayers
|
|
||||||
bne @-
|
|
||||||
|
|
||||||
;third option (gravity)
|
|
||||||
ldy OptionsTable+2
|
|
||||||
lda GravityTable,y
|
|
||||||
sta gravity
|
|
||||||
|
|
||||||
;fourth option (wind)
|
|
||||||
ldy OptionsTable+3
|
|
||||||
lda MaxWindTable,y
|
|
||||||
sta MaxWind
|
|
||||||
|
|
||||||
;fifth option (no of rounds)
|
|
||||||
ldy OptionsTable+4
|
|
||||||
lda RoundsTable,y
|
|
||||||
sta RoundsInTheGame
|
|
||||||
|
|
||||||
;6th option (shell speed)
|
|
||||||
ldy OptionsTable+5
|
|
||||||
lda flyDelayTable,y
|
|
||||||
sta flyDelay
|
|
||||||
|
|
||||||
;7th option (Airstrike after how many missess)
|
|
||||||
ldy OptionsTable+6
|
|
||||||
lda seppukuTable,y
|
|
||||||
sta seppukuVal
|
|
||||||
|
|
||||||
;8th option (how aggressive are mountains)
|
|
||||||
ldy OptionsTable+7
|
|
||||||
lda mountainsDeltaTableH,y
|
|
||||||
sta mountainDeltaH
|
|
||||||
lda mountainsDeltaTableL,y
|
|
||||||
sta mountainDeltaL
|
|
||||||
|
|
||||||
|
|
||||||
rts
|
|
||||||
.endp
|
|
||||||
;--------
|
;--------
|
||||||
; inversing selected option (cursor)
|
; inversing selected option (cursor)
|
||||||
;--------
|
;--------
|
||||||
@@ -236,6 +180,66 @@ invertme
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
; --------------------------------------
|
||||||
|
; Sets the appropriate variables based on the options table
|
||||||
|
;
|
||||||
|
.proc SetVariablesFromOptions
|
||||||
|
;first option
|
||||||
|
ldy OptionsTable
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
sty NumberOfPlayers ;1=1 player (but minimum is 2)
|
||||||
|
|
||||||
|
;second option (cash)
|
||||||
|
|
||||||
|
|
||||||
|
ldy OptionsTable+1
|
||||||
|
ldx #0
|
||||||
|
@
|
||||||
|
lda CashOptionL,y
|
||||||
|
sta moneyL,x
|
||||||
|
lda CashOptionH,y
|
||||||
|
sta moneyH,x
|
||||||
|
inx
|
||||||
|
cpx NumberOfPlayers
|
||||||
|
bne @-
|
||||||
|
|
||||||
|
;third option (gravity)
|
||||||
|
ldy OptionsTable+2
|
||||||
|
lda GravityTable,y
|
||||||
|
sta gravity
|
||||||
|
|
||||||
|
;fourth option (wind)
|
||||||
|
ldy OptionsTable+3
|
||||||
|
lda MaxWindTable,y
|
||||||
|
sta MaxWind
|
||||||
|
|
||||||
|
;fifth option (no of rounds)
|
||||||
|
ldy OptionsTable+4
|
||||||
|
lda RoundsTable,y
|
||||||
|
sta RoundsInTheGame
|
||||||
|
|
||||||
|
;6th option (shell speed)
|
||||||
|
ldy OptionsTable+5
|
||||||
|
lda flyDelayTable,y
|
||||||
|
sta flyDelay
|
||||||
|
|
||||||
|
;7th option (Airstrike after how many missess)
|
||||||
|
ldy OptionsTable+6
|
||||||
|
lda seppukuTable,y
|
||||||
|
sta seppukuVal
|
||||||
|
|
||||||
|
;8th option (how aggressive are mountains)
|
||||||
|
ldy OptionsTable+7
|
||||||
|
lda mountainsDeltaTableH,y
|
||||||
|
sta mountainDeltaH
|
||||||
|
lda mountainsDeltaTableL,y
|
||||||
|
sta mountainDeltaL
|
||||||
|
|
||||||
|
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;-------------------------------------------
|
;-------------------------------------------
|
||||||
; call of the purchase (and activate) screens for each tank
|
; call of the purchase (and activate) screens for each tank
|
||||||
.proc CallPurchaseForEveryTank
|
.proc CallPurchaseForEveryTank
|
||||||
|
|||||||
Reference in New Issue
Block a user