mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +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;
|
||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19960925;//bVanilla;
|
||||
memset(xsprite,0,sizeof(xsprite));
|
||||
memset(sprite,0,kMaxSprites*sizeof(spritetype));
|
||||
//drawLoadingScreen();
|
||||
|
@ -704,13 +703,14 @@ void GameInterface::app_init()
|
|||
|
||||
Printf(PRINT_NONOTIFY, "Initializing network users\n");
|
||||
netInitialize(true);
|
||||
videoInit();
|
||||
Printf(PRINT_NONOTIFY, "Initializing sound system\n");
|
||||
sndInit();
|
||||
registerosdcommands();
|
||||
|
||||
gChoke.sub_83ff0(518, sub_84230);
|
||||
UpdateDacs(0, true);
|
||||
|
||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19960925;//bVanilla;
|
||||
}
|
||||
|
||||
static void gameInit()
|
||||
|
|
|
@ -322,7 +322,6 @@ void viewInit(void)
|
|||
FontSet(2, 4288, 1);
|
||||
FontSet(3, 4384, 1);
|
||||
FontSet(4, 4480, 0);
|
||||
enginePostInit(); // This must not be done earlier!
|
||||
|
||||
lensdata = fileSystem.LoadFile("lens.dat");
|
||||
dassert(lensdata.Size() == kLensSize * kLensSize * sizeof(int));
|
||||
|
|
|
@ -1745,10 +1745,10 @@ bool D_CheckNetGame (void)
|
|||
|
||||
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);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -142,7 +142,7 @@ void DrawFullscreenBlends();
|
|||
void MainLoop();
|
||||
|
||||
|
||||
bool AppActive;
|
||||
bool AppActive = true;
|
||||
|
||||
FString currentGame;
|
||||
FString LumpFilter;
|
||||
|
@ -862,9 +862,11 @@ int RunGame()
|
|||
|
||||
SetupGameButtons();
|
||||
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.
|
||||
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();
|
||||
MainLoop();
|
||||
|
@ -1150,6 +1152,7 @@ void S_SetSoundPaused(int state)
|
|||
}
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
if (!netgame
|
||||
#if 0 //def _DEBUG
|
||||
&& !demoplayback
|
||||
|
@ -1158,7 +1161,7 @@ void S_SetSoundPaused(int state)
|
|||
{
|
||||
pauseext = !state;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
FString G_GetDemoPath()
|
||||
|
|
|
@ -229,7 +229,8 @@ void Display()
|
|||
gi->DrawBackground();
|
||||
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.
|
||||
RunScreenJobFrame();
|
||||
break;
|
||||
|
@ -248,12 +249,15 @@ void Display()
|
|||
|
||||
NetUpdate(); // send out any new accumulation
|
||||
|
||||
if (gamestate != GS_INTRO) // do not draw overlays on the intros
|
||||
{
|
||||
// Draw overlay elements
|
||||
CT_Drawer();
|
||||
C_DrawConsole();
|
||||
M_Drawer();
|
||||
FStat::PrintStat(twod);
|
||||
DrawRateStuff();
|
||||
}
|
||||
|
||||
videoShowFrame(0);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,6 @@ void uploadCinemaPalettes();
|
|||
int32_t registerosdcommands(void);
|
||||
void InitFonts();
|
||||
|
||||
int htimer = 0;
|
||||
int EndLevel = false;
|
||||
|
||||
|
||||
|
@ -86,9 +85,6 @@ void InstallEngine()
|
|||
uploadCinemaPalettes();
|
||||
LoadPaletteLookups();
|
||||
InitFonts();
|
||||
videoInit();
|
||||
|
||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19950829;
|
||||
}
|
||||
|
||||
void RemoveEngine()
|
||||
|
@ -628,11 +624,6 @@ void ExitGame()
|
|||
throw CExitEvent(0);
|
||||
}
|
||||
|
||||
void InitTimer()
|
||||
{
|
||||
htimer = 1;
|
||||
}
|
||||
|
||||
void GameInterface::app_init()
|
||||
{
|
||||
int i;
|
||||
|
@ -673,22 +664,18 @@ void GameInterface::app_init()
|
|||
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime);
|
||||
}
|
||||
|
||||
|
||||
enginePostInit();
|
||||
|
||||
InitView();
|
||||
InitFX();
|
||||
seq_LoadSequences();
|
||||
InitStatus();
|
||||
InitTimer();
|
||||
|
||||
for (i = 0; i < kMaxPlayers; i++) {
|
||||
nPlayerLives[i] = kDefaultLives;
|
||||
}
|
||||
|
||||
ResetEngine();
|
||||
ResetView();
|
||||
resettiming();
|
||||
GrabPalette();
|
||||
|
||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19950829;
|
||||
}
|
||||
|
||||
void mychangespritesect(int nSprite, int nSector)
|
||||
|
|
|
@ -106,8 +106,6 @@ extern int GameAction;
|
|||
|
||||
extern int nNetPlayerCount;
|
||||
|
||||
extern int htimer;
|
||||
|
||||
extern int nNetTime;
|
||||
|
||||
extern short nTotalPlayers;
|
||||
|
|
|
@ -310,6 +310,7 @@ void seq_LoadSequences()
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
FILE* f = fopen("seq.dump", "wb");
|
||||
|
||||
fwrite(SeqBase, 1, sizeof(SeqBase), f);
|
||||
|
@ -326,6 +327,7 @@ void seq_LoadSequences()
|
|||
fwrite(ChunkPict, 1, sizeof(ChunkPict), f);
|
||||
fwrite(ChunkFlag, 1, sizeof(ChunkFlag), f);
|
||||
fclose(f);
|
||||
#endif
|
||||
|
||||
nShadowPic = seq_GetFirstSeqPicnum(kSeqShadow);
|
||||
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);
|
||||
ud.god = 0;
|
||||
|
@ -313,8 +313,6 @@ static void Startup(void)
|
|||
|
||||
OnEvent(EVENT_INIT);
|
||||
|
||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19961112;
|
||||
|
||||
if (engineInit())
|
||||
G_FatalEngineError();
|
||||
|
||||
|
@ -348,21 +346,7 @@ static void Startup(void)
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
|
@ -237,8 +237,6 @@ void GameInterface::app_init()
|
|||
|
||||
if (!loaddefinitionsfile(G_DefFile())) Printf(PRINT_NONOTIFY, "Definitions file loaded.\n");
|
||||
userConfig.AddDefs.reset();
|
||||
enginePostInit();
|
||||
videoInit();
|
||||
InitFX();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue