Initial delay mode code.

This commit is contained in:
Randy Thiemann 2023-10-20 08:46:11 +02:00
parent 61ef24a9e8
commit c024598ce5
2 changed files with 12 additions and 2 deletions

View File

@ -361,6 +361,9 @@ CanPieceFit:
TrySpawnPiece::
; Always reset these for a new piece.
ldh a, [hCurrentLockDelay]
ldh [hCurrentLockDelayRemaining], a
ldh a, [hCurrentFramesPerGravityTick]
ldh [hTicksUntilG], a
@ -771,6 +774,9 @@ FieldProcess::
.postmove
; TODO: Do we need to reset the lock timer?
; TODO: Do we need to decrement the lock timer?
; TODO: What tile do we use to draw the piece?
; Draw the piece.
@ -791,7 +797,6 @@ FieldProcess::
pop hl
pop de
call DrawPiece
ret
ENDC

View File

@ -248,7 +248,12 @@ pieceInMotionMode:
ld [wMode], a
; Do we go into delay state?
; TODO
ldh a, [hCurrentLockDelayRemaining]
cp a, 0
jr nz, :+
ld a, MODE_DELAY
ld [wMode], a
; No fall through this time.
: jr drawStaticInfo