diff --git a/resources/w/ui/img/toast/item_received001.png b/resources/w/ui/img/toast/item_received001.png index 392051a..7320f2d 100644 --- a/resources/w/ui/img/toast/item_received001.png +++ b/resources/w/ui/img/toast/item_received001.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a825f6422d9cdb65d9277521be95e8a8c8e3aaa64334af7ce5c5c015950c3039 -size 387816 +oid sha256:9aa6eee08e7689c352f613fa33f6345c7bdecaf4d89ce2903c59f7f57ed176f0 +size 504710 diff --git a/resources/w/ui/img/toast/item_removed001.png b/resources/w/ui/img/toast/item_removed001.png index a8b7106..b5c65fa 100644 --- a/resources/w/ui/img/toast/item_removed001.png +++ b/resources/w/ui/img/toast/item_removed001.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7349282d9862c2de657c8d25321a3dabcc0690a595970d44c0d88fa01764bb22 -size 446507 +oid sha256:0a3a2885ac0d27a6ba02b676c07ecae9b5878a2d90df4021be28ddcb2d924217 +size 561714 diff --git a/resources/w/ui/img/toast/objective_completed001.png b/resources/w/ui/img/toast/objective_completed001.png deleted file mode 100644 index fb73733..0000000 --- a/resources/w/ui/img/toast/objective_completed001.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5b81f8eefd55d28ebb48db50b839b7a4bf6b25e19cca2a423d4d75a55242c25 -size 464996 diff --git a/resources/w/ui/img/toast/quest_failed001.png b/resources/w/ui/img/toast/quest_failed001.png index 17d9c1b..757e403 100644 --- a/resources/w/ui/img/toast/quest_failed001.png +++ b/resources/w/ui/img/toast/quest_failed001.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a69ff8ef68904c9b48b40dc818ac28c6048a65512e6d08d6d237ee6006a8e527 -size 424522 +oid sha256:c07e8a0416d1697f2e87026b41ae65e2dc2063b2380643de6b22dfdb7e2dda01 +size 591758 diff --git a/resources/w/ui/img/toast/quest_new001.png b/resources/w/ui/img/toast/quest_new001.png index 57f87c4..1a246e5 100644 --- a/resources/w/ui/img/toast/quest_new001.png +++ b/resources/w/ui/img/toast/quest_new001.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18144447bb769217296e5d64a065b4e6438e9f79bdbd0ffb8b7a11aa30b88691 -size 400535 +oid sha256:756436a82cbf1f514de57b946c0d9640ed504637d02cbe6a5ad10eb5714aa1c8 +size 535303 diff --git a/src/cutscene/CutsceneRuntime.cpp b/src/cutscene/CutsceneRuntime.cpp index 1532e05..5f982f6 100644 --- a/src/cutscene/CutsceneRuntime.cpp +++ b/src/cutscene/CutsceneRuntime.cpp @@ -72,6 +72,7 @@ void CutsceneRuntime::stop() { activeCutsceneId.clear(); active = false; fadeInCallbackFired = false; + skipPending = false; currentCutsceneLine = -1; cutsceneTimerMs = 0; cutsceneElapsedMs = 0; @@ -114,6 +115,15 @@ void CutsceneRuntime::update(int deltaMs) { if (cutsceneElapsedMs >= fadeInCompleteMs && !activeCutscene->onFadeInCallback.empty()) { fadeInCallbackFired = true; onFadeInComplete(activeCutscene->onFadeInCallback); + + // The callback may have stopped the cutscene. Guard before touching + // state, then honour a skip that was deferred until fade-in completed. + if (!active || !activeCutscene) return; + if (skipPending) { + skipPending = false; + finish(); + return; + } } } @@ -145,6 +155,15 @@ bool CutsceneRuntime::canSkip() const { void CutsceneRuntime::skip() { if (!canSkip()) return; + + // If the onFadeInCallback hasn't fired yet, defer the skip. + // The scene change triggered by that callback must happen while the screen + // is still black; calling finish() now would skip the callback entirely. + if (!fadeInCallbackFired && activeCutscene && !activeCutscene->onFadeInCallback.empty()) { + skipPending = true; + return; + } + finish(); } diff --git a/src/cutscene/CutsceneRuntime.h b/src/cutscene/CutsceneRuntime.h index 758bde7..9f8d4cf 100644 --- a/src/cutscene/CutsceneRuntime.h +++ b/src/cutscene/CutsceneRuntime.h @@ -32,6 +32,7 @@ private: std::string activeCutsceneId; bool active = false; bool fadeInCallbackFired = false; + bool skipPending = false; int currentCutsceneLine = -1; int cutsceneTimerMs = 0;