diff --git a/src/field.asm b/src/field.asm index 46f9287..e1640f8 100644 --- a/src/field.asm +++ b/src/field.asm @@ -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 diff --git a/src/state_gameplay.asm b/src/state_gameplay.asm index f52dbf4..88e3bc4 100644 --- a/src/state_gameplay.asm +++ b/src/state_gameplay.asm @@ -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