From d99db5b7b663583d5eb26994336e8bb809f00529 Mon Sep 17 00:00:00 2001 From: Ashif Khan Date: Sat, 12 Sep 2026 21:02:32 +0530 Subject: tweaking --- screen/gameplay.cpp | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'screen/gameplay.cpp') diff --git a/screen/gameplay.cpp b/screen/gameplay.cpp index 2f30c78..430c18d 100644 --- a/screen/gameplay.cpp +++ b/screen/gameplay.cpp @@ -13,20 +13,36 @@ void drawGameplay(GameState &gs){ + if (gs.GameOver && !IsDialogRunning(gs)) { + if (gs.GameOverTime == -1.0f){ + gs.GameOverTime = GetTime(); + } + + float t = (GetTime() - gs.GameOverTime)/2.0f; + if (t > 1.0f) return; + + float a = 0.5f - 0.5f * cosf(t * PI); + + DrawTextureV(getCurrentScene(gs, gs.curPos), + ZERO_VEC, + ColorAlpha(WHITE, 1.0f - a)); + return; + } + if (gs.timeSinceSceneChange == -1) { DrawTextureV(getCurrentScene(gs), ZERO_VEC, WHITE); + drawCirno(gs); + if (gs.curExp != HURT && gs.flowerOnHead) { + DrawTextureV(gs.AssetManager.load("flower"), ZERO_VEC, WHITE); + } } else { DrawSceneChange(gs); } if (gs.curExp != NEUTRAL && !IsDialogRunning(gs)) { gs.curExp = NEUTRAL; } - drawCirno(gs); - if (gs.curExp != HURT && gs.flowerOnHead) { - DrawTextureV(gs.AssetManager.load("flower"), ZERO_VEC, WHITE); - } if (DEBUG) { DrawText(TextFormat("%d, %d", (int)gs.currentMousePos.x, (int)gs.currentMousePos.y), 0, 40, 20, YELLOW);} - ui::DrawText(TextFormat("Explored : %d/13", gs.explored.size()), 20, 10, 26, RED); + ui::DrawText(TextFormat("Explored : %d/12", gs.explored.size()), 5, 5, 17, RED); if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT) and !IsDialogRunning(gs)) { ProcessClick(gs); } -- cgit v1.2.3