mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
@ -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;
|
||||
|
@ -26,6 +26,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plChecksum.h"
|
||||
#include "hsStream.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
plChecksum::plChecksum(unsigned int bufsize, const char* buffer)
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ hsBool hsFolderIterator::NextFileSuffix(const char suffix[])
|
||||
{
|
||||
while (this->NextFile())
|
||||
{ const char* fileSuffix = ::strrchr(this->GetFileName(), '.');
|
||||
if (fileSuffix != nil && ::_stricmp(fileSuffix, suffix) == 0)
|
||||
if (fileSuffix != nil && stricmp(fileSuffix, suffix) == 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -114,7 +114,7 @@ hsBool plEncryptedStream::Open(const wchar* name, const wchar* mode)
|
||||
{
|
||||
if (wcscmp(mode, L"rb") == 0)
|
||||
{
|
||||
fRef = _wfopen(name, mode);
|
||||
fRef = hsWFopen(name, mode);
|
||||
fPosition = 0;
|
||||
|
||||
if (!fRef)
|
||||
@ -515,7 +515,7 @@ bool plEncryptedStream::IsEncryptedFile(const char* fileName)
|
||||
|
||||
bool plEncryptedStream::IsEncryptedFile(const wchar* fileName)
|
||||
{
|
||||
FILE* fp = _wfopen(fileName, L"rb");
|
||||
FILE* fp = hsWFopen(fileName, L"rb");
|
||||
if (!fp)
|
||||
return false;
|
||||
|
||||
|
@ -206,7 +206,7 @@ bool plFileUtils::FileMove(const wchar* existingFile, const wchar* newFile)
|
||||
|
||||
bool plFileUtils::FileExists(const wchar* file)
|
||||
{
|
||||
FILE* fp = _wfopen(file, L"rb");
|
||||
FILE* fp = hsWFopen(file, L"rb");
|
||||
bool retVal = (fp != nil);
|
||||
if (fp)
|
||||
fclose(fp);
|
||||
@ -502,4 +502,4 @@ bool plFileUtils::GetSecureEncryptionKey(const wchar* filename, UInt32* key, uns
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -692,11 +692,11 @@ bool plNetServerSessionInfo::IsEqualTo(const plNetServerSessionInfo * other) con
|
||||
if (match && IsFlagSet(kHasServerGuid) && other->IsFlagSet(kHasServerGuid))
|
||||
match = match && fServerGuid.IsEqualTo(other->GetServerGuid());
|
||||
if (match && IsFlagSet(kHasServerName) && other->IsFlagSet(kHasServerName))
|
||||
match = match && (_stricmp(fServerName.c_str(),other->fServerName.c_str())==0);
|
||||
match = match && (stricmp(fServerName.c_str(),other->fServerName.c_str())==0);
|
||||
if (match && IsFlagSet(kHasServerType) && other->IsFlagSet(kHasServerType))
|
||||
match = match && fServerType==other->fServerType;
|
||||
if (match && IsFlagSet(kHasServerAddr) && other->IsFlagSet(kHasServerAddr))
|
||||
match = match && (_stricmp(fServerAddr.c_str(),other->fServerAddr.c_str())==0);
|
||||
match = match && (stricmp(fServerAddr.c_str(),other->fServerAddr.c_str())==0);
|
||||
if (match && IsFlagSet(kHasServerPort) && other->IsFlagSet(kHasServerPort))
|
||||
match = match && fServerPort==other->fServerPort;
|
||||
return match;
|
||||
|
@ -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();
|
||||
|
@ -88,7 +88,7 @@ hsBool NameMatches(const char* obName, const char* pKName, hsBool subString)
|
||||
|
||||
if (!subString)
|
||||
{
|
||||
if (!_stricmp(o, p))
|
||||
if (!stricmp(o, p))
|
||||
return true; // FOUND IT!!!!!!!!!!!!!!!!!!!
|
||||
}
|
||||
else
|
||||
|
@ -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]; }
|
||||
|
@ -298,7 +298,8 @@ hsBool plResManager::ReadObject(plKeyImp* key)
|
||||
// it will just inc/dec the open/close count during its read, and not actually
|
||||
// close the stream, so we don't lose our place, lose our file handle, and thrash.
|
||||
|
||||
kResMgrLog(4, ILog(4, " ...Opening page data stream for location 0x%x...", key->GetUoid().GetLocation()));
|
||||
char locstr[64];
|
||||
kResMgrLog(4, ILog(4, " ...Opening page data stream for location %s...", key->GetUoid().GetLocation().StringIze(locstr)));
|
||||
plRegistryPageNode *pageNode = FindPage(key->GetUoid().GetLocation());
|
||||
if (!pageNode)
|
||||
{
|
||||
|
@ -30,6 +30,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
class plRegistryPageNode;
|
||||
class plRegistryKeyIterator;
|
||||
|
@ -26,6 +26,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plVersion.h"
|
||||
#include "pnFactory/plFactory.h"
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
|
||||
#include "plCreatableIndex.h"
|
||||
#define ChangedCreatable(ver, creatable) if (minorVersion == ver) creatables.push_back(CLASS_INDEX_SCOPED(creatable));
|
||||
|
@ -100,7 +100,7 @@ plStateDescriptor* plSDLMgr::FindDescriptor(const char* name, int version, const
|
||||
int highestFound = -1;
|
||||
for(it=(*dl).begin(); it!= (*dl).end(); it++)
|
||||
{
|
||||
if (!_stricmp((*it)->GetName(), name) )
|
||||
if (!stricmp((*it)->GetName(), name) )
|
||||
{
|
||||
if ( (*it)->GetVersion()==version )
|
||||
{
|
||||
|
@ -60,13 +60,13 @@ void plVisMgr::Write(hsStream* s, hsResMgr* mgr)
|
||||
hsKeyedObject::Write(s, mgr);
|
||||
}
|
||||
|
||||
void plVisMgr::Register(plVisRegion* reg, hsBool not)
|
||||
void plVisMgr::Register(plVisRegion* reg, hsBool bnot)
|
||||
{
|
||||
// This should happen pretty infrequently, or
|
||||
// I wouldn't be doing it so cloth-headed-ly.
|
||||
hsTArray<plVisRegion*>& regions = not ? fNotRegions : fRegions;
|
||||
hsBitVector& indices = not ? fIdxNot : fIdxSet;
|
||||
int& maxIdx = not ? fMaxNot : fMaxSet;
|
||||
hsTArray<plVisRegion*>& regions = bnot ? fNotRegions : fRegions;
|
||||
hsBitVector& indices = bnot ? fIdxNot : fIdxSet;
|
||||
int& maxIdx = bnot ? fMaxNot : fMaxSet;
|
||||
int i;
|
||||
for( i = kNumReserved; ; i++ )
|
||||
{
|
||||
@ -84,14 +84,14 @@ void plVisMgr::Register(plVisRegion* reg, hsBool not)
|
||||
hsAssert(false, "Infinite bitvector has all bits set?");
|
||||
}
|
||||
|
||||
void plVisMgr::UnRegister(plVisRegion* reg, hsBool not)
|
||||
void plVisMgr::UnRegister(plVisRegion* reg, hsBool bnot)
|
||||
{
|
||||
// Mark our index for recycling
|
||||
hsBitVector& indices= not ? fIdxNot : fIdxSet;
|
||||
hsBitVector& indices= bnot ? fIdxNot : fIdxSet;
|
||||
indices.ClearBit(reg->GetIndex());
|
||||
|
||||
// Nuke the region from our list.
|
||||
hsTArray<plVisRegion*>& regions = not ? fNotRegions : fRegions;
|
||||
hsTArray<plVisRegion*>& regions = bnot ? fNotRegions : fRegions;
|
||||
int idx = regions.Find(reg);
|
||||
if( regions.kMissingIndex != idx )
|
||||
regions.Remove(idx);
|
||||
@ -204,4 +204,4 @@ void plGlobalVisMgr::DeInit()
|
||||
fInstance->UnRegisterAs(kGlobalVisMgr_KEY);
|
||||
fInstance = nil;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -82,8 +82,8 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
void Register(plVisRegion* reg, hsBool not);
|
||||
void UnRegister(plVisRegion* reg, hsBool not);
|
||||
void Register(plVisRegion* reg, hsBool bnot);
|
||||
void UnRegister(plVisRegion* reg, hsBool bnot);
|
||||
|
||||
void Eval(const hsPoint3& pos);
|
||||
|
||||
|
@ -497,7 +497,7 @@ namespace pvt_strptime
|
||||
|
||||
#define match_char(ch1, ch2) if (ch1 != ch2) return NULL
|
||||
#define match_string(cs1, s2) \
|
||||
(_strnicmp((cs1), (s2), strlen (cs1)) ? 0 : ((s2) += strlen (cs1), 1))
|
||||
(strnicmp((cs1), (s2), strlen (cs1)) ? 0 : ((s2) += strlen (cs1), 1))
|
||||
#define get_number(from, to, n) \
|
||||
do { \
|
||||
int __n = n; \
|
||||
|
Reference in New Issue
Block a user