SW: Remove DemoOverride, ScenePlayBack and SceneLevel

# Conflicts:
#	source/sw/src/demo.cpp
#	source/sw/src/game.cpp
This commit is contained in:
NY00123 2020-05-26 22:20:00 +03:00 committed by Christoph Oelckers
parent 6920ef8fc3
commit 6aeb366a93
3 changed files with 0 additions and 108 deletions

View file

@ -52,7 +52,6 @@ SWBOOL DemoRecording = FALSE;
SWBOOL DemoEdit = FALSE;
SWBOOL DemoMode = FALSE;
SWBOOL DemoModeMenuState = FALSE;
SWBOOL DemoOverride = FALSE;
char DemoFileName[16] = "demo.dmo";
char DemoLevelName[16] = "";
extern SWBOOL NewGame;
@ -579,78 +578,4 @@ DemoPlayBack(void)
}
}
//
// Still using old method of playback - this was for opening demo
//
void
ScenePlayBack(void)
{
int buf_ndx, pnum, cnt;
PLAYERp pp;
if (SW_SHAREWARE)
{
// code here needs to be similar to RunLevel startup code
PlaySong(nullptr, "yokoha03.mid", -1);
}
// IMPORTANT - MUST be right before game loop
InitTimingVars();
buf_ndx = 0;
cnt = 0;
ready2send = 0;
DemoDone = FALSE;
inputState.ClearAllInput();
while (TRUE)
{
// makes code run at the same rate
while ((totalclock > totalsynctics))
{
TRAVERSE_CONNECT(pnum)
{
pp = Player + pnum;
pp->inputfifo[pp->movefifoend & (MOVEFIFOSIZ - 1)] = DemoBuffer[buf_ndx];
pp->movefifoend++;
buf_ndx++;
if (pp->inputfifo[(pp->movefifoend - 1) & (MOVEFIFOSIZ - 1)].bits == -1)
{
DemoDone = TRUE;
break;
}
if (buf_ndx > DEMO_BUFFER_MAX - 1)
{
DemoReadBuffer();
buf_ndx = 0;
}
}
if (inputState.CheckAllInput())
DemoDone = TRUE;
if (DemoDone)
break;
cnt++;
//movethings();
domovethings();
}
// demo is over
if (DemoDone)
break;
drawscreen(Player + screenpeek);
}
}
END_SW_NS

View file

@ -30,7 +30,6 @@ extern SWBOOL DemoPlaying;
extern SWBOOL DemoRecording;
extern SWBOOL DemoEdit;
extern SWBOOL DemoMode;
extern SWBOOL DemoOverride;
extern char DemoFileName[16];
extern char DemoLevelName[16];
@ -71,7 +70,6 @@ typedef FILE *DFILE;
void DemoTerm(void);
void DemoPlaySetup(void);
void DemoPlayBack(void);
void ScenePlayBack(void);
void DemoRecordSetup(void);
void DemoDebugWrite(void);
void DemoWriteBuffer(void);

View file

@ -1750,36 +1750,6 @@ void MenuLevel(void)
videoNextPage();
}
void SceneLevel(void)
{
SWBOOL dp_bak;
SWBOOL dm_bak;
FILE *fin;
#define CINEMATIC_DEMO_FILE "$scene.dmo"
// make sure it exists
if ((fin = fopen(CINEMATIC_DEMO_FILE,"rb")) == NULL)
return;
else
fclose(fin);
strcpy(DemoFileName,CINEMATIC_DEMO_FILE);
dp_bak = DemoPlaying;
dm_bak = DemoMode;
DemoMode = TRUE;
DemoPlaying = TRUE;
DemoOverride = TRUE;
InitLevel();
DemoOverride = FALSE;
ScenePlayBack();
TerminateLevel();
DemoMode = dm_bak;
DemoPlaying = dp_bak;
}
void
LoadingLevelScreen(void)
{
@ -2314,7 +2284,6 @@ void GameIntro(void)
{
LogoLevel();
//CreditsLevel();
//SceneLevel();
//TitleLevel();
IntroAnimLevel();
IntroAnimCount = 0;