Skip to content

Commit

Permalink
Obliterate hsBool
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoikas committed Jul 14, 2012
1 parent 5f78b33 commit a709e17
Show file tree
Hide file tree
Showing 1,041 changed files with 7,896 additions and 8,077 deletions.
48 changes: 24 additions & 24 deletions Sources/Plasma/Apps/plClient/plClient.cpp
Expand Up @@ -169,7 +169,7 @@ static plAudioSystem* gAudio = nil;
extern ITaskbarList3* gTaskbarList;
#endif

hsBool plClient::fDelayMS = false;
bool plClient::fDelayMS = false;

plClient* plClient::fInstance=nil;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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++)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -1397,7 +1397,7 @@ void plClient::IStopProgress( void )
*
***/

extern hsBool gDataServerLocal;
extern bool gDataServerLocal;

#include "plQuality.h"
#include "plLoadMask.h"
Expand Down Expand Up @@ -1470,7 +1470,7 @@ class LoginNetClientCommCallback : public plNetClientComm::Callback
#endif

//============================================================================
hsBool plClient::StartInit()
bool plClient::StartInit()
{
hsStatusMessage("Init client\n");
fFlags.SetBit( kFlagIniting );
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -1745,7 +1745,7 @@ plProfile_CreateTimer("ScreenElem", "Render", ScreenElem);
plProfile_CreateTimer("EndRender", "Render", EndRender);


hsBool plClient::IUpdate()
bool plClient::IUpdate()
{
plProfile_BeginTiming(UpdateTime);

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -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,
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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;

Expand All @@ -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())
Expand Down Expand Up @@ -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");
Expand All @@ -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);
Expand All @@ -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;

Expand Down
48 changes: 24 additions & 24 deletions Sources/Plasma/Apps/plClient/plClient.h
Expand Up @@ -124,8 +124,8 @@ class plClient : public hsKeyedObject

pfKI *fKIGUIGlue;

hsBool fDone;
hsBool fWindowActive;
bool fDone;
bool fWindowActive;

hsWindowHndl fWindowHndl;

Expand All @@ -136,20 +136,20 @@ class plClient : public hsKeyedObject

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;
Expand Down Expand Up @@ -184,14 +184,14 @@ class plClient : public hsKeyedObject
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();

Expand Down Expand Up @@ -225,9 +225,9 @@ class plClient : public hsKeyedObject
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();

Expand All @@ -236,12 +236,12 @@ class plClient : public hsKeyedObject

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);
Expand All @@ -255,8 +255,8 @@ class plClient : public hsKeyedObject
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; }
Expand All @@ -280,20 +280,20 @@ class plClient : public hsKeyedObject
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);

Expand Down
8 changes: 4 additions & 4 deletions Sources/Plasma/Apps/plClient/winmain.cpp
Expand Up @@ -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
{
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -1092,7 +1092,7 @@ static void LoadUserPass (LoginDialogParam *pLoginParam)
delete temp;
}

pLoginParam->remember = stream->Readbool();
pLoginParam->remember = stream->ReadBool();

if (pLoginParam->remember)
{
Expand Down
6 changes: 3 additions & 3 deletions Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp
Expand Up @@ -157,7 +157,7 @@ class plSoundBufferCollector : public plRegistryPageIterator, public plKeyCollec
plSoundBufferCollector(hsTArray<plKey>& keyArray)
: plKeyCollector(keyArray) {}

hsBool EatPage(plRegistryPageNode* page)
bool EatPage(plRegistryPageNode* page)
{
page->LoadKeys();
return page->IterateKeys(this, plSoundBuffer::Index());
Expand Down Expand Up @@ -226,7 +226,7 @@ class plStatDumpIterator : public plRegistryPageIterator, public plRegistryKeyIt
public:
plStatDumpIterator(const char* outputDir) : fOutputDir(outputDir) {}

hsBool EatKey(const plKey& key)
bool EatKey(const plKey& key)
{
plKeyImp* imp = (plKey)key;

Expand All @@ -244,7 +244,7 @@ class plStatDumpIterator : public plRegistryPageIterator, public plRegistryKeyIt
return true;
}

hsBool EatPage(plRegistryPageNode* page)
bool EatPage(plRegistryPageNode* page)
{
const plPageInfo& info = page->GetPageInfo();

Expand Down

0 comments on commit a709e17

Please sign in to comment.