mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- removed redundant fields from Blood's startup info struct.
This commit is contained in:
parent
90a4d0dcb8
commit
0ac8568be0
4 changed files with 7 additions and 20 deletions
|
@ -415,14 +415,14 @@ void StartLevel(GAMEOPTIONS *gameOptions)
|
|||
memset(xsprite,0,sizeof(xsprite));
|
||||
memset(sprite,0,kMaxSprites*sizeof(spritetype));
|
||||
//drawLoadingScreen();
|
||||
if (dbLoadMap(currentLevel->fileName,(int*)&startpos.x,(int*)&startpos.y,(int*)&startpos.z,&startang,&startsectnum,(unsigned int*)&gameOptions->uMapCRC))
|
||||
if (dbLoadMap(currentLevel->fileName,(int*)&startpos.x,(int*)&startpos.y,(int*)&startpos.z,&startang,&startsectnum,nullptr))
|
||||
{
|
||||
I_Error("Unable to load map");
|
||||
}
|
||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(currentLevel->fileName);
|
||||
G_LoadMapHack(currentLevel->fileName);
|
||||
wsrand(gameOptions->uMapCRC);
|
||||
wsrand(dbReadMapCRC(currentLevel->LabelName()));
|
||||
gKillMgr.Clear();
|
||||
gSecretMgr.Clear();
|
||||
gLevelTime = 0;
|
||||
|
|
|
@ -46,7 +46,7 @@ BEGIN_BLD_NS
|
|||
GAMEOPTIONS gGameOptions;
|
||||
|
||||
GAMEOPTIONS gSingleGameOptions = {
|
||||
0, 2, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 3600, 1800, 1800, 7200
|
||||
0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 3600, 1800, 1800, 7200
|
||||
};
|
||||
|
||||
EPISODEINFO gEpisodeInfo[kMaxEpisodes+1];
|
||||
|
@ -114,10 +114,6 @@ void levelSetupOptions(int nEpisode, int nLevel)
|
|||
{
|
||||
gGameOptions.nEpisode = nEpisode;
|
||||
gGameOptions.nLevel = nLevel;
|
||||
auto level = FindMapByLevelNum(levelnum(nEpisode, nLevel));
|
||||
if (!level) return;
|
||||
gGameOptions.uMapCRC = dbReadMapCRC(level->LabelName());
|
||||
gGameOptions.nTrackNumber = level->cdSongId;
|
||||
}
|
||||
|
||||
void levelLoadMapInfo(IniFile *pIni, MapRecord *pLevelInfo, const char *pzSection, int epinum, int mapnum)
|
||||
|
@ -224,7 +220,6 @@ void levelAddUserMap(const char *pzMap)
|
|||
levelLoadMapInfo(&UserINI, pLevelInfo, NULL, nEpisode, nLevel);
|
||||
gGameOptions.nEpisode = nEpisode;
|
||||
gGameOptions.nLevel = nLevel;
|
||||
gGameOptions.uMapCRC = dbReadMapCRC(pLevelInfo->name);
|
||||
#else
|
||||
auto map = SetupUserMap(pzMap);
|
||||
#endif
|
||||
|
|
|
@ -40,10 +40,8 @@ struct GAMEOPTIONS {
|
|||
unsigned char nDifficulty;
|
||||
int nEpisode;
|
||||
int nLevel;
|
||||
int nTrackNumber; //at12a;
|
||||
short nSaveGameSlot;
|
||||
int picEntry;
|
||||
unsigned int uMapCRC;
|
||||
char nMonsterSettings;
|
||||
int uGameFlags;
|
||||
int uNetGameFlags;
|
||||
|
|
|
@ -60,25 +60,19 @@ static int osdcmd_map(CCmdFuncPtr parm)
|
|||
auto maprec = FindMapByName(mapname);
|
||||
if (maprec)
|
||||
{
|
||||
int e = volfromlevelnum(mapList[i].levelNumber);
|
||||
int m = mapfromlevelnum(mapList[i].levelNumber);
|
||||
int e = volfromlevelnum(maprec->levelNumber);
|
||||
int m = mapfromlevelnum(maprec->levelNumber);
|
||||
LevelWarp(e, m);
|
||||
return CCMD_OK;
|
||||
}
|
||||
// Map has not been defined. Treat as user map.
|
||||
|
||||
#if 0 // this doesn't work yet because map progression is hardwired to the level number.
|
||||
levelAddUserMap(mapname);
|
||||
|
||||
if (numplayers > 1)
|
||||
{
|
||||
gPacketStartGame.episodeId = gGameOptions.nEpisode;
|
||||
gPacketStartGame.levelId = gGameOptions.nLevel;
|
||||
netBroadcastNewGame();
|
||||
gStartNewGame = 1;
|
||||
return CCMD_OK;
|
||||
}
|
||||
levelSetupOptions(gGameOptions.nEpisode, gGameOptions.nLevel);
|
||||
StartLevel(&gGameOptions);
|
||||
#endif
|
||||
|
||||
return CCMD_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue