summaryrefslogtreecommitdiff
path: root/screen/gameplay.cpp
diff options
context:
space:
mode:
authorAshif Khan <[email protected]>2026-09-12 21:02:32 +0530
committerAshif Khan <[email protected]>2026-09-12 21:02:32 +0530
commitd99db5b7b663583d5eb26994336e8bb809f00529 (patch)
treebb5ee6938d3744dde3269d8da0c65ec2bb2b1dbb /screen/gameplay.cpp
parentffd968a26826108ca9fb23d46ed5789260852eb7 (diff)
tweaking
Diffstat (limited to 'screen/gameplay.cpp')
-rw-r--r--screen/gameplay.cpp26
1 files changed, 21 insertions, 5 deletions
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);
}