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