Big challenge rolls.

This commit is contained in:
Randy Thiemann 2023-11-09 21:26:17 +01:00
parent 100d40c4e6
commit f4429139d4
8 changed files with 3155 additions and 3097 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -237,6 +237,26 @@ FromBackupField::
ld bc, 10*24 ld bc, 10*24
jp UnsafeMemCopy jp UnsafeMemCopy
GoBig::
ld hl, wWideBlittedField
ld bc, 10*22
ld d, TILE_BLANK
call UnsafeMemSet
ld hl, wField
ld bc, 10*24
ld d, 0
call UnsafeMemSet
DEF row = 0
REPT 14
ld hl, wField + (row*10)
ld bc, 5
ld d, TILE_FIELD_EMPTY
call UnsafeMemSet
DEF row += 1
ENDR
ld a, STATE_GAMEPLAY_BIG
ldh [hGameState], a
ret
; Copies the field to the shadow field. ; Copies the field to the shadow field.
; This shadow field is used to calculate whether or not the piece can fit. ; This shadow field is used to calculate whether or not the piece can fit.

View File

@ -46,6 +46,7 @@ wKillScreenActivationLevel: ds 2
wKillScreenActivationLevelBCD: ds 2 wKillScreenActivationLevelBCD: ds 2
wLastLockLevel: ds 2 wLastLockLevel: ds 2
wStaffRollDuration:: ds 2 wStaffRollDuration:: ds 2
wBigStaffRoll:: ds 1
wBonesActive:: ds 1 wBonesActive:: ds 1
wInvisActive:: ds 1 wInvisActive:: ds 1
wKillScreenActive:: ds 1 wKillScreenActive:: ds 1
@ -202,8 +203,10 @@ SpecialLevelInit:
ld [wLastLockLevel+1], a ld [wLastLockLevel+1], a
ld a, [hl+] ld a, [hl+]
ld [wStaffRollDuration], a ld [wStaffRollDuration], a
ld a, [hl] ld a, [hl+]
ld [wStaffRollDuration+1], a ld [wStaffRollDuration+1], a
ld a, [hl]
ld [wBigStaffRoll], a
ret ret

View File

@ -198,6 +198,7 @@ sDMGTSpeedCurveSpecialData::
dw $9999 ; Same but in BCD. dw $9999 ; Same but in BCD.
dw 9998 ; If the last level lock isn't at x99, where is it? dw 9998 ; If the last level lock isn't at x99, where is it?
dw 3600 ; How long does the staff roll last after the kill screen, in frames. dw 3600 ; How long does the staff roll last after the kill screen, in frames.
db $FF ; Big mode in staff roll?
sTGM1SpeedCurve:: sTGM1SpeedCurve::
@ -337,6 +338,10 @@ sTGM1SpeedCurve::
db 20, $00 db 20, $00
db 30, 30, 16, 30, 41 db 30, 30, 16, 30, 41
dw $0995, 995, $0999
db 20, $00
db 30, 30, 16, 30, 41
sTGM1SpeedCurveEnd:: sTGM1SpeedCurveEnd::
dw $FFFF dw $FFFF
@ -347,6 +352,7 @@ sTGM1SpeedCurveSpecialData::
dw $0999 ; Same but in BCD. dw $0999 ; Same but in BCD.
dw 998 ; If the last level lock isn't at x99, where is it? dw 998 ; If the last level lock isn't at x99, where is it?
dw 3600 ; How long does the staff roll last after the kill screen, in frames. dw 3600 ; How long does the staff roll last after the kill screen, in frames.
db $FF ; Big mode in staff roll?
sCHILSpeedCurve:: sCHILSpeedCurve::
@ -448,6 +454,7 @@ sCHILSpeedCurveSpecialData::
dw $9999 ; Same but in BCD. dw $9999 ; Same but in BCD.
dw 9998 ; If the last level lock isn't at x99, where is it? dw 9998 ; If the last level lock isn't at x99, where is it?
dw $FFFF ; How long does the staff roll last after the kill screen, in frames. dw $FFFF ; How long does the staff roll last after the kill screen, in frames.
db $00 ; Big mode in staff roll?
sTGM3SpeedCurve:: sTGM3SpeedCurve::
@ -609,6 +616,7 @@ sTGM3SpeedCurveSpecialData::
dw $1299 ; Same but in BCD. dw $1299 ; Same but in BCD.
dw 1298 ; If the last level lock isn't at x99, where is it? dw 1298 ; If the last level lock isn't at x99, where is it?
dw 3600 ; How long does the staff roll last after the kill screen, in frames. dw 3600 ; How long does the staff roll last after the kill screen, in frames.
db $00 ; Big mode in staff roll?
sDEATSpeedCurve:: sDEATSpeedCurve::
dw $0000, 0, $0100 dw $0000, 0, $0100
@ -661,6 +669,7 @@ sDEATSpeedCurveSpecialData::
dw $0999 ; Same but in BCD. dw $0999 ; Same but in BCD.
dw 998 ; If the last level lock isn't at x99, where is it? dw 998 ; If the last level lock isn't at x99, where is it?
dw 3600 ; How long does the staff roll last after the kill screen, in frames. dw 3600 ; How long does the staff roll last after the kill screen, in frames.
db $00 ; Big mode in staff roll?
sSHIRSpeedCurve:: sSHIRSpeedCurve::
@ -697,11 +706,12 @@ sSHIRSpeedCurveEnd::
sSHIRSpeedCurveSpecialData:: sSHIRSpeedCurveSpecialData::
dw 900 ; When do we get bones? dw 900 ; When do we get bones?
dw 1300 ; When do blocks turn invisible? dw $FFFF ; When do blocks turn invisible?
dw 1300 ; When is the hard kill screen? dw 1300 ; When is the hard kill screen?
dw $1300 ; Same but in BCD. dw $1300 ; Same but in BCD.
dw $FFFF ; If the last level lock isn't at x99, where is it? dw $FFFF ; If the last level lock isn't at x99, where is it?
dw 3600 ; How long does the staff roll last after the kill screen, in frames. dw 3600 ; How long does the staff roll last after the kill screen, in frames.
db $FF ; Big mode in staff roll?
sMYCOSpeedCurve:: sMYCOSpeedCurve::
@ -815,6 +825,7 @@ sMYCOSpeedCurveSpecialData::
dw $0300 ; Same but in BCD. dw $0300 ; Same but in BCD.
dw $FFFF ; If the last level lock isn't at x99, where is it? dw $FFFF ; If the last level lock isn't at x99, where is it?
dw $FFFF ; How long does the staff roll last after the kill screen, in frames. dw $FFFF ; How long does the staff roll last after the kill screen, in frames.
db $00 ; Big mode in staff roll?
sSharedTiles:: sSharedTiles::

View File

@ -40,6 +40,7 @@ hRequestedJingle: ds 1
SECTION "Gameplay Variables", WRAM0 SECTION "Gameplay Variables", WRAM0
wRollLine: ds 1 wRollLine: ds 1
wInStaffRoll:: ds 1 wInStaffRoll:: ds 1
wBigModeTransfered: ds 1
SECTION "Gameplay Function Trampolines", ROM0 SECTION "Gameplay Function Trampolines", ROM0
@ -444,6 +445,10 @@ GamePlayEventLoopHandlerB::
.preGameOverMode .preGameOverMode
xor a, a
ldh [hAState], a
ldh [hBState], a
; Is it just a regular game over? ; Is it just a regular game over?
ld a, [wKillScreenActive] ld a, [wKillScreenActive]
cp a, $FF cp a, $FF
@ -668,6 +673,7 @@ GamePlayEventLoopHandlerB::
ld hl, wField+(20*10) ld hl, wField+(20*10)
ld bc, 40 ld bc, 40
call UnsafeMemCopy call UnsafeMemCopy
jr .drawStaticInfo
; Prepare for staff roll. ; Prepare for staff roll.
@ -702,11 +708,16 @@ GamePlayEventLoopHandlerB::
.predone .predone
call FieldClear call FieldClear
call ToShadowField
ld a, MODE_PREFETCHED_PIECE ld a, MODE_PREFETCHED_PIECE
ldh [hMode], a ldh [hMode], a
ld a, $FF ld a, $FF
ld [wInStaffRoll], a ld [wInStaffRoll], a
ld a, [wBigStaffRoll]
cp a, $FF
jr nz, .staysmall
call GoBig
.staysmall
call ToShadowField
ldh a, [hNextPiece] ldh a, [hNextPiece]
ldh [hCurrentPiece], a ldh [hCurrentPiece], a
call GetNextPiece call GetNextPiece
@ -715,7 +726,7 @@ GamePlayEventLoopHandlerB::
ld a, [hl+] ld a, [hl+]
ld c, a ld c, a
ld b, [hl] ld b, [hl]
call StartCountdown jp StartCountdown
; Always draw the score, level, next piece, and held piece. ; Always draw the score, level, next piece, and held piece.
@ -1189,6 +1200,10 @@ GamePlayBigEventLoopHandlerB:
.preGameOverMode .preGameOverMode
xor a, a
ldh [hAState], a
ldh [hBState], a
; Is it just a regular game over? ; Is it just a regular game over?
ld a, [wKillScreenActive] ld a, [wKillScreenActive]
cp a, $FF cp a, $FF
@ -1414,6 +1429,7 @@ GamePlayBigEventLoopHandlerB:
ld hl, wWideBlittedField+(20*10) ld hl, wWideBlittedField+(20*10)
ld bc, 20 ld bc, 20
call UnsafeMemCopy call UnsafeMemCopy
jp .drawStaticInfo
; Prepare for staff roll. ; Prepare for staff roll.