Skip to content

Commit 4a3653c

Browse files
authored
Merge branch 'master' into mmc5
2 parents 7f0bb41 + f6bc06e commit 4a3653c

File tree

9 files changed

+39
-4
lines changed

9 files changed

+39
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* Fixed CNROM legal screen CHR bank
1212
* Fixed CNROM legal to title flicker
1313
* Block Tool pieces wrap around
14+
* Added hidden score option
1415

1516
## [v5 tournament]
1617
* Linecap Menu (from CTM Masters September 2022)

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,12 @@ __Capped__
306306

307307
Cap your score at 999999.
308308

309+
__Hidden__
310+
311+
![Hidden](./assets/screens/score-hidden.png)
312+
313+
Hides score until game over.
314+
309315
## Hz Display
310316

311317
![Hz Display](./assets/screens/hz.png)

assets/screens/score-hidden.png

56.3 KB
Loading

src/constants.asm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ SCORING_LETTERS := 1
9494
SCORING_SEVENDIGIT := 2
9595
SCORING_FLOAT := 3
9696
SCORING_SCORECAP := 4
97+
SCORING_HIDDEN := 5
9798

9899
LINECAP_KILLX2 := 1
99100
LINECAP_FLOOR := 2
@@ -130,7 +131,7 @@ MENU_TOP_MARGIN_SCROLL := 7 ; in blocks
130131
.byte $0 ; MODE_INVISIBLE
131132
.byte $0 ; MODE_HARDDROP
132133
.byte $0 ; MODE_SPEED_TEST
133-
.byte $4 ; MODE_SCORE_DISPLAY
134+
.byte $5 ; MODE_SCORE_DISPLAY
134135
.byte $1 ; MODE_HZ_DISPLAY
135136
.byte $1 ; MODE_INPUT_DISPLAY
136137
.byte $1 ; MODE_DISABLE_FLASH

src/gamemodestate/initbackground.asm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,19 @@ scoringBackground:
8484
sta PPUADDR
8585
lda #$16
8686
sta PPUDATA
87+
jmp @noSevenDigit
8788
@noFloat:
89+
cmp #SCORING_HIDDEN
90+
bne @notHidden
91+
jsr scoreSetupPPU
92+
lda #$FF
93+
ldx #$6
94+
@hiddenScoreLoop:
95+
sta PPUDATA
96+
dex
97+
bne @hiddenScoreLoop
98+
jmp @noSevenDigit
99+
@notHidden:
88100
cmp #SCORING_SEVENDIGIT
89101
bne @noSevenDigit
90102
jsr bulkCopyToPpu

src/nmi/render_mode_play_and_demo.asm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ render_mode_play_and_demo:
9191

9292
; scorecap
9393
lda scoringModifier
94+
cmp #SCORING_HIDDEN
95+
bne @notHidden
96+
lda playState
97+
cmp #$0A
98+
beq @noFloat ; render classic score at game over
99+
jmp @clearScoreRenderFlags
100+
@notHidden:
94101
cmp #SCORING_SCORECAP
95102
bne @noScoreCap
96103
jsr renderScoreCap

src/playstate/lock.asm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ playState_lockTetrimino:
22
jsr isPositionValid
33
beq @notGameOver
44
; gameOver:
5+
lda outOfDateRenderFlags ; Flag needed to reveal hidden score
6+
ora #$04
7+
sta outOfDateRenderFlags
58
lda #$02
69
sta soundEffectSlot0Init
710
lda #$0A ; playState_checkStartGameOver

src/playstate/preparenext.asm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ typeBEndingStuffEnd:
8080
lda #$4
8181
sta soundEffectSlot1Init
8282

83-
lda #$30
84-
jsr sleep_gameplay_nextSprite
83+
lda outOfDateRenderFlags ; Flag needed to reveal hidden score
84+
ora #$4
85+
sta outOfDateRenderFlags
8586
lda #$0A ; playState_checkStartGameOver
8687
sta playState
88+
lda #$30
89+
jsr sleep_gameplay_nextSprite
8790
rts
8891

8992
sleep_gameplay_nextSprite:

src/util/strings.asm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ stringLookup:
7575
.byte stringSevenDigit-stringLookup
7676
.byte stringFloat-stringLookup
7777
.byte stringScorecap-stringLookup
78+
.byte stringHidden-stringLookup
7879
.byte stringNull-stringLookup ; reserved for future use
7980
.byte stringNull-stringLookup
80-
.byte stringNull-stringLookup
8181
.byte stringOff-stringLookup ; 8
8282
.byte stringOn-stringLookup
8383
.byte stringPause-stringLookup
@@ -102,6 +102,8 @@ stringFloat:
102102
.byte $1,'M'
103103
stringScorecap:
104104
.byte $6,'C','A','P','P','E','D'
105+
stringHidden:
106+
.byte $6,'H','I','D','D','E','N'
105107
stringOff:
106108
.byte $3,'O','F','F'
107109
stringOn:

0 commit comments

Comments
 (0)