diff --git a/Sources/Plasma/NucleusLib/pnInputCore/plControlDefinition.h b/Sources/Plasma/NucleusLib/pnInputCore/plControlDefinition.h index d54d7f56..94a70c10 100644 --- a/Sources/Plasma/NucleusLib/pnInputCore/plControlDefinition.h +++ b/Sources/Plasma/NucleusLib/pnInputCore/plControlDefinition.h @@ -97,13 +97,13 @@ enum struct Win32keyConvert { UInt32 fVKey; - char* fKeyName; + const char* fKeyName; }; struct CommandConvert { ControlEventCode fCode; - char* fDesc; + const char* fDesc; }; diff --git a/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp b/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp index 3671acab..7bc81b41 100644 --- a/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp +++ b/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp @@ -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, ""}, -}; \ No newline at end of file +}; diff --git a/Sources/Plasma/NucleusLib/pnInputCore/plKeyMap.h b/Sources/Plasma/NucleusLib/pnInputCore/plKeyMap.h index 383adbc6..8f1fdd11 100644 --- a/Sources/Plasma/NucleusLib/pnInputCore/plKeyMap.h +++ b/Sources/Plasma/NucleusLib/pnInputCore/plKeyMap.h @@ -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[]; diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp index 4de326f1..99cb82c2 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp @@ -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; -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.h b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.h index ffcfbdd2..97e78bcf 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.h +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.h @@ -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 ); diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp index 9becd9b9..94f88e35 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp @@ -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() diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.h b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.h index 352fc2c4..76707aee 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.h +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.h @@ -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); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h b/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h index 9ee65c56..fcdc7303 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plClothingLayout.h @@ -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; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp index 05e1fa51..5715cdba 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp @@ -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; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.h b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.h index 3b8f921b..c0d9b561 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.h @@ -83,7 +83,7 @@ class plFontCache : public hsKeyedObject void LoadCustomFonts( const char *dir ); // Our custom font extension - static char *kCustFontExtension; + static const char* kCustFontExtension; }; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp index fb58a1ac..64e42963 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp @@ -55,7 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include -char *plWinFontCache::kCustFontExtension = ".prf"; +const char* plWinFontCache::kCustFontExtension = ".prf"; plWinFontCache::plWinFontCache() diff --git a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h index c97a3f81..8702c930 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h @@ -107,7 +107,7 @@ class plWinFontCache void LoadCustomFonts( const char *dir ); // Our custom font extension - static char *kCustFontExtension; + static const char* kCustFontExtension; }; diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.h b/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.h index b848bab4..876ed7f4 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.h +++ b/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.h @@ -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 ); diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h b/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h index 6fffe7bc..2521efae 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h @@ -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; diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp index 72e85b6f..362911d2 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp @@ -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 diff --git a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.h b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.h index fac20dc2..3ef99148 100644 --- a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.h +++ b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.h @@ -232,7 +232,7 @@ public: // debug virtual std::string AsStdString() const { - char * delim = ""; + const char* delim = ""; std::stringstream ss; if ( GetHasPlayerID() ) diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp index ed9b9622..954eae7b 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp @@ -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", diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.h b/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.h index e50963e8..9cebf49f 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.h @@ -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(); diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp index 9ffa3b19..774bf46f 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp @@ -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 diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.h b/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.h index 5a516cfe..c35563b9 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.h +++ b/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.h @@ -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]; }