Skip to content

Commit 6c8a174

Browse files
committed
piece change throttle added
1 parent e33e217 commit 6c8a174

File tree

2 files changed

+4
-33
lines changed

2 files changed

+4
-33
lines changed

src/gamemodestate/pause.asm

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,10 @@ pause:
9696
lda newlyPressedButtons_player1
9797
cmp #$10
9898
beq @resume
99-
@stayPaused:
10099
jsr updateAudioWaitForNmiAndResetOamStaging
101100
jmp @pauseLoop
102101

103102
@resume:
104-
; Stay paused if invalid debug position
105-
lda debugFlag
106-
beq @validPosition
107-
jsr isPositionValid
108-
beq @validPosition
109-
jmp @stayPaused
110-
@validPosition:
111103
lda #$1E
112104
sta PPUMASK
113105
lda #$00

src/modes/debug.asm

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ debugSelectMenuControls:
3939
lda debugLevelEdit
4040
eor #1
4141
sta debugLevelEdit
42-
; Don't switch if invalid position
43-
bne @skipDebugType
44-
jsr isPositionValid
45-
beq @skipDebugType
46-
inc debugLevelEdit
4742
@skipDebugType:
4843

4944
jsr checkSaveStateControlsDebug
@@ -113,37 +108,21 @@ debugContinue:
113108
jsr menuThrottle
114109
beq @notPressedUp
115110
dec tetriminoY
116-
bpl @notPressedUp
117-
lda #$13
118-
sta tetriminoY
119111
@notPressedUp:
120112
lda #BUTTON_DOWN
121113
jsr menuThrottle
122114
beq @notPressedDown
123115
inc tetriminoY
124-
lda tetriminoY
125-
cmp #$14
126-
bne @notPressedDown
127-
lda #$00
128-
sta tetriminoY
129116
@notPressedDown:
130117
lda #BUTTON_LEFT
131118
jsr menuThrottle
132119
beq @notPressedLeft
133120
dec tetriminoX
134-
bpl @notPressedLeft
135-
lda #$09
136-
sta tetriminoX
137121
@notPressedLeft:
138122
lda #BUTTON_RIGHT
139123
jsr menuThrottle
140124
beq @notPressedRight
141125
inc tetriminoX
142-
lda tetriminoX
143-
cmp #$0A
144-
bne @notPressedRight
145-
lda #$00
146-
sta tetriminoX
147126
@notPressedRight:
148127

149128
; check mode
@@ -170,17 +149,17 @@ debugContinue:
170149
@notPressedBothA:
171150

172151
; change current piece
173-
lda newlyPressedButtons_player1
174-
and #BUTTON_B
152+
lda #BUTTON_B
153+
jsr menuThrottle
175154
beq @notPressedB
176155
dec currentPiece
177156
bpl @notPressedB
178157
lda #$12
179158
sta currentPiece
180159
@notPressedB:
181160

182-
lda newlyPressedButtons_player1
183-
and #BUTTON_A
161+
lda #BUTTON_A
162+
jsr menuThrottle
184163
beq @notPressedA
185164
inc currentPiece
186165
lda currentPiece

0 commit comments

Comments
 (0)