mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 12:40:38 +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(xsprite,0,sizeof(xsprite));
|
||||||
memset(sprite,0,kMaxSprites*sizeof(spritetype));
|
memset(sprite,0,kMaxSprites*sizeof(spritetype));
|
||||||
//drawLoadingScreen();
|
//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");
|
I_Error("Unable to load map");
|
||||||
}
|
}
|
||||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||||
STAT_NewLevel(currentLevel->fileName);
|
STAT_NewLevel(currentLevel->fileName);
|
||||||
G_LoadMapHack(currentLevel->fileName);
|
G_LoadMapHack(currentLevel->fileName);
|
||||||
wsrand(gameOptions->uMapCRC);
|
wsrand(dbReadMapCRC(currentLevel->LabelName()));
|
||||||
gKillMgr.Clear();
|
gKillMgr.Clear();
|
||||||
gSecretMgr.Clear();
|
gSecretMgr.Clear();
|
||||||
gLevelTime = 0;
|
gLevelTime = 0;
|
||||||
|
|
|
@ -46,7 +46,7 @@ BEGIN_BLD_NS
|
||||||
GAMEOPTIONS gGameOptions;
|
GAMEOPTIONS gGameOptions;
|
||||||
|
|
||||||
GAMEOPTIONS gSingleGameOptions = {
|
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];
|
EPISODEINFO gEpisodeInfo[kMaxEpisodes+1];
|
||||||
|
@ -114,10 +114,6 @@ void levelSetupOptions(int nEpisode, int nLevel)
|
||||||
{
|
{
|
||||||
gGameOptions.nEpisode = nEpisode;
|
gGameOptions.nEpisode = nEpisode;
|
||||||
gGameOptions.nLevel = nLevel;
|
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)
|
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);
|
levelLoadMapInfo(&UserINI, pLevelInfo, NULL, nEpisode, nLevel);
|
||||||
gGameOptions.nEpisode = nEpisode;
|
gGameOptions.nEpisode = nEpisode;
|
||||||
gGameOptions.nLevel = nLevel;
|
gGameOptions.nLevel = nLevel;
|
||||||
gGameOptions.uMapCRC = dbReadMapCRC(pLevelInfo->name);
|
|
||||||
#else
|
#else
|
||||||
auto map = SetupUserMap(pzMap);
|
auto map = SetupUserMap(pzMap);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -40,10 +40,8 @@ struct GAMEOPTIONS {
|
||||||
unsigned char nDifficulty;
|
unsigned char nDifficulty;
|
||||||
int nEpisode;
|
int nEpisode;
|
||||||
int nLevel;
|
int nLevel;
|
||||||
int nTrackNumber; //at12a;
|
|
||||||
short nSaveGameSlot;
|
short nSaveGameSlot;
|
||||||
int picEntry;
|
int picEntry;
|
||||||
unsigned int uMapCRC;
|
|
||||||
char nMonsterSettings;
|
char nMonsterSettings;
|
||||||
int uGameFlags;
|
int uGameFlags;
|
||||||
int uNetGameFlags;
|
int uNetGameFlags;
|
||||||
|
|
|
@ -60,25 +60,19 @@ static int osdcmd_map(CCmdFuncPtr parm)
|
||||||
auto maprec = FindMapByName(mapname);
|
auto maprec = FindMapByName(mapname);
|
||||||
if (maprec)
|
if (maprec)
|
||||||
{
|
{
|
||||||
int e = volfromlevelnum(mapList[i].levelNumber);
|
int e = volfromlevelnum(maprec->levelNumber);
|
||||||
int m = mapfromlevelnum(mapList[i].levelNumber);
|
int m = mapfromlevelnum(maprec->levelNumber);
|
||||||
LevelWarp(e, m);
|
LevelWarp(e, m);
|
||||||
return CCMD_OK;
|
return CCMD_OK;
|
||||||
}
|
}
|
||||||
// Map has not been defined. Treat as user map.
|
// 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);
|
levelAddUserMap(mapname);
|
||||||
|
|
||||||
if (numplayers > 1)
|
|
||||||
{
|
|
||||||
gPacketStartGame.episodeId = gGameOptions.nEpisode;
|
|
||||||
gPacketStartGame.levelId = gGameOptions.nLevel;
|
|
||||||
netBroadcastNewGame();
|
|
||||||
gStartNewGame = 1;
|
|
||||||
return CCMD_OK;
|
|
||||||
}
|
|
||||||
levelSetupOptions(gGameOptions.nEpisode, gGameOptions.nLevel);
|
levelSetupOptions(gGameOptions.nEpisode, gGameOptions.nLevel);
|
||||||
StartLevel(&gGameOptions);
|
StartLevel(&gGameOptions);
|
||||||
|
#endif
|
||||||
|
|
||||||
return CCMD_OK;
|
return CCMD_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue