mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Add support for Powerslave demo version
# Conflicts: # source/exhumed/src/exhumed.cpp # source/exhumed/src/grpscan.cpp # source/exhumed/src/grpscan.h # source/exhumed/src/sound.cpp
This commit is contained in:
parent
ff91493e39
commit
3265b52c17
4 changed files with 75 additions and 29 deletions
|
@ -1701,6 +1701,61 @@ static int32_t check_filename_casing(void)
|
|||
|
||||
int32_t r_maxfpsoffset = 0;
|
||||
|
||||
void PatchDemoStrings()
|
||||
{
|
||||
if (!ISDEMOVER)
|
||||
return;
|
||||
|
||||
if (EXHUMED) {
|
||||
gString[60] = "PICK UP A COPY OF EXHUMED";
|
||||
}
|
||||
else {
|
||||
gString[60] = "PICK UP A COPY OF POWERSLAVE";
|
||||
}
|
||||
|
||||
gString[61] = "TODAY TO CONTINUE THE ADVENTURE!";
|
||||
gString[62] = "MORE LEVELS, NASTIER CREATURES";
|
||||
gString[63] = "AND THE EVIL DOINGS OF THE";
|
||||
gString[64] = "KILMAAT AWAIT YOU IN THE FULL";
|
||||
gString[65] = "VERSION OF THE GAME.";
|
||||
gString[66] = "TWENTY LEVELS, PLUS 12 NETWORK";
|
||||
gString[67] = "PLAY LEVELS CAN BE YOURS!";
|
||||
gString[68] = "END";
|
||||
}
|
||||
|
||||
void ExitGame()
|
||||
{
|
||||
if (bRecord) {
|
||||
fclose(vcrfp);
|
||||
}
|
||||
|
||||
FadeSong();
|
||||
if (CDplaying()) {
|
||||
fadecdaudio();
|
||||
}
|
||||
|
||||
StopAllSounds();
|
||||
StopLocalSound();
|
||||
mysaveconfig();
|
||||
|
||||
if (bSerialPlay)
|
||||
{
|
||||
if (nNetPlayerCount != 0) {
|
||||
bSendBye = kTrue;
|
||||
UpdateSerialInputs();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nNetPlayerCount != 0) {
|
||||
SendGoodbye();
|
||||
}
|
||||
}
|
||||
|
||||
ShutDown();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static int32_t nonsharedtimer;
|
||||
|
||||
void CheckCommandLine(int argc, char const* const* argv, int &doTitle)
|
||||
|
@ -1905,6 +1960,7 @@ int GameInterface::app_main()
|
|||
|
||||
|
||||
|
||||
PatchDemoStrings();
|
||||
// loc_115F5:
|
||||
nItemTextIndex = FindGString("ITEMS");
|
||||
nFirstPassword = FindGString("PASSWORDS");
|
||||
|
@ -2508,34 +2564,8 @@ LOOP3:
|
|||
fps++;
|
||||
}
|
||||
EXITGAME:
|
||||
if (bRecord) {
|
||||
fclose(vcrfp);
|
||||
}
|
||||
|
||||
FadeSong();
|
||||
if (CDplaying()) {
|
||||
fadecdaudio();
|
||||
}
|
||||
|
||||
StopAllSounds();
|
||||
StopLocalSound();
|
||||
mysaveconfig();
|
||||
|
||||
if (bSerialPlay)
|
||||
{
|
||||
if (nNetPlayerCount != 0) {
|
||||
bSendBye = kTrue;
|
||||
UpdateSerialInputs();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nNetPlayerCount != 0) {
|
||||
SendGoodbye();
|
||||
}
|
||||
}
|
||||
|
||||
ShutDown();
|
||||
ExitGame();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ struct demo_input
|
|||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
void ExitGame();
|
||||
void ShutDown(void);
|
||||
void DebugOut(const char *fmt, ...);
|
||||
int ExhumedMain(int argc, char *argv[]);
|
||||
|
@ -234,12 +235,15 @@ extern int lCountDown;
|
|||
extern short bSlipMode;
|
||||
|
||||
extern short nItemTextIndex;
|
||||
extern const char *gString[];
|
||||
extern const char* gString[];
|
||||
extern const char* gPSDemoString[];
|
||||
extern const char* gEXDemoString[];
|
||||
|
||||
extern int bVanilla;
|
||||
|
||||
#define POWERSLAVE (g_gameType & GAMEFLAG_POWERSLAVE)
|
||||
#define EXHUMED (g_gameType & GAMEFLAG_EXHUMED)
|
||||
#define ISDEMOVER (g_gameType & GAMEFLAG_DEMO)
|
||||
|
||||
extern double g_frameDelay;
|
||||
|
||||
|
|
|
@ -2016,6 +2016,12 @@ void GoToTheCinema(int nVal)
|
|||
}
|
||||
}
|
||||
|
||||
if (ISDEMOVER) {
|
||||
if (!waloff[cinematile]) {
|
||||
tileCreate(cinematile, 320, 200);
|
||||
}
|
||||
}
|
||||
|
||||
FadeOut(kFalse);
|
||||
StopAllSounds();
|
||||
NoClip();
|
||||
|
@ -2095,6 +2101,11 @@ void GoToTheCinema(int nVal)
|
|||
|
||||
GrabPalette();
|
||||
Clip();
|
||||
|
||||
// quit the game if we've finished level 4 and displayed the advert text
|
||||
if (ISDEMOVER && nVal == 3) {
|
||||
ExitGame();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -460,7 +460,8 @@ int LoadSound(const char *sound)
|
|||
}
|
||||
else
|
||||
{
|
||||
Printf("Unable to open sound '%s'!\n", buffer);
|
||||
if (!ISDEMOVER) // demo tries to load sound files it doesn't have
|
||||
Printf("Unable to open sound '%s'!\n", buffer);
|
||||
SoundBuf[i] = NULL;
|
||||
SoundLen[i] = 0;
|
||||
//return hVoc;
|
||||
|
|
Loading…
Reference in a new issue