1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 18:59:09 +00:00

Obliterate hsBool

This commit is contained in:
2012-07-11 01:28:00 -04:00
parent 5f78b33db4
commit a709e17069
1041 changed files with 7889 additions and 8070 deletions

View File

@ -169,7 +169,7 @@ static plAudioSystem* gAudio = nil;
extern ITaskbarList3* gTaskbarList;
#endif
hsBool plClient::fDelayMS = false;
bool plClient::fDelayMS = false;
plClient* plClient::fInstance=nil;
@ -255,7 +255,7 @@ plClient::~plClient()
#include "plGImage/plAVIWriter.h"
#include "pfCharacter/pfMarkerMgr.h"
hsBool plClient::Shutdown()
bool plClient::Shutdown()
{
plSynchEnabler ps(false); // disable dirty state tracking during shutdown
delete fProgressBar;
@ -482,7 +482,7 @@ void plClient::ISetGraphicsDefaults()
plDynamicCamMap::SetEnabled(plPipeline::fDefaultPipeParams.PlanarReflections ? true : false);
}
hsBool plClient::InitPipeline()
bool plClient::InitPipeline()
{
hsStatusMessage("InitPipeline client\n");
HWND hWnd = fWindowHndl;
@ -615,7 +615,7 @@ void plClient::IDispatchMsgReceiveCallback()
//============================================================================
hsBool plClient::MsgReceive(plMessage* msg)
bool plClient::MsgReceive(plMessage* msg)
{
if (plGenRefMsg * genRefMsg = plGenRefMsg::ConvertNoRef(msg)) {
// do nothing, we just use the client's key to ref vault image nodes.
@ -658,7 +658,7 @@ hsBool plClient::MsgReceive(plMessage* msg)
if (pRefMsg->GetContext() & plRefMsg::kOnCreate ||
pRefMsg->GetContext() & plRefMsg::kOnRequest)
{
hsBool found=false;
bool found=false;
plSceneNode *pNode = plSceneNode::ConvertNoRef(pRefMsg->GetRef());
int i;
for (i = 0; i < fRooms.Count(); i++)
@ -876,7 +876,7 @@ hsBool plClient::MsgReceive(plMessage* msg)
}
//============================================================================
hsBool plClient::IHandleMovieMsg(plMovieMsg* mov)
bool plClient::IHandleMovieMsg(plMovieMsg* mov)
{
if( !(mov->GetFileName() && *mov->GetFileName()) )
return true;
@ -1040,7 +1040,7 @@ void plClient::ILoadNextRoom()
fLoadRooms.pop_front();
bool alreadyLoaded = (IFindRoomByLoc(req->loc) != -1);
hsBool isLoading = IIsRoomLoading(req->loc);
bool isLoading = IIsRoomLoading(req->loc);
if (alreadyLoaded || isLoading)
{
delete req;
@ -1152,7 +1152,7 @@ void plClient::IRoomLoaded(plSceneNode* node, bool hold)
{
fCurrentNode = node;
// make sure we don't already have this room in the list:
hsBool bAppend = true;
bool bAppend = true;
for (int i = 0; i < fRooms.Count(); i++)
{
if (fRooms[i].fNode == fCurrentNode)
@ -1397,7 +1397,7 @@ void plClient::IStopProgress( void )
*
***/
extern hsBool gDataServerLocal;
extern bool gDataServerLocal;
#include "plQuality.h"
#include "plLoadMask.h"
@ -1470,7 +1470,7 @@ private:
#endif
//============================================================================
hsBool plClient::StartInit()
bool plClient::StartInit()
{
hsStatusMessage("Init client\n");
fFlags.SetBit( kFlagIniting );
@ -1669,7 +1669,7 @@ void plClient::ShutdownDLLs()
fLoadedDLLs.Reset();
}
hsBool plClient::MainLoop()
bool plClient::MainLoop()
{
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
if (PythonInterface::UsePythonDebugger())
@ -1745,7 +1745,7 @@ plProfile_CreateTimer("ScreenElem", "Render", ScreenElem);
plProfile_CreateTimer("EndRender", "Render", EndRender);
hsBool plClient::IUpdate()
bool plClient::IUpdate()
{
plProfile_BeginTiming(UpdateTime);
@ -1839,7 +1839,7 @@ hsBool plClient::IUpdate()
return false;
}
hsBool plClient::IDrawProgress() {
bool plClient::IDrawProgress() {
// HACK: Don't draw while we're caching some room loads, otherwise the
// progress bar will jump around while we're calculating the size
if (fHoldLoadRequests)
@ -1871,7 +1871,7 @@ hsBool plClient::IDrawProgress() {
return false;
}
hsBool plClient::IDraw()
bool plClient::IDraw()
{
// If we're shutting down, don't attempt to draw. Doing so
// tends to cause a device reload each frame.
@ -1990,7 +1990,7 @@ void plClient::IKillMovies()
fMovies.Reset();
}
hsBool plClient::IPlayIntroBink(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume /* = 1.0 */)
bool plClient::IPlayIntroBink(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume /* = 1.0 */)
{
SetQuitIntro(false);
plBinkPlayer player;
@ -2022,7 +2022,7 @@ hsBool plClient::IPlayIntroBink(const char* movieName, float endDelay, float pos
return true;
}
hsBool done = false;
bool done = false;
if( !fPipeline->BeginRender() )
{
fPipeline->ClearRenderTarget();
@ -2039,7 +2039,7 @@ hsBool plClient::IPlayIntroBink(const char* movieName, float endDelay, float pos
return false;
}
hsBool plClient::IFlushRenderRequests()
bool plClient::IFlushRenderRequests()
{
// For those requesting ack's, we could go through and send them
// mail telling them their request was ill-timed. But hopefully,
@ -2109,7 +2109,7 @@ hsG3DDeviceModeRecord plClient::ILoadDevMode(const char* devModeFile)
HWND hWnd = fWindowHndl;
hsUNIXStream stream;
hsBool gottaCreate = false;
bool gottaCreate = false;
// If DevModeFind is specified, use the old method
// if ((GetGameFlags() & kDevModeFind))
@ -2175,7 +2175,7 @@ hsG3DDeviceModeRecord plClient::ILoadDevMode(const char* devModeFile)
return dmr;
}
void plClient::ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool VSync)
void plClient::ResetDisplayDevice(int Width, int Height, int ColorDepth, bool Windowed, int NumAASamples, int MaxAnisotropicSamples, bool VSync)
{
if(!fPipeline) return;
@ -2188,7 +2188,7 @@ void plClient::ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool
WindowActivate(true);
}
void plClient::ResizeDisplayDevice(int Width, int Height, hsBool Windowed)
void plClient::ResizeDisplayDevice(int Width, int Height, bool Windowed)
{
if (plMouseDevice::Instance())
@ -2231,7 +2231,7 @@ void plClient::ResizeDisplayDevice(int Width, int Height, hsBool Windowed)
SetWindowPos( fWindowHndl, insertAfter, 0, 0, OutsideWidth, OutsideHeight, flags );
}
void WriteBool(hsStream *stream, char *name, hsBool on )
void WriteBool(hsStream *stream, char *name, bool on )
{
char command[256];
sprintf(command, "%s %s\r\n", name, on ? "true" : "false");
@ -2256,7 +2256,7 @@ void WriteString(hsStream *stream, const char *name, const char *val)
void plClient::IDetectAudioVideoSettings()
{
// Setup default pipeline settings
hsBool devmode = true;
bool devmode = true;
hsG3DDeviceModeRecord dmr;
hsG3DDeviceSelector devSel;
devSel.Enumerate(fWindowHndl);
@ -2267,10 +2267,10 @@ void plClient::IDetectAudioVideoSettings()
hsG3DDeviceRecord *rec = (hsG3DDeviceRecord *)dmr.GetDevice();
const hsG3DDeviceMode *mode = dmr.GetMode();
hsBool pixelshaders = rec->GetCap(hsG3DDeviceSelector::kCapsPixelShader);
bool pixelshaders = rec->GetCap(hsG3DDeviceSelector::kCapsPixelShader);
int psMajor = 0, psMinor = 0;
rec->GetPixelShaderVersion(psMajor, psMinor);
hsBool refDevice = false;
bool refDevice = false;
if(rec->GetG3DHALorHEL() == hsG3DDeviceSelector::kHHD3DRefDev)
refDevice = true;

View File

@ -124,8 +124,8 @@ protected:
pfKI *fKIGUIGlue;
hsBool fDone;
hsBool fWindowActive;
bool fDone;
bool fWindowActive;
hsWindowHndl fWindowHndl;
@ -136,20 +136,20 @@ protected:
virtual hsG3DDeviceModeRecord ILoadDevMode(const char* devModeFile);
hsBool IUpdate();
hsBool IDraw();
hsBool IDrawProgress();
bool IUpdate();
bool IDraw();
bool IDrawProgress();
plVirtualCam1* fNewCamera;
static plClient* fInstance;
char * fpAuxInitDir;
static hsBool fDelayMS;
static bool fDelayMS;
int fClampCap;
int fQuality;
hsBool fQuitIntro;
bool fQuitIntro;
hsTArray<plBinkPlayer*> fMovies;
plMessagePumpProc fMessagePumpProc;
@ -184,14 +184,14 @@ protected:
void IHandleNetCommAuthMsg (plNetCommAuthMsg * msg);
bool IHandleAgeLoaded2Msg (plAgeLoaded2Msg * msg);
hsBool IFlushRenderRequests();
bool IFlushRenderRequests();
void IProcessPreRenderRequests();
void IProcessPostRenderRequests();
void IProcessRenderRequests(hsTArray<plRenderRequest*>& reqs);
void IAddRenderRequest(plRenderRequest* req);
hsBool IPlayIntroBink(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume = 1.0);
hsBool IHandleMovieMsg(plMovieMsg* mov);
bool IPlayIntroBink(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume = 1.0);
bool IHandleMovieMsg(plMovieMsg* mov);
void IKillMovies();
void IServiceMovies();
@ -225,9 +225,9 @@ public:
static plClient* GetInstance() { return fInstance; }
static void SetInstance(plClient* v) { fInstance=v; }
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
hsBool InitPipeline();
bool InitPipeline();
void InitInputs();
@ -236,12 +236,12 @@ public:
void InitAuxInits();
virtual hsBool StartInit();
virtual hsBool Shutdown();
virtual hsBool MainLoop();
virtual bool StartInit();
virtual bool Shutdown();
virtual bool MainLoop();
plClient& SetDone(hsBool done) { fDone = done; return *this; }
hsBool GetDone() { return fDone; }
plClient& SetDone(bool done) { fDone = done; return *this; }
bool GetDone() { return fDone; }
// Set this to true to queue any room load requests that come in. Set it to false to process them.
void SetHoldLoadRequests(bool hold);
@ -255,8 +255,8 @@ public:
kFlagGlobalDataLoaded,
};
hsBool HasFlag(int f) const { return fFlags.IsBitSet(f); }
void SetFlag(int f, hsBool on=true) { fFlags.SetBit(f, on); }
bool HasFlag(int f) const { return fFlags.IsBitSet(f); }
void SetFlag(int f, bool on=true) { fFlags.SetBit(f, on); }
virtual plClient& SetWindowHandle(hsWindowHndl hndl) { fWindowHndl=hndl; return *this; }
hsWindowHndl GetWindowHandle() { return fWindowHndl; }
@ -280,20 +280,20 @@ public:
void SetQuality(int q) { fQuality = q; }
int GetQuality() const { return fQuality; }
hsBool GetQuitIntro() const { return fQuitIntro; }
void SetQuitIntro(hsBool on) { fQuitIntro = on; }
bool GetQuitIntro() const { return fQuitIntro; }
void SetQuitIntro(bool on) { fQuitIntro = on; }
void SetClearColor( hsColorRGBA &color );
hsColorRGBA GetClearColor() const { return fClearColor; }
// The client window has focus (true) or lost it (false)
virtual void WindowActivate(bool active);
virtual hsBool WindowActive() const { return fWindowActive; }
virtual bool WindowActive() const { return fWindowActive; }
void FlashWindow();
void SetMessagePumpProc( plMessagePumpProc proc ) { fMessagePumpProc = proc; }
void ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool VSync = false);
void ResizeDisplayDevice(int Width, int Height, hsBool Windowed);
void ResetDisplayDevice(int Width, int Height, int ColorDepth, bool Windowed, int NumAASamples, int MaxAnisotropicSamples, bool VSync = false);
void ResizeDisplayDevice(int Width, int Height, bool Windowed);
void IDetectAudioVideoSettings();
void IWriteDefaultGraphicsSettings(const wchar_t* destFile);

View File

@ -92,10 +92,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//
// Globals
//
hsBool gHasMouse = false;
bool gHasMouse = false;
ITaskbarList3* gTaskbarList = nil; // NT 6.1+ taskbar stuff
extern hsBool gDataServerLocal;
extern bool gDataServerLocal;
enum
{
@ -1047,7 +1047,7 @@ static void SaveUserPass (LoginDialogParam *pLoginParam, char *password)
{
stream->Write(sizeof(cryptKey), cryptKey);
stream->WriteSafeString(pLoginParam->username);
stream->Writebool(pLoginParam->remember);
stream->WriteBool(pLoginParam->remember);
if (pLoginParam->remember)
stream->Write(sizeof(pLoginParam->namePassHash), pLoginParam->namePassHash);
stream->Close();
@ -1092,7 +1092,7 @@ static void LoadUserPass (LoginDialogParam *pLoginParam)
delete temp;
}
pLoginParam->remember = stream->Readbool();
pLoginParam->remember = stream->ReadBool();
if (pLoginParam->remember)
{

View File

@ -157,7 +157,7 @@ public:
plSoundBufferCollector(hsTArray<plKey>& keyArray)
: plKeyCollector(keyArray) {}
hsBool EatPage(plRegistryPageNode* page)
bool EatPage(plRegistryPageNode* page)
{
page->LoadKeys();
return page->IterateKeys(this, plSoundBuffer::Index());
@ -226,7 +226,7 @@ protected:
public:
plStatDumpIterator(const char* outputDir) : fOutputDir(outputDir) {}
hsBool EatKey(const plKey& key)
bool EatKey(const plKey& key)
{
plKeyImp* imp = (plKey)key;
@ -244,7 +244,7 @@ public:
return true;
}
hsBool EatPage(plRegistryPageNode* page)
bool EatPage(plRegistryPageNode* page)
{
const plPageInfo& info = page->GetPageInfo();

View File

@ -76,7 +76,7 @@ void plPageOptimizer::IFindLoc()
public:
plLocation fLoc;
virtual hsBool EatPage(plRegistryPageNode* keyNode)
virtual bool EatPage(plRegistryPageNode* keyNode)
{
fLoc = keyNode->GetPageInfo().GetLocation();
return true;
@ -95,7 +95,7 @@ void plPageOptimizer::Optimize()
// Get the location of the page we're optimizing
IFindLoc();
hsBool loaded = true;
bool loaded = true;
// Get the key for the scene node, we'll load it to force a load on all the objects
plKey snKey = plKeyFinder::Instance().FindSceneNodeKey(fLoc);
@ -111,7 +111,7 @@ void plPageOptimizer::Optimize()
public:
KeyVec& fKeys;
plVecKeyCollector(KeyVec& keys) : fKeys(keys) {}
virtual hsBool EatKey(const plKey& key) { fKeys.push_back(key); return true; }
virtual bool EatKey(const plKey& key) { fKeys.push_back(key); return true; }
};
plVecKeyCollector keyIt(fAllKeys);
fResMgr->IterateKeys(&keyIt);
@ -238,7 +238,7 @@ void plPageOptimizer::IRewritePage()
// some reason), put them at the end
for (int i = 0; i < fAllKeys.size(); i++)
{
hsBool found = (fLoadedKeys.find(fAllKeys[i]) != fLoadedKeys.end());
bool found = (fLoadedKeys.find(fAllKeys[i]) != fLoadedKeys.end());
if (!found)
IWriteKeyData(&oldPage, &newPage, fAllKeys[i]);
}

View File

@ -152,7 +152,7 @@ PyObject* PythonInterface::CompileString(const char *command, const char* filena
//
// PURPOSE : marshals an object into a char string
//
hsBool PythonInterface::DumpObject(PyObject* pyobj, char** pickle, int32_t* size)
bool PythonInterface::DumpObject(PyObject* pyobj, char** pickle, int32_t* size)
{
PyObject *s; // the python string object where the marsalled object wil go
// convert object to a marshalled string python object
@ -255,7 +255,7 @@ PyObject* PythonInterface::CreateModule(const char* module)
//
// PURPOSE : run a compiled python code in a specific module name
//
hsBool PythonInterface::RunPYC(PyObject* code, PyObject* module)
bool PythonInterface::RunPYC(PyObject* code, PyObject* module)
{
PyObject *d, *v;
// make sure that we're given a good module... or at least one with an address

View File

@ -52,9 +52,9 @@ namespace PythonInterface
void addPythonPath(std::string dir);
PyObject* CompileString(const char *command, const char* filename);
hsBool DumpObject(PyObject* pyobj, char** pickle, int32_t* size);
bool DumpObject(PyObject* pyobj, char** pickle, int32_t* size);
int getOutputAndReset(char** line=nil);
PyObject* CreateModule(const char* module);
hsBool RunPYC(PyObject* code, PyObject* module);
bool RunPYC(PyObject* code, PyObject* module);
PyObject* GetModuleItem(const char* item, PyObject* module);
}

View File

@ -141,7 +141,7 @@ void WritePythonFile(std::string fileName, std::string path, hsStream *s)
// next we need to:
// - create instance of class
PyObject* getID = PythonInterface::GetModuleItem("glue_getBlockID",fModule);
hsBool foundID = false;
bool foundID = false;
if ( getID!=nil && PyCallable_Check(getID) )
{
PyObject* id = PyObject_CallFunction(getID,nil);