From df86a11d2397bfb789df8a38db946c0e11d070ff Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 13 Oct 2020 23:29:12 +0200 Subject: [PATCH] - fixed palette of Exhumed's game over screen. --- source/core/screenjob.cpp | 2 +- source/core/screenjob.h | 7 +++++-- source/exhumed/src/2d.cpp | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/source/core/screenjob.cpp b/source/core/screenjob.cpp index ecef96a27..8e7634c14 100644 --- a/source/core/screenjob.cpp +++ b/source/core/screenjob.cpp @@ -83,7 +83,7 @@ int DImageScreen::Frame(uint64_t clock, bool skiprequest) } int span = int(clock / 1'000'000); twod->ClearScreen(); - DrawTexture(twod, tex, 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, DTA_LegacyRenderStyle, STYLE_Normal, TAG_DONE); + DrawTexture(twod, tex, 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, DTA_LegacyRenderStyle, STYLE_Normal, DTA_TranslationIndex, trans, TAG_DONE); // Only end after having faded out. return skiprequest ? -1 : span > waittime? 0 : 1; } diff --git a/source/core/screenjob.h b/source/core/screenjob.h index 825e06004..64467490e 100644 --- a/source/core/screenjob.h +++ b/source/core/screenjob.h @@ -73,18 +73,21 @@ class DImageScreen : public DScreenJob DECLARE_CLASS(DImageScreen, DScreenJob) int tilenum = -1; + int trans; int waittime; // in ms. FGameTexture* tex = nullptr; public: - DImageScreen(FGameTexture* tile, int fade = DScreenJob::fadein | DScreenJob::fadeout, int wait = 3000) : DScreenJob(fade), waittime(wait) + DImageScreen(FGameTexture* tile, int fade = DScreenJob::fadein | DScreenJob::fadeout, int wait = 3000, int translation = 0) : DScreenJob(fade), waittime(wait) { tex = tile; + trans = translation; } - DImageScreen(int tile, int fade = DScreenJob::fadein | DScreenJob::fadeout, int wait = 3000) : DScreenJob(fade), waittime(wait) + DImageScreen(int tile, int fade = DScreenJob::fadein | DScreenJob::fadeout, int wait = 3000, int translation = 0) : DScreenJob(fade), waittime(wait) { tilenum = tile; + trans = translation; } int Frame(uint64_t clock, bool skiprequest) override; diff --git a/source/exhumed/src/2d.cpp b/source/exhumed/src/2d.cpp index b69d0eeb7..763386dbb 100644 --- a/source/exhumed/src/2d.cpp +++ b/source/exhumed/src/2d.cpp @@ -1314,9 +1314,9 @@ void DoGameOverScene(bool finallevel) { StopCD(); PlayGameOverSound(); - job = { Create(tileGetTexture(kTile3591), DScreenJob::fadein | DScreenJob::fadeout, 0x7fffffff) }; + job = { Create(tileGetTexture(kTile3591), DScreenJob::fadein | DScreenJob::fadeout, 0x7fffffff, TRANSLATION(Translation_BasePalettes, 16)) }; } - RunScreenJob(&job, 1, [](bool) { gameaction = ga_startup; }); + RunScreenJob(&job, 1, [](bool) { gameaction = ga_mainmenu; }); }