diff --git a/src/state_gameplay.asm b/src/state_gameplay.asm index 88e3bc4..b90cdb4 100644 --- a/src/state_gameplay.asm +++ b/src/state_gameplay.asm @@ -255,7 +255,6 @@ pieceInMotionMode: ld [wMode], a ; No fall through this time. - : jr drawStaticInfo @@ -264,7 +263,34 @@ delayMode: gameOverMode: - ; TODO. + ld de, sGameOver + ld hl, wField+(10*10) + ld bc, 10 + call UnsafeMemCopy + + ; Retry? + ldh a, [hAState] + cp a, 1 + jr nz, :+ + call RNGInit + call ScoreInit + call LevelInit + call FieldInit + ld a, PIECE_NONE + ldh [hHeldPiece], a + xor a, a + ldh [hHoldSpent], a + ld a, MODE_LEADY + ld [wMode], a + ld a, 90 + ld [wModeCounter], a + jr drawStaticInfo + + ; Quit +: ldh a, [hBState] + cp a, 1 + jp z, $100 + jr drawStaticInfo ; Always draw the score, level, next piece, and held piece. diff --git a/tools/Emulicious.ini b/tools/Emulicious.ini index 581a548..b5dc806 100644 --- a/tools/Emulicious.ini +++ b/tools/Emulicious.ini @@ -1,5 +1,5 @@ #Emulicious settings file -#Fri Oct 20 08:40:06 CEST 2023 +#Fri Oct 20 08:52:26 CEST 2023 WindowEventViewerWindowHeight=1416 WindowEventViewerWindowDivider=876 WindowMemoryTracerWindowY=631