mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- hooked up Blood with the statistics code.
This commit is contained in:
parent
6ccef7201e
commit
dee1cba849
4 changed files with 13 additions and 4 deletions
|
@ -70,6 +70,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "gameconfigfile.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "m_argv.h"
|
||||
#include "statistics.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <shellapi.h>
|
||||
|
@ -480,6 +481,7 @@ int16_t startang, startsectnum;
|
|||
|
||||
void StartLevel(GAMEOPTIONS *gameOptions)
|
||||
{
|
||||
STAT_Update(0);
|
||||
EndLevel();
|
||||
gStartNewGame = 0;
|
||||
ready2send = 0;
|
||||
|
@ -545,6 +547,7 @@ void StartLevel(GAMEOPTIONS *gameOptions)
|
|||
return;
|
||||
}
|
||||
char levelName[BMAX_PATH];
|
||||
STAT_NewLevel(gameOptions->zLevelName);
|
||||
G_LoadMapHack(levelName, gameOptions->zLevelName);
|
||||
wsrand(gameOptions->uMapCRC);
|
||||
gKillMgr.Clear();
|
||||
|
@ -1469,8 +1472,11 @@ RESTART:
|
|||
// gStartNewGame = 0;
|
||||
// gQuitGame = 1;
|
||||
//}
|
||||
if (gStartNewGame)
|
||||
StartLevel(&gGameOptions);
|
||||
if (gStartNewGame)
|
||||
{
|
||||
STAT_StartNewGame(gEpisodeInfo[gGameOptions.nEpisode].at0, gGameOptions.nDifficulty);
|
||||
StartLevel(&gGameOptions);
|
||||
}
|
||||
}
|
||||
ready2send = 0;
|
||||
if (gDemo.at0)
|
||||
|
|
|
@ -39,6 +39,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "sound.h"
|
||||
#include "view.h"
|
||||
#include "messages.h"
|
||||
#include "statistics.h"
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
|
@ -101,6 +102,7 @@ void CEndGameMgr::Setup(void)
|
|||
at1 = gInputMode;
|
||||
gInputMode = kInputEndGame;
|
||||
at0 = 1;
|
||||
STAT_Update(true);
|
||||
EndLevel();
|
||||
sndStartSample(268, 128, -1, 1);
|
||||
inputState.keyFlushScans();
|
||||
|
|
|
@ -354,6 +354,7 @@ void STAT_StartNewGame(const char *episode, int skill)
|
|||
strncpy(StartEpisode, episode, MAX_PATH);
|
||||
StartSkill = skill;
|
||||
LevelData.Clear();
|
||||
*LevelName = 0;
|
||||
}
|
||||
|
||||
void STAT_NewLevel(const char* mapname)
|
||||
|
@ -397,7 +398,7 @@ static void StoreLevelStats()
|
|||
|
||||
void STAT_Update(bool endofgame)
|
||||
{
|
||||
if (*StartEpisode == 0) return;
|
||||
if (*StartEpisode == 0 || *LevelName == 0) return;
|
||||
const char* fn = "?";
|
||||
// record the current level's stats.
|
||||
StoreLevelStats();
|
||||
|
|
|
@ -44,7 +44,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "gameconfigfile.h"
|
||||
#include "printf.h"
|
||||
#include "m_argv.h"
|
||||
#include "filesystem.h"
|
||||
#include "filesystem/filesystem.h"
|
||||
#include "statistics.h"
|
||||
|
||||
// Uncomment to prevent anything except mirrors from drawing. It is sensible to
|
||||
|
|
Loading…
Reference in a new issue