mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- ported the credits screen.
This commit is contained in:
parent
d94077f833
commit
bddd196539
4 changed files with 198 additions and 197 deletions
|
@ -1215,11 +1215,80 @@ private:
|
|||
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Credits roll
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class DExCredits : public DScreenJob
|
||||
{
|
||||
TArray<FString> credits;
|
||||
TArray<FString> pagelines;
|
||||
uint64_t page;
|
||||
uint64_t pagetime;
|
||||
|
||||
public:
|
||||
DExCredits()
|
||||
{
|
||||
auto textdata = fileSystem.LoadFile("credits.txt", 1);
|
||||
FString text = (char*)textdata.Data();
|
||||
text.Substitute("\r", "");
|
||||
credits = text.Split("\n\n");
|
||||
}
|
||||
|
||||
private:
|
||||
int Frame(uint64_t clock, bool skiprequest) override
|
||||
{
|
||||
if (clock == 0)
|
||||
{
|
||||
if (credits.Size() == 0) return 0;
|
||||
playCDtrack(19, false);
|
||||
pagetime = 0;
|
||||
page = -1;
|
||||
}
|
||||
if (clock >= pagetime || skiprequest)
|
||||
{
|
||||
page++;
|
||||
if (page < credits.Size())
|
||||
pagelines = credits[page].Split("\n");
|
||||
else
|
||||
{
|
||||
if (skiprequest || !CDplaying()) return 0;
|
||||
pagelines.Clear();
|
||||
}
|
||||
pagetime = clock + 2'000'000'000; //
|
||||
}
|
||||
twod->ClearScreen();
|
||||
|
||||
int y = 100 - ((10 * (pagelines.Size() - 1)) / 2);
|
||||
|
||||
for (unsigned i = 0; i < pagelines.Size(); i++)
|
||||
{
|
||||
uint64_t ptime = (pagetime-clock) / 1'000'000;
|
||||
int light;
|
||||
|
||||
if (ptime < 255) light = ptime;
|
||||
else if (ptime > 2000 - 255) light = 2000 - ptime;
|
||||
else light = 255;
|
||||
|
||||
auto color = PalEntry(255, light, light, light);
|
||||
|
||||
int nStringWidth = SmallFont->StringWidth(pagelines[i]);
|
||||
DrawText(twod, SmallFont, CR_UNTRANSLATED, 160 - nStringWidth / 2, y, pagelines[i], DTA_FullscreenScale, FSMode_ScaleToFit43, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_Color, color, TAG_DONE);
|
||||
y += 10;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
// temporary.
|
||||
void RunCinemaScene(int num)
|
||||
{
|
||||
num = -1;
|
||||
JobDesc job = { num == -1? (DScreenJob*)Create<DLastLevelCinema>() : Create<DCinema>(num) };
|
||||
JobDesc job = { num == -1? (DScreenJob*)Create<DExCredits>() : Create<DCinema>(num) };
|
||||
RunScreenJob(&job, 1, [](bool) { gamestate = GS_LEVEL; });
|
||||
SyncScreenJob();
|
||||
}
|
||||
|
|
|
@ -99,132 +99,6 @@ const char *gString[] =
|
|||
"3D ENGINE BY 3D REALMS",
|
||||
"",
|
||||
"",
|
||||
"CREDITS",
|
||||
"EXHUMED",
|
||||
"",
|
||||
"EXECUTIVE PRODUCERS",
|
||||
" ",
|
||||
"BRIAN MCNEELY",
|
||||
"PAUL LANGE",
|
||||
"",
|
||||
"GAME CONCEPT",
|
||||
" ",
|
||||
"PAUL LANGE",
|
||||
"",
|
||||
"GAME DESIGN",
|
||||
" ",
|
||||
"BRIAN MCNEELY",
|
||||
"",
|
||||
"ADDITIONAL DESIGN",
|
||||
" ",
|
||||
"PAUL KNUTZEN",
|
||||
"PAUL LANGE",
|
||||
"JOHN VAN DEUSEN",
|
||||
"KURT PFEIFER",
|
||||
"DOMINICK MEISSNER",
|
||||
"DANE EMERSON",
|
||||
"",
|
||||
"GAME PROGRAMMING",
|
||||
" ",
|
||||
"KURT PFEIFER",
|
||||
"JOHN YUILL",
|
||||
"",
|
||||
"ADDITIONAL PROGRAMMING",
|
||||
" ",
|
||||
"PAUL HAUGERUD",
|
||||
"",
|
||||
"ADDITIONAL TECHNICAL SUPPORT",
|
||||
" ",
|
||||
"JOHN YUILL",
|
||||
"PAUL HAUGERUD",
|
||||
"JEFF BLAZIER",
|
||||
"",
|
||||
"LEVEL DESIGN",
|
||||
" ",
|
||||
"PAUL KNUTZEN",
|
||||
"",
|
||||
"ADDITIONAL LEVELS",
|
||||
" ",
|
||||
"BRIAN MCNEELY",
|
||||
"",
|
||||
"MONSTERS AND WEAPONS ",
|
||||
" ",
|
||||
"JOHN VAN DEUSEN",
|
||||
"",
|
||||
"ARTISTS",
|
||||
" ",
|
||||
"BRIAN MCNEELY",
|
||||
"PAUL KNUTZEN",
|
||||
"JOHN VAN DEUSEN",
|
||||
"TROY JACOBSON",
|
||||
"KEVIN CHUNG",
|
||||
"ERIC KLOKSTAD",
|
||||
"RICHARD NICHOLS",
|
||||
"JOE KRESOJA",
|
||||
"JASON WIGGIN",
|
||||
"",
|
||||
"MUSIC AND SOUND EFFECTS",
|
||||
" ",
|
||||
"SCOTT BRANSTON",
|
||||
"",
|
||||
"PRODUCT TESTING",
|
||||
" ",
|
||||
"DOMINICK MEISSNER",
|
||||
"TOM KRISTENSEN",
|
||||
"JASON WIGGIN",
|
||||
"MARK COATES",
|
||||
"",
|
||||
"INSTRUCTION MANUAL",
|
||||
" ",
|
||||
"TOM KRISTENSEN",
|
||||
"",
|
||||
"SPECIAL THANKS",
|
||||
" ",
|
||||
"JACQUI LYONS",
|
||||
"MARJACQ MICRO, LTD.",
|
||||
"MIKE BROWN",
|
||||
"IAN MATHIAS",
|
||||
"CHERYL LUSCHEI",
|
||||
"3D REALMS",
|
||||
"KENNETH SILVERMAN",
|
||||
"GREG MALONE",
|
||||
"MILES DESIGN",
|
||||
"REDMOND AM/PM MINI MART",
|
||||
"7-11 DOUBLE GULP",
|
||||
"",
|
||||
"THANKS FOR PLAYING",
|
||||
"",
|
||||
"THE END",
|
||||
"",
|
||||
"GUESS YOURE STUCK HERE",
|
||||
"UNTIL THE SONG ENDS",
|
||||
"",
|
||||
"MAYBE THIS IS A GOOD",
|
||||
"TIME TO THINK ABOUT ALL",
|
||||
"THE THINGS YOU CAN DO",
|
||||
"AFTER THE MUSIC IS OVER.",
|
||||
"",
|
||||
"OR YOU COULD JUST STARE",
|
||||
"AT THIS SCREEN",
|
||||
"",
|
||||
"AND WATCH THESE MESSAGES",
|
||||
"GO BY...",
|
||||
"",
|
||||
"...AND WONDER JUST HOW LONG",
|
||||
"WE WILL DRAG THIS OUT...",
|
||||
"",
|
||||
"AND BELIEVE ME, WE CAN DRAG",
|
||||
"IT OUT FOR QUITE A WHILE.",
|
||||
"",
|
||||
"SHOULD BE OVER SOON...",
|
||||
"",
|
||||
"ANY MOMENT NOW...",
|
||||
"",
|
||||
" ",
|
||||
"",
|
||||
"SEE YA",
|
||||
"",
|
||||
"END",
|
||||
"PASSWORDS",
|
||||
"HOLLY",
|
||||
"KIMBERLY",
|
||||
|
@ -913,74 +787,6 @@ void CheckKeys()
|
|||
}
|
||||
}
|
||||
|
||||
void DoCredits()
|
||||
{
|
||||
NoClip();
|
||||
|
||||
playCDtrack(19, false);
|
||||
|
||||
int nSecretSkipKeyCount = 0;
|
||||
|
||||
if (videoGetRenderMode() == REND_CLASSIC)
|
||||
FadeOut(0);
|
||||
|
||||
int nCreditsIndex = FindGString("CREDITS");
|
||||
|
||||
while (strcmp(gString[nCreditsIndex], "END") != 0)
|
||||
{
|
||||
EraseScreen(overscanindex);
|
||||
|
||||
int nStart = nCreditsIndex;
|
||||
|
||||
// skip blanks
|
||||
while (strlen(gString[nCreditsIndex]) != 0) {
|
||||
nCreditsIndex++;
|
||||
}
|
||||
|
||||
int y = 100 - ((10 * (nCreditsIndex - nStart - 1)) / 2);
|
||||
|
||||
for (int i = nStart; i < nCreditsIndex; i++)
|
||||
{
|
||||
int nStringWidth = SmallFont->StringWidth(gString[i]);
|
||||
DrawText(twod, SmallFont, CR_UNTRANSLATED, 160 - nStringWidth / 2, y, gString[i], DTA_FullscreenScale, FSMode_ScaleToFit43, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, TAG_DONE);
|
||||
y += 10;
|
||||
}
|
||||
|
||||
videoNextPage();
|
||||
|
||||
nCreditsIndex++;
|
||||
|
||||
if (videoGetRenderMode() == REND_CLASSIC)
|
||||
FadeIn();
|
||||
|
||||
int nDuration = (int)totalclock + 600;
|
||||
|
||||
while ((int)totalclock <= nDuration)
|
||||
{
|
||||
HandleAsync();
|
||||
if(inputState.GetKeyStatus(sc_F12))
|
||||
{
|
||||
nSecretSkipKeyCount++;
|
||||
|
||||
inputState.ClearKeyStatus(sc_F12);
|
||||
|
||||
if (nSecretSkipKeyCount > 5) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (videoGetRenderMode() == REND_CLASSIC)
|
||||
FadeOut(0);
|
||||
}
|
||||
|
||||
while (CDplaying())
|
||||
{
|
||||
HandleAsync();
|
||||
inputState.keyGetChar();
|
||||
}
|
||||
}
|
||||
|
||||
void FinishLevel()
|
||||
{
|
||||
if (levelnum > nBestLevel) {
|
||||
|
@ -1018,7 +824,7 @@ void FinishLevel()
|
|||
DoAfterCinemaScene(levelnum);
|
||||
if (levelnum == kMap20)
|
||||
{
|
||||
DoCredits();
|
||||
//DoCredits();
|
||||
nPlayerLives[0] = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1252,6 +1058,7 @@ int32_t r_maxfpsoffset = 0;
|
|||
|
||||
void PatchDemoStrings()
|
||||
{
|
||||
#if 0
|
||||
if (!ISDEMOVER)
|
||||
return;
|
||||
|
||||
|
@ -1270,6 +1077,7 @@ void PatchDemoStrings()
|
|||
gString[66] = "TWENTY LEVELS, PLUS 12 NETWORK";
|
||||
gString[67] = "PLAY LEVELS CAN BE YOURS!";
|
||||
gString[68] = "END";
|
||||
#endif
|
||||
}
|
||||
|
||||
void ExitGame()
|
||||
|
|
|
@ -353,7 +353,7 @@ short nBeforeScene[] = { 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
|
|||
|
||||
void CheckBeforeScene(int nLevel)
|
||||
{
|
||||
if (nLevel == kMap20)
|
||||
if (1)//nLevel == kMap20)
|
||||
{
|
||||
RunCinemaScene(-1);
|
||||
return;
|
||||
|
|
124
wadsrc/static/filter/exhumed/credits.txt
Normal file
124
wadsrc/static/filter/exhumed/credits.txt
Normal file
|
@ -0,0 +1,124 @@
|
|||
EXHUMED
|
||||
|
||||
EXECUTIVE PRODUCERS
|
||||
|
||||
BRIAN MCNEELY
|
||||
PAUL LANGE
|
||||
|
||||
GAME CONCEPT
|
||||
|
||||
PAUL LANGE
|
||||
|
||||
GAME DESIGN
|
||||
|
||||
BRIAN MCNEELY
|
||||
|
||||
ADDITIONAL DESIGN
|
||||
|
||||
PAUL KNUTZEN
|
||||
PAUL LANGE
|
||||
JOHN VAN DEUSEN
|
||||
KURT PFEIFER
|
||||
DOMINICK MEISSNER
|
||||
DANE EMERSON
|
||||
|
||||
GAME PROGRAMMING
|
||||
|
||||
KURT PFEIFER
|
||||
JOHN YUILL
|
||||
|
||||
ADDITIONAL PROGRAMMING
|
||||
|
||||
PAUL HAUGERUD
|
||||
|
||||
ADDITIONAL TECHNICAL SUPPORT
|
||||
|
||||
JOHN YUILL
|
||||
PAUL HAUGERUD
|
||||
JEFF BLAZIER
|
||||
|
||||
LEVEL DESIGN
|
||||
|
||||
PAUL KNUTZEN
|
||||
|
||||
ADDITIONAL LEVELS
|
||||
|
||||
BRIAN MCNEELY
|
||||
|
||||
MONSTERS AND WEAPONS
|
||||
|
||||
JOHN VAN DEUSEN
|
||||
|
||||
ARTISTS
|
||||
|
||||
BRIAN MCNEELY
|
||||
PAUL KNUTZEN
|
||||
JOHN VAN DEUSEN
|
||||
TROY JACOBSON
|
||||
KEVIN CHUNG
|
||||
ERIC KLOKSTAD
|
||||
RICHARD NICHOLS
|
||||
JOE KRESOJA
|
||||
JASON WIGGIN
|
||||
|
||||
MUSIC AND SOUND EFFECTS
|
||||
|
||||
SCOTT BRANSTON
|
||||
|
||||
PRODUCT TESTING
|
||||
|
||||
DOMINICK MEISSNER
|
||||
TOM KRISTENSEN
|
||||
JASON WIGGIN
|
||||
MARK COATES
|
||||
|
||||
INSTRUCTION MANUAL
|
||||
|
||||
TOM KRISTENSEN
|
||||
|
||||
SPECIAL THANKS
|
||||
|
||||
JACQUI LYONS
|
||||
MARJACQ MICRO, LTD.
|
||||
MIKE BROWN
|
||||
IAN MATHIAS
|
||||
CHERYL LUSCHEI
|
||||
3D REALMS
|
||||
KENNETH SILVERMAN
|
||||
GREG MALONE
|
||||
MILES DESIGN
|
||||
REDMOND AM/PM MINI MART
|
||||
7-11 DOUBLE GULP
|
||||
|
||||
THANKS FOR PLAYING
|
||||
|
||||
THE END
|
||||
|
||||
GUESS YOURE STUCK HERE
|
||||
UNTIL THE SONG ENDS
|
||||
|
||||
MAYBE THIS IS A GOOD
|
||||
TIME TO THINK ABOUT ALL
|
||||
THE THINGS YOU CAN DO
|
||||
AFTER THE MUSIC IS OVER.
|
||||
|
||||
OR YOU COULD JUST STARE
|
||||
AT THIS SCREEN
|
||||
|
||||
AND WATCH THESE MESSAGES
|
||||
GO BY...
|
||||
|
||||
...AND WONDER JUST HOW LONG
|
||||
WE WILL DRAG THIS OUT...
|
||||
|
||||
AND BELIEVE ME, WE CAN DRAG
|
||||
IT OUT FOR QUITE A WHILE.
|
||||
|
||||
SHOULD BE OVER SOON...
|
||||
|
||||
ANY MOMENT NOW...
|
||||
|
||||
|
||||
|
||||
SEE YA
|
||||
|
Loading…
Reference in a new issue