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