- try to encapsulate access to the player class's display name for printing purposes.

SVN r2839 (trunk)
This commit is contained in:
Christoph Oelckers 2010-09-21 09:43:54 +00:00
commit 583cbd49a6
6 changed files with 24 additions and 10 deletions

View file

@ -52,6 +52,7 @@
#include "thingdef/thingdef.h"
#include "g_level.h"
#include "d_net.h"
#include "gstrings.h"
static FRandom pr_skullpop ("SkullPop");
@ -95,6 +96,19 @@ bool FPlayerClass::CheckSkin (int skin)
return false;
}
//===========================================================================
//
// GetDisplayName
//
//===========================================================================
const char *GetPrintableDisplayName(const PClass *cls)
{
// Fixme; This needs a decent way to access the string table without creating a mess.
const char *name = cls->Meta.GetMetaString(APMETA_DisplayName);
return name;
}
bool ValidatePlayerClass(const PClass *ti, const char *name)
{
if (!ti)