mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- undid some formatting screwups from the merge.
This commit is contained in:
parent
942beea1ff
commit
4dc7f8b142
2 changed files with 40 additions and 40 deletions
|
@ -188,14 +188,14 @@ void GameInterface::app_init()
|
||||||
registerosdcommands();
|
registerosdcommands();
|
||||||
|
|
||||||
engineInit();
|
engineInit();
|
||||||
auto pal = fileSystem.LoadFile("3drealms.pal", 0);
|
auto pal = fileSystem.LoadFile("3drealms.pal", 0);
|
||||||
if (pal.Size() >= 768)
|
if (pal.Size() >= 768)
|
||||||
{
|
{
|
||||||
for (auto& c : pal)
|
for (auto& c : pal)
|
||||||
c <<= 2;
|
c <<= 2;
|
||||||
|
|
||||||
paletteSetColorTable(DREALMSPAL, pal.Data(), true, true);
|
paletteSetColorTable(DREALMSPAL, pal.Data(), true, true);
|
||||||
}
|
}
|
||||||
InitPalette();
|
InitPalette();
|
||||||
// sets numplayers, connecthead, connectpoint2, myconnectindex
|
// sets numplayers, connecthead, connectpoint2, myconnectindex
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ void GameInterface::app_init()
|
||||||
"the full version. Read the Ordering Info screens for details.");
|
"the full version. Read the Ordering Info screens for details.");
|
||||||
}
|
}
|
||||||
|
|
||||||
TileFiles.LoadArtSet("tiles%03d.art");
|
TileFiles.LoadArtSet("tiles%03d.art");
|
||||||
InitFonts();
|
InitFonts();
|
||||||
|
|
||||||
//Connect();
|
//Connect();
|
||||||
|
@ -229,7 +229,7 @@ void GameInterface::app_init()
|
||||||
|
|
||||||
LoadDefinitions();
|
LoadDefinitions();
|
||||||
TileFiles.SetBackup();
|
TileFiles.SetBackup();
|
||||||
userConfig.AddDefs.reset();
|
userConfig.AddDefs.reset();
|
||||||
InitFX();
|
InitFX();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,17 +307,17 @@ void InitLevel(MapRecord *maprec)
|
||||||
// A few IMPORTANT GLOBAL RESETS
|
// A few IMPORTANT GLOBAL RESETS
|
||||||
InitLevelGlobals();
|
InitLevelGlobals();
|
||||||
|
|
||||||
Mus_Stop();
|
Mus_Stop();
|
||||||
|
|
||||||
if (!maprec)
|
if (!maprec)
|
||||||
{
|
{
|
||||||
I_Error("Attempt to start game without level");
|
I_Error("Attempt to start game without level");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
InitLevelGlobals2();
|
InitLevelGlobals2();
|
||||||
|
|
||||||
if (NewGame)
|
if (NewGame)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_SW_PLAYERS; i++)
|
for (int i = 0; i < MAX_SW_PLAYERS; i++)
|
||||||
{
|
{
|
||||||
// don't jack with the playerreadyflag
|
// don't jack with the playerreadyflag
|
||||||
|
@ -330,19 +330,19 @@ void InitLevel(MapRecord *maprec)
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(puser, 0, sizeof(puser));
|
memset(puser, 0, sizeof(puser));
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t ang;
|
int16_t ang;
|
||||||
if (engineLoadBoard(maprec->fileName, SW_SHAREWARE ? 1 : 0, (vec3_t*)&Player[0], &ang, &Player[0].cursectnum) == -1)
|
if (engineLoadBoard(maprec->fileName, SW_SHAREWARE ? 1 : 0, (vec3_t*)&Player[0], &ang, &Player[0].cursectnum) == -1)
|
||||||
{
|
{
|
||||||
I_Error("Map not found: %s", maprec->fileName.GetChars());
|
I_Error("Map not found: %s", maprec->fileName.GetChars());
|
||||||
}
|
}
|
||||||
currentLevel = maprec;
|
currentLevel = maprec;
|
||||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||||
STAT_NewLevel(currentLevel->fileName);
|
STAT_NewLevel(currentLevel->fileName);
|
||||||
Player[0].q16ang = IntToFixed(ang);
|
Player[0].q16ang = IntToFixed(ang);
|
||||||
|
|
||||||
SetupPreCache();
|
SetupPreCache();
|
||||||
|
|
||||||
if (sector[0].extra != -1)
|
if (sector[0].extra != -1)
|
||||||
{
|
{
|
||||||
|
@ -412,7 +412,7 @@ void InitPlayerGameSettings(void)
|
||||||
SET(Player[pnum].Flags, PF_AUTO_AIM);
|
SET(Player[pnum].Flags, PF_AUTO_AIM);
|
||||||
else
|
else
|
||||||
RESET(Player[pnum].Flags, PF_AUTO_AIM);
|
RESET(Player[pnum].Flags, PF_AUTO_AIM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -516,8 +516,8 @@ void TerminateLevel(void)
|
||||||
|
|
||||||
// Free SectUser memory
|
// Free SectUser memory
|
||||||
for (sectu = &SectUser[0];
|
for (sectu = &SectUser[0];
|
||||||
sectu < &SectUser[MAXSECTORS];
|
sectu < &SectUser[MAXSECTORS];
|
||||||
sectu++)
|
sectu++)
|
||||||
{
|
{
|
||||||
if (*sectu)
|
if (*sectu)
|
||||||
{
|
{
|
||||||
|
@ -565,21 +565,21 @@ void TerminateLevel(void)
|
||||||
|
|
||||||
void GameInterface::LevelCompleted(MapRecord *map, int skill)
|
void GameInterface::LevelCompleted(MapRecord *map, int skill)
|
||||||
{
|
{
|
||||||
//ResetPalette(mpp);
|
//ResetPalette(mpp);
|
||||||
COVER_SetReverb(0); // Reset reverb
|
COVER_SetReverb(0); // Reset reverb
|
||||||
Player[myconnectindex].Reverb = 0;
|
Player[myconnectindex].Reverb = 0;
|
||||||
StopSound();
|
StopSound();
|
||||||
|
|
||||||
StatScreen(FinishAnim, [=](bool)
|
StatScreen(FinishAnim, [=](bool)
|
||||||
{
|
{
|
||||||
if (map == nullptr)
|
if (map == nullptr)
|
||||||
{
|
{
|
||||||
STAT_Update(true);
|
STAT_Update(true);
|
||||||
FinishAnim = false;
|
FinishAnim = false;
|
||||||
PlaySong(nullptr, ThemeSongs[0], ThemeTrack[0]);
|
PlaySong(nullptr, ThemeSongs[0], ThemeTrack[0]);
|
||||||
if (SW_SHAREWARE) gameaction = ga_creditsmenu;
|
if (SW_SHAREWARE) gameaction = ga_creditsmenu;
|
||||||
else gameaction = ga_mainmenu;
|
else gameaction = ga_mainmenu;
|
||||||
}
|
}
|
||||||
else gameaction = ga_nextlevel;
|
else gameaction = ga_nextlevel;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -621,13 +621,13 @@ void GameInterface::NewGame(MapRecord *map, int skill)
|
||||||
void GameInterface::Ticker(void)
|
void GameInterface::Ticker(void)
|
||||||
{
|
{
|
||||||
if (SavegameLoaded)
|
if (SavegameLoaded)
|
||||||
{
|
{
|
||||||
InitLevelGlobals();
|
InitLevelGlobals();
|
||||||
SavegameLoaded = false;
|
SavegameLoaded = false;
|
||||||
// contains what is needed from calls below
|
// contains what is needed from calls below
|
||||||
if (snd_ambience)
|
if (snd_ambience)
|
||||||
StartAmbientSound();
|
StartAmbientSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
TRAVERSE_CONNECT(i)
|
TRAVERSE_CONNECT(i)
|
||||||
|
@ -635,7 +635,7 @@ void GameInterface::Ticker(void)
|
||||||
auto pp = Player + i;
|
auto pp = Player + i;
|
||||||
pp->lastinput = pp->input;
|
pp->lastinput = pp->input;
|
||||||
pp->input = playercmds[i].ucmd;
|
pp->input = playercmds[i].ucmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
domovethings();
|
domovethings();
|
||||||
r_NoInterpolate = paused;
|
r_NoInterpolate = paused;
|
||||||
|
@ -649,14 +649,14 @@ void GameInterface::Ticker(void)
|
||||||
|
|
||||||
void GameInterface::Render()
|
void GameInterface::Render()
|
||||||
{
|
{
|
||||||
if (paused)
|
if (paused)
|
||||||
{
|
{
|
||||||
smoothratio = MaxSmoothRatio;
|
smoothratio = MaxSmoothRatio;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
smoothratio = I_GetTimeFrac() * MaxSmoothRatio;
|
smoothratio = I_GetTimeFrac() * MaxSmoothRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
drawtime.Reset();
|
drawtime.Reset();
|
||||||
drawtime.Clock();
|
drawtime.Clock();
|
||||||
|
|
|
@ -1025,8 +1025,8 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SetupPreCache();
|
SetupPreCache();
|
||||||
DoTheCache();
|
DoTheCache();
|
||||||
|
|
||||||
// this is ok - just duplicating sector list with pointers
|
// this is ok - just duplicating sector list with pointers
|
||||||
for (sop = SectorObject; sop < &SectorObject[SIZ(SectorObject)]; sop++)
|
for (sop = SectorObject; sop < &SectorObject[SIZ(SectorObject)]; sop++)
|
||||||
|
|
Loading…
Reference in a new issue