- fixed palette of Exhumed's game over screen.

This commit is contained in:
Christoph Oelckers 2020-10-13 23:29:12 +02:00
parent 127440f03c
commit df86a11d23
3 changed files with 8 additions and 5 deletions

View file

@ -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;
}

View file

@ -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;

View file

@ -1314,9 +1314,9 @@ void DoGameOverScene(bool finallevel)
{
StopCD();
PlayGameOverSound();
job = { Create<DImageScreen>(tileGetTexture(kTile3591), DScreenJob::fadein | DScreenJob::fadeout, 0x7fffffff) };
job = { Create<DImageScreen>(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; });
}