mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- the engine starts on the new main loop and is capable of running the intros and the menu, but not the game yet.
This commit is contained in:
parent
d59284c96b
commit
ffe5b114f3
10 changed files with 28 additions and 53 deletions
|
@ -389,7 +389,6 @@ void StartLevel(MapRecord *level)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bVanilla = false;
|
bVanilla = false;
|
||||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19960925;//bVanilla;
|
|
||||||
memset(xsprite,0,sizeof(xsprite));
|
memset(xsprite,0,sizeof(xsprite));
|
||||||
memset(sprite,0,kMaxSprites*sizeof(spritetype));
|
memset(sprite,0,kMaxSprites*sizeof(spritetype));
|
||||||
//drawLoadingScreen();
|
//drawLoadingScreen();
|
||||||
|
@ -704,13 +703,14 @@ void GameInterface::app_init()
|
||||||
|
|
||||||
Printf(PRINT_NONOTIFY, "Initializing network users\n");
|
Printf(PRINT_NONOTIFY, "Initializing network users\n");
|
||||||
netInitialize(true);
|
netInitialize(true);
|
||||||
videoInit();
|
|
||||||
Printf(PRINT_NONOTIFY, "Initializing sound system\n");
|
Printf(PRINT_NONOTIFY, "Initializing sound system\n");
|
||||||
sndInit();
|
sndInit();
|
||||||
registerosdcommands();
|
registerosdcommands();
|
||||||
|
|
||||||
gChoke.sub_83ff0(518, sub_84230);
|
gChoke.sub_83ff0(518, sub_84230);
|
||||||
UpdateDacs(0, true);
|
UpdateDacs(0, true);
|
||||||
|
|
||||||
|
enginecompatibility_mode = ENGINECOMPATIBILITY_19960925;//bVanilla;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gameInit()
|
static void gameInit()
|
||||||
|
|
|
@ -322,7 +322,6 @@ void viewInit(void)
|
||||||
FontSet(2, 4288, 1);
|
FontSet(2, 4288, 1);
|
||||||
FontSet(3, 4384, 1);
|
FontSet(3, 4384, 1);
|
||||||
FontSet(4, 4480, 0);
|
FontSet(4, 4480, 0);
|
||||||
enginePostInit(); // This must not be done earlier!
|
|
||||||
|
|
||||||
lensdata = fileSystem.LoadFile("lens.dat");
|
lensdata = fileSystem.LoadFile("lens.dat");
|
||||||
dassert(lensdata.Size() == kLensSize * kLensSize * sizeof(int));
|
dassert(lensdata.Size() == kLensSize * kLensSize * sizeof(int));
|
||||||
|
|
|
@ -1745,10 +1745,10 @@ bool D_CheckNetGame (void)
|
||||||
|
|
||||||
if (myconnectindex != Net_Arbitrator && doomcom.numnodes > 1)
|
if (myconnectindex != Net_Arbitrator && doomcom.numnodes > 1)
|
||||||
{
|
{
|
||||||
Printf("Arbitrator selected " TEXTCOLOR_BLUE "%s" TEXTCOLOR_NORMAL " networking mode.\n", NetMode == NET_PeerToPeer ? "peer to peer" : "packet server");
|
Printf(PRINT_NONOTIFY, "Arbitrator selected " TEXTCOLOR_BLUE "%s" TEXTCOLOR_NORMAL " networking mode.\n", NetMode == NET_PeerToPeer ? "peer to peer" : "packet server");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!batchrun) Printf ("player %i of %i (%i nodes)\n",
|
if (!batchrun) Printf (PRINT_NONOTIFY, "player %i of %i (%i nodes)\n",
|
||||||
myconnectindex+1, doomcom.numplayers, doomcom.numnodes);
|
myconnectindex+1, doomcom.numplayers, doomcom.numnodes);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -142,7 +142,7 @@ void DrawFullscreenBlends();
|
||||||
void MainLoop();
|
void MainLoop();
|
||||||
|
|
||||||
|
|
||||||
bool AppActive;
|
bool AppActive = true;
|
||||||
|
|
||||||
FString currentGame;
|
FString currentGame;
|
||||||
FString LumpFilter;
|
FString LumpFilter;
|
||||||
|
@ -862,9 +862,11 @@ int RunGame()
|
||||||
|
|
||||||
SetupGameButtons();
|
SetupGameButtons();
|
||||||
gi->app_init();
|
gi->app_init();
|
||||||
|
enginePostInit(); // This must not be done earlier!
|
||||||
|
videoInit();
|
||||||
|
|
||||||
// Duke has transitioned to the new main loop, the other games haven't yet.
|
// Duke has transitioned to the new main loop, the other games haven't yet.
|
||||||
if (g_gameType & GAMEFLAG_DUKE | GAMEFLAG_RRALL | GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI)
|
if (g_gameType & (GAMEFLAG_DUKE | GAMEFLAG_RRALL | GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI))
|
||||||
{
|
{
|
||||||
D_CheckNetGame();
|
D_CheckNetGame();
|
||||||
MainLoop();
|
MainLoop();
|
||||||
|
@ -1150,6 +1152,7 @@ void S_SetSoundPaused(int state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
if (!netgame
|
if (!netgame
|
||||||
#if 0 //def _DEBUG
|
#if 0 //def _DEBUG
|
||||||
&& !demoplayback
|
&& !demoplayback
|
||||||
|
@ -1158,7 +1161,7 @@ void S_SetSoundPaused(int state)
|
||||||
{
|
{
|
||||||
pauseext = !state;
|
pauseext = !state;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FString G_GetDemoPath()
|
FString G_GetDemoPath()
|
||||||
|
|
|
@ -229,7 +229,8 @@ void Display()
|
||||||
gi->DrawBackground();
|
gi->DrawBackground();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GS_FINALE:
|
case GS_INTRO:
|
||||||
|
case GS_INTERMISSION:
|
||||||
// screen jobs are not bound by the game ticker so they need to be ticked in the display loop.
|
// screen jobs are not bound by the game ticker so they need to be ticked in the display loop.
|
||||||
RunScreenJobFrame();
|
RunScreenJobFrame();
|
||||||
break;
|
break;
|
||||||
|
@ -248,12 +249,15 @@ void Display()
|
||||||
|
|
||||||
NetUpdate(); // send out any new accumulation
|
NetUpdate(); // send out any new accumulation
|
||||||
|
|
||||||
// Draw overlay elements
|
if (gamestate != GS_INTRO) // do not draw overlays on the intros
|
||||||
CT_Drawer();
|
{
|
||||||
C_DrawConsole();
|
// Draw overlay elements
|
||||||
M_Drawer();
|
CT_Drawer();
|
||||||
FStat::PrintStat(twod);
|
C_DrawConsole();
|
||||||
DrawRateStuff();
|
M_Drawer();
|
||||||
|
FStat::PrintStat(twod);
|
||||||
|
DrawRateStuff();
|
||||||
|
}
|
||||||
|
|
||||||
videoShowFrame(0);
|
videoShowFrame(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,6 @@ void uploadCinemaPalettes();
|
||||||
int32_t registerosdcommands(void);
|
int32_t registerosdcommands(void);
|
||||||
void InitFonts();
|
void InitFonts();
|
||||||
|
|
||||||
int htimer = 0;
|
|
||||||
int EndLevel = false;
|
int EndLevel = false;
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,9 +85,6 @@ void InstallEngine()
|
||||||
uploadCinemaPalettes();
|
uploadCinemaPalettes();
|
||||||
LoadPaletteLookups();
|
LoadPaletteLookups();
|
||||||
InitFonts();
|
InitFonts();
|
||||||
videoInit();
|
|
||||||
|
|
||||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19950829;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveEngine()
|
void RemoveEngine()
|
||||||
|
@ -628,11 +624,6 @@ void ExitGame()
|
||||||
throw CExitEvent(0);
|
throw CExitEvent(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitTimer()
|
|
||||||
{
|
|
||||||
htimer = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GameInterface::app_init()
|
void GameInterface::app_init()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -673,22 +664,18 @@ void GameInterface::app_init()
|
||||||
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime);
|
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
enginePostInit();
|
|
||||||
|
|
||||||
InitView();
|
InitView();
|
||||||
InitFX();
|
InitFX();
|
||||||
seq_LoadSequences();
|
seq_LoadSequences();
|
||||||
InitStatus();
|
InitStatus();
|
||||||
InitTimer();
|
|
||||||
|
|
||||||
for (i = 0; i < kMaxPlayers; i++) {
|
for (i = 0; i < kMaxPlayers; i++) {
|
||||||
nPlayerLives[i] = kDefaultLives;
|
nPlayerLives[i] = kDefaultLives;
|
||||||
}
|
}
|
||||||
|
resettiming();
|
||||||
ResetEngine();
|
|
||||||
ResetView();
|
|
||||||
GrabPalette();
|
GrabPalette();
|
||||||
|
|
||||||
|
enginecompatibility_mode = ENGINECOMPATIBILITY_19950829;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mychangespritesect(int nSprite, int nSector)
|
void mychangespritesect(int nSprite, int nSector)
|
||||||
|
|
|
@ -106,8 +106,6 @@ extern int GameAction;
|
||||||
|
|
||||||
extern int nNetPlayerCount;
|
extern int nNetPlayerCount;
|
||||||
|
|
||||||
extern int htimer;
|
|
||||||
|
|
||||||
extern int nNetTime;
|
extern int nNetTime;
|
||||||
|
|
||||||
extern short nTotalPlayers;
|
extern short nTotalPlayers;
|
||||||
|
|
|
@ -310,6 +310,7 @@ void seq_LoadSequences()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
FILE* f = fopen("seq.dump", "wb");
|
FILE* f = fopen("seq.dump", "wb");
|
||||||
|
|
||||||
fwrite(SeqBase, 1, sizeof(SeqBase), f);
|
fwrite(SeqBase, 1, sizeof(SeqBase), f);
|
||||||
|
@ -326,6 +327,7 @@ void seq_LoadSequences()
|
||||||
fwrite(ChunkPict, 1, sizeof(ChunkPict), f);
|
fwrite(ChunkPict, 1, sizeof(ChunkPict), f);
|
||||||
fwrite(ChunkFlag, 1, sizeof(ChunkFlag), f);
|
fwrite(ChunkFlag, 1, sizeof(ChunkFlag), f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
#endif
|
||||||
|
|
||||||
nShadowPic = seq_GetFirstSeqPicnum(kSeqShadow);
|
nShadowPic = seq_GetFirstSeqPicnum(kSeqShadow);
|
||||||
nShadowWidth = tilesiz[nShadowPic].x;
|
nShadowWidth = tilesiz[nShadowPic].x;
|
||||||
|
|
|
@ -272,7 +272,7 @@ static void initTiles()
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
static void Startup(void)
|
void GameInterface::app_init()
|
||||||
{
|
{
|
||||||
if (isRR()) C_SetNotifyFontScale(0.5);
|
if (isRR()) C_SetNotifyFontScale(0.5);
|
||||||
ud.god = 0;
|
ud.god = 0;
|
||||||
|
@ -313,8 +313,6 @@ static void Startup(void)
|
||||||
|
|
||||||
OnEvent(EVENT_INIT);
|
OnEvent(EVENT_INIT);
|
||||||
|
|
||||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19961112;
|
|
||||||
|
|
||||||
if (engineInit())
|
if (engineInit())
|
||||||
G_FatalEngineError();
|
G_FatalEngineError();
|
||||||
|
|
||||||
|
@ -348,21 +346,7 @@ static void Startup(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
ud.last_level = -1;
|
ud.last_level = -1;
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// main entry point, sets up the game module and the engine, then enters the main loop
|
|
||||||
//
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void GameInterface::app_init()
|
|
||||||
{
|
|
||||||
Startup();
|
|
||||||
enginePostInit();
|
|
||||||
videoInit();
|
|
||||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19961112;//bVanilla;
|
enginecompatibility_mode = ENGINECOMPATIBILITY_19961112;//bVanilla;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
END_DUKE_NS
|
END_DUKE_NS
|
||||||
|
|
|
@ -237,8 +237,6 @@ void GameInterface::app_init()
|
||||||
|
|
||||||
if (!loaddefinitionsfile(G_DefFile())) Printf(PRINT_NONOTIFY, "Definitions file loaded.\n");
|
if (!loaddefinitionsfile(G_DefFile())) Printf(PRINT_NONOTIFY, "Definitions file loaded.\n");
|
||||||
userConfig.AddDefs.reset();
|
userConfig.AddDefs.reset();
|
||||||
enginePostInit();
|
|
||||||
videoInit();
|
|
||||||
InitFX();
|
InitFX();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue