mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-13 18:17:49 -04:00
@ -520,7 +520,7 @@ PF_CONSOLE_CMD( Avatar, SeekPoint, "string seekpoint", "Move to the given seekpo
|
||||
|
||||
PF_CONSOLE_CMD( Avatar, ShowLocations, "", "Show player positions/orientations" )
|
||||
{
|
||||
hsBool curVal = plNetClientApp::GetInstance()->GetFlagsBit(plNetClientApp::kShowAvatars);
|
||||
bool curVal = plNetClientApp::GetInstance()->GetFlagsBit(plNetClientApp::kShowAvatars);
|
||||
plNetClientApp::GetInstance()->SetFlagsBit(plNetClientApp::kShowAvatars, !curVal);
|
||||
}
|
||||
|
||||
@ -831,7 +831,7 @@ PF_CONSOLE_CMD( Avatar_Climb, EnableClimb, "string direction, int onOff", "Allow
|
||||
dir = plClimbMsg::kLeft;
|
||||
else if(stricmp(dirStr, "right") == 0)
|
||||
dir = plClimbMsg::kRight;
|
||||
hsBool enable = static_cast<int>(params[1]) ? true : false;
|
||||
bool enable = static_cast<int>(params[1]) ? true : false;
|
||||
plClimbMsg *msg = new plClimbMsg(mgr, avKey, plClimbMsg::kEnableClimb, dir, enable);
|
||||
msg->Send();
|
||||
}
|
||||
@ -888,7 +888,7 @@ PF_CONSOLE_CMD( Avatar_Swim, Start, "", "")
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// void WarpPlayerToAnother(hsBool iMove, uint32_t remoteID)
|
||||
// void WarpPlayerToAnother(bool iMove, uint32_t remoteID)
|
||||
PF_CONSOLE_CMD( Avatar_Warp, WarpToPlayer, "int PlayerID", "Warp our player to the same position as another player.")
|
||||
{
|
||||
plAvatarMgr::WarpPlayerToAnother(true, (int)params[0]);
|
||||
|
@ -90,7 +90,7 @@ class pfConsoleInputInterface : public plInputInterface
|
||||
|
||||
|
||||
|
||||
virtual hsBool IHandleCtrlCmd( plCtrlCmd *cmd )
|
||||
virtual bool IHandleCtrlCmd( plCtrlCmd *cmd )
|
||||
{
|
||||
if( cmd->fControlCode == B_SET_CONSOLE_MODE )
|
||||
{
|
||||
@ -139,9 +139,9 @@ class pfConsoleInputInterface : public plInputInterface
|
||||
|
||||
virtual uint32_t GetPriorityLevel( void ) const { return kConsolePriority; }
|
||||
virtual uint32_t GetCurrentCursorID( void ) const { return kCursorHidden; }
|
||||
virtual hsBool HasInterestingCursorID( void ) const { return false; }
|
||||
virtual bool HasInterestingCursorID( void ) const { return false; }
|
||||
|
||||
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg )
|
||||
virtual bool InterpretInputEvent( plInputEventMsg *pMsg )
|
||||
{
|
||||
plKeyEventMsg *keyMsg = plKeyEventMsg::ConvertNoRef( pMsg );
|
||||
if( keyMsg != nil )
|
||||
@ -265,7 +265,7 @@ void pfConsole::ISetMode( uint8_t mode )
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfConsole::MsgReceive( plMessage *msg )
|
||||
bool pfConsole::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plControlEventMsg *ctrlMsg = plControlEventMsg::ConvertNoRef( msg );
|
||||
if( ctrlMsg != nil )
|
||||
@ -537,7 +537,7 @@ void pfConsole::IHandleKey( plKeyEventMsg *msg )
|
||||
char *c;
|
||||
wchar_t key;
|
||||
int i,eol;
|
||||
static hsBool findAgain = false;
|
||||
static bool findAgain = false;
|
||||
static uint32_t findCounter = 0;
|
||||
|
||||
// filter out keyUps and ascii control characters
|
||||
@ -990,7 +990,7 @@ void pfConsole::Draw( plPipeline *p )
|
||||
int i, yOff, y, x, eOffset, height;
|
||||
char *line;
|
||||
char tmp[ kMaxCharsWide ];
|
||||
hsBool showTooltip = false;
|
||||
bool showTooltip = false;
|
||||
float thisTime; // For making the console FX speed konstant regardless of framerate
|
||||
const float kEffectDuration = 0.5f;
|
||||
|
||||
|
@ -96,7 +96,7 @@ class pfConsole : public hsKeyedObject
|
||||
uint32_t fHelpTimer;
|
||||
char fLastHelpMsg[ kWorkingLineSize ];
|
||||
uint8_t fMode; // 0 - invisible, 1 - single line, 2 - full
|
||||
hsBool fInited, fHelpMode, fPythonMode, fPythonFirstTime, fFXEnabled;
|
||||
bool fInited, fHelpMode, fPythonMode, fPythonFirstTime, fFXEnabled;
|
||||
uint32_t fPythonMultiLines;
|
||||
short fCursorTicks;
|
||||
uint32_t fMsgTimeoutTimer;
|
||||
@ -126,8 +126,8 @@ class pfConsole : public hsKeyedObject
|
||||
void IClear( void );
|
||||
|
||||
void ISetMode( uint8_t mode );
|
||||
void IEnableFX( hsBool e ) { fFXEnabled = e; }
|
||||
hsBool IFXEnabled( void ) { return fFXEnabled; }
|
||||
void IEnableFX( bool e ) { fFXEnabled = e; }
|
||||
bool IFXEnabled( void ) { return fFXEnabled; }
|
||||
|
||||
void IPrintSomeHelp( void );
|
||||
void IUpdateTooltip( void );
|
||||
@ -142,7 +142,7 @@ class pfConsole : public hsKeyedObject
|
||||
|
||||
static pfConsole * GetInstance ();
|
||||
|
||||
virtual hsBool MsgReceive( plMessage *msg );
|
||||
virtual bool MsgReceive( plMessage *msg );
|
||||
|
||||
void Init( pfConsoleEngine *engine );
|
||||
void Draw( plPipeline *p );
|
||||
@ -152,8 +152,8 @@ class pfConsole : public hsKeyedObject
|
||||
static void Clear( void ) { fTheConsole->IClear(); }
|
||||
static void Hide( void ) { fTheConsole->ISetMode(kModeHidden); }
|
||||
|
||||
static void EnableEffects( hsBool enable ) { fTheConsole->IEnableFX( enable ); }
|
||||
static hsBool AreEffectsEnabled( void ) { return fTheConsole->IFXEnabled(); }
|
||||
static void EnableEffects( bool enable ) { fTheConsole->IEnableFX( enable ); }
|
||||
static bool AreEffectsEnabled( void ) { return fTheConsole->IFXEnabled(); }
|
||||
static void SetTextColor( uint32_t color ) { fConsoleTextColor = color; }
|
||||
static uint32_t GetTextColor() { return fConsoleTextColor; }
|
||||
|
||||
|
@ -370,7 +370,7 @@ plKey FindObjectByNameAndType(const plString& name, const char* typeName, const
|
||||
//// plDoesFileExist //////////////////////////////////////////////////////////
|
||||
// Utility function to determine whether the given file exists
|
||||
|
||||
static hsBool plDoesFileExist( const char *path )
|
||||
static bool plDoesFileExist( const char *path )
|
||||
{
|
||||
hsUNIXStream stream;
|
||||
|
||||
@ -662,7 +662,7 @@ PF_CONSOLE_CMD( Console, Clear, "", "Clears the console" )
|
||||
|
||||
PF_CONSOLE_CMD( Console, EnableFX, "bool enable", "Enables flashy console effects" )
|
||||
{
|
||||
pfConsole::EnableEffects( (hsBool)(bool)params[ 0 ] );
|
||||
pfConsole::EnableEffects( (bool)(bool)params[ 0 ] );
|
||||
if( pfConsole::AreEffectsEnabled() )
|
||||
PrintString( "Console effects enabled" );
|
||||
else
|
||||
@ -808,7 +808,7 @@ PF_CONSOLE_CMD( Console, SetVar, "string name, string value",
|
||||
pfConsoleContext &ctx = pfConsoleContext::GetRootContext();
|
||||
|
||||
|
||||
hsBool oldF = ctx.GetAddWhenNotFound();
|
||||
bool oldF = ctx.GetAddWhenNotFound();
|
||||
ctx.SetAddWhenNotFound( true );
|
||||
ctx.SetVar((char*)params[ 0 ], (char*)params[ 1 ] );
|
||||
ctx.SetAddWhenNotFound( oldF );
|
||||
@ -991,7 +991,7 @@ PF_CONSOLE_SUBGROUP( Graphics, VisSet ) // Creates a sub-group under a given
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_VisSet, Toggle, "", "Toggle using VisSets" )
|
||||
{
|
||||
hsBool turnOn = !plPageTreeMgr::VisMgrEnabled();
|
||||
bool turnOn = !plPageTreeMgr::VisMgrEnabled();
|
||||
plPageTreeMgr::EnableVisMgr(turnOn);
|
||||
|
||||
PrintStringF( PrintString, "Visibility Sets %s", turnOn ? "Enabled" : "Disabled" );
|
||||
@ -1101,7 +1101,7 @@ PF_CONSOLE_CMD( Graphics_Shadow,
|
||||
"",
|
||||
"Show shadows." )
|
||||
{
|
||||
hsBool on = !pfConsole::GetPipeline()->IsDebugFlagSet(plPipeDbg::kFlagShowShadowBounds);
|
||||
bool on = !pfConsole::GetPipeline()->IsDebugFlagSet(plPipeDbg::kFlagShowShadowBounds);
|
||||
pfConsole::GetPipeline()->SetDebugFlag( plPipeDbg::kFlagShowShadowBounds, on );
|
||||
|
||||
char str[ 256 ];
|
||||
@ -1114,7 +1114,7 @@ PF_CONSOLE_CMD( Graphics_Shadow,
|
||||
"",
|
||||
"Toggles applying shadows (they are still computed)." )
|
||||
{
|
||||
hsBool on = !pfConsole::GetPipeline()->IsDebugFlagSet(plPipeDbg::kFlagNoShadowApply);
|
||||
bool on = !pfConsole::GetPipeline()->IsDebugFlagSet(plPipeDbg::kFlagNoShadowApply);
|
||||
pfConsole::GetPipeline()->SetDebugFlag( plPipeDbg::kFlagNoShadowApply, on );
|
||||
|
||||
char str[ 256 ];
|
||||
@ -1405,7 +1405,7 @@ PF_CONSOLE_CMD( Graphics_Renderer, Overwire, "...", "Turn on (off) overlay wire
|
||||
{
|
||||
hsAssert( pfConsole::GetPipeline() != nil, "Cannot use this command before pipeline initialization" );
|
||||
|
||||
hsBool on = false;
|
||||
bool on = false;
|
||||
uint32_t flag = plPipeDbg::kFlagOverlayWire;
|
||||
if( !numParams )
|
||||
on = !pfConsole::GetPipeline()->IsDebugFlagSet( flag );
|
||||
@ -1815,7 +1815,7 @@ PF_CONSOLE_SUBGROUP( Graphics, Show );
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, Bounds, "", "Toggle object bounds display")
|
||||
{
|
||||
hsBool on = !pfConsole::GetPipeline()->IsDebugFlagSet( plPipeDbg::kFlagShowAllBounds );
|
||||
bool on = !pfConsole::GetPipeline()->IsDebugFlagSet( plPipeDbg::kFlagShowAllBounds );
|
||||
pfConsole::GetPipeline()->SetDebugFlag( plPipeDbg::kFlagShowAllBounds, on );
|
||||
|
||||
char str[ 256 ];
|
||||
@ -1825,7 +1825,7 @@ PF_CONSOLE_CMD( Graphics_Show, Bounds, "", "Toggle object bounds display")
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, Sound, "", "Toggle sound fields visible")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kAudible | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy));
|
||||
plgDispatch::MsgSend(msg);
|
||||
if( on )
|
||||
@ -1880,7 +1880,7 @@ PF_CONSOLE_CMD( Graphics_Show, SingleSound,
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, SoundOnly, "", "Toggle only sound fields visible")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kAudible | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy));
|
||||
plgDispatch::MsgSend(msg);
|
||||
static uint32_t oldMask = plDrawableSpans::kNormal;
|
||||
@ -1901,7 +1901,7 @@ PF_CONSOLE_CMD( Graphics_Show, SoundOnly, "", "Toggle only sound fields visible"
|
||||
PF_CONSOLE_CMD( Graphics_Show, OccSnap, "", "Take snapshot of current occlusion and render (or toggle)")
|
||||
{
|
||||
uint32_t flag = plPipeDbg::kFlagOcclusionSnap;
|
||||
hsBool on = !pfConsole::GetPipeline()->IsDebugFlagSet(flag);
|
||||
bool on = !pfConsole::GetPipeline()->IsDebugFlagSet(flag);
|
||||
|
||||
pfConsole::GetPipeline()->SetDebugFlag( flag, on );
|
||||
if( on )
|
||||
@ -1917,7 +1917,7 @@ PF_CONSOLE_CMD( Graphics_Show, OccSnap, "", "Take snapshot of current occlusion
|
||||
PF_CONSOLE_CMD( Graphics_Show, OccSnapOnly, "", "Take snapshot of current occlusion and render (or toggle)")
|
||||
{
|
||||
uint32_t flag = plPipeDbg::kFlagOcclusionSnap;
|
||||
hsBool on = !pfConsole::GetPipeline()->IsDebugFlagSet(flag);
|
||||
bool on = !pfConsole::GetPipeline()->IsDebugFlagSet(flag);
|
||||
|
||||
static uint32_t oldMask = pfConsole::GetPipeline()->GetDrawableTypeMask();
|
||||
|
||||
@ -1934,7 +1934,7 @@ PF_CONSOLE_CMD( Graphics_Show, OccSnapOnly, "", "Take snapshot of current occlus
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, Occluders, "", "Toggle occluder geometry visible")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kOccluder | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy));
|
||||
plgDispatch::MsgSend(msg);
|
||||
|
||||
@ -1950,7 +1950,7 @@ PF_CONSOLE_CMD( Graphics_Show, Occluders, "", "Toggle occluder geometry visible"
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, OccludersOnly, "", "Toggle only occluder geometry visible")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kOccluder | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy));
|
||||
plgDispatch::MsgSend(msg);
|
||||
static uint32_t oldMask = plDrawableSpans::kNormal;
|
||||
@ -1970,7 +1970,7 @@ PF_CONSOLE_CMD( Graphics_Show, OccludersOnly, "", "Toggle only occluder geometry
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, Physicals, "", "Toggle Physical geometry visible")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kPhysical | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy));
|
||||
plgDispatch::MsgSend(msg);
|
||||
if( on )
|
||||
@ -1985,7 +1985,7 @@ PF_CONSOLE_CMD( Graphics_Show, Physicals, "", "Toggle Physical geometry visible"
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, PhysicalsOnly, "", "Toggle only Physical geometry visible")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kPhysical | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy));
|
||||
plgDispatch::MsgSend(msg);
|
||||
static uint32_t oldMask = plDrawableSpans::kNormal;
|
||||
@ -2005,7 +2005,7 @@ PF_CONSOLE_CMD( Graphics_Show, PhysicalsOnly, "", "Toggle only Physical geometry
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, Normal, "", "Toggle normal geometry visible")
|
||||
{
|
||||
static hsBool on = true;
|
||||
static bool on = true;
|
||||
if( on = !on )
|
||||
pfConsole::GetPipeline()->SetDrawableTypeMask(pfConsole::GetPipeline()->GetDrawableTypeMask() | plDrawableSpans::kNormal);
|
||||
else
|
||||
@ -2018,7 +2018,7 @@ PF_CONSOLE_CMD( Graphics_Show, Normal, "", "Toggle normal geometry visible")
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, NormalOnly, "", "Toggle only normal geometry visible")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
static uint32_t oldMask = plDrawableSpans::kNormal;
|
||||
if( on = !on )
|
||||
{
|
||||
@ -2036,7 +2036,7 @@ PF_CONSOLE_CMD( Graphics_Show, NormalOnly, "", "Toggle only normal geometry visi
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, Lights, "", "Toggle visible proxies for lights")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kLight | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy));
|
||||
plgDispatch::MsgSend(msg);
|
||||
if( on )
|
||||
@ -2051,7 +2051,7 @@ PF_CONSOLE_CMD( Graphics_Show, Lights, "", "Toggle visible proxies for lights")
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, LightsOnly, "", "Toggle visible proxies for lights and everything else invisible")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kLight | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy));
|
||||
plgDispatch::MsgSend(msg);
|
||||
static uint32_t oldMask = plDrawableSpans::kNormal;
|
||||
@ -2071,7 +2071,7 @@ PF_CONSOLE_CMD( Graphics_Show, LightsOnly, "", "Toggle visible proxies for light
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, Clicks, "", "Toggle visible proxies for clicks")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy));
|
||||
plgDispatch::MsgSend(msg);
|
||||
if( on )
|
||||
@ -2087,7 +2087,7 @@ PF_CONSOLE_CMD( Graphics_Show, Clicks, "", "Toggle visible proxies for clicks")
|
||||
|
||||
PF_CONSOLE_CMD( Graphics_Show, ClickOnly, "", "Toggle visible proxies for click points")
|
||||
{
|
||||
static hsBool on = false;
|
||||
static bool on = false;
|
||||
plProxyDrawMsg* msg = new plProxyDrawMsg(plProxyDrawMsg::kCamera | ((on = !on) ? plProxyDrawMsg::kCreate : plProxyDrawMsg::kDestroy));
|
||||
plgDispatch::MsgSend(msg);
|
||||
static uint32_t oldMask = plDrawableSpans::kNormal;
|
||||
@ -2717,7 +2717,7 @@ class plActiveRefPeekerKey : public plKeyImp
|
||||
public:
|
||||
uint16_t PeekNumNotifies() { return GetNumNotifyCreated(); }
|
||||
plRefMsg* PeekNotifyCreated(int i) { return GetNotifyCreated(i); }
|
||||
hsBool PeekIsActiveRef(int i) const { return IsActiveRef(i); }
|
||||
bool PeekIsActiveRef(int i) const { return IsActiveRef(i); }
|
||||
};
|
||||
|
||||
// Not static so others can call it - making it even handier
|
||||
@ -4559,7 +4559,7 @@ PF_CONSOLE_CMD( Access,
|
||||
"",
|
||||
"Test fading on visibility" )
|
||||
{
|
||||
hsBool disabled = !plFadeOpacityMod::GetLOSCheckDisabled();
|
||||
bool disabled = !plFadeOpacityMod::GetLOSCheckDisabled();
|
||||
|
||||
plFadeOpacityMod::SetLOSCheckDisabled(disabled);
|
||||
|
||||
@ -5234,7 +5234,7 @@ PF_CONSOLE_CMD( Wave, Log, // Group name, Function name
|
||||
plWaveSet7* waveSet = IGetWaveSet(PrintString, name);
|
||||
if( waveSet )
|
||||
{
|
||||
hsBool logging = !waveSet->Logging();
|
||||
bool logging = !waveSet->Logging();
|
||||
if( logging )
|
||||
waveSet->StartLog();
|
||||
else
|
||||
@ -5254,7 +5254,7 @@ PF_CONSOLE_CMD( Wave, Graph, // Group name, Function name
|
||||
plWaveSet7* waveSet = IGetWaveSet(PrintString, name);
|
||||
if( waveSet )
|
||||
{
|
||||
hsBool graphing = !waveSet->Graphing();
|
||||
bool graphing = !waveSet->Graphing();
|
||||
if( graphing )
|
||||
waveSet->StartGraph();
|
||||
else
|
||||
@ -6646,7 +6646,7 @@ PF_CONSOLE_CMD( Animation,
|
||||
"",
|
||||
"Toggle the possibility of delayed transform evaluation." )
|
||||
{
|
||||
hsBool enabled = !plCoordinateInterface::GetDelayedTransformsEnabled();
|
||||
bool enabled = !plCoordinateInterface::GetDelayedTransformsEnabled();
|
||||
plCoordinateInterface::SetDelayedTransformsEnabled(enabled);
|
||||
|
||||
char buff[256];
|
||||
|
@ -56,17 +56,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
//// ParseDirectory //////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfConsoleDirSrc::ParseDirectory(const std::string& path, const std::string& mask /* = "*.*" */)
|
||||
bool pfConsoleDirSrc::ParseDirectory(const std::string& path, const std::string& mask /* = "*.*" */)
|
||||
{
|
||||
wchar_t* wPath = hsStringToWString(path.c_str());
|
||||
wchar_t* wMask = hsStringToWString(mask.c_str());
|
||||
hsBool ret = ParseDirectory(wPath, wMask);
|
||||
bool ret = ParseDirectory(wPath, wMask);
|
||||
delete [] wPath;
|
||||
delete [] wMask;
|
||||
return ret;
|
||||
}
|
||||
|
||||
hsBool pfConsoleDirSrc::ParseDirectory(const std::wstring& path, const std::wstring& mask /* = L"*.*" */)
|
||||
bool pfConsoleDirSrc::ParseDirectory(const std::wstring& path, const std::wstring& mask /* = L"*.*" */)
|
||||
{
|
||||
std::wstringstream search;
|
||||
std::wstring file;
|
||||
@ -136,7 +136,7 @@ void pfConsoleDirSrc::ResetProcessedFiles()
|
||||
// note: this n^2 linear search should be replaced with something
|
||||
// faster if we have lots of init files and turn on the checkProcessing option.
|
||||
//
|
||||
hsBool pfConsoleDirSrc::AlreadyProcessedFile(const std::wstring& path, const std::wstring& file)
|
||||
bool pfConsoleDirSrc::AlreadyProcessedFile(const std::wstring& path, const std::wstring& file)
|
||||
{
|
||||
if (fCheckProcessedFiles)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ class pfConsoleDirSrc
|
||||
FileName(const std::wstring& p, const std::wstring& f) : fPath(p), fFile(f) {}
|
||||
};
|
||||
std::vector<FileName*> fProcessedFiles; // list of init files we've already executed
|
||||
hsBool fCheckProcessedFiles; // set to check and skip files init files we've already executed
|
||||
bool fCheckProcessedFiles; // set to check and skip files init files we've already executed
|
||||
public:
|
||||
pfConsoleDirSrc(pfConsoleEngine *engine) : fCheckProcessedFiles(false) { fEngine = engine; }
|
||||
pfConsoleDirSrc(pfConsoleEngine *engine, const std::string& path, const std::string& mask = "*.ini") :
|
||||
@ -92,13 +92,13 @@ class pfConsoleDirSrc
|
||||
~pfConsoleDirSrc() { ResetProcessedFiles(); }
|
||||
|
||||
// Steps through the given directory and executes all files with the console engine
|
||||
hsBool ParseDirectory(const std::string& path, const std::string& mask = "*.*");
|
||||
hsBool ParseDirectory(const std::wstring& path, const std::wstring& mask = L"*.*");
|
||||
bool ParseDirectory(const std::string& path, const std::string& mask = "*.*");
|
||||
bool ParseDirectory(const std::wstring& path, const std::wstring& mask = L"*.*");
|
||||
|
||||
void ResetProcessedFiles();
|
||||
hsBool AlreadyProcessedFile(const std::wstring& path, const std::wstring& file);
|
||||
bool AlreadyProcessedFile(const std::wstring& path, const std::wstring& file);
|
||||
void AddProcessedFile(const std::wstring& path, const std::wstring& file);
|
||||
void SetCheckProcessedFiles(hsBool c) { fCheckProcessedFiles=c; }
|
||||
void SetCheckProcessedFiles(bool c) { fCheckProcessedFiles=c; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -111,7 +111,7 @@ void plDispatchLog::DumpMsg(plMessage* msg, int numReceivers, int sendTimeMs, in
|
||||
if (!msg)
|
||||
return;
|
||||
|
||||
hsBool found=fIncludeTypes.IsBitSet(msg->ClassIndex());
|
||||
bool found=fIncludeTypes.IsBitSet(msg->ClassIndex());
|
||||
if (found && !hsCheckBits(fFlags, plDispatchLogBase::kInclude))
|
||||
// it's an exclude list and we found it
|
||||
return;
|
||||
|
@ -97,7 +97,7 @@ PF_CONSOLE_FILE_DUMMY(Game)
|
||||
//// plDoesFileExist //////////////////////////////////////////////////////////
|
||||
// Utility function to determine whether the given file exists
|
||||
|
||||
static hsBool plDoesFileExist( const char *path )
|
||||
static bool plDoesFileExist( const char *path )
|
||||
{
|
||||
hsUNIXStream stream;
|
||||
|
||||
|
Reference in New Issue
Block a user