MYCO curve and rot mode.
This commit is contained in:
parent
0829978152
commit
e9caff748c
|
@ -41,6 +41,7 @@ Select the rotation rules:
|
||||||
- ARS1: Classic ARS from TGM1 and TGM2.
|
- ARS1: Classic ARS from TGM1 and TGM2.
|
||||||
- ARS2: ARS from TGM3.
|
- ARS2: ARS from TGM3.
|
||||||
- NES: No kicks.
|
- NES: No kicks.
|
||||||
|
- MYCO: Like ARS1, but without I, L, J and T restrictions.
|
||||||
|
|
||||||
### Drop Mode
|
### Drop Mode
|
||||||
Choose how the up and down buttons act:
|
Choose how the up and down buttons act:
|
||||||
|
@ -51,7 +52,7 @@ Choose how the up and down buttons act:
|
||||||
- NONE: Up does nothing. Down locks.
|
- NONE: Up does nothing. Down locks.
|
||||||
|
|
||||||
### Speed Curve
|
### Speed Curve
|
||||||
Select between several speed curves including the DMGTRIS default speed curve, TGM1, TGM3, as well as DEATH and SHIRASE mode. In addition there's a "CHILL" curve for when you just want to enjoy some tetris. It doesn't speed up very fast at all.
|
Select between several speed curves including the DMGTRIS default speed curve, TGM1, TGM3, as well as DEATH and SHIRASE mode. In addition there's a "CHILL" curve for when you just want to enjoy some tetris. It doesn't speed up very fast at all. The MYCO speed curve mimics the excellent game Tromi by Mycophobia.
|
||||||
|
|
||||||
Note that all modes use the same scoring and they are all infinite.
|
Note that all modes use the same scoring and they are all infinite.
|
||||||
|
|
||||||
|
|
BIN
bin/DMGTRIS.GBC
BIN
bin/DMGTRIS.GBC
Binary file not shown.
3783
bin/DMGTRIS.map
3783
bin/DMGTRIS.map
File diff suppressed because it is too large
Load Diff
Binary file not shown.
3286
bin/DMGTRIS.sym
3286
bin/DMGTRIS.sym
File diff suppressed because it is too large
Load Diff
|
@ -26,6 +26,16 @@ SECTION "Banking Variables", WRAM0
|
||||||
wBankBackup: ds 4
|
wBankBackup: ds 4
|
||||||
|
|
||||||
|
|
||||||
|
SECTION "Banking Functions", ROM0
|
||||||
|
BankingInit::
|
||||||
|
ld a, BANK_OTHER
|
||||||
|
ld [wBankBackup], a
|
||||||
|
ld [wBankBackup+1], a
|
||||||
|
ld [wBankBackup+2], a
|
||||||
|
ld [wBankBackup+3], a
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
SECTION "Switch Bank", ROM0[$08]
|
SECTION "Switch Bank", ROM0[$08]
|
||||||
; Pushes the current bank to the stach, switches to bank in B.
|
; Pushes the current bank to the stach, switches to bank in B.
|
||||||
RSTSwitchBank::
|
RSTSwitchBank::
|
||||||
|
|
|
@ -1055,6 +1055,12 @@ FieldProcess::
|
||||||
cp a, PIECE_O
|
cp a, PIECE_O
|
||||||
jp z, .norot
|
jp z, .norot
|
||||||
|
|
||||||
|
; MYCO always tries to kick.
|
||||||
|
ld a, [wRotModeState]
|
||||||
|
cp a, ROT_MODE_MYCO
|
||||||
|
jp z, .trykickright
|
||||||
|
ldh a, [hCurrentPiece]
|
||||||
|
|
||||||
; S/Z always kick.
|
; S/Z always kick.
|
||||||
cp a, PIECE_S
|
cp a, PIECE_S
|
||||||
jr z, .trykickright
|
jr z, .trykickright
|
||||||
|
@ -2187,10 +2193,13 @@ FieldDelay::
|
||||||
cp a, 0
|
cp a, 0
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
; Add one level if we're not at a breakpoint.
|
; Add one level if we're not at a breakpoint and not in MYCO speed curve.
|
||||||
ldh a, [hRequiresLineClear]
|
ldh a, [hRequiresLineClear]
|
||||||
cp a, $FF
|
cp a, $FF
|
||||||
jr z, .generatenextpiece
|
jr z, .generatenextpiece
|
||||||
|
ld a, [wSpeedCurveState]
|
||||||
|
cp a, SCURVE_MYCO
|
||||||
|
jr z, .generatenextpiece
|
||||||
ld e, 1
|
ld e, 1
|
||||||
call LevelUp
|
call LevelUp
|
||||||
|
|
||||||
|
@ -3283,6 +3292,12 @@ BigFieldProcess::
|
||||||
cp a, PIECE_O
|
cp a, PIECE_O
|
||||||
jp z, .norot
|
jp z, .norot
|
||||||
|
|
||||||
|
; MYCO always tries to kick.
|
||||||
|
ld a, [wRotModeState]
|
||||||
|
cp a, ROT_MODE_MYCO
|
||||||
|
jp z, .trykickright
|
||||||
|
ldh a, [hCurrentPiece]
|
||||||
|
|
||||||
; S/Z always kick.
|
; S/Z always kick.
|
||||||
cp a, PIECE_S
|
cp a, PIECE_S
|
||||||
jr z, .trykickright
|
jr z, .trykickright
|
||||||
|
@ -4417,10 +4432,13 @@ BigFieldDelay::
|
||||||
cp a, 0
|
cp a, 0
|
||||||
jp nz, BigWidenField
|
jp nz, BigWidenField
|
||||||
|
|
||||||
; Add one level if we're not at a breakpoint.
|
; Add one level if we're not at a breakpoint and not in MYCO speed curve.
|
||||||
ldh a, [hRequiresLineClear]
|
ldh a, [hRequiresLineClear]
|
||||||
cp a, $FF
|
cp a, $FF
|
||||||
jr z, .generatenextpiece
|
jr z, .generatenextpiece
|
||||||
|
ld a, [wSpeedCurveState]
|
||||||
|
cp a, SCURVE_MYCO
|
||||||
|
jr z, .generatenextpiece
|
||||||
ld e, 1
|
ld e, 1
|
||||||
call LevelUp
|
call LevelUp
|
||||||
|
|
||||||
|
|
|
@ -312,6 +312,8 @@ GBCGameplayProcess::
|
||||||
ld a, [wSpeedCurveState]
|
ld a, [wSpeedCurveState]
|
||||||
cp a, SCURVE_CHIL
|
cp a, SCURVE_CHIL
|
||||||
ld a, $01 ;Green
|
ld a, $01 ;Green
|
||||||
|
jr z, .goverride
|
||||||
|
ld a, $02 ;Green
|
||||||
|
|
||||||
; Are we 20G?
|
; Are we 20G?
|
||||||
.goverride
|
.goverride
|
||||||
|
@ -526,6 +528,8 @@ GBCBigGameplayProcess::
|
||||||
ld a, [wSpeedCurveState]
|
ld a, [wSpeedCurveState]
|
||||||
cp a, SCURVE_CHIL
|
cp a, SCURVE_CHIL
|
||||||
ld a, $01 ;Green
|
ld a, $01 ;Green
|
||||||
|
jr z, .goverride
|
||||||
|
ld a, $02 ;Green
|
||||||
|
|
||||||
; Are we 20G?
|
; Are we 20G?
|
||||||
.goverride
|
.goverride
|
||||||
|
|
|
@ -278,6 +278,7 @@ UpdateGrade::
|
||||||
jp UpdateGradeDEAT ;DEAT
|
jp UpdateGradeDEAT ;DEAT
|
||||||
jp UpdateGradeSHIR ;SHIR
|
jp UpdateGradeSHIR ;SHIR
|
||||||
no_jump ;CHIL
|
no_jump ;CHIL
|
||||||
|
no_jump ;MYCO
|
||||||
|
|
||||||
|
|
||||||
; Jumps to the grade decay function for the current mode.
|
; Jumps to the grade decay function for the current mode.
|
||||||
|
@ -300,6 +301,7 @@ DecayGradeProcess::
|
||||||
no_jump ;DEAT
|
no_jump ;DEAT
|
||||||
no_jump ;SHIR
|
no_jump ;SHIR
|
||||||
no_jump ;CHIL
|
no_jump ;CHIL
|
||||||
|
no_jump ;MYCO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -324,6 +326,7 @@ DecayGradeDelay::
|
||||||
no_jump ;DEAT
|
no_jump ;DEAT
|
||||||
no_jump ;SHIR
|
no_jump ;SHIR
|
||||||
no_jump ;CHIL
|
no_jump ;CHIL
|
||||||
|
no_jump ;MYCO
|
||||||
|
|
||||||
|
|
||||||
; Get the four most significant figures of the score in BC as BCD.
|
; Get the four most significant figures of the score in BC as BCD.
|
||||||
|
|
|
@ -233,6 +233,7 @@ DEF TILE_PIECE_BONE EQU 104
|
||||||
DEF TILE_SMALL_0 EQU 213
|
DEF TILE_SMALL_0 EQU 213
|
||||||
DEF TILE_BONE EQU 104
|
DEF TILE_BONE EQU 104
|
||||||
DEF TILE_QUEUE_BONE EQU 105
|
DEF TILE_QUEUE_BONE EQU 105
|
||||||
|
DEF TILE_ROT_MODE_MYCO EQU 253
|
||||||
DEF GAME_OVER_R10 EQU 147
|
DEF GAME_OVER_R10 EQU 147
|
||||||
DEF GAME_OVER_R12 EQU 167
|
DEF GAME_OVER_R12 EQU 167
|
||||||
DEF GAME_OVER_R14 EQU 187
|
DEF GAME_OVER_R14 EQU 187
|
||||||
|
@ -257,7 +258,8 @@ DEF TILE_ROT_MODE_BASE EQU 135
|
||||||
DEF ROT_MODE_ARS EQU 0
|
DEF ROT_MODE_ARS EQU 0
|
||||||
DEF ROT_MODE_ARSTI EQU 1
|
DEF ROT_MODE_ARSTI EQU 1
|
||||||
DEF ROT_MODE_NES EQU 2
|
DEF ROT_MODE_NES EQU 2
|
||||||
DEF ROT_MODE_COUNT EQU 3
|
DEF ROT_MODE_MYCO EQU 3
|
||||||
|
DEF ROT_MODE_COUNT EQU 4
|
||||||
|
|
||||||
; Drop mode.
|
; Drop mode.
|
||||||
DEF TILE_DROP_MODE_BASE EQU 138
|
DEF TILE_DROP_MODE_BASE EQU 138
|
||||||
|
@ -276,7 +278,8 @@ DEF SCURVE_TGM3 EQU 2
|
||||||
DEF SCURVE_DEAT EQU 3
|
DEF SCURVE_DEAT EQU 3
|
||||||
DEF SCURVE_SHIR EQU 4
|
DEF SCURVE_SHIR EQU 4
|
||||||
DEF SCURVE_CHIL EQU 5
|
DEF SCURVE_CHIL EQU 5
|
||||||
DEF SCURVE_COUNT EQU 6
|
DEF SCURVE_MYCO EQU 6
|
||||||
|
DEF SCURVE_COUNT EQU 7
|
||||||
|
|
||||||
; 20G mode.
|
; 20G mode.
|
||||||
DEF TILE_HIG_MODE_BASE EQU 143
|
DEF TILE_HIG_MODE_BASE EQU 143
|
||||||
|
|
40
src/main.asm
40
src/main.asm
|
@ -63,25 +63,10 @@ Main::
|
||||||
ld a, BANK_OTHER
|
ld a, BANK_OTHER
|
||||||
ld [rROMB0], a
|
ld [rROMB0], a
|
||||||
|
|
||||||
; Harvest entropy
|
|
||||||
call HarvestEntropy
|
|
||||||
|
|
||||||
; Let the DMG have some fun with the initial screen.
|
|
||||||
call DoDMGEffect
|
|
||||||
|
|
||||||
; Turn off LCD during initialization, but not on DMG.
|
|
||||||
ld a, [wInitialA]
|
|
||||||
cp a, $11
|
|
||||||
jr nz, :+
|
|
||||||
|
|
||||||
wait_vram
|
|
||||||
xor a, a
|
|
||||||
ldh [rLCDC], a
|
|
||||||
|
|
||||||
; Set up stack
|
; Set up stack
|
||||||
: ld sp, wStackEnd-1
|
ld sp, wStackEnd-1
|
||||||
|
|
||||||
; GBC? Double speed mode and set up palettes.
|
; GBC? Double speed.
|
||||||
ld a, [wInitialA]
|
ld a, [wInitialA]
|
||||||
cp a, $11
|
cp a, $11
|
||||||
jr nz, .notgbc
|
jr nz, .notgbc
|
||||||
|
@ -90,6 +75,17 @@ Main::
|
||||||
stop
|
stop
|
||||||
.notgbc
|
.notgbc
|
||||||
|
|
||||||
|
; Harvest entropy
|
||||||
|
call HarvestEntropy
|
||||||
|
|
||||||
|
; Let the DMG have some fun with the initial screen.
|
||||||
|
call DoDMGEffect
|
||||||
|
|
||||||
|
; Turn off LCD during initialization.
|
||||||
|
wait_vram
|
||||||
|
xor a, a
|
||||||
|
ldh [rLCDC], a
|
||||||
|
|
||||||
; Clear OAM.
|
; Clear OAM.
|
||||||
call ClearOAM
|
call ClearOAM
|
||||||
call SetNumberSpritePositions
|
call SetNumberSpritePositions
|
||||||
|
@ -101,13 +97,13 @@ Main::
|
||||||
call IntrInit
|
call IntrInit
|
||||||
call InputInit
|
call InputInit
|
||||||
call SFXInit
|
call SFXInit
|
||||||
|
call BankingInit
|
||||||
|
|
||||||
|
xor a, a
|
||||||
|
ldh [hMode], a
|
||||||
|
|
||||||
; Set up the interrupt handlers.
|
; Set up the interrupt handlers.
|
||||||
ld a, [wInitialA]
|
call InitializeLCDCInterrupt
|
||||||
cp a, $11
|
|
||||||
jr z, :+
|
|
||||||
wait_vblank
|
|
||||||
: call InitializeLCDCInterrupt
|
|
||||||
|
|
||||||
; Switch to gameplay state.
|
; Switch to gameplay state.
|
||||||
call SwitchToTitle
|
call SwitchToTitle
|
||||||
|
|
|
@ -625,6 +625,111 @@ sSHIRSpeedCurve::
|
||||||
sSHIRSpeedCurveEnd::
|
sSHIRSpeedCurveEnd::
|
||||||
dw $FFFF
|
dw $FFFF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; dw BCD_START_LEVEL, START_LEVEL, BCD_NEXT_100_LEVEL_BREAKPOINT
|
||||||
|
; db GRID_CELLS_PER_MOVE_ON_OVERFLOW, INCREMENT_PER_FRAME (0 means overflow each frame)
|
||||||
|
; db NORMAL_ARE, LINE_ARE, DAS, LOCK_DELAY, CLEAR_DELAY
|
||||||
|
sMYCOSpeedCurve::
|
||||||
|
dw $0000, 0, $0100
|
||||||
|
db 1, 4
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0005, 5, $0100
|
||||||
|
db 1, 6
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0009, 9, $0100
|
||||||
|
db 1, 8
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0013, 13, $0100
|
||||||
|
db 1, 10
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0017, 17, $0100
|
||||||
|
db 1, 12
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0021, 21, $0100
|
||||||
|
db 1, 16
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0025, 25, $0100
|
||||||
|
db 1, 32
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0029, 29, $0100
|
||||||
|
db 1, 48
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0033, 33, $0100
|
||||||
|
db 1, 64
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0037, 37, $0100
|
||||||
|
db 1, 80
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0041, 41, $0100
|
||||||
|
db 1, 96
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0045, 45, $0100
|
||||||
|
db 1, 112
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0049, 49, $0100
|
||||||
|
db 1, 128
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0053, 53, $0100
|
||||||
|
db 1, 144
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0057, 57, $0100
|
||||||
|
db 1, 160
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0061, 61, $0100
|
||||||
|
db 1, 192
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0065, 65, $0100
|
||||||
|
db 1, 224
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0069, 69, $0100
|
||||||
|
db 1, $00
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0090, 90, $0100
|
||||||
|
db 2, $00
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0100, 100, $0200
|
||||||
|
db 3, $00
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0120, 120, $0200
|
||||||
|
db 4, $00
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0135, 135, $0200
|
||||||
|
db 5, $00
|
||||||
|
db 20, 20, 12, 30, 20
|
||||||
|
|
||||||
|
dw $0150, 150, $0200
|
||||||
|
db 20, $00
|
||||||
|
db 20, 20, 8, 30, 20
|
||||||
|
|
||||||
|
dw $0300, 300, $0400
|
||||||
|
db 20, $00
|
||||||
|
db 1, 1, 1, 1, 1
|
||||||
|
|
||||||
|
sMYCOSpeedCurveEnd::
|
||||||
|
dw $FFFF
|
||||||
|
|
||||||
sSharedTiles::
|
sSharedTiles::
|
||||||
DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
|
@ -1554,8 +1659,8 @@ sGameplayTilesM::
|
||||||
DB $00,$FF,$00,$00,$00,$00,$00,$00
|
DB $00,$FF,$00,$00,$00,$00,$00,$00
|
||||||
DB $00,$00,$00,$00,$00,$F0,$00,$08
|
DB $00,$00,$00,$00,$00,$F0,$00,$08
|
||||||
DB $00,$F0,$00,$00,$00,$00,$00,$00
|
DB $00,$F0,$00,$00,$00,$00,$00,$00
|
||||||
DB $00,$00,$00,$00,$00,$00,$00,$00
|
DB $18,$18,$2C,$34,$62,$5E,$76,$6E
|
||||||
DB $00,$00,$00,$00,$00,$00,$00,$00
|
DB $24,$3C,$24,$3C,$18,$18,$00,$00
|
||||||
DB $00,$00,$00,$00,$00,$00,$00,$00
|
DB $00,$00,$00,$00,$00,$00,$00,$00
|
||||||
DB $00,$00,$00,$00,$00,$00,$00,$00
|
DB $00,$00,$00,$00,$00,$00,$00,$00
|
||||||
DB $00,$00,$00,$00,$00,$00,$00,$00
|
DB $00,$00,$00,$00,$00,$00,$00,$00
|
||||||
|
@ -1973,8 +2078,8 @@ sGameplayTilesC::
|
||||||
DB $00,$FF,$00,$00,$00,$00,$00,$00
|
DB $00,$FF,$00,$00,$00,$00,$00,$00
|
||||||
DB $00,$00,$00,$00,$00,$F0,$00,$08
|
DB $00,$00,$00,$00,$00,$F0,$00,$08
|
||||||
DB $00,$F0,$00,$00,$00,$00,$00,$00
|
DB $00,$F0,$00,$00,$00,$00,$00,$00
|
||||||
DB $00,$00,$00,$00,$00,$00,$00,$00
|
DB $18,$18,$2C,$34,$62,$5E,$76,$6E
|
||||||
DB $00,$00,$00,$00,$00,$00,$00,$00
|
DB $24,$3C,$24,$3C,$18,$18,$00,$00
|
||||||
DB $00,$00,$00,$00,$00,$00,$00,$00
|
DB $00,$00,$00,$00,$00,$00,$00,$00
|
||||||
DB $00,$00,$00,$00,$00,$00,$00,$00
|
DB $00,$00,$00,$00,$00,$00,$00,$00
|
||||||
DB $00,$00,$00,$00,$00,$00,$00,$00
|
DB $00,$00,$00,$00,$00,$00,$00,$00
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -50,6 +50,7 @@ sOption2::
|
||||||
db "ARS1"
|
db "ARS1"
|
||||||
db "ARS2"
|
db "ARS2"
|
||||||
db " NES"
|
db " NES"
|
||||||
|
db "MYCO"
|
||||||
|
|
||||||
sOption3::
|
sOption3::
|
||||||
db "FIRM"
|
db "FIRM"
|
||||||
|
@ -65,6 +66,7 @@ sOption4::
|
||||||
db "DEAT"
|
db "DEAT"
|
||||||
db "SHIR"
|
db "SHIR"
|
||||||
db "CHIL"
|
db "CHIL"
|
||||||
|
db "MYCO"
|
||||||
|
|
||||||
sOption5::
|
sOption5::
|
||||||
db " NO"
|
db " NO"
|
||||||
|
|
28
src/rng.asm
28
src/rng.asm
|
@ -39,32 +39,28 @@ wTGM3WorstDroughtIdx: ds 1
|
||||||
|
|
||||||
section "RNG Functions", ROM0
|
section "RNG Functions", ROM0
|
||||||
HarvestEntropy::
|
HarvestEntropy::
|
||||||
ld hl, $D000
|
ld hl, $C000
|
||||||
ld de, $E000
|
ld de, $E000
|
||||||
.loop
|
.loop
|
||||||
ldh a, [hRNGSeed]
|
ldh a, [hRNGSeed]
|
||||||
xor a, [hl]
|
xor a, [hl]
|
||||||
|
inc hl
|
||||||
ldh [hRNGSeed], a
|
ldh [hRNGSeed], a
|
||||||
xor a, a
|
|
||||||
ld [hl+], a
|
|
||||||
|
|
||||||
ldh a, [hRNGSeed+1]
|
ldh a, [hRNGSeed+1]
|
||||||
xor a, [hl]
|
xor a, [hl]
|
||||||
|
inc hl
|
||||||
ldh [hRNGSeed+1], a
|
ldh [hRNGSeed+1], a
|
||||||
xor a, a
|
|
||||||
ld [hl+], a
|
|
||||||
|
|
||||||
ldh a, [hRNGSeed+2]
|
ldh a, [hRNGSeed+2]
|
||||||
xor a, [hl]
|
xor a, [hl]
|
||||||
|
inc hl
|
||||||
ldh [hRNGSeed+2], a
|
ldh [hRNGSeed+2], a
|
||||||
xor a, a
|
|
||||||
ld [hl+], a
|
|
||||||
|
|
||||||
ldh a, [hRNGSeed+3]
|
ldh a, [hRNGSeed+3]
|
||||||
xor a, [hl]
|
xor a, [hl]
|
||||||
|
inc hl
|
||||||
ldh [hRNGSeed+3], a
|
ldh [hRNGSeed+3], a
|
||||||
xor a, a
|
|
||||||
ld [hl+], a
|
|
||||||
|
|
||||||
ld a, h
|
ld a, h
|
||||||
cp a, d
|
cp a, d
|
||||||
|
@ -122,6 +118,15 @@ RNGInit::
|
||||||
jr nz, .complexinit
|
jr nz, .complexinit
|
||||||
call Next7Piece
|
call Next7Piece
|
||||||
ld [hUpcomingPiece2], a
|
ld [hUpcomingPiece2], a
|
||||||
|
call Next7Piece
|
||||||
|
ld [hUpcomingPiece1], a
|
||||||
|
call Next7Piece
|
||||||
|
ld [hNextPiece], a
|
||||||
|
xor a, a
|
||||||
|
ldh [hPieceHistory], a
|
||||||
|
ldh [hPieceHistory+1], a
|
||||||
|
ldh [hPieceHistory+2], a
|
||||||
|
ldh [hPieceHistory+3], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; Otherwise do complex init.
|
; Otherwise do complex init.
|
||||||
|
@ -150,7 +155,8 @@ RNGInit::
|
||||||
|
|
||||||
; Save the generated piece and put it in the history.
|
; Save the generated piece and put it in the history.
|
||||||
ldh [hPieceHistory], a
|
ldh [hPieceHistory], a
|
||||||
ld [hUpcomingPiece2], a
|
ldh [hUpcomingPiece1], a
|
||||||
|
ldh [hUpcomingPiece2], a
|
||||||
|
|
||||||
; Generate the next 2 to fill up the queue.
|
; Generate the next 2 to fill up the queue.
|
||||||
call GetNextPiece
|
call GetNextPiece
|
||||||
|
@ -298,7 +304,7 @@ GetNextTGM3Piece:
|
||||||
inc [hl]
|
inc [hl]
|
||||||
|
|
||||||
; Set the drought of our most recently drawn piece to 0.
|
; Set the drought of our most recently drawn piece to 0.
|
||||||
: ldh a, [hCurrentPiece]
|
: ldh a, [hUpcomingPiece2]
|
||||||
ld c, a
|
ld c, a
|
||||||
xor a, a
|
xor a, a
|
||||||
ld b, a
|
ld b, a
|
||||||
|
|
|
@ -104,7 +104,7 @@ ClearOAM::
|
||||||
ld hl, _OAMRAM
|
ld hl, _OAMRAM
|
||||||
ld bc, 160
|
ld bc, 160
|
||||||
ld d, 0
|
ld d, 0
|
||||||
call SafeMemSet
|
call UnsafeMemSet
|
||||||
ld hl, wShadowOAM
|
ld hl, wShadowOAM
|
||||||
ld bc, 160
|
ld bc, 160
|
||||||
ld d, 0
|
ld d, 0
|
||||||
|
@ -139,9 +139,16 @@ ApplyTells::
|
||||||
ld [wSPRModeRNG+2], a
|
ld [wSPRModeRNG+2], a
|
||||||
|
|
||||||
ld a, [wRotModeState]
|
ld a, [wRotModeState]
|
||||||
|
cp a, ROT_MODE_MYCO
|
||||||
|
jr z, .myco
|
||||||
add a, TILE_ROT_MODE_BASE
|
add a, TILE_ROT_MODE_BASE
|
||||||
ld [wSPRModeRot+2], a
|
ld [wSPRModeRot+2], a
|
||||||
|
jr .dropmode
|
||||||
|
.myco
|
||||||
|
ld a, TILE_ROT_MODE_MYCO
|
||||||
|
ld [wSPRModeRot+2], a
|
||||||
|
|
||||||
|
.dropmode
|
||||||
ld a, [wDropModeState]
|
ld a, [wDropModeState]
|
||||||
add a, TILE_DROP_MODE_BASE
|
add a, TILE_DROP_MODE_BASE
|
||||||
ld [wSPRModeDrop+2], a
|
ld [wSPRModeDrop+2], a
|
||||||
|
|
|
@ -575,7 +575,11 @@ GetEnd:
|
||||||
jr nz, :+
|
jr nz, :+
|
||||||
ld bc, sSHIRSpeedCurveEnd
|
ld bc, sSHIRSpeedCurveEnd
|
||||||
ret
|
ret
|
||||||
: ld bc, sCHILSpeedCurveEnd
|
: cp a, SCURVE_CHIL
|
||||||
|
jr nz, :+
|
||||||
|
ld bc, sCHILSpeedCurveEnd
|
||||||
|
ret
|
||||||
|
: ld bc, sMYCOSpeedCurveEnd
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
@ -602,7 +606,11 @@ GetStart:
|
||||||
jr nz, :+
|
jr nz, :+
|
||||||
ld hl, sSHIRSpeedCurve
|
ld hl, sSHIRSpeedCurve
|
||||||
ret
|
ret
|
||||||
: ld hl, sCHILSpeedCurve
|
: cp a, SCURVE_CHIL
|
||||||
|
jr nz, :+
|
||||||
|
ld hl, sCHILSpeedCurve
|
||||||
|
ret
|
||||||
|
: ld hl, sMYCOSpeedCurve
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue