mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- initialize the secret hint system for each level.
This commit is contained in:
parent
3a30e083ad
commit
9fab46b7d7
5 changed files with 14 additions and 3 deletions
|
@ -73,6 +73,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "menu/menu.h"
|
||||
#include "sound/s_soundinternal.h"
|
||||
#include "nnexts.h"
|
||||
#include"secrets.h"
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
|
@ -557,6 +558,7 @@ void StartLevel(GAMEOPTIONS *gameOptions)
|
|||
}
|
||||
char levelName[BMAX_PATH];
|
||||
currentLevel = &mapList[gGameOptions.nEpisode * kMaxLevels + gGameOptions.nLevel];
|
||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(gameOptions->zLevelName);
|
||||
G_LoadMapHack(levelName, gameOptions->zLevelName);
|
||||
wsrand(gameOptions->uMapCRC);
|
||||
|
|
|
@ -161,6 +161,7 @@ bool SECRET_Load()
|
|||
|
||||
void SECRET_SetMapName(const char *filename, const char *_maptitle)
|
||||
{
|
||||
discovered_secrets.Clear();
|
||||
mapfile = filename;
|
||||
maptitle = _maptitle;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "mapinfo.h"
|
||||
#include "cmdlib.h"
|
||||
#include "v_2ddrawer.h"
|
||||
#include "secrets.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
@ -1779,6 +1780,7 @@ int G_EnterLevel(int gameMode)
|
|||
userMapRecord.name = "";
|
||||
userMapRecord.SetFileName(boardfilename);
|
||||
currentLevel = &userMapRecord;
|
||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(boardfilename);
|
||||
G_LoadMapHack(levelName, boardfilename);
|
||||
|
||||
|
@ -1792,7 +1794,8 @@ int G_EnterLevel(int gameMode)
|
|||
else
|
||||
{
|
||||
currentLevel = &mm;
|
||||
STAT_NewLevel(mm.fileName);
|
||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(mm.fileName);
|
||||
G_LoadMapHack(levelName, mm.fileName);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "mapinfo.h"
|
||||
#include "cmdlib.h"
|
||||
#include "v_2ddrawer.h"
|
||||
#include "secrets.h"
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
||||
|
@ -2329,6 +2330,7 @@ int G_EnterLevel(int gameMode)
|
|||
userMapRecord.name = "";
|
||||
userMapRecord.SetFileName(boardfilename);
|
||||
currentLevel = &userMapRecord;
|
||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(boardfilename);
|
||||
G_LoadMapHack(levelName, boardfilename);
|
||||
userMapRecord.music = G_SetupFilenameBasedMusic(boardfilename, !RR? "dethtoll.mid" : nullptr);
|
||||
|
@ -2341,7 +2343,8 @@ int G_EnterLevel(int gameMode)
|
|||
else
|
||||
{
|
||||
currentLevel = &mi;
|
||||
STAT_NewLevel(mi.fileName);
|
||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(mi.fileName);
|
||||
G_LoadMapHack(levelName, mi.fileName);
|
||||
}
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ Things required to make savegames work:
|
|||
#include "mapinfo.h"
|
||||
#include "rendering/v_video.h"
|
||||
#include "sound/s_soundinternal.h"
|
||||
#include "secrets.h"
|
||||
|
||||
#include "osdcmds.h"
|
||||
|
||||
|
@ -622,7 +623,8 @@ bool LoadLevel(const char *filename)
|
|||
return false;
|
||||
}
|
||||
currentLevel = &mapList[Level];
|
||||
STAT_NewLevel(currentLevel->labelName);
|
||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(currentLevel->labelName);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue