mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Make a bunch more strings const.
This commit is contained in:
@ -97,13 +97,13 @@ enum
|
||||
struct Win32keyConvert
|
||||
{
|
||||
UInt32 fVKey;
|
||||
char* fKeyName;
|
||||
const char* fKeyName;
|
||||
};
|
||||
|
||||
struct CommandConvert
|
||||
{
|
||||
ControlEventCode fCode;
|
||||
char* fDesc;
|
||||
const char* fDesc;
|
||||
};
|
||||
|
||||
|
||||
|
@ -501,7 +501,7 @@ void plKeyMap::EraseBinding( ControlEventCode code )
|
||||
}
|
||||
|
||||
|
||||
char* plKeyMap::ConvertVKeyToChar( UInt32 vk )
|
||||
const char* plKeyMap::ConvertVKeyToChar( UInt32 vk )
|
||||
{
|
||||
Win32keyConvert* keyConvert = &fKeyConversionEnglish[0];
|
||||
switch (plLocalization::GetLanguage())
|
||||
@ -1093,4 +1093,4 @@ CommandConvert plInputMap::fCmdConvert[] =
|
||||
|
||||
{ END_CONTROLS, ""},
|
||||
|
||||
};
|
||||
};
|
||||
|
@ -208,7 +208,7 @@ class plKeyMap : public plInputMap
|
||||
const plKeyBinding &GetBinding( UInt32 i ) const { return *fBindings[ i ]; }
|
||||
void HandleAutoDualBinding( plKeyDef key1, plKeyDef key2 );
|
||||
|
||||
static char *ConvertVKeyToChar( UInt32 vk );
|
||||
static const char* ConvertVKeyToChar( UInt32 vk );
|
||||
static plKeyDef ConvertCharToVKey( const char *c );
|
||||
|
||||
static Win32keyConvert fKeyConversionEnglish[];
|
||||
|
@ -147,7 +147,7 @@ char *plAgePage::GetAsString( void ) const
|
||||
|
||||
// static
|
||||
char plAgeDescription::kAgeDescPath[]={"dat"PATH_SEPARATOR_STR};
|
||||
char *plAgeDescription::fCommonPages[] = { "Textures", "BuiltIn" };
|
||||
const char* plAgeDescription::fCommonPages[] = { "Textures", "BuiltIn" };
|
||||
|
||||
// Also gotta init the separators for our helper reading function
|
||||
plAgeDescription::plAgeDescription() : plInitSectionTokenReader()
|
||||
@ -546,4 +546,4 @@ bool plAgeDescription::FindLocation(const plLocation& loc) const
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ private:
|
||||
Int32 fSeqPrefix;
|
||||
UInt32 fReleaseVersion; // 0 for pre-release, 1+ for actual released ages
|
||||
|
||||
static char *fCommonPages[];
|
||||
static const char* fCommonPages[];
|
||||
|
||||
void IInit( void );
|
||||
void IDeInit( void );
|
||||
|
@ -100,7 +100,7 @@ bool plManifestFile::LocalExists()
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
char* plManifest::fTimeFormat = "%m/%d/%y %H:%M:%S";
|
||||
const char* plManifest::fTimeFormat = "%m/%d/%y %H:%M:%S";
|
||||
static const UInt32 kLatestFormatVersion = 5;
|
||||
|
||||
plManifest::plManifest()
|
||||
|
@ -98,7 +98,7 @@ protected:
|
||||
void IReset();
|
||||
|
||||
public:
|
||||
static char* fTimeFormat; // Standard string for the printed version of our timestamps
|
||||
static const char* fTimeFormat; // Standard string for the printed version of our timestamps
|
||||
|
||||
void SetFormatVersion(UInt32 v) { fFormatVersion = v; }
|
||||
void AddFile(plManifestFile* file);
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
UInt32 fWidth;
|
||||
UInt32 fHeight;
|
||||
|
||||
plClothingElement(char *name, UInt32 xPos, UInt32 yPos, UInt32 width, UInt32 height)
|
||||
plClothingElement(const char *name, UInt32 xPos, UInt32 yPos, UInt32 width, UInt32 height)
|
||||
{
|
||||
fName = hsStrcpy(name);
|
||||
fXPos = xPos;
|
||||
|
@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "pnKeyedObject/plUoid.h"
|
||||
|
||||
|
||||
char *plFontCache::kCustFontExtension = ".prf";
|
||||
const char* plFontCache::kCustFontExtension = ".prf";
|
||||
|
||||
|
||||
plFontCache *plFontCache::fInstance = nil;
|
||||
|
@ -83,7 +83,7 @@ class plFontCache : public hsKeyedObject
|
||||
void LoadCustomFonts( const char *dir );
|
||||
|
||||
// Our custom font extension
|
||||
static char *kCustFontExtension;
|
||||
static const char* kCustFontExtension;
|
||||
};
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include <wingdi.h>
|
||||
|
||||
|
||||
char *plWinFontCache::kCustFontExtension = ".prf";
|
||||
const char* plWinFontCache::kCustFontExtension = ".prf";
|
||||
|
||||
|
||||
plWinFontCache::plWinFontCache()
|
||||
|
@ -107,7 +107,7 @@ class plWinFontCache
|
||||
void LoadCustomFonts( const char *dir );
|
||||
|
||||
// Our custom font extension
|
||||
static char *kCustFontExtension;
|
||||
static const char* kCustFontExtension;
|
||||
};
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@ class plAvatarInputMap
|
||||
|
||||
plAvatarInputMap();
|
||||
virtual ~plAvatarInputMap();
|
||||
virtual char *GetName() = 0;
|
||||
virtual const char *GetName() = 0;
|
||||
virtual hsBool IsBasic() { return false; }
|
||||
|
||||
plMouseMap *fMouseMap;
|
||||
@ -78,7 +78,7 @@ class plSuspendedMovementMap : public plAvatarInputMap
|
||||
{
|
||||
public:
|
||||
plSuspendedMovementMap();
|
||||
virtual char *GetName() { return "Suspended Movement"; }
|
||||
virtual const char *GetName() { return "Suspended Movement"; }
|
||||
};
|
||||
|
||||
// The above, plus movement
|
||||
@ -86,7 +86,7 @@ class plBasicControlMap : public plSuspendedMovementMap
|
||||
{
|
||||
public:
|
||||
plBasicControlMap();
|
||||
virtual char *GetName() { return "Basic"; }
|
||||
virtual const char *GetName() { return "Basic"; }
|
||||
virtual hsBool IsBasic() { return true; }
|
||||
|
||||
};
|
||||
@ -95,28 +95,28 @@ class plBasicThirdPersonControlMap : public plBasicControlMap
|
||||
{
|
||||
public:
|
||||
plBasicThirdPersonControlMap();
|
||||
virtual char *GetName() { return "Basic Third Person"; }
|
||||
virtual const char *GetName() { return "Basic Third Person"; }
|
||||
};
|
||||
|
||||
class plLadderControlMap : public plSuspendedMovementMap
|
||||
{
|
||||
public:
|
||||
plLadderControlMap();
|
||||
virtual char *GetName() { return "LadderClimb"; }
|
||||
virtual const char *GetName() { return "LadderClimb"; }
|
||||
};
|
||||
|
||||
class plLadderMountMap : public plSuspendedMovementMap
|
||||
{
|
||||
public:
|
||||
plLadderMountMap();
|
||||
virtual char *GetName() { return "Ladder Mount"; }
|
||||
virtual const char *GetName() { return "Ladder Mount"; }
|
||||
};
|
||||
|
||||
class plLadderDismountMap : public plSuspendedMovementMap
|
||||
{
|
||||
public:
|
||||
plLadderDismountMap();
|
||||
virtual char *GetName() { return "Ladder Dismount"; }
|
||||
virtual const char *GetName() { return "Ladder Dismount"; }
|
||||
};
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ class plBasicFirstPersonControlMap : public plBasicControlMap
|
||||
{
|
||||
public:
|
||||
plBasicFirstPersonControlMap();
|
||||
virtual char *GetName() { return "Basic First Person"; }
|
||||
virtual const char *GetName() { return "Basic First Person"; }
|
||||
};
|
||||
|
||||
// Mouse walk mode
|
||||
@ -139,21 +139,21 @@ class pl3rdWalkForwardMap : public pl3rdWalkMap
|
||||
{
|
||||
public:
|
||||
pl3rdWalkForwardMap();
|
||||
virtual char *GetName() { return "Walking Forward"; }
|
||||
virtual const char *GetName() { return "Walking Forward"; }
|
||||
};
|
||||
|
||||
class pl3rdWalkBackwardMap : public pl3rdWalkMap
|
||||
{
|
||||
public:
|
||||
pl3rdWalkBackwardMap();
|
||||
virtual char *GetName() { return "Walking Backward"; }
|
||||
virtual const char *GetName() { return "Walking Backward"; }
|
||||
};
|
||||
|
||||
class pl3rdWalkBackwardLBMap : public pl3rdWalkMap
|
||||
{
|
||||
public:
|
||||
pl3rdWalkBackwardLBMap();
|
||||
virtual char *GetName() { return "Walking Backward (LB)"; }
|
||||
virtual const char *GetName() { return "Walking Backward (LB)"; }
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
@ -215,7 +215,7 @@ class plAvatarInputInterface : public plInputInterface
|
||||
virtual UInt32 GetPriorityLevel( void ) const { return kAvatarInputPriority; }
|
||||
virtual UInt32 GetCurrentCursorID( void ) const { return fCurrentCursor; }
|
||||
virtual hsScalar GetCurrentCursorOpacity( void ) const { return fCursorOpacity; }
|
||||
char* GetInputMapName() { return fInputMap ? fInputMap->GetName() : ""; }
|
||||
const char* GetInputMapName() { return fInputMap ? fInputMap->GetName() : ""; }
|
||||
|
||||
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg );
|
||||
virtual void MissedInputEvent( plInputEventMsg *pMsg );
|
||||
|
@ -32,10 +32,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsWindows.h"
|
||||
//#include "pnInputCore/plControlDefinition.h"
|
||||
#include "pnInputCore/plOSMsg.h"
|
||||
#include "pnInputCore/plKeyDef.h"
|
||||
#include "hsBitVector.h"
|
||||
#include "hsTemplates.h"
|
||||
class plMessage;
|
||||
enum plKeyDef;
|
||||
struct plMouseInfo;
|
||||
class plPipeline;
|
||||
|
||||
|
@ -861,7 +861,7 @@ const char *plInputInterfaceMgr::IKeyComboToString( const plKeyCombo &combo )
|
||||
sprintf( str, "(unmapped)" );
|
||||
else
|
||||
{
|
||||
char *c = plKeyMap::ConvertVKeyToChar( combo.fKey );
|
||||
const char *c = plKeyMap::ConvertVKeyToChar( combo.fKey );
|
||||
if( c != nil )
|
||||
strncpy( str, c, sizeof( str ) );
|
||||
else
|
||||
|
@ -232,7 +232,7 @@ public:
|
||||
// debug
|
||||
virtual std::string AsStdString() const
|
||||
{
|
||||
char * delim = "";
|
||||
const char* delim = "";
|
||||
|
||||
std::stringstream ss;
|
||||
if ( GetHasPlayerID() )
|
||||
|
@ -229,7 +229,7 @@ void hsG3DDeviceRecord::SetDeviceDesc( const char *s )
|
||||
|
||||
const char* hsG3DDeviceRecord::GetG3DDeviceTypeName() const
|
||||
{
|
||||
static char* deviceNames[hsG3DDeviceSelector::kNumDevTypes] = {
|
||||
static const char* deviceNames[hsG3DDeviceSelector::kNumDevTypes] = {
|
||||
"Unknown",
|
||||
"Glide",
|
||||
"Direct3D",
|
||||
|
@ -121,7 +121,7 @@ class plDebugText
|
||||
|
||||
void SetManager( plDebugTextManager *m ) { fManager = m; }
|
||||
|
||||
void SetFont( char *face, UInt16 size ) { hsStrncpy( fFontFace, face, sizeof( fFontFace ) ); fFontSize = size; }
|
||||
void SetFont(const char *face, UInt16 size ) { hsStrncpy( fFontFace, face, sizeof( fFontFace ) ); fFontSize = size; }
|
||||
const char *GetFontFace( void ) { return fFontFace; }
|
||||
const UInt16 GetFontSize( void ) { return fFontSize; }
|
||||
UInt16 GetFontHeight();
|
||||
|
@ -30,7 +30,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
plLocalization::Language plLocalization::fLanguage = plLocalization::kEnglish;
|
||||
|
||||
char* plLocalization::fLangTags[] =
|
||||
const char* plLocalization::fLangTags[] =
|
||||
{
|
||||
"_eng", // kEnglish
|
||||
"_fre", // kFrench
|
||||
@ -41,7 +41,7 @@ char* plLocalization::fLangTags[] =
|
||||
};
|
||||
const int kLangTagLen = 4;
|
||||
|
||||
char* plLocalization::fLangNames[] =
|
||||
const char* plLocalization::fLangNames[] =
|
||||
{
|
||||
"English", // kEnglish
|
||||
"French", // kFrench
|
||||
|
@ -59,8 +59,8 @@ public:
|
||||
|
||||
protected:
|
||||
static Language fLanguage;
|
||||
static char* fLangTags[kNumLanguages];
|
||||
static char* fLangNames[kNumLanguages];
|
||||
static const char* fLangTags[kNumLanguages];
|
||||
static const char* fLangNames[kNumLanguages];
|
||||
static bool fUsesUnicode[kNumLanguages];
|
||||
static encodingTypes fUnicodeEncoding[kNumLanguages];
|
||||
|
||||
@ -73,7 +73,7 @@ public:
|
||||
static void SetLanguage(Language lang) { fLanguage = lang; }
|
||||
static Language GetLanguage() { return fLanguage; }
|
||||
|
||||
static char* GetLanguageName(Language lang) { return fLangNames[lang]; }
|
||||
static const char* GetLanguageName(Language lang) { return fLangNames[lang]; }
|
||||
|
||||
static hsBool UsingUnicode() { return fUsesUnicode[fLanguage]; }
|
||||
static encodingTypes UnicodeEncoding() { return fUnicodeEncoding[fLanguage]; }
|
||||
|
Reference in New Issue
Block a user