Skip to content

Commit 42099fc

Browse files
Merge pull request #76 from zohassadar/marathon_options
Add marathon options
2 parents 5979fa2 + 3e091c4 commit 42099fc

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,11 @@ Setting the value to G causes the mode to act identical to the game genie code `
196196

197197
### Marathon
198198

199-
Play as long as you are able to survive at a consistent speed. While the level will increase normally, the drop rate and the points rewarded will remain fixed based on the starting level.
199+
Play as long as you are able to survive at a consistent speed.
200+
201+
0. Level transitions do not happen, game remains on the same level for as long as you are able to survive.
202+
1. Levels will transition normally, but speed and points will remain fixed based on your starting level.
203+
2. Similar to 1, speed and points will remain fixed based on the starting level you choose, but actual game will begin at level 0.
200204

201205
### Garbage
202206

src/constants.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ MENU_TOP_MARGIN_SCROLL := 7 ; in blocks
123123
.byte $F ; MODE_CRUNCH
124124
.byte $20 ; MODE_TAP
125125
.byte $10 ; MODE_TRANSITION
126-
.byte $0 ; MODE_MARATHON
126+
.byte $2 ; MODE_MARATHON
127127
.byte $1F ; MODE_TAPQTY
128128
.byte $8 ; MODE_CHECKERBOARD
129129
.byte $4 ; MODE_GARBAGE

src/gamemode/levelmenu.asm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ levelMenuCheckStartGame:
132132
sta startLevel
133133
@startGame:
134134
; lda startLevel
135+
ldy practiseType
136+
cpy #MODE_MARATHON
137+
bne @noLevelModification
138+
ldy marathonModifier
139+
cpy #2 ; marathon mode 2 starts at level 0
140+
bne @noLevelModification
141+
lda #0
142+
@noLevelModification:
135143
sta levelNumber
136144
lda #$00
137145
sta gameModeState

src/playstate/updatestats.asm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ checkLevelUp:
7878
lda practiseType
7979
cmp #MODE_TAPQTY
8080
beq @lineLoop
81+
cmp #MODE_MARATHON
82+
bne @notMarathon
83+
lda marathonModifier
84+
beq @lineLoop ; marathon mode 0 does not transition
85+
bne @notSXTOKL
86+
@notMarathon:
8187
cmp #MODE_TRANSITION
8288
bne @notSXTOKL
8389
lda transitionModifier

src/ram.asm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ floorModifier: .res 1
320320
crunchModifier: .res 1
321321
tapModifier: .res 1
322322
transitionModifier: .res 1
323+
marathonModifier: .res 1
323324
tapqtyModifier: .res 1
324325
checkerModifier: .res 1
325326
garbageModifier: .res 1

0 commit comments

Comments
 (0)