Skip to content

Commit ab2da5e

Browse files
committed
removed gameType
1 parent 806bc53 commit ab2da5e

File tree

1 file changed

+6
-60
lines changed

1 file changed

+6
-60
lines changed

main.asm

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ generalCounter2 := $00A9
137137
generalCounter3 := $00AA
138138
generalCounter4 := $00AB
139139
generalCounter5 := $00AC
140-
selectingLevelOrHeight:= $00AD ; 0-level, 1-height
140+
positionValidTmp:= $00AD ; 0-level, 1-height
141141
originalY := $00AE
142142
dropSpeed := $00AF
143143
tmpCurrentPiece := $00B0 ; Only used as a temporary
@@ -154,7 +154,7 @@ renderMode := $00BD
154154
; numberOfPlayers := $00BE
155155
nextPiece := $00BF ; Stored by its orientation ID
156156
gameMode := $00C0 ; 0=legal, 1=title, 2=type menu, 3=level menu, 4=play and ending and high score, 5=demo, 6=start demo
157-
gameType := $00C1 ; A=0, B=1
157+
; gameType := $00C1 ; A=0, B=1
158158
musicType := $00C2 ; 0-3; 3 is off
159159
sleepCounter := $00C3 ; canon is legalScreenCounter1
160160

@@ -2103,12 +2103,12 @@ isPositionValid:
21032103
adc generalCounter4
21042104
clc
21052105
adc generalCounter
2106-
sta selectingLevelOrHeight
2106+
sta positionValidTmp
21072107
inx
21082108
inx
21092109
lda orientationTable,x
21102110
clc
2111-
adc selectingLevelOrHeight
2111+
adc positionValidTmp
21122112
tay
21132113
lda (playfieldAddr),y
21142114
cmp #$EF
@@ -2747,14 +2747,14 @@ playState_lockTetrimino:
27472747
adc generalCounter4
27482748
clc
27492749
adc generalCounter
2750-
sta selectingLevelOrHeight
2750+
sta positionValidTmp
27512751
inx
27522752
lda orientationTable,x
27532753
sta generalCounter5
27542754
inx
27552755
lda orientationTable,x
27562756
clc
2757-
adc selectingLevelOrHeight
2757+
adc positionValidTmp
27582758
tay
27592759
lda generalCounter5
27602760
; BLOCK_TILES
@@ -2963,30 +2963,7 @@ playState_updateLinesAndStatistics:
29632963
lda outOfDateRenderFlags
29642964
ora #$01
29652965
sta outOfDateRenderFlags
2966-
lda gameType
2967-
beq @gameTypeA
2968-
lda completedLines
2969-
sta generalCounter
2970-
lda lines
2971-
sec
2972-
sbc generalCounter
2973-
sta lines
2974-
bpl @checkForBorrow
2975-
lda #$00
2976-
sta lines
2977-
jmp addHoldDownPoints
29782966

2979-
@checkForBorrow:
2980-
and #$0F
2981-
cmp #$0A
2982-
bmi addHoldDownPoints
2983-
lda lines
2984-
sec
2985-
sbc #$06
2986-
sta lines
2987-
jmp addHoldDownPoints
2988-
2989-
@gameTypeA:
29902967
ldx completedLines
29912968
incrementLines:
29922969
inc lines
@@ -3311,8 +3288,6 @@ demoButtonsTable_indexIncr:
33113288
rts
33123289

33133290
gameMode_startDemo:
3314-
lda #$00
3315-
sta gameType
33163291
sta startLevel
33173292
sta gameModeState
33183293
sta playState
@@ -3368,10 +3343,6 @@ MMC1_Control := * + 1
33683343
.addr high_scores_nametable
33693344
lda #$00
33703345
sta generalCounter2
3371-
lda gameType
3372-
beq @copyEntry
3373-
lda #$04
3374-
sta generalCounter2
33753346
@copyEntry:
33763347
lda generalCounter2
33773348
and #$03
@@ -3460,10 +3431,6 @@ byteToBcdTable:
34603431
handleHighScoreIfNecessary:
34613432
lda #$00
34623433
sta highScoreEntryRawPos
3463-
lda gameType
3464-
beq @compareWithPos
3465-
lda #$04
3466-
sta highScoreEntryRawPos
34673434
@compareWithPos:
34683435
lda highScoreEntryRawPos
34693436
sta generalCounter2
@@ -3551,13 +3518,6 @@ adjustHighScores:
35513518
; reg a: start byte to copy
35523519
copyHighScoreNameToNextIndex:
35533520
sta generalCounter
3554-
lda gameType
3555-
beq @offsetAdjustedForGameType
3556-
lda #$18
3557-
clc
3558-
adc generalCounter
3559-
sta generalCounter
3560-
@offsetAdjustedForGameType:
35613521
lda #$05
35623522
sta generalCounter2
35633523
@copyLetter:
@@ -3582,13 +3542,6 @@ copyHighScoreNameToNextIndex:
35823542
; reg a: start byte to copy
35833543
copyHighScoreScoreToNextIndex:
35843544
tax
3585-
lda gameType
3586-
beq @xAdjustedForGameType
3587-
txa
3588-
clc
3589-
adc #$0C
3590-
tax
3591-
@xAdjustedForGameType:
35923545
lda highScoreScoresA,x
35933546
sta highScoreScoresA+3,x
35943547
inx
@@ -3602,13 +3555,6 @@ copyHighScoreScoreToNextIndex:
36023555
; reg a: start byte to copy
36033556
copyHighScoreLevelToNextIndex:
36043557
tax
3605-
lda gameType
3606-
beq @xAdjustedForGameType
3607-
txa
3608-
clc
3609-
adc #$04
3610-
tax
3611-
@xAdjustedForGameType:
36123558
lda highScoreLevels,x
36133559
sta highScoreLevels+1,x
36143560
rts

0 commit comments

Comments
 (0)