diff --git a/Sources/Plasma/Apps/plClient/plClient.cpp b/Sources/Plasma/Apps/plClient/plClient.cpp index 6370164f..77173c1c 100644 --- a/Sources/Plasma/Apps/plClient/plClient.cpp +++ b/Sources/Plasma/Apps/plClient/plClient.cpp @@ -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; @@ -1015,7 +1015,7 @@ void plClient::IQueueRoomLoad(const std::vector& locs, bool hold) fLoadRooms.push_back(new LoadRequest(loc, hold)); - if (!lastAgeName || hsStrEQ(info->GetAge(), lastAgeName)) + if (!lastAgeName || strcmp(info->GetAge(), lastAgeName) == 0) lastAgeName = info->GetAge(); else allSameAge = false; @@ -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) @@ -1208,7 +1208,7 @@ void plClient::IRoomLoaded(plSceneNode* node, bool hold) int numMsgs = 0; for (int i = 0; i < sizeof(ageMsgCount)/sizeof(AgeMsgCount); i++) { - if (hsStrEQ(ageMsgCount[i].AgeName, name)) + if (strcmp(ageMsgCount[i].AgeName, name) == 0) { numMsgs = ageMsgCount[i].NumMsgs; break; @@ -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; @@ -2367,18 +2367,13 @@ void plClient::IDetectAudioVideoSettings() stream = plEncryptedStream::OpenEncryptedFileWrite(audioIniFile); plAudioCaps caps = plAudioCapsDetector::Detect(false, true); - val = 6; - if( (hsPhysicalMemory() < 256) || plProfileManager::Instance().GetProcessorSpeed() < 1350000000) - { - val = 3; - } char deviceName[256]; sprintf(deviceName, "\"%s\"", DEFAULT_AUDIO_DEVICE_NAME); WriteBool(stream, "Audio.Initialize", caps.IsAvailable()); WriteBool(stream, "Audio.UseEAX", false); - WriteInt(stream, "Audio.SetPriorityCutoff", val); + WriteInt(stream, "Audio.SetPriorityCutoff", 6); WriteInt(stream, "Audio.MuteAll", false); WriteInt(stream, "Audio.SetChannelVolume SoundFX", 1); WriteInt(stream, "Audio.SetChannelVolume BgndMusic", 1); diff --git a/Sources/Plasma/Apps/plClient/plClient.h b/Sources/Plasma/Apps/plClient/plClient.h index b529f5bf..92cf6014 100644 --- a/Sources/Plasma/Apps/plClient/plClient.h +++ b/Sources/Plasma/Apps/plClient/plClient.h @@ -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 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& 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); diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index c07f6ad3..36ef2cf6 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -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) { diff --git a/Sources/Plasma/Apps/plFileEncrypt/main.cpp b/Sources/Plasma/Apps/plFileEncrypt/main.cpp index d821433d..2a52b1b1 100644 --- a/Sources/Plasma/Apps/plFileEncrypt/main.cpp +++ b/Sources/Plasma/Apps/plFileEncrypt/main.cpp @@ -62,37 +62,38 @@ void print_help() { printf("\t-v|--version\t - Prints build version information\n"); } - int main(int argc, char *argv[]) { bool encrypt = true; const char* dir = "."; +#define ARGCMP(y) (strcmp(argv[1], y) == 0) if (argc > 1) { - if (hsStrEQ(argv[1], "encrypt") || hsStrEQ(argv[1], "-e") ) + if (ARGCMP("encrypt") || ARGCMP("-e") ) { if (argc > 2) dir = argv[2]; encrypt = true; } - else if (hsStrEQ(argv[1], "decrypt") || hsStrEQ(argv[1], "-d")) + else if (ARGCMP("decrypt") || ARGCMP("-d")) { if (argc > 2) dir = argv[2]; encrypt = false; } - else if(hsStrEQ(argv[1], "--help") || hsStrEQ(argv[1], "-h") || hsStrEQ(argv[1], "-?") || hsStrEQ(argv[1], "/?")) + else if(ARGCMP("--help") || ARGCMP("-h") || ARGCMP("-?") || ARGCMP("/?")) { print_help(); return 0; } - else if (hsStrEQ(argv[1], "-v") || hsStrEQ(argv[1], "--version")) + else if (ARGCMP("-v") || ARGCMP("--version")) { print_version(); return 0; } } +#undef ARGCMP EncryptFiles(dir, ".age", encrypt); EncryptFiles(dir, ".fni", encrypt); diff --git a/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp b/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp index 299b1bc1..0ec17dc2 100644 --- a/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp +++ b/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp @@ -95,7 +95,7 @@ int PrintHelp( void ) int main(int argc, char* argv[]) { - if (argc >= 1 && hsStrEQ(argv[1], "-v")) + if (argc >= 1 && strcmp(argv[1], "-v") == 0) { PrintVersion(); return 0; @@ -110,9 +110,9 @@ int main(int argc, char* argv[]) int arg = 1; for (arg = 1; arg < argc; arg++) { - if (hsStrEQ(argv[arg], "-s")) + if (strcmp(argv[arg], "-s") == 0) sounds = true; - else if (hsStrEQ(argv[arg], "-i")) + else if (strcmp(argv[arg], "-i") == 0) stats = true; else break; @@ -157,7 +157,7 @@ public: plSoundBufferCollector(hsTArray& 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(); diff --git a/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.cpp b/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.cpp index 87d3cf97..39dd3f70 100644 --- a/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.cpp +++ b/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.cpp @@ -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]); } diff --git a/Sources/Plasma/Apps/plPythonPack/PythonInterface.cpp b/Sources/Plasma/Apps/plPythonPack/PythonInterface.cpp index 6685c47e..29553df0 100644 --- a/Sources/Plasma/Apps/plPythonPack/PythonInterface.cpp +++ b/Sources/Plasma/Apps/plPythonPack/PythonInterface.cpp @@ -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 diff --git a/Sources/Plasma/Apps/plPythonPack/PythonInterface.h b/Sources/Plasma/Apps/plPythonPack/PythonInterface.h index b2480c6b..dcf17f52 100644 --- a/Sources/Plasma/Apps/plPythonPack/PythonInterface.h +++ b/Sources/Plasma/Apps/plPythonPack/PythonInterface.h @@ -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); } diff --git a/Sources/Plasma/Apps/plPythonPack/main.cpp b/Sources/Plasma/Apps/plPythonPack/main.cpp index 234c4d16..ea5b33f4 100644 --- a/Sources/Plasma/Apps/plPythonPack/main.cpp +++ b/Sources/Plasma/Apps/plPythonPack/main.cpp @@ -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); diff --git a/Sources/Plasma/Apps/plUruLauncher/Main.cpp b/Sources/Plasma/Apps/plUruLauncher/Main.cpp index 06b94ab5..2029d23e 100644 --- a/Sources/Plasma/Apps/plUruLauncher/Main.cpp +++ b/Sources/Plasma/Apps/plUruLauncher/Main.cpp @@ -208,7 +208,7 @@ static void LogV (ELogSev sev, const wchar_t fmt[], va_list args) { { stdout, L"Inf" }, { stderr, L"Err" }, }; - COMPILER_ASSERT(arrsize(s_log) == kNumLogSev); + static_assert(arrsize(s_log) == kNumLogSev, "Log severity array and enum have different sizes"); fwprintf (s_log[sev].file, L"%s: ", s_log[sev].pre); vfwprintf(s_log[sev].file, fmt, args); diff --git a/Sources/Plasma/CoreLib/CMakeLists.txt b/Sources/Plasma/CoreLib/CMakeLists.txt index d99906de..e87d7754 100644 --- a/Sources/Plasma/CoreLib/CMakeLists.txt +++ b/Sources/Plasma/CoreLib/CMakeLists.txt @@ -24,6 +24,7 @@ set(CoreLib_SOURCES hsMatrix44.cpp hsMemory.cpp hsQuat.cpp + hsRefCnt.cpp hsSafeRefCnt.cpp hsSTLStream.cpp hsStlUtils.cpp @@ -31,7 +32,6 @@ set(CoreLib_SOURCES hsStringTokenizer.cpp hsTemplates.cpp hsThread.cpp - hsUtils.cpp hsWide.cpp pcSmallRect.cpp plGeneric.cpp @@ -77,15 +77,11 @@ set(CoreLib_HEADERS hsStringTokenizer.h hsTemplates.h hsThread.h - hsTypes.h - hsUtils.h hsWide.h - hsWindows.h pcSmallRect.h plGeneric.h plLoadMask.h plQuality.h - plRefCnt.h plString.h plTweak.h plViewTransform.h diff --git a/Sources/Plasma/CoreLib/HeadSpin.cpp b/Sources/Plasma/CoreLib/HeadSpin.cpp index 356109c4..ad9bcc71 100644 --- a/Sources/Plasma/CoreLib/HeadSpin.cpp +++ b/Sources/Plasma/CoreLib/HeadSpin.cpp @@ -40,15 +40,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "hsRefCnt.h" -#include "hsStlUtils.h" -#include "hsExceptions.h" -#include #ifdef _MSC_VER # include #endif +#include "hsStlUtils.h" +#include "hsTemplates.h" + /////////////////////////////////////////////////////////////////////////// /////////////////// For Status Messages /////////////////////////////////// @@ -122,7 +121,7 @@ void ErrorAssert(int line, const char file[], const char fmt[], ...) { if(_CrtDbgReport(_CRT_ASSERT, file, line, NULL, msg)) DebugBreak(); - } else + } else #endif // HS_DEBUGGING if (DebugIsDebuggerPresent()) { char str[] = "-------\nASSERTION FAILED:\nFile: %s Line: %i\nMessage: %s\n-------"; @@ -146,7 +145,7 @@ bool DebugIsDebuggerPresent() void DebugBreakIfDebuggerPresent() { #ifdef _MSC_VER - __try + __try { __debugbreak(); } __except(EXCEPTION_EXECUTE_HANDLER) { @@ -175,30 +174,6 @@ void DebugMsg(const char fmt[], ...) } } -/////////////////////////////////////////////////////////////////// - - -hsRefCnt::~hsRefCnt() -{ - hsDebugCode(hsThrowIfFalse(fRefCnt == 1);) -} - -void hsRefCnt::Ref() -{ - fRefCnt++; -} - -void hsRefCnt::UnRef() -{ - hsDebugCode(hsThrowIfFalse(fRefCnt >= 1);) - - if (fRefCnt == 1) // don't decrement if we call delete - delete this; - else - --fRefCnt; -} - - //////////////////////////////////////////////////////////////////////////// #ifndef PLASMA_EXTERNAL_RELEASE @@ -237,4 +212,383 @@ void hsStatusMessageF(const char * fmt, ...) va_end(args); } +char * hsFormatStr(const char * fmt, ...) +{ + va_list args; + va_start(args,fmt); + char * result = hsFormatStrV(fmt,args); + va_end(args); + return result; +} + +char * hsFormatStrV(const char * fmt, va_list args) +{ + std::string buf; + xtl::formatv(buf,fmt,args); + return hsStrcpy(buf.c_str()); +} + +static char hsStrBuf[100]; + +char *hsScalarToStr(float s) +{ + sprintf(hsStrBuf, "%f", s); + return hsStrBuf; +} + +class hsMinimizeClientGuard +{ +#ifdef CLIENT + hsWindowHndl fWnd; + +public: + hsMinimizeClientGuard() + { +#ifdef HS_BUILD_FOR_WIN32 + fWnd = GetActiveWindow(); + // If the application's topmost window is fullscreen, minimize it before displaying an error + if ((GetWindowLong(fWnd, GWL_STYLE) & WS_POPUP) != 0) + ShowWindow(fWnd, SW_MINIMIZE); +#endif // HS_BUILD_FOR_WIN32 + } + + ~hsMinimizeClientGuard() + { +#ifdef HS_BUILD_FOR_WIN32 + ShowWindow(fWnd, SW_RESTORE); +#endif // HS_BUILD_FOR_WIN32 + } +#endif // CLIENT +}; + +bool hsMessageBox_SuppressPrompts = false; + +int hsMessageBoxWithOwner(hsWindowHndl owner, const char message[], const char caption[], int kind, int icon) +{ + if (hsMessageBox_SuppressPrompts) + return hsMBoxOk; + +#if HS_BUILD_FOR_WIN32 + uint32_t flags = 0; + + if (kind == hsMessageBoxNormal) + flags |= MB_OK; + else if (kind == hsMessageBoxAbortRetyIgnore) + flags |= MB_ABORTRETRYIGNORE; + else if (kind == hsMessageBoxOkCancel) + flags |= MB_OKCANCEL; + else if (kind == hsMessageBoxRetryCancel) + flags |= MB_RETRYCANCEL; + else if (kind == hsMessageBoxYesNo) + flags |= MB_YESNO; + else if (kind == hsMessageBoxYesNoCancel) + flags |= MB_YESNOCANCEL; + else + flags |= MB_OK; + + if (icon == hsMessageBoxIconError) + flags |= MB_ICONERROR; + else if (icon == hsMessageBoxIconQuestion) + flags |= MB_ICONQUESTION; + else if (icon == hsMessageBoxIconExclamation) + flags |= MB_ICONEXCLAMATION; + else if (icon == hsMessageBoxIconAsterisk) + flags |= MB_ICONASTERISK; + else + flags |= MB_ICONERROR; + + hsMinimizeClientGuard guard; + int ans = MessageBox(owner, message, caption, flags); + + switch (ans) + { + case IDOK: return hsMBoxOk; + case IDCANCEL: return hsMBoxCancel; + case IDABORT: return hsMBoxAbort; + case IDRETRY: return hsMBoxRetry; + case IDIGNORE: return hsMBoxIgnore; + case IDYES: return hsMBoxYes; + case IDNO: return hsMBoxNo; + default: return hsMBoxCancel; + } + +#endif +} + +int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t message[], const wchar_t caption[], int kind, int icon) +{ + if (hsMessageBox_SuppressPrompts) + return hsMBoxOk; + +#if HS_BUILD_FOR_WIN32 + uint32_t flags = 0; + + if (kind == hsMessageBoxNormal) + flags |= MB_OK; + else if (kind == hsMessageBoxAbortRetyIgnore) + flags |= MB_ABORTRETRYIGNORE; + else if (kind == hsMessageBoxOkCancel) + flags |= MB_OKCANCEL; + else if (kind == hsMessageBoxRetryCancel) + flags |= MB_RETRYCANCEL; + else if (kind == hsMessageBoxYesNo) + flags |= MB_YESNO; + else if (kind == hsMessageBoxYesNoCancel) + flags |= MB_YESNOCANCEL; + else + flags |= MB_OK; + + if (icon == hsMessageBoxIconError) + flags |= MB_ICONERROR; + else if (icon == hsMessageBoxIconQuestion) + flags |= MB_ICONQUESTION; + else if (icon == hsMessageBoxIconExclamation) + flags |= MB_ICONEXCLAMATION; + else if (icon == hsMessageBoxIconAsterisk) + flags |= MB_ICONASTERISK; + else + flags |= MB_ICONERROR; + + hsMinimizeClientGuard guard; + int ans = MessageBoxW(owner, message, caption, flags); + + switch (ans) + { + case IDOK: return hsMBoxOk; + case IDCANCEL: return hsMBoxCancel; + case IDABORT: return hsMBoxAbort; + case IDRETRY: return hsMBoxRetry; + case IDIGNORE: return hsMBoxIgnore; + case IDYES: return hsMBoxYes; + case IDNO: return hsMBoxNo; + default: return hsMBoxCancel; + } + +#endif +} + +int hsMessageBox(const char message[], const char caption[], int kind, int icon) +{ + return hsMessageBoxWithOwner((hsWindowHndl)nil,message,caption,kind,icon); +} + +int hsMessageBox(const wchar_t message[], const wchar_t caption[], int kind, int icon) +{ + return hsMessageBoxWithOwner((hsWindowHndl)nil,message,caption,kind,icon); +} + +/**************************************/ +char* hsStrcpy(char dst[], const char src[]) +{ + if (src) + { + if (dst == nil) + { + int count = strlen(src); + dst = (char *)malloc(count + 1); + memcpy(dst, src, count); + dst[count] = 0; + return dst; + } + + int32_t i; + for (i = 0; src[i] != 0; i++) + dst[i] = src[i]; + dst[i] = 0; + } + + return dst; +} + +void hsStrLower(char *s) +{ + if (s) + { + int i; + for (i = 0; i < strlen(s); i++) + s[i] = tolower(s[i]); + } +} + +//// IStringToWString ///////////////////////////////////////////////////////// +// Converts a char * string to a wchar_t * string + +wchar_t *hsStringToWString( const char *str ) +{ + // convert the char string to a wchar_t string + int len = strlen(str); + wchar_t *wideString = new wchar_t[len+1]; + for (int i=0; i versionStrs; + OSVERSIONINFOEX osvi; + BOOL bOsVersionInfoEx; + + // Try calling GetVersionEx using the OSVERSIONINFOEX structure. + // + // If that fails, try using the OSVERSIONINFO structure. + + ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + + if( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)) ) + { + // If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO. + + osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); + if (! GetVersionEx ( (OSVERSIONINFO *) &osvi) ) + return FALSE; + } + + switch (osvi.dwPlatformId) + { + case VER_PLATFORM_WIN32_NT: + + // Test for the product. + + if ( osvi.dwMajorVersion <= 4 ) + versionStrs.Append(hsStrcpy("Microsoft Windows NT ")); + + if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) + versionStrs.Append(hsStrcpy ("Microsoft Windows 2000 ")); + + if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 ) + versionStrs.Append(hsStrcpy ("Microsoft Windows XP ")); + + // Test for product type. + + if( bOsVersionInfoEx ) + { + if ( osvi.wProductType == VER_NT_WORKSTATION ) + { + if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) + versionStrs.Append(hsStrcpy ( "Personal " )); + else + versionStrs.Append(hsStrcpy ( "Professional " )); + } + + else if ( osvi.wProductType == VER_NT_SERVER ) + { + if( osvi.wSuiteMask & VER_SUITE_DATACENTER ) + versionStrs.Append(hsStrcpy ( "DataCenter Server " )); + else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) + versionStrs.Append(hsStrcpy ( "Advanced Server " )); + else + versionStrs.Append(hsStrcpy ( "Server " )); + } + } + else + { + HKEY hKey; + char szProductType[80]; + DWORD dwBufLen; + + RegOpenKeyEx( HKEY_LOCAL_MACHINE, + "SYSTEM\\CurrentControlSet\\Control\\ProductOptions", + 0, KEY_QUERY_VALUE, &hKey ); + RegQueryValueEx( hKey, "ProductType", NULL, NULL, + (LPBYTE) szProductType, &dwBufLen); + RegCloseKey( hKey ); + if ( lstrcmpi( "WINNT", szProductType) == 0 ) + versionStrs.Append(hsStrcpy( "Professional " )); + if ( lstrcmpi( "LANMANNT", szProductType) == 0 ) + versionStrs.Append(hsStrcpy( "Server " )); + if ( lstrcmpi( "SERVERNT", szProductType) == 0 ) + versionStrs.Append(hsStrcpy( "Advanced Server " )); + } + + // Display version, service pack (if any), and build number. + + if ( osvi.dwMajorVersion <= 4 ) + { + versionStrs.Append(hsStrcpy (xtl::format("version %d.%d %s (Build %d)\n", + osvi.dwMajorVersion, + osvi.dwMinorVersion, + osvi.szCSDVersion, + osvi.dwBuildNumber & 0xFFFF).c_str())); + } + else + { + versionStrs.Append(hsStrcpy (xtl::format("%s (Build %d)\n", + osvi.szCSDVersion, + osvi.dwBuildNumber & 0xFFFF).c_str())); + } + break; + + case VER_PLATFORM_WIN32_WINDOWS: + + if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) + { + versionStrs.Append(hsStrcpy ("Microsoft Windows 95 ")); + if ( osvi.szCSDVersion[1] == 'C' || osvi.szCSDVersion[1] == 'B' ) + versionStrs.Append(hsStrcpy("OSR2 " )); + } + + if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) + { + versionStrs.Append(hsStrcpy ("Microsoft Windows 98 ")); + if ( osvi.szCSDVersion[1] == 'A' ) + versionStrs.Append(hsStrcpy("SE " )); + } + + if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) + { + versionStrs.Append(hsStrcpy ("Microsoft Windows Me ")); + } + break; + + case VER_PLATFORM_WIN32s: + + versionStrs.Append(hsStrcpy ("Microsoft Win32s ")); + break; + } + + versionStrs.Append(nil); // terminator + + return versionStrs.DetachArray(); +#else + return nil; +#endif +} + #endif // not PLASMA_EXTERNAL_RELEASE diff --git a/Sources/Plasma/CoreLib/HeadSpin.h b/Sources/Plasma/CoreLib/HeadSpin.h index 8c91e1dd..9a51bf29 100644 --- a/Sources/Plasma/CoreLib/HeadSpin.h +++ b/Sources/Plasma/CoreLib/HeadSpin.h @@ -46,10 +46,522 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com # define HS_DEBUGGING #endif // defined(_DEBUG) || defined(UNIX_DENUG) -// Internal Headers -// These are only ever included here :) -#include "hsTypes.h" -#include "hsWindows.h" -#include "hsUtils.h" +//====================================== +// Winblows Hacks +//====================================== +#ifdef HS_BUILD_FOR_WIN32 + // 4244: Conversion + // 4305: Truncation + // 4503: 'identifier' : decorated name length exceeded, name was truncated + // 4018: signed/unsigned mismatch + // 4786: 255 character debug limit + // 4284: STL template defined operator-> for a class it doesn't make sense for (int, etc) + // 4800: 'int': forcing value to bool 'true' or 'false' (performance warning) +# ifdef _MSC_VER +# pragma warning( disable : 4305 4503 4018 4786 4284 4800) +# endif // _MSC_VER + + // Terrible hacks for MinGW because they don't have a reasonable + // default for the Windows version. We cheat and say it's XP. +# ifdef __MINGW32__ +# undef _WIN32_WINNT +# define _WIN32_WINNT 0x501 +# undef _WIN32_IE +# define _WIN32_IE 0x400 +# endif + + // Windows.h includes winsock.h (winsocks 1), so we need to manually include winsock2 + // and tell Windows.h to only bring in modern headers +# include +# include + +# define WIN32_LEAN_AND_MEAN +# ifndef NOMINMAX +# define NOMINMAX // Needed to prevent NxMath conflicts +# endif +# include + + // Just some fun typedefs... + typedef HWND hsWindowHndl; + typedef HINSTANCE hsWindowInst; +#else + typedef int32_t* hsWindowHndl; + typedef int32_t* hsWindowInst; +#endif // HS_BUILD_FOR_WIN32 + +//====================================== +// We don't want the Windows.h min/max! +//====================================== +#ifdef max +# undef max +#endif + +#ifdef min +# undef min +#endif + +//====================================== +// Some standard includes +//====================================== +#include +#include +#include +#include +#include +#include +#include + + +//====================================== +// Basic macros +//====================================== +#ifdef __cplusplus + #define hsCTypeDefStruct(foo) +#else + #define hsCTypeDefStruct(foo) typedef struct foo foo; +#endif + +#ifdef HS_BUILD_FOR_WIN32 +# ifndef CDECL +# define CDECL __cdecl +# endif +#else +# define CDECL +#endif + +#define kPosInfinity16 (32767) +#define kNegInfinity16 (-32768) + +#define kPosInfinity32 (0x7fffffff) +#define kNegInfinity32 (0x80000000) + +#ifndef M_PI +# define M_PI 3.14159265358979323846 +#endif + +#ifndef nil +# define nil (0) +#endif + +typedef int32_t hsError; +typedef uint32_t hsGSeedValue; + +#define hsOK 0 +#define hsFail -1 +#define hsFailed(r) ((hsError)(r)=hsOK) + +#define hsLongAlign(n) (((n) + 3) & ~3L) + +#define hsMaximum(a, b) ((a) > (b) ? (a) : (b)) +#define hsMinimum(a, b) ((a) < (b) ? (a) : (b)) +#define hsABS(x) ((x) < 0 ? -(x) : (x)) +#define hsSGN(x) (((x) < 0) ? -1 : ( ((x) > 0) ? 1 : 0 )) + +#define hsBitTst2Bool(value, mask) (((value) & (mask)) != 0) + +#define hsFourByteTag(a, b, c, d) (((uint32_t)(a) << 24) | ((uint32_t)(b) << 16) | ((uint32_t)(c) << 8) | (d)) + + +//====================================== +// Endian swap funcitions +//====================================== +inline uint16_t hsSwapEndian16(uint16_t value) +{ + return (value >> 8) | (value << 8); +} +inline uint32_t hsSwapEndian32(uint32_t value) +{ + return ((value) << 24) | + ((value & 0x0000ff00) << 8) | + ((value & 0x00ff0000) >> 8) | + ((value) >> 24); +} +inline uint64_t hsSwapEndian64(uint64_t value) +{ + return ((value) << 56) | + ((value & 0x000000000000ff00) << 40) | + ((value & 0x0000000000ff0000) << 24) | + ((value & 0x00000000ff000000) << 8) | + ((value & 0x000000ff00000000) >> 8) | + ((value & 0x0000ff0000000000) >> 24) | + ((value & 0x00ff000000000000) >> 40) | + ((value) >> 56); +} +inline float hsSwapEndianFloat(float fvalue) +{ + uint32_t value = *(uint32_t*)&fvalue; + value = hsSwapEndian32(value); + return *(float*)&value; +} +inline double hsSwapEndianDouble(double dvalue) +{ + uint64_t value = *(uint64_t*)&dvalue; + value = hsSwapEndian64(value); + return *(double*)&value; +} + +#if LITTLE_ENDIAN + #define hsToBE16(n) hsSwapEndian16(n) + #define hsToBE32(n) hsSwapEndian32(n) + #define hsToBE64(n) hsSwapEndian64(n) + #define hsToBEFloat(n) hsSwapEndianFloat(n) + #define hsToBEDouble(n) hsSwapEndianDouble(n) + #define hsToLE16(n) (n) + #define hsToLE32(n) (n) + #define hsToLE64(n) (n) + #define hsToLEFloat(n) (n) + #define hsToLEDouble(n) (n) +#else + #define hsToBE16(n) (n) + #define hsToBE32(n) (n) + #define hsToBE64(n) (n) + #define hsToBEFloat(n) (n) + #define hsToBEDouble(n) (n) + #define hsToLE16(n) hsSwapEndian16(n) + #define hsToLE32(n) hsSwapEndian32(n) + #define hsToLE64(n) hsSwapEndian64(n) + #define hsToLEFloat(n) hsSwapEndianFloat(n) + #define hsToLEDouble(n) hsSwapEndianDouble(n) +#endif + +inline void hsSwap(int32_t& a, int32_t& b) +{ + int32_t c = a; + a = b; + b = c; +} + +inline void hsSwap(uint32_t& a, uint32_t& b) +{ + uint32_t c = a; + a = b; + b = c; +} + +inline void hsSwap(float& a, float& b) +{ + float c = a; + a = b; + b = c; +} + +//=========================================================================== +// Define a NOOP (null) statement +//=========================================================================== +#ifdef _MSC_VER +# define NULL_STMT __noop +#else +# define NULL_STMT ((void)0) +#endif + +//=========================================================================== +template +inline T max (const T & a, const T & b) { + return (a > b) ? a : b; +} + +//=========================================================================== +inline unsigned max (int a, unsigned b) { + return ((unsigned)a > b) ? a : b; +} + +//=========================================================================== +inline unsigned max (unsigned a, int b) { + return (a > (unsigned)b) ? a : b; +} + +//=========================================================================== +template +inline T min (const T & a, const T & b) { + return (a < b) ? a : b; +} + +//=========================================================================== +inline unsigned min (int a, unsigned b) { + return ((unsigned)a < b) ? a : b; +} + +//=========================================================================== +inline unsigned min (unsigned a, int b) { + return (a < (unsigned)b) ? a : b; +} + + +/**************************************************************************** +* +* MAX/MIN macros +* These are less safe than the inline function versions, since they +* evaluate parameters twice. However, they can be used to produce +* compile-time constants. +* +***/ +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) + + +/**************************************************************************** +* +* SWAP +* Swaps the values of two variables +* +***/ + +//=========================================================================== +template +void SWAP (T & a, T & b) { + T temp = a; + a = b; + b = temp; +} + + +/**************************************************************************** +* +* AUTO_INIT_FUNC +* Declares a function that is automatically called at program startup time +* +* Example: +* +* AUTO_INIT_FUNC(BuildLookupTables) { +* ... +* } +* +***/ + +#define AUTO_INIT_FUNC(name) namespace { struct name { name (); } name##_instance; } name::name () + + +/**************************************************************************** +* +* arrsize +* arrsize returns the number of elements in an array variable +* +* Example: +* +* StrPrintf(buffer, arrsize(buffer), "%u", value); +* +***/ +#define arrsize(a) (sizeof(a) / sizeof((a)[0])) + + +/**************************************************************************** +* +* IS_POW2 +* +***/ +#define IS_POW2(val) (!((val) & ((val) - 1))) + +#ifdef PLASMA_EXTERNAL_RELEASE +# define hsStatusMessage(x) NULL_STMT +# define hsStatusMessageF(x, ...) NULL_STMT +#else + void hsStatusMessage(const char message[]); + void hsStatusMessageF(const char * fmt, ...); +#endif // PLASMA_EXTERNAL_RELEASE + +char* hsStrcpy(char dstOrNil[], const char src[]); +void hsStrLower(char *s); +char * hsFormatStr(const char * fmt, ...); // You are responsible for returned memory. +char * hsFormatStrV(const char * fmt, va_list args); // You are responsible for returned memory. + +// Use "correct" stricmp based on the selected compiler / library +#if HS_BUILD_FOR_WIN32 +# define stricmp _stricmp +# define strnicmp _strnicmp +# define wcsicmp _wcsicmp +# define wcsnicmp _wcsnicmp +# define strlwr _strlwr +#else +# define stricmp strcasecmp +# define strnicmp strncasecmp +# define wcsicmp wcscasecmp +# define wcsnicmp wcsncasecmp +# define strlwr hsStrLower +#endif + +inline char* hsStrcpy(const char src[]) +{ + return hsStrcpy(nil, src); +} + +inline char *hsStrncpy(char *strDest, const char *strSource, size_t count) +{ + char *temp = strncpy(strDest, strSource, count-1); + strDest[count-1] = 0; + return temp; +} + +wchar_t *hsStringToWString( const char *str ); +char *hsWStringToString( const wchar_t *str ); + +enum { // Kind of MessageBox...passed to hsMessageBox + hsMessageBoxAbortRetyIgnore, + hsMessageBoxNormal, // Just Ok + hsMessageBoxOkCancel, + hsMessageBoxRetryCancel, + hsMessageBoxYesNo, + hsMessageBoxYesNoCancel, +}; + +enum { + hsMessageBoxIconError, + hsMessageBoxIconQuestion, + hsMessageBoxIconExclamation, + hsMessageBoxIconAsterisk, +}; + +enum { // RETURN VALUES FROM hsMessageBox + hsMBoxOk = 1, // OK button was selected. + hsMBoxCancel, // Cancel button was selected. + hsMBoxAbort, // Abort button was selected. + hsMBoxRetry, // Retry button was selected. + hsMBoxIgnore, // Ignore button was selected. + hsMBoxYes, // Yes button was selected. + hsMBoxNo // No button was selected. +}; + +extern bool hsMessageBox_SuppressPrompts; +int hsMessageBox(const char message[], const char caption[], int kind, int icon=hsMessageBoxIconAsterisk); +int hsMessageBox(const wchar_t message[], const wchar_t caption[], int kind, int icon=hsMessageBoxIconAsterisk); +int hsMessageBoxWithOwner(hsWindowHndl owner, const char message[], const char caption[], int kind, int icon=hsMessageBoxIconAsterisk); +int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t message[], const wchar_t caption[], int kind, int icon=hsMessageBoxIconAsterisk); + +// flag testing / clearing +#define hsCheckBits(f,c) ((f & c)==c) +#define hsTestBits(f,b) ( (f) & (b) ) +#define hsSetBits(f,b) ( (f) |= (b) ) +#define hsClearBits(f,b) ( (f) &= ~(b) ) +#define hsToggleBits(f,b) ( (f) ^= (b) ) +#define hsChangeBits(f,b,t) ( t ? hsSetBits(f,b) : hsClearBits(f,b) ) + + +#if HS_BUILD_FOR_WIN32 + // This is for Windows +# define hsVsnprintf _vsnprintf +# define hsVsnwprintf _vsnwprintf +# define hsSnprintf _snprintf +# define hsSnwprintf _snwprintf + +# define snprintf _snprintf +# define snwprintf _snwprintf +# define swprintf _snwprintf + +# ifndef fileno +# define fileno(__F) _fileno(__F) +# endif + +# define hsWFopen(name, mode) _wfopen(name, mode) +#else + // This is for Unix, Linux, OSX, etc. +# define hsVsnprintf vsnprintf +# define hsVsnwprintf vswprintf +# define hsSnprintf snprintf +# define hsSnwprintf swprintf + +# define hsWFopen(name, mode) fopen(hsWStringToString(name), hsWStringToString(mode)) + +# include +# define MAX_PATH PATH_MAX +#endif + +// Useful floating point utilities +inline float hsDegreesToRadians(float deg) { return float(deg * (M_PI / 180)); } +inline float hsRadiansToDegrees(float rad) { return float(rad * (180 / M_PI)); } +#define hsInvert(a) (1 / (a)) + +#include +#define NEWZERO(t) new(calloc(sizeof(t), 1)) t + +#ifdef _MSC_VER +# define ALIGN(n) __declspec(align(n)) +#else +# define ALIGN(n) __atribute__(aligned(n)) +#endif + +#define hsFopen(name, mode) fopen(name, mode) + +char** DisplaySystemVersion(); + +/************************ Debug/Error Macros **************************/ + +typedef void (*hsDebugMessageProc)(const char message[]); +extern hsDebugMessageProc gHSDebugProc; +#define HSDebugProc(m) { if (gHSDebugProc) gHSDebugProc(m); } +hsDebugMessageProc hsSetDebugMessageProc(hsDebugMessageProc newProc); + +extern hsDebugMessageProc gHSStatusProc; +hsDebugMessageProc hsSetStatusMessageProc(hsDebugMessageProc newProc); + +void ErrorEnableGui (bool enabled); +void ErrorAssert (int line, const char file[], const char fmt[], ...); + +bool DebugIsDebuggerPresent (); +void DebugBreakIfDebuggerPresent (); +void DebugMsg(const char fmt[], ...); + +#ifdef HS_DEBUGGING + + void hsDebugMessage(const char message[], long refcon); + #define hsDebugCode(code) code + #define hsIfDebugMessage(expr, msg, ref) (void)( ((expr) != 0) || (hsDebugMessage(msg, ref), 0) ) + #define hsAssert(expr, msg) (void)( ((expr) != 0) || (ErrorAssert(__LINE__, __FILE__, msg), 0) ) + #define ASSERT(expr) (void)( ((expr) != 0) || (ErrorAssert(__LINE__, __FILE__, #expr), 0) ) + #define ASSERTMSG(expr, msg) (void)( ((expr) != 0) || (ErrorAssert(__LINE__, __FILE__, msg), 0) ) + #define FATAL(msg) ErrorAssert(__LINE__, __FILE__, msg) + #define DEBUG_MSG DebugMsg + #define DEBUG_BREAK_IF_DEBUGGER_PRESENT DebugBreakIfDebuggerPresent + +#else /* Not debugging */ + + #define hsDebugMessage(message, refcon) NULL_STMT + #define hsDebugCode(code) /* empty */ + #define hsIfDebugMessage(expr, msg, ref) NULL_STMT + #define hsAssert(expr, msg) NULL_STMT + #define ASSERT(expr) NULL_STMT + #define ASSERTMSG(expr, msg) NULL_STMT + #define FATAL(msg) NULL_STMT + #define DEBUG_MSG (void) + #define DEBUG_MSGV NULL_STMT + #define DEBUG_BREAK_IF_DEBUGGER_PRESENT NULL_STMT + +#endif // HS_DEBUGGING + + +#ifdef _MSC_VER +#define DEFAULT_FATAL(var) default: FATAL("No valid case for switch variable '" #var "'"); __assume(0); break; +#else +#define DEFAULT_FATAL(var) default: FATAL("No valid case for switch variable '" #var "'"); break; +#endif + +/***************************************************************************** +* +* Atomic Operations +* +***/ + +// *value += increment; return original value of *value; thread safe +inline long AtomicAdd(long* value, long increment) +{ +#ifdef HS_BUILD_FOR_WIN32 + return InterlockedExchangeAdd(value, increment); +#elif __GNUC__ + return __sync_fetch_and_add(value, increment); +#else +# error "No Atomic Set support on this architecture" +#endif +} + +// *value = value; return original value of *value; thread safe +inline long AtomicSet(long* value, long set) +{ +#ifdef HS_BUILD_FOR_WIN32 + return InterlockedExchange(value, set); +#elif __GNUC__ + return __sync_lock_test_and_set(value, set); +#else +# error "No Atomic Set support on this architecture" +#endif +} #endif diff --git a/Sources/Plasma/CoreLib/hsBiExpander.h b/Sources/Plasma/CoreLib/hsBiExpander.h index 7e07aa65..9bff0100 100644 --- a/Sources/Plasma/CoreLib/hsBiExpander.h +++ b/Sources/Plasma/CoreLib/hsBiExpander.h @@ -53,7 +53,7 @@ template class hsExpander { private: int32_t fNumPost; int32_t fNumPostAlloc; - T* fArray; + T* fArray; int32_t fGrowBy; // default = 0, to double int32_t fMinSize; // default = 1, min == 1 @@ -72,23 +72,23 @@ public: hsExpander& operator=(const hsExpander&orig) { return Copy(orig); } hsExpander& Copy(const hsExpander& orig); - void SetCount(int cnt) { if( cnt >= fNumPostAlloc )IExpand(cnt); fNumPost = cnt; } - int32_t GetCount() const { return fNumPost; } - hsBool Empty() const { return GetCount() == 0; } - const T& Get(int32_t index) const; - int32_t Get(int32_t index, int32_t count, T data[]) const; - int32_t Find(const T&) const; // returns kMissingIndex if not found + void SetCount(int cnt) { if( cnt >= fNumPostAlloc )IExpand(cnt); fNumPost = cnt; } + int32_t GetCount() const { return fNumPost; } + bool Empty() const { return GetCount() == 0; } + const T& Get(int32_t index) const; + int32_t Get(int32_t index, int32_t count, T data[]) const; + int32_t Find(const T&) const; // returns kMissingIndex if not found void SetArray(T* a, int32_t cnt); T* GetArray() { return fArray; } T& operator[]( int32_t index ); - int32_t Append(const T&); // returns t's index + int32_t Append(const T&); // returns t's index T* Append(); - int32_t Push(const T& t) { return Append(t); } + int32_t Push(const T& t) { return Append(t); } T* Push() { return Append(); } T* Top() { return fNumPost ? fArray + fNumPost-1 : nil; } - int32_t Pop(T* t); // returns count of remaining - int32_t Pop(); + int32_t Pop(T* t); // returns count of remaining + int32_t Pop(); void Reset(); // clears out everything T& Head() { return fArray[0]; } @@ -97,7 +97,7 @@ public: void First(); void Last(); void Plus() { ++fCurrent; } - hsBool More() { return (fCurrent < fNumPost); } + bool More() { return (fCurrent < fNumPost); } }; template @@ -261,7 +261,7 @@ private: int32_t fNumPost; int32_t fNumPreAlloc; int32_t fNumPostAlloc; - T* fArray; + T* fArray; int32_t fGrowBy; // default = 0, to double int32_t fMinSize; // default = 1, min == 1 @@ -271,7 +271,7 @@ private: hsBiExpander& operator=(const hsBiExpander&); // don't allow assignment hsBiExpander(const hsBiExpander&); // make it passed as ref or pointer - void IExpand(int newSize, hsBool towardEnd = true); + void IExpand(int newSize, bool towardEnd = true); public: enum { kMissingIndex = -1 }; @@ -280,22 +280,22 @@ public: int32_t GetFirst() const { return -fNumPre; } int32_t GetCount() const { return fNumPre + fNumPost; } - hsBool Empty() const { return GetCount() == 0; } - const T& Get(int32_t index) const; + bool Empty() const { return GetCount() == 0; } + const T& Get(int32_t index) const; int32_t Get(int32_t index, int32_t count, T data[]) const; int32_t Find(const T&) const; // returns kMissingIndex if not found - void SetArray(T* a, int32_t cnt, int32_t numPre=0); - T** GetArray() { return fArray - fNumPre; } - T& operator[]( int32_t index ); - T* Append(); // returns t's index - T* Push(); // returns t's index + void SetArray(T* a, int32_t cnt, int32_t numPre=0); + T** GetArray() { return fArray - fNumPre; } + T& operator[]( int32_t index ); + T* Append(); // returns t's index + T* Push(); // returns t's index int32_t Append(const T&); // returns t's index int32_t Push(const T&); // returns t's index int32_t Pop(T*t = nil) { return PopHead(t); } // returns count of remaining int32_t PopHead(T*t = nil); // returns count of remaining int32_t PopTail(T*t = nil); // returns count of remaining - void Reset(); // clears out everything + void Reset(); // clears out everything T& Head() { return fArray[-fNumPre]; } T& Tail() { return fArray[fNumPost-1]; } @@ -304,7 +304,7 @@ public: void Last(); void Plus() { ++fCurrent; } void Minus() { --fCurrent; } - hsBool More() { return (fCurrent < fNumPost)&&(fCurrent >= -fNumPre); } + bool More() { return (fCurrent < fNumPost)&&(fCurrent >= -fNumPre); } }; template @@ -321,7 +321,7 @@ void hsBiExpander::SetArray(T* a, int32_t cnt, int32_t numPre) } template -void hsBiExpander::IExpand(int newSize, hsBool towardEnd) +void hsBiExpander::IExpand(int newSize, bool towardEnd) { int32_t newPreAlloc = fNumPreAlloc; int32_t newPostAlloc = fNumPostAlloc; diff --git a/Sources/Plasma/CoreLib/hsBitVector.h b/Sources/Plasma/CoreLib/hsBitVector.h index bd2fe865..10c7418f 100644 --- a/Sources/Plasma/CoreLib/hsBitVector.h +++ b/Sources/Plasma/CoreLib/hsBitVector.h @@ -69,21 +69,21 @@ public: hsBitVector& Clear(); // everyone clear, but no dealloc hsBitVector& Set(int upToBit=-1); // WARNING - see comments at function - int operator==(const hsBitVector& other) const; // unset (ie uninitialized) bits are clear, - int operator!=(const hsBitVector& other) const { return !(*this == other); } + bool operator==(const hsBitVector& other) const; // unset (ie uninitialized) bits are clear, + bool operator!=(const hsBitVector& other) const { return !(*this == other); } hsBitVector& operator=(const hsBitVector& other); // will wind up identical - hsBool ClearBit(uint32_t which) { return SetBit(which, 0); } // returns previous state - hsBool SetBit(uint32_t which, hsBool on = true); // returns previous state - hsBool IsBitSet(uint32_t which) const; // returns current state - hsBool ToggleBit(uint32_t which); // returns previous state + bool ClearBit(uint32_t which) { return SetBit(which, 0); } // returns previous state + bool SetBit(uint32_t which, bool on = true); // returns previous state + bool IsBitSet(uint32_t which) const; // returns current state + bool ToggleBit(uint32_t which); // returns previous state hsBitVector& RemoveBit(uint32_t which); // removes bit, sliding higher bits down to fill the gap. friend inline int Overlap(const hsBitVector& lhs, const hsBitVector& rhs) { return lhs.Overlap(rhs); } - hsBool Overlap(const hsBitVector& other) const; - hsBool Empty() const; + bool Overlap(const hsBitVector& other) const; + bool Empty() const; - hsBool operator[](uint32_t which) const { return IsBitSet(which); } + bool operator[](uint32_t which) const { return IsBitSet(which); } friend inline hsBitVector operator&(const hsBitVector& lhs, const hsBitVector& rhs); // See Overlap() friend inline hsBitVector operator|(const hsBitVector& lhs, const hsBitVector& rhs); @@ -127,7 +127,7 @@ inline hsBitVector::hsBitVector(const hsBitVector& other) fBitVectors = nil; } -inline hsBool hsBitVector::Empty() const +inline bool hsBitVector::Empty() const { int i; for( i = 0; i < fNumBitVectors; i++ ) @@ -138,7 +138,7 @@ inline hsBool hsBitVector::Empty() const return true; } -inline hsBool hsBitVector::Overlap(const hsBitVector& other) const +inline bool hsBitVector::Overlap(const hsBitVector& other) const { if( fNumBitVectors > other.fNumBitVectors ) return other.Overlap(*this); @@ -174,7 +174,7 @@ inline hsBitVector& hsBitVector::operator=(const hsBitVector& other) return *this; } -inline int hsBitVector::operator==(const hsBitVector& other) const +inline bool hsBitVector::operator==(const hsBitVector& other) const { if( fNumBitVectors < other.fNumBitVectors ) return other.operator==(*this); @@ -315,7 +315,7 @@ inline hsBitVector& hsBitVector::Set(int upToBit) return *this; } -inline hsBool hsBitVector::IsBitSet(uint32_t which) const +inline bool hsBitVector::IsBitSet(uint32_t which) const { uint32_t major = which >> 5; return @@ -323,13 +323,13 @@ inline hsBool hsBitVector::IsBitSet(uint32_t which) const && (0 != (fBitVectors[major] & 1 << (which & 0x1f))); } -inline hsBool hsBitVector::SetBit(uint32_t which, hsBool on) +inline bool hsBitVector::SetBit(uint32_t which, bool on) { uint32_t major = which >> 5; uint32_t minor = 1 << (which & 0x1f); if( major >= fNumBitVectors ) IGrow(major+1); - hsBool ret = 0 != (fBitVectors[major] & minor); + bool ret = 0 != (fBitVectors[major] & minor); if( ret != on ) { if( on ) @@ -341,13 +341,13 @@ inline hsBool hsBitVector::SetBit(uint32_t which, hsBool on) return ret; } -inline hsBool hsBitVector::ToggleBit(uint32_t which) +inline bool hsBitVector::ToggleBit(uint32_t which) { uint32_t major = which >> 5; uint32_t minor = 1 << (which & 0x1f); if( major >= fNumBitVectors ) IGrow(major); - hsBool ret = 0 != (fBitVectors[major] & minor); + bool ret = 0 != (fBitVectors[major] & minor); if( ret ) fBitVectors[major] &= ~minor; else diff --git a/Sources/Plasma/CoreLib/hsBounds.cpp b/Sources/Plasma/CoreLib/hsBounds.cpp index ad7c9124..3f8bc42c 100644 --- a/Sources/Plasma/CoreLib/hsBounds.cpp +++ b/Sources/Plasma/CoreLib/hsBounds.cpp @@ -249,7 +249,7 @@ int32_t hsBounds3::TestBound(const hsBounds3& other) const return retVal; } -hsBool hsBounds3::IsInside(const hsPoint3* pos) const +bool hsBounds3::IsInside(const hsPoint3* pos) const { hsAssert(fType != kBoundsUninitialized, "Invalid bounds type for hsBounds3::IsInside() "); if(fType == kBoundsEmpty) @@ -471,7 +471,7 @@ float hsBounds3::ClosestPointToInfiniteLine(const hsPoint3* p, const hsVector3* return t; } -hsBool hsBounds3::ClosestPoint(const hsPoint3& p, hsPoint3& inner, hsPoint3& outer) const +bool hsBounds3::ClosestPoint(const hsPoint3& p, hsPoint3& inner, hsPoint3& outer) const { // Look for axis intervals p is within int nSect = 0; @@ -532,7 +532,7 @@ void hsBoundsOriented::TestPlane(const hsVector3 &n, hsPoint2 &depth) const // // Return true if inside all the planes // -hsBool hsBoundsOriented::IsInside(const hsPoint3* pos) const +bool hsBoundsOriented::IsInside(const hsPoint3* pos) const { hsAssert(fType == kBoundsNormal, "Invalid bounds type for hsBounds3::IsInside() "); if(fType == kBoundsEmpty) @@ -629,7 +629,7 @@ void hsBoundsOriented::Read(hsStream *stream) { hsBounds::Read(stream); fCenter.Read(stream); - fCenterValid = (hsBool)stream->ReadLE32(); + fCenterValid = (bool)stream->ReadLE32(); fNumPlanes = stream->ReadLE32(); if (fPlanes) delete [] fPlanes; @@ -1009,7 +1009,7 @@ void hsBounds3Ext::Translate(const hsVector3 &v) } } -hsBool hsBounds3Ext::IsInside(const hsPoint3 *p) const +bool hsBounds3Ext::IsInside(const hsPoint3 *p) const { if( fExtFlags & kAxisAligned ) return hsBounds3::IsInside(p); @@ -1192,9 +1192,9 @@ int32_t hsBounds3Ext::TestPoints(int n, const hsPoint3 *pList, const hsVector3 & for( i = 0; i < 3; i++ ) { float diff = fAxes[i].InnerProduct(ptVel); - hsBool someLow = false; - hsBool someHi = false; - hsBool someIn = false; + bool someLow = false; + bool someHi = false; + bool someIn = false; int j; for( j = 0; j < n; j++ ) { @@ -1230,8 +1230,8 @@ int32_t hsBounds3Ext::TestPoints(int n, const hsPoint3 *pList, const hsVector3 & int32_t hsBounds3Ext::TestPoints(int n, const hsPoint3 *pList) const { - hsBool someIn = false; - hsBool someOut = false; + bool someIn = false; + bool someOut = false; int i; for( i = 0; i < n; i++ ) { @@ -1247,7 +1247,7 @@ int32_t hsBounds3Ext::TestPoints(int n, const hsPoint3 *pList) const return 1; } -hsBool hsBounds3Ext::ClosestPoint(const hsPoint3& p, hsPoint3& inner, hsPoint3& outer) const +bool hsBounds3Ext::ClosestPoint(const hsPoint3& p, hsPoint3& inner, hsPoint3& outer) const { if( fExtFlags & kAxisAligned ) return hsBounds3::ClosestPoint(p, inner, outer); @@ -1282,7 +1282,7 @@ hsBool hsBounds3Ext::ClosestPoint(const hsPoint3& p, hsPoint3& inner, hsPoint3& return nSect == 3; } -hsBool hsBounds3Ext::ISectBB(const hsBounds3Ext &other, const hsVector3 &myVel) const +bool hsBounds3Ext::ISectBB(const hsBounds3Ext &other, const hsVector3 &myVel) const { if( fExtFlags & kAxisAligned ) { @@ -1356,7 +1356,7 @@ hsBool hsBounds3Ext::ISectBB(const hsBounds3Ext &other, const hsVector3 &myVel) } -static hsBool ISectInterval(const hsPoint2& other, const hsPoint2& mine) +static bool ISectInterval(const hsPoint2& other, const hsPoint2& mine) { if( other.fY - mine.fX <= 0 ) return false; @@ -1366,7 +1366,7 @@ static hsBool ISectInterval(const hsPoint2& other, const hsPoint2& mine) return true; } -static hsBool ITestDepth(const hsPoint2& other, const hsPoint2& mine, +static bool ITestDepth(const hsPoint2& other, const hsPoint2& mine, const hsVector3& inAx, hsVector3 &outAx, float& depth) { @@ -1475,7 +1475,7 @@ void hsBounds3Ext::Unalign() fAxes[2].Set(0, 0, span); } -hsBool hsBounds3Ext::ISectBB(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const +bool hsBounds3Ext::ISectBB(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const { if( fExtFlags & kAxisAligned ) { @@ -1640,7 +1640,7 @@ hsBool hsBounds3Ext::ISectBB(const hsBounds3Ext &other, const hsVector3 &myVel, return true; } -hsBool hsBounds3Ext::ISectABB(const hsBounds3Ext &other, const hsVector3 &myVel) const +bool hsBounds3Ext::ISectABB(const hsBounds3Ext &other, const hsVector3 &myVel) const { hsPoint3 effMaxs = fMaxs; hsPoint3 effMins = fMins; @@ -1662,7 +1662,7 @@ hsBool hsBounds3Ext::ISectABB(const hsBounds3Ext &other, const hsVector3 &myVel) return true; } -hsBool hsBounds3Ext::ISectBS(const hsBounds3Ext &other, const hsVector3 &myVel) const +bool hsBounds3Ext::ISectBS(const hsBounds3Ext &other, const hsVector3 &myVel) const { if( !(fExtFlags & kSphereSet) ) IMakeSphere(); @@ -1691,7 +1691,7 @@ hsBool hsBounds3Ext::ISectBS(const hsBounds3Ext &other, const hsVector3 &myVel) } #if 0 // Commenting out this which will be made redundant and/or obsolete by Havok integration -hsBool hsBounds3Ext::ISectTriABB(hsBounds3Tri &tri, const hsVector3 &myVel) const +bool hsBounds3Ext::ISectTriABB(hsBounds3Tri &tri, const hsVector3 &myVel) const { int i; for( i = 0; i < 3; i++ ) @@ -1719,13 +1719,13 @@ hsBool hsBounds3Ext::ISectTriABB(hsBounds3Tri &tri, const hsVector3 &myVel) cons return true; } -hsBool hsBounds3Ext::TriBSHitInfo(hsBounds3Tri& tri, const hsVector3& myVel, hsHitInfoExt* hit) const +bool hsBounds3Ext::TriBSHitInfo(hsBounds3Tri& tri, const hsVector3& myVel, hsHitInfoExt* hit) const { hsPoint3 myPt = GetCenter(); myPt += myVel; hsPoint3 closePt; - hsBool onTri = tri.ClosestTriPoint(&myPt, &closePt); + bool onTri = tri.ClosestTriPoint(&myPt, &closePt); hsVector3 repel; repel.Set(&myPt, &closePt); @@ -1761,7 +1761,7 @@ hsBool hsBounds3Ext::TriBSHitInfo(hsBounds3Tri& tri, const hsVector3& myVel, hsH } #if 0 // TOCENTER -hsBool hsBounds3Ext::TriBBHitInfo(hsBounds3Tri& tri, const hsVector3& myVel, hsHitInfoExt* hit) const +bool hsBounds3Ext::TriBBHitInfo(hsBounds3Tri& tri, const hsVector3& myVel, hsHitInfoExt* hit) const { // Find our closest point (after movement) hsPoint3 myPt = fCorner; @@ -1789,7 +1789,7 @@ hsBool hsBounds3Ext::TriBBHitInfo(hsBounds3Tri& tri, const hsVector3& myVel, hsH // Find closest point on tri to our closest corner hsPoint3 closePt; - hsBool onTri = tri.ClosestTriPoint(&myPt, &closePt); + bool onTri = tri.ClosestTriPoint(&myPt, &closePt); // Repel vector is from closest corner to closest point on tri hsVector3 repel; @@ -1816,13 +1816,13 @@ hsBool hsBounds3Ext::TriBBHitInfo(hsBounds3Tri& tri, const hsVector3& myVel, hsH } #else // TOCENTER -hsBool hsBounds3Ext::TriBBHitInfo(hsBounds3Tri& tri, const hsVector3& myVel, hsHitInfoExt* hit) const +bool hsBounds3Ext::TriBBHitInfo(hsBounds3Tri& tri, const hsVector3& myVel, hsHitInfoExt* hit) const { hsPoint3 myPt = GetCenter(); myPt += myVel; hsPoint3 closePt; - hsBool onTri = tri.ClosestTriPoint(&myPt, &closePt); + bool onTri = tri.ClosestTriPoint(&myPt, &closePt); hsVector3 repel; repel.Set(&myPt, &closePt); @@ -1855,7 +1855,7 @@ hsBool hsBounds3Ext::TriBBHitInfo(hsBounds3Tri& tri, const hsVector3& myVel, hsH #endif // TOCENTER -hsBool hsBounds3Ext::ISectTriBB(hsBounds3Tri &tri, const hsVector3 &myVel) const +bool hsBounds3Ext::ISectTriBB(hsBounds3Tri &tri, const hsVector3 &myVel) const { hsPoint2 faceDepth; // first test box against the triangle plane @@ -1904,7 +1904,7 @@ hsBool hsBounds3Ext::ISectTriBB(hsBounds3Tri &tri, const hsVector3 &myVel) const return true; } -hsBool hsBounds3Ext::ISectTriBB(hsBounds3Tri &tri, const hsVector3 &myVel, hsHitInfoExt *hit) const +bool hsBounds3Ext::ISectTriBB(hsBounds3Tri &tri, const hsVector3 &myVel, hsHitInfoExt *hit) const { hsPoint2 faceDepth; // first test box against the triangle plane @@ -1972,7 +1972,7 @@ hsBool hsBounds3Ext::ISectTriBB(hsBounds3Tri &tri, const hsVector3 &myVel, hsHit return hit->fDepth > hsBounds::kRealSmall; } -hsBool hsBounds3Ext::ISectTriBS(hsBounds3Tri &tri, const hsVector3 &myVel) const +bool hsBounds3Ext::ISectTriBS(hsBounds3Tri &tri, const hsVector3 &myVel) const { if( !(fExtFlags & kSphereSet) ) IMakeSphere(); @@ -2047,7 +2047,7 @@ hsBool hsBounds3Ext::ISectTriBS(hsBounds3Tri &tri, const hsVector3 &myVel) const return true; } -hsBool hsBounds3Ext::ISectTriBS(hsBounds3Tri &tri, const hsVector3 &myVel, hsHitInfoExt *hit) const +bool hsBounds3Ext::ISectTriBS(hsBounds3Tri &tri, const hsVector3 &myVel, hsHitInfoExt *hit) const { if( !(fExtFlags & kSphereSet) ) IMakeSphere(); @@ -2142,7 +2142,7 @@ hsBool hsBounds3Ext::ISectTriBS(hsBounds3Tri &tri, const hsVector3 &myVel, hsHit #endif // Commenting out this which will be made redundant and/or obsolete by Havok integration -hsBool hsBounds3Ext::ISectBSBS(const hsBounds3Ext& other, const hsVector3& myVel, hsHitInfoExt *hit) const +bool hsBounds3Ext::ISectBSBS(const hsBounds3Ext& other, const hsVector3& myVel, hsHitInfoExt *hit) const { if(!(fExtFlags & kSphereSet) ) IMakeSphere(); @@ -2177,7 +2177,7 @@ hsBool hsBounds3Ext::ISectBSBS(const hsBounds3Ext& other, const hsVector3& myVel return true; } -hsBool hsBounds3Ext::ISectBSBox(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const +bool hsBounds3Ext::ISectBSBox(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const { hit->fDelPos = -myVel; if( other.ISectBoxBS(*this, hit->fDelPos, hit) ) @@ -2194,7 +2194,7 @@ hsBool hsBounds3Ext::ISectBSBox(const hsBounds3Ext &other, const hsVector3 &myVe return false; } -hsBool hsBounds3Ext::ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const +bool hsBounds3Ext::ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const { if(!(fExtFlags & kSphereSet) ) IMakeSphere(); @@ -2202,13 +2202,13 @@ hsBool hsBounds3Ext::ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVe hsVector3 minAxis; float minDepth; - hsBool haveAxis = false; + bool haveAxis = false; hsVector3 tstAxis; float tstDepth; int i; for( i = 0; i < 3; i++ ) { - hsBool tryAxis; + bool tryAxis; if( other.fExtFlags & kAxisAligned ) { // first try the other box axes @@ -2346,7 +2346,7 @@ hsBool hsBounds3Ext::ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVe return true; } -hsBool hsBounds3Ext::ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVel) const +bool hsBounds3Ext::ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVel) const { if( !(fExtFlags & kSphereSet) ) IMakeSphere(); @@ -2423,7 +2423,7 @@ hsBool hsBounds3Ext::ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVe return true; } -hsBool hsBounds3Ext::ISectLine(const hsPoint3* from, const hsPoint3* at) const +bool hsBounds3Ext::ISectLine(const hsPoint3* from, const hsPoint3* at) const { if( !(fExtFlags & kSphereSet) ) IMakeSphere(); @@ -2475,7 +2475,7 @@ hsBool hsBounds3Ext::ISectLine(const hsPoint3* from, const hsPoint3* at) const return true; } -hsBool hsBounds3Ext::ISectCone(const hsPoint3* from, const hsPoint3* at, float radius) const +bool hsBounds3Ext::ISectCone(const hsPoint3* from, const hsPoint3* at, float radius) const { if( !(fExtFlags & kSphereSet) ) IMakeSphere(); @@ -2553,7 +2553,7 @@ hsBool hsBounds3Ext::ISectCone(const hsPoint3* from, const hsPoint3* at, float r } -hsBool hsBounds3Ext::ISectRayBS(const hsPoint3& from, const hsPoint3& to, hsPoint3& at) const +bool hsBounds3Ext::ISectRayBS(const hsPoint3& from, const hsPoint3& to, hsPoint3& at) const { hsVector3 c2f(&from,&GetCenter()); hsVector3 f2t(&to,&from); @@ -2660,7 +2660,7 @@ void hsBounds3Tri::TestPlane(const hsVector3 &n, hsPoint2 &depth) const depth.fX = d1; } } -hsBool hsBounds3Tri::ClosestTriPoint(const hsPoint3 *p, hsPoint3 *out, const hsVector3 *ax) const +bool hsBounds3Tri::ClosestTriPoint(const hsPoint3 *p, hsPoint3 *out, const hsVector3 *ax) const { // project point onto tri plane hsPoint3 pPln; @@ -2702,7 +2702,7 @@ hsBool hsBounds3Tri::ClosestTriPoint(const hsPoint3 *p, hsPoint3 *out, const hsV for( i = 0; i < 3; i++ ) { float tst = fPerpAxes[i].InnerProduct(pPln); - hsBool in = false; + bool in = false; if( fOnIsMax & (1 << i) ) { if( tst <= fPerpDists[i].fY ) @@ -2781,7 +2781,7 @@ hsBool hsBounds3Tri::ClosestTriPoint(const hsPoint3 *p, hsPoint3 *out, const hsV hsAssert( vDis - dis > -hsBounds::kRealSmall, "Bad closest point"); vDis = hsVector3(&pPln, fVerts+2).MagnitudeSquared(); hsAssert( vDis - dis > -hsBounds::kRealSmall, "Bad closest point"); - hsBool dork = false; + bool dork = false; if( dork ) { float zn[3]; @@ -2977,7 +2977,7 @@ hsBounds3Tri::~hsBounds3Tri() // Finds closest intersection vertex or triangle/center-line intersection -hsBool hsBounds3Tri::ISectCone(const hsPoint3& from, const hsPoint3& to, float cosThetaSq, hsBool ignoreFacing, hsPoint3& at, hsBool& backSide) const +bool hsBounds3Tri::ISectCone(const hsPoint3& from, const hsPoint3& to, float cosThetaSq, bool ignoreFacing, hsPoint3& at, bool& backSide) const { float d0 = from.InnerProduct(fNormal); float d1 = at.InnerProduct(fNormal); @@ -2996,7 +2996,7 @@ hsBool hsBounds3Tri::ISectCone(const hsPoint3& from, const hsPoint3& to, float c float minDistSq = 0; int32_t minVert = 0; - hsBool sect = false; + bool sect = false; for (int32_t i=0; i<3; i++) { hsPoint3 onLine; diff --git a/Sources/Plasma/CoreLib/hsBounds.h b/Sources/Plasma/CoreLib/hsBounds.h index d582f970..82e91efd 100644 --- a/Sources/Plasma/CoreLib/hsBounds.h +++ b/Sources/Plasma/CoreLib/hsBounds.h @@ -81,7 +81,7 @@ public: // virtual void Reset(const hsBounds3*) = 0; - virtual hsBool IsInside(const hsPoint3* pos) const =0; // Only valid for kBounds Normal + virtual bool IsInside(const hsPoint3* pos) const =0; // Only valid for kBounds Normal virtual void Read(hsStream*); virtual void Write(hsStream*); @@ -132,10 +132,10 @@ public: const hsPoint3& GetMaxs() const; float GetMaxDim() const; // Computes the answer const hsPoint3& GetCenter() const; // Computes the answer if not already there - virtual hsBool IsInside(const hsPoint3* pos) const; // ok for full/empty + virtual bool IsInside(const hsPoint3* pos) const; // ok for full/empty virtual void TestPlane(const hsVector3 &n, hsPoint2 &depth) const; virtual void TestPlane(const hsPlane3 *p, hsPoint2 &depth) const; - virtual hsBool ClosestPoint(const hsPoint3& p, hsPoint3& inner, hsPoint3& outer) const; + virtual bool ClosestPoint(const hsPoint3& p, hsPoint3& inner, hsPoint3& outer) const; // Test according to my axes only, doesn't check other's axes // neg, pos, zero == disjoint, I contain other, overlap @@ -195,10 +195,10 @@ inline float hsBounds3::GetMaxDim() const class hsBoundsOriented : public hsBounds { private: - hsBool fCenterValid; + bool fCenterValid; hsPoint3 fCenter; hsPlane3 *fPlanes; - uint32_t fNumPlanes; + uint32_t fNumPlanes; public: hsBoundsOriented() : fPlanes(nil),fNumPlanes(0),fCenterValid(false) {} virtual ~hsBoundsOriented() { if (fPlanes) delete [] fPlanes; } @@ -223,7 +223,7 @@ public: // // Only valid for kBounds Normal // - virtual hsBool IsInside(const hsPoint3* pos) const; + virtual bool IsInside(const hsPoint3* pos) const; virtual void TestPlane(const hsVector3 &n, hsPoint2 &depth) const; // Complain and refuse virtual void Write(hsStream *stream); @@ -247,7 +247,7 @@ protected: mutable hsPoint2 fDists[3]; mutable float fRadius; - hsBool IAxisIsZero(uint32_t i) const { return (fExtFlags & (1 << (20+i))) != 0; }; + bool IAxisIsZero(uint32_t i) const { return (fExtFlags & (1 << (20+i))) != 0; }; void IMakeSphere() const; void IMakeDists() const; void IMakeMinsMaxs(); @@ -280,9 +280,9 @@ public: virtual void GetAxes(hsVector3 *fAxis0, hsVector3 *fAxis1, hsVector3 *fAxis2) const; virtual hsPoint3 *GetCorner(hsPoint3 *c) const { *c = (fExtFlags & kAxisAligned ? fMins : fCorner); return c; } virtual void GetCorners(hsPoint3 *b) const; - virtual hsBool ClosestPoint(const hsPoint3& p, hsPoint3& inner, hsPoint3& outer) const; + virtual bool ClosestPoint(const hsPoint3& p, hsPoint3& inner, hsPoint3& outer) const; - virtual hsBool IsInside(const hsPoint3* pos) const; // ok for full/empty + virtual bool IsInside(const hsPoint3* pos) const; // ok for full/empty virtual void TestPlane(const hsVector3 &n, hsPoint2 &depth) const; virtual int32_t TestPoints(int n, const hsPoint3 *pList) const; // pos,neg,zero == allout, allin, cut @@ -294,21 +294,21 @@ public: virtual void TestPlane(const hsVector3 &n, const hsVector3 &myVel, hsPoint2 &depth) const; virtual void TestPlane(const hsPlane3 *p, const hsVector3 &myVel, hsPoint2 &depth) const; virtual int32_t TestPoints(int n, const hsPoint3 *pList, const hsVector3 &ptVel) const; // pos,neg,zero == allout, allin, cut - virtual hsBool ISectBB(const hsBounds3Ext &other, const hsVector3 &myVel) const; - virtual hsBool ISectBB(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const; - virtual hsBool ISectABB(const hsBounds3Ext &other, const hsVector3 &myVel) const; - virtual hsBool ISectBS(const hsBounds3Ext &other, const hsVector3 &myVel) const; + virtual bool ISectBB(const hsBounds3Ext &other, const hsVector3 &myVel) const; + virtual bool ISectBB(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const; + virtual bool ISectABB(const hsBounds3Ext &other, const hsVector3 &myVel) const; + virtual bool ISectBS(const hsBounds3Ext &other, const hsVector3 &myVel) const; virtual int32_t IClosestISect(const hsBounds3Ext& other, const hsVector3& myVel, float* tClose, float* tImpact) const; - virtual hsBool ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const; - virtual hsBool ISectBSBox(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const; - virtual hsBool ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVel) const; - virtual hsBool ISectBSBS(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const; - - virtual hsBool ISectLine(const hsPoint3* from, const hsPoint3* to) const; - virtual hsBool ISectCone(const hsPoint3* from, const hsPoint3* to, float radius) const; - virtual hsBool ISectRayBS(const hsPoint3& from, const hsPoint3& to, hsPoint3& at) const; + virtual bool ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const; + virtual bool ISectBSBox(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const; + virtual bool ISectBoxBS(const hsBounds3Ext &other, const hsVector3 &myVel) const; + virtual bool ISectBSBS(const hsBounds3Ext &other, const hsVector3 &myVel, hsHitInfoExt *hit) const; + + virtual bool ISectLine(const hsPoint3* from, const hsPoint3* to) const; + virtual bool ISectCone(const hsPoint3* from, const hsPoint3* to, float radius) const; + virtual bool ISectRayBS(const hsPoint3& from, const hsPoint3& to, hsPoint3& at) const; virtual void Read(hsStream *s); virtual void Write(hsStream *s); diff --git a/Sources/Plasma/CoreLib/hsColorRGBA.h b/Sources/Plasma/CoreLib/hsColorRGBA.h index a0c06a65..21010db3 100644 --- a/Sources/Plasma/CoreLib/hsColorRGBA.h +++ b/Sources/Plasma/CoreLib/hsColorRGBA.h @@ -45,6 +45,39 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsStream.h" +struct hsColor32 { + + uint8_t b, g, r, a; + + inline void SetARGB(uint8_t aa, uint8_t rr, uint8_t gg, uint8_t bb) + { + this->a = aa; + this->r = rr; + this->g = gg; + this->b = bb; + } + + // Compatibility inlines, should be depricated + inline void Set(uint8_t rr, uint8_t gg, uint8_t bb) + { + this->r = rr; + this->g = gg; + this->b = bb; + } + inline void Set(uint8_t aa, uint8_t rr, uint8_t gg, uint8_t bb) + { + this->SetARGB(aa, rr, gg, bb); + } + + int operator==(const hsColor32& aa) const + { + return *(uint32_t*)&aa == *(uint32_t*)this; + } + int operator!=(const hsColor32& aa) { return !(aa == *this); } +}; +hsCTypeDefStruct(hsColor32) +typedef hsColor32 hsRGBAColor32; + struct hsColorRGBA { float r,g,b,a; @@ -52,8 +85,8 @@ struct hsColorRGBA { hsColorRGBA& Set(float red, float grn, float blu, float alp) { r = red; g = grn; b = blu; a = alp; return *this; } - hsBool operator==(const hsColorRGBA&c) const { return (r==c.r)&&(g==c.g)&&(b==c.b)&&(a==c.a); } - hsBool operator!=(const hsColorRGBA&c) const { return !(c == *this); } + bool operator==(const hsColorRGBA&c) const { return (r==c.r)&&(g==c.g)&&(b==c.b)&&(a==c.a); } + bool operator!=(const hsColorRGBA&c) const { return !(c == *this); } friend inline hsColorRGBA operator+(const hsColorRGBA& s, const hsColorRGBA& t); hsColorRGBA& operator+=(const hsColorRGBA& s); @@ -179,7 +212,7 @@ public: }; hsColorRGBA fShade; hsColorRGBA fColor; - hsBool fFlags; + unsigned int fFlags; }; diff --git a/Sources/Plasma/CoreLib/hsExceptions.h b/Sources/Plasma/CoreLib/hsExceptions.h index 1cf3dd33..09697e37 100644 --- a/Sources/Plasma/CoreLib/hsExceptions.h +++ b/Sources/Plasma/CoreLib/hsExceptions.h @@ -111,7 +111,7 @@ inline void hsThrowIfNilParam(const void* p) } } -inline void hsThrowIfBadParam(hsBool trueIfBadParam) +inline void hsThrowIfBadParam(bool trueIfBadParam) { if (trueIfBadParam) { @@ -129,7 +129,7 @@ inline void hsThrowIfOSErr(long osErr) } } -inline void hsThrowIfTrue(hsBool condition) +inline void hsThrowIfTrue(bool condition) { if (condition) { @@ -138,7 +138,7 @@ inline void hsThrowIfTrue(hsBool condition) } } -inline void hsThrowIfFalse(hsBool condition) +inline void hsThrowIfFalse(bool condition) { if (condition == false) { @@ -147,7 +147,7 @@ inline void hsThrowIfFalse(hsBool condition) } } -inline void hsThrowIfTrue(hsBool condition, const char message[]) +inline void hsThrowIfTrue(bool condition, const char message[]) { if (condition) { @@ -156,7 +156,7 @@ inline void hsThrowIfTrue(hsBool condition, const char message[]) } } -inline void hsThrowIfFalse(hsBool condition, const char message[]) +inline void hsThrowIfFalse(bool condition, const char message[]) { if (condition == false) { @@ -176,7 +176,7 @@ inline void hsThrowIfNilParam(const void* p) hsAssert(p!=nil,"hsThrowIfNilParam"); } -inline void hsThrowIfBadParam(hsBool trueIfBadParam) +inline void hsThrowIfBadParam(bool trueIfBadParam) { hsAssert(!trueIfBadParam,"hsThrowIfBadParam"); } @@ -186,22 +186,22 @@ inline void hsThrowIfOSErr(long osErr) hsAssert(osErr==0,"hsThrowIfOSErr"); } -inline void hsThrowIfTrue(hsBool condition) +inline void hsThrowIfTrue(bool condition) { hsAssert(!condition,"hsThrowIfTrue"); } -inline void hsThrowIfFalse(hsBool condition) +inline void hsThrowIfFalse(bool condition) { hsAssert(condition,"hsThrowIfFalse"); } -inline void hsThrowIfTrue(hsBool condition, const char message[]) +inline void hsThrowIfTrue(bool condition, const char message[]) { hsAssert(!condition,message); } -inline void hsThrowIfFalse(hsBool condition, const char message[]) +inline void hsThrowIfFalse(bool condition, const char message[]) { hsAssert(condition,message); } diff --git a/Sources/Plasma/CoreLib/hsFastMath.cpp b/Sources/Plasma/CoreLib/hsFastMath.cpp index 969d4037..fee12798 100644 --- a/Sources/Plasma/CoreLib/hsFastMath.cpp +++ b/Sources/Plasma/CoreLib/hsFastMath.cpp @@ -604,10 +604,10 @@ float hsFastMath::IATan2OverTwoPi(float y, float x) if( (x == 0)&&(y == 0) ) return 0; - hsBool xNeg, yNeg; + bool xNeg, yNeg; if((yNeg = (y < 0)))y = -y; if((xNeg = (x < 0)))x = -x; - hsBool yBigger = y >= x; + bool yBigger = y >= x; float div = yBigger ? x / y : y / x; float fInd = div * tabMax; diff --git a/Sources/Plasma/CoreLib/hsGeometry3.h b/Sources/Plasma/CoreLib/hsGeometry3.h index acef0a8e..ae936949 100644 --- a/Sources/Plasma/CoreLib/hsGeometry3.h +++ b/Sources/Plasma/CoreLib/hsGeometry3.h @@ -104,7 +104,7 @@ public: float Magnitude() const; float MagnitudeSquared() const { return (fX * fX + fY * fY + fZ * fZ); } - hsBool IsEmpty() const { return fX == 0 && fY == 0 && fZ == 0; } + bool IsEmpty() const { return fX == 0 && fY == 0 && fZ == 0; } float operator[](int i) const; float& operator[](int i); @@ -166,11 +166,11 @@ struct hsPoint3 : public hsScalarTriple { friend inline hsPoint3 operator*(const float& s, const hsPoint3& t); friend inline hsPoint3 operator*(const hsPoint3& t, const float& s); friend inline hsPoint3 operator/(const hsPoint3& t, const float& s); - hsBool operator==(const hsPoint3& ss) const + bool operator==(const hsPoint3& ss) const { return (ss.fX == fX && ss.fY == fY && ss.fZ == fZ); } - hsBool operator!=(const hsPoint3& ss) const { return !(*this == ss); } + bool operator!=(const hsPoint3& ss) const { return !(*this == ss); } hsPoint3 &operator+=(const hsScalarTriple &s) { fX += s.fX; fY += s.fY; fZ += s.fZ; return *this; } hsPoint3 &operator*=(const float s) { fX *= s; fY *= s; fZ *= s; return *this; } }; @@ -226,17 +226,11 @@ struct hsVector3 : public hsScalarTriple { friend inline hsVector3 operator/(const hsVector3& t, const float& s); friend inline float operator*(const hsVector3& t, const hsVector3& s); friend hsVector3 operator%(const hsVector3& t, const hsVector3& s); -#if 0 // Havok reeks - friend hsBool32 operator==(const hsVector3& s, const hsVector3& t) - { - return (s.fX == t.fX && s.fY == t.fY && s.fZ == t.fZ); - } -#else // Havok reeks - hsBool operator==(const hsVector3& ss) const + bool operator==(const hsVector3& ss) const { return (ss.fX == fX && ss.fY == fY && ss.fZ == fZ); } -#endif // Havok reeks + hsVector3 &operator+=(const hsScalarTriple &s) { fX += s.fX; fY += s.fY; fZ += s.fZ; return *this; } hsVector3 &operator-=(const hsScalarTriple &s) { fX -= s.fX; fY -= s.fY; fZ -= s.fZ; return *this; } hsVector3 &operator*=(const float s) { fX *= s; fY *= s; fZ *= s; return *this; } diff --git a/Sources/Plasma/CoreLib/hsHashTable.h b/Sources/Plasma/CoreLib/hsHashTable.h index c3973a35..746967ff 100644 --- a/Sources/Plasma/CoreLib/hsHashTable.h +++ b/Sources/Plasma/CoreLib/hsHashTable.h @@ -62,8 +62,8 @@ public: hsHashTableIterator& operator--() { fIndex++; return *this; } const hsHashTableIterator& operator--(int) { hsHashTableIterator temp(*this); ++(*this); return temp; } - hsBool operator==(const hsHashTableIterator& other) const { return fList==other.fList && fIndex==other.fIndex; } - hsBool operator!=(const hsHashTableIterator& other) const { return !(*this == other); } + bool operator==(const hsHashTableIterator& other) const { return fList==other.fList && fIndex==other.fIndex; } + bool operator!=(const hsHashTableIterator& other) const { return !(*this == other); } private: hsTArray* fList; diff --git a/Sources/Plasma/CoreLib/hsMatrix44.cpp b/Sources/Plasma/CoreLib/hsMatrix44.cpp index 75bb0883..679a6d6d 100644 --- a/Sources/Plasma/CoreLib/hsMatrix44.cpp +++ b/Sources/Plasma/CoreLib/hsMatrix44.cpp @@ -212,7 +212,7 @@ hsVector3 hsMatrix44::operator*(const hsVector3& p) const return rVal; } -int hsMatrix44::operator==(const hsMatrix44& ss) const +bool hsMatrix44::operator==(const hsMatrix44& ss) const { if( ss.fFlags & fFlags & hsMatrix44::kIsIdent ) { @@ -807,9 +807,9 @@ hsPoint3* hsMatrix44::MapPoints(long count, hsPoint3 points[]) const return points; } -hsBool hsMatrix44::IsIdentity(void) +bool hsMatrix44::IsIdentity(void) { - hsBool retVal = true; + bool retVal = true; int i, j; for( i = 0; i < 4; i++ ) { @@ -866,7 +866,7 @@ hsBool hsMatrix44::IsIdentity(void) return retVal; } -hsBool hsMatrix44::GetParity() const +bool hsMatrix44::GetParity() const { if( fFlags & kIsIdent ) return false; @@ -896,7 +896,7 @@ void hsMatrix44::Read(hsStream *stream) void hsMatrix44::Write(hsStream *stream) { - hsBool ident = IsIdentity(); + bool ident = IsIdentity(); stream->WriteBool(!ident); if (!ident) { diff --git a/Sources/Plasma/CoreLib/hsMatrix44.h b/Sources/Plasma/CoreLib/hsMatrix44.h index c0a5ed21..34ee618a 100644 --- a/Sources/Plasma/CoreLib/hsMatrix44.h +++ b/Sources/Plasma/CoreLib/hsMatrix44.h @@ -61,7 +61,7 @@ struct hsMatrix44 { kView }; float fMap[4][4]; - uint32_t fFlags; + uint32_t fFlags; hsMatrix44() : fFlags(0) {} hsMatrix44(const hsScalarTriple &translate, const hsQuat &rotate); @@ -79,7 +79,7 @@ struct hsMatrix44 { hsMatrix44& Scale(const hsVector3 *); hsMatrix44& Rotate(int axis, float radians); - hsMatrix44& Reset(hsBool asIdent=true) + hsMatrix44& Reset(bool asIdent=true) { fMap[0][0] = 1.0f; fMap[0][1] = 0.0f; fMap[0][2] = 0.0f; fMap[0][3] = 0.0f; fMap[1][0] = 0.0f; fMap[1][1] = 1.0f; fMap[1][2] = 0.0f; fMap[1][3] = 0.0f; @@ -104,7 +104,7 @@ struct hsMatrix44 { hsMatrix44& MakeCameraUpPreserving(const hsPoint3* from, const hsPoint3* at, const hsVector3* up); - hsBool GetParity() const; + bool GetParity() const; float GetDeterminant() const; hsMatrix44* GetInverse(hsMatrix44* inverse) const; hsMatrix44* GetTranspose(hsMatrix44* inverse) const; @@ -145,11 +145,11 @@ struct hsMatrix44 { hsPoint3* MapPoints(long count, hsPoint3 points[]) const; - hsBool IsIdentity(void); - void NotIdentity() { fFlags &= ~kIsIdent; } + bool IsIdentity(void); + void NotIdentity() { fFlags &= ~kIsIdent; } - hsBool operator==(const hsMatrix44& ss) const; - hsBool operator!=(const hsMatrix44& ss) const { return !(ss == *this); } + bool operator==(const hsMatrix44& ss) const; + bool operator!=(const hsMatrix44& ss) const { return !(ss == *this); } void Read(hsStream *stream); void Write(hsStream *stream); diff --git a/Sources/Plasma/CoreLib/hsMemory.cpp b/Sources/Plasma/CoreLib/hsMemory.cpp index f4e6ed23..324569da 100644 --- a/Sources/Plasma/CoreLib/hsMemory.cpp +++ b/Sources/Plasma/CoreLib/hsMemory.cpp @@ -54,7 +54,7 @@ void HSMemory::BlockMove(const void* src, void* dst, uint32_t length) memmove(dst, src, length); } -hsBool HSMemory::EqualBlocks(const void* block1, const void* block2, uint32_t length) +bool HSMemory::EqualBlocks(const void* block1, const void* block2, uint32_t length) { const uint8_t* byte1 = (uint8_t*)block1; const uint8_t* byte2 = (uint8_t*)block2; @@ -247,13 +247,13 @@ struct hsAppenderHead { void* GetBottom() const { return fBottom; } void* GetStop() const { return fStop; } - void* GetFirst() const { return fFirst; } - void* GetLast(uint32_t elemSize) const { return (char*)fStop - elemSize; } - uint32_t GetSize() const { return (char*)fStop - (char*)fFirst; } + void* GetFirst() const { return fFirst; } + void* GetLast(uint32_t elemSize) const { return (char*)fStop - elemSize; } + uint32_t GetSize() const { return (char*)fStop - (char*)fFirst; } - hsBool CanPrepend() const { return fFirst != this->GetTop(); } + bool CanPrepend() const { return fFirst != this->GetTop(); } int PrependSize() const { return (char*)fFirst - (char*)this->GetTop(); } - hsBool CanAppend() const { return fStop != this->GetBottom(); } + bool CanAppend() const { return fStop != this->GetBottom(); } int AppendSize() const { return (char*)this->GetBottom() - (char*)fStop; } void* Prepend(uint32_t elemSize) @@ -271,7 +271,7 @@ struct hsAppenderHead { hsAssert((char*)fStop <= (char*)fBottom, "bad elemSize"); return data; } - hsBool PopHead(uint32_t elemSize, void* data) + bool PopHead(uint32_t elemSize, void* data) { hsAssert(fFirst != fStop, "Empty"); if( data ) @@ -279,7 +279,7 @@ struct hsAppenderHead { fFirst = (char*)fFirst + elemSize; return fFirst == fStop; } - hsBool PopTail(uint32_t elemSize, void* data) + bool PopTail(uint32_t elemSize, void* data) { hsAssert(fFirst != fStop, "Empty"); fStop = (char*)fStop - elemSize; @@ -388,7 +388,7 @@ void* hsAppender::PeekHead() const return nil; } -hsBool hsAppender::PopHead(void* data) +bool hsAppender::PopHead(void* data) { if (fCount == 0) return false; @@ -500,7 +500,7 @@ void* hsAppender::PeekTail() const return nil; } -hsBool hsAppender::PopTail(void* data) +bool hsAppender::PopTail(void* data) { if (fCount == 0) return false; @@ -570,7 +570,7 @@ void* hsAppenderIterator::Next() return item; } -hsBool hsAppenderIterator::Next(void* data) +bool hsAppenderIterator::Next(void* data) { void* addr = this->Next(); if (addr) @@ -613,7 +613,7 @@ void* hsAppenderIterator::Prev() return item; } -hsBool hsAppenderIterator::Prev(void* data) +bool hsAppenderIterator::Prev(void* data) { void* addr = this->Prev(); if (addr) diff --git a/Sources/Plasma/CoreLib/hsMemory.h b/Sources/Plasma/CoreLib/hsMemory.h index fa45bbaa..32f7877d 100644 --- a/Sources/Plasma/CoreLib/hsMemory.h +++ b/Sources/Plasma/CoreLib/hsMemory.h @@ -51,13 +51,13 @@ public: static void Clear(void *m, uint32_t byteLen); static void ClearMemory(void *m, uint32_t byteLen) { HSMemory::Clear(m, byteLen); } - static hsBool EqualBlocks(const void* block1, const void* block2, uint32_t length); + static bool EqualBlocks(const void* block1, const void* block2, uint32_t length); - static void* New(uint32_t size); - static void Delete(void* block); - static void* Copy(uint32_t length, const void* source); + static void* New(uint32_t size); + static void Delete(void* block); + static void* Copy(uint32_t length, const void* source); - static void* SoftNew(uint32_t size); // returns nil if can't allocate + static void* SoftNew(uint32_t size); // returns nil if can't allocate }; /////////////////////////////////////////////////////////////////////////////////////////// @@ -127,21 +127,21 @@ public: uint32_t ElemSize() const { return fElemSize; } uint32_t Count() const { return fCount; } - hsBool IsEmpty() const { return fCount == 0; } - void Reset(); + bool IsEmpty() const { return fCount == 0; } + void Reset(); uint32_t CopyInto(void* data = nil) const; // return size of data array in bytes - void* PushHead(); - void PushHead(const void* data); - void* PushTail(); - void PushTail(const void* data); - void PushTail(int count, const void* data); // data[] = count * fElemSize - void* PeekHead() const; - void* PeekTail() const; - hsBool PopHead(void* data = nil); - int PopHead(int count, void* data = nil); // data[] = count * fElemSize - hsBool PopTail(void* data = nil); + void* PushHead(); + void PushHead(const void* data); + void* PushTail(); + void PushTail(const void* data); + void PushTail(int count, const void* data); // data[] = count * fElemSize + void* PeekHead() const; + void* PeekTail() const; + bool PopHead(void* data = nil); + int PopHead(int count, void* data = nil); // data[] = count * fElemSize + bool PopTail(void* data = nil); // Alternate interfaces @@ -149,13 +149,13 @@ public: void* Append() { return this->PushTail(); } void* Push() { return this->PushHead(); } - void Push(const void* data) { this->PushHead(data); } - hsBool Pop(void* data = nil) { return this->PopHead(data); } + void Push(const void* data) { this->PushHead(data); } + bool Pop(void* data = nil) { return this->PopHead(data); } void* Enqueue() { return this->PushTail(); }; - void Enqueue(const void* data) { this->PushTail(data); } - void Enqueue(int count, const void* data) { this->PushTail(count, data); } - hsBool Dequeue(void* data = nil) { return this->PopHead(data); } + void Enqueue(const void* data) { this->PushTail(data); } + void Enqueue(int count, const void* data) { this->PushTail(count, data); } + bool Dequeue(void* data = nil) { return this->PopHead(data); } int Dequeue(int count, void* data = nil) { return this->PopHead(count, data); } }; @@ -169,10 +169,10 @@ public: void ResetToHead(const hsAppender* list = nil); void ResetToTail(const hsAppender* list = nil); void* Next(); - hsBool Next(void* data); + bool Next(void* data); int Next(int count, void* data); void* Prev(); - hsBool Prev(void* data); + bool Prev(void* data); // Obsolete interface @@ -190,37 +190,37 @@ public: const hsAppender* GetAppender() const { return this; } uint32_t Count() const { return hsAppender::Count(); } - hsBool IsEmpty() const { return hsAppender::IsEmpty(); } - void Reset() { hsAppender::Reset(); } + bool IsEmpty() const { return hsAppender::IsEmpty(); } + void Reset() { hsAppender::Reset(); } uint32_t CopyInto(T copy[]) const { return hsAppender::CopyInto(copy); } T* PushHead() { return (T*)hsAppender::PushHead(); } - void PushHead(const T& item) { *this->PushHead() = item; } + void PushHead(const T& item) { *this->PushHead() = item; } T* PushTail() { return (T*)hsAppender::PushTail(); } - void PushTail(const T& item) { *this->PushTail() = item; }; - void PushTail(int count, const T item[]) { this->hsAppender::PushTail(count, item); }; + void PushTail(const T& item) { *this->PushTail() = item; }; + void PushTail(int count, const T item[]) { this->hsAppender::PushTail(count, item); }; T* PeekHead() const { return (T*)hsAppender::PeekHead(); } T* PeekTail() const { return (T*)hsAppender::PeekTail(); } - hsBool PopHead(T* item = nil) { return hsAppender::PopHead(item); } + bool PopHead(T* item = nil) { return hsAppender::PopHead(item); } int PopHead(int count, T item[] = nil) { return hsAppender::PopHead(count, item); } - hsBool PopTail(T* item = nil) { return hsAppender::PopTail(item); } + bool PopTail(T* item = nil) { return hsAppender::PopTail(item); } // Alternate intefaces T* Prepend() { return this->PushHead(); } T* Append() { return this->PushTail(); } - void PrependItem(const T& item) { this->PushHead(item); } - void AppendItem(const T& item) { this->PushTail(item); } + void PrependItem(const T& item) { this->PushHead(item); } + void AppendItem(const T& item) { this->PushTail(item); } T* Push() { return this->PushHead(); } - void Push(const T& item) { this->PushHead(item); } - hsBool Pop(T* item = nil) { return this->PopHead(item); } + void Push(const T& item) { this->PushHead(item); } + bool Pop(T* item = nil) { return this->PopHead(item); } T* Enqueue() { return this->PushTail(); }; - void Enqueue(const T& item) { this->PushTail(item); } - void Enqueue(int count, const T item[]) { this->PushTail(count, item); } - hsBool Dequeue(T* item = nil) { return this->PopHead(item); } + void Enqueue(const T& item) { this->PushTail(item); } + void Enqueue(int count, const T item[]) { this->PushTail(count, item); } + bool Dequeue(T* item = nil) { return this->PopHead(item); } int Dequeue(int count, T item[] = nil) { return this->PopHead(count, item); } }; @@ -234,9 +234,9 @@ public: void ResetToTail() { hsAppenderIterator::ResetToTail(nil); } void ResetToTail(const hsTAppender* list) { hsAppenderIterator::ResetToTail(list->GetAppender()); } T* Next() { return (T*)hsAppenderIterator::Next(); } - hsBool Next(T* item) { return hsAppenderIterator::Next(item); } + int Next(T* item) { return hsAppenderIterator::Next(item); } T* Prev() { return (T*)hsAppenderIterator::Prev(); } - hsBool Prev(T* item) { return hsAppenderIterator::Prev(item); } + bool Prev(T* item) { return hsAppenderIterator::Prev(item); } // Obsolete interfaces diff --git a/Sources/Plasma/CoreLib/hsPoint2.h b/Sources/Plasma/CoreLib/hsPoint2.h index 91c34d59..f19635fa 100644 --- a/Sources/Plasma/CoreLib/hsPoint2.h +++ b/Sources/Plasma/CoreLib/hsPoint2.h @@ -112,7 +112,7 @@ struct hsPoint2 { } hsPoint2* Grid(float period); - hsBool CloseEnough(const hsPoint2* p, float tolerance) const; + bool CloseEnough(const hsPoint2* p, float tolerance) const; float MagnitudeSquared() const { return fX * fX + fY * fY; } float Magnitude() const { return Magnitude(fX, fY); } diff --git a/Sources/Plasma/CoreLib/plRefCnt.h b/Sources/Plasma/CoreLib/hsRefCnt.cpp similarity index 59% rename from Sources/Plasma/CoreLib/plRefCnt.h rename to Sources/Plasma/CoreLib/hsRefCnt.cpp index 11545415..3ed939d6 100644 --- a/Sources/Plasma/CoreLib/plRefCnt.h +++ b/Sources/Plasma/CoreLib/hsRefCnt.cpp @@ -39,51 +39,27 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#ifndef plRefCnt_Defined -#define plRefCnt_Defined #include "HeadSpin.h" - -// plRef count addes refcount abilities to any plCreatable - -class plRefCnt -{ uint32_t fRefCnt; -public: - plRefCnt() : fRefCnt(1){} - ~plRefCnt(){} - hsBool TimeToDelete() { return (fRefCnt == 1); } - void Incr() { fRefCnt++; } - void Decr() { fRefCnt--; } -}; - - -#define DEFINE_REF_COUNT plRefCnt fMyRef;\ - virtual void UnRef() { /*hsDebugCode(hsThrowIfFalse(fRefCnt >= 1);)*/if (fMyRef.TimeToDelete()) delete this; else fMyRef.Decr(); }\ - virtual void Ref() { fMyRef.Incr(); } -/* -class hsRefCnt { -private: - int32_t fRefCnt; -public: - hsRefCnt() : fRefCnt(1) {} - virtual ~hsRefCnt(); - - int32_t RefCnt() const { return fRefCnt; } - virtual void UnRef(); - virtual void Ref(); -}; - -#define hsRefCnt_SafeRef(obj) do { if (obj) (obj)->Ref(); } while (0) -#define hsRefCnt_SafeUnRef(obj) do { if (obj) (obj)->UnRef(); } while (0) - -#define hsRefCnt_SafeAssign(dst, src) \ - do { \ - hsRefCnt_SafeRef(src); \ - hsRefCnt_SafeUnRef(dst); \ - dst = src; \ - } while (0) - -*/ - -#endif - +#include "hsExceptions.h" +#include "hsRefCnt.h" + +hsRefCnt::~hsRefCnt() +{ + hsDebugCode(hsThrowIfFalse(fRefCnt == 1);) +} + +void hsRefCnt::Ref() +{ + fRefCnt++; +} + +void hsRefCnt::UnRef() +{ + hsDebugCode(hsThrowIfFalse(fRefCnt >= 1);) + + if (fRefCnt == 1) // don't decrement if we call delete + delete this; + else + --fRefCnt; +} diff --git a/Sources/Plasma/CoreLib/hsSTLStream.cpp b/Sources/Plasma/CoreLib/hsSTLStream.cpp index 523a4a1c..23211b79 100644 --- a/Sources/Plasma/CoreLib/hsSTLStream.cpp +++ b/Sources/Plasma/CoreLib/hsSTLStream.cpp @@ -54,7 +54,7 @@ hsVectorStream::~hsVectorStream() { } -hsBool hsVectorStream::AtEnd() +bool hsVectorStream::AtEnd() { return (fBytesRead >= fEnd); } @@ -153,241 +153,3 @@ const void *hsVectorStream::GetData() else return nil; } - -///////////////////////////////////////////////////////////////////////////////////////// - -#ifdef HS_BUILD_FOR_WIN32 - -hsNamedPipeStream::hsNamedPipeStream(uint8_t flags, uint32_t timeout) : - fFlags(flags), - fPipe(INVALID_HANDLE_VALUE), - fReadMode(false), - fTimeout(timeout) -{ - memset(&fOverlap, 0, sizeof(OVERLAPPED)); - fOverlap.hEvent = CreateEvent(NULL, TRUE, TRUE, NULL); -} - -hsNamedPipeStream::~hsNamedPipeStream() -{ - CloseHandle(fOverlap.hEvent); - fOverlap.hEvent = INVALID_HANDLE_VALUE; -} - -hsBool hsNamedPipeStream::WaitForClientConnect() -{ - // Look for a client connect (this should return zero since it's overlapped) - BOOL ret = ConnectNamedPipe(fPipe, &fOverlap); - if (ret) - return true; - else - { - switch (GetLastError()) - { - // Waiting for client to connect - case ERROR_IO_PENDING: - if (WaitForSingleObject(fOverlap.hEvent, fTimeout) == WAIT_OBJECT_0) - return true; - break; - - // Client is already connected - case ERROR_PIPE_CONNECTED: -// if (SetEvent(fOverlap.hEvent)) - return true; - break; - } - } - - return false; -} - -hsBool hsNamedPipeStream::Open(const char *name, const char *mode) -{ - wchar_t* wName = hsStringToWString(name); - wchar_t* wMode = hsStringToWString(mode); - hsBool ret = Open(wName, wMode); - delete [] wName; - delete [] wMode; - return ret; -} - -hsBool hsNamedPipeStream::Open(const wchar_t *name, const wchar_t *mode) -{ - if (wcschr(mode, L'w')) - { - fReadMode = false; - - // Try to create the pipe - fPipe = CreateNamedPipeW(name, - PIPE_ACCESS_OUTBOUND | FILE_FLAG_OVERLAPPED, - PIPE_TYPE_BYTE, - 1, - 1024, - 1024, - fTimeout, - NULL); - - if (fPipe != INVALID_HANDLE_VALUE) - return true; - } - else if (wcschr(mode, L'r')) - { - fReadMode = true; - - fPipe = CreateFileW(name, - GENERIC_READ, - 0, // no sharing - NULL, // no security attributes - OPEN_EXISTING, // opens existing pipe - FILE_FLAG_OVERLAPPED, // default attributes - NULL); // no template file - - if (fPipe != INVALID_HANDLE_VALUE) - return true; - } - - return false; -} - -hsBool hsNamedPipeStream::Close() -{ - if (fPipe == INVALID_HANDLE_VALUE) - return false; - - if (fReadMode) - { - CloseHandle(fPipe); // Close our end of the pipe - fPipe = INVALID_HANDLE_VALUE; - } - else - { - FlushFileBuffers(fPipe); // Make sure the client is done reading - DisconnectNamedPipe(fPipe); // Disconnect the pipe from the client - CloseHandle(fPipe); // Close our end of the pipe - fPipe = INVALID_HANDLE_VALUE; - } - - return true; -} - -hsBool hsNamedPipeStream::ICheckOverlappedResult(BOOL result, uint32_t &numTransferred) -{ - // Read/Write succeeded, return now - if (result) - return true; - // Read failed because the operation is taking a while. Wait for it - else if (GetLastError() == ERROR_IO_PENDING) - { - if (WaitForSingleObject(fOverlap.hEvent, fTimeout) == WAIT_OBJECT_0) - { - BOOL oResult = GetOverlappedResult(fPipe, &fOverlap, (LPDWORD)&numTransferred, FALSE); - if (oResult) - return true; - hsAssert(oResult, "GetOverlappedResult failed"); - } - else - hsAssert(0, "Wait failed"); - } - else - hsAssert(0, "Read/Write failed"); - - return false; -} - -hsBool hsNamedPipeStream::IRead(uint32_t byteCount, void *buffer, uint32_t &numRead) -{ - numRead = 0; - - if (fPipe != INVALID_HANDLE_VALUE && fReadMode) - { - BOOL result = ReadFile(fPipe, buffer, byteCount, (LPDWORD)&numRead, &fOverlap); - if (ICheckOverlappedResult(result, numRead)) - return true; - } - - // If we got here, the pipe is probably broken. Throw if it is enabled. - if (fFlags & kThrowOnError) - throw this; - - return false; -} - -hsBool hsNamedPipeStream::IWrite(uint32_t byteCount, const void *buffer, uint32_t &numWritten) -{ - numWritten = 0; - - if (fPipe != INVALID_HANDLE_VALUE && !fReadMode) - { - BOOL result = WriteFile(fPipe, buffer, byteCount, (LPDWORD)&numWritten, &fOverlap); - if (ICheckOverlappedResult(result, numWritten)) - return true; - } - - // If we got here, the pipe is probably broken. Throw if it is enabled. - if (fFlags & kThrowOnError) - throw this; - - return false; -} - -uint32_t hsNamedPipeStream::Read(uint32_t byteCount, void *buffer) -{ - uint32_t totalRead = 0; - - // Read until we get all our data or an error - uint32_t numRead = 0; - while (IRead(byteCount-totalRead, (void*)((uint32_t)buffer+totalRead), numRead)) - { - totalRead += numRead; - - if (totalRead >= byteCount) - return totalRead; - } - - return totalRead; -} - -uint32_t hsNamedPipeStream::Write(uint32_t byteCount, const void *buffer) -{ - uint32_t totalWritten = 0; - - // Write until we get all our data or an error - uint32_t numWritten = 0; - while (IWrite(byteCount-totalWritten, (const void*)((uint32_t)buffer+totalWritten), numWritten)) - { - totalWritten += numWritten; - - if (totalWritten >= byteCount) - return totalWritten; - } - - return totalWritten; -} - -#ifdef __SGI_STL_PORT -using std::min; -#endif - -void hsNamedPipeStream::Skip(uint32_t deltaByteCount) -{ - char buf[256]; - - // Read until we get all our data or an error - uint32_t totalRead = 0; - uint32_t numRead = 0; - while (IRead(min((uint32_t)256L, deltaByteCount-totalRead), buf, numRead)) - { - totalRead += numRead; - - if (totalRead >= deltaByteCount) - return; - } - -} - -void hsNamedPipeStream::Rewind() -{ - hsAssert(0, "Rewind not allowed on a pipe"); -} - -#endif // HS_BUILD_FOR_WIN32 diff --git a/Sources/Plasma/CoreLib/hsSTLStream.h b/Sources/Plasma/CoreLib/hsSTLStream.h index a3420bbb..40d8af9c 100644 --- a/Sources/Plasma/CoreLib/hsSTLStream.h +++ b/Sources/Plasma/CoreLib/hsSTLStream.h @@ -57,17 +57,17 @@ public: hsVectorStream(uint32_t chunkSize); virtual ~hsVectorStream(); - virtual hsBool Open(const char *, const char *) { hsAssert(0, "hsVectorStream::Open Not Implemented"); return false; } - virtual hsBool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "hsVectorStream::Open Not Implemented"); return false; } - virtual hsBool Close() { hsAssert(0, "hsVectorStream::Close Not Implemented"); return false; } + virtual bool Open(const char *, const char *) { hsAssert(0, "hsVectorStream::Open Not Implemented"); return false; } + virtual bool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "hsVectorStream::Open Not Implemented"); return false; } + virtual bool Close() { hsAssert(0, "hsVectorStream::Close Not Implemented"); return false; } - virtual hsBool AtEnd(); + virtual bool AtEnd(); virtual uint32_t Read(uint32_t byteCount, void * buffer); virtual uint32_t Write(uint32_t byteCount, const void* buffer); - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - virtual void FastFwd(); - virtual void Truncate(); + virtual void Skip(uint32_t deltaByteCount); + virtual void Rewind(); + virtual void FastFwd(); + virtual void Truncate(); virtual uint32_t GetEOF(); virtual void CopyToMem(void* mem); @@ -82,48 +82,3 @@ public: // In case you want to try and be efficient with your memory allocations void Reserve(uint32_t bytes) { fVector.reserve(bytes); } }; - -#ifdef HS_BUILD_FOR_WIN32 - - - -class hsNamedPipeStream : public hsStream -{ -protected: - HANDLE fPipe; - OVERLAPPED fOverlap; - hsBool fReadMode; // True for read, false for write - uint8_t fFlags; - uint32_t fTimeout; - - hsBool ICheckOverlappedResult(BOOL result, uint32_t &numTransferred); - hsBool IRead(uint32_t byteCount, void *buffer, uint32_t &numRead); - hsBool IWrite(uint32_t byteCount, const void *buffer, uint32_t &numWritten); - -public: - enum { kThrowOnError = 1 }; // Throws if a read or write operation fails - - hsNamedPipeStream(uint8_t flags=0, uint32_t timeout=INFINITE); - virtual ~hsNamedPipeStream(); - - // The server (writer) and client (reader) need to open the same file. - // The format is "\\.\pipe\pipeName". The '.' can be replaced with a - // computer name to do it over the network. 'pipeName' is whatever you - // want. - virtual hsBool Open(const char *name, const char *mode); - virtual hsBool Open(const wchar_t *name, const wchar_t *mode); - virtual hsBool Close(); - - virtual uint32_t Read(uint32_t byteCount, void *buffer); - virtual uint32_t Write(uint32_t byteCount, const void *buffer); - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - - // - For the server (writer) only - - // After calling open, signal your client to start reading and call this function. - // If a client connects, this will return true and you can start writing. If it - // returns false, close the pipe, it ain't happening. - hsBool WaitForClientConnect(); -}; - -#endif // HS_BUILD_FOR_WIN32 diff --git a/Sources/Plasma/CoreLib/hsStream.cpp b/Sources/Plasma/CoreLib/hsStream.cpp index 257511bf..ee0c9e34 100644 --- a/Sources/Plasma/CoreLib/hsStream.cpp +++ b/Sources/Plasma/CoreLib/hsStream.cpp @@ -118,7 +118,9 @@ hsStream::~hsStream() uint32_t hsStream::WriteString(const char cstring[]) { - return Write(hsStrlen(cstring), cstring); + if (cstring) + return Write(strlen(cstring), cstring); + return 0; } uint32_t hsStream::WriteFmt(const char * fmt, ...) @@ -139,7 +141,9 @@ uint32_t hsStream::WriteFmtV(const char * fmt, va_list av) uint32_t hsStream::WriteSafeStringLong(const char *string) { - uint32_t len = hsStrlen(string); + uint32_t len = 0; + if (string) + len = strlen(string); WriteLE32(len); if (len > 0) { @@ -222,7 +226,9 @@ wchar_t *hsStream::ReadSafeWStringLong() uint32_t hsStream::WriteSafeString(const char *string) { - int len = hsStrlen(string); + int len = 0; + if (string) + len = strlen(string); hsAssert(len<0xf000, xtl::format("string len of %d is too long for WriteSafeString %s, use WriteSafeStringLong", string, len).c_str() ); @@ -271,7 +277,7 @@ char *hsStream::ReadSafeString() #ifndef REMOVE_ME_SOON // Backward compat hack - remove in a week or so (from 6/30/03) - hsBool oldFormat = !(numChars & 0xf000); + bool oldFormat = !(numChars & 0xf000); if (oldFormat) ReadLE16(); #endif @@ -348,7 +354,7 @@ plString hsStream::ReadSafeWString_TEMP() return result; } -hsBool hsStream::Read4Bytes(void *pv) // Virtual, faster version in sub classes +bool hsStream::Read4Bytes(void *pv) // Virtual, faster version in sub classes { int knt = this->Read(sizeof(uint32_t), pv); if (knt != 4) @@ -356,7 +362,7 @@ hsBool hsStream::Read4Bytes(void *pv) // Virtual, faster version in sub classe return true; } -hsBool hsStream::Read12Bytes(void *buffer) // Reads 12 bytes, return true if success +bool hsStream::Read12Bytes(void *buffer) // Reads 12 bytes, return true if success { int knt = this->Read(12,buffer); if (knt != 12) @@ -364,7 +370,7 @@ hsBool hsStream::Read12Bytes(void *buffer) // Reads 12 bytes, return true if su return true; } -hsBool hsStream::Read8Bytes(void *buffer) // Reads 12 bytes, return true if success +bool hsStream::Read8Bytes(void *buffer) // Reads 12 bytes, return true if success { int knt = this->Read(8,buffer); if (knt !=8) @@ -372,27 +378,21 @@ hsBool hsStream::Read8Bytes(void *buffer) // Reads 12 bytes, return true if su return true; } -hsBool hsStream::ReadBool() // Virtual, faster version in sub classes +bool hsStream::ReadBOOL() { - return this->ReadByte(); + uint32_t val; + this->Read(sizeof(uint32_t), &val); + return val != 0; } -bool hsStream::Readbool() // Virtual, faster version in sub classes +bool hsStream::ReadBool() // Virtual, faster version in sub classes { - return this->ReadByte() ? true : false; + return (this->ReadByte() != 0); } -void hsStream::ReadBool(int count, hsBool values[]) +void hsStream::ReadBool(int count, bool values[]) { this->Read(count, values); - - if (sizeof(hsBool) > 1) - { const uint8_t* src = (uint8_t*)values; - - // go backwards so we don't overwrite ourselves - for (int i = count - 1; i >= 0; --i) - values[i] = src[i]; - } } uint8_t hsStream::ReadByte() @@ -403,18 +403,18 @@ uint8_t hsStream::ReadByte() return value; } -hsBool hsStream::AtEnd() +bool hsStream::AtEnd() { hsAssert(0,"No hsStream::AtEnd() implemented for this stream class"); return false; } -hsBool hsStream::IsTokenSeparator(char c) +bool hsStream::IsTokenSeparator(char c) { return (isspace(c) || c==',' || c=='='); } -hsBool hsStream::GetToken(char *s, uint32_t maxLen, const char beginComment, const char endComment) +bool hsStream::GetToken(char *s, uint32_t maxLen, const char beginComment, const char endComment) { char c; char endCom; @@ -464,7 +464,7 @@ hsBool hsStream::GetToken(char *s, uint32_t maxLen, const char beginComment, con return true; } -hsBool hsStream::ReadLn(char *s, uint32_t maxLen, const char beginComment, const char endComment) +bool hsStream::ReadLn(char *s, uint32_t maxLen, const char beginComment, const char endComment) { char c; char endCom; @@ -592,32 +592,21 @@ float hsStream::ReadBEFloat() } -void hsStream::WriteBool(hsBool value) +void hsStream::WriteBOOL(bool value) { - uint8_t dst = (value != 0); - - this->Write(sizeof(uint8_t), &dst); + uint32_t dst = value != 0; + this->Write(sizeof(uint32_t), &dst); } -void hsStream::Writebool(bool value) +void hsStream::WriteBool(bool value) { - uint8_t dst = (value != 0); - + uint8_t dst = value != 0; this->Write(sizeof(uint8_t), &dst); } -void hsStream::WriteBool(int count, const hsBool values[]) +void hsStream::WriteBool(int count, const bool values[]) { - if (sizeof(hsBool) > 1) - { hsTempArray storage(count); - uint8_t* dst = (uint8_t*)values; - - for (int i = 0; i < count; i++) - dst[i] = (values[i] != 0); - this->Write(count, dst); - } - else - this->Write(count, values); + this->Write(count, values); } void hsStream::WriteByte(uint8_t value) @@ -705,19 +694,19 @@ uint32_t hsStream::ReadLEAtom(uint32_t* sizePtr) #define kFileStream_Uninitialized ~0 -hsBool hsFileStream::Open(const char *name, const char *mode) +bool hsFileStream::Open(const char *name, const char *mode) { hsAssert(0, "hsFileStream::Open NotImplemented"); return false; } -hsBool hsFileStream::Open(const wchar_t *name, const wchar_t *mode) +bool hsFileStream::Open(const wchar_t *name, const wchar_t *mode) { hsAssert(0, "hsFileStream::Open NotImplemented"); return false; } -hsBool hsFileStream::Close () +bool hsFileStream::Close () { hsAssert(0, "hsFileStream::Close NotImplemented"); return false; @@ -787,7 +776,7 @@ uint32_t hsFileStream::Write(uint32_t bytes, const void* buffer) } -hsBool hsFileStream::AtEnd() +bool hsFileStream::AtEnd() { #if HS_BUILD_FOR_WIN32 uint32_t bytes; @@ -832,21 +821,21 @@ hsUNIXStream::~hsUNIXStream() // Don't Close here, because Sub classes Don't always want that behaviour! } -hsBool hsUNIXStream::Open(const char *name, const char *mode) +bool hsUNIXStream::Open(const char *name, const char *mode) { fPosition = 0; fRef = hsFopen(name, mode); return (fRef) ? true : false; } -hsBool hsUNIXStream::Open(const wchar_t *name, const wchar_t *mode) +bool hsUNIXStream::Open(const wchar_t *name, const wchar_t *mode) { fPosition = 0; fRef = hsWFopen(name, mode); return (fRef) ? true : false; } -hsBool hsUNIXStream::Close() +bool hsUNIXStream::Close() { int rtn = true; if (fRef) @@ -879,11 +868,11 @@ uint32_t hsUNIXStream::Read(uint32_t bytes, void* buffer) return numItems; } -hsBool hsUNIXStream::AtEnd() +bool hsUNIXStream::AtEnd() { if (!fRef) return 1; - hsBool rVal; + bool rVal; int x = getc(fRef); rVal = feof(fRef) != 0; ungetc(x, fRef); @@ -987,7 +976,7 @@ void plReadOnlySubStream::IFixPosition( void ) fPosition = fBase->GetPosition() - fOffset; } -hsBool plReadOnlySubStream::AtEnd() +bool plReadOnlySubStream::AtEnd() { if( fPosition >= fLength ) return true; @@ -1068,7 +1057,7 @@ void hsRAMStream::Reset() fIter.ResetToHead(&fAppender); } -hsBool hsRAMStream::AtEnd() +bool hsRAMStream::AtEnd() { return (fBytesRead >= fAppender.Count() * fAppender.ElemSize()); } @@ -1157,7 +1146,7 @@ void hsNullStream::Truncate() ///////////////////////////////////////////////////////////////////////////////// -hsBool hsReadOnlyStream::AtEnd() +bool hsReadOnlyStream::AtEnd() { return fData >= fStop; } @@ -1331,7 +1320,7 @@ void hsQueueStream::FastFwd() fReadCursor = fWriteCursor; } -hsBool hsQueueStream::AtEnd() +bool hsQueueStream::AtEnd() { return fReadCursor == fWriteCursor; } @@ -1387,7 +1376,7 @@ hsBufferedStream::~hsBufferedStream() #endif // LOG_BUFFERED } -hsBool hsBufferedStream::Open(const char* name, const char* mode) +bool hsBufferedStream::Open(const char* name, const char* mode) { hsAssert(!fRef, "hsBufferedStream:Open Stream already opened"); fRef = hsFopen(name, mode); @@ -1407,13 +1396,13 @@ hsBool hsBufferedStream::Open(const char* name, const char* mode) return true; } -hsBool hsBufferedStream::Open(const wchar_t *name, const wchar_t *mode) +bool hsBufferedStream::Open(const wchar_t *name, const wchar_t *mode) { hsAssert(0, "hsFileStream::Open NotImplemented for wchar_t"); return false; } -hsBool hsBufferedStream::Close() +bool hsBufferedStream::Close() { int rtn = true; if (fRef) @@ -1550,7 +1539,7 @@ uint32_t hsBufferedStream::Write(uint32_t bytes, const void* buffer) return amtWritten; } -hsBool hsBufferedStream::AtEnd() +bool hsBufferedStream::AtEnd() { if (fWriteBufferUsed) { diff --git a/Sources/Plasma/CoreLib/hsStream.h b/Sources/Plasma/CoreLib/hsStream.h index 7c2806e5..be037e06 100644 --- a/Sources/Plasma/CoreLib/hsStream.h +++ b/Sources/Plasma/CoreLib/hsStream.h @@ -48,9 +48,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsMemory.h" #include "plString.h" -namespace hsPackFileSys { -struct FileEntry; -} // Define this for use of Streams with Logging (commonly used w/ a packet sniffer) // These streams log their reads to an event list @@ -77,32 +74,28 @@ enum { kEolnCode = '\n', kComment = '#' }; -enum VDB_Type {// Virtual Database type - kVDB_GroupObject, - kVDB_Mesh - }; protected: uint32_t fBytesRead; uint32_t fPosition; - hsBool IsTokenSeparator(char c); + bool IsTokenSeparator(char c); public: hsStream() : fBytesRead(0), fPosition(0) {} virtual ~hsStream(); - virtual hsBool Open(const char *, const char * = "rb")=0; - virtual hsBool Open(const wchar_t *, const wchar_t * = L"rb")=0; - virtual hsBool Close()=0; - virtual hsBool AtEnd(); + virtual bool Open(const char *, const char * = "rb")=0; + virtual bool Open(const wchar_t *, const wchar_t * = L"rb")=0; + virtual bool Close()=0; + virtual bool AtEnd(); virtual uint32_t Read(uint32_t byteCount, void * buffer) = 0; virtual uint32_t Write(uint32_t byteCount, const void* buffer) = 0; - virtual void Skip(uint32_t deltaByteCount) = 0; - virtual void Rewind() = 0; - virtual void FastFwd(); + virtual void Skip(uint32_t deltaByteCount) = 0; + virtual void Rewind() = 0; + virtual void FastFwd(); virtual uint32_t GetPosition() const; - virtual void SetPosition(uint32_t position); - virtual void Truncate(); - virtual void Flush() {} + virtual void SetPosition(uint32_t position); + virtual void Truncate(); + virtual void Flush() {} #ifdef STREAM_LOGGER // Logging Reads & Skips @@ -121,14 +114,14 @@ public: // Optimization for small Reads virtual uint8_t ReadByte(); - virtual hsBool Read4Bytes(void *buffer); // Reads 4 bytes, return true if success - virtual hsBool Read8Bytes(void *buffer); // Reads 8 bytes, return true if success - virtual hsBool Read12Bytes(void *buffer); // Reads 12 bytes, return true if success + virtual bool Read4Bytes(void *buffer); // Reads 4 bytes, return true if success + virtual bool Read8Bytes(void *buffer); // Reads 8 bytes, return true if success + virtual bool Read12Bytes(void *buffer); // Reads 12 bytes, return true if success virtual uint32_t GetEOF(); uint32_t GetSizeLeft(); virtual void CopyToMem(void* mem); - virtual hsBool IsCompressed() { return false; } + virtual bool IsCompressed() { return false; } uint32_t WriteString(const char cstring[]); uint32_t WriteString(const plString & string) { return WriteString(_TEMP_CONVERT_TO_CONST_CHAR(string)); } @@ -150,21 +143,23 @@ public: plString ReadSafeString_TEMP(); plString ReadSafeWString_TEMP(); - hsBool GetToken(char *s, uint32_t maxLen=uint32_t(-1), const char beginComment=kComment, const char endComment=kEolnCode); - hsBool ReadLn(char* s, uint32_t maxLen=uint32_t(-1), const char beginComment=kComment, const char endComment=kEolnCode); + bool GetToken(char *s, uint32_t maxLen=uint32_t(-1), const char beginComment=kComment, const char endComment=kEolnCode); + bool ReadLn(char* s, uint32_t maxLen=uint32_t(-1), const char beginComment=kComment, const char endComment=kEolnCode); - bool Readbool(); - hsBool ReadBool(); - void ReadBool(int count, hsBool values[]); + // Reads a 4-byte BOOLean + bool ReadBOOL(); + // Reads a 1-byte boolean + bool ReadBool(); + void ReadBool(int count, bool values[]); uint16_t ReadLE16(); void ReadLE16(int count, uint16_t values[]); uint32_t ReadLE32(); void ReadLE32(int count, uint32_t values[]); uint32_t ReadBE32(); - void Writebool(bool value); - void WriteBool(hsBool value); - void WriteBool(int count, const hsBool values[]); + void WriteBOOL(bool value); + void WriteBool(bool value); + void WriteBool(int count, const bool values[]); void WriteByte(uint8_t value); void WriteLE16(uint16_t value); void WriteLE16(int count, const uint16_t values[]); @@ -285,9 +280,6 @@ public: void WriteLE(uint32_t* tag, uint32_t size) { WriteLEAtom(*tag, size); } void ReadLE(uint32_t* tag, uint32_t *size) { *tag = ReadLEAtom(size); } /* Overloaded End */ - virtual void VirtualSetPosition(uint32_t pos, VDB_Type ){ SetPosition(pos); }; - virtual hsPackFileSys::FileEntry *GetFileEntry() { return nil; } // Streams from Packfiles can return a FileEntry - }; class hsStreamable { @@ -302,18 +294,18 @@ class hsFileStream: public hsStream uint32_t fRef; public: - hsFileStream(); - virtual ~hsFileStream(); - virtual hsBool Open(const char *name, const char *mode = "rb"); - virtual hsBool Open(const wchar_t *name, const wchar_t *mode = L"rb"); - virtual hsBool Close(); + hsFileStream(); + virtual ~hsFileStream(); + virtual bool Open(const char *name, const char *mode = "rb"); + virtual bool Open(const wchar_t *name, const wchar_t *mode = L"rb"); + virtual bool Close(); - virtual hsBool AtEnd(); + virtual bool AtEnd(); virtual uint32_t Read(uint32_t byteCount, void* buffer); virtual uint32_t Write(uint32_t byteCount, const void* buffer); - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - virtual void Truncate(); + virtual void Skip(uint32_t deltaByteCount); + virtual void Rewind(); + virtual void Truncate(); virtual uint32_t GetFileRef(); virtual void SetFileRef(uint32_t refNum); @@ -327,19 +319,19 @@ class hsUNIXStream: public hsStream public: hsUNIXStream(): fRef(0), fBuff(nil) {} ~hsUNIXStream(); - virtual hsBool Open(const char* name, const char* mode = "rb"); - virtual hsBool Open(const wchar_t *name, const wchar_t *mode = L"rb"); - virtual hsBool Close(); + virtual bool Open(const char* name, const char* mode = "rb"); + virtual bool Open(const wchar_t *name, const wchar_t *mode = L"rb"); + virtual bool Close(); - virtual hsBool AtEnd(); + virtual bool AtEnd(); virtual uint32_t Read(uint32_t byteCount, void* buffer); virtual uint32_t Write(uint32_t byteCount, const void* buffer); - virtual void SetPosition(uint32_t position); - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - virtual void FastFwd(); - virtual void Truncate(); - virtual void Flush(); + virtual void SetPosition(uint32_t position); + virtual void Skip(uint32_t deltaByteCount); + virtual void Rewind(); + virtual void FastFwd(); + virtual void Truncate(); + virtual void Flush(); FILE* GetFILE() { return fRef; } void SetFILE(FILE* file) { fRef = file; } @@ -362,17 +354,17 @@ public: plReadOnlySubStream(): fBase( nil ), fOffset( 0 ), fLength( 0 ) {} ~plReadOnlySubStream(); - virtual hsBool Open(const char *, const char *) { hsAssert(0, "plReadOnlySubStream::Open NotImplemented"); return false; } - virtual hsBool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "plReadOnlySubStream::Open NotImplemented"); return false; } - void Open( hsStream *base, uint32_t offset, uint32_t length ); - virtual hsBool Close() { fBase = nil; fOffset = 0; fLength = 0; return true; } - virtual hsBool AtEnd(); + virtual bool Open(const char *, const char *) { hsAssert(0, "plReadOnlySubStream::Open NotImplemented"); return false; } + virtual bool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "plReadOnlySubStream::Open NotImplemented"); return false; } + void Open( hsStream *base, uint32_t offset, uint32_t length ); + virtual bool Close() { fBase = nil; fOffset = 0; fLength = 0; return true; } + virtual bool AtEnd(); virtual uint32_t Read(uint32_t byteCount, void* buffer); virtual uint32_t Write(uint32_t byteCount, const void* buffer); - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - virtual void FastFwd(); - virtual void Truncate(); + virtual void Skip(uint32_t deltaByteCount); + virtual void Rewind(); + virtual void FastFwd(); + virtual void Truncate(); virtual uint32_t GetEOF(); }; @@ -385,17 +377,17 @@ public: hsRAMStream(uint32_t chunkSize); virtual ~hsRAMStream(); - virtual hsBool Open(const char *, const char *) { hsAssert(0, "hsRAMStream::Open NotImplemented"); return false; } - virtual hsBool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "hsRAMStream::Open NotImplemented"); return false; } - virtual hsBool Close() { hsAssert(0, "hsRAMStream::Close NotImplemented"); return false; } + virtual bool Open(const char *, const char *) { hsAssert(0, "hsRAMStream::Open NotImplemented"); return false; } + virtual bool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "hsRAMStream::Open NotImplemented"); return false; } + virtual bool Close() { hsAssert(0, "hsRAMStream::Close NotImplemented"); return false; } - virtual hsBool AtEnd(); + virtual bool AtEnd(); virtual uint32_t Read(uint32_t byteCount, void * buffer); virtual uint32_t Write(uint32_t byteCount, const void* buffer); - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - virtual void Truncate(); + virtual void Skip(uint32_t deltaByteCount); + virtual void Rewind(); + virtual void Truncate(); virtual uint32_t GetEOF(); virtual void CopyToMem(void* mem); @@ -406,18 +398,18 @@ public: class hsNullStream : public hsStream { public: - virtual hsBool Open(const char *, const char *) { return true; } - virtual hsBool Open(const wchar_t *, const wchar_t *) { return true; } - virtual hsBool Close() { return true; } + virtual bool Open(const char *, const char *) { return true; } + virtual bool Open(const wchar_t *, const wchar_t *) { return true; } + virtual bool Close() { return true; } virtual uint32_t Read(uint32_t byteCount, void * buffer); // throw's exception virtual uint32_t Write(uint32_t byteCount, const void* buffer); - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - virtual void Truncate(); + virtual void Skip(uint32_t deltaByteCount); + virtual void Rewind(); + virtual void Truncate(); - uint32_t GetBytesWritten() const { return fBytesRead; } - void Reset( ) { fBytesRead = 0; } + uint32_t GetBytesWritten() const { return fBytesRead; } + void Reset( ) { fBytesRead = 0; } }; // read only mem stream @@ -430,19 +422,19 @@ public: hsReadOnlyStream(int size, const void* data) { Init(size, data); } hsReadOnlyStream() {} - virtual void Init(int size, const void* data) { fStart=((char*)data); fData=((char*)data); fStop=((char*)data + size); } - virtual hsBool Open(const char *, const char *) { hsAssert(0, "hsReadOnlyStream::Open NotImplemented"); return false; } - virtual hsBool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "hsReadOnlyStream::Open NotImplemented"); return false; } - virtual hsBool Close() { hsAssert(0, "hsReadOnlyStream::Close NotImplemented"); return false; } - virtual hsBool AtEnd(); + virtual void Init(int size, const void* data) { fStart=((char*)data); fData=((char*)data); fStop=((char*)data + size); } + virtual bool Open(const char *, const char *) { hsAssert(0, "hsReadOnlyStream::Open NotImplemented"); return false; } + virtual bool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "hsReadOnlyStream::Open NotImplemented"); return false; } + virtual bool Close() { hsAssert(0, "hsReadOnlyStream::Close NotImplemented"); return false; } + virtual bool AtEnd(); virtual uint32_t Read(uint32_t byteCount, void * buffer); virtual uint32_t Write(uint32_t byteCount, const void* buffer); // throws exception - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - virtual void Truncate(); + virtual void Skip(uint32_t deltaByteCount); + virtual void Rewind(); + virtual void Truncate(); virtual uint32_t GetBytesRead() const { return fBytesRead; } virtual uint32_t GetEOF() { return (uint32_t)(fStop-fStart); } - virtual void CopyToMem(void* mem); + virtual void CopyToMem(void* mem); }; // write only mem stream @@ -451,9 +443,9 @@ public: hsWriteOnlyStream(int size, const void* data) : hsReadOnlyStream(size, data) {} hsWriteOnlyStream() {} - virtual hsBool Open(const char *, const char *) { hsAssert(0, "hsWriteOnlyStream::Open NotImplemented"); return false; } - virtual hsBool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "hsWriteOnlyStream::Open NotImplemented"); return false; } - virtual hsBool Close() { hsAssert(0, "hsWriteOnlyStream::Close NotImplemented"); return false; } + virtual bool Open(const char *, const char *) { hsAssert(0, "hsWriteOnlyStream::Open NotImplemented"); return false; } + virtual bool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "hsWriteOnlyStream::Open NotImplemented"); return false; } + virtual bool Close() { hsAssert(0, "hsWriteOnlyStream::Close NotImplemented"); return false; } virtual uint32_t Read(uint32_t byteCount, void * buffer); // throws exception virtual uint32_t Write(uint32_t byteCount, const void* buffer); virtual uint32_t GetBytesRead() const { return 0; } @@ -472,16 +464,16 @@ public: hsQueueStream(int32_t size); ~hsQueueStream(); - virtual hsBool Open(const char *, const char *) { hsAssert(0, "hsQueueStream::Open NotImplemented"); return false; } - virtual hsBool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "hsQueueStream::Open NotImplemented"); return false; } - virtual hsBool Close() { hsAssert(0, "hsQueueStream::Close NotImplemented"); return false; } + virtual bool Open(const char *, const char *) { hsAssert(0, "hsQueueStream::Open NotImplemented"); return false; } + virtual bool Open(const wchar_t *, const wchar_t *) { hsAssert(0, "hsQueueStream::Open NotImplemented"); return false; } + virtual bool Close() { hsAssert(0, "hsQueueStream::Close NotImplemented"); return false; } virtual uint32_t Read(uint32_t byteCount, void * buffer); virtual uint32_t Write(uint32_t byteCount, const void* buffer); - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - virtual void FastFwd(); - virtual hsBool AtEnd(); + virtual void Skip(uint32_t deltaByteCount); + virtual void Rewind(); + virtual void FastFwd(); + virtual bool AtEnd(); uint32_t GetSize() { return fSize; } const char* GetQueue() { return fQueue; } @@ -501,7 +493,7 @@ class hsBufferedStream : public hsStream // a partial block at the end of the file. uint32_t fBufferLen; - hsBool fWriteBufferUsed; + bool fWriteBufferUsed; #ifdef HS_DEBUGGING // For doing statistics on how efficient we are @@ -515,16 +507,16 @@ public: hsBufferedStream(); virtual ~hsBufferedStream(); - virtual hsBool Open(const char* name, const char* mode = "rb"); - virtual hsBool Open(const wchar_t* name, const wchar_t* mode = L"rb"); - virtual hsBool Close(); + virtual bool Open(const char* name, const char* mode = "rb"); + virtual bool Open(const wchar_t* name, const wchar_t* mode = L"rb"); + virtual bool Close(); - virtual hsBool AtEnd(); + virtual bool AtEnd(); virtual uint32_t Read(uint32_t byteCount, void* buffer); virtual uint32_t Write(uint32_t byteCount, const void* buffer); - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - virtual void Truncate(); + virtual void Skip(uint32_t deltaByteCount); + virtual void Rewind(); + virtual void Truncate(); virtual uint32_t GetEOF(); FILE* GetFileRef(); diff --git a/Sources/Plasma/CoreLib/hsStringTokenizer.cpp b/Sources/Plasma/CoreLib/hsStringTokenizer.cpp index cb7becbc..f6c633d4 100644 --- a/Sources/Plasma/CoreLib/hsStringTokenizer.cpp +++ b/Sources/Plasma/CoreLib/hsStringTokenizer.cpp @@ -61,12 +61,12 @@ hsStringTokenizer::~hsStringTokenizer() delete[] fSeps; } -hsBool hsStringTokenizer::HasMoreTokens() +bool hsStringTokenizer::HasMoreTokens() { return (*fTok != 0); } -inline hsBool hsStringTokenizer::IsSep(char c) +inline bool hsStringTokenizer::IsSep(char c) { if (!fQAsTok || !fInQuote) { @@ -111,7 +111,7 @@ char *hsStringTokenizer::next() } // Slightly more loop-friendly version of next -hsBool hsStringTokenizer::Next( char *token, uint32_t maxTokLen ) +bool hsStringTokenizer::Next( char *token, uint32_t maxTokLen ) { char *t = next(); if( t == nil ) @@ -161,7 +161,7 @@ void hsStringTokenizer::Reset(const char *string, const char *seps) // next(); } -void hsStringTokenizer::ParseQuotes(hsBool qAsTok) +void hsStringTokenizer::ParseQuotes(bool qAsTok) { fQAsTok = qAsTok; } @@ -185,12 +185,12 @@ hsWStringTokenizer::~hsWStringTokenizer() delete[] fSeps; } -hsBool hsWStringTokenizer::HasMoreTokens() +bool hsWStringTokenizer::HasMoreTokens() { return (*fTok != L'\0'); } -inline hsBool hsWStringTokenizer::IsSep(wchar_t c) +inline bool hsWStringTokenizer::IsSep(wchar_t c) { if (!fQAsTok || !fInQuote) { @@ -235,7 +235,7 @@ wchar_t *hsWStringTokenizer::next() } // Slightly more loop-friendly version of next -hsBool hsWStringTokenizer::Next( wchar_t *token, uint32_t maxTokLen ) +bool hsWStringTokenizer::Next( wchar_t *token, uint32_t maxTokLen ) { wchar_t *t = next(); if( t == nil ) @@ -303,7 +303,7 @@ void hsWStringTokenizer::Reset(const wchar_t *string, const wchar_t *seps) // next(); } -void hsWStringTokenizer::ParseQuotes(hsBool qAsTok) +void hsWStringTokenizer::ParseQuotes(bool qAsTok) { fQAsTok = qAsTok; } diff --git a/Sources/Plasma/CoreLib/hsStringTokenizer.h b/Sources/Plasma/CoreLib/hsStringTokenizer.h index d3f4f94d..ecb7044e 100644 --- a/Sources/Plasma/CoreLib/hsStringTokenizer.h +++ b/Sources/Plasma/CoreLib/hsStringTokenizer.h @@ -59,17 +59,17 @@ private: char fLastRep; int32_t fNumSeps; - hsBool fQAsTok; - hsBool fInQuote; - hsBool fCheckAlphaNum; + bool fQAsTok; + bool fInQuote; + bool fCheckAlphaNum; public: hsStringTokenizer(const char *string=nil, const char *seps=nil); ~hsStringTokenizer(); char *next(); - hsBool Next( char *token, uint32_t maxTokLen ); - hsBool HasMoreTokens(); + bool Next( char *token, uint32_t maxTokLen ); + bool HasMoreTokens(); void Reset(const char *string, const char *seps); - void ParseQuotes(hsBool qAsTok); + void ParseQuotes(bool qAsTok); char *GetRestOfString( void ) const { return fTok; } @@ -78,7 +78,7 @@ public: void RestoreLastTerminator( void ); private: - hsBool IsSep(char c); + bool IsSep(char c); }; class hsWStringTokenizer @@ -90,17 +90,17 @@ private: wchar_t fLastRep; int32_t fNumSeps; - hsBool fQAsTok; - hsBool fInQuote; - hsBool fCheckAlphaNum; + bool fQAsTok; + bool fInQuote; + bool fCheckAlphaNum; public: hsWStringTokenizer(const wchar_t *string=nil, const wchar_t *seps=nil); ~hsWStringTokenizer(); wchar_t *next(); - hsBool Next( wchar_t *token, uint32_t maxTokLen ); - hsBool HasMoreTokens(); + bool Next( wchar_t *token, uint32_t maxTokLen ); + bool HasMoreTokens(); void Reset(const wchar_t *string, const wchar_t *seps); - void ParseQuotes(hsBool qAsTok); + void ParseQuotes(bool qAsTok); wchar_t *GetRestOfString( void ) const { return fTok; } @@ -109,7 +109,7 @@ public: void RestoreLastTerminator( void ); private: - hsBool IsSep(wchar_t c); + bool IsSep(wchar_t c); }; #endif // _hsStringTokenizer_Included_ diff --git a/Sources/Plasma/CoreLib/hsTemplates.h b/Sources/Plasma/CoreLib/hsTemplates.h index f178429b..8272d97a 100644 --- a/Sources/Plasma/CoreLib/hsTemplates.h +++ b/Sources/Plasma/CoreLib/hsTemplates.h @@ -224,7 +224,7 @@ public: template class hsDynamicArray { private: - int32_t fCount; + int32_t fCount; T* fArray; hsDynamicArray& operator=(const hsDynamicArray&); // don't allow assignment @@ -235,28 +235,28 @@ public: virtual ~hsDynamicArray(); int32_t GetCount() const { return fCount; } - hsBool IsEmpty() const { return fCount == 0; } - const T& Get(int32_t index) const; + bool IsEmpty() const { return fCount == 0; } + const T& Get(int32_t index) const; int32_t Get(int32_t index, int32_t count, T data[]) const; int32_t Find(const T&) const; // returns kMissingIndex if not found - void SetCount(int32_t count); - T& operator[]( int32_t index ); + void SetCount(int32_t count); + T& operator[]( int32_t index ); int32_t Append(const T&); int32_t InsertAtIndex(uint32_t index, const T& obj); int32_t Push(const T&); int32_t Pop(T*); - void Remove(int32_t); - void Reset(); // clears out everything + void Remove(int32_t); + void Reset(); // clears out everything - T* AcquireArray() { return fArray; } - T* DetachArray() { T* t = fArray; fCount = 0; fArray = nil; return t; } - void ReleaseArray(T*) {} - hsDynamicArray* Copy(hsDynamicArray* dst = nil) const; + T* AcquireArray() { return fArray; } + T* DetachArray() { T* t = fArray; fCount = 0; fArray = nil; return t; } + void ReleaseArray(T*) {} + hsDynamicArray* Copy(hsDynamicArray* dst = nil) const; - T* ForEach(bool (*proc)(T&)); - T* ForEach(bool (*proc)(T&, void* p1), void* p1); - T* ForEach(bool (*proc)(T&, void* p1, void* p2), void* p1, void* p2); + T* ForEach(int32_t (*proc)(T&)); + T* ForEach(int32_t (*proc)(T&, void* p1), void* p1); + T* ForEach(int32_t (*proc)(T&, void* p1, void* p2), void* p1, void* p2); }; // Use this for block of memory allocated with HSMemory::New() @@ -475,7 +475,7 @@ hsDynamicArray* hsDynamicArray::Copy(hsDynamicArray* dst) const return dst; } -template T* hsDynamicArray::ForEach(bool (*proc)(T&)) +template T* hsDynamicArray::ForEach(int32_t (*proc)(T&)) { for (int i = 0; i < fCount; i++) if (proc(fArray[i])) @@ -483,7 +483,7 @@ template T* hsDynamicArray::ForEach(bool (*proc)(T&)) return nil; } -template T* hsDynamicArray::ForEach(bool (*proc)(T&, void* p1), void * p1) +template T* hsDynamicArray::ForEach(int32_t (*proc)(T&, void* p1), void * p1) { for (int i = 0; i < fCount; i++) if (proc(fArray[i], p1)) @@ -491,7 +491,7 @@ template T* hsDynamicArray::ForEach(bool (*proc)(T&, void* p1), voi return nil; } -template T* hsDynamicArray::ForEach(bool (*proc)(T&, void* p1, void* p2), void *p1, void *p2) +template T* hsDynamicArray::ForEach(int32_t (*proc)(T&, void* p1, void* p2), void *p1, void *p2) { for (int i = 0; i < fCount; i++) if (proc(fArray[i], p1, p2)) @@ -614,7 +614,7 @@ public: hsTArray_ValidateIndex(index + count - 1); this->DecCount(index, count); } - hsBool RemoveItem(const T& item); + bool RemoveItem(const T& item); T* Push() { @@ -638,9 +638,9 @@ public: kMissingIndex = -1 }; int Find(const T& item) const; // returns kMissingIndex if not found - inline T* ForEach(hsBool (*proc)(T&)); - inline T* ForEach(hsBool (*proc)(T&, void* p1), void* p1); - inline T* ForEach(hsBool (*proc)(T&, void* p1, void* p2), void* p1, void* p2); + inline T* ForEach(int32_t (*proc)(T&)); + inline T* ForEach(int32_t (*proc)(T&, void* p1), void* p1); + inline T* ForEach(int32_t (*proc)(T&, void* p1, void* p2), void* p1, void* p2); T* DetachArray() { @@ -813,7 +813,7 @@ template int hsTArray::Find(const T& item) const return kMissingIndex; } -template hsBool hsTArray::RemoveItem(const T& item) +template bool hsTArray::RemoveItem(const T& item) { for (int i = 0; i < fUseCount; i++) if (fArray[i] == item) @@ -870,7 +870,7 @@ template void hsTArray::DecCount(int index, int count) } } -template T* hsTArray::ForEach(hsBool (*proc)(T&)) +template T* hsTArray::ForEach(int32_t (*proc)(T&)) { for (int i = 0; i < fUseCount; i++) if (proc(fArray[i])) @@ -878,7 +878,7 @@ template T* hsTArray::ForEach(hsBool (*proc)(T&)) return nil; } -template T* hsTArray::ForEach(hsBool (*proc)(T&, void* p1), void* p1) +template T* hsTArray::ForEach(int32_t (*proc)(T&, void* p1), void* p1) { for (int i = 0; i < fUseCount; i++) if (proc(fArray[i], p1)) @@ -886,7 +886,7 @@ template T* hsTArray::ForEach(hsBool (*proc)(T&, void* p1), void* p return nil; } -template T* hsTArray::ForEach(hsBool (*proc)(T&, void* p1, void* p2), void* p1, void* p2) +template T* hsTArray::ForEach(int32_t (*proc)(T&, void* p1, void* p2), void* p1, void* p2) { for (int i = 0; i < fUseCount; i++) if (proc(fArray[i], p1, p2)) @@ -1011,7 +1011,7 @@ public: hsLargeArray_ValidateIndex(index + count - 1); this->DecCount(index, count); } - hsBool RemoveItem(const T& item); + bool RemoveItem(const T& item); T* Push() { @@ -1035,9 +1035,9 @@ public: kMissingIndex = -1 }; int Find(const T& item) const; // returns kMissingIndex if not found - inline T* ForEach(hsBool (*proc)(T&)); - inline T* ForEach(hsBool (*proc)(T&, void* p1), void* p1); - inline T* ForEach(hsBool (*proc)(T&, void* p1, void* p2), void* p1, void* p2); + inline T* ForEach(int32_t (*proc)(T&)); + inline T* ForEach(int32_t (*proc)(T&, void* p1), void* p1); + inline T* ForEach(int32_t (*proc)(T&, void* p1, void* p2), void* p1, void* p2); T* DetachArray() { @@ -1182,7 +1182,7 @@ template int hsLargeArray::Find(const T& item) const return kMissingIndex; } -template hsBool hsLargeArray::RemoveItem(const T& item) +template bool hsLargeArray::RemoveItem(const T& item) { for (int i = 0; i < fUseCount; i++) if (fArray[i] == item) @@ -1239,7 +1239,7 @@ template void hsLargeArray::DecCount(int index, int count) } } -template T* hsLargeArray::ForEach(hsBool (*proc)(T&)) +template T* hsLargeArray::ForEach(int32_t (*proc)(T&)) { for (int i = 0; i < fUseCount; i++) if (proc(fArray[i])) @@ -1247,7 +1247,7 @@ template T* hsLargeArray::ForEach(hsBool (*proc)(T&)) return nil; } -template T* hsLargeArray::ForEach(hsBool (*proc)(T&, void* p1), void* p1) +template T* hsLargeArray::ForEach(int32_t (*proc)(T&, void* p1), void* p1) { for (int i = 0; i < fUseCount; i++) if (proc(fArray[i], p1)) @@ -1255,7 +1255,7 @@ template T* hsLargeArray::ForEach(hsBool (*proc)(T&, void* p1), voi return nil; } -template T* hsLargeArray::ForEach(hsBool (*proc)(T&, void* p1, void* p2), void* p1, void* p2) +template T* hsLargeArray::ForEach(int32_t (*proc)(T&, void* p1, void* p2), void* p1, void* p2) { for (int i = 0; i < fUseCount; i++) if (proc(fArray[i], p1, p2)) diff --git a/Sources/Plasma/CoreLib/hsThread.h b/Sources/Plasma/CoreLib/hsThread.h index c27e2118..e3d510a5 100644 --- a/Sources/Plasma/CoreLib/hsThread.h +++ b/Sources/Plasma/CoreLib/hsThread.h @@ -68,20 +68,20 @@ public: typedef pthread_t ThreadId; #endif private: - hsBool fQuit; - uint32_t fStackSize; + bool fQuit; + uint32_t fStackSize; #if HS_BUILD_FOR_WIN32 ThreadId fThreadId; HANDLE fThreadH; HANDLE fQuitSemaH; #elif HS_BUILD_FOR_UNIX ThreadId fPThread; - hsBool fIsValid; + bool fIsValid; pthread_mutex_t fMutex; #endif protected: - hsBool GetQuit() const { return hsBool(fQuit); } - void SetQuit(hsBool value) { fQuit = value; } + bool GetQuit() const { return fQuit; } + void SetQuit(bool value) { fQuit = value; } public: hsThread(uint32_t stackSize = 0); virtual ~hsThread(); // calls Stop() @@ -121,7 +121,7 @@ public: #endif void Lock(); - hsBool TryLock(); + bool TryLock(); void Unlock(); }; @@ -165,8 +165,8 @@ public: HANDLE GetHandle() const { return fSemaH; } #endif - hsBool TryWait(); - hsBool Wait(hsMilliseconds timeToWait = kPosInfinity32); + bool TryWait(); + bool Wait(hsMilliseconds timeToWait = kPosInfinity32); void Signal(); }; @@ -177,7 +177,7 @@ class hsEvent #ifndef PSEUDO_EVENT pthread_mutex_t fMutex; pthread_cond_t fCond; - hsBool fTriggered; + bool fTriggered; #else enum { kRead, kWrite }; int fFds[2]; @@ -195,8 +195,8 @@ public: HANDLE GetHandle() const { return fEvent; } #endif - hsBool Wait(hsMilliseconds timeToWait = kPosInfinity32); - void Signal(); + bool Wait(hsMilliseconds timeToWait = kPosInfinity32); + void Signal(); }; ////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/Plasma/CoreLib/hsThread_Mac.cpp b/Sources/Plasma/CoreLib/hsThread_Mac.cpp index e4b3069b..f7a9594e 100644 --- a/Sources/Plasma/CoreLib/hsThread_Mac.cpp +++ b/Sources/Plasma/CoreLib/hsThread_Mac.cpp @@ -153,7 +153,7 @@ hsSemaphore::~hsSemaphore() hsThrowIfOSErr(status); } -hsBool hsSemaphore::Wait(hsMilliseconds timeToWait) +bool hsSemaphore::Wait(hsMilliseconds timeToWait) { Duration duration; diff --git a/Sources/Plasma/CoreLib/hsThread_Unix.cpp b/Sources/Plasma/CoreLib/hsThread_Unix.cpp index c625fc05..d42c0593 100644 --- a/Sources/Plasma/CoreLib/hsThread_Unix.cpp +++ b/Sources/Plasma/CoreLib/hsThread_Unix.cpp @@ -253,7 +253,7 @@ void hsMutex::Lock() #endif } -hsBool hsMutex::TryLock() +bool hsMutex::TryLock() { int status = ::pthread_mutex_trylock(&fPMutex); hsThrowIfOSErr(status); @@ -316,7 +316,7 @@ hsSemaphore::~hsSemaphore() #endif } -hsBool hsSemaphore::TryWait() +bool hsSemaphore::TryWait() { #ifdef USE_SEMA int status = ::sem_trywait(fPSema); @@ -328,7 +328,7 @@ hsBool hsSemaphore::TryWait() #endif } -hsBool hsSemaphore::Wait(hsMilliseconds timeToWait) +bool hsSemaphore::Wait(hsMilliseconds timeToWait) { #ifdef USE_SEMA // SHOULDN'T THIS USE timeToWait??!?!? -rje // shouldn't this use sem_timedwait? -dpogue (2012-03-04) @@ -337,7 +337,7 @@ hsBool hsSemaphore::Wait(hsMilliseconds timeToWait) hsThrowIfOSErr(status); return true; #else - hsBool retVal = true; + bool retVal = true; int status = ::pthread_mutex_lock(&fPMutex); hsThrowIfOSErr(status); @@ -430,9 +430,9 @@ hsEvent::~hsEvent() hsThrowIfOSErr(status); } -hsBool hsEvent::Wait(hsMilliseconds timeToWait) +bool hsEvent::Wait(hsMilliseconds timeToWait) { - hsBool retVal = true; + bool retVal = true; int status = ::pthread_mutex_lock(&fMutex); hsAssert(status == 0, "hsEvent Mutex Lock"); hsThrowIfOSErr(status); @@ -530,7 +530,7 @@ hsEvent::~hsEvent() close( fFds[kWrite] ); } -hsBool hsEvent::Wait( hsMilliseconds timeToWait ) +bool hsEvent::Wait( hsMilliseconds timeToWait ) { hsTempMutexLock lock( fWaitLock ); diff --git a/Sources/Plasma/CoreLib/hsThread_Win.cpp b/Sources/Plasma/CoreLib/hsThread_Win.cpp index 7cb6b9a9..388022f7 100644 --- a/Sources/Plasma/CoreLib/hsThread_Win.cpp +++ b/Sources/Plasma/CoreLib/hsThread_Win.cpp @@ -142,7 +142,7 @@ void hsMutex::Lock() hsAssert(state != WAIT_TIMEOUT,"hsMutex::Lock -> Infinite Timeout expired?"); } -hsBool hsMutex::TryLock() +bool hsMutex::TryLock() { DWORD state = ::WaitForSingleObject(fMutexH, 0); hsAssert(state != WAIT_ABANDONED,"hsMutex::TryLock -> Abandoned Mutex"); @@ -170,14 +170,14 @@ hsSemaphore::~hsSemaphore() ::CloseHandle(fSemaH); } -hsBool hsSemaphore::TryWait() +bool hsSemaphore::TryWait() { DWORD result = ::WaitForSingleObject(fSemaH, 0); hsAssert(result != WAIT_ABANDONED, "hsSemaphore -> Abandoned Semaphore"); return result == WAIT_OBJECT_0; } -hsBool hsSemaphore::Wait(hsMilliseconds timeToWait) +bool hsSemaphore::Wait(hsMilliseconds timeToWait) { if (timeToWait == kPosInfinity32) timeToWait = INFINITE; @@ -211,7 +211,7 @@ hsEvent::~hsEvent() ::CloseHandle(fEvent); } -hsBool hsEvent::Wait(hsMilliseconds timeToWait) +bool hsEvent::Wait(hsMilliseconds timeToWait) { if (timeToWait == kPosInfinity32) timeToWait = INFINITE; diff --git a/Sources/Plasma/CoreLib/hsTypes.h b/Sources/Plasma/CoreLib/hsTypes.h deleted file mode 100644 index ed2ec9f9..00000000 --- a/Sources/Plasma/CoreLib/hsTypes.h +++ /dev/null @@ -1,414 +0,0 @@ -/*==LICENSE==* - -CyanWorlds.com Engine - MMOG client, server and tools -Copyright (C) 2011 Cyan Worlds, Inc. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -Additional permissions under GNU GPL version 3 section 7 - -If you modify this Program, or any covered work, by linking or -combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK, -NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent -JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK -(or a modified version of those libraries), -containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA, -PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG -JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the -licensors of this Program grant you additional -permission to convey the resulting work. Corresponding Source for a -non-source form of such a combination shall include the source code for -the parts of OpenSSL and IJG JPEG Library used as well as that of the covered -work. - -You can contact Cyan Worlds, Inc. by email legal@cyan.com - or by snail mail at: - Cyan Worlds, Inc. - 14617 N Newport Hwy - Mead, WA 99021 - -*==LICENSE==*/ - -#ifdef _HSTYPES_H -# error "Do not include hsTypes.h directly--use HeadSpin.h" -#endif // _HSTYPES_H -#define _HSTYPES_H - - -/************************** Other Includes *****************************/ -#include -#include -#include -#include - - -/************************** Basic Macros *****************************/ - -#ifdef __cplusplus - #define hsCTypeDefStruct(foo) -#else - #define hsCTypeDefStruct(foo) typedef struct foo foo; -#endif - -#ifdef HS_BUILD_FOR_WIN32 -# ifndef CDECL -# define CDECL __cdecl -# endif -#else -# define CDECL -#endif - -/************************** Basic Types *****************************/ - -#if defined(_MSC_VER) && _MSC_VER < 1600 - typedef signed char int8_t; - typedef unsigned char uint8_t; - typedef signed short int int16_t; - typedef unsigned short int uint16_t; - typedef signed int int32_t; - typedef unsigned int uint32_t; - typedef signed long long int64_t; - typedef unsigned long long uint64_t; -#else - #include -#endif - -#define kPosInfinity16 (32767) -#define kNegInfinity16 (-32768) - -#define kPosInfinity32 (0x7fffffff) -#define kNegInfinity32 (0x80000000) - -#ifndef M_PI -# define M_PI 3.14159265358979323846 -#endif - -#ifdef __cplusplus - -typedef int hsBool; - -#endif - -#ifndef nil -#define nil (0) -#endif - -typedef int32_t hsError; -typedef uint32_t hsGSeedValue; - -#define hsOK 0 -#define hsFail -1 -#define hsFailed(r) ((hsError)(r)=hsOK) - -#define hsLongAlign(n) (((n) + 3) & ~3L) - -#define hsMaximum(a, b) ((a) > (b) ? (a) : (b)) -#define hsMinimum(a, b) ((a) < (b) ? (a) : (b)) -#define hsABS(x) ((x) < 0 ? -(x) : (x)) -#define hsSGN(x) (((x) < 0) ? -1 : ( ((x) > 0) ? 1 : 0 )) - -#define hsBitTst2Bool(value, mask) (((value) & (mask)) != 0) - -#define hsFourByteTag(a, b, c, d) (((uint32_t)(a) << 24) | ((uint32_t)(b) << 16) | ((uint32_t)(c) << 8) | (d)) - - -/************************** Swap Macros *****************************/ - - inline uint16_t hsSwapEndian16(uint16_t value) - { - return (value >> 8) | (value << 8); - } - inline uint32_t hsSwapEndian32(uint32_t value) - { - return ((value) << 24) | - ((value & 0x0000ff00) << 8) | - ((value & 0x00ff0000) >> 8) | - ((value) >> 24); - } - inline uint64_t hsSwapEndian64(uint64_t value) - { - return ((value) << 56) | - ((value & 0x000000000000ff00) << 40) | - ((value & 0x0000000000ff0000) << 24) | - ((value & 0x00000000ff000000) << 8) | - ((value & 0x000000ff00000000) >> 8) | - ((value & 0x0000ff0000000000) >> 24) | - ((value & 0x00ff000000000000) >> 40) | - ((value) >> 56); - } - inline float hsSwapEndianFloat(float fvalue) - { - uint32_t value = *(uint32_t*)&fvalue; - value = hsSwapEndian32(value); - return *(float*)&value; - } - inline double hsSwapEndianDouble(double dvalue) - { - uint64_t value = *(uint64_t*)&dvalue; - value = hsSwapEndian64(value); - return *(double*)&value; - } - - #if LITTLE_ENDIAN - #define hsToBE16(n) hsSwapEndian16(n) - #define hsToBE32(n) hsSwapEndian32(n) - #define hsToBE64(n) hsSwapEndian64(n) - #define hsToBEFloat(n) hsSwapEndianFloat(n) - #define hsToBEDouble(n) hsSwapEndianDouble(n) - #define hsToLE16(n) (n) - #define hsToLE32(n) (n) - #define hsToLE64(n) (n) - #define hsToLEFloat(n) (n) - #define hsToLEDouble(n) (n) - #else - #define hsToBE16(n) (n) - #define hsToBE32(n) (n) - #define hsToBE64(n) (n) - #define hsToBEFloat(n) (n) - #define hsToBEDouble(n) (n) - #define hsToLE16(n) hsSwapEndian16(n) - #define hsToLE32(n) hsSwapEndian32(n) - #define hsToLE64(n) hsSwapEndian64(n) - #define hsToLEFloat(n) hsSwapEndianFloat(n) - #define hsToLEDouble(n) hsSwapEndianDouble(n) - #endif - - inline void hsSwap(int32_t& a, int32_t& b) - { - int32_t c = a; - a = b; - b = c; - } - - inline void hsSwap(uint32_t& a, uint32_t& b) - { - uint32_t c = a; - a = b; - b = c; - } - - inline void hsSwap(float& a, float& b) - { - float c = a; - a = b; - b = c; - } - -/************************** Color32 Type *****************************/ - -struct hsColor32 { - - uint8_t b, g, r, a; - - void SetARGB(uint8_t aa, uint8_t rr, uint8_t gg, uint8_t bb) - { - this->a = aa; this->r = rr; this->g = gg; this->b = bb; - } - - // Compatibility inlines, should be depricated - void Set(uint8_t rr, uint8_t gg, uint8_t bb) - { - this->r = rr; this->g = gg; this->b = bb; - } - void Set(uint8_t aa, uint8_t rr, uint8_t gg, uint8_t bb) - { - this->SetARGB(aa, rr, gg, bb); - } - - int operator==(const hsColor32& aa) const - { - return *(uint32_t*)&aa == *(uint32_t*)this; - } - int operator!=(const hsColor32& aa) { return !(aa == *this); } -}; -hsCTypeDefStruct(hsColor32) - -typedef hsColor32 hsRGBAColor32; - - -/**************************************************************************** -* -* NULL_STMT -* Declares a null statement -* -* Example: -* -* for (; *str && (*str != ch); ++str) -* NULL_STMT; -* -***/ - - -#ifdef _MSC_VER -# define NULL_STMT __noop -#else -# define NULL_STMT ((void)0) -#endif - - -/**************************************************************************** -* -* UNIQUE_SYMBOL -* Creates a symbol that is unique within a file -* -***/ - -#define UNIQUE_SYMBOL_EXPAND_1(prefix,line) UNIQUE_SYMBOL_##prefix##_##line -#define UNIQUE_SYMBOL_EXPAND_0(prefix,line) UNIQUE_SYMBOL_EXPAND_1(prefix,line) -#define UNIQUE_SYMBOL(prefix) UNIQUE_SYMBOL_EXPAND_0(prefix,__LINE__) - - - -/**************************************************************************** -* -* COMPILER_ASSERT -* Performs a "compile-time" assertion -* Can be used at function or file scope -* Upon assertion failure, creates a negative subscript error -* Use COMPILER_ASSERT_HEADER in header files to prevent symbol collision -* -***/ - -#define COMPILER_ASSERT(expr) static char UNIQUE_SYMBOL(a)[(expr) ? 1 : -1] -#define COMPILER_ASSERT_HEADER(prefix,expr) static char UNIQUE_SYMBOL(prefix)[(expr) ? 1 : -1] -#define COMPILER_ASSERT_SYMBOL(symbol,expr) static char symbol[(expr) ? 1 : -1] - - -/**************************************************************************** -* -* max/min inline functions -* -***/ - -#ifdef max -#undef max -#endif - -#ifdef min -#undef min -#endif - -//=========================================================================== -template -inline T max (const T & a, const T & b) { - return (a > b) ? a : b; -} - -//=========================================================================== -inline unsigned max (int a, unsigned b) { - return ((unsigned)a > b) ? a : b; -} - -//=========================================================================== -inline unsigned max (unsigned a, int b) { - return (a > (unsigned)b) ? a : b; -} - -//=========================================================================== -template -inline T min (const T & a, const T & b) { - return (a < b) ? a : b; -} - -//=========================================================================== -inline unsigned min (int a, unsigned b) { - return ((unsigned)a < b) ? a : b; -} - -//=========================================================================== -inline unsigned min (unsigned a, int b) { - return (a < (unsigned)b) ? a : b; -} - - -/**************************************************************************** -* -* MAX/MIN macros -* These are less safe than the inline function versions, since they -* evaluate parameters twice. However, they can be used to produce -* compile-time constants. -* -***/ - -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) - - -/**************************************************************************** -* -* SWAP -* Swaps the values of two variables -* -***/ - -//=========================================================================== -template -void SWAP (T & a, T & b) { - T temp = a; - a = b; - b = temp; -} - - -/**************************************************************************** -* -* AUTO_INIT_FUNC -* Declares a function that is automatically called at program startup time -* -* Example: -* -* AUTO_INIT_FUNC(BuildLookupTables) { -* ... -* } -* -***/ - -#define AUTO_INIT_FUNC(name) namespace { struct name { name (); } name##_instance; } name::name () - - -/**************************************************************************** -* -* arrsize -* arrsize returns the number of elements in an array variable -* -* Example: -* -* StrPrintf(buffer, arrsize(buffer), "%u", value); -* -***/ - -#define arrsize(a) (sizeof(a) / sizeof((a)[0])) - - -/**************************************************************************** -* -* IS_POW2 -* -***/ - -#define IS_POW2(val) (!((val) & ((val) - 1))) - -#ifdef PLASMA_EXTERNAL_RELEASE - - #define hsStatusMessage(x) NULL_STMT - #define hsStatusMessageF(x, ...) NULL_STMT - -#else /* Not external release */ - - void hsStatusMessage(const char message[]); - void hsStatusMessageF(const char * fmt, ...); - -#endif // PLASMA_EXTERNAL_RELEASE - diff --git a/Sources/Plasma/CoreLib/hsUtils.cpp b/Sources/Plasma/CoreLib/hsUtils.cpp deleted file mode 100644 index 45e5f0e0..00000000 --- a/Sources/Plasma/CoreLib/hsUtils.cpp +++ /dev/null @@ -1,591 +0,0 @@ -/*==LICENSE==* - -CyanWorlds.com Engine - MMOG client, server and tools -Copyright (C) 2011 Cyan Worlds, Inc. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -Additional permissions under GNU GPL version 3 section 7 - -If you modify this Program, or any covered work, by linking or -combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK, -NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent -JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK -(or a modified version of those libraries), -containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA, -PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG -JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the -licensors of this Program grant you additional -permission to convey the resulting work. Corresponding Source for a -non-source form of such a combination shall include the source code for -the parts of OpenSSL and IJG JPEG Library used as well as that of the covered -work. - -You can contact Cyan Worlds, Inc. by email legal@cyan.com - or by snail mail at: - Cyan Worlds, Inc. - 14617 N Newport Hwy - Mead, WA 99021 - -*==LICENSE==*/ - -#include "HeadSpin.h" -#include "hsStlUtils.h" -#include "hsTemplates.h" -#include - - -char * hsFormatStr(const char * fmt, ...) -{ - va_list args; - va_start(args,fmt); - char * result = hsFormatStrV(fmt,args); - va_end(args); - return result; -} - -char * hsFormatStrV(const char * fmt, va_list args) -{ - std::string buf; - xtl::formatv(buf,fmt,args); - return hsStrcpy(buf.c_str()); -} - -static char hsStrBuf[100]; - -char *hsScalarToStr(float s) -{ - sprintf(hsStrBuf, "%f", s); - return hsStrBuf; -} - -class hsMinimizeClientGuard -{ -#ifdef CLIENT - hsWindowHndl fWnd; - -public: - hsMinimizeClientGuard() - { -#ifdef HS_BUILD_FOR_WIN32 - fWnd = GetActiveWindow(); - // If the application's topmost window is fullscreen, minimize it before displaying an error - if ((GetWindowLong(fWnd, GWL_STYLE) & WS_POPUP) != 0) - ShowWindow(fWnd, SW_MINIMIZE); -#endif // HS_BUILD_FOR_WIN32 - } - - ~hsMinimizeClientGuard() - { -#ifdef HS_BUILD_FOR_WIN32 - ShowWindow(fWnd, SW_RESTORE); -#endif // HS_BUILD_FOR_WIN32 - } -#endif // CLIENT -}; - -bool hsMessageBox_SuppressPrompts = false; - -int hsMessageBoxWithOwner(hsWindowHndl owner, const char message[], const char caption[], int kind, int icon) -{ - if (hsMessageBox_SuppressPrompts) - return hsMBoxOk; - -#if HS_BUILD_FOR_WIN32 - uint32_t flags = 0; - - if (kind == hsMessageBoxNormal) - flags |= MB_OK; - else if (kind == hsMessageBoxAbortRetyIgnore) - flags |= MB_ABORTRETRYIGNORE; - else if (kind == hsMessageBoxOkCancel) - flags |= MB_OKCANCEL; - else if (kind == hsMessageBoxRetryCancel) - flags |= MB_RETRYCANCEL; - else if (kind == hsMessageBoxYesNo) - flags |= MB_YESNO; - else if (kind == hsMessageBoxYesNoCancel) - flags |= MB_YESNOCANCEL; - else - flags |= MB_OK; - - if (icon == hsMessageBoxIconError) - flags |= MB_ICONERROR; - else if (icon == hsMessageBoxIconQuestion) - flags |= MB_ICONQUESTION; - else if (icon == hsMessageBoxIconExclamation) - flags |= MB_ICONEXCLAMATION; - else if (icon == hsMessageBoxIconAsterisk) - flags |= MB_ICONASTERISK; - else - flags |= MB_ICONERROR; - - hsMinimizeClientGuard guard; - int ans = MessageBox(owner, message, caption, flags); - - switch (ans) - { - case IDOK: return hsMBoxOk; - case IDCANCEL: return hsMBoxCancel; - case IDABORT: return hsMBoxAbort; - case IDRETRY: return hsMBoxRetry; - case IDIGNORE: return hsMBoxIgnore; - case IDYES: return hsMBoxYes; - case IDNO: return hsMBoxNo; - default: return hsMBoxCancel; - } - -#endif -} - -int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t message[], const wchar_t caption[], int kind, int icon) -{ - if (hsMessageBox_SuppressPrompts) - return hsMBoxOk; - -#if HS_BUILD_FOR_WIN32 - uint32_t flags = 0; - - if (kind == hsMessageBoxNormal) - flags |= MB_OK; - else if (kind == hsMessageBoxAbortRetyIgnore) - flags |= MB_ABORTRETRYIGNORE; - else if (kind == hsMessageBoxOkCancel) - flags |= MB_OKCANCEL; - else if (kind == hsMessageBoxRetryCancel) - flags |= MB_RETRYCANCEL; - else if (kind == hsMessageBoxYesNo) - flags |= MB_YESNO; - else if (kind == hsMessageBoxYesNoCancel) - flags |= MB_YESNOCANCEL; - else - flags |= MB_OK; - - if (icon == hsMessageBoxIconError) - flags |= MB_ICONERROR; - else if (icon == hsMessageBoxIconQuestion) - flags |= MB_ICONQUESTION; - else if (icon == hsMessageBoxIconExclamation) - flags |= MB_ICONEXCLAMATION; - else if (icon == hsMessageBoxIconAsterisk) - flags |= MB_ICONASTERISK; - else - flags |= MB_ICONERROR; - - hsMinimizeClientGuard guard; - int ans = MessageBoxW(owner, message, caption, flags); - - switch (ans) - { - case IDOK: return hsMBoxOk; - case IDCANCEL: return hsMBoxCancel; - case IDABORT: return hsMBoxAbort; - case IDRETRY: return hsMBoxRetry; - case IDIGNORE: return hsMBoxIgnore; - case IDYES: return hsMBoxYes; - case IDNO: return hsMBoxNo; - default: return hsMBoxCancel; - } - -#endif -} - -int hsMessageBox(const char message[], const char caption[], int kind, int icon) -{ - return hsMessageBoxWithOwner((hsWindowHndl)nil,message,caption,kind,icon); -} - -int hsMessageBox(const wchar_t message[], const wchar_t caption[], int kind, int icon) -{ - return hsMessageBoxWithOwner((hsWindowHndl)nil,message,caption,kind,icon); -} - -inline hsBool hsCompare(float a, float b, float delta) -{ - return (fabs(a - b) < delta); -} - - -/* Generic psuedo RNG used in ANSI C. */ -static unsigned long SEED = 1; -int hsRand() -{ - register int temp; - SEED = SEED * 1103515245 + 12345; - temp = (int)((SEED/65536)&32767); - return (temp); -} - -void hsRandSeed(int seed) -{ - SEED = seed; -} -/**************************************/ -int hsStrlen(const char src[]) -{ - if (src==nil) - return 0; - - int i = 0; - while (src[i]) - i++; - return i; -} - -char* hsStrcpy(char dst[], const char src[]) -{ - if (src) - { - if (dst == nil) - { - int count = hsStrlen(src); - dst = (char *)malloc(count + 1); - memcpy(dst, src, count); - dst[count] = 0; - return dst; - } - - int32_t i; - for (i = 0; src[i] != 0; i++) - dst[i] = src[i]; - dst[i] = 0; - } - - return dst; -} - -bool hsStrEQ(const char s1[], const char s2[]) -{ - if (s1 && s2) - { - while (*s1) - if(*s1++ != *s2++) - return false; - return *s2 == 0; - } - - return (!s1 && !s2); -} - -bool hsStrCaseEQ(const char* s1, const char* s2) -{ - if (s1 && s2) - { - while (*s1) - if(tolower(*s1++) != tolower(*s2++)) - return false; - return *s2 == 0; - } - - return (!s1 && !s2); -} - -void hsStrcat(char dst[], const char src[]) -{ - if (src && dst) - { - dst += hsStrlen(dst); - while(*src) - *dst++ = *src++; - *dst = 0; - } -} - -void hsStrLower(char *s) -{ - if (s) - { - int i; - for (i = 0; i < hsStrlen(s); i++) - s[i] = tolower(s[i]); - } -} - -char* hsP2CString(const uint8_t pstring[], char cstring[]) -{ - char* cstr = cstring; - const uint8_t* stop = &pstring[1] + pstring[0]; - - pstring += 1; // skip length byte - while (pstring < stop) - *cstr++ = *pstring++; - *cstr = 0; - return cstring; -} - -uint8_t* hsC2PString(const char cstring[], uint8_t pstring[]) -{ - int i; - - for (i = 1; *cstring; i++) - pstring[i] = *cstring++; - pstring[0] = i - 1; - return pstring; -} - -//// IStringToWString ///////////////////////////////////////////////////////// -// Converts a char * string to a wchar_t * string - -wchar_t *hsStringToWString( const char *str ) -{ - // convert the char string to a wchar_t string - int len = strlen(str); - wchar_t *wideString = new wchar_t[len+1]; - for (int i=0; i versionStrs; - OSVERSIONINFOEX osvi; - BOOL bOsVersionInfoEx; - - // Try calling GetVersionEx using the OSVERSIONINFOEX structure. - // - // If that fails, try using the OSVERSIONINFO structure. - - ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); - osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - - if( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)) ) - { - // If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO. - - osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); - if (! GetVersionEx ( (OSVERSIONINFO *) &osvi) ) - return FALSE; - } - - switch (osvi.dwPlatformId) - { - case VER_PLATFORM_WIN32_NT: - - // Test for the product. - - if ( osvi.dwMajorVersion <= 4 ) - versionStrs.Append(hsStrcpy("Microsoft Windows NT ")); - - if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) - versionStrs.Append(hsStrcpy ("Microsoft Windows 2000 ")); - - if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 ) - versionStrs.Append(hsStrcpy ("Microsoft Windows XP ")); - - // Test for product type. - - if( bOsVersionInfoEx ) - { - if ( osvi.wProductType == VER_NT_WORKSTATION ) - { - if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) - versionStrs.Append(hsStrcpy ( "Personal " )); - else - versionStrs.Append(hsStrcpy ( "Professional " )); - } - - else if ( osvi.wProductType == VER_NT_SERVER ) - { - if( osvi.wSuiteMask & VER_SUITE_DATACENTER ) - versionStrs.Append(hsStrcpy ( "DataCenter Server " )); - else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) - versionStrs.Append(hsStrcpy ( "Advanced Server " )); - else - versionStrs.Append(hsStrcpy ( "Server " )); - } - } - else - { - HKEY hKey; - char szProductType[80]; - DWORD dwBufLen; - - RegOpenKeyEx( HKEY_LOCAL_MACHINE, - "SYSTEM\\CurrentControlSet\\Control\\ProductOptions", - 0, KEY_QUERY_VALUE, &hKey ); - RegQueryValueEx( hKey, "ProductType", NULL, NULL, - (LPBYTE) szProductType, &dwBufLen); - RegCloseKey( hKey ); - if ( lstrcmpi( "WINNT", szProductType) == 0 ) - versionStrs.Append(hsStrcpy( "Professional " )); - if ( lstrcmpi( "LANMANNT", szProductType) == 0 ) - versionStrs.Append(hsStrcpy( "Server " )); - if ( lstrcmpi( "SERVERNT", szProductType) == 0 ) - versionStrs.Append(hsStrcpy( "Advanced Server " )); - } - - // Display version, service pack (if any), and build number. - - if ( osvi.dwMajorVersion <= 4 ) - { - versionStrs.Append(hsStrcpy (xtl::format("version %d.%d %s (Build %d)\n", - osvi.dwMajorVersion, - osvi.dwMinorVersion, - osvi.szCSDVersion, - osvi.dwBuildNumber & 0xFFFF).c_str())); - } - else - { - versionStrs.Append(hsStrcpy (xtl::format("%s (Build %d)\n", - osvi.szCSDVersion, - osvi.dwBuildNumber & 0xFFFF).c_str())); - } - break; - - case VER_PLATFORM_WIN32_WINDOWS: - - if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) - { - versionStrs.Append(hsStrcpy ("Microsoft Windows 95 ")); - if ( osvi.szCSDVersion[1] == 'C' || osvi.szCSDVersion[1] == 'B' ) - versionStrs.Append(hsStrcpy("OSR2 " )); - } - - if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) - { - versionStrs.Append(hsStrcpy ("Microsoft Windows 98 ")); - if ( osvi.szCSDVersion[1] == 'A' ) - versionStrs.Append(hsStrcpy("SE " )); - } - - if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) - { - versionStrs.Append(hsStrcpy ("Microsoft Windows Me ")); - } - break; - - case VER_PLATFORM_WIN32s: - - versionStrs.Append(hsStrcpy ("Microsoft Win32s ")); - break; - } - - versionStrs.Append(nil); // terminator - - return versionStrs.DetachArray(); -#else - return nil; -#endif -} diff --git a/Sources/Plasma/CoreLib/hsUtils.h b/Sources/Plasma/CoreLib/hsUtils.h deleted file mode 100644 index 8bf36fef..00000000 --- a/Sources/Plasma/CoreLib/hsUtils.h +++ /dev/null @@ -1,285 +0,0 @@ -/*==LICENSE==* - -CyanWorlds.com Engine - MMOG client, server and tools -Copyright (C) 2011 Cyan Worlds, Inc. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -Additional permissions under GNU GPL version 3 section 7 - -If you modify this Program, or any covered work, by linking or -combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK, -NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent -JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK -(or a modified version of those libraries), -containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA, -PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG -JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the -licensors of this Program grant you additional -permission to convey the resulting work. Corresponding Source for a -non-source form of such a combination shall include the source code for -the parts of OpenSSL and IJG JPEG Library used as well as that of the covered -work. - -You can contact Cyan Worlds, Inc. by email legal@cyan.com - or by snail mail at: - Cyan Worlds, Inc. - 14617 N Newport Hwy - Mead, WA 99021 - -*==LICENSE==*/ - -#ifdef _HSUTILS_H -# error "Do not include hsUtils.h directly--use HeadSpin.h" -#endif // _HSUTILS_H -#define _HSUTILS_H - -#include "HeadSpin.h" -#include -#include -#include - -int hsStrlen(const char src[]); -char* hsStrcpy(char dstOrNil[], const char src[]); -void hsStrcat(char dst[], const char src[]); -bool hsStrEQ(const char s1[], const char s2[]); -bool hsStrCaseEQ(const char* s1, const char* s2); -char* hsScalarToStr(float); -int hsRemove(const char* filename); -void hsCPathToMacPath(char* dst, char* fname); -void hsStrLower(char *s); -char * hsFormatStr(const char * fmt, ...); // You are responsible for returned memory. -char * hsFormatStrV(const char * fmt, va_list args); // You are responsible for returned memory. - -// Use "correct" stricmp based on the selected compiler / library -#if HS_BUILD_FOR_WIN32 -# define stricmp _stricmp -# define strnicmp _strnicmp -# define wcsicmp _wcsicmp -# define wcsnicmp _wcsnicmp -# define strlwr _strlwr -#else -# define stricmp strcasecmp -# define strnicmp strncasecmp -# define wcsicmp wcscasecmp -# define wcsnicmp wcsncasecmp -# define strlwr hsStrLower -#endif - - -// A pstring has a length uint8_t at the beginning, and no trailing 0 -char* hsP2CString(const uint8_t pstring[], char cstring[]); -uint8_t* hsC2PString(const char cstring[], uint8_t pstring[]); - -inline char* hsStrcpy(const char src[]) -{ - return hsStrcpy(nil, src); -} - -inline char *hsStrncpy(char *strDest, const char *strSource, size_t count) -{ - char *temp = strncpy(strDest, strSource, count-1); - strDest[count-1] = 0; - return temp; -} - -wchar_t *hsStringToWString( const char *str ); -char *hsWStringToString( const wchar_t *str ); - -enum { // Kind of MessageBox...passed to hsMessageBox - hsMessageBoxAbortRetyIgnore, - hsMessageBoxNormal, // Just Ok - hsMessageBoxOkCancel, - hsMessageBoxRetryCancel, - hsMessageBoxYesNo, - hsMessageBoxYesNoCancel, -}; - -enum { - hsMessageBoxIconError, - hsMessageBoxIconQuestion, - hsMessageBoxIconExclamation, - hsMessageBoxIconAsterisk, -}; - -enum { // RETURN VALUES FROM hsMessageBox - hsMBoxOk = 1, // OK button was selected. - hsMBoxCancel, // Cancel button was selected. - hsMBoxAbort, // Abort button was selected. - hsMBoxRetry, // Retry button was selected. - hsMBoxIgnore, // Ignore button was selected. - hsMBoxYes, // Yes button was selected. - hsMBoxNo // No button was selected. -}; - -extern bool hsMessageBox_SuppressPrompts; -int hsMessageBox(const char message[], const char caption[], int kind, int icon=hsMessageBoxIconAsterisk); -int hsMessageBox(const wchar_t message[], const wchar_t caption[], int kind, int icon=hsMessageBoxIconAsterisk); -int hsMessageBoxWithOwner(hsWindowHndl owner, const char message[], const char caption[], int kind, int icon=hsMessageBoxIconAsterisk); -int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t message[], const wchar_t caption[], int kind, int icon=hsMessageBoxIconAsterisk); - -inline hsBool hsCompare(float a, float b, float delta=0.0001); - -// flag testing / clearing -#define hsCheckBits(f,c) ((f & c)==c) -#define hsTestBits(f,b) ( (f) & (b) ) -#define hsSetBits(f,b) ( (f) |= (b) ) -#define hsClearBits(f,b) ( (f) &= ~(b) ) -#define hsToggleBits(f,b) ( (f) ^= (b) ) -#define hsChangeBits(f,b,t) ( t ? hsSetBits(f,b) : hsClearBits(f,b) ) - - -#if HS_BUILD_FOR_WIN32 -// This is for Windows -# define hsVsnprintf _vsnprintf -# define hsVsnwprintf _vsnwprintf -# define hsSnprintf _snprintf -# define hsSnwprintf _snwprintf - -# define snprintf _snprintf -# define snwprintf _snwprintf -# define swprintf _snwprintf - -# ifndef fileno -# define fileno(__F) _fileno(__F) -# endif - -# define hsWFopen(name, mode) _wfopen(name, mode) -#else -// This is for Unix, Linux, OSX, etc. -# define hsVsnprintf vsnprintf -# define hsVsnwprintf vswprintf -# define hsSnprintf snprintf -# define hsSnwprintf swprintf - -# define hsWFopen(name, mode) fopen(hsWStringToString(name), hsWStringToString(mode)) - -# include -# define MAX_PATH PATH_MAX -#endif - -// Useful floating point utilities -inline float hsDegreesToRadians(float deg) { return float(deg * (M_PI / 180)); } -inline float hsRadiansToDegrees(float rad) { return float(rad * (180 / M_PI)); } -#define hsInvert(a) (1 / (a)) - -#include -#define NEWZERO(t) new(calloc(sizeof(t), 1)) t - -#ifdef _MSC_VER -# define ALIGN(n) __declspec(align(n)) -#else -# define ALIGN(n) __atribute__(aligned(n)) -#endif - -///////////////////////////// -// Physical memory functions -///////////////////////////// -enum MemSpec -{ - kBlows = 0, // Less than 128 - kAcceptable, // Less than 256 - kOptimal // 256 or greater -}; - -uint32_t hsPhysicalMemory(); -MemSpec hsMemorySpec(); - -inline int hsRandMax() { return 32767; } -inline float hsRandNorm() { return 1.f / 32767.f; } // multiply by hsRand to get randoms ranged [0..1] -int hsRand(void); -void hsRandSeed(int seed); - -#define hsFopen(name, mode) fopen(name, mode) - -char** DisplaySystemVersion(); - -/************************ Debug/Error Macros **************************/ - -typedef void (*hsDebugMessageProc)(const char message[]); -extern hsDebugMessageProc gHSDebugProc; -#define HSDebugProc(m) { if (gHSDebugProc) gHSDebugProc(m); } -hsDebugMessageProc hsSetDebugMessageProc(hsDebugMessageProc newProc); - -extern hsDebugMessageProc gHSStatusProc; -hsDebugMessageProc hsSetStatusMessageProc(hsDebugMessageProc newProc); - -void ErrorEnableGui (bool enabled); -void ErrorAssert (int line, const char file[], const char fmt[], ...); - -bool DebugIsDebuggerPresent (); -void DebugBreakIfDebuggerPresent (); -void DebugMsg(const char fmt[], ...); - -#ifdef HS_DEBUGGING - - void hsDebugMessage(const char message[], long refcon); - #define hsDebugCode(code) code - #define hsIfDebugMessage(expr, msg, ref) (void)( ((expr) != 0) || (hsDebugMessage(msg, ref), 0) ) - #define hsAssert(expr, msg) (void)( ((expr) != 0) || (ErrorAssert(__LINE__, __FILE__, msg), 0) ) - #define ASSERT(expr) (void)( ((expr) != 0) || (ErrorAssert(__LINE__, __FILE__, #expr), 0) ) - #define ASSERTMSG(expr, msg) (void)( ((expr) != 0) || (ErrorAssert(__LINE__, __FILE__, msg), 0) ) - #define FATAL(msg) ErrorAssert(__LINE__, __FILE__, msg) - #define DEBUG_MSG DebugMsg - #define DEBUG_BREAK_IF_DEBUGGER_PRESENT DebugBreakIfDebuggerPresent - -#else /* Not debugging */ - - #define hsDebugMessage(message, refcon) NULL_STMT - #define hsDebugCode(code) /* empty */ - #define hsIfDebugMessage(expr, msg, ref) NULL_STMT - #define hsAssert(expr, msg) NULL_STMT - #define ASSERT(expr) NULL_STMT - #define ASSERTMSG(expr, msg) NULL_STMT - #define FATAL(msg) NULL_STMT - #define DEBUG_MSG (void) - #define DEBUG_MSGV NULL_STMT - #define DEBUG_BREAK_IF_DEBUGGER_PRESENT NULL_STMT - -#endif // HS_DEBUGGING - - -#ifdef _MSC_VER -#define DEFAULT_FATAL(var) default: FATAL("No valid case for switch variable '" #var "'"); __assume(0); break; -#else -#define DEFAULT_FATAL(var) default: FATAL("No valid case for switch variable '" #var "'"); break; -#endif - -/***************************************************************************** -* -* Atomic Operations -* -***/ - -// *value += increment; return original value of *value; thread safe -inline long AtomicAdd(long* value, long increment) { -#ifdef HS_BUILD_FOR_WIN32 - return InterlockedExchangeAdd(value, increment); -#elif HS_BUILD_FOR_UNIX - return __sync_fetch_and_add(value, increment); -#else -#error "No Atomic Set support on this architecture" -#endif -} - -// *value = value; return original value of *value; thread safe -inline long AtomicSet(long* value, long set) { -#ifdef HS_BUILD_FOR_WIN32 - return InterlockedExchange(value, set); -#elif HS_BUILD_FOR_UNIX - return __sync_lock_test_and_set(value, set); -#else -#error "No Atomic Set support on this architecture" -#endif -} diff --git a/Sources/Plasma/CoreLib/hsWide.cpp b/Sources/Plasma/CoreLib/hsWide.cpp index f27e0110..073fd75f 100644 --- a/Sources/Plasma/CoreLib/hsWide.cpp +++ b/Sources/Plasma/CoreLib/hsWide.cpp @@ -43,7 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ///////////////////////////////////////////////////////////////////////// -inline hsBool OverflowAdd(uint32_t* sum, uint32_t a, uint32_t b) +inline bool OverflowAdd(uint32_t* sum, uint32_t a, uint32_t b) { *sum = a + b; @@ -55,7 +55,7 @@ inline hsBool OverflowAdd(uint32_t* sum, uint32_t a, uint32_t b) wide = (high << 32) + (middle << 16) + low */ -inline hsBool SetWide3(hsWide* target, int32_t high, uint32_t middle, uint32_t low) +inline bool SetWide3(hsWide* target, int32_t high, uint32_t middle, uint32_t low) { hsAssert(high >= 0, "high is neg"); @@ -308,7 +308,7 @@ int32_t hsWide::CubeRoot() const uint32_t valueL = fLo; uint32_t currH, currL; uint32_t guessH, guessL; - hsBool neg = false; + bool neg = false; if (WIDE_ISNEG(valueH, valueL)) { neg = true; diff --git a/Sources/Plasma/CoreLib/hsWide.h b/Sources/Plasma/CoreLib/hsWide.h index 289cf2e1..e436f3dd 100644 --- a/Sources/Plasma/CoreLib/hsWide.h +++ b/Sources/Plasma/CoreLib/hsWide.h @@ -51,18 +51,18 @@ struct hsWide { hsWide* Set(int32_t lo) { fLo = lo; if (lo < 0) fHi = -1L; else fHi = 0; return this; } hsWide* Set(int32_t hi, uint32_t lo) { fHi = hi; fLo = lo; return this; } - inline hsBool IsNeg() const { return fHi < 0; } - inline hsBool IsPos() const { return fHi > 0 || (fHi == 0 && fLo != 0); } - inline hsBool IsZero() const { return fHi == 0 && fLo == 0; } - inline hsBool IsWide() const; + inline bool IsNeg() const { return fHi < 0; } + inline bool IsPos() const { return fHi > 0 || (fHi == 0 && fLo != 0); } + inline bool IsZero() const { return fHi == 0 && fLo == 0; } + inline bool IsWide() const; - hsBool operator==(const hsWide& b) const { return fHi == b.fHi && fLo == b.fLo; } - hsBool operator<(const hsWide& b) const { return fHi < b.fHi || (fHi == b.fHi && fLo < b.fLo); } - hsBool operator>( const hsWide& b) const { return fHi > b.fHi || (fHi == b.fHi && fLo > b.fLo); } - hsBool operator!=( const hsWide& b) const { return !( *this == b); } - hsBool operator<=(const hsWide& b) const { return !(*this > b); } - hsBool operator>=(const hsWide& b) const { return !(*this < b); } + bool operator==(const hsWide& b) const { return fHi == b.fHi && fLo == b.fLo; } + bool operator<(const hsWide& b) const { return fHi < b.fHi || (fHi == b.fHi && fLo < b.fLo); } + bool operator>( const hsWide& b) const { return fHi > b.fHi || (fHi == b.fHi && fLo > b.fLo); } + bool operator!=( const hsWide& b) const { return !( *this == b); } + bool operator<=(const hsWide& b) const { return !(*this > b); } + bool operator>=(const hsWide& b) const { return !(*this < b); } inline hsWide* Negate(); inline hsWide* Add(int32_t scaler); @@ -182,7 +182,7 @@ inline int32_t hsWide::AsLong() const return (int32_t)fLo; } -inline hsBool hsWide::IsWide() const +inline bool hsWide::IsWide() const { return (fHi > 0 || (fHi == 0 && (int32_t)fLo < 0)) || (fHi < -1L || (fHi == -1L && (int32_t)fLo >= 0)); } diff --git a/Sources/Plasma/CoreLib/hsWindows.h b/Sources/Plasma/CoreLib/hsWindows.h deleted file mode 100644 index b683c73c..00000000 --- a/Sources/Plasma/CoreLib/hsWindows.h +++ /dev/null @@ -1,101 +0,0 @@ -/*==LICENSE==* - -CyanWorlds.com Engine - MMOG client, server and tools -Copyright (C) 2011 Cyan Worlds, Inc. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -Additional permissions under GNU GPL version 3 section 7 - -If you modify this Program, or any covered work, by linking or -combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK, -NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent -JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK -(or a modified version of those libraries), -containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA, -PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG -JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the -licensors of this Program grant you additional -permission to convey the resulting work. Corresponding Source for a -non-source form of such a combination shall include the source code for -the parts of OpenSSL and IJG JPEG Library used as well as that of the covered -work. - -You can contact Cyan Worlds, Inc. by email legal@cyan.com - or by snail mail at: - Cyan Worlds, Inc. - 14617 N Newport Hwy - Mead, WA 99021 - -*==LICENSE==*/ - -#ifdef _HSWINDOWS_H -# error "Do not include hsWindows.h directly--use HeadSpin.h" -#endif // _HSWINDOWS_H -#define _HSWINDOWS_H - -#if HS_BUILD_FOR_WIN32 - - // 4244: Conversion - // 4305: Truncation - // 4503: 'identifier' : decorated name length exceeded, name was truncated - // 4018: signed/unsigned mismatch - // 4786: 255 character debug limit - // 4284: STL template defined operator-> for a class it doesn't make sense for (int, etc) - // 4800: 'int': forcing value to bool 'true' or 'false' (performance warning) -# ifdef _MSC_VER -# pragma warning( disable : 4305 4503 4018 4786 4284 4800) -# endif // _MSC_VER - - // Terrible hacks for MinGW because they don't have a reasonable - // default for the Windows version. We cheat and say it's XP. -# ifdef __MINGW32__ -# undef _WIN32_WINNT -# define _WIN32_WINNT 0x501 -# undef _WIN32_IE -# define _WIN32_IE 0x400 -# endif - - // Windows.h includes winsock.h (winsocks 1), so we need to manually include winsock2 - // and tell Windows.h to only bring in modern headers -# ifndef MAXPLUGINCODE -# include -# include -# endif // MAXPLUGINCODE -# define WIN32_LEAN_AND_MEAN -# ifndef NOMINMAX -# define NOMINMAX // Needed to prevent NxMath conflicts -# endif -# include - - typedef HWND hsWindowHndl; - typedef HINSTANCE hsWindowInst; -#else - typedef int32_t* hsWindowHndl; - typedef int32_t* hsWindowInst; -#endif // HS_BUILD_FOR_WIN32 - -/**************************************************************************** -* -* max/min inline functions -* -***/ - -#ifdef max -#undef max -#endif - -#ifdef min -#undef min -#endif diff --git a/Sources/Plasma/CoreLib/pcSmallRect.h b/Sources/Plasma/CoreLib/pcSmallRect.h index 0df5f366..a6596c93 100644 --- a/Sources/Plasma/CoreLib/pcSmallRect.h +++ b/Sources/Plasma/CoreLib/pcSmallRect.h @@ -73,7 +73,10 @@ class pcSmallRect void Read( hsStream *s ); void Write( hsStream *s ); - hsBool Contains( int16_t x, int16_t y ) { if( x >= fX && x <= fX + fWidth && y >= fY && y <= fY + fHeight ) return true; return false; } + bool Contains( int16_t x, int16_t y ) const + { + return (x >= fX) && (x <= fX + fWidth) && (y >= fY) && (y <= fY + fHeight); + } }; diff --git a/Sources/Plasma/CoreLib/plGeneric.cpp b/Sources/Plasma/CoreLib/plGeneric.cpp index a027477d..7cb0ea10 100644 --- a/Sources/Plasma/CoreLib/plGeneric.cpp +++ b/Sources/Plasma/CoreLib/plGeneric.cpp @@ -177,7 +177,7 @@ int plGeneric::Read(hsStream* stream) break; // nothing to read case kBool: - fBoolVal = (stream->ReadBool() != 0); + fBoolVal = stream->ReadBool(); break; case kInt: diff --git a/Sources/Plasma/CoreLib/plLoadMask.cpp b/Sources/Plasma/CoreLib/plLoadMask.cpp index b00c9dd6..03293350 100644 --- a/Sources/Plasma/CoreLib/plLoadMask.cpp +++ b/Sources/Plasma/CoreLib/plLoadMask.cpp @@ -144,13 +144,13 @@ uint32_t plLoadMask::ValidateMasks(int num, plLoadMask masks[]) return retVal; } -hsBool plLoadMask::ComputeRepMasks( +bool plLoadMask::ComputeRepMasks( int num, const int quals[], const int caps[], plLoadMask masks[]) { - hsBool retVal = false; // Okay till proven otherwise. + bool retVal = false; // Okay till proven otherwise. int i; for( i = 0; i < num; i++ ) diff --git a/Sources/Plasma/CoreLib/plLoadMask.h b/Sources/Plasma/CoreLib/plLoadMask.h index 58ac4f5b..8f8883ab 100644 --- a/Sources/Plasma/CoreLib/plLoadMask.h +++ b/Sources/Plasma/CoreLib/plLoadMask.h @@ -74,21 +74,21 @@ public: plLoadMask(uint8_t qLo, uint8_t qHi) { fQuality[0] = qLo; fQuality[1] = qHi; } ~plLoadMask() {} - hsBool DontLoad() const { return !(fQuality[fGlobalCapability] & fGlobalQuality); } + bool DontLoad() const { return !(fQuality[fGlobalCapability] & fGlobalQuality); } - hsBool NeverLoads() const { return !(fQuality[0] && fQuality[1]); } + bool NeverLoads() const { return !(fQuality[0] && fQuality[1]); } - hsBool IsUsed() const { return (fQuality[0] != uint8_t(-1)) || (fQuality[1] != uint8_t(-1)); } + bool IsUsed() const { return (fQuality[0] != uint8_t(-1)) || (fQuality[1] != uint8_t(-1)); } - hsBool MatchesQuality(int q) const { return (IBitToMask(q) & (fQuality[0] | fQuality[1])) != 0; } - hsBool MatchesCapability(int c) const { return fQuality[c] != 0; } - hsBool MatchesQualityAndCapability(int q, int c) const { return IBitToMask(q) & fQuality[c]; } + bool MatchesQuality(int q) const { return (IBitToMask(q) & (fQuality[0] | fQuality[1])) != 0; } + bool MatchesCapability(int c) const { return fQuality[c] != 0; } + bool MatchesQualityAndCapability(int q, int c) const { return IBitToMask(q) & fQuality[c]; } - hsBool MatchesCurrentQuality() const { return MatchesQuality(fGlobalQuality); } - hsBool MatchesCurrentCapability() const { return MatchesCapability(fGlobalCapability); } - hsBool MatchesCurrent() const { return !DontLoad(); } + bool MatchesCurrentQuality() const { return MatchesQuality(fGlobalQuality); } + bool MatchesCurrentCapability() const { return MatchesCapability(fGlobalCapability); } + bool MatchesCurrent() const { return !DontLoad(); } - uint8_t GetQualityMask(int cap) const { return fQuality[cap]; } + uint8_t GetQualityMask(int cap) const { return fQuality[cap]; } plLoadMask& SetMask(uint8_t lo, uint8_t hi) { fQuality[0] = lo; fQuality[1] = hi; return *this; } plLoadMask& SetNever() { return SetMask(0,0); } @@ -127,7 +127,7 @@ public: // the output with ValidateMasks. The return value is a bitmask of which // items in the list had problems, so return of zero means A-OK. // - static hsBool ComputeRepMasks(int num, const int quals[], const int caps[], plLoadMask masks[]); + static bool ComputeRepMasks(int num, const int quals[], const int caps[], plLoadMask masks[]); static uint32_t ValidateReps(int num, const int quals[], const int caps[]); static uint32_t ValidateMasks(int num, plLoadMask masks[]); }; diff --git a/Sources/Plasma/CoreLib/plViewTransform.cpp b/Sources/Plasma/CoreLib/plViewTransform.cpp index 674e1aa4..9f629be0 100644 --- a/Sources/Plasma/CoreLib/plViewTransform.cpp +++ b/Sources/Plasma/CoreLib/plViewTransform.cpp @@ -114,7 +114,7 @@ void plViewTransform::ISetCameraToNDC() const ISetFlag(kCameraToNDCSet); } -void plViewTransform::SetViewPort(const hsPoint2& mins, const hsPoint2& maxs, hsBool relative) +void plViewTransform::SetViewPort(const hsPoint2& mins, const hsPoint2& maxs, bool relative) { fViewPortX.Set(mins.fX, maxs.fX, 1.f / (maxs.fX - mins.fX)); fViewPortY.Set(mins.fY, maxs.fY, 1.f / (maxs.fY - mins.fY)); @@ -221,7 +221,7 @@ hsScalarTriple plViewTransform::NDCToMap(const hsScalarTriple& ndcP) const return map; } -hsBool plViewTransform::SetProjection(const hsBounds3& bnd) +bool plViewTransform::SetProjection(const hsBounds3& bnd) { hsPoint3 maxs; hsPoint3 mins; @@ -233,14 +233,14 @@ hsBool plViewTransform::SetProjection(const hsBounds3& bnd) return false; } -hsBool plViewTransform::SetProjectionWorld(const hsBounds3& wBnd) +bool plViewTransform::SetProjectionWorld(const hsBounds3& wBnd) { hsBounds3Ext cBnd = wBnd; cBnd.Transform(&GetWorldToCamera()); return SetProjection(cBnd); } -hsBool plViewTransform::IGetMaxMinsFromBnd(const hsBounds3& bnd, hsPoint3& mins, hsPoint3& maxs) const +bool plViewTransform::IGetMaxMinsFromBnd(const hsBounds3& bnd, hsPoint3& mins, hsPoint3& maxs) const { if( bnd.GetMaxs().fZ <= kMinHither ) return false; @@ -259,12 +259,12 @@ hsBool plViewTransform::IGetMaxMinsFromBnd(const hsBounds3& bnd, hsPoint3& mins, return true; } -hsBool plViewTransform::Intersect(const plViewTransform& view) +bool plViewTransform::Intersect(const plViewTransform& view) { hsPoint3 mins; hsPoint3 maxs; - hsBool retVal = true; + bool retVal = true; int i; for( i = 0; i < 3; i++ ) { @@ -282,7 +282,7 @@ hsBool plViewTransform::Intersect(const plViewTransform& view) return retVal; } -hsBool plViewTransform::Union(const plViewTransform& view) +bool plViewTransform::Union(const plViewTransform& view) { hsPoint3 mins; hsPoint3 maxs; diff --git a/Sources/Plasma/CoreLib/plViewTransform.h b/Sources/Plasma/CoreLib/plViewTransform.h index 0853df7a..c129a6a5 100644 --- a/Sources/Plasma/CoreLib/plViewTransform.h +++ b/Sources/Plasma/CoreLib/plViewTransform.h @@ -95,9 +95,9 @@ public: void Reset(); // resets to default state // Queries - hsBool GetOrthogonal() const { return IHasFlag(kOrthogonal); } - hsBool GetPerspective() const { return !GetOrthogonal(); } - hsBool GetViewPortRelative() const { return IHasFlag(kViewPortRelative); } + bool GetOrthogonal() const { return IHasFlag(kOrthogonal); } + bool GetPerspective() const { return !GetOrthogonal(); } + bool GetViewPortRelative() const { return IHasFlag(kViewPortRelative); } // Next, all our matrices. const hsMatrix44& GetCameraToWorld() const { return fCameraToWorld; } @@ -110,8 +110,8 @@ public: hsVector3 GetUp() const { return *((hsVector3*)&GetWorldToCamera().fMap[1]); } hsVector3 GetAcross() const { return *((hsVector3*)&GetWorldToCamera().fMap[0]); } - uint16_t GetScreenWidth() const { return fWidth; } - uint16_t GetScreenHeight() const { return fHeight; } + uint16_t GetScreenWidth() const { return fWidth; } + uint16_t GetScreenHeight() const { return fHeight; } void GetViewPort(hsPoint2& mins, hsPoint2& maxs) const; void GetViewPort(int& loX, int& loY, int& hiX, int& hiY) const; @@ -130,14 +130,14 @@ public: hsPoint3 GetMapMax() const { return fMapMax; } void GetMapping(hsPoint3& mapMin, hsPoint3& mapMax) const { mapMin = fMapMin; mapMax = fMapMax; } - float GetFovX() const; - float GetFovY() const; - float GetFovXDeg() const { return hsRadiansToDegrees(GetFovX()); } - float GetFovYDeg() const { return hsRadiansToDegrees(GetFovY()); } - float GetOrthoWidth() const { return fMax.fX - fMin.fX; } - float GetOrthoHeight() const { return fMax.fY - fMin.fY; } - float GetHither() const { return fMin.fZ; } - float GetYon() const { return fMax.fZ; } + float GetFovX() const; + float GetFovY() const; + float GetFovXDeg() const { return hsRadiansToDegrees(GetFovX()); } + float GetFovYDeg() const { return hsRadiansToDegrees(GetFovY()); } + float GetOrthoWidth() const { return fMax.fX - fMin.fX; } + float GetOrthoHeight() const { return fMax.fY - fMin.fY; } + float GetHither() const { return fMin.fZ; } + float GetYon() const { return fMax.fZ; } void GetDepth(float& hither, float& yon) const { hither = GetHither(); yon = GetYon(); } // Setup. @@ -145,8 +145,8 @@ public: void SetCameraTransform(const hsMatrix44& w2c, const hsMatrix44& c2w) { fWorldToCamera = w2c; fCameraToWorld = c2w; ISetFlag(kWorldToNDCSet, false); } // Next, what kind of projection. - void SetOrthogonal(hsBool on) { ISetFlag(kOrthogonal, on); InvalidateTransforms(); } - void SetPerspective(hsBool on) { SetOrthogonal(!on); } + void SetOrthogonal(bool on) { ISetFlag(kOrthogonal, on); InvalidateTransforms(); } + void SetPerspective(bool on) { SetOrthogonal(!on); } // Next, setting the scree/window/rendertarget size void SetWidth(uint16_t w) { fWidth = w; } @@ -156,8 +156,8 @@ public: // Next, setting the viewport. You only need to do this if you want to use the screen functions above. // If you're passing in and getting out normalized device coordinates, skip this. If you don't set viewport, // Defaults to 0,0,width,height (i.e. the whole screen). - void SetViewPort(const hsPoint2& mins, const hsPoint2& maxs, hsBool relative=true); - void SetViewPort(float loX, float loY, float hiX, float hiY, hsBool relative=true) { SetViewPort(hsPoint2().Set(loX, loY), hsPoint2().Set(hiX, hiY), relative); } + void SetViewPort(const hsPoint2& mins, const hsPoint2& maxs, bool relative=true); + void SetViewPort(float loX, float loY, float hiX, float hiY, bool relative=true) { SetViewPort(hsPoint2().Set(loX, loY), hsPoint2().Set(hiX, hiY), relative); } void SetViewPort(uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) { SetViewPort(float(left), float(top), float(right), float(bottom), false); } void SetMapping(const hsPoint3& mins, const hsPoint3& maxs) { SetMapMin(mins); SetMapMax(maxs); } @@ -203,8 +203,8 @@ public: // Note this doesn't swivel the camera around to see the box, it offsets the projection. // Return false if there isn't a projection that will capture any of the bnd. This // can be from the bnd being behind the camera. - hsBool SetProjection(const hsBounds3& cBnd); - hsBool SetProjectionWorld(const hsBounds3& wBnd); + bool SetProjection(const hsBounds3& cBnd); + bool SetProjectionWorld(const hsBounds3& wBnd); // This lets you create insane projection matrices. Note that it won't change the answer on anything like // GetFov(). @@ -216,8 +216,8 @@ public: // of what the two views will see. The boolean is performed in axis aligned camera space, which lines // up nicely with screen space. Note that this only makes sense for two ViewTransforms with identical // CameraToWorld's (which isn't checked). - hsBool Intersect(const plViewTransform& view); - hsBool Union(const plViewTransform& view); + bool Intersect(const plViewTransform& view); + bool Union(const plViewTransform& view); // Convenience to move from one space to another. // Screen means pixels - Default is mapping NDC -> [0..1]. Z value of pixel is NDC Z. @@ -322,20 +322,20 @@ protected: static const float kMinHither; void ISetCameraToNDC() const; - hsBool ICameraToNDCSet() const { return IHasFlag(kCameraToNDCSet); } + bool ICameraToNDCSet() const { return IHasFlag(kCameraToNDCSet); } const hsMatrix44& ICheckCameraToNDC() const { if( !ICameraToNDCSet() ) ISetCameraToNDC(); return fCameraToNDC; } void ISetWorldToNDC() const { fWorldToNDC = GetCameraToNDC() * fWorldToCamera; ISetFlag(kWorldToNDCSet); } - hsBool IWorldToNDCSet() const { return IHasFlag(kWorldToNDCSet); } + bool IWorldToNDCSet() const { return IHasFlag(kWorldToNDCSet); } const hsMatrix44& ICheckWorldToNDC() const { if( !IWorldToNDCSet() ) ISetWorldToNDC(); return fWorldToNDC; } - hsBool IGetMaxMinsFromBnd(const hsBounds3& bnd, hsPoint3& mins, hsPoint3& maxs) const; + bool IGetMaxMinsFromBnd(const hsBounds3& bnd, hsPoint3& mins, hsPoint3& maxs) const; void InvalidateTransforms() { ISetFlag(kCameraToNDCSet|kWorldToNDCSet, false); } // Flags - generic - hsBool IHasFlag(uint32_t f) const { return 0 != (fFlags & f); } - void ISetFlag(uint32_t f, hsBool on=true) const { if(on) fFlags |= f; else fFlags &= ~f; } + bool IHasFlag(uint32_t f) const { return 0 != (fFlags & f); } + void ISetFlag(uint32_t f, bool on=true) const { if(on) fFlags |= f; else fFlags &= ~f; } }; diff --git a/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp b/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp index e2b457ee..89227e2f 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.cpp @@ -523,7 +523,7 @@ void pfBoid::ISetupToken(pfProximityDatabase &pd) fProximityToken = pd.MakeToken(this); } -hsBool pfBoid::IInBoidNeighborhood(const pfVehicle &other, const float minDistance, const float maxDistance, const float cosMaxAngle) +bool pfBoid::IInBoidNeighborhood(const pfVehicle &other, const float minDistance, const float maxDistance, const float cosMaxAngle) { if (&other == this) // abort if we're looking at ourselves return false; @@ -929,7 +929,7 @@ void pfObjectFlocker::SetNumBoids(uint8_t val) fNumBoids = val; } -hsBool pfObjectFlocker::MsgReceive(plMessage* msg) +bool pfObjectFlocker::MsgReceive(plMessage* msg) { plInitialAgeStateLoadedMsg* loadMsg = plInitialAgeStateLoadedMsg::ConvertNoRef(msg); if (loadMsg) @@ -979,7 +979,7 @@ hsBool pfObjectFlocker::MsgReceive(plMessage* msg) return plSingleModifier::MsgReceive(msg); } -hsBool pfObjectFlocker::IEval(double secs, float del, uint32_t dirty) +bool pfObjectFlocker::IEval(double secs, float del, uint32_t dirty) { fFlock.Update(fTarget, del); diff --git a/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h b/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h index abc1a0a4..be2360c5 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/pfObjectFlocker.h @@ -255,7 +255,7 @@ private: hsPoint3 fCurPos; hsVector3 fForward; float fSpeed; // in meters/sec - hsBool fHasLastPos; // does the last position make sense? + bool fHasLastPos; // does the last position make sense? public: pfBoidGoal(); ~pfBoidGoal() {} @@ -301,7 +301,7 @@ private: void ISetupToken(pfProximityDatabase &pd); // Are we in the neighborhood of another boid? - hsBool IInBoidNeighborhood(const pfVehicle &other, const float minDistance, const float maxDistance, const float cosMaxAngle); + bool IInBoidNeighborhood(const pfVehicle &other, const float minDistance, const float maxDistance, const float cosMaxAngle); // Wander steering hsVector3 ISteerForWander(float timeDelta); // Seek the target point @@ -403,7 +403,7 @@ public: GETINTERFACE_ANY( pfObjectFlocker, plSingleModifier ); virtual void SetTarget(plSceneObject* so); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); @@ -433,10 +433,10 @@ public: float MinSpeed() const {return fFlock.MinSpeed();} void SetMinSpeed(float minSpeed) {fFlock.SetMinSpeed(minSpeed);} - hsBool RandomizeAnimStart() const {return fRandomizeAnimationStart;} - void SetRandomizeAnimStart(hsBool val) {fRandomizeAnimationStart = val;} - hsBool UseTargetRotation() const {return fUseTargetRotation;} - void SetUseTargetRotation(hsBool val) {fUseTargetRotation = val;} + bool RandomizeAnimStart() const {return fRandomizeAnimationStart;} + void SetRandomizeAnimStart(bool val) {fRandomizeAnimationStart = val;} + bool UseTargetRotation() const {return fUseTargetRotation;} + void SetUseTargetRotation(bool val) {fUseTargetRotation = val;} protected: const static int fFileVersion; // so we don't have to update the global version number when we change @@ -445,10 +445,10 @@ protected: int fNumBoids; plKey fBoidKey; - hsBool fUseTargetRotation; - hsBool fRandomizeAnimationStart; + bool fUseTargetRotation; + bool fRandomizeAnimationStart; - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); }; #endif diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plAnimDebugList.h b/Sources/Plasma/FeatureLib/pfAnimation/plAnimDebugList.h index 5cd5cc9b..b1d9c77b 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plAnimDebugList.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/plAnimDebugList.h @@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plAnimDebugList { public: - hsBool fEnabled; + bool fEnabled; hsTArray fSOKeys; hsTArray fMaterialKeys; diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plBlower.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plBlower.cpp index 29338845..f27caf07 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plBlower.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plBlower.cpp @@ -145,7 +145,7 @@ void plBlower::IBlow(double secs, float delSecs) fCurrDel = del; } -hsBool plBlower::IEval(double secs, float delSecs, uint32_t dirty) +bool plBlower::IEval(double secs, float delSecs, uint32_t dirty) { const float kMaxDelSecs = 0.1f; if( delSecs > kMaxDelSecs ) diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plBlower.h b/Sources/Plasma/FeatureLib/pfAnimation/plBlower.h index d23d95ae..9cba82a5 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plBlower.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/plBlower.h @@ -86,7 +86,7 @@ protected: void ISetTargetTransform(); void IBlow(double secs, float delSecs); - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); public: ~plBlower(); plBlower(); diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.cpp index 6856e095..a5ab9167 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.cpp @@ -64,7 +64,7 @@ plFollowMod::~plFollowMod() #include "plProfile.h" plProfile_CreateTimer("FollowMod", "RenderSetup", FollowMod); -hsBool plFollowMod::MsgReceive(plMessage* msg) +bool plFollowMod::MsgReceive(plMessage* msg) { plRenderMsg* rend = plRenderMsg::ConvertNoRef(msg); if( rend ) @@ -110,7 +110,7 @@ hsBool plFollowMod::MsgReceive(plMessage* msg) return plSingleModifier::MsgReceive(msg); } -hsBool plFollowMod::ICheckLeader() +bool plFollowMod::ICheckLeader() { switch( fLeaderType ) { @@ -218,7 +218,7 @@ void plFollowMod::IMoveTarget() GetTarget()->SetTransform(l2w, w2l); } -hsBool plFollowMod::IEval(double secs, float del, uint32_t dirty) +bool plFollowMod::IEval(double secs, float del, uint32_t dirty) { if( ICheckLeader() ) IMoveTarget(); diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.h b/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.h index fb24e08e..52ce5a2f 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/plFollowMod.h @@ -84,10 +84,10 @@ protected: hsMatrix44 fLeaderL2W; hsMatrix44 fLeaderW2L; - hsBool ICheckLeader(); + bool ICheckLeader(); void IMoveTarget(); - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); public: plFollowMod(); @@ -96,7 +96,7 @@ public: CLASSNAME_REGISTER( plFollowMod ); GETINTERFACE_ANY( plFollowMod, plSingleModifier ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plLightModifier.h b/Sources/Plasma/FeatureLib/pfAnimation/plLightModifier.h index 540d8e7b..a4a23ca1 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plLightModifier.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/plLightModifier.h @@ -79,7 +79,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool HasAnima() const { return fColorCtl || fAmbientCtl || fSpecularCtl; } + virtual bool HasAnima() const { return fColorCtl || fAmbientCtl || fSpecularCtl; } // Export only void SetColorCtl(plController* ctl) { fColorCtl = ctl; } @@ -115,7 +115,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool HasAnima() const { return plLightModifier::HasAnima() || fAttenCtl; } + virtual bool HasAnima() const { return plLightModifier::HasAnima() || fAttenCtl; } // Export Only void SetAttenCtl(plController* ctl) { fAttenCtl = ctl; } @@ -128,7 +128,7 @@ class plSpotModifier : public plOmniModifier { protected: - plSpotLightInfo* fSpot; + plSpotLightInfo* fSpot; plController* fInnerCtl; plController* fOuterCtl; @@ -149,7 +149,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool HasAnima() const { return plOmniModifier::HasAnima() || fInnerCtl || fOuterCtl; } + virtual bool HasAnima() const { return plOmniModifier::HasAnima() || fInnerCtl || fOuterCtl; } // Export Only void SetInnerCtl(plController* ctl) { fInnerCtl = ctl; } @@ -184,7 +184,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool HasAnima() const { return plLightModifier::HasAnima() || fWidthCtl || fHeightCtl || fDepthCtl; } + virtual bool HasAnima() const { return plLightModifier::HasAnima() || fWidthCtl || fHeightCtl || fDepthCtl; } // Export Only void SetWidthCtl(plController* ctl) { fWidthCtl = ctl; } diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.cpp index 9633cc82..cf8903eb 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.cpp @@ -107,7 +107,7 @@ void plLineFollowMod::SetOffsetFeet(float f) } } -void plLineFollowMod::SetForceToLine(hsBool on) +void plLineFollowMod::SetForceToLine(bool on) { if( on ) fFollowFlags |= kForceToLine; @@ -218,7 +218,7 @@ void plLineFollowMod::Write(hsStream* stream, hsResMgr* mgr) #include "plProfile.h" plProfile_CreateTimer("LineFollow", "RenderSetup", LineFollow); -hsBool plLineFollowMod::MsgReceive(plMessage* msg) +bool plLineFollowMod::MsgReceive(plMessage* msg) { plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg); if( refMsg ) @@ -337,7 +337,7 @@ void plLineFollowMod::IRegister() } } -hsBool plLineFollowMod::IEval(double secs, float del, uint32_t dirty) +bool plLineFollowMod::IEval(double secs, float del, uint32_t dirty) { if( !fPath ) return false; @@ -361,7 +361,7 @@ hsBool plLineFollowMod::IEval(double secs, float del, uint32_t dirty) return true; } -hsBool plLineFollowMod::IOffsetTargetTransform(hsMatrix44& tgtXfm) +bool plLineFollowMod::IOffsetTargetTransform(hsMatrix44& tgtXfm) { hsPoint3 tgtPos = tgtXfm.GetTranslate(); @@ -407,7 +407,7 @@ hsBool plLineFollowMod::IOffsetTargetTransform(hsMatrix44& tgtXfm) return true; } -hsBool plLineFollowMod::IGetTargetTransform(hsPoint3& searchPos, hsMatrix44& tgtXfm) +bool plLineFollowMod::IGetTargetTransform(hsPoint3& searchPos, hsMatrix44& tgtXfm) { float t = fPath->GetExtremePoint(searchPos); if( fFollowFlags & kFullMatrix ) @@ -453,7 +453,7 @@ void plLineFollowMod::ICheckForPop(const hsPoint3& oldPos, const hsPoint3& newPo fFollowFlags &= ~kSearchPosPop; } -hsBool plLineFollowMod::IGetSearchPos() +bool plLineFollowMod::IGetSearchPos() { hsPoint3 oldPos = fSearchPos; if( kFollowObject == fFollowMode ) @@ -642,7 +642,7 @@ plRailCameraMod::~plRailCameraMod() { } -hsBool plRailCameraMod::IGetTargetTransform(hsPoint3& searchPos, hsMatrix44& tgtXfm) +bool plRailCameraMod::IGetTargetTransform(hsPoint3& searchPos, hsMatrix44& tgtXfm) { if (fPath->GetFarthest()) { diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.h b/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.h index e907d5e4..0d144d7c 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.h @@ -97,14 +97,14 @@ protected: float fOffsetClamp; float fSpeedClamp; - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); - virtual hsBool IGetSearchPos(); + virtual bool IGetSearchPos(); virtual void ISetTargetTransform(int iTarg, const hsMatrix44& tgtXfm); virtual void ISetPathTransform(); - virtual hsBool IGetTargetTransform(hsPoint3& searchPos, hsMatrix44& tgtXfm); - virtual hsBool IOffsetTargetTransform(hsMatrix44& tgtXfm); + virtual bool IGetTargetTransform(hsPoint3& searchPos, hsMatrix44& tgtXfm); + virtual bool IOffsetTargetTransform(hsMatrix44& tgtXfm); virtual hsMatrix44 ISpeedClamp(plCoordinateInterface* ci, const hsMatrix44& unclTgtXfm); hsMatrix44 IInterpMatrices(const hsMatrix44& m0, const hsMatrix44& m1, float parm); void ICheckForPop(const hsPoint3& oldPos, const hsPoint3& newPos); @@ -132,28 +132,28 @@ public: void SetFollowMode(FollowMode f); FollowMode GetFollowMode() const { return fFollowMode; } - hsBool HasOffsetFeet() const { return 0 != (fFollowFlags & kOffsetFeet); } - hsBool HasOffsetDegrees() const { return 0 != (fFollowFlags & kOffsetAng); } - hsBool HasOffset() const { return 0 != (fFollowFlags & kOffset); } - hsBool HasOffsetClamp() const { return 0 != (fFollowFlags & kOffsetClamp); } - hsBool HasSpeedClamp() const { return 0 != (fFollowFlags & kSpeedClamp); } + bool HasOffsetFeet() const { return 0 != (fFollowFlags & kOffsetFeet); } + bool HasOffsetDegrees() const { return 0 != (fFollowFlags & kOffsetAng); } + bool HasOffset() const { return 0 != (fFollowFlags & kOffset); } + bool HasOffsetClamp() const { return 0 != (fFollowFlags & kOffsetClamp); } + bool HasSpeedClamp() const { return 0 != (fFollowFlags & kSpeedClamp); } void SetOffsetFeet(float f); - float GetOffsetFeet() const { return fOffset; } + float GetOffsetFeet() const { return fOffset; } void SetOffsetDegrees(float f); - float GetOffsetDegrees() const { return hsRadiansToDegrees(fOffset); } + float GetOffsetDegrees() const { return hsRadiansToDegrees(fOffset); } void SetOffsetClamp(float f); - float GetOffsetClamp() const { return fOffsetClamp; } + float GetOffsetClamp() const { return fOffsetClamp; } - void SetForceToLine(hsBool on); - hsBool GetForceToLine() const { return 0 != (fFollowFlags & kForceToLine); } + void SetForceToLine(bool on); + bool GetForceToLine() const { return 0 != (fFollowFlags & kForceToLine); } void SetSpeedClamp(float feetPerSec); - float GetSpeedClamp() const { return fSpeedClamp; } + float GetSpeedClamp() const { return fSpeedClamp; } - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); virtual void AddTarget(plSceneObject* so); virtual void RemoveTarget(plSceneObject* so); @@ -180,12 +180,12 @@ public: protected: virtual void ISetTargetTransform(int iTarg, const hsMatrix44& tgtXfm) {fDesiredMatrix = tgtXfm;} - virtual hsBool IGetTargetTransform(hsPoint3& searchPos, hsMatrix44& tgtXfm); + virtual bool IGetTargetTransform(hsPoint3& searchPos, hsMatrix44& tgtXfm); hsMatrix44 fDesiredMatrix; - float fCurrentTime; - float fTargetTime; + float fCurrentTime; + float fTargetTime; hsPoint3 fGoal; - hsBool fFarthest; + bool fFarthest; }; #endif // plLineFollowMod_inc diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp index 3601316c..ec0f4a36 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.cpp @@ -128,7 +128,7 @@ int plRandomCommandMod::IExcludeSelections(int ncmds) float plRandomCommandMod::IGetDelay(float len) const { - float r = float(hsRand() * kRandNormalize); + float r = float(rand() * kRandNormalize); float delay = fMinDelay + (fMaxDelay - fMinDelay) * r; @@ -141,7 +141,7 @@ float plRandomCommandMod::IGetDelay(float len) const return delay; } -hsBool plRandomCommandMod::ISelectNext(int ncmds) +bool plRandomCommandMod::ISelectNext(int ncmds) { if( fMode & kSequential ) { @@ -156,7 +156,7 @@ hsBool plRandomCommandMod::ISelectNext(int ncmds) } return true; } - float r = float(hsRand() * kRandNormalize); + float r = float(rand() * kRandNormalize); int nSelect = ncmds; @@ -200,11 +200,6 @@ void plRandomCommandMod::IStop() fState |= kStopped; } -hsBool plRandomCommandMod::IStopped() const -{ - return 0 != (fState & kStopped); -} - void plRandomCommandMod::IPlayNextIfMaster() { if( !fTarget ) @@ -219,7 +214,7 @@ void plRandomCommandMod::IPlayNextIfMaster() IPlayNext(); } -hsBool plRandomCommandMod::MsgReceive(plMessage* msg) +bool plRandomCommandMod::MsgReceive(plMessage* msg) { // plAnimCmdMsg - interpret start/stop appropriately. // could overinterpret set loop points to limit range of diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.h b/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.h index 9d2301c7..70a9a334 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/plRandomCommandMod.h @@ -78,7 +78,7 @@ protected: void IStart(); virtual void IStop(); - hsBool IStopped() const; + bool IStopped() const { return hsCheckBits(fState, kStopped); } void IRetry(float secs); virtual void IPlayNextIfMaster(); @@ -87,14 +87,14 @@ protected: float IGetDelay(float len) const; int IExcludeSelections(int ncmds); - hsBool ISelectNext(int nAnim); // return false if we should stop, else set fCurrent to next index + bool ISelectNext(int nAnim); // return false if we should stop, else set fCurrent to next index // Once fCurrent is set to the next animation index to play, // IPlayNext() does whatever it takes to actually play it. virtual void IPlayNext() = 0; // We only act in response to messages. - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return false; } public: plRandomCommandMod(); @@ -103,23 +103,23 @@ public: CLASSNAME_REGISTER( plRandomCommandMod ); GETINTERFACE_ANY( plRandomCommandMod, plSingleModifier ); - virtual hsBool MsgReceive(plMessage* pMsg); + virtual bool MsgReceive(plMessage* pMsg); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); // Export only void SetMode(uint8_t m) { fMode = m; } - uint8_t GetMode() const { return fMode; } + uint8_t GetMode() const { return fMode; } void SetState(uint8_t s) { fState = s; } - uint8_t GetState() const { return fState; } + uint8_t GetState() const { return fState; } - void SetMinDelay(float f) { fMinDelay = f; } - float GetMinDelay() const { return fMinDelay; } + void SetMinDelay(float f) { fMinDelay = f; } + float GetMinDelay() const { return fMinDelay; } - void SetMaxDelay(float f) { fMaxDelay = f; } - float GetMaxDelay() const { return fMaxDelay; } + void SetMaxDelay(float f) { fMaxDelay = f; } + float GetMaxDelay() const { return fMaxDelay; } }; diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp index 1b488a1e..796d4036 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.cpp @@ -107,7 +107,7 @@ void plStereizer::Write(hsStream* stream, hsResMgr* mgr) fInitPos.Write(stream); } -hsBool plStereizer::MsgReceive(plMessage* msg) +bool plStereizer::MsgReceive(plMessage* msg) { plListenerMsg* listenMsg = plListenerMsg::ConvertNoRef(msg); if( listenMsg ) @@ -119,12 +119,12 @@ hsBool plStereizer::MsgReceive(plMessage* msg) return plSingleModifier::MsgReceive(msg); } -hsBool plStereizer::IEval(double secs, float del, uint32_t dirty) +bool plStereizer::IEval(double secs, float del, uint32_t dirty) { return false; } -hsBool plStereizer::Stereize() +bool plStereizer::Stereize() { plSceneObject* targ = GetTarget(); if( !targ ) @@ -286,7 +286,7 @@ plCoordinateInterface* plStereizer::IGetParent() const // Or in simpler terms, I want to do it one way, Brice wants to do // it another, and since either would work for this, we're waiting // for a tie breaker case that gives one way or the other an advantage. -hsBool plStereizer::CheckForMaster() +bool plStereizer::CheckForMaster() { ISetHasMaster(false); plSceneObject* targ = GetTarget(); diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.h b/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.h index 63081a1c..1045c71e 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/plStereizer.h @@ -82,7 +82,7 @@ protected: hsVector3 fListDirection; hsVector3 fListUp; - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); hsPoint3 IGetLocalizedPos(const hsVector3& posToList, float distToList) const; hsPoint3 IGetAmbientPos() const; @@ -92,7 +92,7 @@ protected: plCoordinateInterface* IGetParent() const; - void ISetHasMaster(hsBool on) { if(on)SetFlag(kHasMaster); else ClearFlag(kHasMaster); } + void ISetHasMaster(bool on) { if(on)SetFlag(kHasMaster); else ClearFlag(kHasMaster); } public: plStereizer(); @@ -104,9 +104,9 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); - hsBool Stereize(); + bool Stereize(); void SetFromListenerMsg(const plListenerMsg* listMsg); void SetAmbientDist(float d) { fAmbientDist = d; } @@ -124,8 +124,8 @@ public: void SetSepAngle(float rads); float GetSepAngle() const; - void SetAsLeftChannel(hsBool on) { if(on)SetFlag(kLeftChannel); else ClearFlag(kLeftChannel); } - hsBool IsLeftChannel() const { return HasFlag(kLeftChannel); } + void SetAsLeftChannel(bool on) { if(on)SetFlag(kLeftChannel); else ClearFlag(kLeftChannel); } + bool IsLeftChannel() const { return HasFlag(kLeftChannel); } void SetParentInitPos(const hsPoint3& pos) { fInitPos = pos; } const hsPoint3& GetParentInitPos() const { return fInitPos; } @@ -133,8 +133,8 @@ public: void SetWorldInitPos(const hsPoint3& pos); hsPoint3 GetWorldInitPos() const; - hsBool CheckForMaster(); - hsBool HasMaster() const { return HasFlag(kHasMaster); } + bool CheckForMaster(); + bool HasMaster() const { return HasFlag(kHasMaster); } }; #endif // plStereizer_inc \ No newline at end of file diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.cpp b/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.cpp index 5cc1e872..2cfe2349 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.cpp @@ -129,12 +129,12 @@ void plViewFaceModifier::SetTarget(plSceneObject* so) plgDispatch::Dispatch()->RegisterForExactType(plArmatureUpdateMsg::Index(), GetKey()); } -hsBool plViewFaceModifier::IEval(double secs, float del, uint32_t dirty) +bool plViewFaceModifier::IEval(double secs, float del, uint32_t dirty) { return false; } -hsBool plViewFaceModifier::IFacePoint(plPipeline* pipe, const hsPoint3& at) +bool plViewFaceModifier::IFacePoint(plPipeline* pipe, const hsPoint3& at) { #if 1 // BOUNDSTEST extern int mfCurrentTest; @@ -272,7 +272,7 @@ hsBool plViewFaceModifier::IFacePoint(plPipeline* pipe, const hsPoint3& at) #include "plProfile.h" plProfile_CreateTimer("ViewFacing", "RenderSetup", ViewFace); -hsBool plViewFaceModifier::MsgReceive(plMessage* msg) +bool plViewFaceModifier::MsgReceive(plMessage* msg) { plRenderMsg* rend = plRenderMsg::ConvertNoRef(msg); @@ -438,7 +438,7 @@ plViewFaceModifier::FollowMode plViewFaceModifier::GetFollowMode() const } -void plViewFaceModifier::SetOffset(const hsVector3& off, hsBool local) +void plViewFaceModifier::SetOffset(const hsVector3& off, bool local) { fOffset = off; if( local ) diff --git a/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.h b/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.h index 276cbf6a..320c3732 100644 --- a/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.h +++ b/Sources/Plasma/FeatureLib/pfAnimation/plViewFaceModifier.h @@ -83,8 +83,8 @@ protected: hsBounds3Ext fMaxBounds; - virtual hsBool IFacePoint(plPipeline* pipe, const hsPoint3& at); - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IFacePoint(plPipeline* pipe, const hsPoint3& at); + virtual bool IEval(double secs, float del, uint32_t dirty); enum RefType { @@ -106,7 +106,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // ViewFace specific void SetScale(const hsVector3& s) { fScale = s; } @@ -116,7 +116,7 @@ public: void SetMaxBounds(const hsBounds3Ext& bnd); const hsBounds3Ext& GetMaxBounds() const { return fMaxBounds; } - hsBool HaveMaxBounds() const { return HasFlag(kMaxBounds); } + bool HaveMaxBounds() const { return HasFlag(kMaxBounds); } enum FollowMode { @@ -129,12 +129,12 @@ public: FollowMode GetFollowMode() const; plSceneObject* GetFollowObject() const { return fFaceObj; } - void SetOffsetActive(hsBool on) { if(on) SetFlag(kOffset); else ClearFlag(kOffset); } - hsBool GetOffsetActive() const { return HasFlag(kOffset); } + void SetOffsetActive(bool on) { if(on) SetFlag(kOffset); else ClearFlag(kOffset); } + bool GetOffsetActive() const { return HasFlag(kOffset); } - void SetOffset(const hsVector3& off, hsBool local=true); + void SetOffset(const hsVector3& off, bool local=true); const hsVector3& GetOffset() const { return fOffset; } - hsBool GetOffsetLocal() const { return HasFlag(kOffsetLocal); } + bool GetOffsetLocal() const { return HasFlag(kOffsetLocal); } }; #endif // plViewFaceModifier_inc diff --git a/Sources/Plasma/FeatureLib/pfAudio/plListener.cpp b/Sources/Plasma/FeatureLib/pfAudio/plListener.cpp index 1c160123..024f6183 100644 --- a/Sources/Plasma/FeatureLib/pfAudio/plListener.cpp +++ b/Sources/Plasma/FeatureLib/pfAudio/plListener.cpp @@ -59,9 +59,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAvatar/plArmatureMod.h" #include "plAvatar/plAvCallbackAction.h" -hsBool plListener::fPrintDbgInfo = false; +bool plListener::fPrintDbgInfo = false; -hsBool plListener::IEval(double secs, float del, uint32_t dirty) +bool plListener::IEval(double secs, float del, uint32_t dirty) { // if (!plgAudioSys::Active()) // return true; @@ -204,7 +204,7 @@ hsBool plListener::IEval(double secs, float del, uint32_t dirty) return true; } -void plListener::ISetRef( const plKey &ref, hsBool binding, int type ) +void plListener::ISetRef( const plKey &ref, bool binding, int type ) { if( binding ) hsgResMgr::ResMgr()->AddViaNotify( ref, new plGenRefMsg( GetKey(), plGenRefMsg::kOnReplace, -1, type ), plRefFlags::kPassiveRef ); @@ -243,12 +243,12 @@ void plListener::ICheckAudio( void ) const plgAudioSys::SetMuted( true ); } -hsBool plListener::MsgReceive(plMessage* msg) +bool plListener::MsgReceive(plMessage* msg) { plSetListenerMsg *setMsg = plSetListenerMsg::ConvertNoRef( msg ); if( setMsg != nil ) { - hsBool useVCam; + bool useVCam; if( setMsg->GetType() & plSetListenerMsg::kVCam ) { diff --git a/Sources/Plasma/FeatureLib/pfAudio/plListener.h b/Sources/Plasma/FeatureLib/pfAudio/plListener.h index 131fec5a..de954ed6 100644 --- a/Sources/Plasma/FeatureLib/pfAudio/plListener.h +++ b/Sources/Plasma/FeatureLib/pfAudio/plListener.h @@ -58,9 +58,9 @@ public: CLASSNAME_REGISTER( plListener ); GETINTERFACE_ANY( plListener, plSingleModifier ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); - static void ShowDebugInfo( hsBool s ) { fPrintDbgInfo = s; } + static void ShowDebugInfo( bool s ) { fPrintDbgInfo = s; } // Get info for which object these things are attached to - camera or refObject uint8_t GetAttachedPosType() { return (uint8_t)fPosRatio; } @@ -83,13 +83,13 @@ protected: plVirtualCam1* fVCam; - float fPosRatio, fFacingRatio, fVelRatio; // 0 is vCam, 1 is refObject - hsBool fInitMe; + float fPosRatio, fFacingRatio, fVelRatio; // 0 is vCam, 1 is refObject + bool fInitMe; - static hsBool fPrintDbgInfo; + static bool fPrintDbgInfo; - virtual hsBool IEval(double secs, float del, uint32_t dirty); - void ISetRef( const plKey &ref, hsBool binding, int type ); + virtual bool IEval(double secs, float del, uint32_t dirty); + void ISetRef( const plKey &ref, bool binding, int type ); void ICheckAudio( void ) const; void IEnsureVCamValid( void ); diff --git a/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.cpp b/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.cpp index 16d2046a..7c47d2fe 100644 --- a/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.cpp +++ b/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.cpp @@ -317,7 +317,7 @@ void plRandomSoundMod::Write(hsStream *s, hsResMgr *mgr) } } -void plRandomSoundMod::ForceSoundLoadState( hsBool loaded ) +void plRandomSoundMod::ForceSoundLoadState( bool loaded ) { uint16_t i, j; @@ -370,7 +370,7 @@ void plRandomSoundMod::ForceSoundLoadState( hsBool loaded ) } // Overload this to handle volume changes -hsBool plRandomSoundMod::MsgReceive(plMessage* msg) +bool plRandomSoundMod::MsgReceive(plMessage* msg) { plAnimCmdMsg* anim = plAnimCmdMsg::ConvertNoRef(msg); if( anim ) diff --git a/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.h b/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.h index 3611c75f..cd6306a2 100644 --- a/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.h +++ b/Sources/Plasma/FeatureLib/pfAudio/plRandomSoundMod.h @@ -72,7 +72,7 @@ protected: plRandomSoundModGroup *fGroups; std::vector fActiveList; // list of sounds we're allowed to choose int fOldPriority; // old sound priority - hsBool fFirstTimePlay; + bool fFirstTimePlay; virtual void IPlayNext(); virtual void IPlayNextIfMaster(); @@ -93,8 +93,8 @@ public: void SetCurrentGroup(uint16_t group); - void ForceSoundLoadState( hsBool loaded ); - hsBool MsgReceive(plMessage* msg); + void ForceSoundLoadState( bool loaded ); + bool MsgReceive(plMessage* msg); float GetVolume(); // EXPORT ONLY diff --git a/Sources/Plasma/FeatureLib/pfCamera/pfCameraProxy.cpp b/Sources/Plasma/FeatureLib/pfCamera/pfCameraProxy.cpp index d5ec8a52..7f99d045 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/pfCameraProxy.cpp +++ b/Sources/Plasma/FeatureLib/pfCamera/pfCameraProxy.cpp @@ -57,7 +57,7 @@ plCameraProxy::~plCameraProxy() { } -hsBool plCameraProxy::Init(plVirtualCam1* aud) +bool plCameraProxy::Init(plVirtualCam1* aud) { plProxyGen::Init(aud); diff --git a/Sources/Plasma/FeatureLib/pfCamera/pfCameraProxy.h b/Sources/Plasma/FeatureLib/pfCamera/pfCameraProxy.h index 6422c271..a2e60526 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/pfCameraProxy.h +++ b/Sources/Plasma/FeatureLib/pfCamera/pfCameraProxy.h @@ -60,7 +60,7 @@ public: plCameraProxy(); virtual ~plCameraProxy(); - hsBool Init(plVirtualCam1* aud); + bool Init(plVirtualCam1* aud); plSceneNode* node; }; diff --git a/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp b/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp index 1a0f465c..0727502a 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp +++ b/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp @@ -72,7 +72,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAvatar/plAvBrainHuman.h" #include "plNetClient/plNetClientMgr.h" -hsBool plCameraBrain1_FirstPerson::fDontFade = false; +bool plCameraBrain1_FirstPerson::fDontFade = false; float plCameraBrain1::fFallAccel = 20.0f; float plCameraBrain1::fFallDecel = 5.0f; float plCameraBrain1::fFallVelocity = 50.0f; @@ -153,7 +153,7 @@ void plCameraBrain1::AddTarget() } // called when we are pushed on top of the camera stack (or re-activated by another popping off directly above) -void plCameraBrain1::Push(hsBool recenter) +void plCameraBrain1::Push(bool recenter) { if (fFlags.IsBitSet(kRailComponent)) { @@ -203,7 +203,7 @@ void plCameraBrain1::SetZoomParams(float max, float min, float rate) // periodic update - forced means we are forcing an update at a non-normal time to "prime" the camera // into position before it renders the first time (hence the fake 10 second frame delta) -void plCameraBrain1::Update(hsBool forced) +void plCameraBrain1::Update(bool forced) { double secs = hsTimer::GetDelSysSeconds(); if (forced) @@ -259,7 +259,7 @@ void plCameraBrain1::IAnimateFOV(double time) // move the camera's origin point (not where it is looking) toward where it is going void plCameraBrain1::IMoveTowardGoal(double elapsedTime) { - hsBool current = plVirtualCam1::Instance()->IsCurrentCamera(GetCamera()); + bool current = plVirtualCam1::Instance()->IsCurrentCamera(GetCamera()); if (fFlags.IsBitSet(kCutPos) || fFlags.IsBitSet(kNonPhys) || !current) { @@ -334,7 +334,7 @@ void plCameraBrain1::SetMovementFlag(int f) void plCameraBrain1::IPointTowardGoal(double elapsedTime) { - hsBool current = plVirtualCam1::Instance()->IsCurrentCamera(GetCamera()); + bool current = plVirtualCam1::Instance()->IsCurrentCamera(GetCamera()); if (fFlags.IsBitSet(kCutPOA) || fFlags.IsBitSet(kNonPhys) || !current) { @@ -452,7 +452,7 @@ float plCameraBrain1::IClampVelocity(hsVector3* vel, float maxSpeed, double elap return distMoved; } -hsBool plCameraBrain1::IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal) +bool plCameraBrain1::IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal) { if (decelSpeed == 0) // no deceleration @@ -535,7 +535,7 @@ void plCameraBrain1::Write(hsStream* stream, hsResMgr* mgr) stream->WriteLEFloat(fZoomMin); stream->WriteLEFloat(fZoomMax); } -hsBool plCameraBrain1::MsgReceive(plMessage* msg) +bool plCameraBrain1::MsgReceive(plMessage* msg) { plCameraMsg* pCamMsg = plCameraMsg::ConvertNoRef(msg); if (pCamMsg) @@ -743,7 +743,7 @@ plCameraBrain1_Drive::~plCameraBrain1_Drive() } -void plCameraBrain1_Drive::Push(hsBool recenter) +void plCameraBrain1_Drive::Push(bool recenter) { plCameraBrain1::Push(recenter); plInputManager::SetRecenterMouse(true); @@ -757,7 +757,7 @@ void plCameraBrain1_Drive::Pop() // // Update Method // -void plCameraBrain1_Drive::Update(hsBool forced) +void plCameraBrain1_Drive::Update(bool forced) { hsVector3 neg_up = -1 * fUp; fTargetMatrix.Make(&fGoal, &fPOAGoal, &neg_up); @@ -882,7 +882,7 @@ void plCameraBrain1_Drive::Update(hsBool forced) fCamera->SetTargetPOA(fPOAGoal); } -hsBool plCameraBrain1_Drive::MsgReceive(plMessage* msg) +bool plCameraBrain1_Drive::MsgReceive(plMessage* msg) { plMouseEventMsg* pMouseMsg = plMouseEventMsg::ConvertNoRef(msg); if( pMouseMsg ) @@ -992,7 +992,7 @@ void plCameraBrain1_Avatar::Pop() plCameraBrain1::Pop(); } -void plCameraBrain1_Avatar::Push(hsBool recenter) +void plCameraBrain1_Avatar::Push(bool recenter) { bObscured = false; fFallTimer = 0.0f; @@ -1003,7 +1003,7 @@ void plCameraBrain1_Avatar::Push(hsBool recenter) // // Update Method // -void plCameraBrain1_Avatar::Update(hsBool forced) +void plCameraBrain1_Avatar::Update(bool forced) { if (!GetSubject()) return; @@ -1139,7 +1139,7 @@ void plCameraBrain1_Avatar::IHandleObstacle() // swing around the 'obstacle' } -void plCameraBrain1_Avatar::ISendFadeMsg(hsBool fade) +void plCameraBrain1_Avatar::ISendFadeMsg(bool fade) { if (plVirtualCam1::IsCurrentCamera(GetCamera())) { @@ -1158,7 +1158,7 @@ void plCameraBrain1_Avatar::ISendFadeMsg(hsBool fade) } } -hsBool plCameraBrain1_Avatar::MsgReceive(plMessage* msg) +bool plCameraBrain1_Avatar::MsgReceive(plMessage* msg) { plLOSHitMsg *pLOSMsg = plLOSHitMsg::ConvertNoRef( msg ); if( pLOSMsg ) @@ -1295,7 +1295,7 @@ plCameraBrain1_FirstPerson::~plCameraBrain1_FirstPerson() { } -hsBool plCameraBrain1_FirstPerson::MsgReceive(plMessage* msg) +bool plCameraBrain1_FirstPerson::MsgReceive(plMessage* msg) { plGenRefMsg* pRefMsg = plGenRefMsg::ConvertNoRef(msg); @@ -1429,7 +1429,7 @@ void plCameraBrain1_FirstPerson::CalculatePosition() } -void plCameraBrain1_FirstPerson::Push(hsBool recenter) +void plCameraBrain1_FirstPerson::Push(bool recenter) { if (!GetSubject()) return; @@ -1490,7 +1490,7 @@ void plCameraBrain1_Fixed::Write(hsStream* stream, hsResMgr* mgr) mgr->WriteKey(stream, fTargetPoint); } -void plCameraBrain1_Fixed::Update(hsBool forced) +void plCameraBrain1_Fixed::Update(bool forced) { double secs = hsTimer::GetDelSysSeconds(); if (forced) @@ -1563,7 +1563,7 @@ void plCameraBrain1_Fixed::CalculatePosition() { } -hsBool plCameraBrain1_Fixed::MsgReceive(plMessage* msg) +bool plCameraBrain1_Fixed::MsgReceive(plMessage* msg) { plGenRefMsg* pRefMsg = plGenRefMsg::ConvertNoRef(msg); if (pRefMsg) @@ -1611,7 +1611,7 @@ plCameraBrain1_Circle::~plCameraBrain1_Circle() // // // -void plCameraBrain1_Circle::Update(hsBool forced) +void plCameraBrain1_Circle::Update(bool forced) { double secs = hsTimer::GetDelSysSeconds(); if (forced) @@ -1651,7 +1651,7 @@ void plCameraBrain1_Circle::Update(hsBool forced) // // keep us on the circle // -hsPoint3 plCameraBrain1_Circle::MoveTowardsFromGoal(const hsPoint3* fromGoal, double secs, hsBool warp) +hsPoint3 plCameraBrain1_Circle::MoveTowardsFromGoal(const hsPoint3* fromGoal, double secs, bool warp) { if (fCurRad != fGoalRad) @@ -1659,7 +1659,7 @@ hsPoint3 plCameraBrain1_Circle::MoveTowardsFromGoal(const hsPoint3* fromGoal, do float dist = hsABS(fGoalRad-fCurRad); hsAssert(dist>=0 && dist<=kTwoPI, "illegal radian diff"); - hsBool mustWrap = (dist > M_PI); // go opposite direction for shortcut and wrap + bool mustWrap = (dist > M_PI); // go opposite direction for shortcut and wrap // compute speed float speed; @@ -1676,7 +1676,7 @@ hsPoint3 plCameraBrain1_Circle::MoveTowardsFromGoal(const hsPoint3* fromGoal, do if (mustWrap) { fCurRad-=speed; - hsBool didWrap=false; + bool didWrap=false; while(fCurRad<0) { didWrap=true; @@ -1697,7 +1697,7 @@ hsPoint3 plCameraBrain1_Circle::MoveTowardsFromGoal(const hsPoint3* fromGoal, do if (mustWrap) { fCurRad+=speed; - hsBool didWrap=false; + bool didWrap=false; while(fCurRad>kTwoPI) { didWrap=true; @@ -1791,7 +1791,7 @@ void plCameraBrain1_Circle::Read(hsStream* stream, hsResMgr* mgr) plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), GetKey()); } -hsBool plCameraBrain1_Circle::MsgReceive(plMessage* msg) +bool plCameraBrain1_Circle::MsgReceive(plMessage* msg) { plGenRefMsg* pRefMsg = plGenRefMsg::ConvertNoRef(msg); if (pRefMsg) diff --git a/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.h b/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.h index dd26a85e..9e225841 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.h +++ b/Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.h @@ -103,8 +103,8 @@ public: const plCameraModifier1* GetCamera() { return fCamera; } - virtual void Update(hsBool forced = false); - virtual hsBool MsgReceive(plMessage* msg); + virtual void Update(bool forced = false); + virtual bool MsgReceive(plMessage* msg); virtual plSceneObject* GetSubject(); virtual void SetSubject(plSceneObject* sub); @@ -116,15 +116,15 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool GetFaded() { return false; } - virtual hsBool SetFaded(hsBool b) { return false; } + virtual bool GetFaded() { return false; } + virtual bool SetFaded(bool b) { return false; } - hsBool HasMovementFlag(int f) { return fMoveFlags.IsBitSet(f); } + bool HasMovementFlag(int f) { return fMoveFlags.IsBitSet(f); } void SetMovementFlag(int f); void ClearMovementFlag(int which) { fMoveFlags.ClearBit( which ); } void SetFlags(int i) { fFlags.SetBit(i); } void ClearFlags(int which) { fFlags.ClearBit( which ); } - hsBool HasFlag(int f) { return fFlags.IsBitSet(f); } + bool HasFlag(int f) { return fFlags.IsBitSet(f); } void SetGoal(hsPoint3 pt) { fGoal = pt; } void SetPOAGoal(hsPoint3 pt) { fPOAGoal = pt; } @@ -141,7 +141,7 @@ public: hsPoint3 GetGoal() { return fGoal; } hsPoint3 GetPOAGoal() { return fPOAGoal; } - virtual void Push(hsBool recenter = true); + virtual void Push(bool recenter = true); virtual void Pop(); float GetVelocity() { return fVelocity; } @@ -182,7 +182,7 @@ protected: double elapsedTime); float IClampVelocity(hsVector3* vel, float maxSpeed, double elapsedTime); - hsBool IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal); + bool IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal); plCameraModifier1* fCamera; plKey fSubjectKey; @@ -225,11 +225,11 @@ class plCameraBrain1_Drive : public plCameraBrain1 protected: hsPoint3 fDesiredPosition; hsPoint3 fFacingTarget; - hsBool bUseDesiredFacing; + bool bUseDesiredFacing; float deltaX; float deltaY; - hsBool bDisregardY; // these are here to prevent - hsBool bDisregardX; // the camera from jumping when the mouse cursor recenters / wraps around. + bool bDisregardY; // these are here to prevent + bool bDisregardX; // the camera from jumping when the mouse cursor recenters / wraps around. hsVector3 fUp; public: @@ -243,9 +243,9 @@ public: CLASSNAME_REGISTER( plCameraBrain1_Drive ); GETINTERFACE_ANY( plCameraBrain1_Drive, plCameraBrain1 ); - virtual void Update(hsBool forced = false); - virtual hsBool MsgReceive(plMessage* msg); - virtual void Push(hsBool recenter = true); + virtual void Update(bool forced = false); + virtual bool MsgReceive(plMessage* msg); + virtual void Push(bool recenter = true); virtual void Pop(); static float fAcceleration; @@ -267,8 +267,8 @@ public: GETINTERFACE_ANY( plCameraBrain1_Avatar, plCameraBrain1 ); - virtual void Update(hsBool forced = false); - virtual hsBool MsgReceive(plMessage* msg); + virtual void Update(bool forced = false); + virtual bool MsgReceive(plMessage* msg); virtual void CalculatePosition(); hsVector3 GetOffset() { return fOffset; } @@ -277,21 +277,21 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool GetFaded() { return fFaded; } - virtual hsBool SetFaded(hsBool b) { fFaded = b; return true; } + virtual bool GetFaded() { return fFaded; } + virtual bool SetFaded(bool b) { fFaded = b; return true; } virtual void Pop(); - virtual void Push(hsBool recenter = true); + virtual void Push(bool recenter = true); protected: - void ISendFadeMsg(hsBool fade); + void ISendFadeMsg(bool fade); void IHandleObstacle(); hsPoint3 fHitPoint; hsVector3 fOffset; hsVector3 fHitNormal; - hsBool bObscured; - hsBool fFaded; + bool bObscured; + bool fFaded; plSceneObject* fObstacle; }; @@ -307,12 +307,12 @@ public: GETINTERFACE_ANY( plCameraBrain1_FirstPerson, plCameraBrain1_Avatar ); virtual void CalculatePosition(); - virtual void Push(hsBool recenter = true); + virtual void Push(bool recenter = true); virtual void Pop(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // for console hack - static hsBool fDontFade; + static bool fDontFade; protected: plSceneObject* fPosNode; @@ -333,9 +333,9 @@ public: void SetTargetPoint(plCameraModifier1* pt) { fTargetPoint = pt; } - virtual void Update(hsBool forced = false); + virtual void Update(bool forced = false); void CalculatePosition(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); @@ -382,9 +382,9 @@ public: virtual void Read(hsStream *stream, hsResMgr* mgr); virtual void Write(hsStream *stream, hsResMgr* mgr); - virtual hsPoint3 MoveTowardsFromGoal(const hsPoint3* fromGoal, double secs, hsBool warp = false); - virtual void Update(hsBool forced = false); - virtual hsBool MsgReceive(plMessage* msg); + virtual hsPoint3 MoveTowardsFromGoal(const hsPoint3* fromGoal, double secs, bool warp = false); + virtual void Update(bool forced = false); + virtual bool MsgReceive(plMessage* msg); uint32_t GetCircleFlags() { return fCircleFlags; } hsPoint3* GetCenter() { return &fCenter; } // use GetCenterPoint @@ -396,7 +396,7 @@ public: void SetCircleFlags(uint32_t f) { fCircleFlags|=f; } void SetCenter(hsPoint3* ctr) { fCenter = *ctr; } // Circle lies in the plane z = ctr->z void SetRadius(float radius) { fRadius = radius; } - void SetFarCircleCam(hsBool farType) { if (farType) fCircleFlags |= kFarthest; else fCircleFlags &= ~kFarthest; } + void SetFarCircleCam(bool farType) { if (farType) fCircleFlags |= kFarthest; else fCircleFlags &= ~kFarthest; } void SetCenterObjectKey(plKey k); void SetPOAObject(plSceneObject* pObj) { fPOAObj = pObj; } diff --git a/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp b/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp index 0e592c70..1488eaf1 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp @@ -137,34 +137,34 @@ plSceneObject* plCameraModifier1::GetSubject() return fSubObj; } -void plCameraModifier1::SetFOVw(float f, hsBool fUpdateVCam) +void plCameraModifier1::SetFOVw(float f, bool fUpdateVCam) { fFOVw = f; if (plVirtualCam1::Instance() && fUpdateVCam) plVirtualCam1::SetFOV(fFOVw, fFOVh, this); } -void plCameraModifier1::SetFOVh(float f, hsBool fUpdateVCam) +void plCameraModifier1::SetFOVh(float f, bool fUpdateVCam) { fFOVh = f; if (plVirtualCam1::Instance() && fUpdateVCam) plVirtualCam1::SetFOV(fFOVw, fFOVh, this); } -hsBool plCameraModifier1::SetFaded(hsBool b) +bool plCameraModifier1::SetFaded(bool b) { if (GetBrain()) return GetBrain()->SetFaded(b); return false; } -hsBool plCameraModifier1::GetFaded() +bool plCameraModifier1::GetFaded() { if (GetBrain()) return GetBrain()->GetFaded(); return false; } -hsBool plCameraModifier1::MsgReceive(plMessage* msg) +bool plCameraModifier1::MsgReceive(plMessage* msg) { if (GetBrain()) GetBrain()->MsgReceive(msg); @@ -257,7 +257,7 @@ void plCameraModifier1::Update() GetBrain()->AddTarget(); // update the brain's target } - hsBool moveInSub = !(GetBrain()->HasFlag(plCameraBrain1::kIgnoreSubworldMovement)); + bool moveInSub = !(GetBrain()->HasFlag(plCameraBrain1::kIgnoreSubworldMovement)); if (moveInSub && GetBrain()->GetSubject()) { @@ -330,9 +330,9 @@ void plCameraModifier1::Read(hsStream* stream, hsResMgr* mgr) { plKey key = mgr->ReadKey(stream); - hsBool cutpos = stream->ReadBool(); - hsBool cutpoa = stream->ReadBool(); - hsBool ignore = stream->ReadBool(); + bool cutpos = stream->ReadBool(); + bool cutpoa = stream->ReadBool(); + bool ignore = stream->ReadBool(); float v = stream->ReadLEScalar(); float a = stream->ReadLEScalar(); float d = stream->ReadLEScalar(); @@ -424,7 +424,7 @@ void plCameraModifier1::Write(hsStream* stream, hsResMgr* mgr) stream->WriteBool(fResetAnimOnPop); } -void plCameraModifier1::Push(hsBool recenter) +void plCameraModifier1::Push(bool recenter) { if (fAnimated) { diff --git a/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.h b/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.h index 267e8468..5a1793ec 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.h +++ b/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.h @@ -72,9 +72,9 @@ struct CamTrans } plKey fTransTo; - hsBool fCutPos; - hsBool fCutPOA; - hsBool fIgnore; + bool fCutPos; + bool fCutPOA; + bool fIgnore; float fAccel; float fDecel; float fVelocity; @@ -96,7 +96,7 @@ class plCameraModifier1 : public plSingleModifier protected: void Output(); - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return true; } public: @@ -106,7 +106,7 @@ public: CLASSNAME_REGISTER( plCameraModifier1 ); GETINTERFACE_ANY( plCameraModifier1, plSingleModifier ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void Initialize(); virtual void Update(); @@ -130,10 +130,10 @@ public: void SetSubworldPOA(hsPoint3 pos) { fLastSubPOA = pos; } float GetFOVw() { return fFOVw; } float GetFOVh() { return fFOVh; } - void SetFOVw(float f, hsBool fUpdateVCam = true); - void SetFOVh(float f, hsBool fUpdateVCam = true); - hsBool GetInSubworld() { return fInSubLastUpdate; } - void InSubworld(hsBool b) { fInSubLastUpdate = b; } + void SetFOVw(float f, bool fUpdateVCam = true); + void SetFOVh(float f, bool fUpdateVCam = true); + bool GetInSubworld() { return fInSubLastUpdate; } + void InSubworld(bool b) { fInSubLastUpdate = b; } virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); void AddTrans(CamTrans* t) { fTrans.Append(t); } @@ -142,14 +142,14 @@ public: void SetSubject(plSceneObject* pObj); plSceneObject* GetSubject(); - virtual void Push(hsBool recenter = true); + virtual void Push(bool recenter = true); virtual void Pop(); - virtual hsBool GetFaded(); - virtual hsBool SetFaded(hsBool b); + virtual bool GetFaded(); + virtual bool SetFaded(bool b); - hsBool IsAnimated() { return fAnimated; } - void SetAnimCommands(hsBool a, hsBool b, hsBool c) { fStartAnimOnPush = a; fStopAnimOnPop = b; fResetAnimOnPop = c; } + bool IsAnimated() { return fAnimated; } + void SetAnimCommands(bool a, bool b, bool c) { fStartAnimOnPush = a; fStopAnimOnPop = b; fResetAnimOnPop = c; } private: hsPoint3 fFrom; @@ -161,11 +161,11 @@ private: float fFOVh; hsTArray fMessageQueue; hsTArray fFOVInstructions; - hsBool fAnimated, fStartAnimOnPush, fStopAnimOnPop, fResetAnimOnPop; + bool fAnimated, fStartAnimOnPush, fStopAnimOnPop, fResetAnimOnPop; hsPoint3 fLastSubPos; hsPoint3 fLastSubPOA; - hsBool fInSubLastUpdate; - hsBool fUpdateBrainTarget; // sometimes our target isn't loaded yet, so wait to update the brain til later + bool fInSubLastUpdate; + bool fUpdateBrainTarget; // sometimes our target isn't loaded yet, so wait to update the brain til later }; diff --git a/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.cpp b/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.cpp index 09b69885..a821649d 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.cpp @@ -56,7 +56,7 @@ float plInterestingModifier::fInterestRadius = 100.0f; float plInterestingModifier::fInterestWeight = 1.0f; -hsBool plInterestingModifier::IEval(double secs, float del, uint32_t dirty) +bool plInterestingModifier::IEval(double secs, float del, uint32_t dirty) { for (int i=0; i < GetNumTargets(); i++) { diff --git a/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.h b/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.h index 1d9c1a1f..89ba92d3 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.h +++ b/Sources/Plasma/FeatureLib/pfCamera/plInterestingModifier.h @@ -67,13 +67,13 @@ protected: static float fInterestRadius; static float fInterestWeight; - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); public: plInterestingModifier(){ fType = kTypeInteresting;} virtual ~plInterestingModifier(){;} - virtual hsBool MsgReceive(plMessage* msg) {return false;} + virtual bool MsgReceive(plMessage* msg) {return false;} CLASSNAME_REGISTER( plInterestingModifier ); GETINTERFACE_ANY( plInterestingModifier, plSingleModifier ); diff --git a/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp b/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp index 754282b3..15648f62 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp +++ b/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp @@ -90,9 +90,9 @@ float plVirtualCam1::fFOVw = 45.0f; float plVirtualCam1::fFOVh = 33.75f; float plVirtualCam1::fHither = 0.3f; float plVirtualCam1::fYon = 500.0f; -hsBool plVirtualCam1::printFOV = false; -hsBool plVirtualCam1::fUseAccelOverride = 1; -hsBool plVirtualCam1::freeze = 0; +bool plVirtualCam1::printFOV = false; +bool plVirtualCam1::fUseAccelOverride = 1; +bool plVirtualCam1::freeze = 0; //float plVirtualCam1::fAccel = 5.0f; //float plVirtualCam1::fDecel = 5.0f; //float plVirtualCam1::fVel = 10.0f; @@ -101,9 +101,9 @@ float plVirtualCam1::fDecel = 50.0f; float plVirtualCam1::fVel = 100.0f; float plVirtualCam1::fPanResponseTime = 3.0f; float plVirtualCam1::fFallTimerDelay = 0.25f; -hsBool plVirtualCam1::alwaysCutForColin = false; -hsBool plVirtualCam1::WalkPan3rdPerson = false; -hsBool plVirtualCam1::StayInFirstPersonForever = false; +bool plVirtualCam1::alwaysCutForColin = false; +bool plVirtualCam1::WalkPan3rdPerson = false; +bool plVirtualCam1::StayInFirstPersonForever = false; float plVirtualCam1::fAspectRatio = fFOVw / fFOVh; // #define STATUS_LOG @@ -121,7 +121,7 @@ void plVirtualCam1::AddMsgToLog(const char* msg) #endif } -hsBool plVirtualCam1::IsCurrentCamera(const plCameraModifier1* mod) +bool plVirtualCam1::IsCurrentCamera(const plCameraModifier1* mod) { if (plVirtualCam1::Instance()) { @@ -392,7 +392,7 @@ void plVirtualCam1::SetPipeline(plPipeline* p) SetRender(false); } -void plVirtualCam1::Reset(hsBool bRender) +void plVirtualCam1::Reset(bool bRender) { if (fPythonOverride) fPythonOverride = nil; @@ -455,7 +455,7 @@ plCameraModifier1* plVirtualCam1::GetCurrentCamera() return nil; } -hsBool plVirtualCam1::Is1stPersonCamera() +bool plVirtualCam1::Is1stPersonCamera() { if (GetCurrentStackCamera() == fDriveCamera) return false; @@ -508,7 +508,7 @@ void plVirtualCam1::SetCutNextTrans() #endif } -void plVirtualCam1::SetRender(hsBool render) +void plVirtualCam1::SetRender(bool render) { fFlags.SetBit(kRender,render); if (render) @@ -532,7 +532,7 @@ void plVirtualCam1::SetRender(hsBool render) } // hack, hack, hack -hsBool plVirtualCam1::RestoreFromName(const plString& name) +bool plVirtualCam1::RestoreFromName(const plString& name) { for(plSOVec::iterator it = fCamerasLoaded.begin(); it != fCamerasLoaded.end(); ++it) { @@ -777,7 +777,7 @@ void plVirtualCam1::IUpdate() for (plCameraVec::iterator i = fCameraStack.begin(); i != fCameraStack.end(); ++i) { - hsBool update = true; + bool update = true; for (plCameraVec::iterator j = (i+1); j != fCameraStack.end(); ++j) { if (*i != *j) @@ -954,7 +954,7 @@ void plVirtualCam1::FirstPersonOverride() } } -hsBool plVirtualCam1::MsgReceive(plMessage* msg) +bool plVirtualCam1::MsgReceive(plMessage* msg) { plPlayerPageMsg* pPMsg = plPlayerPageMsg::ConvertNoRef(msg); if (pPMsg) @@ -1356,7 +1356,7 @@ hsBool plVirtualCam1::MsgReceive(plMessage* msg) if (pCam->GetTriggerer() && pCam->GetTriggerer() != plNetClientApp::GetInstance()->GetLocalPlayerKey()) return true; { - hsBool bDef = pCam->Cmd(plCameraMsg::kSetAsPrimary); + bool bDef = pCam->Cmd(plCameraMsg::kSetAsPrimary); plKey pCamKey = pCam->GetNewCam(); if (pCamKey) { @@ -1504,7 +1504,7 @@ void plVirtualCam1::AddCameraToStack(plCameraModifier1* pCam) hsgResMgr::ResMgr()->AddViaNotify(pCam->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefCamera), plRefFlags::kPassiveRef); } -void plVirtualCam1::PushCamera(plCameraModifier1* pCam, hsBool bDefault) +void plVirtualCam1::PushCamera(plCameraModifier1* pCam, bool bDefault) { // pushing the same camera, folks? if (pCam == GetCurrentStackCamera()) @@ -1696,7 +1696,7 @@ void plVirtualCam1::PopCamera(plCameraModifier1* pCam) } // are we mouse-looking? - hsBool mLook = false; + bool mLook = false; if (pCam->GetBrain() && pCam->GetBrain()->HasMovementFlag(S_SET_FREELOOK)) mLook = true; diff --git a/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.h b/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.h index 57727ec2..d950233b 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.h +++ b/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.h @@ -121,7 +121,7 @@ public: void SetPipeline(plPipeline* p); void Init(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); static void SetFOV(float w, float h); static void SetFOV(float w, float h, plCameraModifier1* pCam); static void SetDepth(float h, float y); @@ -133,14 +133,14 @@ public: static void SetAspectRatio(float aspect) { fAspectRatio = aspect; } static float GetAspectRatio() { return fAspectRatio; } - hsBool InTransition() { return fTransPos != POS_TRANS_OFF; } + bool InTransition() { return fTransPos != POS_TRANS_OFF; } plCameraModifier1* GetCurrentCamera(); plCameraModifier1* GetCurrentStackCamera(); plCameraModifier1* GetTransitionCamera(){return fTransitionCamera;} - hsBool Is1stPersonCamera(); + bool Is1stPersonCamera(); - hsBool HasMovementFlag(int f) { return fMoveFlags.IsBitSet(f); } - void SetMovementFlag(int f, hsBool on = true) { fMoveFlags.SetBit(f, on);} + bool HasMovementFlag(int f) { return fMoveFlags.IsBitSet(f); } + void SetMovementFlag(int f, bool on = true) { fMoveFlags.SetBit(f, on);} hsPoint3 GetCameraPos() { return fOutputPos; } hsPoint3 GetCameraPOA() { return fOutputPOA; } @@ -155,34 +155,34 @@ public: void RebuildStack(const plKey& key); void SetFlags(int flag) { fFlags.SetBit(flag); } - hsBool HasFlags(int flag) { return fFlags.IsBitSet(flag); } + bool HasFlags(int flag) { return fFlags.IsBitSet(flag); } void ClearFlags(int flag) { fFlags.ClearBit(flag); } // console command stuff static void Next(); static void Prev(); static void Deactivate(); - void CameraRegions(hsBool b) { fFlags.SetBit(kRegionIgnore,b); } - void LogFOV(hsBool b) { printFOV = b; } + void CameraRegions(bool b) { fFlags.SetBit(kRegionIgnore,b); } + void LogFOV(bool b) { printFOV = b; } void Drive(); void PushThirdPerson(); static void AddMsgToLog(const char* msg); - static hsBool IsCurrentCamera(const plCameraModifier1* mod); + static bool IsCurrentCamera(const plCameraModifier1* mod); void ClearStack(); void AddCameraLoaded(plSceneObject* pCam) { fCamerasLoaded.push_back(pCam); } - hsBool RestoreFromName(const plString& name); + bool RestoreFromName(const plString& name); void StartUnPan(); // these are for console access - static hsBool fUseAccelOverride, freeze, alwaysCutForColin, WalkPan3rdPerson,StayInFirstPersonForever; + static bool fUseAccelOverride, freeze, alwaysCutForColin, WalkPan3rdPerson,StayInFirstPersonForever; static float fDecel, fAccel, fVel; static float fFallTimerDelay; private: - void Reset(hsBool bRender); - void PushCamera(plCameraModifier1* pCam, hsBool bDefault = false); + void Reset(bool bRender); + void PushCamera(plCameraModifier1* pCam, bool bDefault = false); void PopCamera(plCameraModifier1* pCam); void AddCameraToStack(plCameraModifier1* pCam); void PopAll(); @@ -190,7 +190,7 @@ private: void StartTransition(CamTrans* transition); void RunTransition(); void FinishTransition(); - void SetRender(hsBool render); + void SetRender(bool render); void IHandleCameraStatusLog(plCameraModifier1* pMod, int action); void ICreatePlate(); void FreezeOutput(int frames) { fFreezeCounter = frames; } // I hate this and I hate myself for doing it @@ -242,10 +242,10 @@ private: static float fFOVh, fFOVw; static float fHither, fYon; static plVirtualCam1* fInstance; - static hsBool printFOV; + static bool printFOV; static float fPanResponseTime; static float fAspectRatio; - hsBool fForceCutOnce; + bool fForceCutOnce; }; diff --git a/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.cpp b/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.cpp index 8ac17bc9..41d1220d 100644 --- a/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.cpp @@ -280,7 +280,7 @@ bool pfMarkerMgr::AreLocalMarkersShowing() return fShowingLocalMarkers; } -hsBool pfMarkerMgr::MsgReceive(plMessage* msg) +bool pfMarkerMgr::MsgReceive(plMessage* msg) { plEvalMsg* evalMsg = plEvalMsg::ConvertNoRef(msg); if (evalMsg) diff --git a/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.h b/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.h index f74137bd..e9895916 100644 --- a/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.h +++ b/Sources/Plasma/FeatureLib/pfCharacter/pfMarkerMgr.h @@ -89,7 +89,7 @@ public: static pfMarkerMgr* Instance(); static void Shutdown(); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void AddMarker(double x, double y, double z, uint32_t id, bool justCreated); void RemoveMarker(uint32_t id); diff --git a/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.cpp b/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.cpp index bda6531f..1c26c315 100644 --- a/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.cpp @@ -186,7 +186,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // plgAudioSys::SetMuted( false ); //} // -//hsBool plPlayerModifier::MsgReceive(plMessage* msg) +//bool plPlayerModifier::MsgReceive(plMessage* msg) //{ // plControlEventMsg* pCommandMsg = plControlEventMsg::ConvertNoRef(msg); // if (pCommandMsg) @@ -228,9 +228,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // return plSingleModifier::MsgReceive(msg); //} // -//hsBool plPlayerModifier::HandleControlInput(plControlEventMsg* pMsg) +//bool plPlayerModifier::HandleControlInput(plControlEventMsg* pMsg) //{ -// hsBool ret=false; +// bool ret=false; // // if (pMsg->ControlActivated() && (pMsg->GetControlCode() == B_CONTROL_ROTATE_RIGHT || pMsg->GetControlCode() == B_CONTROL_ROTATE_LEFT || pMsg->GetControlCode() == A_CONTROL_TURN)) // { @@ -256,7 +256,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // return ret; //} // -//void plPlayerModifier::SetMoving(hsBool b) +//void plPlayerModifier::SetMoving(bool b) //{ // if (b != bMoving) // { @@ -277,7 +277,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com //hsPoint3 forceRight(-200,0,0); //hsPoint3 forceUp(0,0,15); // -//hsBool plPlayerModifier::IEval(double secs, float del, uint32_t dirty) +//bool plPlayerModifier::IEval(double secs, float del, uint32_t dirty) //{ // // setup for local player if necessary // if (HasFlag(kNeedsLocalSetup)) @@ -610,7 +610,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // return distMoved; //} // -//hsBool32 plPlayerModifier::IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal) +//bool32 plPlayerModifier::IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal) //{ // if (decelSpeed == 0) // // no deceleration diff --git a/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.h b/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.h index a86e2e49..92d4c694 100644 --- a/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.h +++ b/Sources/Plasma/FeatureLib/pfCharacter/plPlayerModifier.h @@ -100,9 +100,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // double elapsedTime); // // float IClampVelocity(hsVector3* vel, float maxSpeed, double elapsedTime); -// hsBool32 IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal); +// bool32 IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal); // -// hsBool HasMovementFlag(int f) const { return fMoveFlags.IsBitSet(f); } +// bool HasMovementFlag(int f) const { return fMoveFlags.IsBitSet(f); } // void SetMovementFlag(int f) { fMoveFlags.SetBit(f); } // void ClearMovementFlag(int which) { fMoveFlags.ClearBit( which ); } // @@ -111,7 +111,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // void WarpToSpawnPoint() { SetFlag( kWantsToSpawn ); } // -// hsBool bMoving; +// bool bMoving; // // void IApplyForce(plSimulationInterface::plSimpleForce type, const Havok::Vector3 &vec); // void IDoLocalSetup(plSceneObject*); @@ -124,17 +124,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // CLASSNAME_REGISTER( plPlayerModifier ); // GETINTERFACE_ANY( plPlayerModifier, plSingleModifier ); // -// virtual hsBool MsgReceive(plMessage* msg); +// virtual bool MsgReceive(plMessage* msg); // virtual void AddTarget(plSceneObject* so); // virtual void RemoveTarget(plSceneObject* so); // -// hsBool HandleControlInput(plControlEventMsg* pMsg); -// virtual hsBool IEval(double secs, float del, uint32_t dirty); +// bool HandleControlInput(plControlEventMsg* pMsg); +// virtual bool IEval(double secs, float del, uint32_t dirty); // -// void SetMoving(hsBool b); -// hsBool IsMoving() { return bMoving; } +// void SetMoving(bool b); +// bool IsMoving() { return bMoving; } // -// hsBool HasFlag(int f) const { return fFlags.IsBitSet(f); } +// bool HasFlag(int f) const { return fFlags.IsBitSet(f); } // void SetFlag(int f) { fFlags.SetBit(f); } // void ClearFlag(int which) { fFlags.ClearBit( which ); } // diff --git a/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.cpp index 2ddd1273..3c37435b 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.cpp @@ -58,7 +58,7 @@ plANDConditionalObject::~plANDConditionalObject() delete (fChildren[i]); } -hsBool plANDConditionalObject::MsgReceive(plMessage* msg) +bool plANDConditionalObject::MsgReceive(plMessage* msg) { plCondRefMsg* pCondMsg = plCondRefMsg::ConvertNoRef(msg); if (pCondMsg) diff --git a/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.h index 34623b25..3d70c62f 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plANDConditionalObject.h @@ -62,7 +62,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void Evaluate(); void Reset(); diff --git a/Sources/Plasma/FeatureLib/pfConditional/plActivatorConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plActivatorConditionalObject.cpp index d32ef7dd..1ee563a2 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plActivatorConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plActivatorConditionalObject.cpp @@ -52,7 +52,7 @@ plActivatorConditionalObject::plActivatorConditionalObject() SetFlag(kLocalElement); // since it relies on user input } -hsBool plActivatorConditionalObject::MsgReceive(plMessage* msg) +bool plActivatorConditionalObject::MsgReceive(plMessage* msg) { plActivatorMsg* pDetectorMsg = plActivatorMsg::ConvertNoRef(msg); if (pDetectorMsg) @@ -130,7 +130,7 @@ hsBool plActivatorConditionalObject::MsgReceive(plMessage* msg) fLogicMod->GetNotify()->AddCollisionEvent(true, pDetectorMsg->fHitterObj, pDetectorMsg->fHiteeObj); } SetSatisfied(true); - //hsBool netRequest = msg->HasBCastFlag(plMessage::kNetNonLocal); + //bool netRequest = msg->HasBCastFlag(plMessage::kNetNonLocal); //fLogicMod->RequestTrigger(netRequest); fLogicMod->RequestTrigger(false); } @@ -166,7 +166,7 @@ void plActivatorConditionalObject::SetActivatorKey(plKey k) // plActivatorActivatorConditional // -hsBool plActivatorActivatorConditionalObject::MsgReceive(plMessage* msg) +bool plActivatorActivatorConditionalObject::MsgReceive(plMessage* msg) { plNotifyMsg* pDetectorMsg = plNotifyMsg::ConvertNoRef(msg); if (pDetectorMsg) @@ -190,7 +190,7 @@ hsBool plActivatorActivatorConditionalObject::MsgReceive(plMessage* msg) } -hsBool plVolActivatorConditionalObject::MsgReceive(plMessage* msg) +bool plVolActivatorConditionalObject::MsgReceive(plMessage* msg) { plActivatorMsg* pDetectorMsg = plActivatorMsg::ConvertNoRef(msg); if (pDetectorMsg) diff --git a/Sources/Plasma/FeatureLib/pfConditional/plActivatorConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plActivatorConditionalObject.h index 525c0c03..9efa9401 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plActivatorConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plActivatorConditionalObject.h @@ -62,7 +62,7 @@ public: CLASSNAME_REGISTER( plActivatorConditionalObject ); GETINTERFACE_ANY( plActivatorConditionalObject, plConditionalObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void Evaluate(){;} void SetActivatorKey(plKey k); @@ -83,7 +83,7 @@ public: CLASSNAME_REGISTER( plActivatorActivatorConditionalObject ); GETINTERFACE_ANY( plActivatorActivatorConditionalObject, plActivatorConditionalObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; @@ -98,7 +98,7 @@ public: CLASSNAME_REGISTER( plVolActivatorConditionalObject ); GETINTERFACE_ANY( plVolActivatorConditionalObject, plActivatorConditionalObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; diff --git a/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.cpp index b5813439..5b39836a 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.cpp @@ -54,7 +54,7 @@ fAction(kEventEnd) { } -hsBool plAnimationEventConditionalObject::MsgReceive(plMessage* msg) +bool plAnimationEventConditionalObject::MsgReceive(plMessage* msg) { plEventCallbackMsg* pMsg = plEventCallbackMsg::ConvertNoRef(msg); if (pMsg) diff --git a/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.h index a8be7ced..b250a34f 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plAnimationEventConditionalObject.h @@ -66,7 +66,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void Evaluate(){;} void Reset() { SetSatisfied(false); } diff --git a/Sources/Plasma/FeatureLib/pfConditional/plControlEventConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plControlEventConditionalObject.cpp index 90d5152c..696ebc11 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plControlEventConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plControlEventConditionalObject.cpp @@ -50,7 +50,7 @@ plControlEventConditionalObject::plControlEventConditionalObject() } -hsBool plControlEventConditionalObject::MsgReceive(plMessage* msg) +bool plControlEventConditionalObject::MsgReceive(plMessage* msg) { plControlEventMsg* pControlMsg = plControlEventMsg::ConvertNoRef(msg); if( pControlMsg ) diff --git a/Sources/Plasma/FeatureLib/pfConditional/plControlEventConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plControlEventConditionalObject.h index 933f36cb..5348460a 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plControlEventConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plControlEventConditionalObject.h @@ -64,7 +64,7 @@ public: virtual void Write(hsStream* stream, hsResMgr* mgr); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void Evaluate(){;} void Reset() { SetSatisfied(false); } diff --git a/Sources/Plasma/FeatureLib/pfConditional/plFacingConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plFacingConditionalObject.cpp index 9e1ef04b..c4746473 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plFacingConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plFacingConditionalObject.cpp @@ -58,7 +58,7 @@ fDirectional(false) SetSatisfied(true); } -hsBool plFacingConditionalObject::MsgReceive(plMessage* msg) +bool plFacingConditionalObject::MsgReceive(plMessage* msg) { return plConditionalObject::MsgReceive(msg); } @@ -78,7 +78,7 @@ void plFacingConditionalObject::Read(hsStream* stream, hsResMgr* mgr) fDirectional = stream->ReadBool(); } -hsBool plFacingConditionalObject::Verify(plMessage* msg) +bool plFacingConditionalObject::Verify(plMessage* msg) { plActivatorMsg* pActivateMsg = plActivatorMsg::ConvertNoRef(msg); if (pActivateMsg && pActivateMsg->fHitterObj) diff --git a/Sources/Plasma/FeatureLib/pfConditional/plFacingConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plFacingConditionalObject.h index 97380e6c..d6a5fda8 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plFacingConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plFacingConditionalObject.h @@ -51,7 +51,7 @@ class plFacingConditionalObject : public plConditionalObject { protected: float fTolerance; - hsBool fDirectional; + bool fDirectional; public: @@ -61,12 +61,12 @@ public: CLASSNAME_REGISTER( plFacingConditionalObject ); GETINTERFACE_ANY( plFacingConditionalObject, plConditionalObject ); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void SetTolerance(float d) { fTolerance = d; } - void SetDirectional(hsBool d) { fDirectional = d; } + void SetDirectional(bool d) { fDirectional = d; } - virtual hsBool Verify(plMessage* msg); + virtual bool Verify(plMessage* msg); void Evaluate(){;} void Reset() { SetSatisfied(true); } diff --git a/Sources/Plasma/FeatureLib/pfConditional/plKeyPressConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plKeyPressConditionalObject.cpp index 27734c8c..f3a70934 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plKeyPressConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plKeyPressConditionalObject.cpp @@ -50,7 +50,7 @@ plKeyPressConditionalObject::plKeyPressConditionalObject() SetFlag(kLocalElement); // since it relies on user input } -hsBool plKeyPressConditionalObject::MsgReceive(plMessage* msg) +bool plKeyPressConditionalObject::MsgReceive(plMessage* msg) { plKeyEventMsg* pKeyMsg = plKeyEventMsg::ConvertNoRef(msg); if( pKeyMsg ) diff --git a/Sources/Plasma/FeatureLib/pfConditional/plKeyPressConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plKeyPressConditionalObject.h index 54ba3aa2..23a64aa2 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plKeyPressConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plKeyPressConditionalObject.h @@ -64,7 +64,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void Evaluate(){;} void Reset() { SetSatisfied(false); } diff --git a/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerInBoxConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerInBoxConditionalObject.cpp index c93b9e86..cc549629 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerInBoxConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerInBoxConditionalObject.cpp @@ -50,7 +50,7 @@ plLocalPlayerInBoxConditionalObject::plLocalPlayerInBoxConditionalObject() SetFlag(kLocalElement); // since it relies on the local player } -hsBool plLocalPlayerInBoxConditionalObject::MsgReceive(plMessage* msg) +bool plLocalPlayerInBoxConditionalObject::MsgReceive(plMessage* msg) { /* diff --git a/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerInBoxConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerInBoxConditionalObject.h index b71deb28..6f18adda 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerInBoxConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerInBoxConditionalObject.h @@ -61,7 +61,7 @@ public: CLASSNAME_REGISTER( plLocalPlayerInBoxConditionalObject ); GETINTERFACE_ANY( plLocalPlayerInBoxConditionalObject, plConditionalObject ); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void SetBox(plKey pKey) { fBox = pKey; } diff --git a/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerIntersectPlaneConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerIntersectPlaneConditionalObject.cpp index 544867ad..4eda5398 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerIntersectPlaneConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerIntersectPlaneConditionalObject.cpp @@ -49,7 +49,7 @@ plLocalPlayerIntersectPlaneConditionalObject::plLocalPlayerIntersectPlaneConditi SetFlag(kLocalElement); // since it relies on the local player } -hsBool plLocalPlayerIntersectPlaneConditionalObject::MsgReceive(plMessage* msg) +bool plLocalPlayerIntersectPlaneConditionalObject::MsgReceive(plMessage* msg) { /* diff --git a/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerIntersectPlaneConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerIntersectPlaneConditionalObject.h index d9f9c666..a1e13f04 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerIntersectPlaneConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plLocalPlayerIntersectPlaneConditionalObject.h @@ -61,7 +61,7 @@ public: CLASSNAME_REGISTER( plLocalPlayerIntersectPlaneConditionalObject ); GETINTERFACE_ANY( plLocalPlayerIntersectPlaneConditionalObject, plConditionalObject ); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void SetTarget(plKey pKey) { fTarget = pKey; } void SetPlane(plKey pKey) { fPlane = pKey; } diff --git a/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.cpp index 56ed738c..b7a5d23b 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.cpp @@ -58,7 +58,7 @@ plORConditionalObject::~plORConditionalObject() fChildren.SetCountAndZero(0); } -hsBool plORConditionalObject::MsgReceive(plMessage* msg) +bool plORConditionalObject::MsgReceive(plMessage* msg) { plCondRefMsg* pCondMsg = plCondRefMsg::ConvertNoRef(msg); if (pCondMsg) @@ -81,7 +81,7 @@ void plORConditionalObject::SetLogicMod(plLogicModBase* pMod) } } -hsBool plORConditionalObject::Satisfied() +bool plORConditionalObject::Satisfied() { for (int i = 0; i < fChildren.Count(); i++) { diff --git a/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.h index 7e54149f..88b1f178 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plORConditionalObject.h @@ -62,9 +62,9 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool Satisfied(); + virtual bool Satisfied(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void Evaluate(){;} void Reset(); diff --git a/Sources/Plasma/FeatureLib/pfConditional/plObjectInBoxConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plObjectInBoxConditionalObject.cpp index c8c93906..2cba9c8b 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plObjectInBoxConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plObjectInBoxConditionalObject.cpp @@ -58,7 +58,7 @@ fCurrentTrigger(nil) SetSatisfied(true); } -hsBool plObjectInBoxConditionalObject::MsgReceive(plMessage* msg) +bool plObjectInBoxConditionalObject::MsgReceive(plMessage* msg) { plActivatorMsg* pActivateMsg = plActivatorMsg::ConvertNoRef(msg); if (pActivateMsg) @@ -92,7 +92,7 @@ hsBool plObjectInBoxConditionalObject::MsgReceive(plMessage* msg) return plConditionalObject::MsgReceive(msg); } -hsBool plObjectInBoxConditionalObject::Verify(plMessage* msg) +bool plObjectInBoxConditionalObject::Verify(plMessage* msg) { plActivatorMsg* pActivateMsg = plActivatorMsg::ConvertNoRef(msg); if (pActivateMsg) @@ -135,7 +135,7 @@ fIgnoreExtraEnters(true) } -hsBool plVolumeSensorConditionalObject::MsgReceive(plMessage* msg) +bool plVolumeSensorConditionalObject::MsgReceive(plMessage* msg) { plActivatorMsg* pActivateMsg = plActivatorMsg::ConvertNoRef(msg); if (pActivateMsg) @@ -256,7 +256,7 @@ hsBool plVolumeSensorConditionalObject::MsgReceive(plMessage* msg) return plConditionalObject::MsgReceive(msg); } -hsBool plVolumeSensorConditionalObject::Satisfied() +bool plVolumeSensorConditionalObject::Satisfied() { if (fType == kTypeExit && fFirst && !fTriggered) { @@ -295,7 +295,7 @@ void plVolumeSensorConditionalObject::Write(hsStream* stream, hsResMgr* mgr) } #include "pnMessage/plPlayerPageMsg.h" #include "plgDispatch.h" -hsBool plVolumeSensorConditionalObjectNoArbitration::MsgReceive(plMessage* msg) +bool plVolumeSensorConditionalObjectNoArbitration::MsgReceive(plMessage* msg) { plActivatorMsg* pActivateMsg = plActivatorMsg::ConvertNoRef(msg); if (pActivateMsg) diff --git a/Sources/Plasma/FeatureLib/pfConditional/plObjectInBoxConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plObjectInBoxConditionalObject.h index 85959da3..a1d22c1b 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plObjectInBoxConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plObjectInBoxConditionalObject.h @@ -63,12 +63,12 @@ public: CLASSNAME_REGISTER( plObjectInBoxConditionalObject ); GETINTERFACE_ANY( plObjectInBoxConditionalObject, plConditionalObject ); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void Evaluate(){;} void Reset() { SetSatisfied(false); } - virtual hsBool Satisfied() { return true; } - virtual hsBool Verify(plMessage* msg); + virtual bool Satisfied() { return true; } + virtual bool Verify(plMessage* msg); }; @@ -80,9 +80,9 @@ protected: hsTArray fInside; int fTrigNum; int fType; - hsBool fFirst; - hsBool fTriggered; - hsBool fIgnoreExtraEnters; + bool fFirst; + bool fTriggered; + bool fIgnoreExtraEnters; public: static bool makeBriceHappyVar; @@ -99,17 +99,17 @@ public: CLASSNAME_REGISTER( plVolumeSensorConditionalObject ); GETINTERFACE_ANY( plVolumeSensorConditionalObject, plConditionalObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void Evaluate(){;} void Reset() { SetSatisfied(false); } - virtual hsBool Satisfied(); + virtual bool Satisfied(); void SetType(int i) { fType = i; } void SetTrigNum(int i) { fTrigNum = i; } - void SetFirst(hsBool b) { fFirst = b; } + void SetFirst(bool b) { fFirst = b; } - void IgnoreExtraEnters(hsBool ignore = true) {fIgnoreExtraEnters = ignore;} + void IgnoreExtraEnters(bool ignore = true) {fIgnoreExtraEnters = ignore;} virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); @@ -122,7 +122,7 @@ public: ~plVolumeSensorConditionalObjectNoArbitration (){;} CLASSNAME_REGISTER( plVolumeSensorConditionalObjectNoArbitration ); GETINTERFACE_ANY( plVolumeSensorConditionalObjectNoArbitration, plConditionalObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); protected: plKey fHittee; diff --git a/Sources/Plasma/FeatureLib/pfConditional/plObjectIntersectPlaneConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plObjectIntersectPlaneConditionalObject.cpp index 0e9dd989..f5aa701f 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plObjectIntersectPlaneConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plObjectIntersectPlaneConditionalObject.cpp @@ -49,7 +49,7 @@ plObjectIntersectPlaneConditionalObject::plObjectIntersectPlaneConditionalObject } -hsBool plObjectIntersectPlaneConditionalObject::MsgReceive(plMessage* msg) +bool plObjectIntersectPlaneConditionalObject::MsgReceive(plMessage* msg) { /* diff --git a/Sources/Plasma/FeatureLib/pfConditional/plObjectIntersectPlaneConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plObjectIntersectPlaneConditionalObject.h index 674b236f..c80cbee5 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plObjectIntersectPlaneConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plObjectIntersectPlaneConditionalObject.h @@ -61,7 +61,7 @@ public: CLASSNAME_REGISTER( plObjectIntersectPlaneConditionalObject ); GETINTERFACE_ANY( plObjectIntersectPlaneConditionalObject, plConditionalObject ); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void SetTarget(plKey pKey) { fTarget = pKey; } void SetPlane(plKey pKey) { fPlane = pKey; } diff --git a/Sources/Plasma/FeatureLib/pfConditional/plPickedConditionalObject.cpp b/Sources/Plasma/FeatureLib/pfConditional/plPickedConditionalObject.cpp index 82173c4a..b4b80cdd 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plPickedConditionalObject.cpp +++ b/Sources/Plasma/FeatureLib/pfConditional/plPickedConditionalObject.cpp @@ -51,7 +51,7 @@ plPickedConditionalObject::plPickedConditionalObject() SetFlag(kLocalElement); // since it relies on user input } -hsBool plPickedConditionalObject::MsgReceive(plMessage* msg) +bool plPickedConditionalObject::MsgReceive(plMessage* msg) { plActivatorMsg* pDetectorMsg = plActivatorMsg::ConvertNoRef(msg); if (pDetectorMsg && pDetectorMsg->TriggerType() == plActivatorMsg::kPickedTrigger ) diff --git a/Sources/Plasma/FeatureLib/pfConditional/plPickedConditionalObject.h b/Sources/Plasma/FeatureLib/pfConditional/plPickedConditionalObject.h index 8c2dee2b..f52383f0 100644 --- a/Sources/Plasma/FeatureLib/pfConditional/plPickedConditionalObject.h +++ b/Sources/Plasma/FeatureLib/pfConditional/plPickedConditionalObject.h @@ -60,7 +60,7 @@ public: CLASSNAME_REGISTER( plPickedConditionalObject ); GETINTERFACE_ANY( plPickedConditionalObject, plConditionalObject ); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void Evaluate(){;} void Reset() { SetSatisfied(false); } diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfAvatarConsoleCommands.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfAvatarConsoleCommands.cpp index 780d457a..00a6c920 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfAvatarConsoleCommands.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfAvatarConsoleCommands.cpp @@ -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(params[1]) ? true : false; + bool enable = static_cast(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]); diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp index c029c919..86b43120 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp @@ -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; diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.h b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.h index 867d4708..2acb3af4 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.h +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.h @@ -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; } diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp index 01822629..7cd34f04 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp @@ -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]; diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp index 2d2a0151..196602a3 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.cpp @@ -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) { diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.h b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.h index fdb72d30..3d065e9a 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.h +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleDirSrc.h @@ -73,7 +73,7 @@ class pfConsoleDirSrc FileName(const std::wstring& p, const std::wstring& f) : fPath(p), fFile(f) {} }; std::vector 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; } }; diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp index 97da27ef..ef3879a2 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp @@ -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; diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfGameConsoleCommands.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfGameConsoleCommands.cpp index ec70cb6e..36fe5e5e 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfGameConsoleCommands.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfGameConsoleCommands.cpp @@ -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; diff --git a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.cpp b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.cpp index acb8e293..bbab96e9 100644 --- a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.cpp +++ b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.cpp @@ -373,7 +373,7 @@ char pfConsoleCmd::fSigTypes[ kNumTypes ][ 8 ] = { "int", "float", "bool", "s pfConsoleCmd::pfConsoleCmd(const char *group, const char *name, const char *paramList, const char *help, - pfConsoleCmdPtr func, hsBool localOnly ) + pfConsoleCmdPtr func, bool localOnly ) { fNext = nil; fPrevPtr = nil; diff --git a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.h b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.h index 47a39ec7..22c09b74 100644 --- a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.h +++ b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.h @@ -178,7 +178,7 @@ class pfConsoleCmd const char* fHelpString; pfConsoleCmdPtr fFunction; - hsBool fLocalOnly; + bool fLocalOnly; pfConsoleCmd *fNext; pfConsoleCmd **fPrevPtr; @@ -208,7 +208,7 @@ class pfConsoleCmd static char fSigTypes[ kNumTypes ][ 8 ]; - pfConsoleCmd(const char *group, const char *name, const char *paramList, const char *help, pfConsoleCmdPtr func, hsBool localOnly = false ); + pfConsoleCmd(const char *group, const char *name, const char *paramList, const char *help, pfConsoleCmdPtr func, bool localOnly = false ); ~pfConsoleCmd(); void Register(const char *group, const char *name ); diff --git a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCommandsCore.cpp b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCommandsCore.cpp index 36d16c3c..601993db 100644 --- a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCommandsCore.cpp +++ b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCommandsCore.cpp @@ -149,14 +149,14 @@ PF_CONSOLE_CMD( "string base64Key", "Set the Auth Server N key" ) { - int baseLength = hsStrlen((const char *)params[0]); + int baseLength = strlen((const char *)params[0]); if ((kNetDiffieHellmanKeyBits / 8) != Base64DecodeSize(baseLength, (const char *)params[0])) { PrintStringF(PrintString, "Invalid key: should be exactly %u bytes", kNetDiffieHellmanKeyBits / 8); return; } - Base64Decode(hsStrlen((const char *)params[0]), (const char *)params[0], + Base64Decode(strlen((const char *)params[0]), (const char *)params[0], kNetDiffieHellmanKeyBits / 8, kAuthDhNData); } @@ -167,14 +167,14 @@ PF_CONSOLE_CMD( "string base64Key", "Set the Auth Server X key" ) { - int baseLength = hsStrlen((const char *)params[0]); + int baseLength = strlen((const char *)params[0]); if ((kNetDiffieHellmanKeyBits / 8) != Base64DecodeSize(baseLength, (const char *)params[0])) { PrintStringF(PrintString, "Invalid key: should be exactly %u bytes", kNetDiffieHellmanKeyBits / 8); return; } - Base64Decode(hsStrlen((const char *)params[0]), (const char *)params[0], + Base64Decode(strlen((const char *)params[0]), (const char *)params[0], kNetDiffieHellmanKeyBits / 8, kAuthDhXData); } @@ -190,14 +190,14 @@ PF_CONSOLE_CMD( "string base64Key", "Set the Game Server N key" ) { - int baseLength = hsStrlen((const char *)params[0]); + int baseLength = strlen((const char *)params[0]); if ((kNetDiffieHellmanKeyBits / 8) != Base64DecodeSize(baseLength, (const char *)params[0])) { PrintStringF(PrintString, "Invalid key: should be exactly %u bytes", kNetDiffieHellmanKeyBits / 8); return; } - Base64Decode(hsStrlen((const char *)params[0]), (const char *)params[0], + Base64Decode(strlen((const char *)params[0]), (const char *)params[0], kNetDiffieHellmanKeyBits / 8, kGameDhNData); } @@ -208,14 +208,14 @@ PF_CONSOLE_CMD( "string base64Key", "Set the Game Server X key" ) { - int baseLength = hsStrlen((const char *)params[0]); + int baseLength = strlen((const char *)params[0]); if ((kNetDiffieHellmanKeyBits / 8) != Base64DecodeSize(baseLength, (const char *)params[0])) { PrintStringF(PrintString, "Invalid key: should be exactly %u bytes", kNetDiffieHellmanKeyBits / 8); return; } - Base64Decode(hsStrlen((const char *)params[0]), (const char *)params[0], + Base64Decode(strlen((const char *)params[0]), (const char *)params[0], kNetDiffieHellmanKeyBits / 8, kGameDhXData); } @@ -241,14 +241,14 @@ PF_CONSOLE_CMD( "string base64Key", "Set the GateKeeper Server N key" ) { - int baseLength = hsStrlen((const char *)params[0]); + int baseLength = strlen((const char *)params[0]); if ((kNetDiffieHellmanKeyBits / 8) != Base64DecodeSize(baseLength, (const char *)params[0])) { PrintStringF(PrintString, "Invalid key: should be exactly %u bytes", kNetDiffieHellmanKeyBits / 8); return; } - Base64Decode(hsStrlen((const char *)params[0]), (const char *)params[0], + Base64Decode(strlen((const char *)params[0]), (const char *)params[0], kNetDiffieHellmanKeyBits / 8, kGateKeeperDhNData); } @@ -259,13 +259,13 @@ PF_CONSOLE_CMD( "string base64Key", "Set the GateKeeper Server X key" ) { - int baseLength = hsStrlen((const char *)params[0]); + int baseLength = strlen((const char *)params[0]); if ((kNetDiffieHellmanKeyBits / 8) != Base64DecodeSize(baseLength, (const char *)params[0])) { PrintStringF(PrintString, "Invalid key: should be exactly %u bytes", kNetDiffieHellmanKeyBits / 8); return; } - Base64Decode(hsStrlen((const char *)params[0]), (const char *)params[0], + Base64Decode(strlen((const char *)params[0]), (const char *)params[0], kNetDiffieHellmanKeyBits / 8, kGateKeeperDhXData); } diff --git a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleContext.cpp b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleContext.cpp index 3b529f72..13e0b258 100644 --- a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleContext.cpp +++ b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleContext.cpp @@ -216,7 +216,7 @@ void pfConsoleContext::AddVar( const char *name, bool value ) //// SetVar Variants ///////////////////////////////////////////////////////// -hsBool pfConsoleContext::SetVar( uint32_t idx, const pfConsoleCmdParam &value ) +bool pfConsoleContext::SetVar( uint32_t idx, const pfConsoleCmdParam &value ) { hsAssert( fVarValues.GetCount() == fVarNames.GetCount(), "Mismatch in console var context arrays" ); if( idx >= fVarValues.GetCount() ) @@ -238,7 +238,7 @@ hsBool pfConsoleContext::SetVar( uint32_t idx, const pfConsoleCmdParam &value ) return true; } -hsBool pfConsoleContext::SetVar( const char *name, const pfConsoleCmdParam &value ) +bool pfConsoleContext::SetVar( const char *name, const pfConsoleCmdParam &value ) { int32_t idx = FindVar( name ); if( idx == -1 ) @@ -255,35 +255,35 @@ hsBool pfConsoleContext::SetVar( const char *name, const pfConsoleCmdParam &val return SetVar( idx, value ); } -hsBool pfConsoleContext::SetVar( const char *name, int value ) +bool pfConsoleContext::SetVar( const char *name, int value ) { pfConsoleCmdParam param; param.SetInt( value ); return SetVar( name, param ); } -hsBool pfConsoleContext::SetVar( const char *name, float value ) +bool pfConsoleContext::SetVar( const char *name, float value ) { pfConsoleCmdParam param; param.SetFloat( value ); return SetVar( name, param ); } -hsBool pfConsoleContext::SetVar( const char *name, const char *value ) +bool pfConsoleContext::SetVar( const char *name, const char *value ) { pfConsoleCmdParam param; param.SetString( (char *)value ); // Don't worry, we'll be copying it soon 'nuf return SetVar( name, param ); } -hsBool pfConsoleContext::SetVar( const char *name, char value ) +bool pfConsoleContext::SetVar( const char *name, char value ) { pfConsoleCmdParam param; param.SetChar( value ); return SetVar( name, param ); } -hsBool pfConsoleContext::SetVar( const char *name, bool value ) +bool pfConsoleContext::SetVar( const char *name, bool value ) { pfConsoleCmdParam param; param.SetBool( value ); diff --git a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleContext.h b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleContext.h index 3aa42d1a..ce452d04 100644 --- a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleContext.h +++ b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleContext.h @@ -58,7 +58,7 @@ class pfConsoleContext { protected: - hsBool fAddWhenNotFound; // Controls whether we add variables on Set() calls if they're not found + bool fAddWhenNotFound; // Controls whether we add variables on Set() calls if they're not found char *fName; @@ -90,18 +90,18 @@ class pfConsoleContext void AddVar( const char *name, char value ); void AddVar( const char *name, bool value ); - hsBool SetVar( uint32_t idx, const pfConsoleCmdParam &value ); + bool SetVar( uint32_t idx, const pfConsoleCmdParam &value ); - hsBool SetVar( const char *name, const pfConsoleCmdParam &value ); - hsBool SetVar( const char *name, int value ); - hsBool SetVar( const char *name, float value ); - hsBool SetVar( const char *name, const char *value ); - hsBool SetVar( const char *name, char value ); - hsBool SetVar( const char *name, bool value ); + bool SetVar( const char *name, const pfConsoleCmdParam &value ); + bool SetVar( const char *name, int value ); + bool SetVar( const char *name, float value ); + bool SetVar( const char *name, const char *value ); + bool SetVar( const char *name, char value ); + bool SetVar( const char *name, bool value ); // Decide whether Sets() on nonexistant variables will fail or add a new variable - void SetAddWhenNotFound( hsBool f ) { fAddWhenNotFound = f; } - hsBool GetAddWhenNotFound( void ) const { return fAddWhenNotFound; } + void SetAddWhenNotFound( bool f ) { fAddWhenNotFound = f; } + bool GetAddWhenNotFound( void ) const { return fAddWhenNotFound; } static pfConsoleContext &GetRootContext( void ); }; diff --git a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleEngine.cpp b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleEngine.cpp index 63888ae7..551cf44c 100644 --- a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleEngine.cpp +++ b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleEngine.cpp @@ -58,7 +58,7 @@ static const char kTokenSeparators[] = " =\r\n\t,"; static const char kTokenGrpSeps[] = " =\r\n._\t,"; //WARNING: Potentially increments the pointer passed to it. -static char *console_strtok( char *&line, hsBool haveCommand ) +static char *console_strtok( char *&line, bool haveCommand ) { char *begin = line; @@ -118,7 +118,7 @@ pfConsoleEngine::~pfConsoleEngine() //// PrintCmdHelp //////////////////////////////////////////////////////////// -hsBool pfConsoleEngine::PrintCmdHelp( char *name, void (*PrintFn)( const char * ) ) +bool pfConsoleEngine::PrintCmdHelp( char *name, void (*PrintFn)( const char * ) ) { pfConsoleCmd *cmd; pfConsoleCmdGroup *group, *subGrp; @@ -247,15 +247,15 @@ void DummyPrintFn( const char *line ) //// ExecuteFile ///////////////////////////////////////////////////////////// -hsBool pfConsoleEngine::ExecuteFile( const char *fileName ) +bool pfConsoleEngine::ExecuteFile( const char *fileName ) { wchar_t* wFilename = hsStringToWString(fileName); - hsBool ret = ExecuteFile(wFilename); + bool ret = ExecuteFile(wFilename); delete [] wFilename; return ret; } -hsBool pfConsoleEngine::ExecuteFile( const wchar_t *fileName ) +bool pfConsoleEngine::ExecuteFile( const wchar_t *fileName ) { char string[ 512 ]; int line; @@ -298,14 +298,14 @@ hsBool pfConsoleEngine::ExecuteFile( const wchar_t *fileName ) // requires tokenizing the entire line and searching the tokens one by one, // parsing them first as groups, then commands and then params. -hsBool pfConsoleEngine::RunCommand( char *line, void (*PrintFn)( const char * ) ) +bool pfConsoleEngine::RunCommand( char *line, void (*PrintFn)( const char * ) ) { pfConsoleCmd *cmd; pfConsoleCmdGroup *group, *subGrp; int32_t numParams, i, numQuotedParams = 0; pfConsoleCmdParam paramArray[ fMaxNumParams + 1 ]; char *ptr; - hsBool valid = true; + bool valid = true; hsAssert( line != nil, "Bad parameter to RunCommand()" ); @@ -402,10 +402,10 @@ hsBool pfConsoleEngine::RunCommand( char *line, void (*PrintFn)( const char * ) // Converts a null-terminated string representing a parameter to a // pfConsoleCmdParam argument. -hsBool pfConsoleEngine::IConvertToParam( uint8_t type, char *string, pfConsoleCmdParam *param ) +bool pfConsoleEngine::IConvertToParam( uint8_t type, char *string, pfConsoleCmdParam *param ) { char *c, expChars[] = "dDeE+-."; - hsBool hasDecimal = false, hasLetters = false; + bool hasDecimal = false, hasLetters = false; if( type == pfConsoleCmd::kNone ) @@ -470,11 +470,11 @@ hsBool pfConsoleEngine::IConvertToParam( uint8_t type, char *string, pfConsoleC // string to represent the best match of command (or group) for that string. // WARNING: modifies the string passed to it. -hsBool pfConsoleEngine::FindPartialCmd( char *line, hsBool findAgain, hsBool preserveParams ) +bool pfConsoleEngine::FindPartialCmd( char *line, bool findAgain, bool preserveParams ) { pfConsoleCmd *cmd = nil; pfConsoleCmdGroup *group, *subGrp; - hsBool foundMore = false; + bool foundMore = false; static char *ptr = nil, *insertLoc = nil; static pfConsoleCmd *lastCmd = nil; @@ -561,7 +561,7 @@ hsBool pfConsoleEngine::FindPartialCmd( char *line, hsBool findAgain, hsBool pr // groups. numToSkip specifies how many matches to skip before returning one // (so if numToSkip = 1, then this will return the second match found). -hsBool pfConsoleEngine::FindNestedPartialCmd( char *line, uint32_t numToSkip, hsBool preserveParams ) +bool pfConsoleEngine::FindNestedPartialCmd( char *line, uint32_t numToSkip, bool preserveParams ) { pfConsoleCmd *cmd; diff --git a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleEngine.h b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleEngine.h index e9595971..cf1f112c 100644 --- a/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleEngine.h +++ b/Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleEngine.h @@ -69,7 +69,7 @@ class pfConsoleEngine static const int32_t fMaxNumParams; - hsBool IConvertToParam( uint8_t type, char *string, pfConsoleCmdParam *param ); + bool IConvertToParam( uint8_t type, char *string, pfConsoleCmdParam *param ); char fErrorMsg[ 128 ]; char fLastErrorLine[ 512 ]; @@ -88,14 +88,14 @@ class pfConsoleEngine const char *GetCmdSignature( char *name ); // Prints out the help for a given command (or group) - hsBool PrintCmdHelp( char *name, void (*PrintFn)( const char * ) ); + bool PrintCmdHelp( char *name, void (*PrintFn)( const char * ) ); // Breaks the given line into a command and parameters and runs the command - hsBool RunCommand( char *line, void (*PrintFn)( const char * ) ); + bool RunCommand( char *line, void (*PrintFn)( const char * ) ); // Executes the given file as a sequence of console commands - hsBool ExecuteFile( const char *fileName ); - hsBool ExecuteFile( const wchar_t *fileName ); + bool ExecuteFile( const char *fileName ); + bool ExecuteFile( const wchar_t *fileName ); // Get the last reported error const char *GetErrorMsg( void ) { return fErrorMsg; } @@ -104,10 +104,10 @@ class pfConsoleEngine const char *GetLastErrorLine( void ) { return fLastErrorLine; } // Does command completion on a partially-complete console line - hsBool FindPartialCmd( char *line, hsBool findAgain = false, hsBool perserveParams = false ); + bool FindPartialCmd( char *line, bool findAgain = false, bool perserveParams = false ); // Does command completion without restrictions to any group, skipping the number of matches given - hsBool FindNestedPartialCmd( char *line, uint32_t numToSkip, hsBool perserveParams = false ); + bool FindNestedPartialCmd( char *line, uint32_t numToSkip, bool perserveParams = false ); }; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.cpp index d31af392..af6daade 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.cpp @@ -71,11 +71,11 @@ class pfGUIButtonDragProc : public pfGUICtrlProcObject pfGUIButtonMod *fParent; pfGUIDraggableMod *fDraggable; - hsBool fReportDrag; + bool fReportDrag; public: - pfGUIButtonDragProc( pfGUIButtonMod *parent, pfGUIDraggableMod *draggable, pfGUICtrlProcObject *origProc, hsBool reportDrag ) + pfGUIButtonDragProc( pfGUIButtonMod *parent, pfGUIDraggableMod *draggable, pfGUICtrlProcObject *origProc, bool reportDrag ) { fParent = parent; fDraggable = draggable; @@ -121,7 +121,7 @@ class pfGUIButtonDragProc : public pfGUICtrlProcObject }; -void pfGUIButtonMod::StopDragging( hsBool cancel ) +void pfGUIButtonMod::StopDragging( bool cancel ) { fDraggable->StopDragging( cancel ); fDraggable->SetVisible( false ); @@ -161,14 +161,14 @@ pfGUIButtonMod::pfGUIButtonMod() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIButtonMod::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIButtonMod::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIButtonMod::MsgReceive( plMessage *msg ) +bool pfGUIButtonMod::MsgReceive( plMessage *msg ) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg ); if( refMsg != nil && refMsg->fType == kRefDraggable ) @@ -232,7 +232,7 @@ void pfGUIButtonMod::Write( hsStream *s, hsResMgr *mgr ) //// UpdateBounds //////////////////////////////////////////////////////////// -void pfGUIButtonMod::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force ) +void pfGUIButtonMod::UpdateBounds( hsMatrix44 *invXformMatrix, bool force ) { pfGUIControlMod::UpdateBounds( invXformMatrix, force ); if( fAnimationKeys.GetCount() > 0 || fMouseOverAnimKeys.GetCount() > 0 ) @@ -329,7 +329,7 @@ int32_t pfGUIButtonMod::GetNotifyType() return fNotifyType; } -hsBool pfGUIButtonMod::IsButtonDown() +bool pfGUIButtonMod::IsButtonDown() { return fClicking; } @@ -337,7 +337,7 @@ hsBool pfGUIButtonMod::IsButtonDown() //// SetInteresting ////////////////////////////////////////////////////////// // Overridden to play mouse over animation when we're interesting -void pfGUIButtonMod::SetInteresting( hsBool i ) +void pfGUIButtonMod::SetInteresting( bool i ) { pfGUIControlMod::SetInteresting( i ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.h index b7f92c36..248ebdd6 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.h @@ -65,18 +65,18 @@ class pfGUIButtonMod : public pfGUIControlMod hsTArray fMouseOverAnimKeys; plString fMouseOverAnimName; - hsBool fClicking; - hsBool fTriggering; + bool fClicking; + bool fTriggering; hsPoint3 fOrigMouseDownPt; pfGUIDraggableMod *fDraggable; pfGUICtrlProcObject *fOrigHandler; - hsBool fOrigReportedDrag; + bool fOrigReportedDrag; int32_t fNotifyType; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h @@ -88,23 +88,23 @@ class pfGUIButtonMod : public pfGUIControlMod GETINTERFACE_ANY( pfGUIButtonMod, pfGUIControlMod ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); - virtual void SetInteresting( hsBool i ); + virtual void SetInteresting( bool i ); virtual void HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers ); - virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false ); + virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false ); virtual void SetNotifyType(int32_t kind); virtual int32_t GetNotifyType(); - virtual hsBool IsButtonDown(); - virtual hsBool IsTriggering() { return fTriggering; } + virtual bool IsButtonDown(); + virtual bool IsTriggering() { return fTriggering; } enum SoundEvents { kMouseDown, @@ -126,7 +126,7 @@ class pfGUIButtonMod : public pfGUIControlMod }; void StartDragging( void ); - void StopDragging( hsBool cancel ); + void StopDragging( bool cancel ); // Export only void SetAnimationKeys( hsTArray &keys, const plString &name ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.cpp index 24b853a2..a0144aab 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.cpp @@ -73,14 +73,14 @@ pfGUICheckBoxCtrl::pfGUICheckBoxCtrl() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUICheckBoxCtrl::IEval( double secs, float del, uint32_t dirty ) +bool pfGUICheckBoxCtrl::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUICheckBoxCtrl::MsgReceive( plMessage *msg ) +bool pfGUICheckBoxCtrl::MsgReceive( plMessage *msg ) { return pfGUIControlMod::MsgReceive( msg ); } @@ -115,7 +115,7 @@ void pfGUICheckBoxCtrl::Write( hsStream *s, hsResMgr *mgr ) //// UpdateBounds //////////////////////////////////////////////////////////// -void pfGUICheckBoxCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force ) +void pfGUICheckBoxCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, bool force ) { pfGUIControlMod::UpdateBounds( invXformMatrix, force ); if( fAnimationKeys.GetCount() > 0 ) @@ -151,7 +151,7 @@ void pfGUICheckBoxCtrl::HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ) //// SetChecked ////////////////////////////////////////////////////////////// -void pfGUICheckBoxCtrl::SetChecked( hsBool checked, hsBool immediate /*= false*/ ) +void pfGUICheckBoxCtrl::SetChecked( bool checked, bool immediate /*= false*/ ) { fChecked = checked; if( fAnimationKeys.GetCount() > 0 ) diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.h index 912e4f1c..cbfb0358 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.h @@ -60,12 +60,12 @@ class pfGUICheckBoxCtrl : public pfGUIControlMod hsTArray fAnimationKeys; plString fAnimName; - hsBool fClicking; + bool fClicking; - hsBool fChecked; - hsBool fPlaySound; + bool fChecked; + bool fPlaySound; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h @@ -77,7 +77,7 @@ class pfGUICheckBoxCtrl : public pfGUIControlMod GETINTERFACE_ANY( pfGUICheckBoxCtrl, pfGUIControlMod ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); @@ -85,10 +85,10 @@ class pfGUICheckBoxCtrl : public pfGUIControlMod virtual void HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ); - virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false ); + virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false ); - void SetChecked( hsBool checked, hsBool immediate = false ); - hsBool IsChecked( void ) { return fChecked; } + void SetChecked( bool checked, bool immediate = false ); + bool IsChecked( void ) { return fChecked; } void DontPlaySounds() { fPlaySound = false; } // should the checkbox play sounds? diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIClickMapCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIClickMapCtrl.cpp index b8991dd9..17d693c3 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIClickMapCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIClickMapCtrl.cpp @@ -72,14 +72,14 @@ pfGUIClickMapCtrl::~pfGUIClickMapCtrl() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIClickMapCtrl::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIClickMapCtrl::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIClickMapCtrl::MsgReceive( plMessage *msg ) +bool pfGUIClickMapCtrl::MsgReceive( plMessage *msg ) { return pfGUIControlMod::MsgReceive( msg ); } diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIClickMapCtrl.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIClickMapCtrl.h index d18d0dcb..d0485f25 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIClickMapCtrl.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIClickMapCtrl.h @@ -57,10 +57,10 @@ class pfGUIClickMapCtrl : public pfGUIControlMod protected: hsPoint3 fLastMousePt, fLastMouseUpPt, fLastMouseDragPt; - hsBool fTracking; + bool fTracking; int32_t fCustomCursor; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h @@ -90,7 +90,7 @@ class pfGUIClickMapCtrl : public pfGUIControlMod virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseHover( hsPoint3 &mousePt, uint8_t modifiers ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlHandlers.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlHandlers.h index 50e85317..f141f78d 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlHandlers.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlHandlers.h @@ -96,7 +96,7 @@ class pfGUICtrlProcObject // ONLY THE GUI SYSTEM SHOULD CALL THESE void IncRef( void ) { fRefCnt++; } - hsBool DecRef( void ) { fRefCnt--; return ( fRefCnt > 0 ) ? false : true; } + bool DecRef( void ) { fRefCnt--; return ( fRefCnt > 0 ) ? false : true; } }; //// pfGUICtrlProcWriteableObject //////////////////////////////////////////// diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.cpp index 62eac475..eb7e6f71 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.cpp @@ -127,7 +127,7 @@ void pfGUIColorScheme::Read( hsStream *s ) fBackColor.Read( s ); fSelForeColor.Read( s ); fSelBackColor.Read( s ); - s->ReadLE( &fTransparent ); + fTransparent = s->ReadBOOL(); delete [] fFontFace; fFontFace = s->ReadSafeString(); @@ -141,7 +141,7 @@ void pfGUIColorScheme::Write( hsStream *s ) fBackColor.Write( s ); fSelForeColor.Write( s ); fSelBackColor.Write( s ); - s->WriteLE( fTransparent ); + s->WriteBOOL( fTransparent ); s->WriteSafeString( fFontFace ); s->WriteLE( fFontSize ); @@ -180,7 +180,7 @@ pfGUIControlMod::~pfGUIControlMod() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIControlMod::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIControlMod::IEval( double secs, float del, uint32_t dirty ) { // UpdateBounds(); return false; @@ -222,7 +222,7 @@ static float GetVectorAngle( const hsPoint3 &basePt, const hsPoint3 &pointA, con // planar set", Info. Proc. Lett. 1, 132-133 (1972). // Note: THIS WILL DESTROY YOUR INPOINTS ARRAY. -static hsBool CreateConvexHull( hsPoint3 *inPoints, int &numPoints ) +static bool CreateConvexHull( hsPoint3 *inPoints, int &numPoints ) { int i, j, pointA, pointB, pointC; float *angles; @@ -359,7 +359,7 @@ static void GetObjectPoints( plSceneObject *so, hsTArray &outPoints ) // Given two ends of a line segment and two points, tells you whether the // two points are on the same side of the line. Used in PointInTriangle(). -static hsBool PointsOnSameSide( const hsPoint3 &line1, const hsPoint3 &line2, const hsPoint3 &pointA, const hsPoint3 &pointB ) +static bool PointsOnSameSide( const hsPoint3 &line1, const hsPoint3 &line2, const hsPoint3 &pointA, const hsPoint3 &pointB ) { hsVector3 baseVec( &line2, &line1 ); hsVector3 cp1 = hsVector3( &pointA, &line1 ) % baseVec; @@ -371,7 +371,7 @@ static hsBool PointsOnSameSide( const hsPoint3 &line1, const hsPoint3 &line2, // Given three points that define a triangle and a fourth point, tells you // whether the fourth point is inside the triangle. -static hsBool PointInTriangle( hsPoint3 tri1, hsPoint3 tri2, hsPoint3 tri3, const hsPoint3 &testPoint ) +static bool PointInTriangle( hsPoint3 tri1, hsPoint3 tri2, hsPoint3 tri3, const hsPoint3 &testPoint ) { tri1.fZ = tri2.fZ = tri3.fZ = testPoint.fZ; if( PointsOnSameSide( tri1, tri2, testPoint, tri3 ) && @@ -384,7 +384,7 @@ static hsBool PointInTriangle( hsPoint3 tri1, hsPoint3 tri2, hsPoint3 tri3, co //// PointInBounds /////////////////////////////////////////////////////////// // Tells you whether said point is in the control's bounds. -hsBool pfGUIControlMod::PointInBounds( const hsPoint3 &point ) +bool pfGUIControlMod::PointInBounds( const hsPoint3 &point ) { UpdateBounds(); @@ -424,7 +424,7 @@ void pfGUIControlMod::CalcInitialBounds( void ) //// UpdateBounds //////////////////////////////////////////////////////////// -void pfGUIControlMod::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force ) +void pfGUIControlMod::UpdateBounds( hsMatrix44 *invXformMatrix, bool force ) { hsMatrix44 xformMatrix, projMatrix; hsPoint3 corners[ 8 ]; @@ -581,7 +581,7 @@ void pfGUIControlMod::SetTarget( plSceneObject *object ) #include "plProfile.h" plProfile_CreateTimer("Gui", "RenderSetup", GUITime); -hsBool pfGUIControlMod::MsgReceive( plMessage *msg ) +bool pfGUIControlMod::MsgReceive( plMessage *msg ) { plRenderMsg* rend = plRenderMsg::ConvertNoRef( msg ); @@ -646,7 +646,7 @@ hsBool pfGUIControlMod::MsgReceive( plMessage *msg ) // screen res and fun stuff like that. Also sets the layer transform to give // us a 1:1 textel-pixel ratio, which we like. -hsBool pfGUIControlMod::ISetUpDynTextMap( plPipeline *pipe ) +bool pfGUIControlMod::ISetUpDynTextMap( plPipeline *pipe ) { if( fDynTextMap == nil ) { @@ -743,7 +743,7 @@ void pfGUIControlMod::SetDynTextMap( plLayerInterface *layer, plDynamicTextMa //// SetEnabled ////////////////////////////////////////////////////////////// -void pfGUIControlMod::SetEnabled( hsBool e ) +void pfGUIControlMod::SetEnabled( bool e ) { if( e == fEnabled ) return; @@ -754,7 +754,7 @@ void pfGUIControlMod::SetEnabled( hsBool e ) //// SetFocused ////////////////////////////////////////////////////////////// -void pfGUIControlMod::SetFocused( hsBool e ) +void pfGUIControlMod::SetFocused( bool e ) { if( e == fFocused ) return; @@ -765,7 +765,7 @@ void pfGUIControlMod::SetFocused( hsBool e ) //// SetInteresting ////////////////////////////////////////////////////////// -void pfGUIControlMod::SetInteresting( hsBool i ) +void pfGUIControlMod::SetInteresting( bool i ) { if( i == fInteresting ) return; @@ -780,7 +780,7 @@ void pfGUIControlMod::SetInteresting( hsBool i ) //// SetVisible ////////////////////////////////////////////////////////////// -void pfGUIControlMod::SetVisible( hsBool vis ) +void pfGUIControlMod::SetVisible( bool vis ) { if( vis == fVisible ) return; @@ -895,12 +895,12 @@ void pfGUIControlMod::Write( hsStream *s, hsResMgr *mgr ) //// HandleKeyPress/Event //////////////////////////////////////////////////// -hsBool pfGUIControlMod::HandleKeyPress( wchar_t key, uint8_t modifiers ) +bool pfGUIControlMod::HandleKeyPress( wchar_t key, uint8_t modifiers ) { return false; } -hsBool pfGUIControlMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ) +bool pfGUIControlMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ) { return false; } @@ -919,7 +919,7 @@ void pfGUIControlMod::IScreenToLocalPt( hsPoint3 &pt ) //// ISetHandler ///////////////////////////////////////////////////////////// -void pfGUIControlMod::ISetHandler( pfGUICtrlProcObject *h, hsBool clearInheritFlag ) +void pfGUIControlMod::ISetHandler( pfGUICtrlProcObject *h, bool clearInheritFlag ) { if( fHandler && fHandler->DecRef() ) delete fHandler; @@ -976,7 +976,7 @@ void pfGUIControlMod::SetSoundIndex( uint8_t guiCtrlEvent, int soundIndex ) // Sends a sound play message with the soundIndex associated with the given // event. -void pfGUIControlMod::IPlaySound( uint8_t guiCtrlEvent, hsBool loop /* = false */ ) +void pfGUIControlMod::IPlaySound( uint8_t guiCtrlEvent, bool loop /* = false */ ) { if( guiCtrlEvent >= fSoundIndices.GetCount() || fSoundIndices[ guiCtrlEvent ] == 0 ) return; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.h index 2a7f257d..7cf70571 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.h @@ -72,7 +72,7 @@ class pfGUIColorScheme : public hsRefCnt public: hsColorRGBA fForeColor, fBackColor; hsColorRGBA fSelForeColor, fSelBackColor; - hsBool fTransparent; + bool fTransparent; char *fFontFace; uint8_t fFontSize; @@ -95,9 +95,9 @@ class pfGUIColorScheme : public hsRefCnt void Read( hsStream *s ); void Write( hsStream *s ); - hsBool IsBold( void ) { return ( fFontFlags & kFontBold ) ? true : false; } - hsBool IsItalic( void ) { return ( fFontFlags & kFontItalic ) ? true : false; } - hsBool IsShadowed( void ) { return ( fFontFlags & kFontShadowed ) ? true : false; } + bool IsBold( void ) { return ( fFontFlags & kFontBold ) ? true : false; } + bool IsItalic( void ) { return ( fFontFlags & kFontItalic ) ? true : false; } + bool IsShadowed( void ) { return ( fFontFlags & kFontShadowed ) ? true : false; } protected: @@ -114,14 +114,14 @@ class pfGUIControlMod : public plSingleModifier protected: uint32_t fTagID; - hsBool fEnabled, fFocused, fVisible, fInteresting; - hsBool fNotifyOnInteresting; + bool fEnabled, fFocused, fVisible, fInteresting; + bool fNotifyOnInteresting; pfGUIDialogMod *fDialog; hsBounds3 fBounds, fInitialBounds; // Z component is 0-1 float fScreenMinZ; // Closest Z coordinate in screen space hsPoint3 fScreenCenter; - hsBool fBoundsValid, fCenterValid; + bool fBoundsValid, fCenterValid; hsMatrix44 fXformMatrix; // Only used for doing drag work, etc. pfGUICtrlProcObject *fHandler; @@ -140,19 +140,19 @@ class pfGUIControlMod : public plSingleModifier pfGUISkin *fSkin; - hsBool ISetUpDynTextMap( plPipeline *pipe ); + bool ISetUpDynTextMap( plPipeline *pipe ); virtual void IPostSetUpDynTextMap( void ) {} virtual void IGrowDTMDimsToDesiredSize( uint16_t &width, uint16_t &height ) { } - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() void ISetDialog( pfGUIDialogMod *mod ) { fDialog = mod; } void IScreenToLocalPt( hsPoint3 &pt ); virtual void IUpdate( void ) {;} - void ISetHandler( pfGUICtrlProcObject *h, hsBool clearInheritFlag = false ); + void ISetHandler( pfGUICtrlProcObject *h, bool clearInheritFlag = false ); - void IPlaySound( uint8_t guiCtrlEvent, hsBool loop = false ); + void IPlaySound( uint8_t guiCtrlEvent, bool loop = false ); void IStopSound( uint8_t guiCtrlEvent ); virtual uint32_t IGetDesiredCursor( void ) const { return 0; } // As specified in plInputInterface.h @@ -166,42 +166,42 @@ class pfGUIControlMod : public plSingleModifier GETINTERFACE_ANY( pfGUIControlMod, plSingleModifier ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); uint32_t GetTagID( void ) { return fTagID; } - virtual void SetEnabled( hsBool e ); - virtual hsBool IsEnabled( void ) { return fEnabled; } - virtual void SetFocused( hsBool e ); - virtual hsBool IsFocused( void ) { return fFocused; } - virtual void SetVisible( hsBool vis ); - virtual hsBool IsVisible( void ) { return fVisible; } + virtual void SetEnabled( bool e ); + virtual bool IsEnabled( void ) { return fEnabled; } + virtual void SetFocused( bool e ); + virtual bool IsFocused( void ) { return fFocused; } + virtual void SetVisible( bool vis ); + virtual bool IsVisible( void ) { return fVisible; } - virtual void SetInteresting( hsBool i ); - hsBool IsInteresting( void ) { return fInteresting; } + virtual void SetInteresting( bool i ); + bool IsInteresting( void ) { return fInteresting; } - virtual void SetNotifyOnInteresting( hsBool state ) { fNotifyOnInteresting = state; } + virtual void SetNotifyOnInteresting( bool state ) { fNotifyOnInteresting = state; } pfGUIDialogMod *GetOwnerDlg( void ) { return fDialog; } virtual void Refresh( void ); - virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false ); + virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false ); void SetObjectCenter( float x, float y ); virtual hsPoint3 GetObjectCenter() { return fScreenCenter; } float GetScreenMinZ( void ) { return fScreenMinZ; } void CalcInitialBounds( void ); const hsBounds3 &GetBounds( void ); - hsBool PointInBounds( const hsPoint3 &point ); + bool PointInBounds( const hsPoint3 &point ); virtual void SetTarget( plSceneObject *object ); // Return false if you actually DON'T want the mouse clicked at this point (should only be used for non-rectangular region rejection) - virtual hsBool FilterMousePosition( hsPoint3 &mousePt ) { return true; } + virtual bool FilterMousePosition( hsPoint3 &mousePt ) { return true; } virtual void HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers ) {;} virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ) {;} @@ -209,8 +209,8 @@ class pfGUIControlMod : public plSingleModifier virtual void HandleMouseHover( hsPoint3 &mousePt, uint8_t modifiers ) {;} virtual void HandleMouseDblClick( hsPoint3 &mousePt, uint8_t modifiers ) {;} - virtual hsBool HandleKeyPress( wchar_t key, uint8_t modifiers ); - virtual hsBool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ); + virtual bool HandleKeyPress( wchar_t key, uint8_t modifiers ); + virtual bool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ); void SetHandler( pfGUICtrlProcObject *h ) { ISetHandler( h, true ); } void DoSomething( void ); // Will call the handler @@ -254,7 +254,7 @@ class pfGUIControlMod : public plSingleModifier virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l); // Forces an immediate play of the given GUI control event sound - void PlaySound( uint8_t guiCtrlEvent, hsBool loop = false ) { IPlaySound( guiCtrlEvent, loop ); } + void PlaySound( uint8_t guiCtrlEvent, bool loop = false ) { IPlaySound( guiCtrlEvent, loop ); } void StopSound( uint8_t guiCtrlEvent ) { IStopSound( guiCtrlEvent ); } // Export only diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.cpp index 162f52e3..54883305 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.cpp @@ -295,7 +295,7 @@ pfGUIButtonMod *pfGUICtrlGenerator::GenerateRectButton( const char *title, floa //// CreateRectButton //////////////////////////////////////////////////////// pfGUIButtonMod *pfGUICtrlGenerator::CreateRectButton( pfGUIDialogMod *parent, const char *title, float x, float y, float width, float height, - hsGMaterial *material, hsBool asMenuItem ) + hsGMaterial *material, bool asMenuItem ) { wchar_t *wTitle = hsStringToWString(title); pfGUIButtonMod *retVal = CreateRectButton(parent,wTitle,x,y,width,height,material,asMenuItem); @@ -304,7 +304,7 @@ pfGUIButtonMod *pfGUICtrlGenerator::CreateRectButton( pfGUIDialogMod *parent, c } pfGUIButtonMod *pfGUICtrlGenerator::CreateRectButton( pfGUIDialogMod *parent, const wchar_t *title, float x, float y, float width, float height, - hsGMaterial *material, hsBool asMenuItem ) + hsGMaterial *material, bool asMenuItem ) { plDrawableSpans *myDraw; hsMatrix44 l2w, w2l; @@ -446,7 +446,7 @@ pfGUIDialogMod *pfGUICtrlGenerator::IGetDialog( void ) //// IGenerateDialog ///////////////////////////////////////////////////////// -pfGUIDialogMod *pfGUICtrlGenerator::IGenerateDialog( const char *name, float scrnWidth, hsBool show ) +pfGUIDialogMod *pfGUICtrlGenerator::IGenerateDialog( const char *name, float scrnWidth, bool show ) { float fovX, fovY; plSceneNode *node; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.h index c3502510..2d4d02c4 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICtrlGenerator.h @@ -93,7 +93,7 @@ class pfGUICtrlGenerator hsColorRGBA &textColor, float objWidth, float objHeight ); pfGUIDialogMod *IGetDialog( void ); - pfGUIDialogMod *IGenerateDialog( const char *name, float scrnWidth, hsBool show = true ); + pfGUIDialogMod *IGenerateDialog( const char *name, float scrnWidth, bool show = true ); plSceneObject *IGenSceneObject( pfGUIDialogMod *dlg, plDrawable *myDraw, plSceneObject *parent = nil, hsMatrix44 *l2w = nil, hsMatrix44 *w2l = nil ); @@ -119,9 +119,9 @@ class pfGUICtrlGenerator pfGUIButtonMod *CreateRectButton( pfGUIDialogMod *parent, const char *title, float x, float y, - float width, float height, hsGMaterial *material, hsBool asMenuItem = false ); + float width, float height, hsGMaterial *material, bool asMenuItem = false ); pfGUIButtonMod *CreateRectButton( pfGUIDialogMod *parent, const wchar_t *title, float x, float y, - float width, float height, hsGMaterial *material, hsBool asMenuItem = false ); + float width, float height, hsGMaterial *material, bool asMenuItem = false ); static pfGUICtrlGenerator &Instance( void ); }; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp index fb12c0da..67e277bb 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp @@ -141,14 +141,14 @@ hsPoint3 pfGUIDialogMod::WorldToScreenPoint( const hsPoint3 &inPt ) //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIDialogMod::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIDialogMod::IEval( double secs, float del, uint32_t dirty ) { return false; } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIDialogMod::MsgReceive( plMessage *msg ) +bool pfGUIDialogMod::MsgReceive( plMessage *msg ) { plGenRefMsg *ref = plGenRefMsg::ConvertNoRef( msg ); if( ref ) @@ -240,7 +240,7 @@ void pfGUIDialogMod::AddControlOnExport( pfGUIControlMod *ctrl ) //// SetEnabled ////////////////////////////////////////////////////////////// -void pfGUIDialogMod::SetEnabled( hsBool e ) +void pfGUIDialogMod::SetEnabled( bool e ) { if( e == fEnabled ) return; @@ -364,7 +364,7 @@ plKey pfGUIDialogMod::GetSceneNodeKey( void ) // Really. We go through and make sure every control marked as interesting // still has the mouse inside it and vice versa. -void pfGUIDialogMod::UpdateInterestingThings( float mouseX, float mouseY, uint8_t modifiers, hsBool modalPreset ) +void pfGUIDialogMod::UpdateInterestingThings( float mouseX, float mouseY, uint8_t modifiers, bool modalPreset ) { int i; hsPoint3 mousePoint; @@ -405,7 +405,7 @@ void pfGUIDialogMod::UpdateInterestingThings( float mouseX, float mouseY, uin #include "plPipeline/plDebugText.h" #endif -hsBool pfGUIDialogMod::HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, +bool pfGUIDialogMod::HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, uint8_t modifiers ) { hsPoint3 mousePoint; @@ -554,7 +554,7 @@ if( showBounds ) //// HandleKeyEvent ////////////////////////////////////////////////////////// -hsBool pfGUIDialogMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ) +bool pfGUIDialogMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ) { // Only process if a control has focus... if( fFocusCtrl != nil ) @@ -567,7 +567,7 @@ hsBool pfGUIDialogMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKey //// HandleKeyPress ////////////////////////////////////////////////////////// -hsBool pfGUIDialogMod::HandleKeyPress( wchar_t key, uint8_t modifiers ) +bool pfGUIDialogMod::HandleKeyPress( wchar_t key, uint8_t modifiers ) { // Same deal as HandleKeyPress. Only problem is, we needed the msg to translate // to a char, so it had to be done up at the mgr level (sadly) diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.h index 6fcf67ee..2c814ce5 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.h @@ -72,7 +72,7 @@ class pfGUIDialogMod : public plSingleModifier uint32_t fVersion; // Nice for syncing to C++ code plPostEffectMod *fRenderMod; - hsBool fEnabled; + bool fEnabled; char fName[ 128 ]; hsTArray fControls; pfGUIControlMod *fControlOfInterest; @@ -84,14 +84,14 @@ class pfGUIDialogMod : public plSingleModifier plKey fProcReceiver; // Non-nil means we handle everything by creating notify messages and sending them to this key hsTArray fDragElements; - hsBool fDragMode, fDragReceptive; + bool fDragMode, fDragReceptive; pfGUIControlMod *fDragTarget; pfGUIControlMod *fDragSource; plKey fSceneNodeKey; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() void IHandleDrag( hsPoint3 &mousePt, pfGameGUIMgr::EventType event, uint8_t modifiers ); @@ -117,7 +117,7 @@ class pfGUIDialogMod : public plSingleModifier GETINTERFACE_ANY( pfGUIDialogMod, plSingleModifier ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); @@ -125,18 +125,18 @@ class pfGUIDialogMod : public plSingleModifier void SetSceneNodeKey( plKey &key ) { fSceneNodeKey = key; } plKey GetSceneNodeKey( void ); - virtual void SetEnabled( hsBool e ); - hsBool IsEnabled( void ) { return fEnabled; } + virtual void SetEnabled( bool e ); + bool IsEnabled( void ) { return fEnabled; } const char *GetName( void ) { return fName; } void ScreenToWorldPoint( float x, float y, float z, hsPoint3 &outPt ); hsPoint3 WorldToScreenPoint( const hsPoint3 &inPt ); - virtual hsBool HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, uint8_t modifiers ); - hsBool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ); - hsBool HandleKeyPress( wchar_t key, uint8_t modifiers ); - void UpdateInterestingThings( float mouseX, float mouseY, uint8_t modifiers, hsBool modalPreset ); + virtual bool HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, uint8_t modifiers ); + bool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ); + bool HandleKeyPress( wchar_t key, uint8_t modifiers ); + void UpdateInterestingThings( float mouseX, float mouseY, uint8_t modifiers, bool modalPreset ); void SetControlOfInterest( pfGUIControlMod *c ); pfGUIControlMod *GetControlOfInterest( void ) const { return fControlOfInterest; } @@ -175,7 +175,7 @@ class pfGUIDialogMod : public plSingleModifier void Show( void ); void ShowNoReset( void ); void Hide( void ); - hsBool IsVisible( void ) { return IsEnabled(); } + bool IsVisible( void ) { return IsEnabled(); } pfGUIControlMod *GetFocus( void ) { return fFocusCtrl; } diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDragBarCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDragBarCtrl.cpp index 57a7c3c1..e3e9a785 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDragBarCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDragBarCtrl.cpp @@ -78,14 +78,14 @@ pfGUIDragBarCtrl::~pfGUIDragBarCtrl() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIDragBarCtrl::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIDragBarCtrl::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIDragBarCtrl::MsgReceive( plMessage *msg ) +bool pfGUIDragBarCtrl::MsgReceive( plMessage *msg ) { return pfGUIControlMod::MsgReceive( msg ); } @@ -104,7 +104,7 @@ void pfGUIDragBarCtrl::Write( hsStream *s, hsResMgr *mgr ) //// UpdateBounds //////////////////////////////////////////////////////////// -void pfGUIDragBarCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force ) +void pfGUIDragBarCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, bool force ) { pfGUIControlMod::UpdateBounds( invXformMatrix, force ); fBoundsValid = false; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDragBarCtrl.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDragBarCtrl.h index 31df6fb2..5c3548da 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDragBarCtrl.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDragBarCtrl.h @@ -57,10 +57,10 @@ class pfGUIDragBarCtrl : public pfGUIControlMod protected: hsPoint3 fDragOffset; - hsBool fDragging; - hsBool fAnchored; + bool fDragging; + bool fAnchored; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h @@ -73,7 +73,7 @@ class pfGUIDragBarCtrl : public pfGUIControlMod GETINTERFACE_ANY( pfGUIDragBarCtrl, pfGUIControlMod ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); @@ -82,10 +82,10 @@ class pfGUIDragBarCtrl : public pfGUIControlMod virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers ); - virtual void SetAnchored( hsBool anchored ) { fAnchored = anchored; } - virtual hsBool IsAnchored(void) { return fAnchored; } + virtual void SetAnchored( bool anchored ) { fAnchored = anchored; } + virtual bool IsAnchored(void) { return fAnchored; } - virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false ); + virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false ); // Export only }; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDraggableMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDraggableMod.cpp index 4e614637..d79d4a22 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDraggableMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDraggableMod.cpp @@ -72,14 +72,14 @@ pfGUIDraggableMod::~pfGUIDraggableMod() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIDraggableMod::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIDraggableMod::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIDraggableMod::MsgReceive( plMessage *msg ) +bool pfGUIDraggableMod::MsgReceive( plMessage *msg ) { return pfGUIControlMod::MsgReceive( msg ); } @@ -98,7 +98,7 @@ void pfGUIDraggableMod::Write( hsStream *s, hsResMgr *mgr ) //// UpdateBounds //////////////////////////////////////////////////////////// -void pfGUIDraggableMod::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force ) +void pfGUIDraggableMod::UpdateBounds( hsMatrix44 *invXformMatrix, bool force ) { pfGUIControlMod::UpdateBounds( invXformMatrix, force ); fBoundsValid = false; @@ -166,7 +166,7 @@ uint32_t pfGUIDraggableMod::IGetDesiredCursor( void ) const return plInputInterface::kCursor4WayDraggable; } -void pfGUIDraggableMod::StopDragging( hsBool cancel ) +void pfGUIDraggableMod::StopDragging( bool cancel ) { if( fDragging ) { diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDraggableMod.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDraggableMod.h index d113db1b..35d4eb9e 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDraggableMod.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDraggableMod.h @@ -58,10 +58,10 @@ class pfGUIDraggableMod : public pfGUIControlMod hsPoint3 fDragOffset, fLastMousePt; hsPoint3 fOrigCenter; - hsBool fDragging; + bool fDragging; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h @@ -88,7 +88,7 @@ class pfGUIDraggableMod : public pfGUIControlMod kStartingDrag }; - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); @@ -97,9 +97,9 @@ class pfGUIDraggableMod : public pfGUIControlMod virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers ); - virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false ); + virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false ); - void StopDragging( hsBool cancel ); + void StopDragging( bool cancel ); const hsPoint3 &GetLastMousePt( void ) const { return fLastMousePt; } }; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.cpp index ca12ac62..b9c21eca 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.cpp @@ -72,14 +72,14 @@ pfGUIDynDisplayCtrl::~pfGUIDynDisplayCtrl() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIDynDisplayCtrl::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIDynDisplayCtrl::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIDynDisplayCtrl::MsgReceive( plMessage *msg ) +bool pfGUIDynDisplayCtrl::MsgReceive( plMessage *msg ) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg ); if( refMsg != nil ) diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.h index 931875c1..c3365468 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDynDisplayCtrl.h @@ -79,7 +79,7 @@ class pfGUIDynDisplayCtrl : public pfGUIControlMod hsTArray fMaterials; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() public: @@ -90,7 +90,7 @@ class pfGUIDynDisplayCtrl : public pfGUIControlMod GETINTERFACE_ANY( pfGUIDynDisplayCtrl, pfGUIControlMod ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp index b285d409..bc5c84c6 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp @@ -86,14 +86,14 @@ pfGUIEditBoxMod::~pfGUIEditBoxMod() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIEditBoxMod::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIEditBoxMod::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIEditBoxMod::MsgReceive( plMessage *msg ) +bool pfGUIEditBoxMod::MsgReceive( plMessage *msg ) { return pfGUIControlMod::MsgReceive( msg ); } @@ -235,7 +235,7 @@ void pfGUIEditBoxMod::HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers ) { } -hsBool pfGUIEditBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers ) +bool pfGUIEditBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers ) { if( fBuffer == nil ) return false; @@ -255,7 +255,7 @@ hsBool pfGUIEditBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers ) return true; } -hsBool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ) +bool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ) { if ( fSpecialCaptureKeyEventMode) { diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.h index 6a76ad5a..4968d3d3 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.h @@ -66,15 +66,15 @@ class pfGUIEditBoxMod : public pfGUIControlMod wchar_t *fBuffer; uint32_t fBufferSize, fCursorPos; int32_t fScrollPos; - hsBool fEscapedFlag; - hsBool fFirstHalfExitKeyPushed; + bool fEscapedFlag; + bool fFirstHalfExitKeyPushed; - hsBool fSpecialCaptureKeyEventMode; + bool fSpecialCaptureKeyEventMode; plKeyDef fSavedKey; uint8_t fSavedModifiers; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() virtual void IPostSetUpDynTextMap( void ); virtual void IUpdate( void ); @@ -92,7 +92,7 @@ class pfGUIEditBoxMod : public pfGUIControlMod CLASSNAME_REGISTER( pfGUIEditBoxMod ); GETINTERFACE_ANY( pfGUIEditBoxMod, pfGUIControlMod ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); @@ -101,8 +101,8 @@ class pfGUIEditBoxMod : public pfGUIControlMod virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers ); - virtual hsBool HandleKeyPress( wchar_t key, uint8_t modifiers ); - virtual hsBool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ); + virtual bool HandleKeyPress( wchar_t key, uint8_t modifiers ); + virtual bool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ); virtual void PurgeDynaTextMapImage(); @@ -117,14 +117,14 @@ class pfGUIEditBoxMod : public pfGUIControlMod void SetCursorToHome( void ); void SetCursorToEnd( void ); - hsBool WasEscaped( void ) { hsBool e = fEscapedFlag; fEscapedFlag = false; return e; } + bool WasEscaped( void ) { bool e = fEscapedFlag; fEscapedFlag = false; return e; } - void SetSpecialCaptureKeyMode(hsBool state) { fSpecialCaptureKeyEventMode = state; } + void SetSpecialCaptureKeyMode(bool state) { fSpecialCaptureKeyEventMode = state; } uint32_t GetLastKeyCaptured() { return (uint32_t)fSavedKey; } uint8_t GetLastModifiersCaptured() { return fSavedModifiers; } void SetLastKeyCapture(uint32_t key, uint8_t modifiers); - void SetChatMode(hsBool state) { plKeyboardDevice::IgnoreCapsLock(state); } + void SetChatMode(bool state) { plKeyboardDevice::IgnoreCapsLock(state); } // Extended event types enum ExtendedEvents diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp index 264ccd07..81e04908 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp @@ -84,14 +84,14 @@ pfGUIKnobCtrl::pfGUIKnobCtrl() : //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIKnobCtrl::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIKnobCtrl::IEval( double secs, float del, uint32_t dirty ) { return pfGUIValueCtrl::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIKnobCtrl::MsgReceive( plMessage *msg ) +bool pfGUIKnobCtrl::MsgReceive( plMessage *msg ) { return pfGUIValueCtrl::MsgReceive( msg ); } @@ -130,7 +130,7 @@ void pfGUIKnobCtrl::Write( hsStream *s, hsResMgr *mgr ) //// UpdateBounds //////////////////////////////////////////////////////////// -void pfGUIKnobCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force ) +void pfGUIKnobCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, bool force ) { pfGUIValueCtrl::UpdateBounds( invXformMatrix, force ); if( fAnimationKeys.GetCount() > 0 ) @@ -266,7 +266,7 @@ void pfGUIKnobCtrl::SetAnimationKeys( hsTArray &keys, const plString & // Loops through and computes the max begin and end for our animations. If // none of them are loaded and we're not already calced, returns false. -hsBool pfGUIKnobCtrl::ICalcAnimTimes( void ) +bool pfGUIKnobCtrl::ICalcAnimTimes( void ) { if( fAnimTimesCalced ) return true; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.h index 006849d9..147fc1da 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.h @@ -62,20 +62,20 @@ class pfGUIKnobCtrl : public pfGUIValueCtrl hsPoint3 fDragStart; float fDragValue; - hsBool fDragging; + bool fDragging; hsPoint3 fAnimStartPos, fAnimEndPos; // Calculated at export time for kMapToScreenRange float fDragRangeMin, fDragRangeMax; // Computed once, once an anim is loaded that we can compute this with float fAnimBegin, fAnimEnd; - hsBool fAnimTimesCalced; + bool fAnimTimesCalced; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h - hsBool ICalcAnimTimes( void ); + bool ICalcAnimTimes( void ); public: @@ -94,7 +94,7 @@ class pfGUIKnobCtrl : public pfGUIValueCtrl kMapToAnimationRange }; - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); @@ -103,7 +103,7 @@ class pfGUIKnobCtrl : public pfGUIValueCtrl virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers ); - virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false ); + virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false ); virtual void SetCurrValue( float v ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.cpp index 6cb1c5e2..515d4b47 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.cpp @@ -76,7 +76,7 @@ void pfGUIListBoxMod::plSmallRect::Set( int16_t l, int16_t t, int16_t r, int1 fBottom = b; } -hsBool pfGUIListBoxMod::plSmallRect::Contains( int16_t x, int16_t y ) +bool pfGUIListBoxMod::plSmallRect::Contains( int16_t x, int16_t y ) { if( x < fLeft || x > fRight || y < fTop || y > fBottom ) return false; @@ -140,14 +140,14 @@ pfGUIListBoxMod::~pfGUIListBoxMod() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIListBoxMod::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIListBoxMod::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIListBoxMod::MsgReceive( plMessage *msg ) +bool pfGUIListBoxMod::MsgReceive( plMessage *msg ) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg ); if( refMsg != nil ) @@ -234,7 +234,7 @@ void pfGUIListBoxMod::IUpdate( void ) { int end = ( j < fWrapStartIdxs.GetCount() - 1 ) ? fWrapStartIdxs[ j + 1 ] : fElements.GetCount(); - hsBool anySelected = false; + bool anySelected = false; for( i = fWrapStartIdxs[ j ]; i < end; i++ ) anySelected |= fElements[ i ]->IsSelected(); @@ -338,7 +338,7 @@ void pfGUIListBoxMod::IUpdate( void ) { int end = ( j < fWrapStartIdxs.GetCount() - 1 ) ? fWrapStartIdxs[ j + 1 ] : fElements.GetCount(); - hsBool anySelected = false; + bool anySelected = false; for( i = fWrapStartIdxs[ j ]; i < end; i++ ) anySelected |= fElements[ i ]->IsSelected(); @@ -544,7 +544,7 @@ void pfGUIListBoxMod::Write( hsStream *s, hsResMgr *mgr ) // based on the position. This allows us to act etheral (i.e. pass mouse // messages through) when the mouse is over an empty portion of the list. -hsBool pfGUIListBoxMod::FilterMousePosition( hsPoint3 &mousePt ) +bool pfGUIListBoxMod::FilterMousePosition( hsPoint3 &mousePt ) { if( !HasFlag( kAllowMousePassThrough ) ) return true; @@ -845,7 +845,7 @@ void pfGUIListBoxMod::IFindSelectionRange( int32_t *min, int32_t *max ) //// ISelectRange //////////////////////////////////////////////////////////// -void pfGUIListBoxMod::ISelectRange( int8_t min, int8_t max, hsBool select ) +void pfGUIListBoxMod::ISelectRange( int8_t min, int8_t max, bool select ) { int16_t i; @@ -921,12 +921,12 @@ void pfGUIListBoxMod::AddSelection( int32_t item ) //// HandleKeyPress ////////////////////////////////////////////////////////// -hsBool pfGUIListBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers ) +bool pfGUIListBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers ) { return false; } -hsBool pfGUIListBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ) +bool pfGUIListBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ) { if( key == KEY_CAPSLOCK ) return false; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.h index 8b448ca8..d87c1354 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.h @@ -68,7 +68,7 @@ class pfGUIListBoxMod : public pfGUIControlMod int16_t fLeft, fTop, fRight, fBottom; void Set( int16_t l, int16_t t, int16_t r, int16_t b ); - hsBool Contains( int16_t x, int16_t y ); + bool Contains( int16_t x, int16_t y ); plSmallRect& operator=(const int zero) { fLeft = fTop = fRight = fBottom = 0; return *this; } }; @@ -81,15 +81,15 @@ class pfGUIListBoxMod : public pfGUIControlMod int32_t fCurrClick, fScrollPos, fCurrHover; uint8_t fModsAtDragTime; int32_t fMinSel, fMaxSel; - hsBool fCheckScroll, fClicking; + bool fCheckScroll, fClicking; int32_t fSingleSelElement; - hsBool fScrollRangeUpdateDeferred; - hsBool fLocked, fReadyToRoll; + bool fScrollRangeUpdateDeferred; + bool fLocked, fReadyToRoll; hsTArray fElementBounds; hsTArray fWrapStartIdxs; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() void ICalcScrollRange( void ); void ICalcWrapStarts( void ); @@ -100,7 +100,7 @@ class pfGUIListBoxMod : public pfGUIControlMod int32_t IGetItemFromPoint( hsPoint3 &mousePt ); void IFindSelectionRange( int32_t *min, int32_t *max ); - void ISelectRange( int8_t min, int8_t max, hsBool select ); + void ISelectRange( int8_t min, int8_t max, bool select ); public: @@ -138,7 +138,7 @@ class pfGUIListBoxMod : public pfGUIControlMod kRefScrollCtrl = kRefDerivedStart }; - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); @@ -149,10 +149,10 @@ class pfGUIListBoxMod : public pfGUIControlMod virtual void HandleMouseHover( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseDblClick( hsPoint3 &mousePt, uint8_t modifiers ); - virtual hsBool HandleKeyPress( wchar_t key, uint8_t modifiers ); - virtual hsBool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ); + virtual bool HandleKeyPress( wchar_t key, uint8_t modifiers ); + virtual bool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ); - virtual hsBool FilterMousePosition( hsPoint3 &mousePt ); + virtual bool FilterMousePosition( hsPoint3 &mousePt ); virtual void PurgeDynaTextMapImage(); @@ -193,7 +193,7 @@ class pfGUIListBoxMod : public pfGUIControlMod // Export only void SetScrollCtrl( pfGUIValueCtrl *ctrl ) { fScrollControl = ctrl; } - void SetSingleSelect( hsBool yes ) { if( yes ) SetFlag( kSingleSelect ); else ClearFlag( kSingleSelect ); } + void SetSingleSelect( bool yes ) { if( yes ) SetFlag( kSingleSelect ); else ClearFlag( kSingleSelect ); } }; #endif // _pfGUIListBoxMod_h diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.cpp index 209ff2f5..534d7822 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.cpp @@ -121,7 +121,7 @@ void pfGUIListText::Write( hsStream *s, hsResMgr *mgr ) delete [] text; } -hsBool pfGUIListText::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) +bool pfGUIListText::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) { textGen->SetJustify( (plDynamicTextMap::Justify)fJustify ); if( fSelected ) @@ -210,7 +210,7 @@ pfGUIListPicture::pfGUIListPicture() : pfGUIListElement( kPicture ) fMipmapKey = nil; } -pfGUIListPicture::pfGUIListPicture( plKey mipKey, hsBool respectAlpha ) : pfGUIListElement( kPicture ) +pfGUIListPicture::pfGUIListPicture( plKey mipKey, bool respectAlpha ) : pfGUIListElement( kPicture ) { fBorderSize = 2; fMipmapKey = mipKey; @@ -247,7 +247,7 @@ void pfGUIListPicture::Write( hsStream *s, hsResMgr *mgr ) } -hsBool pfGUIListPicture::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) +bool pfGUIListPicture::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) { if( fSelected ) textGen->FillRect( x, y, maxWidth, maxHeight, fColors->fSelBackColor ); @@ -337,7 +337,7 @@ void pfGUIListTreeRoot::Write( hsStream *s, hsResMgr *mgr ) delete [] temp; } -hsBool pfGUIListTreeRoot::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) +bool pfGUIListTreeRoot::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) { textGen->SetJustify( plDynamicTextMap::kLeftJustify ); if( fSelected ) @@ -368,7 +368,7 @@ hsBool pfGUIListTreeRoot::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t return true; } -hsBool pfGUIListTreeRoot::MouseClicked( uint16_t localX, uint16_t localY ) +bool pfGUIListTreeRoot::MouseClicked( uint16_t localX, uint16_t localY ) { if( fSkin != nil ) { @@ -450,7 +450,7 @@ void pfGUIListTreeRoot::RemoveChild( uint32_t idx ) fChildren.Remove( idx ); } -void pfGUIListTreeRoot::ShowChildren( hsBool s ) +void pfGUIListTreeRoot::ShowChildren( bool s ) { uint32_t i; @@ -460,7 +460,7 @@ void pfGUIListTreeRoot::ShowChildren( hsBool s ) fChildren[ i ]->SetCollapsed( !s ); } -void pfGUIListTreeRoot::SetCollapsed( hsBool c ) +void pfGUIListTreeRoot::SetCollapsed( bool c ) { uint32_t i; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.h index 5d5ef54e..60d7c104 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.h @@ -57,10 +57,10 @@ class pfGUIListElement { protected: - hsBool fSelected; + bool fSelected; const uint8_t fType; - hsBool fCollapsed; // For tree view support + bool fCollapsed; // For tree view support uint8_t fIndentLevel; // Ditto pfGUIColorScheme *fColors; @@ -81,25 +81,25 @@ class pfGUIListElement virtual void Read( hsStream *s, hsResMgr *mgr ); virtual void Write( hsStream *s, hsResMgr *mgr ); - virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) = 0; + virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) = 0; virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height ) = 0; virtual int CompareTo( pfGUIListElement *rightSide ) = 0; - virtual void SetSelected( hsBool sel ) { fSelected = sel; } - virtual hsBool IsSelected( void ) { return fSelected; } + virtual void SetSelected( bool sel ) { fSelected = sel; } + virtual bool IsSelected( void ) { return fSelected; } - virtual hsBool CanBeDragged( void ) { return false; } + virtual bool CanBeDragged( void ) { return false; } // Return true here if you need the list refreshed - virtual hsBool MouseClicked( uint16_t localX, uint16_t localY ) { return false; } + virtual bool MouseClicked( uint16_t localX, uint16_t localY ) { return false; } uint8_t GetType( void ) { return fType; } void SetColorScheme( pfGUIColorScheme *scheme ) { fColors = scheme; } void SetSkin( pfGUISkin *skin ) { fSkin = skin; } - hsBool IsCollapsed( void ) const { return fCollapsed; } - virtual void SetCollapsed( hsBool c ) { fCollapsed = c; } + bool IsCollapsed( void ) const { return fCollapsed; } + virtual void SetCollapsed( bool c ) { fCollapsed = c; } uint8_t GetIndentLevel( void ) const { return fIndentLevel; } void SetIndentLevel( uint8_t i ) { fIndentLevel = i; } @@ -131,11 +131,11 @@ class pfGUIListText : public pfGUIListElement virtual void Read( hsStream *s, hsResMgr *mgr ); virtual void Write( hsStream *s, hsResMgr *mgr ); - virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ); + virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ); virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height ); virtual int CompareTo( pfGUIListElement *rightSide ); - virtual hsBool CanBeDragged( void ) { return true; } + virtual bool CanBeDragged( void ) { return true; } virtual void SetJustify( JustifyTypes justify ); // These two are virtual so we can derive and override them @@ -150,25 +150,25 @@ class pfGUIListPicture : public pfGUIListElement plKey fMipmapKey; uint8_t fBorderSize; // Defaults to 2 - hsBool fRespectAlpha; + bool fRespectAlpha; public: pfGUIListPicture(); - pfGUIListPicture( plKey mipKey, hsBool respectAlpha ); + pfGUIListPicture( plKey mipKey, bool respectAlpha ); virtual ~pfGUIListPicture(); virtual void Read( hsStream *s, hsResMgr *mgr ); virtual void Write( hsStream *s, hsResMgr *mgr ); - virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ); + virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ); virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height ); virtual int CompareTo( pfGUIListElement *rightSide ); - virtual hsBool CanBeDragged( void ) { return false; } + virtual bool CanBeDragged( void ) { return false; } void SetBorderSize( uint32_t size ) { fBorderSize = (uint8_t)size; } - void SetRespectAlpha( hsBool r ) { fRespectAlpha = r; } + void SetRespectAlpha( bool r ) { fRespectAlpha = r; } }; @@ -177,7 +177,7 @@ class pfGUIListTreeRoot : public pfGUIListElement protected: wchar_t *fText; - hsBool fShowChildren; + bool fShowChildren; hsTArray fChildren; @@ -191,11 +191,11 @@ class pfGUIListTreeRoot : public pfGUIListElement virtual void Read( hsStream *s, hsResMgr *mgr ); virtual void Write( hsStream *s, hsResMgr *mgr ); - virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ); + virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ); virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height ); virtual int CompareTo( pfGUIListElement *rightSide ); - virtual hsBool MouseClicked( uint16_t localX, uint16_t localY ); + virtual bool MouseClicked( uint16_t localX, uint16_t localY ); const wchar_t *GetTitle( void ) { return fText; } void SetTitle( const char *text ); @@ -207,10 +207,10 @@ class pfGUIListTreeRoot : public pfGUIListElement void AddChild( pfGUIListElement *el ); void RemoveChild( uint32_t idx ); - virtual void SetCollapsed( hsBool c ); + virtual void SetCollapsed( bool c ); - void ShowChildren( hsBool s ); - hsBool IsShowingChildren( void ) const { return fShowChildren; } + void ShowChildren( bool s ); + bool IsShowingChildren( void ) const { return fShowChildren; } }; //// pfGUIDropTargetProc ///////////////////////////////////////////////////// @@ -233,12 +233,12 @@ class pfGUIDropTargetProc pfGUIDropTargetProc() { fRefCnt = 0; } - virtual hsBool CanEat( pfGUIListElement *element, pfGUIControlMod *source ) = 0; + virtual bool CanEat( pfGUIListElement *element, pfGUIControlMod *source ) = 0; virtual void Eat( pfGUIListElement *element, pfGUIControlMod *source, pfGUIControlMod *parent ) = 0; // ONLY THE GUI SYSTEM SHOULD CALL THESE void IncRef( void ) { fRefCnt++; } - hsBool DecRef( void ) { fRefCnt--; return ( fRefCnt > 0 ) ? false : true; } + bool DecRef( void ) { fRefCnt--; return ( fRefCnt > 0 ) ? false : true; } }; #endif // _pfGUIListElement_h diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.cpp index f0f62a84..b6eb73b4 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.cpp @@ -158,7 +158,7 @@ void pfGUIMenuItem::IUpdateSkinBuffers( void ) //// IUpdateSingleSkinBuffer ///////////////////////////////////////////////// // Broken down functionality for the above function -void pfGUIMenuItem::IUpdateSingleSkinBuffer( uint16_t y, hsBool sel ) +void pfGUIMenuItem::IUpdateSingleSkinBuffer( uint16_t y, bool sel ) { hsAssert( fSkin != nil && fDynTextMap != nil, "Invalid pointers in IUpdateSingleSkinBuffer()" ); @@ -386,7 +386,7 @@ void pfGUIMenuItem::GetTextExtents( uint16_t &width, uint16_t &height ) //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIMenuItem::MsgReceive( plMessage *msg ) +bool pfGUIMenuItem::MsgReceive( plMessage *msg ) { return pfGUIButtonMod::MsgReceive( msg ); } @@ -468,7 +468,7 @@ void pfGUIMenuItem::HandleMouseHover( hsPoint3 &mousePt, uint8_t modifiers ) //// SetInteresting ////////////////////////////////////////////////////////// // Overridden to play mouse over animation when we're interesting -void pfGUIMenuItem::SetInteresting( hsBool i ) +void pfGUIMenuItem::SetInteresting( bool i ) { pfGUIButtonMod::SetInteresting( i ); IUpdate(); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.h index 9ef87b29..cd07614e 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMenuItem.h @@ -68,17 +68,17 @@ class pfGUIMenuItem : public pfGUIButtonMod protected: wchar_t *fName; - hsBool fReportingHover; + bool fReportingHover; HowToSkin fHowToSkin; - hsBool fSkinBuffersUpdated; + bool fSkinBuffersUpdated; virtual void IGrowDTMDimsToDesiredSize( uint16_t &width, uint16_t &height ); virtual void IPostSetUpDynTextMap( void ); virtual void IUpdate( void ); void IUpdateSkinBuffers( void ); - void IUpdateSingleSkinBuffer( uint16_t y, hsBool sel ); + void IUpdateSingleSkinBuffer( uint16_t y, bool sel ); public: @@ -101,12 +101,12 @@ class pfGUIMenuItem : public pfGUIButtonMod kMouseExit }; - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); - virtual void SetInteresting( hsBool i ); + virtual void SetInteresting( bool i ); virtual void HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp index 34de5b6e..aea1fd26 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp @@ -189,14 +189,14 @@ pfGUIMultiLineEditCtrl::~pfGUIMultiLineEditCtrl() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIMultiLineEditCtrl::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIMultiLineEditCtrl::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIMultiLineEditCtrl::MsgReceive( plMessage *msg ) +bool pfGUIMultiLineEditCtrl::MsgReceive( plMessage *msg ) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg ); if( refMsg != nil ) @@ -295,7 +295,7 @@ void pfGUIMultiLineEditCtrl::IUpdateScrollRange( void ) } } -void pfGUIMultiLineEditCtrl::SetScrollEnable( hsBool state ) +void pfGUIMultiLineEditCtrl::SetScrollEnable( bool state ) { if (fScrollControl == nil ) return; @@ -516,7 +516,7 @@ inline bool pfGUIMultiLineEditCtrl::IIsCodeChar( const wchar_t c ) // type. If none is found, they set the given parameter to the default value // and return false. -hsBool pfGUIMultiLineEditCtrl::IFindLastColorCode( int32_t pos, hsColorRGBA &color, hsBool ignoreFirstCharacter ) const +bool pfGUIMultiLineEditCtrl::IFindLastColorCode( int32_t pos, hsColorRGBA &color, bool ignoreFirstCharacter ) const { for( ; pos >= 0; pos -= IOffsetToNextCharFromPos( pos - 1 ) ) { @@ -531,7 +531,7 @@ hsBool pfGUIMultiLineEditCtrl::IFindLastColorCode( int32_t pos, hsColorRGBA &co return false; } -hsBool pfGUIMultiLineEditCtrl::IFindLastStyleCode( int32_t pos, uint8_t &style, hsBool ignoreFirstCharacter ) const +bool pfGUIMultiLineEditCtrl::IFindLastStyleCode( int32_t pos, uint8_t &style, bool ignoreFirstCharacter ) const { for( ; pos >= 0; pos -= IOffsetToNextCharFromPos( pos - 1 ) ) { @@ -552,7 +552,7 @@ hsBool pfGUIMultiLineEditCtrl::IFindLastStyleCode( int32_t pos, uint8_t &style, // given. Takes into account style codes and special characters (like returns // and tabs). Returns the final X value after rendering. -uint32_t pfGUIMultiLineEditCtrl::IRenderLine( uint16_t x, uint16_t y, int32_t start, int32_t end, hsBool dontRender ) +uint32_t pfGUIMultiLineEditCtrl::IRenderLine( uint16_t x, uint16_t y, int32_t start, int32_t end, bool dontRender ) { int32_t pos; hsColorRGBA currColor = fFontColor; @@ -671,7 +671,7 @@ void pfGUIMultiLineEditCtrl::Write( hsStream *s, hsResMgr *mgr ) //// IPointToPosition //////////////////////////////////////////////////////// // Translates a 2D point on the visible texture surface to a cursor position. -int32_t pfGUIMultiLineEditCtrl::IPointToPosition( int16_t ptX, int16_t ptY, hsBool searchOutsideBounds ) +int32_t pfGUIMultiLineEditCtrl::IPointToPosition( int16_t ptX, int16_t ptY, bool searchOutsideBounds ) { // Find our line int32_t line, start, pos, end, lastVisibleLine; @@ -758,7 +758,7 @@ inline int32_t pfGUIMultiLineEditCtrl::IOffsetToNextCharFromPos( int32_t posi // changed, so we assume as a hint that every line before the starting line // is still valid. If startingLine = 0, we recalc 'em all. -int32_t pfGUIMultiLineEditCtrl::IRecalcLineStarts( int32_t startingLine, hsBool force, hsBool dontUpdate ) +int32_t pfGUIMultiLineEditCtrl::IRecalcLineStarts( int32_t startingLine, bool force, bool dontUpdate ) { uint16_t wrapWidth, widthCounter; uint32_t charPos = 0, nextPos, startPos, lastStartPos; @@ -900,7 +900,7 @@ int32_t pfGUIMultiLineEditCtrl::IRecalcLineStarts( int32_t startingLine, hsBoo //// IStoreLineStart ///////////////////////////////////////////////////////// // Stores a single line start, expanding the array if necessary. -hsBool pfGUIMultiLineEditCtrl::IStoreLineStart( uint32_t line, int32_t start ) +bool pfGUIMultiLineEditCtrl::IStoreLineStart( uint32_t line, int32_t start ) { if( fLineStarts.GetCount() <= line ) { @@ -910,7 +910,7 @@ hsBool pfGUIMultiLineEditCtrl::IStoreLineStart( uint32_t line, int32_t start ) fLineStarts[ line ] = -1; } - hsBool same = ( fLineStarts[ line ] == start ) ? true : false; + bool same = ( fLineStarts[ line ] == start ) ? true : false; fLineStarts[ line ] = start; return same; } @@ -937,7 +937,7 @@ int32_t pfGUIMultiLineEditCtrl::IFindCursorLine( int32_t cursorPos ) const //// IRecalcFromCursor /////////////////////////////////////////////////////// // Recalcs starting with the line that the cursor is sitting on -void pfGUIMultiLineEditCtrl::IRecalcFromCursor( hsBool force ) +void pfGUIMultiLineEditCtrl::IRecalcFromCursor( bool force ) { IRecalcLineStarts( IFindCursorLine(), force ); } @@ -951,7 +951,7 @@ void pfGUIMultiLineEditCtrl::IRecalcFromCursor( hsBool force ) // doing this, we are inserting into (and offseting inside) a selection, // so we don't want the start moving around. -void pfGUIMultiLineEditCtrl::IOffsetLineStarts( uint32_t position, int32_t offset, hsBool offsetSelectionEnd ) +void pfGUIMultiLineEditCtrl::IOffsetLineStarts( uint32_t position, int32_t offset, bool offsetSelectionEnd ) { int32_t line; @@ -1030,7 +1030,7 @@ void pfGUIMultiLineEditCtrl::HandleMouseDrag( hsPoint3 &mousePt, uint8_t modi IMoveCursorTo( IPointToPosition( (int16_t)(mousePt.fX), (int16_t)(mousePt.fY) ) ); } -hsBool pfGUIMultiLineEditCtrl::HandleKeyPress( wchar_t key, uint8_t modifiers ) +bool pfGUIMultiLineEditCtrl::HandleKeyPress( wchar_t key, uint8_t modifiers ) { if ((fPrevCtrl || fNextCtrl) && (fLineStarts.GetCount() <= GetFirstVisibleLine())) return true; // we're ignoring if we can't actually edit our visible frame (and we're linked) @@ -1052,7 +1052,7 @@ hsBool pfGUIMultiLineEditCtrl::HandleKeyPress( wchar_t key, uint8_t modifiers ) return true; } -hsBool pfGUIMultiLineEditCtrl::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ) +bool pfGUIMultiLineEditCtrl::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ) { if( key == KEY_CAPSLOCK ) return false; @@ -1848,7 +1848,7 @@ void pfGUIMultiLineEditCtrl::SetFontSize(uint8_t fontSize) } // are we showing the beginning of the buffer? (controls before us are too far up) -hsBool pfGUIMultiLineEditCtrl::ShowingBeginningOfBuffer() +bool pfGUIMultiLineEditCtrl::ShowingBeginningOfBuffer() { if (fScrollPos == 0) return true; @@ -1856,7 +1856,7 @@ hsBool pfGUIMultiLineEditCtrl::ShowingBeginningOfBuffer() } // are we showing the end of the buffer? (controls after us are too far down) -hsBool pfGUIMultiLineEditCtrl::ShowingEndOfBuffer() +bool pfGUIMultiLineEditCtrl::ShowingEndOfBuffer() { //IRecalcLineStarts(0,true); // This function gets called a lot from the journal book, so IRecalcLineStarts() REALLY slows things // down if we're looking at a large amount of text, hopefully we can mess with the existing line starts for now without issue diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.h index 9bf81757..274b9837 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.h @@ -100,7 +100,7 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod hsTArray fLineStarts; uint16_t fLineHeight, fCurrCursorX, fCurrCursorY; int32_t fCursorPos, fLastCursorLine; - hsBool fReadyToRender; + bool fReadyToRender; hsBounds3Ext fLastP2PArea; int8_t fLockCount; uint8_t fCalcedFontSize; // The font size that we calced our line height at @@ -111,7 +111,7 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod static wchar_t fColorCodeChar, fStyleCodeChar; static uint32_t fColorCodeSize, fStyleCodeSize; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() virtual void IPostSetUpDynTextMap( void ); virtual void IUpdate( void ); @@ -148,19 +148,19 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod void IMoveCursorTo( int32_t position ); // Updates selection void ISetCursor( int32_t newPosition ); // Doesn't update selection - int32_t IRecalcLineStarts( int32_t startingLine, hsBool force, hsBool dontUpdate = false ); - void IRecalcFromCursor( hsBool forceUpdate = false ); + int32_t IRecalcLineStarts( int32_t startingLine, bool force, bool dontUpdate = false ); + void IRecalcFromCursor( bool forceUpdate = false ); int32_t IFindCursorLine( int32_t cursorPos = -1 ) const; - hsBool IStoreLineStart( uint32_t line, int32_t start ); - void IOffsetLineStarts( uint32_t position, int32_t offset, hsBool offsetSelectionEnd = false ); - int32_t IPointToPosition( int16_t x, int16_t y, hsBool searchOutsideBounds = false ); + bool IStoreLineStart( uint32_t line, int32_t start ); + void IOffsetLineStarts( uint32_t position, int32_t offset, bool offsetSelectionEnd = false ); + int32_t IPointToPosition( int16_t x, int16_t y, bool searchOutsideBounds = false ); int32_t ICalcNumVisibleLines( void ) const; void IReadColorCode( int32_t &pos, hsColorRGBA &color ) const; void IReadStyleCode( int32_t &pos, uint8_t &fontStyle ) const; - uint32_t IRenderLine( uint16_t x, uint16_t y, int32_t start, int32_t end, hsBool dontRender = false ); - hsBool IFindLastColorCode( int32_t pos, hsColorRGBA &color, hsBool ignoreFirstCharacter = false ) const; - hsBool IFindLastStyleCode( int32_t pos, uint8_t &style, hsBool ignoreFirstCharacter = false ) const; + uint32_t IRenderLine( uint16_t x, uint16_t y, int32_t start, int32_t end, bool dontRender = false ); + bool IFindLastColorCode( int32_t pos, hsColorRGBA &color, bool ignoreFirstCharacter = false ) const; + bool IFindLastStyleCode( int32_t pos, uint8_t &style, bool ignoreFirstCharacter = false ) const; inline static bool IIsCodeChar( const wchar_t c ); inline static bool IIsRenderable( const wchar_t c ); @@ -197,7 +197,7 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod CLASSNAME_REGISTER( pfGUIMultiLineEditCtrl ); GETINTERFACE_ANY( pfGUIMultiLineEditCtrl, pfGUIControlMod ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); @@ -206,8 +206,8 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ); virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers ); - virtual hsBool HandleKeyPress( wchar_t key, uint8_t modifiers ); - virtual hsBool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ); + virtual bool HandleKeyPress( wchar_t key, uint8_t modifiers ); + virtual bool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers ); virtual void PurgeDynaTextMapImage(); @@ -247,9 +247,9 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod void Lock( void ); void Unlock( void ); - hsBool IsLocked( void ) const { return ( fLockCount > 0 ) ? true : false; } + bool IsLocked( void ) const { return ( fLockCount > 0 ) ? true : false; } - void SetScrollEnable( hsBool state ); + void SetScrollEnable( bool state ); void ForceUpdate() {/*IRecalcLineStarts(0,true);*/IUpdateLineStarts(); IUpdate();} @@ -275,8 +275,8 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod void SetFontSize(uint8_t fontSize); void SetFontStyle(uint8_t fontStyle) {fFontStyle = fontStyle; fFontFlagsSet |= kFontStyleSet;} - hsBool ShowingBeginningOfBuffer(); - hsBool ShowingEndOfBuffer(); + bool ShowingBeginningOfBuffer(); + bool ShowingEndOfBuffer(); void DeleteLinesFromTop(int numLines); // cursor and scroll position might be off after this call, not valid on connected controls }; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.cpp index b51ec9de..dc36714f 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.cpp @@ -167,7 +167,7 @@ pfGUIPopUpMenu::~pfGUIPopUpMenu() //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIPopUpMenu::MsgReceive( plMessage *msg ) +bool pfGUIPopUpMenu::MsgReceive( plMessage *msg ) { plGenRefMsg *ref = plGenRefMsg::ConvertNoRef( msg ); if( ref != nil ) @@ -311,7 +311,7 @@ void pfGUIPopUpMenu::SetOriginAnchor( plSceneObject *anchor, pfGUIDialogMod * //// SetEnabled ////////////////////////////////////////////////////////////// -void pfGUIPopUpMenu::SetEnabled( hsBool e ) +void pfGUIPopUpMenu::SetEnabled( bool e ) { if( e && fNeedsRebuilding ) { @@ -429,7 +429,7 @@ void pfGUIPopUpMenu::IHandleMenuSomething( uint32_t idx, pfGUIControlMod *ctr //// IBuildMenu ////////////////////////////////////////////////////////////// // Given the list of menu items, builds our set of dynamic buttons -hsBool pfGUIPopUpMenu::IBuildMenu( void ) +bool pfGUIPopUpMenu::IBuildMenu( void ) { int i; @@ -621,10 +621,10 @@ void pfGUIPopUpMenu::ITearDownMenu( void ) //// HandleMouseEvent //////////////////////////////////////////////////////// -hsBool pfGUIPopUpMenu::HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, +bool pfGUIPopUpMenu::HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, uint8_t modifiers ) { - hsBool r = pfGUIDialogMod::HandleMouseEvent( event, mouseX, mouseY, modifiers ); + bool r = pfGUIDialogMod::HandleMouseEvent( event, mouseX, mouseY, modifiers ); if( r == false && event == pfGameGUIMgr::kMouseUp ) { // We don't want to be active anymore! @@ -922,7 +922,7 @@ void pfGUISkin::Write( hsStream *s, hsResMgr *mgr ) mgr->WriteKey( s, fTexture ); } -hsBool pfGUISkin::MsgReceive( plMessage *msg ) +bool pfGUISkin::MsgReceive( plMessage *msg ) { plGenRefMsg *ref = plGenRefMsg::ConvertNoRef( msg ); if( ref != nil ) diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.h index 7328806a..9056cf7f 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIPopUpMenu.h @@ -99,7 +99,7 @@ class pfGUIPopUpMenu : public pfGUIDialogMod }; // Array of info to rebuild our menu from. Note that this is ONLY used when rebuilding - hsBool fNeedsRebuilding, fWaitingForSkin; + bool fNeedsRebuilding, fWaitingForSkin; float fOriginX, fOriginY; uint16_t fMargin; hsTArray fMenuItems; @@ -113,7 +113,7 @@ class pfGUIPopUpMenu : public pfGUIDialogMod Alignment fAlignment; - hsBool IBuildMenu( void ); + bool IBuildMenu( void ); void ITearDownMenu( void ); hsGMaterial *ICreateDynMaterial( void ); @@ -147,13 +147,13 @@ class pfGUIPopUpMenu : public pfGUIDialogMod kRefParentNode }; - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); - virtual void SetEnabled( hsBool e ); - virtual hsBool HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, uint8_t modifiers ); + virtual void SetEnabled( bool e ); + virtual bool HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, uint8_t modifiers ); void Show( float x, float y ); @@ -224,13 +224,13 @@ class pfGUISkin : public hsKeyedObject virtual void Read( hsStream *s, hsResMgr *mgr ); virtual void Write( hsStream *s, hsResMgr *mgr ); - virtual hsBool MsgReceive( plMessage *msg ); + virtual bool MsgReceive( plMessage *msg ); plMipmap *GetTexture( void ) const { return fTexture; } void SetTexture( plMipmap *tex ); const pfSRect &GetElement( uint32_t idx ) const { return fElements[ idx ]; } - hsBool IsElementSet( uint32_t idx ) const { return ( fElements[ idx ].fWidth > 0 && fElements[ idx ].fHeight > 0 ); } + bool IsElementSet( uint32_t idx ) const { return ( fElements[ idx ].fWidth > 0 && fElements[ idx ].fHeight > 0 ); } void SetElement( uint32_t idx, uint16_t x, uint16_t y, uint16_t w, uint16_t h ); void SetMargins( uint16_t item, uint16_t border ) { fItemMargin = item; fBorderMargin = border; } diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.cpp index a8dc6ef0..123fcd09 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.cpp @@ -77,14 +77,14 @@ pfGUIProgressCtrl::pfGUIProgressCtrl() : fStopSoundTimer(99) //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIProgressCtrl::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIProgressCtrl::IEval( double secs, float del, uint32_t dirty ) { return pfGUIValueCtrl::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIProgressCtrl::MsgReceive( plMessage *msg ) +bool pfGUIProgressCtrl::MsgReceive( plMessage *msg ) { plTimerCallbackMsg *timerMsg = plTimerCallbackMsg::ConvertNoRef(msg); if (timerMsg) @@ -126,7 +126,7 @@ void pfGUIProgressCtrl::Write( hsStream *s, hsResMgr *mgr ) //// UpdateBounds //////////////////////////////////////////////////////////// -void pfGUIProgressCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force ) +void pfGUIProgressCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, bool force ) { pfGUIValueCtrl::UpdateBounds( invXformMatrix, force ); if( fAnimationKeys.GetCount() > 0 ) @@ -145,7 +145,7 @@ void pfGUIProgressCtrl::SetAnimationKeys( hsTArray &keys, const plStri // Loops through and computes the max begin and end for our animations. If // none of them are loaded and we're not already calced, returns false. -hsBool pfGUIProgressCtrl::ICalcAnimTimes( void ) +bool pfGUIProgressCtrl::ICalcAnimTimes( void ) { if( fAnimTimesCalced ) return true; diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.h index 9e207c21..89bbf0dc 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.h @@ -62,12 +62,12 @@ class pfGUIProgressCtrl : public pfGUIValueCtrl // Computed once, once an anim is loaded that we can compute this with float fAnimBegin, fAnimEnd; - hsBool fAnimTimesCalced; - hsBool fPlaySound; + bool fAnimTimesCalced; + bool fPlaySound; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() - hsBool ICalcAnimTimes( void ); + bool ICalcAnimTimes( void ); const uint32_t fStopSoundTimer; @@ -84,12 +84,12 @@ class pfGUIProgressCtrl : public pfGUIValueCtrl kReverseValues = kDerivedFlagsStart }; - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); - virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false ); + virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false ); virtual void SetCurrValue( float v ); virtual void AnimateToPercentage( float percent ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.cpp index 79bfaf3a..2a9ee7b1 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.cpp @@ -137,14 +137,14 @@ pfGUIRadioGroupCtrl::~pfGUIRadioGroupCtrl() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIRadioGroupCtrl::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIRadioGroupCtrl::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIRadioGroupCtrl::MsgReceive( plMessage *msg ) +bool pfGUIRadioGroupCtrl::MsgReceive( plMessage *msg ) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg ); if( refMsg != nil ) @@ -221,21 +221,21 @@ void pfGUIRadioGroupCtrl::SetValue( int32_t value ) ///// Setting to be trickled down to the underlings -void pfGUIRadioGroupCtrl::SetEnabled( hsBool e ) +void pfGUIRadioGroupCtrl::SetEnabled( bool e ) { int i; for( i = 0; i < fControls.GetCount(); i++ ) fControls[ i ]->SetEnabled(e); } -void pfGUIRadioGroupCtrl::SetInteresting( hsBool e ) +void pfGUIRadioGroupCtrl::SetInteresting( bool e ) { int i; for( i = 0; i < fControls.GetCount(); i++ ) fControls[ i ]->SetInteresting(e); } -void pfGUIRadioGroupCtrl::SetVisible( hsBool vis ) +void pfGUIRadioGroupCtrl::SetVisible( bool vis ) { int i; for( i = 0; i < fControls.GetCount(); i++ ) diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.h index e30439d7..1cd77c0f 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIRadioGroupCtrl.h @@ -72,7 +72,7 @@ class pfGUIRadioGroupCtrl : public pfGUIControlMod int32_t fValue, fDefaultValue; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() public: @@ -87,7 +87,7 @@ class pfGUIRadioGroupCtrl : public pfGUIControlMod kAllowNoSelection = kDerivedFlagsStart }; - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); @@ -95,9 +95,9 @@ class pfGUIRadioGroupCtrl : public pfGUIControlMod int32_t GetValue( void ) { return fValue; } void SetValue( int32_t value ); - virtual void SetEnabled( hsBool e ); - virtual void SetInteresting( hsBool e ); - virtual void SetVisible( hsBool vis ); + virtual void SetEnabled( bool e ); + virtual void SetInteresting( bool e ); + virtual void SetVisible( bool vis ); virtual void SetControlsFlag( int flag ); virtual void ClearControlsFlag( int flag ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp index 9578b6b4..9df6032a 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp @@ -80,14 +80,14 @@ pfGUITextBoxMod::~pfGUITextBoxMod() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUITextBoxMod::IEval( double secs, float del, uint32_t dirty ) +bool pfGUITextBoxMod::IEval( double secs, float del, uint32_t dirty ) { return pfGUIControlMod::IEval( secs, del, dirty ); } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUITextBoxMod::MsgReceive( plMessage *msg ) +bool pfGUITextBoxMod::MsgReceive( plMessage *msg ) { return pfGUIControlMod::MsgReceive( msg ); } @@ -167,7 +167,7 @@ void pfGUITextBoxMod::Read( hsStream *s, hsResMgr *mgr ) else fText = nil; - fUseLocalizationPath = (s->ReadBool() != 0); + fUseLocalizationPath = s->ReadBool(); if (fUseLocalizationPath) { wchar_t* temp = s->ReadSafeWString(); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.h index 109bc514..621c360c 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.h @@ -63,7 +63,7 @@ class pfGUITextBoxMod : public pfGUIControlMod bool fUseLocalizationPath; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() virtual void IUpdate( void ); virtual void IPostSetUpDynTextMap( void ); @@ -82,7 +82,7 @@ class pfGUITextBoxMod : public pfGUIControlMod kRightJustify }; - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.cpp index 77f9d957..40b42e50 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.cpp @@ -119,7 +119,7 @@ pfGUIUpDownPairMod::~pfGUIUpDownPairMod() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfGUIUpDownPairMod::IEval( double secs, float del, uint32_t dirty ) +bool pfGUIUpDownPairMod::IEval( double secs, float del, uint32_t dirty ) { return pfGUIValueCtrl::IEval( secs, del, dirty ); } @@ -157,7 +157,7 @@ void pfGUIUpDownPairMod::Update( void ) //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGUIUpDownPairMod::MsgReceive( plMessage *msg ) +bool pfGUIUpDownPairMod::MsgReceive( plMessage *msg ) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg ); if( refMsg != nil ) diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.h index 5374cbff..db2d7842 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIUpDownPairMod.h @@ -70,7 +70,7 @@ class pfGUIUpDownPairMod : public pfGUIValueCtrl pfUpDownBtnProc *fButtonProc; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() virtual void IUpdate( void ); public: @@ -82,7 +82,7 @@ class pfGUIUpDownPairMod : public pfGUIValueCtrl GETINTERFACE_ANY( pfGUIUpDownPairMod, pfGUIValueCtrl ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Update( void ); diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp index 19010b66..3b7d3ce5 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.cpp @@ -89,22 +89,22 @@ class pfGameUIInputInterface : public plInputInterface uint8_t fModifiers; uint8_t fButtonState; - hsBool fHaveInterestingCursor; + bool fHaveInterestingCursor; uint32_t fCurrentCursor; - virtual hsBool IHandleCtrlCmd( plCtrlCmd *cmd ); - virtual hsBool IControlCodeEnabled( ControlEventCode code ); + virtual bool IHandleCtrlCmd( plCtrlCmd *cmd ); + virtual bool IControlCodeEnabled( ControlEventCode code ); public: pfGameUIInputInterface( pfGameGUIMgr * const mgr ); virtual uint32_t GetPriorityLevel( void ) const { return kGUISystemPriority; } - virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ); + virtual bool InterpretInputEvent( plInputEventMsg *pMsg ); virtual uint32_t GetCurrentCursorID( void ) const; virtual float GetCurrentCursorOpacity( void ) const; - virtual hsBool HasInterestingCursorID( void ) const { return fHaveInterestingCursor; } - virtual hsBool SwitchInterpretOrder( void ) const { return true; } + virtual bool HasInterestingCursorID( void ) const { return fHaveInterestingCursor; } + virtual bool SwitchInterpretOrder( void ) const { return true; } virtual void RestoreDefaultKeyMappings( void ) { @@ -163,7 +163,7 @@ pfGameGUIMgr::~pfGameGUIMgr() //// Init //////////////////////////////////////////////////////////////////// -hsBool pfGameGUIMgr::Init( void ) +bool pfGameGUIMgr::Init( void ) { return true; } @@ -176,7 +176,7 @@ void pfGameGUIMgr::Draw( plPipeline *p ) //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfGameGUIMgr::MsgReceive( plMessage* pMsg ) +bool pfGameGUIMgr::MsgReceive( plMessage* pMsg ) { pfGameGUIMsg *guiMsg = pfGameGUIMsg::ConvertNoRef( pMsg ); if( guiMsg != nil ) @@ -235,7 +235,7 @@ void pfGameGUIMgr::IAddDlgToList( hsKeyedObject *obj ) // check to see if it is the dialog we are waiting for to be loaded for ( i=0 ; iGetName(), mod->GetName()) ) + if ( strcmp(fDialogToSetKeyOf[i]->GetName(), mod->GetName()) == 0 ) { SetDialogToNotify(mod,fDialogToSetKeyOf[i]->GetKey()); // now remove this entry... we did it @@ -316,7 +316,7 @@ void pfGameGUIMgr::LoadDialog( const char *name, plKey recvrKey, const char * int i; for ( i=0 ; iGetName(), name) ) + if ( strcmp(fDialogToSetKeyOf[i]->GetName(), name) == 0 ) { alreadyLoaded = true; break; @@ -459,7 +459,7 @@ void pfGameGUIMgr::UnloadDialog( pfGUIDialogMod *dlg ) //// IsDialogLoaded ////// see if the dialog is in our list of loaded dialogs -hsBool pfGameGUIMgr::IsDialogLoaded( const char *name ) +bool pfGameGUIMgr::IsDialogLoaded( const char *name ) { // search through all the dialogs we've loaded int i; @@ -533,7 +533,7 @@ void pfGameGUIMgr::SetDialogToNotify(pfGUIDialogMod *dlg, plKey recvrKey) // "Activates" the GUI manager. This means enabling the drawing of GUI // elements on the screen as well as rerouting input to us. -void pfGameGUIMgr::IActivateGUI( hsBool activate ) +void pfGameGUIMgr::IActivateGUI( bool activate ) { if( fActivated == activate ) return; @@ -561,13 +561,13 @@ void pfGameGUIMgr::IActivateGUI( hsBool activate ) //// IHandleMouse //////////////////////////////////////////////////////////// // Distributes mouse events to the dialogs currently active -hsBool pfGameGUIMgr::IHandleMouse( EventType event, float mouseX, float mouseY, uint8_t modifiers, uint32_t *desiredCursor ) +bool pfGameGUIMgr::IHandleMouse( EventType event, float mouseX, float mouseY, uint8_t modifiers, uint32_t *desiredCursor ) { pfGUIDialogMod *dlg; // Update interesting things first, no matter what, for ALL dialogs - hsBool modalPresent = false; + bool modalPresent = false; for( dlg = fActiveDialogs; dlg != nil; dlg = dlg->GetNext() ) { dlg->UpdateInterestingThings( mouseX, mouseY, modifiers, modalPresent ); @@ -592,7 +592,7 @@ hsBool pfGameGUIMgr::IHandleMouse( EventType event, float mouseX, float mouseY, //// IHandleKeyEvt /////////////////////////////////////////////////////////// // Distributes mouse events to the dialogs currently active -hsBool pfGameGUIMgr::IHandleKeyEvt( EventType event, plKeyDef key, uint8_t modifiers ) +bool pfGameGUIMgr::IHandleKeyEvt( EventType event, plKeyDef key, uint8_t modifiers ) { pfGUIDialogMod *dlg; @@ -610,7 +610,7 @@ hsBool pfGameGUIMgr::IHandleKeyEvt( EventType event, plKeyDef key, uint8_t modi // Like IHandleKeyPress, but takes in a char for distributing actual // characters typed. -hsBool pfGameGUIMgr::IHandleKeyPress( wchar_t key, uint8_t modifiers ) +bool pfGameGUIMgr::IHandleKeyPress( wchar_t key, uint8_t modifiers ) { pfGUIDialogMod *dlg; @@ -631,7 +631,7 @@ hsBool pfGameGUIMgr::IHandleKeyPress( wchar_t key, uint8_t modifiers ) // Looks at the chain of active dialogs and determines if there's any modals // blocking input. Returns true if so. -hsBool pfGameGUIMgr::IModalBlocking( void ) +bool pfGameGUIMgr::IModalBlocking( void ) { return ( IGetTopModal() != nil ) ? true : false; } @@ -679,7 +679,7 @@ pfGameUIInputInterface::pfGameUIInputInterface( pfGameGUIMgr * const mgr ) : plI // RestoreDefaultKeyMappings()!!!! } -hsBool pfGameUIInputInterface::IControlCodeEnabled( ControlEventCode code ) +bool pfGameUIInputInterface::IControlCodeEnabled( ControlEventCode code ) { if( code == B_CONTROL_EXIT_GUI_MODE ) { @@ -699,7 +699,7 @@ hsBool pfGameUIInputInterface::IControlCodeEnabled( ControlEventCode code ) return true; // Enable all other codes } -hsBool pfGameUIInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd ) +bool pfGameUIInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd ) { if( cmd->fControlCode == B_CONTROL_EXIT_GUI_MODE ) { @@ -715,9 +715,9 @@ hsBool pfGameUIInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd ) return false; } -hsBool pfGameUIInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) +bool pfGameUIInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) { - hsBool handled = false; + bool handled = false; /// The in-game UI has to do far more complicated control handling, so we just overload this entirely diff --git a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.h b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.h index f31ef37a..52d078fb 100644 --- a/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.h +++ b/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGameGUIMgr.h @@ -141,7 +141,7 @@ class pfGameGUIMgr : public hsKeyedObject hsTArray fDlgsPendingLoad; hsTArray fDlgsPendingUnload; - hsBool fActivated; + bool fActivated; uint32_t fActiveDlgCount; pfGameUIInputInterface *fInputConfig; @@ -165,13 +165,13 @@ class pfGameGUIMgr : public hsKeyedObject void IAddDlgToList( hsKeyedObject *obj ); void IRemoveDlgFromList( hsKeyedObject *obj ); - void IActivateGUI( hsBool activate ); + void IActivateGUI( bool activate ); - hsBool IHandleMouse( EventType event, float mouseX, float mouseY, uint8_t modifiers, uint32_t *desiredCursor ); - hsBool IHandleKeyEvt( EventType event, plKeyDef key, uint8_t modifiers ); - hsBool IHandleKeyPress( wchar_t key, uint8_t modifiers ); + bool IHandleMouse( EventType event, float mouseX, float mouseY, uint8_t modifiers, uint32_t *desiredCursor ); + bool IHandleKeyEvt( EventType event, plKeyDef key, uint8_t modifiers ); + bool IHandleKeyPress( wchar_t key, uint8_t modifiers ); - hsBool IModalBlocking( void ); + bool IModalBlocking( void ); pfGUIDialogMod *IGetTopModal( void ) const; @@ -191,9 +191,9 @@ class pfGameGUIMgr : public hsKeyedObject void Draw( plPipeline *p ); - hsBool Init( void ); + bool Init( void ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); void LoadDialog( const char *name, plKey recvrKey=nil, const char *ageName = nil ); // AgeName = nil defaults to "GUI" void ShowDialog( const char *name ) { IShowDialog(name); } @@ -204,7 +204,7 @@ class pfGameGUIMgr : public hsKeyedObject void ShowDialog( pfGUIDialogMod *dlg, bool resetClickables=true ); void HideDialog( pfGUIDialogMod *dlg ); - hsBool IsDialogLoaded( const char *name ); + bool IsDialogLoaded( const char *name ); pfGUIDialogMod *GetDialogFromString( const char *name ); void SetDialogToNotify(const char *name, plKey recvrKey); @@ -218,7 +218,7 @@ class pfGameGUIMgr : public hsKeyedObject pfGUIPopUpMenu *FindPopUpMenu( const char *name ); std::vector GetDlgRenderMods( void ) const; - hsBool IsModalBlocking( void ) {return IModalBlocking();} + bool IsModalBlocking( void ) {return IModalBlocking();} // Tag ID stuff pfGUIDialogMod *GetDialogFromTag( uint32_t tagID ); diff --git a/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp b/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp index f7c9b6a0..e1641973 100644 --- a/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp +++ b/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp @@ -491,7 +491,7 @@ void pfBookData::LoadGUI() pfGameGUIMgr::GetInstance()->SetDialogToNotify(fGUIName.c_str(), GetKey()); } -hsBool pfBookData::MsgReceive(plMessage *pMsg) +bool pfBookData::MsgReceive(plMessage *pMsg) { plGenRefMsg *ref = plGenRefMsg::ConvertNoRef(pMsg); if(ref != nil) @@ -541,11 +541,11 @@ hsBool pfBookData::MsgReceive(plMessage *pMsg) else if( fCurrentlyTurning ) { if( callback->fUser & 0x04 ) - IFillUncoveringPage( (hsBool)( callback->fUser & 0x01 ) ? true : false ); + IFillUncoveringPage( (bool)( callback->fUser & 0x01 ) ? true : false ); else if( callback->fUser & 0x02 ) - StartTriggeredFlip( (hsBool)( callback->fUser & 0x01 ) ? true : false ); + StartTriggeredFlip( (bool)( callback->fUser & 0x01 ) ? true : false ); else - IFinishTriggeredFlip( (hsBool)( callback->fUser & 0x01 ) ? true : false ); + IFinishTriggeredFlip( (bool)( callback->fUser & 0x01 ) ? true : false ); } return true; } @@ -808,7 +808,7 @@ void pfBookData::IHandleSFX(float currTime, WhichSide whichSide /*= kNoSides*/) // Yet another step in the page flip, to make SURE we're already showing the // turning page before we fill in the page behind it -void pfBookData::IFillUncoveringPage(hsBool rightSide) +void pfBookData::IFillUncoveringPage(bool rightSide) { // only show the turning page if the book is open if ( CurrentlyOpen() ) @@ -861,7 +861,7 @@ void pfBookData::IFillUncoveringPage(hsBool rightSide) //// ITriggerPageFlip //////////////////////////////////////////////////////// // Triggers the start of the page-flipping animation, as well as sets up the callback for when it's finished -void pfBookData::ITriggerPageFlip(hsBool flipBackwards, hsBool immediate) +void pfBookData::ITriggerPageFlip(bool flipBackwards, bool immediate) { // Hack here: since we don't have an official interface to select these directly // in MAX, we just use a GUI check box to grab them for us, even though we never @@ -922,7 +922,7 @@ void pfBookData::ITriggerPageFlip(hsBool flipBackwards, hsBool immediate) // Finishes the start of the triggered page flip (once we're sure the // animation is at the new frame) -void pfBookData::StartTriggeredFlip(hsBool flipBackwards) +void pfBookData::StartTriggeredFlip(bool flipBackwards) { if(flipBackwards) { @@ -948,7 +948,7 @@ void pfBookData::KillPageFlip() //// IFinishTriggeredFlip //////////////////////////////////////////////////// // Finishes the triggered page flip, on callback -void pfBookData::IFinishTriggeredFlip(hsBool wasBackwards) +void pfBookData::IFinishTriggeredFlip(bool wasBackwards) { if (fCurrBook && fCurrBook->fAreEditing) // this is handled differently when we are editing { @@ -1088,7 +1088,7 @@ void pfBookData::SetCurrSize(float w, float h) //// PlayBookCloseAnim ////////////////////////////////////////////////////// // Triggers our animation for closing or opening the book. -void pfBookData::PlayBookCloseAnim(hsBool closeIt /*= true*/, hsBool immediate /*= false*/) +void pfBookData::PlayBookCloseAnim(bool closeIt /*= true*/, bool immediate /*= false*/) { // Disable the book cover button if we're opening, enable otherwise fCoverButton->SetEnabled(closeIt); @@ -1119,7 +1119,7 @@ void pfBookData::HitBeginningOfControlList(int32_t cursorPos) fCurrBook->PreviousPage(); } -void pfBookData::EnableEditGUI(hsBool enable/* =true */) +void pfBookData::EnableEditGUI(bool enable/* =true */) { if (fEditable) { @@ -1282,7 +1282,7 @@ pfJournalBook::~pfJournalBook() //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfJournalBook::MsgReceive( plMessage *pMsg ) +bool pfJournalBook::MsgReceive( plMessage *pMsg ) { return hsKeyedObject::MsgReceive( pMsg ); } @@ -1300,7 +1300,7 @@ void pfJournalBook::SetGUI( const plString &guiName ) //// Show //////////////////////////////////////////////////////////////////// // Shows the book, optionally starting open or closed -void pfJournalBook::Show( hsBool startOpened /*= false */) +void pfJournalBook::Show( bool startOpened /*= false */) { fBookGUIs[fCurBookGUI]->StartedOpen(startOpened); fBookGUIs[fCurBookGUI]->CurBook(this); @@ -1358,7 +1358,7 @@ void pfJournalBook::Show( hsBool startOpened /*= false */) //// IFinishShow ///////////////////////////////////////////////////////////// // Finish showing the book, due to the animation being done seeking -void pfJournalBook::IFinishShow( hsBool startOpened ) +void pfJournalBook::IFinishShow( bool startOpened ) { fBookGUIs[fCurBookGUI]->Dialog()->Show(); @@ -1465,7 +1465,7 @@ void pfJournalBook::CloseAndHide( void ) //// ITriggerCloseWithNotify ///////////////////////////////////////////////// // Close with a notify -void pfJournalBook::ITriggerCloseWithNotify( hsBool closeNotOpen, hsBool immediate ) +void pfJournalBook::ITriggerCloseWithNotify( bool closeNotOpen, bool immediate ) { // Disable the book cover button if we're opening, enable otherwise fBookGUIs[fCurBookGUI]->CoverButton()->SetEnabled( closeNotOpen ); @@ -1638,7 +1638,7 @@ void pfJournalBook::PreviousPage( void ) //// IFindCurrVisibleLink //////////////////////////////////////////////////// // Find the current moused link, if any -int32_t pfJournalBook::IFindCurrVisibleLink( hsBool rightNotLeft, hsBool hoverNotUp ) +int32_t pfJournalBook::IFindCurrVisibleLink( bool rightNotLeft, bool hoverNotUp ) { pfGUIClickMapCtrl *ctrl = ( rightNotLeft ) ? fBookGUIs[fCurBookGUI]->RightPageMap() : fBookGUIs[fCurBookGUI]->LeftPageMap(); @@ -1716,7 +1716,7 @@ void pfJournalBook::IHandleCheckClick( uint32_t idx, pfBookData::WhichSide wh { // Special processing for checkboxes--toggle our state, switch our opacity // and then send a notify about our new state - hsBool check = ( fVisibleLinks[ idx ]->fFlags & pfEsHTMLChunk::kChecked ) ? false : true; + bool check = ( fVisibleLinks[ idx ]->fFlags & pfEsHTMLChunk::kChecked ) ? false : true; if( check ) { fVisibleLinks[ idx ]->fFlags |= pfEsHTMLChunk::kChecked; @@ -1753,7 +1753,7 @@ void pfJournalBook::GoToPage( uint32_t pageNumber ) //// SetEditable ///////////////////////////////////////////////////////////// -void pfJournalBook::SetEditable(hsBool editable) +void pfJournalBook::SetEditable(bool editable) { if (fBookGUIs[fCurBookGUI]->IsEditable()) // make sure this GUI supports editing { @@ -1810,7 +1810,7 @@ static uint32_t IConvertHex( const wchar_t *str ) //// ICompileSource ////////////////////////////////////////////////////////// // Compiles the given string of esHTML source into our compiled chunk list -hsBool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation &hintLoc ) +bool pfJournalBook::ICompileSource( const wchar_t *source, const plLocation &hintLoc ) { IFreeSource(); @@ -2398,7 +2398,7 @@ uint8_t pfJournalBook::IGetTagType( const wchar_t *string ) return pfEsHTMLChunk::kEmpty; } -hsBool pfJournalBook::IGetNextOption( const wchar_t *&string, wchar_t *name, wchar_t *option ) +bool pfJournalBook::IGetNextOption( const wchar_t *&string, wchar_t *name, wchar_t *option ) { const wchar_t *c; @@ -2555,7 +2555,7 @@ plKey pfJournalBook::IGetMipmapKey( const wchar_t *name, const plLocation &loc // DTMap (by GUI tag ID). If no page is cached after this one, also updates // the various cached info about page endings, etc. -void pfJournalBook::IRenderPage( uint32_t page, uint32_t whichDTMap, hsBool suppressRendering /*= false*/ ) +void pfJournalBook::IRenderPage( uint32_t page, uint32_t whichDTMap, bool suppressRendering /*= false*/ ) { if (fAreEditing) return; // we don't render if we are editing the book @@ -2613,7 +2613,7 @@ void pfJournalBook::IRenderPage( uint32_t page, uint32_t whichDTMap, hsBool s const wchar_t *fontFace; hsColorRGBA fontColor; int16_t fontSpacing; - hsBool needSFX = false; + bool needSFX = false; // Find and set initial font properties IFindFontProps( fPageStarts[ page ], fontFace, fontSize, fontFlags, fontColor, fontSpacing ); @@ -2891,7 +2891,7 @@ void pfJournalBook::IMoveMovies( hsGMaterial *source, hsGMaterial *dest ) //// IDrawMipmap ///////////////////////////////////////////////////////////// -void pfJournalBook::IDrawMipmap( pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *mip, plDynamicTextMap *dtMap, uint32_t whichDTMap, hsBool dontRender ) +void pfJournalBook::IDrawMipmap( pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *mip, plDynamicTextMap *dtMap, uint32_t whichDTMap, bool dontRender ) { plMipmap *copy = new plMipmap(); copy->CopyFrom(mip); @@ -3015,7 +3015,7 @@ pfJournalBook::loadedMovie *pfJournalBook::IGetMovieByIndex(uint8_t index) return nil; } -plLayerBink *pfJournalBook::IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *baseMipmap, uint32_t whichDTMap, hsBool dontRender) +plLayerBink *pfJournalBook::IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *baseMipmap, uint32_t whichDTMap, bool dontRender) { // see if it's already loaded loadedMovie *movie = IMovieAlreadyLoaded(chunk); @@ -3493,7 +3493,7 @@ void pfJournalBook::SetBookSize( float width, float height ) //// ILoadAllImages ////////////////////////////////////////////////////////// // Load (or unload) all the images for the book -void pfJournalBook::ILoadAllImages( hsBool unload ) +void pfJournalBook::ILoadAllImages( bool unload ) { uint32_t i; diff --git a/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.h b/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.h index bfc52958..c99f9a53 100644 --- a/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.h +++ b/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.h @@ -219,7 +219,7 @@ public: CLASSNAME_REGISTER(pfBookData); GETINTERFACE_ANY(pfBookData, hsKeyedObject); - virtual hsBool MsgReceive(plMessage *pMsg); + virtual bool MsgReceive(plMessage *pMsg); pfGUIDialogMod *Dialog() const {return fDialog;} pfGUICheckBoxCtrl *CoverButton() const {return fCoverButton;} @@ -236,15 +236,15 @@ public: plMipmap *DefaultCover() const {return fDefaultCover;} pfJournalBook *CurBook() const {return fCurrBook;} - hsBool StartedOpen() {return fStartedOpen;} - hsBool CurrentlyOpen() {return fCurrentlyOpen;} - hsBool CurrentlyTurning() {return fCurrentlyTurning;} - hsBool IsEditable() {return fEditable;} + bool StartedOpen() {return fStartedOpen;} + bool CurrentlyOpen() {return fCurrentlyOpen;} + bool CurrentlyTurning() {return fCurrentlyTurning;} + bool IsEditable() {return fEditable;} WhichSide CurSFXPages() {return fCurrSFXPages;} - void StartedOpen(hsBool startedOpen) {fStartedOpen = startedOpen;} - void CurrentlyOpen(hsBool currentlyOpen) {fCurrentlyOpen = currentlyOpen;} - void CurrentlyTurning(hsBool currentlyTurning) {fCurrentlyTurning = currentlyTurning;} + void StartedOpen(bool startedOpen) {fStartedOpen = startedOpen;} + void CurrentlyOpen(bool currentlyOpen) {fCurrentlyOpen = currentlyOpen;} + void CurrentlyTurning(bool currentlyTurning) {fCurrentlyTurning = currentlyTurning;} void CurBook(pfJournalBook *curBook) {fCurrBook = curBook;} // Quick helper @@ -258,10 +258,10 @@ public: void UpdatePageCorners(WhichSide which); // Plays our book close animation - void PlayBookCloseAnim(hsBool closeIt = true, hsBool immediate = false); + void PlayBookCloseAnim(bool closeIt = true, bool immediate = false); // Finishes the start of the triggered page flip (once we're sure the animation is at the new frame) - void StartTriggeredFlip(hsBool flipBackwards); + void StartTriggeredFlip(bool flipBackwards); // kill the flipping of a page... we are probably closing the book void KillPageFlip(); @@ -272,7 +272,7 @@ public: void HitEndOfControlList(int32_t cursorPos); void HitBeginningOfControlList(int32_t cursorPos); - void EnableEditGUI(hsBool enable=true); + void EnableEditGUI(bool enable=true); void DisableEditGUI() {EnableEditGUI(false);} protected: @@ -318,13 +318,13 @@ protected: // Base time to calc SFX anim positions from float fBaseSFXTime; - hsBool fResetSFXFlag; - hsBool fSFXUpdateFlip; // So we only update alternating pages every frame, to save processor time + bool fResetSFXFlag; + bool fSFXUpdateFlip; // So we only update alternating pages every frame, to save processor time // What it says - hsBool fCurrentlyTurning, fCurrentlyOpen, fStartedOpen; + bool fCurrentlyTurning, fCurrentlyOpen, fStartedOpen; - hsBool fEditable; + bool fEditable; int32_t fAdjustCursorTo; // Inits our dialog template @@ -334,13 +334,13 @@ protected: void IHandleSFX(float currTime, WhichSide whichSide = kNoSides); // Yet another step in the page flip, to make SURE we're already showing the turning page before we fill in the page behind it - void IFillUncoveringPage(hsBool rightSide); + void IFillUncoveringPage(bool rightSide); // Triggers the start of the page-flipping animation, as well as sets up the callback for when it's finished - void ITriggerPageFlip(hsBool flipBackwards, hsBool immediate); + void ITriggerPageFlip(bool flipBackwards, bool immediate); // Finishes the triggered page flip, on callback - void IFinishTriggeredFlip(hsBool wasBackwards); + void IFinishTriggeredFlip(bool wasBackwards); }; class pfJournalBook : public hsKeyedObject @@ -371,7 +371,7 @@ class pfJournalBook : public hsKeyedObject GETINTERFACE_ANY( pfJournalBook, hsKeyedObject ); // Our required virtual - virtual hsBool MsgReceive( plMessage *pMsg ); + virtual bool MsgReceive( plMessage *pMsg ); // Init the singleton, for client startup static void SingletonInit( void ); @@ -391,7 +391,7 @@ class pfJournalBook : public hsKeyedObject void SetGUI( const plString &guiName ); // Shows the book, optionally starting open or closed - void Show( hsBool startOpened = false ); + void Show( bool startOpened = false ); /// NOTE: The following functions expose functionality that is normally @@ -433,13 +433,13 @@ class pfJournalBook : public hsKeyedObject void SetPageMargin( uint32_t margin ) { fPageTMargin = fPageLMargin = fPageBMargin = fPageRMargin = margin; } // Turns on or off page turning - void AllowPageTurning( hsBool allow ) { fAllowTurning = allow; } + void AllowPageTurning( bool allow ) { fAllowTurning = allow; } // grabs a certain movie based on it's index in the source file plKey GetMovie( uint8_t index ); // turns on and off editing of the book - void SetEditable( hsBool editable=true ); + void SetEditable( bool editable=true ); // returns the text contained by the edit controls std::string GetEditableText(); @@ -479,16 +479,16 @@ class pfJournalBook : public hsKeyedObject hsTArray fPageStarts; // is the book done showing and ready for more page calculations - hsBool fAreWeShowing; + bool fAreWeShowing; // Our current page uint32_t fCurrentPage; // are we editing this book? (adjusts how we draw and flip pages) - hsBool fAreEditing; - hsBool fWantEditing; // the code specifies that we want to edit, but the gui doesn't support it, we will check again if the gui changes + bool fAreEditing; + bool fWantEditing; // the code specifies that we want to edit, but the gui doesn't support it, we will check again if the gui changes - hsBool fAllowTurning; // do we allow the user to turn pages? + bool fAllowTurning; // do we allow the user to turn pages? // The ending page. -1 until calculated by flipping to it uint32_t fLastPage; @@ -514,19 +514,19 @@ class pfJournalBook : public hsKeyedObject }; // Compiles the given string of esHTML source into our compiled chunk list - hsBool ICompileSource( const wchar_t *source, const plLocation &hintLoc ); + bool ICompileSource( const wchar_t *source, const plLocation &hintLoc ); // Frees our source array void IFreeSource( void ); // Compile helpers uint8_t IGetTagType( const wchar_t *string ); - hsBool IGetNextOption( const wchar_t *&string, wchar_t *name, wchar_t *option ); + bool IGetNextOption( const wchar_t *&string, wchar_t *name, wchar_t *option ); plKey IGetMipmapKey( const wchar_t *name, const plLocation &loc ); // Renders one (1) page into the given DTMap - void IRenderPage( uint32_t page, uint32_t whichDTMap, hsBool suppressRendering = false ); + void IRenderPage( uint32_t page, uint32_t whichDTMap, bool suppressRendering = false ); // moves the movie layers from one material onto another void IMoveMovies( hsGMaterial *source, hsGMaterial *dest); @@ -546,19 +546,19 @@ class pfJournalBook : public hsKeyedObject void ISendNotify( uint32_t type, uint32_t linkID = 0 ); // Close with a notify - void ITriggerCloseWithNotify( hsBool closeNotOpen, hsBool immediate ); + void ITriggerCloseWithNotify( bool closeNotOpen, bool immediate ); // Finish showing the book, due to the animation being done seeking - void IFinishShow( hsBool startOpened ); + void IFinishShow( bool startOpened ); // Find the current moused link, if any - int32_t IFindCurrVisibleLink( hsBool rightNotLeft, hsBool hoverNotUp ); + int32_t IFindCurrVisibleLink( bool rightNotLeft, bool hoverNotUp ); // Ensures that all the page starts are calced up to the given page (but not including it) void IRecalcPageStarts( uint32_t upToPage ); // Load (or unload) all the images for the book - void ILoadAllImages( hsBool unload ); + void ILoadAllImages( bool unload ); // Purge the DynaTextMaps void IPurgeDynaTextMaps( ); @@ -567,12 +567,12 @@ class pfJournalBook : public hsKeyedObject void IHandleCheckClick( uint32_t idx, pfBookData::WhichSide which ); // Draw me an image! - void IDrawMipmap( pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *mip, plDynamicTextMap *dtMap, uint32_t whichDTMap, hsBool dontRender ); + void IDrawMipmap( pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *mip, plDynamicTextMap *dtMap, uint32_t whichDTMap, bool dontRender ); // Movie functions loadedMovie *IMovieAlreadyLoaded(pfEsHTMLChunk *chunk); loadedMovie *IGetMovieByIndex(uint8_t index); - plLayerBink *IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *baseMipmap, uint32_t whichDTMap, hsBool dontRender); + plLayerBink *IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *baseMipmap, uint32_t whichDTMap, bool dontRender); // Cover functions plLayerInterface *IMakeBaseLayer(plMipmap *image); diff --git a/Sources/Plasma/FeatureLib/pfKI/pfKI.cpp b/Sources/Plasma/FeatureLib/pfKI/pfKI.cpp index 3e69c83e..146529ad 100644 --- a/Sources/Plasma/FeatureLib/pfKI/pfKI.cpp +++ b/Sources/Plasma/FeatureLib/pfKI/pfKI.cpp @@ -254,7 +254,7 @@ class plKIAddEditBox : public pfGUIDialogProc plKIMainProc *fMainProc; public: - hsBool fEditing; + bool fEditing; plKIAddEditBox( pfGUIListBoxMod *list, pfGUIDialogMod *p, plKIMainProc *mainProc ) { @@ -618,7 +618,7 @@ class pfKIListPlayerItem : public pfGUIListText plKey fPlayerKey; public: - pfKIListPlayerItem( plKey key, hsBool inRange = false ) : pfGUIListText(), fPlayerKey( key ) + pfKIListPlayerItem( plKey key, bool inRange = false ) : pfGUIListText(), fPlayerKey( key ) { static char str[ 256 ]; @@ -648,11 +648,11 @@ class plKIMiniProc : public pfGUIDialogProc pfGUIDialogMod *fMainDlg; pfGUIListBoxMod *fChatList; plKIFolder *fChatVaultFolder; - hsBool fChatting, fInited; + bool fChatting, fInited; float fFadeOutTimer, fFadeOutDelay; float fForeAlpha, fSelForeAlpha; - hsBool fLocalClientIsAdmin; + bool fLocalClientIsAdmin; public: @@ -666,7 +666,7 @@ class plKIMiniProc : public pfGUIDialogProc fLocalClientIsAdmin = false; } - void SetLocalClientAsAdmin( hsBool yes ) { fLocalClientIsAdmin = yes; } + void SetLocalClientAsAdmin( bool yes ) { fLocalClientIsAdmin = yes; } virtual void OnInit( void ) { @@ -736,7 +736,7 @@ class plKIMiniProc : public pfGUIDialogProc void SetFadeOutDelay( hsScalar secs ) { fFadeOutDelay = secs; } - void EnterChatMode( hsBool enteringNotLeaving ) + void EnterChatMode( bool enteringNotLeaving ) { pfGUIEditBoxMod *edit = pfGUIEditBoxMod::ConvertNoRef( fDialog->GetControlFromTag( kKITestControl2 ) ); pfGUIControlMod *label = fDialog->GetControlFromTag( kKIStaticText ); @@ -760,7 +760,7 @@ class plKIMiniProc : public pfGUIDialogProc fChatting = enteringNotLeaving; } - hsBool IsChatting( void ) const { return fChatting; } + bool IsChatting( void ) const { return fChatting; } void GrabChatList( void ) { @@ -806,7 +806,7 @@ class plKIMiniProc : public pfGUIDialogProc if( mbr != nil && mbr->GetAvatarKey() != nil ) { - hsBool inRange = ( i < plNetListenList::kMaxListenListSize || plNetListenList::kMaxListenListSize==-1) && + bool inRange = ( i < plNetListenList::kMaxListenListSize || plNetListenList::kMaxListenListSize==-1) && ( mbr->GetDistSq() < plNetListenList::kMaxListenDistSq ); userList->AddElement( new pfKIListPlayerItem( mbr->GetAvatarKey(), inRange ) ); @@ -1223,7 +1223,7 @@ void pfKI::Init( void ) } -hsBool pfKI::MsgReceive( plMessage *msg ) +bool pfKI::MsgReceive( plMessage *msg ) { pfKIMsg *kiMsg = pfKIMsg::ConvertNoRef( msg ); if( kiMsg != nil ) diff --git a/Sources/Plasma/FeatureLib/pfKI/pfKI.h b/Sources/Plasma/FeatureLib/pfKI/pfKI.h index d4d38c7b..44564193 100644 --- a/Sources/Plasma/FeatureLib/pfKI/pfKI.h +++ b/Sources/Plasma/FeatureLib/pfKI/pfKI.h @@ -86,7 +86,7 @@ class pfKI : public hsKeyedObject CLASSNAME_REGISTER( pfKI ); GETINTERFACE_ANY( pfKI, plReceiver ); - virtual hsBool MsgReceive( plMessage *msg ); + virtual bool MsgReceive( plMessage *msg ); void Init( void ); diff --git a/Sources/Plasma/FeatureLib/pfKI/pfPlayerBookMod.cpp b/Sources/Plasma/FeatureLib/pfKI/pfPlayerBookMod.cpp index 10b14339..9f1d3fc6 100644 --- a/Sources/Plasma/FeatureLib/pfKI/pfPlayerBookMod.cpp +++ b/Sources/Plasma/FeatureLib/pfKI/pfPlayerBookMod.cpp @@ -81,14 +81,14 @@ pfPlayerBookMod::~pfPlayerBookMod() //// IEval /////////////////////////////////////////////////////////////////// -hsBool pfPlayerBookMod::IEval( double secs, hsScalar del, uint32_t dirty ) +bool pfPlayerBookMod::IEval( double secs, hsScalar del, uint32_t dirty ) { return false; } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool pfPlayerBookMod::MsgReceive( plMessage *msg ) +bool pfPlayerBookMod::MsgReceive( plMessage *msg ) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg ); if( refMsg != nil ) diff --git a/Sources/Plasma/FeatureLib/pfKI/pfPlayerBookMod.h b/Sources/Plasma/FeatureLib/pfKI/pfPlayerBookMod.h index 89ffe1f5..a7d98a56 100644 --- a/Sources/Plasma/FeatureLib/pfKI/pfPlayerBookMod.h +++ b/Sources/Plasma/FeatureLib/pfKI/pfPlayerBookMod.h @@ -79,7 +79,7 @@ class pfPlayerBookMod : public plSingleModifier kRefSaveButton }; - virtual hsBool IEval( double secs, hsScalar del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, hsScalar del, uint32_t dirty ); // called only by owner object's Eval() public: @@ -89,7 +89,7 @@ class pfPlayerBookMod : public plSingleModifier CLASSNAME_REGISTER( pfPlayerBookMod ); GETINTERFACE_ANY( pfPlayerBookMod, plSingleModifier ); - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); diff --git a/Sources/Plasma/FeatureLib/pfMessage/plArmatureEffectMsg.h b/Sources/Plasma/FeatureLib/pfMessage/plArmatureEffectMsg.h index b3017136..f0dc7b0c 100644 --- a/Sources/Plasma/FeatureLib/pfMessage/plArmatureEffectMsg.h +++ b/Sources/Plasma/FeatureLib/pfMessage/plArmatureEffectMsg.h @@ -74,7 +74,7 @@ public: virtual void Write(hsStream* stream, hsResMgr* mgr); int8_t fSurface; - hsBool fAddSurface; + bool fAddSurface; }; diff --git a/Sources/Plasma/FeatureLib/pfMessage/plClothingMsg.h b/Sources/Plasma/FeatureLib/pfMessage/plClothingMsg.h index e71a2428..19d2edd7 100644 --- a/Sources/Plasma/FeatureLib/pfMessage/plClothingMsg.h +++ b/Sources/Plasma/FeatureLib/pfMessage/plClothingMsg.h @@ -79,9 +79,9 @@ public: kSaveCustomizations = 0x0100, }; - hsBool GetCommand(uint32_t command) { return fCommands & command; } + bool GetCommand(uint32_t command) { return fCommands & command; } void AddCommand(uint32_t command) { fCommands |= command; } - hsBool ResendUpdate() { return fCommands != kUpdateTexture; } + bool ResendUpdate() { return fCommands != kUpdateTexture; } // IO virtual void Read(hsStream* stream, hsResMgr* mgr); diff --git a/Sources/Plasma/FeatureLib/pfPython/cyAnimation.cpp b/Sources/Plasma/FeatureLib/pfPython/cyAnimation.cpp index 277521ae..00c9e69a 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyAnimation.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyAnimation.cpp @@ -116,12 +116,6 @@ void cyAnimation::SetAnimName(const char* name) fAnimName = hsStrcpy(name); } -void cyAnimation::SetNetForce(hsBool state) -{ - // set our flag - fNetForce = state; -} - ///////////////////////////////////////////////////////////////////////////// // // Function : Play @@ -380,7 +374,7 @@ void cyAnimation::SkipToTime(float time) // // PURPOSE : Set whether the animation is to be looped or not // -void cyAnimation::Looped(hsBool looped) +void cyAnimation::Looped(bool looped) { // must have a receiver! if ( fRecvr.Count() > 0 ) @@ -421,7 +415,7 @@ void cyAnimation::Looped(hsBool looped) // // PURPOSE : Sets the backwards state for the animation // -void cyAnimation::Backwards(hsBool backwards) +void cyAnimation::Backwards(bool backwards) { // must have a receiver! if ( fRecvr.Count() > 0 ) diff --git a/Sources/Plasma/FeatureLib/pfPython/cyAnimation.h b/Sources/Plasma/FeatureLib/pfPython/cyAnimation.h index 8e8afe92..e3bfa740 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyAnimation.h +++ b/Sources/Plasma/FeatureLib/pfPython/cyAnimation.h @@ -58,7 +58,7 @@ class cyAnimation plKey fSender; hsTArray fRecvr; char* fAnimName; - hsBool fNetForce; + bool fNetForce; virtual void IRunOneCmd(int cmd); @@ -90,7 +90,7 @@ public: virtual PyObject* GetFirstRecvr(); - virtual void SetNetForce(hsBool state); + virtual void SetNetForce(bool state) { fNetForce = state; } // Play animation from start to end (whatever is already set) // @@ -123,11 +123,11 @@ public: // Set whether the animation is to be looped or not // - virtual void Looped(hsBool looped); + virtual void Looped(bool looped); // Sets the backwards state for the animation // - virtual void Backwards(hsBool backwards); + virtual void Backwards(bool backwards); // Sets the start and end of the looping points in the animation diff --git a/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp b/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp index c69f1acf..8eb76d58 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp @@ -110,12 +110,6 @@ void cyAvatar::AddRecvr(plKey &recvr) fRecvr.Append(recvr); } -void cyAvatar::SetNetForce(hsBool state) -{ - // set our flag - fNetForce = state; -} - void cyAvatar::SetSenderKey(pyKey& pKey) { plKey k = pKey.getKey(); @@ -174,8 +168,8 @@ plKey cyAvatar::IFindArmatureModKey(plKey avKey) // // PURPOSE : oneShot Avatar (must already be there) // -void cyAvatar::OneShot(pyKey &seekKey, float duration, hsBool usePhysics, - const plString &animName, hsBool drivable, hsBool reversible) +void cyAvatar::OneShot(pyKey &seekKey, float duration, bool usePhysics, + const plString &animName, bool drivable, bool reversible) { if ( fRecvr.Count() > 0 ) { @@ -218,7 +212,7 @@ void cyAvatar::OneShot(pyKey &seekKey, float duration, hsBool usePhysics, // // PURPOSE : Run Behavior, could be single or multi-stage shot // -void cyAvatar::RunBehavior(pyKey &behKey, hsBool netForce, hsBool netProp) +void cyAvatar::RunBehavior(pyKey &behKey, bool netForce, bool netProp) { // first there is someone to send to and make sure that we an avatar to send this to if ( behKey.getKey() != nil && fRecvr.Count() > 0) @@ -314,7 +308,7 @@ void cyAvatar::RunBehavior(pyKey &behKey, hsBool netForce, hsBool netProp) // // PURPOSE : Run Behavior, multistage only, reply to specified key'd object // -void cyAvatar::RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, hsBool netForce, hsBool netProp) +void cyAvatar::RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, bool netForce, bool netProp) { plMultistageBehMod* pMod = plMultistageBehMod::ConvertNoRef(behKey.getKey()->GetObjectPtr()); if ( pMod ) @@ -373,8 +367,8 @@ void cyAvatar::RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, hsBool netFor // // NOTE: only works with multi-stage behaviors // -void cyAvatar::NextStage(pyKey &behKey, float transTime, hsBool setTime, float newTime, - hsBool setDirection, bool isForward, hsBool netForce) +void cyAvatar::NextStage(pyKey &behKey, float transTime, bool setTime, float newTime, + bool setDirection, bool isForward, bool netForce) { // first there is someone to send to and make sure that we an avatar to send this to if ( behKey.getKey() != nil && fRecvr.Count() > 0) @@ -388,7 +382,7 @@ void cyAvatar::NextStage(pyKey &behKey, float transTime, hsBool setTime, float n // create the message plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg((plKey)fSender, avKey, plAvBrainGenericMsg::kNextStage, 0, setTime, newTime, - setDirection, (bool)isForward, transTime); + setDirection, isForward, transTime); if ( netForce ) pMsg->SetBCastFlag(plMessage::kNetForce | plMessage::kNetPropagate); @@ -412,8 +406,8 @@ void cyAvatar::NextStage(pyKey &behKey, float transTime, hsBool setTime, float n // // NOTE: only works with multi-stage behaviors // -void cyAvatar::PreviousStage(pyKey &behKey, float transTime, hsBool setTime, float newTime, - hsBool setDirection, bool isForward, hsBool netForce) +void cyAvatar::PreviousStage(pyKey &behKey, float transTime, bool setTime, float newTime, + bool setDirection, bool isForward, bool netForce) { // first there is someone to send to and make sure that we an avatar to send this to if ( behKey.getKey() != nil && fRecvr.Count() > 0) @@ -427,7 +421,7 @@ void cyAvatar::PreviousStage(pyKey &behKey, float transTime, hsBool setTime, flo // create the message plAvBrainGenericMsg* pMsg = new plAvBrainGenericMsg((plKey)fSender, avKey, plAvBrainGenericMsg::kPrevStage, 0, setTime, newTime, - setDirection, (bool)isForward, transTime); + setDirection, isForward, transTime); if ( netForce ) pMsg->SetBCastFlag(plMessage::kNetForce | plMessage::kNetPropagate); @@ -452,8 +446,8 @@ void cyAvatar::PreviousStage(pyKey &behKey, float transTime, hsBool setTime, flo // // NOTE: only works with multi-stage behaviors // -void cyAvatar::GoToStage(pyKey &behKey, int32_t stage, float transTime, hsBool setTime, float newTime, - hsBool setDirection, bool isForward, hsBool netForce) +void cyAvatar::GoToStage(pyKey &behKey, int32_t stage, float transTime, bool setTime, float newTime, + bool setDirection, bool isForward, bool netForce) { // first there is someone to send to and make sure that we an avatar to send this to if ( behKey.getKey() != nil && fRecvr.Count() > 0) @@ -480,7 +474,7 @@ void cyAvatar::GoToStage(pyKey &behKey, int32_t stage, float transTime, hsBool s } -void cyAvatar::SetLoopCount(pyKey &behKey, int32_t stage, int32_t loopCount, hsBool netForce) +void cyAvatar::SetLoopCount(pyKey &behKey, int32_t stage, int32_t loopCount, bool netForce) { // if it is a Multistage guy if ( plMultistageBehMod::ConvertNoRef(behKey.getKey()->GetObjectPtr()) != nil ) @@ -508,7 +502,7 @@ void cyAvatar::SetLoopCount(pyKey &behKey, int32_t stage, int32_t loopCount, hsB /* Unsupported. Ask Bob if you want it back. -void cyAvatar::Seek(pyKey &seekKey, float duration, hsBool usePhysics) +void cyAvatar::Seek(pyKey &seekKey, float duration, bool usePhysics) { // must have a receiver! if ( fRecvr.Count() > 0 ) @@ -1011,7 +1005,7 @@ PyObject* cyAvatar::GetMatchingClothingItem(const char* clothing_name) // PURPOSE : Wear a particular piece of clothing based on name of clothing item // : returns 0, if clothing item was not found // -hsBool cyAvatar::WearClothingItem(const char* clothing_name) +bool cyAvatar::WearClothingItem(const char* clothing_name) { return WearClothingItemU(clothing_name,true); } @@ -1024,7 +1018,7 @@ hsBool cyAvatar::WearClothingItem(const char* clothing_name) // PURPOSE : Wear a particular piece of clothing based on name of clothing item // : returns false, if clothing item was not found // -hsBool cyAvatar::RemoveClothingItem(const char* clothing_name) +bool cyAvatar::RemoveClothingItem(const char* clothing_name) { return RemoveClothingItemU(clothing_name,true); } @@ -1036,7 +1030,7 @@ hsBool cyAvatar::RemoveClothingItem(const char* clothing_name) // // PURPOSE : Tint a clothing item, i.e. change the color of it // -hsBool cyAvatar::TintClothingItem(const char* clothing_name, pyColor& tint) +bool cyAvatar::TintClothingItem(const char* clothing_name, pyColor& tint) { return TintClothingItemU(clothing_name,tint,true); } @@ -1050,7 +1044,7 @@ hsBool cyAvatar::TintClothingItem(const char* clothing_name, pyColor& tint) // // PURPOSE : Tint a clothing item, i.e. change the color of it // -hsBool cyAvatar::TintClothingItemLayer(const char* clothing_name, pyColor& tint, uint8_t layer) +bool cyAvatar::TintClothingItemLayer(const char* clothing_name, pyColor& tint, uint8_t layer) { return TintClothingItemLayerU(clothing_name,tint,layer,true); } @@ -1064,7 +1058,7 @@ hsBool cyAvatar::TintClothingItemLayer(const char* clothing_name, pyColor& tint, // PURPOSE : Wear a particular piece of clothing based on name of clothing item // : returns 0, if clothing item was not found // -hsBool cyAvatar::WearClothingItemU(const char* clothing_name, hsBool update) +bool cyAvatar::WearClothingItemU(const char* clothing_name, bool update) { const plArmatureMod *avMod = nil; // we can really only talk to one avatar, so just get the first one (which is probably the only one) @@ -1098,7 +1092,7 @@ hsBool cyAvatar::WearClothingItemU(const char* clothing_name, hsBool update) // PURPOSE : Wear a particular piece of clothing based on name of clothing item // : returns false, if clothing item was not found // -hsBool cyAvatar::RemoveClothingItemU(const char* clothing_name, hsBool update) +bool cyAvatar::RemoveClothingItemU(const char* clothing_name, bool update) { const plArmatureMod *avMod = nil; // we can really only talk to one avatar, so just get the first one (which is probably the only one) @@ -1132,7 +1126,7 @@ hsBool cyAvatar::RemoveClothingItemU(const char* clothing_name, hsBool update) // // PURPOSE : Tint a clothing item, i.e. change the color of it // -hsBool cyAvatar::TintClothingItemU(const char* clothing_name, pyColor& tint, hsBool update) +bool cyAvatar::TintClothingItemU(const char* clothing_name, pyColor& tint, bool update) { const plArmatureMod *avMod = nil; // we can really only talk to one avatar, so just get the first one (which is probably the only one) @@ -1165,7 +1159,7 @@ hsBool cyAvatar::TintClothingItemU(const char* clothing_name, pyColor& tint, hsB // // PURPOSE : Tint a clothing item, i.e. change the color of it // -hsBool cyAvatar::TintClothingItemLayerU(const char* clothing_name, pyColor& tint, uint8_t layer, hsBool update) +bool cyAvatar::TintClothingItemLayerU(const char* clothing_name, pyColor& tint, uint8_t layer, bool update) { const plArmatureMod *avMod = nil; // we can really only talk to one avatar, so just get the first one (which is probably the only one) @@ -1300,7 +1294,7 @@ void cyAvatar::TintSkin(pyColor& tint) // // PURPOSE : Tint the skin of the player's avatar with optional update flag // -void cyAvatar::TintSkinU(pyColor& tint, hsBool update) +void cyAvatar::TintSkinU(pyColor& tint, bool update) { const plArmatureMod *avMod = nil; // we can really only talk to one avatar, so just get the first one (which is probably the only one) @@ -1967,7 +1961,7 @@ bool IExitTopmostGenericMode() // // PURPOSE : Returns whether the top most brain is a human brain // -hsBool cyAvatar::IsCurrentBrainHuman() +bool cyAvatar::IsCurrentBrainHuman() { plArmatureMod *avatar = plAvatarMgr::GetInstance()->GetLocalAvatar(); if (avatar) diff --git a/Sources/Plasma/FeatureLib/pfPython/cyAvatar.h b/Sources/Plasma/FeatureLib/pfPython/cyAvatar.h index 5f02686d..2d64705f 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyAvatar.h +++ b/Sources/Plasma/FeatureLib/pfPython/cyAvatar.h @@ -67,7 +67,7 @@ class cyAvatar protected: plKey fSender; hsTArray fRecvr; - hsBool fNetForce; + bool fNetForce; virtual const plArmatureMod* IFindArmatureMod(plKey avObj); virtual plKey IFindArmatureModKey(plKey avObj); @@ -95,31 +95,31 @@ public: // setters void SetSender(plKey &sender); void AddRecvr(plKey &recvr); - virtual void SetNetForce(hsBool state); + virtual void SetNetForce(bool state) { fNetForce = state; } // oneShot Avatar (must already be there) - virtual void OneShot(pyKey &seekKey, float duration, hsBool usePhysics, - const plString &animName, hsBool drivable, hsBool reversible); + virtual void OneShot(pyKey &seekKey, float duration, bool usePhysics, + const plString &animName, bool drivable, bool reversible); // oneShot Avatar - virtual void RunBehavior(pyKey &behKey, hsBool netForce, hsBool netProp); - virtual void RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, hsBool netForce, hsBool netProp); + virtual void RunBehavior(pyKey &behKey, bool netForce, bool netProp); + virtual void RunBehaviorAndReply(pyKey& behKey, pyKey& replyKey, bool netForce, bool netProp); // for the multistage behaviors - virtual void NextStage(pyKey &behKey, float transTime, hsBool setTime, float newTime, - hsBool setDirection, bool isForward, hsBool netForce); - virtual void PreviousStage(pyKey &behKey, float transTime, hsBool setTime, float newTime, - hsBool setDirection, bool isForward, hsBool netForce); - virtual void GoToStage(pyKey &behKey, int32_t stage, float transTime, hsBool setTime, float newTime, - hsBool setDirection, bool isForward, hsBool netForce); + virtual void NextStage(pyKey &behKey, float transTime, bool setTime, float newTime, + bool setDirection, bool isForward, bool netForce); + virtual void PreviousStage(pyKey &behKey, float transTime, bool setTime, float newTime, + bool setDirection, bool isForward, bool netForce); + virtual void GoToStage(pyKey &behKey, int32_t stage, float transTime, bool setTime, float newTime, + bool setDirection, bool isForward, bool netForce); // static behavior functions: - static void SetLoopCount(pyKey &behKey, int32_t stage, int32_t loopCount, hsBool netForce); + static void SetLoopCount(pyKey &behKey, int32_t stage, int32_t loopCount, bool netForce); virtual void SetSenderKey(pyKey &pKey); // seek Avatar (must already be there) - //virtual void Seek(pyKey &seekKey, float duration, hsBool usePhysics); + //virtual void Seek(pyKey &seekKey, float duration, bool usePhysics); ///////////////////////////////////////////////////////////////////////////// // @@ -214,7 +214,7 @@ public: // PURPOSE : Wear a particular piece of clothing based on name of clothing item // : returns 0, if clothing item was not found // - virtual hsBool WearClothingItem(const char* clothing_name); + virtual bool WearClothingItem(const char* clothing_name); ///////////////////////////////////////////////////////////////////////////// // @@ -224,7 +224,7 @@ public: // PURPOSE : Remove (take off) a particular piece of clothing based on name of clothing item // : returns 0, if clothing item was not found // - virtual hsBool RemoveClothingItem(const char* clothing_name); + virtual bool RemoveClothingItem(const char* clothing_name); ///////////////////////////////////////////////////////////////////////////// // @@ -233,7 +233,7 @@ public: // // PURPOSE : Tint a clothing item, i.e. change the color of it // - virtual hsBool TintClothingItem(const char* clothing_name, pyColor& tint); + virtual bool TintClothingItem(const char* clothing_name, pyColor& tint); ///////////////////////////////////////////////////////////////////////////// // @@ -244,7 +244,7 @@ public: // // PURPOSE : Tint a clothing item, i.e. change the color of it // - virtual hsBool TintClothingItemLayer(const char* clothing_name, pyColor& tint, uint8_t layer); + virtual bool TintClothingItemLayer(const char* clothing_name, pyColor& tint, uint8_t layer); ///////////////////////////////////////////////////////////////////////////// // @@ -254,7 +254,7 @@ public: // PURPOSE : Wear a particular piece of clothing based on name of clothing item // : returns 0, if clothing item was not found // - virtual hsBool WearClothingItemU(const char* clothing_name, hsBool update); + virtual bool WearClothingItemU(const char* clothing_name, bool update); ///////////////////////////////////////////////////////////////////////////// // @@ -264,7 +264,7 @@ public: // PURPOSE : Remove (take off) a particular piece of clothing based on name of clothing item // : returns 0, if clothing item was not found // - virtual hsBool RemoveClothingItemU(const char* clothing_name, hsBool update); + virtual bool RemoveClothingItemU(const char* clothing_name, bool update); ///////////////////////////////////////////////////////////////////////////// // @@ -273,7 +273,7 @@ public: // // PURPOSE : Tint a clothing item, i.e. change the color of it // - virtual hsBool TintClothingItemU(const char* clothing_name, pyColor& tint, hsBool update); + virtual bool TintClothingItemU(const char* clothing_name, pyColor& tint, bool update); ///////////////////////////////////////////////////////////////////////////// // @@ -284,7 +284,7 @@ public: // // PURPOSE : Tint a clothing item, i.e. change the color of it // - virtual hsBool TintClothingItemLayerU(const char* clothing_name, pyColor& tint, uint8_t layer, hsBool update); + virtual bool TintClothingItemLayerU(const char* clothing_name, pyColor& tint, uint8_t layer, bool update); ///////////////////////////////////////////////////////////////////////////// // @@ -328,7 +328,7 @@ public: // // PURPOSE : Tint the skin of the player's avatar with optional update flag // - virtual void TintSkinU(pyColor& tint, hsBool update); + virtual void TintSkinU(pyColor& tint, bool update); ///////////////////////////////////////////////////////////////////////////// // @@ -560,7 +560,7 @@ public: // void UnRegisterForBehaviorNotify(pyKey &selfKey); - static hsBool IsCurrentBrainHuman(); + static bool IsCurrentBrainHuman(); }; diff --git a/Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp b/Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp index 2df57fe9..ce8e9360 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyCamera.cpp @@ -144,7 +144,7 @@ void cyCamera::Pop(pyKey& oldCamKey) // // PURPOSE : Send controlKey commands to the virtual camera (should be like a pass thru) // -void cyCamera::ControlKey(int32_t controlKey, hsBool activated) +void cyCamera::ControlKey(int32_t controlKey, bool activated) { // make sure that we have a virtual camera to send this to if ( fTheCam ) @@ -174,7 +174,7 @@ void cyCamera::ControlKey(int32_t controlKey, hsBool activated) // // PURPOSE : Transition to a new camera (position and settings) // -void cyCamera::TransitionTo(pyKey& newCamKey, double time, hsBool save) +void cyCamera::TransitionTo(pyKey& newCamKey, double time, bool save) { // create message plCameraMsg* pMsg = new plCameraMsg; @@ -198,7 +198,7 @@ void cyCamera::TransitionTo(pyKey& newCamKey, double time, hsBool save) } } -void cyCamera::SetEnableFirstPersonOverride(hsBool state) +void cyCamera::SetEnableFirstPersonOverride(bool state) const { // must have a receiver! if ( fTheCam ) @@ -275,7 +275,7 @@ void cyCamera::SetFOV(float fov, double t) } -void cyCamera::SetSmootherCam(hsBool state) +void cyCamera::SetSmootherCam(bool state) { if ( fTheCam ) { @@ -298,7 +298,7 @@ void cyCamera::SetSmootherCam(hsBool state) } } -hsBool cyCamera::IsSmootherCam() +bool cyCamera::IsSmootherCam() { if ( fTheCam ) { @@ -315,7 +315,7 @@ hsBool cyCamera::IsSmootherCam() return false; } -void cyCamera::SetWalkAndVerticalPan(hsBool state) +void cyCamera::SetWalkAndVerticalPan(bool state) { if ( fTheCam ) { @@ -332,7 +332,7 @@ void cyCamera::SetWalkAndVerticalPan(hsBool state) } -hsBool cyCamera::IsWalkAndVerticalPan() +bool cyCamera::IsWalkAndVerticalPan() { if ( fTheCam ) { @@ -346,7 +346,7 @@ hsBool cyCamera::IsWalkAndVerticalPan() } -void cyCamera::SetStayInFirstPerson(hsBool state) +void cyCamera::SetStayInFirstPerson(bool state) { if ( fTheCam ) { @@ -361,7 +361,7 @@ void cyCamera::SetStayInFirstPerson(hsBool state) } } -hsBool cyCamera::IsStayInFirstPerson() +bool cyCamera::IsStayInFirstPerson() { if ( fTheCam ) { @@ -373,18 +373,3 @@ hsBool cyCamera::IsStayInFirstPerson() } return false; } - -void cyCamera::SetAspectRatio(float aspectratio) -{ - plVirtualCam1::SetAspectRatio(aspectratio); -} - -float cyCamera::GetAspectRatio() -{ - return plVirtualCam1::GetAspectRatio(); -} - -void cyCamera::RefreshFOV() -{ - plVirtualCam1::SetFOV(plVirtualCam1::GetFOVw(), plVirtualCam1::GetFOVh()); -} diff --git a/Sources/Plasma/FeatureLib/pfPython/cyCamera.h b/Sources/Plasma/FeatureLib/pfPython/cyCamera.h index f8098824..f9bf2067 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyCamera.h +++ b/Sources/Plasma/FeatureLib/pfPython/cyCamera.h @@ -52,6 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "pyGlueHelpers.h" #include "pnKeyedObject/plKey.h" +#include "pfCamera/plVirtualCamNeu.h" class cyCamera { @@ -80,7 +81,7 @@ public: virtual void Pop(pyKey& oldCamKey); // Send controlKey commands to the virtual camera (should be like a pass thru) - virtual void ControlKey(int32_t controlKey, hsBool activated); + virtual void ControlKey(int32_t controlKey, bool activated); ///////////////////////////////////////////////////////////////////////////// @@ -91,29 +92,29 @@ public: // // PURPOSE : Transition to a new camera (position and settings) // - virtual void TransitionTo(pyKey& newCamKey, double time, hsBool save); + virtual void TransitionTo(pyKey& newCamKey, double time, bool save); - virtual void SetEnableFirstPersonOverride(hsBool state); - virtual void EnableFirstPersonOverride() { SetEnableFirstPersonOverride(true); } - virtual void DisableFirstPersonOverride() { SetEnableFirstPersonOverride(false); } + virtual void SetEnableFirstPersonOverride(bool state) const; + virtual void EnableFirstPersonOverride() const { SetEnableFirstPersonOverride(true); } + virtual void DisableFirstPersonOverride() const { SetEnableFirstPersonOverride(false); } virtual void UndoFirstPerson(); virtual float GetFOV(); virtual void SetFOV(float fov, double t); - virtual void SetSmootherCam(hsBool state); - virtual hsBool IsSmootherCam(); + virtual void SetSmootherCam(bool state); + virtual bool IsSmootherCam(); - virtual void SetWalkAndVerticalPan(hsBool state); - virtual hsBool IsWalkAndVerticalPan(); + virtual void SetWalkAndVerticalPan(bool state); + virtual bool IsWalkAndVerticalPan(); - virtual void SetStayInFirstPerson(hsBool state); - virtual hsBool IsStayInFirstPerson(); + virtual void SetStayInFirstPerson(bool state); + virtual bool IsStayInFirstPerson(); - virtual void SetAspectRatio(float aspectratio); - virtual float GetAspectRatio(); - virtual void RefreshFOV(); + virtual void SetAspectRatio(float aspectratio) { plVirtualCam1::SetAspectRatio(aspectratio); } + virtual float GetAspectRatio() const { return plVirtualCam1::GetAspectRatio(); } + virtual void RefreshFOV() { plVirtualCam1::SetFOV(plVirtualCam1::GetFOVw(), plVirtualCam1::GetFOVh()); } }; diff --git a/Sources/Plasma/FeatureLib/pfPython/cyDraw.cpp b/Sources/Plasma/FeatureLib/pfPython/cyDraw.cpp index 9af722ff..457d08ca 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyDraw.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyDraw.cpp @@ -66,15 +66,7 @@ void cyDraw::AddRecvr(plKey &recvr) fRecvr.Append(recvr); } - -void cyDraw::SetNetForce(hsBool state) -{ - // set our flag - fNetForce = state; -} - - -void cyDraw::EnableT(hsBool state) +void cyDraw::EnableT(bool state) { // must have a receiver! if ( fRecvr.Count() > 0 ) @@ -82,7 +74,7 @@ void cyDraw::EnableT(hsBool state) // create message plEnableMsg* pMsg = new plEnableMsg; // check if this needs to be network forced to all clients - if (fNetForce ) + if (fNetForce) { // set the network propagate flag to make sure it gets to the other clients pMsg->SetBCastFlag(plMessage::kNetPropagate); @@ -111,13 +103,3 @@ void cyDraw::EnableT(hsBool state) plgDispatch::MsgSend( pMsg ); // whoosh... off it goes } } - -void cyDraw::Enable() -{ - EnableT(true); -} - -void cyDraw::Disable() -{ - EnableT(false); -} diff --git a/Sources/Plasma/FeatureLib/pfPython/cyDraw.h b/Sources/Plasma/FeatureLib/pfPython/cyDraw.h index 0dca4ddc..5d68266f 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyDraw.h +++ b/Sources/Plasma/FeatureLib/pfPython/cyDraw.h @@ -59,7 +59,7 @@ class cyDraw protected: plKey fSender; hsTArray fRecvr; - hsBool fNetForce; + bool fNetForce; cyDraw(plKey sender=nil,const plKey recvr=nil); public: @@ -74,12 +74,12 @@ public: // setters void SetSender(plKey &sender); void AddRecvr(plKey &recvr); - virtual void SetNetForce(hsBool state); + void SetNetForce(bool state) { fNetForce = state; } // Enable draw - virtual void EnableT(hsBool state); - virtual void Enable(); - virtual void Disable(); + virtual void EnableT(bool state); + virtual void Enable() { EnableT(true); } + virtual void Disable() { EnableT(false); } }; #endif // cyDraw_h diff --git a/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp b/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp index 76484250..0232385a 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp @@ -170,7 +170,7 @@ void cyMisc::Console(const char* command) } } -void cyMisc::ConsoleNet(const char* command, hsBool netForce) +void cyMisc::ConsoleNet(const char* command, bool netForce) { if ( command != nil ) { @@ -441,7 +441,7 @@ void cyMisc::DisableControlKeyEvents(pyKey &selfkey) // PURPOSE : Return the net client (account) name of the player whose avatar // key is provided. // -hsBool cyMisc::WasLocallyNotified(pyKey &selfkey) +bool cyMisc::WasLocallyNotified(pyKey &selfkey) { return selfkey.WasLocalNotify(); } @@ -529,7 +529,7 @@ int cyMisc::GetLocalClientID() return (plNetClientMgr::GetInstance()->GetPlayerID()); } -hsBool cyMisc::ValidateKey(pyKey& key) +bool cyMisc::ValidateKey(pyKey& key) { plKey pKey = key.getKey(); @@ -844,7 +844,7 @@ void cyMisc::UnloadDialog(const char* name) // // PURPOSE : Test to see if a dialog is loaded (according to the dialog manager) // -hsBool cyMisc::IsDialogLoaded(const char* name) +bool cyMisc::IsDialogLoaded(const char* name) { pfGameGUIMgr *mgr = pfGameGUIMgr::GetInstance(); if ( mgr ) @@ -1297,7 +1297,7 @@ void cyMisc::YesNoDialog(pyKey& sender, std::wstring thestring) // // RETURNS : nothing // -void cyMisc::RateIt(const char* chronicleName, const char* thestring, hsBool onceFlag) +void cyMisc::RateIt(const char* chronicleName, const char* thestring, bool onceFlag) { // create the mesage to send pfKIMsg *msg = new pfKIMsg( pfKIMsg::kRateIt ); @@ -1580,7 +1580,7 @@ void cyMisc::DisableAvatarCursorFade() } } -void cyMisc::FadeLocalPlayer(hsBool fade) +void cyMisc::FadeLocalPlayer(bool fade) { plNetClientMgr* nmgr = plNetClientMgr::GetInstance(); if (nmgr) @@ -1664,7 +1664,7 @@ void cyMisc::NotifyOffererPublicLinkAccepted(uint32_t offerer) pMsg->Send(); } -void cyMisc::ToggleAvatarClickability(hsBool on) +void cyMisc::ToggleAvatarClickability(bool on) { plInputIfaceMgrMsg* pMsg = 0; if (on) @@ -1704,7 +1704,7 @@ void cyMisc::SetShareAgeInstanceGuid(const Uuid& guid) // // PURPOSE : Returns current status of CCR dept // -hsBool cyMisc::IsCCRAwayStatus() +bool cyMisc::IsCCRAwayStatus() { return !VaultGetCCRStatus(); } @@ -1716,7 +1716,7 @@ hsBool cyMisc::IsCCRAwayStatus() // // PURPOSE : Returns true if local player is a CCR // -hsBool cyMisc::AmCCR() +bool cyMisc::AmCCR() { if ( plNetClientApp::GetInstance() ) return plNetClientApp::GetInstance()->AmCCR(); @@ -1972,7 +1972,7 @@ void cyMisc::SetLightColorValue(pyKey& light, const plString& lightName, float r } #include "pnMessage/plEnableMsg.h" -void cyMisc::SetLightAnimationOn(pyKey& light, const plString& lightName, hsBool start) +void cyMisc::SetLightAnimationOn(pyKey& light, const plString& lightName, bool start) { // lightName is the name of the light object attached to the light that we want to talk to // for the bug lights, this would be "RTOmni-BugLightTest" @@ -2045,7 +2045,7 @@ void cyMisc::SetLightAnimationOn(pyKey& light, const plString& lightName, hsBool // // PURPOSE : let you get control event messages at will (for pseudo-GUI's like the psnl bookshelf or clft imager) -void cyMisc::RegisterForControlEventMessages(hsBool on, pyKey& k) +void cyMisc::RegisterForControlEventMessages(bool on, pyKey& k) { plCmdIfaceModMsg* pMsg = new plCmdIfaceModMsg; pMsg->SetSender(k.getKey()); @@ -2549,7 +2549,7 @@ void cyMisc::FadeOut(float lenTime, bool holdFlag, bool noSound) plgDispatch::MsgSend( msg ); } -void cyMisc::SetClickability(hsBool b) +void cyMisc::SetClickability(bool b) { plInputIfaceMgrMsg* msg = new plInputIfaceMgrMsg(b ? plInputIfaceMgrMsg::kEnableClickables : plInputIfaceMgrMsg::kDisableClickables ); plgDispatch::MsgSend(msg); @@ -2619,7 +2619,7 @@ void cyMisc::StartScreenCaptureWH(pyKey& selfkey, uint16_t width, uint16_t heigh #include "plAvatar/plAvatarClothing.h" -void cyMisc::WearMaintainerSuit(pyKey& key, hsBool wear) +void cyMisc::WearMaintainerSuit(pyKey& key, bool wear) { // run on all machines, but only affects us if we call it on our local guy (who props it to others himself) if (key.getKey() != plNetClientMgr::GetInstance()->GetLocalPlayerKey()) @@ -2761,7 +2761,7 @@ PipelineParams *cyMisc::GetDefaultDisplayParams() return fPipeline->GetDefaultParams(); } -void cyMisc::SetGraphicsOptions(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool VSync) +void cyMisc::SetGraphicsOptions(int Width, int Height, int ColorDepth, bool Windowed, int NumAASamples, int MaxAnisotropicSamples, bool VSync) { // This has to send a message to plClient because python is loaded in the max plugins @@ -2813,7 +2813,7 @@ std::wstring cyMisc::GetInitPath() return path; } -void cyMisc::SetBehaviorNetFlags(pyKey & behKey, hsBool netForce, hsBool netProp) +void cyMisc::SetBehaviorNetFlags(pyKey & behKey, bool netForce, bool netProp) { if (plMultistageBehMod * behMod = plMultistageBehMod::ConvertNoRef(behKey.getKey()->ObjectIsLoaded())) { diff --git a/Sources/Plasma/FeatureLib/pfPython/cyMisc.h b/Sources/Plasma/FeatureLib/pfPython/cyMisc.h index e7b388b4..507e27eb 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyMisc.h +++ b/Sources/Plasma/FeatureLib/pfPython/cyMisc.h @@ -133,7 +133,7 @@ public: // optionally propagate over the net // static void Console(const char* command); - static void ConsoleNet(const char* command, hsBool netForce); + static void ConsoleNet(const char* command, bool netForce); ///////////////////////////////////////////////////////////////////////////// // @@ -244,7 +244,7 @@ public: // PURPOSE : Return the net client (account) name of the player whose avatar // key is provided. // - static hsBool WasLocallyNotified(pyKey &selfkey); + static bool WasLocallyNotified(pyKey &selfkey); ///////////////////////////////////////////////////////////////////////////// // @@ -268,7 +268,7 @@ public: static PyObject* GetAvatarKeyFromClientID(int clientID); // returns pyKey static int GetLocalClientID(); static int GetClientIDFromAvatarKey(pyKey& avatar); - static hsBool ValidateKey(pyKey& key); + static bool ValidateKey(pyKey& key); @@ -378,7 +378,7 @@ public: // // PURPOSE : Test to see if a dialog is loaded (according to the dialog manager) // - static hsBool IsDialogLoaded(const char* name); + static bool IsDialogLoaded(const char* name); ///////////////////////////////////////////////////////////////////////////// // @@ -515,7 +515,7 @@ public: // // RETURNS : nothing // - static void RateIt(const char* chronicleName, const char* thestring, hsBool onceFlag); + static void RateIt(const char* chronicleName, const char* thestring, bool onceFlag); ///////////////////////////////////////////////////////////////////////////// // @@ -616,7 +616,7 @@ public: // static void EnableAvatarCursorFade(); static void DisableAvatarCursorFade(); - static void FadeLocalPlayer(hsBool fade); + static void FadeLocalPlayer(bool fade); ///////////////////////////////////////////////////////////////////////////// @@ -631,7 +631,7 @@ public: static void NotifyOffererPublicLinkAccepted(uint32_t offerer); static void NotifyOffererPublicLinkRejected(uint32_t offerer); static void NotifyOffererPublicLinkCompleted(uint32_t offerer); - static void ToggleAvatarClickability(hsBool on); + static void ToggleAvatarClickability(bool on); static void SetShareSpawnPoint(const char* spawnPoint); static void SetShareAgeInstanceGuid(const Uuid& guid); @@ -642,7 +642,7 @@ public: // // PURPOSE : Returns current status of CCR dept // - static hsBool IsCCRAwayStatus(); + static bool IsCCRAwayStatus(); ////////////////////////////////////////////////////////////////////////////// // @@ -651,7 +651,7 @@ public: // // PURPOSE : Returns true if local player is a CCR // - static hsBool AmCCR(); + static bool AmCCR(); ////////////////////////////////////////////////////////////////////////////// // @@ -709,7 +709,7 @@ public: static void KillParticles(float time, float pct, pyKey& particles); static int GetNumParticles(pyKey& host); static void SetLightColorValue(pyKey& light, const plString& lightName, float r, float g, float b, float a); - static void SetLightAnimationOn(pyKey& light, const plString& lightName, hsBool start); + static void SetLightAnimationOn(pyKey& light, const plString& lightName, bool start); ////////////////////////////////////////////////////////////////////////////// // // Function : RegisterForControlEventMessages @@ -717,7 +717,7 @@ public: // // PURPOSE : let you get control event messages at will (for pseudo-GUI's like the psnl bookshelf or clft imager) - static void RegisterForControlEventMessages(hsBool on, pyKey& k); + static void RegisterForControlEventMessages(bool on, pyKey& k); ////////////////////////////////////////////////////////////////////////////// // @@ -831,7 +831,7 @@ public: // // PURPOSE : globally enable or disable ALL clickables on this local client // - static void SetClickability(hsBool b); + static void SetClickability(bool b); ////////////////////////////////////////////////////////////////////////////// @@ -876,7 +876,7 @@ public: // // PURPOSE : puts the maintainer suit on or off the avatar // - static void WearMaintainerSuit(pyKey& key, hsBool wear); + static void WearMaintainerSuit(pyKey& key, bool wear); static void WearDefaultClothing(pyKey& key); static void WearDefaultClothingType(pyKey& key, uint32_t type); @@ -922,7 +922,7 @@ public: static std::wstring GetLocalizedString(std::wstring name, const std::vector & arguments); static void EnablePlanarReflections(bool enable = true); - static void SetGraphicsOptions(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool VSync); + static void SetGraphicsOptions(int Width, int Height, int ColorDepth, bool Windowed, int NumAASamples, int MaxAnisotropicSamples, bool VSync); static void GetSupportedDisplayModes(std::vector *res); static int GetDesktopWidth(); static int GetDesktopHeight(); @@ -937,7 +937,7 @@ public: static std::wstring GetUserPath(); static std::wstring GetInitPath(); - static void SetBehaviorNetFlags(pyKey & behKey, hsBool netForce, hsBool netProp); + static void SetBehaviorNetFlags(pyKey & behKey, bool netForce, bool netProp); static void SendFriendInvite(const wchar_t email[], const wchar_t toName[]); static PyObject* PyGuidGenerate(); static PyObject* GetAIAvatarsByModelName(const char* name); diff --git a/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.cpp b/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.cpp index e115cc34..25808519 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.cpp @@ -66,12 +66,6 @@ void cyParticleSys::AddRecvr(plKey &recvr) fRecvr.Append(recvr); } -void cyParticleSys::SetNetForce(hsBool state) -{ - // set our flag - fNetForce = state; -} - ///////////////////////////////////////////////////////////////////////////// // // Function : ISendParticleSysMsg diff --git a/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.h b/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.h index 8ef1c71f..0d865cfa 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.h +++ b/Sources/Plasma/FeatureLib/pfPython/cyParticleSys.h @@ -58,7 +58,7 @@ class cyParticleSys protected: plKey fSender; hsTArray fRecvr; - hsBool fNetForce; + bool fNetForce; void ISendParticleSysMsg(uint32_t param, float value); @@ -76,7 +76,7 @@ public: // setters void SetSender(plKey &sender); void AddRecvr(plKey &recvr); - void SetNetForce(hsBool state); + void SetNetForce(bool state) { fNetForce = state; } void SetParticlesPerSecond(float value); void SetInitPitchRange(float value); @@ -90,7 +90,6 @@ public: void SetGenLife(float value); void SetPartLifeMin(float value); void SetPartLifeMax(float value); - }; diff --git a/Sources/Plasma/FeatureLib/pfPython/cyPhysics.cpp b/Sources/Plasma/FeatureLib/pfPython/cyPhysics.cpp index 3790570c..542209be 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyPhysics.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyPhysics.cpp @@ -80,12 +80,6 @@ void cyPhysics::AddRecvr(plKey &recvr) fRecvr.Append(recvr); } -void cyPhysics::SetNetForce(hsBool state) -{ - // set our flag - fNetForce = state; -} - ///////////////////////////////////////////////////////////////////////////// // // Function : Enable @@ -93,7 +87,7 @@ void cyPhysics::SetNetForce(hsBool state) // // PURPOSE : Enable physics (must already be there) // -void cyPhysics::EnableT(hsBool state) +void cyPhysics::EnableT(bool state) { // must have a receiver! if ( fRecvr.Count() > 0 ) @@ -128,15 +122,6 @@ void cyPhysics::EnableT(hsBool state) plgDispatch::MsgSend( pMsg ); // whoosh... off it goes } } -void cyPhysics::Enable() -{ - EnableT(true); -} - -void cyPhysics::Disable() -{ - EnableT(false); -} ///////////////////////////////////////////////////////////////////////////// // diff --git a/Sources/Plasma/FeatureLib/pfPython/cyPhysics.h b/Sources/Plasma/FeatureLib/pfPython/cyPhysics.h index 6a511779..934a7563 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyPhysics.h +++ b/Sources/Plasma/FeatureLib/pfPython/cyPhysics.h @@ -62,7 +62,7 @@ class cyPhysics protected: plKey fSender; hsTArray fRecvr; - hsBool fNetForce; + bool fNetForce; cyPhysics(plKey sender=nil,plKey recvr=nil); @@ -79,12 +79,12 @@ public: void SetSender(plKey &sender); void AddRecvr(plKey &recvr); - virtual void SetNetForce(hsBool state); + virtual void SetNetForce(bool state) { fNetForce = state; } // Enable physics (must already be there) - virtual void EnableT(hsBool state); - virtual void Enable(); - virtual void Disable(); + virtual void EnableT(bool state); + virtual void Enable() { EnableT(true); } + virtual void Disable() { EnableT(false); } virtual void EnableCollision(); virtual void DisableCollision(); diff --git a/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp b/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp index 1aba52bf..32b05661 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp @@ -178,8 +178,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "Games/VarSync/pyVarSyncGame.h" int32_t PythonInterface::initialized = 0; // only need to initialize all of Python once -hsBool PythonInterface::FirstTimeInit = true; // start with "this is the first time" -hsBool PythonInterface::IsInShutdown = false; // whether we are _really_ in shutdown mode +bool PythonInterface::FirstTimeInit = true; // start with "this is the first time" +bool PythonInterface::IsInShutdown = false; // whether we are _really_ in shutdown mode PyMethodDef* PythonInterface::plasmaMethods = nil; // the Plasma module's methods PyObject* PythonInterface::plasmaMod = nil; // pointer to the Plasma module @@ -192,7 +192,7 @@ PyObject* PythonInterface::plasmaGameConstantsMod = nil; // python object that h PyObject* PythonInterface::stdOut = nil; // python object of the stdout file PyObject* PythonInterface::stdErr = nil; // python object of the err file -hsBool PythonInterface::debug_initialized = false; // has the debug been initialized yet? +bool PythonInterface::debug_initialized = false; // has the debug been initialized yet? PyObject* PythonInterface::dbgMod = nil; // display module for stdout and stderr PyObject* PythonInterface::dbgOut = nil; PyObject* PythonInterface::dbgSlice = nil; // time slice function for the debug window @@ -1961,7 +1961,7 @@ PyObject* PythonInterface::FindModule(const char* module) // // Returns : True if unique , otherwise returns False // -hsBool PythonInterface::IsModuleNameUnique(char* module) +bool PythonInterface::IsModuleNameUnique(char* module) { PyObject *m; // first we must get rid of any old modules of the same name, we'll replace it @@ -2130,7 +2130,7 @@ PyObject* PythonInterface::CompileString(char *command, char* filename) // // 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 @@ -2180,7 +2180,7 @@ PyObject* PythonInterface::LoadObject(char* pickle, int32_t size) // // RETURNS : pointer to PyObject that is the result of the command // -hsBool PythonInterface::RunStringInteractive(char *command, PyObject* module) +bool PythonInterface::RunStringInteractive(char *command, PyObject* module) { PyObject *d, *v; // make sure that we're given a good module... or at least one with an address @@ -2216,7 +2216,7 @@ hsBool PythonInterface::RunStringInteractive(char *command, PyObject* module) // // PURPOSE : run a python string in a specific module name // -hsBool PythonInterface::RunString(char *command, PyObject* module) +bool PythonInterface::RunString(char *command, PyObject* module) { PyObject *d, *v; // make sure that we're given a good module... or at least one with an address @@ -2252,7 +2252,7 @@ hsBool PythonInterface::RunString(char *command, PyObject* 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 diff --git a/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.h b/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.h index 16defbd2..3d7eaa72 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.h +++ b/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.h @@ -63,8 +63,8 @@ class PythonInterface private: static int32_t initialized; // count how many times we initialize // and make sure that many finalize on the way out - static hsBool FirstTimeInit; - static hsBool IsInShutdown; // whether we are _really_ in shutdown mode + static bool FirstTimeInit; + static bool IsInShutdown; // whether we are _really_ in shutdown mode static PyMethodDef* plasmaMethods; static PyObject* plasmaMod; // python object that holds the Plasma module @@ -77,7 +77,7 @@ private: static PyObject* stdOut; // python object of the stdout file static PyObject* stdErr; // python object of the err file - static hsBool debug_initialized; // has the debug been initialized yet? + static bool debug_initialized; // has the debug been initialized yet? static PyObject* dbgMod; // display module for stdout and stderr static PyObject* dbgOut; static PyObject* dbgSlice; // time slice function for the debug window @@ -150,7 +150,7 @@ public: static PyObject* GetPlasmaItem(char* item); // Determine if the module name is unique - static hsBool IsModuleNameUnique(char* module); + static bool IsModuleNameUnique(char* module); // get an item (probably a function) from a specific module static PyObject* GetModuleItem(char* item, PyObject* module); @@ -174,7 +174,7 @@ public: // // PURPOSE : marshals an object into a char string // - static hsBool DumpObject(PyObject* pyobj, char** pickle, int32_t* size); + static bool DumpObject(PyObject* pyobj, char** pickle, int32_t* size); ///////////////////////////////////////////////////////////////////////////// // @@ -196,7 +196,7 @@ public: // PURPOSE : run a python string in a specific module name // : Interactive mode (displays results) // - static hsBool RunStringInteractive(char *command, PyObject* module); + static bool RunStringInteractive(char *command, PyObject* module); ///////////////////////////////////////////////////////////////////////////// @@ -207,7 +207,7 @@ public: // // PURPOSE : run a python string in a specific module name // - static hsBool RunString(char *command, PyObject* module); + static bool RunString(char *command, PyObject* module); ///////////////////////////////////////////////////////////////////////////// @@ -218,7 +218,7 @@ public: // // PURPOSE : run a compiled python code in a specific module name // - static hsBool RunPYC(PyObject* code, PyObject* module); + static bool RunPYC(PyObject* code, PyObject* module); ///////////////////////////////////////////////////////////////////////////// // diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp b/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp index cf299dd0..fb3ee21d 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp @@ -325,7 +325,7 @@ class pfPythonKeyCatcher : public plDefaultKeyCatcher } }; -hsBool plPythonFileMod::fAtConvertTime = false; +bool plPythonFileMod::fAtConvertTime = false; ///////////////////////////////////////////////////////////////////////////// // @@ -441,7 +441,7 @@ bool plPythonFileMod::ILoadPythonCode() char pathandfile[256]; sprintf(pathandfile, ".\\python\\%s.py",fPythonFile); wchar_t *wPathandfile = hsStringToWString(pathandfile); - hsBool exists = PathDoesFileExist(wPathandfile); + bool exists = PathDoesFileExist(wPathandfile); delete [] wPathandfile; if (exists) { @@ -1163,7 +1163,7 @@ void plPythonFileMod::IFindActivatorAndAdd(const plString &activatorName, int32_ // Tasks: // - Call the Python code's Update function (if there) // -hsBool plPythonFileMod::IEval(double secs, float del, uint32_t dirty) +bool plPythonFileMod::IEval(double secs, float del, uint32_t dirty) { if ( fModule ) { @@ -1231,7 +1231,7 @@ hsBool plPythonFileMod::IEval(double secs, float del, uint32_t dirty) // // PURPOSE : Handle all the different types of messages that we recv // -hsBool plPythonFileMod::MsgReceive(plMessage* msg) +bool plPythonFileMod::MsgReceive(plMessage* msg) { // is it a ref message plGenRefMsg* genRefMsg = plGenRefMsg::ConvertNoRef(msg); diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h b/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h index 4f05bf97..57fed231 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h @@ -69,7 +69,7 @@ protected: plPythonSDLModifier* fSDLMod; - hsBool IEval(double secs, float del, uint32_t dirty); + bool IEval(double secs, float del, uint32_t dirty); plString IMakeModuleName(plSceneObject* sobj); @@ -88,12 +88,12 @@ protected: // internal data PyObject* fModule; // python module object PyObject* fInstance; // python object that the instance of the class to run - static hsBool fAtConvertTime; // flag for when in convert time within Max, don't run code - hsBool fLocalNotify; // True when This Mod was Notified by a local plNotify - hsBool fIsFirstTimeEval; // flag to determine when the first time at the eval, + static bool fAtConvertTime; // flag for when in convert time within Max, don't run code + bool fLocalNotify; // True when This Mod was Notified by a local plNotify + bool fIsFirstTimeEval; // flag to determine when the first time at the eval, // so the Python coders can hava a chance to run initialization // code after the system is up, but before things are displayed - hsBool fAmIAttachedToClone; // is this python file mod attached to a cloned object + bool fAmIAttachedToClone; // is this python file mod attached to a cloned object // callback class for the KI PythonVaultCallback *fVaultCallback; @@ -129,14 +129,14 @@ public: GETINTERFACE_ANY( plPythonFileMod, plMultiModifier ); plPythonSDLModifier* GetSDLMod() { return fSDLMod; } - hsBool WasLocalNotify() { return fLocalNotify; } + bool WasLocalNotify() { return fLocalNotify; } plPipeline* GetPipeline() { return fPipe; } virtual void SetSourceFile(const char* filename); virtual int getPythonOutput(std::string* line); virtual void ReportError(); virtual void DisplayPythonOutput(); static void SetAtConvertTime() { fAtConvertTime=true; } - virtual hsBool AmIAttachedToClone() { return fAmIAttachedToClone; } + virtual bool AmIAttachedToClone() { return fAmIAttachedToClone; } virtual void AddToNotifyList(plKey pKey) { fReceivers.Append(pKey); } virtual int32_t NotifyListCount() { return fReceivers.Count(); } @@ -152,7 +152,7 @@ public: virtual void EnableControlKeyEvents(); virtual void DisableControlKeyEvents(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp b/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp index 4a3ff88d..b23d3483 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp @@ -86,7 +86,7 @@ public: void Close(); PyObject* OpenPacked(const char *fileName); - hsBool IsPackedFile(const char* fileName); + bool IsPackedFile(const char* fileName); }; PyObject* PythonPack::OpenPythonPacked(const char* fileName) @@ -94,7 +94,7 @@ PyObject* PythonPack::OpenPythonPacked(const char* fileName) return plPythonPack::Instance().OpenPacked(fileName); } -hsBool PythonPack::IsItPythonPacked(const char* fileName) +bool PythonPack::IsItPythonPacked(const char* fileName) { return plPythonPack::Instance().IsPackedFile(fileName); } @@ -234,7 +234,7 @@ PyObject* plPythonPack::OpenPacked(const char* fileName) return nil; } -hsBool plPythonPack::IsPackedFile(const char* fileName) +bool plPythonPack::IsPackedFile(const char* fileName) { if (!Open()) return nil; diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonPack.h b/Sources/Plasma/FeatureLib/pfPython/plPythonPack.h index ec67a4b0..d671f281 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonPack.h +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonPack.h @@ -47,7 +47,7 @@ typedef struct _object PyObject; namespace PythonPack { PyObject* OpenPythonPacked(const char* fileName); - hsBool IsItPythonPacked(const char* fileName); + bool IsItPythonPacked(const char* fileName); } #endif // plPythonPack_h_inc diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonParameter.h b/Sources/Plasma/FeatureLib/pfPython/plPythonParameter.h index 58650f68..210c576e 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonParameter.h +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonParameter.h @@ -99,7 +99,7 @@ public: float fFloatNumber; - hsBool fBool; + bool fBool; } datarecord; @@ -229,7 +229,7 @@ public: fValueType = kFloat; datarecord.fFloatNumber = number; } - void SetTobool(hsBool state) + void SetTobool(bool state) { SetToNone(); fValueType = kbool; @@ -241,7 +241,7 @@ public: fValueType = kString; fString = string; } - void SetToSceneObject(plKey key, hsBool list=false) + void SetToSceneObject(plKey key, bool list=false) { SetToNone(); if (list) diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonSDLModifier.cpp b/Sources/Plasma/FeatureLib/pfPython/plPythonSDLModifier.cpp index fcd32646..8cdc337e 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonSDLModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonSDLModifier.cpp @@ -185,7 +185,7 @@ void plPythonSDLModifier::SetDefault(const char* key, PyObject* value) ISetItem(key, value); } -void plPythonSDLModifier::SetItemIdx(const char* key, int idx, PyObject* value, hsBool sendImmediate) +void plPythonSDLModifier::SetItemIdx(const char* key, int idx, PyObject* value, bool sendImmediate) { if (!value) { @@ -338,7 +338,7 @@ void plPythonSDLModifier::IPutCurrentStateIn(plStateDataRecord* dstState) } } -void plPythonSDLModifier::IDirtySynchState(const char* name, hsBool sendImmediate) +void plPythonSDLModifier::IDirtySynchState(const char* name, bool sendImmediate) { SDLMap::iterator it = fMap.find(name); if (it != fMap.end()) diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonSDLModifier.h b/Sources/Plasma/FeatureLib/pfPython/plPythonSDLModifier.h index 765e1969..6dda0765 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonSDLModifier.h +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonSDLModifier.h @@ -87,7 +87,7 @@ protected: bool IPythonVarIdxToSDL(plSimpleStateVariable* var, int varIdx, int type, PyObject* pyVar, const char* hintstring); void ISetItem(const char* key, PyObject* value); - void IDirtySynchState(const char* name, hsBool sendImmediate = false); + void IDirtySynchState(const char* name, bool sendImmediate = false); void IPutCurrentStateIn(plStateDataRecord* dstState); void ISetCurrentStateFrom(const plStateDataRecord* srcState); @@ -112,7 +112,7 @@ public: PyObject* GetItem(const char* key); void SetItem(const char* key, PyObject* value); - void SetItemIdx(const char* key, int idx, PyObject* value, hsBool sendImmediate = false); + void SetItemIdx(const char* key, int idx, PyObject* value, bool sendImmediate = false); void SetFlags(const char* name, bool sendImmediate, bool skipOwnershipCheck); void SetTagString(const char* name, const char* tag); }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp index f812553c..222f3a2d 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp @@ -194,14 +194,14 @@ void pyAudioControl::Disable() plgAudioSys::Activate(false); } -hsBool pyAudioControl::IsEnabled() +bool pyAudioControl::IsEnabled() { return plgAudioSys::Active(); } // Enable or disable load-on-demand for sounds -void pyAudioControl::SetLoadOnDemand( hsBool state ) +void pyAudioControl::SetLoadOnDemand( bool state ) { plSound::SetLoadOnDemand(state); } @@ -209,7 +209,7 @@ void pyAudioControl::SetLoadOnDemand( hsBool state ) // Enables or disables two-stage LOD, where sounds can be loaded into RAM but not into sound buffers. // ...Less of a performance hit, harder on memory. -void pyAudioControl::SetTwoStageLOD( hsBool state ) +void pyAudioControl::SetTwoStageLOD( bool state ) { // For two-stage LOD, we want to disable LoadFromDiskOnDemand, so that we'll load into RAM at startup but not // into sound buffers until demanded to do so. Enabling LoadFromDiskOnDemand basically conserves as much memory @@ -219,24 +219,24 @@ void pyAudioControl::SetTwoStageLOD( hsBool state ) // Enable audio hardware acceleration -void pyAudioControl::UseHardwareAcceleration( hsBool state ) +void pyAudioControl::UseHardwareAcceleration( bool state ) { plgAudioSys::SetUseHardware(state); } -hsBool pyAudioControl::IsHardwareAccelerated() +bool pyAudioControl::IsHardwareAccelerated() { return plgAudioSys::Hardware(); } // Enable EAX sound acceleration (requires hardware acceleration) -void pyAudioControl::UseEAXAcceleration( hsBool state ) +void pyAudioControl::UseEAXAcceleration( bool state ) { plgAudioSys::EnableEAX(state); } -hsBool pyAudioControl::IsUsingEAXAcceleration() +bool pyAudioControl::IsUsingEAXAcceleration() { return plgAudioSys::UsingEAX(); } @@ -253,12 +253,12 @@ void pyAudioControl::UnmuteAll() plgAudioSys::SetMuted(false); } -hsBool pyAudioControl::IsMuted() +bool pyAudioControl::IsMuted() { return plgAudioSys::IsMuted(); } -hsBool pyAudioControl::SupportEAX(const char *deviceName) +bool pyAudioControl::SupportEAX(const char *deviceName) { return plgAudioSys::SupportsEAX(deviceName); } @@ -268,7 +268,7 @@ hsBool pyAudioControl::SupportEAX(const char *deviceName) // Voice Settings // Sets the microphone volume, in the range of 0 to 1 -hsBool pyAudioControl::CanSetMicLevel() +bool pyAudioControl::CanSetMicLevel() { return plWinMicLevel::CanSetLevel(); } @@ -291,41 +291,41 @@ float pyAudioControl::GetMicLevel() // turn voice recording on or off -void pyAudioControl::EnableVoiceRecording( hsBool state ) +void pyAudioControl::EnableVoiceRecording( bool state ) { plVoiceRecorder::EnableRecording(state); } -hsBool pyAudioControl::IsVoiceRecordingEnabled() +bool pyAudioControl::IsVoiceRecordingEnabled() { return plVoiceRecorder::RecordingEnabled(); } // turn voice compression on and off -void pyAudioControl::EnableVoiceCompression( hsBool state ) +void pyAudioControl::EnableVoiceCompression( bool state ) { } -hsBool pyAudioControl::IsVoiceCompressionEnabled() +bool pyAudioControl::IsVoiceCompressionEnabled() { return true; } // turn voice-over-net on and off -void pyAudioControl::EnableVoiceNetBroadcast( hsBool state ) +void pyAudioControl::EnableVoiceNetBroadcast( bool state ) { //plWinRecorder::EnableNetVoice(state); } -hsBool pyAudioControl::IsVoiceNetBroadcastEnabled() +bool pyAudioControl::IsVoiceNetBroadcastEnabled() { return true; } -void pyAudioControl::EnableVoiceChat(hsBool enable) +void pyAudioControl::EnableVoiceChat(bool enable) { plVoicePlayer::Enable(enable); } @@ -344,7 +344,7 @@ void pyAudioControl::HideIcons() // turn push-to-talk on or off -void pyAudioControl::PushToTalk( hsBool state ) +void pyAudioControl::PushToTalk( bool state ) { plVoiceRecorder::EnablePushToTalk(state); } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h index 025bfd56..f04a2ead 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h @@ -85,27 +85,27 @@ public: // Switch DirectX Audio on or off at runtime virtual void Enable(); virtual void Disable(); - virtual hsBool IsEnabled(); + virtual bool IsEnabled(); // Enable or disable load-on-demand for sounds - virtual void SetLoadOnDemand( hsBool state ); + virtual void SetLoadOnDemand( bool state ); // Enables or disables two-stage LOD, where sounds can be loaded into RAM but not into sound buffers. // ...Less of a performance hit, harder on memory. - virtual void SetTwoStageLOD( hsBool state ); + virtual void SetTwoStageLOD( bool state ); // Enable audio hardware acceleration - virtual void UseHardwareAcceleration( hsBool state ); - virtual hsBool IsHardwareAccelerated(); + virtual void UseHardwareAcceleration( bool state ); + virtual bool IsHardwareAccelerated(); // Enable EAX sound acceleration (requires hardware acceleration) - virtual void UseEAXAcceleration( hsBool state ); - virtual hsBool IsUsingEAXAcceleration(); + virtual void UseEAXAcceleration( bool state ); + virtual bool IsUsingEAXAcceleration(); // Mute or unmute all sounds virtual void MuteAll(); virtual void UnmuteAll(); - virtual hsBool IsMuted(); + virtual bool IsMuted(); virtual void SetAudioSystemMode(int mode); // sets the current mode virtual int GetAudioSystemMode(); // returns the current mode @@ -121,30 +121,30 @@ public: // Voice Settings // Sets the microphone volume, in the range of 0 to 1 - virtual hsBool CanSetMicLevel(); + virtual bool CanSetMicLevel(); virtual void SetMicLevel( float level ); virtual float GetMicLevel(); // turn voice recording on or off - virtual void EnableVoiceRecording( hsBool state ); - virtual hsBool IsVoiceRecordingEnabled(); + virtual void EnableVoiceRecording( bool state ); + virtual bool IsVoiceRecordingEnabled(); // turn voice compression on and off - virtual void EnableVoiceCompression( hsBool state ); - virtual hsBool IsVoiceCompressionEnabled(); + virtual void EnableVoiceCompression( bool state ); + virtual bool IsVoiceCompressionEnabled(); // turn voice-over-net on and off - virtual void EnableVoiceNetBroadcast( hsBool state ); - virtual hsBool IsVoiceNetBroadcastEnabled(); + virtual void EnableVoiceNetBroadcast( bool state ); + virtual bool IsVoiceNetBroadcastEnabled(); - void EnableVoiceChat(hsBool enable); + void EnableVoiceChat(bool enable); // turn voice recording icons on and off virtual void ShowIcons(); virtual void HideIcons(); // turn push-to-talk on or off - virtual void PushToTalk( hsBool state ); + virtual void PushToTalk( bool state ); // Set the squelch level virtual void SquelchLevel( float level ); @@ -159,7 +159,7 @@ public: virtual void SetPriorityCutoff( uint8_t cut ); // does the device specified support EAX - virtual hsBool SupportEAX(const char *deviceName); + virtual bool SupportEAX(const char *deviceName); }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyColor.h b/Sources/Plasma/FeatureLib/pfPython/pyColor.h index debcc12f..103c8848 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyColor.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyColor.h @@ -89,11 +89,11 @@ public: void setAlpha(float alpha) { fColor.a = alpha; } // override the equals to operator - hsBool operator==(const pyColor &color) const + bool operator==(const pyColor &color) const { return ((pyColor*)this)->getColor() == ((pyColor&)color).getColor(); } - hsBool operator!=(const pyColor &color) const { return !(color == *this); } + bool operator!=(const pyColor &color) const { return !(color == *this); } // helper colors settings void White() { fColor.Set(1.0,1.0,1.0,1.0); } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.cpp b/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.cpp index 75845fe6..0dc2cb26 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.cpp @@ -106,7 +106,7 @@ void pyDrawControl::DisableShadows() plShadowCaster::DisableShadowCast(); #endif } -hsBool pyDrawControl::IsShadowsEnabled() +bool pyDrawControl::IsShadowsEnabled() { #ifndef BUILDING_PYPLASMA return !plShadowCaster::ShadowCastDisabled(); @@ -115,7 +115,7 @@ hsBool pyDrawControl::IsShadowsEnabled() #endif } -hsBool pyDrawControl::CanShadowCast() +bool pyDrawControl::CanShadowCast() { #ifndef BUILDING_PYPLASMA return plShadowCaster::CanShadowCast(); @@ -158,7 +158,7 @@ void pyDrawControl::SetMouseUninverted() #endif } -hsBool pyDrawControl::IsMouseInverted() +bool pyDrawControl::IsMouseInverted() { #ifndef BUILDING_PYPLASMA return plMouseDevice::GetInverted(); @@ -167,14 +167,14 @@ hsBool pyDrawControl::IsMouseInverted() #endif } -void pyDrawControl::SetClickToTurn(hsBool state) +void pyDrawControl::SetClickToTurn(bool state) { #ifndef BUILDING_PYPLASMA plArmatureMod::fClickToTurn = state; #endif } -hsBool pyDrawControl::IsClickToTurn() +bool pyDrawControl::IsClickToTurn() { #ifndef BUILDING_PYPLASMA if (plArmatureMod::fClickToTurn) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.h b/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.h index 61ea2b07..0eacdc95 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyDrawControl.h @@ -67,18 +67,18 @@ public: static float GetShadowVisDistance(); static void EnableShadows(); static void DisableShadows(); - static hsBool IsShadowsEnabled(); - static hsBool CanShadowCast(); + static bool IsShadowsEnabled(); + static bool CanShadowCast(); static void DisableRenderScene(); static void EnableRenderScene(); static void SetMouseInverted(); static void SetMouseUninverted(); - static hsBool IsMouseInverted(); + static bool IsMouseInverted(); - static void SetClickToTurn(hsBool state); - static hsBool IsClickToTurn(); + static void SetClickToTurn(bool state); + static bool IsClickToTurn(); }; #endif // _pyDrawControl_h_ diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.cpp b/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.cpp index 8cc14fad..8ca7a801 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.cpp @@ -103,12 +103,12 @@ void pyDynamicText::AddReceiver(pyKey& key) } -void pyDynamicText::SetNetPropagate(hsBool propagate) +void pyDynamicText::SetNetPropagate(bool propagate) { fNetPropagate = propagate; } -void pyDynamicText::SetNetForce(hsBool force) +void pyDynamicText::SetNetForce(bool force) { fNetForce = force; } @@ -311,7 +311,7 @@ void pyDynamicText::DrawTextW( int16_t x, int16_t y, std::wstring text ) // // Draw an image on the DynamicMap // -void pyDynamicText::DrawImage( uint16_t x, uint16_t y, pyImage& image, hsBool respectAlpha ) +void pyDynamicText::DrawImage( uint16_t x, uint16_t y, pyImage& image, bool respectAlpha ) { // create message plDynamicTextMsg* pMsg = ICreateDTMsg(); @@ -327,7 +327,7 @@ void pyDynamicText::DrawImage( uint16_t x, uint16_t y, pyImage& image, hsBool re // Draw an image on the DynamicMap // void pyDynamicText::DrawImageClipped( uint16_t x, uint16_t y, pyImage& image, uint16_t cx, uint16_t cy, uint16_t cw, uint16_t ch, - hsBool respectAlpha ) + bool respectAlpha ) { // create message plDynamicTextMsg* pMsg = ICreateDTMsg(); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.h b/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.h index 7c9757dd..cb4a01ea 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyDynamicText.h @@ -64,18 +64,18 @@ private: // the list of receivers that want to be notified hsTArray fReceivers; - hsBool fNetPropagate; - hsBool fNetForce; + bool fNetPropagate; + bool fNetForce; // clipping - hsBool fClip; + bool fClip; uint16_t fClipLeft; uint16_t fClipTop; uint16_t fClipRight; uint16_t fClipBottom; // wrapping - hsBool fWrap; + bool fWrap; uint16_t fWrapWidth; uint16_t fWrapHeight; @@ -104,8 +104,8 @@ public: virtual void SetSender(pyKey& selfKey); virtual void ClearReceivers(); virtual void AddReceiver(pyKey& key); - virtual void SetNetPropagate(hsBool propagate); - virtual void SetNetForce(hsBool force); + virtual void SetNetPropagate(bool propagate); + virtual void SetNetForce(bool force); // dynamicText commands virtual void ClearToColor( pyColor& color ); @@ -121,9 +121,9 @@ public: virtual void UnsetWrapping(); virtual void DrawText( int16_t x, int16_t y, const char *text ); virtual void DrawTextW( int16_t x, int16_t y, std::wstring text ); - virtual void DrawImage( uint16_t x, uint16_t y, pyImage& image, hsBool respectAlpha ); + virtual void DrawImage( uint16_t x, uint16_t y, pyImage& image, bool respectAlpha ); virtual void DrawImageClipped( uint16_t x, uint16_t y, pyImage& image, uint16_t cx, uint16_t cy, uint16_t cw, uint16_t ch, - hsBool respectAlpha ); + bool respectAlpha ); virtual void PurgeImage( void ); // Actually return the visible width and height, since that's what you want to be drawing to diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControl.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControl.cpp index fb258da5..f3a3d587 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControl.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControl.cpp @@ -81,7 +81,7 @@ pyGUIControl& pyGUIControl::Copy(const pyGUIControl& other) } // override the equals to operator -hsBool pyGUIControl::operator==(const pyGUIControl &gcobj) const +bool pyGUIControl::operator==(const pyGUIControl &gcobj) const { plKey theirs = ((pyGUIControl&)gcobj).getObjKey(); if ( fGCkey == nil && theirs == nil ) @@ -121,7 +121,7 @@ uint32_t pyGUIControl::GetTagID() } -void pyGUIControl::SetEnabled( hsBool e ) +void pyGUIControl::SetEnabled( bool e ) { if ( fGCkey ) { @@ -138,7 +138,7 @@ void pyGUIControl::SetEnabled( hsBool e ) } } -hsBool pyGUIControl::IsEnabled( void ) +bool pyGUIControl::IsEnabled( void ) { if ( fGCkey ) { @@ -150,7 +150,7 @@ hsBool pyGUIControl::IsEnabled( void ) return false; } -void pyGUIControl::SetFocused( hsBool e ) +void pyGUIControl::SetFocused( bool e ) { if ( fGCkey ) { @@ -161,7 +161,7 @@ void pyGUIControl::SetFocused( hsBool e ) } } -hsBool pyGUIControl::IsFocused( void ) +bool pyGUIControl::IsFocused( void ) { if ( fGCkey ) { @@ -173,7 +173,7 @@ hsBool pyGUIControl::IsFocused( void ) return false; } -void pyGUIControl::SetVisible( hsBool vis ) +void pyGUIControl::SetVisible( bool vis ) { if ( fGCkey ) { @@ -184,7 +184,7 @@ void pyGUIControl::SetVisible( hsBool vis ) } } -hsBool pyGUIControl::IsVisible( void ) +bool pyGUIControl::IsVisible( void ) { if ( fGCkey ) { @@ -196,7 +196,7 @@ hsBool pyGUIControl::IsVisible( void ) return false; } -hsBool pyGUIControl::IsInteresting( void ) +bool pyGUIControl::IsInteresting( void ) { if ( fGCkey ) { @@ -208,7 +208,7 @@ hsBool pyGUIControl::IsInteresting( void ) return false; } -void pyGUIControl::SetNotifyOnInteresting( hsBool state ) +void pyGUIControl::SetNotifyOnInteresting( bool state ) { if ( fGCkey ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControl.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControl.h index 6cf52cd8..8e5705ea 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControl.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControl.h @@ -84,8 +84,8 @@ public: static void AddPlasmaClasses(PyObject *m); // override the equals to operator - hsBool operator==(const pyGUIControl &gcobj) const; - hsBool operator!=(const pyGUIControl &gcobj) const { return !(gcobj == *this); } + bool operator==(const pyGUIControl &gcobj) const; + bool operator!=(const pyGUIControl &gcobj) const { return !(gcobj == *this); } // getter and setters virtual plKey getObjKey(); @@ -93,20 +93,20 @@ public: // interface functions virtual uint32_t GetTagID(); - virtual void SetEnabled( hsBool e ); + virtual void SetEnabled( bool e ); virtual void Enable() { SetEnabled(true); } virtual void Disable() { SetEnabled(false); } - virtual hsBool IsEnabled( void ); - virtual void SetFocused( hsBool e ); + virtual bool IsEnabled( void ); + virtual void SetFocused( bool e ); virtual void Focus() { SetFocused(true); } virtual void UnFocus() { SetFocused(false); } - virtual hsBool IsFocused( void ); - virtual void SetVisible( hsBool vis ); + virtual bool IsFocused( void ); + virtual void SetVisible( bool vis ); virtual void Show() { SetVisible(true); } virtual void Hide() { SetVisible(false); } - virtual hsBool IsVisible( void ); - virtual hsBool IsInteresting( void ); - virtual void SetNotifyOnInteresting( hsBool state ); + virtual bool IsVisible( void ); + virtual bool IsInteresting( void ); + virtual void SetNotifyOnInteresting( bool state ); virtual void Refresh( void ); virtual void SetObjectCenter( pyPoint3& pt); virtual PyObject* GetObjectCenter(); // returns pyPoint3 diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlButton.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlButton.cpp index 2c37b11b..cc785333 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlButton.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlButton.cpp @@ -54,7 +54,7 @@ pyGUIControlButton::pyGUIControlButton(plKey objkey) : pyGUIControl(objkey) { } -hsBool pyGUIControlButton::IsGUIControlButton(pyKey& gckey) +bool pyGUIControlButton::IsGUIControlButton(pyKey& gckey) { if ( gckey.getKey() && pfGUIButtonMod::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; @@ -84,7 +84,7 @@ int32_t pyGUIControlButton::GetNotifyType() return false; } -hsBool pyGUIControlButton::IsButtonDown() +bool pyGUIControlButton::IsButtonDown() { if ( fGCkey ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlButton.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlButton.h index 171ac8d5..d600cb28 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlButton.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlButton.h @@ -71,11 +71,11 @@ public: static void AddPlasmaClasses(PyObject *m); static void AddPlasmaConstantsClasses(PyObject *m); - static hsBool IsGUIControlButton(pyKey& gckey); + static bool IsGUIControlButton(pyKey& gckey); virtual void SetNotifyType(int32_t kind); virtual int32_t GetNotifyType(); - virtual hsBool IsButtonDown(); + virtual bool IsButtonDown(); }; #endif // _pyGUIControlButton_h_ diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlCheckBox.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlCheckBox.cpp index f597651e..bafb3f0b 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlCheckBox.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlCheckBox.cpp @@ -58,7 +58,7 @@ pyGUIControlCheckBox::pyGUIControlCheckBox(plKey objkey) : pyGUIControl(objkey) } -hsBool pyGUIControlCheckBox::IsGUIControlCheckBox(pyKey& gckey) +bool pyGUIControlCheckBox::IsGUIControlCheckBox(pyKey& gckey) { if ( gckey.getKey() && pfGUICheckBoxCtrl::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; @@ -66,7 +66,7 @@ hsBool pyGUIControlCheckBox::IsGUIControlCheckBox(pyKey& gckey) } -void pyGUIControlCheckBox::SetChecked( hsBool checked ) +void pyGUIControlCheckBox::SetChecked( bool checked ) { if ( fGCkey ) { @@ -78,7 +78,7 @@ void pyGUIControlCheckBox::SetChecked( hsBool checked ) } -hsBool pyGUIControlCheckBox::IsChecked( void ) +bool pyGUIControlCheckBox::IsChecked( void ) { if ( fGCkey ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlCheckBox.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlCheckBox.h index 4f1f6cd3..4d72642c 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlCheckBox.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlCheckBox.h @@ -72,10 +72,10 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlCheckBox(pyKey& gckey); + static bool IsGUIControlCheckBox(pyKey& gckey); - virtual void SetChecked( hsBool checked ); - virtual hsBool IsChecked( void ); + virtual void SetChecked( bool checked ); + virtual bool IsChecked( void ); }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlClickMap.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlClickMap.cpp index 3d2947a9..a65c96aa 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlClickMap.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlClickMap.cpp @@ -59,7 +59,7 @@ pyGUIControlClickMap::pyGUIControlClickMap(plKey objkey) : pyGUIControl(objkey) } -hsBool pyGUIControlClickMap::IsGUIControlClickMap(pyKey& gckey) +bool pyGUIControlClickMap::IsGUIControlClickMap(pyKey& gckey) { if ( gckey.getKey() && pfGUIClickMapCtrl::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlClickMap.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlClickMap.h index 05691950..d366d403 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlClickMap.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlClickMap.h @@ -71,7 +71,7 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlClickMap(pyKey& gckey); + static bool IsGUIControlClickMap(pyKey& gckey); PyObject* GetLastMousePt( void ); // returns pyPoint3 PyObject* GetLastMouseUpPt( void ); // returns pyPoint3 diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDragBar.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDragBar.cpp index 2f8d9be0..39daa86f 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDragBar.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDragBar.cpp @@ -63,7 +63,7 @@ pyGUIControlDragBar::~pyGUIControlDragBar() } -hsBool pyGUIControlDragBar::IsGUIControlDragBar(pyKey& gckey) +bool pyGUIControlDragBar::IsGUIControlDragBar(pyKey& gckey) { if ( gckey.getKey() && pfGUIDragBarCtrl::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; @@ -93,7 +93,7 @@ void pyGUIControlDragBar::Unanchor( void ) } } -hsBool pyGUIControlDragBar::IsAnchored() +bool pyGUIControlDragBar::IsAnchored() { if ( fGCkey ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDragBar.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDragBar.h index ac19b56a..df8e4f1b 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDragBar.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDragBar.h @@ -75,11 +75,11 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlDragBar(pyKey& gckey); + static bool IsGUIControlDragBar(pyKey& gckey); virtual void Anchor( void ); virtual void Unanchor( void ); - virtual hsBool IsAnchored(); + virtual bool IsAnchored(); }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDraggable.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDraggable.cpp index a2c65627..8e7d4c1d 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDraggable.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDraggable.cpp @@ -58,14 +58,14 @@ pyGUIControlDraggable::pyGUIControlDraggable(plKey objkey) : pyGUIControl(objkey } -hsBool pyGUIControlDraggable::IsGUIControlDraggable(pyKey& gckey) +bool pyGUIControlDraggable::IsGUIControlDraggable(pyKey& gckey) { if ( gckey.getKey() && pfGUIDraggableMod::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; return false; } -void pyGUIControlDraggable::StopDragging( hsBool cancel ) +void pyGUIControlDraggable::StopDragging( bool cancel ) { if ( fGCkey ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDraggable.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDraggable.h index 83c72ff3..8bfc8d56 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDraggable.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDraggable.h @@ -76,9 +76,9 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlDraggable(pyKey& gckey); + static bool IsGUIControlDraggable(pyKey& gckey); - void StopDragging( hsBool cancel ); + void StopDragging( bool cancel ); PyObject* GetLastMousePt( void ); // returns pyPoint3 }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDynamicText.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDynamicText.cpp index 9feb0346..58d8a99b 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDynamicText.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDynamicText.cpp @@ -59,7 +59,7 @@ pyGUIControlDynamicText::pyGUIControlDynamicText(plKey objkey) : pyGUIControl(ob } -hsBool pyGUIControlDynamicText::IsGUIControlDynamicText(pyKey& gckey) +bool pyGUIControlDynamicText::IsGUIControlDynamicText(pyKey& gckey) { if ( gckey.getKey() && pfGUIDynDisplayCtrl::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDynamicText.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDynamicText.h index b605540e..ce2455d2 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDynamicText.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlDynamicText.h @@ -73,7 +73,7 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlDynamicText(pyKey& gckey); + static bool IsGUIControlDynamicText(pyKey& gckey); //specific interface functions virtual uint32_t GetNumMaps(); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBox.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBox.cpp index c0faedaf..ab080d1e 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBox.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBox.cpp @@ -58,7 +58,7 @@ pyGUIControlEditBox::pyGUIControlEditBox(plKey objkey) : pyGUIControl(objkey) } -hsBool pyGUIControlEditBox::IsGUIControlEditBox(pyKey& gckey) +bool pyGUIControlEditBox::IsGUIControlEditBox(pyKey& gckey) { if ( gckey.getKey() && pfGUIEditBoxMod::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; @@ -186,7 +186,7 @@ void pyGUIControlEditBox::SetSelColor(pyColor& forecolor, pyColor& backcolor) */ } -hsBool pyGUIControlEditBox::WasEscaped() +bool pyGUIControlEditBox::WasEscaped() { if ( fGCkey ) { @@ -198,7 +198,7 @@ hsBool pyGUIControlEditBox::WasEscaped() return false; } -void pyGUIControlEditBox::SetSpecialCaptureKeyMode(hsBool state) +void pyGUIControlEditBox::SetSpecialCaptureKeyMode(bool state) { if ( fGCkey ) { @@ -244,7 +244,7 @@ void pyGUIControlEditBox::SetLastKeyCapture(uint32_t key, uint32_t modifiers) } } -void pyGUIControlEditBox::SetChatMode(hsBool state) +void pyGUIControlEditBox::SetChatMode(bool state) { if ( fGCkey ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBox.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBox.h index 118812e0..4e12e63d 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBox.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlEditBox.h @@ -72,7 +72,7 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlEditBox(pyKey& gckey); + static bool IsGUIControlEditBox(pyKey& gckey); virtual void SetBufferSize( uint32_t size ); virtual std::string GetBuffer( void ); @@ -85,14 +85,14 @@ public: virtual void SetColor(pyColor& forecolor, pyColor& backcolor); virtual void SetSelColor(pyColor& forecolor, pyColor& backcolor); - virtual hsBool WasEscaped(); + virtual bool WasEscaped(); - virtual void SetSpecialCaptureKeyMode(hsBool state); + virtual void SetSpecialCaptureKeyMode(bool state); virtual uint32_t GetLastKeyCaptured(); virtual uint32_t GetLastModifiersCaptured(); virtual void SetLastKeyCapture(uint32_t key, uint32_t modifiers); - virtual void SetChatMode(hsBool state); + virtual void SetChatMode(bool state); }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp index ac77ed75..80436e04 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp @@ -163,7 +163,7 @@ class pfColorListElement : public pfGUIListText fString1 = nil; } - virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) + virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) { hsColorRGBA textColor1; textColor1 = fTextColor1; @@ -242,7 +242,7 @@ class pfColorListElement : public pfGUIListText virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height ) { - hsBool wemade_string = false; + bool wemade_string = false; wchar_t* thestring; if ( fString1 && fString2 ) { @@ -327,7 +327,7 @@ class pfListPictureInBox : public pfGUIListPicture uint32_t fSrcHeight; public: - pfListPictureInBox( plKey mipKey, uint32_t x, uint32_t y, uint32_t width, uint32_t height, hsBool respectAlpha ) : pfGUIListPicture( mipKey,respectAlpha ) + pfListPictureInBox( plKey mipKey, uint32_t x, uint32_t y, uint32_t width, uint32_t height, bool respectAlpha ) : pfGUIListPicture( mipKey,respectAlpha ) { fSrcX = x; fSrcY = y; @@ -335,7 +335,7 @@ class pfListPictureInBox : public pfGUIListPicture fSrcHeight = height; } - virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) + virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) { plMipmap *mip = plMipmap::ConvertNoRef( fMipmapKey->ObjectIsLoaded() ); if( mip != nil ) @@ -394,7 +394,7 @@ class pfListPictureInBoxWithSwatches : public pfListPictureInBox pfListPictureInBoxWithSwatches( plKey mipKey, uint32_t x, uint32_t y, uint32_t width, uint32_t height, - hsBool respectAlpha, + bool respectAlpha, const hsColorRGBA &primaryColor, const hsColorRGBA &secondaryColor ) : pfListPictureInBox( mipKey, x, y, width, height, respectAlpha ) { @@ -402,7 +402,7 @@ class pfListPictureInBoxWithSwatches : public pfListPictureInBox fSColor = secondaryColor; } - virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) + virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) { if( !pfListPictureInBox::Draw( textGen, x, y, maxWidth, maxHeight ) ) return false; @@ -435,7 +435,7 @@ pyGUIControlListBox::pyGUIControlListBox(plKey objkey) : pyGUIControl(objkey) { } -hsBool pyGUIControlListBox::IsGUIControlListBox(pyKey& gckey) +bool pyGUIControlListBox::IsGUIControlListBox(pyKey& gckey) { if ( gckey.getKey() && pfGUIListBoxMod::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; @@ -624,7 +624,7 @@ int16_t pyGUIControlListBox::AddStringW( std::wstring string ) return -1; } -int16_t pyGUIControlListBox::AddImage( pyImage& image, hsBool respectAlpha ) +int16_t pyGUIControlListBox::AddImage( pyImage& image, bool respectAlpha ) { if ( fGCkey ) { @@ -771,7 +771,7 @@ int16_t pyGUIControlListBox::AddStringInBoxW( std::wstring string, uint32_t min_ return -1; } -int16_t pyGUIControlListBox::AddImageInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, hsBool respectAlpha ) +int16_t pyGUIControlListBox::AddImageInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, bool respectAlpha ) { if ( fGCkey ) { @@ -788,7 +788,7 @@ int16_t pyGUIControlListBox::AddImageInBox( pyImage& image, uint32_t x, uint32 return -1; } -int16_t pyGUIControlListBox::AddImageAndSwatchesInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, hsBool respectAlpha, +int16_t pyGUIControlListBox::AddImageAndSwatchesInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, bool respectAlpha, pyColor &primary, pyColor &secondary ) { if ( fGCkey ) @@ -927,14 +927,14 @@ void pyGUIControlListBox::Unclickable( void ) } } -void pyGUIControlListBox::AddBranch( const char *name, hsBool initiallyOpen ) +void pyGUIControlListBox::AddBranch( const char *name, bool initiallyOpen ) { wchar_t *wName = hsStringToWString(name); AddBranchW(wName,initiallyOpen); delete [] wName; } -void pyGUIControlListBox::AddBranchW( std::wstring name, hsBool initiallyOpen ) +void pyGUIControlListBox::AddBranchW( std::wstring name, bool initiallyOpen ) { if ( fGCkey ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.h index fb2bc4d1..28964149 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.h @@ -79,7 +79,7 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlListBox(pyKey& gckey); + static bool IsGUIControlListBox(pyKey& gckey); // special case control for the listbox // ...this allows the listbox to be used without being selectable @@ -97,9 +97,9 @@ public: virtual std::wstring GetElementW( uint16_t idx ); virtual int16_t AddString( const char *string ); virtual int16_t AddStringW( std::wstring string ); - virtual int16_t AddImage( pyImage& image, hsBool respectAlpha ); - virtual int16_t AddImageInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, hsBool respectAlpha ); - virtual int16_t AddImageAndSwatchesInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, hsBool respectAlpha, + virtual int16_t AddImage( pyImage& image, bool respectAlpha ); + virtual int16_t AddImageInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, bool respectAlpha ); + virtual int16_t AddImageAndSwatchesInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, bool respectAlpha, pyColor &primary, pyColor &secondary ); virtual void SetSwatchSize( uint32_t size ); virtual void SetSwatchEdgeOffset( uint32_t size ); @@ -125,8 +125,8 @@ public: // To create tree branches, call AddBranch() with a name, then add elements as usual, including new sub-branches // via additional AddBranch() calls. Call CloseBranch() to stop writing elements to that branch. - void AddBranch( const char *name, hsBool initiallyOpen ); - void AddBranchW( std::wstring name, hsBool initiallyOpen ); + void AddBranch( const char *name, bool initiallyOpen ); + void AddBranchW( std::wstring name, bool initiallyOpen ); void CloseBranch( void ); void RemoveSelection( int32_t item ); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.cpp index db110f60..e9ecafe2 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.cpp @@ -57,7 +57,7 @@ pyGUIControlMultiLineEdit::pyGUIControlMultiLineEdit(plKey objkey) : pyGUIContro { } -hsBool pyGUIControlMultiLineEdit::IsGUIControlMultiLineEdit(pyKey& gckey) +bool pyGUIControlMultiLineEdit::IsGUIControlMultiLineEdit(pyKey& gckey) { if ( gckey.getKey() && pfGUIMultiLineEditCtrl::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; @@ -444,7 +444,7 @@ void pyGUIControlMultiLineEdit::Unlock( void ) } } -hsBool pyGUIControlMultiLineEdit::IsLocked( void ) +bool pyGUIControlMultiLineEdit::IsLocked( void ) { if ( fGCkey ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.h index e820740a..8b0fd5af 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlMultiLineEdit.h @@ -72,7 +72,7 @@ public: static void AddPlasmaClasses(PyObject *m); static void AddPlasmaConstantsClasses(PyObject *m); - static hsBool IsGUIControlMultiLineEdit(pyKey& gckey); + static bool IsGUIControlMultiLineEdit(pyKey& gckey); virtual void Clickable( void ); virtual void Unclickable( void ); @@ -102,7 +102,7 @@ public: virtual void Lock( void ); virtual void Unlock( void ); - virtual hsBool IsLocked( void ); + virtual bool IsLocked( void ); virtual void EnableScrollControl(); virtual void DisableScrollControl(); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlRadioGroup.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlRadioGroup.cpp index b3443e6d..bf26244f 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlRadioGroup.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlRadioGroup.cpp @@ -55,7 +55,7 @@ pyGUIControlRadioGroup::pyGUIControlRadioGroup(plKey objkey) : pyGUIControl(objk { } -hsBool pyGUIControlRadioGroup::IsGUIControlRadioGroup(pyKey& gckey) +bool pyGUIControlRadioGroup::IsGUIControlRadioGroup(pyKey& gckey) { if ( gckey.getKey() && pfGUIRadioGroupCtrl::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlRadioGroup.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlRadioGroup.h index ed056d5a..58dd5ebd 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlRadioGroup.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlRadioGroup.h @@ -72,7 +72,7 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlRadioGroup(pyKey& gckey); + static bool IsGUIControlRadioGroup(pyKey& gckey); virtual int32_t GetValue( void ); virtual void SetValue( int32_t value ); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.cpp index 28f548e5..97527fa4 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.cpp @@ -61,7 +61,7 @@ pyGUIControlTextBox::pyGUIControlTextBox(plKey objkey) : pyGUIControl(objkey) } -hsBool pyGUIControlTextBox::IsGUIControlTextBox(pyKey& gckey) +bool pyGUIControlTextBox::IsGUIControlTextBox(pyKey& gckey) { if ( gckey.getKey() && pfGUITextBoxMod::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.h index 81e142bf..9f8f5b00 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlTextBox.h @@ -75,7 +75,7 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlTextBox(pyKey& gckey); + static bool IsGUIControlTextBox(pyKey& gckey); virtual void SetText( const char *text ); virtual void SetTextW( std::wstring text ); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlValue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlValue.cpp index 0dee0aca..1b344902 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlValue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlValue.cpp @@ -58,7 +58,7 @@ pyGUIControlValue::pyGUIControlValue(plKey objkey) : pyGUIControl(objkey) { } -hsBool pyGUIControlValue::IsGUIControlValue(pyKey& gckey) +bool pyGUIControlValue::IsGUIControlValue(pyKey& gckey) { if ( gckey.getKey() && pfGUIValueCtrl::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; @@ -161,7 +161,7 @@ pyGUIControlKnob::pyGUIControlKnob(plKey objkey) : pyGUIControlValue(objkey) { } -hsBool pyGUIControlKnob::IsGUIControlKnob(pyKey& gckey) +bool pyGUIControlKnob::IsGUIControlKnob(pyKey& gckey) { if ( gckey.getKey() && pfGUIKnobCtrl::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; @@ -181,7 +181,7 @@ pyGUIControlUpDownPair::pyGUIControlUpDownPair(plKey objkey) : pyGUIControlValue { } -hsBool pyGUIControlUpDownPair::IsGUIControlUpDownPair(pyKey& gckey) +bool pyGUIControlUpDownPair::IsGUIControlUpDownPair(pyKey& gckey) { if ( gckey.getKey() && pfGUIUpDownPairMod::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; @@ -201,7 +201,7 @@ pyGUIControlProgress::pyGUIControlProgress(plKey objkey) : pyGUIControlValue(obj { } -hsBool pyGUIControlProgress::IsGUIControlProgress(pyKey& gckey) +bool pyGUIControlProgress::IsGUIControlProgress(pyKey& gckey) { if ( gckey.getKey() && pfGUIProgressCtrl::ConvertNoRef(gckey.getKey()->ObjectIsLoaded()) ) return true; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlValue.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlValue.h index f7917538..6f6da98c 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlValue.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlValue.h @@ -70,7 +70,7 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlValue(pyKey& gckey); + static bool IsGUIControlValue(pyKey& gckey); virtual float GetValue(); virtual void SetValue( float v ); @@ -98,7 +98,7 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlKnob(pyKey& gckey); + static bool IsGUIControlKnob(pyKey& gckey); }; class pyGUIControlUpDownPair : public pyGUIControlValue @@ -118,7 +118,7 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlUpDownPair(pyKey& gckey); + static bool IsGUIControlUpDownPair(pyKey& gckey); }; class pyGUIControlProgress : public pyGUIControlValue @@ -138,7 +138,7 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUIControlProgress(pyKey& gckey); + static bool IsGUIControlProgress(pyKey& gckey); void AnimateToPercentage(float percent); }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIDialog.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIDialog.cpp index 095d363d..cc620588 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIDialog.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIDialog.cpp @@ -86,7 +86,7 @@ pyGUIDialog::pyGUIDialog() fGCkey = nil; } -hsBool pyGUIDialog::IsGUIDialog(pyKey& gckey) +bool pyGUIDialog::IsGUIDialog(pyKey& gckey) { if ( gckey.getKey() && pfGUIDialogMod::ConvertNoRef(gckey.getKey()->GetObjectPtr()) ) return true; @@ -135,7 +135,7 @@ uint32_t pyGUIDialog::WhatControlType(pyKey& gckey) // override the equals to operator -hsBool pyGUIDialog::operator==(const pyGUIDialog &gcobj) const +bool pyGUIDialog::operator==(const pyGUIDialog &gcobj) const { plKey theirs = ((pyGUIDialog&)gcobj).getObjKey(); if ( fGCkey == nil && theirs == nil ) @@ -174,7 +174,7 @@ uint32_t pyGUIDialog::GetTagID() } -void pyGUIDialog::SetEnabled( hsBool e ) +void pyGUIDialog::SetEnabled( bool e ) { if ( fGCkey ) { @@ -184,7 +184,7 @@ void pyGUIDialog::SetEnabled( hsBool e ) } } -hsBool pyGUIDialog::IsEnabled( void ) +bool pyGUIDialog::IsEnabled( void ) { if ( fGCkey ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIDialog.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIDialog.h index 1a7d7434..36bd5933 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIDialog.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIDialog.h @@ -77,7 +77,7 @@ public: static void AddPlasmaClasses(PyObject *m); static void AddPlasmaMethods(std::vector &methods); - static hsBool IsGUIDialog(pyKey& gckey); + static bool IsGUIDialog(pyKey& gckey); void setKey(plKey key) {fGCkey = key;} // used by python glue, do NOT call @@ -105,8 +105,8 @@ public: static void GUICursorDimmed(); // override the equals to operator - hsBool operator==(const pyGUIDialog &gdobj) const; - hsBool operator!=(const pyGUIDialog &gdobj) const { return !(gdobj == *this); } + bool operator==(const pyGUIDialog &gdobj) const; + bool operator!=(const pyGUIDialog &gdobj) const { return !(gdobj == *this); } // getter and setters virtual plKey getObjKey(); @@ -115,10 +115,10 @@ public: // interface functions virtual uint32_t GetTagID(); - virtual void SetEnabled( hsBool e ); + virtual void SetEnabled( bool e ); virtual void Enable() { SetEnabled(true); } virtual void Disable() { SetEnabled(false); } - virtual hsBool IsEnabled( void ); + virtual bool IsEnabled( void ); virtual const char *GetName( void ); virtual uint32_t GetVersion(void); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.cpp index 0a0dacb3..5620be3e 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.cpp @@ -182,7 +182,7 @@ void pyGUIPopUpMenu::setup(const char *name, pyGUIPopUpMenu &parent, float scree fGCkey = nil; } -hsBool pyGUIPopUpMenu::IsGUIPopUpMenu(pyKey& gckey) +bool pyGUIPopUpMenu::IsGUIPopUpMenu(pyKey& gckey) { if ( gckey.getKey() && pfGUIPopUpMenu::ConvertNoRef(gckey.getKey()->GetObjectPtr()) ) return true; @@ -191,7 +191,7 @@ hsBool pyGUIPopUpMenu::IsGUIPopUpMenu(pyKey& gckey) // override the equals to operator -hsBool pyGUIPopUpMenu::operator==(const pyGUIPopUpMenu &gcobj) const +bool pyGUIPopUpMenu::operator==(const pyGUIPopUpMenu &gcobj) const { plKey theirs = ((pyGUIPopUpMenu&)gcobj).getObjKey(); if ( fGCkey == nil && theirs == nil ) @@ -225,13 +225,13 @@ uint32_t pyGUIPopUpMenu::GetTagID() } -void pyGUIPopUpMenu::SetEnabled( hsBool e ) +void pyGUIPopUpMenu::SetEnabled( bool e ) { kGetMenuPtr( ; ); menu->SetEnabled(e); } -hsBool pyGUIPopUpMenu::IsEnabled( void ) +bool pyGUIPopUpMenu::IsEnabled( void ) { kGetMenuPtr( false ); return menu->IsEnabled(); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.h b/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.h index 31595765..20d8c184 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIPopUpMenu.h @@ -91,11 +91,11 @@ public: void setup(const char *name, float screenOriginX, float screenOriginY, const plLocation &destLoc = plLocation::kGlobalFixedLoc); void setup(const char *name, pyGUIPopUpMenu &parent, float screenOriginX, float screenOriginY); - static hsBool IsGUIPopUpMenu(pyKey& gckey); + static bool IsGUIPopUpMenu(pyKey& gckey); // override the equals to operator - hsBool operator==(const pyGUIPopUpMenu &gdobj) const; - hsBool operator!=(const pyGUIPopUpMenu &gdobj) const { return !(gdobj == *this); } + bool operator==(const pyGUIPopUpMenu &gdobj) const; + bool operator!=(const pyGUIPopUpMenu &gdobj) const { return !(gdobj == *this); } // getter and setters virtual plKey getObjKey(); @@ -104,12 +104,12 @@ public: // interface functions virtual uint32_t GetTagID(); - virtual void SetEnabled( hsBool e ); + virtual void SetEnabled( bool e ); virtual void Enable() { SetEnabled(true); } virtual void Disable() { SetEnabled(false); } - virtual hsBool IsEnabled( void ); + virtual bool IsEnabled( void ); virtual const char *GetName( void ); - virtual uint32_t GetVersion(void); + virtual uint32_t GetVersion(void); virtual void Show( void ); virtual void Hide( void ); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUISkin.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUISkin.cpp index c4151503..d137d9e7 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUISkin.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUISkin.cpp @@ -63,7 +63,7 @@ pyGUISkin::pyGUISkin() fGCkey = nil; } -hsBool pyGUISkin::IsGUISkin(pyKey& gckey) +bool pyGUISkin::IsGUISkin(pyKey& gckey) { if ( gckey.getKey() && pfGUISkin::ConvertNoRef(gckey.getKey()->GetObjectPtr()) ) return true; @@ -71,7 +71,7 @@ hsBool pyGUISkin::IsGUISkin(pyKey& gckey) } // override the equals to operator -hsBool pyGUISkin::operator==(const pyGUISkin &gcobj) const +bool pyGUISkin::operator==(const pyGUISkin &gcobj) const { plKey theirs = ((pyGUISkin&)gcobj).getObjKey(); if ( fGCkey == nil && theirs == nil ) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUISkin.h b/Sources/Plasma/FeatureLib/pfPython/pyGUISkin.h index 43d153fc..aaf88b3e 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUISkin.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUISkin.h @@ -74,13 +74,13 @@ public: static void AddPlasmaClasses(PyObject *m); - static hsBool IsGUISkin(pyKey& gckey); + static bool IsGUISkin(pyKey& gckey); void setKey(plKey key) {fGCkey = key;} // used by python glue, do NOT call // override the equals to operator - hsBool operator==(const pyGUISkin &gdobj) const; - hsBool operator!=(const pyGUISkin &gdobj) const { return !(gdobj == *this); } + bool operator==(const pyGUISkin &gdobj) const; + bool operator!=(const pyGUISkin &gdobj) const { return !(gdobj == *this); } // getter and setters virtual plKey getObjKey(); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyImage.h b/Sources/Plasma/FeatureLib/pfPython/pyImage.h index 3d0fc09a..6eab711f 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyImage.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyImage.h @@ -123,7 +123,7 @@ public: void setKey(pyKey& mipmapKey); // override the equals to operator - hsBool operator==(const pyImage &image) const + bool operator==(const pyImage &image) const { // only thing that needs testing is the plKey, which is unique for all if ( fMipMapKey == ((pyImage&)image).GetKey() ) @@ -131,7 +131,7 @@ public: else return false; } - hsBool operator!=(const pyImage &image) const { return !(image == *this); } + bool operator!=(const pyImage &image) const { return !(image == *this); } // for C++ access plKey GetKey() { return fMipmap ? fMipmap->GetKey() : fMipMapKey; } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp b/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp index c2f801ac..4ef89b6c 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp @@ -164,7 +164,7 @@ void pyJournalBook::MakeBook(std::wstring esHTMLSource, plKey coverImageKey /* = IMakeNewKey(); } -void pyJournalBook::Show( hsBool startOpened ) +void pyJournalBook::Show( bool startOpened ) { if( fBook != nil ) fBook->Show( startOpened ); @@ -276,7 +276,7 @@ PyObject *pyJournalBook::GetMovie(uint8_t index) PYTHON_RETURN_NONE; } -void pyJournalBook::SetEditable( hsBool editable ) +void pyJournalBook::SetEditable( bool editable ) { if (fBook != nil) fBook->SetEditable(editable); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.h b/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.h index 1535172a..3df7246c 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyJournalBook.h @@ -98,7 +98,7 @@ public: void MakeBook(std::wstring esHTMLSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = _TEMP_CONVERT_FROM_LITERAL("")); // Interface functions per book - virtual void Show( hsBool startOpened ); + virtual void Show( bool startOpened ); virtual void Hide( void ); virtual void Open( uint32_t startingPage ); virtual void Close( void ); @@ -121,7 +121,7 @@ public: virtual PyObject *GetMovie( uint8_t index ); // returns cyAnimation - virtual void SetEditable( hsBool editable ); + virtual void SetEditable( bool editable ); virtual std::string GetEditableText( void ) const; virtual void SetEditableText( std::string text ); }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyKey.cpp b/Sources/Plasma/FeatureLib/pfPython/pyKey.cpp index 8944cf45..3779eaff 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyKey.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyKey.cpp @@ -80,28 +80,9 @@ pyKey::pyKey(plKey key, plPythonFileMod* pymod) fPyFileMod=pymod; fNetForce=false; } - -void pyKey::SetNetForce(hsBool state) -{ - // set our flag - fNetForce = state; -} - -// send enable message to the plKey -void pyKey::Enable() -{ - IEnable(true); -} - - -// send disable message to the plKey -void pyKey::Disable() -{ - IEnable(false); -} #endif -hsBool pyKey::operator==(const pyKey &key) const +bool pyKey::operator==(const pyKey &key) const { plKey ours = ((pyKey*)this)->getKey(); plKey theirs = ((pyKey&)key).getKey(); @@ -137,7 +118,7 @@ PyObject* pyKey::GetPySceneObject() } // send disable message to the plKey -void pyKey::IEnable(hsBool state) +void pyKey::IEnable(bool state) { // create message plEnableMsg* pMsg = new plEnableMsg; @@ -177,7 +158,7 @@ PyObject* pyKey::GetParentObject() // special functions when the plKey is a pointer to the PythonModifier // // Was the last plNotifyMsg a locally sent? -hsBool pyKey::WasLocalNotify() +bool pyKey::WasLocalNotify() { // see if we have a PythonFileModifier pointer if ( fPyFileMod ) @@ -187,7 +168,7 @@ hsBool pyKey::WasLocalNotify() } // Is python file mod attached to clone -hsBool pyKey::IsAttachedToClone() +bool pyKey::IsAttachedToClone() { // see if we have a PythonFileModifier pointer if ( fPyFileMod ) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyKey.h b/Sources/Plasma/FeatureLib/pfPython/pyKey.h index 53b60dcd..b0795382 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyKey.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyKey.h @@ -63,7 +63,7 @@ private: #ifndef BUILDING_PYPLASMA // pyPlasma (and other plugins) don't need all this extra junk) plPythonFileMod* fPyFileMod; // pointer to the PythonFileModifier - hsBool fNetForce; + bool fNetForce; #endif // BUILDING_PYPLASMA protected: @@ -89,8 +89,8 @@ public: static void AddPlasmaClasses(PyObject *m); // override the equals to operator - hsBool operator==(const pyKey &key) const; - hsBool operator!=(const pyKey &key) const { return !(key == *this); } + bool operator==(const pyKey &key) const; + bool operator!=(const pyKey &key) const { return !(key == *this); } // getter and setters virtual plKey getKey() { return fKey; } @@ -99,13 +99,13 @@ public: #ifndef BUILDING_PYPLASMA PyObject* GetPySceneObject(); - virtual void SetNetForce(hsBool state); + virtual void SetNetForce(bool state) { fNetForce = state; } // methods to be sent to the plKey // send enable message to the plKey - virtual void Enable(); + virtual void Enable() { IEnable(true); } // send disable message to the plKey - virtual void Disable(); + virtual void Disable() { IEnable(false); } // if this is a modifier then get the (first) object its attached to virtual PyObject* GetParentObject(); @@ -113,9 +113,9 @@ public: // (Only called from C++, not from Python directly) // // Was the last plNotifyMsg a locally sent? - virtual hsBool WasLocalNotify(); + virtual bool WasLocalNotify(); // Is this python file mod attached to a clone? - virtual hsBool IsAttachedToClone(); + virtual bool IsAttachedToClone(); // (old style - Used in pyNotify) // get the notify list count virtual int32_t NotifyListCount(); @@ -132,7 +132,7 @@ public: virtual plPipeline* GetPipeline(); private: // build and send enable message to the plKey - virtual void IEnable(hsBool state); + virtual void IEnable(bool state); #endif // BUILDING_PYPLASMA }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyMatrix44.h b/Sources/Plasma/FeatureLib/pfPython/pyMatrix44.h index 891b569d..a7ff96f2 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyMatrix44.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyMatrix44.h @@ -83,7 +83,7 @@ public: void MakeRotateMat(int axis, float radians) { fMatrix.MakeRotateMat(axis, radians); } void Make(const pyPoint3& from, const pyPoint3& at, const pyVector3& up); void MakeUpPreserving(const pyPoint3& from, const pyPoint3& at, const pyVector3& up); - hsBool GetParity() const { return fMatrix.GetParity(); } + bool GetParity() const { return fMatrix.GetParity(); } float GetDeterminant() const { return fMatrix.GetDeterminant(); } PyObject* GetInverse(PyObject* inverse) const; // returns (and accepts) pyMatrix44 PyObject* GetTranspose(PyObject* inverse) const; // returns (and accepts) pyMatrix44 diff --git a/Sources/Plasma/FeatureLib/pfPython/pyNetLinkingMgr.cpp b/Sources/Plasma/FeatureLib/pfPython/pyNetLinkingMgr.cpp index 05a95867..f71c5b40 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyNetLinkingMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyNetLinkingMgr.cpp @@ -55,14 +55,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pyAgeInfoStruct.h" #include "pyAgeLinkStruct.h" -hsBool pyNetLinkingMgr::IsEnabled( void ) const +bool pyNetLinkingMgr::IsEnabled( void ) const { return plNetLinkingMgr::GetInstance()->IsEnabled(); } -void pyNetLinkingMgr::SetEnabled( hsBool b ) +void pyNetLinkingMgr::SetEnabled( bool b ) const { - plNetLinkingMgr::GetInstance()->SetEnabled( b?true:false ); + plNetLinkingMgr::GetInstance()->SetEnabled( b ); } void pyNetLinkingMgr::LinkToAge( pyAgeLinkStruct & link, const char* linkAnim ) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyNetLinkingMgr.h b/Sources/Plasma/FeatureLib/pfPython/pyNetLinkingMgr.h index 2c796521..39dec4e3 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyNetLinkingMgr.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyNetLinkingMgr.h @@ -76,8 +76,8 @@ public: #ifndef BUILDING_PYPLASMA // enable/disable linking - hsBool IsEnabled( void ) const; - void SetEnabled( hsBool b ); + bool IsEnabled( void ) const; + void SetEnabled( bool b ) const; // Link to a public instance. PLS will load balance. void LinkToAge( pyAgeLinkStruct & link, const char* linkAnim ); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyNotify.cpp b/Sources/Plasma/FeatureLib/pfPython/pyNotify.cpp index 31b32e22..b435ebf7 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyNotify.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyNotify.cpp @@ -101,16 +101,6 @@ void pyNotify::AddReceiver(pyKey* key) fReceivers.Append(key->getKey()); } -void pyNotify::SetNetPropagate(hsBool propagate) -{ - fNetPropagate = propagate; -} - -void pyNotify::SetNetForce(hsBool state) -{ - fNetForce = state; -} - void pyNotify::SetActivateState(float state) { @@ -127,13 +117,13 @@ void pyNotify::SetType(int32_t type) // Add event record helpers ////////////////////////////////////////////////// -void pyNotify::AddCollisionEvent( hsBool enter, pyKey* other, pyKey* self ) +void pyNotify::AddCollisionEvent( bool enter, pyKey* other, pyKey* self ) { fBuildMsg.AddCollisionEvent(enter, other ? other->getKey() : plKey(), self ? self->getKey() : plKey() ); } -void pyNotify::AddPickEvent( hsBool enabled, pyKey* other, pyKey* self, pyPoint3 hitPoint) +void pyNotify::AddPickEvent( bool enabled, pyKey* other, pyKey* self, pyPoint3 hitPoint) { fBuildMsg.AddPickEvent( other ? other->getKey() : plKey(), self ? self->getKey() : plKey(), @@ -141,7 +131,7 @@ void pyNotify::AddPickEvent( hsBool enabled, pyKey* other, pyKey* self, pyPoint3 hitPoint.fPoint ); } -void pyNotify::AddControlKeyEvent( int32_t key, hsBool down ) +void pyNotify::AddControlKeyEvent( int32_t key, bool down ) { fBuildMsg.AddControlKeyEvent(key,down); } @@ -166,21 +156,21 @@ void pyNotify::AddVarKey(const char* name, pyKey* key) fBuildMsg.AddVariableEvent(name, key ? key->getKey() : plKey() ); } -void pyNotify::AddFacingEvent( hsBool enabled, pyKey* other, pyKey* self, float dot) +void pyNotify::AddFacingEvent( bool enabled, pyKey* other, pyKey* self, float dot) { fBuildMsg.AddFacingEvent( other ? other->getKey() : plKey(), self ? self->getKey() : plKey(), dot, enabled); } -void pyNotify::AddContainerEvent( hsBool entering, pyKey* contained, pyKey* container) +void pyNotify::AddContainerEvent( bool entering, pyKey* contained, pyKey* container) { fBuildMsg.AddContainerEvent( container ? container->getKey() : plKey(), contained ? contained->getKey() : plKey() , entering); } -void pyNotify::AddActivateEvent( hsBool active, hsBool activate ) +void pyNotify::AddActivateEvent( bool active, bool activate ) { fBuildMsg.AddActivateEvent(activate); } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyNotify.h b/Sources/Plasma/FeatureLib/pfPython/pyNotify.h index 9ee6a366..c2179a2d 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyNotify.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyNotify.h @@ -60,8 +60,8 @@ private: // the list of receivers that want to be notified hsTArray fReceivers; - hsBool fNetPropagate; - hsBool fNetForce; + bool fNetPropagate; + bool fNetForce; // notify message build area plNotifyMsg fBuildMsg; @@ -87,22 +87,22 @@ public: // methods that will be exposed to Python virtual void ClearReceivers(); virtual void AddReceiver(pyKey* key); - virtual void SetNetPropagate(hsBool propagate); - virtual void SetNetForce(hsBool state); + virtual void SetNetPropagate(bool propagate) { fNetPropagate = propagate; } + virtual void SetNetForce(bool state) { fNetForce = state; } virtual void SetActivateState(float state); virtual void SetType(int32_t type); // add event record helpers - virtual void AddCollisionEvent( hsBool enter, pyKey* other, pyKey* self ); - virtual void AddPickEvent(hsBool enabled, pyKey* other, pyKey* self, pyPoint3 hitPoint); - virtual void AddControlKeyEvent( int32_t key, hsBool down ); + virtual void AddCollisionEvent( bool enter, pyKey* other, pyKey* self ); + virtual void AddPickEvent(bool enabled, pyKey* other, pyKey* self, pyPoint3 hitPoint); + virtual void AddControlKeyEvent( int32_t key, bool down ); virtual void AddVarNumber(const char* name, float number); virtual void AddVarNumber(const char* name, int number); virtual void AddVarNull(const char* name); virtual void AddVarKey(const char* name, pyKey* key); - virtual void AddFacingEvent( hsBool enabled, pyKey* other, pyKey* self, float dot); - virtual void AddContainerEvent( hsBool entering, pyKey* container, pyKey* contained); - virtual void AddActivateEvent( hsBool active, hsBool activate ); + virtual void AddFacingEvent( bool enabled, pyKey* other, pyKey* self, float dot); + virtual void AddContainerEvent( bool entering, pyKey* container, pyKey* contained); + virtual void AddActivateEvent( bool active, bool activate ); virtual void AddCallbackEvent( int32_t event ); virtual void AddResponderState(int32_t state); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyPlayer.cpp b/Sources/Plasma/FeatureLib/pfPython/pyPlayer.cpp index 92a9a560..92b363e1 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyPlayer.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyPlayer.cpp @@ -95,23 +95,3 @@ void pyPlayer::Init(plKey avKey, const char* pname, uint32_t pid, float distsq) fIsCCR = false; fIsServer = false; } - -void pyPlayer::SetCCRFlag(hsBool state) -{ - fIsCCR = state; -} - -hsBool pyPlayer::IsCCR() -{ - return fIsCCR; -} - -void pyPlayer::SetServerFlag(hsBool state) -{ - fIsServer = state; -} - -hsBool pyPlayer::IsServer() -{ - return fIsServer; -} diff --git a/Sources/Plasma/FeatureLib/pfPython/pyPlayer.h b/Sources/Plasma/FeatureLib/pfPython/pyPlayer.h index e5dd697c..45e67865 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyPlayer.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyPlayer.h @@ -59,8 +59,8 @@ protected: std::string fPlayerName; uint32_t fPlayerID; float fDistSq; // from local player, temp - hsBool fIsCCR; - hsBool fIsServer; + bool fIsCCR; + bool fIsServer; pyPlayer(); // only used by python glue, do NOT call pyPlayer(pyKey& avKey, const char* pname, uint32_t pid, float distsq); @@ -81,7 +81,7 @@ public: static void AddPlasmaClasses(PyObject *m); // override the equals to operator - hsBool operator==(const pyPlayer &player) const + bool operator==(const pyPlayer &player) const { // only thing that needs testing is the playerid, which is unique for all if ( ((pyPlayer*)this)->GetPlayerID() == player.GetPlayerID() ) @@ -89,25 +89,22 @@ public: else return false; } - hsBool operator!=(const pyPlayer &player) const { return !(player == *this); } + bool operator!=(const pyPlayer &player) const { return !(player == *this); } // for C++ access - plKey GetKey() { return fAvatarKey; } + plKey GetKey() const { return fAvatarKey; } // for python access const char * GetPlayerName() const { return fPlayerName.c_str();} - uint32_t GetPlayerID() const - { - return fPlayerID; - } + uint32_t GetPlayerID() const { return fPlayerID; } float GetDistSq() const { return fDistSq; } - void SetCCRFlag(hsBool state); - hsBool IsCCR(); + void SetCCRFlag(bool state) { fIsCCR = state; } + bool IsCCR() const { return fIsCCR; } - void SetServerFlag(hsBool state); - hsBool IsServer(); + void SetServerFlag(bool state) { fIsServer = state; } + bool IsServer() const { return fIsServer; } }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp b/Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp index 55c2bae2..a2cff79c 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp @@ -149,7 +149,7 @@ pySceneObject::~pySceneObject() } -hsBool pySceneObject::operator==(const pySceneObject &sobj) const +bool pySceneObject::operator==(const pySceneObject &sobj) const { plKey ours = ((pySceneObject*)this)->getObjKey(); plKey theirs = ((pySceneObject&)sobj).getObjKey(); @@ -207,17 +207,7 @@ void pySceneObject::setSenderKey(plKey key) ISetAllSenderKeys(); } -void pySceneObject::setPyMod(pyKey& pymod) -{ - fPyMod = pymod.getKey(); -} - -void pySceneObject::setPyMod(plKey& key) -{ - fPyMod = key; -} - -void pySceneObject::SetNetForce(hsBool state) +void pySceneObject::SetNetForce(bool state) { // set our flag fNetForce = state; @@ -264,7 +254,7 @@ PyObject* pySceneObject::findObj(const plString& name) // // deteremine if this object (or the first object in the list) // ...is locally owned -hsBool pySceneObject::IsLocallyOwned() +bool pySceneObject::IsLocallyOwned() { // make sure that there are sceneobjects if ( fSceneObjects.Count() > 0 ) @@ -536,7 +526,7 @@ PyObject* pySceneObject::GetRightVector() // // deteremine if this object (or any of the object attached) // ...is an avatar, of any type -hsBool pySceneObject::IsAvatar() +bool pySceneObject::IsAvatar() { // loop through all the sceneobject... looking for avatar modifiers int j; @@ -602,7 +592,7 @@ PyObject* pySceneObject::GetAvatarVelocity() // // deteremine if this object (or the first object in the list) // ...is a human avatar -hsBool pySceneObject::IsHumanAvatar() +bool pySceneObject::IsHumanAvatar() { // loop through all the sceneobject... looking for avatar modifiers int j; @@ -636,7 +626,7 @@ hsBool pySceneObject::IsHumanAvatar() } // switch to / from this object (assuming that it is actually a camera) -void pySceneObject::PushCutsceneCamera(hsBool cut, pyKey& avKey) +void pySceneObject::PushCutsceneCamera(bool cut, pyKey& avKey) { if ( fSceneObjects.Count() > 0 ) { diff --git a/Sources/Plasma/FeatureLib/pfPython/pySceneObject.h b/Sources/Plasma/FeatureLib/pfPython/pySceneObject.h index 8f85de89..da952e35 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pySceneObject.h +++ b/Sources/Plasma/FeatureLib/pfPython/pySceneObject.h @@ -61,8 +61,7 @@ private: hsTArray fSceneObjects; plKey fSenderKey; // the holder of the who (the modifier) we are plKey fPyMod; // pyKey that points to modifier - - hsBool fNetForce; + bool fNetForce; virtual void IAddObjKeyToAll(plKey key); virtual void ISetAllSenderKeys(); @@ -88,8 +87,8 @@ public: static void AddPlasmaClasses(PyObject *m); // override the equals to operator - hsBool operator==(const pySceneObject &sobj) const; - hsBool operator!=(const pySceneObject &sobj) const { return !(sobj == *this); } + bool operator==(const pySceneObject &sobj) const; + bool operator!=(const pySceneObject &sobj) const { return !(sobj == *this); } PyObject* fDraw; // cyDraw PyObject* fPhysics; // cyPhysics @@ -103,10 +102,10 @@ public: virtual PyObject* getObjPyKey(); // pyKey virtual void setSenderKey(plKey key); - virtual void setPyMod(pyKey& pymod); - virtual void setPyMod(plKey& key); + virtual void setPyMod(pyKey& pymod) { fPyMod = pymod.getKey(); } + virtual void setPyMod(const plKey& key) { fPyMod = key; } - virtual void SetNetForce(hsBool state); + virtual void SetNetForce(bool state); virtual PyObject* findObj(const plString& name); // pySceneObject @@ -116,7 +115,7 @@ public: // // deteremine if this object (or the first object in the list) // ...is locally owned - virtual hsBool IsLocallyOwned(); + virtual bool IsLocallyOwned(); // // get the local to world matrix @@ -157,14 +156,14 @@ public: // // deteremine if this object (or any of the object attached) // ...is an avatar, of any type - virtual hsBool IsAvatar(); + virtual bool IsAvatar(); virtual PyObject* GetAvatarVelocity(); // pyVector3 // // deteremine if this object (or the first object in the list) // ...is a human avatar - virtual hsBool IsHumanAvatar(); + virtual bool IsHumanAvatar(); // // switch to / from this camera (if it is a camera) @@ -172,7 +171,7 @@ public: void PushCamera(pyKey& avKey); void PushCameraCut(pyKey& avKey); void PopCamera(pyKey& avKey); - void PushCutsceneCamera(hsBool cut,pyKey& avKey); + void PushCutsceneCamera(bool cut, pyKey& avKey); void PopCutsceneCamera(pyKey& avKey); void Animate(); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyStatusLog.cpp b/Sources/Plasma/FeatureLib/pfPython/pyStatusLog.cpp index 183163fa..c9e947b3 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyStatusLog.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyStatusLog.cpp @@ -65,7 +65,7 @@ pyStatusLog::~pyStatusLog() } -hsBool pyStatusLog::Open(plString logName, uint32_t numLines, uint32_t flags) +bool pyStatusLog::Open(plString logName, uint32_t numLines, uint32_t flags) { // make sure its closed first Close(); @@ -81,7 +81,7 @@ hsBool pyStatusLog::Open(plString logName, uint32_t numLines, uint32_t flags) return false; } -hsBool pyStatusLog::Write(plString text) +bool pyStatusLog::Write(plString text) { if (fLog) { @@ -92,7 +92,7 @@ hsBool pyStatusLog::Write(plString text) return false; } -hsBool pyStatusLog::WriteColor(plString text, pyColor& color) +bool pyStatusLog::WriteColor(plString text, pyColor& color) { if (fLog) { @@ -115,10 +115,3 @@ void pyStatusLog::Close() } fLog = nil; } - -hsBool pyStatusLog::IsOpen() -{ - if (fLog) - return true; - return false; -} diff --git a/Sources/Plasma/FeatureLib/pfPython/pyStatusLog.h b/Sources/Plasma/FeatureLib/pfPython/pyStatusLog.h index 5b8cbdef..742076c1 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyStatusLog.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyStatusLog.h @@ -78,12 +78,12 @@ public: static void AddPlasmaClasses(PyObject *m); static void AddPlasmaConstantsClasses(PyObject *m); - virtual hsBool Open(plString logName, uint32_t numLines, uint32_t flags); - virtual hsBool Write(plString text); - virtual hsBool WriteColor(plString text, pyColor& color); + virtual bool Open(plString logName, uint32_t numLines, uint32_t flags); + virtual bool Write(plString text); + virtual bool WriteColor(plString text, pyColor& color); virtual void Close(); - virtual hsBool IsOpen(); + virtual bool IsOpen() { return (fLog != nil); } }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyStream.cpp b/Sources/Plasma/FeatureLib/pfPython/pyStream.cpp index c205a775..982018b4 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyStream.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyStream.cpp @@ -61,7 +61,7 @@ pyStream::~pyStream() } -hsBool pyStream::Open(const wchar_t* fileName, const wchar_t* flags) +bool pyStream::Open(const wchar_t* fileName, const wchar_t* flags) { // make sure its closed first Close(); @@ -124,7 +124,7 @@ std::vector pyStream::ReadLines() return pyPL; } -hsBool pyStream::WriteLines(const std::vector & lines) +bool pyStream::WriteLines(const std::vector & lines) { if (fStream) { @@ -150,10 +150,3 @@ void pyStream::Close() } fStream = nil; } - -hsBool pyStream::IsOpen() -{ - if (fStream) - return true; - return false; -} diff --git a/Sources/Plasma/FeatureLib/pfPython/pyStream.h b/Sources/Plasma/FeatureLib/pfPython/pyStream.h index e6e466a5..be77458f 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyStream.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyStream.h @@ -75,12 +75,12 @@ public: static void AddPlasmaClasses(PyObject *m); - virtual hsBool Open(const wchar_t* fileName, const wchar_t* flags); + virtual bool Open(const wchar_t* fileName, const wchar_t* flags); virtual std::vector ReadLines(); - virtual hsBool WriteLines(const std::vector & lines); + virtual bool WriteLines(const std::vector & lines); virtual void Close(); - virtual hsBool IsOpen(); + virtual bool IsOpen() { return (fStream != nil); } }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultAgeInfoListNode.cpp b/Sources/Plasma/FeatureLib/pfPython/pyVaultAgeInfoListNode.cpp index a44642d9..80912403 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultAgeInfoListNode.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultAgeInfoListNode.cpp @@ -69,7 +69,7 @@ pyVaultAgeInfoListNode::pyVaultAgeInfoListNode(int n) //================================================================== // class RelVaultNode : public plVaultFolderNode // -hsBool pyVaultAgeInfoListNode::HasAge(uint32_t ageID) +bool pyVaultAgeInfoListNode::HasAge(uint32_t ageID) { if (!fNode) return false; @@ -78,7 +78,7 @@ hsBool pyVaultAgeInfoListNode::HasAge(uint32_t ageID) return false; } -hsBool pyVaultAgeInfoListNode::AddAge( uint32_t ageID ) +bool pyVaultAgeInfoListNode::AddAge( uint32_t ageID ) { if (!fNode) return false; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultAgeInfoListNode.h b/Sources/Plasma/FeatureLib/pfPython/pyVaultAgeInfoListNode.h index 333f88f8..b4a23268 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultAgeInfoListNode.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultAgeInfoListNode.h @@ -77,9 +77,9 @@ public: //================================================================== // class RelVaultNode : public plVaultFolderNode // - hsBool HasAge( uint32_t ageID ); - hsBool AddAge( uint32_t ageID ); - void RemoveAge( uint32_t ageID ); + bool HasAge( uint32_t ageID ); + bool AddAge( uint32_t ageID ); + void RemoveAge( uint32_t ageID ); }; #endif // _pyVaultAgeInfoListNode_h_ diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultNode.cpp b/Sources/Plasma/FeatureLib/pfPython/pyVaultNode.cpp index 5b74fa24..20603fef 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultNode.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultNode.cpp @@ -500,7 +500,7 @@ void pyVaultNode::LinkToNode(int nodeID, PyObject* cbObject, uint32_t cbContext) } // Remove child node -hsBool pyVaultNode::RemoveNode( pyVaultNode& pynode, PyObject* cbObject, uint32_t cbContext ) +bool pyVaultNode::RemoveNode( pyVaultNode& pynode, PyObject* cbObject, uint32_t cbContext ) { pyVaultNodeOperationCallback * cb = NEWZERO(pyVaultNodeOperationCallback)( cbObject ); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultNode.h b/Sources/Plasma/FeatureLib/pfPython/pyVaultNode.h index e6d88316..e57a423b 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultNode.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultNode.h @@ -158,7 +158,7 @@ public: // Link node to this one void LinkToNode(int nodeID, PyObject* cbObject=nil, uint32_t cbContext=0 ); // Remove child node - hsBool RemoveNode( pyVaultNode& pynode, PyObject* cbObject=nil, uint32_t cbContext=0 ); + bool RemoveNode( pyVaultNode& pynode, PyObject* cbObject=nil, uint32_t cbContext=0 ); // Remove all child nodes void RemoveAllNodes( void ); // Add/Save this node to vault diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoListNode.cpp b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoListNode.cpp index 41d06989..6a594976 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoListNode.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoListNode.cpp @@ -74,7 +74,7 @@ pyVaultPlayerInfoListNode::pyVaultPlayerInfoListNode(int n) //================================================================== // class RelVaultNode : public plVaultFolderNode // -hsBool pyVaultPlayerInfoListNode::HasPlayer( uint32_t playerID ) +bool pyVaultPlayerInfoListNode::HasPlayer( uint32_t playerID ) { if (!fNode) return false; @@ -93,7 +93,7 @@ hsBool pyVaultPlayerInfoListNode::HasPlayer( uint32_t playerID ) return (rvn != nil); } -hsBool pyVaultPlayerInfoListNode::AddPlayer( uint32_t playerID ) +bool pyVaultPlayerInfoListNode::AddPlayer( uint32_t playerID ) { if (HasPlayer(playerID)) return true; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoListNode.h b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoListNode.h index ee891c38..eeaf57a5 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoListNode.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoListNode.h @@ -78,8 +78,8 @@ public: //================================================================== // class RelVaultNode : public plVaultFolderNode // - virtual hsBool HasPlayer( uint32_t playerID ); - hsBool AddPlayer( uint32_t playerID ); + virtual bool HasPlayer( uint32_t playerID ); + bool AddPlayer( uint32_t playerID ); void RemovePlayer( uint32_t playerID ); PyObject * GetPlayer( uint32_t playerID ); // returns pyVaultPlayerInfoNode diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoNode.cpp b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoNode.cpp index 940f5102..657eb588 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoNode.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoNode.cpp @@ -178,7 +178,7 @@ void pyVaultPlayerInfoNode::Player_SetOnline( bool b ) playerInfo.SetOnline(b); } -hsBool pyVaultPlayerInfoNode::Player_IsOnline( void ) +bool pyVaultPlayerInfoNode::Player_IsOnline( void ) { if (!fNode) return false; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoNode.h b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoNode.h index 04ca664d..a7c0787c 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoNode.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerInfoNode.h @@ -91,7 +91,7 @@ public: const char * Player_GetAgeGuid( void ); // online status void Player_SetOnline( bool b ); - hsBool Player_IsOnline( void ); + bool Player_IsOnline( void ); int Player_GetCCRLevel( void ); }; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.cpp b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.cpp index ffcf55c5..3cae6818 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.cpp @@ -325,7 +325,7 @@ void pyVaultPlayerNode::SetExplorer (bool b) { player.SetExplorer(b); } -hsBool pyVaultPlayerNode::IsExplorer () { +bool pyVaultPlayerNode::IsExplorer () { if (!fNode) return false; diff --git a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.h b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.h index 57881bf6..b7f5decb 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyVaultPlayerNode.h @@ -113,7 +113,7 @@ public: uint32_t GetOnlineTime(); void SetExplorer (bool b); - hsBool IsExplorer (); + bool IsExplorer (); }; #endif // pyVaultPlayerNode_h_ diff --git a/Sources/Plasma/FeatureLib/pfSecurePreloader/pfSecurePreloader.cpp b/Sources/Plasma/FeatureLib/pfSecurePreloader/pfSecurePreloader.cpp index 9ae2fea9..33f0405a 100644 --- a/Sources/Plasma/FeatureLib/pfSecurePreloader/pfSecurePreloader.cpp +++ b/Sources/Plasma/FeatureLib/pfSecurePreloader/pfSecurePreloader.cpp @@ -53,7 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plMessage/plPreloaderMsg.h" #include "plProgressMgr/plProgressMgr.h" -extern hsBool gDataServerLocal; +extern bool gDataServerLocal; pfSecurePreloader* pfSecurePreloader::fInstance = nil; ///////////////////////////////////////////////////////////////////// @@ -167,7 +167,7 @@ public: plZlibStream::Close(); } - hsBool AtEnd() { return fOutput->AtEnd(); } + bool AtEnd() { return fOutput->AtEnd(); } uint32_t GetEOF() { return fOutput->GetEOF(); } uint32_t GetPosition() const { return fOutput->GetPosition(); } uint32_t GetSizeLeft() const { return fOutput->GetSizeLeft(); } diff --git a/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.cpp b/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.cpp index 2bade2b5..2ec4e5ae 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.cpp @@ -138,7 +138,7 @@ void plDistOpacityMod::ISetOpacity() } -hsBool plDistOpacityMod::MsgReceive(plMessage* msg) +bool plDistOpacityMod::MsgReceive(plMessage* msg) { plArmatureUpdateMsg* arm = plArmatureUpdateMsg::ConvertNoRef(msg); if( arm && arm->IsLocal() ) diff --git a/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.h b/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.h index 61683bb6..c244b53e 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.h +++ b/Sources/Plasma/FeatureLib/pfSurface/plDistOpacityMod.h @@ -84,7 +84,7 @@ protected: hsTArray fFadeLays; // We only act in response to messages. - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return false; } float ICalcOpacity(const hsPoint3& targPos, const hsPoint3& refPos) const; void ISetOpacity(); @@ -107,7 +107,7 @@ public: virtual void SetKey(plKey k); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); diff --git a/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.cpp b/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.cpp index 79e32e30..3894f3e9 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.cpp @@ -81,7 +81,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com t0 = t - curr * fadeUp; */ -hsBool plFadeOpacityMod::fLOSCheckDisabled = false; +bool plFadeOpacityMod::fLOSCheckDisabled = false; const float kDefFadeUp(5.f); const float kDefFadeDown(1.f); @@ -101,7 +101,7 @@ plFadeOpacityMod::~plFadeOpacityMod() { } -hsBool plFadeOpacityMod::MsgReceive(plMessage* msg) +bool plFadeOpacityMod::MsgReceive(plMessage* msg) { plRenderMsg* rend = plRenderMsg::ConvertNoRef(msg); if( rend ) @@ -145,7 +145,7 @@ void plFadeOpacityMod::SetTarget(plSceneObject* so) fSetup = false; } -hsBool plFadeOpacityMod::IShouldCheck(plPipeline* pipe) +bool plFadeOpacityMod::IShouldCheck(plPipeline* pipe) { if (pipe->TestVisibleWorld(GetTarget())) return true; @@ -163,7 +163,7 @@ void plFadeOpacityMod::IOnRenderMsg(plRenderMsg* rend) // Okay, we're going to check. - hsBool hit = false; + bool hit = false; if( !fLOSCheckDisabled ) { @@ -199,7 +199,7 @@ void plFadeOpacityMod::IOnRenderMsg(plRenderMsg* rend) ISetOpacity(); } -hsBool plFadeOpacityMod::IReady() +bool plFadeOpacityMod::IReady() { plSceneObject* so = GetTarget(); if( !so ) diff --git a/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.h b/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.h index 6693ae7d..fb4b33e9 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.h +++ b/Sources/Plasma/FeatureLib/pfSurface/plFadeOpacityMod.h @@ -88,11 +88,11 @@ protected: hsTArray fFadeLays; // A global to turn the whole thing off for debug/perf - static hsBool fLOSCheckDisabled; + static bool fLOSCheckDisabled; void IOnRenderMsg(plRenderMsg* rend); - hsBool IReady(); - hsBool IShouldCheck(plPipeline* pipe); + bool IReady(); + bool IShouldCheck(plPipeline* pipe); hsPoint3 IGetOurPos(); void ICalcOpacity(); void ISetOpacity(); @@ -101,7 +101,7 @@ protected: void ISetup(plSceneObject* so); // We only act in response to messages. - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return false; } public: plFadeOpacityMod(); @@ -112,7 +112,7 @@ public: virtual void SetKey(plKey k); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); @@ -121,7 +121,7 @@ public: void FadeUp(); void FadeDown(); - void Fade(hsBool up) { if( up ) FadeUp(); else FadeDown(); } + void Fade(bool up) { if( up ) FadeUp(); else FadeDown(); } void SetFadeUp(float f) { fFadeUp = f; } float GetFadeUp() const { return fFadeUp; } @@ -129,8 +129,8 @@ public: void SetFadeDown(float f) { fFadeDown = f; } float GetFadeDown() const { return fFadeDown; } - static hsBool GetLOSCheckDisabled() { return fLOSCheckDisabled; } - static void SetLOSCheckDisabled(hsBool on) { fLOSCheckDisabled = on; } + static bool GetLOSCheckDisabled() { return fLOSCheckDisabled; } + static void SetLOSCheckDisabled(bool on) { fLOSCheckDisabled = on; } }; #endif // plFadeOpacityMod_inc diff --git a/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp b/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp index b8af5b07..da52a211 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.cpp @@ -65,8 +65,8 @@ struct plAVIFileInfo #endif // HS_BUILD_FOR_WIN32 #if HS_BUILD_FOR_WIN32 -static hsBool ICopySourceToTexture24(BITMAPINFO* bmi, plMipmap* t); -static hsBool ICopySourceToTexture16(BITMAPINFO* bmi, plMipmap* t); +static bool ICopySourceToTexture24(BITMAPINFO* bmi, plMipmap* t); +static bool ICopySourceToTexture16(BITMAPINFO* bmi, plMipmap* t); #endif @@ -83,7 +83,7 @@ plLayerAVI::~plLayerAVI() } -hsBool plLayerAVI::IInit() +bool plLayerAVI::IInit() { #if HS_BUILD_FOR_WIN32 int ret = AVIStreamOpenFromFile( &fAVIInfo->fAVIStream, @@ -126,7 +126,7 @@ int32_t plLayerAVI::ISecsToFrame(float secs) return int32_t(secs * timeScale + 0.5f); } -hsBool plLayerAVI::IGetCurrentFrame() +bool plLayerAVI::IGetCurrentFrame() { #if HS_BUILD_FOR_WIN32 if( !fAVIInfo->fAVIStream ) @@ -154,7 +154,7 @@ hsBool plLayerAVI::IGetCurrentFrame() } #if HS_BUILD_FOR_WIN32 -static hsBool ICopySourceToTexture16(BITMAPINFO* bmi, plMipmap* b) +static bool ICopySourceToTexture16(BITMAPINFO* bmi, plMipmap* b) { hsAssert( b != nil, "nil mipmap passed to ICopySourceToTexture16()" ); @@ -191,7 +191,7 @@ static hsBool ICopySourceToTexture16(BITMAPINFO* bmi, plMipmap* b) return false; } -static hsBool ICopySourceToTexture24(BITMAPINFO* bmi, plMipmap* b) +static bool ICopySourceToTexture24(BITMAPINFO* bmi, plMipmap* b) { hsAssert( b != nil, "nil mipmap passed to ICopySourceToTexture24()" ); @@ -228,7 +228,7 @@ static hsBool ICopySourceToTexture24(BITMAPINFO* bmi, plMipmap* b) } #endif -hsBool plLayerAVI::ICloseMovie() +bool plLayerAVI::ICloseMovie() { #if HS_BUILD_FOR_WIN32 if( fAVIInfo->fGetFrame ) @@ -244,7 +244,7 @@ hsBool plLayerAVI::ICloseMovie() return false; } -hsBool plLayerAVI::IRelease() +bool plLayerAVI::IRelease() { ICloseMovie(); diff --git a/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.h b/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.h index 8fdab521..b6cb5b24 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.h +++ b/Sources/Plasma/FeatureLib/pfSurface/plLayerAVI.h @@ -53,12 +53,12 @@ protected: plAVIFileInfo* fAVIInfo; - hsBool ICloseMovie(); + bool ICloseMovie(); virtual int32_t ISecsToFrame(float secs); - virtual hsBool IInit(); - virtual hsBool IGetCurrentFrame(); - virtual hsBool IRelease(); + virtual bool IInit(); + virtual bool IGetCurrentFrame(); + virtual bool IRelease(); public: plLayerAVI(); diff --git a/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.cpp b/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.cpp index 8a003f4b..33ca05e2 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.cpp +++ b/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.cpp @@ -71,7 +71,7 @@ plLayerMovie::~plLayerMovie() delete *fTexture; } -hsBool plLayerMovie::ISetFault(const char* errStr) +bool plLayerMovie::ISetFault(const char* errStr) { #ifdef HS_DEBUGGING char buff[256]; @@ -82,7 +82,7 @@ hsBool plLayerMovie::ISetFault(const char* errStr) return true; } -hsBool plLayerMovie::ISetLength(float secs) +bool plLayerMovie::ISetLength(float secs) { fLength = secs; return false; @@ -100,14 +100,14 @@ int plLayerMovie::GetHeight() const return mip ? mip->GetHeight() : 0; } -hsBool plLayerMovie::ISetSize(int width, int height) +bool plLayerMovie::ISetSize(int width, int height) { fWidth = width; fHeight = height; return false; } -hsBool plLayerMovie::ISetupBitmap() +bool plLayerMovie::ISetupBitmap() { if( !GetTexture() ) { @@ -124,7 +124,7 @@ hsBool plLayerMovie::ISetupBitmap() return false; } -hsBool plLayerMovie::ICheckBitmap() +bool plLayerMovie::ICheckBitmap() { if( !GetTexture() ) ISetupBitmap(); @@ -132,14 +132,14 @@ hsBool plLayerMovie::ICheckBitmap() return false; } -hsBool plLayerMovie::IMovieIsIdle() +bool plLayerMovie::IMovieIsIdle() { IRelease(); return false; } -hsBool plLayerMovie::ICurrentFrameDirty(double wSecs) +bool plLayerMovie::ICurrentFrameDirty(double wSecs) { float secs = fTimeConvert.WorldToAnimTime(wSecs); uint32_t frame = ISecsToFrame(secs); @@ -202,7 +202,7 @@ void plLayerMovie::Write(hsStream* s, hsResMgr* mgr) { plLayerAnimation::Write(s, mgr); - int len = hsStrlen(fMovieName); + int len = (fMovieName) ? strlen(fMovieName) : 0; s->WriteLE32(len); if( len ) s->Write(len, fMovieName); @@ -214,7 +214,7 @@ void plLayerMovie::SetMovieName(const char* n) fMovieName = hsStrcpy(n); } -hsBool plLayerMovie::MsgReceive(plMessage* msg) +bool plLayerMovie::MsgReceive(plMessage* msg) { return plLayerAnimation::MsgReceive(msg); } diff --git a/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.h b/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.h index 8778a592..6d81fc0d 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.h +++ b/Sources/Plasma/FeatureLib/pfSurface/plLayerMovie.h @@ -63,18 +63,18 @@ protected: virtual int32_t ISecsToFrame(float secs) = 0; - hsBool IGetFault() const { return !(fMovieName && *fMovieName); } - hsBool ISetFault(const char* errStr); - hsBool ICheckBitmap(); - hsBool IMovieIsIdle(); // will call IRelease(); - hsBool ISetupBitmap(); - hsBool ISetSize(int w, int h); - hsBool ISetLength(float secs); - hsBool ICurrentFrameDirty(double wSecs); - - virtual hsBool IInit() = 0; // Load header etc, must call ISetSize(w, h), ISetLength(s) - virtual hsBool IGetCurrentFrame() = 0; // Load fCurrentFrame into bitmap - virtual hsBool IRelease() = 0; // release any system resources. + bool IGetFault() const { return !(fMovieName && *fMovieName); } + bool ISetFault(const char* errStr); + bool ICheckBitmap(); + bool IMovieIsIdle(); // will call IRelease(); + bool ISetupBitmap(); + bool ISetSize(int w, int h); + bool ISetLength(float secs); + bool ICurrentFrameDirty(double wSecs); + + virtual bool IInit() = 0; // Load header etc, must call ISetSize(w, h), ISetLength(s) + virtual bool IGetCurrentFrame() = 0; // Load fCurrentFrame into bitmap + virtual bool IRelease() = 0; // release any system resources. public: plLayerMovie(); virtual ~plLayerMovie(); @@ -87,12 +87,12 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - hsBool IsStopped() { return fTimeConvert.IsStopped(); } + bool IsStopped() { return fTimeConvert.IsStopped(); } void SetMovieName(const char* n); const char* GetMovieName() const { return fMovieName; } - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // Movie specific int GetWidth() const; diff --git a/Sources/Plasma/NucleusLib/inc/hsGMatState.h b/Sources/Plasma/NucleusLib/inc/hsGMatState.h index df5ebf31..d8a08c9c 100644 --- a/Sources/Plasma/NucleusLib/inc/hsGMatState.h +++ b/Sources/Plasma/NucleusLib/inc/hsGMatState.h @@ -174,17 +174,17 @@ enum StateIdx { uint32_t fZFlags; uint32_t fMiscFlags; - static hsBool Differs(uint32_t mine, uint32_t hers, uint32_t mask) + static bool Differs(uint32_t mine, uint32_t hers, uint32_t mask) { return (mine & mask) ^ (hers & mask); } - static hsBool Differs(uint32_t mine, uint32_t hers) + static bool Differs(uint32_t mine, uint32_t hers) { return mine ^ hers; } - hsBool operator!=(const hsGMatState& other) + bool operator!=(const hsGMatState& other) { return ((fBlendFlags ^ other.fBlendFlags) | (fClampFlags ^ other.fClampFlags) diff --git a/Sources/Plasma/NucleusLib/inc/hsResMgr.h b/Sources/Plasma/NucleusLib/inc/hsResMgr.h index b7f80d10..48ffa1c4 100644 --- a/Sources/Plasma/NucleusLib/inc/hsResMgr.h +++ b/Sources/Plasma/NucleusLib/inc/hsResMgr.h @@ -63,8 +63,8 @@ public: //--------------------------- // Load and Unload //--------------------------- - virtual void Load (const plKey& objKey)=0; // places on list to be loaded - virtual hsBool Unload(const plKey& objKey)=0; // Unregisters (deletes) an object, Return true if successful + virtual void Load (const plKey& objKey)=0; // places on list to be loaded + virtual bool Unload(const plKey& objKey)=0; // Unregisters (deletes) an object, Return true if successful virtual plKey CloneKey(const plKey& objKey)=0; //--------------------------- @@ -75,11 +75,11 @@ public: //--------------------------- // Establish reference linkage //--------------------------- - virtual hsBool AddViaNotify(const plKey& sentKey, plRefMsg* msg, plRefFlags::Type flags)=0; - virtual hsBool AddViaNotify(plRefMsg* msg, plRefFlags::Type flags)=0; // msg->fRef->GetKey() == sentKey + virtual bool AddViaNotify(const plKey& sentKey, plRefMsg* msg, plRefFlags::Type flags)=0; + virtual bool AddViaNotify(plRefMsg* msg, plRefFlags::Type flags)=0; // msg->fRef->GetKey() == sentKey - virtual hsBool SendRef(const plKey& key, plRefMsg* refMsg, plRefFlags::Type flags)=0; - virtual hsBool SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags)=0; + virtual bool SendRef(const plKey& key, plRefMsg* refMsg, plRefFlags::Type flags)=0; + virtual bool SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags)=0; //--------------------------- // Reading and Writing keys @@ -119,7 +119,7 @@ protected: friend class plArmatureMod; // Temp hack until a findkey/clone issue is fixed. -Bob virtual plKey ReRegister(const plString& nm, const plUoid& oid)=0; - virtual hsBool ReadObject(plKeyImp* key)=0; // plKeys call this when needed + virtual bool ReadObject(plKeyImp* key)=0; // plKeys call this when needed // Sets a key as used or unused in the registry. When all keys in a page of a // particular type in an page are unused, we can free the memory associated with them. @@ -129,8 +129,8 @@ protected: protected: // hsgResMgr only friend class hsgResMgr; - virtual hsBool IReset()=0; - virtual hsBool IInit()=0; + virtual bool IReset()=0; + virtual bool IInit()=0; virtual void IShutdown()=0; }; @@ -145,12 +145,12 @@ public: static plDispatchBase* Dispatch() { hsAssert(fResMgr, "No resmgr"); return fResMgr->Dispatch(); } - static hsBool Init(hsResMgr* m); - static hsBool Reset() { return fResMgr->IReset(); } + static bool Init(hsResMgr* m); + static bool Reset() { return fResMgr->IReset(); } static void Shutdown(); - static hsBool SendRef(plKey& key, plRefMsg* refMsg, plRefFlags::Type flags) { return fResMgr->SendRef(key, refMsg, flags); } - static hsBool SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags) { return fResMgr->SendRef(ko, refMsg, flags); } + static bool SendRef(plKey& key, plRefMsg* refMsg, plRefFlags::Type flags) { return fResMgr->SendRef(key, refMsg, flags); } + static bool SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags) { return fResMgr->SendRef(ko, refMsg, flags); } }; #endif // hsResMgr_inc diff --git a/Sources/Plasma/NucleusLib/inc/hsTimer.h b/Sources/Plasma/NucleusLib/inc/hsTimer.h index eb1cdcf6..0295a76b 100644 --- a/Sources/Plasma/NucleusLib/inc/hsTimer.h +++ b/Sources/Plasma/NucleusLib/inc/hsTimer.h @@ -47,9 +47,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plTimerShare { protected: - mutable hsBool fFirstTime; + mutable bool fFirstTime; mutable hsWide fRawTimeZero; - mutable hsBool fResetSmooth; + mutable bool fResetSmooth; enum { kSmoothBuffLen = 10 @@ -58,14 +58,14 @@ protected: int fCurrSlot; float fSysTimeScale; - double fRealSeconds; - double fSysSeconds; + double fRealSeconds; + double fSysSeconds; float fDelSysSeconds; float fFrameTimeInc; - hsBool fRunningFrameTime; + bool fRunningFrameTime; float fTimeClampSecs; float fSmoothingClampSecs; - hsBool fClamping; + bool fClamping; hsWide* FactorInTimeZero(hsWide* ticks) const; @@ -77,22 +77,22 @@ protected: double RawTicksToDSeconds(const hsWide& ticks); hsWide DSecondsToRawTicks(double secs); - float GetDelSysSeconds() const { return fDelSysSeconds; } + float GetDelSysSeconds() const { return fDelSysSeconds; } double GetSysSeconds() const { return fSysSeconds; } double IncSysSeconds(); - void SetRealTime(hsBool realTime); - hsBool IsRealTime() const { return !fRunningFrameTime; } + void SetRealTime(bool realTime); + bool IsRealTime() const { return !fRunningFrameTime; } void SetFrameTimeInc(float inc) { fFrameTimeInc = inc; } void SetTimeScale(float s) { fSysTimeScale = s; } - float GetTimeScale() const { return fSysTimeScale; } + float GetTimeScale() const { return fSysTimeScale; } void SetTimeClamp(float secs) { fTimeClampSecs = secs; } void SetSmoothingCap(float secs) { fSmoothingClampSecs = secs; } - float GetTimeClamp() const { return fTimeClampSecs; } - hsBool IsClamping() const { return fClamping; } + float GetTimeClamp() const { return fTimeClampSecs; } + bool IsClamping() const { return fClamping; } friend class hsTimer; public: @@ -111,10 +111,10 @@ protected: static plTimerShare* fTimer; public: - static hsBool VerifyRawBase() { return fRawBase == IInitRawBase(); } - static const hsWide& GetRawBase() { return fRawBase; } + static bool VerifyRawBase() { return fRawBase == IInitRawBase(); } + static const hsWide& GetRawBase() { return fRawBase; } - static hsWide* GetRawTicks(hsWide* ticks) { return fTimer->GetRawTicks(ticks); } + static hsWide* GetRawTicks(hsWide* ticks) { return fTimer->GetRawTicks(ticks); } static double GetSeconds() { return fTimer->GetSeconds(); } static double GetMilliSeconds() { return fTimer->GetMilliSeconds(); } @@ -122,37 +122,37 @@ public: static double RawTicksToDSeconds(const hsWide& ticks) { return fTimer->RawTicksToDSeconds(ticks); } static hsWide DSecondsToRawTicks(double secs) { return fTimer->DSecondsToRawTicks(secs); } - static float GetDelSysSeconds() { return fTimer->GetDelSysSeconds(); } + static float GetDelSysSeconds() { return fTimer->GetDelSysSeconds(); } static double GetSysSeconds() { return fTimer->GetSysSeconds(); } static double IncSysSeconds() { return fTimer->IncSysSeconds(); } - static void SetRealTime(hsBool realTime) { fTimer->SetRealTime(realTime); } - static hsBool IsRealTime() { return fTimer->IsRealTime(); } + static void SetRealTime(bool realTime) { fTimer->SetRealTime(realTime); } + static bool IsRealTime() { return fTimer->IsRealTime(); } static void SetFrameTimeInc(float inc) { fTimer->SetFrameTimeInc(inc); } static void SetTimeScale(float s) { fTimer->SetTimeScale(s); } - static float GetTimeScale() { return fTimer->GetTimeScale(); } + static float GetTimeScale() { return fTimer->GetTimeScale(); } static void SetTimeClamp(float secs) { fTimer->SetTimeClamp(secs); } static void SetTimeSmoothingClamp(float secs) { fTimer->SetSmoothingCap(secs); } - static float GetTimeClamp() { return fTimer->GetTimeClamp(); } - static hsBool IsClamping() { return fTimer->IsClamping(); } + static float GetTimeClamp() { return fTimer->GetTimeClamp(); } + static bool IsClamping() { return fTimer->IsClamping(); } /////////////////////////// // Precision timer routines - these are stateless and implemented as statics. /////////////////////////// - static uint32_t GetPrecTickCount(); - static double GetPrecTicksPerSec(); - static uint32_t PrecSecsToTicks(float secs); - static double PrecTicksToSecs(uint32_t ticks); - static double PrecTicksToHz(uint32_t ticks); + static uint32_t GetPrecTickCount(); + static double GetPrecTicksPerSec(); + static uint32_t PrecSecsToTicks(float secs); + static double PrecTicksToSecs(uint32_t ticks); + static double PrecTicksToHz(uint32_t ticks); // If you need to time something longer than 20 seconds, use this instead of // the precision timer. It works the same, it just gives you full resolution. static uint64_t GetFullTickCount(); - static float FullTicksToMs(uint64_t ticks); + static float FullTicksToMs(uint64_t ticks); // // Pass GetTheTimer() into other process space, and then call SetTheTimer() on it. diff --git a/Sources/Plasma/NucleusLib/inc/plAudible.h b/Sources/Plasma/NucleusLib/inc/plAudible.h index 2c9ac0a4..ee52984f 100644 --- a/Sources/Plasma/NucleusLib/inc/plAudible.h +++ b/Sources/Plasma/NucleusLib/inc/plAudible.h @@ -63,8 +63,8 @@ public: CLASSNAME_REGISTER( plAudible ); GETINTERFACE_ANY( plAudible, hsKeyedObject ); - virtual plAudible& SetProperty(int prop, hsBool on) = 0; - virtual hsBool GetProperty(int prop) = 0; + virtual plAudible& SetProperty(int prop, bool on) = 0; + virtual bool GetProperty(int prop) = 0; virtual plAudible& SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, int index = -1) { return *this; } @@ -90,8 +90,8 @@ public: virtual void SetVelocity(const hsVector3 vel,int index = -1) = 0; virtual hsVector3 GetVelocity(int index = -1) const = 0; virtual hsPoint3 GetPosition(int index = -1) = 0; - virtual void SetLooping(hsBool loop,int index = -1) = 0; // sets continuous loop or stops looping - virtual hsBool IsPlaying(int index = -1) = 0; + virtual void SetLooping(bool loop,int index = -1) = 0; // sets continuous loop or stops looping + virtual bool IsPlaying(int index = -1) = 0; virtual void SetTime(double t, int index = -1) = 0; virtual void Activate() = 0; virtual void DeActivate() = 0; @@ -101,13 +101,13 @@ public: virtual int GetNumSounds() const = 0; virtual plSound* GetSound(int i) const = 0; virtual int GetSoundIndex(const char *keyname) const = 0; - virtual void Init(hsBool isLocal){;} + virtual void Init(bool isLocal){;} virtual void SetVolume(const float volume,int index = -1) = 0; - virtual void SetMuted( hsBool muted, int index = -1 ) = 0; + virtual void SetMuted( bool muted, int index = -1 ) = 0; virtual void ToggleMuted( int index = -1 ) = 0; virtual void SetTalkIcon(int index, uint32_t str) = 0; virtual void ClearTalkIcon() = 0; - virtual void SetFilename(int index, const char *filename, hsBool isCompressed) = 0; // set filename for a streaming sound + virtual void SetFilename(int index, const char *filename, bool isCompressed) = 0; // set filename for a streaming sound virtual void SetFadeIn( const int type, const float length, int index = -1 ) = 0; virtual void SetFadeOut( const int type, const float length, int index = -1 ) = 0; diff --git a/Sources/Plasma/NucleusLib/inc/plDrawable.h b/Sources/Plasma/NucleusLib/inc/plDrawable.h index d0131024..f317bc11 100644 --- a/Sources/Plasma/NucleusLib/inc/plDrawable.h +++ b/Sources/Plasma/NucleusLib/inc/plDrawable.h @@ -143,19 +143,19 @@ public: CLASSNAME_REGISTER( plDrawable ); GETINTERFACE_ANY( plDrawable, hsKeyedObject ); - virtual plDrawable& SetProperty( int prop, hsBool on ) = 0; - virtual hsBool GetProperty( int prop ) const = 0; + virtual plDrawable& SetProperty( int prop, bool on ) = 0; + virtual bool GetProperty( int prop ) const = 0; - virtual plDrawable& SetProperty( uint32_t index, int prop, hsBool on ) = 0; - virtual hsBool GetProperty( uint32_t index, int prop ) const = 0; + virtual plDrawable& SetProperty( uint32_t index, int prop, bool on ) = 0; + virtual bool GetProperty( uint32_t index, int prop ) const = 0; - virtual plDrawable& SetNativeProperty( int prop, hsBool on ) = 0; - virtual hsBool GetNativeProperty( int prop ) const = 0; + virtual plDrawable& SetNativeProperty( int prop, bool on ) = 0; + virtual bool GetNativeProperty( int prop ) const = 0; - virtual plDrawable& SetNativeProperty( uint32_t index, int prop, hsBool on ) = 0; - virtual hsBool GetNativeProperty( uint32_t index, int prop ) const = 0; + virtual plDrawable& SetNativeProperty( uint32_t index, int prop, bool on ) = 0; + virtual bool GetNativeProperty( uint32_t index, int prop ) const = 0; - virtual plDrawable& SetSubType( uint32_t index, plSubDrawableType t, hsBool on ) = 0; + virtual plDrawable& SetSubType( uint32_t index, plSubDrawableType t, bool on ) = 0; virtual uint32_t GetSubType( uint32_t index ) const = 0; // returns or of all spans with this index (index==-1 is all spans). virtual uint32_t GetType( void ) const = 0; @@ -173,11 +173,11 @@ public: virtual const hsBounds3Ext& GetMaxWorldBounds( uint32_t index = (uint32_t)-1 ) const = 0; virtual plSpaceTree* GetSpaceTree() const = 0; - virtual void SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* reg, hsBool on) = 0; + virtual void SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* reg, bool on) = 0; // Taking span index. DI Index doesn't make sense here, because one object's DI can dereference into many materials etc. virtual hsGMaterial* GetSubMaterial(int index) const = 0; - virtual hsBool GetSubVisDists(int index, float& minDist, float& maxDist) const = 0; // return true if span invisible before minDist and/or after maxDist + virtual bool GetSubVisDists(int index, float& minDist, float& maxDist) const = 0; // return true if span invisible before minDist and/or after maxDist // Should implement hsKeyedObject Read/Write/Save/Load as well @@ -193,7 +193,7 @@ public: /// EXPORT-ONLY // Called by the sceneNode to determine if we match the criteria - virtual hsBool DoIMatch( const plDrawableCriteria& crit ) = 0; + virtual bool DoIMatch( const plDrawableCriteria& crit ) = 0; // Take the list of triMeshes and convert them to buffers, building a list of spans for each virtual void Optimize( void ) = 0; diff --git a/Sources/Plasma/NucleusLib/inc/plPhysical.h b/Sources/Plasma/NucleusLib/inc/plPhysical.h index 6239c457..fad12d6a 100644 --- a/Sources/Plasma/NucleusLib/inc/plPhysical.h +++ b/Sources/Plasma/NucleusLib/inc/plPhysical.h @@ -67,8 +67,8 @@ public: CLASSNAME_REGISTER(plPhysical); GETINTERFACE_ANY(plPhysical, plSynchedObject); - virtual plPhysical& SetProperty(int prop, hsBool b) = 0; - virtual hsBool GetProperty(int prop) const = 0; + virtual plPhysical& SetProperty(int prop, bool b) = 0; + virtual bool GetProperty(int prop) const = 0; virtual void SetObjectKey(plKey oKey) = 0; virtual plKey GetObjectKey() const = 0; @@ -77,11 +77,11 @@ public: virtual void SetSceneNode(plKey node) = 0; virtual plKey GetSceneNode() const = 0; - virtual hsBool GetLinearVelocitySim(hsVector3& vel) const = 0; + virtual bool GetLinearVelocitySim(hsVector3& vel) const = 0; virtual void SetLinearVelocitySim(const hsVector3& vel) = 0; virtual void ClearLinearVelocity() = 0; - virtual hsBool GetAngularVelocitySim(hsVector3& vel) const = 0; + virtual bool GetAngularVelocitySim(hsVector3& vel) const = 0; virtual void SetAngularVelocitySim(const hsVector3& vel) = 0; virtual void SetHitForce(const hsVector3& force, const hsPoint3& pos)=0; @@ -91,17 +91,17 @@ public: will be applied regardless. Set force to true if you don't want the transform to be ignored for any reason. Without it, this will ignore the incoming transform if it's the same one it sent out last time. */ - virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, hsBool force=false) = 0; + virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, bool force=false) = 0; virtual void GetTransform(hsMatrix44& l2w, hsMatrix44& w2l) = 0; // From plSimDefs::Group virtual int GetGroup() const = 0; // Flags in plSimDefs::plLOSDB - virtual void AddLOSDB(uint16_t flag) = 0; - virtual void RemoveLOSDB(uint16_t flag) = 0; + virtual void AddLOSDB(uint16_t flag) = 0; + virtual void RemoveLOSDB(uint16_t flag) = 0; virtual uint16_t GetAllLOSDBs() = 0; - virtual hsBool IsInLOSDB(uint16_t flag) = 0; + virtual bool IsInLOSDB(uint16_t flag) = 0; // Return the key of our subworld. May be a nil key. virtual plKey GetWorldKey() const = 0; @@ -114,7 +114,7 @@ public: If the simulation is a subworld, this will also factor in the subworld's transform. The sent transform is global. "isSynchUpdate" tells us if this is an update due to receiving remote state.*/ - virtual void SendNewLocation(hsBool synchTransform = false, hsBool isSynchUpdate = false) = 0; + virtual void SendNewLocation(bool synchTransform = false, bool isSynchUpdate = false) = 0; // For the physics SDL only. For Set, any of the values may be set to nil, if // they're not used. @@ -124,7 +124,7 @@ public: virtual float GetMass() = 0; // I wish I could think of a better way to do this, but this is how it's // going to be for now. - virtual void ExcludeRegionHack(hsBool cleared) = 0; + virtual void ExcludeRegionHack(bool cleared) = 0; virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray& idx, plDrawableSpans* addTo) = 0; }; diff --git a/Sources/Plasma/NucleusLib/inc/plPipeResReq.h b/Sources/Plasma/NucleusLib/inc/plPipeResReq.h index 2566b1f7..1c5f7550 100644 --- a/Sources/Plasma/NucleusLib/inc/plPipeResReq.h +++ b/Sources/Plasma/NucleusLib/inc/plPipeResReq.h @@ -53,7 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plPipeResReq { protected: - hsBool fReq; + bool fReq; plPipeResReq() : fReq(false) {} @@ -62,7 +62,7 @@ protected: public: static void Request() { PIPELOG("Request"); Instance().fReq = true; } - static hsBool Check() { PIPELOG("Check"); return Instance().fReq; } + static bool Check() { PIPELOG("Check"); return Instance().fReq; } static void Clear() { PIPELOG("Clear"); Instance().fReq = false; } }; diff --git a/Sources/Plasma/NucleusLib/inc/plPipeline.h b/Sources/Plasma/NucleusLib/inc/plPipeline.h index 374b5393..6c9c30cc 100644 --- a/Sources/Plasma/NucleusLib/inc/plPipeline.h +++ b/Sources/Plasma/NucleusLib/inc/plPipeline.h @@ -117,7 +117,7 @@ struct PipelineParams int Width; int Height; - hsBool Windowed; + bool Windowed; int ColorDepth; int AntiAliasingAmount; int AnisotropicLevel; @@ -125,9 +125,9 @@ struct PipelineParams int VideoQuality; int Shadows; int PlanarReflections; - hsBool VSync; + bool VSync; #ifndef PLASMA_EXTERNAL_RELEASE - hsBool ForceSecondMonitor; + bool ForceSecondMonitor; #endif // PLASMA_EXTERNAL_RELEASE }; @@ -152,12 +152,12 @@ public: // visList is write only. On output, visList is UNSORTED visible spans. // Called once per scene render (maybe multiple times per frame). // Returns true if rendering should proceed. - virtual hsBool PreRender(plDrawable* drawable, hsTArray& visList, plVisMgr* visMgr=nil) = 0; + virtual bool PreRender(plDrawable* drawable, hsTArray& visList, plVisMgr* visMgr=nil) = 0; // PrepForRender - perform any processing on the drawable data nessecary before rendering. // visList is read only. On input, visList is SORTED visible spans, and is ALL spans which will be drawn this render. // Called once per scene render. // Returns true if rendering should proceed. - virtual hsBool PrepForRender(plDrawable* drawable, hsTArray& visList, plVisMgr* visMgr=nil) = 0; + virtual bool PrepForRender(plDrawable* drawable, hsTArray& visList, plVisMgr* visMgr=nil) = 0; // Render - draw the drawable to the current render target. // visList is read only. On input, visList is SORTED visible spans. May not be the complete list of visible spans // for this drawable. @@ -177,8 +177,8 @@ public: virtual void CheckVertexBufferRef(plGBufferGroup* owner, uint32_t idx) = 0; virtual void CheckIndexBufferRef(plGBufferGroup* owner, uint32_t idx) = 0; - virtual hsBool OpenAccess(plAccessSpan& dst, plDrawableSpans* d, const plVertexSpan* span, hsBool readOnly) = 0; - virtual hsBool CloseAccess(plAccessSpan& acc) = 0; + virtual bool OpenAccess(plAccessSpan& dst, plDrawableSpans* d, const plVertexSpan* span, bool readOnly) = 0; + virtual bool CloseAccess(plAccessSpan& acc) = 0; virtual void CheckTextureRef(plLayerInterface* lay) = 0; @@ -220,37 +220,37 @@ public: virtual void ClearRenderTarget(const hsColorRGBA* col = nil, const float* depth = nil) = 0; // col/depth are overrides for current default. virtual void SetClear(const hsColorRGBA* col=nil, const float* depth=nil) = 0; // sets the default clear for current render target. virtual hsColorRGBA GetClearColor() const = 0; - virtual float GetClearDepth() const = 0; + virtual float GetClearDepth() const = 0; virtual hsGDeviceRef *MakeRenderTargetRef( plRenderTarget *owner ) = 0; virtual void PushRenderTarget( plRenderTarget *target ) = 0; virtual plRenderTarget *PopRenderTarget( void ) = 0; - virtual hsBool BeginRender() = 0; - virtual hsBool EndRender() = 0; + virtual bool BeginRender() = 0; + virtual bool EndRender() = 0; virtual void RenderScreenElements( void ) = 0; - virtual hsBool BeginDrawable(plDrawable* d) = 0; - virtual hsBool EndDrawable(plDrawable* d) = 0; + virtual bool BeginDrawable(plDrawable* d) = 0; + virtual bool EndDrawable(plDrawable* d) = 0; virtual void BeginVisMgr(plVisMgr* visMgr) = 0; virtual void EndVisMgr(plVisMgr* visMgr) = 0; - virtual hsBool IsFullScreen() const = 0; - virtual uint32_t Width() const = 0; - virtual uint32_t Height() const = 0; - virtual uint32_t ColorDepth() const = 0; + virtual bool IsFullScreen() const = 0; + virtual uint32_t Width() const = 0; + virtual uint32_t Height() const = 0; + virtual uint32_t ColorDepth() const = 0; virtual void Resize( uint32_t width, uint32_t height ) = 0; // Culling. Might be used in Update before bothering to do any serious computation. - virtual hsBool TestVisibleWorld(const hsBounds3Ext& wBnd) = 0; - virtual hsBool TestVisibleWorld(const plSceneObject* sObj) = 0; - virtual hsBool HarvestVisible(plSpaceTree* space, hsTArray& visList) = 0; - virtual hsBool SubmitOccluders(const hsTArray& polyList) = 0; + virtual bool TestVisibleWorld(const hsBounds3Ext& wBnd) = 0; + virtual bool TestVisibleWorld(const plSceneObject* sObj) = 0; + virtual bool HarvestVisible(plSpaceTree* space, hsTArray& visList) = 0; + virtual bool SubmitOccluders(const hsTArray& polyList) = 0; - virtual void SetDebugFlag( uint32_t flag, hsBool on ) = 0; - virtual hsBool IsDebugFlagSet( uint32_t flag ) const = 0; + virtual void SetDebugFlag( uint32_t flag, bool on ) = 0; + virtual bool IsDebugFlagSet( uint32_t flag ) const = 0; virtual void SetMaxCullNodes(uint16_t n) = 0; // Debug/analysis only - virtual uint16_t GetMaxCullNodes() const = 0; // Debug/analysis only + virtual uint16_t GetMaxCullNodes() const = 0; // Debug/analysis only // Properties enum Properties @@ -259,18 +259,18 @@ public: // MakeTextureRef, regardless of the kUserOwnsBitmap flag }; - virtual hsBool CheckResources() = 0; // Do we need to call LoadResources? + virtual bool CheckResources() = 0; // Do we need to call LoadResources? virtual void LoadResources() = 0; - virtual void SetProperty( uint32_t prop, hsBool on ) = 0; - virtual hsBool GetProperty( uint32_t prop ) const = 0; - virtual uint32_t GetMaxLayersAtOnce() const = 0; + virtual void SetProperty( uint32_t prop, bool on ) = 0; + virtual bool GetProperty( uint32_t prop ) const = 0; + virtual uint32_t GetMaxLayersAtOnce() const = 0; // Drawable type mask virtual void SetDrawableTypeMask( uint32_t mask ) = 0; - virtual uint32_t GetDrawableTypeMask( void ) const = 0; + virtual uint32_t GetDrawableTypeMask( void ) const = 0; virtual void SetSubDrawableTypeMask( uint32_t mask ) = 0; - virtual uint32_t GetSubDrawableTypeMask( void ) const = 0; + virtual uint32_t GetSubDrawableTypeMask( void ) const = 0; // View state virtual hsPoint3 GetViewPositionWorld() const = 0; @@ -289,7 +289,7 @@ public: virtual void SetDepth(float hither, float yon) = 0; virtual void SetZBiasScale( float scale ) = 0; - virtual float GetZBiasScale( void ) const = 0; + virtual float GetZBiasScale( void ) const = 0; virtual const hsMatrix44& GetWorldToCamera() const = 0; virtual const hsMatrix44& GetCameraToWorld() const = 0; @@ -311,16 +311,16 @@ public: virtual void PopOverrideMaterial(hsGMaterial* restore) = 0; virtual hsGMaterial* GetOverrideMaterial() const = 0; - virtual plLayerInterface* AppendLayerInterface(plLayerInterface* li, hsBool onAllLayers = false) = 0; - virtual plLayerInterface* RemoveLayerInterface(plLayerInterface* li, hsBool onAllLayers = false) = 0; + virtual plLayerInterface* AppendLayerInterface(plLayerInterface* li, bool onAllLayers = false) = 0; + virtual plLayerInterface* RemoveLayerInterface(plLayerInterface* li, bool onAllLayers = false) = 0; - virtual uint32_t GetMaterialOverrideOn(hsGMatState::StateIdx category) const = 0; - virtual uint32_t GetMaterialOverrideOff(hsGMatState::StateIdx category) const = 0; + virtual uint32_t GetMaterialOverrideOn(hsGMatState::StateIdx category) const = 0; + virtual uint32_t GetMaterialOverrideOff(hsGMatState::StateIdx category) const = 0; - virtual hsGMatState PushMaterialOverride(const hsGMatState& state, hsBool on) = 0; - virtual hsGMatState PushMaterialOverride(hsGMatState::StateIdx cat, uint32_t which, hsBool on) = 0; - virtual void PopMaterialOverride(const hsGMatState& restore, hsBool on) = 0; - virtual const hsGMatState& GetMaterialOverride(hsBool on) const = 0; + virtual hsGMatState PushMaterialOverride(const hsGMatState& state, bool on) = 0; + virtual hsGMatState PushMaterialOverride(hsGMatState::StateIdx cat, uint32_t which, bool on) = 0; + virtual void PopMaterialOverride(const hsGMatState& restore, bool on) = 0; + virtual const hsGMatState& GetMaterialOverride(bool on) const = 0; virtual hsColorOverride PushColorOverride(const hsColorOverride& over) = 0; virtual void PopColorOverride(const hsColorOverride& restore) = 0; @@ -330,13 +330,13 @@ public: virtual void SubmitClothingOutfit(plClothingOutfit* co) = 0; // These all return true if the gamma was successfully set. - virtual hsBool SetGamma(float eR, float eG, float eB) = 0; - virtual hsBool SetGamma(const uint16_t* const tabR, const uint16_t* const tabG, const uint16_t* const tabB) = 0; // len table = 256. - virtual hsBool SetGamma(float e) { return SetGamma(e, e, e); } - virtual hsBool SetGamma(const uint16_t* const table) { return SetGamma(table, table, table); } + virtual bool SetGamma(float eR, float eG, float eB) = 0; + virtual bool SetGamma(const uint16_t* const tabR, const uint16_t* const tabG, const uint16_t* const tabB) = 0; // len table = 256. + virtual bool SetGamma(float e) { return SetGamma(e, e, e); } + virtual bool SetGamma(const uint16_t* const table) { return SetGamma(table, table, table); } // flipVertical is for the AVI writer, which wants it's frames upside down - virtual hsBool CaptureScreen( plMipmap *dest, bool flipVertical = false, uint16_t desiredWidth = 0, uint16_t desiredHeight = 0 ) = 0; + virtual bool CaptureScreen( plMipmap *dest, bool flipVertical = false, uint16_t desiredWidth = 0, uint16_t desiredHeight = 0 ) = 0; // Returns an un-named (GetKey()==nil) mipmap same dimensions as targ. You are responsible for deleting said mipMap. virtual plMipmap* ExtractMipMap(plRenderTarget* targ) = 0; @@ -353,7 +353,7 @@ public: int GetDesktopColorDepth() { return fDesktopParams.ColorDepth; } PipelineParams *GetDefaultParams() { return &fDefaultPipeParams; } - virtual void ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool vSync = false ) = 0; + virtual void ResetDisplayDevice(int Width, int Height, int ColorDepth, bool Windowed, int NumAASamples, int MaxAnisotropicSamples, bool vSync = false ) = 0; static PipelineParams fDefaultPipeParams; static PipelineParams fInitialPipeParams; plDisplayMode fDesktopParams; diff --git a/Sources/Plasma/NucleusLib/inc/plProfile.h b/Sources/Plasma/NucleusLib/inc/plProfile.h index aca56ad4..aae50af6 100644 --- a/Sources/Plasma/NucleusLib/inc/plProfile.h +++ b/Sources/Plasma/NucleusLib/inc/plProfile.h @@ -159,8 +159,8 @@ protected: uint64_t fAvgTotal; uint32_t fLastAvg; uint32_t fMax; - hsBool fActive; - hsBool fRunning; + bool fActive; + bool fRunning; uint8_t fDisplayFlags; // Number of times EndTiming was called. Can be used to combine timing and counting in one timer @@ -168,7 +168,7 @@ protected: void IAddAvg(); - void IPrintValue(uint32_t value, char* buf, hsBool printType); + void IPrintValue(uint32_t value, char* buf, bool printType); public: plProfileBase(); @@ -181,15 +181,15 @@ public: uint32_t GetValue(); - void PrintValue(char* buf, hsBool printType=true); - void PrintAvg(char* buf, hsBool printType=true); - void PrintMax(char* buf, hsBool printType=true); + void PrintValue(char* buf, bool printType=true); + void PrintAvg(char* buf, bool printType=true); + void PrintMax(char* buf, bool printType=true); uint32_t GetTimerSamples() const { return fTimerSamples; } const char* GetName() { return fName; } - void SetActive(hsBool s) { fActive = s; } + void SetActive(bool s) { fActive = s; } void Stop() { fRunning = false; } void Start() { fRunning = true; } @@ -204,7 +204,7 @@ class plProfileVar : public plProfileBase protected: const char* fGroup; plProfileLaps* fLaps; - hsBool fLapsActive; + bool fLapsActive; plProfileVar() {} @@ -246,7 +246,7 @@ public: plProfileLaps* GetLaps() { return fLaps; } // Enable Lap Sampling - void SetLapsActive(hsBool s) { fLapsActive = s; } + void SetLapsActive(bool s) { fLapsActive = s; } }; #endif // plProfile_h_inc \ No newline at end of file diff --git a/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp b/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp index fd2b4b62..4e041c33 100644 --- a/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp +++ b/Sources/Plasma/NucleusLib/inc/plProfileManager.cpp @@ -98,7 +98,7 @@ static uint32_t GetProcSpeed() for (int i = 0; i < numKeys; i++) { HKEY thisKey = NULL; - hsBool success = (RegOpenKeyEx(hKey, keypath[i], 0, KEY_READ, &thisKey) == ERROR_SUCCESS); + bool success = (RegOpenKeyEx(hKey, keypath[i], 0, KEY_READ, &thisKey) == ERROR_SUCCESS); RegCloseKey(hKey); hKey = thisKey; @@ -108,7 +108,7 @@ static uint32_t GetProcSpeed() } DWORD value=0, size=sizeof(DWORD); - hsBool success = (RegQueryValueEx(hKey, "~MHz", 0, NULL, (BYTE*)&value, &size) == ERROR_SUCCESS); + bool success = (RegQueryValueEx(hKey, "~MHz", 0, NULL, (BYTE*)&value, &size) == ERROR_SUCCESS); RegCloseKey(hKey); return value*1000000; @@ -214,7 +214,7 @@ void plProfileManager::EndFrame() { gVarEFPS.EndTiming(); - hsBool updateAvgs = false; + bool updateAvgs = false; // If enough time has passed, update the averages double curTime = hsTimer::GetMilliSeconds(); @@ -334,7 +334,7 @@ static const char *insertCommas(unsigned int value) return str; } -void plProfileBase::IPrintValue(uint32_t value, char* buf, hsBool printType) +void plProfileBase::IPrintValue(uint32_t value, char* buf, bool printType) { if (hsCheckBits(fDisplayFlags, kDisplayCount)) { @@ -372,17 +372,17 @@ void plProfileBase::IPrintValue(uint32_t value, char* buf, hsBool printType) } } -void plProfileBase::PrintValue(char* buf, hsBool printType) +void plProfileBase::PrintValue(char* buf, bool printType) { IPrintValue(fValue, buf, printType); } -void plProfileBase::PrintAvg(char* buf, hsBool printType) +void plProfileBase::PrintAvg(char* buf, bool printType) { IPrintValue(fLastAvg, buf, printType); } -void plProfileBase::PrintMax(char* buf, hsBool printType) +void plProfileBase::PrintMax(char* buf, bool printType) { IPrintValue(fMax, buf, printType); } diff --git a/Sources/Plasma/NucleusLib/inc/plgDispatch.h b/Sources/Plasma/NucleusLib/inc/plgDispatch.h index 611750d4..c62a2061 100644 --- a/Sources/Plasma/NucleusLib/inc/plgDispatch.h +++ b/Sources/Plasma/NucleusLib/inc/plgDispatch.h @@ -62,19 +62,19 @@ public: virtual void UnRegisterAll(const plKey& receiver) = 0; - virtual hsBool MsgSend(plMessage* msg, hsBool async=false) = 0; + virtual bool MsgSend(plMessage* msg, bool async=false) = 0; virtual void MsgQueue(plMessage* msg)=0; // Used by other thread to Send Messages, they are handled as soon as Practicable virtual void MsgQueueProcess() = 0; - virtual void MsgQueueOnOff(hsBool) = 0; // Turn on or off Queued Messages, if off, uses MsgSend Immediately (for plugins) + virtual void MsgQueueOnOff(bool) = 0; // Turn on or off Queued Messages, if off, uses MsgSend Immediately (for plugins) - virtual hsBool SetMsgBuffering(hsBool on) = 0; // On starts deferring msg delivery until buffering is set to off again. + virtual bool SetMsgBuffering(bool on) = 0; // On starts deferring msg delivery until buffering is set to off again. }; class plgDispatch { public: static plDispatchBase* Dispatch(); - static hsBool MsgSend(plMessage* msg, hsBool async = false) { return Dispatch()->MsgSend(msg, async); } + static bool MsgSend(plMessage* msg, bool async = false) { return Dispatch()->MsgSend(msg, async); } }; diff --git a/Sources/Plasma/NucleusLib/inc/pnSingletons.cpp b/Sources/Plasma/NucleusLib/inc/pnSingletons.cpp index 4c44bdb2..41ec7212 100644 --- a/Sources/Plasma/NucleusLib/inc/pnSingletons.cpp +++ b/Sources/Plasma/NucleusLib/inc/pnSingletons.cpp @@ -51,7 +51,7 @@ plDispatchBase* plgDispatch::Dispatch() return hsgResMgr::Dispatch(); } -hsBool hsgResMgr::Init(hsResMgr* m) +bool hsgResMgr::Init(hsResMgr* m) { hsRefCnt_SafeAssign(fResMgr, m); hsRefCnt_SafeUnRef(m); diff --git a/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h b/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h index 4d22c11e..b2dae81d 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h +++ b/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h @@ -171,7 +171,7 @@ enum EConnType { kNumConnTypes }; -COMPILER_ASSERT_HEADER(EConnType, kNumConnTypes < 256); +static_assert(kNumConnTypes <= 0xFF, "EConnType overflows uint8"); #define IS_TEXT_CONNTYPE(c) \ (((int)(c)) == kConnTypeAdminInterface) diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp index c7d63d53..b693e0e1 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp @@ -583,7 +583,7 @@ void CSocket::OnWriteReady () { &m_sendQueue[result], m_sendQueue.Bytes() - result ); - COMPILER_ASSERT(sizeof(m_sendQueue[0]) == sizeof(uint8_t)); + static_assert(sizeof(m_sendQueue[0]) == sizeof(uint8_t), "SendQueue array members are an unexpected size"); m_sendQueue.SetCount(m_sendQueue.Count() - result); } diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp index 04ac913c..518e2411 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp @@ -235,7 +235,7 @@ void AsyncSleep (unsigned sleepMs) { //============================================================================ long AsyncPerfGetCounter (unsigned id) { - COMPILER_ASSERT(arrsize(s_perf) == kNumAsyncPerfCounters); + static_assert(arrsize(s_perf) == kNumAsyncPerfCounters, "Max async counters and array size do not match."); ASSERT(id < kNumAsyncPerfCounters); return s_perf[id]; } diff --git a/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp b/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp index 59b3cd81..ff124551 100644 --- a/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp +++ b/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp @@ -85,7 +85,7 @@ public: }; int32_t plDispatch::fNumBufferReq = 0; -hsBool plDispatch::fMsgActive = false; +bool plDispatch::fMsgActive = false; plMsgWrap* plDispatch::fMsgCurrent = nil; plMsgWrap* plDispatch::fMsgHead = nil; plMsgWrap* plDispatch::fMsgTail = nil; @@ -166,7 +166,7 @@ plMsgWrap* plDispatch::IDequeue(plMsgWrap** head, plMsgWrap** tail) return retVal; } -hsBool plDispatch::ISortToDeferred(plMessage* msg) +bool plDispatch::ISortToDeferred(plMessage* msg) { plMsgWrap* msgWrap = new plMsgWrap(msg); if( !fFutureMsgQueue ) @@ -213,7 +213,7 @@ void plDispatch::ICheckDeferred(double secs) plgDispatch::Dispatch()->UnRegisterForExactType(plTimeMsg::Index(), IGetOwnerKey()); } -hsBool plDispatch::IListeningForExactType(uint16_t hClass) +bool plDispatch::IListeningForExactType(uint16_t hClass) { if( (hClass == plTimeMsg::Index()) && fFutureMsgQueue ) return true; @@ -221,7 +221,7 @@ hsBool plDispatch::IListeningForExactType(uint16_t hClass) return false; } -void plDispatch::IMsgEnqueue(plMsgWrap* msgWrap, hsBool async) +void plDispatch::IMsgEnqueue(plMsgWrap* msgWrap, bool async) { fMsgCurrentMutex.Lock(); @@ -242,7 +242,7 @@ void plDispatch::IMsgEnqueue(plMsgWrap* msgWrap, hsBool async) } // On starts deferring msg delivery until buffering is set to off again. -hsBool plDispatch::SetMsgBuffering(hsBool on) +bool plDispatch::SetMsgBuffering(bool on) { fMsgCurrentMutex.Lock(); if( on ) @@ -292,7 +292,7 @@ void plDispatch::IMsgDispatch() fMsgCurrentMutex.Unlock(); plMessage* msg = fMsgCurrent->fMsg; - hsBool nonLocalMsg = msg && msg->HasBCastFlag(plMessage::kNetNonLocal); + bool nonLocalMsg = msg && msg->HasBCastFlag(plMessage::kNetNonLocal); #ifdef HS_DEBUGGING int watchIdx = fMsgWatch.Find(msg); @@ -412,7 +412,7 @@ void plDispatch::IMsgDispatch() // // returns true if msg has been consumed and deleted // -hsBool plDispatch::IMsgNetPropagate(plMessage* msg) +bool plDispatch::IMsgNetPropagate(plMessage* msg) { fMsgCurrentMutex.Lock(); @@ -452,7 +452,7 @@ hsBool plDispatch::IMsgNetPropagate(plMessage* msg) return false; } -hsBool plDispatch::MsgSend(plMessage* msg, hsBool async) +bool plDispatch::MsgSend(plMessage* msg, bool async) { if( IMsgNetPropagate(msg) ) return true; @@ -498,7 +498,7 @@ hsBool plDispatch::MsgSend(plMessage* msg, hsBool async) return true; } -void plDispatch::MsgQueueOnOff(hsBool sw) +void plDispatch::MsgQueueOnOff(bool sw) { fQueuedMsgOn = sw; } @@ -574,7 +574,7 @@ void plDispatch::UnRegisterForType(uint16_t hClass, const plKey& receiver) } -hsBool plDispatch::IUnRegisterForExactType(int idx, const plKey& receiver) +bool plDispatch::IUnRegisterForExactType(int idx, const plKey& receiver) { hsAssert(idx < fRegisteredExactTypes.GetCount(), "Out of range should be filtered before call to internal"); plTypeFilter* filt = fRegisteredExactTypes[idx]; diff --git a/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.h b/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.h index 01a9d28a..7bfb1e31 100644 --- a/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.h +++ b/Sources/Plasma/NucleusLib/pnDispatch/plDispatch.h @@ -80,32 +80,32 @@ protected: static hsMutex fMsgDispatchLock; // mutex for IMsgDispatch static plMsgWrap* fMsgHead; static plMsgWrap* fMsgTail; - static hsBool fMsgActive; + static bool fMsgActive; static hsTArray fMsgWatch; static MsgRecieveCallback fMsgRecieveCallback; hsTArray fRegisteredExactTypes; std::list fQueuedMsgList; hsMutex fQueuedMsgListMutex; // mutex for above - hsBool fQueuedMsgOn; // Turns on or off Queued Messages, Plugins need them off + bool fQueuedMsgOn; // Turns on or off Queued Messages, Plugins need them off hsKeyedObject* IGetOwner() { return fOwner; } plKey IGetOwnerKey() { return IGetOwner() ? IGetOwner()->GetKey() : nil; } int IFindType(uint16_t hClass); int IFindSender(const plKey& sender); - hsBool IUnRegisterForExactType(int idx, const plKey& receiver); + bool IUnRegisterForExactType(int idx, const plKey& receiver); static plMsgWrap* IInsertToQueue(plMsgWrap** back, plMsgWrap* isert); static plMsgWrap* IDequeue(plMsgWrap** head, plMsgWrap** tail); - hsBool IMsgNetPropagate(plMessage* msg); + bool IMsgNetPropagate(plMessage* msg); static void IMsgDispatch(); - static void IMsgEnqueue(plMsgWrap* msgWrap, hsBool async); + static void IMsgEnqueue(plMsgWrap* msgWrap, bool async); - hsBool ISortToDeferred(plMessage* msg); + bool ISortToDeferred(plMessage* msg); void ICheckDeferred(double stamp); - hsBool IListeningForExactType(uint16_t hClass); + bool IListeningForExactType(uint16_t hClass); void ITrashUndelivered(); // Just pitches them, doesn't try to deliver. @@ -124,12 +124,12 @@ public: virtual void UnRegisterAll(const plKey& receiver); - virtual hsBool MsgSend(plMessage* msg, hsBool async=false); + virtual bool MsgSend(plMessage* msg, bool async=false); virtual void MsgQueue(plMessage* msg); // Used by other thread to Send Messages, they are handled as soon as Practicable virtual void MsgQueueProcess(); - virtual void MsgQueueOnOff(hsBool ); // Turn on or off Queued Messages, if off, uses MsgSend Immediately + virtual void MsgQueueOnOff(bool ); // Turn on or off Queued Messages, if off, uses MsgSend Immediately - virtual hsBool SetMsgBuffering(hsBool on); // On starts deferring msg delivery until buffering is set to off again. + virtual bool SetMsgBuffering(bool on); // On starts deferring msg delivery until buffering is set to off again. static void SetMsgRecieveCallback(MsgRecieveCallback callback) { fMsgRecieveCallback = callback; } }; @@ -145,7 +145,7 @@ public: virtual void UnRegisterForType(uint16_t hClass, const plKey& receiver) {} - virtual hsBool MsgSend(plMessage* msg) { return true; } + virtual bool MsgSend(plMessage* msg) { return true; } virtual void MsgQueue(plMessage* msg) {} virtual void MsgQueueProcess() {} diff --git a/Sources/Plasma/NucleusLib/pnEncryption/plChecksum.h b/Sources/Plasma/NucleusLib/pnEncryption/plChecksum.h index a42529f1..16fff204 100644 --- a/Sources/Plasma/NucleusLib/pnEncryption/plChecksum.h +++ b/Sources/Plasma/NucleusLib/pnEncryption/plChecksum.h @@ -64,7 +64,7 @@ class hsStream; class plMD5Checksum { protected: - hsBool fValid; + bool fValid; MD5_CTX fContext; uint8_t fChecksum[MD5_DIGEST_LENGTH]; @@ -75,7 +75,7 @@ class plMD5Checksum plMD5Checksum(const char *fileName); plMD5Checksum(hsStream* stream); - hsBool IsValid() const { return fValid; } + bool IsValid() const { return fValid; } void Clear(); void CalcFromFile(const char *fileName); @@ -108,8 +108,8 @@ typedef uint8_t ShaDigest[SHA_DIGEST_LENGTH]; class plSHAChecksum { protected: - hsBool fValid; - SHA_CTX fContext; + bool fValid; + SHA_CTX fContext; ShaDigest fChecksum; public: @@ -119,7 +119,7 @@ class plSHAChecksum plSHAChecksum(const char* fileName); plSHAChecksum(hsStream* stream); - hsBool IsValid() const { return fValid; } + bool IsValid() const { return fValid; } void Clear(); void CalcFromFile(const char* fileName); @@ -147,8 +147,8 @@ class plSHAChecksum class plSHA1Checksum { protected: - hsBool fValid; - SHA_CTX fContext; + bool fValid; + SHA_CTX fContext; ShaDigest fChecksum; public: @@ -158,7 +158,7 @@ class plSHA1Checksum plSHA1Checksum(const char* fileName); plSHA1Checksum(hsStream* stream); - hsBool IsValid() const { return fValid; } + bool IsValid() const { return fValid; } void Clear(); void CalcFromFile(const char* fileName); diff --git a/Sources/Plasma/NucleusLib/pnFactory/plCreatable.h b/Sources/Plasma/NucleusLib/pnFactory/plCreatable.h index d81d8e49..f83e1456 100644 --- a/Sources/Plasma/NucleusLib/pnFactory/plCreatable.h +++ b/Sources/Plasma/NucleusLib/pnFactory/plCreatable.h @@ -57,8 +57,8 @@ public: virtual const char* ClassName() const = 0; virtual plCreatable* GetInterface(uint16_t hClass) { return nil; } virtual const plCreatable* GetConstInterface(uint16_t hClass) const { return nil; } - static hsBool HasBaseClass(uint16_t hBase) { return false; } - virtual uint16_t ClassIndex() const = 0; + static bool HasBaseClass(uint16_t hBase) { return false; } + virtual uint16_t ClassIndex() const = 0; virtual void Read(hsStream* s, hsResMgr* mgr) {} virtual void Write(hsStream* s, hsResMgr* mgr) {} @@ -194,13 +194,13 @@ public: \ hsRefCnt_SafeRef(retVal); \ return retVal; \ } \ - static hsBool HasDerivedClass(uint16_t hDer) { \ + static bool HasDerivedClass(uint16_t hDer) { \ return plFactory::DerivesFrom(plClassName##ClassIndex, hDer); \ } \ friend class plClassName##__Creator; #define GETINTERFACE_ANY( plClassName, plBaseName ) \ -static hsBool HasBaseClass(uint16_t hBaseClass) { \ +static bool HasBaseClass(uint16_t hBaseClass) { \ if( hBaseClass == plClassName##ClassIndex ) \ return true; \ else \ @@ -220,7 +220,7 @@ virtual const plCreatable* GetConstInterface(uint16_t hClass) const { \ } #define GETINTERFACE_EXACT( plClassName ) \ - static hsBool HasBaseClass(uint16_t hBaseClass) { \ + static bool HasBaseClass(uint16_t hBaseClass) { \ return hBaseClass == plClassName##ClassIndex; \ } \ virtual plCreatable* GetInterface(uint16_t hClass) { \ @@ -231,7 +231,7 @@ virtual const plCreatable* GetConstInterface(uint16_t hClass) const { \ } #define GETINTERFACE_NONE( plClassName ) \ -static hsBool HasBaseClass(uint16_t hBaseClass) { return false; } \ +static bool HasBaseClass(uint16_t hBaseClass) { return false; } \ virtual plCreatable* GetInterface(uint16_t hClass) { \ return nil; \ } \ @@ -243,7 +243,7 @@ virtual const plCreatable* GetConstInterface(uint16_t hClass) const { \ // Macro for converting to base class OR a class member // #define GETINTERFACE_ANY_AUX( plClassName, plBaseName, plAuxClassName, plAuxClassMember ) \ -static hsBool HasBaseClass(uint16_t hBaseClass) { \ +static bool HasBaseClass(uint16_t hBaseClass) { \ if( hBaseClass == plClassName##ClassIndex ) \ return true; \ else \ @@ -269,7 +269,7 @@ virtual const plCreatable* GetConstInterface(uint16_t hClass) const { \ } #define plBeginInterfaceMap( plClassName, plBaseName ) \ -static hsBool HasBaseClass(uint16_t hBaseClass) { \ +static bool HasBaseClass(uint16_t hBaseClass) { \ if( hBaseClass == plClassName##ClassIndex ) \ return true; \ else \ diff --git a/Sources/Plasma/NucleusLib/pnFactory/plCreator.h b/Sources/Plasma/NucleusLib/pnFactory/plCreator.h index 7733bb86..6f606390 100644 --- a/Sources/Plasma/NucleusLib/pnFactory/plCreator.h +++ b/Sources/Plasma/NucleusLib/pnFactory/plCreator.h @@ -58,10 +58,10 @@ public: plCreator() { } virtual ~plCreator() { } - virtual plCreatable* Create() const = 0; - virtual uint16_t ClassIndex() = 0; - virtual const char* ClassName() const = 0; - virtual hsBool HasBaseClass(uint16_t hBase) = 0; + virtual plCreatable* Create() const = 0; + virtual uint16_t ClassIndex() = 0; + virtual const char* ClassName() const = 0; + virtual bool HasBaseClass(uint16_t hBase) = 0; friend class plFactory; }; @@ -81,7 +81,7 @@ public: plFactory::UnRegister(CLASS_INDEX_SCOPED(plClassName), this); \ } \ \ - virtual hsBool HasBaseClass(uint16_t hBase) { return plClassName::HasBaseClass(hBase); } \ + virtual bool HasBaseClass(uint16_t hBase) { return plClassName::HasBaseClass(hBase); } \ \ virtual uint16_t ClassIndex() { return CLASS_INDEX_SCOPED(plClassName); } \ virtual const char* ClassName() const { return #plClassName; } \ @@ -107,7 +107,7 @@ public: plFactory::UnRegister(CLASS_INDEX_SCOPED(plClassName), this); \ } \ \ - virtual hsBool HasBaseClass(uint16_t hBase) { return plClassName::HasBaseClass(hBase); } \ + virtual bool HasBaseClass(uint16_t hBase) { return plClassName::HasBaseClass(hBase); } \ \ virtual uint16_t ClassIndex() { return CLASS_INDEX_SCOPED(plClassName); } \ virtual const char* ClassName() const { return #plClassName; } \ @@ -140,7 +140,7 @@ public: plFactory::UnRegister(EXTERN_CLASS_INDEX_SCOPED(plClassName), this); \ } \ \ - virtual hsBool HasBaseClass(uint16_t hBase) { return plClassName::HasBaseClass(hBase); } \ + virtual bool HasBaseClass(uint16_t hBase) { return plClassName::HasBaseClass(hBase); } \ \ virtual uint16_t ClassIndex() { return EXTERN_CLASS_INDEX_SCOPED(plClassName); } \ virtual const char* ClassName() const { return #plClassName; } \ @@ -172,7 +172,7 @@ public: plFactory::UnRegister(EXTERN_CLASS_INDEX_SCOPED(plClassName), this); \ } \ \ - virtual hsBool HasBaseClass(uint16_t hBase) { return plClassName::HasBaseClass(hBase); } \ + virtual bool HasBaseClass(uint16_t hBase) { return plClassName::HasBaseClass(hBase); } \ \ virtual uint16_t ClassIndex() { return EXTERN_CLASS_INDEX_SCOPED(plClassName); } \ virtual const char* ClassName() const { return #plClassName; } \ diff --git a/Sources/Plasma/NucleusLib/pnFactory/plFactory.cpp b/Sources/Plasma/NucleusLib/pnFactory/plFactory.cpp index c9fab9f5..fee42362 100644 --- a/Sources/Plasma/NucleusLib/pnFactory/plFactory.cpp +++ b/Sources/Plasma/NucleusLib/pnFactory/plFactory.cpp @@ -63,7 +63,7 @@ plFactory::~plFactory() { } -hsBool plFactory::ICreateTheFactory() +bool plFactory::ICreateTheFactory() { if( theFactory ) return true; @@ -178,7 +178,7 @@ uint16_t plFactory::GetNumClasses() return theFactory->IGetNumClasses(); } -hsBool plFactory::IDerivesFrom(uint16_t hBase, uint16_t hDer) +bool plFactory::IDerivesFrom(uint16_t hBase, uint16_t hDer) { if( hDer >= fCreators.GetCount() ) return false; @@ -186,7 +186,7 @@ hsBool plFactory::IDerivesFrom(uint16_t hBase, uint16_t hDer) return fCreators[hDer] ? fCreators[hDer]->HasBaseClass(hBase) : false; } -hsBool plFactory::DerivesFrom(uint16_t hBase, uint16_t hDer) +bool plFactory::DerivesFrom(uint16_t hBase, uint16_t hDer) { if( !theFactory && !ICreateTheFactory() ) return 0; @@ -214,12 +214,12 @@ uint16_t plFactory::FindClassIndex(const char* className) } -hsBool plFactory::IIsValidClassIndex(uint16_t hClass) +bool plFactory::IIsValidClassIndex(uint16_t hClass) { return ( hClass < fCreators.GetCount() ); } -hsBool plFactory::IsValidClassIndex(uint16_t hClass) +bool plFactory::IsValidClassIndex(uint16_t hClass) { return theFactory->IIsValidClassIndex(hClass); } @@ -316,7 +316,7 @@ void plFactory::IValidate(uint16_t keyIndex) int FactoryIndex = GetNumClasses(); - hsBool bogus = false; + bool bogus = false; for(int iter=0; iter < FactoryIndex; iter++) { diff --git a/Sources/Plasma/NucleusLib/pnFactory/plFactory.h b/Sources/Plasma/NucleusLib/pnFactory/plFactory.h index b55f26c1..eca4c8ec 100644 --- a/Sources/Plasma/NucleusLib/pnFactory/plFactory.h +++ b/Sources/Plasma/NucleusLib/pnFactory/plFactory.h @@ -63,13 +63,13 @@ private: void IForceShutdown(); void IUnRegister(uint16_t hClass); uint16_t IRegister(uint16_t hClass, plCreator* worker); - hsBool IIsEmpty(); + bool IIsEmpty(); uint16_t IGetNumClasses(); plCreatable* ICreate(uint16_t hClass); - hsBool IDerivesFrom(uint16_t hBase, uint16_t hDer); - hsBool IIsValidClassIndex(uint16_t hClass); + bool IDerivesFrom(uint16_t hBase, uint16_t hDer); + bool IIsValidClassIndex(uint16_t hClass); - static hsBool ICreateTheFactory(); + static bool ICreateTheFactory(); static void IShutdown(); plFactory(); @@ -88,13 +88,13 @@ public: static bool CanCreate(uint16_t hClass); // return true if creator exists. doesn't assert static plCreatable* Create(uint16_t hClass); - static hsBool DerivesFrom(uint16_t hBase, uint16_t hDer); + static bool DerivesFrom(uint16_t hBase, uint16_t hDer); static uint16_t GetNumClasses(); static uint16_t FindClassIndex(const char* className); // slow lookup for things like console - static hsBool IsValidClassIndex(uint16_t hClass); + static bool IsValidClassIndex(uint16_t hClass); // Don't call this unless you're a DLL being initialized. static void SetTheFactory(plFactory* fac); diff --git a/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp b/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp index 37196432..9601ad71 100644 --- a/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp +++ b/Sources/Plasma/NucleusLib/pnInputCore/plInputMap.cpp @@ -99,7 +99,7 @@ plKeyCombo::plKeyCombo() fFlags = 0; } -hsBool plKeyCombo::IsSatisfiedBy(const plKeyCombo &combo) const +bool plKeyCombo::IsSatisfiedBy(const plKeyCombo &combo) const { if (fKey != combo.fKey) return false; @@ -164,7 +164,7 @@ void plKeyBinding::ClearKeys( void ) fKey1 = fKey2 = plKeyCombo::kUnmapped; } -hsBool plKeyBinding::HasUnmappedKey() const +bool plKeyBinding::HasUnmappedKey() const { return fKey1.fKey == KEY_UNMAPPED || fKey2.fKey == KEY_UNMAPPED; } @@ -196,7 +196,7 @@ void plKeyMap::ClearAll( void ) // Adds a given control code to the map. Once you add it, you can't change its flags. // Returns false if the code is already present -hsBool plKeyMap::AddCode( ControlEventCode code, uint32_t codeFlags ) +bool plKeyMap::AddCode( ControlEventCode code, uint32_t codeFlags ) { if( IFindBinding( code ) != nil ) return false; @@ -209,7 +209,7 @@ hsBool plKeyMap::AddCode( ControlEventCode code, uint32_t codeFlags ) // Same but for console commands. No flags b/c console commands always use // the same flags. -hsBool plKeyMap::AddConsoleCommand( const char *command ) +bool plKeyMap::AddConsoleCommand( const char *command ) { if( IFindConsoleBinding( command ) != nil ) return false; @@ -265,7 +265,7 @@ void plKeyMap::IFindAllBindingsByKey(const plKeyCombo &combo, hsTArrayGetKey1().IsSatisfiedBy(combo); s2 = fBindings[i]->GetKey2().IsSatisfiedBy(combo); if (s1 || s2) @@ -351,7 +351,7 @@ void plKeyMap::IActuallyBind( plKeyBinding *binding, const plKeyCombo &combo, // Adds a key binding to a given code. Returns false if the code isn't in // this map or if key is already mapped. -hsBool plKeyMap::BindKey( const plKeyCombo &combo, ControlEventCode code, BindPref pref /*= kNoPreference*/ ) +bool plKeyMap::BindKey( const plKeyCombo &combo, ControlEventCode code, BindPref pref /*= kNoPreference*/ ) { plKeyBinding* binding = nil; @@ -380,7 +380,7 @@ hsBool plKeyMap::BindKey( const plKeyCombo &combo, ControlEventCode code, BindP //// BindKeyToConsoleCmd ///////////////////////////////////////////////////// // Console command version -hsBool plKeyMap::BindKeyToConsoleCmd( const plKeyCombo &combo, const char *command, BindPref pref /*= kNoPreference*/ ) +bool plKeyMap::BindKeyToConsoleCmd( const plKeyCombo &combo, const char *command, BindPref pref /*= kNoPreference*/ ) { plKeyBinding* binding = nil; diff --git a/Sources/Plasma/NucleusLib/pnInputCore/plKeyMap.h b/Sources/Plasma/NucleusLib/pnInputCore/plKeyMap.h index 2588024b..31cafe2b 100644 --- a/Sources/Plasma/NucleusLib/pnInputCore/plKeyMap.h +++ b/Sources/Plasma/NucleusLib/pnInputCore/plKeyMap.h @@ -79,10 +79,10 @@ class plKeyCombo plKeyCombo(); plKeyCombo( plKeyDef k, uint8_t flags = 0 ) : fKey( k ), fFlags( flags ) { } - hsBool IsSatisfiedBy(const plKeyCombo &combo) const; + bool IsSatisfiedBy(const plKeyCombo &combo) const; - hsBool operator==( const plKeyCombo &rhs ) const { return ( fKey == rhs.fKey ) && ( fFlags == rhs.fFlags ); } - hsBool operator!=( const plKeyCombo &rhs ) const { return ( fKey != rhs.fKey ) || ( fFlags != rhs.fFlags ); } + bool operator==( const plKeyCombo &rhs ) const { return ( fKey == rhs.fKey ) && ( fFlags == rhs.fFlags ); } + bool operator!=( const plKeyCombo &rhs ) const { return ( fKey != rhs.fKey ) || ( fFlags != rhs.fFlags ); } }; //// For the Particularly Lazy... //////////////////////////////////////////// @@ -135,7 +135,7 @@ class plKeyBinding void SetKey1( const plKeyCombo &newCombo ); void SetKey2( const plKeyCombo &newCombo ); void ClearKeys( void ); - hsBool HasUnmappedKey() const; + bool HasUnmappedKey() const; }; //// plKeyMap //////////////////////////////////////////////////////////////// @@ -172,17 +172,17 @@ class plKeyMap : public plInputMap virtual ~plKeyMap(); // Adds a given control code to the map. Once you add it, you can't change its flags. Returns false if the code is already present - hsBool AddCode( ControlEventCode code, uint32_t codeFlags ); + bool AddCode( ControlEventCode code, uint32_t codeFlags ); // Same but for console commands. No flags b/c console commands always use the same flags - hsBool AddConsoleCommand( const char *command ); + bool AddConsoleCommand( const char *command ); // Adds a key binding to a given code. Returns false if the code isn't in this map or if key is already mapped. - hsBool BindKey( const plKeyCombo &combo, ControlEventCode code, BindPref pref = kNoPreference ); + bool BindKey( const plKeyCombo &combo, ControlEventCode code, BindPref pref = kNoPreference ); // Console command version - hsBool BindKeyToConsoleCmd( const plKeyCombo &combo, const char *command, BindPref pref = kNoPreference ); + bool BindKeyToConsoleCmd( const plKeyCombo &combo, const char *command, BindPref pref = kNoPreference ); // Searches for the binding for a given code. Returns nil if not found diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.cpp index 2562d456..e6a729b0 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.cpp @@ -59,7 +59,7 @@ void hsKeyedObject::SetKey(plKey k) ((plKeyImp*)fpKey)->SetObjectPtr(this); } -hsBool hsKeyedObject::SendRef(plRefMsg* refMsg, plRefFlags::Type flags) +bool hsKeyedObject::SendRef(plRefMsg* refMsg, plRefFlags::Type flags) { plKey key = GetKey(); // for linux build return hsgResMgr::SendRef(key, refMsg, flags); @@ -174,7 +174,7 @@ void hsKeyedObject::Write(hsStream* s, hsResMgr* mgr) mgr->WriteKey(s, fpKey); } -hsBool hsKeyedObject::MsgReceive(plMessage* msg) +bool hsKeyedObject::MsgReceive(plMessage* msg) { plSelfDestructMsg* nuke = plSelfDestructMsg::ConvertNoRef(msg); if (nuke) diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.h b/Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.h index 2efd15b5..f7233df8 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.h +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.h @@ -65,17 +65,17 @@ public: plString GetKeyName() const; virtual void Validate(); - virtual hsBool IsFinal() { return true; }; // experimental; currently "is ready to process Loads" + virtual bool IsFinal() { return true; }; // experimental; currently "is ready to process Loads" virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); //---------------------- // Send a reference to GetKey() via enclosed message. See plKey::SendRef() //---------------------- - hsBool SendRef(plRefMsg* refMsg, plRefFlags::Type flags); + bool SendRef(plRefMsg* refMsg, plRefFlags::Type flags); //---------------------------------------- // Fixed key functions diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp index 4443099b..fa39c127 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp @@ -66,7 +66,7 @@ struct plKeySeed uint16_t fType; plString fObj; - hsBool Match( plKeySeed *p ) + bool Match( plKeySeed *p ) { if( ( fType == p->fType ) && p->fObj.Compare( fObj, plString::kCaseInsensitive ) == 0 ) { diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp index d9266005..ba31300f 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.cpp @@ -143,13 +143,13 @@ plKey::plKey(const plKey& rhs) : fKeyData(rhs.fKeyData) IIncRef(); } -plKey::plKey(plKeyData* data, hsBool ignore) : fKeyData(data) +plKey::plKey(plKeyData* data, bool ignore) : fKeyData(data) { #if TRACK_REFS // FOR DEBUGGING ONLY if( IsTracked(fKeyData) ) { char msg[ 512 ]; - sprintf( msg, "C: Key %s %s is being constructed using the plKey(plKeyData*, hsBool) constructor", keyNameToLookFor, CloneString(fKeyData) ); + sprintf( msg, "C: Key %s %s is being constructed using the plKey(plKeyData*, bool) constructor", keyNameToLookFor, CloneString(fKeyData) ); //hsAssert( false, msg ); hsStatusMessageF(msg); } @@ -208,12 +208,12 @@ plKey &plKey::operator=( const plKey &rhs ) return *this; } -hsBool plKey::operator==( const plKey &rhs ) const +bool plKey::operator==( const plKey &rhs ) const { return fKeyData == rhs.fKeyData; } -hsBool plKey::operator==( const plKeyData *rhs ) const +bool plKey::operator==( const plKeyData *rhs ) const { return fKeyData == rhs; } diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.h b/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.h index 5e8c1ebc..c46323c1 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.h +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.h @@ -67,10 +67,10 @@ public: ~plKey(); plKey& operator=(const plKey& rhs); - hsBool operator==(const plKey& rhs) const; - hsBool operator==(const plKeyData* rhs) const; - hsBool operator!=(const plKey& rhs) const { return !(*this == rhs); } - hsBool operator!=(const plKeyData* rhs) const { return !(*this == rhs); } + bool operator==(const plKey& rhs) const; + bool operator==(const plKeyData* rhs) const; + bool operator!=(const plKey& rhs) const { return !(*this == rhs); } + bool operator!=(const plKeyData* rhs) const { return !(*this == rhs); } plKeyData* operator->() const; plKeyData& operator*() const; @@ -86,7 +86,7 @@ protected: void IDecRef(); // Internal constructor, extra param is to distinguish it from the void* constructor - plKey(plKeyData* data, hsBool ignore); + plKey(plKeyData* data, bool ignore); }; //// plKeyData /////////////////////////////////////////////////////////////// diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp index 7400f8a3..9ecae204 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp @@ -66,9 +66,11 @@ static uint32_t CalcKeySize(plKeyImp* key) static const char* kObjName = "GUI_District_OptionsMenuGUI"; static uint16_t kClassType = CLASS_INDEX_SCOPED(plSceneNode); static uint32_t kCloneID = 0; -hsBool IsTrackedKey(const plKeyImp* key) +bool IsTrackedKey(const plKeyImp* key) { - return hsStrEQ(key->GetName(), kObjName) && key->GetUoid().GetClassType() == kClassType && key->GetUoid().GetCloneID() == kCloneID; + return (strcmp(key->GetName(), kObjName) == 0) && + key->GetUoid().GetClassType() == kClassType && + key->GetUoid().GetCloneID() == kCloneID; } #endif @@ -601,7 +603,7 @@ void plKeyImp::IRelease(plKeyImp* iTargetKey) // Inspect the target key to find whether it is supposed to send a message // to me on destruction, and to find out if I have an active of passive // ref on this key. Not sure why I don't track my own active/passive ref states - hsBool isActive = false; + bool isActive = false; int iTarg = -1; for (int i = 0; (iTarg < 0) && (i < iTargetKey->GetNumNotifyCreated()); i++) { diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.h b/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.h index c0f89655..5b0d070e 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.h +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.h @@ -142,10 +142,10 @@ protected: uint16_t IncActiveRefs() { return ++fNumActiveRefs; } uint16_t DecActiveRefs() { return fNumActiveRefs ? --fNumActiveRefs : 0; } - hsBool IsActiveRef(int i) const { return fActiveRefs.IsBitSet(i) != 0; } - void SetActiveRef(int i, hsBool on=true) { fActiveRefs.SetBit(i, on); } - hsBool IsNotified(int i) const { return fNotified.IsBitSet(i) != 0; } - void SetNotified(int i, hsBool on=true) { fNotified.SetBit(i, on); } + bool IsActiveRef(int i) const { return fActiveRefs.IsBitSet(i) != 0; } + void SetActiveRef(int i, bool on=true) { fActiveRefs.SetBit(i, on); } + bool IsNotified(int i) const { return fNotified.IsBitSet(i) != 0; } + void SetNotified(int i, bool on=true) { fNotified.SetBit(i, on); } void SatisfyPending(plRefMsg* msg) const; void SatisfyPending() const; diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.cpp index d1b46e00..76aa5a7b 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.cpp @@ -56,7 +56,7 @@ class plForwardCallback public: hsTArray fOrigReceivers; int fNumCallbacks; - hsBool fNetPropogate; + bool fNetPropogate; }; plMsgForwarder::plMsgForwarder() @@ -96,7 +96,7 @@ void plMsgForwarder::Write(hsStream* s, hsResMgr* mgr) mgr->WriteKey(s, fForwardKeys[i]); } -hsBool plMsgForwarder::MsgReceive(plMessage* msg) +bool plMsgForwarder::MsgReceive(plMessage* msg) { // Self destruct messages are for us only plSelfDestructMsg *selfMsg = plSelfDestructMsg::ConvertNoRef(msg); @@ -112,7 +112,7 @@ hsBool plMsgForwarder::MsgReceive(plMessage* msg) return true; } -hsBool plMsgForwarder::IForwardCallbackMsg(plMessage *msg) +bool plMsgForwarder::IForwardCallbackMsg(plMessage *msg) { // Only process as a callback message if it is one, AND it has callbacks plMessageWithCallbacks *callbackMsg = plMessageWithCallbacks::ConvertNoRef(msg); @@ -172,7 +172,7 @@ hsBool plMsgForwarder::IForwardCallbackMsg(plMessage *msg) fCallbacks.erase(eventMsg); plUoid uoid = GetKey()->GetUoid(); - hsBool locallyOwned = (plNetClientApp::GetInstance()->IsLocallyOwned(uoid) != plSynchedObject::kNo); + bool locallyOwned = (plNetClientApp::GetInstance()->IsLocallyOwned(uoid) != plSynchedObject::kNo); // If the callback was originally net propagated, and we own this forwarder, net propagate the callback if (fc->fNetPropogate && locallyOwned) diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.h b/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.h index ee8e6a59..e367da82 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.h +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plMsgForwarder.h @@ -59,7 +59,7 @@ protected: CallbackMap fCallbacks; void IForwardMsg(plMessage *msg); - hsBool IForwardCallbackMsg(plMessage *msg); + bool IForwardCallbackMsg(plMessage *msg); public: plMsgForwarder(); @@ -71,7 +71,7 @@ public: void Read(hsStream* s, hsResMgr* mgr); void Write(hsStream* s, hsResMgr* mgr); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void AddForwardKey(plKey key); }; diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plReceiver.h b/Sources/Plasma/NucleusLib/pnKeyedObject/plReceiver.h index f3004c5f..5f2e1ca4 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plReceiver.h +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plReceiver.h @@ -55,7 +55,7 @@ public: CLASSNAME_REGISTER( plReceiver ); GETINTERFACE_ANY( plReceiver, plCreatable ); - virtual hsBool MsgReceive(plMessage* msg) { return false; } + virtual bool MsgReceive(plMessage* msg) { return false; } }; #endif // plReceiver_inc diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp index c5707d25..9e070e18 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp @@ -87,22 +87,22 @@ void plLocation::Invalidate() fFlags = 0; // Set to kInvalid? } -hsBool plLocation::IsValid() const +bool plLocation::IsValid() const { return (fSequenceNumber == kInvalidLocIdx) ? false : true; } -hsBool plLocation::IsReserved() const +bool plLocation::IsReserved() const { return hsCheckBits(fFlags, kReserved); } -hsBool plLocation::IsItinerant() const +bool plLocation::IsItinerant() const { return hsCheckBits(fFlags, kItinerant); } -hsBool plLocation::IsVirtual() const +bool plLocation::IsVirtual() const { // This returns whether the location is "virtual", i.e. isn't a true room per se. Like fixed keys if (fSequenceNumber == kGlobalFixedLocIdx) @@ -226,7 +226,7 @@ void plUoid::Invalidate() } -hsBool plUoid::IsValid() const +bool plUoid::IsValid() const { if (!fLocation.IsValid() || fObjectName.IsNull()) return false; @@ -234,7 +234,7 @@ hsBool plUoid::IsValid() const return true; } -hsBool plUoid::operator==(const plUoid& u) const +bool plUoid::operator==(const plUoid& u) const { return fLocation == u.fLocation && fLoadMask == u.fLoadMask diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h b/Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h index e6707e52..2c0b8051 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h @@ -105,27 +105,27 @@ public: plLocation(const plLocation& toCopyFrom); ~plLocation() {} - void Invalidate(); - hsBool IsValid() const; - hsBool IsReserved() const; - hsBool IsItinerant() const; - void Set(uint32_t seqNum); + void Invalidate(); + bool IsValid() const; + bool IsReserved() const; + bool IsItinerant() const; + void Set(uint32_t seqNum); uint32_t GetSequenceNumber() const { return fSequenceNumber; } - hsBool IsVirtual() const; + bool IsVirtual() const; - void SetFlags(uint16_t flags) { fFlags |= flags; } + void SetFlags(uint16_t flags) { fFlags |= flags; } uint16_t GetFlags() const { return fFlags; } void Read(hsStream* s); void Write(hsStream* s) const; - hsBool operator==(const plLocation& loc) const + bool operator==(const plLocation& loc) const { // Ignore the itinerant flag when comparing, because return (fSequenceNumber == loc.fSequenceNumber) && ((fFlags & ~kItinerant) == (loc.fFlags & ~kItinerant)); } - hsBool operator!=(const plLocation& loc) const { return !(loc == *this); } + bool operator!=(const plLocation& loc) const { return !(loc == *this); } plLocation& operator=(const plLocation& loc); bool operator<(const plLocation& loc ) const { return fSequenceNumber < loc.fSequenceNumber; } @@ -164,13 +164,13 @@ public: void Write(hsStream* s) const; void Invalidate(); - hsBool IsValid() const; + bool IsValid() const; plUoid& operator=(const plUoid& u); - hsBool operator==(const plUoid& u) const; - hsBool operator!=(const plUoid& u) const { return !operator==(u); } + bool operator==(const plUoid& u) const; + bool operator!=(const plUoid& u) const { return !operator==(u); } - hsBool IsClone() const { return fCloneID != 0; } + bool IsClone() const { return fCloneID != 0; } uint32_t GetClonePlayerID() const { return fClonePlayerID; } uint32_t GetCloneID() const { return fCloneID; } void SetClone(uint32_t playerID, uint32_t cloneID) { hsAssert(cloneID < 0xffff, "Clone id too high"); fCloneID = uint16_t(cloneID); fClonePlayerID = playerID; } diff --git a/Sources/Plasma/NucleusLib/pnMessage/plAudioSysMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plAudioSysMsg.h index 47a26189..73aa8e62 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plAudioSysMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plAudioSysMsg.h @@ -53,7 +53,7 @@ class plAudioSysMsg : public plMessage { int fAudFlag; plKey pObj; - hsBool fBoolFlag; + bool fBoolFlag; public: enum { @@ -87,8 +87,8 @@ public: plKey GetSceneObject() { return pObj; } void SetSceneObject(plKey &k) { pObj = k; } - hsBool GetBoolFlag() { return fBoolFlag; } - void SetBoolFlag( hsBool b ) { fBoolFlag = b; } + bool GetBoolFlag() { return fBoolFlag; } + void SetBoolFlag( bool b ) { fBoolFlag = b; } // IO void Read(hsStream* stream, hsResMgr* mgr) diff --git a/Sources/Plasma/NucleusLib/pnMessage/plCameraMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plCameraMsg.h index 6b05d010..2d564a63 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plCameraMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plCameraMsg.h @@ -79,9 +79,9 @@ public: kFOV = 0x0004, }; - int fType; + int fType; - hsPoint3 fOffset; + hsPoint3 fOffset; float fAccel; float fDecel; float fVel; @@ -89,7 +89,7 @@ public: float fFPDecel; float fFPVel; float fFOVw, fFOVh; - hsBool fWorldspace; + bool fWorldspace; void Read(hsStream* stream); void Write(hsStream* stream); @@ -101,15 +101,15 @@ class plCameraTargetFadeMsg : public plMessage protected: plKey fSubject; - hsBool fFadeOut; + bool fFadeOut; public: - plKey GetSubjectKey() { return fSubject; } + plKey GetSubjectKey() const { return fSubject; } void SetSubjectKey(const plKey &x) { fSubject = x; } - hsBool FadeOut() { return fFadeOut; } - void SetFadeOut(hsBool b) { fFadeOut = b; } + bool FadeOut() const { return fFadeOut; } + void SetFadeOut(bool b) { fFadeOut = b; } plCameraTargetFadeMsg(){;} @@ -136,16 +136,16 @@ protected: plPipeline* fPipe; plCameraConfig fConfig; - hsBool fActivated; + bool fActivated; public: - plKey GetNewCam() { return fNewCam; } - plKey GetTriggerer() { return fTriggerer; } - double GetTransTime() { return fTransTime; } - plSceneObject* GetSubject() { return fSubject; } - plPipeline* GetPipeline() { return fPipe; } - hsBool GetActivated() { return fActivated; } + plKey GetNewCam() const { return fNewCam; } + plKey GetTriggerer() const { return fTriggerer; } + double GetTransTime() const { return fTransTime; } + plSceneObject* GetSubject() const { return fSubject; } + plPipeline* GetPipeline() const { return fPipe; } + bool GetActivated() const { return fActivated; } plCameraConfig* GetConfig() { return &fConfig; } void SetNewCam(const plKey &x) { fNewCam = x; } @@ -153,7 +153,7 @@ public: void SetTransTime(double x) { fTransTime = x; } void SetSubject(plSceneObject* x) { fSubject = x; } void SetPipeline(plPipeline* x) { fPipe = x; } - void SetActivated(hsBool x) { fActivated = x; } + void SetActivated(bool x) { fActivated = x; } plCameraMsg(); plCameraMsg(const plKey &s, @@ -212,7 +212,7 @@ public: hsBitVector fCmd; - hsBool Cmd(int n) { return fCmd.IsBitSet(n); } + bool Cmd(int n) const { return fCmd.IsBitSet(n); } void SetCmd(int n) { fCmd.SetBit(n); } void ClearCmd() { fCmd.Clear(); } void ClearCmd(int n) { fCmd.ClearBit(n); } @@ -230,20 +230,20 @@ class plIfaceFadeAvatarMsg : public plMessage protected: plKey fSubject; - hsBool fFadeOut; - hsBool fEnable, fDisable; + bool fFadeOut; + bool fEnable, fDisable; public: - plKey GetSubjectKey() { return fSubject; } + plKey GetSubjectKey() const { return fSubject; } void SetSubjectKey(const plKey &x) { fSubject = x; } - hsBool FadeOut() { return fFadeOut; } - void SetFadeOut(hsBool b) { fFadeOut = b; } + bool FadeOut() const { return fFadeOut; } + void SetFadeOut(bool b) { fFadeOut = b; } void Enable() { fEnable = true; } void Disable() { fDisable = true; } - hsBool GetEnable() { return fEnable; } - hsBool GetDisable() { return fDisable; } + bool GetEnable() const { return fEnable; } + bool GetDisable() const { return fDisable; } plIfaceFadeAvatarMsg() : fEnable(false),fDisable(false){;} plIfaceFadeAvatarMsg(const plKey &s, diff --git a/Sources/Plasma/NucleusLib/pnMessage/plClientMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plClientMsg.h index 196a09cc..508f06e4 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plClientMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plClientMsg.h @@ -70,10 +70,10 @@ class plClientMsg : public plMessage int fWidth; int fHeight; int fColorDepth; - hsBool fWindowed; + bool fWindowed; int fNumAASamples; int fMaxAnisoSamples; - hsBool fVSync; + bool fVSync; }; diff --git a/Sources/Plasma/NucleusLib/pnMessage/plCmdIfaceModMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plCmdIfaceModMsg.h index a422c2ea..7cdf6fa6 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plCmdIfaceModMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plCmdIfaceModMsg.h @@ -83,7 +83,7 @@ public: uint32_t fControlCode; int fIndex; - hsBool Cmd(int n) { return fCmd.IsBitSet(n); } + bool Cmd(int n) { return fCmd.IsBitSet(n); } void SetCmd(int n) { fCmd.SetBit(n); } void ClearCmd() { fCmd.Clear(); } void ClearCmd(int n) { fCmd.ClearBit(n); } diff --git a/Sources/Plasma/NucleusLib/pnMessage/plCorrectionMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plCorrectionMsg.h index 424a6801..e84eb331 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plCorrectionMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plCorrectionMsg.h @@ -50,7 +50,7 @@ class plCorrectionMsg : public plMessage { public: plCorrectionMsg() : plMessage(nil, nil, nil) { } - plCorrectionMsg(plKey &r, const hsMatrix44& l2w, const hsMatrix44& w2l, hsBool dirtySynch = false) + plCorrectionMsg(plKey &r, const hsMatrix44& l2w, const hsMatrix44& w2l, bool dirtySynch = false) : plMessage(nil, r, nil), fLocalToWorld(l2w), fWorldToLocal(w2l), @@ -63,7 +63,7 @@ public: hsMatrix44 fLocalToWorld; hsMatrix44 fWorldToLocal; - hsBool fDirtySynch; + bool fDirtySynch; // IO void Read(hsStream* stream, hsResMgr* mgr) diff --git a/Sources/Plasma/NucleusLib/pnMessage/plEnableMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plEnableMsg.h index f9a7a7f0..887e0db7 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plEnableMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plEnableMsg.h @@ -66,13 +66,13 @@ public: hsBitVector fCmd; hsBitVector fTypes; - hsBool Cmd(int n) const { return fCmd.IsBitSet(n); } + bool Cmd(int n) const { return fCmd.IsBitSet(n); } void SetCmd(int n) { fCmd.SetBit(n); } void ClearCmd() { fCmd.Clear(); } void AddType(uint16_t t) { fTypes.SetBit(t); } void RemoveType(uint16_t t) { fTypes.ClearBit(t); } - hsBool Type(uint16_t t) const { return fTypes.IsBitSet(t); } + bool Type(uint16_t t) const { return fTypes.IsBitSet(t); } const hsBitVector& Types() const { return fTypes; } plEnableMsg() { } diff --git a/Sources/Plasma/NucleusLib/pnMessage/plFakeOutMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plFakeOutMsg.h index 0ad2dcdf..155e5b83 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plFakeOutMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plFakeOutMsg.h @@ -72,7 +72,7 @@ public: hsBitVector fCmd; - hsBool Cmd(int n) { return fCmd.IsBitSet(n); } + bool Cmd(int n) const { return fCmd.IsBitSet(n); } void SetCmd(int n) { fCmd.SetBit(n); } void ClearCmd() { fCmd.Clear(); } void ClearCmd(int n) { fCmd.ClearBit(n); } diff --git a/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp b/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp index 5796fe6a..1bf58f29 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp +++ b/Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp @@ -100,14 +100,14 @@ plMessage& plMessage::AddReceivers(const hsTArray& rList) return *this; } -hsBool plMessage::Send(const plKey r, hsBool async) +bool plMessage::Send(const plKey r, bool async) { if( r ) AddReceiver(r); return plgDispatch::MsgSend(this,async); } -hsBool plMessage::SendAndKeep(const plKey r, hsBool async) +bool plMessage::SendAndKeep(const plKey r, bool async) { Ref(); return Send(r, async); @@ -367,11 +367,10 @@ int plMsgXtlStringHelper::Peek(xtl::istring & stringref, hsStream* stream, const // STATIC int plMsgCStringHelper::Poke(const char * str, hsStream* stream, const uint32_t peekOptions) { - plMessage::plStrLen strlen; - strlen = (str)?hsStrlen(str):0; - stream->WriteLE(strlen); + plMessage::plStrLen len = (str) ? strlen(str) : 0; + stream->WriteLE(len); if (strlen) - stream->Write(strlen,str); + stream->Write(len,str); return stream->GetPosition(); } diff --git a/Sources/Plasma/NucleusLib/pnMessage/plMessage.h b/Sources/Plasma/NucleusLib/pnMessage/plMessage.h index a9bc47b2..d0f841ba 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plMessage.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plMessage.h @@ -132,14 +132,14 @@ public: plMessage& AddReceiver(const plKey &r); plMessage& AddReceivers(const hsTArray& rList); - hsBool Send(const plKey r=nil, hsBool async=false); // Message will self-destruct after send. - hsBool SendAndKeep(const plKey r=nil, hsBool async=false); // Message won't self-destruct after send. + bool Send(const plKey r=nil, bool async=false); // Message will self-destruct after send. + bool SendAndKeep(const plKey r=nil, bool async=false); // Message won't self-destruct after send. double GetTimeStamp() const { return fTimeStamp; } plMessage& SetTimeStamp(double t) { fTimeStamp = t; return *this; } - hsBool HasBCastFlag(uint32_t f) const { return 0 != (fBCastFlags & f); } - plMessage& SetBCastFlag(uint32_t f, hsBool on=true) { if( on )fBCastFlags |= f; else fBCastFlags &= ~f; return *this; } + bool HasBCastFlag(uint32_t f) const { return 0 != (fBCastFlags & f); } + plMessage& SetBCastFlag(uint32_t f, bool on=true) { if( on )fBCastFlags |= f; else fBCastFlags &= ~f; return *this; } void SetAllBCastFlags(uint32_t f) { fBCastFlags=f; } uint32_t GetAllBCastFlags() const { return fBCastFlags; } diff --git a/Sources/Plasma/NucleusLib/pnMessage/plMessageWithCallbacks.h b/Sources/Plasma/NucleusLib/pnMessage/plMessageWithCallbacks.h index a4d2f887..514468b7 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plMessageWithCallbacks.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plMessageWithCallbacks.h @@ -75,7 +75,7 @@ public: #if 0 // returns true if ok to send in a networked situations - static hsBool NetOKToSend(plSynchedObject* sender, plEventCallbackMsg* cbmsg); + static bool NetOKToSend(plSynchedObject* sender, plEventCallbackMsg* cbmsg); #endif // IO diff --git a/Sources/Plasma/NucleusLib/pnMessage/plMultiModMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plMultiModMsg.h index 2c4b0c03..a4ad2da0 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plMultiModMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plMultiModMsg.h @@ -70,7 +70,7 @@ public: hsBitVector fCmd; - hsBool Cmd(int n) { return fCmd.IsBitSet(n); } + bool Cmd(int n) { return fCmd.IsBitSet(n); } void SetCmd(int n) { fCmd.SetBit(n); } void ClearCmd() { fCmd.Clear(); } diff --git a/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp b/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp index 4636326e..f29bb387 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp +++ b/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp @@ -226,7 +226,7 @@ void plNotifyMsg::AddEvent( proEventData* ed ) // NOTE: To test for duplicate record, it only checks for records of the same type // : Eventually, it might be wise to check if the same 'self' key also? // -void plNotifyMsg::AddCollisionEvent( hsBool enter, const plKey &other, const plKey &self, hsBool onlyOneCollision ) +void plNotifyMsg::AddCollisionEvent( bool enter, const plKey &other, const plKey &self, bool onlyOneCollision ) { // if this is the normal case of there can only be one collision, then get rid of any others if ( onlyOneCollision ) @@ -376,7 +376,7 @@ void plNotifyMsg::AddSpawnedEvent (const plKey &spawner, const plKey &spawnee) // NOTE: To test for duplicate record, it only checks for records of the same type // : Eventually, it might be wise to check if the same 'self' key also? // -void plNotifyMsg::AddActivateEvent( hsBool activate ) +void plNotifyMsg::AddActivateEvent( bool activate ) { // remove records that are like the one being added int num_recs = fEvents.GetCount(); @@ -417,7 +417,7 @@ void plNotifyMsg::AddActivateEvent( hsBool activate ) // NOTE: To test for duplicate record, it only checks for records of the same type // : Eventually, it might be wise to check if the same 'self' key also? // -void plNotifyMsg::AddPickEvent( const plKey &other, const plKey& self, hsBool enabled, hsPoint3 hitPoint ) +void plNotifyMsg::AddPickEvent( const plKey &other, const plKey& self, bool enabled, hsPoint3 hitPoint ) { // remove records that are like the one being added @@ -462,7 +462,7 @@ void plNotifyMsg::AddPickEvent( const plKey &other, const plKey& self, hsBool en // NOTE: To test for duplicate record, it only checks for records of the same type // : Eventually, it might be wise to check if the same 'self' key also? // -void plNotifyMsg::AddContainerEvent( const plKey &container, const plKey &contained, hsBool entering ) +void plNotifyMsg::AddContainerEvent( const plKey &container, const plKey &contained, bool entering ) { // remove records that are like the one being added @@ -508,7 +508,7 @@ void plNotifyMsg::AddContainerEvent( const plKey &container, const plKey &contai // NOTE: To test for duplicate record, it only checks for records of the same type // : Eventually, it might be wise to check if the same 'self' key also? // -void plNotifyMsg::AddFacingEvent( const plKey &other, const plKey &self, float dot, hsBool enabled ) +void plNotifyMsg::AddFacingEvent( const plKey &other, const plKey &self, float dot, bool enabled ) { // remove records that are like the one being added @@ -552,7 +552,7 @@ void plNotifyMsg::AddFacingEvent( const plKey &other, const plKey &self, float d // NOTE: To test for duplicate record, it only checks for records of the same type // : Eventually, it might be wise to check if the same 'self' key also? // -void plNotifyMsg::AddControlKeyEvent( int32_t key, hsBool down ) +void plNotifyMsg::AddControlKeyEvent( int32_t key, bool down ) { // remove records that are like the one being added int num_recs = fEvents.GetCount(); diff --git a/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.h index 29072beb..2b233db8 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.h @@ -128,7 +128,7 @@ protected: #define proEventType(type) class pro##type##EventData : public proEventData { public: pro##type##EventData() : proEventData( k##type ) {IInit();} virtual ~pro##type##EventData(){IDestruct();} proEventType(Collision) - hsBool fEnter; // entering? (false is exit) + bool fEnter; // entering? (false is exit) plKey fHitter; // collision hitter (other probably player) plKey fHittee; // collision hittee (probably us) @@ -143,7 +143,7 @@ protected: proEventType(Picked) plKey fPicker; // who picked it (problably player) plKey fPicked; // object that was picked - hsBool fEnabled; // pick (true) or un-pick (false) + bool fEnabled; // pick (true) or un-pick (false) hsPoint3 fHitPoint; // where on the picked object that it was picked on protected: @@ -168,7 +168,7 @@ protected: proEventType(ControlKey) int32_t fControlKey; // what control key was hit - hsBool fDown; // was the key going down (false if going up) + bool fDown; // was the key going down (false if going up) protected: virtual void IRead(hsStream* stream, hsResMgr* mgr); @@ -207,7 +207,7 @@ proEventType(Facing) plKey fFacer; // what was facing plKey fFacee; // what was being faced float dot; // the dot prod of their view vectors - hsBool enabled; // Now meets facing requirement (true) or no longer meets requirement (false) + bool enabled; // Now meets facing requirement (true) or no longer meets requirement (false) protected: virtual void IRead(hsStream* stream, hsResMgr* mgr); @@ -220,7 +220,7 @@ protected: proEventType(Contained) plKey fContained; // who's inside of plKey fContainer; // this containing volume - hsBool fEntering; // entering volume (true) or exiting (false) + bool fEntering; // entering volume (true) or exiting (false) protected: virtual void IRead(hsStream* stream, hsResMgr* mgr); @@ -231,8 +231,8 @@ protected: }; proEventType(Activate) - hsBool fActive; // Whether or not to use the data in this field - hsBool fActivate; // the data + bool fActive; // Whether or not to use the data in this field + bool fActivate; // the data protected: virtual void IRead(hsStream* stream, hsResMgr* mgr); @@ -372,16 +372,16 @@ public: // event records for the notify message void AddEvent( proEventData* ed); - void AddCollisionEvent( hsBool enter, const plKey &other, const plKey &self, hsBool onlyOneCollision=true ); - void AddPickEvent( const plKey &other, const plKey& self, hsBool enabled, hsPoint3 hitPoint ); - void AddControlKeyEvent( int32_t key, hsBool down ); + void AddCollisionEvent( bool enter, const plKey &other, const plKey &self, bool onlyOneCollision=true ); + void AddPickEvent( const plKey &other, const plKey& self, bool enabled, hsPoint3 hitPoint ); + void AddControlKeyEvent( int32_t key, bool down ); void AddVariableEvent( const char* name, float number ); void AddVariableEvent( const char* name, int number ); void AddVariableEvent( const char* name ); void AddVariableEvent( const char *name, const plKey &key ); - void AddFacingEvent( const plKey &other, const plKey &self, float dot, hsBool enabled); - void AddContainerEvent( const plKey &container, const plKey &contained, hsBool entering); - void AddActivateEvent( hsBool activate ); + void AddFacingEvent( const plKey &other, const plKey &self, float dot, bool enabled); + void AddContainerEvent( const plKey &container, const plKey &contained, bool entering); + void AddActivateEvent( bool activate ); void AddCallbackEvent( int32_t event ); void AddResponderStateEvent( int32_t state ); void AddMultiStageEvent( int32_t stage, int32_t event, const plKey& avatar ); diff --git a/Sources/Plasma/NucleusLib/pnMessage/plPipeResMakeMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plPipeResMakeMsg.h index 7054a4b6..f39cccb2 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plPipeResMakeMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plPipeResMakeMsg.h @@ -83,14 +83,14 @@ class plPipeGeoMakeMsg : public plPipeResMakeMsg { public: plPipeGeoMakeMsg() : plPipeResMakeMsg(), fDefault(false) { } - plPipeGeoMakeMsg(plPipeline* pipe, hsBool def) : plPipeResMakeMsg(pipe), fDefault(def) { } + plPipeGeoMakeMsg(plPipeline* pipe, bool def) : plPipeResMakeMsg(pipe), fDefault(def) { } ~plPipeGeoMakeMsg() {} CLASSNAME_REGISTER( plPipeGeoMakeMsg ); GETINTERFACE_ANY( plPipeGeoMakeMsg, plPipeResMakeMsg ); - hsBool fDefault; + bool fDefault; }; class plPipeTexMakeMsg : public plPipeResMakeMsg diff --git a/Sources/Plasma/NucleusLib/pnMessage/plPlayerPageMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plPlayerPageMsg.h index ad4d642f..30052f66 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plPlayerPageMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plPlayerPageMsg.h @@ -64,10 +64,10 @@ public: plKey fPlayer; - hsBool fLocallyOriginated; - hsBool fUnload; + bool fLocallyOriginated; + bool fUnload; int fClientID; - hsBool fLastOut; + bool fLastOut; // IO void Read(hsStream* stream, hsResMgr* mgr) diff --git a/Sources/Plasma/NucleusLib/pnMessage/plSingleModMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plSingleModMsg.h index 75f9c497..89185161 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plSingleModMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plSingleModMsg.h @@ -70,7 +70,7 @@ public: hsBitVector fCmd; - hsBool Cmd(int n) { return fCmd.IsBitSet(n); } + bool Cmd(int n) { return fCmd.IsBitSet(n); } void SetCmd(int n) { fCmd.SetBit(n); } void ClearCmd() { fCmd.Clear(); } diff --git a/Sources/Plasma/NucleusLib/pnMessage/plSoundMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plSoundMsg.h index 4b7762ff..13949a2e 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plSoundMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plSoundMsg.h @@ -91,18 +91,18 @@ public: hsBitVector fCmd; - hsBool Cmd(int n) const { return fCmd.IsBitSet(n); } + bool Cmd(int n) const { return fCmd.IsBitSet(n); } void SetCmd(int n) { fCmd.SetBit(n); } void ClearCmd(); double fBegin; double fEnd; - hsBool fLoop; + bool fLoop; float fSpeed; double fTime; int fIndex; int fRepeats; - hsBool fPlaying; + bool fPlaying; uint32_t fNameStr; float fVolume; // Range: 0 - silence, 1.f - loudest diff --git a/Sources/Plasma/NucleusLib/pnModifier/plConditionalObject.h b/Sources/Plasma/NucleusLib/pnModifier/plConditionalObject.h index 227aebef..12980576 100644 --- a/Sources/Plasma/NucleusLib/pnModifier/plConditionalObject.h +++ b/Sources/Plasma/NucleusLib/pnModifier/plConditionalObject.h @@ -54,8 +54,8 @@ class plConditionalObject : public hsKeyedObject private: // since 'this' is not derived from synchedObject, its synched values must be associated // with it's logicModifier (which is a synchedObject). Thus it's a synched value 'friend'. - hsBool bSatisfied; - hsBool fToggle; + bool bSatisfied; + bool fToggle; public: enum { @@ -65,7 +65,7 @@ public: protected: plLogicModBase* fLogicMod; hsBitVector fFlags; - hsBool fReset; + bool fReset; public: plConditionalObject(); virtual ~plConditionalObject(); @@ -78,23 +78,23 @@ public: virtual void SetLogicMod(plLogicModBase* pMod) { fLogicMod = pMod; } -// virtual hsBool MsgReceive(plMessage* msg) = 0; +// virtual bool MsgReceive(plMessage* msg) = 0; - virtual hsBool Satisfied() { if(HasFlag(kNOT)) return !bSatisfied; else return bSatisfied; } - void SetSatisfied(hsBool b) { bSatisfied=b; } - hsBool IsToggle() { return fToggle; } - void SetToggle(hsBool b) { fToggle = b; } + virtual bool Satisfied() { if(HasFlag(kNOT)) return !bSatisfied; else return bSatisfied; } + void SetSatisfied(bool b) { bSatisfied=b; } + bool IsToggle() { return fToggle; } + void SetToggle(bool b) { fToggle = b; } // this is used if condtiton 1 is dependent on another condition's state at the // time of a message coming into condition 1; - virtual hsBool Verify(plMessage* msg) { return true; } + virtual bool Verify(plMessage* msg) { return true; } virtual void Evaluate() = 0; virtual void Reset() = 0; - virtual hsBool ResetOnTrigger() { return fReset; } + virtual bool ResetOnTrigger() { return fReset; } - hsBool HasFlag(int f) const { return fFlags.IsBitSet(f); } + bool HasFlag(int f) const { return fFlags.IsBitSet(f); } void SetFlag(int f) { fFlags.SetBit(f); } void ClearFlag(int which) { fFlags.ClearBit( which ); } diff --git a/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp b/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp index 064e09ad..f7285ae6 100644 --- a/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp +++ b/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.cpp @@ -132,7 +132,7 @@ void plLogicModBase::IUpdateSharedState(bool triggered) const triggered ? "Triggered" : "UnTriggered", hsTimer::GetSysSeconds()); } -hsBool plLogicModBase::MsgReceive(plMessage* msg) +bool plLogicModBase::MsgReceive(plMessage* msg) { // read messages: plServerReplyMsg* pSMsg = plServerReplyMsg::ConvertNoRef(msg); @@ -159,7 +159,7 @@ hsBool plLogicModBase::MsgReceive(plMessage* msg) } else { - hsBool netRequest=false; // we're triggering as a result of a local activation + bool netRequest=false; // we're triggering as a result of a local activation PreTrigger(netRequest); IUpdateSharedState(false /* untriggering */); } @@ -185,7 +185,7 @@ hsBool plLogicModBase::MsgReceive(plMessage* msg) return plSingleModifier::MsgReceive(msg); } -void plLogicModBase::RequestTrigger(hsBool netRequest) +void plLogicModBase::RequestTrigger(bool netRequest) { if (HasFlag(kTriggered)) { @@ -225,7 +225,7 @@ void plLogicModBase::RequestTrigger(hsBool netRequest) // // return false is counter test fails // -hsBool plLogicModBase::IEvalCounter() +bool plLogicModBase::IEvalCounter() { if (fCounterLimit > 0) { @@ -239,7 +239,7 @@ hsBool plLogicModBase::IEvalCounter() return true; } -void plLogicModBase::PreTrigger(hsBool netRequest) +void plLogicModBase::PreTrigger(bool netRequest) { if (fDisabled) return; @@ -247,7 +247,7 @@ void plLogicModBase::PreTrigger(hsBool netRequest) Trigger(netRequest); } -void plLogicModBase::Trigger(hsBool netRequest) +void plLogicModBase::Trigger(bool netRequest) { #if 1 plNetClientApp::GetInstance()->DebugMsg("LogicModifier %s is triggering, activatorType=%d\n", @@ -323,7 +323,7 @@ void plLogicModBase::Read(hsStream* stream, hsResMgr* mgr) fNotify = pNMsg; fFlags.Read(stream); - fDisabled = stream->Readbool(); + fDisabled = stream->ReadBool(); for (int d = 0; d < fNotify->GetNumReceivers(); d++) fReceiverList.Append(fNotify->GetReceiver(d)); } @@ -336,5 +336,5 @@ void plLogicModBase::Write(hsStream* stream, hsResMgr* mgr) mgr->WriteCreatable( stream, fCommandList[i] ); mgr->WriteCreatable( stream, fNotify ); fFlags.Write(stream); - stream->Writebool(fDisabled); + stream->WriteBool(fDisabled); } diff --git a/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.h b/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.h index 36eb346d..15c9b6be 100644 --- a/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.h +++ b/Sources/Plasma/NucleusLib/pnModifier/plLogicModBase.h @@ -75,11 +75,11 @@ protected: plNotifyMsg* fNotify; bool fDisabled; - virtual hsBool IEval(double secs, float del, uint32_t dirty) {return false;} + virtual bool IEval(double secs, float del, uint32_t dirty) {return false;} void IUpdateSharedState(bool triggered) const; - hsBool IEvalCounter(); - virtual void PreTrigger(hsBool netRequest); - virtual void Trigger(hsBool netRequest); + bool IEvalCounter(); + virtual void PreTrigger(bool netRequest); + virtual void Trigger(bool netRequest); virtual void UnTrigger(); void CreateNotifyMsg(); @@ -95,8 +95,8 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); - virtual hsBool VerifyConditions(plMessage* msg) { return true;} + virtual bool MsgReceive(plMessage* msg); + virtual bool VerifyConditions(plMessage* msg) { return true;} virtual void Reset(bool bCounterReset); @@ -106,13 +106,13 @@ public: plNotifyMsg* GetNotify() { return fNotify; } void AddCommand(plMessage* msg) { fCommandList.Append(msg); } - void SetOneShot(hsBool b) { if (b) SetFlag(kOneShot); else ClearFlag(kOneShot); } + void SetOneShot(bool b) { if (b) SetFlag(kOneShot); else ClearFlag(kOneShot); } void RegisterForMessageType(uint16_t hClass); - virtual void RequestTrigger(hsBool netRequest=false); + virtual void RequestTrigger(bool netRequest=false); virtual void RequestUnTrigger() { UnTrigger(); } - hsBool HasFlag(int f) const { return fFlags.IsBitSet(f); } + bool HasFlag(int f) const { return fFlags.IsBitSet(f); } void SetFlag(int f) { fFlags.SetBit(f); } void ClearFlag(int which) { fFlags.ClearBit(which); } diff --git a/Sources/Plasma/NucleusLib/pnModifier/plModifier.cpp b/Sources/Plasma/NucleusLib/pnModifier/plModifier.cpp index 08b73104..359963af 100644 --- a/Sources/Plasma/NucleusLib/pnModifier/plModifier.cpp +++ b/Sources/Plasma/NucleusLib/pnModifier/plModifier.cpp @@ -87,7 +87,7 @@ plModifier* plModifier::IGetTargetModifier(int iTarg, int iMod) const return GetTarget(iTarg) ? GetTarget(iTarg)->GetVolatileModifier(iMod) : nil; } -hsBool plModifier::MsgReceive(plMessage* msg) +bool plModifier::MsgReceive(plMessage* msg) { plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg); if( eval ) diff --git a/Sources/Plasma/NucleusLib/pnModifier/plModifier.h b/Sources/Plasma/NucleusLib/pnModifier/plModifier.h index c1da9ede..3c479a72 100644 --- a/Sources/Plasma/NucleusLib/pnModifier/plModifier.h +++ b/Sources/Plasma/NucleusLib/pnModifier/plModifier.h @@ -67,7 +67,7 @@ protected: plObjInterface* IGetTargetGenericInterface(int iTarg, uint32_t classIdx) const; plModifier* IGetTargetModifier(int iTarg, int iMod) const; - virtual hsBool IEval(double secs, float del, uint32_t dirty) = 0; // called only by owner object's Eval() + virtual bool IEval(double secs, float del, uint32_t dirty) = 0; // called only by owner object's Eval() friend class plSceneObject; public: @@ -78,7 +78,7 @@ public: CLASSNAME_REGISTER( plModifier ); GETINTERFACE_ANY( plModifier, plSynchedObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual int GetNumTargets() const = 0; virtual plSceneObject* GetTarget(int iTarg) const = 0; diff --git a/Sources/Plasma/NucleusLib/pnModifier/plMultiModifier.h b/Sources/Plasma/NucleusLib/pnModifier/plMultiModifier.h index 36e7be5d..e3bb1491 100644 --- a/Sources/Plasma/NucleusLib/pnModifier/plMultiModifier.h +++ b/Sources/Plasma/NucleusLib/pnModifier/plMultiModifier.h @@ -64,7 +64,7 @@ public: CLASSNAME_REGISTER( plMultiModifier ); GETINTERFACE_ANY( plMultiModifier, plModifier ); - virtual hsBool IEval(double secs, float del, uint32_t dirty) = 0; + virtual bool IEval(double secs, float del, uint32_t dirty) = 0; virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); @@ -73,7 +73,7 @@ public: virtual void AddTarget(plSceneObject* so) {fTargets.Append(so);} virtual void RemoveTarget(plSceneObject* so); - hsBool HasFlag(int f) const { return fFlags.IsBitSet(f); } + bool HasFlag(int f) const { return fFlags.IsBitSet(f); } plMultiModifier& SetFlag(int f) { fFlags.SetBit(f); return *this; } }; diff --git a/Sources/Plasma/NucleusLib/pnModifier/plSingleModifier.h b/Sources/Plasma/NucleusLib/pnModifier/plSingleModifier.h index 67992828..674197f3 100644 --- a/Sources/Plasma/NucleusLib/pnModifier/plSingleModifier.h +++ b/Sources/Plasma/NucleusLib/pnModifier/plSingleModifier.h @@ -56,7 +56,7 @@ protected: plSceneObject* fTarget; hsBitVector fFlags; - virtual hsBool IEval(double secs, float del, uint32_t dirty) = 0; + virtual bool IEval(double secs, float del, uint32_t dirty) = 0; public: plSingleModifier(); @@ -77,7 +77,7 @@ public: virtual plSceneObject* GetTarget() const { return fTarget; } virtual void SetTarget(plSceneObject* so) { fTarget = so; } - hsBool HasFlag(int f) const { return fFlags.IsBitSet(f); } + bool HasFlag(int f) const { return fFlags.IsBitSet(f); } plSingleModifier& SetFlag(int f) { fFlags.SetBit(f); return *this; } plSingleModifier& ClearFlag(int f) { fFlags.ClearBit(f); return *this; } diff --git a/Sources/Plasma/NucleusLib/pnNetBase/pnNbError.cpp b/Sources/Plasma/NucleusLib/pnNetBase/pnNbError.cpp index b54431a4..a913b320 100644 --- a/Sources/Plasma/NucleusLib/pnNetBase/pnNbError.cpp +++ b/Sources/Plasma/NucleusLib/pnNetBase/pnNbError.cpp @@ -105,7 +105,7 @@ const wchar_t * NetErrorToString (ENetError code) { L"Server Busy", // kNetErrServerBusy L"Vault Node Access Violation", // kNetErrVaultNodeAccessViolation }; - COMPILER_ASSERT(arrsize(s_errors) == kNumNetErrors); + static_assert(arrsize(s_errors) == kNumNetErrors, "Number of Net Error descriptions and total Net Error count are not equal"); if ((unsigned)code >= arrsize(s_errors)) { if (code == kNetPending) @@ -172,7 +172,7 @@ const wchar_t * NetErrorAsString (ENetError code) { L"kNetErrServerBusy", L"kNetErrVaultNodeAccessViolation", }; - COMPILER_ASSERT(arrsize(s_errors) == kNumNetErrors); + static_assert(arrsize(s_errors) == kNumNetErrors, "Number of string-ized Net Errors and total Net Error count are not equal"); if ((unsigned)code >= arrsize(s_errors)) { if (code == kNetPending) diff --git a/Sources/Plasma/NucleusLib/pnNetCli/pnNcEncrypt.cpp b/Sources/Plasma/NucleusLib/pnNetCli/pnNcEncrypt.cpp index 95563877..594818f6 100644 --- a/Sources/Plasma/NucleusLib/pnNetCli/pnNcEncrypt.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCli/pnNcEncrypt.cpp @@ -78,7 +78,7 @@ namespace pnNetCli { ***/ -COMPILER_ASSERT(IS_POW2(kNetDiffieHellmanKeyBits)); +static_assert(IS_POW2(kNetDiffieHellmanKeyBits), "DH Key bit count is not a power of 2"); /***************************************************************************** diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h b/Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h index 6ac0bc3f..750d9714 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h +++ b/Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h @@ -107,7 +107,7 @@ public: virtual void Shutdown() {} - void SetFlagsBit(int b, hsBool on=true) { fFlagsVec.SetBit(b, on); } + void SetFlagsBit(int b, bool on=true) { fFlagsVec.SetBit(b, on); } bool GetFlagsBit(int b) const { return fFlagsVec.IsBitSet(b) ? true : false; } static bool StaticWarningMsg(const char* fmt, ...); @@ -184,9 +184,9 @@ public: virtual float GetCurrentAgeTimeOfDayPercent() const { hsAssert(false, "stub"); return 0.; } virtual bool ObjectInLocalAge(const plSynchedObject* obj) const { hsAssert(false, "stub"); return false; } virtual uint8_t GetJoinOrder() const { hsAssert(false, "stub"); return 0; } - virtual hsBool IsRemotePlayerKey(const plKey p, int* idx=nil) { hsAssert(false, "stub"); return false; } + virtual bool IsRemotePlayerKey(const plKey p, int* idx=nil) { hsAssert(false, "stub"); return false; } virtual plKey GetLocalPlayerKey() const { hsAssert(false, "stub"); return nil; } - virtual plSynchedObject* GetLocalPlayer(hsBool forceLoad=false) const { hsAssert(false, "stub"); return nil; } + virtual plSynchedObject* GetLocalPlayer(bool forceLoad=false) const { hsAssert(false, "stub"); return nil; } virtual plNetGroupId SelectNetGroup(plSynchedObject* objIn, plKey groupKey) { hsAssert(false, "stub"); return plNetGroup::kNetGroupUnknown; } virtual int IsLocallyOwned(const plSynchedObject* obj) const { hsAssert(false, "stub"); return 0; } virtual int IsLocallyOwned(const plUoid&) const { hsAssert(false, "stub"); return 0; } diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plNetGroup.h b/Sources/Plasma/NucleusLib/pnNetCommon/plNetGroup.h index cf1474b6..b4e65bd7 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plNetGroup.h +++ b/Sources/Plasma/NucleusLib/pnNetCommon/plNetGroup.h @@ -64,15 +64,15 @@ public: plNetGroupId(const plLocation& id, const uint8_t flags) : fId(id), fFlags(flags) { } plNetGroupId(const plLocation& id) : fId(id), fFlags(0) { } - hsBool IsConstant() { return (fFlags & kNetGroupConstant) != 0; } - void SetConstant(hsBool constantGroup) { fFlags &= constantGroup ? kNetGroupConstant : 0; } + bool IsConstant() { return (fFlags & kNetGroupConstant) != 0; } + void SetConstant(bool constantGroup) { fFlags &= constantGroup ? kNetGroupConstant : 0; } plLocation& Room() { return fId; } const char* GetDesc() const { return fDesc.c_str(); } void SetDesc(const char* c) { fDesc = c; } - hsBool operator==(const plNetGroupId& netGroup) const { return fId == netGroup.fId; } - hsBool operator!=(const plNetGroupId& netGroup) const { return fId != netGroup.fId; } + bool operator==(const plNetGroupId& netGroup) const { return fId == netGroup.fId; } + bool operator!=(const plNetGroupId& netGroup) const { return fId != netGroup.fId; } bool operator<(const plNetGroupId& netGroup) const { return fId < netGroup.fId; } // read and write to hsStream diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plNetSharedState.cpp b/Sources/Plasma/NucleusLib/pnNetCommon/plNetSharedState.cpp index faa3278c..39f4197d 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plNetSharedState.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCommon/plNetSharedState.cpp @@ -87,7 +87,7 @@ void plNetSharedState::Read(hsStream* stream) plMsgStdStringHelper::Peek(fName, stream); int32_t num=stream->ReadLE32(); - fServerMayDelete = stream->Readbool(); + fServerMayDelete = stream->ReadBool(); fVars.reserve(num); int i; @@ -105,7 +105,7 @@ void plNetSharedState::Write(hsStream* stream) int32_t num=GetNumVars(); stream->WriteLE32(num); - stream->Writebool(fServerMayDelete); + stream->WriteBool(fServerMayDelete); int i; for(i=0;i plSynchedObject::fDirtyStates; -std::vector plSynchedObject::fSynchStateStack; +std::vector plSynchedObject::fSynchStateStack; plSynchedObject::plSynchedObject() : fSynchFlags(0), @@ -77,7 +77,7 @@ plSynchedObject::~plSynchedObject() #endif } -hsBool plSynchedObject::MsgReceive(plMessage* msg) +bool plSynchedObject::MsgReceive(plMessage* msg) { plSetNetGroupIDMsg* setNetGroupID = plSetNetGroupIDMsg::ConvertNoRef(msg); if (setNetGroupID) @@ -141,7 +141,7 @@ uint8_t plSynchedObject::RegisterSynchedValue(plSynchedValueBase* v) return (uint8_t)idx; } -hsBool plSynchedObject::RemoveSynchedValue(plSynchedValueBase* v) +bool plSynchedObject::RemoveSynchedValue(plSynchedValueBase* v) { int i; for(i=0;i fSynchStateStack; + static std::vector fSynchStateStack; static plSynchedObject* fStaticSynchedObj; // static which temporarily holds address of each object's synchMgr static std::vector fDirtyStates; @@ -124,7 +124,7 @@ public: CLASSNAME_REGISTER( plSynchedObject ); GETINTERFACE_ANY( plSynchedObject, hsKeyedObject); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // getters int GetSynchFlags() const { return fSynchFlags; } @@ -137,15 +137,15 @@ public: virtual void SetNetGroup(plNetGroupId netGroup) { fNetGroup = netGroup; } plNetGroupId SelectNetGroup(plKey groupKey); - virtual hsBool DirtySynchState(const char* sdlName, uint32_t sendFlags); + virtual bool DirtySynchState(const char* sdlName, uint32_t sendFlags); void SendSDLStateMsg(const char* SDLStateName, uint32_t synchFlags); // don't use, only for net code void ClearSynchFlagsBit(uint32_t f) { fSynchFlags &= ~f; } // static - static hsBool GetSynchDisabled() { return fSynchStateStack.size() ? fSynchStateStack.back() : true; } - static void PushSynchDisabled(hsBool b) { fSynchStateStack.push_back(b); } - static hsBool PopSynchDisabled(); + static bool GetSynchDisabled() { return fSynchStateStack.size() ? fSynchStateStack.back() : true; } + static void PushSynchDisabled(bool b) { fSynchStateStack.push_back(b); } + static bool PopSynchDisabled(); static plSynchedObject* GetStaticSynchedObject() { return fStaticSynchedObj; } static int32_t GetNumDirtyStates() { return fDirtyStates.size(); } static plSynchedObject::StateDefn* GetDirtyState(int32_t i) { return &fDirtyStates[i]; } @@ -212,7 +212,7 @@ public: plSynchedValueBase* GetSynchedValue(int i) const; uint8_t RegisterSynchedValue(plSynchedValueBase* v); - hsBool RemoveSynchedValue(plSynchedValueBase* v); // handles SVFriends too + bool RemoveSynchedValue(plSynchedValueBase* v); // handles SVFriends too void RegisterSynchedValueFriend(plSynchedValueBase* v); #endif @@ -230,7 +230,7 @@ public: class plSynchEnabler { public: - plSynchEnabler(hsBool enable) { plSynchedObject::PushSynchDisabled(!enable); } + plSynchEnabler(bool enable) { plSynchedObject::PushSynchDisabled(!enable); } ~plSynchEnabler() { plSynchedObject::PopSynchDisabled(); } }; diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedValue.cpp b/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedValue.cpp index c5aca9c1..917866d8 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedValue.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedValue.cpp @@ -61,7 +61,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // baseclass save/load methods for various types // -hsBitVector plSynchedValueBase::ISaveOrLoad(hsBitVector& v, hsBool32 save, hsStream* stream, hsResMgr* mgr) +hsBitVector plSynchedValueBase::ISaveOrLoad(hsBitVector& v, bool32 save, hsStream* stream, hsResMgr* mgr) { if (save) v.Write(stream); @@ -70,28 +70,28 @@ hsBitVector plSynchedValueBase::ISaveOrLoad(hsBitVector& v, hsBool32 save, hsStr return v; } -float plSynchedValueBase::ISaveOrLoad(float v, hsBool32 save, hsStream* stream, hsResMgr* mgr) +float plSynchedValueBase::ISaveOrLoad(float v, bool32 save, hsStream* stream, hsResMgr* mgr) ISaveOrLoadSimpleType(); -double plSynchedValueBase::ISaveOrLoad(double v, hsBool32 save, hsStream* stream, hsResMgr* mgr) +double plSynchedValueBase::ISaveOrLoad(double v, bool32 save, hsStream* stream, hsResMgr* mgr) ISaveOrLoadSimpleType(); -int32_t plSynchedValueBase::ISaveOrLoad(int32_t v, hsBool32 save, hsStream* stream, hsResMgr* mgr) +int32_t plSynchedValueBase::ISaveOrLoad(int32_t v, bool32 save, hsStream* stream, hsResMgr* mgr) ISaveOrLoadSimpleType(); -uint32_t plSynchedValueBase::ISaveOrLoad(uint32_t v, hsBool32 save, hsStream* stream, hsResMgr* mgr) +uint32_t plSynchedValueBase::ISaveOrLoad(uint32_t v, bool32 save, hsStream* stream, hsResMgr* mgr) ISaveOrLoadSimpleType(); -int plSynchedValueBase::ISaveOrLoad(int v, hsBool32 save, hsStream* stream, hsResMgr* mgr) +int plSynchedValueBase::ISaveOrLoad(int v, bool32 save, hsStream* stream, hsResMgr* mgr) ISaveOrLoadSimpleType(); -bool plSynchedValueBase::ISaveOrLoad(bool v, hsBool32 save, hsStream* stream, hsResMgr* mgr) +bool plSynchedValueBase::ISaveOrLoad(bool v, bool32 save, hsStream* stream, hsResMgr* mgr) ISaveOrLoadSimpleType(); // // save or load a key. return the key. // -const plKey plSynchedValueBase::ISaveOrLoad(const plKey key, hsBool32 save, hsStream* stream, hsResMgr* mgr) +const plKey plSynchedValueBase::ISaveOrLoad(const plKey key, bool32 save, hsStream* stream, hsResMgr* mgr) { if (save) { @@ -100,9 +100,9 @@ const plKey plSynchedValueBase::ISaveOrLoad(const plKey key, hsBool32 save, hsSt stream->WriteByte(1); // I need to write a key to MY stream... #if 0 // DEBUG - int32_t len = hsStrlen(key->GetName()); - stream->WriteLE32(len); - stream->Write(len, key->GetName()); + plStringBuffer buf = key->GetName()->ToIso8859_1(); + stream->WriteLE32(buf.GetSize()); + stream->Write(buf.GetSize(), buf.GetData()); #endif key->GetUoid().Write(stream); } @@ -134,24 +134,24 @@ const plKey plSynchedValueBase::ISaveOrLoad(const plKey key, hsBool32 save, hsSt return nil; } -hsKeyedObject* plSynchedValueBase::ISaveOrLoad(hsKeyedObject* obj, hsBool32 save, hsStream* stream, hsResMgr* mgr) +hsKeyedObject* plSynchedValueBase::ISaveOrLoad(hsKeyedObject* obj, bool32 save, hsStream* stream, hsResMgr* mgr) { plKey key = obj ? obj->GetKey() : nil; key = ISaveOrLoad(key, save, stream, mgr); return key ? key->ObjectIsLoaded() : nil; } -plSceneNode* plSynchedValueBase::ISaveOrLoad(plSceneNode* obj, hsBool32 save, hsStream* stream, hsResMgr* mgr) +plSceneNode* plSynchedValueBase::ISaveOrLoad(plSceneNode* obj, bool32 save, hsStream* stream, hsResMgr* mgr) { // return plSceneNode::ConvertNoRef(ISaveOrLoad(hsKeyedObject::ConvertNoRef(obj), save, stream, mgr)); hsAssert(false, "SceneNode synchedValues currently not implemented"); return nil; } -plSceneObject* plSynchedValueBase::ISaveOrLoad(plSceneObject* obj, hsBool32 save, hsStream* stream, hsResMgr* mgr) +plSceneObject* plSynchedValueBase::ISaveOrLoad(plSceneObject* obj, bool32 save, hsStream* stream, hsResMgr* mgr) { return plSceneObject::ConvertNoRef(ISaveOrLoad(hsKeyedObject::ConvertNoRef(obj), save, stream, mgr)); } -plCoordinateInterface* plSynchedValueBase::ISaveOrLoad(const plCoordinateInterface* cInt, hsBool32 save, hsStream* stream, hsResMgr* mgr) +plCoordinateInterface* plSynchedValueBase::ISaveOrLoad(const plCoordinateInterface* cInt, bool32 save, hsStream* stream, hsResMgr* mgr) { plSceneObject* obj = ISaveOrLoad(cInt ? cInt->fOwner : nil, save, stream, mgr); return obj ? obj->fCoordinateInterface : nil; diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedValue.h b/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedValue.h index c3e18dab..e723c43e 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedValue.h +++ b/Sources/Plasma/NucleusLib/pnNetCommon/plSynchedValue.h @@ -93,27 +93,27 @@ protected: fSynchedObjectAddrOffset=-1; } - hsBool32 IOKToDirty() + bool32 IOKToDirty() { if (fFlags & (kDontDirty | kValueIsDirty)) return false; return GetSynchedObject() ? GetSynchedObject()->IOKToDirty() : false; } - virtual void ISaveOrLoad(hsBool32 save, hsStream* stream, hsResMgr* mgr) = 0; + virtual void ISaveOrLoad(bool32 save, hsStream* stream, hsResMgr* mgr) = 0; // save/load methods for different types - const plKey ISaveOrLoad(const plKey key, hsBool32 save, hsStream* stream, hsResMgr* mgr); - hsKeyedObject* ISaveOrLoad(hsKeyedObject* obj, hsBool32 save, hsStream* stream, hsResMgr* mgr); - plSceneNode* ISaveOrLoad(plSceneNode* obj, hsBool32 save, hsStream* stream, hsResMgr* mgr); - plSceneObject* ISaveOrLoad(plSceneObject* obj, hsBool32 save, hsStream* stream, hsResMgr* mgr); - int32_t ISaveOrLoad(int32_t v, hsBool32 save, hsStream* stream, hsResMgr* mgr); - uint32_t ISaveOrLoad(uint32_t v, hsBool32 save, hsStream* stream, hsResMgr* mgr); - bool ISaveOrLoad(bool v, hsBool32 save, hsStream* stream, hsResMgr* mgr); - int ISaveOrLoad(int v, hsBool32 save, hsStream* stream, hsResMgr* mgr); // or hsBool32 - float ISaveOrLoad(float v, hsBool32 save, hsStream* stream, hsResMgr* mgr); - double ISaveOrLoad(double v, hsBool32 save, hsStream* stream, hsResMgr* mgr); - hsBitVector ISaveOrLoad(hsBitVector& v, hsBool32 save, hsStream* stream, hsResMgr* mgr); - plCoordinateInterface* ISaveOrLoad(const plCoordinateInterface* cInt, hsBool32 save, hsStream* stream, hsResMgr* mgr); + const plKey ISaveOrLoad(const plKey key, bool32 save, hsStream* stream, hsResMgr* mgr); + hsKeyedObject* ISaveOrLoad(hsKeyedObject* obj, bool32 save, hsStream* stream, hsResMgr* mgr); + plSceneNode* ISaveOrLoad(plSceneNode* obj, bool32 save, hsStream* stream, hsResMgr* mgr); + plSceneObject* ISaveOrLoad(plSceneObject* obj, bool32 save, hsStream* stream, hsResMgr* mgr); + int32_t ISaveOrLoad(int32_t v, bool32 save, hsStream* stream, hsResMgr* mgr); + uint32_t ISaveOrLoad(uint32_t v, bool32 save, hsStream* stream, hsResMgr* mgr); + bool ISaveOrLoad(bool v, bool32 save, hsStream* stream, hsResMgr* mgr); + int ISaveOrLoad(int v, bool32 save, hsStream* stream, hsResMgr* mgr); // or bool32 + float ISaveOrLoad(float v, bool32 save, hsStream* stream, hsResMgr* mgr); + double ISaveOrLoad(double v, bool32 save, hsStream* stream, hsResMgr* mgr); + hsBitVector ISaveOrLoad(hsBitVector& v, bool32 save, hsStream* stream, hsResMgr* mgr); + plCoordinateInterface* ISaveOrLoad(const plCoordinateInterface* cInt, bool32 save, hsStream* stream, hsResMgr* mgr); public: plSynchedValueBase() { IConstruct(); } virtual ~plSynchedValueBase() {} @@ -164,7 +164,7 @@ class plSynchedValue : public plSynchedValueBase protected: T fValue; - void ISaveOrLoad(hsBool32 save, hsStream* stream, hsResMgr* mgr) + void ISaveOrLoad(bool32 save, hsStream* stream, hsResMgr* mgr) { fValue=(T)plSynchedValueBase::ISaveOrLoad(fValue, save, stream, mgr); } // default method public: @@ -179,8 +179,8 @@ public: T* operator &() { return &fValue; } // equality - hsBool32 operator==(const T& other) const { return fValue==(T)other; } - hsBool32 operator!=(const T& other) const { return !(*this == other); } + bool32 operator==(const T& other) const { return fValue==(T)other; } + bool32 operator!=(const T& other) const { return !(*this == other); } // other operators T operator++() { DirtyIfNecessary(); return ++fValue; } @@ -226,9 +226,9 @@ public: const T& GetValue() const { return fValue; } // for hsBitVector - hsBool32 IsBitSet(uint32_t which) const { return fValue.IsBitSet(which); } - hsBool32 SetBit(uint32_t which, hsBool32 on = true) - { hsBool32 bitSet = IsBitSet(which); + bool32 IsBitSet(uint32_t which) const { return fValue.IsBitSet(which); } + bool32 SetBit(uint32_t which, bool32 on = true) + { bool32 bitSet = IsBitSet(which); if ( (on && !bitSet) || (!on && bitSet) ) DirtyIfNecessary(); return fValue.SetBit(which, on); @@ -236,9 +236,9 @@ public: void Read(hsStream* s) { fValue.Read(s); } void Write(hsStream* s) const { fValue.Write(s); } void Clear() { DirtyIfNecessary(); fValue.Clear(); } - hsBool32 ClearBit(uint32_t which) { if (fValue.IsBitSet(which)) DirtyIfNecessary(); return fValue.ClearBit(which); } + bool32 ClearBit(uint32_t which) { if (fValue.IsBitSet(which)) DirtyIfNecessary(); return fValue.ClearBit(which); } void Reset() { if (fValue.GetSize()!=0) DirtyIfNecessary(); fValue.Reset(); } - hsBool32 ToggleBit(uint32_t which) { DirtyIfNecessary(); return fValue.ToggleBit(which); } + bool32 ToggleBit(uint32_t which) { DirtyIfNecessary(); return fValue.ToggleBit(which); } uint32_t GetSize() { return fValue.GetSize(); } }; @@ -297,7 +297,7 @@ class plSynchedTArray : public plSynchedValueBase private: hsTArray fValueList; - void ISaveOrLoad(hsBool32 save, hsStream* stream, hsResMgr* mgr); + void ISaveOrLoad(bool32 save, hsStream* stream, hsResMgr* mgr); public: enum { kMissingIndex = hsTArray::kMissingIndex }; plSynchedTArray() {} @@ -333,7 +333,7 @@ public: // inlines // template inline -void plSynchedTArray::ISaveOrLoad(hsBool32 save, hsStream* stream, hsResMgr* mgr) +void plSynchedTArray::ISaveOrLoad(bool32 save, hsStream* stream, hsResMgr* mgr) { if (save) { diff --git a/Sources/Plasma/NucleusLib/pnNetProtocol/Pch.h b/Sources/Plasma/NucleusLib/pnNetProtocol/Pch.h index 546aca50..7799fb55 100644 --- a/Sources/Plasma/NucleusLib/pnNetProtocol/Pch.h +++ b/Sources/Plasma/NucleusLib/pnNetProtocol/Pch.h @@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #endif #define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNNETPROTOCOL_PCH_H - +#include "HeadSpin.h" #include "pnUtils/pnUtils.h" #include "pnNetBase/pnNetBase.h" #include "pnAsyncCore/pnAsyncCore.h" diff --git a/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Auth/pnNpCli2Auth.h b/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Auth/pnNpCli2Auth.h index 1b6a10b2..f7fc7024 100644 --- a/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Auth/pnNpCli2Auth.h +++ b/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Auth/pnNpCli2Auth.h @@ -133,7 +133,7 @@ enum { kNumCli2AuthMessages }; -COMPILER_ASSERT_HEADER(Cli2Auth, kNumCli2AuthMessages <= (uint16_t)-1); +static_assert(kNumCli2AuthMessages <= 0xFFFF, "Cli2Auth message types overflow uint16"); enum { // Global @@ -212,7 +212,7 @@ enum { kNumAuth2CliMessages }; -COMPILER_ASSERT_HEADER(Cli2Auth, kNumAuth2CliMessages <= (uint16_t)-1); +static_assert(kNumAuth2CliMessages <= 0xFFFF, "Auth2Cli message types overflow uint16"); //============================================================================ diff --git a/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Game/pnNpCli2Game.h b/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Game/pnNpCli2Game.h index f01b2798..ac06b83c 100644 --- a/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Game/pnNpCli2Game.h +++ b/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Game/pnNpCli2Game.h @@ -65,7 +65,7 @@ enum { kNumCli2GameMessages }; -COMPILER_ASSERT_HEADER(Cli2Game, kNumCli2GameMessages <= (uint16_t)-1); +static_assert(kNumCli2GameMessages <= 0xFFFF, "Cli2Game message types overflow uint16"); enum { // Global @@ -80,7 +80,7 @@ enum { kNumGame2CliMessages }; -COMPILER_ASSERT_HEADER(Cli2Game, kNumGame2CliMessages <= (uint16_t)-1); +static_assert(kNumGame2CliMessages <= 0xFFFF, "Game2Cli message types overflow uint16"); //============================================================================ diff --git a/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2GateKeeper/pnNpCli2GateKeeper.h b/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2GateKeeper/pnNpCli2GateKeeper.h index 7e04142f..42810676 100644 --- a/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2GateKeeper/pnNpCli2GateKeeper.h +++ b/Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2GateKeeper/pnNpCli2GateKeeper.h @@ -62,7 +62,7 @@ enum { kNumCli2GateKeeperMessages }; -COMPILER_ASSERT_HEADER(Cli2GateKeeper, kNumCli2GateKeeperMessages <= (uint16_t)-1); +static_assert(kNumCli2GateKeeperMessages <= 0xFFFF, "Cli2GateKeeper message types overflow uint16"); enum { // Global @@ -72,7 +72,7 @@ enum { kNumGateKeeper2CliMessages }; -COMPILER_ASSERT_HEADER(Cli2GateKeeper, kNumGateKeeper2CliMessages <= (uint16_t)-1); +static_assert(kNumGateKeeper2CliMessages <= 0xFFFF, "GateKeeper2Cli message types overflow uint16"); //============================================================================ diff --git a/Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.cpp b/Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.cpp index 96d7c649..b82ee37d 100644 --- a/Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.cpp +++ b/Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.cpp @@ -53,7 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com namespace pnNpCommon { // Verify our uint64_t constants were properly inited as such. -COMPILER_ASSERT(NetVaultNode::kBlob_2); +static_assert(NetVaultNode::kBlob_2, "NetVaultNode constants failed to init"); diff --git a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.cpp b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.cpp index 7a9ec72c..a4ff82d8 100644 --- a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.cpp +++ b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.cpp @@ -60,7 +60,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // This value is manually changed upon each branch so that client applications // built from this branch may not connect to servers built from another. #define BRANCH_ID 1 -COMPILER_ASSERT(BRANCH_ID != 0); +static_assert(BRANCH_ID != 0, "BranchID cannot be 0"); #else diff --git a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.cpp b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.cpp index 698d1efb..9d650086 100644 --- a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.cpp +++ b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.cpp @@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // This line must NEVER be modified manually; it is automatically updated // by the build server. #define BUILD_ID 912 -COMPILER_ASSERT(BUILD_ID != 0); +static_assert(BUILD_ID != 0, "BuildID cannot be 0"); /***************************************************************************** diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.cpp index 03a3d50a..14adaa22 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.cpp @@ -71,7 +71,7 @@ plAudioInterface::~plAudioInterface() } -void plAudioInterface::SetProperty(int prop, hsBool on) +void plAudioInterface::SetProperty(int prop, bool on) { plObjInterface::SetProperty(prop, on); @@ -192,7 +192,7 @@ void plAudioInterface::IRemoveAudible(plAudible* aud) fAudible = nil; } -hsBool plAudioInterface::MsgReceive(plMessage* msg) +bool plAudioInterface::MsgReceive(plMessage* msg) { plIntRefMsg* intRefMsg = plIntRefMsg::ConvertNoRef(msg); if( intRefMsg ) diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.h b/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.h index d44a557a..3b2e210f 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.h +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plAudioInterface.h @@ -66,7 +66,7 @@ public: protected: plAudible* fAudible; // references into system pools - hsBool fRegisteredForASysMsg, fAudibleInited; + bool fRegisteredForASysMsg, fAudibleInited; void ISetAudible(plAudible* aud); void IRemoveAudible(plAudible* aud); @@ -86,13 +86,13 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - void SetProperty(int prop, hsBool on); + void SetProperty(int prop, bool on); int32_t GetNumProperties() const { return kNumProps; } plSound* GetSound(int i) const; int GetNumSounds() const; - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // for export only!!!!! plAudible* GetAudible() const { return fAudible; } diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.cpp index 878acdc0..3b00e7b6 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.cpp @@ -59,7 +59,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plProfile.h" uint8_t plCoordinateInterface::fTransformPhase = plCoordinateInterface::kTransformPhaseNormal; -hsBool plCoordinateInterface::fDelayedTransformsEnabled = true; +bool plCoordinateInterface::fDelayedTransformsEnabled = true; plCoordinateInterface::plCoordinateInterface() : fParent(nil), @@ -258,7 +258,7 @@ plCoordinateInterface* plCoordinateInterface::IGetRoot() return fParent ? fParent->IGetRoot() : this; } -void plCoordinateInterface::IRegisterForTransformMessage(hsBool delayed) +void plCoordinateInterface::IRegisterForTransformMessage(bool delayed) { if( IGetOwner() ) { @@ -458,7 +458,7 @@ void plCoordinateInterface::IRecalcTransforms() plProfile_EndTiming(CIRecalcT); } -void plCoordinateInterface::ITransformChanged(hsBool force, uint16_t reasons, hsBool checkForDelay) +void plCoordinateInterface::ITransformChanged(bool force, uint16_t reasons, bool checkForDelay) { plProfile_IncCount(CITrans, 1); plProfile_BeginTiming(CITransT); @@ -468,7 +468,7 @@ void plCoordinateInterface::ITransformChanged(hsBool force, uint16_t reasons, hs uint16_t propagateReasons = fReason; - hsBool process = !(checkForDelay && GetProperty(kDelayedTransformEval)) || !fDelayedTransformsEnabled; + bool process = !(checkForDelay && GetProperty(kDelayedTransformEval)) || !fDelayedTransformsEnabled; if (process) { @@ -513,7 +513,7 @@ void plCoordinateInterface::ITransformChanged(hsBool force, uint16_t reasons, hs } } -void plCoordinateInterface::FlushTransform(hsBool fromRoot) +void plCoordinateInterface::FlushTransform(bool fromRoot) { if( fromRoot ) IGetRoot()->ITransformChanged(false, 0, false); @@ -578,10 +578,8 @@ void plCoordinateInterface::Write(hsStream* stream, hsResMgr* mgr) } -hsBool plCoordinateInterface::MsgReceive(plMessage* msg) +bool plCoordinateInterface::MsgReceive(plMessage* msg) { - hsBool retVal = false; - plIntRefMsg* intRefMsg; plCorrectionMsg* corrMsg; diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.h b/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.h index ac30d846..5a931a19 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.h +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plCoordinateInterface.h @@ -91,13 +91,13 @@ protected: // Set by the client in IUpdate(). This tells us where we are in the update loop so that we know // which transform message to register for when our transform is dirtied. - static uint8_t fTransformPhase; + static uint8_t fTransformPhase; // Temp debugging tool, so we can quickly (dis/en)able delayed transforms at runtime. - static hsBool fDelayedTransformsEnabled; + static bool fDelayedTransformsEnabled; - uint16_t fState; - uint16_t fReason; // why we've changed position (if we have) + uint16_t fState; + uint16_t fReason; // why we've changed position (if we have) hsTArray fChildren; plCoordinateInterface* fParent; // if this changes, marks us as dirty @@ -127,10 +127,10 @@ protected: virtual void IUpdateDelayProp(); // Called whenever a child is added/removed virtual void IRecalcTransforms(); // Called by ITransformChanged when we need to re-examine our relationship with our parent. - virtual void ITransformChanged(hsBool force, uint16_t reasons, hsBool checkForDelay); // called by SceneObject on TransformChanged messsage + virtual void ITransformChanged(bool force, uint16_t reasons, bool checkForDelay); // called by SceneObject on TransformChanged messsage void IDirtyTransform(); - void IRegisterForTransformMessage(hsBool delayed); + void IRegisterForTransformMessage(bool delayed); void IUnRegisterForTransformMessage(); plCoordinateInterface* IGetRoot(); @@ -172,7 +172,7 @@ public: // synced up, so fromRoot=true. // fromRoot=true is always safe, just potentially wasteful, so if you don't know, use fromRoot=true or // preferably, don't use this function. - void FlushTransform(hsBool fromRoot=true); + void FlushTransform(bool fromRoot=true); virtual const hsMatrix44& GetLocalToParent() const { return fLocalToParent; } virtual const hsMatrix44& GetParentToLocal() const { return fParentToLocal; } @@ -186,7 +186,7 @@ public: virtual plCoordinateInterface* GetChild(int i) const; virtual plCoordinateInterface* GetParent() const { return fParent; } - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); uint16_t GetReasons(); void ClearReasons(); @@ -195,8 +195,8 @@ public: static uint8_t GetTransformPhase() { return fTransformPhase; } static void SetTransformPhase(uint8_t phase) { fTransformPhase = phase; } - static hsBool GetDelayedTransformsEnabled() { return fDelayedTransformsEnabled; } - static void SetDelayedTransformsEnabled(hsBool val) { fDelayedTransformsEnabled = val; } + static bool GetDelayedTransformsEnabled() { return fDelayedTransformsEnabled; } + static void SetDelayedTransformsEnabled(bool val) { fDelayedTransformsEnabled = val; } }; diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.cpp index 67649156..a4952243 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.cpp @@ -68,7 +68,7 @@ void plDrawInterface::SetDrawableMeshIndex( uint8_t which, uint32_t index ) fDrawableIndices[which] = index; } -void plDrawInterface::SetProperty(int prop, hsBool on) +void plDrawInterface::SetProperty(int prop, bool on) { plObjInterface::SetProperty(prop, on); @@ -258,7 +258,7 @@ void plDrawInterface::IRemoveDrawable(plDrawable *dr) } } -void plDrawInterface::ISetVisRegion(hsKeyedObject* reg, hsBool on) +void plDrawInterface::ISetVisRegion(hsKeyedObject* reg, bool on) { int i; for( i = 0; i < fDrawables.GetCount(); i++ ) @@ -311,7 +311,7 @@ void plDrawInterface::SetDrawable(uint8_t which, plDrawable *dr) } } -hsBool plDrawInterface::MsgReceive(plMessage* msg) +bool plDrawInterface::MsgReceive(plMessage* msg) { plIntRefMsg* intRefMsg = plIntRefMsg::ConvertNoRef(msg); if( intRefMsg ) diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.h b/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.h index d3e5acd2..0b5ee418 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.h +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plDrawInterface.h @@ -73,7 +73,7 @@ protected: hsTArray fRegions; void ISetVisRegions(int iDraw); - void ISetVisRegion(hsKeyedObject* ref, hsBool on); + void ISetVisRegion(hsKeyedObject* ref, bool on); void ISetDrawable(uint8_t which, plDrawable* dr); void IRemoveDrawable(plDrawable* dr); void ISetSceneNode(plKey newNode); @@ -91,7 +91,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - void SetProperty(int prop, hsBool on); + void SetProperty(int prop, bool on); int32_t GetNumProperties() const { return kNumProps; } // Transform settable only, if you want it get it from the coordinate interface. @@ -102,7 +102,7 @@ public: const hsBounds3Ext GetWorldBounds() const; const hsBounds3Ext GetMaxWorldBounds() const; - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void ReleaseData( void ); diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.cpp index f773fbc0..f536db90 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.cpp @@ -85,10 +85,8 @@ void plObjInterface::Write(hsStream* s, hsResMgr* mgr) fProps.Write(s); } -hsBool plObjInterface::MsgReceive(plMessage* msg) +bool plObjInterface::MsgReceive(plMessage* msg) { - hsBool retVal = false; - plEnableMsg* enaMsg = plEnableMsg::ConvertNoRef(msg); if( enaMsg ) { diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.h b/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.h index bca30986..9ab6120e 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.h +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plObjInterface.h @@ -93,7 +93,7 @@ public: CLASSNAME_REGISTER( plObjInterface ); GETINTERFACE_ANY( plObjInterface, plSynchedObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); const plSceneObject* GetOwner() const { return IGetOwner(); } plKey GetOwnerKey() const { return IGetOwner() ? IGetOwner()->GetKey() : nil; } @@ -101,10 +101,10 @@ public: virtual plKey GetSceneNode() const { return IGetOwner() ? IGetOwner()->GetSceneNode() : nil; } // override SetProperty to pass the prop down to the pool objects - virtual void SetProperty(int prop, hsBool on) { fProps.SetBit(prop, on); } + virtual void SetProperty(int prop, bool on) { fProps.SetBit(prop, on); } // shouldn't need to override GetProperty() - hsBool GetProperty(int prop) const { return fProps.IsBitSet(prop); } + bool GetProperty(int prop) const { return fProps.IsBitSet(prop); } virtual int32_t GetNumProperties() const = 0; virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) = 0; diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.cpp index 52102af5..8cbf297c 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.cpp @@ -371,9 +371,9 @@ void plSceneObject::IRemoveInterface(int16_t idx, plObjInterface* who) IRemoveGeneric(who); } -hsBool plSceneObject::IPropagateToModifiers(plMessage* msg) +bool plSceneObject::IPropagateToModifiers(plMessage* msg) { - hsBool retVal = false; + bool retVal = false; int i; int nMods = fModifiers.GetCount(); @@ -382,17 +382,16 @@ hsBool plSceneObject::IPropagateToModifiers(plMessage* msg) if( fModifiers[i] ) { plModifier *mod = fModifiers[i]; - hsBool modRet = mod->MsgReceive(msg); - retVal |= modRet; + retVal |= mod->MsgReceive(msg); } } return retVal; } -hsBool plSceneObject::Eval(double secs, float delSecs) +bool plSceneObject::Eval(double secs, float delSecs) { uint32_t dirty = ~0L; - hsBool retVal = false; + bool retVal = false; int i; for( i = 0; i < fModifiers.GetCount(); i++ ) { @@ -462,7 +461,7 @@ const plModifier* plSceneObject::GetModifierByType(uint16_t classIdx) const return nil; } -hsBool plSceneObject::MsgReceive(plMessage* msg) +bool plSceneObject::MsgReceive(plMessage* msg) { #if 0 // objects are only in the nil room when they are being paged out @@ -474,7 +473,7 @@ hsBool plSceneObject::MsgReceive(plMessage* msg) return false; #endif - hsBool retVal = false; + bool retVal = false; // If it's a bcast, let our own dispatcher find who's interested. plTransformMsg* trans; plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg); @@ -543,10 +542,7 @@ hsBool plSceneObject::MsgReceive(plMessage* msg) { plSceneObject* child = (plSceneObject*)ci->GetChild(i)->GetOwner(); if (child) - { - hsBool modRet = child->MsgReceive(msg); - retVal |= modRet; - } + retVal |= child->MsgReceive(msg); } } @@ -555,7 +551,7 @@ hsBool plSceneObject::MsgReceive(plMessage* msg) return plSynchedObject::MsgReceive(msg); } -hsBool plSceneObject::IMsgHandle(plMessage* msg) +bool plSceneObject::IMsgHandle(plMessage* msg) { // To start with, plSceneObject only handles messages to add or remove // references. Current references are other plSceneObjects and plModifiers @@ -841,7 +837,7 @@ void plSceneObject::ISetCoordinateInterface(plCoordinateInterface* ci) // // "is ready to process Loads"? Check base class and modifiers. // -hsBool plSceneObject::IsFinal() +bool plSceneObject::IsFinal() { if (!plSynchedObject::IsFinal()) return false; diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.h b/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.h index d3e7e373..d15d1598 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.h +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plSceneObject.h @@ -88,7 +88,7 @@ private: friend class plMaxNode; friend class plMaxNodeBase; - hsBool IMsgHandle(plMessage* msg); + bool IMsgHandle(plMessage* msg); protected: plDrawInterface* fDrawInterface; @@ -113,7 +113,7 @@ protected: void IAddModifier(plModifier* mo, int i); void IRemoveModifier(plModifier* mo); - hsBool IPropagateToModifiers(plMessage* msg); + bool IPropagateToModifiers(plMessage* msg); void ISetInterface(plObjInterface* iface); void IRemoveInterface(plObjInterface* iface); @@ -146,8 +146,8 @@ public: const plModifier* GetModifier(int i) const { return fModifiers[i]; } const plModifier* GetModifierByType(uint16_t classIdx) const; - virtual hsBool MsgReceive(plMessage* msg); - virtual hsBool Eval(double secs, float del); + virtual bool MsgReceive(plMessage* msg); + virtual bool Eval(double secs, float del); void SetSceneNode(plKey newNode); plKey GetSceneNode() const; @@ -166,7 +166,7 @@ public: hsMatrix44 GetLocalToParent() const; hsMatrix44 GetParentToLocal() const; - hsBool IsFinal(); // "is ready to process Loads" + virtual bool IsFinal(); // "is ready to process Loads" // Export only virtual void SetDrawInterface(plDrawInterface* di); diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.cpp b/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.cpp index 41915e81..e0491825 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.cpp +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.cpp @@ -69,7 +69,7 @@ void plSimulationInterface::ISetSceneNode(plKey newNode) fPhysical->SetSceneNode(newNode); } -void plSimulationInterface::SetProperty(int prop, hsBool on) +void plSimulationInterface::SetProperty(int prop, bool on) { plObjInterface::SetProperty(prop, on); // set the property locally @@ -135,7 +135,7 @@ void plSimulationInterface::ReleaseData() } } -hsBool plSimulationInterface::MsgReceive(plMessage* msg) +bool plSimulationInterface::MsgReceive(plMessage* msg) { plIntRefMsg* intRefMsg = plIntRefMsg::ConvertNoRef(msg); if (intRefMsg) diff --git a/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.h b/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.h index c997a7ae..a91a71d0 100644 --- a/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.h +++ b/Sources/Plasma/NucleusLib/pnSceneObject/plSimulationInterface.h @@ -88,7 +88,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - void SetProperty(int prop, hsBool on); + void SetProperty(int prop, bool on); int32_t GetNumProperties() const { return kNumProps; } // Transform settable only, if you want it get it from the coordinate interface. @@ -100,7 +100,7 @@ public: const hsBounds3Ext GetMaxWorldBounds(); void ClearLinearVelocity(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // Export only. void SetPhysical(plPhysical* phys); diff --git a/Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp b/Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp index 7a5ef2a8..1eb0aa72 100644 --- a/Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp +++ b/Sources/Plasma/NucleusLib/pnTimer/hsTimer.cpp @@ -196,7 +196,7 @@ double plTimerShare::IncSysSeconds() return fSysSeconds; } -void plTimerShare::SetRealTime(hsBool realTime) +void plTimerShare::SetRealTime(bool realTime) { fRunningFrameTime = !realTime; if( realTime ) diff --git a/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp b/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp index 39d9019e..3df7bdb3 100644 --- a/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp +++ b/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp @@ -57,7 +57,7 @@ plTimerCallbackManager::~plTimerCallbackManager() delete fCallbacks.Pop(); } -hsBool plTimerCallbackManager::MsgReceive(plMessage* msg) +bool plTimerCallbackManager::MsgReceive(plMessage* msg) { plTimeMsg* pTimeMsg = plTimeMsg::ConvertNoRef(msg); int i = fCallbacks.Count(); @@ -106,7 +106,7 @@ plTimerCallback* plTimerCallbackManager::NewTimer(float time, plMessage* pMsg) return t; } -hsBool plTimerCallbackManager::CancelCallback(plTimerCallback* pTimer) +bool plTimerCallbackManager::CancelCallback(plTimerCallback* pTimer) { for (int i = 0; i < fCallbacks.Count(); i++) { @@ -118,7 +118,7 @@ hsBool plTimerCallbackManager::CancelCallback(plTimerCallback* pTimer) return false; } -hsBool plTimerCallbackManager::CancelCallbacksToKey(const plKey& key) +bool plTimerCallbackManager::CancelCallbacksToKey(const plKey& key) { const plKey rKey; bool removed = false; @@ -181,12 +181,12 @@ void plgTimerCallbackMgr::Init() plgDispatch::Dispatch()->RegisterForExactType( plTimeMsg::Index(), fMgr->GetKey() ); } -hsBool plgTimerCallbackMgr::CancelCallback(plTimerCallback* pTimer) +bool plgTimerCallbackMgr::CancelCallback(plTimerCallback* pTimer) { return (fMgr->CancelCallback(pTimer)); } -hsBool plgTimerCallbackMgr::CancelCallbacksToKey(const plKey& key) +bool plgTimerCallbackMgr::CancelCallbacksToKey(const plKey& key) { return (fMgr->CancelCallbacksToKey(key)); } diff --git a/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.h b/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.h index 52429caf..b73a358b 100644 --- a/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.h +++ b/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.h @@ -73,11 +73,11 @@ public: GETINTERFACE_ANY( plTimerCallbackManager, hsKeyedObject ); virtual plTimerCallback* NewTimer(float time, plMessage* pMsg); - hsBool CancelCallback(plTimerCallback* pTimer); - hsBool CancelCallbacksToKey(const plKey& key); + bool CancelCallback(plTimerCallback* pTimer); + bool CancelCallbacksToKey(const plKey& key); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); @@ -101,8 +101,8 @@ public: static void SetTheTimerCallbackMgr(plTimerCallbackManager *mgr) { fMgr = mgr; } static plTimerCallback* NewTimer(float time, plMessage* pMsg) { return (fMgr->NewTimer(time, pMsg)); } - static hsBool CancelCallback(plTimerCallback* pTimer); - static hsBool CancelCallbacksToKey(const plKey& key); + static bool CancelCallback(plTimerCallback* pTimer); + static bool CancelCallbacksToKey(const plKey& key); }; diff --git a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp index a7abfd00..2d142507 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp @@ -56,7 +56,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ***/ // make sure our definition is at least as big as the compiler's definition -COMPILER_ASSERT(MAX_PATH >= _MAX_PATH); +static_assert(MAX_PATH >= _MAX_PATH, "Windows and STDlib MAX_PATH constants differ"); //=========================================================================== @@ -546,7 +546,7 @@ EPathCreateDirError PathCreateDirectory (const wchar_t path[], unsigned flags) { // if we successfully created the directory then we're done if (result) { // Avoid check for kPathCreateDirFlagOsError - COMPILER_ASSERT(kPathCreateDirSuccess == NO_ERROR); + static_assert(kPathCreateDirSuccess == NO_ERROR, "Path creation success and NO_ERROR constants differ"); return kPathCreateDirSuccess; } diff --git a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Uuid.cpp b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Uuid.cpp index 6c0b1c38..acd519d8 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Uuid.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Uuid.cpp @@ -51,8 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #if 0 -COMPILER_ASSERT(sizeof(Uuid) >= sizeof(GUID)); - void Uuid::Clear() { UuidCreateNil( (GUID *)this ); @@ -120,7 +118,7 @@ Uuid Uuid::Generate() * ***/ -COMPILER_ASSERT(sizeof(Uuid) >= sizeof(GUID)); +static_assert(sizeof(Uuid) >= sizeof(GUID), "pnUtils Uuid and Win32 GUID types differ in size"); //============================================================================ Uuid GuidGenerate () { @@ -137,7 +135,7 @@ void GuidClear (Uuid * uuid) { //============================================================================ bool GuidFromString (const wchar_t str[], Uuid * uuid) { ASSERT(uuid); - COMPILER_ASSERT(sizeof(wchar_t) == sizeof(unsigned short)); + static_assert(sizeof(wchar_t) == sizeof(unsigned short), "Wchar is not an uint16"); return RPC_S_OK == UuidFromStringW((unsigned short *) str, (GUID *) uuid); } diff --git a/Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp b/Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp index 31e83eb0..9735b04a 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp @@ -118,7 +118,7 @@ uint32_t TimeGetSecondsSince2001Utc () { uint64_t TimeGetTime () { #ifdef HS_BUILD_FOR_WIN32 uint64_t time; - COMPILER_ASSERT(sizeof(uint64_t) == sizeof(FILETIME)); + static_assert(sizeof(uint64_t) == sizeof(FILETIME), "FILETIME is not a uint64"); GetSystemTimeAsFileTime((FILETIME *) &time); return time; #else diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp index 265af571..e7ae52e6 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp @@ -104,7 +104,7 @@ void plAgePage::SetFlags(uint8_t f, bool on) } // now preservs original string -hsBool plAgePage::SetFromString( const char *stringIn ) +bool plAgePage::SetFromString( const char *stringIn ) { char *c, seps[] = ", \n"; std::string string = stringIn; @@ -396,7 +396,7 @@ const char *plAgeDescription::GetSectionName( void ) const return "AgeInfo"; } -hsBool plAgeDescription::IParseToken( const char *token, hsStringTokenizer *tokenizer, uint32_t userData ) +bool plAgeDescription::IParseToken( const char *token, hsStringTokenizer *tokenizer, uint32_t userData ) { char *tok; diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.h b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.h index 7e753b21..64339e2a 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.h +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.h @@ -86,7 +86,7 @@ class plAgePage void SetSeqSuffix( uint32_t s ) { fSeqSuffix = s; } void SetFlags(uint8_t f, bool on=true); - hsBool SetFromString( const char *string ); + bool SetFromString( const char *string ); char *GetAsString( void ) const; plAgePage &operator=( const plAgePage &src ); @@ -118,7 +118,7 @@ private: void IDeInit( void ); // Overload for plInitSectionTokenReader - virtual hsBool IParseToken( const char *token, hsStringTokenizer *tokenizer, uint32_t userData ); + virtual bool IParseToken( const char *token, hsStringTokenizer *tokenizer, uint32_t userData ); public: static char kAgeDescPath[]; @@ -169,10 +169,10 @@ public: int32_t GetSequencePrefix( void ) const { return fSeqPrefix; } uint32_t GetReleaseVersion( void ) const { return fReleaseVersion; } - hsBool IsGlobalAge( void ) const { return ( fSeqPrefix < 0 ) ? true : false; } + bool IsGlobalAge( void ) const { return ( fSeqPrefix < 0 ) ? true : false; } // Setters - hsBool SetStart(short year, short month, short day, short hour, short minute, short second) + bool SetStart(short year, short month, short day, short hour, short minute, short second) { return fStart.SetTime(year,month,day,hour,minute,second); } void SetDayLength(const float l) { fDayLength = l; } diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp index 0e52e7b1..3922a853 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp @@ -151,7 +151,7 @@ protected: virtual const char* GetSectionName() const { return "version"; } - virtual hsBool IParseToken(const char* token, hsStringTokenizer* tokenizer, uint32_t userData) + virtual bool IParseToken(const char* token, hsStringTokenizer* tokenizer, uint32_t userData) { if (stricmp(token, "format") == 0) fDest->SetFormatVersion(atoi(tokenizer->next())); @@ -185,7 +185,7 @@ protected: return new plManifestFile(name, "", sum, size, zippedSize, flags); } - virtual hsBool IParseToken(const char* token, hsStringTokenizer* tokenizer, uint32_t userData) + virtual bool IParseToken(const char* token, hsStringTokenizer* tokenizer, uint32_t userData) { plManifestFile* file = IReadManifestFile(token, tokenizer, userData, false); AddFile(file); diff --git a/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.cpp b/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.cpp index 2cbd0119..29815160 100644 --- a/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.cpp @@ -76,7 +76,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plMessage/plAgeLoadedMsg.h" -extern hsBool gDataServerLocal; +extern bool gDataServerLocal; // static plAgeLoader* plAgeLoader::fInstance=nil; @@ -140,7 +140,7 @@ void plAgeLoader::SetInstance(plAgeLoader* inst) // // Plasma Msg Handler // -hsBool plAgeLoader::MsgReceive(plMessage* msg) +bool plAgeLoader::MsgReceive(plMessage* msg) { plInitialAgeStateLoadedMsg *stateMsg = plInitialAgeStateLoadedMsg::ConvertNoRef( msg ); if( stateMsg != nil ) @@ -335,7 +335,7 @@ class plUnloadAgeCollector : public plRegistryPageIterator plUnloadAgeCollector( const char *a ) : fAge( a ) {} - virtual hsBool EatPage( plRegistryPageNode *page ) + virtual bool EatPage( plRegistryPageNode *page ) { if( fAge && stricmp( page->GetPageInfo().GetAge(), fAge ) == 0 ) { diff --git a/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.h b/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.h index d0020dba..a395e098 100644 --- a/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.h +++ b/Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.h @@ -107,7 +107,7 @@ public: void Init(); void Shutdown(); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); bool LoadAge(const char ageName[]); bool UnloadAge() { return IUnloadAge(); } void UpdateAge(const char ageName[]); diff --git a/Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp b/Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp index d05ccb16..ed421c79 100644 --- a/Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp @@ -75,7 +75,7 @@ public: delete[] fFilename; } - hsBool Open(const char* filename, const char* mode) + bool Open(const char* filename, const char* mode) { fFilename = hsStrcpy(filename); return plZlibStream::Open(filename, mode); diff --git a/Sources/Plasma/PubUtilLib/plAudible/plAudibleNull.h b/Sources/Plasma/PubUtilLib/plAudible/plAudibleNull.h index b6c7e1a3..6d2b1240 100644 --- a/Sources/Plasma/PubUtilLib/plAudible/plAudibleNull.h +++ b/Sources/Plasma/PubUtilLib/plAudible/plAudibleNull.h @@ -63,8 +63,8 @@ public: virtual plKey GetSceneObject() const { return fSceneObj; } virtual void SetSceneObject(plKey newNode) { } - virtual plAudible& SetProperty(int prop, hsBool on) { return *this; } - virtual hsBool GetProperty(int prop) { return false; } + virtual plAudible& SetProperty(int prop, bool on) { return *this; } + virtual bool GetProperty(int prop) { return false; } void Play(int index = -1){;} void SynchedPlay(int index = -1) {;} @@ -79,8 +79,8 @@ public: void SetVelocity(const hsVector3 vel,int index = -1){;} hsVector3 GetVelocity(int index = -1) const; hsPoint3 GetPosition(int index = -1); - void SetLooping(hsBool loop,int index = -1){;} // sets continuous loop or stops looping - hsBool IsPlaying(int index = -1){return false;} + void SetLooping(bool loop,int index = -1){;} // sets continuous loop or stops looping + bool IsPlaying(int index = -1){return false;} virtual void SetTime(double t, int index = -1) {} virtual void Activate(){} virtual void DeActivate(){} @@ -89,12 +89,12 @@ public: virtual plSound* GetSound(int i) const { return nil; } virtual int GetSoundIndex(const char *keyname) const { return -1; } virtual void SetVolume(const float volume,int index = -1) {;} - virtual void SetFilename(int index, const char *filename, hsBool isCompressed){} + virtual void SetFilename(int index, const char *filename, bool isCompressed){} virtual void RemoveCallbacks(plSoundMsg* pMsg) {} virtual void AddCallbacks(plSoundMsg* pMsg) {} - virtual void SetMuted( hsBool muted, int index = -1 ) {;} + virtual void SetMuted( bool muted, int index = -1 ) {;} virtual void ToggleMuted( int index = -1 ) {;} virtual void SetTalkIcon(int index, uint32_t str){;} virtual void ClearTalkIcon(){;} diff --git a/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.cpp b/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.cpp index 61ad646f..b2663d0a 100644 --- a/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.cpp +++ b/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.cpp @@ -208,7 +208,7 @@ void plWinAudible::GetStatus(plSoundMsg* pMsg) } } -hsBool plWinAudible::AddSound( plSound *pSnd, int index, hsBool is3D ) +bool plWinAudible::AddSound( plSound *pSnd, int index, bool is3D ) { hsAssert(pSnd->GetKey() != nil, "Adding a new sound with no key."); if (plgAudioSys::Active()) @@ -227,7 +227,7 @@ hsBool plWinAudible::AddSound( plSound *pSnd, int index, hsBool is3D ) } /* Unused -int plWinAudible::AddSoundFromResource(plSound *pSnd, void* addr, int32_t size, hsBool is3D ) +int plWinAudible::AddSoundFromResource(plSound *pSnd, void* addr, int32_t size, bool is3D ) { //plWin32Sound* pSnd = new plWin32Sound; //IAssignSoundKey( pSnd, GetKey() ? GetKeyName() : "", fSoundObjs.Count() - 1 ); @@ -344,7 +344,7 @@ void plWinAudible::SetVolume(const float volume,int index ) SND_APPLY_LOOP( index, SetVolume( volume ), ; ); } -void plWinAudible::SetMuted( hsBool muted, int index ) +void plWinAudible::SetMuted( bool muted, int index ) { SND_APPLY_LOOP( index, SetMuted( muted ), ; ); } @@ -392,7 +392,7 @@ hsPoint3 plWinAudible::GetPosition(int index) return( fSoundObjs[index]->GetPosition() ); } -void plWinAudible::SetLooping(hsBool loop,int index) +void plWinAudible::SetLooping(bool loop,int index) { SND_APPLY_LOOP( index, SetProperty( plSound::kPropLooping, loop ), ; ); } @@ -407,7 +407,7 @@ void plWinAudible::SetFadeOut( const int type, const float length, int index SND_APPLY_LOOP( index, SetFadeOutEffect( (plSound::plFadeParams::Type)type, length ), ; ); } -void plWinAudible::SetFilename(int index, const char *filename, hsBool isCompressed) +void plWinAudible::SetFilename(int index, const char *filename, bool isCompressed) { if(index < 0 || index >= fSoundObjs.Count()) { @@ -426,7 +426,7 @@ void plWinAudible::SetFilename(int index, const char *filename, hsBool isCompres } } -hsBool plWinAudible::IsPlaying(int index) +bool plWinAudible::IsPlaying(int index) { int count = fSoundObjs.Count(); @@ -508,7 +508,7 @@ void plWinAudible::DeActivate() } } -hsBool plWinAudible::MsgReceive(plMessage* msg) +bool plWinAudible::MsgReceive(plMessage* msg) { plGenRefMsg *refMsg; if (refMsg = plGenRefMsg::ConvertNoRef(msg)) @@ -650,7 +650,7 @@ pl2WayWinAudible::~pl2WayWinAudible() delete fVoiceRecorder; } -hsBool pl2WayWinAudible::MsgReceive(plMessage* msg) +bool pl2WayWinAudible::MsgReceive(plMessage* msg) { plEvalMsg* pMsg = plEvalMsg::ConvertNoRef(msg); if (pMsg && fVoiceRecorder) @@ -671,7 +671,7 @@ hsBool pl2WayWinAudible::MsgReceive(plMessage* msg) return plWinAudible::MsgReceive(msg); } -void pl2WayWinAudible::Init(hsBool isLocal) +void pl2WayWinAudible::Init(bool isLocal) { if (!fVoicePlayer) { diff --git a/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.h b/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.h index 6daaf01f..a39414f4 100644 --- a/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.h +++ b/Sources/Plasma/PubUtilLib/plAudible/plWinAudible.h @@ -72,8 +72,8 @@ public: virtual plKey GetSceneObject() const { return fSceneObj; } virtual void SetSceneObject(plKey obj); - virtual plAudible& SetProperty(int prop, hsBool on) { return *this; } - virtual hsBool GetProperty(int prop) { return false; } + virtual plAudible& SetProperty(int prop, bool on) { return *this; } + virtual bool GetProperty(int prop) { return false; } virtual plAudible& SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, int index = -1); @@ -90,30 +90,30 @@ public: virtual void SetVelocity(const hsVector3 vel,int index = -1); hsVector3 GetVelocity(int index = -1) const; hsPoint3 GetPosition(int index = -1); - void SetLooping(hsBool loop,int index = -1); // sets continuous loop or stops looping - hsBool IsPlaying(int index = -1); + void SetLooping(bool loop,int index = -1); // sets continuous loop or stops looping + bool IsPlaying(int index = -1); void SetTime(double t, int index = -1); void SetOuterVol(const int v,int index = -1); // volume for the outer cone (if applicable) void SetConeAngles(int inner, int outer,int index = -1); void RemoveCallbacks(plSoundMsg* pMsg); void AddCallbacks(plSoundMsg* pMsg); - hsBool AddSound(plSound *pSnd, int index,hsBool is3D); - int AddSoundFromResource(plSound *pSnd, void* addr, int32_t size, hsBool is3D); + bool AddSound(plSound *pSnd, int index,bool is3D); + int AddSoundFromResource(plSound *pSnd, void* addr, int32_t size, bool is3D); virtual void GetStatus(plSoundMsg* pMsg); virtual int GetNumSounds() const {return fSoundObjs.Count();} virtual plSound* GetSound(int i) const; virtual int GetSoundIndex(const char *keyname) const; virtual void SetVolume(const float volume,int index = -1); - virtual void SetMuted( hsBool muted, int index = -1 ); + virtual void SetMuted( bool muted, int index = -1 ); virtual void ToggleMuted( int index = -1 ); virtual void SetTalkIcon(int index, uint32_t str){;} virtual void ClearTalkIcon(){;} - void SetFilename(int index, const char *filename, hsBool isCompressed); + void SetFilename(int index, const char *filename, bool isCompressed); virtual void SetFadeIn( const int type, const float length, int index = -1 ); virtual void SetFadeOut( const int type, const float length, int index = -1 ); - virtual hsBool MsgReceive(plMessage* pMsg); + virtual bool MsgReceive(plMessage* pMsg); virtual void Activate(); virtual void DeActivate(); @@ -145,8 +145,8 @@ public: CLASSNAME_REGISTER( pl2WayWinAudible ); GETINTERFACE_ANY( pl2WayWinAudible, plWinAudible ); - virtual hsBool MsgReceive(plMessage* pMsg); - virtual void Init(hsBool isLocal); + virtual bool MsgReceive(plMessage* pMsg); + virtual void Init(bool isLocal); virtual void Activate(); virtual void DeActivate(); virtual void Read(hsStream* s, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plAudible/plWinAudibleProxy.cpp b/Sources/Plasma/PubUtilLib/plAudible/plWinAudibleProxy.cpp index 63bc7db9..508fd721 100644 --- a/Sources/Plasma/PubUtilLib/plAudible/plWinAudibleProxy.cpp +++ b/Sources/Plasma/PubUtilLib/plAudible/plWinAudibleProxy.cpp @@ -57,7 +57,7 @@ plWinAudibleProxy::~plWinAudibleProxy() { } -hsBool plWinAudibleProxy::Init(plWinAudible* aud) +bool plWinAudibleProxy::Init(plWinAudible* aud) { plProxyGen::Init(aud); diff --git a/Sources/Plasma/PubUtilLib/plAudible/plWinAudibleProxy.h b/Sources/Plasma/PubUtilLib/plAudible/plWinAudibleProxy.h index b31decd8..a02d7ea0 100644 --- a/Sources/Plasma/PubUtilLib/plAudible/plWinAudibleProxy.h +++ b/Sources/Plasma/PubUtilLib/plAudible/plWinAudibleProxy.h @@ -52,7 +52,7 @@ public: plWinAudibleProxy(); virtual ~plWinAudibleProxy(); - hsBool Init(plWinAudible* aud); + bool Init(plWinAudible* aud); protected: plWinAudible* fOwner; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioCaps.cpp b/Sources/Plasma/PubUtilLib/plAudio/plAudioCaps.cpp index a98da8f2..8f41a286 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioCaps.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioCaps.cpp @@ -68,7 +68,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ////////////////////////////////////////////////////////////////////////////// plAudioCaps plAudioCapsDetector::fCaps; -hsBool plAudioCapsDetector::fGotCaps = false; +bool plAudioCapsDetector::fGotCaps = false; plStatusLog *plAudioCapsDetector::fLog = nil; @@ -83,7 +83,7 @@ plAudioCapsDetector::~plAudioCapsDetector() //// Detect ////////////////////////////////////////////////////////////////// // Our big function that does all of our work -plAudioCaps &plAudioCapsDetector::Detect( hsBool logIt, hsBool init ) +plAudioCaps &plAudioCapsDetector::Detect( bool logIt, bool init ) { // If we already have the device capabilities, just return them if(fGotCaps) return fCaps; @@ -158,10 +158,10 @@ plAudioCaps &plAudioCapsDetector::Detect( hsBool logIt, hsBool init ) // init code above as a way of trying to make sure this line here will // succeed as often as possible. -hsBool plAudioCapsDetector::IDetectEAX( ) +bool plAudioCapsDetector::IDetectEAX( ) { #ifdef EAX_SDK_AVAILABLE - hsBool gotSupport = true; + bool gotSupport = true; if(!alIsExtensionPresent((ALchar *)"EAX4.0")) // is eax 4 supported { diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioCaps.h b/Sources/Plasma/PubUtilLib/plAudio/plAudioCaps.h index 2102b5dc..b3cf07ad 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioCaps.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioCaps.h @@ -68,15 +68,15 @@ public: fMaxNumSources = 0; } - hsBool IsAvailable( void ) const { return fIsAvailable; } - hsBool IsEAXAvailable( void ) const { return fEAXAvailable; } - hsBool UsingEAXUnified( void ) const { return fEAXUnified; } + bool IsAvailable( void ) const { return fIsAvailable; } + bool IsEAXAvailable( void ) const { return fEAXAvailable; } + bool UsingEAXUnified( void ) const { return fEAXUnified; } unsigned GetMaxNumVoices() { return fMaxNumSources; } protected: friend class plAudioCapsDetector; - hsBool fIsAvailable, fEAXAvailable, fEAXUnified; + bool fIsAvailable, fEAXAvailable, fEAXUnified; unsigned fMaxNumSources; }; @@ -86,14 +86,14 @@ public: plAudioCapsDetector(); virtual ~plAudioCapsDetector(); - static plAudioCaps &Detect( hsBool log = false, hsBool init = false ); + static plAudioCaps &Detect( bool log = false, bool init = false ); protected: static plStatusLog *fLog; static plAudioCaps fCaps; - static hsBool fGotCaps; + static bool fGotCaps; - static hsBool IDetectEAX( ); + static bool IDetectEAX( ); }; #endif //_plAudioCaps_h diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp index 7c992a42..6ce48d04 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp @@ -225,7 +225,7 @@ void plAudioSystem::IEnumerateDevices() // filter out any devices that aren't openal 1.1 compliant if(major > 1 || (major == 1 && minor >= 1)) { - hsBool supportsEAX = false; + bool supportsEAX = false; #ifdef EAX_SDK_AVAILABLE if(alIsExtensionPresent((ALchar *)"EAX4.0") || alIsExtensionPresent((ALchar *) "EAX4.0Emulated")) { @@ -264,10 +264,10 @@ void plAudioSystem::IEnumerateDevices() } //// Init //////////////////////////////////////////////////////////////////// -hsBool plAudioSystem::Init( hsWindowHndl hWnd ) +bool plAudioSystem::Init( hsWindowHndl hWnd ) { plgAudioSys::fRestarting = false; - static hsBool firstTimeInit = true; + static bool firstTimeInit = true; plStatusLog::AddLineS( "audio.log", plStatusLog::kBlue, "ASYS: -- Init --" ); fMaxNumSources = 0; @@ -277,7 +277,7 @@ hsBool plAudioSystem::Init( hsWindowHndl hWnd ) // Set the maximum number of sounds based on priority cutoff slider SetMaxNumberOfActiveSounds(); const char *deviceName = plgAudioSys::fDeviceName.c_str(); - hsBool useDefaultDevice = true; + bool useDefaultDevice = true; if(firstTimeInit) { @@ -483,7 +483,7 @@ const char *plAudioSystem::GetAudioDeviceName(int index) return fDeviceList[index].GetDeviceName(); } -hsBool plAudioSystem::SupportsEAX(const char *deviceName) +bool plAudioSystem::SupportsEAX(const char *deviceName) { for(DeviceIter i = fDeviceList.begin(); i != fDeviceList.end(); i++) { @@ -547,7 +547,7 @@ void plAudioSystem::SetListenerOrientation(const hsVector3 view, const hsVector3 alListenerfv(AL_ORIENTATION, orientation); } -void plAudioSystem::SetActive( hsBool b ) +void plAudioSystem::SetActive( bool b ) { fActive = b; if( fActive ) @@ -876,7 +876,7 @@ void plAudioSystem::SetFadeLength(float lengthSec) fFadeLength = lengthSec; } -hsBool plAudioSystem::MsgReceive(plMessage* msg) +bool plAudioSystem::MsgReceive(plMessage* msg) { if(plTimeMsg *time = plTimeMsg::ConvertNoRef( msg ) ) { @@ -989,12 +989,12 @@ hsBool plAudioSystem::MsgReceive(plMessage* msg) // plgAudioSystem ////////////////////////////////////////////////////////////////////// plAudioSystem* plgAudioSys::fSys = nil; -hsBool plgAudioSys::fInit = false; -hsBool plgAudioSys::fActive = false; -hsBool plgAudioSys::fUseHardware = false; -hsBool plgAudioSys::fMuted = true; -hsBool plgAudioSys::fDelayedActivate = false; -hsBool plgAudioSys::fEnableEAX = false; +bool plgAudioSys::fInit = false; +bool plgAudioSys::fActive = false; +bool plgAudioSys::fUseHardware = false; +bool plgAudioSys::fMuted = true; +bool plgAudioSys::fDelayedActivate = false; +bool plgAudioSys::fEnableEAX = false; hsWindowHndl plgAudioSys::fWnd = nil; float plgAudioSys::fChannelVolumes[ kNumChannels ] = { 1.f, 1.f, 1.f, 1.f, 1.f, 1.f }; float plgAudioSys::f2D3DBias = 0.75f; @@ -1002,12 +1002,12 @@ uint32_t plgAudioSys::fDebugFlags = 0; float plgAudioSys::fStreamingBufferSize = 2.f; float plgAudioSys::fStreamFromRAMCutoff = 10.f; uint8_t plgAudioSys::fPriorityCutoff = 9; // We cut off sounds above this priority -hsBool plgAudioSys::fEnableExtendedLogs = false; +bool plgAudioSys::fEnableExtendedLogs = false; float plgAudioSys::fGlobalFadeVolume = 1.f; -hsBool plgAudioSys::fLogStreamingUpdates = false; +bool plgAudioSys::fLogStreamingUpdates = false; std::string plgAudioSys::fDeviceName; -hsBool plgAudioSys::fRestarting = false; -hsBool plgAudioSys::fMutedStateChange = false; +bool plgAudioSys::fRestarting = false; +bool plgAudioSys::fMutedStateChange = false; void plgAudioSys::Init(hsWindowHndl hWnd) { @@ -1015,12 +1015,6 @@ void plgAudioSys::Init(hsWindowHndl hWnd) fSys->RegisterAs( kAudioSystem_KEY ); plgDispatch::Dispatch()->RegisterForExactType( plAudioSysMsg::Index(), fSys->GetKey() ); plgDispatch::Dispatch()->RegisterForExactType( plRenderMsg::Index(), fSys->GetKey() ); - - if(hsPhysicalMemory() <= 380) - { - plStatusLog::AddLineS("audio.log", "StreamFromRam Disabled"); - fStreamFromRAMCutoff = 4; - } fWnd = hWnd; if(fMuted) @@ -1030,12 +1024,12 @@ void plgAudioSys::Init(hsWindowHndl hWnd) Activate( true ); } -void plgAudioSys::SetActive(hsBool b) +void plgAudioSys::SetActive(bool b) { fActive = b; } -void plgAudioSys::SetMuted( hsBool b ) +void plgAudioSys::SetMuted( bool b ) { fMuted = b; fMutedStateChange = true; @@ -1046,14 +1040,14 @@ void plgAudioSys::SetMuted( hsBool b ) SetGlobalFadeVolume(1.0); } -void plgAudioSys::SetUseHardware(hsBool b) +void plgAudioSys::SetUseHardware(bool b) { fUseHardware = b; if( fActive ) Restart(); } -void plgAudioSys::EnableEAX( hsBool b ) +void plgAudioSys::EnableEAX( bool b ) { fEnableEAX = b; if( fActive ) @@ -1133,7 +1127,7 @@ void plgAudioSys::Shutdown() } } -void plgAudioSys::Activate(hsBool b) +void plgAudioSys::Activate(bool b) { if( fSys == nil ) { @@ -1216,7 +1210,7 @@ float plgAudioSys::Get2D3Dbias() return f2D3DBias; } -void plgAudioSys::SetDeviceName(const char *device, hsBool restart /* = false */) +void plgAudioSys::SetDeviceName(const char *device, bool restart /* = false */) { fDeviceName = device; if(restart) @@ -1248,7 +1242,7 @@ ALCdevice *plgAudioSys::GetCaptureDevice() return nil; } -hsBool plgAudioSys::SupportsEAX(const char *deviceName) +bool plgAudioSys::SupportsEAX(const char *deviceName) { if(fSys) { diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h index 0f949acc..15c81c58 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h @@ -65,17 +65,17 @@ typedef struct ALCcontext_struct ALCcontext; class DeviceDescriptor { public: - DeviceDescriptor(const char *name, hsBool supportsEAX): + DeviceDescriptor(const char *name, bool supportsEAX): fDeviceName(name), fSupportsEAX(supportsEAX) { } const char *GetDeviceName() { return fDeviceName.c_str();} - hsBool SupportsEAX() { return fSupportsEAX; } + bool SupportsEAX() { return fSupportsEAX; } private: std::string fDeviceName; - hsBool fSupportsEAX; + bool fSupportsEAX; }; class plAudioSystem : public hsKeyedObject @@ -93,10 +93,10 @@ public: kRefEAXRegion }; - hsBool Init(hsWindowHndl hWnd); + bool Init(hsWindowHndl hWnd); void Shutdown(); - void SetActive( hsBool b ); + void SetActive( bool b ); void SetListenerPos(const hsPoint3 pos); void SetListenerVelocity(const hsVector3 vel); @@ -104,7 +104,7 @@ public: void SetMaxNumberOfActiveSounds(); // sets the max number of active sounds based on the priority cutoff void SetDistanceModel(int i); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); double GetTime(); void NextDebugSound( void ); @@ -112,7 +112,7 @@ public: int GetNumAudioDevices(); const char *GetAudioDeviceName(int index); - hsBool SupportsEAX(const char *deviceName); + bool SupportsEAX(const char *deviceName); void SetFadeLength(float lengthSec); @@ -133,16 +133,16 @@ protected: hsTArray fPendingRegisters; hsPoint3 fCurrListenerPos;//, fCommittedListenerPos; - hsBool fActive, fUsingEAX, fRestartOnDestruct, fWaitingForShutdown; + bool fActive, fUsingEAX, fRestartOnDestruct, fWaitingForShutdown; int64_t fStartTime; hsTArray fMyRefs; hsTArray fEAXRegions; hsPoint3 fLastPos; - hsBool fAvatarPosSet; // used for listener stuff + bool fAvatarPosSet; // used for listener stuff - hsBool fDisplayNumBuffers; + bool fDisplayNumBuffers; std::vector fDeviceList; // list of openal device names @@ -158,7 +158,7 @@ protected: void IEnumerateDevices(); public: - hsBool fListenerInit; + bool fListenerInit; }; class plgAudioSys @@ -189,19 +189,19 @@ public: kHardwarePlusEAX, }; static void Init(hsWindowHndl hWnd); - static hsBool Hardware() { return fUseHardware; } - static void SetUseHardware(hsBool b); - static void SetActive(hsBool b); - static void SetMuted( hsBool b ); - static void EnableEAX( hsBool b ); - static hsBool Active() { return fInit; } + static bool Hardware() { return fUseHardware; } + static void SetUseHardware(bool b); + static void SetActive(bool b); + static void SetMuted( bool b ); + static void EnableEAX( bool b ); + static bool Active() { return fInit; } static void Shutdown(); - static void Activate(hsBool b); - static hsBool IsMuted( void ) { return fMuted; } + static void Activate(bool b); + static bool IsMuted( void ) { return fMuted; } static hsWindowHndl hWnd() { return fWnd; } static plAudioSystem* Sys() { return fSys; } static void Restart( void ); - static hsBool UsingEAX( void ) { return fSys->fUsingEAX; } + static bool UsingEAX( void ) { return fSys->fUsingEAX; } static void NextDebugSound( void ); @@ -214,8 +214,8 @@ public: static void SetGlobalFadeVolume( float vol ); static float GetGlobalFadeVolume( void ) { return fGlobalFadeVolume; } - static void SetDebugFlag( uint32_t flag, hsBool set = true ) { if( set ) fDebugFlags |= flag; else fDebugFlags &= ~flag; } - static hsBool IsDebugFlagSet( uint32_t flag ) { return fDebugFlags & flag; } + static void SetDebugFlag( uint32_t flag, bool set = true ) { if( set ) fDebugFlags |= flag; else fDebugFlags &= ~flag; } + static bool IsDebugFlagSet( uint32_t flag ) { return fDebugFlags & flag; } static void ClearDebugFlags( void ) { fDebugFlags = 0; } static float GetStreamingBufferSize( void ) { return fStreamingBufferSize; } @@ -224,8 +224,8 @@ public: static uint8_t GetPriorityCutoff( void ) { return fPriorityCutoff; } static void SetPriorityCutoff( uint8_t cut ) { fPriorityCutoff = cut; if(fSys) fSys->SetMaxNumberOfActiveSounds(); } - static hsBool AreExtendedLogsEnabled( void ) { return fEnableExtendedLogs; } - static void EnableExtendedLogs( hsBool e ) { fEnableExtendedLogs = e; } + static bool AreExtendedLogsEnabled( void ) { return fEnableExtendedLogs; } + static void EnableExtendedLogs( bool e ) { fEnableExtendedLogs = e; } static float GetStreamFromRAMCutoff( void ) { return fStreamFromRAMCutoff; } static void SetStreamFromRAMCutoff( float c ) { fStreamFromRAMCutoff = c; } @@ -234,46 +234,46 @@ public: static void SetListenerVelocity(const hsVector3 vel); static void SetListenerOrientation(const hsVector3 view, const hsVector3 up); - static void ShowNumBuffers(hsBool b) { if(fSys) fSys->fDisplayNumBuffers = b; } + static void ShowNumBuffers(bool b) { if(fSys) fSys->fDisplayNumBuffers = b; } static void SetAudioMode(AudioMode mode); static int GetAudioMode(); - static hsBool LogStreamingUpdates() { return fLogStreamingUpdates; } - static void SetLogStreamingUpdates(hsBool logUpdates) { fLogStreamingUpdates = logUpdates; } - static void SetDeviceName(const char *device, hsBool restart = false); + static bool LogStreamingUpdates() { return fLogStreamingUpdates; } + static void SetLogStreamingUpdates(bool logUpdates) { fLogStreamingUpdates = logUpdates; } + static void SetDeviceName(const char *device, bool restart = false); static const char *GetDeviceName() { return fDeviceName.c_str(); } static int GetNumAudioDevices(); static const char *GetAudioDeviceName(int index); static ALCdevice *GetCaptureDevice(); - static hsBool SupportsEAX(const char *deviceName); + static bool SupportsEAX(const char *deviceName); static void RegisterSoftSound( const plKey soundKey ); static void UnregisterSoftSound( const plKey soundKey ); - static hsBool IsRestarting() {return fRestarting;} + static bool IsRestarting() {return fRestarting;} private: friend class plAudioSystem; static plAudioSystem* fSys; - static hsBool fInit; - static hsBool fActive; - static hsBool fMuted; + static bool fInit; + static bool fActive; + static bool fMuted; static hsWindowHndl fWnd; - static hsBool fUseHardware; - static hsBool fDelayedActivate; + static bool fUseHardware; + static bool fDelayedActivate; static float fChannelVolumes[ kNumChannels ]; static float fGlobalFadeVolume; static uint32_t fDebugFlags; - static hsBool fEnableEAX; + static bool fEnableEAX; static float fStreamingBufferSize; static uint8_t fPriorityCutoff; - static hsBool fEnableExtendedLogs; + static bool fEnableExtendedLogs; static float fStreamFromRAMCutoff; static float f2D3DBias; - static hsBool fLogStreamingUpdates; + static bool fLogStreamingUpdates; static std::string fDeviceName; - static hsBool fRestarting; - static hsBool fMutedStateChange; + static bool fRestarting; + static bool fMutedStateChange; }; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp b/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp index d246b948..bdd6e092 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp @@ -69,7 +69,7 @@ plProfile_CreateCounterNoReset( "Allocated", "Sound", NumAllocated ); //// Constructor/Destructor ////////////////////////////////////////////////// -plDSoundBuffer::plDSoundBuffer( uint32_t size, plWAVHeader &bufferDesc, hsBool enable3D, hsBool isLooping, hsBool tryStatic, bool streaming ) +plDSoundBuffer::plDSoundBuffer( uint32_t size, plWAVHeader &bufferDesc, bool enable3D, bool isLooping, bool tryStatic, bool streaming ) { fLooping = isLooping; fValid = false; @@ -100,7 +100,7 @@ plDSoundBuffer::~plDSoundBuffer() //// IAllocate /////////////////////////////////////////////////////////////// -void plDSoundBuffer::IAllocate( uint32_t size, plWAVHeader &bufferDesc, hsBool enable3D, hsBool tryStatic ) +void plDSoundBuffer::IAllocate( uint32_t size, plWAVHeader &bufferDesc, bool enable3D, bool tryStatic ) { // Create a DSound buffer description fBufferDesc = new plWAVHeader; @@ -404,7 +404,7 @@ bool plDSoundBuffer::StreamingFillBuffer(plAudioFileReader *stream) ALuint bufferId; unsigned char data[STREAM_BUFFER_SIZE]; int buffersProcessed = BuffersProcessed(); - hsBool finished = false; + bool finished = false; for(int i = 0; i < buffersProcessed; i++) { @@ -574,7 +574,7 @@ bool plDSoundBuffer::VoiceFillBuffer(void *data, unsigned bytes, unsigned buffer //// SetLooping ////////////////////////////////////////////////////////////// -void plDSoundBuffer::SetLooping( hsBool loop ) +void plDSoundBuffer::SetLooping( bool loop ) { fLooping = loop; } @@ -684,7 +684,7 @@ void plDSoundBuffer::Rewind() //// IsPlaying /////////////////////////////////////////////////////////////// -hsBool plDSoundBuffer::IsPlaying( void ) +bool plDSoundBuffer::IsPlaying( void ) { ALint state = AL_STOPPED; alGetSourcei(source, AL_SOURCE_STATE, &state); @@ -694,7 +694,7 @@ hsBool plDSoundBuffer::IsPlaying( void ) //// IsEAXAccelerated //////////////////////////////////////////////////////// -hsBool plDSoundBuffer::IsEAXAccelerated( void ) const +bool plDSoundBuffer::IsEAXAccelerated( void ) const { return fEAXSource.IsValid(); } @@ -727,7 +727,7 @@ uint32_t plDSoundBuffer::GetLengthInBytes( void ) const //// SetEAXSettings ////////////////////////////////////////////////////////// -void plDSoundBuffer::SetEAXSettings( plEAXSourceSettings *settings, hsBool force ) +void plDSoundBuffer::SetEAXSettings( plEAXSourceSettings *settings, bool force ) { fEAXSource.SetFrom( settings, source, force ); } diff --git a/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.h b/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.h index 91d79f7a..438c6f4c 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.h @@ -68,7 +68,7 @@ class plAudioFileReader; class plDSoundBuffer { public: - plDSoundBuffer( uint32_t size, plWAVHeader &bufferDesc, hsBool enable3D, hsBool looping, hsBool tryStatic = false, bool streaming = false ); + plDSoundBuffer( uint32_t size, plWAVHeader &bufferDesc, bool enable3D, bool looping, bool tryStatic = false, bool streaming = false ); ~plDSoundBuffer(); void Play( void ); @@ -86,14 +86,14 @@ public: void SetConeOrientation(float x, float y, float z); void SetConeOutsideVolume(int vol); - void SetLooping( hsBool loop ); + void SetLooping( bool loop ); void SetMinDistance( int dist); void SetMaxDistance( int dist ); - hsBool IsValid( void ) const { return fValid; } - hsBool IsPlaying( void ); - hsBool IsLooping( void ) const { return fLooping; } - hsBool IsEAXAccelerated( void ) const; + bool IsValid( void ) const { return fValid; } + bool IsPlaying( void ); + bool IsLooping( void ) const { return fLooping; } + bool IsEAXAccelerated( void ) const; bool FillBuffer(void *data, unsigned bytes, plWAVHeader *header); @@ -112,7 +112,7 @@ public: uint32_t GetBufferBytePos( float timeInSecs ) const; uint32_t bytePosToMSecs( uint32_t bytePos ) const; - void SetEAXSettings( plEAXSourceSettings *settings, hsBool force = false ); + void SetEAXSettings( plEAXSourceSettings *settings, bool force = false ); void SetTimeOffsetBytes(unsigned bytes); uint8_t GetBlockAlign( void ) const; static uint32_t GetNumBuffers() { return fNumBuffers; } @@ -134,7 +134,7 @@ protected: }; BufferType fType; - hsBool fValid, fLooping; + bool fValid, fLooping; uint32_t fLockLength; void * fLockPtr; @@ -158,7 +158,7 @@ protected: unsigned fNumQueuedBuffers; float fPrevVolume; - void IAllocate( uint32_t size, plWAVHeader &bufferDesc, hsBool enable3D, hsBool tryStatic ); + void IAllocate( uint32_t size, plWAVHeader &bufferDesc, bool enable3D, bool tryStatic ); void IRelease( void ); int IGetALFormat(unsigned bitsPerSample, unsigned int numChannels); }; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp index 91c61abc..e6d82682 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp @@ -106,7 +106,7 @@ plEAXListener::~plEAXListener() //// Init //////////////////////////////////////////////////////////////////// -hsBool plEAXListener::Init( void ) +bool plEAXListener::Init( void ) { #ifdef EAX_SDK_AVAILABLE if( fInited ) @@ -229,7 +229,7 @@ void plEAXListener::IRelease( void ) //// IFail /////////////////////////////////////////////////////////////////// -void plEAXListener::IFail( hsBool major ) +void plEAXListener::IFail( bool major ) { plStatusLog::AddLineS( "audio.log", plStatusLog::kRed, "ERROR in plEAXListener: Could not set global eax params"); @@ -238,7 +238,7 @@ void plEAXListener::IFail( hsBool major ) IRelease(); } -void plEAXListener::IFail( const char *msg, hsBool major ) +void plEAXListener::IFail( const char *msg, bool major ) { plStatusLog::AddLineS( "audio.log", plStatusLog::kRed, "ERROR in plEAXListener: %s", msg ); @@ -296,13 +296,13 @@ void plEAXListener::ProcessMods( hsTArray &modArray ) #ifdef EAX_SDK_AVAILABLE int i; float totalStrength; - hsBool firstOne; + bool firstOne; plEAXListenerMod *thisBigRegion = nil; EAXLISTENERPROPERTIES finalProps; static int oldTime = timeGetTime(); // Get starting time int newTime; - hsBool bMorphing = false; + bool bMorphing = false; static plStatusLog *myLog = nil; @@ -512,7 +512,7 @@ void plEAXSourceSettings::Write( hsStream *s ) } } -void plEAXSourceSettings::SetRoomParams( int16_t room, int16_t roomHF, hsBool roomAuto, hsBool roomHFAuto ) +void plEAXSourceSettings::SetRoomParams( int16_t room, int16_t roomHF, bool roomAuto, bool roomHFAuto ) { fRoom = room; fRoomHF = roomHF; @@ -521,7 +521,7 @@ void plEAXSourceSettings::SetRoomParams( int16_t room, int16_t roomHF, hsBool fDirtyParams |= kRoom; } -void plEAXSourceSettings::Enable( hsBool e ) +void plEAXSourceSettings::Enable( bool e ) { fEnabled = e; if( !e ) @@ -659,14 +659,14 @@ void plEAXSource::Release( void ) fInit = false; } -hsBool plEAXSource::IsValid( void ) const +bool plEAXSource::IsValid( void ) const { return true; } //// SetFrom ///////////////////////////////////////////////////////////////// -void plEAXSource::SetFrom( plEAXSourceSettings *settings, unsigned source, hsBool force ) +void plEAXSource::SetFrom( plEAXSourceSettings *settings, unsigned source, bool force ) { uint32_t dirtyParams; if(source == 0 || !fInit) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h index 2df41bc7..9bf09072 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.h @@ -75,7 +75,7 @@ public: ~plEAXListener(); static plEAXListener &GetInstance( void ); - hsBool Init( void ); + bool Init( void ); void Shutdown( void ); bool SetGlobalEAXProperty(GUID guid, unsigned long ulProperty, void *pData, unsigned long ulDataSize ); @@ -86,17 +86,17 @@ public: protected: plEAXListener(); - void IFail( hsBool major ); - void IFail( const char *msg, hsBool major ); + void IFail( bool major ); + void IFail( const char *msg, bool major ); void IRelease( void ); void IMuteProperties( EAXREVERBPROPERTIES *props, float percent ); - hsBool fInited; + bool fInited; // Cache info int32_t fLastModCount; - hsBool fLastWasEmpty; + bool fLastWasEmpty; float fLastSingleStrength; plEAXListenerMod *fLastBigRegion; @@ -138,14 +138,14 @@ class plEAXSourceSettings void Read( hsStream *s ); void Write( hsStream *s ); - void Enable( hsBool e ); - hsBool IsEnabled( void ) const { return fEnabled; } + void Enable( bool e ); + bool IsEnabled( void ) const { return fEnabled; } - void SetRoomParams( int16_t room, int16_t roomHF, hsBool roomAuto, hsBool roomHFAuto ); + void SetRoomParams( int16_t room, int16_t roomHF, bool roomAuto, bool roomHFAuto ); int16_t GetRoom( void ) const { return fRoom; } int16_t GetRoomHF( void ) const { return fRoomHF; } - hsBool GetRoomAuto( void ) const { return fRoomAuto; } - hsBool GetRoomHFAuto( void ) const { return fRoomHFAuto; } + bool GetRoomAuto( void ) const { return fRoomAuto; } + bool GetRoomHFAuto( void ) const { return fRoomHFAuto; } void SetOutsideVolHF( int16_t vol ); int16_t GetOutsideVolHF( void ) const { return fOutsideVolHF; } @@ -170,9 +170,9 @@ class plEAXSourceSettings friend class plEAXSource; friend class plEAXSourceSoftSettings; - hsBool fEnabled; + bool fEnabled; int16_t fRoom, fRoomHF; - hsBool fRoomAuto, fRoomHFAuto; + bool fRoomAuto, fRoomHFAuto; int16_t fOutsideVolHF; float fAirAbsorptionFactor, fRoomRolloffFactor, fDopplerFactor, fRolloffFactor; plEAXSourceSoftSettings fSoftStarts, fSoftEnds, fCurrSoftValues; @@ -204,13 +204,13 @@ public: void Init( plDSoundBuffer *parent ); void Release( void ); - hsBool IsValid( void ) const; + bool IsValid( void ) const; bool SetSourceEAXProperty(unsigned source, GUID guid, unsigned long ulProperty, void *pData, unsigned long ulDataSize); bool GetSourceEAXProperty(unsigned source, GUID guid, unsigned long ulProperty, void *pData, unsigned long ulDataSize); - void SetFrom( plEAXSourceSettings *settings, unsigned source, hsBool force = false ); + void SetFrom( plEAXSourceSettings *settings, unsigned source, bool force = false ); private: - hsBool fInit; + bool fInit; }; #endif //_plEAXEffects_h diff --git a/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.cpp b/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.cpp index cae75865..113b1337 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.cpp @@ -120,13 +120,13 @@ void plEAXListenerMod::IUnRegister( void ) fRegistered = false; } -hsBool plEAXListenerMod::IEval( double secs, float del, uint32_t dirty ) +bool plEAXListenerMod::IEval( double secs, float del, uint32_t dirty ) { IRegister(); return false; } -hsBool plEAXListenerMod::MsgReceive( plMessage* pMsg ) +bool plEAXListenerMod::MsgReceive( plMessage* pMsg ) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( pMsg ); if( refMsg != nil ) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.h b/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.h index d898babb..1c0fb6bb 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plEAXListenerMod.h @@ -72,7 +72,7 @@ public: kRefSoftRegion = 0, }; - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); float GetStrength( void ); @@ -83,11 +83,11 @@ public: protected: plSoftVolume *fSoftRegion; EAXREVERBPROPERTIES *fListenerProps; - hsBool fRegistered, fGetsMessages; + bool fRegistered, fGetsMessages; void IRegister( void ); void IUnRegister( void ); - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() + virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval() }; #endif // _plEAXListenerMod_h diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp index 213a0d09..4834ac40 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp @@ -75,8 +75,8 @@ plProfile_CreateAsynchTimer( "Sound Load Time", "Sound", SoundLoadTime ); plGraphPlate *plSound::fDebugPlate = nil; plSound *plSound::fCurrDebugPlateSound = nil; -hsBool plSound::fLoadOnDemandFlag = true; -hsBool plSound::fLoadFromDiskOnDemand = true; +bool plSound::fLoadOnDemandFlag = true; +bool plSound::fLoadFromDiskOnDemand = true; unsigned plSound::fIncidentalsPlaying = 0; plSound::plSound() : @@ -128,7 +128,7 @@ plSound::~plSound() plProfile_Dec( SoundNumLoaded ); } -void plSound::IPrintDbgMessage( const char *msg, hsBool isError ) +void plSound::IPrintDbgMessage( const char *msg, bool isError ) { static plStatusLog *ourLog = nil; @@ -468,7 +468,7 @@ void plSound::RefreshVolume( void ) this->ISetActualVolume( fCurrVolume ); } -void plSound::SetMuted( hsBool muted ) +void plSound::SetMuted( bool muted ) { if( muted != fMuted ) { @@ -605,7 +605,7 @@ void plSound::IStartFade( plFadeParams *params, float offsetIntoFade ) } } -void plSound::IStopFade( hsBool shuttingDown, hsBool SetVolEnd) +void plSound::IStopFade( bool shuttingDown, bool SetVolEnd) { if( fCurrFadeParams != nil ) { @@ -643,7 +643,7 @@ void plSound::IStopFade( hsBool shuttingDown, hsBool SetVolEnd) } } -hsBool plSound::MsgReceive( plMessage* pMsg ) +bool plSound::MsgReceive( plMessage* pMsg ) { plTimeMsg *time = plTimeMsg::ConvertNoRef( pMsg ); if( time != nil ) @@ -839,7 +839,7 @@ void plSound::IUnloadDataBuffer( void ) ///////////////////////////////////////////////////////////////////////// // calling preload will cause the sound to play once loaded -plSoundBuffer::ELoadReturnVal plSound::IPreLoadBuffer( hsBool playWhenLoaded, hsBool isIncidental /* = false */ ) +plSoundBuffer::ELoadReturnVal plSound::IPreLoadBuffer( bool playWhenLoaded, bool isIncidental /* = false */ ) { if(!ILoadDataBuffer()) { @@ -924,7 +924,7 @@ void plSound::ISetSoftOcclusionRegion( plSoftVolume *region ) ///////////////////////////////////////////////////////////////////////// // This function calculates our new softVolume value. Used both to update the // said value and so the audio system can rank us in importance. -float plSound::CalcSoftVolume( hsBool enable, float distToListenerSquared ) +float plSound::CalcSoftVolume( bool enable, float distToListenerSquared ) { // Do distance-based attenuation ourselves #if MCN_HACK_OUR_ATTEN @@ -1025,7 +1025,7 @@ float plSound::GetVolumeRank( void ) // Tests to see whether, if we try to play this sound now, it'll actually // be able to play. Takes into account whether the sound is within range // of the listener and the current soft region value. -hsBool plSound::IWillBeAbleToPlay( void ) +bool plSound::IWillBeAbleToPlay( void ) { if( fSoftVolume == 0.f ) return false; @@ -1036,7 +1036,7 @@ hsBool plSound::IWillBeAbleToPlay( void ) ///////////////////////////////////////////////////////////////////////// // Tests to see whether this sound is within range of the position given, // ignoring soft volumes. -hsBool plSound::IsWithinRange( const hsPoint3 &listenerPos, float *distSquared ) +bool plSound::IsWithinRange( const hsPoint3 &listenerPos, float *distSquared ) { if( !IsPropertySet( plSound::kPropIs3DSound ) ) { @@ -1071,7 +1071,7 @@ hsBool plSound::IsWithinRange( const hsPoint3 &listenerPos, float *distSquared ) // Note: if we KNOW we're disabling this sound (out of range), Calc() doesn't // have to be called at all, and we can simply call this function with // enable = false. -void plSound::UpdateSoftVolume( hsBool enable, hsBool firstTime ) +void plSound::UpdateSoftVolume( bool enable, bool firstTime ) { fNotHighEnoughPriority = !enable; @@ -1146,7 +1146,7 @@ float plSound::IAttenuateActualVolume( float volume ) const return volume; } -void plSound::Activate(hsBool forcePlay) +void plSound::Activate(bool forcePlay) { // Our actual state... fActive = true; @@ -1352,8 +1352,8 @@ void plSound::plFadeParams::Read( hsStream *s ) s->ReadLE( &fVolEnd ); s->ReadLE( &fType ); s->ReadLE( &fCurrTime ); - s->ReadLE( &fStopWhenDone ); - s->ReadLE( &fFadeSoftVol ); + fStopWhenDone = s->ReadBOOL(); + fFadeSoftVol = s->ReadBOOL(); } void plSound::plFadeParams::Write( hsStream *s ) @@ -1363,8 +1363,8 @@ void plSound::plFadeParams::Write( hsStream *s ) s->WriteLE( fVolEnd ); s->WriteLE( fType ); s->WriteLE( fCurrTime ); - s->WriteLE( fStopWhenDone ); - s->WriteLE( fFadeSoftVol ); + s->WriteBOOL( fStopWhenDone ); + s->WriteBOOL( fFadeSoftVol ); } float plSound::plFadeParams::InterpValue( void ) @@ -1480,7 +1480,7 @@ plDrawableSpans* plSound::CreateProxy(const hsMatrix44& l2w, hsGMaterial* mat, h // call when state has changed -hsBool plSound::DirtySynchState(const char* sdlName /* kSDLSound */, uint32_t sendFlags) +bool plSound::DirtySynchState(const char* sdlName /* kSDLSound */, uint32_t sendFlags) { /* if( sdlName == nil ) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSound.h b/Sources/Plasma/PubUtilLib/plAudio/plSound.h index 810921c8..e811b5e8 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSound.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plSound.h @@ -152,9 +152,9 @@ public: float fLengthInSecs; // Time to take to fade float fVolStart; // Set one of these two for fade in/out, float fVolEnd; // the other becomes the current volume - uint8_t fType; - hsBool fStopWhenDone; // Actually stop the sound once the fade is complete - hsBool fFadeSoftVol; // Fade the soft volume instead of fCurrVolume + uint8_t fType; + bool fStopWhenDone; // Actually stop the sound once the fade is complete + bool fFadeSoftVol; // Fade the soft volume instead of fCurrVolume plFadeParams() { fLengthInSecs = 0.f; fCurrTime = -1.f; fStopWhenDone = false; fFadeSoftVol = false; fVolStart = fVolEnd = 0.f; fType = kLinear; } @@ -174,7 +174,7 @@ public: float fCurrTime; // -1 if we aren't active, else it's how far we're into the animation }; - virtual hsBool LoadSound( hsBool is3D ) = 0; + virtual bool LoadSound( bool is3D ) = 0; float GetVirtualStartTime( void ) const { return (float)fVirtualStartTime; } virtual void Play(); @@ -190,14 +190,14 @@ public: virtual void SetVolume(const float volume); virtual float GetVolume(void) const { return fCurrVolume; } float GetMaxVolume() { return fMaxVolume; } - virtual hsBool IsPlaying() { return fPlaying; } + virtual bool IsPlaying() { return fPlaying; } void SetTime(double t); virtual double GetTime( void ) { return 0.f; } - virtual void Activate(hsBool forcePlay = false); + virtual void Activate(bool forcePlay = false); virtual void DeActivate(); virtual void SetLength(double l) { fLength = l; } - virtual void SetMuted( hsBool muted ); - virtual hsBool IsMuted( void ) { return fMuted; } + virtual void SetMuted( bool muted ); + virtual bool IsMuted( void ) { return fMuted; } void Disable() { fDistAttenuation = 0; } virtual plSoundMsg* GetStatus(plSoundMsg* pMsg){return NULL;} virtual void SetConeOrientation(float x, float y, float z); @@ -216,8 +216,8 @@ public: const char * GetFileName( void ) const; virtual double GetLength(); - void SetProperty( Property prop, hsBool on ) { if( on ) fProperties |= prop; else fProperties &= ~prop; } - hsBool IsPropertySet( Property prop ) const { return ( fProperties & prop ) ? true : false; } + void SetProperty( Property prop, bool on ) { if( on ) fProperties |= prop; else fProperties &= ~prop; } + bool IsPropertySet( Property prop ) const { return ( fProperties & prop ) ? true : false; } virtual void RefreshVolume( void ); @@ -235,14 +235,14 @@ public: virtual void SetFadeInEffect( plFadeParams::Type type, float length ); virtual void SetFadeOutEffect( plFadeParams::Type type, float length ); - virtual float CalcSoftVolume( hsBool enable, float distToListenerSquared ); - virtual void UpdateSoftVolume( hsBool enable, hsBool firstTime = false ); + virtual float CalcSoftVolume( bool enable, float distToListenerSquared ); + virtual void UpdateSoftVolume( bool enable, bool firstTime = false ); - virtual hsBool MsgReceive( plMessage* pMsg ); - virtual hsBool DirtySynchState( const char *sdlName = nil, uint32_t sendFlags = 0 ); // call when state has changed + virtual bool MsgReceive( plMessage* pMsg ); + virtual bool DirtySynchState( const char *sdlName = nil, uint32_t sendFlags = 0 ); // call when state has changed // Tests whether this sound is within range of the given position, not counting soft regions - hsBool IsWithinRange( const hsPoint3 &listenerPos, float *distSquared ); + bool IsWithinRange( const hsPoint3 &listenerPos, float *distSquared ); // Type setting and getting, from the Types enum void SetType( uint8_t type ) { fType = type; } @@ -269,8 +269,8 @@ public: float GetVolumeRank( void ); void ForceUnregisterFromAudioSys( void ); - static void SetLoadOnDemand( hsBool activate ) { fLoadOnDemandFlag = activate; } - static void SetLoadFromDiskOnDemand( hsBool activate ) { fLoadFromDiskOnDemand = activate; } + static void SetLoadOnDemand( bool activate ) { fLoadOnDemandFlag = activate; } + static void SetLoadFromDiskOnDemand( bool activate ) { fLoadFromDiskOnDemand = activate; } const plEAXSourceSettings &GetEAXSettings( void ) const { return fEAXSettings; } plEAXSourceSettings &GetEAXSettings( void ) { return fEAXSettings; } @@ -279,8 +279,8 @@ public: protected: - hsBool fPlaying; - hsBool fActive; + bool fPlaying; + bool fActive; double fTime; int fMaxFalloff; int fMinFalloff; @@ -298,15 +298,15 @@ protected: uint8_t fType; uint8_t fPriority; - hsBool fMuted, fFading, fRegisteredForTime, fPlayOnReactivate, fFreeData; - hsBool fNotHighEnoughPriority; // Set whenever the audioSys calls UpdateSoftVolume() with enable=false, + bool fMuted, fFading, fRegisteredForTime, fPlayOnReactivate, fFreeData; + bool fNotHighEnoughPriority; // Set whenever the audioSys calls UpdateSoftVolume() with enable=false, // thus indicating that we slipped off the top 16 most wanted list. // Do these need to be synched values? They weren't before... hsVector3 fConeOrientation; hsPoint3 f3DPosition; hsVector3 f3DVelocity; - hsBool fPlayWhenLoaded; + bool fPlayWhenLoaded; double fSynchedStartTimeSec; @@ -315,7 +315,7 @@ protected: // EAX Settings storage here plEAXSourceSettings fEAXSettings; - hsBool fQueued; + bool fQueued; plFadeParams fFadeInParams, fFadeOutParams; plFadeParams fCoolSoftVolumeTrickParams; @@ -325,45 +325,45 @@ protected: float fSoftVolume; float fDistAttenuation, fDistToListenerSquared; double fVirtualStartTime; - hsBool fRegistered; + bool fRegistered; static unsigned fIncidentalsPlaying; plSoftVolume *fSoftOcclusionRegion; plSoundBuffer *fDataBuffer; // Not always around - hsBool fDataBufferLoaded; + bool fDataBufferLoaded; plKey fDataBufferKey; // Always around static plGraphPlate *fDebugPlate; static plSound *fCurrDebugPlateSound; - static hsBool fLoadOnDemandFlag, fLoadFromDiskOnDemand; - hsBool fLoading; + static bool fLoadOnDemandFlag, fLoadFromDiskOnDemand; + bool fLoading; void IUpdateDebugPlate( void ); - void IPrintDbgMessage( const char *msg, hsBool isErr = false ); + void IPrintDbgMessage( const char *msg, bool isErr = false ); virtual void ISetActualVolume(const float v) = 0; virtual void IActuallyStop( void ); - virtual hsBool IActuallyPlaying( void ) = 0; + virtual bool IActuallyPlaying( void ) = 0; virtual void IActuallyPlay( void ) = 0; virtual void IFreeBuffers( void ) = 0; //NOTE: if isIncidental is true the entire sound will be loaded. - virtual plSoundBuffer::ELoadReturnVal IPreLoadBuffer( hsBool playWhenLoaded, hsBool isIncidental = false ); + virtual plSoundBuffer::ELoadReturnVal IPreLoadBuffer( bool playWhenLoaded, bool isIncidental = false ); virtual void ISetActualTime( double t ) = 0; - virtual hsBool IActuallyLoaded( void ) = 0; - virtual void IRefreshEAXSettings( hsBool force = false ) = 0; + virtual bool IActuallyLoaded( void ) = 0; + virtual void IRefreshEAXSettings( bool force = false ) = 0; virtual float IGetChannelVolume( void ) const; void ISynchToStartTime( void ); void ISynchedPlay( double virtualStartTime ); void IStartFade( plFadeParams *params, float offsetIntoFade = 0.f ); - void IStopFade( hsBool shuttingDown = false, hsBool SetVolEnd = true); + void IStopFade( bool shuttingDown = false, bool SetVolEnd = true); - hsBool IWillBeAbleToPlay( void ); + bool IWillBeAbleToPlay( void ); void ISetSoftRegion( plSoftVolume *region ); float IAttenuateActualVolume( float volume ) const; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp index e9d34c59..85ce334e 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp @@ -100,7 +100,7 @@ void plSoundEvent::AddCallback( plEventCallbackMsg *msg ) fCallbackEndingFlags.Append( 0 ); } -hsBool plSoundEvent::RemoveCallback( plEventCallbackMsg *msg ) +bool plSoundEvent::RemoveCallback( plEventCallbackMsg *msg ) { int idx = fCallbacks.Find( msg ); if( idx != fCallbacks.kMissingIndex ) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.h b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.h index 0fc14e2e..011c669d 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.h @@ -74,7 +74,7 @@ public: ~plSoundEvent(); void AddCallback( plEventCallbackMsg *msg ); - hsBool RemoveCallback( plEventCallbackMsg *msg ); + bool RemoveCallback( plEventCallbackMsg *msg ); uint32_t GetNumCallbacks( void ) const; int GetType( void ) const; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp b/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp index 36c5c2df..54656352 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp @@ -70,14 +70,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define VOICE_STOP_MS 2000 #define MAX_DATA_SIZE 1024 * 4 // 4 KB -hsBool plVoiceRecorder::fCompress = true; -hsBool plVoiceRecorder::fRecording = true; -hsBool plVoiceRecorder::fNetVoice = false; +bool plVoiceRecorder::fCompress = true; +bool plVoiceRecorder::fRecording = true; +bool plVoiceRecorder::fNetVoice = false; short plVoiceRecorder::fSampleRate = FREQUENCY; float plVoiceRecorder::fRecordThreshhold = 200.0f; -hsBool plVoiceRecorder::fShowIcons = true; -hsBool plVoiceRecorder::fMicAlwaysOpen = false; -hsBool plVoicePlayer::fEnabled = true; +bool plVoiceRecorder::fShowIcons = true; +bool plVoiceRecorder::fMicAlwaysOpen = false; +bool plVoicePlayer::fEnabled = true; plVoiceRecorder::plVoiceRecorder() { @@ -171,12 +171,12 @@ void plVoiceRecorder::SetComplexity(int c) plSpeex::GetInstance()->SetComplexity((uint8_t) c); } -void plVoiceRecorder::SetENH(hsBool b) +void plVoiceRecorder::SetENH(bool b) { plSpeex::GetInstance()->SetENH(b); } -void plVoiceRecorder::SetMikeOpen(hsBool b) +void plVoiceRecorder::SetMikeOpen(bool b) { ALCdevice *device = plgAudioSys::GetCaptureDevice(); if (fRecording && device) @@ -198,7 +198,7 @@ void plVoiceRecorder::SetMikeOpen(hsBool b) } } -void plVoiceRecorder::DrawDisabledIcon(hsBool b) +void plVoiceRecorder::DrawDisabledIcon(bool b) { if (!fDisabledIcon) { @@ -217,7 +217,7 @@ void plVoiceRecorder::DrawDisabledIcon(hsBool b) fDisabledIcon->SetVisible(b); } -void plVoiceRecorder::DrawTalkIcon(hsBool b) +void plVoiceRecorder::DrawTalkIcon(bool b) { if (!fTalkIcon) { @@ -417,7 +417,7 @@ plVoiceSound::~plVoiceSound() { } -hsBool plVoiceSound::LoadSound( hsBool is3D ) +bool plVoiceSound::LoadSound( bool is3D ) { if( fFailed ) return false; @@ -538,7 +538,7 @@ plSpeex::~plSpeex() fBits = nil; } -hsBool plSpeex::Init(Mode mode) +bool plSpeex::Init(Mode mode) { int enh = 1; @@ -571,7 +571,7 @@ hsBool plSpeex::Init(Mode mode) return true; } -hsBool plSpeex::Shutdown() +bool plSpeex::Shutdown() { //shutdown speex if(fDecoderState) @@ -596,7 +596,7 @@ hsBool plSpeex::Shutdown() return true; } -hsBool plSpeex::Encode(short *data, int numFrames, int *packedLength, hsRAMStream *out) +bool plSpeex::Encode(short *data, int numFrames, int *packedLength, hsRAMStream *out) { *packedLength = 0; @@ -634,7 +634,7 @@ hsBool plSpeex::Encode(short *data, int numFrames, int *packedLength, hsRAMStrea return true; } -hsBool plSpeex::Decode(uint8_t *data, int size, int numFrames, int *numOutputBytes, short *out) +bool plSpeex::Decode(uint8_t *data, int size, int numFrames, int *numOutputBytes, short *out) { if(!fInitialized) return false; *numOutputBytes = 0; @@ -677,7 +677,7 @@ hsBool plSpeex::Decode(uint8_t *data, int size, int numFrames, int *numOutputByt } // Sets variable bit rate on/off -void plSpeex::VBR(hsBool b) +void plSpeex::VBR(bool b) { fVBR = b; speex_encoder_ctl(fEncoderState, SPEEX_SET_VBR, &fVBR); @@ -698,7 +698,7 @@ void plSpeex::SetQuality(uint32_t quality) speex_encoder_ctl(fEncoderState, SPEEX_SET_QUALITY, &fQuality); } -void plSpeex::SetENH(hsBool b) +void plSpeex::SetENH(bool b) { fENH = b; speex_decoder_ctl(fDecoderState, SPEEX_SET_ENH, &fENH); diff --git a/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.h b/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.h index 26fe362e..e733652c 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.h @@ -68,7 +68,7 @@ class plVoiceSound : public plWin32Sound public: plVoiceSound(); ~plVoiceSound(); - hsBool LoadSound( hsBool is3D ); + bool LoadSound( bool is3D ); void AddVoiceData(void *data, unsigned bytes); void Update(); void Play(); @@ -100,11 +100,11 @@ public: void SetTalkIcon(int index, uint32_t str){} void ClearTalkIcon(){} plVoiceSound *GetSoundPtr() { return &fSound; } - static void Enable(hsBool enable) { fEnabled = enable; } + static void Enable(bool enable) { fEnabled = enable; } private: plVoiceSound fSound; - static hsBool fEnabled; + static bool fEnabled; }; class plVoiceRecorder @@ -114,21 +114,21 @@ public: ~plVoiceRecorder(); void Update(double time); - void SetMikeOpen(hsBool b); - void DrawTalkIcon(hsBool b); - void DrawDisabledIcon(hsBool b); + void SetMikeOpen(bool b); + void DrawTalkIcon(bool b); + void DrawDisabledIcon(bool b); void SetTalkIcon(int index, uint32_t str); void ClearTalkIcon(); - static hsBool RecordingEnabled() { return fRecording; } - static hsBool NetVoiceEnabled() { return fNetVoice; } - static hsBool CompressionEnabled() { return fCompress; } - static void EnablePushToTalk(hsBool b) { fMicAlwaysOpen = !b; } - static void EnableIcons(hsBool b) { fShowIcons = b; } - static void EnableRecording(hsBool b) { fRecording = b; } - static void EnableNetVoice(hsBool b) { fNetVoice = b; } - static void EnableCompression(hsBool b) { fCompress = b; } + static bool RecordingEnabled() { return fRecording; } + static bool NetVoiceEnabled() { return fNetVoice; } + static bool CompressionEnabled() { return fCompress; } + static void EnablePushToTalk(bool b) { fMicAlwaysOpen = !b; } + static void EnableIcons(bool b) { fShowIcons = b; } + static void EnableRecording(bool b) { fRecording = b; } + static void EnableNetVoice(bool b) { fNetVoice = b; } + static void EnableCompression(bool b) { fCompress = b; } static void SetSampleRate(short s) { fSampleRate = s; } static void SetSquelch(float f) { fRecordThreshhold = f; } @@ -139,18 +139,18 @@ public: static void SetMode(int mode); // sets nb or wb mode static void SetVBR(bool vbr); static void SetComplexity(int c); - static void SetENH(hsBool b); + static void SetENH(bool b); static short GetSampleRate() { return fSampleRate; } private: - hsBool fMikeOpen; - hsBool fMikeJustClosed; - static hsBool fMicAlwaysOpen; - static hsBool fShowIcons; - static hsBool fCompress; - static hsBool fNetVoice; - static hsBool fRecording; + bool fMikeOpen; + bool fMikeJustClosed; + static bool fMicAlwaysOpen; + static bool fShowIcons; + static bool fCompress; + static bool fNetVoice; + static bool fRecording; static short fSampleRate; plPlate* fDisabledIcon; plPlate* fTalkIcon; @@ -176,37 +176,37 @@ public: return &instance; } - hsBool Init(Mode mode); - hsBool Shutdown(); - hsBool Encode(short *data, int numFrames, int *packedLength, hsRAMStream *out); - hsBool Decode(uint8_t *data, int size, int numFrames, int *numOutputBytes, short *out); + bool Init(Mode mode); + bool Shutdown(); + bool Encode(short *data, int numFrames, int *packedLength, hsRAMStream *out); + bool Decode(uint8_t *data, int size, int numFrames, int *numOutputBytes, short *out); int GetFrameSize() { return fFrameSize; } - void VBR(hsBool b); // turn variable bit rate on/off + void VBR(bool b); // turn variable bit rate on/off void SetVBR(uint32_t vbr); // Set variable bit rate quality - void ABR(hsBool b); // turn average bit rate on/off + void ABR(bool b); // turn average bit rate on/off void SetABR(uint32_t abr); // Set average bit rate quality void SetQuality(uint32_t quality); // Set encoder quality - hsBool IsUsingVBR() { return fVBR; } + bool IsUsingVBR() { return fVBR; } int GetQuality() { return fQuality; } - void SetENH(hsBool b); + void SetENH(bool b); void SetComplexity(uint8_t c); - hsBool Initialized() { return fInitialized; } + bool Initialized() { return fInitialized; } private: plSpeex(); SpeexBits* fBits; // main speex structure - hsBool fBitsInit; + bool fBitsInit; void* fEncoderState; void* fDecoderState; int fSampleRate; int fFrameSize; // frame size from speex - 160 for nb int fQuality; // 0-10 speex encode quality - hsBool fVBR; // toggle variable bit rate + bool fVBR; // toggle variable bit rate int fAverageBitrate; // n-bits per second uint8_t fComplexity; // 1-10 sets cpu resources allowed for encoder - hsBool fENH; // perceptual enhancement - hsBool fInitialized; + bool fENH; // perceptual enhancement + bool fInitialized; }; #endif //plVoiceChat_h diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp index 1569daa3..84b1a381 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp @@ -123,7 +123,7 @@ void plWin32GroupedSound::IWrite( hsStream *s, hsResMgr *mgr ) //// LoadSound /////////////////////////////////////////////////////////////// -hsBool plWin32GroupedSound::LoadSound( hsBool is3D ) +bool plWin32GroupedSound::LoadSound( bool is3D ) { if( fFailed ) return false; @@ -387,7 +387,7 @@ void plWin32GroupedSound::IDerivedActuallyPlay( void ) event->SendCallbacks(); } -hsBool plWin32GroupedSound::MsgReceive( plMessage* pMsg ) +bool plWin32GroupedSound::MsgReceive( plMessage* pMsg ) { plSoundMsg *soundMsg = plSoundMsg::ConvertNoRef( pMsg ); if( soundMsg != nil && soundMsg->Cmd( plSoundMsg::kSelectFromGroup ) ) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.h b/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.h index 76e2d476..3f4c2660 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.h @@ -68,8 +68,8 @@ public: CLASSNAME_REGISTER( plWin32GroupedSound ); GETINTERFACE_ANY( plWin32GroupedSound, plWin32StaticSound ); - virtual hsBool LoadSound( hsBool is3D ); - virtual hsBool MsgReceive( plMessage *pMsg ); + virtual bool LoadSound( bool is3D ); + virtual bool MsgReceive( plMessage *pMsg ); void SetPositionArray( uint16_t numSounds, uint32_t *posArray, float *volumeArray ); float GetSoundLength( int16_t soundIndex ); virtual double GetLength() { return GetSoundLength( fCurrentSound ); } diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp index 8afeb6c6..b33ca3fa 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp @@ -83,7 +83,7 @@ plWin32Sound::~plWin32Sound() { } -void plWin32Sound::Activate( hsBool forcePlay ) +void plWin32Sound::Activate( bool forcePlay ) { if( fFailed ) return; @@ -314,7 +314,7 @@ void plWin32Sound::IRefreshParams( void ) plSound::IRefreshParams(); } -void plWin32Sound::IRefreshEAXSettings( hsBool force ) +void plWin32Sound::IRefreshEAXSettings( bool force ) { if( fDSoundBuffer != nil ) fDSoundBuffer->SetEAXSettings( &GetEAXSettings(), force ); @@ -404,7 +404,7 @@ void plWin32Sound::AddCallbacks(plSoundMsg* pSoundMsg) IAddCallback( pSoundMsg->GetEventCallback( i ) ); } -hsBool plWin32Sound::MsgReceive( plMessage* pMsg ) +bool plWin32Sound::MsgReceive( plMessage* pMsg ) { plEventCallbackMsg *e = plEventCallbackMsg::ConvertNoRef( pMsg ); if( e != nil ) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h index a9e92180..36faf357 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h @@ -68,14 +68,14 @@ public: CLASSNAME_REGISTER( plWin32Sound ); GETINTERFACE_ANY( plWin32Sound, plSound ); - virtual void Activate(hsBool forcePlay = false); + virtual void Activate(bool forcePlay = false); virtual void DeActivate(); virtual void AddCallbacks(plSoundMsg* pMsg); virtual void RemoveCallbacks(plSoundMsg* pMsg); virtual plSoundMsg* GetStatus(plSoundMsg* pMsg); - virtual hsBool MsgReceive(plMessage* pMsg); + virtual bool MsgReceive(plMessage* pMsg); virtual void Update(); virtual void SetMin(const int m); // sets minimum falloff distance @@ -100,12 +100,12 @@ protected: plDSoundBuffer * fDSoundBuffer; - hsBool fFailed; - hsBool fPositionInited, fAwaitingPosition; - hsBool fReallyPlaying; + bool fFailed; + bool fPositionInited, fAwaitingPosition; + bool fReallyPlaying; uint32_t fTotalBytes; - hsBool fWasPlaying; + bool fWasPlaying; uint8_t fChannelSelect; // For selecting a mono channel from a stereo file @@ -113,10 +113,10 @@ protected: virtual void ISetActualVolume(const float v); virtual void IActuallyStop( void ); - virtual hsBool IActuallyPlaying( void ) { return fReallyPlaying; } + virtual bool IActuallyPlaying( void ) { return fReallyPlaying; } virtual void IActuallyPlay( void ); virtual void IFreeBuffers( void ); - virtual hsBool IActuallyLoaded( void ) { return ( fDSoundBuffer != nil ) ? true : false; } + virtual bool IActuallyLoaded( void ) { return ( fDSoundBuffer != nil ) ? true : false; } // Override to make sure the buffer is available before the base class is called virtual void IRefreshParams( void ); @@ -130,7 +130,7 @@ protected: virtual void IRead( hsStream *s, hsResMgr *mgr ); virtual void IWrite( hsStream *s, hsResMgr *mgr ); - virtual void IRefreshEAXSettings( hsBool force = false ); + virtual void IRefreshEAXSettings( bool force = false ); }; #endif //plWin32Sound_h diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp index ee60463a..fbbe49b5 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp @@ -72,7 +72,7 @@ plWin32StaticSound::~plWin32StaticSound() IUnloadDataBuffer(); } -void plWin32StaticSound::Activate( hsBool forcePlay ) +void plWin32StaticSound::Activate( bool forcePlay ) { plWin32Sound::Activate( forcePlay ); } @@ -82,7 +82,7 @@ void plWin32StaticSound::DeActivate() plWin32Sound::DeActivate(); } -hsBool plWin32StaticSound::LoadSound( hsBool is3D ) +bool plWin32StaticSound::LoadSound( bool is3D ) { if (fFailed) return false; @@ -143,7 +143,7 @@ hsBool plWin32StaticSound::LoadSound( hsBool is3D ) header.fNumChannels = 1; } - hsBool tryStatic = true; + bool tryStatic = true; // If we want FX, we can't use a static voice, but EAX doesn't fit under that limitation :) if( 0 ) tryStatic = false; @@ -250,7 +250,7 @@ void plWin32StaticSound::ISetActualTime(double t) } } -hsBool plWin32StaticSound::MsgReceive( plMessage* pMsg ) +bool plWin32StaticSound::MsgReceive( plMessage* pMsg ) { return plWin32Sound::MsgReceive( pMsg ); } @@ -295,7 +295,7 @@ void plWin32LinkSound::Write(hsStream* s, hsResMgr* mgr) plWin32StaticSound::Write(s, mgr); } -hsBool plWin32LinkSound::MsgReceive( plMessage* pMsg ) +bool plWin32LinkSound::MsgReceive( plMessage* pMsg ) { plLinkEffectBCMsg *msg = plLinkEffectBCMsg::ConvertNoRef( pMsg ); if( msg != nil && !msg->HasLinkFlag(plLinkEffectBCMsg::kMute)) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.h b/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.h index b2feaae3..a9508971 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.h @@ -59,15 +59,15 @@ public: CLASSNAME_REGISTER( plWin32StaticSound ); GETINTERFACE_ANY( plWin32StaticSound, plWin32Sound ); - virtual void Activate( hsBool forcePlay = false ); + virtual void Activate( bool forcePlay = false ); virtual void DeActivate(); - virtual hsBool LoadSound( hsBool is3D ); + virtual bool LoadSound( bool is3D ); virtual void Update(); - virtual hsBool MsgReceive(plMessage* pMsg); + virtual bool MsgReceive(plMessage* pMsg); virtual void SetStartPos(unsigned bytes){} protected: - hsBool fRegisteredOnThread; + bool fRegisteredOnThread; virtual void IDerivedActuallyPlay( void ); virtual void ISetActualTime( double t ); @@ -90,7 +90,7 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* pMsg); + virtual bool MsgReceive(plMessage* pMsg); }; #endif //plWin32StaticSound_h diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp index dec0046d..43034cd8 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp @@ -113,11 +113,11 @@ void plWin32StreamingSound::SetFilename(const char *filename, bool isCompressed) ////////////////////////////////////////////////////////////// // Override, 'cause we don't want to actually LOAD the sound for streaming, // just make sure it's decompressed and such and ready to stream. -plSoundBuffer::ELoadReturnVal plWin32StreamingSound::IPreLoadBuffer( hsBool playWhenLoaded, hsBool isIncidental /* = false */ ) +plSoundBuffer::ELoadReturnVal plWin32StreamingSound::IPreLoadBuffer( bool playWhenLoaded, bool isIncidental /* = false */ ) { if(fPlayWhenStopped) return plSoundBuffer::kPending; - hsBool sfxPath = fNewFilename.size() ? false : true; + bool sfxPath = fNewFilename.size() ? false : true; if( fDataStream != nil && fNewFilename.size() == 0) return plSoundBuffer::kSuccess; // Already loaded @@ -240,7 +240,7 @@ void plWin32StreamingSound::IFreeBuffers( void ) // first half of our buffer. We'll fill the rest of the buffer as we get // notifications for such. -hsBool plWin32StreamingSound::LoadSound( hsBool is3D ) +bool plWin32StreamingSound::LoadSound( bool is3D ) { if( fFailed ) return false; @@ -494,7 +494,7 @@ void plWin32StreamingSound::ISetActualTime( double t ) // fStartTimeSec = t; } -hsBool plWin32StreamingSound::MsgReceive( plMessage* pMsg ) +bool plWin32StreamingSound::MsgReceive( plMessage* pMsg ) { return plWin32Sound::MsgReceive( pMsg ); } diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.h b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.h index ea409cb5..0d0a5f24 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.h @@ -60,14 +60,14 @@ public: GETINTERFACE_ANY( plWin32StreamingSound, plWin32Sound ); virtual void DeActivate(); - virtual hsBool LoadSound( hsBool is3D ); + virtual bool LoadSound( bool is3D ); virtual float GetActualTimeSec(); virtual unsigned GetByteOffset(); virtual StreamType GetStreamType() const { return fStreamType; } virtual void SetFilename(const char *filename, bool isCompressed); virtual void Update(); // temp void StreamUpdate(); - virtual hsBool MsgReceive( plMessage *pMsg ); + virtual bool MsgReceive( plMessage *pMsg ); protected: float fTimeAtBufferStart; @@ -80,7 +80,7 @@ protected: bool fIsCompressed; // this applies only to the new sound file specified in fNewFilename, so we can play both ogg's and wav's std::string fNewFilename; // allow the filename to be changed so we can play from a different source. // ultimately this filename will be given to fDataBuffer, but since it's not always around we'll store it here - hsBool fStopping; + bool fStopping; double fLastStreamingUpdate; bool fPlayWhenStopped; @@ -98,7 +98,7 @@ protected: virtual void IFreeBuffers( void ); void IStreamUpdate(); - virtual plSoundBuffer::ELoadReturnVal IPreLoadBuffer( hsBool playWhenLoaded, hsBool isIncidental = false ); + virtual plSoundBuffer::ELoadReturnVal IPreLoadBuffer( bool playWhenLoaded, bool isIncidental = false ); }; #endif //plWin32StreamingSound_h diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp index 5faa122d..9998ceef 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp @@ -72,11 +72,11 @@ DWORD sVolControlID = 0; //// Local Static Helpers //////////////////////////////////////////////////// -hsBool IGetMuxMicVolumeControl( void ); -hsBool IGetBaseMicVolumeControl( void ); +bool IGetMuxMicVolumeControl( void ); +bool IGetBaseMicVolumeControl( void ); -hsBool IGetControlValue( DWORD &value ); -hsBool ISetControlValue( DWORD value ); +bool IGetControlValue( DWORD &value ); +bool ISetControlValue( DWORD value ); MIXERLINE *IGetLineByType( DWORD type ); MIXERLINE *IGetLineByID( DWORD id ); @@ -114,7 +114,7 @@ void plWinMicLevel::SetLevel( float level ) #endif } -hsBool plWinMicLevel::CanSetLevel( void ) +bool plWinMicLevel::CanSetLevel( void ) { // Just to init plWinMicLevel &instance = IGetInstance(); @@ -196,7 +196,7 @@ void plWinMicLevel::IShutdown( void ) // Note: testing indcates that this works but the direct SRC_MICROPHONE // doesn't, hence we try this one first. -hsBool IGetMuxMicVolumeControl( void ) +bool IGetMuxMicVolumeControl( void ) { if( sMixerHandle == nil ) return false; @@ -238,7 +238,7 @@ hsBool IGetMuxMicVolumeControl( void ) // Tries to get the volume control of the mic-in line. See // IGetMuxMicVolumeControl for why we don't do this one first. -hsBool IGetBaseMicVolumeControl( void ) +bool IGetBaseMicVolumeControl( void ) { if( sMixerHandle == nil ) return false; @@ -267,7 +267,7 @@ hsBool IGetBaseMicVolumeControl( void ) //// IGetControlValue //////////////////////////////////////////////////////// // Gets the raw value of the current volume control. -hsBool IGetControlValue( DWORD &value ) +bool IGetControlValue( DWORD &value ) { if( sMixerHandle == nil ) return false; @@ -292,7 +292,7 @@ hsBool IGetControlValue( DWORD &value ) //// ISetControlValue //////////////////////////////////////////////////////// // Sets the raw value of the current volume control. -hsBool ISetControlValue( DWORD value ) +bool ISetControlValue( DWORD value ) { if( sMixerHandle == nil ) return false; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.h b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.h index 07f088ca..b8c27c79 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.h @@ -69,7 +69,7 @@ public: static void SetLevel( float level ); // Returns whether we can set the level - static hsBool CanSetLevel( void ); + static bool CanSetLevel( void ); protected: plWinMicLevel(); // Protected constructor for IGetInstance. Just to init some stuff diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.h b/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.h index e067a38c..3a2ce2d7 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.h +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.h @@ -76,14 +76,14 @@ public: virtual uint32_t GetDataSize( void ) = 0; virtual float GetLengthInSecs( void ) = 0; - virtual hsBool SetPosition( uint32_t numBytes ) = 0; - virtual hsBool Read( uint32_t numBytes, void *buffer ) = 0; + virtual bool SetPosition( uint32_t numBytes ) = 0; + virtual bool Read( uint32_t numBytes, void *buffer ) = 0; virtual uint32_t NumBytesLeft( void ) = 0; - virtual hsBool OpenForWriting( const char *path, plWAVHeader &header ) { return false; } + virtual bool OpenForWriting( const char *path, plWAVHeader &header ) { return false; } virtual uint32_t Write( uint32_t bytes, void *buffer ) { return 0; } - virtual hsBool IsValid( void ) = 0; + virtual bool IsValid( void ) = 0; static plAudioFileReader* CreateReader(const char* path, plAudioCore::ChannelSelect whichChan = plAudioCore::kAll, StreamType type = kStreamWAV); static plAudioFileReader* CreateWriter(const char* path, plWAVHeader& header); diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp index e3a12769..6bc092b2 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.cpp @@ -141,7 +141,7 @@ float plBufferedFileReader::GetLengthInSecs( void ) return (float)fBufferSize / (float)fHeader.fAvgBytesPerSec; } -hsBool plBufferedFileReader::SetPosition( uint32_t numBytes ) +bool plBufferedFileReader::SetPosition( uint32_t numBytes ) { hsAssert( IsValid(), "SetPosition() called on an invalid RAM buffer" ); @@ -155,12 +155,12 @@ hsBool plBufferedFileReader::SetPosition( uint32_t numBytes ) return true; } -hsBool plBufferedFileReader::Read( uint32_t numBytes, void *buffer ) +bool plBufferedFileReader::Read( uint32_t numBytes, void *buffer ) { hsAssert( IsValid(), "Read() called on an invalid RAM buffer" ); - hsBool valid = true; + bool valid = true; if( fCursor + numBytes > fBufferSize ) { diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.h b/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.h index b95e2756..db1e16da 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.h +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plBufferedFileReader.h @@ -66,10 +66,10 @@ public: virtual void Close( void ); virtual uint32_t GetDataSize( void ) { return fBufferSize; } virtual float GetLengthInSecs( void ); - virtual hsBool SetPosition( uint32_t numBytes ); - virtual hsBool Read( uint32_t numBytes, void *buffer ); + virtual bool SetPosition( uint32_t numBytes ); + virtual bool Read( uint32_t numBytes, void *buffer ); virtual uint32_t NumBytesLeft( void ); - virtual hsBool IsValid( void ) { return ( fBuffer != nil ) ? true : false; } + virtual bool IsValid( void ) { return ( fBuffer != nil ) ? true : false; } protected: uint32_t fBufferSize; diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plCachedFileReader.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plCachedFileReader.cpp index 2c218d06..36dc89e6 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plCachedFileReader.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plCachedFileReader.cpp @@ -131,7 +131,7 @@ float plCachedFileReader::GetLengthInSecs() return (float)fDataLength / (float)fHeader.fAvgBytesPerSec; } -hsBool plCachedFileReader::SetPosition(uint32_t numBytes) +bool plCachedFileReader::SetPosition(uint32_t numBytes) { hsAssert(IsValid(), "SetPosition() called on an invalid cache file"); @@ -142,7 +142,7 @@ hsBool plCachedFileReader::SetPosition(uint32_t numBytes) return !fseek(fFileHandle, sizeof(plWAVHeader) + fCurPosition, SEEK_SET); } -hsBool plCachedFileReader::Read(uint32_t numBytes, void *buffer) +bool plCachedFileReader::Read(uint32_t numBytes, void *buffer) { hsAssert(IsValid(), "Read() called on an invalid cache file"); @@ -162,7 +162,7 @@ uint32_t plCachedFileReader::NumBytesLeft() return fDataLength - fCurPosition; } -hsBool plCachedFileReader::OpenForWriting(const char *path, plWAVHeader &header) +bool plCachedFileReader::OpenForWriting(const char *path, plWAVHeader &header) { hsAssert(path != nil, "Invalid path specified in plCachedFileReader"); diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plCachedFileReader.h b/Sources/Plasma/PubUtilLib/plAudioCore/plCachedFileReader.h index c857605e..baf4392b 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plCachedFileReader.h +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plCachedFileReader.h @@ -71,14 +71,14 @@ public: virtual uint32_t GetDataSize(); virtual float GetLengthInSecs(); - virtual hsBool SetPosition(uint32_t numBytes); - virtual hsBool Read(uint32_t numBytes, void *buffer); + virtual bool SetPosition(uint32_t numBytes); + virtual bool Read(uint32_t numBytes, void *buffer); virtual uint32_t NumBytesLeft(); - virtual hsBool OpenForWriting(const char *path, plWAVHeader &header); + virtual bool OpenForWriting(const char *path, plWAVHeader &header); virtual uint32_t Write(uint32_t bytes, void *buffer); - virtual hsBool IsValid() { return fFileHandle != nil; } + virtual bool IsValid() { return fFileHandle != nil; } protected: enum diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp index a5661024..7c44e9ee 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.cpp @@ -265,7 +265,7 @@ float plFastWAV::GetLengthInSecs( void ) return (float)( fDataSize / fChannelAdjust ) / (float)fHeader.fAvgBytesPerSec; } -hsBool plFastWAV::SetPosition( uint32_t numBytes ) +bool plFastWAV::SetPosition( uint32_t numBytes ) { hsAssert( IsValid(), "GetHeader() called on an invalid WAV file" ); @@ -277,7 +277,7 @@ hsBool plFastWAV::SetPosition( uint32_t numBytes ) return ( fseek( fFileHandle, fDataStartPos + fCurrDataPos, SEEK_SET ) == 0 ) ? true : false; } -hsBool plFastWAV::Read( uint32_t numBytes, void *buffer ) +bool plFastWAV::Read( uint32_t numBytes, void *buffer ) { hsAssert( IsValid(), "GetHeader() called on an invalid WAV file" ); diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.h b/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.h index a0a1818e..38e83626 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.h +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plFastWavReader.h @@ -71,11 +71,11 @@ public: virtual uint32_t GetDataSize( void ) { return fDataSize / fChannelAdjust; } virtual float GetLengthInSecs( void ); - virtual hsBool SetPosition( uint32_t numBytes ); - virtual hsBool Read( uint32_t numBytes, void *buffer ); + virtual bool SetPosition( uint32_t numBytes ); + virtual bool Read( uint32_t numBytes, void *buffer ); virtual uint32_t NumBytesLeft( void ); - virtual hsBool IsValid( void ) { return ( fFileHandle != nil ) ? true : false; } + virtual bool IsValid( void ) { return ( fFileHandle != nil ) ? true : false; } protected: enum diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp index d3230fc8..142a6c32 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.cpp @@ -227,7 +227,7 @@ float plOGGCodec::GetLengthInSecs( void ) return (float)ov_time_total( fOggFile, -1 ); } -hsBool plOGGCodec::SetPosition( uint32_t numBytes ) +bool plOGGCodec::SetPosition( uint32_t numBytes ) { hsAssert( IsValid(), "GetHeader() called on an invalid OGG file" ); @@ -263,7 +263,7 @@ hsBool plOGGCodec::SetPosition( uint32_t numBytes ) return true; } -hsBool plOGGCodec::Read( uint32_t numBytes, void *buffer ) +bool plOGGCodec::Read( uint32_t numBytes, void *buffer ) { hsAssert( IsValid(), "GetHeader() called on an invalid OGG file" ); // plNetClientApp::StaticDebugMsg("Ogg Read, t=%f, start", hsTimer::GetSeconds()); diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.h b/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.h index e83506cb..97ec52e3 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.h +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plOGGCodec.h @@ -80,14 +80,14 @@ public: virtual uint32_t GetDataSize( void ) { return fDataSize / fChannelAdjust; } virtual float GetLengthInSecs( void ); - virtual hsBool SetPosition( uint32_t numBytes ); - virtual hsBool Read( uint32_t numBytes, void *buffer ); + virtual bool SetPosition( uint32_t numBytes ); + virtual bool Read( uint32_t numBytes, void *buffer ); virtual uint32_t NumBytesLeft( void ); - virtual hsBool IsValid( void ) { return ( fOggFile != nil ) ? true : false; } + virtual bool IsValid( void ) { return ( fOggFile != nil ) ? true : false; } static void SetDecodeFormat( DecodeFormat f ) { fDecodeFormat = f; } - static void SetDecodeFlag( uint8_t flag, hsBool on ) { if( on ) fDecodeFlags |= flag; else fDecodeFlags &= ~flag; } + static void SetDecodeFlag( uint8_t flag, bool on ) { if( on ) fDecodeFlags |= flag; else fDecodeFlags &= ~flag; } static uint8_t GetDecodeFlags( void ) { return fDecodeFlags; } void ResetWaveHeaderRef() { fCurHeaderPos = 0; } void BuildActualWaveHeader(); diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp index c944cb49..6b37058d 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp @@ -71,7 +71,7 @@ static void GetFullPath( const char filename[], char *destStr ) // Makes sure the sound is ready to load without any extra processing (like // decompression or the like), then opens a reader for it. // fullpath tells the function whether to append 'sfx' to the path or not (we don't want to do this if were providing the full path) -static plAudioFileReader *CreateReader( hsBool fullpath, const char filename[], plAudioFileReader::StreamType type, plAudioCore::ChannelSelect channel ) +static plAudioFileReader *CreateReader( bool fullpath, const char filename[], plAudioFileReader::StreamType type, plAudioCore::ChannelSelect channel ) { char path[512]; if(fullpath) GetFullPath(filename, path); @@ -507,7 +507,7 @@ plSoundBuffer::ELoadReturnVal plSoundBuffer::EnsureInternal() } //// IGrabHeaderInfo ///////////////////////////////////////////////////////// -hsBool plSoundBuffer::IGrabHeaderInfo( void ) +bool plSoundBuffer::IGrabHeaderInfo( void ) { static char path[ 512 ]; @@ -543,7 +543,7 @@ hsBool plSoundBuffer::IGrabHeaderInfo( void ) // Makes sure the sound is ready to load without any extra processing (like // decompression or the like), then opens a reader for it. // fullpath tells the function whether to append 'sfx' to the path or not (we don't want to do this if were providing the full path) -plAudioFileReader *plSoundBuffer::IGetReader( hsBool fullpath ) +plAudioFileReader *plSoundBuffer::IGetReader( bool fullpath ) { char path[512]; if(fullpath) IGetFullPath(path); diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.h b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.h index 43920065..24851eee 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.h +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.h @@ -97,12 +97,12 @@ public: void SetDataLength(unsigned length) { fDataLength = length; } void *GetData( void ) const { return fData; } const char *GetFileName( void ) const { return fFileName; } - hsBool IsValid( void ) const { return fValid; } + bool IsValid( void ) const { return fValid; } float GetDataLengthInSecs( void ) const; void SetFileName( const char *name ); - hsBool HasFlag( uint32_t flag ) { return ( fFlags & flag ) ? true : false; } - void SetFlag( uint32_t flag, hsBool yes = true ) { if( yes ) fFlags |= flag; else fFlags &= ~flag; } + bool HasFlag( uint32_t flag ) { return ( fFlags & flag ) ? true : false; } + void SetFlag( uint32_t flag, bool yes = true ) { if( yes ) fFlags |= flag; else fFlags &= ~flag; } // Must be called until return value is kSuccess. starts an asynchronous load first time called. returns kSuccess when finished. ELoadReturnVal AsyncLoad( plAudioFileReader::StreamType type, unsigned length = 0 ); @@ -133,12 +133,12 @@ protected: void IInitBuffer(); - hsBool IGrabHeaderInfo( void ); + bool IGrabHeaderInfo( void ); void IAddBuffers( void *base, void *toAdd, uint32_t lengthInBytes, uint8_t bitsPerSample ); void IGetFullPath( char *destStr ); uint32_t fFlags; - hsBool fValid; + bool fValid; uint32_t fDataRead; char *fFileName; @@ -154,7 +154,7 @@ protected: plAudioFileReader::StreamType fStreamType; // for plugins only - plAudioFileReader *IGetReader( hsBool fullpath ); + plAudioFileReader *IGetReader( bool fullpath ); }; diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.h b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.h index 4c978324..9a8e298a 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.h +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundDeswizzler.h @@ -67,7 +67,7 @@ public: protected: uint8_t *fData; uint32_t fNumSamples, fSampleSize, fStride; - hsBool fOwnsData; + bool fOwnsData; }; #endif //_plSoundDeswizzler_h diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp index 1759c9b9..c858c211 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp @@ -950,7 +950,7 @@ CWaveFile::CWaveFile( const char *path, plAudioCore::ChannelSelect whichChan ) // Just a stub--do nothing } -hsBool CWaveFile::OpenForWriting( const char *path, plWAVHeader &header ) +bool CWaveFile::OpenForWriting( const char *path, plWAVHeader &header ) { fHeader = header; @@ -991,13 +991,13 @@ float CWaveFile::GetLengthInSecs( void ) return 0.f; } -hsBool CWaveFile::SetPosition( uint32_t numBytes ) +bool CWaveFile::SetPosition( uint32_t numBytes ) { hsAssert( false, "Unsupported" ); return false; } -hsBool CWaveFile::Read( uint32_t numBytes, void *buffer ) +bool CWaveFile::Read( uint32_t numBytes, void *buffer ) { hsAssert( false, "Unsupported" ); return false; @@ -1016,7 +1016,7 @@ uint32_t CWaveFile::Write( uint32_t bytes, void *buffer ) return (uint32_t)written; } -hsBool CWaveFile::IsValid( void ) +bool CWaveFile::IsValid( void ) { return true; } diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.h b/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.h index e1716a68..af0a1e3c 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.h +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.h @@ -93,18 +93,18 @@ public: // Overloads for plAudioFileReader CWaveFile( const char *path, plAudioCore::ChannelSelect whichChan ); - virtual hsBool OpenForWriting( const char *path, plWAVHeader &header ); + virtual bool OpenForWriting( const char *path, plWAVHeader &header ); virtual plWAVHeader &GetHeader( void ); virtual void Close( void ); virtual uint32_t GetDataSize( void ); virtual float GetLengthInSecs( void ); - virtual hsBool SetPosition( uint32_t numBytes ); - virtual hsBool Read( uint32_t numBytes, void *buffer ); + virtual bool SetPosition( uint32_t numBytes ); + virtual bool Read( uint32_t numBytes, void *buffer ); virtual uint32_t NumBytesLeft( void ); virtual uint32_t Write( uint32_t bytes, void *buffer ); - virtual hsBool IsValid( void ); + virtual bool IsValid( void ); WAVEFORMATEX* m_pwfx; // Pointer to WAVEFORMATEX structure HMMIO m_hmmio; // MM I/O handle for the WAVE MMCKINFO m_ck; // Multimedia RIFF chunk diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.cpp index 5b9ccf77..ba1987a6 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.cpp @@ -175,7 +175,7 @@ int plAGAnim::AddApplicator(plAGApplicator *app) // RemoveApplicator ------------------------ // ----------------- -hsBool plAGAnim::RemoveApplicator(int index) +bool plAGAnim::RemoveApplicator(int index) { hsAssert(index < fApps.size(), "Out of range index for plAGAnim::RemoveApp()"); @@ -299,7 +299,7 @@ plAGAnim * plAGAnim::FindAnim(const plString &name) // RemoveAnim ------------------------------- // ----------- -hsBool plAGAnim::RemoveAnim(const plString &name) +bool plAGAnim::RemoveAnim(const plString &name) { plAnimMap::iterator i = fAllAnims.find(name); @@ -328,7 +328,7 @@ void plAGAnim::DumpAnimationRegistry() // SharesPinsWith ----------------------------------------- // --------------- -hsBool plAGAnim::SharesPinsWith(const plAGAnim *anim) const +bool plAGAnim::SharesPinsWith(const plAGAnim *anim) const { int i, j; for (i = 0; i < fApps.size(); i++) @@ -394,10 +394,10 @@ void plATCAnim::Read(hsStream *stream, hsResMgr *mgr) plAGAnim::Read(stream, mgr); fInitial = stream->ReadLEScalar(); - fAutoStart = stream->Readbool(); + fAutoStart = stream->ReadBool(); fLoopStart = stream->ReadLEScalar(); fLoopEnd = stream->ReadLEScalar(); - fLoop = stream->Readbool(); + fLoop = stream->ReadBool(); fEaseInType = stream->ReadByte(); fEaseInMin = stream->ReadLEScalar(); @@ -438,10 +438,10 @@ void plATCAnim::Write(hsStream *stream, hsResMgr *mgr) plAGAnim::Write(stream, mgr); stream->WriteLEScalar(fInitial); - stream->Writebool(fAutoStart); + stream->WriteBool(fAutoStart); stream->WriteLEScalar(fLoopStart); stream->WriteLEScalar(fLoopEnd); - stream->Writebool(fLoop); + stream->WriteBool(fLoop); stream->WriteByte(fEaseInType); stream->WriteLEScalar(fEaseInMin); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.h b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.h index 49eca8aa..b9826a27 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.h @@ -134,7 +134,7 @@ public: /** Remove the ith applicator and its associated channel. Existing applicators will be renumbered. */ - hsBool RemoveApplicator(int appNum); + bool RemoveApplicator(int appNum); /** The name of the animation. This name is used in the avatar manager to reference animations. Animations are generally indexed by name when they are loaded @@ -164,7 +164,7 @@ public: /** Returns true if any applicator on the arg anim tries to use the same pin (on the same object) as we do. */ - hsBool SharesPinsWith(const plAGAnim *anim) const; + bool SharesPinsWith(const plAGAnim *anim) const; // PLASMA PROTOCOL @@ -181,7 +181,7 @@ public: global animation registry. */ static plAGAnim *FindAnim(const plString &name); /** Remove the given animation from the registry. */ - static hsBool RemoveAnim(const plString &name); + static bool RemoveAnim(const plString &name); /** Clear the animation cache. Used when resetting the client to a vanilla state, as when clearing the scene while exporting. */ @@ -243,7 +243,7 @@ public: /** Does this animation start automatically when it's applied? */ virtual bool GetAutoStart() const { return fAutoStart; } - void SetAutoStart(hsBool start) { fAutoStart = (start != 0); } + void SetAutoStart(bool start) { fAutoStart = (start != 0); } /** If the animation loops, this is where it will restart the loop. Note that loops do not have to start at the beginning of the animation. */ @@ -258,7 +258,7 @@ public: /** Does this animation loop?. Note that there may be multiple loop segments defined within a given animation. */ virtual bool GetLoop() const { return fLoop; } - void SetLoop(hsBool loop) { fLoop = (loop != 0); } + void SetLoop(bool loop) { fLoop = (loop != 0); } /** Set the curve type for easing in. Easing is an optional feature which allows you to make an animation slow down gradually when you stop it. diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.cpp index a622cfab..950c32f3 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.cpp @@ -91,7 +91,7 @@ extern const char *gGlobalChannelName = nil; // ctor ------------------------------------------------------------------- // ----- plAGAnimInstance::plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master, - float blend, uint16_t blendPriority, hsBool cache, + float blend, uint16_t blendPriority, bool cache, bool useAmplitude) : fAnimation(anim), fMaster(master), @@ -214,7 +214,7 @@ void plAGAnimInstance::IRegisterDetach(const plString &channelName, plAGChannel // SetCurrentTime --------------------------------------------------------------- // --------------- -void plAGAnimInstance::SetCurrentTime(float localT, hsBool jump /* = false */) +void plAGAnimInstance::SetCurrentTime(float localT, bool jump /* = false */) { if (fTimeConvert) fTimeConvert->SetCurrentAnimTime(localT, jump); @@ -222,7 +222,7 @@ void plAGAnimInstance::SetCurrentTime(float localT, hsBool jump /* = false */) // SeekRelative ------------------------------------ // ------------- -void plAGAnimInstance::SeekRelative (float delta, hsBool jump) +void plAGAnimInstance::SeekRelative (float delta, bool jump) { if(fTimeConvert) { @@ -333,7 +333,7 @@ plString plAGAnimInstance::GetName() // SetLoop ---------------------------------- // -------- -void plAGAnimInstance::SetLoop(hsBool status) +void plAGAnimInstance::SetLoop(bool status) { if (fTimeConvert) fTimeConvert->Loop(status); @@ -341,7 +341,7 @@ void plAGAnimInstance::SetLoop(hsBool status) // HandleCmd ---------------------------------------- // ---------- -hsBool plAGAnimInstance::HandleCmd(plAnimCmdMsg *msg) +bool plAGAnimInstance::HandleCmd(plAnimCmdMsg *msg) { if (fTimeConvert) return fTimeConvert->HandleCmd(msg); @@ -350,7 +350,7 @@ hsBool plAGAnimInstance::HandleCmd(plAnimCmdMsg *msg) // IsFinished ----------------------- // ----------- -hsBool plAGAnimInstance::IsFinished() +bool plAGAnimInstance::IsFinished() { if (fTimeConvert) return fTimeConvert->IsStopped(); @@ -359,7 +359,7 @@ hsBool plAGAnimInstance::IsFinished() // IsAtEnd ----------------------- // -------- -hsBool plAGAnimInstance::IsAtEnd() +bool plAGAnimInstance::IsAtEnd() { if(fTimeConvert) { @@ -452,7 +452,7 @@ void plAGAnimInstance::ProcessFade(float elapsed) // ICalcFade --------------------------------------------------------------------- // ---------- -float plAGAnimInstance::ICalcFade(hsBool &fade, float curVal, float goal, +float plAGAnimInstance::ICalcFade(bool &fade, float curVal, float goal, float rate, float elapsed) { float newVal; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.h b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.h index b6f453f5..51c2b219 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGAnimInstance.h @@ -98,7 +98,7 @@ public: This attaches the animation channels to the channels of the master modifier and creates all the bookkeeping structures necessary to undo it later. */ - plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master, float blend, uint16_t blendPriority, hsBool cache, bool useAmplitude); + plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master, float blend, uint16_t blendPriority, bool cache, bool useAmplitude); /** Destructor. Removes the animation from the scene objects it's attached to. */ virtual ~plAGAnimInstance(); @@ -141,10 +141,10 @@ public: /** Make this animation loop (or not.) Note that the instance can loop or not without regard to whether the plAGAnim it is based on loops. */ - void SetLoop(hsBool status); + void SetLoop(bool status); /** Interpret and respond to an animation command message. /sa plAnimCmdMsg */ - hsBool HandleCmd(plAnimCmdMsg *msg); + bool HandleCmd(plAnimCmdMsg *msg); /** Start playback of the animation. You may optionally provide the a world time, which is needed for synchronizing the animation's timeline @@ -159,14 +159,14 @@ public: Note that this time is in animation local time, not global time. The "jump" parameter specifies whether or not to fire callbacks that occur between the current time and the target time. */ - void SetCurrentTime(float newLocalTime, hsBool jump = false); + void SetCurrentTime(float newLocalTime, bool jump = false); /** Move the playback head by the specified relative amount within the animation. This may cause looping. If the beginning or end of the animation is reached an looping is not on, the movement will pin. \param jump if true, don't look for callbacks between old time and TRACKED_NEW */ - void SeekRelative(float delta, hsBool jump); + void SeekRelative(float delta, bool jump); /** Gradually fade the blend strength or amplitude of the animation. \param goal is the desired blend strength @@ -186,10 +186,10 @@ public: Primarily used to see if an animation has played all the way to the end, but will also return true if the animation was stopped with a stop command */ - hsBool IsFinished(); + bool IsFinished(); /** Is the animation playback head positioned at the end. */ - hsBool IsAtEnd(); + bool IsAtEnd(); /** Get the name of the underlying animation. */ plString GetName(); @@ -243,16 +243,16 @@ protected: // Each activation gets its own timeline. plAnimTimeConvert *fTimeConvert; - hsBool fFadeBlend; /// we are fading the blend + bool fFadeBlend; /// we are fading the blend float fFadeBlendGoal; /// what blend level we're trying to reach float fFadeBlendRate; /// how fast are we fading in blend units per second (1 blend unit = full) - hsBool fFadeDetach; /// detach after fade is finished? (only used for blend fades) + bool fFadeDetach; /// detach after fade is finished? (only used for blend fades) - hsBool fFadeAmp; /// we are fading the amplitude + bool fFadeAmp; /// we are fading the amplitude float fFadeAmpGoal; /// amplitude we're trying to reach float fFadeAmpRate; /// how faster we're fading in blend units per second - float ICalcFade(hsBool &fade, float curVal, float goal, float rate, float elapsed); + float ICalcFade(bool &fade, float curVal, float goal, float rate, float elapsed); }; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.cpp index f10c94bd..742a64d3 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.cpp @@ -65,7 +65,7 @@ plAGApplicator::~plAGApplicator() { } -void plAGApplicator::Apply(const plAGModifier *mod, double time, hsBool force) +void plAGApplicator::Apply(const plAGModifier *mod, double time, bool force) { if (fEnabled || force) IApply(mod, time); @@ -112,7 +112,7 @@ plAGApplicator *plAGApplicator::CloneWithChannel(plAGChannel *channel) return app; } -hsBool plAGApplicator::CanBlend(plAGApplicator *app) +bool plAGApplicator::CanBlend(plAGApplicator *app) { uint16_t ourClass = ClassIndex(); uint16_t theirClass = app->ClassIndex(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h b/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h index 5eeebc4a..2d6ea5ca 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h @@ -111,7 +111,7 @@ public: /** Optionally suppress the action of this applicator. The applicator can still be forced to apply using the force paramater of the Apply function. */ - void Enable(hsBool on) { fEnabled = on; } + void Enable(bool on) { fEnabled = on; } /** Make a shallow copy of the applicator. Keep the same input channel but do not clone the input channel. */ @@ -129,24 +129,24 @@ public: would be effected by pulling the input channel from the other applicator, blending it with our input channel via a new blend node, attaching that blend node as our new input, and throwing the other applicator away. */ - virtual hsBool CanBlend(plAGApplicator *app); + virtual bool CanBlend(plAGApplicator *app); /** Combine the two applicators if possible. \sa CanBlend */ virtual plAGChannel * MergeChannel(plAGApplicator *app, plAGChannel *channel, plScalarChannel *blend, int blendPriority); /** \bug It makes no sense for an applicator to combine because combination always results in a different data type, which would require a different applicator. */ - virtual hsBool CanCombine(plAGApplicator *app) { return false; } + virtual bool CanCombine(plAGApplicator *app) { return false; } /** Apply our channel's data to the scene object, via the modifier. This is the only function that actually changes perceivable scene state. */ - void Apply(const plAGModifier *mod, double time, hsBool force = false); // Apply our channel's data to the modifier + void Apply(const plAGModifier *mod, double time, bool force = false); // Apply our channel's data to the modifier // this is pretty much a HACK to support applicators that want to stick around when // their channel is gone so they can operate on the next channel that comes in // the RIGHT way to do this is to make applicators support the Detach() protocol just // like channels... - virtual hsBool AutoDelete() { return true; } // should we remove it when its input channel is gone? + virtual bool AutoDelete() { return true; } // should we remove it when its input channel is gone? // PlOP CLASSNAME_REGISTER( plAGApplicator ); @@ -171,7 +171,7 @@ protected: // -- members -- plAGChannel *fChannel; - hsBool fEnabled; + bool fEnabled; plString fChannelName; }; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGChannel.h b/Sources/Plasma/PubUtilLib/plAvatar/plAGChannel.h index 3afaaac8..69dbfad3 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGChannel.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGChannel.h @@ -163,7 +163,7 @@ public: /** Is the animation moving at the given world time? Takes into account start/stop messages that haven't been applied yet, ease curves, etc. */ - virtual hsBool IsStoppedAt(double wSecs) { return true; } + virtual bool IsStoppedAt(double wSecs) { return true; } /** Detach the given channel from our graph. If this is the channel in question, returns any upstream channels so they can be reattached. diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp index f2295e25..afacbd3b 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp @@ -98,8 +98,8 @@ void plAGMasterMod::Write(hsStream *stream, hsResMgr *mgr) { mgr->WriteKey(stream, fPrivateAnims[i]->GetKey()); } - stream->Writebool(fIsGrouped); - stream->Writebool(fIsGroupMaster); + stream->WriteBool(fIsGrouped); + stream->WriteBool(fIsGroupMaster); if (fIsGroupMaster) mgr->WriteKey(stream, fMsgForwarder->GetKey()); @@ -126,8 +126,8 @@ void plAGMasterMod::Read(hsStream * stream, hsResMgr *mgr) plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPrivateAnim); mgr->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef); } - fIsGrouped = stream->Readbool(); - fIsGroupMaster = stream->Readbool(); + fIsGrouped = stream->ReadBool(); + fIsGroupMaster = stream->ReadBool(); if (fIsGroupMaster) { plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0); @@ -218,7 +218,7 @@ plProfile_CreateTimer("AnimatingPhysicals", "Animation", AnimatingPhysicals); plProfile_CreateTimer("StoppedAnimPhysicals", "Animation", StoppedAnimPhysicals); // IEVAL -hsBool plAGMasterMod::IEval(double secs, float del, uint32_t dirty) +bool plAGMasterMod::IEval(double secs, float del, uint32_t dirty) { if (fFirstEval) { @@ -325,7 +325,7 @@ void plAGMasterMod::DumpAniGraph(const char *justThisChannel, bool optimized, do // GETCHANNELMOD(name) // Get the modifier that controls the channel with the given name -plAGModifier * plAGMasterMod::GetChannelMod(const plString & name, hsBool dontCache ) const +plAGModifier * plAGMasterMod::GetChannelMod(const plString & name, bool dontCache ) const { plAGModifier * result = nil; std::map::const_iterator i = fChannelMods.find(name); @@ -389,7 +389,7 @@ plAGModifier * plAGMasterMod::IFindChannelMod(const plSceneObject *SO, const plS plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(plAGAnim *anim, float blendFactor /* = 0 */, uint16_t blendPriority /* plAGMedBlendPriority */, - hsBool cache /* = false */) + bool cache /* = false */) { plAGAnimInstance *instance = nil; plAnimVector::iterator i; @@ -421,7 +421,7 @@ plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(plAGAnim *anim, } // ATTACHANIMATIONBLENDED(name, blend) -plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(const plString &name, float blendFactor /* = 0 */, uint16_t blendPriority, hsBool cache /* = false */) +plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(const plString &name, float blendFactor /* = 0 */, uint16_t blendPriority, bool cache /* = false */) { plAGAnimInstance *instance = nil; plAGAnim *anim = plAGAnim::FindAnim(name); @@ -612,7 +612,7 @@ void plAGMasterMod::DumpCurrentAnims(const char *header) // MSGRECEIVE // receive trigger messages -hsBool plAGMasterMod::MsgReceive(plMessage* msg) +bool plAGMasterMod::MsgReceive(plMessage* msg) { plAnimCmdMsg* cmdMsg; plAGCmdMsg* agMsg; @@ -768,7 +768,7 @@ hsBool plAGMasterMod::MsgReceive(plMessage* msg) return plModifier::MsgReceive(msg); } -void plAGMasterMod::IRegForEval(hsBool val) +void plAGMasterMod::IRegForEval(bool val) { if (fNeedEval == val) return; @@ -780,10 +780,10 @@ void plAGMasterMod::IRegForEval(hsBool val) plgDispatch::Dispatch()->UnRegisterForExactType(plEvalMsg::Index(), GetKey()); } -hsBool plAGMasterMod::HasRunningAnims() +bool plAGMasterMod::HasRunningAnims() { int i; - hsBool needEval = false; + bool needEval = false; for (i = 0; i < fAnimInstances.size(); i++) { if (!fAnimInstances[i]->IsFinished()) @@ -798,7 +798,7 @@ hsBool plAGMasterMod::HasRunningAnims() // // Send SDL sendState msg to object's plAGMasterSDLModifier // -hsBool plAGMasterMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags) +bool plAGMasterMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags) { if(GetNumTargets() > 0 && (!fIsGrouped || fIsGroupMaster)) { diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.h b/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.h index 35fdb834..4cdb376f 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.h @@ -98,7 +98,7 @@ public: virtual ~plAGMasterMod(); /** Find an individual plAGModifier of the given name under our control. */ - plAGModifier * GetChannelMod(const plString & name, hsBool dontCache = false) const; + plAGModifier * GetChannelMod(const plString & name, bool dontCache = false) const; /** \name Managing Animations */ // \{ @@ -108,13 +108,13 @@ public: animation will be attached at full strength. */ plAGAnimInstance *AttachAnimationBlended(plAGAnim *anim, float blendFactor = 0, uint16_t blendPriority = kAGMedBlendPriority, - hsBool cache = false); + bool cache = false); /** Look up the given animation by name and attach it with the given blend factor. */ plAGAnimInstance *AttachAnimationBlended(const plString &name, float blendFactor = 0, uint16_t blendPriority = kAGMedBlendPriority, - hsBool cache = false); + bool cache = false); /** Play a simple anim (one that doesn't affect root) once and auto detach. Intended for Zandi's facial animations that run seperate from the behaviors. */ @@ -204,13 +204,13 @@ public: virtual void AddTarget(plSceneObject * object); virtual void RemoveTarget(plSceneObject * object); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); virtual void Write(hsStream *stream, hsResMgr *mgr); virtual void Read(hsStream * stream, hsResMgr *mgr); - hsBool HasRunningAnims(); - hsBool DirtySynchState(const char* SDLStateName, uint32_t synchFlags); + bool HasRunningAnims(); + bool DirtySynchState(const char* SDLStateName, uint32_t synchFlags); CLASSNAME_REGISTER( plAGMasterMod ); GETINTERFACE_ANY( plAGMasterMod, plModifier ); @@ -220,7 +220,7 @@ protected: plAGModifier * ICacheChannelMod(plAGModifier *mod) const; plAGModifier * IFindChannelMod(const plSceneObject *obj, const plString &name) const; - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); virtual void IApplyDynamic() {}; // dummy function required by base class @@ -245,9 +245,9 @@ protected: // animations that require AnimTimeConvert state to be synched plInstanceVector fATCAnimInstances; - hsBool fFirstEval; - hsBool fNeedEval; - void IRegForEval(hsBool val); + bool fFirstEval; + bool fNeedEval; + void IRegForEval(bool val); // SDL modifier which sends/recvs dynamics state plAGMasterSDLModifier *fAGMasterSDLMod; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.cpp index d5bfacfb..56754037 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.cpp @@ -69,7 +69,7 @@ plAGModifier::plAGModifier() } // CTOR(name) -plAGModifier::plAGModifier(const plString &name, hsBool autoApply) +plAGModifier::plAGModifier(const plString &name, bool autoApply) : plSingleModifier(), fAutoApply(autoApply) { fChannelName = name; @@ -93,7 +93,7 @@ plString plAGModifier::GetChannelName() const } // ENABLE -void plAGModifier::Enable(hsBool val) +void plAGModifier::Enable(bool val) { fEnabled = val; } @@ -126,7 +126,7 @@ void plAGModifier::Apply(double time) const // IEVAL // Apply our channels to our scene object -hsBool plAGModifier::IEval(double time, float delta, uint32_t dirty) +bool plAGModifier::IEval(double time, float delta, uint32_t dirty) { if(fAutoApply) { // Apply(time, delta); @@ -234,7 +234,7 @@ plAGChannel * plAGModifier::MergeChannel(plAGApplicator *app, } // DETACHCHANNEL -hsBool plAGModifier::DetachChannel(plAGChannel * channel) +bool plAGModifier::DetachChannel(plAGChannel * channel) { plAppTable::iterator i = fApps.begin(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.h b/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.h index d08a3711..8ebff9db 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.h @@ -89,7 +89,7 @@ public: incoming channels with this modifier. You may also supply an autoApply parameter, which indicates whether this modifier should apply itself every frame, or only when explicitly asked to. */ - plAGModifier(const plString &name, hsBool autoApply = true); + plAGModifier(const plString &name, bool autoApply = true); /** It's a destructor. Destroys the name passed into the constructor, and a bunch of other stuff you don't need to know anything about. */ @@ -108,7 +108,7 @@ public: plAGChannel *MergeChannel(plAGApplicator *app, plAGChannel *chan, plScalarChannel *blend, plAGAnimInstance *anim, int priority); /** Remove the given channel. Will also remove the channel's applicator. */ - hsBool DetachChannel(plAGChannel * channel); + bool DetachChannel(plAGChannel * channel); /** Set the applicator for a modifier. \deprecated */ @@ -125,7 +125,7 @@ public: /** Get the channel tied to our ith applicator */ plAGChannel * GetChannel(int i) { return fApps[i]->GetChannel(); } - void Enable(hsBool val); + void Enable(bool val); // PERSISTENCE virtual void Read(hsStream *stream, hsResMgr *mgr); @@ -140,13 +140,13 @@ protected: plAppTable fApps; // the applicators (with respective channels) that we're applying to our scene object plString fChannelName; // name used for matching animation channels to this modifier - hsBool fAutoApply; // evaluate animation automatically during IEval call - hsBool fEnabled; // if not enabled, we don't eval any of our anims + bool fAutoApply; // evaluate animation automatically during IEval call + bool fEnabled; // if not enabled, we don't eval any of our anims // APPLYING THE ANIMATION - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); - virtual hsBool IHandleCmd(plAnimCmdMsg* modMsg) { return false; } // only plAGMasterMod should handle these + virtual bool IHandleCmd(plAnimCmdMsg* modMsg) { return false; } // only plAGMasterMod should handle these virtual void IApplyDynamic() {}; // dummy function required by base class // INTERNAL ACCESSORS FOR SCENE OBJECT INTERFACES diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp index 37a8dc11..c4986bfa 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp @@ -288,7 +288,7 @@ plAGAnimInstance * plAnimStage::Attach(plArmatureMod *armature, plArmatureBrain } // SENDNOTIFY -hsBool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain) +bool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain) { // make sure the user has requested this type of notify if(fNotify & notifyMask) @@ -326,10 +326,10 @@ hsBool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArma } // DETACH -hsBool plAnimStage::Detach(plArmatureMod *armature) +bool plAnimStage::Detach(plArmatureMod *armature) { - hsBool result = false; + bool result = false; #ifdef DEBUG_MULTISTAGE char sbuf[256]; @@ -681,7 +681,7 @@ float plAnimStage::GetLocalTime() } // SETLOCALTIME -void plAnimStage::SetLocalTime(float time, hsBool noCallbacks /* = false */) +void plAnimStage::SetLocalTime(float time, bool noCallbacks /* = false */) { fLocalTime = time; if(fAnimInstance) @@ -766,9 +766,9 @@ void plAnimStage::Read(hsStream *stream, hsResMgr *mgr) fRegressType = (RegressType)stream->ReadLE32(); fLoops = stream->ReadLE32(); - fDoAdvanceTo = stream->Readbool(); + fDoAdvanceTo = stream->ReadBool(); fAdvanceTo = stream->ReadLE32(); - fDoRegressTo = stream->Readbool(); + fDoRegressTo = stream->ReadBool(); fRegressTo = stream->ReadLE32(); } @@ -782,9 +782,9 @@ void plAnimStage::Write(hsStream *stream, hsResMgr *mgr) stream->WriteLE32(fRegressType); stream->WriteLE32(fLoops); - stream->Writebool(fDoAdvanceTo); + stream->WriteBool(fDoAdvanceTo); stream->WriteLE32(fAdvanceTo); - stream->Writebool(fDoRegressTo); + stream->WriteBool(fDoRegressTo); stream->WriteLE32(fRegressTo); } @@ -795,7 +795,7 @@ void plAnimStage::SaveAux(hsStream *stream, hsResMgr *mgr) stream->WriteLEScalar(fLocalTime); stream->WriteLEScalar(fLength); stream->WriteLE32(fCurLoop); - stream->Writebool(fAttached); + stream->WriteBool(fAttached); // no ephemeral stage at the moment } @@ -805,8 +805,6 @@ void plAnimStage::LoadAux(hsStream *stream, hsResMgr *mgr, double time) fLocalTime = stream->ReadLEScalar(); fLength = stream->ReadLEScalar(); fCurLoop = stream->ReadLE32(); - // This should actually be Readbool (lowercase), but I won't fix it since that - // would require a version change - fAttached = (stream->Readbool() != 0); + fAttached = stream->ReadBool(); } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.h b/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.h index 958d763d..4166e330 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.h @@ -194,7 +194,7 @@ public: const plAnimStage& operator=(const plAnimStage& src); plAGAnimInstance * Attach(plArmatureMod *armature, plArmatureBrain *brain, float initialBlend, double time); - int Detach(plArmatureMod *armature); + bool Detach(plArmatureMod *armature); void Reset(double time, plArmatureMod *avMod, bool atStart); void ResetAtTime(double time, float localTime, plArmatureMod *avMod); bool MoveRelative(double worldTime, float delta, float &overage, plArmatureMod *avMod); @@ -217,7 +217,7 @@ public: int GetLoopValue(); void SetLoopValue(int loop); float GetLocalTime(); - void SetLocalTime(float time, hsBool noCallbacks = false); + void SetLocalTime(float time, bool noCallbacks = false); float GetLength(); void SetMod(plMultistageBehMod* p) { fMod = p; } // for returning ID#'s to python scripts: @@ -252,7 +252,7 @@ protected: bool ITryAdvance(plArmatureMod *avMod); bool ITryRegress(plArmatureMod *avMod); - hsBool ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain); + bool ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain); char *fAnimName; // the name of our animation uint8_t fNotify; // flags for which events will cause notification events diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAntiGravAction.h b/Sources/Plasma/PubUtilLib/plAvatar/plAntiGravAction.h index 59db9ca1..ee4049ab 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAntiGravAction.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAntiGravAction.h @@ -61,14 +61,14 @@ public: void SetSurface(plSwimRegionInterface *region, float surfaceHeight); float GetBuoyancy() { return fBuoyancy; } - hsBool IsOnGround() { return fOnGround; } - hsBool HadContacts() { return fHadContacts; } + bool IsOnGround() { return fOnGround; } + bool HadContacts() { return fHadContacts; } protected: void IAdjustBuoyancy(); - hsBool fOnGround; - hsBool fHadContacts; + bool fOnGround; + bool fHadContacts; float fBuoyancy; float fSurfaceHeight; plSwimRegionInterface *fCurrentRegion; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp index 9849dda8..1d53edca 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.cpp @@ -104,7 +104,7 @@ void plArmatureEffectsMgr::Write(hsStream *s, hsResMgr *mgr) mgr->WriteKey(s, fEffects[i]->GetKey()); } -hsBool plArmatureEffectsMgr::MsgReceive(plMessage* msg) +bool plArmatureEffectsMgr::MsgReceive(plMessage* msg) { plEventCallbackInterceptMsg *iMsg = plEventCallbackInterceptMsg::ConvertNoRef(msg); if (iMsg) @@ -238,7 +238,7 @@ void plArmatureEffectFootSound::Write(hsStream* s, hsResMgr* mgr) mgr->WriteKey(s, (fMods[i] ? fMods[i]->GetKey() : nil)); } -hsBool plArmatureEffectFootSound::MsgReceive(plMessage* msg) +bool plArmatureEffectFootSound::MsgReceive(plMessage* msg) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg); if (refMsg) @@ -260,7 +260,7 @@ hsBool plArmatureEffectFootSound::MsgReceive(plMessage* msg) return plArmatureEffect::MsgReceive(msg); } -hsBool plArmatureEffectFootSound::HandleTrigger(plMessage* msg) +bool plArmatureEffectFootSound::HandleTrigger(plMessage* msg) { plArmatureEffectMsg *eMsg = plArmatureEffectMsg::ConvertNoRef(msg); if (eMsg) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.h b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.h index 37d2bfae..dd79546d 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureEffects.h @@ -62,7 +62,7 @@ class plArmatureEffectsMgr : public hsKeyedObject { protected: hsTArray fEffects; - hsBool fEnabled; + bool fEnabled; public: @@ -75,7 +75,7 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); uint32_t GetNumEffects(); plArmatureEffect *GetEffect(uint32_t num); @@ -119,7 +119,7 @@ public: CLASSNAME_REGISTER( plArmatureEffect ); GETINTERFACE_ANY( plArmatureEffect, hsKeyedObject ); - virtual hsBool HandleTrigger(plMessage* msg) = 0; + virtual bool HandleTrigger(plMessage* msg) = 0; virtual void Reset() {} }; @@ -149,8 +149,8 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); - virtual hsBool HandleTrigger(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); + virtual bool HandleTrigger(plMessage* msg); virtual void Reset(); void SetFootType(uint8_t); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp index 3f7110ef..5dd9c555 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp @@ -147,9 +147,9 @@ plArmatureModBase::~plArmatureModBase() } } -hsBool plArmatureModBase::MsgReceive(plMessage* msg) +bool plArmatureModBase::MsgReceive(plMessage* msg) { - hsBool result = false; + bool result = false; plArmatureBrain *curBrain = nil; if (fBrains.size() > 0) @@ -184,7 +184,7 @@ void plArmatureModBase::RemoveTarget(plSceneObject* so) plAGMasterMod::RemoveTarget(so); } -hsBool plArmatureModBase::IEval(double time, float elapsed, uint32_t dirty) +bool plArmatureModBase::IEval(double time, float elapsed, uint32_t dirty) { if (IsFinal()) { @@ -193,7 +193,7 @@ hsBool plArmatureModBase::IEval(double time, float elapsed, uint32_t dirty) plArmatureBrain *curBrain = fBrains.back(); if (curBrain) { - hsBool result = curBrain->Apply(time, elapsed); + bool result = curBrain->Apply(time, elapsed); if (!result) { PopBrain(); @@ -271,7 +271,7 @@ void plArmatureModBase::AddressMessageToDescendants(const plCoordinateInterface AddressMessageToDescendants(CI->GetChild(i), msg); } -void plArmatureModBase::EnableDrawingTree(const plSceneObject *object, hsBool status) +void plArmatureModBase::EnableDrawingTree(const plSceneObject *object, bool status) { if (!object) return; @@ -296,7 +296,7 @@ plKey plArmatureModBase::GetWorldKey() const return nil; } -hsBool plArmatureModBase::ValidatePhysics() +bool plArmatureModBase::ValidatePhysics() { if (!fTarget) return false; @@ -310,7 +310,7 @@ hsBool plArmatureModBase::ValidatePhysics() return !(fWaitFlags & kNeedPhysics); } -hsBool plArmatureModBase::ValidateMesh() +bool plArmatureModBase::ValidateMesh() { if (fWaitFlags & kNeedMesh) { @@ -327,7 +327,7 @@ hsBool plArmatureModBase::ValidateMesh() fWaitFlags |= kNeedMesh; break; } - hsBool visible = (i == fCurLOD ? true : false); + bool visible = (i == fCurLOD ? true : false); EnableDrawingTree(meshObj, visible); } } @@ -418,7 +418,7 @@ void plArmatureModBase::LeaveAge() } } -hsBool plArmatureModBase::IsFinal() +bool plArmatureModBase::IsFinal() { return !fWaitFlags; } @@ -447,7 +447,7 @@ void plArmatureModBase::AdjustLOD() } // Should always be called from AdjustLOD -hsBool plArmatureModBase::SetLOD(int iNewLOD) +bool plArmatureModBase::SetLOD(int iNewLOD) { if (iNewLOD >= fMeshKeys.size()) iNewLOD = fMeshKeys.size() - 1; @@ -512,14 +512,14 @@ uint8_t plArmatureModBase::GetNumLOD() const return fMeshKeys.size(); } -void plArmatureModBase::EnablePhysics(hsBool status, uint16_t reason /* = kDisableReasonUnknown */) +void plArmatureModBase::EnablePhysics(bool status, uint16_t reason /* = kDisableReasonUnknown */) { if (status) fDisabledPhysics &= ~reason; else fDisabledPhysics |= reason; - hsBool newStatus = !fDisabledPhysics; + bool newStatus = !fDisabledPhysics; if (fController) fController->Enable(newStatus); @@ -532,21 +532,21 @@ void plArmatureModBase::EnablePhysics(hsBool status, uint16_t reason /* = kDisab // Disabling Kinematics (state=false) means: // - all outside forces will affect us and collisions on // i.e. normal enabled physical -void plArmatureModBase::EnablePhysicsKinematic(hsBool status) +void plArmatureModBase::EnablePhysicsKinematic(bool status) { if (fController) fController->Kinematic(status); } -void plArmatureModBase::EnableDrawing(hsBool status, uint16_t reason /* = kDisableReasonUnknown */) +void plArmatureModBase::EnableDrawing(bool status, uint16_t reason /* = kDisableReasonUnknown */) { - hsBool oldStatus = !fDisabledDraw; + bool oldStatus = !fDisabledDraw; if (status) fDisabledDraw &= ~reason; else fDisabledDraw |= reason; - hsBool newStatus = !fDisabledDraw; + bool newStatus = !fDisabledDraw; if (oldStatus == newStatus) return; @@ -613,7 +613,7 @@ void plArmatureModBase::ICustomizeApplicator() } } -void plArmatureModBase::IEnableBones(int lod, hsBool enable) +void plArmatureModBase::IEnableBones(int lod, bool enable) { if (lod < fUnusedBones.size()) { @@ -629,7 +629,7 @@ void plArmatureModBase::IEnableBones(int lod, hsBool enable) const char *plArmatureMod::BoneStrings[] = {"Male", "Female", "Critter", "Actor"}; float plArmatureMod::fMouseTurnSensitivity = 1.f; -hsBool plArmatureMod::fClickToTurn = true; +bool plArmatureMod::fClickToTurn = true; void plArmatureMod::IInitDefaults() { @@ -927,7 +927,7 @@ void plArmatureMod::UnRegisterForBehaviorNotify(plKey key) fNotifyKeys.RemoveItem(key); } -void plArmatureMod::IFireBehaviorNotify(uint32_t type, hsBool behaviorStart) +void plArmatureMod::IFireBehaviorNotify(uint32_t type, bool behaviorStart) { if (fNotifyKeys.GetCount() > 0) { @@ -940,7 +940,7 @@ void plArmatureMod::IFireBehaviorNotify(uint32_t type, hsBool behaviorStart) } } -void plArmatureMod::EnterAge(hsBool reSpawn) +void plArmatureMod::EnterAge(bool reSpawn) { fMidLink = false; fAlreadyPanicLinking = false; @@ -1002,7 +1002,7 @@ void plArmatureMod::LeaveAge() ClearInputFlags(true, false); } -void plArmatureMod::PanicLink(hsBool playLinkOutAnim /* = true */) +void plArmatureMod::PanicLink(bool playLinkOutAnim /* = true */) { // console override... just go back to the beginning if (fDontPanicLink) @@ -1065,9 +1065,9 @@ void plArmatureMod::PersonalLink() } } -hsBool plArmatureMod::MsgReceive(plMessage* msg) +bool plArmatureMod::MsgReceive(plMessage* msg) { - hsBool result = false; + bool result = false; plArmatureBrain *curBrain = nil; if (fBrains.size() > 0) @@ -1169,8 +1169,8 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg) plEnableMsg *enMsg = plEnableMsg::ConvertNoRef(msg); if(enMsg && enMsg->Type(plEnableMsg::kDrawable)) { - hsBool enable = enMsg->Cmd(plEnableMsg::kEnable); - hsBool disable = enMsg->Cmd(plEnableMsg::kDisable); + bool enable = enMsg->Cmd(plEnableMsg::kEnable); + bool disable = enMsg->Cmd(plEnableMsg::kDisable); hsAssert(enable != disable, "Conflicting or missing commands to enable message"); @@ -1278,7 +1278,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg) plLoadAvatarMsg *avLoadMsg = plLoadAvatarMsg::ConvertNoRef(msg); if (avLoadMsg) { - hsBool isPlayer = avLoadMsg->GetIsPlayer(); + bool isPlayer = avLoadMsg->GetIsPlayer(); if (!isPlayer) plgDispatch::Dispatch()->UnRegisterForExactType(plAgeLoadedMsg::Index(), GetKey()); @@ -1406,7 +1406,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg) return plAGMasterMod::MsgReceive(msg); } -hsBool plArmatureMod::IHandleControlMsg(plControlEventMsg* pMsg) +bool plArmatureMod::IHandleControlMsg(plControlEventMsg* pMsg) { // Slight change in design here... // Avatar input control messages are only sent locally. @@ -1427,7 +1427,7 @@ hsBool plArmatureMod::IHandleControlMsg(plControlEventMsg* pMsg) { ControlEventCode moveCode = pMsg->GetControlCode(); - hsBool flagChanged = false; + bool flagChanged = false; if(pMsg->ControlActivated()) { if (moveCode == B_CONTROL_TURN_TO && fClickToTurn) @@ -1543,7 +1543,7 @@ void plArmatureMod::ILinkToPersonalAge() pMsg->Send(); } -hsBool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty) +bool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty) { if (IsFinal()) { @@ -1563,7 +1563,7 @@ hsBool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty) } else // Bookkeeping for the local player... { - hsBool update = false; + bool update = false; if (fOldRegionsICareAbout != fRegionsICareAbout) { update = true; @@ -1830,7 +1830,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr) plgDispatch::Dispatch()->RegisterForExactType(plAvatarStealthModeMsg::Index(), GetKey()); } -hsBool plArmatureMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags) +bool plArmatureMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags) { // skip requests to synch non-avatar state if (SDLStateName && stricmp(SDLStateName, kSDLAvatar)) @@ -1849,7 +1849,7 @@ hsBool plArmatureMod::DirtySynchState(const char* SDLStateName, uint32_t synchFl return false; } -hsBool plArmatureMod::DirtyPhysicalSynchState(uint32_t synchFlags) +bool plArmatureMod::DirtyPhysicalSynchState(uint32_t synchFlags) { synchFlags |= plSynchedObject::kForceFullSend; // TEMP synchFlags |= plSynchedObject::kBCastToClients; @@ -1945,12 +1945,12 @@ void plArmatureMod::NetworkSynch(double timeNow, int force) fPendingSynch = true; } -hsBool plArmatureMod::IsLocalAvatar() +bool plArmatureMod::IsLocalAvatar() { return plAvatarMgr::GetInstance()->GetLocalAvatar() == this; } -hsBool plArmatureMod::IsLocalAI() +bool plArmatureMod::IsLocalAI() { // Formerly a lot of silly cached rigamaroll... Now, we'll just rely // on the fact that one player is the game master. HACK TURD if net groups @@ -1988,7 +1988,7 @@ plLayerLinkAnimation *plArmatureMod::IFindLayerLinkAnim() return nil; } -hsBool plArmatureMod::ValidatePhysics() +bool plArmatureMod::ValidatePhysics() { if (!fTarget) return false; @@ -2019,7 +2019,7 @@ hsBool plArmatureMod::ValidatePhysics() } -hsBool plArmatureMod::ValidateMesh() +bool plArmatureMod::ValidateMesh() { if (fWaitFlags & kNeedMesh) { @@ -2036,7 +2036,7 @@ hsBool plArmatureMod::ValidateMesh() fWaitFlags |= kNeedMesh; break; } - hsBool visible = (i == fCurLOD) ? true : false; + bool visible = (i == fCurLOD) ? true : false; EnableDrawingTree(meshObj, visible); @@ -2155,12 +2155,12 @@ void plArmatureMod::RestoreInputState() } -hsBool plArmatureMod::GetInputFlag (int which) const +bool plArmatureMod::GetInputFlag (int which) const { return fMoveFlags.IsBitSet(which); } -void plArmatureMod::SetInputFlag(int which, hsBool status) +void plArmatureMod::SetInputFlag(int which, bool status) { if(status) { @@ -2170,7 +2170,7 @@ void plArmatureMod::SetInputFlag(int which, hsBool status) } } -hsBool plArmatureMod::HasMovementFlag() const +bool plArmatureMod::HasMovementFlag() const { return (fMoveFlags.IsBitSet(B_CONTROL_MOVE_FORWARD) || fMoveFlags.IsBitSet(B_CONTROL_MOVE_BACKWARD) || @@ -2306,7 +2306,7 @@ void plArmatureMod::SetReverseFBOnIdle(bool val) SetInputFlag(B_CONTROL_LADDER_INVERTED, false); } -hsBool plArmatureMod::IsFBReversed() +bool plArmatureMod::IsFBReversed() { return GetInputFlag(B_CONTROL_LADDER_INVERTED); } @@ -2409,7 +2409,7 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at { float time = -1; - hsBool isLeft = false; + bool isLeft = false; if (markers[i].Find("SndLeftFootDown") == 0) { isLeft = true; @@ -2484,7 +2484,7 @@ int8_t plArmatureMod::AnimNameToIndex(const plString &name) return result; } -hsBool plArmatureMod::IsInStealthMode() const +bool plArmatureMod::IsInStealthMode() const { return (fStealthMode != plAvatarStealthModeMsg::kStealthVisible); } @@ -2504,7 +2504,7 @@ bool plArmatureMod::IsLinkedIn() return fIsLinkedIn; } -hsBool plArmatureMod::ConsumeJump() +bool plArmatureMod::ConsumeJump() { if (!GetInputFlag(B_CONTROL_CONSUMABLE_JUMP)) return false; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h index 04b2fa17..c771a7a8 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.h @@ -109,28 +109,28 @@ public: CLASSNAME_REGISTER( plArmatureModBase ); GETINTERFACE_ANY( plArmatureModBase, plAGMasterMod ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void AddTarget(plSceneObject* so); virtual void RemoveTarget(plSceneObject* so); - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); virtual void Read(hsStream *stream, hsResMgr *mgr); virtual void Write(hsStream *stream, hsResMgr *mgr); plMatrixDifferenceApp *GetRootAnimator() { return fRootAnimator; } plPhysicalControllerCore* GetController() const { return fController; } plKey GetWorldKey() const; - virtual hsBool ValidatePhysics(); - virtual hsBool ValidateMesh(); + virtual bool ValidatePhysics(); + virtual bool ValidateMesh(); virtual void PushBrain(plArmatureBrain *brain); virtual void PopBrain(); plArmatureBrain *GetCurrentBrain() const; plDrawable *FindDrawable() const; virtual void LeaveAge(); - virtual hsBool IsFinal(); + virtual bool IsFinal(); // LOD stuff void AdjustLOD(); // see if we need to switch to a different resolution - hsBool SetLOD(int newLOD); // switch to a different resolution + bool SetLOD(int newLOD); // switch to a different resolution void RefreshTree(); // Resend an LOD update to all our nodes (for when geometry changes) int AppendMeshKey(plKey meshKey); int AppendBoneVec(plKeyVector *boneVec); @@ -147,15 +147,15 @@ public: kDisableReasonVehicle = 0x0010, kDisableReasonGenericBrain = 0x0020, }; - void EnablePhysics(hsBool status, uint16_t reason = kDisableReasonUnknown); - void EnablePhysicsKinematic(hsBool status); - void EnableDrawing(hsBool status, uint16_t reason = kDisableReasonUnknown); - hsBool IsPhysicsEnabled() { return fDisabledPhysics == 0; } - hsBool IsDrawEnabled() { return fDisabledDraw == 0; } + void EnablePhysics(bool status, uint16_t reason = kDisableReasonUnknown); + void EnablePhysicsKinematic(bool status); + void EnableDrawing(bool status, uint16_t reason = kDisableReasonUnknown); + bool IsPhysicsEnabled() { return fDisabledPhysics == 0; } + bool IsDrawEnabled() { return fDisabledDraw == 0; } static void AddressMessageToDescendants(const plCoordinateInterface * CI, plMessage *msg); - static void EnableDrawingTree(const plSceneObject *object, hsBool status); + static void EnableDrawingTree(const plSceneObject *object, bool status); static int fMinLOD; // throttle for lowest-indexed LOD static double fLODDistance; // Distance for first LOD switch 2nd is 2x this distance (for now) @@ -163,7 +163,7 @@ public: protected: virtual void IFinalize(); virtual void ICustomizeApplicator(); - void IEnableBones(int lod, hsBool enable); + void IEnableBones(int lod, bool enable); // Some of these flags are only needed by derived classes, but I just want // the one waitFlags variable. @@ -204,23 +204,23 @@ public: CLASSNAME_REGISTER( plArmatureMod ); GETINTERFACE_ANY( plArmatureMod, plArmatureModBase ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void AddTarget(plSceneObject* so); virtual void RemoveTarget(plSceneObject* so); - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); virtual void Read(hsStream *stream, hsResMgr *mgr); virtual void Write(hsStream *stream, hsResMgr *mgr); - virtual hsBool ValidatePhysics(); - virtual hsBool ValidateMesh(); + virtual bool ValidatePhysics(); + virtual bool ValidateMesh(); // Get or set the position of the avatar in simulation space. Set any // arguments you don't care about to nil. void SetPositionAndRotationSim(const hsPoint3* position, const hsQuat* rotation); void GetPositionAndRotationSim(hsPoint3* position, hsQuat* rotation); - hsBool IsLocalAvatar(); - hsBool IsLocalAI(); + bool IsLocalAvatar(); + bool IsLocalAI(); virtual const plSceneObject *FindBone(const plString & name) const; virtual const plSceneObject *FindBone(uint32_t id) const; // use an id from an appropriate taxonomy, such as plAvBrainHuman::BoneID virtual void AddBoneMapping(uint32_t id, const plSceneObject *bone); @@ -229,9 +229,9 @@ public: virtual void Spawn(double timeNow); virtual void SpawnAt(int which, double timeNow); - virtual void EnterAge(hsBool reSpawn); + virtual void EnterAge(bool reSpawn); virtual void LeaveAge(); - virtual void PanicLink(hsBool playLinkOutAnim = true); + virtual void PanicLink(bool playLinkOutAnim = true); virtual void PersonalLink(); virtual bool ToggleDontPanicLinkFlag() { fDontPanicLink = fDontPanicLink ? false : true; return fDontPanicLink; } @@ -249,15 +249,15 @@ public: void IProcessQueuedInput(); void PreserveInputState(); void RestoreInputState(); - hsBool GetInputFlag(int f) const; - void SetInputFlag(int which, hsBool status); + bool GetInputFlag(int f) const; + void SetInputFlag(int which, bool status); void ClearInputFlags(bool saveAlwaysRun, bool clearBackup); - hsBool HasMovementFlag() const; // Is any *movement* input flag on? + bool HasMovementFlag() const; // Is any *movement* input flag on? float GetTurnStrength() const; float GetKeyTurnStrength() const; float GetAnalogTurnStrength() const; void SetReverseFBOnIdle(bool val); - hsBool IsFBReversed(); + bool IsFBReversed(); bool ForwardKeyDown() const; bool BackwardKeyDown() const; @@ -282,8 +282,8 @@ public: void SynchIfLocal(double timeNow, int force); // Just physical state void SynchInputState(uint32_t rcvID = kInvalidPlayerID); - hsBool DirtySynchState(const char* SDLStateName, uint32_t synchFlags ); - hsBool DirtyPhysicalSynchState(uint32_t synchFlags); + bool DirtySynchState(const char* SDLStateName, uint32_t synchFlags ); + bool DirtyPhysicalSynchState(uint32_t synchFlags); plClothingOutfit *GetClothingOutfit() const { return fClothingOutfit; } plClothingSDLModifier *GetClothingSDLMod() const { return fClothingSDLMod; } const plSceneObject *GetClothingSO(uint8_t lod) const; @@ -310,19 +310,19 @@ public: int RefreshDebugDisplay(); void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); - void SetDebugState(hsBool state) { fDebugOn = (state != 0); } + void SetDebugState(bool state) { fDebugOn = (state != 0); } bool GetDebugState() { return fDebugOn; } virtual void RefreshTree() {} - hsBool IsInStealthMode() const; + bool IsInStealthMode() const; int GetStealthLevel() const { return fStealthLevel; } bool IsOpaque(); bool IsLinkedIn(); bool IsMidLink(); - hsBool ConsumeJump(); // returns true if the jump keypress was available to consume + bool ConsumeJump(); // returns true if the jump keypress was available to consume - void SendBehaviorNotify(uint32_t type, hsBool start = true) { IFireBehaviorNotify(type,start); } + void SendBehaviorNotify(uint32_t type, bool start = true) { IFireBehaviorNotify(type,start); } // Discovered a bug which makes these values horribly out of scale. So we do the rescale // in the Get/Set functions for backwards compatability. static void SetMouseTurnSensitivity(float val) { fMouseTurnSensitivity = val / 150.f; } @@ -363,7 +363,7 @@ public: plMatrixDelayedCorrectionApplicator *fBoneRootAnimator; static const float kAvatarInputSynchThreshold; - static hsBool fClickToTurn; + static bool fClickToTurn; static const char *BoneStrings[]; void SetPhysicalDims(float height, float width) { fPhysHeight = height; fPhysWidth = width; } @@ -381,8 +381,8 @@ protected: virtual void ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *atc); void NetworkSynch(double timeNow, int force = 0); - hsBool IHandleControlMsg(plControlEventMsg* pMsg); - void IFireBehaviorNotify(uint32_t type, hsBool behaviorStart = true); + bool IHandleControlMsg(plControlEventMsg* pMsg); + void IFireBehaviorNotify(uint32_t type, bool behaviorStart = true); void IHandleInputStateMsg(plAvatarInputStateMsg *msg); void ILinkToPersonalAge(); int IFindSpawnOverride(void); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.cpp index e9d42b0e..1268a5d5 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.cpp @@ -55,7 +55,7 @@ plArmatureBehavior::~plArmatureBehavior() fAnim->Detach(); } -void plArmatureBehavior::Init(plAGAnim *anim, hsBool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index) +void plArmatureBehavior::Init(plAGAnim *anim, bool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index) { fArmature = armature; fBrain = brain; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.h index 06a06da4..b69f0e17 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBehaviors.h @@ -60,7 +60,7 @@ public: plArmatureBehavior(); virtual ~plArmatureBehavior(); - void Init(plAGAnim *anim, hsBool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index); + void Init(plAGAnim *anim, bool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index); virtual void Process(double time, float elapsed); virtual void SetStrength(float val, float rate = 0.f); // default instant change virtual float GetStrength(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrain.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrain.cpp index e7cb7ab1..af38a456 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrain.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrain.cpp @@ -79,7 +79,7 @@ plArmatureBrain::~plArmatureBrain() delete fCurTask; } -hsBool plArmatureBrain::Apply(double timeNow, float elapsed) +bool plArmatureBrain::Apply(double timeNow, float elapsed) { IProcessTasks(timeNow, elapsed); fArmature->ApplyAnimations(timeNow, elapsed); @@ -99,7 +99,7 @@ void plArmatureBrain::QueueTask(plAvTask *task) fTaskQueue.push_back(task); } -hsBool plArmatureBrain::LeaveAge() +bool plArmatureBrain::LeaveAge() { if (fCurTask) fCurTask->LeaveAge(plArmatureMod::ConvertNoRef(fArmature)); @@ -115,7 +115,7 @@ hsBool plArmatureBrain::LeaveAge() return true; } -hsBool plArmatureBrain::IsRunningTask() const +bool plArmatureBrain::IsRunningTask() const { if (fCurTask) return true; @@ -157,7 +157,7 @@ void plArmatureBrain::Read(hsStream *stream, hsResMgr *mgr) } // MSGRECEIVE -hsBool plArmatureBrain::MsgReceive(plMessage * msg) +bool plArmatureBrain::MsgReceive(plMessage * msg) { plAvTaskMsg *taskMsg = plAvTaskMsg::ConvertNoRef(msg); if (taskMsg) @@ -192,7 +192,7 @@ void plArmatureBrain::IProcessTasks(double time, float elapsed) } } -hsBool plArmatureBrain::IHandleTaskMsg(plAvTaskMsg *msg) +bool plArmatureBrain::IHandleTaskMsg(plAvTaskMsg *msg) { plAvTask *task = msg->GetTask(); QueueTask(task); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrain.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrain.h index 6784f7f2..3ace7db0 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrain.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrain.h @@ -71,25 +71,25 @@ public: CLASSNAME_REGISTER( plArmatureBrain ); GETINTERFACE_ANY( plArmatureBrain, plCreatable ); - virtual hsBool Apply(double timeNow, float elapsed); + virtual bool Apply(double timeNow, float elapsed); virtual void Activate(plArmatureModBase *armature); virtual void Deactivate() {} virtual void Suspend() {} virtual void Resume() {} virtual void Spawn(double timeNow) {} virtual void OnBehaviorStop(uint8_t index) {} - virtual hsBool LeaveAge(); - virtual hsBool IsRunningTask() const; + virtual bool LeaveAge(); + virtual bool IsRunningTask() const; virtual void QueueTask(plAvTask *task); virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) {} virtual void Write(hsStream *stream, hsResMgr *mgr); virtual void Read(hsStream *stream, hsResMgr *mgr); - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); protected: virtual void IProcessTasks(double time, float elapsed); - virtual hsBool IHandleTaskMsg(plAvTaskMsg *msg); + virtual bool IHandleTaskMsg(plAvTaskMsg *msg); typedef std::deque plAvTaskQueue; plAvTaskQueue fTaskQueue; // FIFO queue of tasks we're working on diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp index 46a40850..c9bf3a8f 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp @@ -210,9 +210,9 @@ void plAvBrainClimb::Deactivate() } // APPLY -hsBool plAvBrainClimb::Apply(double time, float elapsed) +bool plAvBrainClimb::Apply(double time, float elapsed) { - hsBool result = true; + bool result = true; IGetDesiredDirection(); @@ -242,7 +242,7 @@ hsBool plAvBrainClimb::Apply(double time, float elapsed) } // MSGRECEIVE -hsBool plAvBrainClimb::MsgReceive(plMessage *msg) +bool plAvBrainClimb::MsgReceive(plMessage *msg) { plClimbMsg *climbMsg; plLOSHitMsg *losMsg; @@ -259,7 +259,7 @@ hsBool plAvBrainClimb::MsgReceive(plMessage *msg) } // IHANDLECLIMBMSG -hsBool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg) +bool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg) { switch(msg->fCommand) { @@ -301,12 +301,12 @@ hsBool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg) } // IHANDLELOSMSG -hsBool plAvBrainClimb::IHandleLOSMsg(plLOSHitMsg *msg) +bool plAvBrainClimb::IHandleLOSMsg(plLOSHitMsg *msg) { plClimbMsg::Direction blockDir = static_cast(msg->fRequestID); // this is a weak test because someone else could be using the same bits to mean something different // the real strategy is that we should only receive LOS messages of our own creation - hsBool oneOfOurs = blockDir == plClimbMsg::kUp || blockDir == plClimbMsg::kDown || blockDir == plClimbMsg::kLeft || blockDir == plClimbMsg::kRight; + bool oneOfOurs = blockDir == plClimbMsg::kUp || blockDir == plClimbMsg::kDown || blockDir == plClimbMsg::kLeft || blockDir == plClimbMsg::kRight; if(oneOfOurs) { fPhysicallyBlockedDirections |= blockDir; @@ -320,7 +320,7 @@ hsBool plAvBrainClimb::IHandleLOSMsg(plLOSHitMsg *msg) bool plAvBrainClimb::IProcessExitStage(double time, float elapsed) { plAGAnimInstance *ai = fExitStage->GetAnimInstance(); - hsBool animDone = ai->IsAtEnd(); + bool animDone = ai->IsAtEnd(); float unused; // if we have an exit stage running, move it instead of the base stage @@ -730,7 +730,7 @@ void plAvBrainClimb::ICalcProbeLengths() // IInitAnimations --------------------- // --------------- -hsBool plAvBrainClimb::IInitAnimations() +bool plAvBrainClimb::IInitAnimations() { fUp = new plAnimStage("WallClimbUp", plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto, diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.h index ff149109..bc907134 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.h @@ -98,7 +98,7 @@ public: virtual void Activate(plArmatureModBase *avMod); virtual void Deactivate(); - virtual hsBool Apply(double timeNow, float elapsed); + virtual bool Apply(double timeNow, float elapsed); virtual void SaveToSDL(plStateDataRecord *sdl); virtual void LoadFromSDL(const plStateDataRecord *sdl); @@ -108,7 +108,7 @@ public: const char *ModeStr(Mode mode); // plasma protocol - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); CLASSNAME_REGISTER( plAvBrainClimb ); GETINTERFACE_ANY( plAvBrainClimb, plArmatureBrain); @@ -121,8 +121,8 @@ private: /** Handle a climb message. Note that the "start climbing" climb message is handled by the human brain, since there's no climb brain there to hear it, since you (by definition) haven't started climbing yet... */ - inline hsBool IHandleClimbMsg(plClimbMsg *msg); - inline hsBool IHandleLOSMsg(plLOSHitMsg *msg); + inline bool IHandleClimbMsg(plClimbMsg *msg); + inline bool IHandleLOSMsg(plLOSHitMsg *msg); /** Allow or block dismounting in the specified direction. */ void IEnableDismount(plClimbMsg::Direction dir, bool status); @@ -159,7 +159,7 @@ private: /** Create all our animation stage objects. Doesn't actually apply any of the animations to the avatar yet. */ - virtual hsBool IInitAnimations(); + virtual bool IInitAnimations(); /** Find the animation stage corresponding with a mode */ plAnimStage * IGetStageFromMode(Mode mode); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.cpp index 3728c72a..04070174 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.cpp @@ -116,7 +116,7 @@ plAvBrainCoop::plAvBrainCoop(uint32_t exitFlags, float fadeIn, float fadeOut, // MsgReceive ---------------------------------- // ----------- -hsBool plAvBrainCoop::MsgReceive(plMessage *msg) +bool plAvBrainCoop::MsgReceive(plMessage *msg) { plPickedMsg *pickM = plPickedMsg::ConvertNoRef(msg); if(pickM) @@ -202,15 +202,15 @@ void plAvBrainCoop::Read(hsStream *stream, hsResMgr *mgr) fInitiatorID = stream->ReadLE32(); fInitiatorSerial = stream->ReadLE16(); - if(stream->Readbool()) + if(stream->ReadBool()) { fHostKey = mgr->ReadKey(stream); } - if(stream->Readbool()) + if(stream->ReadBool()) { fGuestKey = mgr->ReadKey(stream); } - fWaitingForClick = stream->Readbool(); + fWaitingForClick = stream->ReadBool(); unsigned numRecipients = stream->ReadLE16(); for (unsigned i = 0; i < numRecipients; i++) @@ -229,15 +229,15 @@ void plAvBrainCoop::Write(hsStream *stream, hsResMgr *mgr) bool hasHostKey = (fHostKey != nil); bool hasGuestKey = (fGuestKey != nil); - stream->Writebool(hasHostKey); + stream->WriteBool(hasHostKey); if(hasHostKey) mgr->WriteKey(stream, fHostKey); - stream->Writebool(hasGuestKey); + stream->WriteBool(hasGuestKey); if(hasGuestKey) mgr->WriteKey(stream, fGuestKey); - stream->Writebool(fWaitingForClick); + stream->WriteBool(fWaitingForClick); stream->WriteLE16(fRecipients.size()); for (unsigned i = 0; i < fRecipients.size(); i++) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.h index 1d5848fe..c0291986 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCoop.h @@ -63,7 +63,7 @@ public: plAvBrainCoop(uint32_t exitFlags, float fadeIn, float fadeOut, MoveMode moveMode, uint32_t initiatorID, uint16_t initiatorSerial, plKey hostKey); - hsBool MsgReceive(plMessage *msg); + bool MsgReceive(plMessage *msg); virtual bool RelayNotifyMsg(plNotifyMsg *msg); void EnableGuestClick(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp index 05f7dd99..a3d721a6 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp @@ -81,7 +81,7 @@ public: fAvMod(nil), fCritterBrain(nil), fName(name), fRandomStartPoint(randomStart), fFadeInLength(fadeInLength), fFadeOutLength(fadeOutLength) {} virtual ~CritterBehavior() {} - void Init(plAGAnim* anim, hsBool loop, plAvBrainCritter* brain, plArmatureMod* body, uint8_t index) + void Init(plAGAnim* anim, bool loop, plAvBrainCritter* brain, plArmatureMod* body, uint8_t index) { plArmatureBehavior::Init(anim, loop, brain, body, index); fAvMod = body; @@ -89,7 +89,7 @@ public: fAnimName = anim->GetName(); } - virtual hsBool PreCondition(double time, float elapsed) {return true;} + virtual bool PreCondition(double time, float elapsed) {return true;} float GetAnimLength() {return (fAnim->GetAnimation()->GetLength());} void SetAnimTime(float time) {fAnim->SetCurrentTime(time, true);} @@ -152,7 +152,7 @@ plAvBrainCritter::~plAvBrainCritter() /////////////////////////////////////////////////////////////////////////////// -hsBool plAvBrainCritter::Apply(double time, float elapsed) +bool plAvBrainCritter::Apply(double time, float elapsed) { // update internal pathfinding variables IEvalGoal(); @@ -173,7 +173,7 @@ hsBool plAvBrainCritter::Apply(double time, float elapsed) return plArmatureBrain::Apply(time, elapsed); } -hsBool plAvBrainCritter::MsgReceive(plMessage* msg) +bool plAvBrainCritter::MsgReceive(plMessage* msg) { return plArmatureBrain::MsgReceive(msg); } @@ -456,7 +456,7 @@ void plAvBrainCritter::DumpToDebugDisplay(int& x, int& y, int lineHeight, char* /////////////////////////////////////////////////////////////////////////////// -hsBool plAvBrainCritter::IInitBaseAnimations() +bool plAvBrainCritter::IInitBaseAnimations() { // create the basic idle and run behaviors, and put them into our appropriate structures plAGAnim* idle = fAvMod->FindCustomAnim(kDefaultIdleAnimName); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.h index 27d2b8c9..0615932e 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.h @@ -75,8 +75,8 @@ public: CLASSNAME_REGISTER(plAvBrainCritter); GETINTERFACE_ANY(plAvBrainCritter, plArmatureBrain); - hsBool Apply(double time, float elapsed); - hsBool MsgReceive(plMessage* msg); + bool Apply(double time, float elapsed); + bool MsgReceive(plMessage* msg); virtual void Activate(plArmatureModBase* avMod); virtual void Deactivate(); @@ -140,7 +140,7 @@ public: static bool fDrawDebug; protected: - virtual hsBool IInitBaseAnimations(); + virtual bool IInitBaseAnimations(); int IPickBehavior(int behavior) const; int IPickBehavior(const std::string& behavior) const; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.cpp index 777b60ed..a3b2cacd 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.cpp @@ -100,7 +100,7 @@ void plAvBrainDrive::IEnablePhysics(bool enable, plKey avKey) } // APPLY -hsBool plAvBrainDrive::Apply(double timeNow, float elapsed) +bool plAvBrainDrive::Apply(double timeNow, float elapsed) { plSceneObject * avSO = fAvMod->GetTarget(0); float eTime = hsTimer::GetDelSysSeconds(); @@ -180,7 +180,7 @@ hsBool plAvBrainDrive::Apply(double timeNow, float elapsed) } // IHANDLECONTROLMSG -hsBool plAvBrainDrive::MsgReceive(plMessage* msg) +bool plAvBrainDrive::MsgReceive(plMessage* msg) { plControlEventMsg *ctrlMsg = plControlEventMsg::ConvertNoRef(msg); if(ctrlMsg) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.h index 25ded4c4..2a572051 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainDrive.h @@ -81,12 +81,12 @@ public: virtual void Deactivate(); /** Look at the key states and figure out if and how we should move */ - virtual hsBool Apply(double timeNow, float elapsed); // main control loop. called by avatar eval() + virtual bool Apply(double timeNow, float elapsed); // main control loop. called by avatar eval() // the user brain base handles most of the details of control messages, // so this function just looks for the special command which gets us out // of drive mode. - virtual hsBool MsgReceive(plMessage* pMsg); // handle control input from the user + virtual bool MsgReceive(plMessage* pMsg); // handle control input from the user CLASSNAME_REGISTER( plAvBrainDrive ); GETINTERFACE_ANY( plAvBrainDrive, plArmatureBrain ); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp index 90e07626..24bb67ba 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.cpp @@ -75,7 +75,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plStatusLog/plStatusLog.h" #endif -hsBool plAvBrainGeneric::fForce3rdPerson = true; +bool plAvBrainGeneric::fForce3rdPerson = true; const float plAvBrainGeneric::kDefaultFadeIn = 6.f; // 1/6th of a second to fade in const float plAvBrainGeneric::kDefaultFadeOut = 0.f; // instant fade out. @@ -218,7 +218,7 @@ void plAvBrainGeneric::Activate(plArmatureModBase *avMod) fAvMod->SetReverseFBOnIdle(true); } -hsBool plAvBrainGeneric::IsRunningTask() +bool plAvBrainGeneric::IsRunningTask() { if ( fStages->size() > 0 ) return true; @@ -242,9 +242,9 @@ bool plAvBrainGeneric::MatchAnimNames(const char *names[], int count) // Apply ---------------------------------------------------- // ------ -hsBool plAvBrainGeneric::Apply(double time, float elapsed) +bool plAvBrainGeneric::Apply(double time, float elapsed) { - hsBool result = false; + bool result = false; switch(fMode) { @@ -345,7 +345,7 @@ float plAvBrainGeneric::IGetAnimDelta(double time, float elapsed) plAnimStage::ForwardType forward = curStage->GetForwardType(); plAnimStage::BackType back = curStage->GetBackType(); bool fwdIsDown = (fReverseFBControlsOnRelease && fAvMod->IsFBReversed()) ? fAvMod->BackwardKeyDown() : fAvMod->ForwardKeyDown(); - hsBool backIsDown = (fReverseFBControlsOnRelease && fAvMod->IsFBReversed()) ? fAvMod->ForwardKeyDown() : fAvMod->BackwardKeyDown(); + bool backIsDown = (fReverseFBControlsOnRelease && fAvMod->IsFBReversed()) ? fAvMod->ForwardKeyDown() : fAvMod->BackwardKeyDown(); // forward with a key down gets top priority if(forward == plAnimStage::kForwardKey && fwdIsDown) @@ -372,14 +372,14 @@ float plAvBrainGeneric::IGetAnimDelta(double time, float elapsed) // IProcessNormal ------------------------------------------------- // --------------- -hsBool plAvBrainGeneric::IProcessNormal(double time, float elapsed) +bool plAvBrainGeneric::IProcessNormal(double time, float elapsed) { plAnimStage *curStage = (*fStages)[fCurStage]; if(curStage) { float animDelta = IGetAnimDelta(time, elapsed); // how far to move the anim (may be negative) float overage; - hsBool done = curStage->MoveRelative(time, animDelta, overage, fAvMod); + bool done = curStage->MoveRelative(time, animDelta, overage, fAvMod); if(done) { @@ -404,7 +404,7 @@ hsBool plAvBrainGeneric::IProcessNormal(double time, float elapsed) // IProcessFadeIn ------------------------------------------------- // --------------- -hsBool plAvBrainGeneric::IProcessFadeIn(double time, float elapsed) +bool plAvBrainGeneric::IProcessFadeIn(double time, float elapsed) { plAnimStage *curStage = (*fStages)[fCurStage]; @@ -437,7 +437,7 @@ hsBool plAvBrainGeneric::IProcessFadeIn(double time, float elapsed) // IProcessFadeOut ------------------------------------------------- // ---------------- -hsBool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed) +bool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed) { plAnimStage *curStage = (*fStages)[fCurStage]; @@ -478,7 +478,7 @@ hsBool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed) // ISwitchStages --------------------------------------------------------------------------------------------------- // -------------- -hsBool plAvBrainGeneric::ISwitchStages(int oldStageNum, int newStageNum, float delta, hsBool setTime, float newTime, +bool plAvBrainGeneric::ISwitchStages(int oldStageNum, int newStageNum, float delta, bool setTime, float newTime, float fadeNew, float fadeOld, double worldTime) { #ifdef DEBUG_MULTISTAGE @@ -549,9 +549,9 @@ void plAvBrainGeneric::IExitMoveMode() // MsgReceive ------------------------------------- // ----------- -hsBool plAvBrainGeneric::MsgReceive(plMessage *msg) +bool plAvBrainGeneric::MsgReceive(plMessage *msg) { - hsBool result = false; + bool result = false; plAvBrainGenericMsg *genMsg = plAvBrainGenericMsg::ConvertNoRef(msg); //plAvExitModeMsg *exitMsg = plAvExitModeMsg::ConvertNoRef(msg); @@ -589,11 +589,11 @@ hsBool plAvBrainGeneric::MsgReceive(plMessage *msg) // IHandleGenBrainMsg ----------------------------------------------------- // ------------------- -hsBool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg) +bool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg) { - hsBool setTime = msg->fSetTime; + bool setTime = msg->fSetTime; float newTime = msg->fNewTime; - hsBool setDirection = msg->fSetDirection; + bool setDirection = msg->fSetDirection; bool newDirection = msg->fNewDirection ? true : false; double worldTime = hsTimer::GetSysSeconds(); @@ -670,7 +670,7 @@ hsBool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg) return true; } -hsBool plAvBrainGeneric::IHandleTaskMsg(plAvTaskMsg *msg) +bool plAvBrainGeneric::IHandleTaskMsg(plAvTaskMsg *msg) { plAvTask *task = msg->GetTask(); plAvTaskBrain *brainTask = plAvTaskBrain::ConvertNoRef(task); @@ -782,7 +782,7 @@ void plAvBrainGeneric::Write(hsStream *stream, hsResMgr *mgr) stream->WriteLE32(fType); stream->WriteLE32(fExitFlags); stream->WriteByte(fMode); - stream->Writebool(fForward); + stream->WriteBool(fForward); if(fStartMessage) { stream->WriteBool(true); @@ -826,7 +826,7 @@ void plAvBrainGeneric::Read(hsStream *stream, hsResMgr *mgr) fType = static_cast(stream->ReadLE32()); fExitFlags = stream->ReadLE32(); fMode = static_cast(stream->ReadByte()); - fForward = stream->Readbool(); + fForward = stream->ReadBool(); if(stream->ReadBool()) { fStartMessage = plMessage::ConvertNoRef(mgr->ReadCreatable(stream)); @@ -854,7 +854,7 @@ void plAvBrainGeneric::Read(hsStream *stream, hsResMgr *mgr) // LeaveAge --------------------- // --------- -hsBool plAvBrainGeneric::LeaveAge() +bool plAvBrainGeneric::LeaveAge() { IExitMoveMode(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.h index 5677ee8e..4a719153 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainGeneric.h @@ -145,7 +145,7 @@ public: /** Virtual destructor */ virtual ~plAvBrainGeneric(); - static hsBool fForce3rdPerson; + static bool fForce3rdPerson; /** Attaches our current stage and takes control of the armature. Note that the brain may be in a "half-finished" state -- we may be receiving some @@ -154,7 +154,7 @@ public: virtual void Activate(plArmatureModBase *avMod); /** Advance the current stage and swap in a new stage if necessary. */ - virtual hsBool Apply(double timeNow, float elapsed); + virtual bool Apply(double timeNow, float elapsed); /** Remove all our stages and release control of the armature. */ virtual void Deactivate(); @@ -168,9 +168,9 @@ public: virtual bool RelayNotifyMsg(plNotifyMsg *msg); /** We're leaving the age. Clean up. */ - virtual hsBool LeaveAge(); + virtual bool LeaveAge(); - virtual hsBool IsRunningTask(); + virtual bool IsRunningTask(); /** Compare the names of the anims in our stages. Return true on a match (order matters). */ @@ -256,7 +256,7 @@ public: virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); // plasma protocol - hsBool MsgReceive(plMessage *msg); + bool MsgReceive(plMessage *msg); CLASSNAME_REGISTER( plAvBrainGeneric ); GETINTERFACE_ANY( plAvBrainGeneric, plArmatureBrain ); @@ -271,19 +271,19 @@ protected: // ///////////////////////////////////////////////////////////////////////////////////// - hsBool IHandleGenBrainMsg(const plAvBrainGenericMsg *msg); - hsBool IHandleTaskMsg(plAvTaskMsg *msg); + bool IHandleGenBrainMsg(const plAvBrainGenericMsg *msg); + bool IHandleTaskMsg(plAvTaskMsg *msg); bool IBrainIsCompatible(plAvBrainGeneric *otherBrain); float IGetAnimDelta(double time, float elapsed); // how far should we move our animation this frame? - hsBool IProcessNormal(double time, float elapsed); + bool IProcessNormal(double time, float elapsed); - hsBool IProcessFadeIn(double time, float elapsed); - hsBool IProcessFadeOut(double time, float elapsed); + bool IProcessFadeIn(double time, float elapsed); + bool IProcessFadeOut(double time, float elapsed); - hsBool ISwitchStages(int oldStage, int newStage, float delta, hsBool setTime, float newTime, + bool ISwitchStages(int oldStage, int newStage, float delta, bool setTime, float newTime, float fadeNew, float fadeOld, double worldTime); void IEnterMoveMode(double time); // we've just entered and we're about to begin animating. diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp index 7dd2ecca..cb2e4da9 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp @@ -98,7 +98,7 @@ plAvBrainHuman::TurnCurve plAvBrainHuman::fRunTurnCurve = plAvBrainHuman::kTurnE const float plAvBrainHuman::kAirTimePanicThreshold = 10; // seconds -void plAvBrainHuman::SetTimeToMaxTurn(float time, hsBool walk) +void plAvBrainHuman::SetTimeToMaxTurn(float time, bool walk) { if (walk) fWalkTimeToMaxTurn = time; @@ -106,12 +106,12 @@ void plAvBrainHuman::SetTimeToMaxTurn(float time, hsBool walk) fRunTimeToMaxTurn = time; } -float plAvBrainHuman::GetTimeToMaxTurn(hsBool walk) +float plAvBrainHuman::GetTimeToMaxTurn(bool walk) { return (walk ? fWalkTimeToMaxTurn : fRunTimeToMaxTurn); } -void plAvBrainHuman::SetMaxTurnSpeed(float radsPerSec, hsBool walk) +void plAvBrainHuman::SetMaxTurnSpeed(float radsPerSec, bool walk) { if (walk) fWalkMaxTurnSpeed = radsPerSec; @@ -119,12 +119,12 @@ void plAvBrainHuman::SetMaxTurnSpeed(float radsPerSec, hsBool walk) fRunMaxTurnSpeed = radsPerSec; } -float plAvBrainHuman::GetMaxTurnSpeed(hsBool walk) +float plAvBrainHuman::GetMaxTurnSpeed(bool walk) { return (walk ? fWalkMaxTurnSpeed : fRunMaxTurnSpeed); } -void plAvBrainHuman::SetTurnCurve(TurnCurve curve, hsBool walk) +void plAvBrainHuman::SetTurnCurve(TurnCurve curve, bool walk) { if (walk) fWalkTurnCurve = curve; @@ -132,7 +132,7 @@ void plAvBrainHuman::SetTurnCurve(TurnCurve curve, hsBool walk) fRunTurnCurve = curve; } -plAvBrainHuman::TurnCurve plAvBrainHuman::GetTurnCurve(hsBool walk) +plAvBrainHuman::TurnCurve plAvBrainHuman::GetTurnCurve(bool walk) { return (walk ? fWalkTurnCurve : fRunTurnCurve); } @@ -146,7 +146,7 @@ plAvBrainHuman::plAvBrainHuman(bool isActor /* = false */) : { } -hsBool plAvBrainHuman::Apply(double timeNow, float elapsed) +bool plAvBrainHuman::Apply(double timeNow, float elapsed) { #ifndef _DEBUG try @@ -188,7 +188,7 @@ void plAvBrainHuman::Activate(plArmatureModBase *avMod) plSceneObject *avSO = fAvMod->GetTarget(0); - hsBool isLocal = avSO->IsLocallyOwned(); + bool isLocal = avSO->IsLocallyOwned(); if (fAvMod->GetClothingOutfit() && fAvMod->GetClothingOutfit()->fGroup != plClothingMgr::kClothingBaseNoOptions) { @@ -366,7 +366,7 @@ void plAvBrainHuman::Resume() plArmatureBrain::Resume(); } -hsBool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg) +bool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg) { ControlEventCode moveCode = msg->GetControlCode(); @@ -432,7 +432,7 @@ void plAvBrainHuman::Read(hsStream *stream, hsResMgr *mgr) fIsActor = stream->ReadBool(); } -hsBool plAvBrainHuman::MsgReceive(plMessage * msg) +bool plAvBrainHuman::MsgReceive(plMessage * msg) { plControlEventMsg *ctrlMsg = plControlEventMsg::ConvertNoRef(msg); if (ctrlMsg) @@ -490,7 +490,7 @@ hsBool plAvBrainHuman::MsgReceive(plMessage * msg) return plArmatureBrain::MsgReceive(msg); } -hsBool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg) +bool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg) { bool isStartClimb = msg->fCommand == plClimbMsg::kStartClimbing; if(isStartClimb) @@ -596,7 +596,7 @@ float plAvBrainHuman::IGetTurnStrength(double timeNow) return result; } -hsBool plAvBrainHuman::IHandleTaskMsg(plAvTaskMsg *msg) +bool plAvBrainHuman::IHandleTaskMsg(plAvTaskMsg *msg) { if(plAvSeekMsg * seekM = plAvSeekMsg::ConvertNoRef(msg)) { @@ -727,9 +727,9 @@ void plAvBrainHuman::IChatOff() } } -hsBool plAvBrainHuman::IInitAnimations() +bool plAvBrainHuman::IInitAnimations() { - hsBool result = false; + bool result = false; plAGAnim *idle = fAvMod->FindCustomAnim("Idle"); plAGAnim *walk = fAvMod->FindCustomAnim("Walk"); @@ -821,7 +821,7 @@ hsBool plAvBrainHuman::IInitAnimations() return result; } -hsBool plAvBrainHuman::RunStandardBehaviors(double timeNow, float elapsed) +bool plAvBrainHuman::RunStandardBehaviors(double timeNow, float elapsed) { int i; for (i = 0; i < fBehaviors.GetCount(); i++) @@ -866,7 +866,7 @@ void plAvBrainHuman::Spawn(double timeNow) fAvMod->Compile(timeNow); } -hsBool plAvBrainHuman::LeaveAge() +bool plAvBrainHuman::LeaveAge() { plPhysicalControllerCore* controller = fAvMod->GetController(); if(!controller->BehavingLikeAnAnimatedPhysical()) @@ -958,7 +958,7 @@ plHBehavior::~plHBehavior() { } -void plHBehavior::Init(plAGAnim *anim, hsBool loop, plAvBrainHuman *brain, +void plHBehavior::Init(plAGAnim *anim, bool loop, plAvBrainHuman *brain, plArmatureMod *body, float fadeIn, float fadeOut, uint8_t index, uint32_t type /* = 0 */) { @@ -1008,7 +1008,7 @@ void Idle::IStart() } } -hsBool Run::PreCondition(double time, float elapsed) +bool Run::PreCondition(double time, float elapsed) { if (fAnim) { @@ -1019,7 +1019,7 @@ hsBool Run::PreCondition(double time, float elapsed) return false; } -hsBool Walk::PreCondition(double time, float elapsed) +bool Walk::PreCondition(double time, float elapsed) { if (fAnim) { @@ -1030,7 +1030,7 @@ hsBool Walk::PreCondition(double time, float elapsed) return false; } -hsBool WalkBack::PreCondition(double time, float elapsed) +bool WalkBack::PreCondition(double time, float elapsed) { if (fAnim) { @@ -1041,7 +1041,7 @@ hsBool WalkBack::PreCondition(double time, float elapsed) return false; } -hsBool StepLeft::PreCondition(double time, float elapsed) +bool StepLeft::PreCondition(double time, float elapsed) { if (fAnim) { @@ -1053,7 +1053,7 @@ hsBool StepLeft::PreCondition(double time, float elapsed) return false; } -hsBool StepRight::PreCondition(double time, float elapsed) +bool StepRight::PreCondition(double time, float elapsed) { if (fAnim) { @@ -1065,7 +1065,7 @@ hsBool StepRight::PreCondition(double time, float elapsed) return false; } -hsBool StandingTurnLeft::PreCondition(double time, float elapsed) +bool StandingTurnLeft::PreCondition(double time, float elapsed) { if (fAnim) { @@ -1078,7 +1078,7 @@ hsBool StandingTurnLeft::PreCondition(double time, float elapsed) return false; } -hsBool StandingTurnRight::PreCondition(double time, float elapsed) +bool StandingTurnRight::PreCondition(double time, float elapsed) { if (fAnim) { @@ -1097,7 +1097,7 @@ void MovingTurn::IStart() fHuBrain->SetStartedTurning(hsTimer::GetSysSeconds()); } -hsBool MovingTurnLeft::PreCondition(double time, float elapsed) +bool MovingTurnLeft::PreCondition(double time, float elapsed) { if (fAvMod->GetTurnStrength() > 0) { @@ -1108,7 +1108,7 @@ hsBool MovingTurnLeft::PreCondition(double time, float elapsed) return false; } -hsBool MovingTurnRight::PreCondition(double time, float elapsed) +bool MovingTurnRight::PreCondition(double time, float elapsed) { if (fAvMod->GetTurnStrength() < 0) { @@ -1134,7 +1134,7 @@ void Jump::IStop() plHBehavior::IStop(); } -hsBool StandingJump::PreCondition(double time, float elapsed) +bool StandingJump::PreCondition(double time, float elapsed) { if (fAnim) { @@ -1162,7 +1162,7 @@ hsBool StandingJump::PreCondition(double time, float elapsed) return false; } -hsBool WalkingJump::PreCondition(double time, float elapsed) +bool WalkingJump::PreCondition(double time, float elapsed) { if (fAnim) { @@ -1192,7 +1192,7 @@ hsBool WalkingJump::PreCondition(double time, float elapsed) return false; } -hsBool RunningJump::PreCondition(double time, float elapsed) +bool RunningJump::PreCondition(double time, float elapsed) { if (fAnim) { @@ -1233,7 +1233,7 @@ static const float kMinAirTime = .5f; RunningImpact::RunningImpact() : fDuration(0.0f) {} -hsBool RunningImpact::PreCondition(double time, float elapsed) +bool RunningImpact::PreCondition(double time, float elapsed) { if (fDuration > 0.0f) fDuration = fDuration - elapsed; @@ -1261,7 +1261,7 @@ void RunningImpact::IStop() GroundImpact::GroundImpact() : fDuration(0.0f) {} -hsBool GroundImpact::PreCondition(double time, float elapsed) +bool GroundImpact::PreCondition(double time, float elapsed) { bool result = false; @@ -1290,7 +1290,7 @@ void GroundImpact::IStop() plHBehavior::IStop(); } -hsBool Fall::PreCondition(double time, float elapsed) +bool Fall::PreCondition(double time, float elapsed) { return !fHuBrain->fCallbackAction->IsOnGround() && fHuBrain->fCallbackAction->HitGroundInThisAge(); } @@ -1340,7 +1340,7 @@ void Push::Process(double time, float elapsed) fHuBrain->fCallbackAction->SetTurnStrength(turnSpeed); } -//hsBool PushIdle::PreCondition(double time, float elapsed) +//bool PushIdle::PreCondition(double time, float elapsed) //{ // return (fHuBrain->fCallbackAction->GetPushingPhysical() && // fHuBrain->fCallbackAction->IsOnGround() && @@ -1348,7 +1348,7 @@ void Push::Process(double time, float elapsed) // && fAvMod->GetTurnStrength() == 0); //} -hsBool PushWalk::PreCondition(double time, float elapsed) +bool PushWalk::PreCondition(double time, float elapsed) { return (fHuBrain->fCallbackAction->GetPushingPhysical() && fHuBrain->fCallbackAction->GetFacingPushingPhysical() && fHuBrain->fCallbackAction->IsOnGround() && @@ -1421,7 +1421,7 @@ bool AvatarEmote(plArmatureMod *avatar, const char *emoteName) plString fullName = avatar->MakeAnimationName(emoteName); plAGAnim *anim = plAGAnim::FindAnim(fullName); plEmoteAnim *emote = plEmoteAnim::ConvertNoRef(anim); - hsBool alreadyActive = avatar->FindAnimInstance(fullName) != nil; + bool alreadyActive = avatar->FindAnimInstance(fullName) != nil; plAvBrainHuman *huBrain = plAvBrainHuman::ConvertNoRef(avatar->FindBrainByClass(plAvBrainHuman::Index())); // XXX diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.h index 2d093f8c..69a40717 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.h @@ -72,20 +72,20 @@ public: CLASSNAME_REGISTER( plAvBrainHuman ); GETINTERFACE_ANY( plAvBrainHuman, plArmatureBrain ); - virtual hsBool Apply(double timeNow, float elapsed); + virtual bool Apply(double timeNow, float elapsed); virtual void Activate(plArmatureModBase *avMod); virtual void Deactivate(); virtual void Suspend(); virtual void Resume(); virtual void Spawn(double timeNow); - virtual hsBool LeaveAge(); + virtual bool LeaveAge(); bool IsActor() const {return fIsActor;} void IsActor(bool isActor) {fIsActor = isActor;} bool IsMovementZeroBlend(); void TurnToPoint(hsPoint3 point); - hsBool RunStandardBehaviors(double timeNow, float elapsed); + bool RunStandardBehaviors(double timeNow, float elapsed); void SetStartedTurning(double when); virtual bool IsMovingForward(); // we're either walking or running. doesn't account for sliding. @@ -96,7 +96,7 @@ public: virtual void Write(hsStream *stream, hsResMgr *mgr); virtual void Read(hsStream *stream, hsResMgr *mgr); - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); // Hardwired Identifiers for all the canonical bones. @@ -154,12 +154,12 @@ public: kHuBehaviorMax, }; - static void SetTimeToMaxTurn(float time, hsBool walk); - static float GetTimeToMaxTurn(hsBool walk); - static void SetMaxTurnSpeed(float radsPerSec, hsBool walk); - static float GetMaxTurnSpeed(hsBool walk); - static void SetTurnCurve(TurnCurve curve, hsBool walk); - static TurnCurve GetTurnCurve(hsBool walk); + static void SetTimeToMaxTurn(float time, bool walk); + static float GetTimeToMaxTurn(bool walk); + static void SetMaxTurnSpeed(float radsPerSec, bool walk); + static float GetMaxTurnSpeed(bool walk); + static void SetTurnCurve(TurnCurve curve, bool walk); + static TurnCurve GetTurnCurve(bool walk); static const float kControlledFlightThreshold; static const float kAirTimeThreshold; @@ -168,15 +168,15 @@ public: protected: plAGAnim *FindCustomAnim(const char *baseName); - virtual hsBool IHandleControlMsg(plControlEventMsg *ctrlMsg); - virtual hsBool IHandleClimbMsg(plClimbMsg *msg); - virtual hsBool IHandleTaskMsg(plAvTaskMsg *msg); - virtual hsBool IInitAnimations(); + virtual bool IHandleControlMsg(plControlEventMsg *ctrlMsg); + virtual bool IHandleClimbMsg(plClimbMsg *msg); + virtual bool IHandleTaskMsg(plAvTaskMsg *msg); + virtual bool IInitAnimations(); virtual void IInitBoneMap(); float IGetTurnStrength(double timeNow); void IChatOn(); void IChatOff(); - hsBool IValidateAnimations(); + bool IValidateAnimations(); plAGModifier *fHandleAGMod; // the ag modifier that's attached to our top object double fStartedTurning; // when did we start turning? @@ -236,9 +236,9 @@ public: plHBehavior(); ~plHBehavior(); - void Init(plAGAnim *anim, hsBool loop, plAvBrainHuman *brain, plArmatureMod *body, + void Init(plAGAnim *anim, bool loop, plAvBrainHuman *brain, plArmatureMod *body, float fadeIn, float fadeOut, uint8_t index, uint32_t type = 0); - virtual hsBool PreCondition(double time, float elapsed) { return true; } + virtual bool PreCondition(double time, float elapsed) { return true; } uint32_t GetType() const { return fType; } protected: @@ -264,43 +264,43 @@ class Idle : public plHBehavior class Run : public plHBehavior { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class Walk : public plHBehavior { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class WalkBack : public plHBehavior { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class StepLeft : public plHBehavior { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class StepRight : public plHBehavior { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class StandingTurnLeft : public plHBehavior { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class StandingTurnRight : public plHBehavior { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class MovingTurn : public plHBehavior @@ -314,19 +314,19 @@ protected: class MovingTurnLeft : public MovingTurn { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class MovingTurnRight : public MovingTurn { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class Jump : public plHBehavior { protected: - hsBool fReleased; + bool fReleased; virtual void IStart(); virtual void IStop(); @@ -337,26 +337,26 @@ public: class StandingJump : public Jump { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class WalkingJump : public Jump { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class RunningJump : public Jump { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; class GroundImpact : public plHBehavior { public: GroundImpact(); - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); private: virtual void IStop(); @@ -367,7 +367,7 @@ class RunningImpact : public plHBehavior { public: RunningImpact(); - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); private: virtual void IStop(); @@ -377,7 +377,7 @@ private: class Fall : public plHBehavior { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); virtual void Process(double time, float elapsed); }; @@ -390,13 +390,13 @@ public: //class PushIdle : public Push //{ //public: -// virtual hsBool PreCondition(double time, float elapsed); +// virtual bool PreCondition(double time, float elapsed); //}; class PushWalk : public Push { public: - virtual hsBool PreCondition(double time, float elapsed); + virtual bool PreCondition(double time, float elapsed); }; bool PushSimpleMultiStage(plArmatureMod *avatar, const char *enterAnim, const char *idleAnim, diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.cpp index f10bc7b8..d07ce063 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.cpp @@ -72,7 +72,7 @@ void plAvBrainRideAnimatedPhysical::Deactivate() { plArmatureBrain::Deactivate(); } -hsBool plAvBrainRideAnimatedPhysical::MsgReceive(plMessage *msg) +bool plAvBrainRideAnimatedPhysical::MsgReceive(plMessage *msg) { plRideAnimatedPhysMsg *ride = plRideAnimatedPhysMsg::ConvertNoRef(msg); if(ride) @@ -88,9 +88,9 @@ hsBool plAvBrainRideAnimatedPhysical::MsgReceive(plMessage *msg) } return plArmatureBrain::MsgReceive(msg); } -hsBool plAvBrainRideAnimatedPhysical::IInitAnimations() +bool plAvBrainRideAnimatedPhysical::IInitAnimations() { - hsBool result = false; + bool result = false; plAGAnim *idle = fAvMod->FindCustomAnim("Idle"); plAGAnim *walk = fAvMod->FindCustomAnim("Walk"); @@ -180,11 +180,11 @@ hsBool plAvBrainRideAnimatedPhysical::IInitAnimations() } return result; } -hsBool plAvBrainRideAnimatedPhysical::LeaveAge() +bool plAvBrainRideAnimatedPhysical::LeaveAge() { return plArmatureBrain::LeaveAge(); } -hsBool plAvBrainRideAnimatedPhysical::Apply(double timeNow, float elapsed) +bool plAvBrainRideAnimatedPhysical::Apply(double timeNow, float elapsed) { if(this->fMode==kAbort) return false; else return plAvBrainHuman::Apply(timeNow, elapsed); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.h index d3eb0817..c1c3f578 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainRideAnimatedPhysical.h @@ -56,10 +56,10 @@ public: ~plAvBrainRideAnimatedPhysical(); virtual void Activate(plArmatureModBase *avMod); virtual void Deactivate(); - virtual hsBool MsgReceive(plMessage *msg); - virtual hsBool LeaveAge(); - virtual hsBool Apply(double timeNow, float elapsed); + virtual bool MsgReceive(plMessage *msg); + virtual bool LeaveAge(); + virtual bool Apply(double timeNow, float elapsed); protected: - hsBool IInitAnimations(); + bool IInitAnimations(); mode fMode; }; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainStaticNPC.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainStaticNPC.cpp index 887fb3a8..51851657 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainStaticNPC.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainStaticNPC.cpp @@ -70,28 +70,28 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // still have effect on the armature; any messages which the top // brain doesn't handle will propagate down to the next brain in line. // */ -// virtual hsBool Activate(plArmatureMod *avMod); +// virtual bool Activate(plArmatureMod *avMod); // // /** Has the brain resolved all its load-time dependencies? This is a mechanism // to allow newly loading creatures to reach a known state before they // are asked to load secondary state or to interact with the environment. // */ -// virtual hsBool IsReady(); +// virtual bool IsReady(); // // /** This brain has just been removed from its armature and is about to be destructed. */ -// virtual hsBool Deactivate(); +// virtual bool Deactivate(); // // /** This is the top brain and it's time for it to evaluate. Called during eval // time for the armature modifier. Only the topmost brain gets an apply // call; others must do any necessary background work during MsgReceive. */ -// virtual hsBool Apply(double timeNow, hsScalar elapsed); +// virtual bool Apply(double timeNow, hsScalar elapsed); // // /** Another brain has been pushed atop this brain. Drop into the background. // We'll still receive any messages that the upper brain doesn't eat. */ -// virtual hsBool Suspend(); +// virtual bool Suspend(); // // /** We were suspended, but now we're on top of the brain stack again. */ -// virtual hsBool Resume(); +// virtual bool Resume(); // // // \name Spawning \{ // /** Do any necessary custom action upon spawning afresh in a new age. @@ -100,7 +100,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // virtual void Spawn(double timeNow) {}; // // /** Custom behavior for entering an age. Binding the camera, audio source, etc. */ -// virtual void EnterAge(hsBool reSpawn) {}; +// virtual void EnterAge(bool reSpawn) {}; // // /** Custom behavior for leaving an age. Free any attachments to camera, audio, etc. */ // virtual void LeaveAge() {}; @@ -127,7 +127,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // virtual void SaveAux(hsStream *stream, hsResMgr *mgr); // virtual void LoadAux(hsStream *stream, hsResMgr *mgr, double time); // -// virtual hsBool MsgReceive(plMessage *msg); +// virtual bool MsgReceive(plMessage *msg); // // //protected: @@ -139,9 +139,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // plAvTaskQueue fTaskQueue; // FIFO queue of tasks we're working on // plAvTask *fCurTask; // the task we're working on right now // // -- methods -// virtual hsBool IHandleTaskMsg(plAvTaskMsg *msg); // respond to a task scheduling message +// virtual bool IHandleTaskMsg(plAvTaskMsg *msg); // respond to a task scheduling message // void IProcessTasks(double time, hsScalar elapsed); // process current task and start new one if necessary // -// hsBool fSuspended; +// bool fSuspended; //}; // diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp index 59ab447b..b447d820 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.cpp @@ -91,14 +91,14 @@ public: plSwimBehavior() : fAvMod(nil), fSwimBrain(nil) {} virtual ~plSwimBehavior() {} - void Init(plAGAnim *anim, hsBool loop, plAvBrainSwim *brain, plArmatureMod *body, uint8_t index) + void Init(plAGAnim *anim, bool loop, plAvBrainSwim *brain, plArmatureMod *body, uint8_t index) { plArmatureBehavior::Init(anim, loop, brain, body, index); fAvMod = body; fSwimBrain = brain; } - virtual hsBool PreCondition(double time, float elapsed) { return true; } + virtual bool PreCondition(double time, float elapsed) { return true; } protected: virtual void IStart() @@ -121,7 +121,7 @@ class SwimForward: public plSwimBehavior { public: /** Walk key is down, fast key is not down */ - virtual hsBool PreCondition(double time, float elapsed) + virtual bool PreCondition(double time, float elapsed) { return (fAvMod->ForwardKeyDown() && !fAvMod->FastKeyDown()); } @@ -130,7 +130,7 @@ public: class SwimForwardFast: public plSwimBehavior { public: - virtual hsBool PreCondition(double time, float elapsed) + virtual bool PreCondition(double time, float elapsed) { return (fAvMod->ForwardKeyDown() && fAvMod->FastKeyDown()); } @@ -139,7 +139,7 @@ public: class SwimBack : public plSwimBehavior { public: - virtual hsBool PreCondition(double time, float elapsed) + virtual bool PreCondition(double time, float elapsed) { return (fAvMod->BackwardKeyDown()); } @@ -152,7 +152,7 @@ class TreadWater: public plSwimBehavior class SwimLeft : public plSwimBehavior { public: - virtual hsBool PreCondition(double time, float elapsed) + virtual bool PreCondition(double time, float elapsed) { return ((fAvMod->StrafeLeftKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnLeftKeyDown())) && !(fAvMod->StrafeRightKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnRightKeyDown())) && @@ -163,7 +163,7 @@ public: class SwimRight : public plSwimBehavior { public: - virtual hsBool PreCondition(double time, float elapsed) + virtual bool PreCondition(double time, float elapsed) { return ((fAvMod->StrafeRightKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnRightKeyDown())) && !(fAvMod->StrafeLeftKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnLeftKeyDown())) && @@ -199,7 +199,7 @@ public: class SwimTurnLeft : public SwimTurn { public: - virtual hsBool PreCondition(double time, float elapsed) + virtual bool PreCondition(double time, float elapsed) { return (fAvMod->GetTurnStrength() > 0 && (fAvMod->ForwardKeyDown() || fAvMod->BackwardKeyDown())); } @@ -208,7 +208,7 @@ public: class SwimTurnRight : public SwimTurn { public: - virtual hsBool PreCondition(double time, float elapsed) + virtual bool PreCondition(double time, float elapsed) { return (fAvMod->GetTurnStrength() < 0 && (fAvMod->ForwardKeyDown() || fAvMod->BackwardKeyDown())); } @@ -217,7 +217,7 @@ public: class TreadTurnLeft : public plSwimBehavior { public: - virtual hsBool PreCondition(double time, float elapsed) + virtual bool PreCondition(double time, float elapsed) { return (fAvMod->TurnLeftKeyDown() && !fAvMod->ForwardKeyDown() && !fAvMod->BackwardKeyDown()); } @@ -226,7 +226,7 @@ public: class TreadTurnRight : public plSwimBehavior { public: - virtual hsBool PreCondition(double time, float elapsed) + virtual bool PreCondition(double time, float elapsed) { return (fAvMod->TurnRightKeyDown() && !fAvMod->ForwardKeyDown() && !fAvMod->BackwardKeyDown()); } @@ -263,7 +263,7 @@ plAvBrainSwim::~plAvBrainSwim() delete fBehaviors[i]; } -hsBool plAvBrainSwim::Apply(double time, float elapsed) +bool plAvBrainSwim::Apply(double time, float elapsed) { IProbeSurface(); if (fMode == kWalking) @@ -328,7 +328,7 @@ hsBool plAvBrainSwim::Apply(double time, float elapsed) return plArmatureBrain::Apply(time, elapsed); } -hsBool plAvBrainSwim::MsgReceive(plMessage *msg) +bool plAvBrainSwim::MsgReceive(plMessage *msg) { plLOSHitMsg *losHit = plLOSHitMsg::ConvertNoRef(msg); if (losHit) @@ -495,7 +495,7 @@ void plAvBrainSwim::IStartSwimming(bool is2D) } } -hsBool plAvBrainSwim::IProcessSwimming2D(double time, float elapsed) +bool plAvBrainSwim::IProcessSwimming2D(double time, float elapsed) { int i; for (i = 0; i < fBehaviors.GetCount(); i++) @@ -515,13 +515,13 @@ hsBool plAvBrainSwim::IProcessSwimming2D(double time, float elapsed) return true; } -hsBool plAvBrainSwim::IProcessSwimming3D(double time, float elapsed) +bool plAvBrainSwim::IProcessSwimming3D(double time, float elapsed) { fAvMod->ApplyAnimations(time, elapsed); return true; } -hsBool plAvBrainSwim::IInitAnimations() +bool plAvBrainSwim::IInitAnimations() { plAGAnim *treadWater = fAvMod->FindCustomAnim("SwimIdle"); plAGAnim *swimForward = fAvMod->FindCustomAnim("SwimSlow"); @@ -631,7 +631,7 @@ void plAvBrainSwim::IProbeSurface() fSurfaceProbeMsg->SendAndKeep(); } -hsBool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg) +bool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg) { ControlEventCode moveCode = msg->GetControlCode(); if (msg->ControlActivated()) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.h index 3d41dc5f..d3eec23d 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvBrainSwim.h @@ -62,12 +62,12 @@ public: GETINTERFACE_ANY( plAvBrainSwim, plArmatureBrain ); virtual void Activate(plArmatureModBase *avMod); - hsBool Apply(double time, float elapsed); + bool Apply(double time, float elapsed); virtual void Deactivate(); virtual void Suspend(); virtual void Resume(); virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt); - hsBool MsgReceive(plMessage *msg); + bool MsgReceive(plMessage *msg); bool IsWalking(); bool IsWading(); bool IsSwimming(); @@ -79,17 +79,17 @@ public: protected: void IStartWading(); void IStartSwimming(bool is2D); - hsBool IProcessSwimming2D(double time, float elapsed); - hsBool IProcessSwimming3D(double time, float elapsed); - hsBool IProcessWading(double time, float elapsed); - hsBool IProcessClimbingOut(double time, float elapsed); - hsBool IProcessBehaviors(double time, float elapsed); + bool IProcessSwimming2D(double time, float elapsed); + bool IProcessSwimming3D(double time, float elapsed); + bool IProcessWading(double time, float elapsed); + bool IProcessClimbingOut(double time, float elapsed); + bool IProcessBehaviors(double time, float elapsed); - virtual hsBool IInitAnimations(); + virtual bool IInitAnimations(); bool IAttachAction(); bool IDetachAction(); void IProbeSurface(); - hsBool IHandleControlMsg(plControlEventMsg* msg); + bool IHandleControlMsg(plControlEventMsg* msg); float IGetTargetZ(); float fSurfaceDistance; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.cpp index f784ace5..76e22f5f 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.cpp @@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plPhysicalControllerCore.h" // Generic geom utils. -static hsBool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat); +static bool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat); static void AngularVelocity(float &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat); static float AngleRad2d (float x1, float y1, float x3, float y3); inline hsVector3 GetYAxis(hsMatrix44 &mat) @@ -66,7 +66,7 @@ plAnimatedController::plAnimatedController(plSceneObject* rootObject, plAGApplic { } -void plAnimatedController::RecalcVelocity(double timeNow, double timePrev, hsBool useAnim /* = true */) +void plAnimatedController::RecalcVelocity(double timeNow, double timePrev, bool useAnim /* = true */) { if (useAnim) { @@ -120,7 +120,7 @@ plWalkingController::plWalkingController(plSceneObject* rootObject, plAGApplicat fWalkingStrategy = nil; } -void plWalkingController::RecalcVelocity(double timeNow, double timePrev, hsBool useAnim) +void plWalkingController::RecalcVelocity(double timeNow, double timePrev, bool useAnim) { if (!fHitGroundInThisAge && fController && fController->IsEnabled() && fWalkingStrategy->IsOnGround()) fHitGroundInThisAge = true; // if we're not pinned and we're not in an age yet, we are now. @@ -215,9 +215,9 @@ void plWalkingController::Update() // double elapsed = time.asDouble() - getRefresh().asDouble(); // setRefresh(time); // -// hsBool isPhysical = !fPhysical->GetProperty(plSimulationInterface::kPinned); +// bool isPhysical = !fPhysical->GetProperty(plSimulationInterface::kPinned); // const Havok::Vector3 straightUp(0.0f, 0.0f, 1.0f); -// hsBool alreadyInAge = fHitGroundInThisAge; +// bool alreadyInAge = fHitGroundInThisAge; // // int numContacts = fPhysical->GetNumContacts(); // bool ground = false; @@ -490,7 +490,7 @@ static float AngleRad2d ( float x1, float y1, float x3, float y3 ) return value; } -static hsBool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat) +static bool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat) { bool result = false; @@ -531,7 +531,7 @@ static hsBool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prev float yfabs = fabs(prev2Now.fY); float zfabs = fabs(prev2Now.fZ); static const float maxVel = 20.0f; - hsBool valid = xfabs < maxVel && yfabs < maxVel && zfabs < maxVel; + bool valid = xfabs < maxVel && yfabs < maxVel && zfabs < maxVel; if (valid) { @@ -552,13 +552,13 @@ static void AngularVelocity(float &outputV, float elapsed, hsMatrix44 &prevMat, hsVector3 curForward = GetYAxis(curMat); float angleSincePrev = AngleRad2d(curForward.fX, curForward.fY, prevForward.fX, prevForward.fY); - hsBool sincePrevSign = angleSincePrev > 0.0f; + bool sincePrevSign = angleSincePrev > 0.0f; if (angleSincePrev > M_PI) angleSincePrev = angleSincePrev - TWO_PI; const hsVector3 startForward = hsVector3(0, -1.0, 0); // the Y orientation of a "resting" armature.... float angleSinceStart = AngleRad2d(curForward.fX, curForward.fY, startForward.fX, startForward.fY); - hsBool sinceStartSign = angleSinceStart > 0.0f; + bool sinceStartSign = angleSinceStart > 0.0f; if (angleSinceStart > M_PI) angleSinceStart = angleSinceStart - TWO_PI; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.h index 7c78dcf7..3462ca08 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvCallbackAction.h @@ -132,7 +132,7 @@ class plAnimatedController : public plAvatarController public: plAnimatedController(plSceneObject* rootObject, plAGApplicator* rootApp, plPhysicalControllerCore* controller); - virtual void RecalcVelocity(double timeNow, double timePrev, hsBool useAnim = true); + virtual void RecalcVelocity(double timeNow, double timePrev, bool useAnim = true); void SetTurnStrength(float val) { fTurnStr = val; } float GetTurnStrength() { return fTurnStr; } virtual void ActivateController()=0; @@ -150,7 +150,7 @@ class plWalkingController : public plAnimatedController public: plWalkingController(plSceneObject* rootObject, plAGApplicator* rootApp, plPhysicalControllerCore* controller); virtual ~plWalkingController(); - virtual void RecalcVelocity(double timeNow, double timePrev, hsBool useAnim = true); + virtual void RecalcVelocity(double timeNow, double timePrev, bool useAnim = true); void Reset(bool newAge); bool IsControlledFlight() const { return fControlledFlight != 0; } @@ -199,8 +199,8 @@ public : fSwimmingStrategy->SetSurface(region,surfaceHeight); } float GetBuoyancy() { return fSwimmingStrategy->GetBuoyancy(); } - hsBool IsOnGround() { return fSwimmingStrategy->IsOnGround(); } - hsBool HadContacts() { return fSwimmingStrategy->HadContacts();} + bool IsOnGround() { return fSwimmingStrategy->IsOnGround(); } + bool HadContacts() { return fSwimmingStrategy->HadContacts();} void Enable(bool en){if (fController) fController->Enable(en);} plPhysicalControllerCore* GetController(){return fController;} virtual void ActivateController(){fSwimmingStrategy->RefreshConnectionToControllerCore();} diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp index 626329aa..f1ef12f5 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.cpp @@ -164,7 +164,7 @@ void plAvLadderMod::ITriggerSelf(plKey avKey) } // MSGRECEIVE -hsBool plAvLadderMod::MsgReceive(plMessage* msg) +bool plAvLadderMod::MsgReceive(plMessage* msg) { // Avatar is entering or exiting our detector box plCollideMsg* collMsg = plCollideMsg::ConvertNoRef(msg); @@ -337,8 +337,8 @@ void plAvLadderMod::Read(hsStream *stream, hsResMgr *mgr) fType = stream->ReadLE32(); fLoops = stream->ReadLE32(); - fGoingUp = stream->Readbool(); - fEnabled = stream->Readbool(); + fGoingUp = stream->ReadBool(); + fEnabled = stream->ReadBool(); fLadderView.fX = stream->ReadLEScalar(); fLadderView.fY = stream->ReadLEScalar(); fLadderView.fZ = stream->ReadLEScalar(); @@ -350,7 +350,7 @@ void plAvLadderMod::Write(hsStream *stream, hsResMgr *mgr) stream->WriteLE32(fType); stream->WriteLE32(fLoops); - stream->Writebool(fGoingUp); + stream->WriteBool(fGoingUp); stream->WriteBool(fEnabled); stream->WriteLEScalar(fLadderView.fX); stream->WriteLEScalar(fLadderView.fY); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.h index 42a710fa..892b3c8c 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvLadderModifier.h @@ -61,7 +61,7 @@ public: GETINTERFACE_ANY( plAvLadderMod, plSingleModifier ); // virtual void AddTarget(plSceneObject* so) { SetTarget(so); } - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); @@ -78,7 +78,7 @@ public: void SetEnabled(bool enabled) { fEnabled = enabled; } protected: - virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;} + virtual bool IEval(double secs, float del, uint32_t dirty) {return true;} bool IIsReadyToClimb(); void ITriggerSelf(plKey avKey); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvTask.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvTask.h index 4c051cc9..d515c679 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvTask.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvTask.h @@ -82,11 +82,11 @@ public: /** Start the task: set up initial conditions or wait for resources to become available. Start will be called repeatedly until it returns true, indicating the task has begun. */ - virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); /** Run the task. Start is guaranteed to have returned true before Process() is called even once. Returns false when the task has finished and epilogue code has been executed. */ - virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); /** Clean up the task. This is guaranteed to be called when Process returns false. */ virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.cpp index 66704c98..037390c3 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.cpp @@ -75,7 +75,7 @@ plAvTaskBrain::~plAvTaskBrain() // Start ------------------------------------------------------------------------------------------ // ------ -hsBool plAvTaskBrain::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvTaskBrain::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { if(fBrain) avatar->PushBrain(fBrain); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.h index 62571017..2f9fb86d 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskBrain.h @@ -71,7 +71,7 @@ public: virtual ~plAvTaskBrain(); // task protocol - virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); /** dump descriptive stuff to the given debug text */ diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp index c6964bf9..a6ef5409 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp @@ -89,7 +89,7 @@ void MakeMatrixUpright(hsMatrix44 &mat); #define kDefaultMaxSidleRange 4.0f #define kDefaultMaxSidleAngle 0.2f -hsBool plAvTaskSeek::fLogProcess = false; +bool plAvTaskSeek::fLogProcess = false; ///////////////////////////////////////////////////////////////////////////////////////// // @@ -203,7 +203,7 @@ void plAvTaskSeek::SetTarget(hsPoint3 &pos, hsPoint3 &lookAt) // Start ----------------------------------------------------------------------------------------- // ------ -hsBool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { plAvBrainHuman *huBrain = plAvBrainHuman::ConvertNoRef(brain); hsAssert(huBrain, "Seek task only works on human brains"); @@ -243,7 +243,7 @@ hsBool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double // Process ------------------------------------------------------------------------------------------- // -------- -hsBool plAvTaskSeek::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvTaskSeek::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { if (fState == kSeekAbort) return false; @@ -257,7 +257,7 @@ hsBool plAvTaskSeek::Process(plArmatureMod *avatar, plArmatureBrain *brain, doub } IAnalyze(avatar); - hsBool result = IMoveTowardsGoal(avatar, uBrain, time, elapsed); + bool result = IMoveTowardsGoal(avatar, uBrain, time, elapsed); if (fLogProcess) DumpToAvatarLog(avatar); return result; @@ -311,7 +311,7 @@ void plAvTaskSeek::LeaveAge(plArmatureMod *avatar) // IAnalyze ---------------------------------------- // --------- -hsBool plAvTaskSeek::IAnalyze(plArmatureMod *avatar) +bool plAvTaskSeek::IAnalyze(plArmatureMod *avatar) { avatar->GetPositionAndRotationSim(&fPosition, &fRotation); hsScalarTriple tmp(fSeekPos - fPosition); @@ -350,7 +350,7 @@ hsBool plAvTaskSeek::IAnalyze(plArmatureMod *avatar) // IMoveTowardsGoal -------------------------------------------------------------- // ----------------- -hsBool plAvTaskSeek::IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain, +bool plAvTaskSeek::IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed) { bool stillRunning = true; @@ -438,7 +438,7 @@ hsBool plAvTaskSeek::IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *bra // ITRYFINISH bool plAvTaskSeek::ITryFinish(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed) { - hsBool animsDone = brain->IsMovementZeroBlend(); + bool animsDone = brain->IsMovementZeroBlend(); hsPoint3 newPosition = fPosition; hsQuat newRotation = fRotation; @@ -457,7 +457,7 @@ bool plAvTaskSeek::ITryFinish(plArmatureMod *avatar, plAvBrainHuman *brain, doub return fStillPositioning || fStillRotating || !animsDone; } -hsBool plAvTaskSeek::IFinishPosition(hsPoint3 &newPosition, +bool plAvTaskSeek::IFinishPosition(hsPoint3 &newPosition, plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed) { @@ -493,7 +493,7 @@ hsBool plAvTaskSeek::IFinishPosition(hsPoint3 &newPosition, // IFinishRotation -------------------------------------- // ---------------- -hsBool plAvTaskSeek::IFinishRotation(hsQuat &newRotation, +bool plAvTaskSeek::IFinishRotation(hsQuat &newRotation, plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed) { @@ -504,7 +504,7 @@ hsBool plAvTaskSeek::IFinishRotation(hsQuat &newRotation, // IUpdateObjective ---------------------------------------- // ----------------- -hsBool plAvTaskSeek::IUpdateObjective(plArmatureMod *avatar) +bool plAvTaskSeek::IUpdateObjective(plArmatureMod *avatar) { // This is an entirely valid case. It just means our goal is fixed. if (fSeekObject == nil) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h index 964c0456..5a0012da 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.h @@ -56,7 +56,7 @@ class plSceneObject; class plAvTaskSeek : public plAvTask { public: - static hsBool fLogProcess; + static bool fLogProcess; enum State { kSeekRunNormal, @@ -82,12 +82,12 @@ public: /** Initiate the task; make sure we're running on the right type of brain, save off user input state, and turn off any other running behaviors.*/ - virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); /** Progress towards the goal using a combination of walking and cheating-via-sliding. Returns true if we're still working on it; false if we're done. */ - virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); /** Restore user input state, etc. */ virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); @@ -116,27 +116,27 @@ protected: /** Make some observations about our current relation to our target. Done every frame. */ - hsBool IAnalyze(plArmatureMod *avatar); + bool IAnalyze(plArmatureMod *avatar); /** Progress towards the goal. We get as close as we can by just pushing the same buttons as the user (forward, turn, etc.) when we're really close we slide around a bit so we can wind up on the *exact* initial orientation. */ - hsBool IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed); + bool IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed); /** Okay, we're in the pure cheating mode now. Try to wrap it up; returns true when it's finally there. */ bool ITryFinish(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed); /** Final cheating for position */ - hsBool IFinishPosition(hsPoint3 &newPosition, plArmatureMod *avatar, plAvBrainHuman *brain, + bool IFinishPosition(hsPoint3 &newPosition, plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed); /** Final cheating for rotation */ - hsBool IFinishRotation(hsQuat &newRotation, plArmatureMod *avatar, plAvBrainHuman *brain, + bool IFinishRotation(hsQuat &newRotation, plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed); /** If our target's moving, cache its new position and orientation for later math */ - hsBool IUpdateObjective(plArmatureMod *avatar); + bool IUpdateObjective(plArmatureMod *avatar); ///////////////////////////////////////////////////////////////////////////////////// // @@ -163,11 +163,11 @@ protected: // These are set to true once we EVER get close enough to the goal, so that if we fall out // of range from the anim blend out, we don't later try and correct again, and get in a fun // little back-and-forth loop. - hsBool fPosGoalHit; - hsBool fRotGoalHit; + bool fPosGoalHit; + bool fRotGoalHit; - hsBool fStillPositioning; // haven't yet reached the final position - hsBool fStillRotating; // haven't yet reached the final orientation + bool fStillPositioning; // haven't yet reached the final position + bool fStillRotating; // haven't yet reached the final orientation hsVector3 fGoalVec; // vec from us to the goal float fDistance; // how far to the goal? diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp index 83a2da7e..c65da421 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp @@ -111,7 +111,7 @@ plClothingItem::~plClothingItem() delete [] fAccessoryName; } -hsBool plClothingItem::CanWearWith(plClothingItem *item) +bool plClothingItem::CanWearWith(plClothingItem *item) { // For now, you can only wear one shirt, one pair of pants, etc. // Except accessories, of which you're allowed one per tileset. @@ -121,7 +121,7 @@ hsBool plClothingItem::CanWearWith(plClothingItem *item) //&& item->fTileset != fTileset)); } -hsBool plClothingItem::WearBefore(plClothingItem *item) +bool plClothingItem::WearBefore(plClothingItem *item) { // Accessories come last // Face comes first @@ -142,7 +142,7 @@ hsBool plClothingItem::WearBefore(plClothingItem *item) return myPri < otherPri; } -hsBool plClothingItem::HasBaseAlpha() +bool plClothingItem::HasBaseAlpha() { int i; for (i = 0; i < fElements.GetCount(); i++) @@ -155,7 +155,7 @@ hsBool plClothingItem::HasBaseAlpha() return false; } -hsBool plClothingItem::HasSameMeshes(plClothingItem *other) +bool plClothingItem::HasSameMeshes(plClothingItem *other) { int i; for (i = 0; i < kMaxNumLODLevels; i++) @@ -293,7 +293,7 @@ void plClothingItem::Write(hsStream *s, hsResMgr *mgr) } } -hsBool plClothingItem::MsgReceive(plMessage* msg) +bool plClothingItem::MsgReceive(plMessage* msg) { plElementRefMsg *eMsg = plElementRefMsg::ConvertNoRef(msg); if (eMsg) @@ -371,7 +371,7 @@ hsBool plClothingItem::MsgReceive(plMessage* msg) ///////////////////////////////////////////////////////////////////////////// -hsBool plClosetItem::IsMatch(plClosetItem *other) +bool plClosetItem::IsMatch(plClosetItem *other) { return (fItem == other->fItem && fOptions.IsMatch(&other->fOptions)); } @@ -407,7 +407,7 @@ void plClothingBase::Write(hsStream* s, hsResMgr* mgr) s->WriteSafeString(fLayoutName); } -hsBool plClothingBase::MsgReceive(plMessage* msg) +bool plClothingBase::MsgReceive(plMessage* msg) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg); if (refMsg) @@ -450,7 +450,7 @@ plClothingOutfit::~plClothingOutfit() plgDispatch::Dispatch()->UnRegisterForExactType(plPreResourceMsg::Index(), GetKey()); } -void plClothingOutfit::AddItem(plClothingItem *item, hsBool update /* = true */, hsBool broadcast /* = true */, hsBool netForce /* = false */) +void plClothingOutfit::AddItem(plClothingItem *item, bool update /* = true */, bool broadcast /* = true */, bool netForce /* = false */) { if (fItems.Find(item) != fItems.kMissingIndex) return; @@ -483,7 +483,7 @@ void plClothingOutfit::ForceUpdate(bool retry) msg->Send(GetKey()); } -void plClothingOutfit::RemoveItem(plClothingItem *item, hsBool update /* = true */, hsBool netForce /* = false */) +void plClothingOutfit::RemoveItem(plClothingItem *item, bool update /* = true */, bool netForce /* = false */) { if (fItems.Find(item) == fItems.kMissingIndex) return; @@ -502,8 +502,8 @@ void plClothingOutfit::RemoveItem(plClothingItem *item, hsBool update /* = true } void plClothingOutfit::TintItem(plClothingItem *item, float red, float green, float blue, - hsBool update /* = true */, hsBool broadcast /* = true */, hsBool netForce /* = false */, - hsBool retry /* = true */, uint8_t layer /* = kLayerTint1 */) + bool update /* = true */, bool broadcast /* = true */, bool netForce /* = false */, + bool retry /* = true */, uint8_t layer /* = kLayerTint1 */) { plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); @@ -526,7 +526,7 @@ void plClothingOutfit::TintItem(plClothingItem *item, float red, float green, fl } void plClothingOutfit::TintSkin(float red, float green, float blue, - hsBool update /* = true */, hsBool broadcast /* = true */) + bool update /* = true */, bool broadcast /* = true */) { plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); @@ -541,7 +541,7 @@ void plClothingOutfit::TintSkin(float red, float green, float blue, } void plClothingOutfit::MorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight, - hsBool retry /* = true */) + bool retry /* = true */) { plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); @@ -555,12 +555,12 @@ void plClothingOutfit::MorphItem(plClothingItem *item, uint8_t layer, uint8_t de plgDispatch::MsgSend(msg); } -void plClothingOutfit::SetAge(float age, hsBool update /* = true */, hsBool broadcast /* = true */) +void plClothingOutfit::SetAge(float age, bool update /* = true */, bool broadcast /* = true */) { SetSkinBlend(age, plClothingElement::kLayerSkinBlend1, update, broadcast); } -void plClothingOutfit::SetSkinBlend(float blend, uint8_t layer, hsBool update /* = true */, hsBool broadcast /* = true */) +void plClothingOutfit::SetSkinBlend(float blend, uint8_t layer, bool update /* = true */, bool broadcast /* = true */) { plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); @@ -661,7 +661,7 @@ void plClothingOutfit::IRemoveItem(plClothingItem *item) } } -hsBool plClothingOutfit::ITintItem(plClothingItem *item, hsColorRGBA color, uint8_t layer) +bool plClothingOutfit::ITintItem(plClothingItem *item, hsColorRGBA color, uint8_t layer) { uint32_t index = fItems.Find(item); if (index != fItems.kMissingIndex) @@ -711,7 +711,7 @@ hsColorRGBA plClothingOutfit::GetItemTint(plClothingItem *item, uint8_t layer /* return color; } -hsBool plClothingOutfit::IMorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight) +bool plClothingOutfit::IMorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight) { uint32_t index = fItems.Find(item); if (index != fItems.kMissingIndex) @@ -846,7 +846,7 @@ void plClothingOutfit::ReadFromVault() rvn->DecRef(); } -void plClothingOutfit::SaveCustomizations(hsBool retry /* = true */) +void plClothingOutfit::SaveCustomizations(bool retry /* = true */) { plClothingMsg *msg = new plClothingMsg(); msg->AddReceiver(GetKey()); @@ -1180,9 +1180,9 @@ void plClothingOutfit::WearRandomOutfit() TintSkin(sRandom.RandZeroToOne(), sRandom.RandZeroToOne(), sRandom.RandZeroToOne()); } -hsBool plClothingOutfit::ReadItems(hsStream* s, hsResMgr* mgr, hsBool broadcast /* = true */) +bool plClothingOutfit::ReadItems(hsStream* s, hsResMgr* mgr, bool broadcast /* = true */) { - hsBool result = true; + bool result = true; uint32_t numItems = s->ReadLE32(); int i; for (i = 0; i < numItems; i++) @@ -1223,7 +1223,7 @@ void plClothingOutfit::WriteItems(hsStream *s, hsResMgr *mgr) } } -hsBool plClothingOutfit::MsgReceive(plMessage* msg) +bool plClothingOutfit::MsgReceive(plMessage* msg) { plPreResourceMsg *preMsg = plPreResourceMsg::ConvertNoRef(msg); if (preMsg) @@ -1409,7 +1409,7 @@ hsBool plClothingOutfit::MsgReceive(plMessage* msg) // TESTING SDL // Send clothing sendState msg to object's plClothingSDLModifier // -hsBool plClothingOutfit::DirtySynchState(const char* SDLStateName, uint32_t synchFlags) +bool plClothingOutfit::DirtySynchState(const char* SDLStateName, uint32_t synchFlags) { plSynchEnabler ps(true); // make sure synching is enabled, since this happens during load synchFlags |= plSynchedObject::kForceFullSend; // TEMP @@ -1427,7 +1427,7 @@ void plClothingOutfit::IInstanceSharedMeshes(plClothingItem *item) if (fAvatar) fAvatar->ValidateMesh(); - hsBool partialSort = item->fCustomText && strstr(item->fCustomText, "NeedsSort"); + bool partialSort = item->fCustomText && strstr(item->fCustomText, "NeedsSort"); int i; for (i = 0; i < plClothingItem::kMaxNumLODLevels; i++) { @@ -1702,7 +1702,7 @@ plClothingItem *plClothingMgr::GetLRMatch(plClothingItem *item) return nil; } -hsBool plClothingMgr::IsLRMatch(plClothingItem *item1, plClothingItem *item2) +bool plClothingMgr::IsLRMatch(plClothingItem *item1, plClothingItem *item2) { if (!item1 || !item2) return false; @@ -1775,7 +1775,7 @@ void plClothingMgr::DeInit() } } -hsBool plClothingMgr::MsgReceive(plMessage* msg) +bool plClothingMgr::MsgReceive(plMessage* msg) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg); if (refMsg) @@ -1800,7 +1800,7 @@ hsBool plClothingMgr::MsgReceive(plMessage* msg) void plClothingMgr::IAddItem(plClothingItem *item) { - hsBool allFound = true; + bool allFound = true; int i, j; for (i = 0; i < item->fElementNames.GetCount(); i++) { diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.h index 6f09c6f6..46ab2588 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.h @@ -69,7 +69,7 @@ public: plClothingItemOptions() { fTint1.Set(1.f, 1.f, 1.f, 1.f); fTint2.Set(1.f, 1.f, 1.f, 1.f); } - hsBool IsMatch(plClothingItemOptions *other) { return fTint1 == other->fTint1 && fTint2 == other->fTint2; } + bool IsMatch(plClothingItemOptions *other) { return fTint1 == other->fTint1 && fTint2 == other->fTint2; } }; class plClothingItem : public hsKeyedObject @@ -113,15 +113,15 @@ public: void SetName(char *name) { delete fName; fName = hsStrcpy(name); } const char* GetName() { return fName; } - hsBool CanWearWith(plClothingItem *item); - hsBool WearBefore(plClothingItem *item); // Should we come before the arg item? (texture gen order) - hsBool HasBaseAlpha(); - hsBool HasSameMeshes(plClothingItem *other); + bool CanWearWith(plClothingItem *item); + bool WearBefore(plClothingItem *item); // Should we come before the arg item? (texture gen order) + bool HasBaseAlpha(); + bool HasSameMeshes(plClothingItem *other); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; class plClosetItem @@ -132,7 +132,7 @@ public: plClothingItem *fItem; plClothingItemOptions fOptions; - hsBool IsMatch(plClosetItem *other); + bool IsMatch(plClosetItem *other); }; class plClothingBase : public hsKeyedObject @@ -153,7 +153,7 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; class plClothingOutfit : public plSynchedObject @@ -178,16 +178,16 @@ public: CLASSNAME_REGISTER( plClothingOutfit ); GETINTERFACE_ANY( plClothingOutfit, plSynchedObject ); - void SaveCustomizations(hsBool retry = true); - void AddItem(plClothingItem *item, hsBool update = true, hsBool broadcast = true, hsBool netForce=false); - void RemoveItem(plClothingItem *item, hsBool update = true, hsBool netForce=false); - void TintItem(plClothingItem *item, float red, float green, float blue, hsBool update = true, hsBool broadcast = true, - hsBool netForce = false, hsBool retry = true, uint8_t fLayer = plClothingElement::kLayerTint1); + void SaveCustomizations(bool retry = true); + void AddItem(plClothingItem *item, bool update = true, bool broadcast = true, bool netForce=false); + void RemoveItem(plClothingItem *item, bool update = true, bool netForce=false); + void TintItem(plClothingItem *item, float red, float green, float blue, bool update = true, bool broadcast = true, + bool netForce = false, bool retry = true, uint8_t fLayer = plClothingElement::kLayerTint1); void TintSkin(float red, float green, float blue, - hsBool update = true, hsBool broadcast = true); - void MorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight, hsBool retry = true); - void SetAge(float age, hsBool update = true, hsBool broadcast = true); - void SetSkinBlend(float blend, uint8_t layer, hsBool update = true, hsBool broadcast = true); + bool update = true, bool broadcast = true); + void MorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight, bool retry = true); + void SetAge(float age, bool update = true, bool broadcast = true); + void SetSkinBlend(float blend, uint8_t layer, bool update = true, bool broadcast = true); float GetSkinBlend(uint8_t layer); hsColorRGBA GetItemTint(plClothingItem *item, uint8_t layer = 2) const; float GetAge() const { return fSkinBlends[0]; } @@ -196,7 +196,7 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - hsBool DirtySynchState(const char* SDLStateName, uint32_t synchFlags); + bool DirtySynchState(const char* SDLStateName, uint32_t synchFlags); void StripAccessories(); void WearDefaultClothing(); @@ -205,12 +205,12 @@ public: void WearRandomOutfit(); void RemoveMaintainerOutfit(); - hsBool ReadItems(hsStream* s, hsResMgr* mgr, hsBool broadcast = true); + bool ReadItems(hsStream* s, hsResMgr* mgr, bool broadcast = true); void WriteItems(hsStream* s, hsResMgr* mgr); void ForceUpdate(bool retry); // send updateTexture msg - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void IInstanceSharedMeshes(plClothingItem *item); void IRemoveSharedMeshes(plClothingItem *item); @@ -226,13 +226,13 @@ public: protected: hsBitVector fDirtyItems; - hsBool fVaultSaveEnabled; + bool fVaultSaveEnabled; bool fMorphsInitDone; void IAddItem(plClothingItem *item); void IRemoveItem(plClothingItem *item); - hsBool ITintItem(plClothingItem *item, hsColorRGBA color, uint8_t layer); - hsBool IMorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight); + bool ITintItem(plClothingItem *item, hsColorRGBA color, uint8_t layer); + bool IMorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight); void IHandleMorphSDR(plStateDataRecord *sdr); void IUpdate(); @@ -279,7 +279,7 @@ public: // For a pair of items that go together (ie gloves) give us one, we'll give you the other plClothingItem *GetLRMatch(plClothingItem *item); - hsBool IsLRMatch(plClothingItem *item1, plClothingItem *item2); + bool IsLRMatch(plClothingItem *item1, plClothingItem *item2); static void ChangeAvatar(char *name); @@ -290,7 +290,7 @@ public: //virtual void Read(hsStream* s, hsResMgr* mgr); //virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // NOTE: diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp index a633d871..7f6ca61c 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp @@ -239,7 +239,7 @@ void plAvatarMgr::PropagateLocalPlayer(int spawnPoint) { plKey requestor = GetKey(); bool isPlayer = true; - hsBool isLoading = true; + bool isLoading = true; plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading); if (spawnPoint >= 0) @@ -268,7 +268,7 @@ bool plAvatarMgr::UnPropagateLocalPlayer() { plKey requestor = GetKey(); bool isPlayer = true; - hsBool isLoading = false; + bool isLoading = false; plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, requestor, 0, isPlayer, isLoading); msg->SetBCastFlag(plMessage::kLocalPropagate, false); msg->Send(); @@ -285,14 +285,14 @@ void plAvatarMgr::UnLoadLocalPlayer() { plKey mgrKey = GetKey(); bool isPlayer = true; - hsBool isLoading = false; + bool isLoading = false; plLoadAvatarMsg *msg = new plLoadAvatarMsg(playerKey, mgrKey, 0, isPlayer, isLoading); msg->Send(); } } // MSGRECEIVE -hsBool plAvatarMgr::MsgReceive(plMessage *msg) +bool plAvatarMgr::MsgReceive(plMessage *msg) { plLoadAvatarMsg *cloneM = plLoadAvatarMsg::ConvertNoRef(msg); if(cloneM) @@ -354,7 +354,7 @@ hsBool plAvatarMgr::MsgReceive(plMessage *msg) return false; } -hsBool plAvatarMgr::HandleCoopMsg(plAvCoopMsg *msg) +bool plAvatarMgr::HandleCoopMsg(plAvCoopMsg *msg) { plAvCoopMsg::Command cmd = msg->fCommand; @@ -388,7 +388,7 @@ hsBool plAvatarMgr::HandleCoopMsg(plAvCoopMsg *msg) } } -hsBool plAvatarMgr::HandleNotifyMsg(plNotifyMsg *msg) +bool plAvatarMgr::HandleNotifyMsg(plNotifyMsg *msg) { proCoopEventData *ed = static_cast(msg->FindEventRecord(proEventData::kCoop)); if(ed) @@ -400,7 +400,7 @@ hsBool plAvatarMgr::HandleNotifyMsg(plNotifyMsg *msg) return false; } -hsBool plAvatarMgr::IPassMessageToActiveCoop(plMessage *msg, uint32_t id, uint16_t serial) +bool plAvatarMgr::IPassMessageToActiveCoop(plMessage *msg, uint32_t id, uint16_t serial) { plCoopMap::iterator i = fActiveCoops.find(id); while(i != fActiveCoops.end() && (*i).first == id) @@ -793,7 +793,7 @@ int plAvatarMgr::FindSpawnPoint( const char *name ) const return -1; } -int plAvatarMgr::WarpPlayerToAnother(hsBool iMove, uint32_t remoteID) +int plAvatarMgr::WarpPlayerToAnother(bool iMove, uint32_t remoteID) { plNetTransport &mgr = plNetClientMgr::GetInstance()->TransportMgr(); plNetTransportMember *mbr = mgr.GetMember(mgr.FindMember(remoteID)); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.h index 2283ad40..e8c57f70 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.h @@ -155,7 +155,7 @@ public: int NumSpawnPoints() { return fSpawnPoints.size(); } int FindSpawnPoint( const char *name ) const; // \} - static int WarpPlayerToAnother(hsBool iMove, uint32_t remoteID); + static int WarpPlayerToAnother(bool iMove, uint32_t remoteID); static int WarpPlayerToXYZ(float x, float y, float z); static int WarpPlayerToXYZ(int pid, float x, float y, float z); @@ -163,10 +163,10 @@ public: static void ShutDown(); - hsBool MsgReceive(plMessage *msg); - hsBool HandleCoopMsg(plAvCoopMsg *msg); - hsBool HandleNotifyMsg(plNotifyMsg *msg); - hsBool IPassMessageToActiveCoop(plMessage *msg, uint32_t id, uint16_t serial); + bool MsgReceive(plMessage *msg); + bool HandleCoopMsg(plAvCoopMsg *msg); + bool HandleNotifyMsg(plNotifyMsg *msg); + bool IPassMessageToActiveCoop(plMessage *msg, uint32_t id, uint16_t serial); // similar to a spawn point, maintainers markers are used // to generate your position in Dni coordinates diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarSDLModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarSDLModifier.cpp index 2dd0ea8f..5d202273 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarSDLModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarSDLModifier.cpp @@ -347,7 +347,7 @@ void plAvatarSDLModifier::IPutGenericBrainIn(plArmatureMod * avMod, plAvBrainGen bool plAvatarSDLModifier::ISetGenericBrainFrom(plArmatureMod *avMod, const plStateDataRecord* srcState) { int i; - hsBool success = true; + bool success = true; int numStages=0; plSDStateVariable* stagesVar = srcState->FindSDVar(GenericBrainVarNames::kStrStages); if (stagesVar->IsUsed()) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp index f4be85f8..258ba5e4 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp @@ -74,7 +74,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pfMessage/pfKIMsg.h" // for console hack -hsBool plAvOneShotTask::fForce3rdPerson = true; +bool plAvOneShotTask::fForce3rdPerson = true; #include "pnMessage/plCameraMsg.h" ///////////// @@ -88,13 +88,13 @@ plAvTask::plAvTask() } // START -hsBool plAvTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { return true; // true indicates the task has started succesfully } // PROCESS -hsBool plAvTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { return false; } @@ -213,7 +213,7 @@ void GetPositionAndRotation(hsMatrix44 transform, hsScalarTriple *position, hsQu // START // Adjust our goal time based on our duration and the current time -hsBool plAvSeekTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvSeekTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { fTargetTime = time + fDuration; // clock starts now.... fPhysicalAtStart = avatar->IsPhysicsEnabled(); @@ -280,7 +280,7 @@ void CalcHandleTargetPosition(hsMatrix44 &result, plSceneObject *insert, plScene // PROCESS // Move closer to the goal position and orientation -hsBool plAvSeekTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvSeekTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { hsQuat rotation; hsPoint3 position; @@ -351,9 +351,9 @@ plAvAnimTask::plAvAnimTask(const plString &animName, float targetBlend, float fadeSpeed, float setTime, - hsBool start, - hsBool loop, - hsBool attach) + bool start, + bool loop, + bool attach) : fAnimName(animName), fInitialBlend(initialBlend), fTargetBlend(targetBlend), @@ -367,7 +367,7 @@ plAvAnimTask::plAvAnimTask(const plString &animName, } // CTOR animName, fadeSpeed, attach -plAvAnimTask::plAvAnimTask(const plString &animName, float fadeSpeed, hsBool attach) +plAvAnimTask::plAvAnimTask(const plString &animName, float fadeSpeed, bool attach) : fAnimName(animName), fInitialBlend(0.0f), fTargetBlend(0.0f), @@ -384,9 +384,9 @@ plAvAnimTask::plAvAnimTask(const plString &animName, float fadeSpeed, hsBool att // START -hsBool plAvAnimTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvAnimTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { - hsBool result = false; + bool result = false; if(fAttach) { plAGAnimInstance * aInstance = avatar->FindOrAttachInstance(fAnimName, fInitialBlend); @@ -426,10 +426,10 @@ hsBool plAvAnimTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double } // PROCESS -hsBool plAvAnimTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvAnimTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { // the only reason we need this function is to watch the animation until it fades out - hsBool result = false; + bool result = false; if(fAttach) { // we finished in the Start() function @@ -523,7 +523,7 @@ plAvOneShotTask::plAvOneShotTask() // this construct is typically used when you want to create a one-shot task as part of a sequence // of tasks // it's different than the message-based constructor in that fDetachAnimation and fMoveHandle default to false -plAvOneShotTask::plAvOneShotTask(const plString &animName, hsBool drivable, hsBool reversible, plOneShotCallbacks *callbacks) +plAvOneShotTask::plAvOneShotTask(const plString &animName, bool drivable, bool reversible, plOneShotCallbacks *callbacks) { InitDefaults(); @@ -562,9 +562,9 @@ plAvOneShotTask::~plAvOneShotTask() // START -hsBool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { - hsBool result = false; + bool result = false; if (fIgnore) return true; @@ -646,7 +646,7 @@ hsBool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, dou } // PROCESS -hsBool plAvOneShotTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvOneShotTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { // *** if we are under mouse control, adjust it here @@ -757,9 +757,9 @@ plAvOneShotLinkTask::~plAvOneShotLinkTask() } // task protocol -hsBool plAvOneShotLinkTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvOneShotLinkTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { - hsBool result = plAvOneShotTask::Start(avatar, brain, time, elapsed); + bool result = plAvOneShotTask::Start(avatar, brain, time, elapsed); fStartTime = time; if (fAnimInstance && !fMarkerName.IsNull()) @@ -774,9 +774,9 @@ hsBool plAvOneShotLinkTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, return result; } -hsBool plAvOneShotLinkTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) +bool plAvOneShotLinkTask::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed) { - hsBool result = plAvOneShotTask::Process(avatar, brain, time, elapsed); + bool result = plAvOneShotTask::Process(avatar, brain, time, elapsed); if (fIgnore) return result; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.h b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.h index 4ffb275e..1cc0846e 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.h @@ -85,16 +85,16 @@ public: \param attach Are we attaching or detaching the animation? */ plAvAnimTask(const plString &animName, float initialBlend, float targetBlend, float fadeSpeed, - float setTime, hsBool start, hsBool loop, hsBool attach); + float setTime, bool start, bool loop, bool attach); /** Canonical constructor form form for detaching \param animName The name of the animation we're detaching \param fadeSpeed How fast to fade it out. */ - plAvAnimTask(const plString &animName, float fadeSpeed, hsBool attach = false); + plAvAnimTask(const plString &animName, float fadeSpeed, bool attach = false); // task protocol - virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); - virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); virtual void LeaveAge(plArmatureMod *avatar); // plasma protocol @@ -111,9 +111,9 @@ protected: float fTargetBlend; // the blend to achieve eventually (attaching only) float fFadeSpeed; // how fast to achieve the blend float fSetTime; // set the animation to this time - hsBool fStart; // start the animation playing? (attaching only) - hsBool fLoop; // turn on looping? (attaching only) - hsBool fAttach; // attach? (otherwise detach) + bool fStart; // start the animation playing? (attaching only) + bool fLoop; // turn on looping? (attaching only) + bool fAttach; // attach? (otherwise detach) plAGAnimInstance *fAnimInstance; // the animation we're monitoring (detaching only) }; @@ -135,8 +135,8 @@ public: plAvSeekTask(plKey target, plAvAlignment alignType, const char *animName); // task protocol - virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); - virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); virtual void LeaveAge(plArmatureMod *avatar); // plasma protocol @@ -156,8 +156,8 @@ protected: hsPoint3 fTargetPosition; // the position we're seeking hsQuat fTargetRotation; // the orientation we're seeking double fTargetTime; // the time we want to be done with the task (start + duration) - hsBool fPhysicalAtStart; // was the avatar physical before we started? - hsBool fCleanup; // last frame of processing + bool fPhysicalAtStart; // was the avatar physical before we started? + bool fCleanup; // last frame of processing }; // ---- THE CUTOFF ---- @@ -182,7 +182,7 @@ public: \param reversable Unused. Allows the oneshot to be backed up by keyboard input \param callbacks A vector of callback messages to be sent at specific times during the animation */ - plAvOneShotTask(const plString &animName, hsBool drivable, hsBool reversible, plOneShotCallbacks *callbacks); + plAvOneShotTask(const plString &animName, bool drivable, bool reversible, plOneShotCallbacks *callbacks); /** Construct from a oneshot message. \param msg The message to copy our parameters from \param brain The brain to attach the task to. @@ -191,32 +191,32 @@ public: virtual ~plAvOneShotTask(); // task protocol - virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); - virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); virtual void LeaveAge(plArmatureMod *avatar); void SetAnimName(const plString &name); - static hsBool fForce3rdPerson; + static bool fForce3rdPerson; // plasma protocol CLASSNAME_REGISTER( plAvOneShotTask ); GETINTERFACE_ANY( plAvOneShotTask, plAvTask ); - hsBool fBackwards; // play the anim backwards - hsBool fDisableLooping; // explicitly kill looping on this anim; - hsBool fDisablePhysics; // disable physics when we play this oneshot + bool fBackwards; // play the anim backwards + bool fDisableLooping; // explicitly kill looping on this anim; + bool fDisablePhysics; // disable physics when we play this oneshot // *** implement reader and writer if needed for network propagation protected: plString fAnimName; // the name of the one-shot animation we want to use - hsBool fMoveHandle; // move the handle after the oneshot's done playing? + bool fMoveHandle; // move the handle after the oneshot's done playing? plAGAnimInstance *fAnimInstance; // the animation instance (available only after it starts playing) - hsBool fDrivable; // the user can control the animation with the mouse - hsBool fReversible; // the user can back up the animation with the mouse - hsBool fEnablePhysicsAtEnd; // was the avatar physical before we started (and did we disable physics?) - hsBool fDetachAnimation; // should we detach the animation when we're done? - hsBool fIgnore; // if this gets set before we start, we just finish without doing anything. + bool fDrivable; // the user can control the animation with the mouse + bool fReversible; // the user can back up the animation with the mouse + bool fEnablePhysicsAtEnd; // was the avatar physical before we started (and did we disable physics?) + bool fDetachAnimation; // should we detach the animation when we're done? + bool fIgnore; // if this gets set before we start, we just finish without doing anything. plOneShotCallbacks *fCallbacks; // a set of callbacks to set up on our animation @@ -244,8 +244,8 @@ public: virtual ~plAvOneShotLinkTask(); // task protocol - virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); - virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); + virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed); CLASSNAME_REGISTER( plAvOneShotLinkTask ); GETINTERFACE_ANY( plAvOneShotLinkTask, plAvOneShotTask ); @@ -261,7 +261,7 @@ protected: plString fMarkerName; double fStartTime; float fMarkerTime; - hsBool fLinkFired; + bool fLinkFired; }; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp index a408beae..46a31e4e 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp @@ -143,7 +143,7 @@ plCoopCoordinator::plCoopCoordinator(plKey host, plKey guest, // MsgReceive -------------------------------------- // ----------- -hsBool plCoopCoordinator::MsgReceive(plMessage *msg) +bool plCoopCoordinator::MsgReceive(plMessage *msg) { plNotifyMsg *notify = plNotifyMsg::ConvertNoRef(msg); if(notify) @@ -392,13 +392,13 @@ void plCoopCoordinator::Read(hsStream *stream, hsResMgr *mgr) fHostOfferStage = stream->ReadByte(); fGuestAcceptStage = stream->ReadBool(); - if(stream->Readbool()) + if(stream->ReadBool()) fGuestAcceptMsg = plMessage::ConvertNoRef(mgr->ReadCreatable(stream)); else fGuestAcceptMsg = nil; fSynchBone = stream->ReadSafeString_TEMP(); - fAutoStartGuest = stream->Readbool(); + fAutoStartGuest = stream->ReadBool(); fInitiatorID = fHostBrain->GetInitiatorID(); fInitiatorSerial = fHostBrain->GetInitiatorSerial(); @@ -417,11 +417,11 @@ void plCoopCoordinator::Write(hsStream *stream, hsResMgr *mgr) stream->WriteByte((uint8_t)fHostOfferStage); stream->WriteByte((uint8_t)fGuestAcceptStage); - stream->Writebool(fGuestAcceptMsg != nil); + stream->WriteBool(fGuestAcceptMsg != nil); if(fGuestAcceptMsg) mgr->WriteCreatable(stream, fGuestAcceptMsg); stream->WriteSafeString(fSynchBone); - stream->Writebool(fAutoStartGuest); + stream->WriteBool(fAutoStartGuest); } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.h b/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.h index 04e67aae..59e98de5 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.h @@ -83,7 +83,7 @@ public: plMessage *guestAcceptMsg, bool autoStartGuest); - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); void Run(); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.cpp index c28ae41e..64e9d275 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.cpp @@ -250,7 +250,7 @@ plMatrixTimeScale::~plMatrixTimeScale() // IsStoppedAt ---------------------------- // ------------ -hsBool plMatrixTimeScale::IsStoppedAt(double time) +bool plMatrixTimeScale::IsStoppedAt(double time) { return fTimeSource->IsStoppedAt(time); } @@ -374,7 +374,7 @@ uint16_t plMatrixBlend::GetPriority() { return fPriority; } -hsBool plMatrixBlend::IsStoppedAt(double time) +bool plMatrixBlend::IsStoppedAt(double time) { float blend = fChannelBias->Value(time); if (blend == 0) @@ -788,7 +788,7 @@ void plMatrixDelayedCorrectionApplicator::SetCorrection(hsMatrix44 &cor) // CANBLEND -hsBool plMatrixDelayedCorrectionApplicator::CanBlend(plAGApplicator *app) +bool plMatrixDelayedCorrectionApplicator::CanBlend(plAGApplicator *app) { plMatrixChannelApplicator *matChannelApp = plMatrixChannelApplicator::ConvertNoRef(app); @@ -870,7 +870,7 @@ void plMatrixDifferenceApp::Reset(double time) // CanBlend ----------------------------------------------- // --------- -hsBool plMatrixDifferenceApp::CanBlend(plAGApplicator *app) +bool plMatrixDifferenceApp::CanBlend(plAGApplicator *app) { plMatrixChannelApplicator *matChannelApp = plMatrixChannelApplicator::ConvertNoRef(app); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.h b/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.h index 4a381f77..931ed8e6 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plMatrixChannel.h @@ -137,7 +137,7 @@ public: plMatrixTimeScale(plMatrixChannel *channel, plScalarChannel *timeSource); virtual ~plMatrixTimeScale(); - virtual hsBool IsStoppedAt(double time); + virtual bool IsStoppedAt(double time); virtual const hsMatrix44 & Value(double time, bool peek = false); virtual const hsAffineParts & AffineValue(double time, bool peek = false); @@ -188,7 +188,7 @@ public: //virtual void SetBlend(float blend) { fBlend = blend; }; //virtual float GetBlend() { return fBlend; }; - virtual hsBool IsStoppedAt(double time); + virtual bool IsStoppedAt(double time); // AG PROTOCOL virtual const hsMatrix44 & Value(double time, bool peek = false); @@ -316,7 +316,7 @@ public: CLASSNAME_REGISTER( plMatrixChannelApplicator ); GETINTERFACE_ANY( plMatrixChannelApplicator, plAGApplicator ); - virtual hsBool CanCombine(plAGApplicator *app) { return false; } + virtual bool CanCombine(plAGApplicator *app) { return false; } virtual plAGPinType GetPinType() { return kAGPinTransform; } }; @@ -341,13 +341,13 @@ public: GETINTERFACE_ANY( plMatrixDelayedCorrectionApplicator, plMatrixChannelApplicator ); void SetCorrection(hsMatrix44 &correction); - virtual hsBool AutoDelete() { return false; } // should we remove it when its input channel is gone? + virtual bool AutoDelete() { return false; } // should we remove it when its input channel is gone? // applicator arbitration... virtual plAGPinType GetPinType() { return kAGPinTransform; } - virtual hsBool CanBlend(plAGApplicator *app); + virtual bool CanBlend(plAGApplicator *app); - hsBool fIgnoreNextCorrection; + bool fIgnoreNextCorrection; static const float fDelayLength; // static var for now. }; @@ -364,11 +364,11 @@ public: void Reset(double time); /** Should this applicator be automatically removed when its channel goes away? */ - virtual hsBool AutoDelete() { return false; } + virtual bool AutoDelete() { return false; } // applicator arbitration virtual plAGPinType GetPinType() { return kAGPinTransform; } - virtual hsBool CanBlend(plAGApplicator *app); + virtual bool CanBlend(plAGApplicator *app); CLASSNAME_REGISTER(plMatrixDifferenceApp); GETINTERFACE_ANY(plMatrixDifferenceApp, plMatrixChannelApplicator); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp index f45f4943..149b3bb9 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.cpp @@ -118,7 +118,7 @@ void plMultistageBehMod::IDeleteStageVec() } } -hsBool plMultistageBehMod::MsgReceive(plMessage* msg) +bool plMultistageBehMod::MsgReceive(plMessage* msg) { plMultistageModMsg *multiMsg = nil; plNotifyMsg* notifyMsg = plNotifyMsg::ConvertNoRef(msg); @@ -140,7 +140,7 @@ hsBool plMultistageBehMod::MsgReceive(plMessage* msg) int numStages = fStages->size(); stages->reserve(numStages); // hack hack hack - hsBool ladder = false; + bool ladder = false; for (int i = 0; i < numStages; i++) { plAnimStage* stage = new plAnimStage; @@ -205,9 +205,9 @@ void plMultistageBehMod::Read(hsStream *stream, hsResMgr *mgr) { plSingleModifier::Read(stream, mgr); - fFreezePhys = stream->Readbool(); - fSmartSeek = stream->Readbool(); - fReverseFBControlsOnRelease = stream->Readbool(); + fFreezePhys = stream->ReadBool(); + fSmartSeek = stream->ReadBool(); + fReverseFBControlsOnRelease = stream->ReadBool(); IDeleteStageVec(); fStages = new plAnimStageVec; @@ -237,9 +237,9 @@ void plMultistageBehMod::Write(hsStream *stream, hsResMgr *mgr) { plSingleModifier::Write(stream, mgr); - stream->Writebool(fFreezePhys); - stream->Writebool(fSmartSeek); - stream->Writebool(fReverseFBControlsOnRelease); + stream->WriteBool(fFreezePhys); + stream->WriteBool(fSmartSeek); + stream->WriteBool(fReverseFBControlsOnRelease); int numStages = fStages->size(); stream->WriteLE32(numStages); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.h b/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.h index ffd125c1..275e820f 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plMultistageBehMod.h @@ -61,7 +61,7 @@ protected: std::vector fReceivers; void IDeleteStageVec(); - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return true; } public: plMultistageBehMod(); @@ -71,13 +71,13 @@ public: CLASSNAME_REGISTER( plMultistageBehMod ); GETINTERFACE_ANY( plMultistageBehMod, plSingleModifier ); - hsBool NetProp() { return fNetProp; } - hsBool NetForce() { return fNetForce; } + bool NetProp() { return fNetProp; } + bool NetForce() { return fNetForce; } - void SetNetProp(hsBool netProp) { fNetProp = netProp; } - void SetNetForce(hsBool netForce) { fNetForce = netForce; } + void SetNetProp(bool netProp) { fNetProp = netProp; } + void SetNetForce(bool netForce) { fNetForce = netForce; } - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); virtual void Init(plAnimStageVec *stages, bool freezePhys, bool smartSeek, bool reverseFBControlsOnRelease, std::vector* receivers); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.cpp index 6b08c567..887e8185 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.cpp @@ -142,8 +142,8 @@ void plNPCSpawnMod::Read(hsStream *stream, hsResMgr *mgr) fModelName = stream->ReadSafeString(); fAccountName = stream->ReadSafeString(); - fAutoSpawn = stream->Readbool(); - if(stream->Readbool()) + fAutoSpawn = stream->ReadBool(); + if(stream->ReadBool()) fNotify = plNotifyMsg::ConvertNoRef(mgr->ReadCreatable(stream)); } @@ -154,19 +154,19 @@ void plNPCSpawnMod::Write(hsStream *stream, hsResMgr *mgr) stream->WriteSafeString(fModelName); stream->WriteSafeString(fAccountName); - stream->Writebool(fAutoSpawn); + stream->WriteBool(fAutoSpawn); if(fNotify) { - stream->Writebool(true); + stream->WriteBool(true); mgr->WriteCreatable(stream, fNotify); } else { - stream->Writebool(false); + stream->WriteBool(false); } } // IEVAL // attack of the bogons -hsBool plNPCSpawnMod::IEval(double secs, float del, uint32_t dirty) +bool plNPCSpawnMod::IEval(double secs, float del, uint32_t dirty) { return true; } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.h b/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.h index b827d998..5ebc6b3f 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.h @@ -58,13 +58,13 @@ public: GETINTERFACE_ANY( plNPCSpawnMod, plSingleModifier ); virtual void AddTarget(plSceneObject* so); -// hsBool MsgReceive(plMessage* msg); +// bool MsgReceive(plMessage* msg); virtual void Read(hsStream *stream, hsResMgr *mgr); virtual void Write(hsStream *stream, hsResMgr *mgr); protected: - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); void ISendNotify(plKey &avatarKey); // send our notification message private: diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp index 4638b5b9..0dbadf3b 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp @@ -69,11 +69,11 @@ plOneShotMod::plOneShotMod() // CTOR(char *) plOneShotMod::plOneShotMod(const char *animName, - hsBool drivable, - hsBool reversable, + bool drivable, + bool reversable, float seekDuration, - hsBool smartSeek, - hsBool noSeek) + bool smartSeek, + bool noSeek) : fDrivable(drivable), fReversable(reversable), fSeekDuration(seekDuration), @@ -85,11 +85,11 @@ plOneShotMod::plOneShotMod(const char *animName, // INIT void plOneShotMod::Init(const char *animName, - hsBool drivable, - hsBool reversable, + bool drivable, + bool reversable, float seekDuration, - hsBool smartSeek, - hsBool noSeek) + bool smartSeek, + bool noSeek) { fAnimName = hsStrcpy(animName); fDrivable = drivable; @@ -110,7 +110,7 @@ plOneShotMod::~plOneShotMod() // MSGRECEIVE -hsBool plOneShotMod::MsgReceive(plMessage* msg) +bool plOneShotMod::MsgReceive(plMessage* msg) { plOneShotMsg *oneShotMsg = plOneShotMsg::ConvertNoRef(msg); if (oneShotMsg) @@ -133,7 +133,7 @@ hsBool plOneShotMod::MsgReceive(plMessage* msg) plString animName = avMod->MakeAnimationName(fAnimName); plAvOneShotMsg *avOSmsg = new plAvOneShotMsg(myKey, oneShotMsg->fPlayerKey, objKey, - fSeekDuration, (hsBool)fSmartSeek, animName, fDrivable, + fSeekDuration, (bool)fSmartSeek, animName, fDrivable, fReversable); avOSmsg->fNoSeek = fNoSeek; @@ -180,6 +180,6 @@ void plOneShotMod::Write(hsStream *stream, hsResMgr *mgr) stream->WriteLEScalar(fSeekDuration); stream->WriteBool(fDrivable); stream->WriteBool(fReversable); - stream->WriteBool((hsBool)fSmartSeek); + stream->WriteBool((bool)fSmartSeek); stream->WriteBool(fNoSeek); } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.h b/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.h index 5cf9c546..f5e5aaae 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.h @@ -55,25 +55,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plOneShotMod : public plMultiModifier { protected: - virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;} + virtual bool IEval(double secs, float del, uint32_t dirty) {return true;} char * fAnimName; // the name of the animation associated with this one-shot - hsBool fDrivable; // whether the user can control the position of the animation - hsBool fReversable; // whether the user can back up the animation (fDrivable must be true as well) + bool fDrivable; // whether the user can control the position of the animation + bool fReversable; // whether the user can back up the animation (fDrivable must be true as well) float fSeekDuration; // how long to take to get to the seek point (??? should this be speed instead?) float fSmartSeek; // use smart seek to walk to the seek point? - hsBool fNoSeek; + bool fNoSeek; public: plOneShotMod(); - plOneShotMod(const char *animName, hsBool drivable, hsBool reversable, float seekDuration, hsBool smartSeek,hsBool noSeek = false); + plOneShotMod(const char *animName, bool drivable, bool reversable, float seekDuration, bool smartSeek,bool noSeek = false); virtual ~plOneShotMod(); - void Init(const char *animName, hsBool drivable, hsBool reversable, float seekDuration, hsBool smartSeek, hsBool noSeek = false); + void Init(const char *animName, bool drivable, bool reversable, float seekDuration, bool smartSeek, bool noSeek = false); CLASSNAME_REGISTER( plOneShotMod ); GETINTERFACE_ANY( plOneShotMod, plMultiModifier ); virtual void AddTarget(plSceneObject* so); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); virtual void Read(hsStream *stream, hsResMgr *mgr); virtual void Write(hsStream *stream, hsResMgr *mgr); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.cpp index 66c0cc7a..9ccb20a6 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.cpp @@ -747,7 +747,7 @@ void plRidingAnimatedPhysicalStrategy::Apply(float delSecs) for(curRecord = GroundHitRecords.begin(); curRecord != GroundHitRecords.end(); curRecord++) { - hsBool groundlike=false; + bool groundlike=false; if((curRecord->locHit.fZ - startPos.fZ)<= .2) groundlike= true; if(groundlike) { diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.h b/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.h index 44ba1ba8..bb2c13cd 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plPhysicalControllerCore.h @@ -189,14 +189,14 @@ public: { fAchievedLinearVelocity.Set(0.f,0.f,0.f); } - virtual int SweepControllerPath(const hsPoint3& startPos,const hsPoint3& endPos, hsBool vsDynamics, hsBool vsStatics, uint32_t& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut)=0; + virtual int SweepControllerPath(const hsPoint3& startPos,const hsPoint3& endPos, bool vsDynamics, bool vsStatics, uint32_t& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut)=0; //this should only be used to force a move it could place your head into a wall and that would be good virtual float GetHeight() {return fHeight;} virtual float GetRadius() {return fRadius;} //Wether the avatar thing has mass and forces things down or not, and changes the way things move //This is an attempt fix things like riding on an animated physical - virtual void BehaveLikeAnimatedPhysical(hsBool actLikeAnAnimatedPhys)=0; - virtual hsBool BehavingLikeAnAnimatedPhysical()=0; + virtual void BehaveLikeAnimatedPhysical(bool actLikeAnAnimatedPhys)=0; + virtual bool BehavingLikeAnAnimatedPhysical()=0; protected: plKey fOwner; @@ -256,7 +256,7 @@ public: virtual void ResetAirTime() { fTimeInAir = 0.f; } protected: - virtual hsBool IRequireBehaviourLikeAnAnimatedPhysical()=0; + virtual bool IRequireBehaviourLikeAnAnimatedPhysical()=0; virtual void IApplyKinematic(); plPhysicalControllerCore* fCore; hsVector3 fLinearAcceleration; @@ -302,7 +302,7 @@ protected: bool fHitHead; bool fOnTopOfAnimatedPhysLastFrame; hsTArray fPrevSlidingNormals; - virtual hsBool IRequireBehaviourLikeAnAnimatedPhysical(){return true;} + virtual bool IRequireBehaviourLikeAnAnimatedPhysical(){return true;} }; class plSwimStrategy: public plMovementStrategy @@ -314,16 +314,16 @@ public: virtual void Apply(float delSecs); virtual void Update(float delSecs); float GetBuoyancy() { return fBuoyancy; } - hsBool IsOnGround() { return fOnGround; } - hsBool HadContacts() { return fHadContacts; } + bool IsOnGround() { return fOnGround; } + bool HadContacts() { return fHadContacts; } virtual void IAddContactNormals(hsVector3& vec); protected: - virtual hsBool IRequireBehaviourLikeAnAnimatedPhysical(){return true;} + virtual bool IRequireBehaviourLikeAnAnimatedPhysical(){return true;} private: void IAdjustBuoyancy(); float fBuoyancy; - hsBool fOnGround; - hsBool fHadContacts; + bool fOnGround; + bool fHadContacts; float fSurfaceHeight; plSwimRegionInterface *fCurrentRegion; }; @@ -341,9 +341,9 @@ public: void GroundHit() { fGroundHit = true; } virtual void StartJump(){fStartJump = true;} protected: - virtual hsBool IRequireBehaviourLikeAnAnimatedPhysical(){return false;} + virtual bool IRequireBehaviourLikeAnAnimatedPhysical(){return false;} bool ICheckMove(const hsPoint3& startPos, const hsPoint3& desiredPos); - hsBool fNeedVelocityOverride; + bool fNeedVelocityOverride; hsVector3 fOverrideVelocity; bool fStartJump; }; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.cpp index 58b409d8..a845e288 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.cpp @@ -173,7 +173,7 @@ plPointTimeScale::~plPointTimeScale() // IsStoppedAt --------------------------- // ------------ -hsBool plPointTimeScale::IsStoppedAt(double time) +bool plPointTimeScale::IsStoppedAt(double time) { return fTimeSource->IsStoppedAt(time); } @@ -240,7 +240,7 @@ plPointBlend::~plPointBlend() // IsStoppedAt ------------------------------ // ------------ -hsBool plPointBlend::IsStoppedAt(double time) +bool plPointBlend::IsStoppedAt(double time) { float blend = fChannelBias->Value(time); if (blend == 0) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.h b/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.h index 13cecd34..a1a1a1b2 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plPointChannel.h @@ -138,7 +138,7 @@ public: plPointTimeScale(plPointChannel *channel, plScalarChannel *timeSource); virtual ~plPointTimeScale(); - virtual hsBool IsStoppedAt(double time); + virtual bool IsStoppedAt(double time); virtual const hsPoint3 & Value(double time); virtual plAGChannel * Detach(plAGChannel * channel); @@ -171,7 +171,7 @@ public: //float GetBlend() const { return fBlend; } //void SetBlend(float the_blend) { fBlend = the_blend; } - virtual hsBool IsStoppedAt(double time); + virtual bool IsStoppedAt(double time); // AG PROTOCOL virtual const hsPoint3 &Value(double time); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.cpp index 929e70e3..27ad62b5 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.cpp @@ -80,7 +80,7 @@ void plQuatChannel::Value(hsQuat &quat, double time) } // CANCOMBINE -hsBool plQuatChannel::CanCombine(plAGChannel *channelA) +bool plQuatChannel::CanCombine(plAGChannel *channelA) { return false; if(plPointChannel::ConvertNoRef(channelA)) @@ -186,7 +186,7 @@ plQuatTimeScale::~plQuatTimeScale() { } -hsBool plQuatTimeScale::IsStoppedAt(double time) +bool plQuatTimeScale::IsStoppedAt(double time) { return fTimeSource->IsStoppedAt(time); } @@ -244,7 +244,7 @@ plQuatBlend::~plQuatBlend() fChannelBias = nil; } -hsBool plQuatBlend::IsStoppedAt(double time) +bool plQuatBlend::IsStoppedAt(double time) { float blend = fChannelBias->Value(time); if (blend == 0) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.h b/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.h index c12aab1e..b1fc871c 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plQuatChannel.h @@ -64,7 +64,7 @@ public: virtual void Value(hsQuat &quaternion, double time); // can this channel combine with the given channel? - virtual hsBool CanCombine(plAGChannel * channelB); + virtual bool CanCombine(plAGChannel * channelB); // combine it (allocates combine object) virtual plAGChannel * MakeCombine(plAGChannel * channelB); @@ -117,7 +117,7 @@ public: plQuatTimeScale(plQuatChannel *channel, plScalarChannel *timeSource); virtual ~plQuatTimeScale(); - virtual hsBool IsStoppedAt(double time); + virtual bool IsStoppedAt(double time); virtual const hsQuat & Value(double time); virtual plAGChannel * Detach(plAGChannel * channel); @@ -149,7 +149,7 @@ public: //float GetBlend() const { return fBlend; } //void SetBlend(float the_blend) { fBlend = the_blend; } - virtual hsBool IsStoppedAt(double time); + virtual bool IsStoppedAt(double time); // AG PROTOCOL virtual const hsQuat &Value(double time); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.cpp index 83c82e74..610b9be4 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.cpp @@ -80,14 +80,14 @@ plScalarChannel::~plScalarChannel() // value -------------------------------------------------------- // ------ -const float & plScalarChannel::Value(double time, hsBool peek) +const float & plScalarChannel::Value(double time, bool peek) { return fResult; } // value -------------------------------------------------------------- // ------ -void plScalarChannel::Value(float &scalar, double time, hsBool peek) +void plScalarChannel::Value(float &scalar, double time, bool peek) { scalar = Value(time, peek); } @@ -196,13 +196,13 @@ plScalarTimeScale::~plScalarTimeScale() { } -hsBool plScalarTimeScale::IsStoppedAt(double time) +bool plScalarTimeScale::IsStoppedAt(double time) { return fTimeSource->IsStoppedAt(time); } // VALUE -const float & plScalarTimeScale::Value(double time, hsBool peek) +const float & plScalarTimeScale::Value(double time, bool peek) { fResult = fChannelIn->Value(fTimeSource->Value(time, peek)); @@ -263,7 +263,7 @@ plScalarBlend::~plScalarBlend() // IsStoppedAt ------------------------------- // ------------ -hsBool plScalarBlend::IsStoppedAt(double time) +bool plScalarBlend::IsStoppedAt(double time) { float blend = fChannelBias->Value(time); if (blend == 0) @@ -276,7 +276,7 @@ hsBool plScalarBlend::IsStoppedAt(double time) // Value ------------------------------------------------------ // ------ -const float & plScalarBlend::Value(double time, hsBool peek) +const float & plScalarBlend::Value(double time, bool peek) { float curBlend = fChannelBias->Value(time, peek); if(curBlend == 0) { @@ -353,14 +353,14 @@ plScalarControllerChannel::~plScalarControllerChannel() // Value ------------------------------------------------------------------ // ------ -const float & plScalarControllerChannel::Value(double time, hsBool peek) +const float & plScalarControllerChannel::Value(double time, bool peek) { return Value(time, peek, nil); } // Value ------------------------------------------------------------------ // ------ -const float & plScalarControllerChannel::Value(double time, hsBool peek, +const float & plScalarControllerChannel::Value(double time, bool peek, plControllerCacheInfo *cache) { fController->Interp((float)time, &fResult, cache); @@ -479,14 +479,14 @@ plATCChannel::~plATCChannel() // IsStoppedAt ------------------------------ // ------------ -hsBool plATCChannel::IsStoppedAt(double time) +bool plATCChannel::IsStoppedAt(double time) { return fConvert->IsStoppedAt(time); } // Value ----------------------------------------------------- // ------ -const float & plATCChannel::Value(double time, hsBool peek) +const float & plATCChannel::Value(double time, bool peek) { fResult = (peek ? fConvert->WorldToAnimTimeNoUpdate(time) : fConvert->WorldToAnimTime(time)); return fResult; @@ -519,14 +519,14 @@ plScalarSDLChannel::~plScalarSDLChannel() // IsStoppedAt ------------------------------------ // ------------ -hsBool plScalarSDLChannel::IsStoppedAt(double time) +bool plScalarSDLChannel::IsStoppedAt(double time) { return false; } // Value ----------------------------------------------------------- // ------ -const float & plScalarSDLChannel::Value(double time, hsBool peek) +const float & plScalarSDLChannel::Value(double time, bool peek) { if (fVar) fVar->Get(&fResult); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.h b/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.h index 6c4508a0..8c6baeaa 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plScalarChannel.h @@ -81,8 +81,8 @@ public: virtual ~plScalarChannel(); // AG PROTOCOL - virtual const float & Value(double time, hsBool peek = false); - virtual void Value(float &result, double time, hsBool peek = false); + virtual const float & Value(double time, bool peek = false); + virtual void Value(float &result, double time, bool peek = false); // combine it (allocates combine object) virtual plAGChannel * MakeCombine(plAGChannel * channelB); @@ -140,8 +140,8 @@ public: plScalarTimeScale(plScalarChannel *channel, plScalarChannel *timeSource); virtual ~plScalarTimeScale(); - virtual hsBool IsStoppedAt(double time); - virtual const float & Value(double time, hsBool peek = false); + virtual bool IsStoppedAt(double time); + virtual const float & Value(double time, bool peek = false); virtual plAGChannel * Detach(plAGChannel * channel); // PLASMA PROTOCOL @@ -176,10 +176,10 @@ public: const plScalarChannel * GetChannelBias() const { return fChannelBias; } void SetChannelBias(plScalarChannel * channel) { fChannelBias = channel; } - virtual hsBool IsStoppedAt(double time); + virtual bool IsStoppedAt(double time); // AG PROTOCOL - virtual const float & Value(double time, hsBool peek = false); + virtual const float & Value(double time, bool peek = false); // remove the specified channel from our graph virtual plAGChannel * Detach(plAGChannel * channel); @@ -205,8 +205,8 @@ public: virtual ~plScalarControllerChannel(); // AG PROTOCOL - virtual const float & Value(double time, hsBool peek = false); - virtual const float & Value(double time, hsBool peek, plControllerCacheInfo *cache); + virtual const float & Value(double time, bool peek = false); + virtual const float & Value(double time, bool peek, plControllerCacheInfo *cache); virtual plAGChannel *MakeCacheChannel(plAnimTimeConvert *atc); @@ -260,8 +260,8 @@ public: plATCChannel(plAnimTimeConvert *convert); virtual ~plATCChannel(); - virtual hsBool IsStoppedAt(double time); - virtual const float & Value(double time, hsBool peek = false); + virtual bool IsStoppedAt(double time); + virtual const float & Value(double time, bool peek = false); // PLASMA PROTOCOL CLASSNAME_REGISTER( plATCChannel ); @@ -283,8 +283,8 @@ public: plScalarSDLChannel(float length); virtual ~plScalarSDLChannel(); - virtual hsBool IsStoppedAt(double time); - virtual const float & Value(double time, hsBool peek = false); + virtual bool IsStoppedAt(double time); + virtual const float & Value(double time, bool peek = false); void SetVar(plSimpleStateVariable *var) { fVar = var; } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.cpp index 086245ba..3e9515ce 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.cpp @@ -69,7 +69,7 @@ plSeekPointMod::~plSeekPointMod() } // MSGRECEIVE -hsBool plSeekPointMod::MsgReceive(plMessage* msg) +bool plSeekPointMod::MsgReceive(plMessage* msg) { return plMultiModifier::MsgReceive(msg); } diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.h b/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.h index 9ab66861..5ffff6db 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSeekPointMod.h @@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plSeekPointMod : public plMultiModifier { protected: - virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;} + virtual bool IEval(double secs, float del, uint32_t dirty) {return true;} char * fName; // public because you can't change it public: @@ -69,7 +69,7 @@ public: virtual void AddTarget(plSceneObject* so); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); virtual void Read(hsStream *stream, hsResMgr *mgr); virtual void Write(hsStream *stream, hsResMgr *mgr); diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp index 76e64e9c..1c66ad56 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp @@ -135,9 +135,9 @@ void plSittingModifier::ISetupNotify(plNotifyMsg *notifyMsg, plNotifyMsg *origin // MsgReceive -------------------------------------- // ----------- -hsBool plSittingModifier::MsgReceive(plMessage *msg) +bool plSittingModifier::MsgReceive(plMessage *msg) { - hsBool result = false; + bool result = false; plNotifyMsg* notifyMsg = plNotifyMsg::ConvertNoRef(msg); if(notifyMsg) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.h b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.h index e99c417a..df67b42b 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.h @@ -92,7 +92,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); void AddNotifyKey(plKey key) { fNotifyKeys.Append(key); } @@ -102,7 +102,7 @@ public: protected: /** We've been triggered: go ahead and send the seek and brain tasks to the triggering avatar. */ - hsBool IEmitCommand(plKey playerKey, plMessage *enterCallback, plMessage *exitCallback); + bool IEmitCommand(plKey playerKey, plMessage *enterCallback, plMessage *exitCallback); /** Set up generic notification messages which were passed in by the responder / max authoring stuff. */ @@ -113,13 +113,13 @@ protected: plAvBrainGeneric * IBuildSitBrain(plKey avModKey, plKey seekKey,char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify); /** Unused. */ - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return true; } /** An array of keys to objects that are interested in receiving our sit messages. */ hsTArray fNotifyKeys; /** The chair in question is in use. It will untrigger when the avatar leaves it. */ - //hsBool fTriggered; + //bool fTriggered; plKey fTriggeredAvatarKey; }; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp index 0b174439..1ba908a5 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.cpp @@ -106,7 +106,7 @@ void plSwimCircularCurrentRegion::Write(hsStream* stream, hsResMgr* mgr) mgr->WriteKey(stream, fCurrentSO); } -hsBool plSwimCircularCurrentRegion::MsgReceive(plMessage* msg) +bool plSwimCircularCurrentRegion::MsgReceive(plMessage* msg) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg); if (refMsg) @@ -150,7 +150,7 @@ void plSwimCircularCurrentRegion::GetCurrent(plPhysicalControllerCore *physical, physical->GetPositionSim(pos); - hsBool applyPull = true; + bool applyPull = true; hsVector3 pos2Center(center.fX - pos.fX, center.fY - pos.fY, 0.f); float pullVel; float distSq = pos2Center.MagnitudeSquared(); @@ -223,7 +223,7 @@ void plSwimStraightCurrentRegion::Write(hsStream* stream, hsResMgr* mgr) mgr->WriteKey(stream, fCurrentSO); } -hsBool plSwimStraightCurrentRegion::MsgReceive(plMessage* msg) +bool plSwimStraightCurrentRegion::MsgReceive(plMessage* msg) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg); if (refMsg) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.h b/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.h index 5c071bc6..f09883c2 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.h +++ b/Sources/Plasma/PubUtilLib/plAvatar/plSwimRegion.h @@ -87,7 +87,7 @@ public: virtual void Write(hsStream* stream, hsResMgr* mgr); virtual void GetCurrent(plPhysicalControllerCore *physical, hsVector3 &linearResult, float &angularResult, float elapsed); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); float fRotation; float fPullNearDistSq; @@ -112,7 +112,7 @@ public: virtual void Write(hsStream* stream, hsResMgr* mgr); virtual void GetCurrent(plPhysicalControllerCore *physical, hsVector3 &linearResult, float &angularResult, float elapsed); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); float fNearDist; float fNearVel; diff --git a/Sources/Plasma/PubUtilLib/plCompression/plCompress.h b/Sources/Plasma/PubUtilLib/plCompression/plCompress.h index 7992ab91..d4a03848 100644 --- a/Sources/Plasma/PubUtilLib/plCompression/plCompress.h +++ b/Sources/Plasma/PubUtilLib/plCompression/plCompress.h @@ -54,12 +54,12 @@ public: virtual ~plCompress() {} // return true if successful - virtual hsBool Uncompress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn) = 0; - virtual hsBool Compress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn) = 0; + virtual bool Uncompress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn) = 0; + virtual bool Compress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn) = 0; // in place versions - virtual hsBool Uncompress(uint8_t** bufIn, uint32_t* bufLenIn, uint32_t maxBufLenOut, int offset=0) = 0; - virtual hsBool Compress(uint8_t** bufIn, uint32_t* bufLenIn, int offset=0) = 0; + virtual bool Uncompress(uint8_t** bufIn, uint32_t* bufLenIn, uint32_t maxBufLenOut, int offset=0) = 0; + virtual bool Compress(uint8_t** bufIn, uint32_t* bufLenIn, int offset=0) = 0; }; diff --git a/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.cpp b/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.cpp index b39823bc..34c91327 100644 --- a/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.cpp +++ b/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.cpp @@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsMemory.h" #include "hsStream.h" -hsBool plZlibCompress::Uncompress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn) +bool plZlibCompress::Uncompress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn) { unsigned long buflen_out = *bufLenOut; bool result = (uncompress(bufOut, &buflen_out, bufIn, bufLenIn) == Z_OK); @@ -52,7 +52,7 @@ hsBool plZlibCompress::Uncompress(uint8_t* bufOut, uint32_t* bufLenOut, const ui return result; } -hsBool plZlibCompress::Compress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn) +bool plZlibCompress::Compress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn) { // according to compress doc, the bufOut buffer should be at least .1% larger than source buffer, plus 12 bytes. hsAssert(*bufLenOut>=(int)(bufLenIn*1.1+12), "bufOut compress buffer is not large enough"); @@ -65,7 +65,7 @@ hsBool plZlibCompress::Compress(uint8_t* bufOut, uint32_t* bufLenOut, const uint // // copy bufOut to bufIn, set bufLenIn=bufLenOut // -hsBool plZlibCompress::ICopyBuffers(uint8_t** bufIn, uint32_t* bufLenIn, char* bufOut, uint32_t bufLenOut, int offset, bool ok) +bool plZlibCompress::ICopyBuffers(uint8_t** bufIn, uint32_t* bufLenIn, char* bufOut, uint32_t bufLenOut, int offset, bool ok) { if (ok) { @@ -87,7 +87,7 @@ hsBool plZlibCompress::ICopyBuffers(uint8_t** bufIn, uint32_t* bufLenIn, char* b // In place version // offset is how much to skip over when compressing // -hsBool plZlibCompress::Compress(uint8_t** bufIn, uint32_t* bufLenIn, int offset) +bool plZlibCompress::Compress(uint8_t** bufIn, uint32_t* bufLenIn, int offset) { uint32_t adjBufLenIn = *bufLenIn - offset; uint8_t* adjBufIn = *bufIn + offset; @@ -104,7 +104,7 @@ hsBool plZlibCompress::Compress(uint8_t** bufIn, uint32_t* bufLenIn, int offset) // // In place version // -hsBool plZlibCompress::Uncompress(uint8_t** bufIn, uint32_t* bufLenIn, uint32_t bufLenOut, int offset) +bool plZlibCompress::Uncompress(uint8_t** bufIn, uint32_t* bufLenIn, uint32_t bufLenOut, int offset) { uint32_t adjBufLenIn = *bufLenIn - offset; uint8_t* adjBufIn = *bufIn + offset; @@ -120,11 +120,11 @@ hsBool plZlibCompress::Uncompress(uint8_t** bufIn, uint32_t* bufLenIn, uint32_t #define kGzBufferSize 64 * 1024 #if 1 -hsBool plZlibCompress::UncompressFile( const char *compressedPath, const char *destPath ) +bool plZlibCompress::UncompressFile( const char *compressedPath, const char *destPath ) { gzFile inFile; FILE *outFile; - hsBool worked = false; + bool worked = false; int length, err; uint8_t buffer[ kGzBufferSize ]; @@ -162,11 +162,11 @@ hsBool plZlibCompress::UncompressFile( const char *compressedPath, const char * } -hsBool plZlibCompress::CompressFile( const char *uncompressedPath, const char *destPath ) +bool plZlibCompress::CompressFile( const char *uncompressedPath, const char *destPath ) { FILE *inFile; gzFile outFile; - hsBool worked = false; + bool worked = false; int length, err; uint8_t buffer[ kGzBufferSize ]; @@ -207,10 +207,10 @@ hsBool plZlibCompress::CompressFile( const char *uncompressedPath, const char * //// file <-> stream /////////////////////////////////////////////////////// -hsBool plZlibCompress::UncompressToStream( const char * filename, hsStream * s ) +bool plZlibCompress::UncompressToStream( const char * filename, hsStream * s ) { gzFile inFile; - hsBool worked = false; + bool worked = false; int length, err; uint8_t buffer[ kGzBufferSize ]; @@ -242,10 +242,10 @@ hsBool plZlibCompress::UncompressToStream( const char * filename, hsStream * s } -hsBool plZlibCompress::CompressToFile( hsStream * s, const char * filename ) +bool plZlibCompress::CompressToFile( hsStream * s, const char * filename ) { gzFile outFile; - hsBool worked = false; + bool worked = false; int length, err; uint8_t buffer[ kGzBufferSize ]; diff --git a/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.h b/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.h index b34f5a15..130e1f8c 100644 --- a/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.h +++ b/Sources/Plasma/PubUtilLib/plCompression/plZlibCompress.h @@ -49,22 +49,22 @@ class hsStream; class plZlibCompress : public plCompress { protected: - hsBool ICopyBuffers(uint8_t** bufIn, uint32_t* bufLenIn, char* bufOut, uint32_t bufLenOut, int offset, bool ok ); + bool ICopyBuffers(uint8_t** bufIn, uint32_t* bufLenIn, char* bufOut, uint32_t bufLenOut, int offset, bool ok ); public: - hsBool Uncompress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn); - hsBool Compress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn); + bool Uncompress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn); + bool Compress(uint8_t* bufOut, uint32_t* bufLenOut, const uint8_t* bufIn, uint32_t bufLenIn); // in place versions - hsBool Uncompress(uint8_t** bufIn, uint32_t* bufLenIn, uint32_t maxBufLenOut, int offset=0); - hsBool Compress(uint8_t** bufIn, uint32_t* bufLenIn, int offset=0); + bool Uncompress(uint8_t** bufIn, uint32_t* bufLenIn, uint32_t maxBufLenOut, int offset=0); + bool Compress(uint8_t** bufIn, uint32_t* bufLenIn, int offset=0); // .gz versions - static hsBool UncompressFile( const char *compressedPath, const char *destPath ); - static hsBool CompressFile( const char *uncompressedPath, const char *destPath ); + static bool UncompressFile( const char *compressedPath, const char *destPath ); + static bool CompressFile( const char *uncompressedPath, const char *destPath ); // file <-> stream - static hsBool UncompressToStream( const char * filename, hsStream * s ); - static hsBool CompressToFile( hsStream * s, const char * filename ); + static bool UncompressToStream( const char * filename, hsStream * s ); + static bool CompressToFile( hsStream * s, const char * filename ); }; #endif // plZlibCompress_h diff --git a/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.cpp b/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.cpp index f8fcbb35..9d108458 100644 --- a/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.cpp +++ b/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.cpp @@ -61,17 +61,17 @@ plZlibStream::~plZlibStream() hsAssert(!fOutput && !fZStream, "plZlibStream not closed"); } -hsBool plZlibStream::Open(const char* filename, const char* mode) +bool plZlibStream::Open(const char* filename, const char* mode) { wchar_t* wFilename = hsStringToWString(filename); wchar_t* wMode = hsStringToWString(mode); - hsBool ret = Open(wFilename, wMode); + bool ret = Open(wFilename, wMode); delete [] wFilename; delete [] wMode; return ret; } -hsBool plZlibStream::Open(const wchar_t* filename, const wchar_t* mode) +bool plZlibStream::Open(const wchar_t* filename, const wchar_t* mode) { fFilename = filename; fMode = mode; @@ -80,7 +80,7 @@ hsBool plZlibStream::Open(const wchar_t* filename, const wchar_t* mode) return fOutput->Open(filename, L"wb"); } -hsBool plZlibStream::Close() +bool plZlibStream::Close() { if (fOutput) { @@ -277,7 +277,7 @@ int plZlibStream::IValidateGzHeader(uint32_t byteCount, const void* buffer) return clipBuffer; } -hsBool plZlibStream::AtEnd() +bool plZlibStream::AtEnd() { hsAssert(0, "AtEnd not supported"); return true; diff --git a/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.h b/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.h index 2c42153d..e543aef3 100644 --- a/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.h +++ b/Sources/Plasma/PubUtilLib/plCompression/plZlibStream.h @@ -68,10 +68,10 @@ public: plZlibStream(); virtual ~plZlibStream(); - virtual hsBool Open(const char* filename, const char* mode); - virtual hsBool Open(const wchar_t* filename, const wchar_t* mode); - virtual hsBool Close(); - virtual uint32_t Write(uint32_t byteCount, const void* buffer); + virtual bool Open(const char* filename, const char* mode); + virtual bool Open(const wchar_t* filename, const wchar_t* mode); + virtual bool Close(); + virtual uint32_t Write(uint32_t byteCount, const void* buffer); // Since most functions don't check the return value from Write, you can // call this after you've passed in all your data to determine if it @@ -79,12 +79,12 @@ public: bool DecompressedOk() { return fDecompressedOk; } // You can't use these - virtual hsBool AtEnd(); - virtual uint32_t Read(uint32_t byteCount, void* buffer); - virtual void Skip(uint32_t deltaByteCount); - virtual void Rewind(); - virtual void FastFwd(); - virtual uint32_t GetEOF(); + virtual bool AtEnd(); + virtual uint32_t Read(uint32_t byteCount, void* buffer); + virtual void Skip(uint32_t deltaByteCount); + virtual void Rewind(); + virtual void FastFwd(); + virtual uint32_t GetEOF(); }; #endif // plZlibStream_h_inc \ No newline at end of file diff --git a/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp b/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp index 586bd057..68daf023 100644 --- a/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp +++ b/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.cpp @@ -100,7 +100,7 @@ void hsStringTable::Register(const char* str, void* data) // Iterate through the tree and call the callback function on each child node // of the fromNode (or the root if fromNode is nil) // -hsBool hsStringTable::Iterate(hsStringTableCallback* callback, Node* fromNode) +bool hsStringTable::Iterate(hsStringTableCallback* callback, Node* fromNode) { if (!fromNode) fromNode = &root; @@ -110,7 +110,7 @@ hsBool hsStringTable::Iterate(hsStringTableCallback* callback, Node* fromNode) // // Recursively find node, create if needed? // -hsStringTable::Node* hsStringTable::FindRecur(Node* root, const char* str, hsBool createIfNeeded) +hsStringTable::Node* hsStringTable::FindRecur(Node* root, const char* str, bool createIfNeeded) { if (!root || !str) return nil; if (tolower(root->chr)==tolower(*str)) @@ -216,7 +216,7 @@ void hsStringTable::RemoveNode(Node* root) // // Recurse through tree and call callback on each node // -hsBool hsStringTable::IterateRecur(Node* root, hsStringTableCallback* callback) +bool hsStringTable::IterateRecur(Node* root, hsStringTableCallback* callback) { if (!root) return true; diff --git a/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.h b/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.h index 4d8bd0d2..dcda2375 100644 --- a/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.h +++ b/Sources/Plasma/PubUtilLib/plContainer/hsStringTable.h @@ -69,15 +69,15 @@ public: Node* FindPartial(char* str, int32_t len=0) const; void Register(const char* str, void* data); - typedef hsBool (hsStringTableCallback)(Node*); - hsBool Iterate(hsStringTableCallback* callback, Node* fromNode=nil); + typedef bool (hsStringTableCallback)(Node*); + bool Iterate(hsStringTableCallback* callback, Node* fromNode=nil); private: - Node* FindRecur(Node* root, const char* str, hsBool createIfNeeded=false); + Node* FindRecur(Node* root, const char* str, bool createIfNeeded=false); Node* FindPartialRecur(Node* root, char* str, int32_t len) const; Node* AddRecur(Node* root, const char* str); Node* FindLeafRecur(Node* root, char* str, int32_t len) const; void RemoveNode(Node* root); - hsBool IterateRecur(Node* root, hsStringTableCallback* callback); + bool IterateRecur(Node* root, hsStringTableCallback* callback); Node root; }; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.cpp index 22eb711b..ce9524d5 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.cpp @@ -132,7 +132,7 @@ void plAccessGeometry::SetTheIntance(plAccessGeometry* i) // The first couple of these just interpret between the SceneObjects we like to // think about and the clumps of geometry that comprise each one. -void plAccessGeometry::OpenRO(const plDrawInterface* di, hsTArray& accs, hsBool useSnap) const +void plAccessGeometry::OpenRO(const plDrawInterface* di, hsTArray& accs, bool useSnap) const { int numGot = 0; accs.SetCount(di->GetNumDrawables()); @@ -160,7 +160,7 @@ void plAccessGeometry::OpenRO(const plDrawInterface* di, hsTArray& } -void plAccessGeometry::OpenRW(const plDrawInterface* di, hsTArray& accs, hsBool idxToo) const +void plAccessGeometry::OpenRW(const plDrawInterface* di, hsTArray& accs, bool idxToo) const { int numGot = 0; accs.Expand(di->GetNumDrawables()); @@ -271,7 +271,7 @@ void plAccessGeometry::Close(plAccessSpan& acc) const fPipe->CloseAccess(acc); } -void plAccessGeometry::IOpen(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, hsBool useSnap, hsBool readOnly, hsBool idxToo) const +void plAccessGeometry::IOpen(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, bool useSnap, bool readOnly, bool idxToo) const { acc.SetType(plAccessSpan::kUndefined); @@ -304,12 +304,12 @@ void plAccessGeometry::IOpen(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, } } -void plAccessGeometry::OpenRO(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, hsBool useSnap) const +void plAccessGeometry::OpenRO(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, bool useSnap) const { IOpen(d, spanIdx, acc, useSnap, true); } -void plAccessGeometry::OpenRW(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, hsBool idxToo) const +void plAccessGeometry::OpenRW(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, bool idxToo) const { IOpen(drawable, spanIdx, acc, false, false, idxToo); @@ -399,7 +399,7 @@ void plAccessGeometry::IAccessSpanFromSourceSpan(plAccessSpan& dst, const plGeom acc.fVtxDeviceRef = nil; } -void plAccessGeometry::IAccessSpanFromSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* span, hsBool useSnap, hsBool readOnly) const +void plAccessGeometry::IAccessSpanFromSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* span, bool useSnap, bool readOnly) const { dst.SetType(plAccessSpan::kUndefined); dst.SetSource(const_cast (span)); @@ -426,7 +426,7 @@ void plAccessGeometry::IAccessSpanFromSnap(plAccessSpan& dst, plDrawableSpans* d } } -void plAccessGeometry::IAccessSpanFromVertexSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plVertexSpan* span, hsBool readOnly) const +void plAccessGeometry::IAccessSpanFromVertexSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plVertexSpan* span, bool readOnly) const { dst.SetMaterial(drawable->GetMaterial(span->fMaterialIdx)); @@ -436,9 +436,9 @@ void plAccessGeometry::IAccessSpanFromVertexSpan(plAccessSpan& dst, plDrawableSp //#define MF_TOSSER #ifndef MF_TOSSER - plConst(hsBool) useDev(false); + plConst(bool) useDev(false); #else // MF_TOSSER - plConst(hsBool) useDev(true); + plConst(bool) useDev(true); #endif // MF_TOSSER if( useDev && !drawable->GetNativeProperty(plDrawable::kPropVolatile) && grp->GetVertexBufferRef(span->fVBufferIdx) ) { @@ -573,7 +573,7 @@ void plAccessGeometry::IAccessConnectivity(plAccessSpan& dst, plDrawableSpans* d } -void plAccessGeometry::IAccessSpanFromIcicle(plAccessSpan& dst, plDrawableSpans* drawable, const plIcicle* span, hsBool readOnly) const +void plAccessGeometry::IAccessSpanFromIcicle(plAccessSpan& dst, plDrawableSpans* drawable, const plIcicle* span, bool readOnly) const { dst.SetType(plAccessSpan::kTri); @@ -588,7 +588,7 @@ void plAccessGeometry::IAccessSpanFromIcicle(plAccessSpan& dst, plDrawableSpans* acc.fIdxDeviceRef = nil; } -void plAccessGeometry::IAccessSpanFromParticle(plAccessSpan& dst, plDrawableSpans* drawable, const plParticleSpan* span, hsBool readOnly) const +void plAccessGeometry::IAccessSpanFromParticle(plAccessSpan& dst, plDrawableSpans* drawable, const plParticleSpan* span, bool readOnly) const { hsAssert(false, "Aint got to it yet"); // dst.SetType(plAccessSpan::kParty); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.h b/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.h index 3fd891a0..6c10ebc4 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plAccessGeometry.h @@ -108,8 +108,8 @@ public: // then take the snapshot if you are going to be performing more modifications. // In ALL MODIFICATION CASES, if the modified data is paged out, and the original paged back in, you will // need to perform your operation again - your modifications aren't saved anywhere. - void OpenRO(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, hsBool useSnapShot=true) const; - void OpenRW(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, hsBool idxToo=false) const; + void OpenRO(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, bool useSnapShot=true) const; + void OpenRW(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, bool idxToo=false) const; // What do we need to close up here? void Close(plAccessSpan& acc) const; @@ -126,8 +126,8 @@ public: // as likely that they will have different underlying formats (number of UVs, etc.). // Again, if you are using the iterators supplied, you probably don't care, but sometimes // you will (like if you are messing with the UVs). - void OpenRO(const plDrawInterface* di, hsTArray& accs, hsBool useSnapShot=true) const; - void OpenRW(const plDrawInterface* di, hsTArray& accs, hsBool idxToo=false) const; + void OpenRO(const plDrawInterface* di, hsTArray& accs, bool useSnapShot=true) const; + void OpenRW(const plDrawInterface* di, hsTArray& accs, bool idxToo=false) const; void Close(hsTArray& accs) const; @@ -162,14 +162,14 @@ public: protected: void IAccessSpanFromSourceSpan(plAccessSpan& dst, const plGeometrySpan* src) const; - void IAccessSpanFromSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* span, hsBool useSnap, hsBool readOnly) const; - void IAccessSpanFromVertexSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plVertexSpan* span, hsBool readOnly) const; + void IAccessSpanFromSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* span, bool useSnap, bool readOnly) const; + void IAccessSpanFromVertexSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plVertexSpan* span, bool readOnly) const; void IAccessConnectivity(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* src) const; - void IAccessSpanFromIcicle(plAccessSpan& dst, plDrawableSpans* drawable, const plIcicle* span, hsBool readOnly) const; - void IAccessSpanFromParticle(plAccessSpan& dst, plDrawableSpans* drawable, const plParticleSpan* span, hsBool readOnly) const; + void IAccessSpanFromIcicle(plAccessSpan& dst, plDrawableSpans* drawable, const plIcicle* span, bool readOnly) const; + void IAccessSpanFromParticle(plAccessSpan& dst, plDrawableSpans* drawable, const plParticleSpan* span, bool readOnly) const; void IAccessSpanFromSnap(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* src) const; - void IOpen(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, hsBool useSnap, hsBool readOnly, hsBool idxToo=true) const; + void IOpen(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, bool useSnap, bool readOnly, bool idxToo=true) const; }; #endif // plAccessGeometry_inc diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plAccessSpan.h b/Sources/Plasma/PubUtilLib/plDrawable/plAccessSpan.h index 1265b10a..c75117bf 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plAccessSpan.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plAccessSpan.h @@ -97,9 +97,9 @@ public: void SetType(AccessType t) { fType = t; } AccessType GetType() const { return fType; } - hsBool HasAccessTri() const { return fType == kTri; } - hsBool HasAccessParty() const { return fType == kParty; } - hsBool HasAccessVtx() const { return fType != kUndefined; } + bool HasAccessTri() const { return fType == kTri; } + bool HasAccessParty() const { return fType == kParty; } + bool HasAccessVtx() const { return fType != kUndefined; } plAccessTriSpan& AccessTri() { hsAssert(fType == kTri, "Cross type access"); return fAccess.fAccessTri; } plAccessPartySpan& AccessParty() { hsAssert(fType == kParty, "Cross type access"); return fAccess.fAccessParty; } @@ -118,7 +118,7 @@ public: void SetLocalBounds(const hsBounds3Ext& bnd) { *fWorldBounds = *fLocalBounds = bnd; fWorldBounds->Transform(fLocalToWorld); } void SetWorldBounds(const hsBounds3Ext& wBnd) { *fWorldBounds = wBnd; } - hsBool HasWaterHeight() const { return nil != fWaterHeight; } + bool HasWaterHeight() const { return nil != fWaterHeight; } float GetWaterHeight() const { hsAssert(HasWaterHeight(), "Check before asking"); return *fWaterHeight; } }; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plAccessTriSpan.h b/Sources/Plasma/PubUtilLib/plDrawable/plAccessTriSpan.h index fff7b888..c49f1a2d 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plAccessTriSpan.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plAccessTriSpan.h @@ -79,7 +79,7 @@ public: void Begin(); void Advance(); void SetTri(int i); - hsBool More() const; + bool More() const; uint32_t NumTris() const { return fAccess->fNumTris; } @@ -121,7 +121,7 @@ inline void plAccTriIterator::SetTri(int i) fCurrIdx = fAccess->fTris + i * 3; } -inline hsBool plAccTriIterator::More() const +inline bool plAccTriIterator::More() const { return fCurrIdx < fEndIdx; } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plAccessVtxSpan.h b/Sources/Plasma/PubUtilLib/plDrawable/plAccessVtxSpan.h index ce7fd7b0..1bea9fa6 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plAccessVtxSpan.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plAccessVtxSpan.h @@ -114,16 +114,16 @@ public: // QUERY SECTION // Queries on how much of what we got. uint32_t VertCount() const { return fNumVerts; } - hsBool HasChannel(Channel chan) const { return fStrides[chan] > 0; } - hsBool HasPositions() const { return HasChannel(kPosition); } - hsBool HasWeights() const { return HasChannel(kWeight); } + bool HasChannel(Channel chan) const { return fStrides[chan] > 0; } + bool HasPositions() const { return HasChannel(kPosition); } + bool HasWeights() const { return HasChannel(kWeight); } int NumWeights() const { return fNumWeights; } - hsBool HasWgtIndex() const { return HasChannel(kWgtIndex); } - hsBool HasNormals() const { return HasChannel(kNormal); } - hsBool HasDiffuse() const { return HasChannel(kDiffuse); } - hsBool HasSpecular() const { return HasChannel(kSpecular); } - hsBool HasUVWs() const { return HasChannel(kUVW); } - hsBool HasUVWs(int n) { return HasChannel(kUVW) && (n <= fNumUVWsPerVert); } + bool HasWgtIndex() const { return HasChannel(kWgtIndex); } + bool HasNormals() const { return HasChannel(kNormal); } + bool HasDiffuse() const { return HasChannel(kDiffuse); } + bool HasSpecular() const { return HasChannel(kSpecular); } + bool HasUVWs() const { return HasChannel(kUVW); } + bool HasUVWs(int n) { return HasChannel(kUVW) && (n <= fNumUVWsPerVert); } int NumUVWs() const { return fNumUVWsPerVert; } ////////////////////////////////// @@ -246,7 +246,7 @@ public: void Begin() { fValueByte = fAccess->fChannels[fChan]; } void Advance() { fValueByte += fAccess->fStrides[fChan]; } - hsBool More() const { return fValueByte < fValueEnd; } + bool More() const { return fValueByte < fValueEnd; } }; class plAccPositionIterator @@ -270,7 +270,7 @@ public: void Begin() { fPosition.Begin(); } void Advance() { fPosition.Advance(); } - hsBool More() const { return fPosition.More(); } + bool More() const { return fPosition.More(); } }; class plAccPosNormIterator @@ -297,7 +297,7 @@ public: void Begin() { fPosition.Begin(); fNormal.Begin(); } void Advance() { fPosition.Advance(); fNormal.Advance(); } - hsBool More() const { return fPosition.More(); } + bool More() const { return fPosition.More(); } }; class plAccPosNormUVWIterator @@ -328,7 +328,7 @@ public: void Begin() { fPosition.Begin(); fNormal.Begin(); fUVW.Begin(); } void Advance() { fPosition.Advance(); fNormal.Advance(); fUVW.Advance(); } - hsBool More() const { return fPosition.More(); } + bool More() const { return fPosition.More(); } }; class plAccUVWIterator @@ -350,7 +350,7 @@ public: void Begin() { fUVW.Begin(); } void Advance() { fUVW.Advance(); } - hsBool More() const { return fUVW.More(); } + bool More() const { return fUVW.More(); } }; class plAccDiffuseIterator @@ -373,7 +373,7 @@ public: void Begin() { fDiffuse.Begin(); } void Advance() { fDiffuse.Advance(); } - hsBool More() const { return fDiffuse.More(); } + bool More() const { return fDiffuse.More(); } }; class plAccDiffSpecIterator @@ -402,7 +402,7 @@ public: void Begin() { fDiffuse.Begin(); fSpecular.Begin(); } void Advance() { fDiffuse.Advance(); fSpecular.Advance(); } - hsBool More() const { return fDiffuse.More(); } + bool More() const { return fDiffuse.More(); } }; @@ -456,7 +456,7 @@ public: void Begin() { fPosition.Begin(); fWeight.Begin(); fNormal.Begin(); fDiffuse.Begin(); fSpecular.Begin(); fUVW.Begin(); } void Advance() { fPosition.Advance(); fWeight.Advance(); fNormal.Advance(); fDiffuse.Begin(); fSpecular.Begin(); fUVW.Advance(); } - hsBool More() const { return fPosition.More(); } + bool More() const { return fPosition.More(); } }; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.cpp index 1d57ed1e..4cc0f8e4 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.cpp @@ -90,7 +90,7 @@ void plActivePrintShape::AddDecalKey(const plKey& k) fDecalMgrs.Append(k); } -hsBool plActivePrintShape::MsgReceive(plMessage* msg) +bool plActivePrintShape::MsgReceive(plMessage* msg) { plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg); if( eval ) @@ -101,7 +101,7 @@ hsBool plActivePrintShape::MsgReceive(plMessage* msg) return plPrintShape::MsgReceive(msg); } -hsBool plActivePrintShape::INotify() +bool plActivePrintShape::INotify() { if( !fShapeMsg ) ISetupShapeMsg(); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.h b/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.h index fac16892..d6ad60d2 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plActivePrintShape.h @@ -55,7 +55,7 @@ protected: plRippleShapeMsg* fShapeMsg; plRippleShapeMsg* ISetupShapeMsg(); - hsBool INotify(); + bool INotify(); public: plActivePrintShape(); @@ -67,7 +67,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // Export construction void AddDecalKey(const plKey& k); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.cpp index 893aef5e..86865cc4 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.cpp @@ -176,7 +176,7 @@ void plClusterGroup::ISendToSelf(RefType t, hsKeyedObject* ref) hsgResMgr::ResMgr()->SendRef(ref->GetKey(), refMsg, plRefFlags::kActiveRef); } -hsBool plClusterGroup::IAddVisRegion(plVisRegion* reg) +bool plClusterGroup::IAddVisRegion(plVisRegion* reg) { if( reg ) { @@ -197,7 +197,7 @@ hsBool plClusterGroup::IAddVisRegion(plVisRegion* reg) return true; } -hsBool plClusterGroup::IRemoveVisRegion(plVisRegion* reg) +bool plClusterGroup::IRemoveVisRegion(plVisRegion* reg) { if( reg ) { @@ -214,7 +214,7 @@ hsBool plClusterGroup::IRemoveVisRegion(plVisRegion* reg) return true; } -hsBool plClusterGroup::IAddLight(plLightInfo* li) +bool plClusterGroup::IAddLight(plLightInfo* li) { int idx = fLights.Find(li); if( fLights.kMissingIndex == idx ) @@ -224,7 +224,7 @@ hsBool plClusterGroup::IAddLight(plLightInfo* li) return true; } -hsBool plClusterGroup::IRemoveLight(plLightInfo* li) +bool plClusterGroup::IRemoveLight(plLightInfo* li) { int idx = fLights.Find(li); if( fLights.kMissingIndex != idx ) @@ -234,7 +234,7 @@ hsBool plClusterGroup::IRemoveLight(plLightInfo* li) return true; } -hsBool plClusterGroup::IOnReceive(plGenRefMsg* ref) +bool plClusterGroup::IOnReceive(plGenRefMsg* ref) { switch( ref->fType ) { @@ -249,7 +249,7 @@ hsBool plClusterGroup::IOnReceive(plGenRefMsg* ref) return false; } -hsBool plClusterGroup::IOnRemove(plGenRefMsg* ref) +bool plClusterGroup::IOnRemove(plGenRefMsg* ref) { int idx = -1; switch( ref->fType ) @@ -265,7 +265,7 @@ hsBool plClusterGroup::IOnRemove(plGenRefMsg* ref) return false; } -hsBool plClusterGroup::IOnRef(plGenRefMsg* ref) +bool plClusterGroup::IOnRef(plGenRefMsg* ref) { if( ref->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) ) { @@ -275,7 +275,7 @@ hsBool plClusterGroup::IOnRef(plGenRefMsg* ref) return IOnRemove(ref); } -hsBool plClusterGroup::MsgReceive(plMessage* msg) +bool plClusterGroup::MsgReceive(plMessage* msg) { plGenRefMsg* ref = plGenRefMsg::ConvertNoRef(msg); if( ref ) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.h b/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.h index 7bd2546d..079e542c 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plClusterGroup.h @@ -108,13 +108,13 @@ protected: plRenderLevel fRenderLevel; - hsBool IAddVisRegion(plVisRegion* reg); - hsBool IRemoveVisRegion(plVisRegion* reg); - hsBool IAddLight(plLightInfo* li); - hsBool IRemoveLight(plLightInfo* li); - hsBool IOnRef(plGenRefMsg* ref); - hsBool IOnRemove(plGenRefMsg* ref); - hsBool IOnReceive(plGenRefMsg* ref); + bool IAddVisRegion(plVisRegion* reg); + bool IRemoveVisRegion(plVisRegion* reg); + bool IAddLight(plLightInfo* li); + bool IRemoveLight(plLightInfo* li); + bool IOnRef(plGenRefMsg* ref); + bool IOnRemove(plGenRefMsg* ref); + bool IOnReceive(plGenRefMsg* ref); void ISetVisBits(); void ISendToSelf(RefType t, hsKeyedObject* ref); @@ -132,7 +132,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); hsGMaterial* GetMaterial() const { return fMaterial; } const hsBitVector& GetVisSet() const { return fVisSet; } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plCutter.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plCutter.cpp index 5e68ce70..a7570e4a 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plCutter.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plCutter.cpp @@ -77,7 +77,7 @@ void plCutter::Write(hsStream* stream, hsResMgr* mgr) } -void plCutter::Set(const hsPoint3& pos, const hsVector3& dir, const hsVector3& out, hsBool flip) +void plCutter::Set(const hsPoint3& pos, const hsVector3& dir, const hsVector3& out, bool flip) { hsVector3 du = dir % out; hsVector3 dv = out % du; @@ -274,7 +274,7 @@ inline void plCutter::ICutoutVtxMidW(const plCutoutVtx& inVtx, const plCutoutVtx } // IPolyClip -hsBool plCutter::IPolyClip(hsTArray& poly, const hsPoint3 vPos[]) const +bool plCutter::IPolyClip(hsTArray& poly, const hsPoint3 vPos[]) const { static hsTArray accum; accum.SetCount(0); @@ -521,7 +521,7 @@ hsBool plCutter::IPolyClip(hsTArray& poly, const hsPoint3 vPos[]) c } // IPolyClip -hsBool plCutter::IFindHitPoint(const hsTArray& inPoly, plCutoutHit& hit) const +bool plCutter::IFindHitPoint(const hsTArray& inPoly, plCutoutHit& hit) const { static hsTArray accum; static hsTArray poly; @@ -682,17 +682,17 @@ hsBool plCutter::IFindHitPoint(const hsTArray& inPoly, plCutoutHit& } -hsBool plCutter::FindHitPoints(const hsTArray& src, hsTArray& hits) const +bool plCutter::FindHitPoints(const hsTArray& src, hsTArray& hits) const { hits.SetCount(0); int iPoly; for( iPoly = 0; iPoly < src.GetCount(); iPoly++ ) { - hsBool loU = false; - hsBool hiU = false; - hsBool loV = false; - hsBool hiV = false; + bool loU = false; + bool hiU = false; + bool loV = false; + bool hiV = false; const plCutoutPoly& poly = src[iPoly]; int iv; @@ -721,7 +721,7 @@ hsBool plCutter::FindHitPoints(const hsTArray& src, hsTArray 0; } -hsBool plCutter::FindHitPointsConstHeight(const hsTArray& src, hsTArray& hits, float height) const +bool plCutter::FindHitPointsConstHeight(const hsTArray& src, hsTArray& hits, float height) const { if( FindHitPoints(src, hits) ) { @@ -741,7 +741,7 @@ void plCutter::ICutoutTransformedConstHeight(plAccessSpan& src, hsTArrayGetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha); + bool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha); plAccTriIterator tri(&src.AccessTri()); // For each tri @@ -781,7 +781,7 @@ void plCutter::ICutoutTransformed(plAccessSpan& src, hsTArray& dst hsMatrix44 l2wNorm; src.GetWorldToLocal().GetTranspose(&l2wNorm); - hsBool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha); + bool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha); plAccTriIterator tri(&src.AccessTri()); // For each tri @@ -817,7 +817,7 @@ void plCutter::ICutoutConstHeight(plAccessSpan& src, hsTArray& dst return; } - hsBool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha); + bool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha); plAccTriIterator tri(&src.AccessTri()); // For each tri @@ -865,7 +865,7 @@ void plCutter::Cutout(plAccessSpan& src, hsTArray& dst) const return; } - hsBool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha); + bool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha); plAccTriIterator tri(&src.AccessTri()); // For each tri @@ -893,7 +893,7 @@ void plCutter::Cutout(plAccessSpan& src, hsTArray& dst) const } } -void plCutter::IConstruct(hsTArray& dst, hsTArray& poly, hsBool baseHasAlpha) const +void plCutter::IConstruct(hsTArray& dst, hsTArray& poly, bool baseHasAlpha) const { int iDst = dst.GetCount(); dst.Push(); @@ -903,14 +903,14 @@ void plCutter::IConstruct(hsTArray& dst, hsTArray& po ///////////////////////////////////////////////////////////////////////////////////////////////////// -hsBool plCutter::CutoutGrid(int nWid, int nLen, plFlatGridMesh& grid) const +bool plCutter::CutoutGrid(int nWid, int nLen, plFlatGridMesh& grid) const { hsVector3 halfU = fDirU * (fLengthU * fLengthU * 0.5f); hsVector3 halfV = fDirV * (fLengthV * fLengthV * 0.5f); return MakeGrid(nWid, nLen, fWorldBounds.GetCenter(), halfU, halfV, grid); } -hsBool plCutter::MakeGrid(int nWid, int nLen, const hsPoint3& center, const hsVector3& halfU, const hsVector3& halfV, plFlatGridMesh& grid) +bool plCutter::MakeGrid(int nWid, int nLen, const hsPoint3& center, const hsVector3& halfU, const hsVector3& halfV, plFlatGridMesh& grid) { if( nWid < 3 ) nWid = 3; @@ -1040,8 +1040,8 @@ void TestCutter(const plKey& key, const hsVector3& size, const hsPoint3& pos) return; static plDrawableSpans* drawable = nil; - hsBool newDrawable = !drawable; - hsBool haveNormal = true; + bool newDrawable = !drawable; + bool haveNormal = true; hsTArray retIndex; @@ -1226,7 +1226,7 @@ void TestCutter(const plKey& key, const hsVector3& size, const hsPoint3& pos) } -void TestCutter2(const plKey& key, const hsVector3& size, const hsPoint3& pos, hsBool flip) +void TestCutter2(const plKey& key, const hsVector3& size, const hsPoint3& pos, bool flip) { plCutter cutter; @@ -1246,8 +1246,8 @@ void TestCutter2(const plKey& key, const hsVector3& size, const hsPoint3& pos, h return; static plDrawableSpans* drawable = nil; - hsBool newDrawable = !drawable; - hsBool haveNormal = true; + bool newDrawable = !drawable; + bool haveNormal = true; hsTArray retIndex; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plCutter.h b/Sources/Plasma/PubUtilLib/plDrawable/plCutter.h index 3c5d326d..ee4d40bb 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plCutter.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plCutter.h @@ -81,7 +81,7 @@ class plCutoutPoly public: hsTArray fVerts; - hsBool fBaseHasAlpha; + bool fBaseHasAlpha; }; class plCutoutMiniVtx @@ -121,8 +121,8 @@ protected: hsBounds3Ext fWorldBounds; plBoundsIsect fIsect; - void IConstruct(hsTArray& dst, hsTArray& poly, hsBool baseHasAlpha) const; - hsBool IPolyClip(hsTArray& poly, const hsPoint3 vPos[]) const; + void IConstruct(hsTArray& dst, hsTArray& poly, bool baseHasAlpha) const; + bool IPolyClip(hsTArray& poly, const hsPoint3 vPos[]) const; inline void ICutoutVtxHiU(const plCutoutVtx& inVtx, const plCutoutVtx& outVtx, plCutoutVtx& dst) const; inline void ICutoutVtxHiV(const plCutoutVtx& inVtx, const plCutoutVtx& outVtx, plCutoutVtx& dst) const; @@ -134,7 +134,7 @@ protected: inline void ICutoutVtxMidU(const plCutoutVtx& inVtx, const plCutoutVtx& outVtx, plCutoutVtx& dst) const; inline void ICutoutVtxMidW(const plCutoutVtx& inVtx, const plCutoutVtx& outVtx, plCutoutVtx& dst) const; - hsBool IFindHitPoint(const hsTArray& inPoly, plCutoutHit& hit) const; + bool IFindHitPoint(const hsTArray& inPoly, plCutoutHit& hit) const; inline void ISetPosNorm(float parm, const plCutoutVtx& inVtx, const plCutoutVtx& outVtx, plCutoutVtx& dst) const; @@ -154,13 +154,13 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - hsBool FindHitPoints(const hsTArray& src, hsTArray& hits) const; - hsBool FindHitPointsConstHeight(const hsTArray& src, hsTArray& hits, float height) const; + bool FindHitPoints(const hsTArray& src, hsTArray& hits) const; + bool FindHitPointsConstHeight(const hsTArray& src, hsTArray& hits, float height) const; - void Set(const hsPoint3& pos, const hsVector3& dir, const hsVector3& out, hsBool flip=false); + void Set(const hsPoint3& pos, const hsVector3& dir, const hsVector3& out, bool flip=false); void Cutout(plAccessSpan& src, hsTArray& dst) const; - hsBool CutoutGrid(int nWid, int nLen, plFlatGridMesh& dst) const; + bool CutoutGrid(int nWid, int nLen, plFlatGridMesh& dst) const; void SetLength(const hsVector3& s) { fLengthU = s.fX; fLengthV = s.fY; fLengthW = s.fZ; } float GetLengthU() const { return fLengthU; } @@ -171,7 +171,7 @@ public: plBoundsIsect& GetIsect() { return fIsect; } hsVector3 GetBackDir() const { return fBackDir; } - static hsBool MakeGrid(int nWid, int nLen, const hsPoint3& center, const hsVector3& halfU, const hsVector3& halfV, plFlatGridMesh& grid); + static bool MakeGrid(int nWid, int nLen, const hsPoint3& center, const hsVector3& halfU, const hsVector3& halfV, plFlatGridMesh& grid); }; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.cpp index 2e7882bc..23671816 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.cpp @@ -107,9 +107,9 @@ void plDrawableGenerator::IQuickShadeVerts( uint32_t count, hsVector3 *normal void plDrawableGenerator::IFillSpan( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals, hsPoint3 *uvws, uint32_t uvwsPerVtx, - hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor, + hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor, uint32_t numIndices, uint16_t *indices, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended, plGeometrySpan* span ) { hsTArray myNormals; @@ -196,11 +196,11 @@ void plDrawableGenerator::IFillSpan( uint32_t vertCount, hsPoint3 *positions, hs // data given. That data had better match the data the drawable was first filled // with (i.e. vertex/index count -hsBool plDrawableGenerator::RegenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals, +bool plDrawableGenerator::RegenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals, hsPoint3 *uvws, uint32_t uvwsPerVtx, - hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor, + hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor, uint32_t numIndices, uint16_t *indices, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended, uint32_t diIndex, plDrawableSpans *destDraw ) { plDISpanIndex spanList = destDraw->GetDISpans( diIndex ); @@ -236,9 +236,9 @@ hsBool plDrawableGenerator::RegenerateDrawable( uint32_t vertCount, hsPoint3 *po plDrawableSpans *plDrawableGenerator::GenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals, hsPoint3 *uvws, uint32_t uvwsPerVtx, - hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor, + hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor, uint32_t numIndices, uint16_t *indices, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended, hsTArray *retIndex, plDrawableSpans *toAddTo ) { plDrawableSpans *newDraw; @@ -286,7 +286,7 @@ plDrawableSpans *plDrawableGenerator::GenerateDrawable( uint32_t vertCount, hsPo //// GenerateSphericalDrawable /////////////////////////////////////////////// plDrawableSpans *plDrawableGenerator::GenerateSphericalDrawable( const hsPoint3& pos, float radius, hsGMaterial *material, - const hsMatrix44 &localToWorld, hsBool blended, + const hsMatrix44 &localToWorld, bool blended, const hsColorRGBA* multColor, hsTArray *retIndex, plDrawableSpans *toAddTo, float qualityScalar ) @@ -367,7 +367,7 @@ plDrawableSpans *plDrawableGenerator::GenerateSphericalDrawable( const hsPoi //// GenerateBoxDrawable ///////////////////////////////////////////////////// plDrawableSpans *plDrawableGenerator::GenerateBoxDrawable( float width, float height, float depth, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended, const hsColorRGBA* multColor, hsTArray *retIndex, plDrawableSpans *toAddTo ) { @@ -390,7 +390,7 @@ plDrawableSpans *plDrawableGenerator::GenerateBoxDrawable( float width, floa #define CALC_NORMAL( nA, xVec, yVec, zVec ) { hsVector3 n = (xVec) + (yVec) + (zVec); n = -n; n.Normalize(); nA.Append( n ); } plDrawableSpans *plDrawableGenerator::GenerateBoxDrawable( const hsPoint3 &corner, const hsVector3 &xVec, const hsVector3 &yVec, const hsVector3 &zVec, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended, const hsColorRGBA* multColor, hsTArray *retIndex, plDrawableSpans *toAddTo ) { @@ -473,7 +473,7 @@ plDrawableSpans *plDrawableGenerator::GenerateBoxDrawable( const hsPoint3 &c //// GenerateBoundsDrawable ////////////////////////////////////////////////// plDrawableSpans *plDrawableGenerator::GenerateBoundsDrawable( hsBounds3Ext *bounds, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended, const hsColorRGBA* multColor, hsTArray *retIndex, plDrawableSpans *toAddTo ) { @@ -537,7 +537,7 @@ plDrawableSpans *plDrawableGenerator::GenerateBoundsDrawable( hsBounds3Ext * //// GenerateConicalDrawable ///////////////////////////////////////////////// plDrawableSpans *plDrawableGenerator::GenerateConicalDrawable( float radius, float height, hsGMaterial *material, - const hsMatrix44 &localToWorld, hsBool blended, + const hsMatrix44 &localToWorld, bool blended, const hsColorRGBA* multColor, hsTArray *retIndex, plDrawableSpans *toAddTo ) { @@ -555,7 +555,7 @@ plDrawableSpans *plDrawableGenerator::GenerateConicalDrawable( float radius, //// GenerateConicalDrawable ///////////////////////////////////////////////// plDrawableSpans *plDrawableGenerator::GenerateConicalDrawable( hsPoint3 &apex, hsVector3 &direction, float radius, hsGMaterial *material, - const hsMatrix44 &localToWorld, hsBool blended, + const hsMatrix44 &localToWorld, bool blended, const hsColorRGBA* multColor, hsTArray *retIndex, plDrawableSpans *toAddTo ) { @@ -642,7 +642,7 @@ plDrawableSpans *plDrawableGenerator::GenerateConicalDrawable( hsPoint3 &ape //// GenerateAxesDrawable //////////////////////////////////////////////////// plDrawableSpans *plDrawableGenerator::GenerateAxesDrawable( hsGMaterial *material, - const hsMatrix44 &localToWorld, hsBool blended, + const hsMatrix44 &localToWorld, bool blended, const hsColorRGBA* multColor, hsTArray *retIndex, plDrawableSpans *toAddTo ) { @@ -713,7 +713,7 @@ plDrawableSpans *plDrawableGenerator::GenerateAxesDrawable( hsGMaterial *mat #define CALC_PNORMAL( nA, xVec, yVec ) { hsVector3 n = (xVec) % (yVec); n.Normalize(); nA.Append( n ); } plDrawableSpans *plDrawableGenerator::GeneratePlanarDrawable( const hsPoint3 &corner, const hsVector3 &xVec, const hsVector3 &yVec, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended, const hsColorRGBA* multColor, hsTArray *retIndex, plDrawableSpans *toAddTo ) { diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.h b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.h index f46d6a4e..652b09c8 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableGenerator.h @@ -76,67 +76,67 @@ class plDrawableGenerator // Refills a drawable previously created with GenerateDrawable with the new data. New data // must match previous data in counts. - hsBool RegenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals, + bool RegenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals, hsPoint3 *uvws, uint32_t uvwsPerVtx, - hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor, + hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor, uint32_t numIndices, uint16_t *indices, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended, uint32_t diIndex, plDrawableSpans *destDraw ); // Generates a drawable based on the vertex/index data given // uvws is an array vertCount*uvwsPerVtx long in order [uvw(s) for vtx0, uvw(s) for vtx1, ...], or is nil static plDrawableSpans *GenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals, hsPoint3 *uvws, uint32_t uvwsPerVtx, - hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor, + hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor, uint32_t numIndices, uint16_t *indices, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended = false, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended = false, hsTArray *retIndex = nil, plDrawableSpans *toAddTo = nil ); // Generates a spherical drawable static plDrawableSpans *GenerateSphericalDrawable( const hsPoint3& localPos, float radius, hsGMaterial *material, - const hsMatrix44 &localToWorld, hsBool blended = false, + const hsMatrix44 &localToWorld, bool blended = false, const hsColorRGBA* multColor = nil, hsTArray *retIndex = nil, plDrawableSpans *toAddTo = nil, float qualityScalar = 1.f ); // Generates a rectangular drawable static plDrawableSpans *GenerateBoxDrawable( float width, float height, float depth, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended = false, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended = false, const hsColorRGBA* multColor = nil, hsTArray *retIndex = nil, plDrawableSpans *toAddTo = nil ); // Generate a rectangular drawable based on a corner and three vectors static plDrawableSpans *GenerateBoxDrawable( const hsPoint3 &corner, const hsVector3 &xVec, const hsVector3 &yVec, const hsVector3 &zVec, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended = false, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended = false, const hsColorRGBA* multColor = nil, hsTArray *retIndex = nil, plDrawableSpans *toAddTo = nil ); // Generates a bounds-based drawable static plDrawableSpans *GenerateBoundsDrawable( hsBounds3Ext *bounds, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended = false, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended = false, const hsColorRGBA* multColor = nil, hsTArray *retIndex = nil, plDrawableSpans *toAddTo = nil ); // Generates a conical drawable static plDrawableSpans *GenerateConicalDrawable( float radius, float height, hsGMaterial *material, - const hsMatrix44 &localToWorld, hsBool blended = false, + const hsMatrix44 &localToWorld, bool blended = false, const hsColorRGBA* multColor = nil, hsTArray *retIndex = nil, plDrawableSpans *toAddTo = nil ); // Generates a general conical drawable based on a center and direction static plDrawableSpans *GenerateConicalDrawable( hsPoint3 &apex, hsVector3 &direction, float radius, hsGMaterial *material, - const hsMatrix44 &localToWorld, hsBool blended = false, + const hsMatrix44 &localToWorld, bool blended = false, const hsColorRGBA* multColor = nil, hsTArray *retIndex = nil, plDrawableSpans *toAddTo = nil ); // Generates a drawable representing 3 axes static plDrawableSpans *GenerateAxesDrawable( hsGMaterial *material, - const hsMatrix44 &localToWorld, hsBool blended = false, + const hsMatrix44 &localToWorld, bool blended = false, const hsColorRGBA* multColor = nil, hsTArray *retIndex = nil, plDrawableSpans *toAddTo = nil ); // Generate a planar drawable based on a corner and two vectors static plDrawableSpans *GeneratePlanarDrawable( const hsPoint3 &corner, const hsVector3 &xVec, const hsVector3 &yVec, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended = false, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended = false, const hsColorRGBA* multColor = nil, hsTArray *retIndex = nil, plDrawableSpans *toAddTo = nil ); @@ -155,9 +155,9 @@ class plDrawableGenerator // already in the SourceSpans. static void IFillSpan( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals, hsPoint3 *uvws, uint32_t uvwsPerVtx, - hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor, + hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor, uint32_t numIndices, uint16_t *indices, - hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended, + hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended, plGeometrySpan* span ); static hsColorRGBA fLiteColor; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp index 369dd94e..603f793b 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.cpp @@ -261,7 +261,7 @@ void plDrawableSpans::PrepForRender( plPipeline *p ) } } -void plDrawableSpans::SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* ref, hsBool on) +void plDrawableSpans::SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* ref, bool on) { // Could actually do something here to neutralize bones, but we're not. // Main thing is that if it's Matrix Only, then the indices are into @@ -272,7 +272,7 @@ void plDrawableSpans::SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* ref, hsBo plVisRegion* reg = plVisRegion::ConvertNoRef(ref); if( !reg ) return; - hsBool isNot = reg->GetProperty(plVisRegion::kIsNot); + bool isNot = reg->GetProperty(plVisRegion::kIsNot); uint32_t visRegIndex = reg->GetIndex(); if( isNot ) @@ -400,7 +400,7 @@ void plDrawableSpans::IUpdateMatrixPaletteBoundsHack() } } -hsBool plDrawableSpans::IBoundsInvalid(const hsBounds3Ext& bnd) const +bool plDrawableSpans::IBoundsInvalid(const hsBounds3Ext& bnd) const { int i; for( i = 0; i < 3; i++ ) @@ -648,7 +648,7 @@ const hsMatrix44& plDrawableSpans::GetWorldToLocal( uint32_t span ) const //// Set/GetNativeProperty /////////////////////////////////////////////////// -plDrawable& plDrawableSpans::SetNativeProperty( uint32_t index, int prop, hsBool on) +plDrawable& plDrawableSpans::SetNativeProperty( uint32_t index, int prop, bool on) { int i; @@ -684,7 +684,7 @@ plDrawable& plDrawableSpans::SetNativeProperty( uint32_t index, int prop, hsBool return *this; } -hsBool plDrawableSpans::GetNativeProperty( uint32_t index, int prop ) const +bool plDrawableSpans::GetNativeProperty( uint32_t index, int prop ) const { int i; uint32_t ret = false; @@ -709,7 +709,7 @@ hsBool plDrawableSpans::GetNativeProperty( uint32_t index, int prop ) const return ret != 0; } -plDrawable& plDrawableSpans::SetSubType(uint32_t index, plSubDrawableType t, hsBool on) +plDrawable& plDrawableSpans::SetSubType(uint32_t index, plSubDrawableType t, bool on) { if( uint32_t(-1) == index ) { @@ -770,7 +770,7 @@ uint32_t plDrawableSpans::GetSubType(uint32_t index) const //// IXlateSpanProps ///////////////////////////////////////////////////////// // Never used yet--just here in case we ever need it -uint32_t plDrawableSpans::IXlateSpanProps( uint32_t props, hsBool xlateToSpan ) +uint32_t plDrawableSpans::IXlateSpanProps( uint32_t props, bool xlateToSpan ) { uint32_t retProps = 0; @@ -796,7 +796,7 @@ uint32_t plDrawableSpans::IXlateSpanProps( uint32_t props, hsBool xlateToSpan ) // flag taken in is from plDrawInterface, not our props flags. So we have to // translate... -plDrawable& plDrawableSpans::SetProperty( uint32_t index, int diProp, hsBool on ) +plDrawable& plDrawableSpans::SetProperty( uint32_t index, int diProp, bool on ) { switch( diProp ) { @@ -809,7 +809,7 @@ plDrawable& plDrawableSpans::SetProperty( uint32_t index, int diProp, hsBool on return *this; } -hsBool plDrawableSpans::GetProperty( uint32_t index, int diProp ) const +bool plDrawableSpans::GetProperty( uint32_t index, int diProp ) const { switch( diProp ) { @@ -822,7 +822,7 @@ hsBool plDrawableSpans::GetProperty( uint32_t index, int diProp ) const return false; } -plDrawable& plDrawableSpans::SetProperty( int prop, hsBool on ) +plDrawable& plDrawableSpans::SetProperty( int prop, bool on ) { switch( prop ) { @@ -844,7 +844,7 @@ plDrawable& plDrawableSpans::SetProperty( int prop, hsBool on ) return *this; } -hsBool plDrawableSpans::GetProperty( int prop ) const +bool plDrawableSpans::GetProperty( int prop ) const { switch( prop ) { @@ -922,7 +922,7 @@ const hsBounds3Ext& plDrawableSpans::GetMaxWorldBounds( uint32_t index ) const void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) { uint32_t i, j, count, count2; - hsBool gotSkin = false; + bool gotSkin = false; plGBufferGroup *group; plRefMsg *refMsg; @@ -1115,7 +1115,7 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) //// ITestMatForSpecularity ////////////////////////////////////////////////// -hsBool plDrawableSpans::ITestMatForSpecularity( hsGMaterial *mat ) +bool plDrawableSpans::ITestMatForSpecularity( hsGMaterial *mat ) { int i; @@ -1134,11 +1134,11 @@ hsBool plDrawableSpans::ITestMatForSpecularity( hsGMaterial *mat ) plProfile_CreateTimer("MatrixPalleteHack", "RenderSetup", PalletteHack); //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool plDrawableSpans::MsgReceive( plMessage* msg ) +bool plDrawableSpans::MsgReceive( plMessage* msg ) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg ); int i; - hsBool hasSpec; + bool hasSpec; if( refMsg ) @@ -1396,7 +1396,7 @@ const plRenderLevel& plDrawableSpans::GetRenderLevel() const //// DoIMatch //////////////////////////////////////////////////////////////// // Called by the sceneNode to determine if we match the criteria -hsBool plDrawableSpans::DoIMatch( const plDrawableCriteria& crit ) +bool plDrawableSpans::DoIMatch( const plDrawableCriteria& crit ) { if( crit.fCriteria ^ fCriteria ) return false; @@ -1507,7 +1507,7 @@ hsGMaterial* plDrawableSpans::GetSubMaterial(int index) const } // return true if span invisible before minDist and/or after maxDist -hsBool plDrawableSpans::GetSubVisDists(int index, float& minDist, float& maxDist) const +bool plDrawableSpans::GetSubVisDists(int index, float& minDist, float& maxDist) const { return (minDist = fSpans[index]->GetMinDist()) < (maxDist = fSpans[index]->GetMaxDist()); } @@ -2240,7 +2240,7 @@ uint32_t plDrawableSpans::AppendDIMatrixSpans(int n) // and the transform of the object being skinned. In general, objects can only // share a palette set if they have been flattened into world space (the object's // transform is identity). Fortunately, this is a common case. -uint32_t plDrawableSpans::FindBoneBaseMatrix(const hsTArray& initL2B, hsBool searchAll) const +uint32_t plDrawableSpans::FindBoneBaseMatrix(const hsTArray& initL2B, bool searchAll) const { if (!searchAll) { @@ -2334,8 +2334,8 @@ plDISpanIndex *plDrawableSpans::IFindDIIndices( uint32_t &index ) // Note: AddDISpans() adds the spans to a list to be sorted, THEN put into // the buffers; this shoves them right in, bypassing the sorting altogether. -uint32_t plDrawableSpans::AppendDISpans( hsTArray &spans, uint32_t index, hsBool clearSpansAfterAdd, - hsBool doNotAddToSource, hsBool addToFront, int lod) +uint32_t plDrawableSpans::AppendDISpans( hsTArray &spans, uint32_t index, bool clearSpansAfterAdd, + bool doNotAddToSource, bool addToFront, int lod) { hsAssert(spans.GetCount(), "Adding no spans? Blow me."); @@ -2370,7 +2370,7 @@ uint32_t plDrawableSpans::AppendDISpans( hsTArray &spans, uin } insertionPoint = idx; } - hsBool inserted = insertionPoint < fSpans.GetCount(); + bool inserted = insertionPoint < fSpans.GetCount(); /// Add the geometry spans to our list. Also add our internal span /// copies @@ -2531,7 +2531,7 @@ void plDrawableSpans::ICheckToRemoveMaterial( uint32_t materialIdx ) //// IConvertGeoSpanToVertexSpan ///////////////////////////////////////////// // Helper function for the two vertex-based convert functions. -hsBool plDrawableSpans::IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, plVertexSpan *span, int lod, plVertexSpan *instancedParent) +bool plDrawableSpans::IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, plVertexSpan *span, int lod, plVertexSpan *instancedParent) { hsBounds3Ext bounds; uint8_t groupIdx; @@ -2583,11 +2583,11 @@ hsBool plDrawableSpans::IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, p fWorldBounds.Union( &bounds ); span->fFogEnvironment = geoSpan->fFogEnviron; - hsBool vertsVol = false; + bool vertsVol = false; if( fProps & kPropVolatile ) vertsVol = true; - hsBool idxVol = false; + bool idxVol = false; if( fProps & kPropSortFaces ) idxVol = true; if( geoSpan->fProps & plGeometrySpan::kPartialSort ) @@ -2658,7 +2658,7 @@ hsBool plDrawableSpans::IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, p //// IConvertGeoSpanToIcicle ///////////////////////////////////////////////// -hsBool plDrawableSpans::IConvertGeoSpanToIcicle(plGeometrySpan *geoSpan, plIcicle *icicle, int lod, plIcicle *instancedParent) +bool plDrawableSpans::IConvertGeoSpanToIcicle(plGeometrySpan *geoSpan, plIcicle *icicle, int lod, plIcicle *instancedParent) { uint32_t ibIndex, ibStart; @@ -3331,7 +3331,7 @@ void plDrawableSpans::UnPackCluster(plClusterGroup* cluster) //// IFindBufferGroup //////////////////////////////////////////////////////// -uint8_t plDrawableSpans::IFindBufferGroup(uint8_t vtxFormat, uint32_t numVertsNeeded, int lod, hsBool vertVolatile, hsBool idxVolatile) +uint8_t plDrawableSpans::IFindBufferGroup(uint8_t vtxFormat, uint32_t numVertsNeeded, int lod, bool vertVolatile, bool idxVolatile) { int i; @@ -3381,7 +3381,7 @@ hsBitVector const &plDrawableSpans::GetBlendingSpanVector( void ) const // Could just make GetBlendingSpanVector() non-const, but this way it's harder // for the end user, thus I'm hoping to discourage them from doing it too much. -void plDrawableSpans::SetBlendingSpanVectorBit( uint32_t bitNumber, hsBool on ) +void plDrawableSpans::SetBlendingSpanVectorBit( uint32_t bitNumber, bool on ) { fFakeBlendingSpanVector.SetBit( bitNumber, on ); } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.h b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.h index f83ce1f3..58c054b2 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpans.h @@ -100,8 +100,8 @@ public: uint8_t fFlags; hsTArray fIndices; - hsBool IsMatrixOnly() const { return 0 != (fFlags & kMatrixOnly); } - hsBool DontTransform() const { return 0 != ( fFlags & kDontTransformSpans ); } + bool IsMatrixOnly() const { return 0 != (fFlags & kMatrixOnly); } + bool DontTransform() const { return 0 != ( fFlags & kDontTransformSpans ); } void Append(uint32_t i) { fIndices.Append(i); } void Reset() { fFlags = kNone; fIndices.Reset(); } void SetCountAndZero(int c) { fIndices.SetCountAndZero(c); } @@ -122,7 +122,7 @@ class plDrawableSpans : public plDrawable uint32_t fType; - hsBool fReadyToRender; + bool fReadyToRender; hsBounds3Ext fLocalBounds; hsBounds3Ext fWorldBounds; @@ -160,8 +160,8 @@ class plDrawableSpans : public plDrawable plRenderLevel fRenderLevel; plLoadMask fLoadMask; - hsBool fRegisteredForRecreate, fNeedCleanup; - hsBool fRegisteredForRender; + bool fRegisteredForRecreate, fNeedCleanup; + bool fRegisteredForRender; hsBitVector fParticleSpanVector; hsBitVector fBlendingSpanVector; @@ -169,13 +169,13 @@ class plDrawableSpans : public plDrawable plKey fSceneNode; - hsBool fSettingMatIdxLock; + bool fSettingMatIdxLock; uint32_t fSkinTime; /// Export-only members hsTArray fSourceSpans; - hsBool fOptimized; + bool fOptimized; virtual void IQuickSpaceTree( void ) const; @@ -187,20 +187,20 @@ class plDrawableSpans : public plDrawable void IAdjustSortData( plGBufferTriangle *triList, uint32_t count, uint32_t threshhold, int32_t delta ); // The following two functions return true if they create a new span, false if it's just an instance - hsBool IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, plVertexSpan *span, int lod, plVertexSpan *instancedParent ); - hsBool IConvertGeoSpanToIcicle( plGeometrySpan *geoSpan, plIcicle *icicle, int lod, plIcicle *instancedParent = nil ); + bool IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, plVertexSpan *span, int lod, plVertexSpan *instancedParent ); + bool IConvertGeoSpanToIcicle( plGeometrySpan *geoSpan, plIcicle *icicle, int lod, plIcicle *instancedParent = nil ); void IUpdateIcicleFromGeoSpan( plGeometrySpan *geoSpan, plIcicle *icicle ); void IUpdateVertexSpanFromGeoSpan( plGeometrySpan *geoSpan, plVertexSpan *span ); - uint32_t IXlateSpanProps( uint32_t props, hsBool xlateToSpan ); + uint32_t IXlateSpanProps( uint32_t props, bool xlateToSpan ); uint32_t IAddAMaterial( hsGMaterial *material ); uint32_t IRefMaterial( uint32_t index ); void ICheckToRemoveMaterial( uint32_t materialIdx ); // Annoying to need this, but necessary until materials can test for properties on any of their layers (might add in the future) - hsBool ITestMatForSpecularity( hsGMaterial *mat ); + bool ITestMatForSpecularity( hsGMaterial *mat ); void IAssignMatIdxToSpan( plSpan *span, hsGMaterial *mtl ); @@ -211,7 +211,7 @@ class plDrawableSpans : public plDrawable /// Bit vector build thingies virtual void IBuildVectors( void ); - hsBool IBoundsInvalid(const hsBounds3Ext& bnd) const; + bool IBoundsInvalid(const hsBounds3Ext& bnd) const; /// EXPORT-ONLY FUNCTIONS // Packs the span indices @@ -221,7 +221,7 @@ class plDrawableSpans : public plDrawable // Compare two spans for sorting short ICompareSpans( plGeometrySpan *span1, plGeometrySpan *span2 ); // Find a buffer group of the given format (returns its index into fGroups) - uint8_t IFindBufferGroup( uint8_t vtxFormat, uint32_t numVertsNeeded, int lod, hsBool vertVolatile, hsBool idxVolatile); + uint8_t IFindBufferGroup( uint8_t vtxFormat, uint32_t numVertsNeeded, int lod, bool vertVolatile, bool idxVolatile); // Write a span to a stream void IWriteSpan( hsStream *s, plSpan *span ); /// EXPORT-ONLY FUNCTIONS @@ -245,19 +245,19 @@ class plDrawableSpans : public plDrawable virtual const hsMatrix44& GetLocalToWorld( uint32_t index = (uint32_t)-1 ) const; virtual const hsMatrix44& GetWorldToLocal( uint32_t index = (uint32_t)-1 ) const; - virtual plDrawable& SetProperty( uint32_t index, int prop, hsBool on ); - virtual hsBool GetProperty( uint32_t index, int prop ) const; + virtual plDrawable& SetProperty( uint32_t index, int prop, bool on ); + virtual bool GetProperty( uint32_t index, int prop ) const; - virtual plDrawable& SetProperty( int prop, hsBool on ); - virtual hsBool GetProperty( int prop ) const; + virtual plDrawable& SetProperty( int prop, bool on ); + virtual bool GetProperty( int prop ) const; - virtual plDrawable& SetNativeProperty( int prop, hsBool on ) { if( on ) fProps |= prop; else fProps &= ~prop; return *this; } - virtual hsBool GetNativeProperty( int prop ) const { return ( fProps & prop ) ? true : false; } + virtual plDrawable& SetNativeProperty( int prop, bool on ) { if( on ) fProps |= prop; else fProps &= ~prop; return *this; } + virtual bool GetNativeProperty( int prop ) const { return ( fProps & prop ) ? true : false; } - virtual plDrawable& SetNativeProperty( uint32_t index, int prop, hsBool on ); - virtual hsBool GetNativeProperty( uint32_t index, int prop ) const; + virtual plDrawable& SetNativeProperty( uint32_t index, int prop, bool on ); + virtual bool GetNativeProperty( uint32_t index, int prop ) const; - virtual plDrawable& SetSubType( uint32_t index, plSubDrawableType t, hsBool on ); + virtual plDrawable& SetSubType( uint32_t index, plSubDrawableType t, bool on ); virtual uint32_t GetSubType( uint32_t index ) const; // returns or of all spans with this index (index==-1 is all spans). virtual uint32_t GetType( void ) const { return fType; } @@ -276,7 +276,7 @@ class plDrawableSpans : public plDrawable virtual plSpaceTree* GetSpaceTree() const { if(!fSpaceTree)IQuickSpaceTree(); return fSpaceTree; } virtual void SetSpaceTree(plSpaceTree* st) const; virtual void SetVisSet(plVisMgr* visMgr); - virtual void SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* reg, hsBool on); + virtual void SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* reg, bool on); virtual const plSpan *GetSpan( uint32_t index ) const { return fSpans[ index ]; } virtual const plSpan *GetSpan( uint32_t diIndex, uint32_t index ) const { return fSpans[ (*fDIIndices[ diIndex ])[ index ] ]; } @@ -304,7 +304,7 @@ class plDrawableSpans : public plDrawable virtual void PrepForRender( plPipeline *p ); void SetNotReadyToRender() { fReadyToRender = false; } - virtual hsBool MsgReceive( plMessage* msg ); + virtual bool MsgReceive( plMessage* msg ); // These two should only be called by the SceneNode virtual plKey GetSceneNode() const { return fSceneNode; } @@ -317,7 +317,7 @@ class plDrawableSpans : public plDrawable // Convert intermediate data into export/run-time-ready data virtual void Optimize( void ); // Called by the sceneNode to determine if we match the criteria - virtual hsBool DoIMatch( const plDrawableCriteria& crit ); + virtual bool DoIMatch( const plDrawableCriteria& crit ); // To set the criteria that this ice fits void SetCriteria( const plDrawableCriteria& crit ); @@ -328,11 +328,11 @@ class plDrawableSpans : public plDrawable virtual hsBitVector const &GetBlendingSpanVector( void ) const; // Set a single bit in the bitVector of spans that are blending - virtual void SetBlendingSpanVectorBit( uint32_t bitNumber, hsBool on ); + virtual void SetBlendingSpanVectorBit( uint32_t bitNumber, bool on ); // Taking span index. DI Index doesn't make sense here, because one object's DI can dereference into many materials etc. virtual hsGMaterial* GetSubMaterial(int index) const; - virtual hsBool GetSubVisDists(int index, float& minDist, float& maxDist) const; // return true if span invisible before minDist and/or after maxDist + virtual bool GetSubVisDists(int index, float& minDist, float& maxDist) const; // return true if span invisible before minDist and/or after maxDist // Used by the pipeline to keep from reskinning on multiple renders per frame. uint32_t GetSkinTime() const { return fSkinTime; } @@ -364,12 +364,12 @@ class plDrawableSpans : public plDrawable /// DYNAMIC FUNCTIONS virtual void RemoveDISpans( uint32_t index ); - virtual uint32_t AppendDISpans( hsTArray &spans, uint32_t index = (uint32_t)-1, hsBool clearSpansAfterAdd = true, hsBool doNotAddToSource = false, hsBool addToFront = false, int lod = 0 ); + virtual uint32_t AppendDISpans( hsTArray &spans, uint32_t index = (uint32_t)-1, bool clearSpansAfterAdd = true, bool doNotAddToSource = false, bool addToFront = false, int lod = 0 ); virtual uint32_t RefreshDISpans( uint32_t diIndex ); virtual uint32_t RefreshSpan( uint32_t srcSpanIndex ); virtual void RemoveDIMatrixSpans(uint32_t index); virtual uint32_t AppendDIMatrixSpans(int n); - virtual uint32_t FindBoneBaseMatrix(const hsTArray& initL2B, hsBool searchAll) const; + virtual uint32_t FindBoneBaseMatrix(const hsTArray& initL2B, bool searchAll) const; virtual uint32_t NewDIMatrixIndex(); void SortSpan( uint32_t index, plPipeline *pipe ); void SortVisibleSpans(const hsTArray& visList, plPipeline* pipe); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp index ad3b410a..b31edc7a 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp @@ -701,7 +701,7 @@ void plDrawableSpans::ISortSourceSpans( void ) short plDrawableSpans::ICompareSpans( plGeometrySpan *span1, plGeometrySpan *span2 ) { - hsBool b1, b2; + bool b1, b2; int i, j, numLayers; plBitmap *t1, *t2; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.cpp index 9757768b..646da750 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.cpp @@ -90,12 +90,12 @@ void plDynaBulletMgr::Write(hsStream* stream, hsResMgr* mgr) plDynaDecalMgr::Write(stream, mgr); } -hsBool plDynaBulletMgr::IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg) +bool plDynaBulletMgr::IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg) { return true; } -hsBool plDynaBulletMgr::IHandleShot(plBulletMsg* bull) +bool plDynaBulletMgr::IHandleShot(plBulletMsg* bull) { hsVector3 up = IRandomUp(bull->Dir()); @@ -116,7 +116,7 @@ hsBool plDynaBulletMgr::IHandleShot(plBulletMsg* bull) return true; } -hsBool plDynaBulletMgr::MsgReceive(plMessage* msg) +bool plDynaBulletMgr::MsgReceive(plMessage* msg) { plBulletMsg* bullMsg = plBulletMsg::ConvertNoRef(msg); if( bullMsg ) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.h b/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.h index 7801fdae..79365690 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaBulletMgr.h @@ -52,10 +52,10 @@ class plDynaBulletMgr : public plDynaDecalMgr public: protected: - virtual hsBool IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg); + virtual bool IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg); virtual int INewDecal(); - virtual hsBool IHandleShot(plBulletMsg* bull); + virtual bool IHandleShot(plBulletMsg* bull); public: plDynaBulletMgr(); @@ -67,7 +67,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; #endif // plDynaBulletMgr_inc diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecal.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecal.cpp index 48dceaab..f0451584 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecal.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecal.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plDynaDecal.h" #include "plAuxSpan.h" -hsBool plDynaSplot::Age(double t, float ramp, float decay, float life) +bool plDynaSplot::Age(double t, float ramp, float decay, float life) { float age = float(t - fBirth); if( age >= life ) @@ -130,7 +130,7 @@ hsBool plDynaSplot::Age(double t, float ramp, float decay, float life) return false; } -hsBool plDynaRipple::Age(double t, float ramp, float decay, float life) +bool plDynaRipple::Age(double t, float ramp, float decay, float life) { float age = float(t - fBirth); if( age >= life ) @@ -210,7 +210,7 @@ hsBool plDynaRipple::Age(double t, float ramp, float decay, float life) return false; } -hsBool plDynaWake::Age(double t, float ramp, float decay, float life) +bool plDynaWake::Age(double t, float ramp, float decay, float life) { float age = float(t - fBirth); if( age >= life ) @@ -290,7 +290,7 @@ hsBool plDynaWake::Age(double t, float ramp, float decay, float life) return false; } -hsBool plDynaWave::Age(double t, float ramp, float decay, float life) +bool plDynaWave::Age(double t, float ramp, float decay, float life) { float age = float(t - fBirth); if( age >= life ) @@ -370,7 +370,7 @@ hsBool plDynaWave::Age(double t, float ramp, float decay, float life) return false; } -hsBool plDynaRippleVS::Age(double t, float ramp, float decay, float life) +bool plDynaRippleVS::Age(double t, float ramp, float decay, float life) { float age = float(t - fBirth); if( age >= life ) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecal.h b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecal.h index 81276b58..21cdc98f 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecal.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecal.h @@ -86,7 +86,7 @@ protected: double fBirth; float fInitAtten; - hsBool fFlags; + bool fFlags; plDecalVtxFormat* fVtxBase; // Safe pointer, the buffer data will outlive this decal @@ -95,7 +95,7 @@ protected: friend class plDynaDecalMgr; public: - virtual hsBool Age(double t, float ramp, float decay, float life) = 0; + virtual bool Age(double t, float ramp, float decay, float life) = 0; }; // No expansion @@ -105,7 +105,7 @@ protected: public: - virtual hsBool Age(double t, float ramp, float decay, float life); + virtual bool Age(double t, float ramp, float decay, float life); }; // Expands radially from center @@ -113,7 +113,7 @@ class plDynaRipple : public plDynaDecal { public: - virtual hsBool Age(double t, float ramp, float decay, float life); + virtual bool Age(double t, float ramp, float decay, float life); float fC1U; float fC2U; @@ -128,7 +128,7 @@ class plDynaWake : public plDynaDecal { public: - virtual hsBool Age(double t, float ramp, float decay, float life); + virtual bool Age(double t, float ramp, float decay, float life); float fC1U; float fC2U; @@ -143,7 +143,7 @@ class plDynaWave : public plDynaDecal { public: - virtual hsBool Age(double t, float ramp, float decay, float life); + virtual bool Age(double t, float ramp, float decay, float life); float fScrollRate; }; @@ -154,7 +154,7 @@ class plDynaRippleVS : public plDynaRipple { public: - virtual hsBool Age(double t, float ramp, float decay, float life); + virtual bool Age(double t, float ramp, float decay, float life); }; #endif // plDynaDecal_inc diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp index e159da44..cf171989 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp @@ -132,8 +132,8 @@ static const float kInitAuxSpans = 5; using namespace std; -hsBool plDynaDecalMgr::fDisableAccumulate = false; -hsBool plDynaDecalMgr::fDisableUpdate = false; +bool plDynaDecalMgr::fDisableAccumulate = false; +bool plDynaDecalMgr::fDisableUpdate = false; plDynaDecalMgr::plDynaDecalMgr() : @@ -299,7 +299,7 @@ void plDynaDecalMgr::Write(hsStream* stream, hsResMgr* mgr) } -hsBool plDynaDecalMgr::IMakeAuxRefs(plPipeline* pipe) +bool plDynaDecalMgr::IMakeAuxRefs(plPipeline* pipe) { int i; for( i = 0; i < fGroups.GetCount(); i++ ) @@ -334,14 +334,14 @@ const plPrintShape* plDynaDecalMgr::IGetPrintShape(plArmatureMod* avMod, uint32_ return shape; } -hsBool plDynaDecalMgr::IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg) +bool plDynaDecalMgr::IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg) { IWetParts(enaMsg); return true; } -hsBool plDynaDecalMgr::IWetParts(const plDynaDecalEnableMsg* enaMsg) +bool plDynaDecalMgr::IWetParts(const plDynaDecalEnableMsg* enaMsg) { if( !enaMsg->IsArmature() ) { @@ -374,7 +374,7 @@ hsBool plDynaDecalMgr::IWetParts(const plDynaDecalEnableMsg* enaMsg) return true; } -hsBool plDynaDecalMgr::IWetPart(uint32_t id, const plDynaDecalEnableMsg* enaMsg) +bool plDynaDecalMgr::IWetPart(uint32_t id, const plDynaDecalEnableMsg* enaMsg) { plArmatureMod* avMod = plArmatureMod::ConvertNoRef(enaMsg->GetArmKey()->ObjectIsLoaded()); @@ -397,7 +397,7 @@ void plDynaDecalMgr::IWetInfo(plDynaDecalInfo& info, const plDynaDecalEnableMsg* info.fFlags &= ~plDynaDecalInfo::kImmersed; } -hsBool plDynaDecalMgr::MsgReceive(plMessage* msg) +bool plDynaDecalMgr::MsgReceive(plMessage* msg) { // On eval pulse, update all our active decals, letting old ones die off. plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg); @@ -653,7 +653,7 @@ plAuxSpan* plDynaDecalMgr::IGetAuxSpan(plDrawableSpans* targ, int iSpan, hsGMate return aux; } - hsBool rtLit = span->fProps & plSpan::kLiteVtxNonPreshaded; + bool rtLit = span->fProps & plSpan::kLiteVtxNonPreshaded; // Now look to see if we've got one sitting around unused that's suitable. // Here the suitable criteria is a little different. We know we are the owner, @@ -762,17 +762,17 @@ void plDynaDecalMgr::IAllocAuxSpan(plAuxSpan* aux, uint32_t maxNumVerts, uint32_ grp->SetIndexBufferEnd(aux->fIBufferIdx, aux->fIStartIdx); } -hsGMaterial* plDynaDecalMgr::ISetAuxMaterial(plAuxSpan* aux, hsGMaterial* mat, hsBool rtLit) +hsGMaterial* plDynaDecalMgr::ISetAuxMaterial(plAuxSpan* aux, hsGMaterial* mat, bool rtLit) { if( !mat ) mat = fMatRTShade; - hsBool attenColor = 0 != (mat->GetLayer(0)->GetBlendFlags() + bool attenColor = 0 != (mat->GetLayer(0)->GetBlendFlags() & (hsGMatState::kBlendAdd | hsGMatState::kBlendMult | hsGMatState::kBlendMADD)); - hsBool bump = 0 != (mat->GetLayer(0)->GetMiscFlags() & hsGMatState::kMiscBumpChans); - hsBool hasVS = nil != mat->GetLayer(0)->GetVertexShader(); + bool bump = 0 != (mat->GetLayer(0)->GetMiscFlags() & hsGMatState::kMiscBumpChans); + bool hasVS = nil != mat->GetLayer(0)->GetVertexShader(); if( hasVS ) { @@ -967,7 +967,7 @@ uint16_t* plDynaDecalMgr::IGetBaseIdxPtr(const plAuxSpan* auxSpan) const return grp->GetIndexBufferData(auxSpan->fIBufferIdx) + auxSpan->fIBufferInit; } -hsBool plDynaDecalMgr::IConvertFlatGrid(plAuxSpan* auxSpan, +bool plDynaDecalMgr::IConvertFlatGrid(plAuxSpan* auxSpan, plDynaDecal* decal, const plFlatGridMesh& grid) const { @@ -1046,7 +1046,7 @@ void plDynaDecalMgr::ISetDepthFalloff() fMaxDepthRange = 1.f / (1.f - fMaxDepth); } -hsBool plDynaDecalMgr::IConvertPolys(plAuxSpan* auxSpan, +bool plDynaDecalMgr::IConvertPolys(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src) { @@ -1061,14 +1061,14 @@ hsBool plDynaDecalMgr::IConvertPolys(plAuxSpan* auxSpan, return IConvertPolysAlpha(auxSpan, decal, src); } -hsBool plDynaDecalMgr::IConvertPolysAlpha(plAuxSpan* auxSpan, +bool plDynaDecalMgr::IConvertPolysAlpha(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src) { - hsBool loU = false; - hsBool hiU = false; - hsBool loV = false; - hsBool hiV = false; + bool loU = false; + bool hiU = false; + bool loV = false; + bool hiV = false; plDecalVtxFormat* vtx = IGetBaseVtxPtr(auxSpan); vtx += decal->fStartVtx; decal->fVtxBase = vtx; @@ -1162,14 +1162,14 @@ hsBool plDynaDecalMgr::IConvertPolysAlpha(plAuxSpan* auxSpan, return loU & hiU & loV & hiV; } -hsBool plDynaDecalMgr::IConvertPolysColor(plAuxSpan* auxSpan, +bool plDynaDecalMgr::IConvertPolysColor(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src) { - hsBool loU = false; - hsBool hiU = false; - hsBool loV = false; - hsBool hiV = false; + bool loU = false; + bool hiU = false; + bool loV = false; + bool hiV = false; plDecalVtxFormat* vtx = IGetBaseVtxPtr(auxSpan); vtx += decal->fStartVtx; decal->fVtxBase = vtx; @@ -1255,14 +1255,14 @@ hsBool plDynaDecalMgr::IConvertPolysColor(plAuxSpan* auxSpan, return loU & hiU & loV & hiV; } -hsBool plDynaDecalMgr::IConvertPolysVS(plAuxSpan* auxSpan, +bool plDynaDecalMgr::IConvertPolysVS(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src) { - hsBool loU = false; - hsBool hiU = false; - hsBool loV = false; - hsBool hiV = false; + bool loU = false; + bool hiU = false; + bool loV = false; + bool hiV = false; plDecalVtxFormat* vtx = IGetBaseVtxPtr(auxSpan); vtx += decal->fStartVtx; decal->fVtxBase = vtx; @@ -1337,12 +1337,12 @@ hsBool plDynaDecalMgr::IConvertPolysVS(plAuxSpan* auxSpan, return loU & hiU & loV & hiV; } -hsBool plDynaDecalMgr::IHitTestPolys(hsTArray& src) const +bool plDynaDecalMgr::IHitTestPolys(hsTArray& src) const { - hsBool loU = false; - hsBool hiU = false; - hsBool loV = false; - hsBool hiV = false; + bool loU = false; + bool hiU = false; + bool loV = false; + bool hiV = false; int iPoly = 0; int iVert = 0; while( iPoly < src.GetCount() ) @@ -1368,7 +1368,7 @@ hsBool plDynaDecalMgr::IHitTestPolys(hsTArray& src) const return loU & hiU & loV & hiV; } -hsBool plDynaDecalMgr::IProcessPolys(plDrawableSpans* targ, int iSpan, double t, hsTArray& src) +bool plDynaDecalMgr::IProcessPolys(plDrawableSpans* targ, int iSpan, double t, hsTArray& src) { // Figure out how many verts and idxs are coming in. uint16_t numVerts, numIdx; @@ -1394,7 +1394,7 @@ hsBool plDynaDecalMgr::IProcessPolys(plDrawableSpans* targ, int iSpan, double t, return IConvertPolys(auxSpan, decal, src); } -hsBool plDynaDecalMgr::IProcessGrid(plDrawableSpans* targ, int iSpan, hsGMaterial* mat, double t, const plFlatGridMesh& grid) +bool plDynaDecalMgr::IProcessGrid(plDrawableSpans* targ, int iSpan, hsGMaterial* mat, double t, const plFlatGridMesh& grid) { // Find a span to put them in. Either the current span, or a new // one if it's full up. @@ -1415,14 +1415,14 @@ hsBool plDynaDecalMgr::IProcessGrid(plDrawableSpans* targ, int iSpan, hsGMateria return IConvertFlatGrid(auxSpan, decal, grid); } -hsBool plDynaDecalMgr::IHitTestFlatGrid(const plFlatGridMesh& grid) const +bool plDynaDecalMgr::IHitTestFlatGrid(const plFlatGridMesh& grid) const { return true; } ////////////////////////////////////////////////////////////////////////////////// -hsBool plDynaDecalMgr::ICutoutGrid(plDrawableSpans* drawable, int iSpan, hsGMaterial* mat, double secs) +bool plDynaDecalMgr::ICutoutGrid(plDrawableSpans* drawable, int iSpan, hsGMaterial* mat, double secs) { static plFlatGridMesh grid; grid.Reset(); @@ -1435,12 +1435,12 @@ hsBool plDynaDecalMgr::ICutoutGrid(plDrawableSpans* drawable, int iSpan, hsGMate return IProcessGrid(drawable, iSpan, mat, secs, grid); } -hsBool plDynaDecalMgr::ICutoutObject(plSceneObject* so, double secs) +bool plDynaDecalMgr::ICutoutObject(plSceneObject* so, double secs) { if( fDisableAccumulate ) return false; - hsBool retVal = false; + bool retVal = false; if( !so ) return retVal; @@ -1501,12 +1501,12 @@ hsBool plDynaDecalMgr::ICutoutObject(plSceneObject* so, double secs) return retVal; } -hsBool plDynaDecalMgr::ICutoutList(hsTArray& drawVis, double secs) +bool plDynaDecalMgr::ICutoutList(hsTArray& drawVis, double secs) { if( fDisableAccumulate ) return false; - hsBool retVal = false; + bool retVal = false; if( !drawVis.GetCount() ) return retVal; @@ -1547,12 +1547,12 @@ hsBool plDynaDecalMgr::ICutoutList(hsTArray& drawVis, double secs return retVal; } -hsBool plDynaDecalMgr::ICutoutTargets(double secs) +bool plDynaDecalMgr::ICutoutTargets(double secs) { if( fDisableAccumulate ) return false; - hsBool retVal = false; + bool retVal = false; int i; for( i = 0; i < fTargets.GetCount(); i++ ) @@ -1754,7 +1754,7 @@ hsMatrix44 plDynaDecalMgr::IL2WFromHit(hsPoint3 pos, hsVector3 dir) const return l2w; } -void plDynaDecalMgr::ICutoutCallback(const hsTArray& cutouts, hsBool hasWaterHeight, float waterHeight) +void plDynaDecalMgr::ICutoutCallback(const hsTArray& cutouts, bool hasWaterHeight, float waterHeight) { hsTArray hits; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.h b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.h index e5e03b03..c23c9515 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.h @@ -129,8 +129,8 @@ public: kRefNextAvailable = 10 }; protected: - static hsBool fDisableAccumulate; - static hsBool fDisableUpdate; + static bool fDisableAccumulate; + static bool fDisableUpdate; plDynaDecalMap fDecalMap; @@ -182,21 +182,21 @@ protected: const plPrintShape* IGetPrintShape(const plKey& objKey) const; const plPrintShape* IGetPrintShape(plArmatureMod* avMod, uint32_t id) const; - virtual hsBool IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg); + virtual bool IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg); void INotifyActive(plDynaDecalInfo& info, const plKey& armKey, uint32_t id) const; void INotifyInactive(plDynaDecalInfo& info, const plKey& armKey, uint32_t id) const; - hsBool IWetParts(const plDynaDecalEnableMsg* enaMsg); - hsBool IWetPart(uint32_t id, const plDynaDecalEnableMsg* enaMsg); + bool IWetParts(const plDynaDecalEnableMsg* enaMsg); + bool IWetPart(uint32_t id, const plDynaDecalEnableMsg* enaMsg); void IWetInfo(plDynaDecalInfo& info, const plDynaDecalEnableMsg* enaMsg) const; float IHowWet(plDynaDecalInfo& info, double t) const; plDynaDecalInfo& IGetDecalInfo(uintptr_t id, const plKey& key); void IRemoveDecalInfo(uint32_t id); void IRemoveDecalInfos(const plKey& key); - hsGMaterial* ISetAuxMaterial(plAuxSpan* aux, hsGMaterial* mat, hsBool rtLit); + hsGMaterial* ISetAuxMaterial(plAuxSpan* aux, hsGMaterial* mat, bool rtLit); void IAllocAuxSpan(plAuxSpan* aux, uint32_t maxNumVerts, uint32_t maxNumIdx); plAuxSpan* IGetAuxSpan(plDrawableSpans* targ, int iSpan, hsGMaterial* mat, uint16_t numVerts, uint16_t numIdx); - hsBool IMakeAuxRefs(plPipeline* pipe); + bool IMakeAuxRefs(plPipeline* pipe); uint16_t* IGetBaseIdxPtr(const plAuxSpan* auxSpan) const; plDecalVtxFormat* IGetBaseVtxPtr(const plAuxSpan* auxSpan) const; @@ -207,25 +207,25 @@ protected: void IUpdateDecals(double t); void ICountIncoming(hsTArray& src, uint16_t& numVerts, uint16_t& numIdx) const; - hsBool IConvertPolysColor(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src); - hsBool IConvertPolysAlpha(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src); - hsBool IConvertPolysVS(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src); - hsBool IConvertPolys(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src); - hsBool IProcessPolys(plDrawableSpans* targ, int iSpan, double t, hsTArray& src); - hsBool IHitTestPolys(hsTArray& src) const; - - hsBool IProcessGrid(plDrawableSpans* targ, int iSpan, hsGMaterial* mat, double t, const plFlatGridMesh& grid); - hsBool IConvertFlatGrid(plAuxSpan* auxSpan, plDynaDecal* decal, const plFlatGridMesh& grid) const; - hsBool ICutoutGrid(plDrawableSpans* drawable, int iSpan, hsGMaterial* mat, double secs); - hsBool IHitTestFlatGrid(const plFlatGridMesh& grid) const; - - hsBool ICutoutList(hsTArray& drawVis, double secs); - hsBool ICutoutObject(plSceneObject* so, double secs); - hsBool ICutoutTargets(double secs); + bool IConvertPolysColor(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src); + bool IConvertPolysAlpha(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src); + bool IConvertPolysVS(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src); + bool IConvertPolys(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray& src); + bool IProcessPolys(plDrawableSpans* targ, int iSpan, double t, hsTArray& src); + bool IHitTestPolys(hsTArray& src) const; + + bool IProcessGrid(plDrawableSpans* targ, int iSpan, hsGMaterial* mat, double t, const plFlatGridMesh& grid); + bool IConvertFlatGrid(plAuxSpan* auxSpan, plDynaDecal* decal, const plFlatGridMesh& grid) const; + bool ICutoutGrid(plDrawableSpans* drawable, int iSpan, hsGMaterial* mat, double secs); + bool IHitTestFlatGrid(const plFlatGridMesh& grid) const; + + bool ICutoutList(hsTArray& drawVis, double secs); + bool ICutoutObject(plSceneObject* so, double secs); + bool ICutoutTargets(double secs); void ISetDepthFalloff(); // Sets from current cutter settings. - virtual void ICutoutCallback(const hsTArray& cutouts, hsBool hasWaterHeight=false, float waterHeight=0.f); + virtual void ICutoutCallback(const hsTArray& cutouts, bool hasWaterHeight=false, float waterHeight=0.f); hsGMaterial* IConvertToEnvMap(hsGMaterial* mat, plBitmap* envMap); @@ -247,7 +247,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // This is public, because you need to call it after creating // a DynaDecalMgr on the fly. It's normally called on Read(). @@ -256,8 +256,8 @@ public: void SetScale(const hsVector3& v) { fScale = v; } const hsVector3& GetScale() const { return fScale; } - void SetWaitOnEnable(hsBool on) { fWaitOnEnable = on; } - hsBool GetWaitOnEnable() const { return fWaitOnEnable; } + void SetWaitOnEnable(bool on) { fWaitOnEnable = on; } + bool GetWaitOnEnable() const { return fWaitOnEnable; } void SetWetLength(float f) { fWetLength = f; } void SetRampEnd(float f) { fRampEnd = f; } @@ -280,13 +280,13 @@ public: uint32_t GetNumNotifies() const { return fNotifies.GetCount(); } const plKey& GetNotify(int i) const { return fNotifies[i]; } - static void SetDisableAccumulate(hsBool on) { fDisableAccumulate = on; } + static void SetDisableAccumulate(bool on) { fDisableAccumulate = on; } static void ToggleDisableAccumulate() { fDisableAccumulate = !fDisableAccumulate; } - static hsBool GetDisableAccumulate() { return fDisableAccumulate; } + static bool GetDisableAccumulate() { return fDisableAccumulate; } - static void SetDisableUpdate(hsBool on) { fDisableUpdate = on; } + static void SetDisableUpdate(bool on) { fDisableUpdate = on; } static void ToggleDisableUpdate() { fDisableUpdate = !fDisableUpdate; } - static hsBool GetDisableUpdate() { return fDisableUpdate; } + static bool GetDisableUpdate() { return fDisableUpdate; } }; #endif // plDynaDecalMgr_inc diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.cpp index f0a1b9db..413f9081 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.cpp @@ -104,7 +104,7 @@ void plDynaFootMgr::Write(hsStream* stream, hsResMgr* mgr) } -hsBool plDynaFootMgr::MsgReceive(plMessage* msg) +bool plDynaFootMgr::MsgReceive(plMessage* msg) { plAvatarFootMsg* footMsg = plAvatarFootMsg::ConvertNoRef(msg); if( footMsg ) @@ -132,9 +132,9 @@ hsBool plDynaFootMgr::MsgReceive(plMessage* msg) return plDynaDecalMgr::MsgReceive(msg); } -hsBool plDynaFootMgr::IPrintFromShape(const plPrintShape* shape, hsBool flip) +bool plDynaFootMgr::IPrintFromShape(const plPrintShape* shape, bool flip) { - hsBool retVal = false; + bool retVal = false; if( shape ) { diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.h b/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.h index df76009b..58ed0000 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaFootMgr.h @@ -50,7 +50,7 @@ class plAvatarFootMsg; class plDynaFootMgr : public plDynaDecalMgr { protected: - virtual hsBool IPrintFromShape(const plPrintShape* shape, hsBool flip); + virtual bool IPrintFromShape(const plPrintShape* shape, bool flip); virtual int INewDecal(); public: @@ -63,7 +63,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaPuddleMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaPuddleMgr.cpp index 868c6a4e..55661246 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaPuddleMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaPuddleMgr.cpp @@ -82,7 +82,7 @@ void plDynaPuddleMgr::Read(hsStream* stream, hsResMgr* mgr) plgDispatch::Dispatch()->RegisterForExactType(plAvatarFootMsg::Index(), GetKey()); } -hsBool plDynaPuddleMgr::MsgReceive(plMessage* msg) +bool plDynaPuddleMgr::MsgReceive(plMessage* msg) { plAvatarFootMsg* footMsg = plAvatarFootMsg::ConvertNoRef(msg); if( footMsg ) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaPuddleMgr.h b/Sources/Plasma/PubUtilLib/plDrawable/plDynaPuddleMgr.h index 770de054..a873e598 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaPuddleMgr.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaPuddleMgr.h @@ -60,7 +60,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.cpp index 36d7909d..e6fbd8e5 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.cpp @@ -135,7 +135,7 @@ void plDynaRippleMgr::Write(hsStream* stream, hsResMgr* mgr) fFinalUVW.Write(stream); } -hsBool plDynaRippleMgr::MsgReceive(plMessage* msg) +bool plDynaRippleMgr::MsgReceive(plMessage* msg) { plArmatureUpdateMsg* armMsg = plArmatureUpdateMsg::ConvertNoRef(msg); if( armMsg && !armMsg->IsInvis()) @@ -175,12 +175,12 @@ hsBool plDynaRippleMgr::MsgReceive(plMessage* msg) return plDynaDecalMgr::MsgReceive(msg); } -hsBool plDynaRippleMgr::IRippleFromShape(const plPrintShape* shape, hsBool force) +bool plDynaRippleMgr::IRippleFromShape(const plPrintShape* shape, bool force) { if( !shape ) return false; - hsBool retVal = false; + bool retVal = false; plDynaDecalInfo& info = IGetDecalInfo(uintptr_t(shape), shape->GetKey()); @@ -190,9 +190,9 @@ hsBool plDynaRippleMgr::IRippleFromShape(const plPrintShape* shape, hsBool force plConst(float) kMinTime(1.5f); double t = hsTimer::GetSysSeconds(); float dt = float(t - info.fLastTime) * sRand.RandZeroToOne(); - hsBool longEnough = (dt >= kMinTime); + bool longEnough = (dt >= kMinTime); hsPoint3 xlate = shapeL2W.GetTranslate(); - hsBool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist); + bool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist); if( force || longEnough || farEnough ) { hsPoint3 pos = shapeL2W.GetTranslate(); @@ -225,7 +225,7 @@ hsBool plDynaRippleMgr::IRippleFromShape(const plPrintShape* shape, hsBool force fCutter->Set(pos, dir, up); - hsBool hit = ICutoutTargets(t); + bool hit = ICutoutTargets(t); if( hit ) { retVal = true; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.h b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.h index cce7e8f2..3c20a1f1 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgr.h @@ -53,7 +53,7 @@ protected: hsVector3 fInitUVW; hsVector3 fFinalUVW; - virtual hsBool IRippleFromShape(const plPrintShape* shape, hsBool force=false); + virtual bool IRippleFromShape(const plPrintShape* shape, bool force=false); virtual int INewDecal(); public: @@ -66,7 +66,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void SetUVWAnim(const hsVector3& init, const hsVector3& final) { fInitUVW = init; fFinalUVW = final; } const hsVector3& GetInitUVW() const { return fInitUVW; } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgrVS.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgrVS.cpp index bdf94371..a6cd0ce9 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgrVS.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleMgrVS.cpp @@ -113,9 +113,9 @@ void plDynaRippleVSMgr::Write(hsStream* stream, hsResMgr* mgr) mgr->WriteKey(stream, fWaveSetBase); } -hsBool plDynaRippleVSMgr::MsgReceive(plMessage* msg) +bool plDynaRippleVSMgr::MsgReceive(plMessage* msg) { - hsBool retVal = plDynaRippleMgr::MsgReceive(msg); + bool retVal = plDynaRippleMgr::MsgReceive(msg); if( retVal ) return true; @@ -135,7 +135,7 @@ hsBool plDynaRippleVSMgr::MsgReceive(plMessage* msg) return false; } -hsBool plDynaRippleVSMgr::ICheckRTMat() +bool plDynaRippleVSMgr::ICheckRTMat() { if( !fMatRTShade ) return false; @@ -162,7 +162,7 @@ hsBool plDynaRippleVSMgr::ICheckRTMat() return fWaveSetBase->SetupRippleMat(fMatRTShade, ripConsts); } -hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool force) +bool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, bool force) { if( !ICheckRTMat() ) return false; @@ -170,7 +170,7 @@ hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool for if( !shape ) return false; - hsBool retVal = false; + bool retVal = false; plDynaDecalInfo& info = IGetDecalInfo(uintptr_t(shape), shape->GetKey()); @@ -180,9 +180,9 @@ hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool for plConst(float) kMinTime(1.5f); double t = hsTimer::GetSysSeconds(); float dt = float(t - info.fLastTime) * sRand.RandZeroToOne(); - hsBool longEnough = (dt >= kMinTime); + bool longEnough = (dt >= kMinTime); hsPoint3 xlate = shapeL2W.GetTranslate(); - hsBool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist); + bool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist); if( force || longEnough || farEnough ) { hsPoint3 pos = shapeL2W.GetTranslate(); @@ -221,7 +221,7 @@ hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool for fCutter->Set(pos, dir, up); - hsBool hit = ICutoutTargets(t); + bool hit = ICutoutTargets(t); if( hit ) { info.fLastTime = t; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleVSMgr.h b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleVSMgr.h index 14b779f3..980eaa13 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleVSMgr.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaRippleVSMgr.h @@ -57,11 +57,11 @@ protected: plWaveSetBase* fWaveSetBase; - virtual hsBool IRippleFromShape(const plPrintShape* shape, hsBool force=false); + virtual bool IRippleFromShape(const plPrintShape* shape, bool force=false); virtual int INewDecal(); - virtual hsBool ICheckRTMat(); + virtual bool ICheckRTMat(); public: plDynaRippleVSMgr(); @@ -73,7 +73,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; #endif // plDynaRippleVSMgr_inc diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoMgr.cpp index 1cf3fe3c..2297c8f4 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoMgr.cpp @@ -76,7 +76,7 @@ void plDynaTorpedoMgr::Read(hsStream* stream, hsResMgr* mgr) plgDispatch::Dispatch()->RegisterForExactType(plBulletMsg::Index(), GetKey()); } -hsBool plDynaTorpedoMgr::IHandleShot(plBulletMsg* bull) +bool plDynaTorpedoMgr::IHandleShot(plBulletMsg* bull) { float partyTime = fPartyTime; @@ -142,7 +142,7 @@ hsBool plDynaTorpedoMgr::IHandleShot(plBulletMsg* bull) return true; } -hsBool plDynaTorpedoMgr::MsgReceive(plMessage* msg) +bool plDynaTorpedoMgr::MsgReceive(plMessage* msg) { plBulletMsg* bullMsg = plBulletMsg::ConvertNoRef(msg); if( bullMsg ) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoMgr.h b/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoMgr.h index 6754e906..756f3207 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoMgr.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoMgr.h @@ -52,7 +52,7 @@ class plDynaTorpedoMgr : public plDynaRippleMgr { protected: - virtual hsBool IHandleShot(plBulletMsg* bull); + virtual bool IHandleShot(plBulletMsg* bull); public: plDynaTorpedoMgr(); @@ -63,7 +63,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.cpp index ad8d35fb..6efe535a 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.cpp @@ -80,7 +80,7 @@ int plDynaTorpedoVSMgr::INewDecal() return idx; } -hsBool plDynaTorpedoVSMgr::IHandleShot(plBulletMsg* bull) +bool plDynaTorpedoVSMgr::IHandleShot(plBulletMsg* bull) { if( !ICheckRTMat() ) return false; @@ -88,7 +88,7 @@ hsBool plDynaTorpedoVSMgr::IHandleShot(plBulletMsg* bull) return plDynaTorpedoMgr::IHandleShot(bull); } -hsBool plDynaTorpedoVSMgr::ICheckRTMat() +bool plDynaTorpedoVSMgr::ICheckRTMat() { if( !fMatRTShade ) return false; @@ -122,9 +122,9 @@ plRipVSConsts plDynaTorpedoVSMgr::IGetRippleConsts() const return ripConsts; } -hsBool plDynaTorpedoVSMgr::MsgReceive(plMessage* msg) +bool plDynaTorpedoVSMgr::MsgReceive(plMessage* msg) { - hsBool retVal = plDynaTorpedoMgr::MsgReceive(msg); + bool retVal = plDynaTorpedoMgr::MsgReceive(msg); if( retVal ) return true; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.h b/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.h index 08707947..f97290e1 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaTorpedoVSMgr.h @@ -59,10 +59,10 @@ protected: virtual int INewDecal(); - virtual hsBool ICheckRTMat(); + virtual bool ICheckRTMat(); plRipVSConsts IGetRippleConsts() const; - virtual hsBool IHandleShot(plBulletMsg* bull); + virtual bool IHandleShot(plBulletMsg* bull); public: plDynaTorpedoVSMgr(); virtual ~plDynaTorpedoVSMgr(); @@ -70,7 +70,7 @@ public: CLASSNAME_REGISTER( plDynaTorpedoVSMgr ); GETINTERFACE_ANY( plDynaTorpedoVSMgr, plDynaTorpedoMgr ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.cpp index f80b530b..121afaa8 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.cpp @@ -166,12 +166,12 @@ hsVector3 plDynaWakeMgr::IGetDirection(const plDynaDecalInfo& info, const hsPoin return dir; } -hsBool plDynaWakeMgr::IRippleFromShape(const plPrintShape* shape, hsBool force) +bool plDynaWakeMgr::IRippleFromShape(const plPrintShape* shape, bool force) { if( !shape ) return false; - hsBool retVal = false; + bool retVal = false; plDynaDecalInfo& info = IGetDecalInfo(uintptr_t(shape), shape->GetKey()); @@ -181,9 +181,9 @@ hsBool plDynaWakeMgr::IRippleFromShape(const plPrintShape* shape, hsBool force) static float kMinTime = 0.25f; double t = hsTimer::GetSysSeconds(); float dt = float(t - info.fLastTime) * sRand.RandZeroToOne(); - hsBool longEnough = (dt >= kMinTime); + bool longEnough = (dt >= kMinTime); hsPoint3 xlate = shapeL2W.GetTranslate(); - hsBool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist); + bool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist); if( force || longEnough || farEnough ) { hsPoint3 pos = shapeL2W.GetTranslate(); @@ -221,7 +221,7 @@ hsBool plDynaWakeMgr::IRippleFromShape(const plPrintShape* shape, hsBool force) info.fLastTime = t; info.fLastPos = shapeL2W.GetTranslate(); - hsBool hit = ICutoutTargets(t); + bool hit = ICutoutTargets(t); if( hit ) retVal = true; } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.h b/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.h index 191a4608..cacc5792 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plDynaWakeMgr.h @@ -59,7 +59,7 @@ protected: virtual hsVector3 IGetDirection(const plDynaDecalInfo& info, const hsPoint3& pos) const; - virtual hsBool IRippleFromShape(const plPrintShape* shape, hsBool force=false); + virtual bool IRippleFromShape(const plPrintShape* shape, bool force=false); virtual int INewDecal(); public: diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.cpp index 0eaa4ab7..d3cf585e 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.cpp @@ -57,7 +57,7 @@ plGeoSpanDice::~plGeoSpanDice() { } -hsBool plGeoSpanDice::Dice(hsTArray& spans) const +bool plGeoSpanDice::Dice(hsTArray& spans) const { int startingCount = spans.GetCount(); @@ -82,7 +82,7 @@ hsBool plGeoSpanDice::Dice(hsTArray& spans) const return spans.GetCount() != startingCount; } -hsBool plGeoSpanDice::INeedSplitting(plGeometrySpan* src) const +bool plGeoSpanDice::INeedSplitting(plGeometrySpan* src) const { // Do we have enough faces to bother? if( fMinFaces ) @@ -111,7 +111,7 @@ hsBool plGeoSpanDice::INeedSplitting(plGeometrySpan* src) const return false; } -hsBool plGeoSpanDice::IHalf(plGeometrySpan* src, hsTArray& out, int exclAxis) const +bool plGeoSpanDice::IHalf(plGeometrySpan* src, hsTArray& out, int exclAxis) const { if( !INeedSplitting(src) ) return false; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.h b/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.h index 3f1ff8b2..08d97972 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plGeoSpanDice.h @@ -55,17 +55,17 @@ protected: uint32_t fMaxFaces; hsPoint3 fMaxSize; - hsBool INeedSplitting(plGeometrySpan* src) const; + bool INeedSplitting(plGeometrySpan* src) const; plGeometrySpan* IAllocSpace(plGeometrySpan* src, int numVerts, int numTris) const; plGeometrySpan* IExtractTris(plGeometrySpan* src, hsTArray& tris) const; int ISelectAxis(int exclAxis, plGeometrySpan* src) const; - hsBool IHalf(plGeometrySpan* src, hsTArray& out, int exclAxis=0) const; + bool IHalf(plGeometrySpan* src, hsTArray& out, int exclAxis=0) const; public: plGeoSpanDice(); virtual ~plGeoSpanDice(); - hsBool Dice(hsTArray& spans) const; + bool Dice(hsTArray& spans) const; void SetMaxSize(const hsPoint3& size) { fMaxSize = size; } hsPoint3 GetMaxSize() const { return fMaxSize; } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plGeometrySpan.h b/Sources/Plasma/PubUtilLib/plDrawable/plGeometrySpan.h index 6eb85f20..9a21dba7 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plGeometrySpan.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plGeometrySpan.h @@ -270,7 +270,7 @@ class plGeometrySpan uint32_t fIndices; }; - hsBool fCreating; + bool fCreating; hsTArray fVertAccum; hsTArray fIndexAccum; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.cpp index 3c66d133..f90e0607 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.cpp @@ -70,7 +70,7 @@ void plInstanceDrawInterface::Write(hsStream* stream, hsResMgr* mgr) mgr->WriteKey(stream, fDrawable->GetKey()); } -hsBool plInstanceDrawInterface::MsgReceive(plMessage* msg) +bool plInstanceDrawInterface::MsgReceive(plMessage* msg) { #if 0 // UNUSED // This currently isn't being used, so I'm commenting it out at @@ -103,7 +103,7 @@ hsBool plInstanceDrawInterface::MsgReceive(plMessage* msg) return plDrawInterface::MsgReceive(msg); } -void plInstanceDrawInterface::AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat, hsBool addToFront, int lod, hsBool partialSort) +void plInstanceDrawInterface::AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat, bool addToFront, int lod, bool partialSort) { if (fDrawable == nil) { diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.h b/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.h index d1ff19aa..bc5cf134 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plInstanceDrawInterface.h @@ -67,9 +67,9 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); - void AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat, hsBool addToFront, int LOD, hsBool partialSort); + void AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat, bool addToFront, int LOD, bool partialSort); void RemoveSharedMesh(plSharedMesh *mesh); virtual void ReleaseData(); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plMorphDelta.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plMorphDelta.cpp index 61a4ab88..1de5ceb8 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plMorphDelta.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plMorphDelta.cpp @@ -210,7 +210,7 @@ void plMorphDelta::ComputeDeltas(const hsTArray& base, const hs // For position, normal, color and all uvws // Calc del and delLenSq // If any delLenSq big enough, set nonZero to true - hsBool nonZero = false; + bool nonZero = false; // These are actually min del SQUARED. plConst(float) kMinDelPos(1.e-4f); // From Budtpueller's Handbook of Constants diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp index 2edd72fb..e200d1c0 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp @@ -122,7 +122,7 @@ plMorphSequence::~plMorphSequence() DeInit(); } -hsBool plMorphSequence::MsgReceive(plMessage* msg) +bool plMorphSequence::MsgReceive(plMessage* msg) { plRenderMsg* rend = plRenderMsg::ConvertNoRef(msg); if( rend ) @@ -305,7 +305,7 @@ void plMorphSequence::SetWeight(int iLay, int iDel, float w, plKey meshKey /* = } } -void plMorphSequence::ISetDirty(hsBool on) +void plMorphSequence::ISetDirty(bool on) { if( on ) { @@ -597,7 +597,7 @@ void plMorphSequence::IApplyShared(int iShare) mInfo.fFlags &= ~plSharedMeshInfo::kInfoDirtyMesh; } -hsBool plMorphSequence::IResetShared(int iShare) +bool plMorphSequence::IResetShared(int iShare) { if( iShare >= fSharedMeshes.GetCount() || fSharedMeshes[iShare].fCurrDraw == nil) return false; @@ -633,7 +633,7 @@ hsBool plMorphSequence::IResetShared(int iShare) return true; } -hsBool plMorphSequence::IFindIndices(int iShare) +bool plMorphSequence::IFindIndices(int iShare) { plSharedMeshInfo& mInfo = fSharedMeshes[iShare]; mInfo.fCurrDraw = nil; // In case we fail. @@ -695,7 +695,7 @@ int32_t plMorphSequence::IFindPendingStateIndex(plKey meshKey) const return -1; } -hsBool plMorphSequence::IIsUsingDrawable(plDrawable *draw) +bool plMorphSequence::IIsUsingDrawable(plDrawable *draw) { int i; for (i = 0; i < fSharedMeshes.GetCount(); i++) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.h b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.h index 1c4da5fb..e0be9925 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.h @@ -121,14 +121,14 @@ protected: const plDrawInterface* IGetDrawInterface() const; - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return false; } - void ISetHaveSnap(hsBool on) { if(on)fMorphFlags |= kHaveSnap; else fMorphFlags &= ~kHaveSnap; } - void ISetDirty(hsBool on); + void ISetHaveSnap(bool on) { if(on)fMorphFlags |= kHaveSnap; else fMorphFlags &= ~kHaveSnap; } + void ISetDirty(bool on); - hsBool IResetShared(int iShare); + bool IResetShared(int iShare); void IApplyShared(int iShare); - hsBool IFindIndices(int iShare); + bool IFindIndices(int iShare); void IReleaseIndices(int iShare); void IRenormalize(hsTArray& dst) const; @@ -140,7 +140,7 @@ protected: int32_t IFindPendingStateIndex(plKey meshKey) const; // Do we have pending state for this mesh? int32_t IFindSharedMeshIndex(plKey meshKey) const; // What's this mesh's index in our array? - hsBool IIsUsingDrawable(plDrawable *draw); // Are we actively looking at spans in this drawable? + bool IIsUsingDrawable(plDrawable *draw); // Are we actively looking at spans in this drawable? // Internal functions for maintaining that all meshes share the same global weight(s) (fGlobalLayerRef) void ISetAllSharedToGlobal(); @@ -154,7 +154,7 @@ public: CLASSNAME_REGISTER( plMorphSequence ); GETINTERFACE_ANY( plMorphSequence, plSingleModifier ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void AddTarget(plSceneObject* so); virtual void RemoveTarget(plSceneObject* so); @@ -176,11 +176,11 @@ public: float GetWeight(int iLay, int iDel, plKey meshKey = nil) const; void SetWeight(int iLay, int iDel, float w, plKey meshKey = nil); - hsBool GetHaveSnap() const { return 0 != (fMorphFlags & kHaveSnap); } - hsBool GetDirty() const { return 0 != (fMorphFlags & kDirty); } - hsBool GetUseSharedMesh() const { return 0 != (fMorphFlags & kHaveShared); } + bool GetHaveSnap() const { return 0 != (fMorphFlags & kHaveSnap); } + bool GetDirty() const { return 0 != (fMorphFlags & kDirty); } + bool GetUseSharedMesh() const { return 0 != (fMorphFlags & kHaveShared); } - void SetUseSharedMesh(hsBool on) { if(on)fMorphFlags |= kHaveShared; else fMorphFlags &= ~kHaveShared; } + void SetUseSharedMesh(bool on) { if(on)fMorphFlags |= kHaveShared; else fMorphFlags &= ~kHaveShared; } void AddSharedMesh(plSharedMesh* mesh); void RemoveSharedMesh(plSharedMesh* mesh); static void FindMorphMods(const plSceneObject *so, hsTArray &mods); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.cpp index 1a87bd6d..8d0409a1 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.cpp @@ -225,7 +225,7 @@ void plProxyGen::IGenerateProxy() hsGMaterial* mat = IGetProxyMaterial(); hsAssert(mat, "Failed to create proxy material"); - hsBool onCreate = !fProxyDrawables[idx]; + bool onCreate = !fProxyDrawables[idx]; fProxyIndex.SetCount(0); fProxyDrawables[idx] = ICreateProxy(mat, fProxyIndex, fProxyDrawables[idx]); @@ -296,7 +296,7 @@ void plProxyGen::IDestroyProxy() fProxyMaterials.Reset(); } -hsBool plProxyGen::MsgReceive(plMessage* msg) +bool plProxyGen::MsgReceive(plMessage* msg) { plProxyDrawMsg* pDraw = plProxyDrawMsg::ConvertNoRef(msg); if( pDraw && (pDraw->GetProxyFlags() & IGetProxyMsgType()) ) @@ -356,7 +356,7 @@ void plProxyGen::SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) } } -void plProxyGen::SetDisable(hsBool on) +void plProxyGen::SetDisable(bool on) { uint32_t idx = IGetProxyIndex(); if( fProxyDrawables[idx] ) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.h b/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.h index 44ba0248..41312252 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.h @@ -120,11 +120,11 @@ public: virtual ~plProxyGen(); virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l); - virtual void SetDisable(hsBool on); + virtual void SetDisable(bool on); virtual void Init(const hsKeyedObject* owner); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.cpp index 42502009..93abbaa2 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.cpp @@ -79,7 +79,7 @@ plDrawInterface *di = so->GetVolatileDrawInterface(); } */ -hsBool plSharedMesh::MsgReceive(plMessage* msg) +bool plSharedMesh::MsgReceive(plMessage* msg) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg); if (refMsg) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.h b/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.h index 60c463f9..3dac7a61 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSharedMesh.h @@ -76,7 +76,7 @@ public: CLASSNAME_REGISTER( plSharedMesh ); GETINTERFACE_ANY( plSharedMesh, hsKeyedObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); @@ -87,7 +87,7 @@ class plSharedMeshBCMsg : public plMessage public: plDrawableSpans *fDraw; plSharedMesh *fMesh; - hsBool fIsAdding; + bool fIsAdding; plSharedMeshBCMsg(); ~plSharedMeshBCMsg() {} diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.cpp index 6a013b2f..547207b5 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.cpp @@ -123,7 +123,7 @@ void plSpaceTree::Refresh() IRefreshRecur(fRoot); } -void plSpaceTree::SetTreeFlag(uint16_t f, hsBool on) +void plSpaceTree::SetTreeFlag(uint16_t f, bool on) { if( IsEmpty() ) return; @@ -149,7 +149,7 @@ void plSpaceTree::ClearTreeFlag(uint16_t f) fTree[i].fFlags &= ~f; } -void plSpaceTree::SetLeafFlag(int16_t idx, uint16_t f, hsBool on) +void plSpaceTree::SetLeafFlag(int16_t idx, uint16_t f, bool on) { if( IsEmpty() ) return; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.h b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.h index 4e70d2d8..ead198b5 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTree.h @@ -76,7 +76,7 @@ public: int16_t GetChild(int w) const { hsAssert(!(fFlags & kIsLeaf), "Getting Child of leaf node"); return fChildren[w]; } int16_t GetParent() const { return fParent; } int16_t GetLeaf() const { hsAssert(fFlags & kIsLeaf, "Getting leaf idx off interior node"); return fLeafIndex; } - hsBool IsLeaf() const { return 0 != (fFlags & kIsLeaf); } + bool IsLeaf() const { return 0 != (fFlags & kIsLeaf); } const hsBounds3Ext& GetWorldBounds() const { return fWorldBounds; } // Kind of hate this. Would like to blast the whole thing in, but @@ -138,8 +138,8 @@ public: const plSpaceTreeNode& GetNode(int16_t w) const { return fTree[w]; } int16_t GetRoot() const { return fRoot; } - hsBool IsRoot(int16_t w) const { return fRoot == w; } - hsBool IsLeaf(int16_t w) const { return GetNode(w).IsLeaf(); } + bool IsRoot(int16_t w) const { return fRoot == w; } + bool IsLeaf(int16_t w) const { return GetNode(w).IsLeaf(); } void HarvestLeaves(hsBitVector& totList, hsBitVector& list) const; void HarvestLeaves(hsBitVector& list) const; @@ -162,20 +162,20 @@ public: uint16_t GetHarvestFlags() const { return fHarvestFlags; } uint16_t HasLeafFlag(int16_t w, uint16_t f) const { return GetNode(w).fFlags & f; } - void SetLeafFlag(int16_t w, uint16_t f, hsBool on=true); + void SetLeafFlag(int16_t w, uint16_t f, bool on=true); void ClearLeafFlag(int16_t w, uint16_t f); void ClearTreeFlag(uint16_t f); - void SetTreeFlag(uint16_t f, hsBool on=true); + void SetTreeFlag(uint16_t f, bool on=true); - hsBool IsDisabled(uint16_t w) const { return (GetNode(w).fFlags & plSpaceTreeNode::kDisabled) || (fCache && !fCache->IsBitSet(w)); } + bool IsDisabled(uint16_t w) const { return (GetNode(w).fFlags & plSpaceTreeNode::kDisabled) || (fCache && !fCache->IsBitSet(w)); } // Should GetWorldBounds check and refresh if needed? const hsBounds3Ext& GetWorldBounds() const { return GetNode(GetRoot()).fWorldBounds; } void MoveLeaf(int16_t idx, const hsBounds3Ext& newWorldBnd); void Refresh(); - hsBool IsEmpty() const { return 0 != (GetNode(GetRoot()).fFlags & plSpaceTreeNode::kEmpty); } - hsBool IsDirty() const { return 0 != (GetNode(GetRoot()).fFlags & plSpaceTreeNode::kDirty); } + bool IsEmpty() const { return 0 != (GetNode(GetRoot()).fFlags & plSpaceTreeNode::kEmpty); } + bool IsDirty() const { return 0 != (GetNode(GetRoot()).fFlags & plSpaceTreeNode::kDirty); } void MakeDirty() { fTree[GetRoot()].fFlags |= plSpaceTreeNode::kDirty; } int16_t GetNumLeaves() const { return fNumLeaves; } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.cpp index c5d8c47c..d93cd59b 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.cpp @@ -411,7 +411,7 @@ void plSpaceTreeMaker::Cleanup() fDisabled.Reset(); } -int32_t plSpaceTreeMaker::AddLeaf(const hsBounds3Ext& worldBnd, hsBool disable) +int32_t plSpaceTreeMaker::AddLeaf(const hsBounds3Ext& worldBnd, bool disable) { plSpacePrepNode* leaf = new plSpacePrepNode; fLeaves.Append(leaf); @@ -435,7 +435,7 @@ int32_t plSpaceTreeMaker::AddLeaf(const hsBounds3Ext& worldBnd, hsBool disable) #define MF_DO_3D #ifdef MF_DO_RAND -#define MF_SETPOINT(pt,a,b,c) pt.Set(hsRand()/32767.f, hsRand()/32767.f, hsRand()/32767.f) +#define MF_SETPOINT(pt,a,b,c) pt.Set(rand()/32767.f, rand()/32767.f, rand()/32767.f) #else // MF_DO_RAND #define MF_SETPOINT(pt,a,b,c) pt.Set(a,b,c) #endif // MF_DO_RAND diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.h b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.h index 02adbdaa..15e08a7d 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpaceTreeMaker.h @@ -98,7 +98,7 @@ public: void Cleanup(); void Reset(); - int32_t AddLeaf(const hsBounds3Ext& worldBnd, hsBool disable=false); + int32_t AddLeaf(const hsBounds3Ext& worldBnd, bool disable=false); plSpaceTree* MakeTree(); void TestTree(); // development only - NUKE ME mf horse diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpanInstance.h b/Sources/Plasma/PubUtilLib/plDrawable/plSpanInstance.h index 197502a2..e8ac008e 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpanInstance.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpanInstance.h @@ -151,8 +151,8 @@ public: void SetLocalToWorld(const hsMatrix44& l2w); - hsBool HasPosDelta() const { return fPosDelta != nil; } - hsBool HasColor() const { return fCol != nil; } + bool HasPosDelta() const { return fPosDelta != nil; } + bool HasColor() const { return fCol != nil; } static uint16_t PosStrideFromEncoding(const plSpanEncoding& encoding) { @@ -241,7 +241,7 @@ public: fNumVertsLeft--; } - hsBool More() const { return fNumVertsLeft > 0; } + bool More() const { return fNumVertsLeft > 0; } hsVector3 DelPos() const { diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpanTemplate.h b/Sources/Plasma/PubUtilLib/plDrawable/plSpanTemplate.h index 0482b49f..29e2e969 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpanTemplate.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpanTemplate.h @@ -58,12 +58,12 @@ class plSpanTemplate public: // 99% of the time, the defaults are fine. Just tell me // how many UVWs, and whether you've got color. - static uint16_t MakeFormat(hsBool hasColor, int numUVWs, - hsBool hasWgtIdx = false, + static uint16_t MakeFormat(bool hasColor, int numUVWs, + bool hasWgtIdx = false, int numWgts = 0, - hsBool hasNorm = true, - hsBool hasPos = true, - hsBool hasColor2 = true) + bool hasNorm = true, + bool hasPos = true, + bool hasColor2 = true) { return (hasPos ? kPosMask : 0) | (hasNorm ? kNormMask : 0) @@ -210,7 +210,7 @@ public: return nil; } - hsBool ValidateInput(Channel chan, int i, int j) const + bool ValidateInput(Channel chan, int i, int j) const { switch(chan) { diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.cpp index 7d628af0..ce1f4e43 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.cpp @@ -144,7 +144,7 @@ void plSpan::AddAuxSpan(plAuxSpan* aux) // PermaLights are permanently assigned to a set of spans. There's no checking // for in range or anything, they are just on. -void plSpan::AddPermaLight(plLightInfo* li, hsBool proj) +void plSpan::AddPermaLight(plLightInfo* li, bool proj) { if( li ) { @@ -157,7 +157,7 @@ void plSpan::AddPermaLight(plLightInfo* li, hsBool proj) } } -void plSpan::RemovePermaLight(plLightInfo* li, hsBool proj) +void plSpan::RemovePermaLight(plLightInfo* li, bool proj) { hsTArray& lights = proj ? fPermaProjs : fPermaLights; int idx = lights.Find(li); @@ -172,7 +172,7 @@ void plSpan::RemovePermaLight(plLightInfo* li, hsBool proj) //// AddLight //////////////////////////////////////////////////////////////// // Smart function for maintaining the sorted list of lights for a plSpan. -void plSpan::AddLight( plLightInfo *li, float strength, float scale, hsBool proj ) const +void plSpan::AddLight( plLightInfo *li, float strength, float scale, bool proj ) const { hsTArray& lights = proj ? fProjectors : fLights; hsTArray& strengths = proj ? fProjStrengths : fLightStrengths; @@ -224,7 +224,7 @@ void plSpan::ClearLights() const //// CanMergeInto //////////////////////////////////////////////////////////// -hsBool plSpan::CanMergeInto( plSpan *other ) +bool plSpan::CanMergeInto( plSpan *other ) { if( fTypeMask ^ other->fTypeMask ) { @@ -375,7 +375,7 @@ void plVertexSpan::Write( hsStream* stream ) stream->WriteLE32( fVLength ); } -hsBool plVertexSpan::CanMergeInto( plSpan *other ) +bool plVertexSpan::CanMergeInto( plSpan *other ) { if( !plSpan::CanMergeInto( other ) ) return false; @@ -470,7 +470,7 @@ void plIcicle::Destroy( void ) //// CanMergeInto //////////////////////////////////////////////////////////// -hsBool plIcicle::CanMergeInto( plSpan *other ) +bool plIcicle::CanMergeInto( plSpan *other ) { if( !plVertexSpan::CanMergeInto( other ) ) return false; @@ -530,7 +530,7 @@ plParticleSpan::plParticleSpan() : plIcicle() //// CanMergeInto //////////////////////////////////////////////////////////// -hsBool plParticleSpan::CanMergeInto( plSpan *other ) +bool plParticleSpan::CanMergeInto( plSpan *other ) { return plIcicle::CanMergeInto( other ); } diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.h b/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.h index fbb46aad..56bbdd56 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plSpanTypes.h @@ -174,25 +174,25 @@ class plSpan void SetShadowBit(uint32_t idx) const { fShadowBits.SetBit(idx); } void ClearShadowBits() const { fShadowBits.Clear(); } - hsBool IsShadowBitSet(uint32_t idx) const { return fShadowBits.IsBitSet(idx); } + bool IsShadowBitSet(uint32_t idx) const { return fShadowBits.IsBitSet(idx); } void ClearLights() const; - void AddLight( plLightInfo* li, float strength, float scale, hsBool proj ) const; + void AddLight( plLightInfo* li, float strength, float scale, bool proj ) const; - hsTArray& GetLightList(hsBool proj) const { return proj ? fProjectors : fLights; } + hsTArray& GetLightList(bool proj) const { return proj ? fProjectors : fLights; } - uint32_t GetNumLights(hsBool proj) const { return proj ? fProjectors.GetCount() : fLights.GetCount(); } - plLightInfo* GetLight(int i, hsBool proj) const { return proj ? fProjectors[i] : fLights[i]; } - float GetLightStrength(int i, hsBool proj) const { return proj ? fProjStrengths[i] : fLightStrengths[i]; } - float GetLightScale(int i, hsBool proj) const { return proj ? fProjScales[i] : fLightScales[i]; } + uint32_t GetNumLights(bool proj) const { return proj ? fProjectors.GetCount() : fLights.GetCount(); } + plLightInfo* GetLight(int i, bool proj) const { return proj ? fProjectors[i] : fLights[i]; } + float GetLightStrength(int i, bool proj) const { return proj ? fProjStrengths[i] : fLightStrengths[i]; } + float GetLightScale(int i, bool proj) const { return proj ? fProjScales[i] : fLightScales[i]; } - void AddPermaLight(plLightInfo* li, hsBool proj); - void RemovePermaLight(plLightInfo* li, hsBool proj); + void AddPermaLight(plLightInfo* li, bool proj); + void RemovePermaLight(plLightInfo* li, bool proj); const hsBitVector& GetVisSet() const { return fVisSet; } const hsBitVector& GetVisNot() const { return fVisNot; } - void SetVisBit(uint32_t w, hsBool on) { fVisSet.SetBit(w, on); } - void SetVisNot(uint32_t w, hsBool on) { fVisNot.SetBit(w, on); } + void SetVisBit(uint32_t w, bool on) { fVisSet.SetBit(w, on); } + void SetVisNot(uint32_t w, bool on) { fVisNot.SetBit(w, on); } void RemoveAuxSpan(plAuxSpan* aux); void AddAuxSpan(plAuxSpan* aux); @@ -202,7 +202,7 @@ class plSpan virtual void Read( hsStream* stream ); virtual void Write( hsStream* stream ); - virtual hsBool CanMergeInto( plSpan* other ); + virtual bool CanMergeInto( plSpan* other ); virtual void MergeInto( plSpan* other ); virtual void Destroy( void ); @@ -233,7 +233,7 @@ public: virtual void Read( hsStream* stream ); virtual void Write( hsStream* stream ); - virtual hsBool CanMergeInto( plSpan* other ); + virtual bool CanMergeInto( plSpan* other ); virtual void MergeInto( plSpan* other ); }; @@ -260,7 +260,7 @@ class plIcicle : public plVertexSpan virtual void Read( hsStream* stream ); virtual void Write( hsStream* stream ); - virtual hsBool CanMergeInto( plSpan* other ); + virtual bool CanMergeInto( plSpan* other ); virtual void MergeInto( plSpan* other ); virtual void Destroy( void ); }; @@ -288,7 +288,7 @@ class plParticleSpan : public plIcicle virtual void Read( hsStream* stream ) { /*plParticleSpans don't read in!*/ } virtual void Write( hsStream* stream ) { /*plParticleSpans don't write out!*/ } - virtual hsBool CanMergeInto( plSpan* other ); + virtual bool CanMergeInto( plSpan* other ); virtual void MergeInto( plSpan* other ); virtual void Destroy( void ); }; diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plVisLOSMgr.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plVisLOSMgr.cpp index 45b81ee2..a68fe77e 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plVisLOSMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plVisLOSMgr.cpp @@ -77,7 +77,7 @@ plVisLOSMgr* plVisLOSMgr::Instance() return &inst; } -hsBool plVisLOSMgr::ICheckSpaceTreeRecur(plSpaceTree* space, int which, hsTArray& hits) +bool plVisLOSMgr::ICheckSpaceTreeRecur(plSpaceTree* space, int which, hsTArray& hits) { const plSpaceTreeNode& node = space->GetNode(which); @@ -101,7 +101,7 @@ hsBool plVisLOSMgr::ICheckSpaceTreeRecur(plSpaceTree* space, int which, hsTArray // else recurse on its children else { - hsBool retVal = false; + bool retVal = false; if( ICheckSpaceTreeRecur(space, node.GetChild(0), hits) ) retVal = true; @@ -123,7 +123,7 @@ struct plCompSpaceHit : public std::binary_function& hits) +bool plVisLOSMgr::ICheckSpaceTree(plSpaceTree* space, hsTArray& hits) { hits.SetCount(0); @@ -131,7 +131,7 @@ hsBool plVisLOSMgr::ICheckSpaceTree(plSpaceTree* space, hsTArray& hi return false; // Hierarchical search down the tree for bounds intersecting the current ray. - hsBool retVal = ICheckSpaceTreeRecur(space, space->GetRoot(), hits); + bool retVal = ICheckSpaceTreeRecur(space, space->GetRoot(), hits); // Now sort them front to back. plSpaceHit* begin = hits.AcquireArray(); @@ -142,7 +142,7 @@ hsBool plVisLOSMgr::ICheckSpaceTree(plSpaceTree* space, hsTArray& hi return retVal; } -hsBool plVisLOSMgr::ISetup(const hsPoint3& pStart, const hsPoint3& pEnd) +bool plVisLOSMgr::ISetup(const hsPoint3& pStart, const hsPoint3& pEnd) { fCurrFrom = pStart; fCurrTarg = pEnd; @@ -153,7 +153,7 @@ hsBool plVisLOSMgr::ISetup(const hsPoint3& pStart, const hsPoint3& pEnd) return fMaxDist > kMinMaxDist; } -hsBool plVisLOSMgr::Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit& hit) +bool plVisLOSMgr::Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit& hit) { if( !fPageMgr ) return false; @@ -174,7 +174,7 @@ hsBool plVisLOSMgr::Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit // Our max distance can be changing as we do this, because a // face hit will limit how far we need to look. When we hit the // first node with a closest distance < fMaxDist, we're done. - hsBool retVal = false; + bool retVal = false; int i; for( i = 0; i < hits.GetCount(); i++ ) @@ -189,13 +189,13 @@ hsBool plVisLOSMgr::Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit return retVal; } -hsBool plVisLOSMgr::ICheckSceneNode(plSceneNode* node, plVisHit& hit) +bool plVisLOSMgr::ICheckSceneNode(plSceneNode* node, plVisHit& hit) { static hsTArray hits; if( !ICheckSpaceTree(node->GetSpaceTree(), hits) ) return false; - hsBool retVal = false; + bool retVal = false; int i; for( i = 0; i < hits.GetCount(); i++ ) { @@ -214,7 +214,7 @@ hsBool plVisLOSMgr::ICheckSceneNode(plSceneNode* node, plVisHit& hit) } -hsBool plVisLOSMgr::ICheckDrawable(plDrawable* d, plVisHit& hit) +bool plVisLOSMgr::ICheckDrawable(plDrawable* d, plVisHit& hit) { plDrawableSpans* ds = plDrawableSpans::ConvertNoRef(d); if( !ds ) @@ -224,11 +224,11 @@ hsBool plVisLOSMgr::ICheckDrawable(plDrawable* d, plVisHit& hit) if( !ICheckSpaceTree(ds->GetSpaceTree(), hits) ) return false; - const hsBool isOpaque = !ds->GetRenderLevel().Level(); + const bool isOpaque = !ds->GetRenderLevel().Level(); const hsTArray spans = ds->GetSpanArray(); - hsBool retVal = false; + bool retVal = false; int i; for( i = 0; i < hits.GetCount(); i++ ) { @@ -245,7 +245,7 @@ hsBool plVisLOSMgr::ICheckDrawable(plDrawable* d, plVisHit& hit) return retVal; } -hsBool plVisLOSMgr::ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit& hit) +bool plVisLOSMgr::ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit& hit) { if( !(dr->GetSpan(spanIdx)->fTypeMask & plSpan::kIcicleSpan) ) return false; @@ -253,9 +253,9 @@ hsBool plVisLOSMgr::ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit& plAccessSpan src; plAccessGeometry::Instance()->OpenRO(dr, spanIdx, src); - const hsBool twoSided = !!(src.GetMaterial()->GetLayer(0)->GetMiscFlags() & hsGMatState::kMiscTwoSided); + const bool twoSided = !!(src.GetMaterial()->GetLayer(0)->GetMiscFlags() & hsGMatState::kMiscTwoSided); - hsBool retVal = false; + bool retVal = false; // We move into local space, look for hits, and convert the closest we find // (if any) back into world space at the end. @@ -330,7 +330,7 @@ hsBool plVisLOSMgr::ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit& return retVal; } -hsBool plVisLOSMgr::ICheckBound(const hsBounds3Ext& bnd, float& closest) +bool plVisLOSMgr::ICheckBound(const hsBounds3Ext& bnd, float& closest) { if( bnd.GetType() != kBoundsNormal ) return false; @@ -354,7 +354,7 @@ hsBool plVisLOSMgr::ICheckBound(const hsBounds3Ext& bnd, float& closest) hsPoint3 corn[8]; bnd.GetCorners(corn); - hsBool retVal = false; + bool retVal = false; const hsPoint3& currFrom = fCurrFrom; const hsPoint3& currTarg = fCurrTarg; @@ -416,7 +416,7 @@ hsBool plVisLOSMgr::ICheckBound(const hsBounds3Ext& bnd, float& closest) return false; } -hsBool plVisLOSMgr::CursorCheck(plVisHit& hit) +bool plVisLOSMgr::CursorCheck(plVisHit& hit) { int32_t sx= int32_t(plMouseDevice::Instance()->GetCursorX() * fPipe->Width()); int32_t sy= int32_t(plMouseDevice::Instance()->GetCursorY() * fPipe->Height()); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plVisLOSMgr.h b/Sources/Plasma/PubUtilLib/plDrawable/plVisLOSMgr.h index ec76ce52..b3e59450 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plVisLOSMgr.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plVisLOSMgr.h @@ -79,17 +79,17 @@ protected: hsPoint3 fCurrFrom; hsPoint3 fCurrTarg; - hsBool ISetup(const hsPoint3& pStart, const hsPoint3& pEnd); - hsBool ICheckBound(const hsBounds3Ext& bnd, float& closest); - hsBool ICheckSpaceTreeRecur(plSpaceTree* space, int which, hsTArray& hits); - hsBool ICheckSpaceTree(plSpaceTree* space, hsTArray& hits); - hsBool ICheckSceneNode(plSceneNode* node, plVisHit& hit); - hsBool ICheckDrawable(plDrawable* d, plVisHit& hit); - hsBool ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit& hit); + bool ISetup(const hsPoint3& pStart, const hsPoint3& pEnd); + bool ICheckBound(const hsBounds3Ext& bnd, float& closest); + bool ICheckSpaceTreeRecur(plSpaceTree* space, int which, hsTArray& hits); + bool ICheckSpaceTree(plSpaceTree* space, hsTArray& hits); + bool ICheckSceneNode(plSceneNode* node, plVisHit& hit); + bool ICheckDrawable(plDrawable* d, plVisHit& hit); + bool ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit& hit); public: - hsBool Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit& hit); - hsBool CursorCheck(plVisHit& hit); + bool Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit& hit); + bool CursorCheck(plVisHit& hit); static plVisLOSMgr* Instance(); diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp index 9c234414..fad2d7fb 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp @@ -430,7 +430,7 @@ void plWaveSet7::Write(hsStream* stream, hsResMgr* mgr) } } -hsBool plWaveSet7::MsgReceive(plMessage* msg) +bool plWaveSet7::MsgReceive(plMessage* msg) { plEvalMsg* update = plEvalMsg::ConvertNoRef(msg); if( update ) @@ -444,7 +444,7 @@ hsBool plWaveSet7::MsgReceive(plMessage* msg) IRestartLog(); IRestartGraph(); - plCONST(hsBool) reRender(false); + plCONST(bool) reRender(false); if( reRender || (fTrialUpdate & kReRenderEnvMap) ) { plDynamicEnvMap* envMap = plDynamicEnvMap::ConvertNoRef(fEnvMap); @@ -519,7 +519,7 @@ hsBool plWaveSet7::MsgReceive(plMessage* msg) return plMultiModifier::MsgReceive(msg); } -hsBool plWaveSet7::IAnyBoundsVisible(plPipeline* pipe) const +bool plWaveSet7::IAnyBoundsVisible(plPipeline* pipe) const { int i; for( i = 0; i < fTargBnds.GetCount(); i++ ) @@ -530,7 +530,7 @@ hsBool plWaveSet7::IAnyBoundsVisible(plPipeline* pipe) const return false; } -hsBool plWaveSet7::IOnReceive(plGenRefMsg* refMsg) +bool plWaveSet7::IOnReceive(plGenRefMsg* refMsg) { switch( refMsg->fType ) { @@ -638,7 +638,7 @@ hsBool plWaveSet7::IOnReceive(plGenRefMsg* refMsg) return false; } -hsBool plWaveSet7::IOnRemove(plGenRefMsg* refMsg) +bool plWaveSet7::IOnRemove(plGenRefMsg* refMsg) { switch( refMsg->fType ) { @@ -786,7 +786,7 @@ void plWaveSet7::IUpdateWaves(float dt) } // return true if we've finished this transition. -hsBool plWaveSet7::ITransContinue(float dt) +bool plWaveSet7::ITransContinue(float dt) { float currFade = (fFreqMod[fTransistor] += fTransDel * dt); @@ -847,7 +847,7 @@ void plWaveSet7::ITransition(float dt) } -hsBool plWaveSet7::ITransTexContinue(float dt) +bool plWaveSet7::ITransTexContinue(float dt) { float currFade = (fTexWaveFade[fTexTrans] += fTexTransDel * dt); @@ -3564,7 +3564,7 @@ void plWaveSet7::AddShoreTest(plKey& key) ////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////// -hsBool plWaveSet7::SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts) +bool plWaveSet7::SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts) { // We'll assume that if we set the vertexshader, we set the pixelshader too. if( fRipVShader && (mat->GetLayer(0)->GetVertexShader() == fRipVShader) ) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.h b/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.h index 17bec842..65776f7e 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.h @@ -352,7 +352,7 @@ protected: void ICalcScale(); void IUpdateWaves(float dt); void IUpdateWave(float dt, int i); - hsBool IAnyBoundsVisible(plPipeline* pipe) const; + bool IAnyBoundsVisible(plPipeline* pipe) const; void IInitWave(int i); void IReInitWaves(); @@ -370,15 +370,15 @@ protected: void ISetWindSpeed(float s); - hsBool IOnReceive(plGenRefMsg* refMsg); - hsBool IOnRemove(plGenRefMsg* refMsg); + bool IOnReceive(plGenRefMsg* refMsg); + bool IOnRemove(plGenRefMsg* refMsg); - hsBool ITransContinue(float dt); + bool ITransContinue(float dt); void IStartTransition(float dt); float ITransitionDelay() const; void ITransition(float dt); - hsBool ITransTexContinue(float dt); + bool ITransTexContinue(float dt); void IStartTexTransition(float dt); void ITransTex(float dt); @@ -494,9 +494,9 @@ public: CLASSNAME_REGISTER( plWaveSet7 ); GETINTERFACE_ANY( plWaveSet7, plWaveSetBase ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return false; } int32_t GetNumProperties() const { return kNumProps; } @@ -635,7 +635,7 @@ public: void AddBuoy(plKey soKey); void RemoveBuoy(plKey soKey); - virtual hsBool SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts); + virtual bool SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts); virtual float GetHeight() const { return State().fWaterHeight; } @@ -649,10 +649,10 @@ public: void StopLog(); void StartLog(); - hsBool Logging() const { return fStatusLog != nil; } + bool Logging() const { return fStatusLog != nil; } void StartGraph(); void StopGraph(); - hsBool Graphing() const { return fStatusGraph != nil; } + bool Graphing() const { return fStatusGraph != nil; } }; #endif // plWaveSet7_inc diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plWaveSetBase.h b/Sources/Plasma/PubUtilLib/plDrawable/plWaveSetBase.h index 9c78c452..076e3aa8 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plWaveSetBase.h +++ b/Sources/Plasma/PubUtilLib/plDrawable/plWaveSetBase.h @@ -61,11 +61,11 @@ public: CLASSNAME_REGISTER( plWaveSetBase ); GETINTERFACE_ANY( plWaveSetBase, plMultiModifier ); - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return false; } int32_t GetNumProperties() const { return 0; } - virtual hsBool SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts) = 0; + virtual bool SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts) = 0; virtual float GetHeight() const = 0; virtual hsVector3 GetWindDir() const = 0; diff --git a/Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp index d7b7e1e9..0f97be96 100644 --- a/Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp @@ -100,7 +100,7 @@ const char* hsFile::GetName() return FindNameInPath(this->GetPathAndName()); } -FILE* hsFile::OpenFILE(const char mode[], hsBool throwIfFailure) +FILE* hsFile::OpenFILE(const char mode[], bool throwIfFailure) { this->Close(); @@ -116,7 +116,7 @@ FILE* hsFile::OpenFILE(const char mode[], hsBool throwIfFailure) return fFILE; } -hsStream* hsFile::OpenStream(const char mode[], hsBool throwIfFailure) +hsStream* hsFile::OpenStream(const char mode[], bool throwIfFailure) { FILE* file = this->OpenFILE(mode, throwIfFailure); @@ -141,7 +141,7 @@ void hsFile::Close() /////////////////////////////////////////////////////////////////////// -hsBool hsFolderIterator::NextFileSuffix(const char suffix[]) +bool hsFolderIterator::NextFileSuffix(const char suffix[]) { while (this->NextFile()) { const char* fileSuffix = ::strrchr(this->GetFileName(), '.'); @@ -153,18 +153,20 @@ hsBool hsFolderIterator::NextFileSuffix(const char suffix[]) int hsFolderIterator::GetPathAndName(char pathandname[]) { + hsAssert(pathandname, "NULL path string"); const char* name = this->GetFileName(); - int pathLen = hsStrlen(fPath); + int pathLen = strlen(fPath); // add 1 for null terminator - int totalLen = pathLen + sizeof(kDirChar) + hsStrlen(name) + 1; + int totalLen = pathLen + sizeof(kDirChar) + strlen(name) + 1; hsAssert(totalLen <= kFolderIterator_MaxPath, "Overrun kFolderIterator_MaxPath"); if (pathandname) - { hsStrcpy(pathandname, fPath); + { + strcpy(pathandname, fPath); if (pathLen > 0 && pathandname[pathLen - 1] != kDirChar) pathandname[pathLen++] = kDirChar; - hsStrcpy(pathandname + pathLen, name); + strcpy(pathandname + pathLen, name); } return totalLen; } diff --git a/Sources/Plasma/PubUtilLib/plFile/hsFiles.h b/Sources/Plasma/PubUtilLib/plFile/hsFiles.h index 63293bcd..d9c2ed32 100644 --- a/Sources/Plasma/PubUtilLib/plFile/hsFiles.h +++ b/Sources/Plasma/PubUtilLib/plFile/hsFiles.h @@ -83,8 +83,8 @@ public: virtual const char* GetPathAndName(); virtual void SetPathAndName(const char pathAndName[]); - virtual FILE* OpenFILE(const char mode[], hsBool throwIfFailure = false); - virtual hsStream* OpenStream(const char mode[], hsBool throwIfFailure = false); + virtual FILE* OpenFILE(const char mode[], bool throwIfFailure = false); + virtual hsStream* OpenStream(const char mode[], bool throwIfFailure = false); virtual void Close(); // called automatically in the destructor }; @@ -110,11 +110,11 @@ public: void SetPath(const char path[]); void Reset(); - hsBool NextFile(); - hsBool NextFileSuffix(const char suffix[]); + bool NextFile(); + bool NextFileSuffix(const char suffix[]); const char* GetFileName() const; int GetPathAndName(char pathandname[] = nil); - hsBool IsDirectory( void ) const; + bool IsDirectory( void ) const; FILE* OpenFILE(const char mode[]); @@ -138,11 +138,11 @@ public: void SetPath(const wchar_t path[]); void Reset(); - hsBool NextFile(); - hsBool NextFileSuffix(const wchar_t suffix[]); + bool NextFile(); + bool NextFileSuffix(const wchar_t suffix[]); const wchar_t* GetFileName() const; int GetPathAndName(wchar_t pathandname[] = nil); - hsBool IsDirectory( void ) const; + bool IsDirectory( void ) const; FILE* OpenFILE(const wchar_t mode[]); diff --git a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Mac.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Mac.cpp index 7ba0689c..60144081 100644 --- a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Mac.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Mac.cpp @@ -121,7 +121,7 @@ void hsMacFile::SetNameFromSpec() fPathAndName = hsStrcpy(temp); } -hsBool hsMacFile::Create(OSType creator, OSType fileType, ScriptCode scriptCode) +bool hsMacFile::Create(OSType creator, OSType fileType, ScriptCode scriptCode) { this->Close(); @@ -136,7 +136,7 @@ hsBool hsMacFile::Create(OSType creator, OSType fileType, ScriptCode scriptCode) #define kFileNotFound_Err -43 -hsBool hsMacFile::OpenDataFork(Sint8_t perm, int16_t* refnum) +bool hsMacFile::OpenDataFork(Sint8_t perm, int16_t* refnum) { this->Close(); @@ -172,7 +172,7 @@ void hsMacFile::SetPathAndName(const char pathAndName[]) this->SetSpecFromName(); } -hsStream* hsMacFile::OpenStream(const char mode[], hsBool throwIfFailure) +hsStream* hsMacFile::OpenStream(const char mode[], bool throwIfFailure) { hsThrowIfNilParam(mode); @@ -213,7 +213,7 @@ struct hsFolderIterator_Data { OSType fCreator; char fCName[_MAX_PATH]; int16_t fCurrIndex; - hsBool fValid; + bool fValid; }; hsFolderIterator::hsFolderIterator(const char path[]) @@ -328,7 +328,7 @@ void hsFolderIterator::Reset() #endif } -hsBool hsFolderIterator::NextFile() +bool hsFolderIterator::NextFile() { if (fData->fCurrIndex == 0) return false; @@ -367,7 +367,7 @@ const char* hsFolderIterator::GetFileName() const //////////////////////////////////////////////////////////////////////////// -hsBool hsFolderIterator::NextMacFile(OSType targetFileType, OSType targetCreator) +bool hsFolderIterator::NextMacFile(OSType targetFileType, OSType targetCreator) { for (;;) { if (this->NextFile() == false) @@ -400,7 +400,7 @@ OSType hsFolderIterator::GetMacCreator() const return fData->fCreator; } -hsBool hsFolderIterator::IsDirectory( void ) const +bool hsFolderIterator::IsDirectory( void ) const { hsAssert( false, "hsFolderIterator::IsDirectory() not defined on this platform!!!" ); return false; diff --git a/Sources/Plasma/PubUtilLib/plFile/hsFiles_PS2.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles_PS2.cpp index 19ca14ce..6268a617 100644 --- a/Sources/Plasma/PubUtilLib/plFile/hsFiles_PS2.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/hsFiles_PS2.cpp @@ -67,7 +67,7 @@ void hsFolderIterator::Reset() { } -hsBool hsFolderIterator::NextFile() +bool hsFolderIterator::NextFile() { } @@ -75,7 +75,7 @@ const char* hsFolderIterator::GetFileName() const { } -hsBool hsFolderIterator::IsDirectory( void ) const +bool hsFolderIterator::IsDirectory( void ) const { hsAssert( false, "hsFolderIterator::IsDirectory() not defined on this platform!!!" ); return false; diff --git a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp index 9564eec3..d95cfa84 100644 --- a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp @@ -94,7 +94,7 @@ void hsFolderIterator::Reset() fData->fInited=false; } } -hsBool hsFolderIterator::NextFile() +bool hsFolderIterator::NextFile() { if (fData->fInited == false) { @@ -126,7 +126,7 @@ const char* hsFolderIterator::GetFileName() const return plFileUtils::GetFileName(fn); } -hsBool hsFolderIterator::IsDirectory( void ) const +bool hsFolderIterator::IsDirectory( void ) const { // rob, please forgive me, this is my best attempt... if(fData->fCnt > fData->fGlobBuf.gl_pathc ) diff --git a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Win.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Win.cpp index 5d1be0fe..25e0c659 100644 --- a/Sources/Plasma/PubUtilLib/plFile/hsFiles_Win.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Win.cpp @@ -128,7 +128,7 @@ void hsFolderIterator::Reset() fData->fValid = true; } -hsBool hsFolderIterator::NextFile() +bool hsFolderIterator::NextFile() { if (fData->fValid == false) return false; @@ -163,7 +163,7 @@ hsBool hsFolderIterator::NextFile() return true; } -hsBool hsFolderIterator::IsDirectory( void ) const +bool hsFolderIterator::IsDirectory( void ) const { if( fData->fValid && ( fData->fFindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) ) return true; @@ -261,7 +261,7 @@ void hsWFolderIterator::Reset() fData->fValid = true; } -hsBool hsWFolderIterator::NextFile() +bool hsWFolderIterator::NextFile() { if (fData->fValid == false) return false; @@ -300,7 +300,7 @@ hsBool hsWFolderIterator::NextFile() return true; } -hsBool hsWFolderIterator::IsDirectory( void ) const +bool hsWFolderIterator::IsDirectory( void ) const { if( fData->fValid && ( fData->fFindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) ) return true; diff --git a/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp b/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp index 8350bc87..e624fb63 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.cpp @@ -116,17 +116,17 @@ void plEncryptedStream::IDecipher(uint32_t* const v) v[0]=y; v[1]=z; } -hsBool plEncryptedStream::Open(const char* name, const char* mode) +bool plEncryptedStream::Open(const char* name, const char* mode) { wchar_t* wName = hsStringToWString(name); wchar_t* wMode = hsStringToWString(mode); - hsBool ret = Open(wName, wMode); + bool ret = Open(wName, wMode); delete [] wName; delete [] wMode; return ret; } -hsBool plEncryptedStream::Open(const wchar_t* name, const wchar_t* mode) +bool plEncryptedStream::Open(const wchar_t* name, const wchar_t* mode) { if (wcscmp(mode, L"rb") == 0) { @@ -175,7 +175,7 @@ hsBool plEncryptedStream::Open(const wchar_t* name, const wchar_t* mode) } } -hsBool plEncryptedStream::Close() +bool plEncryptedStream::Close() { int rtn = false; @@ -247,7 +247,7 @@ void plEncryptedStream::IBufferFile() fPosition = 0; } -hsBool plEncryptedStream::AtEnd() +bool plEncryptedStream::AtEnd() { if (fBufferedStream) return fRAMStream->AtEnd(); @@ -518,7 +518,8 @@ bool plEncryptedStream::ICheckMagicString(FILE* fp) char magicString[kMagicStringLen+1]; fread(&magicString, kMagicStringLen, 1, fp); magicString[kMagicStringLen] = '\0'; - return (hsStrEQ(magicString, kMagicString) || hsStrEQ(magicString, kOldMagicString)); + return strcmp(magicString, kMagicString) == 0 || + strcmp(magicString, kOldMagicString) == 0; } bool plEncryptedStream::IsEncryptedFile(const char* fileName) diff --git a/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.h b/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.h index 29067168..6aa0f1fb 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.h +++ b/Sources/Plasma/PubUtilLib/plFile/plEncryptedStream.h @@ -82,13 +82,13 @@ public: plEncryptedStream(uint32_t* key=nil); ~plEncryptedStream(); - virtual hsBool Open(const char* name, const char* mode = "rb"); - virtual hsBool Open(const wchar_t* name, const wchar_t* mode = L"rb"); - virtual hsBool Close(); + virtual bool Open(const char* name, const char* mode = "rb"); + virtual bool Open(const wchar_t* name, const wchar_t* mode = L"rb"); + virtual bool Close(); virtual uint32_t Read(uint32_t byteCount, void* buffer); virtual uint32_t Write(uint32_t byteCount, const void* buffer); - virtual hsBool AtEnd(); + virtual bool AtEnd(); virtual void Skip(uint32_t deltaByteCount); virtual void Rewind(); virtual void FastFwd(); diff --git a/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp index 4920c953..9f3b91cf 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp @@ -87,7 +87,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // Creates the directory specified. Returns false if unsuccessful or // directory already exists -hsBool plFileUtils::CreateDir( const char *path ) +bool plFileUtils::CreateDir( const char *path ) { // Create our directory #if HS_BUILD_FOR_WIN32 @@ -97,7 +97,7 @@ hsBool plFileUtils::CreateDir( const char *path ) #endif } -hsBool plFileUtils::CreateDir( const wchar_t *path ) +bool plFileUtils::CreateDir( const wchar_t *path ) { // Create our directory #if HS_BUILD_FOR_WIN32 @@ -111,12 +111,12 @@ hsBool plFileUtils::CreateDir( const wchar_t *path ) #endif } -hsBool plFileUtils::RemoveDir(const char* path) +bool plFileUtils::RemoveDir(const char* path) { return (rmdir(path) == 0); } -hsBool plFileUtils::RemoveDirTree(const char * path) +bool plFileUtils::RemoveDirTree(const char * path) { hsFolderIterator it(path); while (it.NextFile()) @@ -257,19 +257,19 @@ bool plFileUtils::FileExists(const char* file) //// EnsureFilePathExists //////////////////////////////////////////////////// // Given a filename with path, makes sure the file's path exists -hsBool plFileUtils::EnsureFilePathExists( const char *filename ) +bool plFileUtils::EnsureFilePathExists( const char *filename ) { wchar_t* wFilename = hsStringToWString(filename); - hsBool ret = EnsureFilePathExists(wFilename); + bool ret = EnsureFilePathExists(wFilename); delete [] wFilename; return ret; } -hsBool plFileUtils::EnsureFilePathExists( const wchar_t *filename ) +bool plFileUtils::EnsureFilePathExists( const wchar_t *filename ) { hsWStringTokenizer izer( filename, L"\\/" ); - hsBool lastWorked = false; + bool lastWorked = false; wchar_t token[ kFolderIterator_MaxPath ]; @@ -287,7 +287,7 @@ hsBool plFileUtils::EnsureFilePathExists( const wchar_t *filename ) // Gets the creation and modification dates of the file specified. Returns // false if unsuccessful -hsBool plFileUtils::GetFileTimes( const char *path, plUnifiedTime *createTimeOut, plUnifiedTime *modifyTimeOut ) +bool plFileUtils::GetFileTimes( const char *path, plUnifiedTime *createTimeOut, plUnifiedTime *modifyTimeOut ) { struct stat fileInfo; diff --git a/Sources/Plasma/PubUtilLib/plFile/plFileUtils.h b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.h index e7806b62..29f6d13f 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plFileUtils.h +++ b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.h @@ -60,10 +60,10 @@ namespace plFileUtils static const wchar_t kWKeyFilename[] = L"encryption.key"; // Creates the directory specified. Returns false if unsuccessful or directory already exists - hsBool CreateDir( const char *path ); - hsBool CreateDir( const wchar_t *path ); - hsBool RemoveDir(const char* path); - hsBool RemoveDirTree(const char * path); + bool CreateDir( const char *path ); + bool CreateDir( const wchar_t *path ); + bool RemoveDir(const char* path); + bool RemoveDirTree(const char * path); // delete file from disk bool RemoveFile(const char* filename, bool delReadOnly=false); @@ -78,11 +78,11 @@ namespace plFileUtils bool FileExists(const wchar_t* file); // Given a filename with path, makes sure the file's path exists - hsBool EnsureFilePathExists( const char *filename ); - hsBool EnsureFilePathExists( const wchar_t *filename ); + bool EnsureFilePathExists( const char *filename ); + bool EnsureFilePathExists( const wchar_t *filename ); // Gets the creation and modification dates of the file specified. Returns false if unsuccessful - hsBool GetFileTimes( const char *path, plUnifiedTime *createTimeOut, plUnifiedTime *modifyTimeOut ); + bool GetFileTimes( const char *path, plUnifiedTime *createTimeOut, plUnifiedTime *modifyTimeOut ); // Compares file times, taking into account NTFS/FAT32 time issues enum Modify { kFileError, kFilesEqual, kFile1Newer, kFile2Newer }; Modify CompareModifyTimes(const char* file1, const char* file2); diff --git a/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.cpp b/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.cpp index 55fc6e1a..87d934a4 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.cpp @@ -60,7 +60,7 @@ plInitSectionTokenReader::plInitSectionTokenReader( const char *separators ) : f { } -hsBool plInitSectionTokenReader::ParseLine( const char *line, uint32_t userData ) +bool plInitSectionTokenReader::ParseLine( const char *line, uint32_t userData ) { hsStringTokenizer izer( line, fSeparators ); @@ -121,7 +121,7 @@ plInitFileReader::~plInitFileReader() delete [] fCurrLine; } -hsBool plInitFileReader::Open( const char *fileName ) +bool plInitFileReader::Open( const char *fileName ) { if( fStream != nil ) { @@ -139,7 +139,7 @@ hsBool plInitFileReader::Open( const char *fileName ) return true; } -hsBool plInitFileReader::Open( hsStream *stream ) +bool plInitFileReader::Open( hsStream *stream ) { if( fStream != nil ) { @@ -151,7 +151,7 @@ hsBool plInitFileReader::Open( hsStream *stream ) return true; } -hsBool plInitFileReader::Parse( uint32_t userData ) +bool plInitFileReader::Parse( uint32_t userData ) { hsAssert( fStream != nil, "Nil stream in initFileReader::Parse(); file not yet open?" ); diff --git a/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.h b/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.h index 1bd15492..f395b609 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.h +++ b/Sources/Plasma/PubUtilLib/plFile/plInitFileReader.h @@ -77,7 +77,7 @@ class plInitSectionReader virtual const char *GetSectionName( void ) const = 0; // Override this to parse each line in your section. Return false to abort parsing - virtual hsBool ParseLine( const char *line, uint32_t userData ) = 0; + virtual bool ParseLine( const char *line, uint32_t userData ) = 0; // Override this if you're defining an unhandled section reader virtual void SetSectionName(const char* section) {} @@ -96,14 +96,14 @@ class plInitSectionTokenReader : public plInitSectionReader const char *fSeparators; // Override this to parse each token in your section. Return false to abort parsing - virtual hsBool IParseToken( const char *token, hsStringTokenizer *tokenizer, uint32_t userData ) = 0; + virtual bool IParseToken( const char *token, hsStringTokenizer *tokenizer, uint32_t userData ) = 0; public: plInitSectionTokenReader( const char *separators = ",=\t" ); // Overridden for you. Override IParseToken() - virtual hsBool ParseLine( const char *line, uint32_t userData ); + virtual bool ParseLine( const char *line, uint32_t userData ); }; //// Main Reader Class /////////////////////////////////////////////////////// @@ -142,12 +142,12 @@ class plInitFileReader bool GetRequireEncrypted() const { return fRequireEncrypted; } void SetUnhandledSectionReader(plInitSectionReader* reader) { fUnhandledSection = reader; } - hsBool Open( const char *fileName ); - hsBool Open( hsStream *stream ); - hsBool Parse( uint32_t userData = 0 ); + bool Open( const char *fileName ); + bool Open( hsStream *stream ); + bool Parse( uint32_t userData = 0 ); void Close( void ); - hsBool IsOpen( void ) const { return fStream != nil; } + bool IsOpen( void ) const { return fStream != nil; } }; #endif //_plInitFileReader_h diff --git a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp index dabb390c..263bced5 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp @@ -62,7 +62,7 @@ static const int kFileStartOffset = kMagicStringLen + sizeof(uint32_t); static const int kMaxBufferedFileSize = 10*1024; -plSecureStream::plSecureStream(hsBool deleteOnExit, uint32_t* key) : +plSecureStream::plSecureStream(bool deleteOnExit, uint32_t* key) : fRef(INVALID_HANDLE_VALUE), fActualFileSize(0), fBufferedStream(false), @@ -149,17 +149,17 @@ void plSecureStream::IDecipher(uint32_t* const v, uint32_t n) } } -hsBool plSecureStream::Open(const char* name, const char* mode) +bool plSecureStream::Open(const char* name, const char* mode) { wchar_t* wName = hsStringToWString(name); wchar_t* wMode = hsStringToWString(mode); - hsBool ret = Open(wName, wMode); + bool ret = Open(wName, wMode); delete [] wName; delete [] wMode; return ret; } -hsBool plSecureStream::Open(const wchar_t* name, const wchar_t* mode) +bool plSecureStream::Open(const wchar_t* name, const wchar_t* mode) { if (wcscmp(mode, L"rb") == 0) { @@ -248,7 +248,7 @@ hsBool plSecureStream::Open(const wchar_t* name, const wchar_t* mode) } } -hsBool plSecureStream::Open(hsStream* stream) +bool plSecureStream::Open(hsStream* stream) { uint32_t pos = stream->GetPosition(); stream->Rewind(); @@ -281,7 +281,7 @@ hsBool plSecureStream::Open(hsStream* stream) return true; } -hsBool plSecureStream::Close() +bool plSecureStream::Close() { int rtn = false; @@ -370,7 +370,7 @@ void plSecureStream::IBufferFile() fPosition = 0; } -hsBool plSecureStream::AtEnd() +bool plSecureStream::AtEnd() { if (fBufferedStream) return fRAMStream->AtEnd(); @@ -652,7 +652,7 @@ bool plSecureStream::ICheckMagicString(hsStream* s) char magicString[kMagicStringLen+1]; s->Read(kMagicStringLen, &magicString); magicString[kMagicStringLen] = '\0'; - return (hsStrEQ(magicString, kMagicString) != 0); + return (strcmp(magicString, kMagicString) == 0); } bool plSecureStream::ICheckMagicString(hsFD fp) @@ -665,7 +665,7 @@ bool plSecureStream::ICheckMagicString(hsFD fp) fread(&magicString, kMagicStringLen, 1, fp); #endif magicString[kMagicStringLen] = '\0'; - return (hsStrEQ(magicString, kMagicString) != 0); + return (strcmp(magicString, kMagicString) == 0); } bool plSecureStream::IsSecureFile(const char* fileName) @@ -723,7 +723,7 @@ hsStream* plSecureStream::OpenSecureFile(const wchar_t* fileName, const uint32_t requireEncryption = false; #endif - hsBool deleteOnExit = flags & kDeleteOnExit; + bool deleteOnExit = flags & kDeleteOnExit; bool isEncrypted = IsSecureFile(fileName); hsStream* s = nil; diff --git a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.h b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.h index 26c414a1..a1981642 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.h +++ b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.h @@ -73,7 +73,7 @@ protected: enum OpenMode {kOpenRead, kOpenWrite, kOpenFail}; OpenMode fOpenMode; - hsBool fDeleteOnExit; + bool fDeleteOnExit; void IBufferFile(); @@ -88,18 +88,18 @@ protected: static bool ICheckMagicString(hsStream* s); public: - plSecureStream(hsBool deleteOnExit = false, uint32_t* key = nil); // uses default key if you don't pass one in + plSecureStream(bool deleteOnExit = false, uint32_t* key = nil); // uses default key if you don't pass one in plSecureStream(hsStream* base, uint32_t* key = nil); ~plSecureStream(); - virtual hsBool Open(const char* name, const char* mode = "rb"); - virtual hsBool Open(const wchar_t* name, const wchar_t* mode = L"rb"); - hsBool Open(hsStream* stream); - virtual hsBool Close(); + virtual bool Open(const char* name, const char* mode = "rb"); + virtual bool Open(const wchar_t* name, const wchar_t* mode = L"rb"); + bool Open(hsStream* stream); + virtual bool Close(); virtual uint32_t Read(uint32_t byteCount, void* buffer); virtual uint32_t Write(uint32_t byteCount, const void* buffer); - virtual hsBool AtEnd(); + virtual bool AtEnd(); virtual void Skip(uint32_t deltaByteCount); virtual void Rewind(); virtual void FastFwd(); diff --git a/Sources/Plasma/PubUtilLib/plGImage/hsCodec.h b/Sources/Plasma/PubUtilLib/plGImage/hsCodec.h index 5529dffa..ac5edd39 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/hsCodec.h +++ b/Sources/Plasma/PubUtilLib/plGImage/hsCodec.h @@ -49,7 +49,7 @@ class hsCodec public: virtual plMipmap *CreateCompressedMipmap( plMipmap *uncompressed ) = 0; virtual plMipmap *CreateUncompressedMipmap( plMipmap *compressed, uint8_t bitDepth = 0 ) = 0; - virtual hsBool ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ) = 0; + virtual bool ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ) = 0; }; #endif // hsCodec_inc diff --git a/Sources/Plasma/PubUtilLib/plGImage/hsCodecManager.cpp b/Sources/Plasma/PubUtilLib/plGImage/hsCodecManager.cpp index 31d7e1db..4f7bc569 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/hsCodecManager.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/hsCodecManager.cpp @@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com hsCodecManager& hsCodecManager::Instance() { static hsCodecManager the_instance; - static hsBool initialized = false; + static bool initialized = false; if (!initialized) { @@ -125,7 +125,7 @@ plMipmap *hsCodecManager::CreateUncompressedMipmap(plMipmap *compressed, uint8_t return nil; } -hsBool hsCodecManager::ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ) +bool hsCodecManager::ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ) { int32_t i, j; @@ -148,7 +148,7 @@ hsBool hsCodecManager::ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorM return false; } -hsBool hsCodecManager::Register(hsCodec *codec, uint32_t compressionFormat, float priority) +bool hsCodecManager::Register(hsCodec *codec, uint32_t compressionFormat, float priority) { int32_t i, j; for (i = 0; i < fCodecTable.Count(); i++) diff --git a/Sources/Plasma/PubUtilLib/plGImage/hsCodecManager.h b/Sources/Plasma/PubUtilLib/plGImage/hsCodecManager.h index fc762a77..26e5fc91 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/hsCodecManager.h +++ b/Sources/Plasma/PubUtilLib/plGImage/hsCodecManager.h @@ -69,9 +69,9 @@ public: plMipmap *CreateCompressedMipmap( uint32_t compressionFormat, plMipmap *uncompressed ); plMipmap *CreateUncompressedMipmap( plMipmap *compressed, uint8_t bitDepth = 0 ); - hsBool ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ); + bool ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ); - hsBool Register(hsCodec *codec, uint32_t compressionFormat, float priority); + bool Register(hsCodec *codec, uint32_t compressionFormat, float priority); /// Decompression flags enum { diff --git a/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.cpp b/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.cpp index 5f0afd1c..9933bdf9 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.cpp @@ -59,6 +59,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #endif #include "hsDXTDirectXCodec.h" +#include "hsColorRGBA.h" #include "plMipmap.h" #include "hsCodecManager.h" #include "plPipeline/hsGDDrawDllLoad.h" @@ -76,7 +77,7 @@ enum }; #endif -hsBool hsDXTDirectXCodec::fRegistered = false; +bool hsDXTDirectXCodec::fRegistered = false; //// Small Init Functions ///////////////////////////////////////////////////// @@ -112,7 +113,7 @@ hsDXTDirectXCodec::~hsDXTDirectXCodec() #endif } -hsBool hsDXTDirectXCodec::Register() +bool hsDXTDirectXCodec::Register() { return hsCodecManager::Instance().Register( &(Instance()), plMipmap::kDirectXCompression, 500 ); } @@ -139,7 +140,7 @@ void hsDXTDirectXCodec::Initialize( IDirect3DDevice8 *directDraw ) // Gotta initialize D3D ourself and create a device and everything. This is // a LOT messier than it was in DX7, since this time we got D3D to deal with -hsBool hsDXTDirectXCodec::IInitialize() +bool hsDXTDirectXCodec::IInitialize() { fFlags |= kInitialized; @@ -1247,7 +1248,7 @@ void hsDXTDirectXCodec::CheckErrorCode(HRESULT res) } #endif -hsBool hsDXTDirectXCodec::ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ) +bool hsDXTDirectXCodec::ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ) { return false; } \ No newline at end of file diff --git a/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.h b/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.h index ceb7682f..d614ac91 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.h +++ b/Sources/Plasma/PubUtilLib/plGImage/hsDXTDirectXCodec.h @@ -54,11 +54,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef hsDXTDirectXCodec_inc #define hsDXTDirectXCodec_inc - - #include "hsCodec.h" class plMipmap; +typedef struct hsColor32 hsRGBAColor32; #if HS_BUILD_FOR_WIN32 struct IDirect3DDevice8; struct IDirectDrawSurface7; @@ -79,12 +78,12 @@ public: plMipmap *CreateUncompressedMipmap(plMipmap *compressed, uint8_t bitDepth = 0); // Colorize a compressed mipmap - hsBool ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ); + bool ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ); #if HS_BUILD_FOR_WIN32 void Initialize( IDirect3DDevice8 *directDraw ); #endif - hsBool Initialized() { return (fFlags & kInitialized) != 0; } + bool Initialized() { return (fFlags & kInitialized) != 0; } #if HS_BUILD_FOR_WIN32 private: @@ -94,7 +93,7 @@ private: void IFillFromSurface( hsRGBAColor32* dest, uint32_t mmlvs, IDirectDrawSurface7 *pddsSrc ); void ICopySurface( IDirectDrawSurface7 *dest, IDirectDrawSurface7 *src, int32_t mipMapLevels ); void CheckErrorCode(HRESULT res); - hsBool IInitialize(); + bool IInitialize(); #endif #if HS_BUILD_FOR_WIN32 @@ -112,8 +111,8 @@ private: kExternalInit = 0x2 }; - static hsBool Register(); - static hsBool fRegistered; + static bool Register(); + static bool fRegistered; }; #endif // hsDXTDirectXCodec_inc diff --git a/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.cpp b/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.cpp index 07967fb1..4de8ea7f 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.cpp @@ -41,6 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include #include "HeadSpin.h" +#include "hsColorRGBA.h" #include "hsDXTSoftwareCodec.h" #include "plMipmap.h" #include "hsCodecManager.h" @@ -51,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define kDefaultDepth 32 -hsBool hsDXTSoftwareCodec::fRegistered = false; +bool hsDXTSoftwareCodec::fRegistered = false; hsDXTSoftwareCodec& hsDXTSoftwareCodec::Instance() { @@ -1942,7 +1943,7 @@ void hsDXTSoftwareCodec::CompressMipmapLevel( plMipmap *uncompressed, plMipmap * uint8_t alpha[8]; int32_t maxDistance = 0; hsRGBAColor32 color[4]; - hsBool hasTransparency = false; + bool hasTransparency = false; int32_t xx, yy; for (xx = 0; xx < 4; ++xx) @@ -2274,7 +2275,7 @@ uint16_t hsDXTSoftwareCodec::Color32To16(hsRGBAColor32 color) return (r << 8) | (g << 3) | (b >> 3); } -hsBool hsDXTSoftwareCodec::Register() +bool hsDXTSoftwareCodec::Register() { return hsCodecManager::Instance().Register(&(Instance()), plMipmap::kDirectXCompression, 100); } @@ -2294,7 +2295,7 @@ uint8_t hsDXTSoftwareCodec::ICalcCompressedFormat( plMipmap *bMap ) //// ColorizeCompBitmap /////////////////////////////////////////////////////// // Colorizes a compressed bitmap according to the color mask given. -hsBool hsDXTSoftwareCodec::ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ) +bool hsDXTSoftwareCodec::ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ) { uint32_t numBlocks, blockSize; uint16_t *srcData, color1, color2, gray, grayDiv2, i; diff --git a/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.h b/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.h index fc569935..23899b13 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.h +++ b/Sources/Plasma/PubUtilLib/plGImage/hsDXTSoftwareCodec.h @@ -46,6 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsCodec.h" class plMipmap; +typedef struct hsColor32 hsRGBAColor32; class hsDXTSoftwareCodec : public hsCodec { @@ -63,7 +64,7 @@ public: plMipmap *CreateUncompressedMipmap( plMipmap *compressed, uint8_t flags = 0 ); // Colorize a compressed mipmap - hsBool ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ); + bool ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ); private: enum { @@ -146,8 +147,8 @@ private: // Converts a color from RGB565 to RGB4444 reversed format, with alpha=0 uint16_t inline IRGB565To4444Rev( uint16_t color ); - static hsBool Register(); - static hsBool fRegistered; + static bool Register(); + static bool fRegistered; }; #endif // __HSDXTSOFTWARECODEC_H diff --git a/Sources/Plasma/PubUtilLib/plGImage/plAVIWriter.cpp b/Sources/Plasma/PubUtilLib/plGImage/plAVIWriter.cpp index 6675a88f..f416365e 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plAVIWriter.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plAVIWriter.cpp @@ -67,7 +67,7 @@ protected: PAVISTREAM fCompressedHandle; BITMAPINFOHEADER fBitmapInfo; - hsBool fOldRealTime; + bool fOldRealTime; float fOldFrameTimeInc; double fStartTime; @@ -81,7 +81,7 @@ public: plAVIWriterImp(); virtual ~plAVIWriterImp(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Shutdown(); @@ -95,7 +95,7 @@ public: plAVIWriterImp(); virtual ~plAVIWriterImp(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Shutdown(); @@ -153,7 +153,7 @@ void plAVIWriterImp::Shutdown() #include "plProfile.h" plProfile_CreateTimer("AviCapture", "RenderSetup", AviCapture); -hsBool plAVIWriterImp::MsgReceive(plMessage* msg) +bool plAVIWriterImp::MsgReceive(plMessage* msg) { #if HS_BUILD_FOR_WIN32 plRenderMsg* renderMsg = plRenderMsg::ConvertNoRef(msg); diff --git a/Sources/Plasma/PubUtilLib/plGImage/plBitmap.h b/Sources/Plasma/PubUtilLib/plGImage/plBitmap.h index 1715df00..d98c62d5 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plBitmap.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plBitmap.h @@ -167,7 +167,7 @@ class plBitmap : public hsKeyedObject uint8_t GetPixelSize( void ) const { return fPixelSize; } - hsBool IsCompressed( void ) const { return ( fCompressionType == kDirectXCompression ); } + bool IsCompressed( void ) const { return ( fCompressionType == kDirectXCompression ); } virtual void MakeDirty(); virtual hsGDeviceRef *GetDeviceRef( void ) const { return fDeviceRef; } diff --git a/Sources/Plasma/PubUtilLib/plGImage/plCubicEnvironmap.h b/Sources/Plasma/PubUtilLib/plGImage/plCubicEnvironmap.h index 6a557c7f..de495e9a 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plCubicEnvironmap.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plCubicEnvironmap.h @@ -103,7 +103,7 @@ class plCubicEnvironmap : public plBitmap //// Protected Members //// plMipmap *fFaces[ 6 ]; - hsBool fInitialized; + bool fInitialized; virtual uint32_t Read( hsStream *s ); virtual uint32_t Write( hsStream *s ); diff --git a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp index 95cf5311..37741dae 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.cpp @@ -215,7 +215,7 @@ void plDynSurfaceWriter::plWinSurface::Release( void ) fFontBlockedRGB = false; } -hsBool plDynSurfaceWriter::plWinSurface::WillFit( uint16_t w, uint16_t h ) +bool plDynSurfaceWriter::plWinSurface::WillFit( uint16_t w, uint16_t h ) { if( fWidth >= w && fHeight >= h ) return true; @@ -231,7 +231,7 @@ static int SafeStrCmp( const char *str1, const char *str2 ) return -1; } -hsBool plDynSurfaceWriter::plWinSurface::FontMatches( const char *face, uint16_t size, uint8_t flags, hsBool aaRGB ) +bool plDynSurfaceWriter::plWinSurface::FontMatches( const char *face, uint16_t size, uint8_t flags, bool aaRGB ) { if( SafeStrCmp( face, fFontFace ) == 0 && fFontSize == size && fFontFlags == flags && fFontAntiAliasRGB == aaRGB ) @@ -240,7 +240,7 @@ hsBool plDynSurfaceWriter::plWinSurface::FontMatches( const char *face, uint16_ return false; } -void plDynSurfaceWriter::plWinSurface::SetFont( const char *face, uint16_t size, uint8_t flags, hsBool aaRGB ) +void plDynSurfaceWriter::plWinSurface::SetFont( const char *face, uint16_t size, uint8_t flags, bool aaRGB ) { delete [] fFontFace; fFontFace = ( face != nil ) ? hsStrcpy( face ) : nil; @@ -308,11 +308,11 @@ void plDynSurfaceWriter::plWinSurface::SetFont( const char *face, uint16_t si //// StupidStatic ///////////////////////////////////////////////////////////// -hsBool plDynSurfaceWriter::fForceSharedSurfaces = false; -hsBool plDynSurfaceWriter::fOSDetected = false; -hsBool plDynSurfaceWriter::fOSCanShareSurfaces = false; +bool plDynSurfaceWriter::fForceSharedSurfaces = false; +bool plDynSurfaceWriter::fOSDetected = false; +bool plDynSurfaceWriter::fOSCanShareSurfaces = false; -hsBool plDynSurfaceWriter::CanHandleLotsOfThem( void ) +bool plDynSurfaceWriter::CanHandleLotsOfThem( void ) { if( fOSDetected ) return fOSCanShareSurfaces; @@ -586,7 +586,7 @@ void plDynSurfaceWriter::IEnsureSurfaceUpdated( void ) } } -hsBool plDynSurfaceWriter::IsValid( void ) const +bool plDynSurfaceWriter::IsValid( void ) const { if( fCurrTarget == nil ) return false; @@ -689,7 +689,7 @@ void plDynSurfaceWriter::ClearToColor( hsColorRGBA &color ) //// SetFont ////////////////////////////////////////////////////////////////// // OS-specific. Load the given font for drawing the text with. -void plDynSurfaceWriter::SetFont( const char *face, uint16_t size, uint8_t fontFlags, hsBool antiAliasRGB ) +void plDynSurfaceWriter::SetFont( const char *face, uint16_t size, uint8_t fontFlags, bool antiAliasRGB ) { if( !IsValid() ) return; @@ -701,7 +701,7 @@ void plDynSurfaceWriter::SetFont( const char *face, uint16_t size, uint8_t fo //// ISetFont ///////////////////////////////////////////////////////////////// -void plDynSurfaceWriter::ISetFont( const char *face, uint16_t size, uint8_t fontFlags, hsBool antiAliasRGB ) +void plDynSurfaceWriter::ISetFont( const char *face, uint16_t size, uint8_t fontFlags, bool antiAliasRGB ) { fFlags = ( fFlags & ~kFontShadowed ) | ( fontFlags & kFontShadowed ); @@ -724,7 +724,7 @@ void plDynSurfaceWriter::ISetFont( const char *face, uint16_t size, uint8_t f // case you want plenty of block color in your RGB channel because it'll get // alpha-ed out by the alpha channel. -void plDynSurfaceWriter::SetTextColor( hsColorRGBA &color, hsBool blockRGB ) +void plDynSurfaceWriter::SetTextColor( hsColorRGBA &color, bool blockRGB ) { if( !IsValid() ) return; @@ -735,7 +735,7 @@ void plDynSurfaceWriter::SetTextColor( hsColorRGBA &color, hsBool blockRGB ) //// IRefreshTextColor //////////////////////////////////////////////////////// -void plDynSurfaceWriter::ISetTextColor( hsColorRGBA &color, hsBool blockRGB ) +void plDynSurfaceWriter::ISetTextColor( hsColorRGBA &color, bool blockRGB ) { #if HS_BUILD_FOR_WIN32 @@ -1070,7 +1070,7 @@ void plDynSurfaceWriter::FrameRect( uint16_t x, uint16_t y, uint16_t width, u /* //// DrawImage //////////////////////////////////////////////////////////////// -void plDynSurfaceWriter::DrawImage( uint16_t x, uint16_t y, plMipmap *image, hsBool respectAlpha ) +void plDynSurfaceWriter::DrawImage( uint16_t x, uint16_t y, plMipmap *image, bool respectAlpha ) { if( !IsValid() ) return; @@ -1103,7 +1103,7 @@ void plDynSurfaceWriter::DrawImage( uint16_t x, uint16_t y, plMipmap *image, void plDynSurfaceWriter::DrawClippedImage( uint16_t x, uint16_t y, plMipmap *image, uint16_t srcClipX, uint16_t srcClipY, uint16_t srcClipWidth, uint16_t srcClipHeight, - hsBool respectAlpha ) + bool respectAlpha ) { if( !IsValid() ) return; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.h b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.h index 4fdb3617..06f9a8ea 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plDynSurfaceWriter.h @@ -104,8 +104,8 @@ class plDynSurfaceWriter /// Operations to perform on the text block void ClearToColor( hsColorRGBA &color ); - void SetFont( const char *face, uint16_t size, uint8_t fontFlags = 0, hsBool antiAliasRGB = true ); - void SetTextColor( hsColorRGBA &color, hsBool blockRGB = false ); + void SetFont( const char *face, uint16_t size, uint8_t fontFlags = 0, bool antiAliasRGB = true ); + void SetTextColor( hsColorRGBA &color, bool blockRGB = false ); void SetJustify( Justify j ); void DrawString( uint16_t x, uint16_t y, const char *text ); @@ -117,9 +117,9 @@ class plDynSurfaceWriter void FillRect( uint16_t x, uint16_t y, uint16_t width, uint16_t height, hsColorRGBA &color ); void FrameRect( uint16_t x, uint16_t y, uint16_t width, uint16_t height, hsColorRGBA &color ); -// void DrawImage( uint16_t x, uint16_t y, plMipmap *image, hsBool respectAlpha = false ); +// void DrawImage( uint16_t x, uint16_t y, plMipmap *image, bool respectAlpha = false ); // void DrawClippedImage( uint16_t x, uint16_t y, plMipmap *image, uint16_t srcClipX, uint16_t srcClipY, -// uint16_t srcClipWidth, uint16_t srcClipHeight, hsBool respectAlpha = false ); +// uint16_t srcClipWidth, uint16_t srcClipHeight, bool respectAlpha = false ); // Copy the raw data from the given buffer. // void SetBitsFromBuffer( uint32_t *clearBuffer, uint16_t width, uint16_t height ) @@ -135,9 +135,9 @@ class plDynSurfaceWriter // Clears and resets everything. Does NOT flush. void Reset( void ); - hsBool IsValid( void ) const; + bool IsValid( void ) const; - static hsBool CanHandleLotsOfThem( void ); + static bool CanHandleLotsOfThem( void ); protected: @@ -146,24 +146,24 @@ class plDynSurfaceWriter void IInit( void ); void IEnsureSurfaceUpdated( void ); void IRefreshOSJustify( void ); - void ISetTextColor( hsColorRGBA &color, hsBool blockRGB ); + void ISetTextColor( hsColorRGBA &color, bool blockRGB ); - void ISetFont( const char *face, uint16_t size, uint8_t fontFlags = 0, hsBool antiAliasRGB = true ); + void ISetFont( const char *face, uint16_t size, uint8_t fontFlags = 0, bool antiAliasRGB = true ); plDynamicTextMap *fCurrTarget; uint32_t fFlags; Justify fJustify; - hsBool fFlushed; + bool fFlushed; char *fFontFace; uint16_t fFontSize; uint8_t fFontFlags; - hsBool fFontAntiAliasRGB; - hsBool fFontBlockedRGB; + bool fFontAntiAliasRGB; + bool fFontBlockedRGB; - static hsBool fForceSharedSurfaces; - static hsBool fOSDetected; - static hsBool fOSCanShareSurfaces; + static bool fForceSharedSurfaces; + static bool fOSDetected; + static bool fOSCanShareSurfaces; #if HS_BUILD_FOR_WIN32 class plWinSurface @@ -185,7 +185,7 @@ class plDynSurfaceWriter char *fFontFace; uint16_t fFontSize; uint8_t fFontFlags; - hsBool fFontAntiAliasRGB, fFontBlockedRGB; + bool fFontAntiAliasRGB, fFontBlockedRGB; plWinSurface(); ~plWinSurface(); @@ -193,9 +193,9 @@ class plDynSurfaceWriter void Allocate( uint16_t w, uint16_t h ); void Release( void ); - hsBool WillFit( uint16_t w, uint16_t h ); - hsBool FontMatches( const char *face, uint16_t size, uint8_t flags, hsBool aaRGB ); - void SetFont( const char *face, uint16_t size, uint8_t flags, hsBool aaRGB ); + bool WillFit( uint16_t w, uint16_t h ); + bool FontMatches( const char *face, uint16_t size, uint8_t flags, bool aaRGB ); + void SetFont( const char *face, uint16_t size, uint8_t flags, bool aaRGB ); }; class plWinRGBSurface : public plWinSurface diff --git a/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.cpp b/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.cpp index 9d2010bd..e9753616 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.cpp @@ -96,7 +96,7 @@ plDynamicTextMap::~plDynamicTextMap() Reset(); } -plDynamicTextMap::plDynamicTextMap( uint32_t width, uint32_t height, hsBool hasAlpha, uint32_t extraWidth, uint32_t extraHeight ) : plMipmap() +plDynamicTextMap::plDynamicTextMap( uint32_t width, uint32_t height, bool hasAlpha, uint32_t extraWidth, uint32_t extraHeight ) : plMipmap() { fInitBuffer = nil; fFontFace = nil; @@ -109,7 +109,7 @@ plDynamicTextMap::plDynamicTextMap( uint32_t width, uint32_t height, hsBool hasA // instead, which does just that. It basically does all the setup work that // Create() does, or enough for us to write out later. -void plDynamicTextMap::SetNoCreate( uint32_t width, uint32_t height, hsBool hasAlpha ) +void plDynamicTextMap::SetNoCreate( uint32_t width, uint32_t height, bool hasAlpha ) { // OK, so it really isn't that much work... fVisWidth = (uint16_t)width; @@ -122,7 +122,7 @@ void plDynamicTextMap::SetNoCreate( uint32_t width, uint32_t height, hsBool h //// Create /////////////////////////////////////////////////////////////////// -void plDynamicTextMap::Create( uint32_t width, uint32_t height, hsBool hasAlpha, uint32_t extraWidth, uint32_t extraHeight ) +void plDynamicTextMap::Create( uint32_t width, uint32_t height, bool hasAlpha, uint32_t extraWidth, uint32_t extraHeight ) { SetConfig( hasAlpha ? kARGB32Config : kRGB32Config ); @@ -183,7 +183,7 @@ void plDynamicTextMap::Reset( void ) //// OS-Specific Functions //////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -hsBool plDynamicTextMap::IIsValid( void ) +bool plDynamicTextMap::IIsValid( void ) { if( GetImage() == nil && fHasCreateBeenCalled ) { @@ -422,7 +422,7 @@ void plDynamicTextMap::SetJustify( Justify j ) //// SetFont ////////////////////////////////////////////////////////////////// -void plDynamicTextMap::SetFont( const char *face, uint16_t size, uint8_t fontFlags, hsBool antiAliasRGB ) +void plDynamicTextMap::SetFont( const char *face, uint16_t size, uint8_t fontFlags, bool antiAliasRGB ) { // ===> Don't need to validate creation // if( !IIsValid() ) @@ -467,7 +467,7 @@ void plDynamicTextMap::SetFont( const char *face, uint16_t size, uint8_t font } } -void plDynamicTextMap::SetFont( const wchar_t *face, uint16_t size, uint8_t fontFlags , hsBool antiAliasRGB ) +void plDynamicTextMap::SetFont( const wchar_t *face, uint16_t size, uint8_t fontFlags , bool antiAliasRGB ) { char *sFace = hsWStringToString(face); SetFont(sFace,size,fontFlags,antiAliasRGB); @@ -488,7 +488,7 @@ void plDynamicTextMap::SetLineSpacing( int16_t spacing ) //// SetTextColor ///////////////////////////////////////////////////////////// -void plDynamicTextMap::SetTextColor( hsColorRGBA &color, hsBool blockRGB ) +void plDynamicTextMap::SetTextColor( hsColorRGBA &color, bool blockRGB ) { // ===> Don't need to validate creation // if( !IIsValid() ) @@ -813,7 +813,7 @@ hsMatrix44 plDynamicTextMap::GetLayerTransform( void ) //// MsgReceive /////////////////////////////////////////////////////////////// -hsBool plDynamicTextMap::MsgReceive( plMessage *msg ) +bool plDynamicTextMap::MsgReceive( plMessage *msg ) { plDynamicTextMsg *textMsg = plDynamicTextMsg::ConvertNoRef( msg ); if( textMsg != nil ) @@ -907,20 +907,20 @@ void plDynamicTextMap::Swap( plDynamicTextMap *other ) other->GetDeviceRef()->SetDirty( true ); // Swap DTMap info - SWAP_ME( hsBool, fHasAlpha, other->fHasAlpha ); - SWAP_ME( hsBool, fShadowed, other->fShadowed ); + SWAP_ME( bool, fHasAlpha, other->fHasAlpha ); + SWAP_ME( bool, fShadowed, other->fShadowed ); SWAP_ME( Justify, fJustify, other->fJustify ); SWAP_ME( char *, fFontFace, other->fFontFace ); SWAP_ME( uint16_t, fFontSize, other->fFontSize ); SWAP_ME( uint8_t, fFontFlags, other->fFontFlags ); - SWAP_ME( hsBool, fFontAntiAliasRGB, other->fFontAntiAliasRGB ); + SWAP_ME( bool, fFontAntiAliasRGB, other->fFontAntiAliasRGB ); SWAP_ME( hsColorRGBA, fFontColor, other->fFontColor ); - SWAP_ME( hsBool, fFontBlockRGB, other->fFontBlockRGB ); + SWAP_ME( bool, fFontBlockRGB, other->fFontBlockRGB ); - SWAP_ME( hsBool, fFontBlockRGB, other->fFontBlockRGB ); - SWAP_ME( hsBool, fFontBlockRGB, other->fFontBlockRGB ); - SWAP_ME( hsBool, fFontBlockRGB, other->fFontBlockRGB ); + SWAP_ME( bool, fFontBlockRGB, other->fFontBlockRGB ); + SWAP_ME( bool, fFontBlockRGB, other->fFontBlockRGB ); + SWAP_ME( bool, fFontBlockRGB, other->fFontBlockRGB ); SWAP_ME( plFont *, fCurrFont, other->fCurrFont ); SWAP_ME( uint32_t *, fInitBuffer, other->fInitBuffer ); diff --git a/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.h b/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.h index 964a255f..3083aae1 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plDynamicTextMap.h @@ -113,15 +113,15 @@ class plDynamicTextMap : public plMipmap plDynamicTextMap(); - plDynamicTextMap( uint32_t width, uint32_t height, hsBool hasAlpha = false, uint32_t extraWidth = 0, uint32_t extraHeight = 0 ); + plDynamicTextMap( uint32_t width, uint32_t height, bool hasAlpha = false, uint32_t extraWidth = 0, uint32_t extraHeight = 0 ); virtual ~plDynamicTextMap(); CLASSNAME_REGISTER( plDynamicTextMap ); GETINTERFACE_ANY( plDynamicTextMap, plMipmap ); - void Create( uint32_t width, uint32_t height, hsBool hasAlpha, uint32_t extraWidth = 0, uint32_t extraHeight = 0 ); - void SetNoCreate( uint32_t width, uint32_t height, hsBool hasAlpha ); + void Create( uint32_t width, uint32_t height, bool hasAlpha, uint32_t extraWidth = 0, uint32_t extraHeight = 0 ); + void SetNoCreate( uint32_t width, uint32_t height, bool hasAlpha ); virtual void Reset( void ); @@ -137,7 +137,7 @@ class plDynamicTextMap : public plMipmap /// Operations to perform on the text block - hsBool IsValid() { return IIsValid(); } + bool IsValid() { return IIsValid(); } // allow the user of the DynaTextMap that they are done with the image... for now // ... the fImage will be re-created on the next operation that requires the image @@ -152,10 +152,10 @@ class plDynamicTextMap : public plMipmap kFontShadowed = 0x04 }; - void SetFont( const char *face, uint16_t size, uint8_t fontFlags = 0, hsBool antiAliasRGB = true ); - void SetFont( const wchar_t *face, uint16_t size, uint8_t fontFlags = 0, hsBool antiAliasRGB = true ); + void SetFont( const char *face, uint16_t size, uint8_t fontFlags = 0, bool antiAliasRGB = true ); + void SetFont( const wchar_t *face, uint16_t size, uint8_t fontFlags = 0, bool antiAliasRGB = true ); void SetLineSpacing( int16_t spacing ); - void SetTextColor( hsColorRGBA &color, hsBool blockRGB = false ); + void SetTextColor( hsColorRGBA &color, bool blockRGB = false ); void SetJustify( Justify j ); void DrawString( uint16_t x, uint16_t y, const char *text ); @@ -186,7 +186,7 @@ class plDynamicTextMap : public plMipmap void FlushToHost( void ); - hsBool MsgReceive( plMessage *msg ); + bool MsgReceive( plMessage *msg ); uint16_t GetVisibleWidth( void ) { return fVisWidth; } uint16_t GetVisibleHeight( void ) { return fVisHeight; } @@ -203,9 +203,9 @@ class plDynamicTextMap : public plMipmap Justify GetFontJustify( void ) const { return fJustify; } const char *GetFontFace( void ) const { return fFontFace; } uint16_t GetFontSize( void ) const { return fFontSize; } - hsBool GetFontAARGB( void ) const { return fFontAntiAliasRGB; } + bool GetFontAARGB( void ) const { return fFontAntiAliasRGB; } hsColorRGBA GetFontColor( void ) const { return fFontColor; } - hsBool GetFontBlockRGB( void ) const { return fFontBlockRGB; } + bool GetFontBlockRGB( void ) const { return fFontBlockRGB; } int16_t GetLineSpacing( void ) const { return fLineSpacing; } plFont *GetCurrFont( void ) const { return fCurrFont; } @@ -216,28 +216,28 @@ class plDynamicTextMap : public plMipmap //// Protected Members //// - hsBool IIsValid( void ); + bool IIsValid( void ); void IClearFromBuffer( uint32_t *clearBuffer ); uint32_t *IAllocateOSSurface( uint16_t width, uint16_t height ); void IDestroyOSSurface( void ); - hsBool fHasAlpha, fShadowed; + bool fHasAlpha, fShadowed; Justify fJustify; char *fFontFace; uint16_t fFontSize; uint8_t fFontFlags; - hsBool fFontAntiAliasRGB; + bool fFontAntiAliasRGB; hsColorRGBA fFontColor; - hsBool fFontBlockRGB; + bool fFontBlockRGB; int16_t fLineSpacing; plFont *fCurrFont; uint32_t *fInitBuffer; - hsBool fHasCreateBeenCalled; + bool fHasCreateBeenCalled; }; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp b/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp index eba35e2c..be1e74ba 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plFont.cpp @@ -255,7 +255,7 @@ void plFont::RenderString( plMipmap *mip, uint16_t x, uint16_t y, const wchar *lastY = fRenderInfo.fLastY; } -void plFont::IRenderString( plMipmap *mip, uint16_t x, uint16_t y, const wchar_t *string, hsBool justCalc ) +void plFont::IRenderString( plMipmap *mip, uint16_t x, uint16_t y, const wchar_t *string, bool justCalc ) { fRenderInfo.fMipmap = mip; fRenderInfo.fX = x; @@ -1062,7 +1062,7 @@ uint8_t *plFont::IGetFreeCharData( uint32_t &newOffset ) //// LoadFromP2FFile ////////////////////////////////////////////////////////// // Handy quick wrapper -hsBool plFont::LoadFromP2FFile( const char *path ) +bool plFont::LoadFromP2FFile( const char *path ) { hsUNIXStream stream; if( stream.Open( path, "rb" ) ) @@ -1077,7 +1077,7 @@ hsBool plFont::LoadFromP2FFile( const char *path ) // Load this font from the data found in the given Windows FNT file, // using the format specified in the Windows 3 Developers Notes. -hsBool plFont::LoadFromFNT( const char *path ) +bool plFont::LoadFromFNT( const char *path ) { hsUNIXStream stream; // Ahh, irony if( !stream.Open( path, "rb" ) ) @@ -1086,7 +1086,7 @@ hsBool plFont::LoadFromFNT( const char *path ) return LoadFromFNTStream( &stream ); } -hsBool plFont::LoadFromFNTStream( hsStream *stream ) +bool plFont::LoadFromFNTStream( hsStream *stream ) { IClear(); @@ -1306,7 +1306,7 @@ hsBool plFont::LoadFromFNTStream( hsStream *stream ) // using the format specified in the Glyph Bitmap Distribution Format (BDF) // Specification Version 2.2 from Adobe Systems. -/*hsBool plFont::LoadFromBDF( const char *path, plBDFConvertCallback *callback ) +/*bool plFont::LoadFromBDF( const char *path, plBDFConvertCallback *callback ) { hsUNIXStream stream; // Ahh, irony if( !stream.Open( path, "rb" ) ) @@ -1485,7 +1485,7 @@ class plBDFCharsParser : public plBDFSectParser uint16_t fWhichChar, fRowsLeft; plFont::plCharacter *fCharacter; uint8_t *fBitmap; - hsBool fDoingData; + bool fDoingData; uint32_t fBytesWide, fBMapStride; inline void IReset( void ) @@ -1787,7 +1787,7 @@ class plBDFHeaderParser : public plBDFSectParser class plBDFCheckDimsParser : public plBDFSectParser { - hsBool fSkipNext; + bool fSkipNext; public: @@ -1841,12 +1841,12 @@ class plBDFCheckDimsParser : public plBDFSectParser } }; -hsBool plFont::LoadFromBDFStream( hsStream *stream, plBDFConvertCallback *callback ) +bool plFont::LoadFromBDFStream( hsStream *stream, plBDFConvertCallback *callback ) { return false; } -hsBool plFont::LoadFromBDF( const char *path, plBDFConvertCallback *callback ) +bool plFont::LoadFromBDF( const char *path, plBDFConvertCallback *callback ) { FILE *fp = fopen( path, "rt" ); if( fp == nil ) @@ -1923,7 +1923,7 @@ hsBool plFont::LoadFromBDF( const char *path, plBDFConvertCallback *callback ) return true; } -hsBool plFont::ReadRaw( hsStream *s ) +bool plFont::ReadRaw( hsStream *s ) { s->Read( sizeof( fFace ), fFace ); fSize = s->ReadByte(); @@ -1956,7 +1956,7 @@ hsBool plFont::ReadRaw( hsStream *s ) return true; } -hsBool plFont::WriteRaw( hsStream *s ) +bool plFont::WriteRaw( hsStream *s ) { s->Write( sizeof( fFace ), fFace ); s->WriteByte( fSize ); diff --git a/Sources/Plasma/PubUtilLib/plGImage/plFont.h b/Sources/Plasma/PubUtilLib/plGImage/plFont.h index 8a8d511c..43212f5a 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plFont.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plFont.h @@ -223,7 +223,7 @@ class plFont : public hsKeyedObject uint8_t *IGetFreeCharData( uint32_t &newOffset ); void IRenderLoop( const wchar_t *string, int32_t maxCount ); - void IRenderString( plMipmap *mip, uint16_t x, uint16_t y, const wchar_t *string, hsBool justCalc ); + void IRenderString( plMipmap *mip, uint16_t x, uint16_t y, const wchar_t *string, bool justCalc ); // Various render functions void IRenderChar1To32( const plCharacter &c ); @@ -259,12 +259,12 @@ class plFont : public hsKeyedObject void SetFace( const char *face ); void SetSize( uint8_t size ); void SetFlags( uint32_t flags ) { fFlags = flags; } - void SetFlag( uint32_t flag, hsBool on ) { if( on ) fFlags |= flag; else fFlags &= ~flag; } - hsBool IsFlagSet( uint32_t flag ) { if( fFlags & flag ) return true; return false; } + void SetFlag( uint32_t flag, bool on ) { if( on ) fFlags |= flag; else fFlags &= ~flag; } + bool IsFlagSet( uint32_t flag ) { if( fFlags & flag ) return true; return false; } void SetRenderColor( uint32_t color ); - void SetRenderFlag( uint32_t flag, hsBool on ) { if( on ) fRenderInfo.fFlags |= flag; else fRenderInfo.fFlags &= ~flag; } - hsBool IsRenderFlagSet( uint32_t flag ) { return ( fRenderInfo.fFlags & flag ) ? true : false; } + void SetRenderFlag( uint32_t flag, bool on ) { if( on ) fRenderInfo.fFlags |= flag; else fRenderInfo.fFlags &= ~flag; } + bool IsRenderFlagSet( uint32_t flag ) { return ( fRenderInfo.fFlags & flag ) ? true : false; } void SetRenderClipRect( int16_t x, int16_t y, int16_t width, int16_t height ); void SetRenderXJustify( uint32_t j ) { fRenderInfo.fFlags &= ~kRenderJustXMask; fRenderInfo.fFlags |= j; } void SetRenderYJustify( uint32_t j ) { fRenderInfo.fFlags &= ~kRenderJustYMask; fRenderInfo.fFlags |= j; } @@ -283,16 +283,16 @@ class plFont : public hsKeyedObject void CalcStringExtents( const char *string, uint16_t &width, uint16_t &height, uint16_t &ascent, uint32_t &firstClippedChar, uint16_t &lastX, uint16_t &lastY ); void CalcStringExtents( const wchar_t *string, uint16_t &width, uint16_t &height, uint16_t &ascent, uint32_t &firstClippedChar, uint16_t &lastX, uint16_t &lastY ); - hsBool LoadFromFNT( const char *path ); - hsBool LoadFromFNTStream( hsStream *stream ); + bool LoadFromFNT( const char *path ); + bool LoadFromFNTStream( hsStream *stream ); - hsBool LoadFromBDF( const char *path, plBDFConvertCallback *callback ); - hsBool LoadFromBDFStream( hsStream *stream, plBDFConvertCallback *callback ); + bool LoadFromBDF( const char *path, plBDFConvertCallback *callback ); + bool LoadFromBDFStream( hsStream *stream, plBDFConvertCallback *callback ); - hsBool LoadFromP2FFile( const char *path ); + bool LoadFromP2FFile( const char *path ); - hsBool ReadRaw( hsStream *stream ); - hsBool WriteRaw( hsStream *stream ); + bool ReadRaw( hsStream *stream ); + bool WriteRaw( hsStream *stream ); }; #endif // _plFont_h diff --git a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp index 8f6b9a98..069ba79c 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp @@ -196,7 +196,7 @@ void plFontCache::ILoadCustomFonts( void ) } } -hsBool plFontCache::MsgReceive( plMessage* pMsg ) +bool plFontCache::MsgReceive( plMessage* pMsg ) { plGenRefMsg *ref = plGenRefMsg::ConvertNoRef( pMsg ); if( ref != nil ) diff --git a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.h b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.h index 14ba7940..65b6b839 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.h @@ -86,13 +86,13 @@ class plFontCache : public hsKeyedObject virtual void Read( hsStream *s, hsResMgr *mgr ) {} virtual void Write( hsStream *s, hsResMgr *mgr ) {} - virtual hsBool MsgReceive( plMessage* pMsg ); + virtual bool MsgReceive( plMessage* pMsg ); static plFontCache &GetInstance( void ); plFont *GetFont( const char *face, uint8_t size, uint32_t fontFlags ); -// HFONT GetMeAFont( const char *face, int height, int weight, hsBool italic, uint32_t quality ); +// HFONT GetMeAFont( const char *face, int height, int weight, bool italic, uint32_t quality ); // void FreeFont( HFONT font ); void Clear( void ); diff --git a/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.cpp b/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.cpp index 7c7809ac..c593fe01 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.cpp @@ -246,9 +246,9 @@ void plLODMipmap::ScaleNicely(uint32_t *destPtr, uint16_t destWidth, uint16_t de fBase->ScaleNicely(destPtr, destWidth, destHeight, destStride, filter); } -hsBool plLODMipmap::ResizeNicely(uint16_t newWidth, uint16_t newHeight, plMipmap::ScaleFilter filter) +bool plLODMipmap::ResizeNicely(uint16_t newWidth, uint16_t newHeight, plMipmap::ScaleFilter filter) { - hsBool retVal = fBase->ResizeNicely(newWidth, newHeight, filter); + bool retVal = fBase->ResizeNicely(newWidth, newHeight, filter); ISetup(); return retVal; } @@ -265,7 +265,7 @@ void plLODMipmap::Composite(plMipmap *source, uint16_t x, uint16_t y, CompositeO IMarkDirty(); } -hsBool plLODMipmap::MsgReceive(plMessage *msg) +bool plLODMipmap::MsgReceive(plMessage *msg) { plGenRefMsg* ref = plGenRefMsg::ConvertNoRef(msg); if( ref ) diff --git a/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.h b/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.h index a8bf1622..df199737 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plLODMipmap.h @@ -77,7 +77,7 @@ public: CLASSNAME_REGISTER( plLODMipmap ); GETINTERFACE_ANY( plLODMipmap, plMipmap ); - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); void SetLOD(int lod); int GetLOD() const { return fLOD; } @@ -98,7 +98,7 @@ public: virtual void ScaleNicely(uint32_t *destPtr, uint16_t destWidth, uint16_t destHeight, uint16_t destStride, plMipmap::ScaleFilter filter) const; - virtual hsBool ResizeNicely(uint16_t newWidth, uint16_t newHeight, plMipmap::ScaleFilter filter); + virtual bool ResizeNicely(uint16_t newWidth, uint16_t newHeight, plMipmap::ScaleFilter filter); virtual void SetCurrLevel(uint8_t level); diff --git a/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp b/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp index 9da2f81b..3f17f5ee 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp @@ -1304,7 +1304,7 @@ void plMipmap::IBlendLevelDetailMult( uint8_t iDst, const plFilterMask& mask, // of filtering. (This is us guessing that that border was apparently what // was intented, thus removing ugly stretching problems on clamped textures). -void plMipmap::EnsureKonstantBorder( hsBool clampU, hsBool clampV ) +void plMipmap::EnsureKonstantBorder( bool clampU, bool clampV ) { if( fPixelSize != 32 ) { @@ -1343,7 +1343,7 @@ void plMipmap::EnsureKonstantBorder( hsBool clampU, hsBool clampV ) // Grabs the top level's border color, or returns false if not all pixels // on the border are the same color/alpha. -hsBool plMipmap::IGrabBorderColor( hsBool grabVNotU, uint32_t *color ) +bool plMipmap::IGrabBorderColor( bool grabVNotU, uint32_t *color ) { int i; uint32_t *src1 = (uint32_t *)fImage, *src2, testColor; @@ -2087,7 +2087,7 @@ void plMipmap::ScaleNicely( uint32_t *destPtr, uint16_t destWidth, uint16_t d // Resizes us using the ScaleNicely function. Only works for 1-level, 32bpp // uncompressed mipmaps. -hsBool plMipmap::ResizeNicely( uint16_t newWidth, uint16_t newHeight, plMipmap::ScaleFilter filter ) +bool plMipmap::ResizeNicely( uint16_t newWidth, uint16_t newHeight, plMipmap::ScaleFilter filter ) { // Make a temp buffer uint32_t *newData = new uint32_t[ newWidth * newHeight ]; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plMipmap.h b/Sources/Plasma/PubUtilLib/plGImage/plMipmap.h index b2e5fab1..ebda5902 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plMipmap.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plMipmap.h @@ -230,7 +230,7 @@ class plMipmap : public plBitmap void ClipToMaxSize( uint32_t maxDimension ); void RemoveMipping(); - void EnsureKonstantBorder( hsBool clampU, hsBool clampV ); + void EnsureKonstantBorder( bool clampU, bool clampV ); enum CompositeFlags { @@ -285,7 +285,7 @@ class plMipmap : public plBitmap virtual void ScaleNicely( uint32_t *destPtr, uint16_t destWidth, uint16_t destHeight, uint16_t destStride, plMipmap::ScaleFilter filter ) const; - virtual hsBool ResizeNicely( uint16_t newWidth, uint16_t newHeight, plMipmap::ScaleFilter filter ); + virtual bool ResizeNicely( uint16_t newWidth, uint16_t newHeight, plMipmap::ScaleFilter filter ); protected: @@ -317,7 +317,7 @@ class plMipmap : public plBitmap void ICarryZeroAlpha(uint8_t iDst); void ICarryColor(uint8_t iDst, uint32_t col); - hsBool IGrabBorderColor( hsBool grabVNotU, uint32_t *color ); + bool IGrabBorderColor( bool grabVNotU, uint32_t *color ); void ISetCurrLevelUBorder( uint32_t color ); void ISetCurrLevelVBorder( uint32_t color ); diff --git a/Sources/Plasma/PubUtilLib/plGImage/plPNG.cpp b/Sources/Plasma/PubUtilLib/plGImage/plPNG.cpp index d0746ecb..68edd122 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plPNG.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plPNG.cpp @@ -199,9 +199,9 @@ plMipmap* plPNG::ReadFromFile(const wchar_t* fileName) return ret; } -hsBool plPNG::IWrite(plMipmap* source, hsStream* outStream) +bool plPNG::IWrite(plMipmap* source, hsStream* outStream) { - hsBool result = true; + bool result = true; try { // Allocate required structs @@ -248,15 +248,15 @@ hsBool plPNG::IWrite(plMipmap* source, hsStream* outStream) return result; } -hsBool plPNG::WriteToFile(const char* fileName, plMipmap* sourceData) +bool plPNG::WriteToFile(const char* fileName, plMipmap* sourceData) { wchar_t* wFilename = hsStringToWString(fileName); - hsBool retVal = WriteToFile(wFilename, sourceData); + bool retVal = WriteToFile(wFilename, sourceData); delete [] wFilename; return retVal; } -hsBool plPNG::WriteToFile(const wchar_t* fileName, plMipmap* sourceData) +bool plPNG::WriteToFile(const wchar_t* fileName, plMipmap* sourceData) { hsUNIXStream out; @@ -264,7 +264,7 @@ hsBool plPNG::WriteToFile(const wchar_t* fileName, plMipmap* sourceData) return false; } - hsBool ret = IWrite(sourceData, &out); + bool ret = IWrite(sourceData, &out); out.Close(); return ret; } diff --git a/Sources/Plasma/PubUtilLib/plGImage/plPNG.h b/Sources/Plasma/PubUtilLib/plGImage/plPNG.h index b7c6da09..96ced26b 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plPNG.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plPNG.h @@ -53,7 +53,7 @@ class plPNG { protected: plMipmap* IRead(hsStream* inStream); - hsBool IWrite(plMipmap* source, hsStream* outStream); + bool IWrite(plMipmap* source, hsStream* outStream); public: @@ -61,9 +61,9 @@ public: plMipmap* ReadFromFile(const char* fileName); plMipmap* ReadFromFile(const wchar_t* fileName); - hsBool WriteToStream(hsStream* outStream, plMipmap* sourceData) { return IWrite(sourceData, outStream); } - hsBool WriteToFile(const char* fileName, plMipmap* sourceData); - hsBool WriteToFile(const wchar_t* fileName, plMipmap* sourceData); + bool WriteToStream(hsStream* outStream, plMipmap* sourceData) { return IWrite(sourceData, outStream); } + bool WriteToFile(const char* fileName, plMipmap* sourceData); + bool WriteToFile(const wchar_t* fileName, plMipmap* sourceData); static plPNG& Instance(void); }; diff --git a/Sources/Plasma/PubUtilLib/plGImage/plTGAWriter.cpp b/Sources/Plasma/PubUtilLib/plGImage/plTGAWriter.cpp index becc96f5..d7cb8172 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plTGAWriter.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plTGAWriter.cpp @@ -53,6 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "plTGAWriter.h" +#include "hsColorRGBA.h" #include "plMipmap.h" #include "hsStream.h" diff --git a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp index f64acfc7..3376bae0 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp @@ -93,7 +93,7 @@ plWinFontCache &plWinFontCache::GetInstance( void ) return cache; } -HFONT plWinFontCache::IFindFont( const char *face, int height, int weight, hsBool italic, uint32_t quality ) +HFONT plWinFontCache::IFindFont( const char *face, int height, int weight, bool italic, uint32_t quality ) { int i; @@ -114,7 +114,7 @@ HFONT plWinFontCache::IFindFont( const char *face, int height, int weight, hsB return nil; } -HFONT plWinFontCache::IMakeFont( const char *face, int height, int weight, hsBool italic, uint32_t quality ) +HFONT plWinFontCache::IMakeFont( const char *face, int height, int weight, bool italic, uint32_t quality ) { plFontRecord myRec; int i; @@ -206,7 +206,7 @@ HFONT plWinFontCache::IMakeFont( const char *face, int height, int weight, hsB return myRec.fFont; } -HFONT plWinFontCache::GetMeAFont( const char *face, int height, int weight, hsBool italic, uint32_t quality ) +HFONT plWinFontCache::GetMeAFont( const char *face, int height, int weight, bool italic, uint32_t quality ) { HFONT font = IFindFont( face, height, weight, italic, quality ); if( font == nil ) diff --git a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h index 0ca1830f..98f447f1 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h +++ b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.h @@ -83,7 +83,7 @@ class plWinFontCache char *fFace; // Pointer is owned by fFontNameCache int fHeight; int fWeight; - hsBool fItalic; + bool fItalic; uint32_t fQuality; }; @@ -96,7 +96,7 @@ class plWinFontCache ~plCustFont() { delete [] fFilename; } }; - hsBool fInShutdown; + bool fInShutdown; hsTArray fFontCache; hsTArray fFontNameCache; @@ -106,8 +106,8 @@ class plWinFontCache plWinFontCache(); - HFONT IFindFont( const char *face, int height, int weight, hsBool italic, uint32_t quality ); - HFONT IMakeFont( const char *face, int height, int weight, hsBool italic, uint32_t quality ); + HFONT IFindFont( const char *face, int height, int weight, bool italic, uint32_t quality ); + HFONT IMakeFont( const char *face, int height, int weight, bool italic, uint32_t quality ); void ILoadCustomFonts( void ); @@ -116,7 +116,7 @@ class plWinFontCache virtual ~plWinFontCache(); static plWinFontCache &GetInstance( void ); - HFONT GetMeAFont( const char *face, int height, int weight, hsBool italic, uint32_t quality ); + HFONT GetMeAFont( const char *face, int height, int weight, bool italic, uint32_t quality ); void FreeFont( HFONT font ); void Clear( void ); diff --git a/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.cpp b/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.cpp index 9b86ac3f..a284092c 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.cpp @@ -181,7 +181,7 @@ void plLightInfo::GetStrengthAndScale(const hsBounds3Ext& bnd, float& strength, return; } -void plLightInfo::GetAffectedForced(const plSpaceTree* space, hsBitVector& list, hsBool charac) +void plLightInfo::GetAffectedForced(const plSpaceTree* space, hsBitVector& list, bool charac) { Refresh(); @@ -195,7 +195,7 @@ void plLightInfo::GetAffectedForced(const plSpaceTree* space, hsBitVector& list, } } -void plLightInfo::GetAffected(const plSpaceTree* space, hsBitVector& list, hsBool charac) +void plLightInfo::GetAffected(const plSpaceTree* space, hsBitVector& list, bool charac) { Refresh(); @@ -215,7 +215,7 @@ void plLightInfo::GetAffected(const plSpaceTree* space, hsBitVector& list, hsBoo } } -const hsTArray& plLightInfo::GetAffected(plSpaceTree* space, const hsTArray& visList, hsTArray& litList, hsBool charac) +const hsTArray& plLightInfo::GetAffected(plSpaceTree* space, const hsTArray& visList, hsTArray& litList, bool charac) { Refresh(); @@ -249,7 +249,7 @@ const hsTArray& plLightInfo::GetAffected(plSpaceTree* space, const hsTA // flag taken in is from plDrawInterface, not our props flags. So we have to // translate... -void plLightInfo::SetProperty( int prop, hsBool on ) +void plLightInfo::SetProperty( int prop, bool on ) { plObjInterface::SetProperty(prop, on); if( kDisable == prop ) @@ -368,7 +368,7 @@ void plLightInfo::IRemoveVisRegion(plVisRegion* reg) } -hsBool plLightInfo::MsgReceive(plMessage* msg) +bool plLightInfo::MsgReceive(plMessage* msg) { plRenderMsg* rendMsg = plRenderMsg::ConvertNoRef(msg); if( rendMsg ) diff --git a/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.h b/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.h index 1edc397e..456040c7 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.h +++ b/Sources/Plasma/PubUtilLib/plGLight/plLightInfo.h @@ -138,7 +138,7 @@ protected: float fMaxStrength; - hsBool fRegisteredForRenderMsg; + bool fRegisteredForRenderMsg; // Small shadow section hsBitVector fSlaveBits; @@ -166,31 +166,31 @@ public: hsGDeviceRef* GetDeviceRef() const { return fDeviceRef; } // Dirty state is local to this machine, so shouldn't be in the network synchronized properties. - hsBool IsDirty() const { return 0 != (fVolFlags & kVolDirty); } - void SetDirty(hsBool on=true) { if(on)fVolFlags |= kVolDirty; else fVolFlags &= ~kVolDirty; } + bool IsDirty() const { return 0 != (fVolFlags & kVolDirty); } + void SetDirty(bool on=true) { if(on)fVolFlags |= kVolDirty; else fVolFlags &= ~kVolDirty; } - hsBool IsEmpty() const { return 0 != (fVolFlags & kVolEmpty); } - void SetEmpty(hsBool on=true) { if(on)fVolFlags |= kVolEmpty; else fVolFlags &= ~kVolEmpty; } + bool IsEmpty() const { return 0 != (fVolFlags & kVolEmpty); } + void SetEmpty(bool on=true) { if(on)fVolFlags |= kVolEmpty; else fVolFlags &= ~kVolEmpty; } - hsBool IsZero() const { return 0 != (fVolFlags & kVolZero); } - void SetZero(hsBool on) { if(on)fVolFlags |= kVolZero; else fVolFlags &= ~kVolZero; } + bool IsZero() const { return 0 != (fVolFlags & kVolZero); } + void SetZero(bool on) { if(on)fVolFlags |= kVolZero; else fVolFlags &= ~kVolZero; } - inline hsBool IsIdle() const; + inline bool IsIdle() const; - hsBool OverAll() const { return GetProperty(kLPOverAll); } + bool OverAll() const { return GetProperty(kLPOverAll); } - hsBool IsShadowCaster() const { return GetProperty(kLPCastShadows); } - void SetShadowCaster(hsBool on) { SetProperty(kLPCastShadows, on); } + bool IsShadowCaster() const { return GetProperty(kLPCastShadows); } + void SetShadowCaster(bool on) { SetProperty(kLPCastShadows, on); } void Refresh() { if( IsDirty() ) { IRefresh(); SetDirty(false); } } virtual void GetStrengthAndScale(const hsBounds3Ext& bnd, float& strength, float& scale) const; - hsBool AffectsBound(const hsBounds3Ext& bnd) { return IGetIsect() ? IGetIsect()->Test(bnd) != kVolumeCulled : true; } - void GetAffectedForced(const plSpaceTree* space, hsBitVector& list, hsBool charac); - void GetAffected(const plSpaceTree* space, hsBitVector& list, hsBool charac); - const hsTArray& GetAffected(plSpaceTree* space, const hsTArray& visList, hsTArray& litList, hsBool charac); - hsBool InVisSet(const hsBitVector& visSet) const { return fVisSet.Overlap(visSet); } - hsBool InVisNot(const hsBitVector& visNot) const { return fVisNot.Overlap(visNot); } + bool AffectsBound(const hsBounds3Ext& bnd) { return IGetIsect() ? IGetIsect()->Test(bnd) != kVolumeCulled : true; } + void GetAffectedForced(const plSpaceTree* space, hsBitVector& list, bool charac); + void GetAffected(const plSpaceTree* space, hsBitVector& list, bool charac); + const hsTArray& GetAffected(plSpaceTree* space, const hsTArray& visList, hsTArray& litList, bool charac); + bool InVisSet(const hsBitVector& visSet) const { return fVisSet.Overlap(visSet); } + bool InVisNot(const hsBitVector& visNot) const { return fVisNot.Overlap(visNot); } void SetAmbient(const hsColorRGBA& c) { fAmbient = c; SetDirty(); } void SetDiffuse(const hsColorRGBA& c) { fDiffuse = c; SetDirty(); } @@ -202,7 +202,7 @@ public: plLayerInterface* GetProjection() const { return fProjection; } - virtual void SetProperty(int prop, hsBool on); + virtual void SetProperty(int prop, bool on); virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l); virtual const hsMatrix44& GetLocalToWorld() const; @@ -219,12 +219,12 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Unlink( void ); virtual void Link( plLightInfo **back ); virtual plLightInfo *GetNext( void ) { return fNextDevPtr; } - virtual hsBool IsLinked( void ) { return ( fNextDevPtr != nil || fPrevDevPtr != nil ) ? true : false; } + virtual bool IsLinked( void ) { return ( fNextDevPtr != nil || fPrevDevPtr != nil ) ? true : false; } // New shadow void ClearSlaveBits() { fSlaveBits.Clear(); } @@ -333,7 +333,7 @@ public: virtual hsVector3 GetNegativeWorldDirection(const hsPoint3& pos) const; - hsBool IsAttenuated() const { return (fAttenLinear != 0)||(fAttenQuadratic != 0) || ( fAttenCutoff != 0 ); } + bool IsAttenuated() const { return (fAttenLinear != 0)||(fAttenQuadratic != 0) || ( fAttenCutoff != 0 ); } float GetRadius() const; float GetConstantAttenuation() const { return fAttenConst; } @@ -402,7 +402,7 @@ public: }; -inline hsBool plLightInfo::IsIdle() const +inline bool plLightInfo::IsIdle() const { if( GetProperty(kDisable) ) return true; diff --git a/Sources/Plasma/PubUtilLib/plGLight/plLightProxy.cpp b/Sources/Plasma/PubUtilLib/plGLight/plLightProxy.cpp index 5accfcbe..9e445a33 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plLightProxy.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plLightProxy.cpp @@ -57,7 +57,7 @@ plLightProxy::~plLightProxy() { } -hsBool plLightProxy::Init(plLightInfo* liInfo) +bool plLightProxy::Init(plLightInfo* liInfo) { plProxyGen::Init(liInfo); diff --git a/Sources/Plasma/PubUtilLib/plGLight/plLightProxy.h b/Sources/Plasma/PubUtilLib/plGLight/plLightProxy.h index cebd35bb..c1277ba5 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plLightProxy.h +++ b/Sources/Plasma/PubUtilLib/plGLight/plLightProxy.h @@ -59,7 +59,7 @@ public: plLightProxy(); virtual ~plLightProxy(); - hsBool Init(plLightInfo* liInfo); + bool Init(plLightInfo* liInfo); }; #endif // plLightProxy_inc diff --git a/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.cpp b/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.cpp index e9a38a1e..5e37a3e6 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.cpp @@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plgDispatch.h" -hsBool plLightSpace::MsgReceive(plMessage* msg) +bool plLightSpace::MsgReceive(plMessage* msg) { plCollideMsg* collMsg = plCollideMsg::ConvertNoRef(msg); if( collMsg ) @@ -57,7 +57,7 @@ hsBool plLightSpace::MsgReceive(plMessage* msg) // HACK - CollideMsg doesn't have sufficient info yet. Need at least object // which is entering and leaving, and whether it is entering or leaving. plKey otherKey = nil; - hsBool enter = true; + bool enter = true; uint8_t ctx = enter ? plRefMsg::kOnRequest : plRefMsg::kOnRemove; plLightRefMsg* liMsg = new plLightRefMsg(GetKey(), otherKey, IGetLightInfo(), ctx); plgDispatch::MsgSend(liMsg); diff --git a/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.h b/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.h index d357ed7a..05ece496 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.h +++ b/Sources/Plasma/PubUtilLib/plGLight/plLightSpace.h @@ -62,12 +62,12 @@ public: CLASSNAME_REGISTER( plLightSpace ); GETINTERFACE_ANY( plLightSpace, plMultiModifier ); - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return false; } virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; diff --git a/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp b/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp index 03f0f172..8f543ccd 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plPerspDirSlave.cpp @@ -138,13 +138,13 @@ bool plPerspDirSlave::SetupViewTransform(plPipeline* pipe) hsPoint3 pWorldLiDir(worldLiDir.fX, worldLiDir.fY, worldLiDir.fZ); hsPoint3 perspLiPos = IProject(world2NDC, pWorldLiDir, 0); - hsBool reverseZ = fLightDir.InnerProduct(pipe->GetViewDirWorld()) > 0; + bool reverseZ = fLightDir.InnerProduct(pipe->GetViewDirWorld()) > 0; SetFlag(kReverseZ, reverseZ); SetFlag(kReverseCull, reverseZ); hsPoint3 lookAt; - plConst(hsBool) kUsePerspCenter(true); - plConst(hsBool) kUseFrustCenter(true); + plConst(bool) kUsePerspCenter(true); + plConst(bool) kUseFrustCenter(true); if( kUsePerspCenter ) { hsPoint3 lookAtCam = pipeView.GetWorldToCamera() * fCasterWorldBounds.GetCenter(); @@ -170,13 +170,13 @@ bool plPerspDirSlave::SetupViewTransform(plPipeline* pipe) float minZ, maxZ; float cotX, cotY; - plConst(hsBool) kFixedPersp(true); + plConst(bool) kFixedPersp(true); if( !kFixedPersp ) { hsBounds3Ext bnd(IGetPerspCasterBound(camNDC2Li * world2NDC)); hsBounds3Ext bnd2(IGetPerspCasterBound(world2NDC)); bnd2.Transform(&camNDC2Li); - plConst(hsBool) kUseBnd2(false); + plConst(bool) kUseBnd2(false); if( kUseBnd2 ) bnd = bnd2; @@ -194,7 +194,7 @@ bool plPerspDirSlave::SetupViewTransform(plPipeline* pipe) return false; // THIS IS EVEN MORE WRONG - plConst(hsBool) kFakeDepth(false); + plConst(bool) kFakeDepth(false); if( kFakeDepth ) { plConst(float) kMin(1.f); diff --git a/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.cpp b/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.cpp index 5f6e3980..d76e553c 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.cpp @@ -59,8 +59,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plShadowMaster.h" -hsBool plShadowCaster::fShadowCastDisabled = false; -hsBool plShadowCaster::fCanShadowCast = true; +bool plShadowCaster::fShadowCastDisabled = false; +bool plShadowCaster::fCanShadowCast = true; plShadowCaster::plShadowCaster() : fMaxOpacity(0), @@ -157,7 +157,7 @@ void plShadowCaster::ICollectAllSpans() } } -hsBool plShadowCaster::IOnRenderMsg(plRenderMsg* msg) +bool plShadowCaster::IOnRenderMsg(plRenderMsg* msg) { if( ShadowCastDisabled() ) return true; @@ -209,7 +209,7 @@ hsBool plShadowCaster::IOnRenderMsg(plRenderMsg* msg) #include "plProfile.h" plProfile_CreateTimer("ShadowCaster", "RenderSetup", ShadowCaster); -hsBool plShadowCaster::MsgReceive(plMessage* msg) +bool plShadowCaster::MsgReceive(plMessage* msg) { plRenderMsg* rendMsg = plRenderMsg::ConvertNoRef(msg); if( rendMsg ) diff --git a/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.h b/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.h index e37a6b2a..bdefcb1a 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.h +++ b/Sources/Plasma/PubUtilLib/plGLight/plShadowCaster.h @@ -77,8 +77,8 @@ protected: // Global state to just turn off the whole gig. Not just // debugging, we'll probably want a user option for this. - static hsBool fShadowCastDisabled; - static hsBool fCanShadowCast; + static bool fShadowCastDisabled; + static bool fCanShadowCast; // Properties really just to be read and written, @@ -99,10 +99,10 @@ protected: void ICollectAllSpans(); - hsBool IOnRenderMsg(plRenderMsg* msg); + bool IOnRenderMsg(plRenderMsg* msg); friend class plDXPipeline; - static void SetCanShadowCast(hsBool b) { fCanShadowCast = b; } + static void SetCanShadowCast(bool b) { fCanShadowCast = b; } public: plShadowCaster(); virtual ~plShadowCaster(); @@ -110,9 +110,9 @@ public: CLASSNAME_REGISTER( plShadowCaster ); GETINTERFACE_ANY( plShadowCaster, plMultiModifier ); - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return true; } - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); @@ -120,14 +120,14 @@ public: float MaxOpacity() const { return fMaxOpacity; } const hsTArray& Spans() const { return fSpans; } - hsBool GetSelfShadow() const { return 0 != (fCastFlags & kSelfShadow); } - void SetSelfShadow(hsBool on) { if(on) fCastFlags |= kSelfShadow; else fCastFlags &= ~kSelfShadow; } + bool GetSelfShadow() const { return 0 != (fCastFlags & kSelfShadow); } + void SetSelfShadow(bool on) { if(on) fCastFlags |= kSelfShadow; else fCastFlags &= ~kSelfShadow; } - hsBool GetPerspective() const { return 0 != (fCastFlags & kPerspective); } - void SetPerspective(hsBool on) { if(on) fCastFlags |= kPerspective; else fCastFlags &= ~kPerspective; } + bool GetPerspective() const { return 0 != (fCastFlags & kPerspective); } + void SetPerspective(bool on) { if(on) fCastFlags |= kPerspective; else fCastFlags &= ~kPerspective; } - hsBool GetLimitRes() const { return 0 != (fCastFlags & kLimitRes); } - void SetLimitRes(hsBool on) { if(on) fCastFlags |= kLimitRes; else fCastFlags &= ~kLimitRes; } + bool GetLimitRes() const { return 0 != (fCastFlags & kLimitRes); } + void SetLimitRes(bool on) { if(on) fCastFlags |= kLimitRes; else fCastFlags &= ~kLimitRes; } float GetAttenScale() const { return fAttenScale; } void SetAttenScale(float s) { fAttenScale = s; } @@ -144,12 +144,12 @@ public: void Deactivate() const; void Activate() const; - static void DisableShadowCast(hsBool on=true) { fShadowCastDisabled = on; } - static void EnableShadowCast(hsBool on=true) { fShadowCastDisabled = !on; } + static void DisableShadowCast(bool on=true) { fShadowCastDisabled = on; } + static void EnableShadowCast(bool on=true) { fShadowCastDisabled = !on; } static void ToggleShadowCast() { fShadowCastDisabled = !fShadowCastDisabled; } - static hsBool ShadowCastDisabled() { return !CanShadowCast() || fShadowCastDisabled; } + static bool ShadowCastDisabled() { return !CanShadowCast() || fShadowCastDisabled; } - static hsBool CanShadowCast() { return fCanShadowCast; } + static bool CanShadowCast() { return fCanShadowCast; } }; typedef plShadowCaster::DrawSpan plShadowCastSpan; diff --git a/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.cpp b/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.cpp index ab9e4043..49464f7b 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.cpp +++ b/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.cpp @@ -175,7 +175,7 @@ void plShadowMaster::SetMaxDist(float f) #include "plProfile.h" plProfile_CreateTimer("ShadowMaster", "RenderSetup", ShadowMaster); -hsBool plShadowMaster::MsgReceive(plMessage* msg) +bool plShadowMaster::MsgReceive(plMessage* msg) { plRenderMsg* rendMsg = plRenderMsg::ConvertNoRef(msg); if( rendMsg ) @@ -203,7 +203,7 @@ void plShadowMaster::IBeginRender() fLightInfo->ClearSlaveBits(); } -hsBool plShadowMaster::IOnCastMsg(plShadowCastMsg* castMsg) +bool plShadowMaster::IOnCastMsg(plShadowCastMsg* castMsg) { // // HACKTEST // return false; @@ -803,9 +803,9 @@ public: CLASSNAME_REGISTER( plShadowCaster ); GETINTERFACE_ANY( plShadowCaster, plMultiModifier ); - virtual hsBool IEval(double secs, float del, uint32_t dirty) {} + virtual bool IEval(double secs, float del, uint32_t dirty) {} - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); @@ -836,7 +836,7 @@ protected: public: plVolumeIsect* GetIsect() const { return fIsect; } - hsBool CanSee(const hsBounds3Ext& bnd) + bool CanSee(const hsBounds3Ext& bnd) { switch( fType ) { @@ -1114,7 +1114,7 @@ void IClearShadowSlaves(); // We don't have the depth resolution to even think about self shadowing, so we just don't // let a slave shadow any of the spans that were rendered into it. -hsBool AcceptsShadow(plSpan* span, plShadowSlave* slave) +bool AcceptsShadow(plSpan* span, plShadowSlave* slave) { return !span->IsShadowBitSet(slave->fIndex); } @@ -1123,7 +1123,7 @@ hsBool AcceptsShadow(plSpan* span, plShadowSlave* slave) // look goofy, or won't contribute. // Also, if we have less than 3 simultaneous textures, we want to skip anything with // an alpha'd base layer, unless it's been overriden. -hsBool ReceivesShadows(plSpan* span, hsGMaterial* mat) +bool ReceivesShadows(plSpan* span, hsGMaterial* mat) { if( span.fProps & plSpan::kPropNoShadow ) return false; @@ -1159,7 +1159,7 @@ Apply RenderSpanShadows { - hsBool first = true; + bool first = true; if receivesShadows(span) { for each ShadowSlave diff --git a/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.h b/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.h index d7ed5b44..9c90f58b 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.h +++ b/Sources/Plasma/PubUtilLib/plGLight/plShadowMaster.h @@ -115,7 +115,7 @@ protected: plLightInfo* ISetLightInfo(); virtual void IBeginRender(); - virtual hsBool IOnCastMsg(plShadowCastMsg* castMsg); + virtual bool IOnCastMsg(plShadowCastMsg* castMsg); public: plShadowMaster(); @@ -124,7 +124,7 @@ public: CLASSNAME_REGISTER( plShadowMaster ); GETINTERFACE_ANY( plShadowMaster, plObjInterface ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) {} diff --git a/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.h b/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.h index b3d0d4d2..3821dd70 100644 --- a/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.h +++ b/Sources/Plasma/PubUtilLib/plGLight/plShadowSlave.h @@ -99,17 +99,17 @@ public: kPositional = 0x80 }; - void SetFlag(SlaveFlag f, hsBool on) { if(on) fFlags |= f; else fFlags &= ~f; } - hsBool HasFlag(SlaveFlag f) const { return 0 != (fFlags & f); } - - hsBool ObeysLightGroups() const { return HasFlag(kObeysLightGroups); } - hsBool IncludesChars() const { return HasFlag(kIncludesChars); } - hsBool SelfShadow() const { return HasFlag(kSelfShadow); } - hsBool CastInCameraSpace() const { return HasFlag(kCastInCameraSpace); } - hsBool ReverseZ() const { return HasFlag(kReverseZ); } - hsBool TwoSided() const { return HasFlag(kTwoSided); } - hsBool ReverseCull() const { return HasFlag(kReverseCull); } - hsBool Positional() const { return HasFlag(kPositional); } + void SetFlag(SlaveFlag f, bool on) { if(on) fFlags |= f; else fFlags &= ~f; } + bool HasFlag(SlaveFlag f) const { return 0 != (fFlags & f); } + + bool ObeysLightGroups() const { return HasFlag(kObeysLightGroups); } + bool IncludesChars() const { return HasFlag(kIncludesChars); } + bool SelfShadow() const { return HasFlag(kSelfShadow); } + bool CastInCameraSpace() const { return HasFlag(kCastInCameraSpace); } + bool ReverseZ() const { return HasFlag(kReverseZ); } + bool TwoSided() const { return HasFlag(kTwoSided); } + bool ReverseCull() const { return HasFlag(kReverseCull); } + bool Positional() const { return HasFlag(kPositional); } virtual void Init() { fFlags = 0; } diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.cpp index 37aceddd..ca7ef87e 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.cpp @@ -189,7 +189,7 @@ void plAvatarInputInterface::Shutdown( void ) { } -void plAvatarInputInterface::CameraInThirdPerson(hsBool state) +void plAvatarInputInterface::CameraInThirdPerson(bool state) { if (state != f3rdPerson) { @@ -393,17 +393,17 @@ void plAvatarInputInterface::EnableMouseMovement() ISetBasicMode(); } -void plAvatarInputInterface::EnableJump(hsBool val) +void plAvatarInputInterface::EnableJump(bool val) { EnableControl(val, B_CONTROL_JUMP); } -void plAvatarInputInterface::EnableForwardMovement(hsBool val) +void plAvatarInputInterface::EnableForwardMovement(bool val) { EnableControl(val, B_CONTROL_MOVE_FORWARD); } -void plAvatarInputInterface::EnableControl(hsBool val, ControlEventCode code) +void plAvatarInputInterface::EnableControl(bool val, ControlEventCode code) { if (val) IEnableControl(code); @@ -411,7 +411,7 @@ void plAvatarInputInterface::EnableControl(hsBool val, ControlEventCode code) IDisableControl(code); } -void plAvatarInputInterface::ForceAlwaysRun(hsBool val) +void plAvatarInputInterface::ForceAlwaysRun(bool val) { plCtrlCmd *pCmd = new plCtrlCmd( this ); pCmd->fControlCode = B_CONTROL_ALWAYS_RUN; @@ -424,7 +424,7 @@ void plAvatarInputInterface::ForceAlwaysRun(hsBool val) //// IEval /////////////////////////////////////////////////////////////////// // Gets called once per IUpdate(), just like normal IEval()s -hsBool plAvatarInputInterface::IEval( double secs, float del, uint32_t dirty ) +bool plAvatarInputInterface::IEval( double secs, float del, uint32_t dirty ) { fCursorTimeout += del; if( fCursorTimeout > fCursorFadeDelay ) @@ -442,7 +442,7 @@ hsBool plAvatarInputInterface::IEval( double secs, float del, uint32_t dirty ) //// IHandleCtrlCmd ////////////////////////////////////////////////////////// -hsBool plAvatarInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd ) +bool plAvatarInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd ) { switch( cmd->fControlCode ) { @@ -498,7 +498,7 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta if( cmd->fControlActivated ) { - hsBool abort = false; + bool abort = false; for (int i = 0; i < fMessageQueue->GetCount(); i++) { if ((*fMessageQueue)[i]->fControlCode == S_SET_WALK_MODE && !(*fMessageQueue)[i]->fControlActivated) @@ -523,7 +523,7 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta if( cmd->fControlActivated ) { - hsBool abort = false; + bool abort = false; for (int i = 0; i < fMessageQueue->GetCount(); i++) { if ((*fMessageQueue)[i]->fControlCode == S_SET_WALK_BACK_MODE && !(*fMessageQueue)[i]->fControlActivated) @@ -548,7 +548,7 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta if( cmd->fControlActivated ) { - hsBool abort = false; + bool abort = false; for (int i = 0; i < fMessageQueue->GetCount(); i++) { if ((*fMessageQueue)[i]->fControlCode == S_SET_WALK_BACK_MODE && !(*fMessageQueue)[i]->fControlActivated) @@ -602,7 +602,7 @@ plVirtualCam::Instance()->GetPipeline()->SetDrawableTypeMask(plVirtualCam::Insta return false; } -hsBool plAvatarInputInterface::CursorInBox(plMouseEventMsg* pMsg, hsPoint4 box) +bool plAvatarInputInterface::CursorInBox(plMouseEventMsg* pMsg, hsPoint4 box) { return ( pMsg->GetXPos() >= box.fX && pMsg->GetXPos() <= box.fY && pMsg->GetYPos() >= box.fZ && pMsg->GetYPos() <= box.fW ); } @@ -623,7 +623,7 @@ void plAvatarInputInterface::ClearMouseCursor() IClearControlFlag(S_SET_CURSOR_RIGHT); } -hsBool plAvatarInputInterface::MsgReceive( plMessage *msg ) +bool plAvatarInputInterface::MsgReceive( plMessage *msg ) { plCmdIfaceModMsg *pCMsg = plCmdIfaceModMsg::ConvertNoRef( msg ); if( pCMsg ) @@ -684,7 +684,7 @@ void plAvatarInputInterface::MissedInputEvent( plInputEventMsg *pMsg ) } } -hsBool plAvatarInputInterface::IsEnterChatModeBound() +bool plAvatarInputInterface::IsEnterChatModeBound() { int i; for ( i=0; i< fControlMap->GetNumBindings(); i++ ) @@ -704,7 +704,7 @@ hsBool plAvatarInputInterface::IsEnterChatModeBound() //// InterpretInputEvent ///////////////////////////////////////////////////// -hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) +bool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) { if( fInputMap == nil ) return false; @@ -801,7 +801,7 @@ hsBool plAvatarInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) return true; // can we disable this control? - hsBool disable = false; + bool disable = false; // can we disable this control based on a button? if (mouseMap->fMap[i]->fControlFlags & kControlFlagLeftButton && !(fInputMap->fButtonState & kLeftButtonDown)) diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.h b/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.h index 2f65a781..65f9dfd9 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.h +++ b/Sources/Plasma/PubUtilLib/plInputCore/plAvatarInputInterface.h @@ -83,7 +83,7 @@ class plAvatarInputMap plAvatarInputMap(); virtual ~plAvatarInputMap(); virtual const char *GetName() = 0; - virtual hsBool IsBasic() { return false; } + virtual bool IsBasic() { return false; } plMouseMap *fMouseMap; uint32_t fButtonState; @@ -103,7 +103,7 @@ class plBasicControlMap : public plSuspendedMovementMap public: plBasicControlMap(); virtual const char *GetName() { return "Basic"; } - virtual hsBool IsBasic() { return true; } + virtual bool IsBasic() { return true; } }; // The above, plus movement @@ -185,10 +185,10 @@ class plAvatarInputInterface : public plInputInterface static plAvatarInputInterface *fInstance; - virtual hsBool IHandleCtrlCmd( plCtrlCmd *cmd ); + virtual bool IHandleCtrlCmd( plCtrlCmd *cmd ); // Gets called once per IUpdate(), just like normal IEval()s - virtual hsBool IEval( double secs, float del, uint32_t dirty ); + virtual bool IEval( double secs, float del, uint32_t dirty ); void IDeactivateCommand(plMouseInfo *info); void IChangeInputMaps(plAvatarInputMap *newMap); @@ -199,10 +199,10 @@ class plAvatarInputInterface : public plInputInterface void ISetPreLadderMap(); void ISetPostLadderMap(); - hsBool IHasControlFlag(int f) const { return fControlFlags.IsBitSet(f); } + bool IHasControlFlag(int f) const { return fControlFlags.IsBitSet(f); } void IClearControlFlag(int which) { fControlFlags.ClearBit( which ); } - hsBool CursorInBox(plMouseEventMsg* pMsg, hsPoint4 box); + bool CursorInBox(plMouseEventMsg* pMsg, hsPoint4 box); void ClearMouseCursor(); void DisableMouseInput() { fMouseDisabled = true; } void EnableMouseInput() { fMouseDisabled = false; } @@ -212,31 +212,31 @@ class plAvatarInputInterface : public plInputInterface void RequestCursorToWorldPos(float xPos, float yPos, int ID); hsBitVector fControlFlags; - hsBool fMouseDisabled; + bool fMouseDisabled; plPipeline* fPipe; int fCursorState; int fCursorPriority; - hsBool f3rdPerson; + bool f3rdPerson; public: plAvatarInputInterface(); virtual ~plAvatarInputInterface(); - void CameraInThirdPerson(hsBool state); + void CameraInThirdPerson(bool state); // Always return true, since the cursor should be representing how we control the avatar - virtual hsBool HasInterestingCursorID( void ) const { return true; } + virtual bool HasInterestingCursorID( void ) const { return true; } virtual uint32_t GetPriorityLevel( void ) const { return kAvatarInputPriority; } virtual uint32_t GetCurrentCursorID( void ) const { return fCurrentCursor; } virtual float GetCurrentCursorOpacity( void ) const { return fCursorOpacity; } const char* GetInputMapName() { return fInputMap ? fInputMap->GetName() : ""; } - virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ); + virtual bool InterpretInputEvent( plInputEventMsg *pMsg ); virtual void MissedInputEvent( plInputEventMsg *pMsg ); - virtual hsBool MsgReceive( plMessage *msg ); + virtual bool MsgReceive( plMessage *msg ); virtual void Init( plInputInterfaceMgr *manager ); virtual void Shutdown( void ); @@ -247,18 +247,18 @@ class plAvatarInputInterface : public plInputInterface // [dis/en]able mouse commands for avatar movement void SuspendMouseMovement(); void EnableMouseMovement(); - void EnableJump(hsBool val); - void EnableForwardMovement(hsBool val); - void EnableControl(hsBool val, ControlEventCode code); + void EnableJump(bool val); + void EnableForwardMovement(bool val); + void EnableControl(bool val, ControlEventCode code); void ClearLadderMode(); void SetLadderMode(); - void ForceAlwaysRun(hsBool val); + void ForceAlwaysRun(bool val); - void SetControlFlag(int f, hsBool val = true) { fControlFlags.SetBit(f, val); } + void SetControlFlag(int f, bool val = true) { fControlFlags.SetBit(f, val); } void SetCursorFadeDelay( float delay ) { fCursorFadeDelay = delay; } - hsBool IsEnterChatModeBound(); + bool IsEnterChatModeBound(); static plAvatarInputInterface *GetInstance( void ) { return fInstance; } }; diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.cpp index c5e73d95..ddec7617 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.cpp @@ -136,20 +136,20 @@ void plDebugInputInterface::RestoreDefaultKeyMappings( void ) //// IEval /////////////////////////////////////////////////////////////////// -hsBool plDebugInputInterface::IEval( double secs, float del, uint32_t dirty ) +bool plDebugInputInterface::IEval( double secs, float del, uint32_t dirty ) { return true; } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool plDebugInputInterface::MsgReceive( plMessage *msg ) +bool plDebugInputInterface::MsgReceive( plMessage *msg ) { return plInputInterface::MsgReceive(msg); } //// cursorinbox ///////////////////////////////////////////////////// -hsBool plDebugInputInterface::CursorInBox(plMouseEventMsg* pMsg, hsPoint4 box) +bool plDebugInputInterface::CursorInBox(plMouseEventMsg* pMsg, hsPoint4 box) { return ( pMsg->GetXPos() >= box.fX && pMsg->GetXPos() <= box.fY && pMsg->GetYPos() >= box.fZ && pMsg->GetYPos() <= box.fW ); } @@ -157,9 +157,9 @@ hsBool plDebugInputInterface::CursorInBox(plMouseEventMsg* pMsg, hsPoint4 box) //// InterpretInputEvent ///////////////////////////////////////////////////// -hsBool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) +bool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) { - hsBool handled = false; + bool handled = false; plMouseEventMsg* pMouseMsg = plMouseEventMsg::ConvertNoRef(pMsg); if (pMouseMsg) @@ -199,7 +199,7 @@ hsBool plDebugInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) if (fControlFlags.IsBitSet(fMouseMap.fMap[i]->fCode)) { // can we disable this control? - hsBool disable = false; + bool disable = false; // can we disable this control based on a button? if (fMouseMap.fMap[i]->fControlFlags & kControlFlagLeftButton && !(fButtonState & kLeftButtonDown)) diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.h b/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.h index 2c9b1ab2..45c449b2 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.h +++ b/Sources/Plasma/PubUtilLib/plInputCore/plDebugInputInterface.h @@ -60,8 +60,8 @@ class plDebugInputInterface : public plInputInterface { protected: - virtual hsBool IEval( double secs, float del, uint32_t dirty ); - hsBool CursorInBox(plMouseEventMsg* pMsg, hsPoint4 box); + virtual bool IEval( double secs, float del, uint32_t dirty ); + bool CursorInBox(plMouseEventMsg* pMsg, hsPoint4 box); plMouseMap fMouseMap; uint32_t fButtonState; @@ -75,14 +75,14 @@ class plDebugInputInterface : public plInputInterface virtual ~plDebugInputInterface(); // Always return false, - virtual hsBool HasInterestingCursorID( void ) const { return false; } + virtual bool HasInterestingCursorID( void ) const { return false; } virtual uint32_t GetPriorityLevel( void ) const { return kDebugCmdPrioity; } virtual void RestoreDefaultKeyMappings( void ); virtual uint32_t GetCurrentCursorID( void ) const { return 0; } - virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ); + virtual bool InterpretInputEvent( plInputEventMsg *pMsg ); - virtual hsBool MsgReceive( plMessage *msg ); + virtual bool MsgReceive( plMessage *msg ); virtual void Init( plInputInterfaceMgr *manager ); virtual void Shutdown( void ); diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp index b384ecf0..fe0f4d5a 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp @@ -66,7 +66,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com plKeyboardDevice* plKeyboardDevice::fInstance = nil; bool plKeyboardDevice::fKeyboardState[256]; -hsBool plKeyboardDevice::fIgnoreCapsLock = false; +bool plKeyboardDevice::fIgnoreCapsLock = false; plKeyboardDevice::plKeyboardDevice() : fShiftKeyDown(false), @@ -153,7 +153,7 @@ void plKeyboardDevice::ReleaseAllKeys() } } -hsBool plKeyboardDevice::IsCapsLockKeyOn() +bool plKeyboardDevice::IsCapsLockKeyOn() { return fCapsLockLock; } @@ -162,7 +162,7 @@ void plKeyboardDevice::Shutdown() { } -void plKeyboardDevice::HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDown, hsBool bKeyRepeat, wchar_t c) +void plKeyboardDevice::HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDown, bool bKeyRepeat, wchar_t c) { // update the internal keyboard state unsigned int keyCode = (unsigned int)key; @@ -350,7 +350,7 @@ void plMouseDevice::SetCursorY(float y) } -void plMouseDevice::HideCursor(hsBool override) +void plMouseDevice::HideCursor(bool override) { if( fInstance->fCursor != nil ) fInstance->fCursor->SetVisible( false ); @@ -360,7 +360,7 @@ void plMouseDevice::HideCursor(hsBool override) } -void plMouseDevice::ShowCursor(hsBool override) +void plMouseDevice::ShowCursor(bool override) { if( !plMouseDevice::bCursorHidden ) return; @@ -393,7 +393,7 @@ void plMouseDevice::SetCursorOpacity( float opacity ) fInstance->fCursor->SetOpacity( opacity ); } -hsBool plMouseDevice::MsgReceive(plMessage* msg) +bool plMouseDevice::MsgReceive(plMessage* msg) { plEvalMsg* pEMsg = plEvalMsg::ConvertNoRef(msg); if (pEMsg) diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h b/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h index b4887d2c..0a3b2df6 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h @@ -74,10 +74,10 @@ public: uint32_t GetFlags() { return fFlags; } void SetFlags(uint32_t f) { fFlags = f; } - virtual void HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDown, hsBool bKeyRepeat, wchar_t c = nil) {;} + virtual void HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDown, bool bKeyRepeat, wchar_t c = nil) {;} virtual void HandleMouseEvent(plOSMsg message, plMouseState state) {;} virtual void HandleWindowActivate(bool bActive, hsWindowHndl hWnd) {;} - virtual hsBool MsgReceive(plMessage* msg) {return false;} + virtual bool MsgReceive(plMessage* msg) {return false;} virtual void Shutdown() {;} @@ -87,15 +87,15 @@ class plKeyEventMsg; class plKeyboardDevice : public plInputDevice { - hsBool fAltKeyDown; - hsBool fShiftKeyDown; - hsBool fCtrlKeyDown; - hsBool fCapsLockKeyDown; + bool fAltKeyDown; + bool fShiftKeyDown; + bool fCtrlKeyDown; + bool fCapsLockKeyDown; int fControlMode; - hsBool fCapsLockLock; + bool fCapsLockLock; static bool fKeyboardState[256]; // virtual key code is the index, bool is whether it is down or not - static hsBool fIgnoreCapsLock; // set if we want it to ignore this key when translating characters (i.e. for chatting) + static bool fIgnoreCapsLock; // set if we want it to ignore this key when translating characters (i.e. for chatting) static plKeyboardDevice* fInstance; void InitKeyboardMaps(); @@ -116,13 +116,13 @@ public: void SetControlMode(int i) { fControlMode = i; } const char* GetInputName() { return "keyboard"; } - void HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDown, hsBool bKeyRepeat, wchar_t c = nil); + void HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDown, bool bKeyRepeat, wchar_t c = nil); virtual void HandleWindowActivate(bool bActive, hsWindowHndl hWnd); - virtual hsBool IsCapsLockKeyOn(); + virtual bool IsCapsLockKeyOn(); virtual void Shutdown(); - static hsBool IgnoreCapsLock() { return fIgnoreCapsLock; } - static void IgnoreCapsLock(hsBool ignore) { fIgnoreCapsLock = ignore; } + static bool IgnoreCapsLock() { return fIgnoreCapsLock; } + static void IgnoreCapsLock(bool ignore) { fIgnoreCapsLock = ignore; } static plKeyboardDevice* GetInstance() { return fInstance; } }; @@ -162,7 +162,7 @@ public: const char* GetInputName() { return "mouse"; } void HandleWindowActivate(bool bActive, hsWindowHndl hWnd); - hsBool HasControlFlag(int f) const { return fControlFlags.IsBitSet(f); } + bool HasControlFlag(int f) const { return fControlFlags.IsBitSet(f); } void SetControlFlag(int f) { fControlFlags.SetBit(f); @@ -176,14 +176,14 @@ public: float GetCursorOpacity() { return fOpacity; } void SetDisplayResolution(float Width, float Height); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); static plMouseDevice* Instance() { return plMouseDevice::fInstance; } static void SetMsgAlways(bool b) { plMouseDevice::bMsgAlways = b; } - static void ShowCursor(hsBool override = false); + static void ShowCursor(bool override = false); static void NewCursor(char* cursor); - static void HideCursor(hsBool override = false); + static void HideCursor(bool override = false); static bool GetHideCursor() { return plMouseDevice::bCursorHidden; } static void SetCursorOpacity( float opacity = 1.f ); static bool GetInverted() { return plMouseDevice::bInverted; } diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp index bc96cfe9..aecd11bf 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp @@ -91,7 +91,7 @@ void plInputInterface::Write( hsStream* s, hsResMgr* mgr ) //// Helper Functions //////////////////////////////////////////////////////// -hsBool plInputInterface::IOwnsControlCode( ControlEventCode code ) +bool plInputInterface::IOwnsControlCode( ControlEventCode code ) { if( fControlMap->FindBinding( code ) != nil ) return true; @@ -102,7 +102,7 @@ hsBool plInputInterface::IOwnsControlCode( ControlEventCode code ) //// IVerifyShiftKey ///////////////////////////////////////////////////////// // special logic so the shift key can make everyone totally happy... -hsBool plInputInterface::IVerifyShiftKey( plKeyDef key, int index ) +bool plInputInterface::IVerifyShiftKey( plKeyDef key, int index ) { // if we are mapped to the actual shift key, return true if (key == KEY_SHIFT) @@ -138,10 +138,10 @@ void plInputInterface::IDeactivateBinding(const plKeyBinding *binding) // Processes the given key event as a key binding, if one exists. If not, // returns false. -hsBool plInputInterface::ProcessKeyBindings( plInputEventMsg *msg ) +bool plInputInterface::ProcessKeyBindings( plInputEventMsg *msg ) { int i; - hsBool activate; + bool activate; plKeyEventMsg *keyMsg = plKeyEventMsg::ConvertNoRef( msg ); if( keyMsg == nil ) @@ -257,7 +257,7 @@ hsBool plInputInterface::ProcessKeyBindings( plInputEventMsg *msg ) activate = true; } - hsBool wasActive = IHasKeyControlFlag(binding->GetCode()); + bool wasActive = IHasKeyControlFlag(binding->GetCode()); // Set or clear our flags, since we do that even if we don't send a message if ( !keyMsg->GetKeyChar() ) @@ -305,7 +305,7 @@ hsBool plInputInterface::ProcessKeyBindings( plInputEventMsg *msg ) return true; } -hsBool plInputInterface::IControlCodeEnabled(ControlEventCode code ) +bool plInputInterface::IControlCodeEnabled(ControlEventCode code ) { return (!fDisabledControls.IsBitSet(code)); } \ No newline at end of file diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.h b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.h index 24aa7b4e..9a994b5c 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.h +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.h @@ -106,14 +106,14 @@ class plInputInterface : public hsRefCnt hsBitVector fKeyControlFlags; hsBitVector fKeyControlsFrom2ndKeyFlags; hsBitVector fDisabledControls; - hsBool fEnabled; + bool fEnabled; void ISetMessageQueue( hsTArray *queue ) { fMessageQueue = queue; } plKeyMap *IGetControlMap( void ) const { return fControlMap; } - hsBool IOwnsControlCode( ControlEventCode code ); - hsBool IVerifyShiftKey( plKeyDef key, int index ); + bool IOwnsControlCode( ControlEventCode code ); + bool IVerifyShiftKey( plKeyDef key, int index ); - hsBool IHasKeyControlFlag(int f) const { return fKeyControlFlags.IsBitSet(f); } + bool IHasKeyControlFlag(int f) const { return fKeyControlFlags.IsBitSet(f); } void ISetKeyControlFlag(int f) { fKeyControlFlags.SetBit(f); } void IClearKeyControlFlag(int which) { fKeyControlFlags.ClearBit( which ); } void IDisableControl(int which) { fDisabledControls.SetBit(which); } @@ -125,16 +125,16 @@ class plInputInterface : public hsRefCnt // Gets called once per IUpdate(), just like normal IEval()s - virtual hsBool IEval( double secs, float del, uint32_t dirty ) { return false; } + virtual bool IEval( double secs, float del, uint32_t dirty ) { return false; } // Override to handle special-cased control messages of your own (same as receiving them via a message, but if you process them, nobody else gets them). Return false if you don't handle it. - virtual hsBool IHandleCtrlCmd( plCtrlCmd *cmd ) { return false; } + virtual bool IHandleCtrlCmd( plCtrlCmd *cmd ) { return false; } // Override to let the input interfaces control when a binding is truly active. If this function returns false, // ProcessKeyBindings will ignore the keypress for the given control. This way, the interfaces can be selective // about which bindings are active when. By default, always returns true, since there are very few and rare // cases where you'd want to return false - virtual hsBool IControlCodeEnabled( ControlEventCode code ); + virtual bool IControlCodeEnabled( ControlEventCode code ); // Some helpers for derived classes to avoid including the manager unnecessariliy @@ -178,7 +178,7 @@ class plInputInterface : public hsRefCnt virtual uint32_t GetPriorityLevel( void ) const = 0; // Returns true if the message was handled, false if not and we want to pass it on to others in the stack - virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ) = 0; + virtual bool InterpretInputEvent( plInputEventMsg *pMsg ) = 0; // Returns the currently active mouse cursor for this layer, as defined in pnMessage/plCursorChangeMsg.h virtual uint32_t GetCurrentCursorID( void ) const = 0; @@ -187,10 +187,10 @@ class plInputInterface : public hsRefCnt virtual float GetCurrentCursorOpacity( void ) const { return 1.f; } // Returns true if this layer is wanting to change the mouse, false if it isn't interested - virtual hsBool HasInterestingCursorID( void ) const = 0; + virtual bool HasInterestingCursorID( void ) const = 0; // Gets called by the manager. If you want a message to come to you, set your manager as the destination - virtual hsBool MsgReceive( plMessage *msg ) { return false; } + virtual bool MsgReceive( plMessage *msg ) { return false; } // Any initialization that requires a pointer to the manager needs to be done on Init()/Shutdown() virtual void Init( plInputInterfaceMgr *manager ) { fManager = manager; RestoreDefaultKeyMappings(); } @@ -206,10 +206,10 @@ class plInputInterface : public hsRefCnt virtual void MissedInputEvent( plInputEventMsg *pMsg ) {} // Non-virtual, can't override--processes an inputEventMsg to see if we can handle it via a key binding (if so, InterpretInputEvent won't be called) - hsBool ProcessKeyBindings( plInputEventMsg *keyMsg ); + bool ProcessKeyBindings( plInputEventMsg *keyMsg ); - void SetEnabled( hsBool e ) { fEnabled = e; } - hsBool IsEnabled( void ) const { return fEnabled; } + void SetEnabled( bool e ) { fEnabled = e; } + bool IsEnabled( void ) const { return fEnabled; } // clear all keys from map virtual void ClearKeyMap(); diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp index ee9af82e..6fa46f62 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp @@ -295,7 +295,7 @@ void plInputInterfaceMgr::IUpdateCursor( int32_t newCursor ) //// IEval /////////////////////////////////////////////////////////////////// // Inherited from plSingleModifier, gets called once per IUpdate() loop. -hsBool plInputInterfaceMgr::IEval( double secs, float del, uint32_t dirty ) +bool plInputInterfaceMgr::IEval( double secs, float del, uint32_t dirty ) { const char *inputEval = "Eval"; plProfile_BeginLap(Input, inputEval); @@ -363,7 +363,7 @@ hsBool plInputInterfaceMgr::IEval( double secs, float del, uint32_t dirty ) return true; } -void plInputInterfaceMgr::ForceCursorHidden( hsBool requestedState ) +void plInputInterfaceMgr::ForceCursorHidden( bool requestedState ) { if ( requestedState ) { @@ -394,7 +394,7 @@ void plInputInterfaceMgr::ForceCursorHidden( hsBool requestedState ) } -hsBool plInputInterfaceMgr::ICheckCursor(plInputInterface *iFace) +bool plInputInterfaceMgr::ICheckCursor(plInputInterface *iFace) { if( iFace->IsEnabled() && iFace->HasInterestingCursorID() ) { @@ -412,7 +412,7 @@ hsBool plInputInterfaceMgr::ICheckCursor(plInputInterface *iFace) //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool plInputInterfaceMgr::MsgReceive( plMessage *msg ) +bool plInputInterfaceMgr::MsgReceive( plMessage *msg ) { int i; @@ -429,7 +429,7 @@ hsBool plInputInterfaceMgr::MsgReceive( plMessage *msg ) { const char *inputIEM = "InputEventMsg"; plProfile_BeginLap(Input, inputIEM); - hsBool handled = false; + bool handled = false; uint32_t missedInputStartIdx = 0; plInputInterface *oldCurrentFocus = fCurrentFocus; @@ -479,7 +479,7 @@ hsBool plInputInterfaceMgr::MsgReceive( plMessage *msg ) // because a key down may have changed some layer's interest in the cursor if( !fForceCursorHidden ) { - hsBool cursorHandled = false; + bool cursorHandled = false; if (fCurrentFocus) cursorHandled = ICheckCursor(fCurrentFocus); diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.h b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.h index d6019399..eba0c6a4 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.h +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.h @@ -86,22 +86,22 @@ class plInputInterfaceMgr : public plSingleModifier hsTArray fDisabledKeys; #endif - hsBool fClickEnabled; + bool fClickEnabled; int32_t fCurrentCursor; float fCursorOpacity; - hsBool fForceCursorHidden; + bool fForceCursorHidden; int32_t fForceCursorHiddenCount; plInputInterface *fCurrentFocus; plDefaultKeyCatcher *fDefaultCatcher; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); + virtual bool IEval( double secs, float del, uint32_t dirty ); void IAddInterface( plInputInterface *iface ); void IRemoveInterface( plInputInterface *iface ); void IUpdateCursor( int32_t newCursor ); - hsBool ICheckCursor(plInputInterface *iFace); // returns true if the iface changed cursor settings + bool ICheckCursor(plInputInterface *iFace); // returns true if the iface changed cursor settings void IWriteConsoleCmdKeys( plKeyMap *keyMap, FILE *keyFile ); void IWriteNonConsoleCmdKeys( plKeyMap *keyMap, FILE *keyFile ); @@ -119,7 +119,7 @@ class plInputInterfaceMgr : public plSingleModifier CLASSNAME_REGISTER( plInputInterfaceMgr ); GETINTERFACE_ANY( plInputInterfaceMgr, plSingleModifier ); - virtual hsBool MsgReceive( plMessage *msg ); + virtual bool MsgReceive( plMessage *msg ); virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); @@ -134,9 +134,9 @@ class plInputInterfaceMgr : public plSingleModifier void ReleaseCurrentFocus(plInputInterface *focus); void SetDefaultKeyCatcher( plDefaultKeyCatcher *c ) { fDefaultCatcher = c; } - hsBool IsClickEnabled() { return fClickEnabled; } + bool IsClickEnabled() { return fClickEnabled; } - void ForceCursorHidden( hsBool requestedState ); + void ForceCursorHidden( bool requestedState ); // Binding routers void BindAction( const plKeyCombo &key, ControlEventCode code ); @@ -168,11 +168,11 @@ class plCtrlCmd void SetCmdString(const char* cs) { delete [] fCmd; fCmd=hsStrcpy(cs); } ControlEventCode fControlCode; - hsBool fControlActivated; + bool fControlActivated; hsPoint3 fPt; float fPct; - hsBool fNetPropagateToPlayers; + bool fNetPropagateToPlayers; void Read( hsStream* s, hsResMgr* mgr ); void Write( hsStream* s, hsResMgr* mgr ); diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp index 77ce1ec2..aa0a8d1c 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp @@ -60,7 +60,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnMessage/plCmdIfaceModMsg.h" #include "pnMessage/plPlayerPageMsg.h" -hsBool plInputManager::fUseDInput = false; +bool plInputManager::fUseDInput = false; uint8_t plInputManager::bRecenterMouse = 0; HWND plInputManager::fhWnd = nil; #define NUM_ACTIONS 17 @@ -94,7 +94,7 @@ public: void Update(); void AddDevice(IDirectInputDevice8* device); void ConfigureDevice(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // dinput callback functions static int __stdcall EnumGamepadCallback(const DIDEVICEINSTANCE* device, void* pRef); @@ -154,7 +154,7 @@ plInputManager::~plInputManager() } //static -void plInputManager::SetRecenterMouse(hsBool b) +void plInputManager::SetRecenterMouse(bool b) { if (b) bRecenterMouse++; @@ -188,7 +188,7 @@ void plInputManager::InitDInput(hsWindowInst hInst, hsWindowHndl hWnd) } } -hsBool plInputManager::MsgReceive(plMessage* msg) +bool plInputManager::MsgReceive(plMessage* msg) { for (int i=0; iMsgReceive(msg)) @@ -244,7 +244,7 @@ void plInputManager::SetMouseScale( float s ) // Sometimes the keyboard driver "helps" us translating a key involved in a key // combo. For example pressing shif-numpad8 will actually generate a KEY_UP event, // the same as the up arrow. This function undoes that translation. -plKeyDef plInputManager::UntranslateKey(plKeyDef key, hsBool extended) +plKeyDef plInputManager::UntranslateKey(plKeyDef key, bool extended) { if (!extended) { @@ -267,7 +267,7 @@ void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM if( !fhWnd ) fhWnd = hWnd; - hsBool bExtended; + bool bExtended; switch (message) { @@ -275,7 +275,7 @@ void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM case KEYDOWN: { bExtended = Lparam >> 24 & 1; - hsBool bRepeat = ((Lparam >> 29) & 0xf) != 0; + bool bRepeat = ((Lparam >> 29) & 0xf) != 0; for (int i=0; iHandleKeyEvent( KEYDOWN, UntranslateKey((plKeyDef)Wparam, bExtended), true, bRepeat ); } @@ -301,7 +301,7 @@ void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM UINT vkey = MapVirtualKey(scan, 1); //MAPVK_VSC_TO_VK bExtended = Lparam >> 24 & 1; - hsBool bRepeat = ((Lparam >> 29) & 0xf) != 0; + bool bRepeat = ((Lparam >> 29) & 0xf) != 0; bool down = !(Lparam >> 31); for (int i=0; ifEvent == plInputEventMsg::kConfigure) diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.h b/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.h index 03df9589..b2da899d 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.h +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.h @@ -60,7 +60,7 @@ class plPipeline; class plInputManager :public hsKeyedObject { private: - static hsBool fUseDInput; + static bool fUseDInput; public: plInputManager(); plInputManager( hsWindowHndl hWnd ); @@ -73,13 +73,13 @@ public: void AddInputDevice(plInputDevice* pDev); void InitDInput(hsWindowInst hInst, hsWindowHndl hWnd); - static void UseDInput(hsBool b) { fUseDInput = b; } + static void UseDInput(bool b) { fUseDInput = b; } void Update(); static plInputManager* GetInstance() { return fInstance; } static plInputManager* fInstance; - virtual hsBool MsgReceive(plMessage* msg); - static hsBool RecenterMouse() { return bRecenterMouse > 0; } - static void SetRecenterMouse(hsBool b); + virtual bool MsgReceive(plMessage* msg); + static bool RecenterMouse() { return bRecenterMouse > 0; } + static void SetRecenterMouse(bool b); static void RecenterCursor(); void CreateInterfaceMod(plPipeline* p); @@ -88,7 +88,7 @@ public: float GetMouseScale( void ) const { return fMouseScale; } void SetMouseScale( float s ); - static plKeyDef UntranslateKey(plKeyDef key, hsBool extended); + static plKeyDef UntranslateKey(plKeyDef key, bool extended); protected: diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp index 4e254b7d..798e6c62 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp @@ -100,7 +100,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com plSceneInputInterface *plSceneInputInterface::fInstance = nil; -hsBool plSceneInputInterface::fShowLOS = false; +bool plSceneInputInterface::fShowLOS = false; //// Constructor/Destructor ////////////////////////////////////////////////// @@ -177,7 +177,7 @@ void plSceneInputInterface::ClearClickableMap() //// IHalfFadeAvatar ///////////////////////////////////////////////////////// -void plSceneInputInterface::IHalfFadeAvatar(hsBool out) +void plSceneInputInterface::IHalfFadeAvatar(bool out) { plIfaceFadeAvatarMsg* pMsg = new plIfaceFadeAvatarMsg(); pMsg->SetSubjectKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey()); @@ -204,7 +204,7 @@ void plSceneInputInterface::ResetClickableState() } //// IEval /////////////////////////////////////////////////////////////////// -hsBool plSceneInputInterface::IEval( double secs, float del, uint32_t dirty ) +bool plSceneInputInterface::IEval( double secs, float del, uint32_t dirty ) { // this needs to always go no matter what... // ...unless we have cliclability disabled (as in the case of certain multistage behaviors) @@ -230,7 +230,7 @@ hsBool plSceneInputInterface::IEval( double secs, float del, uint32_t dirty ) plgDispatch::MsgSend( pMsg ); } // then see if we have any - hsBool change = false; + bool change = false; for (i=0; i < fClickableMap.Count(); i++) { if( fClickableMap[i]->val ) @@ -251,14 +251,14 @@ hsBool plSceneInputInterface::IEval( double secs, float del, uint32_t dirty ) //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool plSceneInputInterface::MsgReceive( plMessage *msg ) +bool plSceneInputInterface::MsgReceive( plMessage *msg ) { plLOSHitMsg *pLOSMsg = plLOSHitMsg::ConvertNoRef( msg ); if( pLOSMsg ) { if( pLOSMsg->fRequestID == ID_FIND_CLICKABLE ) { - hsBool clearCursor = false; + bool clearCursor = false; if (!fClickability) return true; if( pLOSMsg->fObj ) @@ -316,7 +316,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg ) return true; // okay, are we a CCR? - hsBool amCCR = plNetClientMgr::GetInstance()->GetCCRLevel(); + bool amCCR = plNetClientMgr::GetInstance()->GetCCRLevel(); // is this person a NPC or CCR? int mbrIdx=plNetClientMgr::GetInstance()->TransportMgr().FindMember(pObj->GetKey()); @@ -506,7 +506,7 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg ) plCursorChangeMsg *fakeReplyMsg = plCursorChangeMsg::ConvertNoRef( msg ); if( fakeReplyMsg != nil ) { - hsBool deniedCurrent = false; + bool deniedCurrent = false; plKey key = fakeReplyMsg->GetSender(); for (int i = 0; i < fClickableMap.Count(); i++) { @@ -975,7 +975,7 @@ void plSceneInputInterface::ISetLastClicked( plKey obj, hsPoint3 hitPoint ) //// InterpretInputEvent ///////////////////////////////////////////////////// -hsBool plSceneInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) +bool plSceneInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) { plControlEventMsg* pControlEvent = plControlEventMsg::ConvertNoRef(pMsg); if (pControlEvent) @@ -1076,7 +1076,7 @@ hsBool plSceneInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) //// ISendOfferNotification //////////////////////////////////////////////////////// -void plSceneInputInterface::IManageIgnoredAvatars(plKey& offeree, hsBool add) +void plSceneInputInterface::IManageIgnoredAvatars(plKey& offeree, bool add) { // tell everyone else to be able to / not to be able to select this avatar plInputIfaceMgrMsg* pMsg = 0; @@ -1091,7 +1091,7 @@ void plSceneInputInterface::IManageIgnoredAvatars(plKey& offeree, hsBool add) pMsg->Send(); } -void plSceneInputInterface::ISendOfferNotification(plKey& offeree, int ID, hsBool net) +void plSceneInputInterface::ISendOfferNotification(plKey& offeree, int ID, bool net) { int offereeID = -1; if (offeree == plNetClientMgr::GetInstance()->GetLocalPlayerKey()) @@ -1138,7 +1138,7 @@ void plSceneInputInterface::ISendOfferNotification(plKey& offeree, int ID, hsBoo } -void plSceneInputInterface::ISendAvatarDisabledNotification(hsBool enabled) +void plSceneInputInterface::ISendAvatarDisabledNotification(bool enabled) { plInputIfaceMgrMsg* pMsg = 0; if (enabled) @@ -1197,7 +1197,7 @@ void plSceneInputInterface::IRequestLOSCheck( float xPos, float yPos, int ID //// IWorldPosMovedSinceLastLOSCheck ///////////////////////////////////////// -hsBool plSceneInputInterface::IWorldPosMovedSinceLastLOSCheck( void ) +bool plSceneInputInterface::IWorldPosMovedSinceLastLOSCheck( void ) { if( fPipe == nil ) return false; diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.h b/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.h index 02a0fd2f..fc2fcfd8 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.h +++ b/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.h @@ -73,11 +73,11 @@ class plSceneInputInterface : public plInputInterface uint32_t fCurrentCursor; uint8_t fButtonState; - hsBool fClickability; + bool fClickability; plKey fCurrentClickable, fLastClicked, fCurrentClickableLogicMod; hsPoint3 fCurrentClickPoint; - hsBool fCurrClickIsAvatar, fLastClickIsAvatar,fFadedLocalAvatar; - hsBool fPendingLink; + bool fCurrClickIsAvatar, fLastClickIsAvatar,fFadedLocalAvatar; + bool fPendingLink; int fBookMode; // are we in offer book mode? plKey fBookKey; // key for the python file modifier for the book we are offering @@ -95,7 +95,7 @@ class plSceneInputInterface : public plInputInterface val = false; } plKey key; - hsBool val; + bool val; }; hsTArray fClickableMap; @@ -106,35 +106,35 @@ class plSceneInputInterface : public plInputInterface hsPoint3 fLastStartPt, fLastEndPt; plPipeline *fPipe; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); + virtual bool IEval( double secs, float del, uint32_t dirty ); void IRequestLOSCheck( float xPos, float yPos, int ID ); void ISetLastClicked( plKey obj, hsPoint3 hitPoint ); - void IHalfFadeAvatar(hsBool out); + void IHalfFadeAvatar(bool out); - hsBool IWorldPosMovedSinceLastLOSCheck( void ); + bool IWorldPosMovedSinceLastLOSCheck( void ); void ClearClickableMap(); - void ISendOfferNotification(plKey& offeree, int ID, hsBool net); - void IManageIgnoredAvatars(plKey& offeree, hsBool add); - void ISendAvatarDisabledNotification(hsBool enabled); + void ISendOfferNotification(plKey& offeree, int ID, bool net); + void IManageIgnoredAvatars(plKey& offeree, bool add); + void ISendAvatarDisabledNotification(bool enabled); void ILinkOffereeToAge(); public: plSceneInputInterface(); virtual ~plSceneInputInterface(); - static hsBool fShowLOS; + static bool fShowLOS; // Always return true, since the cursor should be representing how we control the avatar - virtual hsBool HasInterestingCursorID( void ) const { return ( fCurrentCursor != kNullCursor ) ? true : false; } + virtual bool HasInterestingCursorID( void ) const { return ( fCurrentCursor != kNullCursor ) ? true : false; } virtual uint32_t GetPriorityLevel( void ) const { return kSceneInteractionPriority; } virtual uint32_t GetCurrentCursorID( void ) const {return fCurrentCursor;} uint32_t SetCurrentCursorID(uint32_t id); - virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ); + virtual bool InterpretInputEvent( plInputEventMsg *pMsg ); void RequestAvatarTurnToPointLOS(); - virtual hsBool MsgReceive( plMessage *msg ); + virtual bool MsgReceive( plMessage *msg ); virtual void Init( plInputInterfaceMgr *manager ); virtual void Shutdown( void ); diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plTelescopeInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plTelescopeInputInterface.cpp index ba5c0568..40d83dd6 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plTelescopeInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plTelescopeInputInterface.cpp @@ -97,21 +97,21 @@ void plTelescopeInputInterface::Init( plInputInterfaceMgr *manager ) //// IEval /////////////////////////////////////////////////////////////////// -hsBool plTelescopeInputInterface::IEval( double secs, float del, uint32_t dirty ) +bool plTelescopeInputInterface::IEval( double secs, float del, uint32_t dirty ) { return true; } //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool plTelescopeInputInterface::MsgReceive( plMessage *msg ) +bool plTelescopeInputInterface::MsgReceive( plMessage *msg ) { return false; } //// InterpretInputEvent ///////////////////////////////////////////////////// -hsBool plTelescopeInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) +bool plTelescopeInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) { return false; } diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plTelescopeInputInterface.h b/Sources/Plasma/PubUtilLib/plInputCore/plTelescopeInputInterface.h index 3bbed4ea..475f8a6c 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plTelescopeInputInterface.h +++ b/Sources/Plasma/PubUtilLib/plInputCore/plTelescopeInputInterface.h @@ -57,7 +57,7 @@ class plTelescopeInputInterface : public plInputInterface { protected: - virtual hsBool IEval( double secs, float del, uint32_t dirty ); + virtual bool IEval( double secs, float del, uint32_t dirty ); public: @@ -66,9 +66,9 @@ class plTelescopeInputInterface : public plInputInterface virtual void RestoreDefaultKeyMappings( void ); - virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ); + virtual bool InterpretInputEvent( plInputEventMsg *pMsg ); - virtual hsBool MsgReceive( plMessage *msg ); + virtual bool MsgReceive( plMessage *msg ); virtual void Init( plInputInterfaceMgr *manager ); virtual void Shutdown( void ) {;} @@ -83,7 +83,7 @@ class plTelescopeInputInterface : public plInputInterface virtual float GetCurrentCursorOpacity( void ) const { return 1.f; } // Returns true if this layer is wanting to change the mouse, false if it isn't interested - virtual hsBool HasInterestingCursorID( void ) const { return false; } + virtual bool HasInterestingCursorID( void ) const { return false; } }; diff --git a/Sources/Plasma/PubUtilLib/plInterp/hsInterp.cpp b/Sources/Plasma/PubUtilLib/plInterp/hsInterp.cpp index 72dcc139..374437cd 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/hsInterp.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/hsInterp.cpp @@ -400,7 +400,7 @@ static inline hsKeyFrame* GetKey(int32_t i, void *keys, int32_t size) // for the next search. // void hsInterp::GetBoundaryKeyFrames(float time, uint32_t numKeys, void *keys, uint32_t size, - hsKeyFrame **kF1, hsKeyFrame **kF2, uint32_t *lastKeyIdx, float *p, hsBool forwards) + hsKeyFrame **kF1, hsKeyFrame **kF2, uint32_t *lastKeyIdx, float *p, bool forwards) { hsAssert(numKeys>1, "Must have more than 1 keyframe"); int k1, k2; diff --git a/Sources/Plasma/PubUtilLib/plInterp/hsInterp.h b/Sources/Plasma/PubUtilLib/plInterp/hsInterp.h index 8d80fc0a..fd266f7e 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/hsInterp.h +++ b/Sources/Plasma/PubUtilLib/plInterp/hsInterp.h @@ -87,7 +87,7 @@ public: // Given a time value, find the enclosing keyframes and normalize time (0-1) static void GetBoundaryKeyFrames(float time, uint32_t numKeys, void *keys, - uint32_t keySize, hsKeyFrame **kF1, hsKeyFrame **kF2, uint32_t *lastKeyIdx, float *p, hsBool forwards); + uint32_t keySize, hsKeyFrame **kF1, hsKeyFrame **kF2, uint32_t *lastKeyIdx, float *p, bool forwards); }; diff --git a/Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp b/Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp index 6cd08a7c..1c3d71bf 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/hsKeys.cpp @@ -59,7 +59,7 @@ void hsPoint3Key::Write(hsStream *stream) fValue.Write(stream); } -hsBool hsPoint3Key::CompareValue(hsPoint3Key *key) +bool hsPoint3Key::CompareValue(hsPoint3Key *key) { return hsABS(fValue.fX - key->fValue.fX) < .01 && hsABS(fValue.fY - key->fValue.fY) < .01 && @@ -82,7 +82,7 @@ void hsBezPoint3Key::Write(hsStream *stream) fValue.Write(stream); } -hsBool hsBezPoint3Key::CompareValue(hsBezPoint3Key *key) +bool hsBezPoint3Key::CompareValue(hsBezPoint3Key *key) { return hsABS(fValue.fX - key->fValue.fX) < .01 && hsABS(fValue.fY - key->fValue.fY) < .01 && @@ -103,7 +103,7 @@ void hsScalarKey::Write(hsStream *stream) stream->WriteLEScalar(fValue); } -hsBool hsScalarKey::CompareValue(hsScalarKey *key) +bool hsScalarKey::CompareValue(hsScalarKey *key) { return fValue == key->fValue; } @@ -124,7 +124,7 @@ void hsBezScalarKey::Write(hsStream *stream) stream->WriteLEScalar(fValue); } -hsBool hsBezScalarKey::CompareValue(hsBezScalarKey *key) +bool hsBezScalarKey::CompareValue(hsBezScalarKey *key) { return fValue == key->fValue; } @@ -143,7 +143,7 @@ void hsQuatKey::Write(hsStream *stream) fValue.Write(stream); } -hsBool hsQuatKey::CompareValue(hsQuatKey *key) +bool hsQuatKey::CompareValue(hsQuatKey *key) { return fValue == key->fValue; } @@ -165,7 +165,7 @@ void hsCompressedQuatKey32::Write(hsStream *stream) stream->WriteLE32(fData); } -hsBool hsCompressedQuatKey32::CompareValue(hsCompressedQuatKey32 *key) +bool hsCompressedQuatKey32::CompareValue(hsCompressedQuatKey32 *key) { return fData == key->fData; } @@ -308,7 +308,7 @@ void hsCompressedQuatKey64::Write(hsStream *stream) stream->WriteLE32(fData[1]); } -hsBool hsCompressedQuatKey64::CompareValue(hsCompressedQuatKey64 *key) +bool hsCompressedQuatKey64::CompareValue(hsCompressedQuatKey64 *key) { return (fData[0] == key->fData[0]) && (fData[1] == key->fData[1]); } @@ -467,7 +467,7 @@ void hsScaleKey::Write(hsStream *stream) fValue.Write(stream); } -hsBool hsScaleKey::CompareValue(hsScaleKey *key) +bool hsScaleKey::CompareValue(hsScaleKey *key) { return fValue == key->fValue; } @@ -488,7 +488,7 @@ void hsBezScaleKey::Write(hsStream *stream) fValue.Write(stream); } -hsBool hsBezScaleKey::CompareValue(hsBezScaleKey *key) +bool hsBezScaleKey::CompareValue(hsBezScaleKey *key) { return fValue == key->fValue; } @@ -521,7 +521,7 @@ void hsG3DSMaxKeyFrame::Write(hsStream *stream) fParts.Write(stream); } -hsBool hsG3DSMaxKeyFrame::CompareValue(hsG3DSMaxKeyFrame *key) +bool hsG3DSMaxKeyFrame::CompareValue(hsG3DSMaxKeyFrame *key) { return fParts == key->fParts; } @@ -546,7 +546,7 @@ void hsMatrix33Key::Write(hsStream *stream) stream->WriteLEScalar(fValue.fMap[j][i]); } -hsBool hsMatrix33Key::CompareValue(hsMatrix33Key *key) +bool hsMatrix33Key::CompareValue(hsMatrix33Key *key) { return fValue == key->fValue; } @@ -565,7 +565,7 @@ void hsMatrix44Key::Write(hsStream *stream) fValue.Write(stream); } -hsBool hsMatrix44Key::CompareValue(hsMatrix44Key *key) +bool hsMatrix44Key::CompareValue(hsMatrix44Key *key) { return fValue == key->fValue; } diff --git a/Sources/Plasma/PubUtilLib/plInterp/hsKeys.h b/Sources/Plasma/PubUtilLib/plInterp/hsKeys.h index e77c3d7a..dffae925 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/hsKeys.h +++ b/Sources/Plasma/PubUtilLib/plInterp/hsKeys.h @@ -81,7 +81,7 @@ struct hsPoint3Key : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsPoint3Key *key); + bool CompareValue(hsPoint3Key *key); }; struct hsBezPoint3Key : public hsKeyFrame @@ -93,7 +93,7 @@ struct hsBezPoint3Key : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsBezPoint3Key *key); + bool CompareValue(hsBezPoint3Key *key); }; struct hsScalarKey : public hsKeyFrame @@ -103,7 +103,7 @@ struct hsScalarKey : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsScalarKey *key); + bool CompareValue(hsScalarKey *key); }; struct hsBezScalarKey : public hsKeyFrame @@ -115,7 +115,7 @@ struct hsBezScalarKey : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsBezScalarKey *key); + bool CompareValue(hsBezScalarKey *key); }; struct hsQuatKey : public hsKeyFrame @@ -125,7 +125,7 @@ struct hsQuatKey : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsQuatKey *key); + bool CompareValue(hsQuatKey *key); }; struct hsCompressedQuatKey32 : public hsKeyFrame @@ -147,7 +147,7 @@ struct hsCompressedQuatKey32 : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsCompressedQuatKey32 *key); + bool CompareValue(hsCompressedQuatKey32 *key); protected: uint32_t fData; @@ -173,7 +173,7 @@ struct hsCompressedQuatKey64 : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsCompressedQuatKey64 *key); + bool CompareValue(hsCompressedQuatKey64 *key); protected: uint32_t fData[2]; @@ -200,7 +200,7 @@ struct hsScaleKey : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsScaleKey *key); + bool CompareValue(hsScaleKey *key); }; struct hsBezScaleKey : public hsKeyFrame @@ -212,7 +212,7 @@ struct hsBezScaleKey : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsBezScaleKey *key); + bool CompareValue(hsBezScaleKey *key); }; struct hsG3DSMaxKeyFrame : public hsKeyFrame @@ -229,7 +229,7 @@ struct hsG3DSMaxKeyFrame : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsG3DSMaxKeyFrame *key); + bool CompareValue(hsG3DSMaxKeyFrame *key); }; struct hsMatrix33Key : public hsKeyFrame @@ -239,7 +239,7 @@ struct hsMatrix33Key : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsMatrix33Key *key); + bool CompareValue(hsMatrix33Key *key); }; struct hsMatrix44Key : public hsKeyFrame @@ -249,7 +249,7 @@ struct hsMatrix44Key : public hsKeyFrame void Read(hsStream *stream); void Write(hsStream *stream); - hsBool CompareValue(hsMatrix44Key *key); + bool CompareValue(hsMatrix44Key *key); }; #endif diff --git a/Sources/Plasma/PubUtilLib/plInterp/hsTimedValue.h b/Sources/Plasma/PubUtilLib/plInterp/hsTimedValue.h index 53787750..4841b43a 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/hsTimedValue.h +++ b/Sources/Plasma/PubUtilLib/plInterp/hsTimedValue.h @@ -70,7 +70,7 @@ public: void SetDuration(float duration); float GetDuration() const { return fDuration; } - hsBool32 operator==(const hsTimedValue& v); + bool32 operator==(const hsTimedValue& v); hsTimedValue& operator=(const T& v) { SetValue(v); return *this; } hsTimedValue& operator+=(const T& v) { SetValue(v + fValue); return *this; } @@ -176,7 +176,7 @@ void hsTimedValue::SetDuration(float duration) } template -hsBool32 hsTimedValue::operator==(const hsTimedValue& v) +bool32 hsTimedValue::operator==(const hsTimedValue& v) { if ((fFlags == v.fFlags) && (fDuration == v.fDuration) && diff --git a/Sources/Plasma/PubUtilLib/plInterp/plATCEaseCurves.cpp b/Sources/Plasma/PubUtilLib/plInterp/plATCEaseCurves.cpp index b87b8e45..0f26b4da 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/plATCEaseCurves.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/plATCEaseCurves.cpp @@ -55,7 +55,7 @@ plATCEaseCurve *plATCEaseCurve::CreateEaseCurve(uint8_t type, float minLength, f return nil; } -void plATCEaseCurve::RecalcToSpeed(float startSpeed, float goalSpeed, hsBool preserveRate /* = false */) +void plATCEaseCurve::RecalcToSpeed(float startSpeed, float goalSpeed, bool preserveRate /* = false */) { float rate = 1; @@ -233,7 +233,7 @@ plATCEaseCurve *plSplineEaseCurve::Clone() const return curve; } -void plSplineEaseCurve::RecalcToSpeed(float startSpeed, float goalSpeed, hsBool preserveRate /* = false */) +void plSplineEaseCurve::RecalcToSpeed(float startSpeed, float goalSpeed, bool preserveRate /* = false */) { plATCEaseCurve::RecalcToSpeed(startSpeed, goalSpeed, preserveRate); diff --git a/Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp b/Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp index f9a69307..6abb6d30 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/plAnimPath.cpp @@ -230,7 +230,7 @@ void plAnimPath::Write(hsStream* stream, hsResMgr* mgr) stream->WriteLEScalar(fMinDistSq); } -hsBool plAnimPath::OutOfRange(hsPoint3 &worldPt, float range) const +bool plAnimPath::OutOfRange(hsPoint3 &worldPt, float range) const { hsPoint3 pt = fWorldToLocal * worldPt; @@ -603,7 +603,7 @@ void plAnimPath::MakeDrawList(hsTArray& idx, hsTArray& pos) GetPosition(&p1); time += timeInc; - hsBool quit=false; + bool quit=false; while(! quit && time < animLen+timeInc) { if (time > animLen) @@ -651,7 +651,7 @@ void plAnimPath::ComputeArcLenDeltas(int32_t numSamples) fArcLenDeltas[cnt++]=aldi; time += timeInc; - hsBool quit=false; + bool quit=false; while(!quit && time animLen || cnt+1 == numSamples) @@ -677,7 +677,7 @@ void plAnimPath::ComputeArcLenDeltas(int32_t numSamples) // Returns time of point (at least) arcLength units away from point at startTime. // Also sets strtSrchIdx for incremental searching. // -float plAnimPath::GetLookAheadTime(float startTime, float arcLengthIn, hsBool bwd, +float plAnimPath::GetLookAheadTime(float startTime, float arcLengthIn, bool bwd, int32_t* startSrchIdx) { if (arcLengthIn==0) @@ -700,7 +700,7 @@ float plAnimPath::GetLookAheadTime(float startTime, float arcLengthIn, hsBool bw SetCurTime(startTime, kCalcPosOnly); // find nearest (forward) arcLen sample point, use starting srch index provided - hsBool found=false; + bool found=false; int32_t i; for(i=(*startSrchIdx); iSet(fXform.fMap[0][1], fXform.fMap[1][1], fXform.fMap[2][1]); return uOut; } hsVector3* GetAcceleration(hsVector3* aOut) const { *aOut = fAccel; return aOut; } - hsBool OutOfRange(hsPoint3 &pt, float range) const; + bool OutOfRange(hsPoint3 &pt, float range) const; const hsAffineParts* Parts() const { return &fParts; } void InitParts(const hsAffineParts& p) { fParts = p; } @@ -179,7 +179,7 @@ public: // for arclen usage void ComputeArcLenDeltas(int32_t numSamples=256); - float GetLookAheadTime(float startTime, float arcLength, hsBool bwd, int32_t* startSrchIdx); + float GetLookAheadTime(float startTime, float arcLength, bool bwd, int32_t* startSrchIdx); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.cpp b/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.cpp index ccf20b3b..b5ca6f50 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.cpp @@ -262,7 +262,7 @@ void plAnimTimeConvert::ICheckTimeCallbacks(float frameStart, float frameStop) } } -hsBool plAnimTimeConvert::ITimeInFrame(float secs, float start, float stop) +bool plAnimTimeConvert::ITimeInFrame(float secs, float start, float stop) { if (secs == start && secs == stop) return true; @@ -446,7 +446,7 @@ void plAnimTimeConvert::SetOwner(plSynchedObject* o) fOwner = o; } -hsBool plAnimTimeConvert::IIsStoppedAt(const double &wSecs, const uint32_t &flags, +bool plAnimTimeConvert::IIsStoppedAt(const double &wSecs, const uint32_t &flags, const plATCEaseCurve *curve) const { if (flags & kStopped) @@ -455,7 +455,7 @@ hsBool plAnimTimeConvert::IIsStoppedAt(const double &wSecs, const uint32_t &flag return false; } -hsBool plAnimTimeConvert::IsStoppedAt(double wSecs) const +bool plAnimTimeConvert::IsStoppedAt(double wSecs) const { if (wSecs > fLastStateChange) return IIsStoppedAt(wSecs, fFlags, fCurrentEaseCurve); @@ -536,11 +536,11 @@ float plAnimTimeConvert::WorldToAnimTime(double wSecs) // if our speed is < 0, then checking for the kBackwards flag isn't enough // so we base our decision on the direction of the actual change we've computed. - hsBool forewards = delSecs >= 0; + bool forewards = delSecs >= 0; if (fFlags & kLoop) { - hsBool wrapped = false; + bool wrapped = false; if (forewards) { @@ -654,11 +654,11 @@ float plAnimTimeConvert::IWorldToAnimTimeNoUpdate(double wSecs, plATCState *stat secs = state->fStartAnimTime + delSecs; // At this point, "secs" is the pre-wrapped (before looping) anim time. // "delSecs" is the change in anim time - hsBool forewards = delSecs >= 0; + bool forewards = delSecs >= 0; if (state->fFlags & kLoop) { - hsBool wrapped = false; + bool wrapped = false; if (forewards) { @@ -725,7 +725,7 @@ float plAnimTimeConvert::IWorldToAnimTimeBeforeState(double wSecs) const return IWorldToAnimTimeNoUpdate(wSecs, IGetState(wSecs)); } -void plAnimTimeConvert::SetCurrentAnimTime(float s, hsBool jump /* = false */) +void plAnimTimeConvert::SetCurrentAnimTime(float s, bool jump /* = false */) { // We're setting the anim value for whenever we last evaluated. fFlags |= kForcedMove; @@ -743,7 +743,7 @@ void plAnimTimeConvert::SetCurrentAnimTime(float s, hsBool jump /* = false */) IProcessStateChange(hsTimer::GetSysSeconds(), fCurrentAnimTime); } -void plAnimTimeConvert::SetEase(hsBool easeIn, uint8_t type, float minLength, float maxLength, float normLength) +void plAnimTimeConvert::SetEase(bool easeIn, uint8_t type, float minLength, float maxLength, float normLength) { if (easeIn) { @@ -960,7 +960,7 @@ plAnimTimeConvert& plAnimTimeConvert::InitStop() return IStop(hsTimer::GetSysSeconds(), fCurrentAnimTime); } -plAnimTimeConvert& plAnimTimeConvert::Stop(hsBool on) +plAnimTimeConvert& plAnimTimeConvert::Stop(bool on) { if( on ) return Stop(); @@ -1058,7 +1058,7 @@ plAnimTimeConvert& plAnimTimeConvert::Start(double startTime) return IProcessStateChange(startTime); } -plAnimTimeConvert& plAnimTimeConvert::Backwards(hsBool on) +plAnimTimeConvert& plAnimTimeConvert::Backwards(bool on) { return on ? Backwards() : Forewards(); } @@ -1109,7 +1109,7 @@ plAnimTimeConvert& plAnimTimeConvert::Forewards() return *this; } -plAnimTimeConvert& plAnimTimeConvert::Loop(hsBool on) +plAnimTimeConvert& plAnimTimeConvert::Loop(bool on) { SetFlag(kLoop, on); @@ -1159,7 +1159,7 @@ void plAnimTimeConvert::RemoveCallback(plEventCallbackMsg* pMsg) } } -hsBool plAnimTimeConvert::HandleCmd(plAnimCmdMsg* modMsg) +bool plAnimTimeConvert::HandleCmd(plAnimCmdMsg* modMsg) { if (fFlags & kNeedsReset) ResetWrap(); @@ -1338,7 +1338,7 @@ void plAnimTimeConvert::ClearCallbacks() fCallbackMsgs.Reset(); } -void plAnimTimeConvert::EnableCallbacks(hsBool val) +void plAnimTimeConvert::EnableCallbacks(bool val) { SetFlag(kNoCallbacks, !val); } diff --git a/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.h b/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.h index 739aa594..57752d2f 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.h +++ b/Sources/Plasma/PubUtilLib/plInterp/plAnimTimeConvert.h @@ -101,18 +101,18 @@ protected: void IClearSpeedEase(); void ICheckTimeCallbacks(float frameStart, float frameStop); - hsBool ITimeInFrame(float secs, float start, float stop); + bool ITimeInFrame(float secs, float start, float stop); void ISendCallback(int i); plAnimTimeConvert& IStop(double time, float animTime); - hsBool IIsStoppedAt(const double &wSecs, const uint32_t &flags, const plATCEaseCurve *curve) const; + bool IIsStoppedAt(const double &wSecs, const uint32_t &flags, const plATCEaseCurve *curve) const; plAnimTimeConvert& IProcessStateChange(double worldTime, float animTime = -1); void IFlushOldStates(); void IClearAllStates(); plATCState *IGetState(double wSecs) const; plATCState *IGetLatestState() const; - plAnimTimeConvert& SetFlag(uint8_t f, hsBool on) { if(on)fFlags |= f; else fFlags &= ~f; return *this; } + plAnimTimeConvert& SetFlag(uint8_t f, bool on) { if(on)fFlags |= f; else fFlags &= ~f; return *this; } public: plAnimTimeConvert(); @@ -127,7 +127,7 @@ public: const plSynchedObject* GetOwner() const { return fOwner; } // ALL WorldToAnimTime functions are only valid if called with a time >= fLastEvalWorldTime. - hsBool IsStoppedAt(double wSecs) const; + bool IsStoppedAt(double wSecs) const; float WorldToAnimTime(double wSecs); float WorldToAnimTimeNoUpdate(double wSecs) const; // convert time but don't fire triggers or set state @@ -142,7 +142,7 @@ public: void SetLoopPoints(float begin, float end) { SetLoopBegin(begin); SetLoopEnd(end); } void SetLoopBegin(float s) { fLoopBegin = s; } void SetLoopEnd(float s) { fLoopEnd = s; } - void SetEase(hsBool easeIn, uint8_t inType, float minLength, float maxLength, float inLength); + void SetEase(bool easeIn, uint8_t inType, float minLength, float maxLength, float inLength); void SetCurrentEaseCurve(int x); // 0=nil, 1=easeIn, 2=easeOut, 3=speed float GetBegin() const { return fBegin; } @@ -158,40 +158,40 @@ public: void ResetWrap(); plAnimTimeConvert& ClearFlags() { fFlags = kNone; return *this; } - hsBool GetFlag(uint8_t f) const { return (fFlags & f) ? true : false; } + bool GetFlag(uint8_t f) const { return (fFlags & f) ? true : false; } plAnimTimeConvert& InitStop(); // Called when initializing an anim that doesn't autostart - plAnimTimeConvert& Stop(hsBool on); + plAnimTimeConvert& Stop(bool on); plAnimTimeConvert& Stop(double s = -1.0); plAnimTimeConvert& Start(double s = -1.0); plAnimTimeConvert& PlayToTime(float time); plAnimTimeConvert& PlayToPercentage(float percent); // zero to one. - plAnimTimeConvert& Loop(hsBool on); + plAnimTimeConvert& Loop(bool on); plAnimTimeConvert& Loop() { return Loop(true); } plAnimTimeConvert& NoLoop() { return Loop(false); } - plAnimTimeConvert& Backwards(hsBool on); + plAnimTimeConvert& Backwards(bool on); plAnimTimeConvert& Backwards(); plAnimTimeConvert& Forewards(); - hsBool IsStopped() const { return 0 != (fFlags & kStopped); } - hsBool IsLooped() const { return 0 != (fFlags & kLoop); } - hsBool IsBackwards() const { return 0 != (fFlags & kBackwards); } - hsBool IsForewards() const { return !(fFlags & kBackwards); } + bool IsStopped() const { return 0 != (fFlags & kStopped); } + bool IsLooped() const { return 0 != (fFlags & kLoop); } + bool IsBackwards() const { return 0 != (fFlags & kBackwards); } + bool IsForewards() const { return !(fFlags & kBackwards); } double LastEvalWorldTime() const { return fLastEvalWorldTime; } float CurrentAnimTime() const { return fCurrentAnimTime; } - void SetCurrentAnimTime(float s, hsBool jump = false); + void SetCurrentAnimTime(float s, bool jump = false); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - hsBool HandleCmd(plAnimCmdMsg* msg); + bool HandleCmd(plAnimCmdMsg* msg); void AddCallback(plEventCallbackMsg* pMsg); void RemoveCallback(plEventCallbackMsg* pMsg); void ClearCallbacks(); - void EnableCallbacks(hsBool val); + void EnableCallbacks(bool val); enum plAnimTimeFlags { kNone = 0x0, @@ -246,7 +246,7 @@ public: virtual void Read(hsStream *s, hsResMgr *mgr); virtual void Write(hsStream *s, hsResMgr *mgr); - virtual void RecalcToSpeed(float startSpeed, float goalSpeed, hsBool preserveRate = false); + virtual void RecalcToSpeed(float startSpeed, float goalSpeed, bool preserveRate = false); virtual void SetLengthOnRate(float rate); virtual void SetLengthOnDistance(float dist) = 0; virtual float PositionGivenTime(float time) const = 0; @@ -288,7 +288,7 @@ public: virtual void Write(hsStream *s, hsResMgr *mgr); virtual plATCEaseCurve *Clone() const; - virtual void RecalcToSpeed(float startSpeed, float goalSpeed, hsBool preserveRate = false); + virtual void RecalcToSpeed(float startSpeed, float goalSpeed, bool preserveRate = false); virtual void SetLengthOnDistance(float dist); virtual float PositionGivenTime(float time) const; virtual float VelocityGivenTime(float time) const; diff --git a/Sources/Plasma/PubUtilLib/plInterp/plController.cpp b/Sources/Plasma/PubUtilLib/plInterp/plController.cpp index 94aa1ca6..3a29b82c 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/plController.cpp +++ b/Sources/Plasma/PubUtilLib/plInterp/plController.cpp @@ -83,7 +83,7 @@ void plLeafController::Interp(float time, float* result, plControllerCacheInfo * { hsAssert(fType == hsKeyFrame::kScalarKeyFrame || fType == hsKeyFrame::kBezScalarKeyFrame, kInvalidInterpString); - hsBool tryForward = (cache? cache->fAtc->IsForewards() : true); + bool tryForward = (cache? cache->fAtc->IsForewards() : true); if (fType == hsKeyFrame::kScalarKeyFrame) { hsScalarKey *k1, *k2; @@ -106,7 +106,7 @@ void plLeafController::Interp(float time, hsScalarTriple* result, plControllerCa { hsAssert(fType == hsKeyFrame::kPoint3KeyFrame || fType == hsKeyFrame::kBezPoint3KeyFrame, kInvalidInterpString); - hsBool tryForward = (cache? cache->fAtc->IsForewards() : true); + bool tryForward = (cache? cache->fAtc->IsForewards() : true); if (fType == hsKeyFrame::kPoint3KeyFrame) { hsPoint3Key *k1, *k2; @@ -129,7 +129,7 @@ void plLeafController::Interp(float time, hsScaleValue* result, plControllerCach { hsAssert(fType == hsKeyFrame::kScaleKeyFrame || fType == hsKeyFrame::kBezScaleKeyFrame, kInvalidInterpString); - hsBool tryForward = (cache? cache->fAtc->IsForewards() : true); + bool tryForward = (cache? cache->fAtc->IsForewards() : true); if (fType == hsKeyFrame::kScaleKeyFrame) { hsScaleKey *k1, *k2; @@ -154,7 +154,7 @@ void plLeafController::Interp(float time, hsQuat* result, plControllerCacheInfo fType == hsKeyFrame::kCompressedQuatKeyFrame32 || fType == hsKeyFrame::kCompressedQuatKeyFrame64, kInvalidInterpString); - hsBool tryForward = (cache? cache->fAtc->IsForewards() : true); + bool tryForward = (cache? cache->fAtc->IsForewards() : true); if (fType == hsKeyFrame::kQuatKeyFrame) { hsQuatKey *k1, *k2; @@ -193,7 +193,7 @@ void plLeafController::Interp(float time, hsMatrix33* result, plControllerCacheI { hsAssert(fType == hsKeyFrame::kMatrix33KeyFrame, kInvalidInterpString); - hsBool tryForward = (cache? cache->fAtc->IsForewards() : true); + bool tryForward = (cache? cache->fAtc->IsForewards() : true); hsMatrix33Key *k1, *k2; float t; uint32_t *idxStore = (cache ? &cache->fKeyIndex : &fLastKeyIdx); @@ -205,7 +205,7 @@ void plLeafController::Interp(float time, hsMatrix44* result, plControllerCacheI { hsAssert(fType == hsKeyFrame::kMatrix44KeyFrame, kInvalidInterpString); - hsBool tryForward = (cache? cache->fAtc->IsForewards() : true); + bool tryForward = (cache? cache->fAtc->IsForewards() : true); hsMatrix44Key *k1, *k2; float t; uint32_t *idxStore = (cache ? &cache->fKeyIndex : &fLastKeyIdx); @@ -482,7 +482,7 @@ void plLeafController::QuickScalarController(int numKeys, float* times, float* v // If all the keys are the same, this controller is pretty useless. // This situation actually comes up a lot because of the biped killer // trying to convert character studio animations. -hsBool plLeafController::AllKeysMatch() const +bool plLeafController::AllKeysMatch() const { if (fNumKeys <= 1) return true; @@ -597,7 +597,7 @@ hsBool plLeafController::AllKeysMatch() const return true; } -hsBool plLeafController::PurgeRedundantSubcontrollers() +bool plLeafController::PurgeRedundantSubcontrollers() { return AllKeysMatch(); } @@ -831,7 +831,7 @@ void plCompoundController::GetKeyTimes(hsTArray &keyTimes) const fZController->GetKeyTimes(keyTimes); } -hsBool plCompoundController::AllKeysMatch() const +bool plCompoundController::AllKeysMatch() const { return (!fXController || fXController->AllKeysMatch()) && (!fYController || fYController->AllKeysMatch()) && @@ -854,7 +854,7 @@ hsBool plCompoundController::AllKeysMatch() const // At the moment, this doesn't seem likely to save us enough space // to be worth the effort. (This is why this function doesn't // recursively call purge on its subcontrollers.) -hsBool plCompoundController::PurgeRedundantSubcontrollers() +bool plCompoundController::PurgeRedundantSubcontrollers() { if (fXController && fXController->AllKeysMatch()) { diff --git a/Sources/Plasma/PubUtilLib/plInterp/plController.h b/Sources/Plasma/PubUtilLib/plInterp/plController.h index c6aabace..77ab76c0 100644 --- a/Sources/Plasma/PubUtilLib/plInterp/plController.h +++ b/Sources/Plasma/PubUtilLib/plInterp/plController.h @@ -110,12 +110,12 @@ public: virtual plControllerCacheInfo* CreateCache() const { return nil; } // Caller must handle deleting the pointer. virtual float GetLength() const = 0; virtual void GetKeyTimes(hsTArray &keyTimes) const = 0; - virtual hsBool AllKeysMatch() const = 0; + virtual bool AllKeysMatch() const = 0; // Checks each of our subcontrollers (if we have any) and deletes any that // are nothing but matching keys. Returns true if this controller itself // is redundant. - virtual hsBool PurgeRedundantSubcontrollers() = 0; + virtual bool PurgeRedundantSubcontrollers() = 0; }; ////////////////////////////////////////////////////////////// @@ -169,8 +169,8 @@ public: void GetKeyTimes(hsTArray &keyTimes) const; void AllocKeys(uint32_t n, uint8_t type); void QuickScalarController(int numKeys, float* times, float* values, uint32_t valueStrides); - hsBool AllKeysMatch() const; - hsBool PurgeRedundantSubcontrollers(); + bool AllKeysMatch() const; + bool PurgeRedundantSubcontrollers(); void Read(hsStream* s, hsResMgr* mgr); void Write(hsStream* s, hsResMgr* mgr); @@ -211,8 +211,8 @@ public: plController *GetController(int32_t i) const; float GetLength() const; void GetKeyTimes(hsTArray &keyTimes) const; - hsBool AllKeysMatch() const; - hsBool PurgeRedundantSubcontrollers(); + bool AllKeysMatch() const; + bool PurgeRedundantSubcontrollers(); void SetXController(plController *c) { delete fXController; fXController = c; } void SetYController(plController *c) { delete fYController; fYController = c; } diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plClosest.cpp b/Sources/Plasma/PubUtilLib/plIntersect/plClosest.cpp index f909dd01..d6dd7a6f 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plClosest.cpp +++ b/Sources/Plasma/PubUtilLib/plIntersect/plClosest.cpp @@ -206,7 +206,7 @@ uint32_t plClosest::PointsOnLines(const hsPoint3& p0, const hsVector3& v0, return retVal;; } -hsBool plClosest::PointOnSphere(const hsPoint3& p0, +bool plClosest::PointOnSphere(const hsPoint3& p0, const hsPoint3& center, float rad, hsPoint3& cp) { @@ -219,7 +219,7 @@ hsBool plClosest::PointOnSphere(const hsPoint3& p0, return dist <= 1.f; } -hsBool plClosest::PointOnBox(const hsPoint3& p0, +bool plClosest::PointOnBox(const hsPoint3& p0, const hsPoint3& corner, const hsVector3& axis0, const hsVector3& axis1, @@ -237,7 +237,7 @@ hsBool plClosest::PointOnBox(const hsPoint3& p0, return !clamps; } -hsBool plClosest::PointOnSphere(const hsPoint3& p0, const hsVector3& v0, +bool plClosest::PointOnSphere(const hsPoint3& p0, const hsVector3& v0, const hsPoint3& center, float rad, hsPoint3& cp, uint32_t clamp) @@ -321,7 +321,7 @@ hsBool plClosest::PointOnSphere(const hsPoint3& p0, const hsVector3& v0, return false; } -hsBool plClosest::PointOnBox(const hsPoint3& p0, const hsVector3& v0, +bool plClosest::PointOnBox(const hsPoint3& p0, const hsVector3& v0, const hsPoint3& corner, const hsVector3& axis0, const hsVector3& axis1, @@ -346,7 +346,7 @@ hsBool plClosest::PointOnBox(const hsPoint3& p0, const hsVector3& v0, return !clampRes; } -hsBool plClosest::PointOnPlane(const hsPoint3& p0, +bool plClosest::PointOnPlane(const hsPoint3& p0, const hsPoint3& pPln, const hsVector3& n, hsPoint3& cp) { @@ -362,7 +362,7 @@ hsBool plClosest::PointOnPlane(const hsPoint3& p0, return nDotp >= 0; } -hsBool plClosest::PointOnPlane(const hsPoint3& p0, const hsVector3& v0, +bool plClosest::PointOnPlane(const hsPoint3& p0, const hsVector3& v0, const hsPoint3& pPln, const hsVector3& n, hsPoint3& cp, uint32_t clamp) @@ -377,7 +377,7 @@ hsBool plClosest::PointOnPlane(const hsPoint3& p0, const hsVector3& v0, Then clamp appropriately, garnish, and serve with wild rice. */ - hsBool retVal = true; + bool retVal = true; float pDotn = n.InnerProduct(pPln - p0); float v0Dotn = n.InnerProduct(v0); if( (v0Dotn < -kRealSmall) || (v0Dotn > kRealSmall) ) @@ -407,7 +407,7 @@ hsBool plClosest::PointOnPlane(const hsPoint3& p0, const hsVector3& v0, return retVal; } -hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, +bool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, const hsVector3& aAxis0, const hsVector3& aAxis1, const hsVector3& aAxis2, @@ -424,7 +424,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, } #if 0 // TRASH THIS -hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, +bool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, const hsVector3* aAxes[3], const hsPoint3& bCorner, const hsVector3* bAxes[3], @@ -436,7 +436,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, hsPoint3 bStartPt[3]; bStartPt[0] = bStartPt[1] = bStartPt[2] = bCorner; - hsBool retVal = true; + bool retVal = true; int i, j; for( i = 0; i < 3; i++ ) { @@ -481,7 +481,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, } #elif 0 // TRASH THIS -hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, +bool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, const hsVector3* aAxes[3], const hsPoint3& bCorner, const hsVector3* bAxes[3], @@ -503,7 +503,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, hsPoint3 aBestPt, bBestPt; float minDistSq = 1.e33f; - hsBool retVal = false; + bool retVal = false; int i; for( i = 0; i < 6; i++ ) @@ -567,7 +567,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, #else // TRASH THIS -hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, +bool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, const hsVector3* aAxes[3], const hsPoint3& bCorner, const hsVector3* bAxes[3], @@ -649,7 +649,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner, hsPoint3 aBestPt, bBestPt; float minDistSq = 1.e33f; - hsBool retVal = false; + bool retVal = false; int i; for( i = 0; i < 36; i++ ) diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plClosest.h b/Sources/Plasma/PubUtilLib/plIntersect/plClosest.h index 66e29b8f..2799a640 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plClosest.h +++ b/Sources/Plasma/PubUtilLib/plIntersect/plClosest.h @@ -78,12 +78,12 @@ enum plClosestClampFlags uint32_t clamp); // Clamp on ends // Return true if p0 is inside or on sphere. - static hsBool PointOnSphere(const hsPoint3& p0, // Point + static bool PointOnSphere(const hsPoint3& p0, // Point const hsPoint3& center, float rad, // Sphere hsPoint3& cp); // Output closest on sphere to p0 // Return true if p0 is inside box. - static hsBool PointOnBox(const hsPoint3& p0, // Point + static bool PointOnBox(const hsPoint3& p0, // Point const hsPoint3& corner, // Box defined by corner point and 3 (presumably but const hsVector3& axis0, // not required) ortho axes. const hsVector3& axis1, @@ -91,13 +91,13 @@ enum plClosestClampFlags hsPoint3& cp); // Return true if line intersects or is inside sphere. - static hsBool PointOnSphere(const hsPoint3& p0, const hsVector3& v0, // Line + static bool PointOnSphere(const hsPoint3& p0, const hsVector3& v0, // Line const hsPoint3& center, float rad, // Sphere hsPoint3& cp, // Output closest on sphere to p0, or entry point if line hits sphere uint32_t clamp); // Return true if line intersects or is inside box. - static hsBool PointOnBox(const hsPoint3& p0, const hsVector3& v0, // Line + static bool PointOnBox(const hsPoint3& p0, const hsVector3& v0, // Line const hsPoint3& corner, // Box defined by corner point and 3 (presumably but const hsVector3& axis0, // not required) ortho axes. const hsVector3& axis1, @@ -106,19 +106,19 @@ enum plClosestClampFlags uint32_t clamp); // Return true if point inside (negative side) of plane - static hsBool PointOnPlane(const hsPoint3& p0, + static bool PointOnPlane(const hsPoint3& p0, const hsPoint3& pPln, const hsVector3& n, hsPoint3& cp); // Return true if line passes through plane. - static hsBool PointOnPlane(const hsPoint3& p0, const hsVector3& v0, + static bool PointOnPlane(const hsPoint3& p0, const hsVector3& v0, const hsPoint3& pPln, const hsVector3& n, hsPoint3& cp, uint32_t clamp); // Two identical functions, just different wrapping. First version repacks // parameters and calls second. - static hsBool PointBetweenBoxes(const hsPoint3& aCorner, + static bool PointBetweenBoxes(const hsPoint3& aCorner, const hsVector3& aAxis0, const hsVector3& aAxis1, const hsVector3& aAxis2, @@ -128,7 +128,7 @@ enum plClosestClampFlags const hsVector3& bAxis2, hsPoint3& cp0, hsPoint3& cp1); - static hsBool PointBetweenBoxes(const hsPoint3& aCorner, + static bool PointBetweenBoxes(const hsPoint3& aCorner, const hsVector3* aAxes[3], const hsPoint3& bCorner, const hsVector3* bAxes[3], diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegion.cpp b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegion.cpp index 55157284..01281121 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegion.cpp +++ b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegion.cpp @@ -84,7 +84,7 @@ void plHardRegion::Write(hsStream* s, hsResMgr* mgr) plRegionBase::Write(s, mgr); } -hsBool plHardRegion::CameraInside() const +bool plHardRegion::CameraInside() const { if( fState & kDirty ) { @@ -97,7 +97,7 @@ hsBool plHardRegion::CameraInside() const return 0 != (fState & kCamInside); } -hsBool plHardRegion::MsgReceive(plMessage* msg) +bool plHardRegion::MsgReceive(plMessage* msg) { plRenderMsg* rend = plRenderMsg::ConvertNoRef(msg); if( rend ) diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegion.h b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegion.h index db5d85fc..5e443296 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegion.h +++ b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegion.h @@ -76,21 +76,21 @@ public: CLASSNAME_REGISTER( plHardRegion ); GETINTERFACE_ANY( plHardRegion, plRegionBase ); - virtual hsBool IsInside(const hsPoint3& pos) const { return IIsInside(pos); } - virtual hsBool CameraInside() const; + virtual bool IsInside(const hsPoint3& pos) const { return IIsInside(pos); } + virtual bool CameraInside() const; virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) = 0; virtual int32_t GetNumProperties() const { return 1; } // This is stupid. - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool IIsInside(const hsPoint3& pos) const = 0; - virtual hsBool ICameraInside() const = 0; + virtual bool IIsInside(const hsPoint3& pos) const = 0; + virtual bool ICameraInside() const = 0; }; #endif // plHardRegion_inc diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionPlanes.cpp b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionPlanes.cpp index c4845380..f5410a2f 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionPlanes.cpp +++ b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionPlanes.cpp @@ -57,7 +57,7 @@ plHardRegionPlanes::~plHardRegionPlanes() { } -hsBool plHardRegionPlanes::IIsInside(const hsPoint3& pos) const +bool plHardRegionPlanes::IIsInside(const hsPoint3& pos) const { int i; for( i = 0; i < fPlanes.GetCount(); i++ ) @@ -68,7 +68,7 @@ hsBool plHardRegionPlanes::IIsInside(const hsPoint3& pos) const return true; } -hsBool plHardRegionPlanes::ICameraInside() const +bool plHardRegionPlanes::ICameraInside() const { return IIsInside(fCamPos); } diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionPlanes.h b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionPlanes.h index 9450417d..84c15bea 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionPlanes.h +++ b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionPlanes.h @@ -79,8 +79,8 @@ public: void GetPlane(int i, hsVector3& n, hsPoint3& p) const { n = fPlanes[i].fNorm; p = fPlanes[i].fPos; } void GetWorldPlane(int i, hsVector3& n, hsPoint3& p) const { n = fPlanes[i].fWorldNorm; p = fPlanes[i].fWorldPos; } - virtual hsBool IIsInside(const hsPoint3& pos) const; - virtual hsBool ICameraInside() const; + virtual bool IIsInside(const hsPoint3& pos) const; + virtual bool ICameraInside() const; }; diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.cpp b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.cpp index 84fd9931..70c8bdae 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.cpp +++ b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.cpp @@ -78,7 +78,7 @@ void plHardRegionComplex::Write(hsStream* s, hsResMgr* mgr) mgr->WriteKey(s, fSubRegions[i]); } -hsBool plHardRegionComplex::MsgReceive(plMessage* msg) +bool plHardRegionComplex::MsgReceive(plMessage* msg) { plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg); if( refMsg ) @@ -116,7 +116,7 @@ plHardRegionUnion::~plHardRegionUnion() { } -hsBool plHardRegionUnion::IIsInside(const hsPoint3& pos) const +bool plHardRegionUnion::IIsInside(const hsPoint3& pos) const { int i; for( i = 0; i < fSubRegions.GetCount(); i++ ) @@ -127,7 +127,7 @@ hsBool plHardRegionUnion::IIsInside(const hsPoint3& pos) const return false; } -hsBool plHardRegionUnion::ICameraInside() const +bool plHardRegionUnion::ICameraInside() const { if( fState & kDirty ) { @@ -155,7 +155,7 @@ plHardRegionIntersect::~plHardRegionIntersect() { } -hsBool plHardRegionIntersect::IIsInside(const hsPoint3& pos) const +bool plHardRegionIntersect::IIsInside(const hsPoint3& pos) const { int i; for( i = 0; i < fSubRegions.GetCount(); i++ ) @@ -166,7 +166,7 @@ hsBool plHardRegionIntersect::IIsInside(const hsPoint3& pos) const return true; } -hsBool plHardRegionIntersect::ICameraInside() const +bool plHardRegionIntersect::ICameraInside() const { if( fState & kDirty ) { @@ -197,13 +197,13 @@ plHardRegionInvert::~plHardRegionInvert() { } -hsBool plHardRegionInvert::IIsInside(const hsPoint3& pos) const +bool plHardRegionInvert::IIsInside(const hsPoint3& pos) const { hsAssert(fSubRegions.GetCount() <= 1, "Too many subRegions on inverter"); return !fSubRegions[0]->IIsInside(pos); } -hsBool plHardRegionInvert::ICameraInside() const +bool plHardRegionInvert::ICameraInside() const { hsAssert(fSubRegions.GetCount() <= 1, "Too many subRegions on inverter"); return !fSubRegions[0]->ICameraInside(); diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.h b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.h index 117944ca..e55579dc 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.h +++ b/Sources/Plasma/PubUtilLib/plIntersect/plHardRegionTypes.h @@ -65,7 +65,7 @@ public: virtual void Write(hsStream* stream, hsResMgr* mgr); // Now Complex specifics - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); uint16_t GetNumSubs() const { return fSubRegions.GetCount(); } const plHardRegion* GetSub(int i) const { return fSubRegions[i]; } @@ -81,8 +81,8 @@ public: CLASSNAME_REGISTER( plHardRegionUnion ); GETINTERFACE_ANY( plHardRegionUnion, plHardRegionComplex ); - virtual hsBool IIsInside(const hsPoint3& pos) const; - virtual hsBool ICameraInside() const; + virtual bool IIsInside(const hsPoint3& pos) const; + virtual bool ICameraInside() const; }; @@ -96,8 +96,8 @@ public: CLASSNAME_REGISTER( plHardRegionIntersect ); GETINTERFACE_ANY( plHardRegionIntersect, plHardRegionComplex ); - virtual hsBool IIsInside(const hsPoint3& pos) const; - virtual hsBool ICameraInside() const; + virtual bool IIsInside(const hsPoint3& pos) const; + virtual bool ICameraInside() const; }; @@ -111,8 +111,8 @@ public: CLASSNAME_REGISTER( plHardRegionInvert ); GETINTERFACE_ANY( plHardRegionInvert, plHardRegionComplex ); - virtual hsBool IIsInside(const hsPoint3& pos) const; - virtual hsBool ICameraInside() const; + virtual bool IIsInside(const hsPoint3& pos) const; + virtual bool ICameraInside() const; }; diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plRegionBase.h b/Sources/Plasma/PubUtilLib/plIntersect/plRegionBase.h index bfde379f..9d2bd568 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plRegionBase.h +++ b/Sources/Plasma/PubUtilLib/plIntersect/plRegionBase.h @@ -56,7 +56,7 @@ public: CLASSNAME_REGISTER( plRegionBase ); GETINTERFACE_ANY( plRegionBase, plObjInterface ); - virtual hsBool IsInside(const hsPoint3& pos) const = 0; + virtual bool IsInside(const hsPoint3& pos) const = 0; }; #endif // plRegionBase_inc diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolume.cpp b/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolume.cpp index f4b88dac..d648aafd 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolume.cpp +++ b/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolume.cpp @@ -109,7 +109,7 @@ void plSoftVolume::UpdateListenerPosition(const hsPoint3& pos) fListenState |= kListenDirty | kListenPosSet; } -void plSoftVolume::SetCheckListener(hsBool on) +void plSoftVolume::SetCheckListener(bool on) { if( on ) { @@ -123,7 +123,7 @@ void plSoftVolume::SetCheckListener(hsBool on) } } -hsBool plSoftVolume::MsgReceive(plMessage* msg) +bool plSoftVolume::MsgReceive(plMessage* msg) { plListenerMsg* list = plListenerMsg::ConvertNoRef(msg); if( list ) diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolume.h b/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolume.h index a4b1e1f5..976f45df 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolume.h +++ b/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolume.h @@ -89,7 +89,7 @@ public: GETINTERFACE_ANY( plSoftVolume, plRegionBase ); virtual float GetStrength(const hsPoint3& pos) const; - virtual hsBool IsInside(const hsPoint3& pos) const { return GetStrength(pos) >= 1.f; } + virtual bool IsInside(const hsPoint3& pos) const { return GetStrength(pos) >= 1.f; } virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) = 0; @@ -97,10 +97,10 @@ public: virtual float GetListenerStrength() const; virtual void UpdateListenerPosition(const hsPoint3& p); - virtual void SetCheckListener(hsBool on=true); - virtual hsBool GetCheckListener() const { return 0 != (fListenState & kListenCheck); } + virtual void SetCheckListener(bool on=true); + virtual bool GetCheckListener() const { return 0 != (fListenState & kListenCheck); } - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.cpp b/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.cpp index 5734fdd4..a05b040a 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.cpp +++ b/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.cpp @@ -142,7 +142,7 @@ void plSoftVolumeComplex::Write(hsStream* s, hsResMgr* mgr) mgr->WriteKey(s, fSubVolumes[i]); } -hsBool plSoftVolumeComplex::MsgReceive(plMessage* msg) +bool plSoftVolumeComplex::MsgReceive(plMessage* msg) { plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg); if( refMsg ) diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.h b/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.h index c5dcd32a..a636a256 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.h +++ b/Sources/Plasma/PubUtilLib/plIntersect/plSoftVolumeTypes.h @@ -99,7 +99,7 @@ public: virtual void UpdateListenerPosition(const hsPoint3& p); // Now Complex specifics - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); uint16_t GetNumSubs() const { return fSubVolumes.GetCount(); } const plSoftVolume* GetSub(int i) const { return fSubVolumes[i]; } diff --git a/Sources/Plasma/PubUtilLib/plIntersect/plVolumeIsect.h b/Sources/Plasma/PubUtilLib/plIntersect/plVolumeIsect.h index 94364616..27333631 100644 --- a/Sources/Plasma/PubUtilLib/plIntersect/plVolumeIsect.h +++ b/Sources/Plasma/PubUtilLib/plIntersect/plVolumeIsect.h @@ -106,7 +106,7 @@ public: class plConeIsect : public plVolumeIsect { protected: - hsBool fCapped; + bool fCapped; float fRadAngle; float fLength; diff --git a/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.cpp b/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.cpp index cceca6f7..93b25178 100644 --- a/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.cpp +++ b/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.cpp @@ -268,9 +268,9 @@ plMipmap* plJPEG::ReadFromFile( const wchar_t *fileName ) //// IWrite /////////////////////////////////////////////////////////////////// // Oh, figure it out yourself. :P -hsBool plJPEG::IWrite( plMipmap *source, hsStream *outStream ) +bool plJPEG::IWrite( plMipmap *source, hsStream *outStream ) { - hsBool result = true, swapped = false; + bool result = true, swapped = false; uint8_t *jpgBuffer = nil; uint32_t jpgBufferSize = 0; @@ -360,22 +360,22 @@ hsBool plJPEG::IWrite( plMipmap *source, hsStream *outStream ) return result; } -hsBool plJPEG::WriteToFile( const char *fileName, plMipmap *sourceData ) +bool plJPEG::WriteToFile( const char *fileName, plMipmap *sourceData ) { wchar_t* wFilename = hsStringToWString(fileName); - hsBool retVal = WriteToFile(wFilename, sourceData); + bool retVal = WriteToFile(wFilename, sourceData); delete [] wFilename; return retVal; } -hsBool plJPEG::WriteToFile( const wchar_t *fileName, plMipmap *sourceData ) +bool plJPEG::WriteToFile( const wchar_t *fileName, plMipmap *sourceData ) { // we use a stream because the IJL can't handle unicode hsRAMStream tempstream; hsUNIXStream out; if (!out.Open(fileName, L"wb")) return false; - hsBool ret = IWrite(sourceData, &tempstream); + bool ret = IWrite(sourceData, &tempstream); if (ret) { // The stream writer for JPEGs prepends a 32-bit size, diff --git a/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.h b/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.h index 7aa4661e..cdf7478c 100644 --- a/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.h +++ b/Sources/Plasma/PubUtilLib/plJPEG/plJPEG.h @@ -67,7 +67,7 @@ class plJPEG // Pick one... plMipmap *IRead( hsStream *inStream ); - hsBool IWrite( plMipmap *source, hsStream *outStream ); + bool IWrite( plMipmap *source, hsStream *outStream ); void ISwapRGBAComponents( uint32_t *data, uint32_t count ); @@ -77,9 +77,9 @@ class plJPEG plMipmap *ReadFromFile( const char *fileName ); plMipmap *ReadFromFile( const wchar_t *fileName ); - hsBool WriteToStream( hsStream *outStream, plMipmap *sourceData ) { return IWrite( sourceData, outStream ); } - hsBool WriteToFile( const char *fileName, plMipmap *sourceData ); - hsBool WriteToFile( const wchar_t *fileName, plMipmap *sourceData ); + bool WriteToStream( hsStream *outStream, plMipmap *sourceData ) { return IWrite( sourceData, outStream ); } + bool WriteToFile( const char *fileName, plMipmap *sourceData ); + bool WriteToFile( const wchar_t *fileName, plMipmap *sourceData ); // Range is 0 (worst) to 100 (best) void SetWriteQuality( uint8_t q ) { fWriteQuality = q; } diff --git a/Sources/Plasma/PubUtilLib/plMath/hsSearchVersion.h b/Sources/Plasma/PubUtilLib/plMath/hsSearchVersion.h index b5e36315..ec608cc0 100644 --- a/Sources/Plasma/PubUtilLib/plMath/hsSearchVersion.h +++ b/Sources/Plasma/PubUtilLib/plMath/hsSearchVersion.h @@ -106,7 +106,7 @@ public: T& operator[]( int32_t index ); - int32_t Find(int where, const T& what, hsBool forceUnique=false); + int32_t Find(int where, const T& what, bool forceUnique=false); uint32_t GetCount() const { return fNextIndex; } }; @@ -149,7 +149,7 @@ template void hsSearchVersion::ICheckBackArray() } } -template int32_t hsSearchVersion::Find(int where, const T&what, hsBool forceUnique) +template int32_t hsSearchVersion::Find(int where, const T&what, bool forceUnique) { hsVersionNode* curr = fArray[where]; diff --git a/Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp b/Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp index cf2e4913..dbc0b25a 100644 --- a/Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp +++ b/Sources/Plasma/PubUtilLib/plMath/plTriUtils.cpp @@ -213,7 +213,7 @@ int plTriUtils::ISelectAxis(const hsVector3& norm) return retVal; } -hsBool plTriUtils::IFastBarycentric(int iAx, const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsPoint3&p, hsPoint3& out) +bool plTriUtils::IFastBarycentric(int iAx, const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsPoint3&p, hsPoint3& out) { if( --iAx < 0 ) iAx = 2; @@ -242,7 +242,7 @@ hsBool plTriUtils::IFastBarycentric(int iAx, const hsPoint3& p0, const hsPoint3& return true; } -hsBool plTriUtils::FastBarycentricProjection(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, hsPoint3&p, hsPoint3& out) +bool plTriUtils::FastBarycentricProjection(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, hsPoint3&p, hsPoint3& out) { hsVector3 v02(&p0, &p2); hsVector3 v12(&p1, &p2); @@ -265,7 +265,7 @@ hsBool plTriUtils::FastBarycentricProjection(const hsPoint3& p0, const hsPoint3& return IFastBarycentric(iAx, p0, p1, p2, p, out); } -hsBool plTriUtils::FastBarycentric(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsPoint3&p, hsPoint3& out) +bool plTriUtils::FastBarycentric(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsPoint3&p, hsPoint3& out) { hsVector3 v02(&p0, &p2); hsVector3 v12(&p1, &p2); @@ -278,7 +278,7 @@ hsBool plTriUtils::FastBarycentric(const hsPoint3& p0, const hsPoint3& p1, const ////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////// -hsBool plTriUtils::ProjectOntoPlane(const hsVector3& norm, float dist, hsPoint3& p) +bool plTriUtils::ProjectOntoPlane(const hsVector3& norm, float dist, hsPoint3& p) { float normMagSq = norm.MagnitudeSquared(); if( normMagSq > kAlmostZero ) @@ -292,7 +292,7 @@ hsBool plTriUtils::ProjectOntoPlane(const hsVector3& norm, float dist, hsPoint3& return false; } -hsBool plTriUtils::ProjectOntoPlane(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, hsPoint3& p) +bool plTriUtils::ProjectOntoPlane(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, hsPoint3& p) { hsVector3 v02(&p0, &p2); hsVector3 v12(&p1, &p2); @@ -304,7 +304,7 @@ hsBool plTriUtils::ProjectOntoPlane(const hsPoint3& p0, const hsPoint3& p1, cons return ProjectOntoPlane(norm, dist, p); } -hsBool plTriUtils::ProjectOntoPlaneAlongVector(const hsVector3& norm, float dist, const hsVector3& vec, hsPoint3& p) +bool plTriUtils::ProjectOntoPlaneAlongVector(const hsVector3& norm, float dist, const hsVector3& vec, hsPoint3& p) { float s = norm.InnerProduct(vec); const float kAlmostZero = 1.e-5f; @@ -319,7 +319,7 @@ hsBool plTriUtils::ProjectOntoPlaneAlongVector(const hsVector3& norm, float dist return false; } -hsBool plTriUtils::ProjectOntoPlaneAlongVector(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsVector3& vec, hsPoint3& p) +bool plTriUtils::ProjectOntoPlaneAlongVector(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsVector3& vec, hsPoint3& p) { hsVector3 v02(&p0, &p2); hsVector3 v12(&p1, &p2); diff --git a/Sources/Plasma/PubUtilLib/plMath/plTriUtils.h b/Sources/Plasma/PubUtilLib/plMath/plTriUtils.h index 704c2bc3..d24447b0 100644 --- a/Sources/Plasma/PubUtilLib/plMath/plTriUtils.h +++ b/Sources/Plasma/PubUtilLib/plMath/plTriUtils.h @@ -67,20 +67,20 @@ protected: Bary IComputeBarycentric(const hsVector3& v12, float invLenSq12, const hsVector3& v0, const hsVector3& v1, hsPoint3& out); int ISelectAxis(const hsVector3& norm); - hsBool IFastBarycentric(int iAx, const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsPoint3&p, hsPoint3& out); + bool IFastBarycentric(int iAx, const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsPoint3&p, hsPoint3& out); public: Bary ComputeBarycentricProjection(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, hsPoint3&p, hsPoint3& out); Bary ComputeBarycentric(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsPoint3&p, hsPoint3& out); - hsBool FastBarycentricProjection(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, hsPoint3&p, hsPoint3& out); - hsBool FastBarycentric(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsPoint3&p, hsPoint3& out); + bool FastBarycentricProjection(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, hsPoint3&p, hsPoint3& out); + bool FastBarycentric(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsPoint3&p, hsPoint3& out); - hsBool ProjectOntoPlane(const hsVector3& norm, float dist, hsPoint3& p); - hsBool ProjectOntoPlane(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, hsPoint3& p); - hsBool ProjectOntoPlaneAlongVector(const hsVector3& norm, float dist, const hsVector3& vec, hsPoint3& p); - hsBool ProjectOntoPlaneAlongVector(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsVector3& vec, hsPoint3& p); + bool ProjectOntoPlane(const hsVector3& norm, float dist, hsPoint3& p); + bool ProjectOntoPlane(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, hsPoint3& p); + bool ProjectOntoPlaneAlongVector(const hsVector3& norm, float dist, const hsVector3& vec, hsPoint3& p); + bool ProjectOntoPlaneAlongVector(const hsPoint3& p0, const hsPoint3& p1, const hsPoint3& p2, const hsVector3& vec, hsPoint3& p); }; diff --git a/Sources/Plasma/PubUtilLib/plMessage/plActivatorMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plActivatorMsg.h index 5e07f84d..d6f2af5d 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plActivatorMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plActivatorMsg.h @@ -79,7 +79,7 @@ public: fHitPoint.Write(stream); } - hsBool TriggerType() { return fTriggerType; } + bool TriggerType() { return fTriggerType; } void SetTriggerType(int n) { fTriggerType = n; } enum diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAgeLoadedMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plAgeLoadedMsg.h index 2e00fcf3..23153817 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAgeLoadedMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plAgeLoadedMsg.h @@ -61,8 +61,8 @@ public: bool fLoaded; // IO - void Read(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgRead(stream, mgr); fLoaded = stream->Readbool(); } - void Write(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgWrite(stream, mgr); stream->Writebool(fLoaded); } + void Read(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgRead(stream, mgr); fLoaded = stream->ReadBool(); } + void Write(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgWrite(stream, mgr); stream->WriteBool(fLoaded); } }; // A msg sent locally when panding pages are done loaded and it's now ok to join the game @@ -94,8 +94,8 @@ public: bool fLoading; // IO - void Read(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgRead(stream, mgr); fLoading = stream->Readbool(); } - void Write(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgWrite(stream, mgr); stream->Writebool(fLoading); } + void Read(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgRead(stream, mgr); fLoading = stream->ReadBool(); } + void Write(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgWrite(stream, mgr); stream->WriteBool(fLoading); } }; // diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.cpp index b3e7dd2b..880be1d0 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.cpp @@ -76,7 +76,7 @@ plString plAnimCmdMsg::GetLoopName() return fLoopName; } -hsBool plAnimCmdMsg::CmdChangesAnimTime() +bool plAnimCmdMsg::CmdChangesAnimTime() { return (Cmd(kContinue) || Cmd(kStop) || diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.h index b1ad1a12..87b12e70 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.h @@ -108,12 +108,12 @@ public: hsBitVector fCmd; - hsBool Cmd(int n) const { return fCmd.IsBitSet(n); } + bool Cmd(int n) const { return fCmd.IsBitSet(n); } void SetCmd(int n) { fCmd.SetBit(n); } void ClearCmd(); void SetAnimName(const plString &name); plString GetAnimName(); - hsBool CmdChangesAnimTime(); // Will this command cause an update to the current anim time? + bool CmdChangesAnimTime(); // Will this command cause an update to the current anim time? // TEMP plString REVISIT // Because I'm TOO LAZY to keep converting all these calls to SetAnimName @@ -167,7 +167,7 @@ public: hsBitVector fCmd; - hsBool Cmd(int n) const { return fCmd.IsBitSet(n); } + bool Cmd(int n) const { return fCmd.IsBitSet(n); } void SetCmd(int n) { fCmd.SetBit(n); } void ClearCmd() { fCmd.Clear(); } void SetAnimName(const plString &name); diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAvCoopMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plAvCoopMsg.cpp index 75e75ad4..8c20a89a 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAvCoopMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plAvCoopMsg.cpp @@ -99,7 +99,7 @@ void plAvCoopMsg::Read(hsStream *stream, hsResMgr *mgr) { plMessage::IMsgRead(stream, mgr); - if(stream->Readbool()) + if(stream->ReadBool()) fCoordinator = reinterpret_cast(mgr->ReadCreatable(stream)); fInitiatorID = stream->ReadLE32(); @@ -114,7 +114,7 @@ void plAvCoopMsg::Write(hsStream *stream, hsResMgr *mgr) { plMessage::IMsgWrite(stream, mgr); - stream->Writebool(fCoordinator != nil); + stream->WriteBool(fCoordinator != nil); if(fCoordinator) mgr->WriteCreatable(stream, fCoordinator); diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAvatarFootMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plAvatarFootMsg.cpp index 8459649c..d92e2548 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAvatarFootMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plAvatarFootMsg.cpp @@ -51,7 +51,7 @@ plAvatarFootMsg::plAvatarFootMsg() { } -plAvatarFootMsg::plAvatarFootMsg(const plKey& s, plArmatureMod *armature, plAvBrain *brain, hsBool isLocal, hsBool isLeft) +plAvatarFootMsg::plAvatarFootMsg(const plKey& s, plArmatureMod *armature, plAvBrain *brain, bool isLocal, bool isLeft) : plArmatureUpdateMsg(s, isLocal, true, armature, brain), fIsLeft(isLeft) { diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAvatarFootMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plAvatarFootMsg.h index b104fd55..80c59022 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAvatarFootMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plAvatarFootMsg.h @@ -53,7 +53,7 @@ class plAvBrain; class plAvatarFootMsg : public plEventCallbackMsg { protected: - hsBool fIsLeft; + bool fIsLeft; plArmatureMod* fArmature; public: plAvatarFootMsg() @@ -61,7 +61,7 @@ public: fEvent = kTime; SetBCastFlag(plMessage::kBCastByExactType); } - plAvatarFootMsg(const plKey& s, plArmatureMod *armature, hsBool isLeft) : plEventCallbackMsg(s, nil, nil), fArmature(armature), fIsLeft(isLeft) + plAvatarFootMsg(const plKey& s, plArmatureMod *armature, bool isLeft) : plEventCallbackMsg(s, nil, nil), fArmature(armature), fIsLeft(isLeft) { fEvent = kTime; SetBCastFlag(plMessage::kBCastByExactType); @@ -79,8 +79,8 @@ public: hsAssert(false, "This message is not supposed to travel over the network or persist in a file."); } - hsBool IsLeft() const { return fIsLeft; } - void SetIsLeft(hsBool on) { fIsLeft = (0 != on); } + bool IsLeft() const { return fIsLeft; } + void SetIsLeft(bool on) { fIsLeft = (0 != on); } plArmatureMod* GetArmature() const { return fArmature; } void SetArmature(plArmatureMod* a) { fArmature = a; } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp index 8585249b..dcf558ac 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp @@ -96,7 +96,7 @@ plArmatureUpdateMsg::plArmatureUpdateMsg() // CTOR sender receiver islocal isplayercontrolled plArmatureUpdateMsg::plArmatureUpdateMsg(const plKey &sender, - hsBool isLocal, hsBool isPlayerControlled, + bool isLocal, bool isPlayerControlled, plArmatureMod *armature) : plAvatarMsg(sender, nil), fIsLocal(isLocal), @@ -120,18 +120,18 @@ void plArmatureUpdateMsg::Write(hsStream *stream, hsResMgr *mgr) } // ISLOCAL -hsBool plArmatureUpdateMsg::IsLocal() const +bool plArmatureUpdateMsg::IsLocal() const { return fIsLocal; } // ISPLAYERCONTROLLED -hsBool plArmatureUpdateMsg::IsPlayerControlled() const +bool plArmatureUpdateMsg::IsPlayerControlled() const { return fIsPlayerControlled; } -hsBool plArmatureUpdateMsg::IsInvis() const +bool plArmatureUpdateMsg::IsInvis() const { return fIsInvis; } @@ -155,13 +155,13 @@ plAvatarSetTypeMsg::plAvatarSetTypeMsg(const plKey &sender, const plKey &receive // READ void plAvatarSetTypeMsg::Read(hsStream *stream, hsResMgr *mgr) { - fIsPlayer = stream->Readbool(); + fIsPlayer = stream->ReadBool(); } // WRITE void plAvatarSetTypeMsg::Write(hsStream *stream, hsResMgr *mgr) { - stream->Writebool(fIsPlayer); + stream->WriteBool(fIsPlayer); } // SETISPLAYER @@ -248,8 +248,8 @@ plAvSeekMsg::plAvSeekMsg() // CTOR(sender, receiver, seekKey, time) plAvSeekMsg::plAvSeekMsg(const plKey& sender, const plKey& receiver, - const plKey &seekKey, float duration, hsBool smartSeek, - plAvAlignment alignType, char *animName, hsBool noSeek, + const plKey &seekKey, float duration, bool smartSeek, + plAvAlignment alignType, char *animName, bool noSeek, uint8_t flags, plKey finishKey) : plAvTaskMsg(sender, receiver), fSeekPoint(seekKey), @@ -265,22 +265,22 @@ plAvSeekMsg::plAvSeekMsg(const plKey& sender, const plKey& receiver, { } -hsBool plAvSeekMsg::Force3rdPersonOnStart() +bool plAvSeekMsg::Force3rdPersonOnStart() { return fFlags & kSeekFlagForce3rdPersonOnStart; } -hsBool plAvSeekMsg::UnForce3rdPersonOnFinish() +bool plAvSeekMsg::UnForce3rdPersonOnFinish() { return fFlags & kSeekFlagUnForce3rdPersonOnFinish; } -hsBool plAvSeekMsg::NoWarpOnTimeout() +bool plAvSeekMsg::NoWarpOnTimeout() { return fFlags & kSeekFlagNoWarpOnTimeout; } -hsBool plAvSeekMsg::RotationOnly() +bool plAvSeekMsg::RotationOnly() { return fFlags & kSeekFlagRotationOnly; } @@ -357,8 +357,8 @@ plAvOneShotMsg::plAvOneShotMsg() // CTOR(sender, receiver, seekKey, time) plAvOneShotMsg::plAvOneShotMsg(const plKey &sender, const plKey& receiver, - const plKey& seekKey, float duration, hsBool smartSeek, - const plString &animName, hsBool drivable, hsBool reversible) + const plKey& seekKey, float duration, bool smartSeek, + const plString &animName, bool drivable, bool reversible) : plAvSeekMsg(sender, receiver, seekKey, duration, smartSeek), fAnimName(animName), fDrivable(drivable), fReversible(reversible), fCallbacks(nil) { @@ -412,7 +412,7 @@ plAvBrainGenericMsg::plAvBrainGenericMsg() // canonical CTOR sender receiver type stage rewind transitionTime plAvBrainGenericMsg::plAvBrainGenericMsg(const plKey& sender, const plKey &receiver, - plAvBrainGenericMsg::Type type, int stage, hsBool rewind, float transitionTime) + plAvBrainGenericMsg::Type type, int stage, bool rewind, float transitionTime) : plAvatarMsg(sender, receiver), fType(type), fWhichStage(stage), @@ -426,8 +426,8 @@ plAvBrainGenericMsg::plAvBrainGenericMsg(const plKey& sender, const plKey &recei } plAvBrainGenericMsg::plAvBrainGenericMsg(const plKey& sender, const plKey &receiver, - Type type, int stage, hsBool setTime, float newTime, - hsBool setDirection, bool isForward, float transitiontime) + Type type, int stage, bool setTime, float newTime, + bool setDirection, bool isForward, float transitiontime) : plAvatarMsg(sender, receiver), fType(type), fWhichStage(stage), diff --git a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h index f3966b9b..fe5017db 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.h @@ -86,18 +86,18 @@ class plArmatureUpdateMsg : public plAvatarMsg public: plArmatureUpdateMsg(); plArmatureUpdateMsg(const plKey &sender, - hsBool isLocal, hsBool isPlayerControlled, + bool isLocal, bool isPlayerControlled, plArmatureMod *armature); /** The avatar that sent this message is the local avatar for this client. */ - hsBool IsLocal() const; - void SetIsLocal(hsBool on) { fIsLocal = on; } + bool IsLocal() const; + void SetIsLocal(bool on) { fIsLocal = on; } /** The avatar that sent this message is controlled by a human being -- although not necessarily a local human being. */ - hsBool IsPlayerControlled() const; - void SetIsPlayerControlled(hsBool on) { fIsPlayerControlled = on; } - hsBool IsInvis() const; - void SetInvis(hsBool val) { fIsInvis = val; } + bool IsPlayerControlled() const; + void SetIsPlayerControlled(bool on) { fIsPlayerControlled = on; } + bool IsInvis() const; + void SetInvis(bool val) { fIsInvis = val; } // plasma protocol CLASSNAME_REGISTER( plArmatureUpdateMsg ); @@ -111,9 +111,9 @@ public: protected: // these will probably change to enums + bitmasks .. don't count on the representation - hsBool fIsLocal; - hsBool fIsPlayerControlled; - hsBool fIsInvis; // Avatar is invis. Don't update visable effects. + bool fIsLocal; + bool fIsPlayerControlled; + bool fIsInvis; // Avatar is invis. Don't update visable effects. }; // use this to turn an npc into a player and vice-versa @@ -188,18 +188,18 @@ public: // tors plAvSeekMsg(); - plAvSeekMsg(const plKey& sender, const plKey& receiver, const plKey &seekKey, float duration, hsBool smartSeek, - plAvAlignment align = kAlignHandle, char *animName = nil, hsBool noSeek = false, + plAvSeekMsg(const plKey& sender, const plKey& receiver, const plKey &seekKey, float duration, bool smartSeek, + plAvAlignment align = kAlignHandle, char *animName = nil, bool noSeek = false, uint8_t flags = kSeekFlagForce3rdPersonOnStart, plKey finishKey = nil); // plasma protocol CLASSNAME_REGISTER( plAvSeekMsg ); GETINTERFACE_ANY( plAvSeekMsg, plAvTaskMsg ); - hsBool Force3rdPersonOnStart(); - hsBool UnForce3rdPersonOnFinish(); - hsBool NoWarpOnTimeout(); - hsBool RotationOnly(); + bool Force3rdPersonOnStart(); + bool UnForce3rdPersonOnFinish(); + bool NoWarpOnTimeout(); + bool RotationOnly(); plKey GetFinishCallbackKey() { return fFinishKey; } virtual void Read(hsStream *stream, hsResMgr *mgr); @@ -210,8 +210,8 @@ public: hsPoint3 fTargetPos; // Or we specify the point/lookat explicitly hsPoint3 fTargetLookAt; float fDuration; // take this much time to do the move (only if smartSeek is false) - hsBool fSmartSeek; // seek by walking rather than floating - hsBool fNoSeek; + bool fSmartSeek; // seek by walking rather than floating + bool fNoSeek; char *fAnimName; plAvAlignment fAlignType; uint8_t fFlags; @@ -221,7 +221,7 @@ public: class plAvTaskSeekDoneMsg : public plAvatarMsg { public: - hsBool fAborted; + bool fAborted; plAvTaskSeekDoneMsg() : plAvatarMsg(), fAborted(false) {} plAvTaskSeekDoneMsg(const plKey &sender, const plKey &receiver) : plAvatarMsg(sender, receiver), fAborted(false) {} @@ -246,8 +246,8 @@ public: plAvOneShotMsg(); virtual ~plAvOneShotMsg(); plAvOneShotMsg(const plKey &sender, const plKey& receiver, - const plKey& seekKey, float duration, hsBool fSmartSeek, - const plString &animName, hsBool drivable, hsBool reversible); + const plKey& seekKey, float duration, bool fSmartSeek, + const plString &animName, bool drivable, bool reversible); // plasma protocol CLASSNAME_REGISTER( plAvOneShotMsg ); @@ -258,8 +258,8 @@ public: // public members plString fAnimName; // the name of the animation we're going to use - hsBool fDrivable; // are we animated by time or by mouse movement? - hsBool fReversible; // can we play backwards? + bool fDrivable; // are we animated by time or by mouse movement? + bool fReversible; // can we play backwards? plOneShotCallbacks *fCallbacks; // Callbacks given to us by a one-shot modifier // we share it, so release with UnRef }; @@ -283,17 +283,17 @@ public: fType; int fWhichStage; // used only by goto stage float fTransitionTime; // for crossfade between stages - hsBool fSetTime; + bool fSetTime; float fNewTime; - hsBool fSetDirection; - hsBool fNewDirection; + bool fSetDirection; + bool fNewDirection; int fNewLoopCount; // tors plAvBrainGenericMsg(); //! Older constructor version, allowing simple rewinding only plAvBrainGenericMsg(const plKey& sender, const plKey &receiver, - Type type, int stage, hsBool rewind, float transitionTime); + Type type, int stage, bool rewind, float transitionTime); /** Canonical constructor, allowing full control over time and direction of new stage. \param sender Message sender @@ -307,8 +307,8 @@ public: \param transitionTime Time in seconds to transition between stages. */ plAvBrainGenericMsg(const plKey& sender, const plKey &receiver, - Type type, int stage, hsBool setTime, float newTime, - hsBool setDirection, bool isForward, float transitiontime); + Type type, int stage, bool setTime, float newTime, + bool setDirection, bool isForward, float transitiontime); /** Constructor for setting the loop count in a particular stage. \param sender The sender of this message. @@ -403,7 +403,7 @@ class plAvatarBehaviorNotifyMsg : public plMessage { public: uint32_t fType; - hsBool state; + bool state; plAvatarBehaviorNotifyMsg() : fType(0),state(false) {} diff --git a/Sources/Plasma/PubUtilLib/plMessage/plBulletMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plBulletMsg.h index ded09309..d967eaf0 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plBulletMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plBulletMsg.h @@ -77,9 +77,9 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - hsBool Shot() const { return fCmd == kShot; } - hsBool Spray() const { return fCmd == kSpray; } - hsBool Stop() const { return fCmd == kStop; } + bool Shot() const { return fCmd == kShot; } + bool Spray() const { return fCmd == kSpray; } + bool Stop() const { return fCmd == kStop; } void FireShot(const hsPoint3& from, const hsVector3& dir, float radius, float range, float psecs=-1.f); void FireShot(const hsPoint3& from, const hsPoint3& at, float radius, float psecs=-1.f); diff --git a/Sources/Plasma/PubUtilLib/plMessage/plCCRMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plCCRMsg.h index 451c6e0d..618f1f21 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plCCRMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plCCRMsg.h @@ -152,7 +152,7 @@ public: class plCCRBanLinkingMsg : public plCCRMessage { public: - hsBool fBan; // ban or un ban + bool fBan; // ban or un ban plCCRBanLinkingMsg() ; ~plCCRBanLinkingMsg() {} @@ -170,7 +170,7 @@ public: class plCCRSilencePlayerMsg : public plCCRMessage { public: - hsBool fSilence; // ban or un ban + bool fSilence; // ban or un ban plCCRSilencePlayerMsg() ; ~plCCRSilencePlayerMsg() {} diff --git a/Sources/Plasma/PubUtilLib/plMessage/plClimbMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plClimbMsg.cpp index 9be33a2b..17980360 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plClimbMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plClimbMsg.cpp @@ -55,7 +55,7 @@ plClimbMsg::plClimbMsg() // nothing } -plClimbMsg::plClimbMsg(const plKey &sender, const plKey &receiver, Command command, Direction direction, hsBool status, plKey target) +plClimbMsg::plClimbMsg(const plKey &sender, const plKey &receiver, Command command, Direction direction, bool status, plKey target) : plMessage(sender, receiver, nil), fCommand(command), fDirection(direction), fStatus(status), diff --git a/Sources/Plasma/PubUtilLib/plMessage/plClimbMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plClimbMsg.h index 923acffe..c9decc76 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plClimbMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plClimbMsg.h @@ -72,7 +72,7 @@ public: // tors plClimbMsg(); - plClimbMsg(const plKey &sender, const plKey &receiver, Command command = kNoCommand, Direction direction = kCenter, hsBool status = false, plKey target = nil); + plClimbMsg(const plKey &sender, const plKey &receiver, Command command = kNoCommand, Direction direction = kCenter, bool status = false, plKey target = nil); // plasma protocol CLASSNAME_REGISTER( plClimbMsg ); @@ -83,7 +83,7 @@ public: Command fCommand; Direction fDirection; - hsBool fStatus; + bool fStatus; plKey fTarget; // used for seeking to mount points private: }; diff --git a/Sources/Plasma/PubUtilLib/plMessage/plCollideMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plCollideMsg.h index 858cf40d..e61c07bd 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plCollideMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plCollideMsg.h @@ -50,7 +50,7 @@ class plCollideMsg : public plMessage protected: public: plKey fOtherKey; - hsBool fEntering; // otherwise it's leaving + bool fEntering; // otherwise it's leaving plCollideMsg() { SetBCastFlag(plMessage::kPropagateToModifiers); } ~plCollideMsg() {} diff --git a/Sources/Plasma/PubUtilLib/plMessage/plDynaDecalEnableMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plDynaDecalEnableMsg.cpp index 22e34df7..54985659 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plDynaDecalEnableMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plDynaDecalEnableMsg.cpp @@ -55,7 +55,7 @@ plDynaDecalEnableMsg::plDynaDecalEnableMsg() { } -plDynaDecalEnableMsg::plDynaDecalEnableMsg(const plKey& r, const plKey& a, double t, float w, hsBool end, uint32_t id, hsBool isArm) +plDynaDecalEnableMsg::plDynaDecalEnableMsg(const plKey& r, const plKey& a, double t, float w, bool end, uint32_t id, bool isArm) : plMessage(nil, r, nil), fKey(a), fFlags(0), diff --git a/Sources/Plasma/PubUtilLib/plMessage/plDynaDecalEnableMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plDynaDecalEnableMsg.h index 5ca73168..702e8098 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plDynaDecalEnableMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plDynaDecalEnableMsg.h @@ -63,7 +63,7 @@ protected: uint32_t fID; public: plDynaDecalEnableMsg(); - plDynaDecalEnableMsg(const plKey& r, const plKey& armOrShapeKey, double conTime, float wetLength, hsBool end, uint32_t id=uint32_t(-1), hsBool isArm=true); + plDynaDecalEnableMsg(const plKey& r, const plKey& armOrShapeKey, double conTime, float wetLength, bool end, uint32_t id=uint32_t(-1), bool isArm=true); ~plDynaDecalEnableMsg(); CLASSNAME_REGISTER( plDynaDecalEnableMsg ); @@ -76,8 +76,8 @@ public: const plKey& GetArmKey() const { return fKey; } void SetArmKey(const plKey& k) { fKey = k; SetArmature(true); } - hsBool IsArmature() const { return 0 != (fFlags & kArmature); } - void SetArmature(hsBool b) { if(b)fFlags |= kArmature; else fFlags &= ~kArmature; } + bool IsArmature() const { return 0 != (fFlags & kArmature); } + void SetArmature(bool b) { if(b)fFlags |= kArmature; else fFlags &= ~kArmature; } const plKey& GetShapeKey() const { return fKey; } void SetShapeKey(const plKey& k) { fKey = k; SetArmature(false); } @@ -88,8 +88,8 @@ public: float GetWetLength() const { return fWetLength; } void SetWetLength(float w) { fWetLength = w; } - hsBool AtEnd() const { return 0 != (fFlags & kAtEnd); } - void SetAtEnd(hsBool b) { if(b)fFlags |= kAtEnd; else fFlags &= ~kAtEnd; } + bool AtEnd() const { return 0 != (fFlags & kAtEnd); } + void SetAtEnd(bool b) { if(b)fFlags |= kAtEnd; else fFlags &= ~kAtEnd; } uint32_t GetID() const { return fID; } void SetID(uint32_t n) { fID = n; } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp index a2112896..d11bdf9a 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp @@ -51,7 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsResMgr.h" #include "hsBitVector.h" -void plDynamicTextMsg::SetTextColor( hsColorRGBA &c, hsBool blockRGB ) +void plDynamicTextMsg::SetTextColor( hsColorRGBA &c, bool blockRGB ) { hsAssert( ( fCmd & kColorCmds ) == 0, "Attempting to issue conflicting drawText commands" ); fCmd &= ~kColorCmds; @@ -60,7 +60,7 @@ void plDynamicTextMsg::SetTextColor( hsColorRGBA &c, hsBool blockRGB ) fBlockRGB = blockRGB; } -void plDynamicTextMsg::SetFont( const char *face, int16_t size, hsBool isBold ) +void plDynamicTextMsg::SetFont( const char *face, int16_t size, bool isBold ) { hsAssert( ( fCmd & ( kPosCmds | kStringCmds | kFlagCmds ) ) == 0, "Attempting to issue conflicting drawText commands" ); fCmd &= ~( kPosCmds | kStringCmds | kFlagCmds ); @@ -178,7 +178,7 @@ void plDynamicTextMsg::DrawWrappedString( int16_t x, int16_t y, uint16_t wrap fBottom = wrapHeight; } -void plDynamicTextMsg::DrawImage( int16_t x, int16_t y, plKey &image, hsBool respectAlpha ) +void plDynamicTextMsg::DrawImage( int16_t x, int16_t y, plKey &image, bool respectAlpha ) { hsAssert( ( fCmd & ( kPosCmds | kFlagCmds ) ) == 0, "Attempting to issue conflicting drawText commands" ); fCmd &= ~( kPosCmds | kFlagCmds ); @@ -190,7 +190,7 @@ void plDynamicTextMsg::DrawImage( int16_t x, int16_t y, plKey &image, hsBool fFlags = (uint32_t)respectAlpha; } -void plDynamicTextMsg::DrawClippedImage( int16_t x, int16_t y, plKey &image, uint16_t clipX, uint16_t clipY, uint16_t clipWidth, uint16_t clipHeight, hsBool respectAlpha ) +void plDynamicTextMsg::DrawClippedImage( int16_t x, int16_t y, plKey &image, uint16_t clipX, uint16_t clipY, uint16_t clipWidth, uint16_t clipHeight, bool respectAlpha ) { hsAssert( ( fCmd & ( kPosCmds | kFlagCmds | kRectCmds ) ) == 0, "Attempting to issue conflicting drawText commands" ); fCmd &= ~( kPosCmds | kFlagCmds | kRectCmds ); @@ -227,7 +227,7 @@ void plDynamicTextMsg::Read( hsStream *s, hsResMgr *mgr ) s->ReadLE( &fFlags ); - s->ReadLE( &fBlockRGB ); + fBlockRGB = s->ReadBOOL(); s->ReadLE( &fLineSpacing ); } void plDynamicTextMsg::Write( hsStream *s, hsResMgr *mgr ) @@ -258,7 +258,7 @@ void plDynamicTextMsg::Write( hsStream *s, hsResMgr *mgr ) s->WriteLE( fFlags ); - s->WriteLE( fBlockRGB ); + s->WriteBOOL(fBlockRGB); s->WriteLE( fLineSpacing ); } @@ -312,7 +312,7 @@ void plDynamicTextMsg::ReadVersion(hsStream* s, hsResMgr* mgr) if (contentFlags.IsBitSet(kDynTextMsgFlags)) s->ReadLE( &fFlags ); if (contentFlags.IsBitSet(kDynTextMsgBlockRGB)) - s->ReadLE( &fBlockRGB ); + fBlockRGB = s->ReadBOOL(); if (contentFlags.IsBitSet(kDynTextMsgLineSpacing)) s->ReadLE( &fLineSpacing ); } @@ -368,7 +368,7 @@ void plDynamicTextMsg::WriteVersion(hsStream* s, hsResMgr* mgr) s->WriteLE( fFlags ); // kDynTextMsgBlockRGB - s->WriteLE( fBlockRGB ); + s->WriteBOOL( fBlockRGB ); // kDynTextMsgLineSpacing s->WriteLE( fLineSpacing ); diff --git a/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.h index 7b79dff6..21061100 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.h @@ -80,7 +80,7 @@ protected: // Misc flags field uint32_t fFlags; - hsBool fBlockRGB; + bool fBlockRGB; int16_t fLineSpacing; public: @@ -121,8 +121,8 @@ public: void PurgeImage( void ) { fCmd |= kPurgeImage; } // The following are mutually exclusive commands 'cause they share some parameters - void SetTextColor( hsColorRGBA &c, hsBool blockRGB = false ); - void SetFont( const char *face, int16_t size, hsBool isBold = false ); + void SetTextColor( hsColorRGBA &c, bool blockRGB = false ); + void SetFont( const char *face, int16_t size, bool isBold = false ); void SetLineSpacing( int16_t spacing ); void FillRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, hsColorRGBA &c ); void FrameRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, hsColorRGBA &c ); @@ -132,8 +132,8 @@ public: void DrawClippedString( int16_t x, int16_t y, uint16_t clipLeft, uint16_t clipTop, uint16_t clipRight, uint16_t clipBottom, const wchar_t *text ); void DrawWrappedString( int16_t x, int16_t y, uint16_t wrapWidth, uint16_t wrapHeight, const char *text ); void DrawWrappedString( int16_t x, int16_t y, uint16_t wrapWidth, uint16_t wrapHeight, const wchar_t *text ); - void DrawImage( int16_t x, int16_t y, plKey &image, hsBool respectAlpha = false ); - void DrawClippedImage( int16_t x, int16_t y, plKey &image, uint16_t clipX, uint16_t clipY, uint16_t clipWidth, uint16_t clipHeight, hsBool respectAlpha = false ); + void DrawImage( int16_t x, int16_t y, plKey &image, bool respectAlpha = false ); + void DrawClippedImage( int16_t x, int16_t y, plKey &image, uint16_t clipX, uint16_t clipY, uint16_t clipWidth, uint16_t clipHeight, bool respectAlpha = false ); void SetJustify( uint8_t justifyFlags ); // IO void Read(hsStream* stream, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plMessage/plEnvEffectMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plEnvEffectMsg.h index f9d7f5de..75f18b19 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plEnvEffectMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plEnvEffectMsg.h @@ -52,7 +52,7 @@ class hsResMgr; class plEnvEffectMsg : public plMessage { - hsBool fEnable; + bool fEnable; public: plEnvEffectMsg(){ SetBCastFlag(plMessage::kPropagateToModifiers); } @@ -66,8 +66,8 @@ public: CLASSNAME_REGISTER( plEnvEffectMsg ); GETINTERFACE_ANY( plEnvEffectMsg, plMessage ); - hsBool Enabled() { return fEnable; } - void Enable(hsBool b) { fEnable = b; } + bool Enabled() { return fEnable; } + void Enable(bool b) { fEnable = b; } // IO void Read(hsStream* stream, hsResMgr* mgr) { diff --git a/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.cpp index bfb11c75..1d7e3b57 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.cpp @@ -135,7 +135,7 @@ void plControlEventMsg::Read(hsStream* stream, hsResMgr* mgr) { plInputEventMsg::Read(stream, mgr); stream->ReadLE((int32_t*)&fControlCode); - stream->ReadLE(&fControlActivated); + fControlActivated = stream->ReadBOOL(); stream->ReadLE(&fControlPct); fTurnToPt.Read(stream); @@ -147,7 +147,7 @@ void plControlEventMsg::Write(hsStream* stream, hsResMgr* mgr) { plInputEventMsg::Write(stream, mgr); stream->WriteLE((int32_t)fControlCode); - stream->WriteLE(fControlActivated); + stream->WriteBOOL(fControlActivated); stream->WriteLE(fControlPct); fTurnToPt.Write(stream); @@ -175,7 +175,7 @@ void plControlEventMsg::ReadVersion(hsStream* s, hsResMgr* mgr) s->ReadLE((int32_t*)&fControlCode); if (contentFlags.IsBitSet(kControlEventMsgActivated)) - s->ReadLE(&fControlActivated); + fControlActivated = s->ReadBOOL(); if (contentFlags.IsBitSet(kControlEventMsgPct)) s->ReadLE(&fControlPct); @@ -204,7 +204,7 @@ void plControlEventMsg::WriteVersion(hsStream* s, hsResMgr* mgr) s->WriteLE((int32_t)fControlCode); // kControlEventMsgActivated, - s->WriteLE(fControlActivated); + s->WriteBOOL(fControlActivated); // kControlEventMsgPct, s->WriteLE(fControlPct); @@ -319,7 +319,7 @@ void plAvatarInputStateMsg::WriteVersion(hsStream* s, hsResMgr* mgr) s->WriteLE16(fState); } -hsBool plAvatarInputStateMsg::IsCodeInMap(ControlEventCode code) +bool plAvatarInputStateMsg::IsCodeInMap(ControlEventCode code) { int i; for (i = 0; i < fMapSize; i++) diff --git a/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.h index b60daf04..b10e88d3 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.h @@ -87,9 +87,9 @@ private: protected: ControlEventCode fControlCode; - hsBool fControlActivated; + bool fControlActivated; hsPoint3 fTurnToPt; - float fControlPct; + float fControlPct; public: plControlEventMsg(); @@ -103,12 +103,12 @@ public: void SetCmdString(const char* cs) { delete [] fCmd; fCmd=hsStrcpy(cs); } void SetControlCode(ControlEventCode c) { fControlCode = c; } - void SetControlActivated(hsBool b) { fControlActivated = b; } + void SetControlActivated(bool b) { fControlActivated = b; } void SetTurnToPt(hsPoint3 pt) { fTurnToPt = pt; } void SetControlPct(float p) { fControlPct = p; } ControlEventCode GetControlCode() const { return fControlCode; } - hsBool ControlActivated() { return fControlActivated; } + bool ControlActivated() { return fControlActivated; } hsPoint3 GetTurnToPt() { return fTurnToPt; } float GetPct() { return fControlPct; } char* GetCmdString() { return fCmd; } @@ -127,11 +127,11 @@ class plKeyEventMsg : public plInputEventMsg protected: wchar_t fKeyChar; plKeyDef fKeyCode; - hsBool fKeyDown; - hsBool fCapsLockKeyDown; - hsBool fShiftKeyDown; - hsBool fCtrlKeyDown; - hsBool fRepeat; + bool fKeyDown; + bool fCapsLockKeyDown; + bool fShiftKeyDown; + bool fCtrlKeyDown; + bool fRepeat; public: @@ -147,41 +147,41 @@ public: void SetKeyChar(wchar_t key) { fKeyChar = key; } void SetKeyCode(plKeyDef w) { fKeyCode = w; } - void SetKeyDown(hsBool b) { fKeyDown = b; } - void SetShiftKeyDown(hsBool b) { fShiftKeyDown = b; } - void SetCtrlKeyDown(hsBool b) { fCtrlKeyDown = b; } - void SetCapsLockKeyDown(hsBool b) { fCapsLockKeyDown = b; } - void SetRepeat(hsBool b) { fRepeat = b; } + void SetKeyDown(bool b) { fKeyDown = b; } + void SetShiftKeyDown(bool b) { fShiftKeyDown = b; } + void SetCtrlKeyDown(bool b) { fCtrlKeyDown = b; } + void SetCapsLockKeyDown(bool b) { fCapsLockKeyDown = b; } + void SetRepeat(bool b) { fRepeat = b; } - wchar_t GetKeyChar() { return fKeyChar; } - plKeyDef GetKeyCode() { return fKeyCode; } - hsBool GetKeyDown() { return fKeyDown; } - hsBool GetShiftKeyDown() { return fShiftKeyDown; } - hsBool GetCtrlKeyDown() { return fCtrlKeyDown; } - hsBool GetCapsLockKeyDown() { return fCapsLockKeyDown; } - hsBool GetRepeat() { return fRepeat; } + wchar_t GetKeyChar() const { return fKeyChar; } + plKeyDef GetKeyCode() const { return fKeyCode; } + bool GetKeyDown() const { return fKeyDown; } + bool GetShiftKeyDown() const { return fShiftKeyDown; } + bool GetCtrlKeyDown() const { return fCtrlKeyDown; } + bool GetCapsLockKeyDown() const { return fCapsLockKeyDown; } + bool GetRepeat() const { return fRepeat; } // IO void Read(hsStream* stream, hsResMgr* mgr) { plInputEventMsg::Read(stream, mgr); stream->ReadLE((int32_t*)&fKeyCode); - stream->ReadLE(&fKeyDown); - stream->ReadLE(&fCapsLockKeyDown); - stream->ReadLE(&fShiftKeyDown); - stream->ReadLE(&fCtrlKeyDown); - stream->ReadLE(&fRepeat); + fKeyDown = stream->ReadBOOL(); + fCapsLockKeyDown = stream->ReadBOOL(); + fShiftKeyDown = stream->ReadBOOL(); + fCtrlKeyDown = stream->ReadBOOL(); + fRepeat = stream->ReadBOOL(); } void Write(hsStream* stream, hsResMgr* mgr) { plInputEventMsg::Write(stream, mgr); - stream->WriteLE((int32_t)fKeyCode); - stream->WriteLE(fKeyDown); - stream->WriteLE(fCapsLockKeyDown); - stream->WriteLE(fShiftKeyDown); - stream->WriteLE(fCtrlKeyDown); - stream->WriteLE(fRepeat); + stream->WriteLE32((int32_t)fKeyCode); + stream->WriteBOOL(fKeyDown); + stream->WriteBOOL(fCapsLockKeyDown); + stream->WriteBOOL(fShiftKeyDown); + stream->WriteBOOL(fCtrlKeyDown); + stream->WriteBOOL(fRepeat); } }; @@ -190,10 +190,10 @@ class plDebugKeyEventMsg : public plInputEventMsg { protected: ControlEventCode fKeyCode; - hsBool fKeyDown; - hsBool fCapsLockKeyDown; - hsBool fShiftKeyDown; - hsBool fCtrlKeyDown; + bool fKeyDown; + bool fCapsLockKeyDown; + bool fShiftKeyDown; + bool fCtrlKeyDown; public: @@ -208,16 +208,16 @@ public: GETINTERFACE_ANY( plDebugKeyEventMsg, plInputEventMsg ); void SetKeyCode(ControlEventCode w) { fKeyCode = w; } - void SetKeyDown(hsBool b) { fKeyDown = b; } - void SetShiftKeyDown(hsBool b) { fShiftKeyDown = b; } - void SetCtrlKeyDown(hsBool b) { fCtrlKeyDown = b; } - void SetCapsLockKeyDown(hsBool b) { fCapsLockKeyDown = b; } + void SetKeyDown(bool b) { fKeyDown = b; } + void SetShiftKeyDown(bool b) { fShiftKeyDown = b; } + void SetCtrlKeyDown(bool b) { fCtrlKeyDown = b; } + void SetCapsLockKeyDown(bool b) { fCapsLockKeyDown = b; } - ControlEventCode GetKeyCode() { return fKeyCode; } - hsBool GetKeyDown() { return fKeyDown; } - hsBool GetShiftKeyDown() { return fShiftKeyDown; } - hsBool GetCtrlKeyDown() { return fCtrlKeyDown; } - hsBool GetCapsLockKeyDown() { return fCapsLockKeyDown; } + ControlEventCode GetKeyCode() const { return fKeyCode; } + bool GetKeyDown() const { return fKeyDown; } + bool GetShiftKeyDown() const { return fShiftKeyDown; } + bool GetCtrlKeyDown() const { return fCtrlKeyDown; } + bool GetCapsLockKeyDown() const { return fCapsLockKeyDown; } // IO @@ -225,20 +225,20 @@ public: { plInputEventMsg::Read(stream, mgr); stream->ReadLE((int32_t*)&fKeyCode); - stream->ReadLE(&fKeyDown); - stream->ReadLE(&fCapsLockKeyDown); - stream->ReadLE(&fShiftKeyDown); - stream->ReadLE(&fCtrlKeyDown); + fKeyDown = stream->ReadBOOL(); + fCapsLockKeyDown = stream->ReadBOOL(); + fShiftKeyDown = stream->ReadBOOL(); + fCtrlKeyDown = stream->ReadBOOL(); } void Write(hsStream* stream, hsResMgr* mgr) { plInputEventMsg::Write(stream, mgr); stream->WriteLE((int32_t)fKeyCode); - stream->WriteLE(fKeyDown); - stream->WriteLE(fCapsLockKeyDown); - stream->WriteLE(fShiftKeyDown); - stream->WriteLE(fCtrlKeyDown); + stream->WriteBOOL(fKeyDown); + stream->WriteBOOL(fCapsLockKeyDown); + stream->WriteBOOL(fShiftKeyDown); + stream->WriteBOOL(fCtrlKeyDown); } }; @@ -420,7 +420,7 @@ public: static const ControlEventCode fCodeMap[]; static const uint8_t fMapSize; - static hsBool IsCodeInMap(ControlEventCode code); + static bool IsCodeInMap(ControlEventCode code); }; #endif // plInputEventMsg_inc diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLOSHitMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plLOSHitMsg.h index 4d64b25e..3fac1d5d 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLOSHitMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plLOSHitMsg.h @@ -57,7 +57,7 @@ public: plKey fObj; hsPoint3 fHitPoint; - hsBool fNoHit; + bool fNoHit; uint32_t fRequestID; uint32_t fHitFlags; hsVector3 fNormal; diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.cpp index a224e0f9..098360ae 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.cpp @@ -314,7 +314,7 @@ void plLinkEffectBCMsg::Write(hsStream* stream, hsResMgr* mgr) stream->WriteLE32(fLinkFlags); } -void plLinkEffectBCMsg::SetLinkFlag(uint32_t flag, hsBool on /* = true */) +void plLinkEffectBCMsg::SetLinkFlag(uint32_t flag, bool on /* = true */) { if (on) fLinkFlags |= flag; @@ -322,7 +322,7 @@ void plLinkEffectBCMsg::SetLinkFlag(uint32_t flag, hsBool on /* = true */) fLinkFlags &= ~flag; } -hsBool plLinkEffectBCMsg::HasLinkFlag(uint32_t flag) +bool plLinkEffectBCMsg::HasLinkFlag(uint32_t flag) { return fLinkFlags & flag; } @@ -384,7 +384,7 @@ plPseudoLinkAnimTriggerMsg::plPseudoLinkAnimTriggerMsg() : fForward(false) } -plPseudoLinkAnimTriggerMsg::plPseudoLinkAnimTriggerMsg(hsBool forward, plKey avatarKey) +plPseudoLinkAnimTriggerMsg::plPseudoLinkAnimTriggerMsg(bool forward, plKey avatarKey) { fForward = forward; fAvatarKey = avatarKey; diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.h index c286384d..e5c0128d 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.h @@ -117,7 +117,7 @@ public: class plLinkEffectsTriggerMsg : public plMessage { protected: - hsBool fLeavingAge; + bool fLeavingAge; plKey fLinkKey; plKey fLinkInAnimKey; int fInvisLevel; @@ -131,8 +131,8 @@ public: void SetInvisLevel(int invisLevel) { fInvisLevel=invisLevel; } int GetInvisLevel() { return fInvisLevel; } - void SetLeavingAge(hsBool leaving) { fLeavingAge = leaving; } - hsBool IsLeavingAge() { return fLeavingAge; } + void SetLeavingAge(bool leaving) { fLeavingAge = leaving; } + bool IsLeavingAge() { return fLeavingAge; } void SetLinkKey(plKey &key); const plKey GetLinkKey() const { return fLinkKey; } @@ -157,7 +157,7 @@ protected: plLinkEffectsTriggerMsg *fTrigger; public: - hsBool fLeavingAge; + bool fLeavingAge; plKey fLinkKey; plLinkEffectsTriggerPrepMsg() : fLeavingAge(false), fLinkKey(nil), fTrigger(nil) { } @@ -202,8 +202,8 @@ public: void Read(hsStream* stream, hsResMgr* mgr); void Write(hsStream* stream, hsResMgr* mgr); - void SetLinkFlag(uint32_t flag, hsBool on = true); - hsBool HasLinkFlag(uint32_t flag); + void SetLinkFlag(uint32_t flag, bool on = true); + bool HasLinkFlag(uint32_t flag); plKey fLinkKey; }; @@ -213,7 +213,7 @@ public: class plLinkEffectPrepBCMsg : public plMessage { public: - hsBool fLeavingAge; + bool fLeavingAge; plKey fLinkKey; plLinkEffectPrepBCMsg(); @@ -268,7 +268,7 @@ class plPseudoLinkAnimTriggerMsg : public plMessage public: plPseudoLinkAnimTriggerMsg(); - plPseudoLinkAnimTriggerMsg(hsBool forward, plKey avatarKey); + plPseudoLinkAnimTriggerMsg(bool forward, plKey avatarKey); ~plPseudoLinkAnimTriggerMsg() {} CLASSNAME_REGISTER(plPseudoLinkAnimTriggerMsg); @@ -278,7 +278,7 @@ public: void Write(hsStream* stream, hsResMgr* mgr); plKey fAvatarKey; - hsBool fForward; + bool fForward; }; diff --git a/Sources/Plasma/PubUtilLib/plMessage/plListenerMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plListenerMsg.cpp index eaee7c6f..72d36c96 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plListenerMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plListenerMsg.cpp @@ -66,7 +66,7 @@ void plListenerMsg::Write(hsStream* s, hsResMgr* mgr) } -plSetListenerMsg::plSetListenerMsg( uint8_t type, const plKey &srcKey, hsBool binding ) : plMessage( nil, nil, nil ) +plSetListenerMsg::plSetListenerMsg( uint8_t type, const plKey &srcKey, bool binding ) : plMessage( nil, nil, nil ) { plUoid uoid( kListenerMod_KEY ); plKey pLKey = hsgResMgr::ResMgr()->FindKey( uoid ); @@ -94,7 +94,7 @@ void plSetListenerMsg::Write( hsStream *s, hsResMgr *mgr ) s->WriteBool( fBinding ); } -void plSetListenerMsg::Set( const plKey &key, uint8_t type, hsBool binding ) +void plSetListenerMsg::Set( const plKey &key, uint8_t type, bool binding ) { fSrcKey = key; fType = (uint8_t)type; diff --git a/Sources/Plasma/PubUtilLib/plMessage/plListenerMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plListenerMsg.h index ab1d8b36..e0402958 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plListenerMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plListenerMsg.h @@ -88,7 +88,7 @@ protected: uint8_t fType; plKey fSrcKey; - hsBool fBinding; + bool fBinding; public: @@ -103,7 +103,7 @@ public: }; plSetListenerMsg() : plMessage( nil, nil, nil ) { fType = 0; fBinding = false; } - plSetListenerMsg( uint8_t type, const plKey &srcKey, hsBool binding ); + plSetListenerMsg( uint8_t type, const plKey &srcKey, bool binding ); ~plSetListenerMsg(); CLASSNAME_REGISTER( plSetListenerMsg ); @@ -112,11 +112,11 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - void Set( const plKey &key, uint8_t type, hsBool binding ); + void Set( const plKey &key, uint8_t type, bool binding ); plKey &GetSrcKey( void ) { return fSrcKey; } uint8_t GetType( void ) const { return fType; } - hsBool IsBinding( void ) const { return fBinding; } + bool IsBinding( void ) const { return fBinding; } }; #endif // plListenerMsg_inc diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.cpp index 3d51511b..2ab7722c 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.cpp @@ -70,7 +70,7 @@ void plLoadAgeMsg::Write(hsStream* stream, hsResMgr* mgr) plMessage::IMsgWrite(stream, mgr); // write agename - uint8_t len=fAgeFilename?hsStrlen(fAgeFilename):0; + uint8_t len = fAgeFilename ? strlen(fAgeFilename) : 0; stream->WriteLE(len); if (len) { diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.h index a21bf01b..2e7c062a 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.h @@ -57,7 +57,7 @@ class plLoadAgeMsg : public plMessage protected: char* fAgeFilename; // the age to load/unload plUUID fAgeGuid; - hsBool fUnload; // true if we want to unload the age + bool fUnload; // true if we want to unload the age int fPlayerID; public: plLoadAgeMsg() : fAgeFilename(nil), fUnload(false), fPlayerID(-1){ } @@ -72,8 +72,8 @@ public: void SetAgeGuid( const plUUID * v ) { fAgeGuid.CopyFrom( v ); } const plUUID * GetAgeGuid() const { return &fAgeGuid; } - void SetLoading(hsBool l) { fUnload=!l; } - hsBool GetLoading() const { return !fUnload; } + void SetLoading(bool l) { fUnload=!l; } + bool GetLoading() const { return !fUnload; } void SetPlayerID(int p) { fPlayerID=p; } int GetPlayerID() const { return fPlayerID; } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.cpp index 30a1b5f5..95b58436 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.cpp @@ -66,7 +66,7 @@ plLoadAvatarMsg::plLoadAvatarMsg() // CTOR uoidToClone, requestorKey, userData, isPlayer, spawnPOint, initialTask plLoadAvatarMsg::plLoadAvatarMsg(const plUoid &uoidToClone, const plKey &requestorKey, uint32_t userData, - hsBool isPlayer, const plKey &spawnPoint, plAvTask *initialTask, const char* userStr /*= nil*/) + bool isPlayer, const plKey &spawnPoint, plAvTask *initialTask, const char* userStr /*= nil*/) : plLoadCloneMsg(uoidToClone, requestorKey, userData), fIsPlayer(isPlayer), fSpawnPoint(spawnPoint), @@ -77,7 +77,7 @@ plLoadAvatarMsg::plLoadAvatarMsg(const plUoid &uoidToClone, const plKey &request } plLoadAvatarMsg::plLoadAvatarMsg(const plKey &existing, const plKey &requestor, uint32_t userData, - hsBool isPlayer, hsBool isLoading, const char* userStr /*= nil*/) + bool isPlayer, bool isLoading, const char* userStr /*= nil*/) : plLoadCloneMsg(existing, requestor, userData, isLoading), fIsPlayer(isPlayer), fSpawnPoint(nil), @@ -186,7 +186,7 @@ void plLoadAvatarMsg::SetIsPlayer(bool is) } // GETISPLAYER -hsBool plLoadAvatarMsg::GetIsPlayer() +bool plLoadAvatarMsg::GetIsPlayer() { return fIsPlayer; } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.h index 28fc7ecb..973546af 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.h @@ -83,7 +83,7 @@ public: \param userStr - a string that the user can set */ plLoadAvatarMsg(const plUoid &uoidToClone, const plKey &requestorKey, uint32_t userData, - hsBool isPlayer, const plKey &spawnPoint, plAvTask *initialTask, const char *userStr = nil); + bool isPlayer, const plKey &spawnPoint, plAvTask *initialTask, const char *userStr = nil); /** Use this form if you're sending a message about an existing clone -- either to propagate it to other machines or to tell them to unload it. @@ -97,12 +97,12 @@ public: \param userStr - a string that the user can set */ plLoadAvatarMsg(const plKey &existing, const plKey &requestorKey, uint32_t userData, - hsBool isPlayer, hsBool isLoading, const char *userStr = nil); + bool isPlayer, bool isLoading, const char *userStr = nil); virtual ~plLoadAvatarMsg(); void SetIsPlayer(bool is); - hsBool GetIsPlayer(); + bool GetIsPlayer(); void SetSpawnPoint(const plKey &spawnSceneObjectKey); plKey GetSpawnPoint(); @@ -123,7 +123,7 @@ public: void WriteVersion(hsStream* stream, hsResMgr* mgr); protected: - hsBool fIsPlayer; + bool fIsPlayer; plKey fSpawnPoint; plAvTask *fInitialTask; char *fUserStr; diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLoadCloneMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plLoadCloneMsg.cpp index 97dd29dd..321c0464 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLoadCloneMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plLoadCloneMsg.cpp @@ -99,7 +99,7 @@ plLoadCloneMsg::plLoadCloneMsg(const plUoid &uoidToClone, const plKey &requestor // CTOR existing, requestor, userData, isLoading // this form is for unloading or other operations on existing clones -plLoadCloneMsg::plLoadCloneMsg(const plKey &existing, const plKey &requestor, uint32_t userData, hsBool isLoading) +plLoadCloneMsg::plLoadCloneMsg(const plKey &existing, const plKey &requestor, uint32_t userData, bool isLoading) : fCloneKey(existing), fRequestorKey(requestor), fUserData(userData), @@ -231,7 +231,7 @@ plKey plLoadCloneMsg::GetRequestorKey() } // ISVALIDMESSAGE -hsBool plLoadCloneMsg::IsValidMessage() +bool plLoadCloneMsg::IsValidMessage() { return fValidMsg; } @@ -253,7 +253,7 @@ void plLoadCloneMsg::SetOriginatingPlayerID(uint32_t playerId) fOriginatingPlayerID = playerId; } -hsBool plLoadCloneMsg::GetIsLoading() +bool plLoadCloneMsg::GetIsLoading() { return fIsLoading; } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plLoadCloneMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plLoadCloneMsg.h index 7e35431d..bf40bf41 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plLoadCloneMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plLoadCloneMsg.h @@ -92,7 +92,7 @@ public: \param userData - Whatever you want. Will be propagated to the requestor. \param isLoading - Are we loading or unloading? */ - plLoadCloneMsg(const plKey &existing, const plKey &requestor, uint32_t userData, hsBool isLoading); + plLoadCloneMsg(const plKey &existing, const plKey &requestor, uint32_t userData, bool isLoading); virtual ~plLoadCloneMsg(); @@ -108,11 +108,11 @@ public: plKey GetCloneKey(); plKey GetRequestorKey(); - hsBool IsValidMessage(); + bool IsValidMessage(); uint32_t GetUserData(); uint32_t GetOriginatingPlayerID(); void SetOriginatingPlayerID(uint32_t playerId); - hsBool GetIsLoading(); + bool GetIsLoading(); void SetTriggerMsg(plMessage *msg); plMessage *GetTriggerMsg(); @@ -120,10 +120,10 @@ public: protected: plKey fCloneKey; // the key that will be loaded plKey fRequestorKey; // forward the message to this guy after the clone is created - hsBool fValidMsg; // only gets set if the message built successfully + bool fValidMsg; // only gets set if the message built successfully uint32_t fUserData; // let requestors send some data to their remote versions uint32_t fOriginatingPlayerID; // network / player id of the client initiating the request - hsBool fIsLoading; // true if we're loading; false if we're unloading + bool fIsLoading; // true if we're loading; false if we're unloading plMessage *fTriggerMsg; // Handy place to store a message that caused you to request a clone, // so you can see it and continue processing once your clone is loaded. }; diff --git a/Sources/Plasma/PubUtilLib/plMessage/plMultistageMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plMultistageMsg.h index 97dea462..654e4997 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plMultistageMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plMultistageMsg.h @@ -64,8 +64,8 @@ public: plMultistageModMsg() : fStageNum(0), fNumLoops(1) {} plMultistageModMsg(const plKey &sender, const plKey &receiver) : plMessage(sender,receiver,nil),fStageNum(0),fNumLoops(1) {} - hsBool GetCommand(uint8_t cmd) { return fCmds.IsBitSet(cmd); } - void SetCommand(uint8_t cmd, hsBool val = true) { fCmds.SetBit(cmd, val); } + bool GetCommand(uint8_t cmd) { return fCmds.IsBitSet(cmd); } + void SetCommand(uint8_t cmd, bool val = true) { fCmds.SetBit(cmd, val); } // plasma protocol CLASSNAME_REGISTER( plMultistageModMsg ); diff --git a/Sources/Plasma/PubUtilLib/plMessage/plPickedMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plPickedMsg.h index 346180f4..95c9d639 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plPickedMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plPickedMsg.h @@ -53,7 +53,7 @@ protected: public: - hsBool fPicked; + bool fPicked; hsPoint3 fHitPoint; // where in the world the object was picked on plPickedMsg() : fPicked(true),fHitPoint(0,0,0){SetBCastFlag(plMessage::kPropagateToModifiers);} diff --git a/Sources/Plasma/PubUtilLib/plMessage/plPlayerMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plPlayerMsg.h index 47ee1b2c..79c8c8f0 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plPlayerMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plPlayerMsg.h @@ -79,7 +79,7 @@ public: hsBitVector fCmd; - hsBool Cmd(int n) { return fCmd.IsBitSet(n); } + bool Cmd(int n) { return fCmd.IsBitSet(n); } void SetCmd(int n) { fCmd.SetBit(n); } void ClearCmd() { fCmd.Clear(); } const hsPoint3 GetTargPoint() { return targPoint; } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plRideAnimatedPhysMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plRideAnimatedPhysMsg.cpp index 314ff12e..c9b844c9 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plRideAnimatedPhysMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plRideAnimatedPhysMsg.cpp @@ -59,12 +59,12 @@ plRideAnimatedPhysMsg::plRideAnimatedPhysMsg(const plKey &sender, const plKey &r void plRideAnimatedPhysMsg::Read(hsStream *stream, hsResMgr *mgr) { plMessage::IMsgRead(stream, mgr); - fEntering = stream->Readbool(); + fEntering = stream->ReadBool(); fRegion = mgr->ReadKey(stream); } void plRideAnimatedPhysMsg::Write(hsStream *stream, hsResMgr *mgr) { plMessage::IMsgWrite(stream, mgr); - stream->Writebool(fEntering); + stream->WriteBool(fEntering); mgr->WriteKey(stream, fRegion); } \ No newline at end of file diff --git a/Sources/Plasma/PubUtilLib/plMessage/plSwimMsg.cpp b/Sources/Plasma/PubUtilLib/plMessage/plSwimMsg.cpp index f498e153..d29ef620 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plSwimMsg.cpp +++ b/Sources/Plasma/PubUtilLib/plMessage/plSwimMsg.cpp @@ -83,7 +83,7 @@ void plSwimMsg::Read(hsStream *stream, hsResMgr *mgr) { plMessage::IMsgRead(stream, mgr); - fIsEntering = stream->Readbool(); + fIsEntering = stream->ReadBool(); fSwimRegionKey = mgr->ReadKey(stream); } @@ -93,6 +93,6 @@ void plSwimMsg::Write(hsStream *stream, hsResMgr *mgr) { plMessage::IMsgWrite(stream, mgr); - stream->Writebool(fIsEntering); + stream->WriteBool(fIsEntering); mgr->WriteKey(stream, fSwimRegionKey); } diff --git a/Sources/Plasma/PubUtilLib/plMessage/plTransitionMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plTransitionMsg.h index bf8edb19..420101d8 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plTransitionMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plTransitionMsg.h @@ -51,9 +51,9 @@ class plTransitionMsg : public plMessageWithCallbacks { protected: - uint32_t fEffect; - float fLengthInSecs; - hsBool fHoldUntilNext; + uint32_t fEffect; + float fLengthInSecs; + bool fHoldUntilNext; public: enum { @@ -64,7 +64,7 @@ public: }; plTransitionMsg() : plMessageWithCallbacks(nil, nil, nil), fEffect( 0 ) { SetBCastFlag(kBCastByExactType); } - plTransitionMsg( uint32_t type, float lengthInSecs, hsBool holdUntilNext = false ) : + plTransitionMsg( uint32_t type, float lengthInSecs, bool holdUntilNext = false ) : plMessageWithCallbacks(nil, nil, nil), fEffect( type ), fLengthInSecs( lengthInSecs ), fHoldUntilNext( holdUntilNext ) { SetBCastFlag( kBCastByExactType ); } @@ -73,16 +73,16 @@ public: CLASSNAME_REGISTER( plTransitionMsg ); GETINTERFACE_ANY( plTransitionMsg, plMessageWithCallbacks ); - uint32_t GetEffect( void ) const { return fEffect; } + uint32_t GetEffect( void ) const { return fEffect; } float GetLengthInSecs( void ) const { return fLengthInSecs; } - hsBool GetHoldState( void ) const { return fHoldUntilNext; } + bool GetHoldState( void ) const { return fHoldUntilNext; } virtual void Read(hsStream* s, hsResMgr* mgr) { plMessageWithCallbacks::Read(s, mgr); s->ReadLE(&fEffect); s->ReadLE(&fLengthInSecs); - s->ReadLE(&fHoldUntilNext); + fHoldUntilNext = s->ReadBOOL(); } virtual void Write(hsStream* s, hsResMgr* mgr) @@ -90,7 +90,7 @@ public: plMessageWithCallbacks::Write(s, mgr); s->WriteLE(fEffect); s->WriteLE(fLengthInSecs); - s->WriteLE(fHoldUntilNext); + s->WriteBOOL(fHoldUntilNext); } }; diff --git a/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.cpp index 41d7c554..417d7a4f 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.cpp @@ -93,7 +93,7 @@ void plAnimEventModifier::Write(hsStream* stream, hsResMgr* mgr) mgr->WriteCreatable(stream, fCallback); } -hsBool plAnimEventModifier::MsgReceive(plMessage* msg) +bool plAnimEventModifier::MsgReceive(plMessage* msg) { // Assuming we only have one ref, the anim time convert. When it loads, we // send our callback setup message. diff --git a/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.h index 068fa3e1..e621b875 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plAnimEventModifier.h @@ -54,10 +54,10 @@ protected: hsTArray fReceivers;// Keys to notify when the anim event happens plMessage* fCallback; // The callback setup message we send when the anim loads - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return false; } void ISendNotify(bool triggered); - hsBool fDisabled; + bool fDisabled; public: plAnimEventModifier(); virtual ~plAnimEventModifier(); @@ -68,7 +68,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // Export only void SetReceivers(hsTArray& receivers) { fReceivers = receivers; } diff --git a/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.cpp index c038e86d..d0a570f3 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.cpp @@ -80,7 +80,7 @@ class plAxisInputInterface : public plInputInterface plAxisInputInterface( plAxisAnimModifier *owner ) { fOwner = owner; SetEnabled( true ); } virtual uint32_t GetPriorityLevel( void ) const { return kSceneInteractionPriority + 10; } - virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ) + virtual bool InterpretInputEvent( plInputEventMsg *pMsg ) { plMouseEventMsg* pMMsg = plMouseEventMsg::ConvertNoRef( pMsg ); if (pMMsg ) @@ -100,7 +100,7 @@ class plAxisInputInterface : public plInputInterface } virtual uint32_t GetCurrentCursorID( void ) const { return kCursorGrab; } - virtual hsBool HasInterestingCursorID( void ) const { return true; } + virtual bool HasInterestingCursorID( void ) const { return true; } }; plAxisAnimModifier::plAxisAnimModifier() : @@ -122,7 +122,7 @@ plAxisAnimModifier::~plAxisAnimModifier() } -hsBool plAxisAnimModifier::IEval(double secs, float del, uint32_t dirty) +bool plAxisAnimModifier::IEval(double secs, float del, uint32_t dirty) { if (!fActive) return true; @@ -138,7 +138,7 @@ void plAxisAnimModifier::SetTarget(plSceneObject* so) plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), GetKey()); } -hsBool plAxisAnimModifier::MsgReceive(plMessage* msg) +bool plAxisAnimModifier::MsgReceive(plMessage* msg) { plEventCallbackMsg* pCall = plEventCallbackMsg::ConvertNoRef(msg); if (pCall) diff --git a/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.h index 738583bc..0e5ad23b 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plAxisAnimModifier.h @@ -70,8 +70,8 @@ protected: float fXPos; float fYPos; - hsBool fActive; - hsBool fAllOrNothing; + bool fActive; + bool fAllOrNothing; int fIface; plNotifyMsg* fNotify; @@ -79,7 +79,7 @@ protected: plAxisInputInterface *fInputIface; - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); public: plAxisAnimModifier(); @@ -88,10 +88,10 @@ public: CLASSNAME_REGISTER( plAxisAnimModifier ); GETINTERFACE_ANY( plAxisAnimModifier, plSingleModifier ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void SetTarget(plSceneObject* so); - void SetAllOrNothing(hsBool b) { fAllOrNothing = b; } + void SetAllOrNothing(bool b) { fAllOrNothing = b; } virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.h index c768d38d..d134c2ac 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.h @@ -50,7 +50,7 @@ protected: char* fTemplateName; bool fExportTime; - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return true; } public: plCloneSpawnModifier(); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.cpp b/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.cpp index 9799fba4..36d8c21e 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.cpp @@ -61,7 +61,7 @@ plDecalEnableMod::~plDecalEnableMod() { } -hsBool plDecalEnableMod::MsgReceive(plMessage* msg) +bool plDecalEnableMod::MsgReceive(plMessage* msg) { plCollideMsg* coll = plCollideMsg::ConvertNoRef(msg); if( coll ) diff --git a/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.h b/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.h index 8c1c6527..e4c31aa8 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plDecalEnableMod.h @@ -55,7 +55,7 @@ protected: float fWetLength; - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return false; } public: plDecalEnableMod(); @@ -64,7 +64,7 @@ public: CLASSNAME_REGISTER( plDecalEnableMod ); GETINTERFACE_ANY( plDecalEnableMod, plSingleModifier ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.cpp index c489acda..9de08fbc 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.cpp @@ -136,7 +136,7 @@ void plExcludeRegionModifier::ISetPhysicalState(bool cleared) } } -hsBool plExcludeRegionModifier::MsgReceive(plMessage* msg) +bool plExcludeRegionModifier::MsgReceive(plMessage* msg) { plExcludeRegionMsg *exclMsg = plExcludeRegionMsg::ConvertNoRef(msg); if (exclMsg) diff --git a/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.h index 15b70999..b0ac9e37 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plExcludeRegionModifier.h @@ -62,9 +62,9 @@ protected: std::vector fSafePoints; // Safe positions to move avatars to hsTArray fContainedAvatars; // Avatars inside our volume plExcludeRegionSDLModifier *fSDLModifier; - hsBool fSeek; // use smart seek or teleport? + bool fSeek; // use smart seek or teleport? float fSeekTime; // how long to seek for - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return true; } void ISetPhysicalState(bool cleared); @@ -84,7 +84,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void AddTarget(plSceneObject* so); virtual void RemoveTarget( plSceneObject *so ); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.cpp index 5b2c4c2e..066f1145 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnMessage/plNotifyMsg.h" #include "pnSceneObject/plSceneObject.h" -hsBool plGameMarkerModifier::MsgReceive(plMessage* msg) +bool plGameMarkerModifier::MsgReceive(plMessage* msg) { plCollideMsg *collideMsg = plCollideMsg::ConvertNoRef(msg); if (collideMsg) diff --git a/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.h index 290e55bb..a5e85c82 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plGameMarkerModifier.h @@ -54,7 +54,7 @@ protected: uint16_t fPlaceSndIdx; uint16_t fHitSndIdx; - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return true; } plKey IFindCloneKey(plKey baseKey); @@ -80,7 +80,7 @@ public: void FixupAnimKeys(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.cpp b/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.cpp index 03b1c72c..6b72d6ad 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.cpp @@ -59,7 +59,7 @@ plImageLibMod::~plImageLibMod() { } -hsBool plImageLibMod::MsgReceive(plMessage* msg) +bool plImageLibMod::MsgReceive(plMessage* msg) { plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg ); if( refMsg != nil ) diff --git a/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.h b/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.h index ded2f8fd..0634265d 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plImageLibMod.h @@ -54,7 +54,7 @@ protected: hsTArray fImages; - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return false; } public: plImageLibMod(); @@ -63,7 +63,7 @@ public: CLASSNAME_REGISTER( plImageLibMod ); GETINTERFACE_ANY( plImageLibMod, plSingleModifier ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plInterfaceInfoModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plInterfaceInfoModifier.h index 33fc6ea3..42d31cf3 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plInterfaceInfoModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plInterfaceInfoModifier.h @@ -52,7 +52,7 @@ class plInterfaceInfoModifier : public plSingleModifier protected: hsTArray fKeyList; - virtual hsBool IEval(double secs, float del, uint32_t dirty){ return true; } + virtual bool IEval(double secs, float del, uint32_t dirty){ return true; } public: plInterfaceInfoModifier(); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.cpp index 4fdf5c16..be345179 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.cpp @@ -75,7 +75,7 @@ plLogicModifier::~plLogicModifier() // to be satisfied. Used by the activator condition // to check that any special conditions (like players // in boxes) are okay or not. -hsBool plLogicModifier::VerifyConditions(plMessage* msg) +bool plLogicModifier::VerifyConditions(plMessage* msg) { for (int i = 0; i < fConditionList.Count(); i++) { @@ -85,9 +85,9 @@ hsBool plLogicModifier::VerifyConditions(plMessage* msg) return true; } -hsBool plLogicModifier::MsgReceive(plMessage* msg) +bool plLogicModifier::MsgReceive(plMessage* msg) { - hsBool retVal = false; + bool retVal = false; // read messages: plCondRefMsg* pCondMsg = plCondRefMsg::ConvertNoRef(msg); @@ -110,7 +110,7 @@ hsBool plLogicModifier::MsgReceive(plMessage* msg) plTimerCallbackMsg* pTMsg = plTimerCallbackMsg::ConvertNoRef(msg); if (pTMsg) { - hsBool netRequest = msg->HasBCastFlag(plMessage::kNetNonLocal); + bool netRequest = msg->HasBCastFlag(plMessage::kNetNonLocal); Trigger(netRequest); } @@ -125,7 +125,7 @@ hsBool plLogicModifier::MsgReceive(plMessage* msg) } // else { - hsBool ignore=false; + bool ignore=false; // Ignore collision activations by remote players if (pActivateMsg->fTriggerType==plActivatorMsg::kCollideEnter || @@ -203,7 +203,7 @@ hsBool plLogicModifier::MsgReceive(plMessage* msg) return (plLogicModBase::MsgReceive(msg)); } -void plLogicModifier::RequestTrigger(hsBool netRequest) +void plLogicModifier::RequestTrigger(bool netRequest) { for (int i = 0; i < fConditionList.Count(); i++) { @@ -214,7 +214,7 @@ void plLogicModifier::RequestTrigger(hsBool netRequest) plLogicModBase::RequestTrigger(netRequest); } -void plLogicModifier::PreTrigger(hsBool netRequest) +void plLogicModifier::PreTrigger(bool netRequest) { if (!IEvalCounter()) return; diff --git a/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.h index 0422a8eb..01a339ef 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plLogicModifier.h @@ -51,7 +51,7 @@ protected: hsTArray fConditionList; - virtual void PreTrigger(hsBool netRequest); + virtual void PreTrigger(bool netRequest); public: plLogicModifier(); ~plLogicModifier(); @@ -62,10 +62,10 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); - virtual void RequestTrigger(hsBool netRequest=false); - virtual hsBool VerifyConditions(plMessage* msg); + virtual void RequestTrigger(bool netRequest=false); + virtual bool VerifyConditions(plMessage* msg); void AddCondition(plConditionalObject* c); virtual void Reset(bool bCounterReset); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plMaintainersMarkerModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plMaintainersMarkerModifier.h index 5bc700c6..3ebbed2e 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plMaintainersMarkerModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plMaintainersMarkerModifier.h @@ -57,7 +57,7 @@ public: kCalibrated, }; protected: - virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;} + virtual bool IEval(double secs, float del, uint32_t dirty) {return true;} int fCalibrated; public: @@ -68,7 +68,7 @@ public: virtual void AddTarget(plSceneObject* so); virtual void RemoveTarget(plSceneObject* so); - void SetCalibrated(hsBool b) {fCalibrated = b;} + void SetCalibrated(bool b) {fCalibrated = b;} int GetCalibrated() { return fCalibrated; } virtual void Read(hsStream *stream, hsResMgr *mgr); diff --git a/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp index 400204fc..63109bd8 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp @@ -91,13 +91,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com void plResponderEnableMsg::Read(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgRead(stream, mgr); - fEnable = stream->Readbool(); + fEnable = stream->ReadBool(); } void plResponderEnableMsg::Write(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgWrite(stream, mgr); - stream->Writebool(fEnable); + stream->WriteBool(fEnable); } ///////////////////////////////////////////////////// @@ -127,7 +127,7 @@ plResponderModifier::~plResponderModifier() } } -hsBool plResponderModifier::MsgReceive(plMessage* msg) +bool plResponderModifier::MsgReceive(plMessage* msg) { plNotifyMsg* pNMsg = plNotifyMsg::ConvertNoRef(msg); if (pNMsg) @@ -672,7 +672,7 @@ void plResponderModifier::Read(hsStream* stream, hsResMgr* mgr) } ISetResponderState(stream->ReadByte()); - fEnabled = stream->Readbool(); + fEnabled = stream->ReadBool(); fFlags = stream->ReadByte(); // attach responderSDLMod @@ -713,7 +713,7 @@ void plResponderModifier::Write(hsStream* stream, hsResMgr* mgr) } stream->WriteByte(fCurState); - stream->Writebool(fEnabled); + stream->WriteBool(fEnabled); stream->WriteByte(fFlags); } diff --git a/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.h index 9f0300bf..38ee3d04 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.h @@ -83,7 +83,7 @@ protected: bool fEnabled; plKey fPlayerKey; // The player who triggered this last plKey fTriggerer; // Whoever triggered us (for sending notify callbacks) - hsBool fEnter; // Is our current trigger a volume enter? + bool fEnter; // Is our current trigger a volume enter? bool fGotFirstLoad; // Have we gotten our first SDL load? plResponderSDLModifier* fResponderSDLMod; // handles saving and restoring state @@ -103,7 +103,7 @@ protected: int8_t ICmdFromWait(int8_t waitIdx); - virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; } + virtual bool IEval(double secs, float del, uint32_t dirty) { return true; } static bool fDebugAnimBox; // Draws a box on screen when an animation is started static void IDebugAnimBox(bool start); @@ -133,7 +133,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); const plResponderSDLModifier* GetSDLModifier() const { return fResponderSDLMod; } diff --git a/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.cpp index 389a3334..53402df6 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.cpp @@ -107,7 +107,7 @@ void plSDLModifier::ISendNetMsg(plStateDataRecord*& state, plKey senderKey, uint // // Process SDL msgs to send and recv state // -hsBool plSDLModifier::MsgReceive(plMessage* msg) +bool plSDLModifier::MsgReceive(plMessage* msg) { plSDLModifierMsg* sdlMsg = plSDLModifierMsg::ConvertNoRef(msg); if (sdlMsg && !stricmp(sdlMsg->GetSDLName(),GetSDLName())) diff --git a/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.h index 2de7dd61..9f6f233e 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plSDLModifier.h @@ -60,7 +60,7 @@ protected: virtual void IPutCurrentStateIn(plStateDataRecord* dstState) = 0; virtual void ISetCurrentStateFrom(const plStateDataRecord* srcState) = 0; virtual void ISentState(const plStateDataRecord* sentState) {} - hsBool IEval(double secs, float del, uint32_t dirty) {return false;} + bool IEval(double secs, float del, uint32_t dirty) {return false;} virtual uint32_t IApplyModFlags(uint32_t sendFlags); @@ -71,7 +71,7 @@ public: plSDLModifier(); virtual ~plSDLModifier(); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void SendState(uint32_t sendFlags); // send a state update void ReceiveState(const plStateDataRecord* srcState); // recv a state update virtual const char* GetSDLName() const = 0; // return the string name of the type of state descriptor you handle diff --git a/Sources/Plasma/PubUtilLib/plModifier/plSimpleModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plSimpleModifier.cpp index 9a3e5d45..dd8f43a8 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plSimpleModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plSimpleModifier.cpp @@ -114,12 +114,12 @@ void plSimpleModifier::IEnd() } } -hsBool plSimpleModifier::IEval(double secs, float del, uint32_t dirty) +bool plSimpleModifier::IEval(double secs, float del, uint32_t dirty) { return IHandleTime(secs, del); } -hsBool plSimpleModifier::MsgReceive(plMessage* msg) +bool plSimpleModifier::MsgReceive(plMessage* msg) { plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg); if( refMsg ) @@ -134,7 +134,7 @@ hsBool plSimpleModifier::MsgReceive(plMessage* msg) return plModifier::MsgReceive(msg); } -hsBool plSimpleModifier::IHandleRef(plRefMsg* refMsg) +bool plSimpleModifier::IHandleRef(plRefMsg* refMsg) { if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) ) AddTarget(plSceneObject::ConvertNoRef(refMsg->GetRef())); @@ -144,13 +144,13 @@ hsBool plSimpleModifier::IHandleRef(plRefMsg* refMsg) return true; } -hsBool plSimpleModifier::IHandleCmd(plAnimCmdMsg* modMsg) +bool plSimpleModifier::IHandleCmd(plAnimCmdMsg* modMsg) { - hsBool wasStopped = fTimeConvert.IsStopped(); + bool wasStopped = fTimeConvert.IsStopped(); fTimeConvert.HandleCmd(modMsg); - hsBool isStopped = fTimeConvert.IsStopped(); + bool isStopped = fTimeConvert.IsStopped(); if( wasStopped != isStopped ) { @@ -180,7 +180,7 @@ hsBool plSimpleModifier::IHandleCmd(plAnimCmdMsg* modMsg) return true; } -hsBool plSimpleModifier::IHandleTime(double wSecs, float del) +bool plSimpleModifier::IHandleTime(double wSecs, float del) { if( !fTarget ) diff --git a/Sources/Plasma/PubUtilLib/plModifier/plSimpleModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plSimpleModifier.h index 73990dd1..f1a02d1e 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plSimpleModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plSimpleModifier.h @@ -73,17 +73,17 @@ protected: // The following are in animation time. float fCurrentTime; - hsBool IHandleTime(double wSecs, float del); + bool IHandleTime(double wSecs, float del); - hsBool IHandleRef(plRefMsg* refMsg); - virtual hsBool IHandleCmd(plAnimCmdMsg* modMsg); + bool IHandleRef(plRefMsg* refMsg); + virtual bool IHandleCmd(plAnimCmdMsg* modMsg); virtual void IApplyDynamic() = 0; virtual void IBegin(); virtual void IEnd(); - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); public: plSimpleModifier(); @@ -95,7 +95,7 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual int GetNumTargets() const { return fTarget ? 1 : 0; } virtual plSceneObject* GetTarget(int w) const { /* hsAssert(w < GetNumTargets(), "Bad target"); */ return fTarget; } diff --git a/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.cpp index 54e9e110..008960c2 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.cpp @@ -55,7 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com //#include "plMessage/plSpawnRequestMsg.h" //#include "plMessage/plSpawnModMsg.h" -//hsBool plSpawnModifier::MsgReceive(plMessage* msg) +//bool plSpawnModifier::MsgReceive(plMessage* msg) //{ // plSpawnRequestMsg* pSpawnMsg = plSpawnRequestMsg::ConvertNoRef(msg); // if (pSpawnMsg) diff --git a/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.h b/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.h index 1ddb919f..a644bd72 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.h +++ b/Sources/Plasma/PubUtilLib/plModifier/plSpawnModifier.h @@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plSpawnModifier : public plMultiModifier { protected: - virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;} + virtual bool IEval(double secs, float del, uint32_t dirty) {return true;} public: plSpawnModifier(){;} @@ -60,7 +60,7 @@ public: virtual void AddTarget(plSceneObject* so); virtual void RemoveTarget(plSceneObject* so); -// hsBool MsgReceive(plMessage* msg); +// bool MsgReceive(plMessage* msg); // virtual void Read(hsStream *stream, hsResMgr *mgr); virtual void Write(hsStream *stream, hsResMgr *mgr); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp index 73d8be8f..9c25845e 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp @@ -134,10 +134,10 @@ void plLinkEffectsMgr::IAddPsuedo(plPseudoLinkEffectMsg *msg) fPseudolist.Append(msg); } -hsBool plLinkEffectsMgr::IHuntWaitlist(plLinkEffectsTriggerMsg *msg) +bool plLinkEffectsMgr::IHuntWaitlist(plLinkEffectsTriggerMsg *msg) { int i; - hsBool found = false; + bool found = false; for (i = fWaitlist.GetCount() - 1; i >= 0; i--) { if (fWaitlist[i] == msg) @@ -152,10 +152,10 @@ hsBool plLinkEffectsMgr::IHuntWaitlist(plLinkEffectsTriggerMsg *msg) return found || IHuntWaitlist(msg->GetLinkKey()); } -hsBool plLinkEffectsMgr::IHuntWaitlist(plKey linkKey) +bool plLinkEffectsMgr::IHuntWaitlist(plKey linkKey) { int i; - hsBool found = false; + bool found = false; for (i = fWaitlist.GetCount() - 1; i >= 0; i--) { if (fWaitlist[i]->GetLinkKey() == linkKey) @@ -172,10 +172,10 @@ hsBool plLinkEffectsMgr::IHuntWaitlist(plKey linkKey) return found; } -hsBool plLinkEffectsMgr::IHuntDeadlist(plLinkEffectsTriggerMsg *msg) +bool plLinkEffectsMgr::IHuntDeadlist(plLinkEffectsTriggerMsg *msg) { int i; - hsBool found = false; + bool found = false; for (i = fDeadlist.GetCount() - 1; i >= 0; i--) { if (fDeadlist[i] == msg) @@ -233,7 +233,7 @@ void plLinkEffectsMgr::ISendAllReadyCallbacks() } } -hsBool plLinkEffectsMgr::MsgReceive(plMessage *msg) +bool plLinkEffectsMgr::MsgReceive(plMessage *msg) { plNetClientMgr* nc = plNetClientMgr::GetInstance(); plNetLinkingMgr* lm = plNetLinkingMgr::GetInstance(); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.h b/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.h index e4cd3b45..94f7e65c 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.h +++ b/Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.h @@ -73,9 +73,9 @@ protected: void IRemovePseudo(plKey avatarKey); plPseudoLinkEffectMsg* IFindPseudo(plKey avatarKey); - hsBool IHuntWaitlist(plLinkEffectsTriggerMsg *msg); - hsBool IHuntWaitlist(plKey linkKey); - hsBool IHuntDeadlist(plLinkEffectsTriggerMsg *msg); + bool IHuntWaitlist(plLinkEffectsTriggerMsg *msg); + bool IHuntWaitlist(plKey linkKey); + bool IHuntDeadlist(plLinkEffectsTriggerMsg *msg); void ISendAllReadyCallbacks(); public: @@ -91,7 +91,7 @@ public: plMessage *WaitForEffect(plKey linkKey); - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); }; #endif // plLinkEffectsMgr_inc diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp index 0be08041..12272d9a 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp @@ -243,7 +243,7 @@ void plNetClientMgr::IRemoveCloneRoom() // // turn null send on/off. Null send does everything except actually send the msg out on the socket // -void plNetClientMgr::SetNullSend(hsBool on) +void plNetClientMgr::SetNullSend(bool on) { } @@ -850,7 +850,7 @@ int plNetClientMgr::IsLocallyOwned(const plSynchedObject* obj) const // // return localPlayer ptr // -plSynchedObject* plNetClientMgr::GetLocalPlayer(hsBool forceLoad) const +plSynchedObject* plNetClientMgr::GetLocalPlayer(bool forceLoad) const { if (forceLoad) return fLocalPlayerKey ? plSynchedObject::ConvertNoRef(fLocalPlayerKey->GetObjectPtr()) : nil; @@ -895,12 +895,12 @@ plSynchedObject* plNetClientMgr::GetRemotePlayer(int i) const // // check if a key si a remote player // -hsBool plNetClientMgr::IsRemotePlayerKey(const plKey pKey, int *idx) +bool plNetClientMgr::IsRemotePlayerKey(const plKey pKey, int *idx) { if (pKey) { plKeyVec::iterator result=std::find(fRemotePlayerKeys.begin(), fRemotePlayerKeys.end(), pKey); - hsBool found = result!=fRemotePlayerKeys.end(); + bool found = result!=fRemotePlayerKeys.end(); if (idx) *idx = found ? result-fRemotePlayerKeys.begin() : -1; return found; @@ -924,7 +924,7 @@ void plNetClientMgr::AddRemotePlayerKey(plKey pKey) // // MsgReceive handler for plasma messages // -hsBool plNetClientMgr::MsgReceive( plMessage* msg ) +bool plNetClientMgr::MsgReceive( plMessage* msg ) { if (plNetLinkingMgr::GetInstance()->MsgReceive( msg )) return true; diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h index a236a90b..8453cd7d 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h @@ -210,13 +210,13 @@ private: int ISendMembersListRequest(); int ISendRoomsReset(); void ISendCCRPetition(plCCRPetitionMsg* petMsg); - void ISendCameraReset(hsBool bEnteringAge); + void ISendCameraReset(bool bEnteringAge); - hsBool IUpdateListenList(double secs); + bool IUpdateListenList(double secs); void IHandleNetVoiceListMsg(plNetVoiceListMsg* msg); - hsBool IApplyNewListenList(std::vector& newListenList, hsBool forceSynch); + bool IApplyNewListenList(std::vector& newListenList, bool forceSynch); int IPrepMsg(plNetMessage* msg); - void IPlayerChangeAge(hsBool exiting, int32_t spawnPt); + void IPlayerChangeAge(bool exiting, int32_t spawnPt); void IAddCloneRoom(); void IRemoveCloneRoom(); @@ -252,7 +252,7 @@ public: void StartLinkOutFX(); void StartLinkInFX(); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); void Shutdown(); int Init(); @@ -280,8 +280,8 @@ public: void SetSPDesiredPlayerName( const char * value ) { fSPDesiredPlayerName=value;} const char * GetSPDesiredPlayerName() const { return fSPDesiredPlayerName.c_str(); } - void SetLocalPlayerKey(plKey l, hsBool pageOut=false); - void SetNullSend(hsBool on); // turn null send on/off + void SetLocalPlayerKey(plKey l, bool pageOut=false); + void SetNullSend(bool on); // turn null send on/off void SetPingServer(uint8_t serverType) { fPingServerType = serverType; } // getters @@ -293,10 +293,10 @@ public: uint8_t GetJoinOrder() const { return fJoinOrder; } // only valid at join time plKey GetLocalPlayerKey() const { return fLocalPlayerKey; } - plSynchedObject* GetLocalPlayer(hsBool forceLoad=false) const; + plSynchedObject* GetLocalPlayer(bool forceLoad=false) const; - hsBool IsPeerToPeer() const { return false; } - hsBool IsConnected() const { return true; } + bool IsPeerToPeer() const { return false; } + bool IsConnected() const { return true; } void IncNumInitialSDLStates(); void ResetNumInitialSDLStates() { fNumInitialSDLStates=0; } @@ -321,7 +321,7 @@ public: const plKeyVec& RemotePlayerKeys() const { return fRemotePlayerKeys; } plSynchedObject* GetRemotePlayer(int i) const; void AddRemotePlayerKey(plKey p); - hsBool IsRemotePlayerKey(const plKey p, int* idx=nil); + bool IsRemotePlayerKey(const plKey p, int* idx=nil); bool IsAPlayerKey(const plKey pKey) { return (pKey==GetLocalPlayerKey() || IsRemotePlayerKey(pKey)); } void SetConsoleOutput( bool b ) { SetFlagsBit(kConsoleOutput, b); } diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrLoad.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrLoad.cpp index afb894db..3be4d441 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrLoad.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrLoad.cpp @@ -90,7 +90,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #endif -extern hsBool gDataServerLocal; +extern bool gDataServerLocal; // Load Player object @@ -175,7 +175,7 @@ plKey plNetClientMgr::ILoadClone(plLoadCloneMsg *pCloneMsg) // Cause a player to respawn. This is typically called on the local player when he links to a new age. // or for unspawn: // -void plNetClientMgr::IPlayerChangeAge(hsBool exitAge, int32_t spawnPt) +void plNetClientMgr::IPlayerChangeAge(bool exitAge, int32_t spawnPt) { plArmatureMod *avatar = plAvatarMgr::GetInstance()->GetLocalAvatar(); @@ -186,7 +186,7 @@ void plNetClientMgr::IPlayerChangeAge(hsBool exitAge, int32_t spawnPt) avatar->LeaveAge(); else { - hsBool validSpawn = (spawnPt >= 0); + bool validSpawn = (spawnPt >= 0); avatar->EnterAge(!validSpawn); if (validSpawn) avatar->SpawnAt(spawnPt, hsTimer::GetSysSeconds()); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp index ab0904b1..a3409946 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp @@ -179,7 +179,7 @@ void plNetClientMgr::ISendCCRPetition(plCCRPetitionMsg* petMsg) // // send a msg to reset the camera in a new age // -void plNetClientMgr::ISendCameraReset(hsBool bEnteringAge) +void plNetClientMgr::ISendCameraReset(bool bEnteringAge) { plCameraMsg* pCamMsg = new plCameraMsg; if (bEnteringAge) @@ -314,9 +314,9 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg) // check if this msg uses direct communication (sent to specific rcvrs) // if so the server can filter it - hsBool bCast = msg->HasBCastFlag(plMessage::kBCastByExactType) || + bool bCast = msg->HasBCastFlag(plMessage::kBCastByExactType) || msg->HasBCastFlag(plMessage::kBCastByType); - hsBool directCom = msg->GetNumReceivers()>0; + bool directCom = msg->GetNumReceivers()>0; if( directCom ) { // It's direct if we have receivers AND any of them are in non-virtual locations @@ -357,7 +357,7 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg) // // CCRs can route a plMessage to all online players. // - hsBool ccrSendToAllPlayers = false; + bool ccrSendToAllPlayers = false; #ifndef PLASMA_EXTERNAL_RELEASE if ( AmCCR() ) { @@ -373,7 +373,7 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg) // if ( !ccrSendToAllPlayers ) { - hsBool allowInterAge = msg->HasBCastFlag( plMessage::kNetAllowInterAge ); + bool allowInterAge = msg->HasBCastFlag( plMessage::kNetAllowInterAge ); if ( allowInterAge ) netMsgWrap->SetBit(plNetMessage::kInterAgeRouting); } diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp index 6a70b069..b0977979 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrVoice.cpp @@ -79,9 +79,9 @@ bool lessComp(DistSqInfo a, DistSqInfo b) // send listenList update msgs to old and new members in the list // return true if the new list is different // -hsBool plNetClientMgr::IApplyNewListenList(std::vector& newListenList, hsBool forceSynch) +bool plNetClientMgr::IApplyNewListenList(std::vector& newListenList, bool forceSynch) { - hsBool changed=false; + bool changed=false; int i; // see if new listen list differs from current one @@ -115,7 +115,7 @@ hsBool plNetClientMgr::IApplyNewListenList(std::vector& newListenLis llu.SetAdding(false); for(i=0;iGetNumMembers(); i++) { - hsBool found=false; + bool found=false; if (!forceSynch) { int j; @@ -208,14 +208,14 @@ hsBool plNetClientMgr::IApplyNewListenList(std::vector& newListenLis // Returns true if the listenList was changed. // Note: Updates distSq to each member. Other things rely on this so we must do it even if p2p is disabled. // -hsBool plNetClientMgr::IUpdateListenList(double secs) +bool plNetClientMgr::IUpdateListenList(double secs) { if (GetFlagsBit(kDisabled)) return false; if (!fLocalPlayerKey || !fLocalPlayerKey->ObjectIsLoaded()) return false; - hsBool changed = false; + bool changed = false; if (secs - GetListenList()->GetLastUpdateTime()>plNetListenList::kUpdateInterval) { diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp index 6f757801..d06c3c0e 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp @@ -314,7 +314,7 @@ std::string plNetLinkingMgr::GetProperAgeName( const char * ageName ) //////////////////////////////////////////////////////////////////// -hsBool plNetLinkingMgr::MsgReceive( plMessage *msg ) +bool plNetLinkingMgr::MsgReceive( plMessage *msg ) { if (s_ageLeaver && NCAgeLeaverMsgReceive(s_ageLeaver, msg)) return true; diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.h b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.h index e10380e4..161f57cc 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.h +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.h @@ -115,7 +115,7 @@ class plNetLinkingMgr public: static plNetLinkingMgr * GetInstance(); - hsBool MsgReceive( plMessage *msg ); // TODO: Make this a hsKeyedObject so we can really handle messages. + bool MsgReceive( plMessage *msg ); // TODO: Make this a hsKeyedObject so we can really handle messages. void Update(); bool IsEnabled( void ) const { return fLinkingEnabled;} diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetVoiceList.h b/Sources/Plasma/PubUtilLib/plNetClient/plNetVoiceList.h index 9ad4bacc..35083a36 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetVoiceList.h +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetVoiceList.h @@ -89,7 +89,7 @@ public: void SetLastUpdateTime(double t) { fLastUpdateTime=t; fNumUpdates++; } double GetLastUpdateTime() { return fLastUpdateTime; } - hsBool CheckForceSynch() { if (fNumUpdates>10) { fNumUpdates=0; return true;} return false; } + bool CheckForceSynch() { if (fNumUpdates>10) { fNumUpdates=0; return true;} return false; } virtual void AddMember(plNetTransportMember* e); virtual void RemoveMember(plNetTransportMember* e); diff --git a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp index ecb1d550..184b1392 100644 --- a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp @@ -67,7 +67,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include -extern hsBool gDataServerLocal; +extern bool gDataServerLocal; /***************************************************************************** * @@ -824,7 +824,7 @@ void NetCommConnect () { const char** addrs; unsigned count; - hsBool connectedToKeeper = false; + bool connectedToKeeper = false; // if a console override was specified for a authserv, connect directly to the authserver rather than going through the gatekeeper if((count = GetAuthSrvHostnames(&addrs)) && strlen(addrs[0])) diff --git a/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp b/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp index 27df21a1..9d31cdda 100644 --- a/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp +++ b/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp @@ -243,7 +243,7 @@ void plCreatableListHelper::Read( hsStream* s, hsResMgr* mgr ) s->Read( zBufSz, (void*)zBuf.data() ); plZlibCompress compressor; uint32_t tmp; - hsBool ans = compressor.Uncompress( (uint8_t*)buf.data(), &tmp, (uint8_t*)zBuf.data(), zBufSz ); + bool ans = compressor.Uncompress( (uint8_t*)buf.data(), &tmp, (uint8_t*)zBuf.data(), zBufSz ); hsAssert( ans!=0, "plCreatableListHelper: Failed to uncompress buffer." ); hsAssert( tmp==bufSz, "compression size mismatch" ); fFlags&=~kCompressed; @@ -308,7 +308,7 @@ void plCreatableListHelper::Write( hsStream* s, hsResMgr* mgr ) uint32_t zBufSz; std::string zBuf; zBuf.resize( bufSz ); - hsBool ans = compressor.Compress( (uint8_t*)zBuf.data(), &zBufSz, (const uint8_t*)buf.data(), bufSz ); + bool ans = compressor.Compress( (uint8_t*)zBuf.data(), &zBufSz, (const uint8_t*)buf.data(), bufSz ); bool compressed = ( ans && zBufSz ); hsAssert( compressed, "plCreatableListHelper: Failed to compress buffer." ); if ( compressed ) diff --git a/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.h b/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.h index 08e0ce38..46221858 100644 --- a/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.h +++ b/Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.h @@ -310,7 +310,7 @@ public: //{ // int fLinkingRules; // uint32_t fPlayerID; -// hsBool8 fSuperUser; +// bool8 fSuperUser; // mutable plAgeInfoStruct fAgeInfo; // mutable plNetServerSessionInfo fServerInfo; // diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Intern.h b/Sources/Plasma/PubUtilLib/plNetGameLib/Intern.h index 42f3c8e3..828ed6c5 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Intern.h +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Intern.h @@ -271,7 +271,7 @@ static const char * s_transTypes[] = { "GkAuthSrvIpAddress", }; -COMPILER_ASSERT(arrsize(s_transTypes) == kNumTransTypes); +static_assert(arrsize(s_transTypes) == kNumTransTypes, "Ngl Trans array and enum differ in size"); static long s_perfTransCount[kNumTransTypes]; diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp index 684b48c4..ff42652a 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp @@ -4017,7 +4017,7 @@ bool VaultFindNodeTrans::Recv ( const Auth2Cli_VaultNodeFindReply & reply = *(const Auth2Cli_VaultNodeFindReply *) msg; if (IS_NET_SUCCESS(reply.result)) { - COMPILER_ASSERT(sizeof(unsigned) == sizeof(uint32_t)); + static_assert(sizeof(unsigned) == sizeof(uint32_t), "unsigned is not the same size as uint32_t"); m_nodeIds.Set((unsigned *)reply.nodeIds, reply.nodeIdCount); } diff --git a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.h b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.h index 4719ba89..c0177835 100644 --- a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.h +++ b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.h @@ -575,7 +575,7 @@ public: bool fUnload; plNetMsgPlayerPage() : fUnload(false) { SetBit(kNeedsReliableSend); } - plNetMsgPlayerPage(plUoid uoid, hsBool unload) : fUoid(uoid), fUnload(unload) { } + plNetMsgPlayerPage(plUoid uoid, bool unload) : fUoid(uoid), fUnload(unload) { } CLASSNAME_REGISTER( plNetMsgPlayerPage ); GETINTERFACE_ANY( plNetMsgPlayerPage, plNetMessage); @@ -636,14 +636,14 @@ public: void SetPageFlags(uint8_t f) { fPageFlags=f; } uint8_t GetPageFlags() const { return fPageFlags; } - void SetPagingOut(hsBool b) { if (b) fPageFlags |= kPagingOut; else fPageFlags&=~kPagingOut; } - hsBool GetPagingOut() const { return (fPageFlags & kPagingOut) != 0; } + void SetPagingOut(bool b) { if (b) fPageFlags |= kPagingOut; else fPageFlags&=~kPagingOut; } + bool GetPagingOut() const { return (fPageFlags & kPagingOut) != 0; } - void SetResetList(hsBool b) { if (b) fPageFlags |= kResetList; else fPageFlags &=~kResetList; } - hsBool GetResetList() const { return (fPageFlags & kResetList) != 0; } + void SetResetList(bool b) { if (b) fPageFlags |= kResetList; else fPageFlags &=~kResetList; } + bool GetResetList() const { return (fPageFlags & kResetList) != 0; } - void SetRequestingState(hsBool b) { if (b) fPageFlags |= kRequestState; else fPageFlags &=~kRequestState; } - hsBool GetRequestingState() const { return (fPageFlags & kRequestState) != 0; } + void SetRequestingState(bool b) { if (b) fPageFlags |= kRequestState; else fPageFlags &=~kRequestState; } + bool GetRequestingState() const { return (fPageFlags & kRequestState) != 0; } // debug std::string AsStdString() const @@ -685,7 +685,7 @@ public: void Write(hsStream* s) { fGroupID.Write(s); s->WriteLE(fOwnIt); } GroupInfo() : fGroupID(plNetGroup::kNetGroupUnknown), fOwnIt(false) {} - GroupInfo(plNetGroupId gID, hsBool o) : fGroupID(gID),fOwnIt(o) {} + GroupInfo(plNetGroupId gID, bool o) : fGroupID(gID),fOwnIt(o) {} }; protected: std::vector fGroups; @@ -788,8 +788,8 @@ public: void CopySharedState(plNetSharedState* ss); - void SetLockRequest(hsBool b) { fLockRequest=b; } - hsBool GetLockRequest() const { return fLockRequest; } + void SetLockRequest(bool b) { fLockRequest=b; } + bool GetLockRequest() const { return fLockRequest; } void ReadVersion(hsStream* s, hsResMgr* mgr); void WriteVersion(hsStream* s, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp index 1a683fa9..4a23e469 100644 --- a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp +++ b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp @@ -362,7 +362,7 @@ int plNetMsgObjectHelper::Peek(hsStream* stream, const uint32_t peekOptions) return stream->GetPosition(); } -hsBool plNetMsgObjectHelper::SetFromKey(const plKey &key) +bool plNetMsgObjectHelper::SetFromKey(const plKey &key) { if (!key || key->GetName().IsNull()) return false; diff --git a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h index 7d1df76b..5bb77581 100644 --- a/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h +++ b/Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h @@ -209,7 +209,7 @@ public: plNetMsgObjectHelper & operator =(const plNetMsgObjectHelper & other); // setters - hsBool SetFromKey(const plKey &key); + bool SetFromKey(const plKey &key); void SetUoid(const plUoid &u) { fUoid=u; } // getters diff --git a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp index 2c67da25..be2f0e5c 100644 --- a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp +++ b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.cpp @@ -77,7 +77,7 @@ void plNetTransport::IUnSubscribeToAllChannelGrps(plNetTransportMember* mbr) for( i=mbr->GetNumSubscriptions()-1; i>=0 ; i-- ) { int chan=mbr->GetSubscription(i); - hsBool ok=UnSubscribeToChannelGrp(mbr, chan); + bool ok=UnSubscribeToChannelGrp(mbr, chan); hsAssert(ok, "can't find supposed subscription to remove"); } // for } @@ -111,7 +111,7 @@ void plNetTransport::IRemoveMember(plNetTransportMember* mbr) // remove member from master list, and all subscription channels. // return true on success. // -hsBool plNetTransport::RemoveMember(int idx) +bool plNetTransport::RemoveMember(int idx) { if (idx>=0) { @@ -126,7 +126,7 @@ hsBool plNetTransport::RemoveMember(int idx) // remove member from master list, and all subscription channels. // return true on success. // -hsBool plNetTransport::RemoveMember(plNetTransportMember* mbr) +bool plNetTransport::RemoveMember(plNetTransportMember* mbr) { IRemoveMember(mbr); return true; @@ -158,7 +158,7 @@ void plNetTransport::SubscribeToChannelGrp(plNetTransportMember* mbr, int channe // // Remove the subscription to the given channel grp for a member. // -hsBool plNetTransport::UnSubscribeToChannelGrp(plNetTransportMember* mbr, int chan) +bool plNetTransport::UnSubscribeToChannelGrp(plNetTransportMember* mbr, int chan) { hsAssert(chan>=0 && chanend()) { mList->erase(it); - hsBool ret=mbr->RemoveSubscription(chan); + bool ret=mbr->RemoveSubscription(chan); hsAssert(ret, "error removing subscription"); return true; } @@ -219,7 +219,7 @@ int plNetTransport::SendMsg(int chan, plNetMessage* netMsg) const NetCommSendMsg(netMsg); if (rl) { - hsBool ok=rl->RemoveReceiverPlayerID(tm->GetPlayerID()); + bool ok=rl->RemoveReceiverPlayerID(tm->GetPlayerID()); hsAssert(ok, "couldn't find rcvr to remove?"); } ret=0; // sent ok @@ -297,7 +297,7 @@ void plNetTransport::ClearChannelGrp(int channel) for( i=0 ; iRemoveSubscription(channel); + bool ok=tm->RemoveSubscription(channel); hsAssert(ok, "error removing subscription"); } diff --git a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.h b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.h index e52767c9..aa719320 100644 --- a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.h +++ b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransport.h @@ -76,15 +76,15 @@ public: int FindMember(uint32_t playerID) const; // return array index or -1 int FindMember(const plNetTransportMember* mbr); // return array index or -1 int AddMember(plNetTransportMember* mbr); // to master list, if not there - hsBool RemoveMember(plNetTransportMember* mbr); // from master list and all channels - hsBool RemoveMember(int idx); // from master list and all channels + bool RemoveMember(plNetTransportMember* mbr); // from master list and all channels + bool RemoveMember(int idx); // from master list and all channels int GetNumMembers() const { return fMembers.size(); } plNetTransportMember* GetMember(int i) const { return i>=0 && i* channels) const; void ClearChannelGrp(int channel); void SetNumChannels(int n); diff --git a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.cpp b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.cpp index 34eaad5c..0c7b7271 100644 --- a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.cpp +++ b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.cpp @@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // add a channel subscription if it's not already there // returns true if added // -hsBool plNetTransportMember::AddSubscription(int chan) +bool plNetTransportMember::AddSubscription(int chan) { if (FindSubscription(chan)==-1) { @@ -56,7 +56,7 @@ hsBool plNetTransportMember::AddSubscription(int chan) return false; } -hsBool plNetTransportMember::RemoveSubscription(int chan) +bool plNetTransportMember::RemoveSubscription(int chan) { int idx=FindSubscription(chan); if (idx>=0) diff --git a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h index 3170f3e8..294292b6 100644 --- a/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h +++ b/Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h @@ -96,8 +96,8 @@ public: void SetIsServer(bool value) { (value)?SetFlags(GetFlags()|kIsServer):SetFlags(GetFlags()&!kIsServer);} bool IsServer() const { return (GetFlags()&kIsServer)?true:false;} - hsBool AddSubscription(int chan); - hsBool RemoveSubscription(int chan); // return true on success + bool AddSubscription(int chan); + bool RemoveSubscription(int chan); // return true on success int FindSubscription(int chan); // return index into subscription array or -1 int GetNumSubscriptions() { return fSubscriptions.size(); } diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plConvexVolume.cpp b/Sources/Plasma/PubUtilLib/plParticleSystem/plConvexVolume.cpp index bb640bc1..8b6ce914 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plConvexVolume.cpp +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plConvexVolume.cpp @@ -65,7 +65,7 @@ void plConvexVolume::IClear() delete [] fWorldPlanes; } -hsBool plConvexVolume::AddPlane(const hsPlane3 &plane) +bool plConvexVolume::AddPlane(const hsPlane3 &plane) { // First check for a redundant plane (since we're convex, a comparison of normals should do) int i; @@ -124,7 +124,7 @@ void plConvexVolume::SetPlane(const hsPlane3 &plane, const uint32_t index) fLocalPlanes[index] = plane; } -hsBool plConvexVolume::IsInside(const hsPoint3 &pos) const +bool plConvexVolume::IsInside(const hsPoint3 &pos) const { int i; for( i = 0; i < fNumPlanes; i++ ) @@ -136,7 +136,7 @@ hsBool plConvexVolume::IsInside(const hsPoint3 &pos) const return true; } -hsBool plConvexVolume::ResolvePoint(hsPoint3 &pos) const +bool plConvexVolume::ResolvePoint(hsPoint3 &pos) const { float minDist = 1.e33f; int32_t minIndex = -1; @@ -159,7 +159,7 @@ hsBool plConvexVolume::ResolvePoint(hsPoint3 &pos) const return true; } -hsBool plConvexVolume::BouncePoint(hsPoint3 &pos, hsVector3 &velocity, float bounce, float friction) const +bool plConvexVolume::BouncePoint(hsPoint3 &pos, hsVector3 &velocity, float bounce, float friction) const { float minDist = 1.e33f; int32_t minIndex = -1; diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plConvexVolume.h b/Sources/Plasma/PubUtilLib/plParticleSystem/plConvexVolume.h index 984ae8f3..678cb2db 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plConvexVolume.h +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plConvexVolume.h @@ -63,24 +63,24 @@ public: void Update(const hsMatrix44 &l2w); - hsBool AddPlane(const hsPlane3 &plane); + bool AddPlane(const hsPlane3 &plane); void SetNumPlanesAndClear(const uint32_t num); void SetPlane(const hsPlane3 &plane, const uint32_t index); // If you only care about the test, call this. Otherwise call ResolvePoint. - hsBool IsInside(const hsPoint3 &pos) const; + bool IsInside(const hsPoint3 &pos) const; // returns true if the point was inside the volume, and thus moved outward. - hsBool ResolvePoint(hsPoint3 &pos) const; + bool ResolvePoint(hsPoint3 &pos) const; // returns true if the point was inside and pos and velocity updated to bounce off offending plane. // input bounce==1.f for perfect bounce, bounce==0 to slide. - hsBool BouncePoint(hsPoint3 &pos, hsVector3 &velocity, float bounce, float friction) const; + bool BouncePoint(hsPoint3 &pos, hsVector3 &velocity, float bounce, float friction) const; - inline hsBool TestPlane(const hsPoint3 &pos, const hsPlane3 &plane) const; // Is the point inside the plane? + inline bool TestPlane(const hsPoint3 &pos, const hsPlane3 &plane) const; // Is the point inside the plane? virtual void Read(hsStream* s, hsResMgr *mgr); virtual void Write(hsStream* s, hsResMgr *mgr); - //virtual hsBool MsgReceive(plMessage* msg); + //virtual bool MsgReceive(plMessage* msg); protected: void IClear(); @@ -90,7 +90,7 @@ protected: uint32_t fNumPlanes; }; -inline hsBool plConvexVolume::TestPlane(const hsPoint3 &pos, const hsPlane3 &plane) const +inline bool plConvexVolume::TestPlane(const hsPoint3 &pos, const hsPlane3 &plane) const { float dis = plane.fN.InnerProduct(pos); dis += plane.fD; diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEffect.cpp b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEffect.cpp index 3ccc1f2a..d2db210a 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEffect.cpp +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEffect.cpp @@ -75,7 +75,7 @@ void plParticleCollisionEffect::PrepareEffect(const plEffectTargetInfo &target) } } -hsBool plParticleCollisionEffect::MsgReceive(plMessage* msg) +bool plParticleCollisionEffect::MsgReceive(plMessage* msg) { plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg); plSceneObject *so; @@ -118,7 +118,7 @@ plParticleCollisionEffectBeat::plParticleCollisionEffectBeat() { } -hsBool plParticleCollisionEffectBeat::ApplyEffect(const plEffectTargetInfo &target, int32_t i) +bool plParticleCollisionEffectBeat::ApplyEffect(const plEffectTargetInfo &target, int32_t i) { hsAssert(i >= 0, "Use of default argument doesn't make sense for plParticleCollisionEffect"); @@ -137,7 +137,7 @@ plParticleCollisionEffectDie::plParticleCollisionEffectDie() { } -hsBool plParticleCollisionEffectDie::ApplyEffect(const plEffectTargetInfo &target, int32_t i) +bool plParticleCollisionEffectDie::ApplyEffect(const plEffectTargetInfo &target, int32_t i) { hsAssert(i >= 0, "Use of default argument doesn't make sense for plParticleCollisionEffect"); @@ -156,7 +156,7 @@ plParticleCollisionEffectBounce::plParticleCollisionEffectBounce() { } -hsBool plParticleCollisionEffectBounce::ApplyEffect(const plEffectTargetInfo &target, int32_t i) +bool plParticleCollisionEffectBounce::ApplyEffect(const plEffectTargetInfo &target, int32_t i) { hsAssert(i >= 0, "Use of default argument doesn't make sense for plParticleCollisionEffect"); @@ -265,7 +265,7 @@ void plParticleFadeVolumeEffect::PrepareEffect(const plEffectTargetInfo &target) fNorm.fZ = 1.f / (fMax.fZ - fMin.fZ); } -hsBool plParticleFadeVolumeEffect::ApplyEffect(const plEffectTargetInfo& target, int32_t i) +bool plParticleFadeVolumeEffect::ApplyEffect(const plEffectTargetInfo& target, int32_t i) { hsPoint3 *currPos = (hsPoint3 *)(target.fPos + i * target.fPosStride); @@ -484,7 +484,7 @@ void plParticleLocalWind::PrepareEffect(const plEffectTargetInfo& target) } -hsBool plParticleLocalWind::ApplyEffect(const plEffectTargetInfo& target, int32_t i) +bool plParticleLocalWind::ApplyEffect(const plEffectTargetInfo& target, int32_t i) { const hsPoint3& pos = *(hsPoint3 *)(target.fPos + i * target.fPosStride); hsVector3& vel = *(hsVector3*)(target.fVelocity + i * target.fVelocityStride); @@ -641,7 +641,7 @@ void plParticleUniformWind::PrepareEffect(const plEffectTargetInfo& target) } -hsBool plParticleUniformWind::ApplyEffect(const plEffectTargetInfo& target, int32_t i) +bool plParticleUniformWind::ApplyEffect(const plEffectTargetInfo& target, int32_t i) { hsVector3& vel = *(hsVector3*)(target.fVelocity + i * target.fVelocityStride); @@ -743,7 +743,7 @@ void plParticleFlockEffect::PrepareEffect(const plEffectTargetInfo& target) // Some of this is the same for every particle and should be cached in PrepareEffect(). // Holding off on that until I like the behavior. -hsBool plParticleFlockEffect::ApplyEffect(const plEffectTargetInfo& target, int32_t i) +bool plParticleFlockEffect::ApplyEffect(const plEffectTargetInfo& target, int32_t i) { if (i >= fMaxParticles) return false; // Don't have the memory to deal with you. Good luck kid... @@ -855,7 +855,7 @@ void plParticleFlockEffect::Write(hsStream *s, hsResMgr *mgr) s->WriteLEScalar(fMaxParticles); } -hsBool plParticleFlockEffect::MsgReceive(plMessage *msg) +bool plParticleFlockEffect::MsgReceive(plMessage *msg) { plParticleFlockMsg *flockMsg = plParticleFlockMsg::ConvertNoRef(msg); if (flockMsg) @@ -889,7 +889,7 @@ void plParticleFollowSystemEffect::PrepareEffect(const plEffectTargetInfo& targe fEvalThisFrame = (fOldW2L != target.fContext.fSystem->GetTarget(0)->GetWorldToLocal()); } -hsBool plParticleFollowSystemEffect::ApplyEffect(const plEffectTargetInfo& target, int32_t i) +bool plParticleFollowSystemEffect::ApplyEffect(const plEffectTargetInfo& target, int32_t i) { if (fEvalThisFrame) { diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEffect.h b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEffect.h index f74073c6..8a96be3a 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEffect.h +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEffect.h @@ -67,7 +67,7 @@ public: // context (invalidating anything cached). // Defaults for Prepare and End are no-ops. virtual void PrepareEffect(const plEffectTargetInfo& target) {} - virtual hsBool ApplyEffect(const plEffectTargetInfo& target, int32_t i) = 0; + virtual bool ApplyEffect(const plEffectTargetInfo& target, int32_t i) = 0; virtual void EndEffect(const plEffectTargetInfo& target) {} }; @@ -84,7 +84,7 @@ public: virtual void Read(hsStream *s, hsResMgr *mgr); virtual void Write(hsStream *s, hsResMgr *mgr); - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); protected: plSceneObject *fSceneObj; @@ -102,7 +102,7 @@ public: CLASSNAME_REGISTER( plParticleCollisionEffectBeat ); GETINTERFACE_ANY( plParticleCollisionEffectBeat, plParticleCollisionEffect ); - virtual hsBool ApplyEffect(const plEffectTargetInfo& target, int32_t i); + virtual bool ApplyEffect(const plEffectTargetInfo& target, int32_t i); }; // This particle blocker just kills any particles that hit it. @@ -114,7 +114,7 @@ public: CLASSNAME_REGISTER( plParticleCollisionEffectDie ); GETINTERFACE_ANY( plParticleCollisionEffectDie, plParticleCollisionEffect ); - virtual hsBool ApplyEffect(const plEffectTargetInfo& target, int32_t i); + virtual bool ApplyEffect(const plEffectTargetInfo& target, int32_t i); }; class plParticleCollisionEffectBounce : public plParticleCollisionEffect @@ -128,7 +128,7 @@ public: CLASSNAME_REGISTER( plParticleCollisionEffectBounce ); GETINTERFACE_ANY( plParticleCollisionEffectBounce, plParticleCollisionEffect ); - virtual hsBool ApplyEffect(const plEffectTargetInfo& target, int32_t i); + virtual bool ApplyEffect(const plEffectTargetInfo& target, int32_t i); virtual void Read(hsStream *s, hsResMgr *mgr); virtual void Write(hsStream *s, hsResMgr *mgr); @@ -157,14 +157,14 @@ public: GETINTERFACE_ANY( plParticleFadeVolumeEffect, plParticleEffect ); virtual void PrepareEffect(const plEffectTargetInfo& target); - virtual hsBool ApplyEffect(const plEffectTargetInfo& target, int32_t i); + virtual bool ApplyEffect(const plEffectTargetInfo& target, int32_t i); virtual void Read(hsStream *s, hsResMgr *mgr); virtual void Write(hsStream *s, hsResMgr *mgr); - //virtual hsBool MsgReceive(plMessage *msg); + //virtual bool MsgReceive(plMessage *msg); float fLength; - hsBool fIgnoreZ; + bool fIgnoreZ; }; class plParticleWindEffect : public plParticleEffect @@ -174,7 +174,7 @@ protected: float fStrength; float fConstancy; float fSwirl; - hsBool fHorizontal; + bool fHorizontal; hsVector3 fRefDir; // Some cached properties. These will be the same for all @@ -193,7 +193,7 @@ public: GETINTERFACE_ANY( plParticleWindEffect, plParticleEffect ); virtual void PrepareEffect(const plEffectTargetInfo& target); - virtual hsBool ApplyEffect(const plEffectTargetInfo& target, int32_t i) = 0; + virtual bool ApplyEffect(const plEffectTargetInfo& target, int32_t i) = 0; virtual void Read(hsStream *s, hsResMgr *mgr); virtual void Write(hsStream *s, hsResMgr *mgr); @@ -207,8 +207,8 @@ public: void SetSwirl(float s) { fSwirl = s; } float GetSwirl() const { return fSwirl; } - void SetHorizontal(hsBool on) { fHorizontal = on; } - hsBool GetHorizontal() const { return fHorizontal; } + void SetHorizontal(bool on) { fHorizontal = on; } + bool GetHorizontal() const { return fHorizontal; } void SetRefDirection(const hsVector3& v); const hsVector3& GetRefDirection() const { return fRefDir; } @@ -232,7 +232,7 @@ public: GETINTERFACE_ANY( plParticleLocalWind, plParticleWindEffect ); virtual void PrepareEffect(const plEffectTargetInfo& target); - virtual hsBool ApplyEffect(const plEffectTargetInfo& target, int32_t i); + virtual bool ApplyEffect(const plEffectTargetInfo& target, int32_t i); void SetScale(const hsVector3& v) { fScale = v; } const hsVector3& GetScale() const { return fScale; } @@ -266,7 +266,7 @@ public: GETINTERFACE_ANY( plParticleUniformWind, plParticleWindEffect ); virtual void PrepareEffect(const plEffectTargetInfo& target); - virtual hsBool ApplyEffect(const plEffectTargetInfo& target, int32_t i); + virtual bool ApplyEffect(const plEffectTargetInfo& target, int32_t i); void SetFrequencyRange(float minSecsPerCycle, float maxSecsPerCycle); void SetFrequencyRate(float secsPerCycle); @@ -315,7 +315,7 @@ public: GETINTERFACE_ANY( plParticleFlockEffect, plParticleEffect ); virtual void PrepareEffect(const plEffectTargetInfo& target); - virtual hsBool ApplyEffect(const plEffectTargetInfo& target, int32_t i); + virtual bool ApplyEffect(const plEffectTargetInfo& target, int32_t i); void SetTargetOffset(const hsPoint3 &offset) { fTargetOffset = offset; } void SetDissenterTarget(const hsPoint3 &target) { fDissenterTarget = target; } @@ -333,7 +333,7 @@ public: virtual void Read(hsStream *s, hsResMgr *mgr); virtual void Write(hsStream *s, hsResMgr *mgr); - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); }; class plParticleFollowSystemEffect : public plParticleEffect @@ -345,12 +345,12 @@ public: plParticleFollowSystemEffect(); virtual void PrepareEffect(const plEffectTargetInfo& target); - virtual hsBool ApplyEffect(const plEffectTargetInfo& target, int32_t i); + virtual bool ApplyEffect(const plEffectTargetInfo& target, int32_t i); virtual void EndEffect(const plEffectTargetInfo& target); protected: hsMatrix44 fOldW2L; - hsBool fEvalThisFrame; + bool fEvalThisFrame; }; #endif diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.cpp b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.cpp index 832ed290..aeeb15ac 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.cpp +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.cpp @@ -285,7 +285,7 @@ void plParticleEmitter::TranslateAllParticles(hsPoint3 &amount) fParticleCores[i].fPos += amount; } -hsBool plParticleEmitter::IUpdate(float delta) +bool plParticleEmitter::IUpdate(float delta) { if (fMiscFlags & kNeedsUpdate) { diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.h b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.h index ebb61737..36872905 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.h +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleEmitter.h @@ -92,7 +92,7 @@ public: void OverrideLocalToWorld(const hsMatrix44& l2w); void UnOverrideLocalToWorld() { fMiscFlags &= ~kOverrideLocalToWorld; } - hsBool LocalToWorldOverridden() const { return 0 != (fMiscFlags & kOverrideLocalToWorld); } + bool LocalToWorldOverridden() const { return 0 != (fMiscFlags & kOverrideLocalToWorld); } void SetTimeToLive(float dt) { fTimeToLive = dt; } float GetTimeToLive() const { return fTimeToLive; } // 0 time to live is never turn off. @@ -150,7 +150,7 @@ protected: void IClear(); void ISetupParticleMem(); void ISetSystem(plParticleSystem *sys) { fSystem = sys; } - hsBool IUpdate(float delta); + bool IUpdate(float delta); void IUpdateParticles(float delta); void IUpdateBoundsAndNormals(float delta); void IRemoveParticle(uint32_t index); diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.cpp b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.cpp index f5a5c632..36bc6d80 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.cpp +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.cpp @@ -135,7 +135,7 @@ void plSimpleParticleGenerator::Init(float genLife, float partLifeMin, float par if (fGenLife < 0) fMiscFlags |= kImmortal; } -hsBool plSimpleParticleGenerator::AddAutoParticles(plParticleEmitter *emitter, float dt, uint32_t numForced /* = 0 */) +bool plSimpleParticleGenerator::AddAutoParticles(plParticleEmitter *emitter, float dt, uint32_t numForced /* = 0 */) { int32_t numNewParticles; @@ -378,7 +378,7 @@ void plOneTimeParticleGenerator::Init(float count, hsPoint3 *pointArray, hsVecto } // The numForced param is required by the parent class, but ignored by this particular generator -hsBool plOneTimeParticleGenerator::AddAutoParticles(plParticleEmitter *emitter, float dt, uint32_t numForced /* = 0 */) +bool plOneTimeParticleGenerator::AddAutoParticles(plParticleEmitter *emitter, float dt, uint32_t numForced /* = 0 */) { float currSizeVar; float scale = (fScaleMax + fScaleMin) / 2; diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.h b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.h index 666f3e2c..e2c7838f 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.h +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleGenerator.h @@ -56,7 +56,7 @@ class plParticleGenerator : public plCreatable public: // returns false if it's done generating particles and is safe to delete. - virtual hsBool AddAutoParticles(plParticleEmitter *emitter, float dt, uint32_t numForced = 0) = 0; + virtual bool AddAutoParticles(plParticleEmitter *emitter, float dt, uint32_t numForced = 0) = 0; virtual void UpdateParam(uint32_t paramID, float paramValue) = 0; @@ -65,7 +65,7 @@ public: static void ComputeDirection(float pitch, float yaw, hsVector3 &direction); static void ComputePitchYaw(float &pitch, float &yaw, const hsVector3 &dir); - static inline float GetRandomVar() { return 2.0f * (float)hsRand() / RAND_MAX - 1; } // returns a num between +/- 1.0 + static inline float GetRandomVar() { return 2.0f * rand() / RAND_MAX - 1; } // returns a num between +/- 1.0 }; class plSimpleParticleGenerator : public plParticleGenerator @@ -82,7 +82,7 @@ public: CLASSNAME_REGISTER( plSimpleParticleGenerator ); GETINTERFACE_ANY( plSimpleParticleGenerator, plParticleGenerator); - virtual hsBool AddAutoParticles(plParticleEmitter *emitter, float dt, uint32_t numForced); + virtual bool AddAutoParticles(plParticleEmitter *emitter, float dt, uint32_t numForced); virtual void UpdateParam(uint32_t paramID, float paramValue); virtual void Read(hsStream* s, hsResMgr *mgr); @@ -131,7 +131,7 @@ public: CLASSNAME_REGISTER( plOneTimeParticleGenerator ); GETINTERFACE_ANY( plOneTimeParticleGenerator, plParticleGenerator); - virtual hsBool AddAutoParticles(plParticleEmitter *emitter, float dt, uint32_t numForced = 0); + virtual bool AddAutoParticles(plParticleEmitter *emitter, float dt, uint32_t numForced = 0); virtual void UpdateParam(uint32_t paramID, float paramValue) {} virtual void Read(hsStream* s, hsResMgr *mgr); diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.cpp b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.cpp index c1c7c677..f2540b44 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.cpp +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.cpp @@ -306,7 +306,7 @@ plParticleEffect *plParticleSystem::GetEffect(uint16_t type) const return nil; } -uint32_t plParticleSystem::GetNumValidParticles(hsBool immortalOnly /* = false */) const +uint32_t plParticleSystem::GetNumValidParticles(bool immortalOnly /* = false */) const { uint32_t count = 0; int i, j; @@ -332,14 +332,14 @@ const hsMatrix44 &plParticleSystem::GetLocalToWorld() const return fTarget->GetCoordinateInterface()->GetLocalToWorld(); } -hsBool plParticleSystem::IEval(double secs, float del, uint32_t dirty) +bool plParticleSystem::IEval(double secs, float del, uint32_t dirty) { return false; } -hsBool plParticleSystem::IShouldUpdate(plPipeline* pipe) const +bool plParticleSystem::IShouldUpdate(plPipeline* pipe) const { if (fMiscFlags & kParticleSystemAlwaysUpdate) @@ -365,7 +365,7 @@ hsBool plParticleSystem::IShouldUpdate(plPipeline* pipe) const } // Now, are we visible? - hsBool isVisible = pipe->TestVisibleWorld(wBnd); + bool isVisible = pipe->TestVisibleWorld(wBnd); float delta = fLastTime > 0 ? float(fCurrTime - fLastTime) : hsTimer::GetDelSysSeconds(); if( isVisible ) @@ -430,7 +430,7 @@ void plParticleSystem::IHandleRenderMsg(plPipeline* pipe) if( !di ) return; - hsBool disabled = di->GetProperty(plDrawInterface::kDisable); + bool disabled = di->GetProperty(plDrawInterface::kDisable); if (!IShouldUpdate(pipe)) { if (disabled) @@ -473,7 +473,7 @@ void plParticleSystem::IHandleRenderMsg(plPipeline* pipe) plProfile_CreateTimer("ParticleSys", "RenderSetup", ParticleSys); -hsBool plParticleSystem::MsgReceive(plMessage* msg) +bool plParticleSystem::MsgReceive(plMessage* msg) { plGenRefMsg* refMsg; plParticleUpdateMsg *partMsg; diff --git a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.h b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.h index 1f8df20a..90b7dd6e 100644 --- a/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.h +++ b/Sources/Plasma/PubUtilLib/plParticleSystem/plParticleSystem.h @@ -112,8 +112,8 @@ protected: plParticleSDLMod *fParticleSDLMod; - hsBool IShouldUpdate(plPipeline* pipe) const; - virtual hsBool IEval(double secs, float del, uint32_t dirty); // required by plModifier + bool IShouldUpdate(plPipeline* pipe) const; + virtual bool IEval(double secs, float del, uint32_t dirty); // required by plModifier void IHandleRenderMsg(plPipeline* pipe); plDrawInterface* ICheckDrawInterface(); void IAddEffect(plParticleEffect *effect, uint32_t type); @@ -163,7 +163,7 @@ public: void DisableGenerators(); uint32_t GetNumTiles() const { return fXTiles * fYTiles; } void SetTileIndex(plParticle &particle, uint32_t index); // Sets the UV coordinates appropriate for the current texture - uint32_t GetNumValidParticles(hsBool immortalOnly = false) const; // Takes a bit longer if we want a count of immortal particles... + uint32_t GetNumValidParticles(bool immortalOnly = false) const; // Takes a bit longer if we want a count of immortal particles... uint32_t GetMaxTotalParticles() const { return fMaxTotalParticles; } const hsMatrix44 &GetLocalToWorld() const; @@ -189,7 +189,7 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void SetAttachedToAvatar(bool attached); diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.cpp b/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.cpp index e2099d49..43ad60a0 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.cpp @@ -167,7 +167,7 @@ plLOSDispatch::~plLOSDispatch() plgDispatch::Dispatch()->UnRegisterForExactType(plLOSRequestMsg::Index(), GetKey()); } -hsBool plLOSDispatch::MsgReceive(plMessage* msg) +bool plLOSDispatch::MsgReceive(plMessage* msg) { plLOSRequestMsg* requestMsg = plLOSRequestMsg::ConvertNoRef(msg); diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.h b/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.h index 8c066879..ef9d7ac9 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.h +++ b/Sources/Plasma/PubUtilLib/plPhysX/plLOSDispatch.h @@ -59,7 +59,7 @@ public: CLASSNAME_REGISTER(plLOSDispatch); GETINTERFACE_ANY(plLOSDispatch, hsKeyedObject); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); protected: plMessage* ICreateHitMsg(plLOSRequestMsg* requestMsg, hsMatrix44& l2w); diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp index d81f9387..390ab03d 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp @@ -311,7 +311,7 @@ void plPXPhysical::ISetHullToWorldWTriangles() } -hsBool plPXPhysical::IsObjectInsideHull(const hsPoint3& pos) +bool plPXPhysical::IsObjectInsideHull(const hsPoint3& pos) { if (fSaveTriangles) { @@ -327,7 +327,7 @@ hsBool plPXPhysical::IsObjectInsideHull(const hsPoint3& pos) return false; } -hsBool plPXPhysical::Should_I_Trigger(hsBool enter, hsPoint3& pos) +bool plPXPhysical::Should_I_Trigger(bool enter, hsPoint3& pos) { // see if we are inside the detector hull, if so, then don't trigger bool trigger = false; @@ -356,9 +356,9 @@ hsBool plPXPhysical::Should_I_Trigger(hsBool enter, hsPoint3& pos) } -hsBool plPXPhysical::Init(PhysRecipe& recipe) +bool plPXPhysical::Init(PhysRecipe& recipe) { - hsBool startAsleep = false; + bool startAsleep = false; fBoundsType = recipe.bounds; fGroup = recipe.group; fReportsOn = recipe.reportsOn; @@ -577,7 +577,7 @@ hsBool plPXPhysical::Init(PhysRecipe& recipe) ///////////////////////////////////////////////////////////////// // MSGRECEIVE -hsBool plPXPhysical::MsgReceive( plMessage* msg ) +bool plPXPhysical::MsgReceive( plMessage* msg ) { if(plGenRefMsg *refM = plGenRefMsg::ConvertNoRef(msg)) { @@ -610,7 +610,7 @@ hsBool plPXPhysical::MsgReceive( plMessage* msg ) // there's two things we hold references to: subworlds // and the simulation manager. // right now, we're only worrying about the subworlds -hsBool plPXPhysical::HandleRefMsg(plGenRefMsg* refMsg) +bool plPXPhysical::HandleRefMsg(plGenRefMsg* refMsg) { uint8_t refCtxt = refMsg->GetContext(); plKey refKey = refMsg->GetRef()->GetKey(); @@ -655,7 +655,7 @@ hsBool plPXPhysical::HandleRefMsg(plGenRefMsg* refMsg) return true; } -void plPXPhysical::IEnable(hsBool enable) +void plPXPhysical::IEnable(bool enable) { fProps.SetBit(plSimulationInterface::kDisable, !enable); if (!enable) @@ -680,7 +680,7 @@ void plPXPhysical::IEnable(hsBool enable) } } -plPhysical& plPXPhysical::SetProperty(int prop, hsBool status) +plPhysical& plPXPhysical::SetProperty(int prop, bool status) { if (GetProperty(prop) == status) { @@ -713,7 +713,7 @@ plPhysical& plPXPhysical::SetProperty(int prop, hsBool status) { // if the body is already unpinned and you unpin it again, // you'll wipe out its velocity. hence the check. - hsBool current = fActor->readBodyFlag(NX_BF_FROZEN); + bool current = fActor->readBodyFlag(NX_BF_FROZEN); if (status != current) { if (status) @@ -764,14 +764,14 @@ bool CompareMatrices(const hsMatrix44 &matA, const hsMatrix44 &matB, float toler // Called after the simulation has run....sends new positions to the various scene objects // *** want to do this in response to an update message.... -void plPXPhysical::SendNewLocation(hsBool synchTransform, hsBool isSynchUpdate) +void plPXPhysical::SendNewLocation(bool synchTransform, bool isSynchUpdate) { // we only send if: // - the body is active or forceUpdate is on // - the mass is non-zero // - the physical is not passive - hsBool bodyActive = !fActor->isSleeping(); - hsBool dynamic = fActor->isDynamic(); + bool bodyActive = !fActor->isSleeping(); + bool dynamic = fActor->isDynamic(); if ((bodyActive || isSynchUpdate) && dynamic)// && fInitialTransform) { @@ -920,7 +920,7 @@ void plPXPhysical::ISetRotationSim(const hsQuat& rot) } // This form is assumed by convention to be global. -void plPXPhysical::SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, hsBool force) +void plPXPhysical::SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, bool force) { // hsAssert(real_finite(l2w.fMap[0][3]) && real_finite(l2w.fMap[1][3]) && real_finite(l2w.fMap[2][3]), "Bad transform incoming"); @@ -947,9 +947,9 @@ void plPXPhysical::GetTransform(hsMatrix44& l2w, hsMatrix44& w2l) l2w.GetInverse(&w2l); } -hsBool plPXPhysical::GetLinearVelocitySim(hsVector3& vel) const +bool plPXPhysical::GetLinearVelocitySim(hsVector3& vel) const { - hsBool result = false; + bool result = false; if (fActor->isDynamic()) { @@ -973,9 +973,9 @@ void plPXPhysical::ClearLinearVelocity() SetLinearVelocitySim(hsVector3(0, 0, 0)); } -hsBool plPXPhysical::GetAngularVelocitySim(hsVector3& vel) const +bool plPXPhysical::GetAngularVelocitySim(hsVector3& vel) const { - hsBool result = false; + bool result = false; if (fActor->isDynamic()) { vel = plPXConvert::Vector(fActor->getAngularVelocity()); @@ -1195,7 +1195,7 @@ void plPXPhysical::Write(hsStream* stream, hsResMgr* mgr) // TESTING SDL // Send phys sendState msg to object's plPhysicalSDLModifier // -hsBool plPXPhysical::DirtySynchState(const char* SDLStateName, uint32_t synchFlags ) +bool plPXPhysical::DirtySynchState(const char* SDLStateName, uint32_t synchFlags ) { if (GetObjectKey()) { @@ -1252,7 +1252,7 @@ void plPXPhysical::SetSyncState(hsPoint3* pos, hsQuat* rot, hsVector3* linV, hsV SendNewLocation(false, true); } -void plPXPhysical::ExcludeRegionHack(hsBool cleared) +void plPXPhysical::ExcludeRegionHack(bool cleared) { NxShape* shape = fActor->getShapes()[0]; shape->setFlag(NX_TRIGGER_ON_ENTER, !cleared); @@ -1265,13 +1265,13 @@ void plPXPhysical::ExcludeRegionHack(hsBool cleared) plPXPhysicalControllerCore::RebuildCache(); } -hsBool plPXPhysical::OverlapWithCapsule(NxCapsule& cap) +bool plPXPhysical::OverlapWithCapsule(NxCapsule& cap) { NxShape* shape = fActor->getShapes()[0]; return shape->checkOverlapCapsule(cap); } -hsBool plPXPhysical::IsDynamic() const +bool plPXPhysical::IsDynamic() const { return fGroup == plSimDefs::kGroupDynamic && !GetProperty(plSimulationInterface::kPhysAnim); @@ -1332,7 +1332,7 @@ plDrawableSpans* plPXPhysical::CreateProxy(hsGMaterial* mat, hsTArray& hsMatrix44 l2w, unused; GetTransform(l2w, unused); - hsBool blended = ((mat->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask)); + bool blended = ((mat->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask)); NxShape* shape = fActor->getShapes()[0]; diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.h b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.h index fbcd32e8..693fbc97 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.h +++ b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.h @@ -120,18 +120,18 @@ public: GETINTERFACE_ANY(plPXPhysical, plPhysical); // Export time and internal use only - hsBool Init(PhysRecipe& recipe); + bool Init(PhysRecipe& recipe); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // // From plPhysical // - virtual plPhysical& SetProperty(int prop, hsBool b); - virtual hsBool GetProperty(int prop) const { return fProps.IsBitSet(prop) != 0; } + virtual plPhysical& SetProperty(int prop, bool b); + virtual bool GetProperty(int prop) const { return fProps.IsBitSet(prop) != 0; } virtual void SetObjectKey(plKey key) { fObjectKey = key; } virtual plKey GetObjectKey() const { return fObjectKey; } @@ -139,14 +139,14 @@ public: virtual void SetSceneNode(plKey node); virtual plKey GetSceneNode() const; - virtual hsBool GetLinearVelocitySim(hsVector3& vel) const; + virtual bool GetLinearVelocitySim(hsVector3& vel) const; virtual void SetLinearVelocitySim(const hsVector3& vel); virtual void ClearLinearVelocity(); - virtual hsBool GetAngularVelocitySim(hsVector3& vel) const; + virtual bool GetAngularVelocitySim(hsVector3& vel) const; virtual void SetAngularVelocitySim(const hsVector3& vel); - virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, hsBool force=false); + virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, bool force=false); virtual void GetTransform(hsMatrix44& l2w, hsMatrix44& w2l); virtual int GetGroup() const { return fGroup; } @@ -154,12 +154,12 @@ public: virtual void AddLOSDB(uint16_t flag) { hsSetBits(fLOSDBs, flag); } virtual void RemoveLOSDB(uint16_t flag) { hsClearBits(fLOSDBs, flag); } virtual uint16_t GetAllLOSDBs() { return fLOSDBs; } - virtual hsBool IsInLOSDB(uint16_t flag) { return hsCheckBits(fLOSDBs, flag); } + virtual bool IsInLOSDB(uint16_t flag) { return hsCheckBits(fLOSDBs, flag); } - virtual hsBool DoDetectorHullWorkaround() { return fSaveTriangles ? true : false; } - virtual hsBool Should_I_Trigger(hsBool enter, hsPoint3& pos); - virtual hsBool IsObjectInsideHull(const hsPoint3& pos); - virtual void SetInsideConvexHull(hsBool inside) { fInsideConvexHull = inside; } + virtual bool DoDetectorHullWorkaround() { return fSaveTriangles ? true : false; } + virtual bool Should_I_Trigger(bool enter, hsPoint3& pos); + virtual bool IsObjectInsideHull(const hsPoint3& pos); + virtual void SetInsideConvexHull(bool inside) { fInsideConvexHull = inside; } virtual plKey GetWorldKey() const { return fWorldKey; } @@ -167,7 +167,7 @@ public: virtual void GetPositionSim(hsPoint3& pos) const { IGetPositionSim(pos); } - virtual void SendNewLocation(hsBool synchTransform = false, hsBool isSynchUpdate = false); + virtual void SendNewLocation(bool synchTransform = false, bool isSynchUpdate = false); virtual void SetHitForce(const hsVector3& force, const hsPoint3& pos) { fWeWereHit=true; fHitForce = force; fHitPos = pos; } virtual void ApplyHitForce(); @@ -176,20 +176,20 @@ public: virtual void GetSyncState(hsPoint3& pos, hsQuat& rot, hsVector3& linV, hsVector3& angV); virtual void SetSyncState(hsPoint3* pos, hsQuat* rot, hsVector3* linV, hsVector3* angV); - virtual void ExcludeRegionHack(hsBool cleared); + virtual void ExcludeRegionHack(bool cleared); virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray& idx, plDrawableSpans* addTo); - hsBool DoReportOn(plSimDefs::Group group) const { return hsCheckBits(fReportsOn, 1<GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask)); + bool blended = ((mat->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask)); float radius = fRadius; myDraw = plDrawableGenerator::GenerateSphericalDrawable(fLocalPosition, radius, mat, fLastGlobalLoc, blended, @@ -1233,7 +1233,7 @@ plDrawableSpans* plPXPhysicalController::CreateProxy(hsGMaterial* mat, hsTArray< plSceneObject* so = plSceneObject::ConvertNoRef(fOwner->ObjectIsLoaded()); if (so) { - hsBool blended = ((mat->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask)); + bool blended = ((mat->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask)); myDraw = plDrawableGenerator::GenerateConicalDrawable(fRadius*10, fHeight*10, mat, so->GetLocalToWorld(), blended, diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalController.h b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalController.h index 75acced2..be03fabe 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalController.h +++ b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalController.h @@ -61,7 +61,7 @@ class plDbgCollisionInfo public: plSceneObject *fSO; hsVector3 fNormal; - hsBool fOverlap; + bool fOverlap; }; #endif // PLASMA_EXTERNAL_RELEASE @@ -134,7 +134,7 @@ public: virtual void SetSeek(bool seek){fSeeking=seek;} virtual void GetWorldSpaceCapsule(NxCapsule& cap); #ifndef PLASMA_EXTERNAL_RELEASE - static hsBool fDebugDisplay; + static bool fDebugDisplay; #endif // PLASMA_EXTERNAL_RELEASE protected: diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp index 7e546333..cdb1b968 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp @@ -77,7 +77,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PLASMA_EXTERNAL_RELEASE -hsBool plPXPhysicalControllerCore::fDebugDisplay = false; +bool plPXPhysicalControllerCore::fDebugDisplay = false; #endif // PLASMA_EXTERNAL_RELEASE int plPXPhysicalControllerCore::fPXControllersMax = 0; @@ -1003,7 +1003,7 @@ void plPXPhysicalControllerCore::LeaveAge() if(fWorldKey) this->SetSubworld(nil); this->fMovementInterface->LeaveAge(); } -int plPXPhysicalControllerCore::SweepControllerPath(const hsPoint3& startPos, const hsPoint3& endPos, hsBool vsDynamics, hsBool vsStatics, +int plPXPhysicalControllerCore::SweepControllerPath(const hsPoint3& startPos, const hsPoint3& endPos, bool vsDynamics, bool vsStatics, uint32_t& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut) { NxCapsule tempCap; @@ -1054,7 +1054,7 @@ int plPXPhysicalControllerCore::SweepControllerPath(const hsPoint3& startPos, co return HitsReturned; } -void plPXPhysicalControllerCore::BehaveLikeAnimatedPhysical(hsBool actLikeAnAnimatedPhys) +void plPXPhysicalControllerCore::BehaveLikeAnimatedPhysical(bool actLikeAnAnimatedPhys) { hsAssert(fKinematicActor, "Changing behavior, but plPXPhysicalControllerCore has no Kinematic actor associated with it"); if(fBehavingLikeAnimatedPhys!=actLikeAnAnimatedPhys) @@ -1085,7 +1085,7 @@ void plPXPhysicalControllerCore::BehaveLikeAnimatedPhysical(hsBool actLikeAnAnim } } -hsBool plPXPhysicalControllerCore::BehavingLikeAnAnimatedPhysical() +bool plPXPhysicalControllerCore::BehavingLikeAnAnimatedPhysical() { hsAssert(fKinematicActor, "plPXPhysicalControllerCore is missing a kinematic actor"); return fBehavingLikeAnimatedPhys; @@ -1139,7 +1139,7 @@ const hsVector3& plPXPhysicalControllerCore::GetLinearVelocity() plDrawableSpans* plPXPhysicalControllerCore::CreateProxy(hsGMaterial* mat, hsTArray& idx, plDrawableSpans* addTo) { plDrawableSpans* myDraw = addTo; - hsBool blended = ((mat->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask)); + bool blended = ((mat->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask)); float radius = fRadius; myDraw = plDrawableGenerator::GenerateSphericalDrawable(fLocalPosition, radius, mat, fLastGlobalLoc, blended, @@ -1149,7 +1149,7 @@ plDrawableSpans* plPXPhysicalControllerCore::CreateProxy(hsGMaterial* mat, hsTAr plSceneObject* so = plSceneObject::ConvertNoRef(fOwner->ObjectIsLoaded()); if (so) { - hsBool blended = ((mat->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask)); + bool blended = ((mat->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask)); myDraw = plDrawableGenerator::GenerateConicalDrawable(fRadius*10, fHeight*10, mat, so->GetLocalToWorld(), blended, diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.h b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.h index c4dcb935..a2dad48e 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.h +++ b/Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.h @@ -61,7 +61,7 @@ class plDbgCollisionInfo public: plSceneObject *fSO; hsVector3 fNormal; - hsBool fOverlap; + bool fOverlap; }; #endif // PLASMA_EXTERNAL_RELEASE class plPXPhysicalControllerCore: public plPhysicalControllerCore @@ -118,13 +118,13 @@ public: static void UpdatePostSimStep(float delSecs); virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray& idx, plDrawableSpans* addTo); #ifndef PLASMA_EXTERNAL_RELEASE - static hsBool fDebugDisplay; + static bool fDebugDisplay; #endif // PLASMA_EXTERNAL_RELEASE static void SetMaxNumberOfControllers(int max) { fPXControllersMax = max; } static int fPXControllersMax; - virtual int SweepControllerPath(const hsPoint3& startPos, const hsPoint3& endPos, hsBool vsDynamics, hsBool vsStatics, uint32_t& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut); - virtual void BehaveLikeAnimatedPhysical(hsBool actLikeAnAnimatedPhys); - virtual hsBool BehavingLikeAnAnimatedPhysical(); + virtual int SweepControllerPath(const hsPoint3& startPos, const hsPoint3& endPos, bool vsDynamics, bool vsStatics, uint32_t& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut); + virtual void BehaveLikeAnimatedPhysical(bool actLikeAnAnimatedPhys); + virtual bool BehavingLikeAnAnimatedPhysical(); virtual const hsVector3& GetLinearVelocity(); virtual void SetLinearVelocity(const hsVector3& linearVel); @@ -156,5 +156,5 @@ protected: // The global position and rotation of the avatar last time we set it (so we // can detect if someone else moves him) plPhysicalProxy* fProxyGen; - hsBool fBehavingLikeAnimatedPhys; + bool fBehavingLikeAnimatedPhys; }; diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp b/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp index 97454212..5a4b768e 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp @@ -72,7 +72,7 @@ class SensorReport : public NxUserTriggerReport { // Get our trigger physical. This should definitely have a plPXPhysical plPXPhysical* triggerPhys = (plPXPhysical*)triggerShape.getActor().userData; - hsBool doReport = false; + bool doReport = false; // Get the triggerer. This may be an avatar, which doesn't have a // plPXPhysical, so we have to extract the necessary info. @@ -507,7 +507,7 @@ void plSimulationMgr::ReleaseScene(plKey world) } } -void plSimulationMgr::ISendCollisionMsg(plKey receiver, plKey hitter, hsBool entering) +void plSimulationMgr::ISendCollisionMsg(plKey receiver, plKey hitter, bool entering) { DetectorLogYellow("Collision: %s is inside %s. Sending an %s msg", hitter ? hitter->GetName().c_str() : "(nil)", receiver->GetName().c_str(), entering ? "'enter'" : "'exit'"); @@ -774,7 +774,7 @@ void plSimulationMgr::ISendUpdates() } } -hsBool plSimulationMgr::MsgReceive(plMessage *msg) +bool plSimulationMgr::MsgReceive(plMessage *msg) { // Suspend/resume the simulation based on whether or not we're in an age... if (plAgeLoadedMsg* aMsg = plAgeLoadedMsg::ConvertNoRef(msg)) diff --git a/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h b/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h index d25ae4ac..2cf07d90 100644 --- a/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h +++ b/Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.h @@ -75,7 +75,7 @@ public: // Advance the simulation by the given number of seconds void Advance(float delSecs); - hsBool MsgReceive(plMessage* msg); + bool MsgReceive(plMessage* msg); // The simulation won't run at all if it is suspended void Suspend() { fSuspended = true; } @@ -122,7 +122,7 @@ protected: void IProcessSynchs(); // PHYSX FIXME send a collision message - should only be used with UpdateDetectorsInScene - void ISendCollisionMsg(plKey receiver, plKey hitter, hsBool entering); + void ISendCollisionMsg(plKey receiver, plKey hitter, bool entering); NxPhysicsSDK* fSDK; diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp b/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp index 57a3648d..43cfef3f 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp @@ -98,7 +98,7 @@ bool plCollisionDetector::IIsDisabledAvatar(plKey key) return (plAvBrainDrive::ConvertNoRef(avBrain) != nil); } -hsBool plCollisionDetector::MsgReceive(plMessage* msg) +bool plCollisionDetector::MsgReceive(plMessage* msg) { plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg); @@ -292,7 +292,7 @@ void plCameraRegionDetector::ISendSavedTriggerMsgs() } -hsBool plCameraRegionDetector::MsgReceive(plMessage* msg) +bool plCameraRegionDetector::MsgReceive(plMessage* msg) { plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg); if (pCollMsg) @@ -379,7 +379,7 @@ void plObjectInVolumeDetector::ISendSavedTriggerMsgs() fSavedActivatorMsg = nil; } -hsBool plObjectInVolumeDetector::MsgReceive(plMessage* msg) +bool plObjectInVolumeDetector::MsgReceive(plMessage* msg) { plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg); if (pCollMsg) @@ -496,7 +496,7 @@ void plObjectInVolumeAndFacingDetector::ICheckForTrigger() } } -hsBool plObjectInVolumeAndFacingDetector::MsgReceive(plMessage* msg) +bool plObjectInVolumeAndFacingDetector::MsgReceive(plMessage* msg) { // Avatar is entering or exiting our detector box plCollideMsg* collMsg = plCollideMsg::ConvertNoRef(msg); @@ -548,7 +548,7 @@ void plObjectInVolumeAndFacingDetector::Read(hsStream* stream, hsResMgr* mgr) plObjectInVolumeDetector::Read(stream, mgr); fFacingTolerance = stream->ReadLEScalar(); - fNeedWalkingForward = stream->Readbool(); + fNeedWalkingForward = stream->ReadBool(); } void plObjectInVolumeAndFacingDetector::Write(hsStream* stream, hsResMgr* mgr) @@ -556,7 +556,7 @@ void plObjectInVolumeAndFacingDetector::Write(hsStream* stream, hsResMgr* mgr) plObjectInVolumeDetector::Write(stream, mgr); stream->WriteLEScalar(fFacingTolerance); - stream->Writebool(fNeedWalkingForward); + stream->WriteBool(fNeedWalkingForward); } ///////////////////////////////// @@ -570,7 +570,7 @@ plSubworldRegionDetector::~plSubworldRegionDetector() } -hsBool plSubworldRegionDetector::MsgReceive(plMessage* msg) +bool plSubworldRegionDetector::MsgReceive(plMessage* msg) { plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg); @@ -631,7 +631,7 @@ void plSubworldRegionDetector::Write(hsStream* stream, hsResMgr* mgr) /////////////////////////////////// /// plPanicLinkDetector /////////////////////////////////// -hsBool plPanicLinkRegion::MsgReceive(plMessage* msg) +bool plPanicLinkRegion::MsgReceive(plMessage* msg) { if (plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg)) { @@ -710,17 +710,17 @@ void plSimpleRegionSensor::Write(hsStream *stream, hsResMgr *mgr) plSingleModifier::Write(stream, mgr); if(fEnterMsg) { - stream->Writebool(true); + stream->WriteBool(true); mgr->WriteCreatable(stream, fEnterMsg); } else { - stream->Writebool(false); + stream->WriteBool(false); } if(fExitMsg) { - stream->Writebool(true); + stream->WriteBool(true); mgr->WriteCreatable(stream, fExitMsg); } else { - stream->Writebool(false); + stream->WriteBool(false); } } @@ -728,14 +728,14 @@ void plSimpleRegionSensor::Write(hsStream *stream, hsResMgr *mgr) void plSimpleRegionSensor::Read(hsStream *stream, hsResMgr *mgr) { plSingleModifier::Read(stream, mgr); - if(stream->Readbool()) + if(stream->ReadBool()) { fEnterMsg = plMessage::ConvertNoRef(mgr->ReadCreatable(stream)); } else { fEnterMsg = nil; } - if(stream->Readbool()) + if(stream->ReadBool()) { fExitMsg = plMessage::ConvertNoRef(mgr->ReadCreatable(stream)); hsAssert(fExitMsg, "Corrupted plSimpleRegionSensor during read."); @@ -745,7 +745,7 @@ void plSimpleRegionSensor::Read(hsStream *stream, hsResMgr *mgr) } // MSGRECEIVE -hsBool plSimpleRegionSensor::MsgReceive(plMessage *msg) +bool plSimpleRegionSensor::MsgReceive(plMessage *msg) { plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg); @@ -782,7 +782,7 @@ hsBool plSimpleRegionSensor::MsgReceive(plMessage *msg) } // IEVAL -hsBool plSimpleRegionSensor::IEval(double secs, float del, uint32_t dirty) +bool plSimpleRegionSensor::IEval(double secs, float del, uint32_t dirty) { return false; } @@ -807,7 +807,7 @@ void plSwimDetector::Read(hsStream *stream, hsResMgr *mgr) stream->ReadLEScalar(); stream->ReadLEScalar(); } -hsBool plSwimDetector::MsgReceive(plMessage *msg) +bool plSwimDetector::MsgReceive(plMessage *msg) { plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg); @@ -841,7 +841,7 @@ hsBool plSwimDetector::MsgReceive(plMessage *msg) } return plSimpleRegionSensor::MsgReceive(msg); } -hsBool plRidingAnimatedPhysicalDetector::MsgReceive(plMessage *msg) +bool plRidingAnimatedPhysicalDetector::MsgReceive(plMessage *msg) { plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg); diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.h b/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.h index f2fa65ea..d350341f 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.h +++ b/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.h @@ -57,7 +57,7 @@ class plCollisionDetector : public plDetectorModifier { protected: int8_t fType; - hsBool fBumped, fTriggered; + bool fBumped, fTriggered; plArmatureMod* IGetAvatarModifier(plKey key); bool IIsDisabledAvatar(plKey key); @@ -77,7 +77,7 @@ public: plCollisionDetector(int8_t type) : fType(type), fTriggered(false), fBumped(false) { } virtual ~plCollisionDetector(){;} - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); CLASSNAME_REGISTER( plCollisionDetector ); GETINTERFACE_ANY( plCollisionDetector, plDetectorModifier ); @@ -112,7 +112,7 @@ public: virtual ~plObjectInVolumeDetector() { } - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); CLASSNAME_REGISTER(plObjectInVolumeDetector); GETINTERFACE_ANY(plObjectInVolumeDetector, plCollisionDetector); @@ -138,7 +138,7 @@ public: plObjectInVolumeAndFacingDetector(); virtual ~plObjectInVolumeAndFacingDetector(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); CLASSNAME_REGISTER(plObjectInVolumeAndFacingDetector); GETINTERFACE_ANY(plObjectInVolumeAndFacingDetector, plObjectInVolumeDetector); @@ -171,7 +171,7 @@ public: { } ~plCameraRegionDetector(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void AddMessage(plCameraMsg* pMsg) { fMessages.push_back(pMsg); } CLASSNAME_REGISTER( plCameraRegionDetector ); @@ -188,7 +188,7 @@ class plSubworldRegionDetector : public plCollisionDetector { protected: plKey fSub; - hsBool fOnExit; + bool fOnExit; public: enum @@ -198,9 +198,9 @@ public: plSubworldRegionDetector() : fSub(nil), fOnExit(false){;} ~plSubworldRegionDetector(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void SetSubworldKey(plKey pKey) { fSub = pKey; } - void SetTriggerOnExit(hsBool b) { fOnExit = b; } + void SetTriggerOnExit(bool b) { fOnExit = b; } CLASSNAME_REGISTER( plSubworldRegionDetector ); GETINTERFACE_ANY( plSubworldRegionDetector, plCollisionDetector ); @@ -214,12 +214,12 @@ public: class plPanicLinkRegion : public plCollisionDetector { public: - hsBool fPlayLinkOutAnim; + bool fPlayLinkOutAnim; plPanicLinkRegion() : fPlayLinkOutAnim(true) { } - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); CLASSNAME_REGISTER( plPanicLinkRegion ); GETINTERFACE_ANY( plPanicLinkRegion, plCollisionDetector ); @@ -242,14 +242,14 @@ public: plSimpleRegionSensor(plMessage *enterMsg, plMessage *exitMsg); virtual ~plSimpleRegionSensor(); - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); CLASSNAME_REGISTER( plSimpleRegionSensor ); GETINTERFACE_ANY( plSimpleRegionSensor, plSingleModifier); virtual void Write(hsStream *stream, hsResMgr *mgr); virtual void Read(hsStream *stream, hsResMgr *mgr); - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); protected: plMessage *fEnterMsg; plMessage *fExitMsg; @@ -269,7 +269,7 @@ public: virtual void Write(hsStream *stream, hsResMgr *mgr); virtual void Read(hsStream *stream, hsResMgr *mgr); - hsBool MsgReceive(plMessage *msg); + bool MsgReceive(plMessage *msg); }; class plRidingAnimatedPhysicalDetector: public plSimpleRegionSensor { @@ -277,7 +277,7 @@ public: plRidingAnimatedPhysicalDetector(){} plRidingAnimatedPhysicalDetector(plMessage *enterMsg, plMessage *exitMsg) : plSimpleRegionSensor(enterMsg, exitMsg) {} virtual ~plRidingAnimatedPhysicalDetector(){} - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); CLASSNAME_REGISTER( plRidingAnimatedPhysicalDetector ); GETINTERFACE_ANY( plRidingAnimatedPhysicalDetector, plSimpleRegionSensor); }; diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plDetectorModifier.h b/Sources/Plasma/PubUtilLib/plPhysical/plDetectorModifier.h index d2cab1be..91bf7857 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plDetectorModifier.h +++ b/Sources/Plasma/PubUtilLib/plPhysical/plDetectorModifier.h @@ -51,7 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plDetectorModifier : public plSingleModifier { protected: - virtual hsBool IEval(double secs, float del, uint32_t dirty){ return true; } + virtual bool IEval(double secs, float del, uint32_t dirty){ return true; } hsTArray fReceivers; plModifier* fRemoteMod; @@ -61,7 +61,7 @@ public: plDetectorModifier() : fRemoteMod(nil),fProxyKey(nil){;} virtual ~plDetectorModifier(){;} -// virtual hsBool MsgReceive(plMessage* msg) = 0; +// virtual bool MsgReceive(plMessage* msg) = 0; CLASSNAME_REGISTER( plDetectorModifier ); GETINTERFACE_ANY( plDetectorModifier, plSingleModifier ); diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.cpp b/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.cpp index 6e115f89..00601921 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.cpp @@ -80,7 +80,7 @@ bool plPhysicalSndGroup::HasImpactSound(uint32_t against) return against < fImpactSounds.GetCount(); } -hsBool plPhysicalSndGroup::MsgReceive( plMessage *pMsg ) +bool plPhysicalSndGroup::MsgReceive( plMessage *pMsg ) { return hsKeyedObject::MsgReceive( pMsg ); } diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.h b/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.h index f22a67cd..bc90b31b 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.h +++ b/Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSndGroup.h @@ -80,7 +80,7 @@ public: GETINTERFACE_ANY( plPhysicalSndGroup, hsKeyedObject ); // Our required virtual - virtual hsBool MsgReceive( plMessage *pMsg ); + virtual bool MsgReceive( plMessage *pMsg ); virtual void Read( hsStream *s, hsResMgr *mgr ); virtual void Write( hsStream *s, hsResMgr *mgr ); diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.cpp b/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.cpp index 145f68b3..263d3acc 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.cpp @@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plgDispatch.h" -hsBool plPickingDetector::MsgReceive(plMessage* msg) +bool plPickingDetector::MsgReceive(plMessage* msg) { plObjRefMsg* refMsg = plObjRefMsg::ConvertNoRef(msg); diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.h b/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.h index 660043d2..607b4e66 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.h +++ b/Sources/Plasma/PubUtilLib/plPhysical/plPickingDetector.h @@ -55,7 +55,7 @@ public: plPickingDetector(){;} virtual ~plPickingDetector(){;} - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); CLASSNAME_REGISTER( plPickingDetector ); GETINTERFACE_ANY( plPickingDetector, plDetectorModifier ); @@ -70,7 +70,7 @@ public: plPickingDetector(){;} virtual ~plPickingDetector(){;} - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); CLASSNAME_REGISTER( plPickingDetector ); GETINTERFACE_ANY( plPickingDetector, plDetectorModifier ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp index c053443d..33d623ba 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp @@ -76,7 +76,7 @@ hsG3DDeviceMode::~hsG3DDeviceMode() Clear(); } -hsBool hsG3DDeviceMode::operator< (const hsG3DDeviceMode &mode) const +bool hsG3DDeviceMode::operator< (const hsG3DDeviceMode &mode) const { // Color depth overrides everything else if (fDepth < mode.GetColorDepth()) @@ -415,19 +415,19 @@ void hsG3DDeviceRecord::Write(hsStream* s) const int len; - len = hsStrlen(fG3DDriverDesc); + len = strlen(fG3DDriverDesc); s->WriteLE32(len); s->Write(len, fG3DDriverDesc); - len = hsStrlen(fG3DDriverName); + len = strlen(fG3DDriverName); s->WriteLE32(len); s->Write(len, fG3DDriverName); - len = hsStrlen(fG3DDriverVersion); + len = strlen(fG3DDriverVersion); s->WriteLE32(len); s->Write(len, fG3DDriverVersion); - len = hsStrlen(fG3DDeviceDesc); + len = strlen(fG3DDeviceDesc); s->WriteLE32(len); s->Write(len, fG3DDeviceDesc); @@ -526,7 +526,7 @@ void hsG3DDeviceSelector::Clear() fRecords.Reset(); } -void hsG3DDeviceSelector::RemoveUnusableDevModes(hsBool bTough) +void hsG3DDeviceSelector::RemoveUnusableDevModes(bool bTough) { plDemoDebugFile::Write( "Removing unusable devices and modes..." ); for (int i = 0; i < fRecords.GetCount(); i++) @@ -652,7 +652,7 @@ uint32_t hsG3DDeviceSelector::IAdjustDirectXMemory( uint32_t cardMem ) #endif } -hsBool hsG3DDeviceSelector::Init( void ) +bool hsG3DDeviceSelector::Init( void ) { // See if we're all capable of initing if( !IInitDirect3D() ) @@ -696,7 +696,7 @@ void hsG3DDeviceSelector::Enumerate(hsWinRef winRef) #endif } -hsBool hsG3DDeviceSelector::GetDefault (hsG3DDeviceModeRecord *dmr) +bool hsG3DDeviceSelector::GetDefault (hsG3DDeviceModeRecord *dmr) { int32_t iTnL, iD3D, iOpenGL, device, mode, i; device = iTnL = iD3D = iOpenGL = mode = -1; @@ -999,10 +999,10 @@ void hsG3DDeviceSelector::IGetOpenGLModes( hsG3DDeviceRecord &devRec, char *d // Tests all the possible OpenGL settings once the screen has been set // to a given test resolution. -hsBool hsG3DDeviceSelector::ITestOpenGLRes( int width, int height, int bitDepth, +bool hsG3DDeviceSelector::ITestOpenGLRes( int width, int height, int bitDepth, hsG3DDeviceRecord &devRec, char *driverName ) { - hsBool retValue = false; + bool retValue = false; #ifdef HS_OPEN_GL #if HS_BUILD_FOR_WIN32 @@ -1169,7 +1169,7 @@ void hsG3DDeviceSelector::IGetExtOpenGLInfo( hsG3DDeviceRecord &devRec ) #ifdef HS_OPEN_GL #if HS_BUILD_FOR_WIN32 -uint32_t hsG3DDeviceSelector::ICreateTempOpenGLContext( HDC hDC, hsBool32 makeItFull ) +uint32_t hsG3DDeviceSelector::ICreateTempOpenGLContext( HDC hDC, bool32 makeItFull ) { DEVMODE modeInfo; int pixFmt; @@ -1875,9 +1875,9 @@ void hsG3DDeviceSelector::ISetFudgeFactors( uint8_t chipsetID, hsG3DDeviceRec #if M3DDEMOINFO // Demo Debug Build static plDemoDebugFile sMyDDFWriter; -hsBool plDemoDebugFile::fIsOpen = false; +bool plDemoDebugFile::fIsOpen = false; FILE *plDemoDebugFile::fDemoDebugFP = nil; -hsBool plDemoDebugFile::fEnabled = false; +bool plDemoDebugFile::fEnabled = false; #endif @@ -1885,7 +1885,7 @@ hsBool plDemoDebugFile::fEnabled = false; // Internal function--opens the demo debug file for writing. Returns true // if successful, false otherwise. -hsBool plDemoDebugFile::IDDFOpen( void ) +bool plDemoDebugFile::IDDFOpen( void ) { #if M3DDEMOINFO // Demo Debug Build char fileName[] = "log/debug_info.dat"; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h index 1eaf1e7e..e2c63c3c 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h @@ -96,37 +96,37 @@ protected: // Each entry is of the form: ( stencil bit count << 8 ) | ( depth bit count ) hsTArray fFSAATypes; // Array of multisample types supported (each one 2-16) - hsBool fCanRenderToCubics; + bool fCanRenderToCubics; public: hsG3DDeviceMode(); ~hsG3DDeviceMode(); - hsBool operator< (const hsG3DDeviceMode &mode) const; + bool operator< (const hsG3DDeviceMode &mode) const; void Clear(); - hsBool GetDiscarded() const { return 0 != (fFlags & kDiscarded); } + bool GetDiscarded() const { return 0 != (fFlags & kDiscarded); } uint32_t GetWidth() const { return fWidth; } uint32_t GetHeight() const { return fHeight; } uint32_t GetColorDepth() const { return fDepth; } - uint8_t GetNumZStencilDepths( void ) const { return fZStencilDepths.GetCount(); } - uint16_t GetZStencilDepth( uint8_t i ) const { return fZStencilDepths[ i ]; } - uint8_t GetNumFSAATypes( void ) const { return fFSAATypes.GetCount(); } - uint8_t GetFSAAType( uint8_t i ) const { return fFSAATypes[ i ]; } - hsBool GetCanRenderToCubics( void ) const { return fCanRenderToCubics; } + uint8_t GetNumZStencilDepths( void ) const { return fZStencilDepths.GetCount(); } + uint16_t GetZStencilDepth( uint8_t i ) const { return fZStencilDepths[ i ]; } + uint8_t GetNumFSAATypes( void ) const { return fFSAATypes.GetCount(); } + uint8_t GetFSAAType( uint8_t i ) const { return fFSAATypes[ i ]; } + bool GetCanRenderToCubics( void ) const { return fCanRenderToCubics; } - void SetDiscarded(hsBool on=true) { if(on) fFlags |= kDiscarded; else fFlags &= ~kDiscarded; } + void SetDiscarded(bool on=true) { if(on) fFlags |= kDiscarded; else fFlags &= ~kDiscarded; } void SetWidth(uint32_t w) { fWidth = w; } void SetHeight(uint32_t h) { fHeight = h; } void SetColorDepth(uint32_t d) { fDepth = d; } - void ClearZStencilDepths( void ) { fZStencilDepths.Reset(); } - void AddZStencilDepth( uint16_t depth ) { fZStencilDepths.Append( depth ); } + void ClearZStencilDepths( void ) { fZStencilDepths.Reset(); } + void AddZStencilDepth( uint16_t depth ) { fZStencilDepths.Append( depth ); } void ClearFSAATypes( void ) { fFSAATypes.Reset(); } void AddFSAAType( uint8_t type ) { fFSAATypes.Append( type ); } - void SetCanRenderToCubics( hsBool can ) { fCanRenderToCubics = can; } + void SetCanRenderToCubics( bool can ) { fCanRenderToCubics = can; } void Read(hsStream* s); void Write(hsStream* s) const; @@ -232,8 +232,8 @@ public: void SetDriverVersion(const char* s); void SetDeviceDesc(const char* s); - hsBool GetCap(uint32_t cap) const { return fCaps.IsBitSet(cap); } - void SetCap(uint32_t cap, hsBool on=true) { fCaps.SetBit(cap, on); } + bool GetCap(uint32_t cap) const { return fCaps.IsBitSet(cap); } + void SetCap(uint32_t cap, bool on=true) { fCaps.SetBit(cap, on); } float GetZBiasRating( void ) const { return fZBiasRating; } void SetZBiasRating( float rating ) { fZBiasRating = rating; } @@ -261,11 +261,11 @@ public: uint8_t GetMaxAnisotropicSamples( void ) const { return fMaxAnisotropicSamples; } void SetMaxAnisotropicSamples( uint8_t num ) { fMaxAnisotropicSamples = num; } - void SetDiscarded(hsBool on=true) { if(on)fFlags |= kDiscarded; else fFlags &= ~kDiscarded; } - hsBool GetDiscarded() const { return 0 != (fFlags & kDiscarded); } + void SetDiscarded(bool on=true) { if(on)fFlags |= kDiscarded; else fFlags &= ~kDiscarded; } + bool GetDiscarded() const { return 0 != (fFlags & kDiscarded); } - void SetInvalid( hsBool on = true ) { if( on ) fFlags |= kInvalid; else fFlags &= ~kInvalid; } - hsBool IsInvalid() const { return 0 != ( fFlags & kInvalid ); } + void SetInvalid( bool on = true ) { if( on ) fFlags |= kInvalid; else fFlags &= ~kInvalid; } + bool IsInvalid() const { return 0 != ( fFlags & kInvalid ); } hsTArray& GetModes() { return fModes; } @@ -279,7 +279,7 @@ public: // of the PC. E.g. if the user changes from 16 bit to TrueColor, the Modes that // can window are pretty much flipped. So we'll have to pass in enough info (like // the hWnd?) to find out what the current setup is to make sure it's compatible. - hsBool ModeCanWindow(void* ctx, hsG3DDeviceMode* mode) { return false; } + bool ModeCanWindow(void* ctx, hsG3DDeviceMode* mode) { return false; } void SetPixelShaderVersion(int major, int minor) { fPixelShaderMajorVer = major; fPixelShaderMinorVer = minor; } void GetPixelShaderVersion(int &major, int &minor) { major = fPixelShaderMajorVer; minor = fPixelShaderMinorVer; } @@ -384,7 +384,7 @@ protected: void ITryDirect3DTnLDevice(D3DEnum_DeviceInfo* devInfo, hsG3DDeviceRecord& srcDevRec); void ITryDirect3DTnLDriver(D3DEnum_DriverInfo* drivInfo); void ITryDirect3DTnL(hsWinRef winRef); - hsBool IInitDirect3D( void ); + bool IInitDirect3D( void ); #ifdef HS_SELECT_DX7 void ITryDirect3DDevice(D3DEnum_DeviceInfo* devInfo, hsG3DDeviceRecord& srcDevRec); @@ -395,21 +395,21 @@ protected: D3DEnum_DriverInfo *driverInfo, D3DEnum_DeviceInfo *deviceInfo ); uint32_t IAdjustDirectXMemory( uint32_t cardMem ); - hsBool IGetD3DCardInfo( hsG3DDeviceRecord &record, void *driverInfo, void *deviceInfo, - DWORD *vendorID, DWORD *deviceID, char **driverString, char **descString ); + bool IGetD3DCardInfo( hsG3DDeviceRecord &record, void *driverInfo, void *deviceInfo, + DWORD *vendorID, DWORD *deviceID, char **driverString, char **descString ); #ifdef HS_SELECT_DX7 - hsBool IGetD3D7CardInfo( hsG3DDeviceRecord &record, void *driverInfo, void *deviceInfo, + bool IGetD3D7CardInfo( hsG3DDeviceRecord &record, void *driverInfo, void *deviceInfo, DWORD *vendorID, DWORD *deviceID, char **driverString, char **descString ); #endif // HS_SELECT_DX7 void ITryOpenGL( hsWinRef winRef ); void IGetExtOpenGLInfo( hsG3DDeviceRecord &devRec ); void IGetOpenGLModes( hsG3DDeviceRecord &devRec, char *driverName ); - hsBool ITestOpenGLRes( int width, int height, int bitDepth, + bool ITestOpenGLRes( int width, int height, int bitDepth, hsG3DDeviceRecord &devRec, char *driverName ); #ifdef HS_OPEN_GL #if HS_BUILD_FOR_WIN32 - uint32_t ICreateTempOpenGLContext( HDC hDC, hsBool makeItFull ); + uint32_t ICreateTempOpenGLContext( HDC hDC, bool makeItFull ); #endif #endif @@ -421,15 +421,15 @@ public: void Clear(); void RemoveDiscarded(); - void RemoveUnusableDevModes(hsBool bTough); // Removes modes and devices not allowed supported in release + void RemoveUnusableDevModes(bool bTough); // Removes modes and devices not allowed supported in release - hsBool Init( void ); // Returns false if couldn't init + bool Init( void ); // Returns false if couldn't init const char *GetErrorString( void ) { return fErrorString; } void Enumerate(hsWinRef winRef); hsTArray& GetDeviceRecords() { return fRecords; } - hsBool GetDefault(hsG3DDeviceModeRecord *dmr); + bool GetDefault(hsG3DDeviceModeRecord *dmr); hsG3DDeviceRecord* GetRecord(int i) { return &fRecords[i]; } @@ -466,15 +466,15 @@ class plDemoDebugFile static void Write( char *string1, int32_t value ); // Enables or disables the DDF class - static void Enable( hsBool yes ) { fEnabled = yes; } + static void Enable( bool yes ) { fEnabled = yes; } protected: - static hsBool fIsOpen; + static bool fIsOpen; static FILE *fDemoDebugFP; - static hsBool fEnabled; + static bool fEnabled; // Opens the DDF for writing - static hsBool IDDFOpen( void ); + static bool IDDFOpen( void ); // Closes the DDF static void IDDFClose( void ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsGColorizer.cpp b/Sources/Plasma/PubUtilLib/plPipeline/hsGColorizer.cpp index 00ddf882..119d06f9 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsGColorizer.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsGColorizer.cpp @@ -44,12 +44,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plPipeline.h" #include "hsGColorizer.h" -hsBool hsGColorizer::Colorizing() +bool hsGColorizer::Colorizing() { return fPipeline ? 0 != (fPipeline->GetColorOverride().fFlags & hsColorOverride::kModColor) : false; } -hsBool hsGColorizer::Alpharizing() +bool hsGColorizer::Alpharizing() { return fPipeline ? 0 != (fPipeline->GetColorOverride().fFlags & hsColorOverride::kModAlpha) : false; } @@ -64,7 +64,7 @@ void hsGColorizer::Init(plPipeline* pipe) fPipeline = pipe; } -void hsGColorizer::PushColorize(hsColorRGBA& col, hsBool alphaOnly) +void hsGColorizer::PushColorize(hsColorRGBA& col, bool alphaOnly) { if( fPipeline ) { diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsGColorizer.h b/Sources/Plasma/PubUtilLib/plPipeline/hsGColorizer.h index b2dcb1e4..f1cb446b 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsGColorizer.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsGColorizer.h @@ -55,11 +55,11 @@ protected: public: hsGColorizer() : fPipeline(nil) {} - hsBool Colorizing(); - hsBool Alpharizing(); + bool Colorizing(); + bool Alpharizing(); hsColorRGBA GetCurrentColor(); void Init(plPipeline* pipe); - void PushColorize(hsColorRGBA& col, hsBool alphaOnly); + void PushColorize(hsColorRGBA& col, bool alphaOnly); void PopColorize(); }; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsGDeviceRef.h b/Sources/Plasma/PubUtilLib/plPipeline/hsGDeviceRef.h index 6f513acb..3a015912 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsGDeviceRef.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsGDeviceRef.h @@ -67,8 +67,8 @@ public: uint32_t fUseTime; // time stamp when last used - stat gather only - hsBool IsDirty() const { return (fFlags & kDirty); } - void SetDirty(hsBool on) { if(on)fFlags |= kDirty; else fFlags &= ~kDirty; } + bool IsDirty() const { return (fFlags & kDirty); } + void SetDirty(bool on) { if(on)fFlags |= kDirty; else fFlags &= ~kDirty; } hsGDeviceRef() : fFlags(0), fUseTime(0) {} virtual ~hsGDeviceRef() {} diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp index bd51296d..d67e8884 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp @@ -128,7 +128,7 @@ void plCaptureRenderRequest::Render(plPipeline* pipe, plPageTreeMgr* pageMgr) hsTArray plCaptureRender::fProcessed; // plCaptureRender::Capture -hsBool plCaptureRender::Capture(const plKey& ack, uint16_t width, uint16_t height) +bool plCaptureRender::Capture(const plKey& ack, uint16_t width, uint16_t height) { // Create our render target const uint16_t flags = plRenderTarget::kIsOffscreen; @@ -168,7 +168,7 @@ hsBool plCaptureRender::Capture(const plKey& ack, uint16_t width, uint16_t heigh } // plCaptureRender::IProcess -hsBool plCaptureRender::IProcess(plPipeline* pipe, const plKey& ack, plRenderTarget* targ) +bool plCaptureRender::IProcess(plPipeline* pipe, const plKey& ack, plRenderTarget* targ) { // We've just had a successful render into our render target @@ -224,7 +224,7 @@ void plCaptureRender::Update(plPipeline* pipe) fCapReqs.Reset(); } -hsBool plCaptureRender::Capture(const plKey& ack, uint16_t width, uint16_t height) +bool plCaptureRender::Capture(const plKey& ack, uint16_t width, uint16_t height) { CapInfo capInfo; capInfo.fAck = ack; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.h b/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.h index 0d25608a..6fed6614 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.h @@ -62,7 +62,7 @@ class plCaptureRender protected: static hsTArray fProcessed; - static hsBool IProcess(plPipeline* pipe, const plKey& ack, plRenderTarget* targ); + static bool IProcess(plPipeline* pipe, const plKey& ack, plRenderTarget* targ); friend class plCaptureRenderRequest; @@ -71,7 +71,7 @@ protected: friend class plClient; public: - static hsBool Capture(const plKey& ack, uint16_t width=800, uint16_t height=600); + static bool Capture(const plKey& ack, uint16_t width=800, uint16_t height=600); }; @@ -100,7 +100,7 @@ protected: friend class plClient; public: - static hsBool Capture(const plKey& ack, uint16_t width=800, uint16_t height=600); + static bool Capture(const plKey& ack, uint16_t width=800, uint16_t height=600); }; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp index 3e192a5d..1305122c 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp @@ -124,7 +124,7 @@ void plCubicRenderTargetModifier::ICreateRenderRequest( int face ) //// IEval //////////////////////////////////////////////////////////////////// -hsBool plCubicRenderTargetModifier::IEval( double secs, float del, uint32_t dirty ) +bool plCubicRenderTargetModifier::IEval( double secs, float del, uint32_t dirty ) { hsPoint3 center; hsMatrix44 mtx, invMtx; @@ -167,7 +167,7 @@ hsBool plCubicRenderTargetModifier::IEval( double secs, float del, uint32_t dir //// MsgReceive /////////////////////////////////////////////////////////////// -hsBool plCubicRenderTargetModifier::MsgReceive( plMessage* msg ) +bool plCubicRenderTargetModifier::MsgReceive( plMessage* msg ) { plSceneObject *scene; plCubicRenderTarget *cubic; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.h b/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.h index 0c0ee15f..a3ea7c69 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.h @@ -84,7 +84,7 @@ public: virtual void Read( hsStream* s, hsResMgr* mgr ); virtual void Write( hsStream* s, hsResMgr* mgr ); - virtual hsBool MsgReceive( plMessage* msg ); + virtual bool MsgReceive( plMessage* msg ); protected: @@ -93,7 +93,7 @@ protected: plRenderRequest *fRequests[ 6 ]; - virtual hsBool IEval( double secs, float del, uint32_t dirty ); // required by plModifier + virtual bool IEval( double secs, float del, uint32_t dirty ); // required by plModifier void ICreateRenderRequest( int face ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plCullTree.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plCullTree.cpp index fab2cd13..0d6ab10d 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plCullTree.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plCullTree.cpp @@ -518,9 +518,9 @@ plCullNode::plCullStatus plCullNode::ISplitPoly(const plCullPoly& poly, static hsBitVector onVerts; onVerts.Clear(); - hsBool someInner = false; - hsBool someOuter = false; - hsBool someOn = false; + bool someInner = false; + bool someOuter = false; + bool someOn = false; int i; for( i = 0; i < poly.fVerts.GetCount(); i++ ) { @@ -660,7 +660,7 @@ void plCullTree::AddPoly(const plCullPoly& poly) hsFastMath::NormalizeAppr(cenToEye); float camDist = cenToEye.InnerProduct(poly.fNorm); plConst(float) kTol(0.1f); - hsBool backFace = camDist < -kTol; + bool backFace = camDist < -kTol; if( !backFace && (camDist < kTol) ) return; @@ -673,7 +673,7 @@ void plCullTree::AddPoly(const plCullPoly& poly) else if( backFace ) { - plConst(hsBool) kAllowTwoSided(true); + plConst(bool) kAllowTwoSided(true); if( !kAllowTwoSided || !poly.IsTwoSided() ) return; @@ -717,9 +717,9 @@ int16_t plCullTree::IAddPolyRecur(const plCullPoly& poly, int16_t iNode) if( iNode < 0 ) return IMakePolySubTree(poly); - hsBool addInner = (IGetNode(iNode)->fInnerChild >= 0) + bool addInner = (IGetNode(iNode)->fInnerChild >= 0) || ((iNode > 5) && poly.IsHole()); - hsBool addOuter = !poly.IsHole() || (IGetNode(iNode)->fOuterChild >= 0); + bool addOuter = !poly.IsHole() || (IGetNode(iNode)->fOuterChild >= 0); plCullPoly* innerPoly = nil; plCullPoly* outerPoly = nil; @@ -858,7 +858,7 @@ int16_t plCullTree::IMakePolySubTree(const plCullPoly& poly) const /////////////////////////////////////////////////////////////////// // Begin visualization section of the program /////////////////////////////////////////////////////////////////// -void plCullTree::IVisPolyShape(const plCullPoly& poly, hsBool dark) const +void plCullTree::IVisPolyShape(const plCullPoly& poly, bool dark) const { int i; @@ -898,7 +898,7 @@ void plCullTree::IVisPolyShape(const plCullPoly& poly, hsBool dark) const } } -void plCullTree::IVisPolyEdge(const hsPoint3& p0, const hsPoint3& p1, hsBool dark) const +void plCullTree::IVisPolyEdge(const hsPoint3& p0, const hsPoint3& p1, bool dark) const { hsColorRGBA color; if( dark ) @@ -945,7 +945,7 @@ void plCullTree::IVisPolyEdge(const hsPoint3& p0, const hsPoint3& p1, hsBool dar fVisTris.Append(vertStart + 2); } -void plCullTree::IVisPoly(const plCullPoly& poly, hsBool dark) const +void plCullTree::IVisPoly(const plCullPoly& poly, bool dark) const { IVisPolyShape(poly, dark); @@ -1075,12 +1075,12 @@ void plCullTree::Harvest(const plSpaceTree* space, hsTArray& outList) c } -hsBool plCullTree::BoundsVisible(const hsBounds3Ext& bnd) const +bool plCullTree::BoundsVisible(const hsBounds3Ext& bnd) const { return plCullNode::kCulled != IGetRoot()->ITestBoundsRecur(bnd); } -hsBool plCullTree::SphereVisible(const hsPoint3& center, float rad) const +bool plCullTree::SphereVisible(const hsPoint3& center, float rad) const { return plCullNode::kCulled != IGetRoot()->ITestSphereRecur(center, rad); } diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plCullTree.h b/Sources/Plasma/PubUtilLib/plPipeline/plCullTree.h index c6b5c162..4668057d 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plCullTree.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plCullTree.h @@ -66,7 +66,7 @@ class plCullTree : public plCuller protected: // Visualization stuff, to be nuked from production version. - mutable hsBool fCapturePolys; + mutable bool fCapturePolys; mutable hsTArray fVisVerts; mutable hsTArray fVisNorms; mutable hsTArray fVisColors; @@ -80,9 +80,9 @@ protected: mutable hsBitVector fScratchBitVec; mutable hsBitVector fScratchTotVec; - void IVisPolyShape(const plCullPoly& poly, hsBool dark) const; - void IVisPolyEdge(const hsPoint3& p0, const hsPoint3& p1, hsBool dark) const; - void IVisPoly(const plCullPoly& poly, hsBool dark) const; + void IVisPolyShape(const plCullPoly& poly, bool dark) const; + void IVisPolyEdge(const hsPoint3& p0, const hsPoint3& p1, bool dark) const; + void IVisPoly(const plCullPoly& poly, bool dark) const; hsPoint3 fViewPos; @@ -124,8 +124,8 @@ public: uint32_t GetNumNodes() const { return fNodeList.GetCount(); } virtual void Harvest(const plSpaceTree* space, hsTArray& outList) const; - virtual hsBool BoundsVisible(const hsBounds3Ext& bnd) const; - virtual hsBool SphereVisible(const hsPoint3& center, float rad) const; + virtual bool BoundsVisible(const hsBounds3Ext& bnd) const; + virtual bool SphereVisible(const hsPoint3& center, float rad) const; // Visualization stuff. Only to be called by the pipeline (or some other vis manager). void SetVisualizationYon(float y) const { fVisYon = y; } @@ -152,7 +152,7 @@ protected: hsVector3 fNorm; float fDist; - hsBool fIsFace; + bool fIsFace; int16_t fInnerChild; int16_t fOuterChild; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXBufferRefs.h b/Sources/Plasma/PubUtilLib/plPipeline/plDXBufferRefs.h index 290bc733..20925316 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXBufferRefs.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXBufferRefs.h @@ -85,19 +85,19 @@ class plDXVertexBufferRef : public plDXDeviceRef kSkinned = 0x40 }; - hsBool HasFlag(uint32_t f) const { return 0 != (fFlags & f); } - void SetFlag(uint32_t f, hsBool on) { if(on) fFlags |= f; else fFlags &= ~f; } + bool HasFlag(uint32_t f) const { return 0 != (fFlags & f); } + void SetFlag(uint32_t f, bool on) { if(on) fFlags |= f; else fFlags &= ~f; } - hsBool RebuiltSinceUsed() const { return HasFlag(kRebuiltSinceUsed); } - void SetRebuiltSinceUsed(hsBool b) { SetFlag(kRebuiltSinceUsed, b); } + bool RebuiltSinceUsed() const { return HasFlag(kRebuiltSinceUsed); } + void SetRebuiltSinceUsed(bool b) { SetFlag(kRebuiltSinceUsed, b); } - hsBool Volatile() const { return HasFlag(kVolatile); } - void SetVolatile(hsBool b) { SetFlag(kVolatile, b); } + bool Volatile() const { return HasFlag(kVolatile); } + void SetVolatile(bool b) { SetFlag(kVolatile, b); } - hsBool Skinned() const { return HasFlag(kSkinned); } - void SetSkinned(hsBool b) { SetFlag(kSkinned, b); } + bool Skinned() const { return HasFlag(kSkinned); } + void SetSkinned(bool b) { SetFlag(kSkinned, b); } - hsBool Expired(uint32_t t) const { return Volatile() && (IsDirty() || (fRefTime != t)); } + bool Expired(uint32_t t) const { return Volatile() && (IsDirty() || (fRefTime != t)); } void SetRefTime(uint32_t t) { fRefTime = t; } void Link( plDXVertexBufferRef **back ) { plDXDeviceRef::Link( (plDXDeviceRef **)back ); } @@ -137,16 +137,16 @@ class plDXIndexBufferRef : public plDXDeviceRef kVolatile = 0x20 }; - hsBool HasFlag(uint32_t f) const { return 0 != (fFlags & f); } - void SetFlag(uint32_t f, hsBool on) { if(on) fFlags |= f; else fFlags &= ~f; } + bool HasFlag(uint32_t f) const { return 0 != (fFlags & f); } + void SetFlag(uint32_t f, bool on) { if(on) fFlags |= f; else fFlags &= ~f; } - hsBool RebuiltSinceUsed() const { return HasFlag(kRebuiltSinceUsed); } - void SetRebuiltSinceUsed(hsBool b) { SetFlag(kRebuiltSinceUsed, b); } + bool RebuiltSinceUsed() const { return HasFlag(kRebuiltSinceUsed); } + void SetRebuiltSinceUsed(bool b) { SetFlag(kRebuiltSinceUsed, b); } - hsBool Volatile() const { return HasFlag(kVolatile); } - void SetVolatile(hsBool b) { SetFlag(kVolatile, b); } + bool Volatile() const { return HasFlag(kVolatile); } + void SetVolatile(bool b) { SetFlag(kVolatile, b); } - hsBool Expired(uint32_t t) const { return Volatile() && (IsDirty() || (fRefTime != t)); } + bool Expired(uint32_t t) const { return Volatile() && (IsDirty() || (fRefTime != t)); } void SetRefTime(uint32_t t) { fRefTime = t; } void Link( plDXIndexBufferRef **back ) { plDXDeviceRef::Link( (plDXDeviceRef **)back ); } diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRef.h b/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRef.h index 983d1038..9e326ca1 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRef.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRef.h @@ -70,7 +70,7 @@ class plDXDeviceRef : public hsGDeviceRef void Unlink( void ); void Link( plDXDeviceRef **back ); plDXDeviceRef *GetNext( void ) { return fNext; } - hsBool IsLinked( void ) { return fBack != nil; } + bool IsLinked( void ) { return fBack != nil; } virtual void Release( void ) { } plDXDeviceRef(); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp index 705a3ccd..67dbfb5d 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp @@ -172,7 +172,7 @@ void plDXIndexBufferRef::Release( void ) //// Set ////////////////////////////////////////////////////////////////////// plDXTextureRef& plDXTextureRef::Set( D3DFORMAT ft, uint32_t ml, uint32_t mw, uint32_t mh, uint32_t np, - uint32_t sz, uint32_t manSize, uint32_t* lSz, void* pd, hsBool ed, hsBool renderTarget ) + uint32_t sz, uint32_t manSize, uint32_t* lSz, void* pd, bool ed, bool renderTarget ) { if( fDataSize > 0 ) plProfile_DelMem(MemTexture, fDataSize + sizeof(plDXTextureRef)); @@ -208,7 +208,7 @@ plDXTextureRef& plDXTextureRef::Set( D3DFORMAT ft, uint32_t ml, uint32_t mw, uin //// Constructor & Destructor ///////////////////////////////////////////////// plDXTextureRef::plDXTextureRef( D3DFORMAT ft, uint32_t ml, uint32_t mw, uint32_t mh, uint32_t np, - uint32_t sz, uint32_t manSize, uint32_t* lSz, void* pd, hsBool ed, hsBool renderTarget ) + uint32_t sz, uint32_t manSize, uint32_t* lSz, void* pd, bool ed, bool renderTarget ) { fLevelSizes = nil; fOwner = nil; @@ -367,7 +367,7 @@ void plDXLightRef::Release( void ) //// Constructor ////////////////////////////////////////////////////////////// -plDXRenderTargetRef::plDXRenderTargetRef( D3DFORMAT tp, uint32_t ml, plRenderTarget *owner, hsBool releaseDepthOnDelete ) +plDXRenderTargetRef::plDXRenderTargetRef( D3DFORMAT tp, uint32_t ml, plRenderTarget *owner, bool releaseDepthOnDelete ) : plDXTextureRef( tp, ml, owner->GetWidth(), owner->GetHeight(), owner->GetWidth() * owner->GetHeight(), owner->GetWidth() * owner->GetHeight() * ( owner->GetPixelSize() >> 3 ), diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp index caf714a5..79822c7b 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.cpp @@ -510,7 +510,7 @@ void hsGDirect3DTnLEnumerate::IEnumAdapterDevices( IDirect3D9 *pD3D, UINT iAd // DirectX: Given a device and mode, find ALL available depth/stencil // formats and add them to the mode info struct. -hsBool hsGDirect3DTnLEnumerate::IFindDepthFormats( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, +bool hsGDirect3DTnLEnumerate::IFindDepthFormats( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ) { D3DFORMAT formats[] = { D3DFMT_D16, D3DFMT_D24X8, D3DFMT_D32, @@ -538,7 +538,7 @@ hsBool hsGDirect3DTnLEnumerate::IFindDepthFormats( IDirect3D9 *pD3D, UINT iAdap // DirectX: Given a device and mode, find ALL available multisample types // and add them to the mode info struct. -hsBool hsGDirect3DTnLEnumerate::IFindFSAATypes( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, +bool hsGDirect3DTnLEnumerate::IFindFSAATypes( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ) { /// Try 'em @@ -557,7 +557,7 @@ hsBool hsGDirect3DTnLEnumerate::IFindFSAATypes( IDirect3D9 *pD3D, UINT iAdapter //// ICheckCubicRenderTargets ///////////////////////////////////////////////// -hsBool hsGDirect3DTnLEnumerate::ICheckCubicRenderTargets( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, +bool hsGDirect3DTnLEnumerate::ICheckCubicRenderTargets( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ) { if( SUCCEEDED( pD3D->CheckDeviceFormat( iAdapter, deviceType, modeInfo->fDDmode.Format, @@ -649,7 +649,7 @@ short hsGDirect3DTnLEnumerate::IGetDXBitDepth( D3DFORMAT format ) // Given two enum structs, strips out and produces the vendor ID, device ID // and the driver name. Returns true if processed, false otherwise. -hsBool hsG3DDeviceSelector::IGetD3DCardInfo( hsG3DDeviceRecord &record, // In +bool hsG3DDeviceSelector::IGetD3DCardInfo( hsG3DDeviceRecord &record, // In void *driverInfo, void *deviceInfo, DWORD *vendorID, DWORD *deviceID, // Out @@ -682,7 +682,7 @@ hsBool hsG3DDeviceSelector::IGetD3DCardInfo( hsG3DDeviceRecord &record, //// IInitDirect3D //////////////////////////////////////////////////////////// -hsBool hsG3DDeviceSelector::IInitDirect3D( void ) +bool hsG3DDeviceSelector::IInitDirect3D( void ) { if( hsGDDrawDllLoad::GetD3DDll() == nil ) { diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.h b/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.h index afa32eb8..5a65803f 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXEnumerate.h @@ -133,9 +133,9 @@ protected: /// DirectX Helper Functions void IEnumAdapterDevices( IDirect3D9 *pD3D, UINT iAdapter, D3DEnum_DriverInfo *drivInfo ); - hsBool IFindDepthFormats( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ); - hsBool IFindFSAATypes( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ); - hsBool ICheckCubicRenderTargets( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ); + bool IFindDepthFormats( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ); + bool IFindFSAATypes( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ); + bool ICheckCubicRenderTargets( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ); HRESULT IConfirmDevice( D3DCAPS9* pCaps, DWORD dwBehavior, D3DFORMAT format ); static const uint8_t kNumDisplayFormats; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp index 9bc0373f..d0c14736 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp @@ -471,7 +471,7 @@ void D3DSURF_MEMDEL(IDirect3DCubeTexture9* cTex) {} #endif // PLASMA_EXTERNAL_RELEASE #ifndef PLASMA_EXTERNAL_RELEASE -void plDXPipeline::ProfilePoolMem(D3DPOOL poolType, uint32_t size, hsBool add, char *id) +void plDXPipeline::ProfilePoolMem(D3DPOOL poolType, uint32_t size, bool add, char *id) { switch( poolType ) { @@ -526,7 +526,7 @@ class plRenderNilFunc : public plRenderPrimFunc public: plRenderNilFunc() {} - virtual hsBool RenderPrims() const { return false; } + virtual bool RenderPrims() const { return false; } }; static plRenderNilFunc sRenderNil; @@ -544,13 +544,13 @@ public: int vStart, int vLength, int iStart, int iNumTris) : fD3DDevice(d3dDevice), fBaseVertexIndex(baseVertexIndex), fVStart(vStart), fVLength(vLength), fIStart(iStart), fNumTris(iNumTris) {} - virtual hsBool RenderPrims() const; + virtual bool RenderPrims() const; }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Implementations -hsBool plRenderTriListFunc::RenderPrims() const +bool plRenderTriListFunc::RenderPrims() const { plProfile_IncCount(DrawFeedTriangles, fNumTris); plProfile_IncCount(DrawTriangles, fNumTris); @@ -1276,7 +1276,7 @@ void plDXPipeline::SetZBiasScale( float scale ) } // Create all our video memory consuming D3D objects. -hsBool plDXPipeline::ICreateDynDeviceObjects() +bool plDXPipeline::ICreateDynDeviceObjects() { // Front/Back/Depth buffers if( ICreateNormalSurfaces() ) @@ -1301,7 +1301,7 @@ hsBool plDXPipeline::ICreateDynDeviceObjects() // and destroyed as ages are loaded and unloaded, but these are the things that // only go away when we lose the device. -hsBool plDXPipeline::ICreateDeviceObjects() +bool plDXPipeline::ICreateDeviceObjects() { // The D3D device if( ICreateDevice(!fSettings.fFullscreen) ) @@ -1447,7 +1447,7 @@ void plDXPipeline::ISetCurrentMode( D3DEnum_ModeInfo *mode ) // // New DX Way: Check to see if each format is valid. -hsBool plDXPipeline::IFindCompressedFormats() +bool plDXPipeline::IFindCompressedFormats() { D3DFORMAT toCheckFor[] = {D3DFMT_DXT1, //D3DFMT_DXT2, @@ -1474,7 +1474,7 @@ hsBool plDXPipeline::IFindCompressedFormats() // // New DX Way: Check to see if each format we want is valid -hsBool plDXPipeline::IFindLuminanceFormats() +bool plDXPipeline::IFindLuminanceFormats() { D3DFORMAT toCheckFor[] = { D3DFMT_L8, D3DFMT_A8L8, D3DFMT_UNKNOWN }; short i = 0; @@ -1497,7 +1497,7 @@ hsBool plDXPipeline::IFindLuminanceFormats() // Returns true if the given format is supported on the current device and // mode, false if it isn't. -hsBool plDXPipeline::ITextureFormatAllowed( D3DFORMAT format ) +bool plDXPipeline::ITextureFormatAllowed( D3DFORMAT format ) { if( FAILED( fD3DObject->CheckDeviceFormat( fCurrentAdapter, fCurrentDevice->fDDType, fCurrentMode->fDDmode.Format, @@ -1511,7 +1511,7 @@ hsBool plDXPipeline::ITextureFormatAllowed( D3DFORMAT format ) // Debug flags should never be employed to do a game effect, although they can // be useful for developing effects. Mostly they help in diagnosing problems // in rendering or performance. -void plDXPipeline::SetDebugFlag( uint32_t flag, hsBool on ) +void plDXPipeline::SetDebugFlag( uint32_t flag, bool on ) { fDebugFlags.SetBit(flag, on); @@ -1537,7 +1537,7 @@ void plDXPipeline::SetDebugFlag( uint32_t flag, hsBool on ) } } -hsBool plDXPipeline::IsDebugFlagSet( uint32_t flag ) const +bool plDXPipeline::IsDebugFlagSet( uint32_t flag ) const { return fDebugFlags.IsBitSet(flag); } @@ -1550,7 +1550,7 @@ hsBool plDXPipeline::IsDebugFlagSet( uint32_t flag ) const // Creates the master Direct3D objects. I guess just in case you want // multiple Direct3D devices.... :~ -hsBool plDXPipeline::ICreateMaster() +bool plDXPipeline::ICreateMaster() { hsAssert( !fD3DObject, "ICreateMaster() should only be called for Master Direct3DDevice" ); @@ -1577,7 +1577,7 @@ hsBool plDXPipeline::ICreateMaster() // Creates the device. Surfaces, buffers, etc. created separately (in case of lost device). // See ICreateDeviceObjects. -hsBool plDXPipeline::ICreateDevice(hsBool windowed) +bool plDXPipeline::ICreateDevice(bool windowed) { /// First, create the D3D Device object D3DPRESENT_PARAMETERS params; @@ -1734,7 +1734,7 @@ hsBool plDXPipeline::ICreateDevice(hsBool windowed) // IFindDepthFormat ////////////////////////////////////////////////////////////// // Look through available depth formats for the closest to what we want that // will work. -hsBool plDXPipeline::IFindDepthFormat(D3DPRESENT_PARAMETERS& params) +bool plDXPipeline::IFindDepthFormat(D3DPRESENT_PARAMETERS& params) { // Okay, we're not using the stencil buffer right now, and it's bringing out // some painful driver bugs on the GeForce2. So rather than go out of our way @@ -1792,7 +1792,7 @@ hsBool plDXPipeline::IFindDepthFormat(D3DPRESENT_PARAMETERS& params) // ICreateNormalSurfaces ////////////////////////////////////////////////////// // Create the primary color and depth buffers. // -hsBool plDXPipeline::ICreateNormalSurfaces() +bool plDXPipeline::ICreateNormalSurfaces() { /// Now get the backbuffer surface pointer INIT_ERROR_CHECK( fD3DDevice->GetBackBuffer( 0, 0, D3DBACKBUFFER_TYPE_MONO, &fD3DBackBuff ), @@ -2237,9 +2237,9 @@ void plDXPipeline::IResetToDefaults(D3DPRESENT_PARAMETERS *params) // reset the device to its operational state. // returns true if not ready yet, false if the reset was successful. // All this is generally in response to a fullscreen alt-tab. -hsBool plDXPipeline::IResetDevice() +bool plDXPipeline::IResetDevice() { - hsBool fakeDevLost(false); + bool fakeDevLost(false); if( fakeDevLost ) fDeviceLost = true; @@ -2309,7 +2309,7 @@ hsBool plDXPipeline::IResetDevice() return false; } -void plDXPipeline::ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool VSync /* = false */) +void plDXPipeline::ResetDisplayDevice(int Width, int Height, int ColorDepth, bool Windowed, int NumAASamples, int MaxAnisotropicSamples, bool VSync /* = false */) { if( fSettings.fPresentParams.BackBufferWidth == Width && fSettings.fPresentParams.BackBufferHeight == Height && @@ -2607,7 +2607,7 @@ plTextFont *plDXPipeline::MakeTextFont( char *face, uint16_t size ) // span indices within this drawable. // This is called once per render, and generally well before rendering begins (as part of the // cull phase). -hsBool plDXPipeline::PreRender( plDrawable* drawable, hsTArray& visList, plVisMgr* visMgr ) +bool plDXPipeline::PreRender( plDrawable* drawable, hsTArray& visList, plVisMgr* visMgr ) { plDrawableSpans *ds = plDrawableSpans::ConvertNoRef(drawable); if( !ds ) @@ -2688,7 +2688,7 @@ struct plCompSortFace : public std::binary_function& visList) +bool plDXPipeline::IAvatarSort(plDrawableSpans* d, const hsTArray& visList) { plProfile_BeginTiming(AvatarSort); int i; @@ -2824,7 +2824,7 @@ hsBool plDXPipeline::IAvatarSort(plDrawableSpans* d, const hsTArray& vi // This is called once per render, and before any rendering actually starts. See plPageTreeMgr.cpp. // So any preperation needs to last until rendering actually begins. So cached information, like // which lights a span will use, needs to be stored on the span. -hsBool plDXPipeline::PrepForRender(plDrawable* d, hsTArray& visList, plVisMgr* visMgr) +bool plDXPipeline::PrepForRender(plDrawable* d, hsTArray& visList, plVisMgr* visMgr) { plProfile_BeginTiming(PrepDrawable); @@ -2922,7 +2922,7 @@ void plDXPipeline::Render( plDrawable *d, const hsTArray& visList ) //// BeginDrawable //////////////////////////////////////////////////////////// // Obsolete, should be removed -hsBool plDXPipeline::BeginDrawable( plDrawable *d ) +bool plDXPipeline::BeginDrawable( plDrawable *d ) { return true; } @@ -2930,7 +2930,7 @@ hsBool plDXPipeline::BeginDrawable( plDrawable *d ) //// EndDrawable ////////////////////////////////////////////////////////////// // Obsolete, should be removed -hsBool plDXPipeline::EndDrawable( plDrawable *d ) +bool plDXPipeline::EndDrawable( plDrawable *d ) { return true; } @@ -3127,7 +3127,7 @@ void plDXPipeline::ICheckLighting(plDrawableSpans* drawable, hsTArray& plProfile_BeginTiming(FindActiveLights); static hsTArray lightList; lightList.SetCount(0); - const hsBool isChar = 0 != drawable->GetNativeProperty(plDrawable::kPropCharacter); + const bool isChar = 0 != drawable->GetNativeProperty(plDrawable::kPropCharacter); if( isChar ) { int i; @@ -3168,7 +3168,7 @@ void plDXPipeline::ICheckLighting(plDrawableSpans* drawable, hsTArray& drawable->GetNativeProperty(plDrawable::kPropCharacter) ); // PUT OVERRIDE FOR KILLING PROJECTORS HERE!!!! - hsBool proj = nil != light->GetProjection(); + bool proj = nil != light->GetProjection(); if( fView.fRenderState & kRenderNoProjection ) proj = false; @@ -3179,7 +3179,7 @@ void plDXPipeline::ICheckLighting(plDrawableSpans* drawable, hsTArray& // 2) span is movable, or // 3) Both the light and the span have specular const plSpan* span = drawable->GetSpan(litList[j]); - hsBool currProj = proj; + bool currProj = proj; if( span->fProps & plSpan::kPropProjAsVtx ) currProj = false; @@ -3216,7 +3216,7 @@ void plDXPipeline::ICheckLighting(plDrawableSpans* drawable, hsTArray& drawable->GetNativeProperty(plDrawable::kPropCharacter) ); // PUT OVERRIDE FOR KILLING PROJECTORS HERE!!!! - hsBool proj = nil != light->GetProjection(); + bool proj = nil != light->GetProjection(); if( fView.fRenderState & kRenderNoProjection ) proj = false; @@ -3227,7 +3227,7 @@ void plDXPipeline::ICheckLighting(plDrawableSpans* drawable, hsTArray& // 2) span is movable, or // 3) Both the light and the span have specular const plSpan* span = drawable->GetSpan(litList[j]); - hsBool currProj = proj; + bool currProj = proj; if( span->fProps & plSpan::kPropProjAsVtx ) currProj = false; @@ -3263,7 +3263,7 @@ void plDXPipeline::ICheckLighting(plDrawableSpans* drawable, hsTArray& drawable->GetNativeProperty(plDrawable::kPropCharacter) ); // PUT OVERRIDE FOR KILLING PROJECTORS HERE!!!! - hsBool proj = nil != light->GetProjection(); + bool proj = nil != light->GetProjection(); if( fView.fRenderState & kRenderNoProjection ) proj = false; @@ -3274,7 +3274,7 @@ void plDXPipeline::ICheckLighting(plDrawableSpans* drawable, hsTArray& // 2) span is movable, or // 3) Both the light and the span have specular const plSpan* span = drawable->GetSpan(litList[j]); - hsBool currProj = proj; + bool currProj = proj; if( span->fProps & plSpan::kPropProjAsVtx ) currProj = false; @@ -3315,7 +3315,7 @@ void plDXPipeline::ICheckLighting(plDrawableSpans* drawable, hsTArray& // to bother with, which drawables within the SceneNode). For finer objects, like the spans // themselves, the culling is done via IGetVisibleSpans, which also takes the plVisMgr into // account. -hsBool plDXPipeline::HarvestVisible(plSpaceTree* space, hsTArray& visList) +bool plDXPipeline::HarvestVisible(plSpaceTree* space, hsTArray& visList) { if( !space ) return false; @@ -3468,7 +3468,7 @@ void plDXPipeline::ISetupTransforms(plDrawableSpans* drawable, const plSpan& spa // a the next available position in the buffer aligned with that vertex size. // Only software skinned objects, dynamic decals, and particle systems currently use the // dynamic vertex buffer. -hsBool plDXPipeline::IRefreshDynVertices(plGBufferGroup* group, plDXVertexBufferRef* vRef) +bool plDXPipeline::IRefreshDynVertices(plGBufferGroup* group, plDXVertexBufferRef* vRef) { // First, pad out our next slot to be on a vertex boundary (for this vertex size). fNextDynVtx = ((fNextDynVtx + vRef->fVertexSize-1) / vRef->fVertexSize) * vRef->fVertexSize; @@ -3548,7 +3548,7 @@ hsBool plDXPipeline::IRefreshDynVertices(plGBufferGroup* group, plDXVertexBuffer // water ripples, bullet hits, and footprints. // This function just makes sure they are ready to be rendered, called right before // the rendering. -hsBool plDXPipeline::ICheckAuxBuffers(const plAuxSpan* span) +bool plDXPipeline::ICheckAuxBuffers(const plAuxSpan* span) { plGBufferGroup* group = span->fGroup; @@ -3579,7 +3579,7 @@ hsBool plDXPipeline::ICheckAuxBuffers(const plAuxSpan* span) // ICheckDynBuffers //////////////////////////////////////////////////////////////////////////////////////// // Make sure the buffers underlying this span are ready to be rendered. Meaning that the underlying // D3D buffers are in sync with the plasma buffers. -hsBool plDXPipeline::ICheckDynBuffers(plDrawableSpans* drawable, plGBufferGroup* group, const plSpan* spanBase) +bool plDXPipeline::ICheckDynBuffers(plDrawableSpans* drawable, plGBufferGroup* group, const plSpan* spanBase) { if( !(spanBase->fTypeMask & plSpan::kVertexSpan) ) return false; @@ -3839,7 +3839,7 @@ void plDXPipeline::IAddNormalsSpan( plDrawableSpans *ice, plIcicle *span, plD // Normally, the main client loop will wrap the entire scene render (including // any offscreen rendering) in a BeginRender/EndRender pair. There is no need // for further calls for sub-renders. -hsBool plDXPipeline::BeginRender() +bool plDXPipeline::BeginRender() { // Do we have some restoration work ahead of us? // Checks for Device Lost condition @@ -4034,7 +4034,7 @@ void plDXPipeline::RenderScreenElements() // Tell D3D we're through rendering for this frame, and flip the back buffer to front. // Also includes a bit of making sure we're not holding onto anything that might // get deleted before the next render. -hsBool plDXPipeline::EndRender() +bool plDXPipeline::EndRender() { #ifdef MF_ENABLE_HACKOFF hackOffscreens.SetCount(0); @@ -4042,7 +4042,7 @@ hsBool plDXPipeline::EndRender() IBottomLayer(); - hsBool retVal = false; + bool retVal = false; /// Actually end the scene if( !--fInSceneDepth ) { @@ -4074,7 +4074,7 @@ hsBool plDXPipeline::EndRender() // SetGamma //////////////////////////////////////////////////////////// // Create and set a gamma table based on the input exponent values for // R, G, and B. Can also set explicit table using the other SetGamma(). -hsBool plDXPipeline::SetGamma(float eR, float eG, float eB) +bool plDXPipeline::SetGamma(float eR, float eG, float eB) { if( fSettings.fNoGammaCorrect ) return false; @@ -4123,7 +4123,7 @@ hsBool plDXPipeline::SetGamma(float eR, float eG, float eB) // SetGamma // Copy the input gamma tables and pass them to the hardware. -hsBool plDXPipeline::SetGamma(const uint16_t* const tabR, const uint16_t* const tabG, const uint16_t* const tabB) +bool plDXPipeline::SetGamma(const uint16_t* const tabR, const uint16_t* const tabG, const uint16_t* const tabB) { if( fSettings.fNoGammaCorrect ) return false; @@ -4142,7 +4142,7 @@ hsBool plDXPipeline::SetGamma(const uint16_t* const tabR, const uint16_t* const //// IFlipSurface ///////////////////////////////////////////////////////////// // Initiate moving the back buffer contents to the front buffer. Will detect // and set the device lost condition when it occurs. -hsBool plDXPipeline::IFlipSurface() +bool plDXPipeline::IFlipSurface() { /// Works now for both fullscreen and windowed modes HRESULT hr = D3D_OK; @@ -4225,9 +4225,9 @@ plMipmap* plDXPipeline::ExtractMipMap(plRenderTarget* targ) // all pixels in dest get written to, even though the client window may be partially // offscreen. If the client window is partially offscreen, there will be no values // for the "offscreen pixels" to copy to dest, so opaque black is used. -hsBool plDXPipeline::CaptureScreen( plMipmap *dest, bool flipVertical, uint16_t desiredWidth, uint16_t desiredHeight ) +bool plDXPipeline::CaptureScreen( plMipmap *dest, bool flipVertical, uint16_t desiredWidth, uint16_t desiredHeight ) { - uint32_t y, *destPtr, *srcPtr, width, height, bigWidth, bigHeight; + uint32_t y, *destPtr, *srcPtr, width, height, bigWidth, bigHeight; IDirect3DSurface9 *surface; D3DLOCKED_RECT rect; RECT rToLock; @@ -4779,7 +4779,7 @@ hsGDeviceRef* plDXPipeline::SharedRenderTargetRef(plRenderTarget* share, plRende //// IPrepRenderTargetInfo //////////////////////////////////////////////////// // Shared processing of render target creation parameters. Also does the // dirty work of finding a good surface format to use. -hsBool plDXPipeline::IPrepRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &surfFormat, +bool plDXPipeline::IPrepRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &surfFormat, D3DFORMAT &depthFormat, D3DRESOURCETYPE &resType ) { int i, j; @@ -4904,7 +4904,7 @@ hsBool plDXPipeline::IPrepRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &s // dirty work of finding a good surface format to use. // Doesn't bother checking depth buffer, since this is only used for a render target // that's going to share a depth buffer that's already been created. -hsBool plDXPipeline::IFindRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &surfFormat, D3DRESOURCETYPE &resType ) +bool plDXPipeline::IFindRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &surfFormat, D3DRESOURCETYPE &resType ) { uint16_t flags, width, height; int8_t bitDepth; @@ -5094,7 +5094,7 @@ plRenderTarget *plDXPipeline::PopRenderTarget() // ISetAnisotropy /////////////////////////////////////////////////////////// // Set the current anisotropic filtering settings to D3D -void plDXPipeline::ISetAnisotropy(hsBool on) +void plDXPipeline::ISetAnisotropy(bool on) { if( (fSettings.fMaxAnisotropicSamples <= 0) || IsDebugFlagSet(plPipeDbg::kFlagNoAnisotropy) ) on = false; @@ -5215,7 +5215,7 @@ void plDXPipeline::ClearRenderTarget( plDrawable* d ) if( fView.fRenderState & kRenderClearDepth ) { D3DRECT r; - hsBool useRect = IGetClearViewPort(r); + bool useRect = IGetClearViewPort(r); if( useRect ) { @@ -5248,14 +5248,14 @@ void plDXPipeline::ClearRenderTarget( plDrawable* d ) // IGetClearViewPort ////////////////////////////////////////////// // Sets the input rect to the current viewport. Returns true if // that is a subset of the current render target, else false. -hsBool plDXPipeline::IGetClearViewPort(D3DRECT& r) +bool plDXPipeline::IGetClearViewPort(D3DRECT& r) { r.x1 = GetViewTransform().GetViewPortLeft(); r.y1 = GetViewTransform().GetViewPortTop(); r.x2 = GetViewTransform().GetViewPortRight(); r.y2 = GetViewTransform().GetViewPortBottom(); - hsBool useRect = false; + bool useRect = false; if( fSettings.fCurrRenderTarget != nil ) { useRect = ( (r.x1 != 0) || (r.y1 != 0) || (r.x2 != fSettings.fCurrRenderTarget->GetWidth()) || (r.y2 != fSettings.fCurrRenderTarget->GetHeight()) ); @@ -5285,7 +5285,7 @@ void plDXPipeline::ClearRenderTarget( const hsColorRGBA *col, const float* de dwFlags |= D3DCLEAR_ZBUFFER; D3DRECT r; - hsBool useRect = IGetClearViewPort(r); + bool useRect = IGetClearViewPort(r); if( useRect ) { WEAK_ERROR_CHECK( fD3DDevice->Clear( 1, &r, dwFlags, clearColor, clearDepth, 0L ) ); @@ -5517,7 +5517,7 @@ void plDXPipeline::ISetFogParameters(const plSpan* span, const plLayerInterface* //// StencilEnable //////////////////////////////////////////////////////////// -hsBool plDXPipeline::StencilEnable( hsBool enable ) +bool plDXPipeline::StencilEnable( bool enable ) { if( fStencil.fEnabled == enable ) return true; @@ -5650,7 +5650,7 @@ void plDXPipeline::StencilSetOps( uint8_t passOp, uint8_t failOp, uint8_t pas //// StencilGetCaps /////////////////////////////////////////////////////////// -hsBool plDXPipeline::StencilGetCaps( plStencilCaps *caps ) +bool plDXPipeline::StencilGetCaps( plStencilCaps *caps ) { hsAssert( caps != nil, "Invalid pointer to StencilGetCaps()" ); @@ -5777,7 +5777,7 @@ void plDXPipeline::IEnableLights( plSpan *span ) // Find the strongest numLights lights to illuminate the span with. // Weaker lights are faded out in effect so they won't pop when the // strongest N changes membership. -void plDXPipeline::ISelectLights( plSpan *span, int numLights, hsBool proj ) +void plDXPipeline::ISelectLights( plSpan *span, int numLights, bool proj ) { int i, startScale; static hsBitVector newFlags; @@ -7769,7 +7769,7 @@ const hsMatrix44& plDXPipeline::IGetBumpMatrix(uint32_t miscFlags) const // If skipping, we advance past the bump layers. // If there are no more layers after that, we return true (to abort further rendering of currSpan), // else false to continue rendering. -hsBool plDXPipeline::ISkipBumpMap(hsGMaterial* newMat, uint32_t& layer, const plSpan* currSpan) const +bool plDXPipeline::ISkipBumpMap(hsGMaterial* newMat, uint32_t& layer, const plSpan* currSpan) const { if( newMat && currSpan ) { @@ -8247,7 +8247,7 @@ uint32_t plDXPipeline::ILayersAtOnce( hsGMaterial *mat, uint32_t which ) //// ICanEatLayer ///////////////////////////////////////////////////////////// // Determine if this layer can be an upper layer, or if it needs // to be the base on another pass. -hsBool plDXPipeline::ICanEatLayer( plLayerInterface* lay ) +bool plDXPipeline::ICanEatLayer( plLayerInterface* lay ) { if( !lay->GetTexture() ) return false; @@ -8430,14 +8430,14 @@ hsGDeviceRef *plDXPipeline::MakeTextureRef( plLayerInterface* layer, plMipmap /// Set up some stuff uint32_t mmlvs = 1; - D3DFORMAT formatType = D3DFMT_UNKNOWN; // D3D Format + D3DFORMAT formatType = D3DFMT_UNKNOWN; // D3D Format uint32_t formatSize = 0; uint32_t totalSize = 0; uint32_t* levelSizes = nil; uint32_t numPix = 0; uint32_t externData = false; - void *tData; - hsBool noMip = !(fSettings.fD3DCaps & kCapsMipmap); + void *tData; + bool noMip = !(fSettings.fD3DCaps & kCapsMipmap); /// Convert the bitmap over @@ -8519,19 +8519,19 @@ hsGDeviceRef *plDXPipeline::IMakeCubicTextureRef( plLayerInterface* layer, pl plMipmap *faces[ 6 ]; int i; D3DFORMAT formatType = D3DFMT_UNKNOWN; - uint32_t formatSize = 0; - uint32_t numLevels = 1; - uint32_t totalSize = 0; - uint32_t *levelSizes = nil; - uint32_t numPixels = 0; - uint32_t externData; + uint32_t formatSize = 0; + uint32_t numLevels = 1; + uint32_t totalSize = 0; + uint32_t *levelSizes = nil; + uint32_t numPixels = 0; + uint32_t externData; void *textureData[ 6 ]; if( cubic == nil || !( fSettings.fD3DCaps & kCapsCubicTextures ) ) return nil; - hsBool noMip = !(fSettings.fD3DCaps & kCapsMipmap) || !(fSettings.fD3DCaps & kCapsCubicMipmap); + bool noMip = !(fSettings.fD3DCaps & kCapsMipmap) || !(fSettings.fD3DCaps & kCapsCubicMipmap); /// Get the mips if( !( fSettings.fD3DCaps & kCapsCompressTextures ) ) @@ -8629,13 +8629,13 @@ hsGDeviceRef *plDXPipeline::IMakeCubicTextureRef( plLayerInterface* layer, pl // Compute proper values for the arguments passed in. // Return true if the data returned points directly into the mipmap data, // return false if textureData is a reformatted copy of the mipmap's data. -hsBool plDXPipeline::IProcessMipmapLevels( plMipmap *mipmap, uint32_t &numLevels, +bool plDXPipeline::IProcessMipmapLevels( plMipmap *mipmap, uint32_t &numLevels, uint32_t *&levelSizes, uint32_t &totalSize, - uint32_t &numPixels, void *&textureData, hsBool noMip ) + uint32_t &numPixels, void *&textureData, bool noMip ) { - hsBool externData = false; + bool externData = false; D3DFORMAT formatType = D3DFMT_UNKNOWN; // D3D Format - uint32_t formatSize; + uint32_t formatSize; IGetD3DTextureFormat( mipmap, formatType, formatSize ); @@ -8766,7 +8766,7 @@ void plDXPipeline::IGetD3DTextureFormat( plBitmap *b, D3DFORMAT &formatType, { hsAssert( b, "Nil input to GetTextureFormat()" ); - hsBool prefer32bit = 0 != (b->GetFlags() & plBitmap::kForce32Bit); + bool prefer32bit = 0 != (b->GetFlags() & plBitmap::kForce32Bit); if( b->IsCompressed() ) { @@ -9037,7 +9037,7 @@ void plDXPipeline::IFormatTextureData( uint32_t formatType, uint32_t numPix, //// TestVisibleWorld ///////////////////////////////////////////////////////// // Check if the world space bounds are visible within the current view frustum. -hsBool plDXPipeline::TestVisibleWorld( const hsBounds3Ext& wBnd ) +bool plDXPipeline::TestVisibleWorld( const hsBounds3Ext& wBnd ) { if( fView.fCullTreeDirty ) IRefreshCullTree(); @@ -9047,7 +9047,7 @@ hsBool plDXPipeline::TestVisibleWorld( const hsBounds3Ext& wBnd ) return false; } -hsBool plDXPipeline::TestVisibleWorld( const plSceneObject* sObj ) +bool plDXPipeline::TestVisibleWorld( const plSceneObject* sObj ) { const plDrawInterface* di = sObj->GetDrawInterface(); if( !di ) @@ -9283,7 +9283,7 @@ void plDXPipeline::ILocalToWorldToD3D() // Returns true if the combination of the local2world and world2camera // matrices is left-handed. -hsBool plDXPipeline::IIsViewLeftHanded() +bool plDXPipeline::IIsViewLeftHanded() { return fView.fTransform.GetOrthogonal() ^ ( fView.fLocalToWorldLeftHanded ^ fView.fWorldToCamLeftHanded ) ? true : false; } @@ -9321,7 +9321,7 @@ void plDXPipeline::IRefreshCullTree() fCullProxy = nil; SetDrawableTypeMask(GetDrawableTypeMask() & ~plDrawable::kOccSnapProxy); } - hsBool doCullSnap = IsDebugFlagSet(plPipeDbg::kFlagOcclusionSnap)&& !fCullProxy && !fSettings.fViewStack.GetCount(); + bool doCullSnap = IsDebugFlagSet(plPipeDbg::kFlagOcclusionSnap)&& !fCullProxy && !fSettings.fViewStack.GetCount(); if( doCullSnap ) { fView.fCullTree.BeginCapturePolys(); @@ -9415,7 +9415,7 @@ void plDXPipeline::IMakeOcclusionSnap() // SubmitOccluders ///////////////////////////////////////////////////////////// // Add the input polys into the list of polys from which to generate the cull tree. -hsBool plDXPipeline::SubmitOccluders(const hsTArray& polyList) +bool plDXPipeline::SubmitOccluders(const hsTArray& polyList) { fCullPolys.SetCount(0); fCullHoles.SetCount(0); @@ -9507,7 +9507,7 @@ uint32_t plDXPipeline::GetMaterialOverrideOff( hsGMatState::StateIdx category ) //// PushMaterialOverride ///////////////////////////////////////////////////// // Force material state bits on or off. If you use this, save the return value // as input to PopMaterialOverride, to restore previous values. -hsGMatState plDXPipeline::PushMaterialOverride( const hsGMatState& state, hsBool on ) +hsGMatState plDXPipeline::PushMaterialOverride( const hsGMatState& state, bool on ) { hsGMatState ret = GetMaterialOverride( on ); if( on ) @@ -9528,7 +9528,7 @@ hsGMatState plDXPipeline::PushMaterialOverride( const hsGMatState& state, hsBool // Force material state bits on or off. If you use this, save the return value // as input to PopMaterialOverride, to restore previous values. // This version just sets for one category (e.g. Z flags). -hsGMatState plDXPipeline::PushMaterialOverride(hsGMatState::StateIdx cat, uint32_t which, hsBool on) +hsGMatState plDXPipeline::PushMaterialOverride(hsGMatState::StateIdx cat, uint32_t which, bool on) { hsGMatState ret = GetMaterialOverride( on ); if( on ) @@ -9547,7 +9547,7 @@ hsGMatState plDXPipeline::PushMaterialOverride(hsGMatState::StateIdx cat, uint32 //// PopMaterialOverride ////////////////////////////////////////////////////// // Restore the previous settings returned from the matching PushMaterialOverride. -void plDXPipeline::PopMaterialOverride(const hsGMatState& restore, hsBool on) +void plDXPipeline::PopMaterialOverride(const hsGMatState& restore, bool on) { if( on ) { @@ -9564,7 +9564,7 @@ void plDXPipeline::PopMaterialOverride(const hsGMatState& restore, hsBool on) //// GetMaterialOverride ////////////////////////////////////////////////////// // Return the current material state bits force to on or off, depending on input . -const hsGMatState& plDXPipeline::GetMaterialOverride(hsBool on) const +const hsGMatState& plDXPipeline::GetMaterialOverride(bool on) const { return on ? fMatOverOn : fMatOverOff; } @@ -9729,7 +9729,7 @@ void plDXPipeline::IProjectionMatrixToD3D() // Tests and sets the current winding order cull mode (CW, CCW, or none). // Will reverse the cull mode as necessary for left handed camera or local to world // transforms. -void plDXPipeline::ISetCullMode(hsBool flip) +void plDXPipeline::ISetCullMode(bool flip) { D3DCULL newCull = D3DCULL_NONE; @@ -9748,7 +9748,7 @@ void plDXPipeline::ISetCullMode(hsBool flip) void plDXPipeline::ITransformsToD3D() { - hsBool resetCullMode = fView.fXformResetFlags & (fView.kResetCamera | fView.kResetL2W); + bool resetCullMode = fView.fXformResetFlags & (fView.kResetCamera | fView.kResetL2W); if( fView.fXformResetFlags & fView.kResetCamera ) IWorldToCameraToD3D(); @@ -9933,7 +9933,7 @@ void plDXPipeline::IFillStaticVertexBufferRef(plDXVertexBufferRef *ref, plGBuffe // OpenAccess //////////////////////////////////////////////////////////////////////////////////////// // Lock the managed buffer and setup the accessSpan to point into the buffers data. -hsBool plDXPipeline::OpenAccess(plAccessSpan& dst, plDrawableSpans* drawable, const plVertexSpan* span, hsBool readOnly) +bool plDXPipeline::OpenAccess(plAccessSpan& dst, plDrawableSpans* drawable, const plVertexSpan* span, bool readOnly) { plGBufferGroup* grp = drawable->GetBufferGroup(span->fGroupIdx); hsAssert(!grp->AreVertsVolatile(), "Don't ask for D3DBuffer data on a volatile buffer"); @@ -10022,7 +10022,7 @@ hsBool plDXPipeline::OpenAccess(plAccessSpan& dst, plDrawableSpans* drawable, co // CloseAccess ///////////////////////////////////////////////////////////////////// // Unlock the buffer, invalidating the accessSpan. -hsBool plDXPipeline::CloseAccess(plAccessSpan& dst) +bool plDXPipeline::CloseAccess(plAccessSpan& dst) { if( !dst.HasAccessVtx() ) return false; @@ -10192,7 +10192,7 @@ void plDXPipeline::ISetupIndexBufferRef(plGBufferGroup* owner, uint32_t idx, plD // In hardware, we want the opposite, to break it into managable chunks, manageable meaning // few enough matrices to fit into hardware registers. So for hardware version, we set up // our palette, draw a span or few, setup our matrix palette with new matrices, draw, repeat. -hsBool plDXPipeline::ISoftwareVertexBlend( plDrawableSpans* drawable, const hsTArray& visList ) +bool plDXPipeline::ISoftwareVertexBlend( plDrawableSpans* drawable, const hsTArray& visList ) { if (IsDebugFlagSet(plPipeDbg::kFlagNoSkinning)) return true; @@ -10439,7 +10439,7 @@ void plDXPipeline::ICheckVtxUsage() } } -hsBool plDXPipeline::CheckResources() +bool plDXPipeline::CheckResources() { if ((fClothingOutfits.GetCount() <= 1 && fAvRTPool.GetCount() > 1) || (fAvRTPool.GetCount() >= 16 && (fAvRTPool.GetCount() / 2 >= fClothingOutfits.GetCount()))) @@ -11321,7 +11321,7 @@ void plDXPipeline::IRenderBufferSpan( const plIcicle& span, // Render the input span with the input material in as many passes as it takes. // Also handles rendering projected lights, either onto each pass or // once onto the FB after all the passes, as appropriate. -hsBool plDXPipeline::ILoopOverLayers(const plRenderPrimFunc& inRender, hsGMaterial* material, const plSpan& span) +bool plDXPipeline::ILoopOverLayers(const plRenderPrimFunc& inRender, hsGMaterial* material, const plSpan& span) { plProfile_BeginTiming(RenderPrim); @@ -11332,7 +11332,7 @@ hsBool plDXPipeline::ILoopOverLayers(const plRenderPrimFunc& inRender, hsGMateri IPushPiggyBacks(material); - hsBool normalLightsDisabled = false; + bool normalLightsDisabled = false; // Loop across all the layers we need to draw int j; @@ -11914,7 +11914,7 @@ void plDXPipeline::IShowErrorMessage( char *errStr ) // ICreateFail //////////////////////////////////////////////////////////////////// // Called on unrecoverable error during device creation. Frees up anything // allocated so far, sets the error string, and returns true. -hsBool plDXPipeline::ICreateFail( char *errStr ) +bool plDXPipeline::ICreateFail( char *errStr ) { // Don't overwrite any error string we already had if( fSettings.fErrorStr[ 0 ] == 0 ) @@ -12142,7 +12142,7 @@ plLayerInterface* plDXPipeline::PopPiggyBackLayer(plLayerInterface* li) // Setup a layer wrapper to wrap around either all layers rendered with or just the base layers. // Note that a single material has multiple base layers if it takes mutliple passes to render. // Stays in effect until removed by RemoveLayerInterface. -plLayerInterface* plDXPipeline::AppendLayerInterface(plLayerInterface* li, hsBool onAllLayers) +plLayerInterface* plDXPipeline::AppendLayerInterface(plLayerInterface* li, bool onAllLayers) { fForceMatHandle = true; if( onAllLayers ) @@ -12153,7 +12153,7 @@ plLayerInterface* plDXPipeline::AppendLayerInterface(plLayerInterface* li, hsBoo // RemoveLayerInterface ////////////////////////////////////////////////////////////////// // Removes a layer wrapper installed by AppendLayerInterface. -plLayerInterface* plDXPipeline::RemoveLayerInterface(plLayerInterface* li, hsBool onAllLayers) +plLayerInterface* plDXPipeline::RemoveLayerInterface(plLayerInterface* li, bool onAllLayers) { fForceMatHandle = true; @@ -12194,7 +12194,7 @@ void plDXPipeline::IAttachSlaveToReceivers(int which, plDrawableSpans* drawable, plShadowSlave* slave = fShadows[which]; // Whether the drawable is a character affects which lights/shadows affect it. - hsBool isChar = drawable->GetNativeProperty(plDrawable::kPropCharacter); + bool isChar = drawable->GetNativeProperty(plDrawable::kPropCharacter); // If the shadow is part of a light group, it gets handled in ISetShadowFromGroup. // Unless the drawable is a character (something that moves around indeterminately, @@ -12775,7 +12775,7 @@ void plDXPipeline::IReleaseBlurVBuffers() // ICreateBlurVBuffers ////////////////////////////////////////////////////////////////// // We need a quad for each size of shadow map, because there's a slight dependency // of UVW coordinates on size of render target. Sucks but it's true. -hsBool plDXPipeline::ICreateBlurVBuffers() +bool plDXPipeline::ICreateBlurVBuffers() { // vertex size is 4 verts, with 4 floats each for position, and 2 floats each for uv. const uint32_t kVSize = sizeof(plShadowVertStruct); @@ -12888,7 +12888,7 @@ hsBool plDXPipeline::ICreateBlurVBuffers() // ISetBlurQuadToRender //////////////////////////////////////////////////// // Select the appropriate blur quad (based on size of shadow map) and set it up to render. -hsBool plDXPipeline::ISetBlurQuadToRender(plRenderTarget* smap) +bool plDXPipeline::ISetBlurQuadToRender(plRenderTarget* smap) { const uint32_t kVSize = sizeof(plShadowVertStruct); const uint32_t kVFormat = D3DFVF_XYZ | D3DFVF_TEX1 | D3DFVF_TEXCOORDSIZE2(0) ; @@ -13013,7 +13013,7 @@ void plDXPipeline::IRenderShadowCasterSpan(plShadowSlave* slave, plDrawableSpans ISetupTransforms(drawable, span, m); - hsBool flip = slave->ReverseCull(); + bool flip = slave->ReverseCull(); ISetCullMode(flip); render.RenderPrims(); @@ -13068,7 +13068,7 @@ plDXTextureRef* plDXPipeline::IGetULutTextureRef() // will look for a smaller size if there isn't one available. // Param ortho indicates whether it will be used for orthogonal projection as opposed // to perspective (directional light vs. point light), but is no longer used. -plRenderTarget* plDXPipeline::IFindRenderTarget(uint32_t& width, uint32_t& height, hsBool ortho) +plRenderTarget* plDXPipeline::IFindRenderTarget(uint32_t& width, uint32_t& height, bool ortho) { hsTArray* pool = nil; uint32_t* iNext = nil; @@ -13116,7 +13116,7 @@ plRenderTarget* plDXPipeline::IFindRenderTarget(uint32_t& width, uint32_t& heigh // IPushShadowCastState //////////////////////////////////////////////////////////////////////////////// // Push all the state necessary to start rendering this shadow map, but independent of the // actual shadow caster to be rendered into the map. -hsBool plDXPipeline::IPushShadowCastState(plShadowSlave* slave) +bool plDXPipeline::IPushShadowCastState(plShadowSlave* slave) { plRenderTarget* renderTarg = IFindRenderTarget(slave->fWidth, slave->fHeight, slave->fView.GetOrthogonal()); if( !renderTarg ) @@ -13367,7 +13367,7 @@ plDXLightRef* plDXPipeline::INextShadowLight(plShadowSlave* slave) // IPopShadowCastState /////////////////////////////////////////////////// // Pop the state set to render this shadow caster, so we're ready to render // a different shadow caster, or go on to our main render. -hsBool plDXPipeline::IPopShadowCastState(plShadowSlave* slave) +bool plDXPipeline::IPopShadowCastState(plShadowSlave* slave) { fView = fSettings.fViewStack.Pop(); @@ -13498,7 +13498,7 @@ void plDXPipeline::IResetRenderTargetPools() // and once on drawableB. Further, we need to do any necessary CPU // skinning with ISofwareVertexBlend(drawableA, visList={0,1}) and // ISofwareVertexBlend(drawableB, visList={1}). -hsBool plDXPipeline::IPrepShadowCaster(const plShadowCaster* caster) +bool plDXPipeline::IPrepShadowCaster(const plShadowCaster* caster) { static hsBitVector done; done.Clear(); @@ -13550,7 +13550,7 @@ hsBool plDXPipeline::IPrepShadowCaster(const plShadowCaster* caster) // IRenderShadowCaster //////////////////////////////////////////////// // Render the shadow caster into the slave's render target, creating a shadow map. -hsBool plDXPipeline::IRenderShadowCaster(plShadowSlave* slave) +bool plDXPipeline::IRenderShadowCaster(plShadowSlave* slave) { const plShadowCaster* caster = slave->fCaster; @@ -13672,7 +13672,7 @@ void plDXPipeline::IRenderShadowsOntoSpan(const plRenderPrimFunc& render, const // We've already computed which shadows affect this span. That's recorded in slaveBits. const hsBitVector& slaveBits = span->GetShadowSlaves(); - hsBool first = true; + bool first = true; int i; for( i = 0; i < fShadows.GetCount(); i++ ) @@ -14097,7 +14097,7 @@ void plDXPipeline::IEnableShadowLight(plShadowSlave* slave) // IAcceptsShadow //////////////////////////////////////////////////////////////// // Only allow self shadowing if requested. -hsBool plDXPipeline::IAcceptsShadow(const plSpan* span, plShadowSlave* slave) +bool plDXPipeline::IAcceptsShadow(const plSpan* span, plShadowSlave* slave) { // The span's shadow bits records which shadow maps that span was rendered // into. @@ -14109,7 +14109,7 @@ hsBool plDXPipeline::IAcceptsShadow(const plSpan* span, plShadowSlave* slave) // look goofy, or won't contribute. // Also, if we have less than 3 simultaneous textures, we want to skip anything with // an alpha'd base layer, unless it's been overriden. -hsBool plDXPipeline::IReceivesShadows(const plSpan* span, hsGMaterial* mat) +bool plDXPipeline::IReceivesShadows(const plSpan* span, hsGMaterial* mat) { if( span->fProps & plSpan::kPropNoShadow ) return false; @@ -14189,7 +14189,7 @@ void plDXPipeline::IFillAvRTPool() } } -hsBool plDXPipeline::IFillAvRTPool(uint16_t numRTs, uint16_t width) +bool plDXPipeline::IFillAvRTPool(uint16_t numRTs, uint16_t width) { fAvRTPool.SetCount(numRTs); int i; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.h b/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.h index 1d83fce9..75aa9347 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.h @@ -121,7 +121,7 @@ typedef LPDIRECT3D9 (WINAPI * Direct3DCreateProc)( UINT sdkVersion ); class plRenderPrimFunc { public: - virtual hsBool RenderPrims() const = 0; // return true on error + virtual bool RenderPrims() const = 0; // return true on error }; //// DX-specific Plate Manager implementation @@ -221,20 +221,20 @@ protected: D3DFORMAT fSharedDepthFormat[2]; // Dynamic buffers - uint32_t fVtxRefTime; - uint32_t fNextDynVtx; - uint32_t fDynVtxSize; + uint32_t fVtxRefTime; + uint32_t fNextDynVtx; + uint32_t fDynVtxSize; IDirect3DVertexBuffer9* fDynVtxBuff; - hsBool fManagedAlloced; - hsBool fAllocUnManaged; + bool fManagedAlloced; + bool fAllocUnManaged; // States plDXGeneralSettings fSettings; plDXTweakSettings fTweaks; plDXStencilSettings fStencil; - hsBool fDeviceLost; - hsBool fDevWasLost; + bool fDeviceLost; + bool fDevWasLost; hsTArray fCullPolys; hsTArray fCullHoles; @@ -258,7 +258,7 @@ protected: hsGMatState fMatOverOff; hsTArray fOverrideMat; hsGMaterial* fHoldMat; - hsBool fCurrD3DLiteState; + bool fCurrD3DLiteState; hsMatrix44 fBumpDuMatrix; hsMatrix44 fBumpDvMatrix; @@ -279,13 +279,13 @@ protected: hsGDeviceRef* fLayerRef[ 8 ]; hsGMatState fLayerState[ 8 ]; // base stage (0) state is held in base class hsGMatState fOldLayerState[ 8 ]; - hsBool fLayerTransform[ 8 ]; + bool fLayerTransform[ 8 ]; float fLayerLODBias[ 8 ]; - uint32_t fLayerUVWSrcs[ 8 ]; - uint32_t fLayerXformFlags[ 8 ]; - uint32_t fLastEndingStage; - hsBool fTexturing; - hsBool fForceMatHandle; + uint32_t fLayerUVWSrcs[ 8 ]; + uint32_t fLayerXformFlags[ 8 ]; + uint32_t fLastEndingStage; + bool fTexturing; + bool fForceMatHandle; uint32_t fInSceneDepth; uint32_t fTextUseTime; // inc'd every frame - stat gather only @@ -297,7 +297,7 @@ protected: uint32_t fManagedSeen; uint32_t fManagedCutoff; - double fTime; // World time. + double fTime; // World time. uint32_t fFrame; // inc'd every time the camera moves. uint32_t fRenderCnt; // inc'd every begin scene. @@ -338,8 +338,8 @@ protected: plStatusLogDrawer *fLogDrawer; - hsBool fVSync; - hsBool fForceDeviceReset; + bool fVSync; + bool fForceDeviceReset; void IBeginAllocUnManaged(); void IEndAllocUnManaged(); @@ -347,9 +347,9 @@ protected: void ICheckVtxUsage(); inline void ICheckVBUsage(plDXVertexBufferRef* vRef); - hsBool IRefreshDynVertices(plGBufferGroup* group, plDXVertexBufferRef* vRef); - hsBool ICheckAuxBuffers(const plAuxSpan* span); - hsBool ICheckDynBuffers(plDrawableSpans* drawable, plGBufferGroup* group, const plSpan* span); + bool IRefreshDynVertices(plGBufferGroup* group, plDXVertexBufferRef* vRef); + bool ICheckAuxBuffers(const plAuxSpan* span); + bool ICheckDynBuffers(plDrawableSpans* drawable, plGBufferGroup* group, const plSpan* span); void ICheckStaticVertexBuffer(plDXVertexBufferRef* vRef, plGBufferGroup* owner, uint32_t idx); void ICheckIndexBuffer(plDXIndexBufferRef* iRef); void IFillStaticVertexBufferRef(plDXVertexBufferRef *ref, plGBufferGroup *group, uint32_t idx); @@ -363,12 +363,12 @@ protected: void IAddNormalsSpan( plDrawableSpans *ice, plIcicle *span, plDXVertexBufferRef *vRef, uint32_t bndColor ); // Rendering - hsBool IFlipSurface(); + bool IFlipSurface(); long IGetBufferD3DFormat(uint8_t format) const; - uint32_t IGetBufferFormatSize(uint8_t format) const; + uint32_t IGetBufferFormatSize(uint8_t format) const; void IGetVisibleSpans( plDrawableSpans* drawable, hsTArray& visList, plVisMgr* visMgr ); void IRenderSpans( plDrawableSpans *ice, const hsTArray& visList ); - hsBool ILoopOverLayers(const plRenderPrimFunc& render, hsGMaterial* material, const plSpan& span); + bool ILoopOverLayers(const plRenderPrimFunc& render, hsGMaterial* material, const plSpan& span); void IRenderBufferSpan( const plIcicle& span, hsGDeviceRef *vb, hsGDeviceRef *ib, hsGMaterial *material, @@ -386,7 +386,7 @@ protected: void ICalcLighting( const plLayerInterface *currLayer, const plSpan *currSpan ); void IDisableSpanLights(); void IRestoreSpanLights(); - void ISelectLights( plSpan *span, int numLights, hsBool proj ); + void ISelectLights( plSpan *span, int numLights, bool proj ); void IEnableLights( plSpan *span ); void IMakeLightLists(plVisMgr* visMgr); void ICheckLighting(plDrawableSpans* drawable, hsTArray& visList, plVisMgr* visMgr); @@ -397,7 +397,7 @@ protected: void IRenderProjectionEach(const plRenderPrimFunc& render, hsGMaterial* material, int iPass, const plSpan& span); void IRenderOverWire(const plRenderPrimFunc& render, hsGMaterial* material, const plSpan& span); - hsBool ISkipBumpMap(hsGMaterial* newMat, uint32_t& layer, const plSpan* currSpan) const; + bool ISkipBumpMap(hsGMaterial* newMat, uint32_t& layer, const plSpan* currSpan) const; void ISetBumpMatrices(const plLayerInterface* layer, const plSpan* span); const hsMatrix44& IGetBumpMatrix(uint32_t miscFlags) const; @@ -417,8 +417,8 @@ protected: void IHandleTextureMode(plLayerInterface* layer); void IUseTextureRef(int stage, hsGDeviceRef* dRef, plLayerInterface* layer); void IStageStop(uint32_t stage); - uint32_t ILayersAtOnce(hsGMaterial* mat, uint32_t which); - hsBool ICanEatLayer(plLayerInterface* lay); + uint32_t ILayersAtOnce(hsGMaterial* mat, uint32_t which); + bool ICanEatLayer(plLayerInterface* lay); void ISetLayer(uint32_t lay); void IBottomLayer(); @@ -438,11 +438,11 @@ protected: HRESULT ISetShaders(plShader* vShader, plShader* pShader); // Stenciling - virtual hsBool StencilEnable( hsBool enable ); + virtual bool StencilEnable( bool enable ); virtual void StencilSetCompareFunc( uint8_t func, uint32_t refValue ); virtual void StencilSetMask( uint32_t mask, uint32_t writeMask ); virtual void StencilSetOps( uint8_t passOp, uint8_t failOp, uint8_t passButZFailOp ); - virtual hsBool StencilGetCaps( plStencilCaps *caps ); + virtual bool StencilGetCaps( plStencilCaps *caps ); hsGDeviceRef *MakeTextureRef( plLayerInterface* layer, plMipmap *b ); void IReloadTexture( plDXTextureRef *ref ); @@ -452,22 +452,22 @@ protected: void IFormatTextureData( uint32_t formatType, uint32_t numPix, hsRGBAColor32* const src, void *dst ); void *IGetPixelScratch( uint32_t size ); hsGDeviceRef *IMakeCubicTextureRef( plLayerInterface* layer, plCubicEnvironmap *cubic ); - hsBool IProcessMipmapLevels( plMipmap *mipmap, uint32_t &numLevels, + bool IProcessMipmapLevels( plMipmap *mipmap, uint32_t &numLevels, uint32_t *&levelSizes, uint32_t &totalSize, - uint32_t &numPixels, void *&textureData, hsBool noMip ); + uint32_t &numPixels, void *&textureData, bool noMip ); IDirect3DTexture9 *IMakeD3DTexture( plDXTextureRef *ref, D3DFORMAT formatType ); IDirect3DCubeTexture9 *IMakeD3DCubeTexture( plDXTextureRef *ref, D3DFORMAT formatType ); // Visualization of active occluders void IMakeOcclusionSnap(); - hsBool IAvatarSort(plDrawableSpans* d, const hsTArray& visList); + bool IAvatarSort(plDrawableSpans* d, const hsTArray& visList); void IBlendVertsIntoBuffer( plSpan* span, hsMatrix44* matrixPalette, int numMatrices, const uint8_t *src, uint8_t format, uint32_t srcStride, uint8_t *dest, uint32_t destStride, uint32_t count, uint16_t localUVWChans ) { blend_vert_buffer.call(span, matrixPalette, numMatrices, src, format, srcStride, dest, destStride, count, localUVWChans); }; - hsBool ISoftwareVertexBlend( plDrawableSpans* drawable, const hsTArray& visList ); + bool ISoftwareVertexBlend( plDrawableSpans* drawable, const hsTArray& visList ); void ILinkDevRef( plDXDeviceRef *ref, plDXDeviceRef **refList ); @@ -482,7 +482,7 @@ protected: void ISetErrorMessage( char *errStr = nil ); void IGetD3DError(); void IShowErrorMessage( char *errStr = nil ); - hsBool ICreateFail( char *errStr ); + bool ICreateFail( char *errStr ); // FPU mode check void IFPUCheck(); @@ -495,33 +495,33 @@ protected: void IRestrictCaps( const hsG3DDeviceRecord& devRec ); void ISetGraphicsCapability(uint32_t v); - hsBool IFindDepthFormat(D3DPRESENT_PARAMETERS& params); - hsBool IFindCompressedFormats(); - hsBool IFindLuminanceFormats(); - hsBool ITextureFormatAllowed( D3DFORMAT format ); + bool IFindDepthFormat(D3DPRESENT_PARAMETERS& params); + bool IFindCompressedFormats(); + bool IFindLuminanceFormats(); + bool ITextureFormatAllowed( D3DFORMAT format ); void ISetCurrentDriver( D3DEnum_DriverInfo *driv ); void ISetCurrentDevice( D3DEnum_DeviceInfo *dev ); void ISetCurrentMode( D3DEnum_ModeInfo *mode ); - hsBool ICreateMaster(); - hsBool ICreateDevice(hsBool windowed); - hsBool ICreateNormalSurfaces(); + bool ICreateMaster(); + bool ICreateDevice(bool windowed); + bool ICreateNormalSurfaces(); - hsBool ICreateDeviceObjects(); + bool ICreateDeviceObjects(); void IReleaseDeviceObjects(); - hsBool ICreateDynDeviceObjects(); + bool ICreateDynDeviceObjects(); void IReleaseDynDeviceObjects(); void IReleaseShaders(); - hsBool IResetDevice(); + bool IResetDevice(); // View and clipping void ISetViewport(); void IUpdateViewVectors() const; void IRefreshCullTree(); - void ISetAnisotropy(hsBool on); + void ISetAnisotropy(bool on); // Transforms D3DXMATRIX& IMatrix44ToD3DMatrix( D3DXMATRIX& dst, const hsMatrix44& src ); @@ -532,9 +532,9 @@ protected: void ILocalToWorldToD3D(); void ISavageYonHack(); void ISetLocalToWorld( const hsMatrix44& l2w, const hsMatrix44& w2l ); - void ISetCullMode(hsBool flip=false); - hsBool inline IIsViewLeftHanded(); - hsBool IGetClearViewPort(D3DRECT& r); + void ISetCullMode(bool flip=false); + bool inline IIsViewLeftHanded(); + bool IGetClearViewPort(D3DRECT& r); plViewTransform& IGetViewTransform() { return fView.fTransform; } void IUpdateViewFlags(); void ISetupTransforms(plDrawableSpans* drawable, const plSpan& span, hsMatrix44& lastL2W); @@ -547,9 +547,9 @@ protected: void ISetRenderTarget( plRenderTarget *target ); - hsBool IPrepRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &surfFormat, + bool IPrepRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &surfFormat, D3DFORMAT &depthFormat, D3DRESOURCETYPE &resType ); - hsBool IFindRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &surfFormat, D3DRESOURCETYPE &resType ); + bool IFindRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &surfFormat, D3DRESOURCETYPE &resType ); // From a D3DFORMAT enumeration, return the string literal for it static const char *IGetDXFormatName( D3DFORMAT format ); @@ -558,29 +558,29 @@ protected: // Generation void IClearShadowSlaves(); void IPreprocessShadows(); - hsBool IPrepShadowCaster(const plShadowCaster* caster); + bool IPrepShadowCaster(const plShadowCaster* caster); void IRenderShadowCasterSpan(plShadowSlave* slave, plDrawableSpans* drawable, const plIcicle& span); void ISetupShadowCastTextureStages(plShadowSlave* slave); - hsBool IRenderShadowCaster(plShadowSlave* slave); + bool IRenderShadowCaster(plShadowSlave* slave); void ISetupShadowLight(plShadowSlave* slave); plDXLightRef* INextShadowLight(plShadowSlave* slave); - hsBool IPushShadowCastState(plShadowSlave* slave); - hsBool IPopShadowCastState(plShadowSlave* slave); + bool IPushShadowCastState(plShadowSlave* slave); + bool IPopShadowCastState(plShadowSlave* slave); plDXTextureRef* IGetULutTextureRef(); - hsBool ICreateBlurVBuffers(); + bool ICreateBlurVBuffers(); void IReleaseBlurVBuffers(); void IMakeRenderTargetPools(); void IResetRenderTargetPools(); - plRenderTarget* IFindRenderTarget(uint32_t& w, uint32_t& h, hsBool ortho); + plRenderTarget* IFindRenderTarget(uint32_t& w, uint32_t& h, bool ortho); void IReleaseRenderTargetPools(); // Selection void IAttachSlaveToReceivers(int iSlave, plDrawableSpans* drawable, const hsTArray& visList); void IAttachShadowsToReceivers(plDrawableSpans* drawable, const hsTArray& visList); - hsBool IAcceptsShadow(const plSpan* span, plShadowSlave* slave); - hsBool IReceivesShadows(const plSpan* span, hsGMaterial* mat); + bool IAcceptsShadow(const plSpan* span, plShadowSlave* slave); + bool IReceivesShadows(const plSpan* span, hsGMaterial* mat); void ISetShadowFromGroup(plDrawableSpans* drawable, const plSpan* span, plLightInfo* liInfo); // Application @@ -592,7 +592,7 @@ protected: void ISetupShadowSlaveTextures(plShadowSlave* slave); // Postprocess (blurring) - hsBool ISetBlurQuadToRender(plRenderTarget* smap); + bool ISetBlurQuadToRender(plRenderTarget* smap); void IRenderBlurBackToShadowMap(plRenderTarget* smap, plRenderTarget* scratch, plRenderTarget* dst); void IRenderBlurFromShadowMap(plRenderTarget* scratchRT, plRenderTarget* smap, float scale); void IBlurSetRenderTarget(plRenderTarget* rt); @@ -605,7 +605,7 @@ protected: uint16_t fAvRTWidth; uint32_t fAvNextFreeRT; void IFillAvRTPool(); - hsBool IFillAvRTPool(uint16_t numRTs, uint16_t width); // Returns true if we successfully filled the pool. Otherwise cleans up. + bool IFillAvRTPool(uint16_t numRTs, uint16_t width); // Returns true if we successfully filled the pool. Otherwise cleans up. void IReleaseAvRTPool(); plRenderTarget* IGetNextAvRT(); void IFreeAvRT(plRenderTarget* tex); @@ -627,15 +627,15 @@ public: virtual IDirect3DDevice9* GetD3DDevice() const { return fD3DDevice; } // Typical 3D device - virtual hsBool PreRender(plDrawable* drawable, hsTArray& visList, plVisMgr* visMgr=nil); - virtual hsBool PrepForRender(plDrawable* drawable, hsTArray& visList, plVisMgr* visMgr=nil); + virtual bool PreRender(plDrawable* drawable, hsTArray& visList, plVisMgr* visMgr=nil); + virtual bool PrepForRender(plDrawable* drawable, hsTArray& visList, plVisMgr* visMgr=nil); virtual void Render(plDrawable* d, const hsTArray& visList); virtual void Draw(plDrawable* d); virtual void PushRenderRequest(plRenderRequest* req); virtual void PopRenderRequest(plRenderRequest* req); - void ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool VSync = false ); + void ResetDisplayDevice(int Width, int Height, int ColorDepth, bool Windowed, int NumAASamples, int MaxAnisotropicSamples, bool VSync = false ); virtual void ClearRenderTarget( plDrawable* d ); virtual void ClearRenderTarget( const hsColorRGBA* col = nil, const float* depth = nil ); @@ -647,42 +647,42 @@ public: virtual void PushRenderTarget( plRenderTarget *target ); virtual plRenderTarget* PopRenderTarget(); - virtual hsBool BeginRender(); - virtual hsBool EndRender(); + virtual bool BeginRender(); + virtual bool EndRender(); virtual void RenderScreenElements(); - virtual hsBool BeginDrawable(plDrawable* d); - virtual hsBool EndDrawable(plDrawable* d); + virtual bool BeginDrawable(plDrawable* d); + virtual bool EndDrawable(plDrawable* d); virtual void BeginVisMgr(plVisMgr* visMgr); virtual void EndVisMgr(plVisMgr* visMgr); - virtual hsBool IsFullScreen() const { return fSettings.fFullscreen; } + virtual bool IsFullScreen() const { return fSettings.fFullscreen; } virtual uint32_t Width() const { return fView.fTransform.GetViewPortWidth(); } virtual uint32_t Height() const { return fView.fTransform.GetViewPortHeight(); } virtual uint32_t ColorDepth() const { return fSettings.fColorDepth; } virtual void Resize( uint32_t width, uint32_t height ); // Culling. Might be used in Update before bothering to do any serious computation. - virtual hsBool TestVisibleWorld(const hsBounds3Ext& wBnd); - virtual hsBool TestVisibleWorld(const plSceneObject* sObj); - virtual hsBool HarvestVisible(plSpaceTree* space, hsTArray& visList); - virtual hsBool SubmitOccluders(const hsTArray& polyList); + virtual bool TestVisibleWorld(const hsBounds3Ext& wBnd); + virtual bool TestVisibleWorld(const plSceneObject* sObj); + virtual bool HarvestVisible(plSpaceTree* space, hsTArray& visList); + virtual bool SubmitOccluders(const hsTArray& polyList); // Debug flags - virtual void SetDebugFlag( uint32_t flag, hsBool on ); - virtual hsBool IsDebugFlagSet( uint32_t flag ) const; + virtual void SetDebugFlag( uint32_t flag, bool on ); + virtual bool IsDebugFlagSet( uint32_t flag ) const; // These are also only for debugging. virtual void SetMaxCullNodes(uint16_t n) { fView.fCullMaxNodes = n; } virtual uint16_t GetMaxCullNodes() const { return fView.fCullMaxNodes; } - virtual hsBool CheckResources(); + virtual bool CheckResources(); virtual void LoadResources(); // Tells us where it's a good time to load in unmanaged resources. // Properties - virtual void SetProperty( uint32_t prop, hsBool on ) { on ? fSettings.fProperties |= prop : fSettings.fProperties &= ~prop; } - virtual hsBool GetProperty( uint32_t prop ) const { return ( fSettings.fProperties & prop ) ? true : false; } + virtual void SetProperty( uint32_t prop, bool on ) { on ? fSettings.fProperties |= prop : fSettings.fProperties &= ~prop; } + virtual bool GetProperty( uint32_t prop ) const { return ( fSettings.fProperties & prop ) ? true : false; } virtual uint32_t GetMaxLayersAtOnce() const { return fSettings.fMaxLayersAtOnce; } @@ -699,8 +699,8 @@ public: virtual void CheckVertexBufferRef(plGBufferGroup* owner, uint32_t idx); virtual void CheckIndexBufferRef(plGBufferGroup* owner, uint32_t idx); - virtual hsBool OpenAccess(plAccessSpan& dst, plDrawableSpans* d, const plVertexSpan* span, hsBool readOnly); - virtual hsBool CloseAccess(plAccessSpan& acc); + virtual bool OpenAccess(plAccessSpan& dst, plDrawableSpans* d, const plVertexSpan* span, bool readOnly); + virtual bool CloseAccess(plAccessSpan& acc); virtual void CheckTextureRef(plLayerInterface* lay); static void FreeManagedTexture(uint32_t sz) { hsAssert(fTexManaged >= sz, "Freeing mem we don't have"); fTexManaged -= sz; } @@ -709,7 +709,7 @@ public: static void AllocManagedVertex(uint32_t sz) { fVtxManaged += sz; } #ifndef PLASMA_EXTERNAL_RELEASE - static void ProfilePoolMem(D3DPOOL poolType, uint32_t size, hsBool add, char *id); + static void ProfilePoolMem(D3DPOOL poolType, uint32_t size, bool add, char *id); #endif // PLASMA_EXTERNAL_RELEASE // From a D3DFORMAT enumeration, return the bit depth associated with it. @@ -762,8 +762,8 @@ public: virtual void PopOverrideMaterial(hsGMaterial* restore); virtual hsGMaterial* GetOverrideMaterial() const; - virtual plLayerInterface* AppendLayerInterface(plLayerInterface* li, hsBool onAllLayers = false); - virtual plLayerInterface* RemoveLayerInterface(plLayerInterface* li, hsBool onAllLayers = false); + virtual plLayerInterface* AppendLayerInterface(plLayerInterface* li, bool onAllLayers = false); + virtual plLayerInterface* RemoveLayerInterface(plLayerInterface* li, bool onAllLayers = false); virtual plLayerInterface* PushPiggyBackLayer(plLayerInterface* li); virtual plLayerInterface* PopPiggyBackLayer(plLayerInterface* li); @@ -771,10 +771,10 @@ public: virtual uint32_t GetMaterialOverrideOn(hsGMatState::StateIdx category) const; virtual uint32_t GetMaterialOverrideOff(hsGMatState::StateIdx category) const; - virtual hsGMatState PushMaterialOverride(const hsGMatState& state, hsBool on); - virtual hsGMatState PushMaterialOverride(hsGMatState::StateIdx cat, uint32_t which, hsBool on); - virtual void PopMaterialOverride(const hsGMatState& restore, hsBool on); - virtual const hsGMatState& GetMaterialOverride(hsBool on) const; + virtual hsGMatState PushMaterialOverride(const hsGMatState& state, bool on); + virtual hsGMatState PushMaterialOverride(hsGMatState::StateIdx cat, uint32_t which, bool on); + virtual void PopMaterialOverride(const hsGMatState& restore, bool on); + virtual const hsGMatState& GetMaterialOverride(bool on) const; virtual hsColorOverride PushColorOverride(const hsColorOverride& over); virtual void PopColorOverride(const hsColorOverride& restore); @@ -783,16 +783,16 @@ public: virtual void SubmitShadowSlave(plShadowSlave* slave); virtual void SubmitClothingOutfit(plClothingOutfit* co); - virtual hsBool SetGamma(float eR, float eG, float eB); - virtual hsBool SetGamma(const uint16_t* const tabR, const uint16_t* const tabG, const uint16_t* const tabB); + virtual bool SetGamma(float eR, float eG, float eB); + virtual bool SetGamma(const uint16_t* const tabR, const uint16_t* const tabG, const uint16_t* const tabB); - virtual hsBool CaptureScreen( plMipmap *dest, bool flipVertical = false, uint16_t desiredWidth = 0, uint16_t desiredHeight = 0 ); + virtual bool CaptureScreen( plMipmap *dest, bool flipVertical = false, uint16_t desiredWidth = 0, uint16_t desiredHeight = 0 ); virtual plMipmap* ExtractMipMap(plRenderTarget* targ); /// Error handling virtual const char *GetErrorString(); - hsBool ManagedAlloced() const { return fManagedAlloced; } + bool ManagedAlloced() const { return fManagedAlloced; } virtual void GetSupportedColorDepths(hsTArray &ColorDepths); virtual void GetSupportedDisplayModes(std::vector *res, int ColorDepth = 32 ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp index 930314a1..eedfa3a0 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.cpp @@ -70,7 +70,7 @@ void plDXPixelShader::Release() ISetError(nil); } -hsBool plDXPixelShader::VerifyFormat(uint8_t format) const +bool plDXPixelShader::VerifyFormat(uint8_t format) const { return (fOwner->GetInputFormat() & format) == fOwner->GetInputFormat(); } diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.h b/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.h index 1c0545a3..b164d498 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXPixelShader.h @@ -64,7 +64,7 @@ public: void Release(); void Link(plDXPixelShader** back) { plDXDeviceRef::Link((plDXDeviceRef**)back); } - hsBool VerifyFormat(uint8_t format) const; + bool VerifyFormat(uint8_t format) const; IDirect3DPixelShader9 *GetShader(plDXPipeline* pipe); }; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXRenderTargetRef.h b/Sources/Plasma/PubUtilLib/plPipeline/plDXRenderTargetRef.h index e1bbf033..73a49d59 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXRenderTargetRef.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXRenderTargetRef.h @@ -68,13 +68,13 @@ class plDXRenderTargetRef: public plDXTextureRef IDirect3DSurface9 *fD3DColorSurface; IDirect3DSurface9 *fD3DDepthSurface; - hsBool fReleaseDepth; + bool fReleaseDepth; void Link( plDXRenderTargetRef **back ) { plDXDeviceRef::Link( (plDXDeviceRef **)back ); } plDXRenderTargetRef *GetNext( void ) { return (plDXRenderTargetRef *)fNext; } - plDXRenderTargetRef( D3DFORMAT tp, uint32_t ml, plRenderTarget *owner, hsBool releaseDepthOnDelete = true ); + plDXRenderTargetRef( D3DFORMAT tp, uint32_t ml, plRenderTarget *owner, bool releaseDepthOnDelete = true ); plDXRenderTargetRef& Set( D3DFORMAT tp, uint32_t ml, plRenderTarget *owner ); virtual void SetOwner( plRenderTarget *targ ) { fOwner = (plBitmap *)targ; } diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXSettings.h b/Sources/Plasma/PubUtilLib/plPipeline/plDXSettings.h index 26249e9d..685cc4f9 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXSettings.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXSettings.h @@ -90,7 +90,7 @@ public: plFogEnvironment fDefaultFog; plCullTree fCullTree; - hsBool fCullTreeDirty; + bool fCullTreeDirty; uint16_t fCullMaxNodes; enum XformResets @@ -103,15 +103,15 @@ public: }; uint8_t fXformResetFlags; - hsBool fLocalToWorldLeftHanded; - hsBool fWorldToCamLeftHanded; + bool fLocalToWorldLeftHanded; + bool fWorldToCamLeftHanded; mutable hsVector3 fDirection; mutable hsVector3 fUp; mutable hsVector3 fAcross; hsPoint3 fWorldPos; - mutable hsBool fViewVectorsDirty; + mutable bool fViewVectorsDirty; hsMatrix44 fLocalToWorld; hsMatrix44 fWorldToLocal; @@ -123,7 +123,7 @@ public: const hsMatrix44& GetWorldToCamera() const { return fTransform.GetWorldToCamera(); } const hsMatrix44& GetCameraToWorld() const { return fTransform.GetCameraToWorld(); } - hsBool IsPerspective() const { return fTransform.GetPerspective(); } + bool IsPerspective() const { return fTransform.GetPerspective(); } void Reset(); }; @@ -132,7 +132,7 @@ class plDXGeneralSettings { public: - hsBool fFullscreen; + bool fFullscreen; hsWinRef fHWnd; uint32_t fColorDepth; uint8_t fNumAASamples; @@ -146,15 +146,15 @@ class plDXGeneralSettings DWORD fClearColor; uint8_t fMaxAnisotropicSamples; D3DPRESENT_PARAMETERS fPresentParams; - hsBool fVeryAnnoyingTextureInvalidFlag; - hsBool fNoGammaCorrect; + bool fVeryAnnoyingTextureInvalidFlag; + bool fNoGammaCorrect; int fMaxUVWSrc; - hsBool fCantProj; - hsBool fLimitedProj; - hsBool fBadManaged; - hsBool fShareDepth; - hsBool fCurrAnisotropy; - hsBool fIsIntel; + bool fCantProj; + bool fLimitedProj; + bool fBadManaged; + bool fShareDepth; + bool fCurrAnisotropy; + bool fIsIntel; IDirect3DSurface9 *fCurrD3DMainSurface; IDirect3DSurface9 *fCurrD3DDepthSurface; @@ -280,7 +280,7 @@ class plDXStencilSettings { public: uint8_t fDepth; - hsBool fEnabled; + bool fEnabled; uint8_t fCmpFunc; uint8_t fFailOp, fPassOp, fPassButZFailOp; uint32_t fRefValue; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXTextureRef.h b/Sources/Plasma/PubUtilLib/plPipeline/plDXTextureRef.h index 97827e87..d34355ad 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXTextureRef.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXTextureRef.h @@ -97,9 +97,9 @@ class plDXTextureRef : public plDXDeviceRef uint32_t GetFlags( void ) { return fFlags; } void SetFlags( uint32_t flag ) { fFlags = flag; } - plDXTextureRef& Set( D3DFORMAT tp, uint32_t ml, uint32_t mw, uint32_t mh, uint32_t np, uint32_t sz, uint32_t manSize, uint32_t* lSz, void* pd, hsBool ed=false, hsBool renderTarget = false ); + plDXTextureRef& Set( D3DFORMAT tp, uint32_t ml, uint32_t mw, uint32_t mh, uint32_t np, uint32_t sz, uint32_t manSize, uint32_t* lSz, void* pd, bool ed=false, bool renderTarget = false ); - plDXTextureRef( D3DFORMAT tp, uint32_t ml, uint32_t mw, uint32_t mh, uint32_t np, uint32_t sz, uint32_t manSize, uint32_t* lSz, void* pd, hsBool ed=false, hsBool renderTarget = false ); + plDXTextureRef( D3DFORMAT tp, uint32_t ml, uint32_t mw, uint32_t mh, uint32_t np, uint32_t sz, uint32_t manSize, uint32_t* lSz, void* pd, bool ed=false, bool renderTarget = false ); virtual ~plDXTextureRef(); void Link( plDXTextureRef **back ) { plDXDeviceRef::Link( (plDXDeviceRef **)back ); } @@ -113,7 +113,7 @@ class plDXCubeTextureRef : public plDXTextureRef public: void *fFaceData[ 5 ]; // First face is in the inherited fData - plDXCubeTextureRef( D3DFORMAT tp, uint32_t ml, uint32_t mw, uint32_t mh, uint32_t np, uint32_t sz, uint32_t manSize, uint32_t* lSz, void* pd, hsBool ed=false, hsBool renderTarget = false ) : + plDXCubeTextureRef( D3DFORMAT tp, uint32_t ml, uint32_t mw, uint32_t mh, uint32_t np, uint32_t sz, uint32_t manSize, uint32_t* lSz, void* pd, bool ed=false, bool renderTarget = false ) : plDXTextureRef( tp, ml, mw, mh, np, sz, manSize, lSz, pd, ed, renderTarget ) { diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp index 3215159f..3c54cfac 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.cpp @@ -72,7 +72,7 @@ void plDXVertexShader::Release() ISetError(nil); } -hsBool plDXVertexShader::VerifyFormat(uint8_t format) const +bool plDXVertexShader::VerifyFormat(uint8_t format) const { return (fOwner->GetInputFormat() & format) == fOwner->GetInputFormat(); } diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.h b/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.h index 27f3fb55..3bd75fed 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDXVertexShader.h @@ -66,7 +66,7 @@ public: virtual void Release(); void Link(plDXVertexShader** back) { plDXDeviceRef::Link((plDXDeviceRef**)back); } - hsBool VerifyFormat(uint8_t format) const; + bool VerifyFormat(uint8_t format) const; IDirect3DVertexShader9* GetShader(plDXPipeline* pipe); }; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.cpp index 9d310b5e..e3d204ed 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.cpp @@ -156,7 +156,7 @@ plDebugTextManager::~plDebugTextManager() //// AddString /////////////////////////////////////////////////////////////// -void plDebugTextManager::AddString( uint16_t x, uint16_t y, const char *s, uint32_t hexColor, uint8_t style, hsBool drawOnTop ) +void plDebugTextManager::AddString( uint16_t x, uint16_t y, const char *s, uint32_t hexColor, uint8_t style, bool drawOnTop ) { if( drawOnTop ) fDrawOnTopList.Append( plDebugTextNode( s, hexColor, x, y, style ) ); @@ -169,7 +169,7 @@ void plDebugTextManager::AddString( uint16_t x, uint16_t y, const char *s, ui // to create a background for our console; will be obliterated once we figure // a better way to do so. -void plDebugTextManager::DrawRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t hexColor, hsBool drawOnTop ) +void plDebugTextManager::DrawRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t hexColor, bool drawOnTop ) { if( drawOnTop ) fDrawOnTopList.Append( plDebugTextNode( left, top, right, bottom, hexColor ) ); @@ -179,7 +179,7 @@ void plDebugTextManager::DrawRect( uint16_t left, uint16_t top, uint16_t righ //// Draw3DBorder //////////////////////////////////////////////////////////// -void plDebugTextManager::Draw3DBorder( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t hexColor1, uint32_t hexColor2, hsBool drawOnTop ) +void plDebugTextManager::Draw3DBorder( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t hexColor1, uint32_t hexColor2, bool drawOnTop ) { if( drawOnTop ) fDrawOnTopList.Append( plDebugTextNode( left, top, right, bottom, hexColor1, hexColor2 ) ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.h b/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.h index e8f8cc35..8242a6a8 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDebugText.h @@ -83,7 +83,7 @@ class plDebugText char fFontFace[ 128 ]; uint16_t fFontSize; - hsBool fEnabled, fLockEnable, fDrawOnTopMode; + bool fEnabled, fLockEnable, fDrawOnTopMode; public: @@ -121,7 +121,7 @@ class plDebugText DrawString( x, y, string, (uint32_t)( ( a << 24 ) | ( r << 16 ) | ( g << 8 ) | ( b ) ), style ); } - void SetDrawOnTopMode( hsBool enable ) { fDrawOnTopMode = enable; } + void SetDrawOnTopMode( bool enable ) { fDrawOnTopMode = enable; } /// TEMPORARY FUNCTION (until we can find a better way to do this, one way or the other) void DrawRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t hexColor ); @@ -142,9 +142,9 @@ class plDebugText uint16_t GetFontSize( void ) { return fFontSize; } uint16_t GetFontHeight(); - void SetEnable( hsBool on ) { fEnabled = on; } + void SetEnable( bool on ) { fEnabled = on; } void DisablePermanently( void ) { fEnabled = false; fLockEnable = true; } - hsBool IsEnabled( void ) { return fEnabled; } + bool IsEnabled( void ) { return fEnabled; } void GetScreenSize( uint32_t *width, uint32_t *height ); }; @@ -182,14 +182,14 @@ class plDebugTextManager plDebugTextManager() { plDebugText::Instance().SetManager( this ); fFont = nil; } ~plDebugTextManager(); - void AddString( uint16_t x, uint16_t y, const char *s, uint32_t hexColor, uint8_t style, hsBool drawOnTop = false ); + void AddString( uint16_t x, uint16_t y, const char *s, uint32_t hexColor, uint8_t style, bool drawOnTop = false ); uint32_t CalcStringWidth( const char *string ); /// TEMPORARY FUNCTION (until we can find a better way to do this, one way or the other) - void DrawRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t hexColor, hsBool drawOnTop = false ); + void DrawRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t hexColor, bool drawOnTop = false ); /// EVEN MORE TEMPORARY FUNCTION (until we can find a better way to do this, one way or the other) - void Draw3DBorder( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t hexColor1, uint32_t hexColor2, hsBool drawOnTop = false ); + void Draw3DBorder( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t hexColor1, uint32_t hexColor2, bool drawOnTop = false ); void DrawToDevice( plPipeline *pipe ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp index 1f91302c..3237f75c 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp @@ -276,14 +276,14 @@ void plDynamicEnvMap::ReRender() ISubmitRenderRequests(); } -hsBool plDynamicEnvMap::INeedReRender() +bool plDynamicEnvMap::INeedReRender() { fOutStanding = 0; fLastRefresh = 0; return true; } -hsBool plDynamicEnvMap::MsgReceive(plMessage* msg) +bool plDynamicEnvMap::MsgReceive(plMessage* msg) { plRenderRequestAck* ack = plRenderRequestAck::ConvertNoRef(msg); if( ack ) @@ -354,7 +354,7 @@ hsBool plDynamicEnvMap::MsgReceive(plMessage* msg) return plCubicRenderTarget::MsgReceive(msg); } -hsBool plDynamicEnvMap::IOnRefMsg(plGenRefMsg* refMsg) +bool plDynamicEnvMap::IOnRefMsg(plGenRefMsg* refMsg) { switch( refMsg->fType) { @@ -397,7 +397,7 @@ hsBool plDynamicEnvMap::IOnRefMsg(plGenRefMsg* refMsg) return false; } -void plDynamicEnvMap::SetIncludeCharacters(hsBool b) +void plDynamicEnvMap::SetIncludeCharacters(bool b) { fIncCharacters = b; if( b ) @@ -610,7 +610,7 @@ void plDynamicCamMap::ICheckForRefresh(double t, plPipeline *pipe) { int i; - hsBool useRefl = (fFlags & kReflectionMask) == kReflectionMask; + bool useRefl = (fFlags & kReflectionMask) == kReflectionMask; if (!fCamera) { if ((useRefl && fMatLayers[0]->GetTexture() != this) || (!useRefl && fMatLayers[0]->GetTexture() != fDisableTexture)) @@ -629,7 +629,7 @@ void plDynamicCamMap::ICheckForRefresh(double t, plPipeline *pipe) if (!useRefl && fDisableTexture) return; - hsBool inView = false; + bool inView = false; for (i = 0; i < fTargetNodes.GetCount(); i++) { if (pipe->TestVisibleWorld(fTargetNodes[i])) @@ -665,14 +665,14 @@ void plDynamicCamMap::ICheckForRefresh(double t, plPipeline *pipe) } } -hsBool plDynamicCamMap::INeedReRender() +bool plDynamicCamMap::INeedReRender() { fOutStanding = 0; fLastRefresh = 0; return true; } -hsBool plDynamicCamMap::MsgReceive(plMessage* msg) +bool plDynamicCamMap::MsgReceive(plMessage* msg) { plRenderRequestAck* ack = plRenderRequestAck::ConvertNoRef(msg); if( ack ) @@ -749,7 +749,7 @@ void plDynamicCamMap::IPrepTextureLayers() } } -hsBool plDynamicCamMap::IOnRefMsg(plRefMsg* refMsg) +bool plDynamicCamMap::IOnRefMsg(plRefMsg* refMsg) { plGenRefMsg* genRefMsg = plGenRefMsg::ConvertNoRef(refMsg); @@ -854,7 +854,7 @@ hsBool plDynamicCamMap::IOnRefMsg(plRefMsg* refMsg) return false; } -void plDynamicCamMap::SetIncludeCharacters(hsBool b) +void plDynamicCamMap::SetIncludeCharacters(bool b) { fIncCharacters = b; if( b ) @@ -868,7 +868,7 @@ void plDynamicCamMap::AddVisRegion(plVisRegion* reg) hsgResMgr::ResMgr()->AddViaNotify( reg->GetKey(), new plGenRefMsg( GetKey(), plGenRefMsg::kOnReplace, -1, kRefVisSet ), plRefFlags::kActiveRef ); } -void plDynamicCamMap::SetEnabled(hsBool enable) +void plDynamicCamMap::SetEnabled(bool enable) { if (enable) fFlags |= kReflectionEnabled; @@ -876,7 +876,7 @@ void plDynamicCamMap::SetEnabled(hsBool enable) fFlags &= ~kReflectionEnabled; } -void plDynamicCamMap::SetCapable(hsBool capable) +void plDynamicCamMap::SetCapable(bool capable) { if (capable) fFlags |= kReflectionCapable; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.h b/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.h index 63926d48..93c3abe2 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.h @@ -85,17 +85,17 @@ protected: hsBitVector fVisSet; hsTArray fVisRegions; hsTArray fVisRegionNames; - hsBool fIncCharacters; + bool fIncCharacters; void IUpdatePosition(); - hsBool INeedReRender(); + bool INeedReRender(); void ISetupRenderRequests(); void ISubmitRenderRequests(); void ISubmitRenderRequest(int i); void ICheckForRefresh(double t, plPipeline *pipe); - hsBool IOnRefMsg(plGenRefMsg* refMsg); + bool IOnRefMsg(plGenRefMsg* refMsg); public: plDynamicEnvMap(); @@ -109,7 +109,7 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void ReRender(); @@ -131,8 +131,8 @@ public: void AddVisRegion(plVisRegion* reg); // Will just send a ref - void SetIncludeCharacters(hsBool b); - hsBool GetIncludeCharacters() const { return fIncCharacters; } + void SetIncludeCharacters(bool b); + bool GetIncludeCharacters() const { return fIncCharacters; } void SetVisRegionName(char *name){ fVisRegionNames.Push(name); } }; @@ -169,7 +169,7 @@ protected: hsBitVector fVisSet; hsTArray fVisRegions; hsTArray fVisRegionNames; // this allows us to specify vis-regions in other pages. - hsBool fIncCharacters; + bool fIncCharacters; plCameraModifier1* fCamera; plSceneObject* fRootNode; hsTArray fTargetNodes; @@ -185,14 +185,14 @@ protected: kReflectionMask = kReflectionCapable | kReflectionEnabled, }; - hsBool INeedReRender(); + bool INeedReRender(); void ISetupRenderRequest(plPipeline *pipe); void ISubmitRenderRequest(plPipeline *pipe); void ICheckForRefresh(double t, plPipeline *pipe); void IPrepTextureLayers(); - hsBool IOnRefMsg(plRefMsg* refMsg); + bool IOnRefMsg(plRefMsg* refMsg); public: plDynamicCamMap(); @@ -206,20 +206,20 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); void ReRender(); void Init(); - void SetIncludeCharacters(hsBool b); + void SetIncludeCharacters(bool b); void SetRefreshRate(float secs); void AddVisRegion(plVisRegion* reg); void SetVisRegionName(char *name){ fVisRegionNames.Push(name); } - static hsBool GetEnabled() { return (fFlags & kReflectionEnabled) != 0; } - static void SetEnabled(hsBool enable); - static hsBool GetCapable() { return (fFlags & kReflectionCapable) != 0; } - static void SetCapable(hsBool capable); + static bool GetEnabled() { return (fFlags & kReflectionEnabled) != 0; } + static void SetEnabled(bool enable); + static bool GetCapable() { return (fFlags & kReflectionCapable) != 0; } + static void SetCapable(bool capable); }; #endif // plDynamicEnvMap_inc diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp index a3461832..975590b5 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.cpp @@ -110,7 +110,7 @@ void plGBufferCell::Write( hsStream *s ) //// Constructor ////////////////////////////////////////////////////////////// -plGBufferGroup::plGBufferGroup( uint8_t format, hsBool vertsVolatile, hsBool idxVolatile, int LOD ) +plGBufferGroup::plGBufferGroup( uint8_t format, bool vertsVolatile, bool idxVolatile, int LOD ) { fVertBuffStorage.Reset(); fIdxBuffStorage.Reset(); @@ -277,7 +277,7 @@ void plGBufferGroup::SetIndexBufferRef( uint32_t index, hsGDeviceRef *ib ) //// PrepForRendering ///////////////////////////////////////////////////////// -void plGBufferGroup::PrepForRendering( plPipeline *pipe, hsBool adjustForNvidiaLighting ) +void plGBufferGroup::PrepForRendering( plPipeline *pipe, bool adjustForNvidiaLighting ) { ISendStorageToBuffers( pipe, adjustForNvidiaLighting ); // The following line was taken out so we'd keep our data around, allowing @@ -304,7 +304,7 @@ hsGDeviceRef* plGBufferGroup::GetIndexBufferRef(uint32_t i) //// ISendStorageToBuffers //////////////////////////////////////////////////// -void plGBufferGroup::ISendStorageToBuffers( plPipeline *pipe, hsBool adjustForNvidiaLighting ) +void plGBufferGroup::ISendStorageToBuffers( plPipeline *pipe, bool adjustForNvidiaLighting ) { plProfile_BeginTiming(DrawRefillVertex); @@ -718,7 +718,7 @@ uint32_t plGBufferGroup::IMakeCell( uint32_t vbIndex, uint8_t flags, uint32_t v // and starting position. Basically does what AppendToVertStorage() used to // do except it doesn't actually copy any data into the space reserved. -hsBool plGBufferGroup::ReserveVertStorage( uint32_t numVerts, uint32_t *vbIndex, uint32_t *cell, uint32_t *offset, uint8_t flags ) +bool plGBufferGroup::ReserveVertStorage( uint32_t numVerts, uint32_t *vbIndex, uint32_t *cell, uint32_t *offset, uint8_t flags ) { uint8_t *storagePtr = nil; uint32_t cStartIdx = 0, vStartIdx = 0; @@ -1033,7 +1033,7 @@ void plGBufferGroup::StuffToVertStorage( plGeometrySpan *srcSpan, uint32_t vb //// ReserveIndexStorage ////////////////////////////////////////////////////// // Same as ReserveVertStorage(), only for indices :) -hsBool plGBufferGroup::ReserveIndexStorage( uint32_t numIndices, uint32_t *ibIndex, uint32_t *ibStart, uint16_t **dataPtr ) +bool plGBufferGroup::ReserveIndexStorage( uint32_t numIndices, uint32_t *ibIndex, uint32_t *ibStart, uint16_t **dataPtr ) { uint16_t *storagePtr; int i; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.h b/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.h index b8c55f5a..9973c2ec 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plGBufferGroup.h @@ -118,8 +118,8 @@ class plGBufferGroup uint8_t fNumSkinWeights; uint32_t fNumVerts; uint32_t fNumIndices; - hsBool fVertsVolatile; - hsBool fIdxVolatile; + bool fVertsVolatile; + bool fIdxVolatile; int fLOD; hsTArray fVertexBufferRefs; @@ -140,7 +140,7 @@ class plGBufferGroup hsTArray *> fCells; - virtual void ISendStorageToBuffers( plPipeline *pipe, hsBool adjustForNvidiaLighting ); + virtual void ISendStorageToBuffers( plPipeline *pipe, bool adjustForNvidiaLighting ); uint8_t ICalcVertexSize( uint8_t &liteStride ); @@ -179,7 +179,7 @@ class plGBufferGroup kReserveIsolate = 0x10 }; - plGBufferGroup(uint8_t format, hsBool vertsVolatile, hsBool idxVolatile, int LOD = 0); + plGBufferGroup(uint8_t format, bool vertsVolatile, bool idxVolatile, int LOD = 0); ~plGBufferGroup(); uint8_t GetNumUVs( void ) const { return ( fFormat & kUVCountMask ); } @@ -190,8 +190,8 @@ class plGBufferGroup void DirtyVertexBuffer(int i); void DirtyIndexBuffer(int i); - hsBool VertexReady(int i) const { return (i < fVertexBufferRefs.GetCount()) && fVertexBufferRefs[i]; } - hsBool IndexReady(int i) const { return (i < fIndexBufferRefs.GetCount()) && fIndexBufferRefs[i]; } + bool VertexReady(int i) const { return (i < fVertexBufferRefs.GetCount()) && fVertexBufferRefs[i]; } + bool IndexReady(int i) const { return (i < fIndexBufferRefs.GetCount()) && fIndexBufferRefs[i]; } uint8_t GetVertexSize( void ) const { return fStride; } uint8_t GetVertexLiteStride( void ) const { return fLiteStride; } uint8_t GetVertexFormat( void ) const { return fFormat; } @@ -265,10 +265,10 @@ class plGBufferGroup void CleanUp( void ); // Take buffer data and convert it to device-specific buffers - void PrepForRendering( plPipeline *pipe, hsBool adjustForNvidiaLighting ); + void PrepForRendering( plPipeline *pipe, bool adjustForNvidiaLighting ); // Reserves space in a vertex buffer - hsBool ReserveVertStorage( uint32_t numVerts, uint32_t *vbIndex, uint32_t *cell, uint32_t *offset, uint8_t flags ); + bool ReserveVertStorage( uint32_t numVerts, uint32_t *vbIndex, uint32_t *cell, uint32_t *offset, uint8_t flags ); // Append vertex data to the first available storage buffer void AppendToVertStorage( plGeometrySpan *srcSpan, uint32_t *vbIndex, uint32_t *cell, uint32_t *offset ); @@ -276,7 +276,7 @@ class plGBufferGroup void AppendToColorStorage( plGeometrySpan *srcSpan, uint32_t *vbIndex, uint32_t *cell, uint32_t *offset, uint32_t origCell ); // Reserves space in an index buffer - hsBool ReserveIndexStorage( uint32_t numIndices, uint32_t *ibIndex, uint32_t *ibStart, uint16_t **dataPtr = nil ); + bool ReserveIndexStorage( uint32_t numIndices, uint32_t *ibIndex, uint32_t *ibStart, uint16_t **dataPtr = nil ); // Append index data to the first available storage buffer void AppendToIndexStorage( uint32_t numIndices, uint16_t *data, uint32_t addToAll, uint32_t *ibIndex, uint32_t *ibStart ); @@ -298,8 +298,8 @@ class plGBufferGroup void StuffToVertStorage( plGeometrySpan *srcSpan, uint32_t vbIndex, uint32_t cell, uint32_t offset, uint8_t flags ); // Are our verts volatile? - hsBool AreVertsVolatile() const { return fVertsVolatile; } - hsBool AreIdxVolatile() const { return fIdxVolatile; } + bool AreVertsVolatile() const { return fVertsVolatile; } + bool AreIdxVolatile() const { return fIdxVolatile; } int GetLOD() const { return fLOD; } }; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp index 5292efcf..5245d130 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp @@ -146,7 +146,7 @@ void plPlate::SetSize( float width, float height, bool adjustByAspectRation ) //// SetTransform //////////////////////////////////////////////////////////// -void plPlate::SetTransform( hsMatrix44 &matrix, hsBool reSort ) +void plPlate::SetTransform( hsMatrix44 &matrix, bool reSort ) { fXformMatrix = matrix; if( reSort ) @@ -198,7 +198,7 @@ void plPlate::SetOpacity( float opacity ) // Creates a new material for this plate with either a specified texture // or an empty, white-filled bitmap. -plMipmap *plPlate::CreateMaterial( uint32_t width, uint32_t height, hsBool withAlpha, plMipmap* texture ) +plMipmap *plPlate::CreateMaterial( uint32_t width, uint32_t height, bool withAlpha, plMipmap* texture ) { plLayer *layer; hsGMaterial *material; @@ -293,7 +293,7 @@ void plPlate::ILink( plPlate **back ) *back = this; } -hsBool plPlate::IsVisible() +bool plPlate::IsVisible() { // return not-visible if our material is not valid if (fMaterial->GetNumLayers() == 0) diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plPlates.h b/Sources/Plasma/PubUtilLib/plPipeline/plPlates.h index 8a16da21..0179c10b 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plPlates.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plPlates.h @@ -117,7 +117,7 @@ class plPlate /// Basic properties - void SetTransform( hsMatrix44 &matrix, hsBool reSort = true ); + void SetTransform( hsMatrix44 &matrix, bool reSort = true ); void SetMaterial( hsGMaterial *material ); void SetTexture(plBitmap *texture); // Creates a new single layer material to use the texture. void SetTitle( const char *title ) { if( title != nil ) strncpy( fTitle, title, sizeof( fTitle ) ); else fTitle[ 0 ] = 0; } @@ -128,8 +128,8 @@ class plPlate uint32_t GetFlags( void ) { return fFlags; } const plMipmap *GetMipmap( void ) { return fMipmap; } - void SetVisible( hsBool vis ) { if( vis ) fFlags |= kFlagVisible; else fFlags &= ~kFlagVisible; } - hsBool IsVisible( void ); + void SetVisible( bool vis ) { if( vis ) fFlags |= kFlagVisible; else fFlags &= ~kFlagVisible; } + bool IsVisible( void ); void SetOpacity( float opacity = 1.f ); @@ -142,7 +142,7 @@ class plPlate void SetPosition( float x, float y, float z = -1.0f ); void SetSize( float width, float height, bool adjustByAspectRatio = false ); - plMipmap *CreateMaterial( uint32_t width, uint32_t height, hsBool withAlpha, plMipmap* texture = NULL ); + plMipmap *CreateMaterial( uint32_t width, uint32_t height, bool withAlpha, plMipmap* texture = NULL ); void CreateFromResource( const char *resName ); void ReloadFromResource( const char *resName ); }; @@ -205,7 +205,7 @@ class plPlateManager plPlate *fPlates; plPipeline *fOwner; - hsBool fCreatedSucessfully; + bool fCreatedSucessfully; plPlateManager( plPipeline *pipe ) { @@ -241,7 +241,7 @@ class plPlateManager uint32_t GetPipeHeight( void ); void DrawToDevice( plPipeline *pipe ); - hsBool IsValid( void ) { return fCreatedSucessfully; } + bool IsValid( void ) { return fCreatedSucessfully; } }; // Sets the hInstance that we load our resources from. A SceneViewer hack. diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.cpp index 313c9728..5ce38d94 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.cpp @@ -76,7 +76,7 @@ void plRenderTarget::SetKey(plKey k) -hsBool plRenderTarget::MsgReceive(plMessage* msg) +bool plRenderTarget::MsgReceive(plMessage* msg) { plPipeRTMakeMsg* make = plPipeRTMakeMsg::ConvertNoRef(msg); if( make ) @@ -116,7 +116,7 @@ uint32_t plRenderTarget::Read( hsStream *s ) fZDepth = s->ReadByte(); fStencilDepth = s->ReadByte(); - return total + 2 * 2 + 2 + 4 * ( fProportionalViewport ? sizeof( float ) : sizeof( uint16_t ) ) + sizeof( hsBool ); + return total + 2 * 2 + 2 + 4 * ( fProportionalViewport ? sizeof( float ) : sizeof( uint16_t ) ) + sizeof( bool ); } uint32_t plRenderTarget::Write( hsStream *s ) @@ -145,7 +145,7 @@ uint32_t plRenderTarget::Write( hsStream *s ) s->WriteByte( fZDepth ); s->WriteByte( fStencilDepth ); - return total + 2 * 2 + 2 + 4 * ( fProportionalViewport ? sizeof( float ) : sizeof( uint16_t ) ) + sizeof( hsBool ); + return total + 2 * 2 + 2 + 4 * ( fProportionalViewport ? sizeof( float ) : sizeof( uint16_t ) ) + sizeof( bool ); } /////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.h b/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.h index 32189a4d..56464855 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plRenderTarget.h @@ -85,8 +85,8 @@ class plRenderTarget : public plBitmap } fProportional; } fViewport; - hsBool fApplyTexQuality; - hsBool fProportionalViewport; + bool fApplyTexQuality; + bool fProportionalViewport; uint8_t fZDepth, fStencilDepth; plCubicRenderTarget *fParent; @@ -190,13 +190,13 @@ class plRenderTarget : public plBitmap float GetVPRightProp( void ) { ASSERT_PROPORTIONAL; return fViewport.fProportional.fRight; } float GetVPBottomProp( void ) { ASSERT_PROPORTIONAL; return fViewport.fProportional.fBottom; } - hsBool ViewIsProportional( void ) const { return fProportionalViewport; } + bool ViewIsProportional( void ) const { return fProportionalViewport; } plCubicRenderTarget *GetParent( void ) const { return fParent; } virtual uint32_t GetTotalSize( void ) const { return fWidth * fHeight * ( fPixelSize >> 3 ); } - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void SetVisRegionName(char *name){} // override to set vis region names for anyone who cares }; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plStencil.h b/Sources/Plasma/PubUtilLib/plPipeline/plStencil.h index 9388553b..1da0a5dc 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plStencil.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plStencil.h @@ -95,7 +95,7 @@ class plStencilCaps }; - hsBool fIsSupported; + bool fIsSupported; uint8_t fSupportedDepths; uint8_t fSupportedOps; }; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.h b/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.h index c5219e5a..62b21b48 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.h @@ -92,7 +92,7 @@ class plTextFont char fFace[ 128 ]; uint16_t fSize; - hsBool fInitialized; + bool fInitialized; uint16_t fFontHeight; plPipeline *fPipe; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp index 430d644a..0625ef11 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.cpp @@ -276,7 +276,7 @@ void plTextGenerator::ClearToColor( hsColorRGBA &color ) //// SetFont ////////////////////////////////////////////////////////////////// // OS-specific. Load the given font for drawing the text with. -void plTextGenerator::SetFont( const char *face, uint16_t size, hsBool antiAliasRGB ) +void plTextGenerator::SetFont( const char *face, uint16_t size, bool antiAliasRGB ) { #if HS_BUILD_FOR_WIN32 if( fWinFont != nil ) @@ -315,7 +315,7 @@ void plTextGenerator::SetFont( const char *face, uint16_t size, hsBool antiAl // case you want plenty of block color in your RGB channel because it'll get // alpha-ed out by the alpha channel. -void plTextGenerator::SetTextColor( hsColorRGBA &color, hsBool blockRGB ) +void plTextGenerator::SetTextColor( hsColorRGBA &color, bool blockRGB ) { #if HS_BUILD_FOR_WIN32 int r = (int)(color.r * 255.f); @@ -588,7 +588,7 @@ hsMatrix44 plTextGenerator::GetLayerTransform( void ) //// MsgReceive /////////////////////////////////////////////////////////////// -hsBool plTextGenerator::MsgReceive( plMessage *msg ) +bool plTextGenerator::MsgReceive( plMessage *msg ) { #ifdef MCN_DO_REFS plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.h b/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.h index 75921508..838c1d22 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plTextGenerator.h @@ -99,8 +99,8 @@ class plTextGenerator : public hsKeyedObject void ClearToColor( hsColorRGBA &color ); - void SetFont( const char *face, uint16_t size, hsBool antiAliasRGB = true ); - void SetTextColor( hsColorRGBA &color, hsBool blockRGB = false ); + void SetFont( const char *face, uint16_t size, bool antiAliasRGB = true ); + void SetTextColor( hsColorRGBA &color, bool blockRGB = false ); void DrawString( uint16_t x, uint16_t y, const char *text ); void DrawString( uint16_t x, uint16_t y, const wchar_t *text ); @@ -132,7 +132,7 @@ class plTextGenerator : public hsKeyedObject hsMatrix44 GetLayerTransform( void ); - virtual hsBool MsgReceive( plMessage *msg ); + virtual bool MsgReceive( plMessage *msg ); }; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plTransitionMgr.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plTransitionMgr.cpp index 266b218a..223e7c81 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plTransitionMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plTransitionMgr.cpp @@ -203,7 +203,7 @@ void plTransitionMgr::IStartFadeIn( float lengthInSecs, uint8_t effect ) //// IStop /////////////////////////////////////////////////////////////////// -void plTransitionMgr::IStop( hsBool aboutToStartAgain /*= false*/ ) +void plTransitionMgr::IStop( bool aboutToStartAgain /*= false*/ ) { int i; @@ -244,7 +244,7 @@ void plTransitionMgr::IStop( hsBool aboutToStartAgain /*= false*/ ) //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool plTransitionMgr::MsgReceive( plMessage* msg ) +bool plTransitionMgr::MsgReceive( plMessage* msg ) { int i; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plTransitionMgr.h b/Sources/Plasma/PubUtilLib/plPipeline/plTransitionMgr.h index d6725d38..42bf27b9 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plTransitionMgr.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plTransitionMgr.h @@ -75,7 +75,7 @@ class plTransitionMgr : public hsKeyedObject }; uint8_t fCurrentEffect; - hsBool fRegisteredForTime, fHoldAtEnd, fPlaying, fNoSoundFade; + bool fRegisteredForTime, fHoldAtEnd, fPlaying, fNoSoundFade; float fEffectLength, fCurrOpacity, fOpacDelta; float fLastTime; @@ -84,7 +84,7 @@ class plTransitionMgr : public hsKeyedObject void ICreatePlate( void ); - void IStop( hsBool aboutToStartAgain = false ); + void IStop( bool aboutToStartAgain = false ); hsTArray fCallbacks; @@ -98,7 +98,7 @@ class plTransitionMgr : public hsKeyedObject void Init( void ); - virtual hsBool MsgReceive( plMessage* msg ); + virtual bool MsgReceive( plMessage* msg ); }; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp index 0a81b485..7f05b975 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.cpp @@ -74,7 +74,7 @@ static const float kQuanta[plVertCoder::kNumFloatFields] = inline void plVertCoder::ICountFloats(const uint8_t* src, uint16_t maxCnt, const float quant, const uint32_t stride, - float& lo, hsBool &allSame, uint16_t& count) + float& lo, bool &allSame, uint16_t& count) { lo = *(float*)src; lo = floor(lo / quant + 0.5f) * quant; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.h b/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.h index b6b91d17..5d1ba14b 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/plVertCoder.h @@ -61,7 +61,7 @@ protected: { public: float fOffset; - hsBool fAllSame; + bool fAllSame; uint16_t fCount; }; @@ -82,7 +82,7 @@ protected: static uint32_t fRawBytes; static uint32_t fSkippedBytes; - inline void ICountFloats(const uint8_t* src, uint16_t maxCnt, const float quant, const uint32_t stride, float& lo, hsBool& allSame, uint16_t& count); + inline void ICountFloats(const uint8_t* src, uint16_t maxCnt, const float quant, const uint32_t stride, float& lo, bool& allSame, uint16_t& count); inline void IEncodeFloat(hsStream* s, const uint32_t vertsLeft, const int field, const int chan, const uint8_t*& src, const uint32_t stride); inline void IDecodeFloat(hsStream* s, const int field, const int chan, uint8_t*& dst, const uint32_t stride); diff --git a/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.h b/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.h index b3dc11f1..7ecbf390 100644 --- a/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.h +++ b/Sources/Plasma/PubUtilLib/plProgressMgr/plProgressMgr.h @@ -136,7 +136,7 @@ class plOperationProgress // Application data void SetContext( uint32_t context ) { fContext = context;} - hsBool IsDone( void ) { return ( fValue < fMax ) ? false : true; } + bool IsDone( void ) { return ( fValue < fMax ) ? false : true; } // True if this is the initial update (progress was just created) bool IsInitUpdate() { return hsCheckBits(fFlags, kInitUpdate); } @@ -171,7 +171,7 @@ class plOperationProgress plOperationProgress* GetNext() const { return fNext; } // Or this - void SetCancelFlag( hsBool f ) { hsChangeBits(fFlags, kShouldCancel, f); } + void SetCancelFlag( bool f ) { hsChangeBits(fFlags, kShouldCancel, f); } }; // This is a callback proc you set that gets called every time the progressManager @@ -241,7 +241,7 @@ class plProgressMgr plProgressMgrCallbackProc SetCallbackProc( plProgressMgrCallbackProc proc ); - hsBool IsActive( void ) const { return ( fOperations != nil ) ? true : false; } + bool IsActive( void ) const { return ( fOperations != nil ) ? true : false; } void CancelAllOps( void ); }; diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plBSDiffBuffer.h b/Sources/Plasma/PubUtilLib/plResMgr/plBSDiffBuffer.h index 7c91398f..920dc364 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plBSDiffBuffer.h +++ b/Sources/Plasma/PubUtilLib/plResMgr/plBSDiffBuffer.h @@ -75,8 +75,8 @@ class plBSDiffBuffer { protected: - hsBool fWriting; - uint32_t fNewLength, fPatchLength; + bool fWriting; + uint32_t fNewLength, fPatchLength; unsigned char* fPatchBuffer; public: diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plDiffBuffer.h b/Sources/Plasma/PubUtilLib/plResMgr/plDiffBuffer.h index 8b4b2220..db6ffb7b 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plDiffBuffer.h +++ b/Sources/Plasma/PubUtilLib/plResMgr/plDiffBuffer.h @@ -81,13 +81,13 @@ class plDiffBuffer { protected: - hsBool fWriting, f16BitMode; - uint32_t fNewLength; + bool fWriting, f16BitMode; + uint32_t fNewLength; hsRAMStream *fStream; // Support for BSDiff patch buffers (Patching only) plBSDiffBuffer *fBSDiffBuffer; - hsBool fIsBSDiff; + bool fIsBSDiff; public: diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp index 09a98db6..998f9e94 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp @@ -81,7 +81,7 @@ const char* plKeyFinder::GetLastErrorString() // For Console display // // Does name string compare with potentially mangled (ie. [1 0 0]foo) names // -hsBool NameMatches(const char* obName, const char* pKName, hsBool subString) +bool NameMatches(const char* obName, const char* pKName, bool subString) { if (!obName || !pKName) return false; @@ -117,7 +117,7 @@ hsBool NameMatches(const char* obName, const char* pKName, hsBool subString) } plKey plKeyFinder::StupidSearch(const char * age, const char * rm, - const char *className, const plString &obName, hsBool subString) + const char *className, const plString &obName, bool subString) { uint16_t ty = plFactory::FindClassIndex(className); return StupidSearch(age, rm, ty, obName, subString); @@ -128,21 +128,21 @@ class plKeyFinderIter : public plRegistryKeyIterator, public plRegistryPageItera protected: uint16_t fClassType; plString fObjName; - hsBool fSubstr; + bool fSubstr; plKey fFoundKey; const char *fAgeName; public: plKey GetFoundKey( void ) const { return fFoundKey; } - plKeyFinderIter( uint16_t classType, const plString &obName, hsBool substr ) + plKeyFinderIter( uint16_t classType, const plString &obName, bool substr ) : fFoundKey( nil ), fClassType( classType ), fObjName( obName ), fSubstr( substr ) { } - plKeyFinderIter( uint16_t classType, const plString &obName, hsBool substr, const char *ageName ) + plKeyFinderIter( uint16_t classType, const plString &obName, bool substr, const char *ageName ) : fFoundKey( nil ), fClassType( classType ), fObjName( obName ), fSubstr( substr ), fAgeName( ageName ) {} - virtual hsBool EatKey( const plKey& key ) + virtual bool EatKey( const plKey& key ) { if( key->GetUoid().GetClassType() == fClassType && NameMatches( fObjName.c_str(), key->GetUoid().GetObjectName().c_str(), fSubstr ) ) @@ -154,7 +154,7 @@ public: return true; } - virtual hsBool EatPage( plRegistryPageNode *pageNode ) + virtual bool EatPage( plRegistryPageNode *pageNode ) { #ifndef _DEBUG try @@ -182,7 +182,7 @@ public: }; plKey plKeyFinder::StupidSearch(const char * age, const char * rm, - uint16_t classType, const plString &obName, hsBool subString) + uint16_t classType, const plString &obName, bool subString) { if (obName.IsNull()) return nil; @@ -286,7 +286,7 @@ class plKeyFinderIterator : public plRegistryKeyIterator, public plRegistryPageI plKeyFinderIterator( uint16_t classType, const plString &obName, std::vector& foundKeys ) : fClassType( classType ), fObjName( obName ), fFoundKeys( foundKeys ) { } - virtual hsBool EatKey( const plKey& key ) + virtual bool EatKey( const plKey& key ) { if( key->GetUoid().IsValid() && key->GetUoid().GetClassType() == fClassType && key->GetUoid().GetObjectName().Find( fObjName ) >= 0 ) @@ -297,9 +297,9 @@ class plKeyFinderIterator : public plRegistryKeyIterator, public plRegistryPageI return true; } - virtual hsBool EatPage( plRegistryPageNode *page ) + virtual bool EatPage( plRegistryPageNode *page ) { - hsBool ret = page->IterateKeys( this ); + bool ret = page->IterateKeys( this ); return ret; } }; @@ -346,7 +346,7 @@ class plPageFinder : public plRegistryPageIterator plPageFinder( plRegistryPageNode **page, const char *ageS, const char *pageS ) : fPagePtr( page ), fFindString( pageS ), fAgeString( ageS ) { *fPagePtr = nil; } - virtual hsBool EatPage( plRegistryPageNode *node ) + virtual bool EatPage( plRegistryPageNode *node ) { static char str[ 512 ]; const plPageInfo &info = node->GetPageInfo(); diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h b/Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h index 4d4a2b77..ca86b50b 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h +++ b/Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h @@ -89,8 +89,8 @@ public: static plKeyFinder& Instance(); // These are Stupid search because they just do string searchs on the objects. - plKey StupidSearch(const char * age, const char * rm, const char *className, const plString &obName, hsBool subString=false); - plKey StupidSearch(const char * age, const char * rm, uint16_t objType, const plString &obName, hsBool subString=false); + plKey StupidSearch(const char * age, const char * rm, const char *className, const plString &obName, bool subString=false); + plKey StupidSearch(const char * age, const char * rm, uint16_t objType, const plString &obName, bool subString=false); eErrCodes GetLastErrorCode() { return fLastError; } const char* GetLastErrorString(); // For Console display diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plLoc.h b/Sources/Plasma/PubUtilLib/plResMgr/plLoc.h index 72bafb5c..ea25b83f 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plLoc.h +++ b/Sources/Plasma/PubUtilLib/plResMgr/plLoc.h @@ -68,7 +68,7 @@ public: void ClearThrowBack() { fThrowBack = NULL; fThrowBackLevel = 0; } bool ThrowBackAvailable() { return (fThrowBack == NULL) ? false: true; } int NextLine(char **pP); // returns an Allocated string in pP of next valid line, and Level #, or LOC_EOF - hsBool8 Ready() { return fpFile ? true: false; } + bool8 Ready() { return fpFile ? true: false; } private: FILE * fpFile; char * fThrowBack; // If a line is not used, it can be thrown back...unget() diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp index 773e4bbd..1ff2851c 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp @@ -87,7 +87,7 @@ plLocalization::encodingTypes plLocalization::fUnicodeEncoding[] = Enc_UTF8, // kJapanese }; -hsBool plLocalization::IGetLocalized(const char* name, Language lang, char* localizedName) +bool plLocalization::IGetLocalized(const char* name, Language lang, char* localizedName) { const char* underscore = strrchr(name, '_'); @@ -113,7 +113,7 @@ hsBool plLocalization::IGetLocalized(const char* name, Language lang, char* loca return false; } -hsBool plLocalization::ExportGetLocalized(const char* name, int lang, char* localizedName) +bool plLocalization::ExportGetLocalized(const char* name, int lang, char* localizedName) { return IGetLocalized(name, Language(lang+1), localizedName) && plFileUtils::FileExists(localizedName); @@ -184,7 +184,7 @@ std::vector plLocalization::StringToLocal(const std::wstring & loc } } // now sortedTagLocs has the indexes of tagLocs sorted from smallest loc to highest loc - hsBool noTags = true; + bool noTags = true; for (i=0; i &keys ) : fKeys( keys ) { } -hsBool plKeyCollector::EatKey(const plKey& key) +bool plKeyCollector::EatKey(const plKey& key) { fKeys.Append(key); return true; } -hsBool plIndirectUnloadIterator::EatPage(plRegistryPageNode* page) +bool plIndirectUnloadIterator::EatPage(plRegistryPageNode* page) { page->IterateKeys(this); return true; diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryHelpers.h b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryHelpers.h index 349fa79e..2f84c37d 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryHelpers.h +++ b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryHelpers.h @@ -65,14 +65,14 @@ class plRegistryKeyIterator { public: virtual ~plRegistryKeyIterator() {} - virtual hsBool EatKey(const plKey& key) = 0; + virtual bool EatKey(const plKey& key) = 0; }; class plRegistryPageIterator { public: virtual ~plRegistryPageIterator() {} - virtual hsBool EatPage(plRegistryPageNode* keyNode) = 0; + virtual bool EatPage(plRegistryPageNode* keyNode) = 0; }; @@ -85,7 +85,7 @@ protected: public: plKeyCollector(hsTArray& keys); - virtual hsBool EatKey(const plKey& key); + virtual bool EatKey(const plKey& key); }; // If you loaded keys with another iterator, this will ensure that they're unloaded @@ -94,9 +94,8 @@ class plIndirectUnloadIterator : public plRegistryPageIterator, public plRegistr public: plIndirectUnloadIterator() {} - hsBool EatKey(const plKey& key) { return true; } - - hsBool EatPage(plRegistryPageNode* page); + bool EatKey(const plKey& key) { return true; } + bool EatPage(plRegistryPageNode* page); }; #endif // _plRegistryHelpers_h diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp index 684cfe28..31f70703 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp @@ -221,7 +221,7 @@ protected: public: plWriteIterator(hsStream* s) : fStream(s) {} - virtual hsBool EatKey(const plKey& key) + virtual bool EatKey(const plKey& key) { plKeyImp* imp = (plKeyImp*)key; imp->WriteObject(fStream); @@ -283,7 +283,7 @@ void plRegistryPageNode::Write() //// IterateKeys ///////////////////////////////////////////////////////////// -hsBool plRegistryPageNode::IterateKeys(plRegistryKeyIterator* iterator) const +bool plRegistryPageNode::IterateKeys(plRegistryKeyIterator* iterator) const { KeyMap::const_iterator it = fKeyLists.begin(); for (; it != fKeyLists.end(); it++) @@ -300,7 +300,7 @@ hsBool plRegistryPageNode::IterateKeys(plRegistryKeyIterator* iterator) const // Restricted version that only iterates through the keys of a given class // type. -hsBool plRegistryPageNode::IterateKeys(plRegistryKeyIterator* iterator, uint16_t classToRestrictTo) const +bool plRegistryPageNode::IterateKeys(plRegistryKeyIterator* iterator, uint16_t classToRestrictTo) const { plRegistryKeyList* keyList = IGetKeyList(classToRestrictTo); if (keyList != nil) @@ -345,7 +345,7 @@ void plRegistryPageNode::AddKey(plKeyImp* key) // "\n\n(Key name: %s, Class: %s, Loc: %s)", key->GetUoid().GetObjectName(), // plFactory::GetNameOfClass(classType), key->GetUoid().GetLocation().StringIze(tempStr)); //hsStatusMessage(str); - hsBool recovered = false; + bool recovered = false; // Attempt recovery for (int i = 0; i < 500; i++) @@ -383,14 +383,14 @@ void plRegistryPageNode::SetKeyUsed(plKeyImp* key) keys->SetKeyUsed(key); } -hsBool plRegistryPageNode::SetKeyUnused(plKeyImp* key) +bool plRegistryPageNode::SetKeyUnused(plKeyImp* key) { plRegistryKeyList* keys = IGetKeyList(key->GetUoid().GetClassType()); if (keys == nil) return false; plRegistryKeyList::LoadStatus loadStatusChange; - hsBool removed = keys->SetKeyUnused(key, loadStatusChange); + bool removed = keys->SetKeyUnused(key, loadStatusChange); // If the key type just changed load status, update our load counts if (loadStatusChange == plRegistryKeyList::kDynUnloaded) diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h index a9cdd665..b3674b7f 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h +++ b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h @@ -83,7 +83,7 @@ protected: hsBufferedStream fStream; // Stream for reading/writing our page uint8_t fOpenRequests; // How many handles there are to fStream (or // zero if it's closed) - hsBool fIsNewPage; // True if this page is new (not read off disk) + bool fIsNewPage; // True if this page is new (not read off disk) plRegistryPageNode() {} @@ -98,18 +98,18 @@ public: plRegistryPageNode(const plLocation& location, const char* age, const char* page, const char* dataPath); ~plRegistryPageNode(); - hsBool IsValid() const { return fValid == kPageOk; } + bool IsValid() const { return fValid == kPageOk; } PageCond GetPageCondition() { return fValid; } // True if we have any static or dynamic keys loaded - hsBool IsLoaded() const { return fDynLoadedTypes > 0 || fStaticLoadedTypes > 0; } + bool IsLoaded() const { return fDynLoadedTypes > 0 || fStaticLoadedTypes > 0; } // True if all of our static keys are loaded - hsBool IsFullyLoaded() const { return (fStaticLoadedTypes == fKeyLists.size() && !fKeyLists.empty()) || fIsNewPage; } + bool IsFullyLoaded() const { return (fStaticLoadedTypes == fKeyLists.size() && !fKeyLists.empty()) || fIsNewPage; } // Export time only. If we want to reuse a page, load the keys we want then // call SetNewPage, so it will be considered a new page from now on. That // way we won't try to load it's keys again. - hsBool IsNewPage() const { return fIsNewPage; } + bool IsNewPage() const { return fIsNewPage; } void SetNewPage() { fIsNewPage = true; } const plPageInfo& GetPageInfo() const { return fPageInfo; } @@ -128,10 +128,10 @@ public: // When all the static keys are unused we can free the memory associated with // them. When a dynamic key is unused we just delete it right away. void SetKeyUsed(plKeyImp* key); - hsBool SetKeyUnused(plKeyImp* key); + bool SetKeyUnused(plKeyImp* key); - hsBool IterateKeys(plRegistryKeyIterator* iterator) const; - hsBool IterateKeys(plRegistryKeyIterator* iterator, uint16_t classToRestrictTo) const; + bool IterateKeys(plRegistryKeyIterator* iterator) const; + bool IterateKeys(plRegistryKeyIterator* iterator, uint16_t classToRestrictTo) const; // Call this to get a read stream for the page. If a valid pointer is // returned, make sure to call CloseStream when you're done using it. diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp index f6558235..66278a2a 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp @@ -66,7 +66,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnNetCommon/plSynchedObject.h" #include "pnNetCommon/plNetApp.h" -hsBool gDataServerLocal = false; +bool gDataServerLocal = false; /// Logging #define for easier use #define kResMgrLog(level, log) if (plResMgrSettings::Get().GetLoggingLevel() >= level) log @@ -121,7 +121,7 @@ plResManager::~plResManager() hsAssert(!fInited,"ResMgr not shutdown"); } -hsBool plResManager::IInit() +bool plResManager::IInit() { if (fInited) return true; @@ -163,7 +163,7 @@ hsBool plResManager::IInit() return true; } -hsBool plResManager::IReset() // Used to Re-Export (number of times) +bool plResManager::IReset() // Used to Re-Export (number of times) { BeginShutdown(); IShutdown(); @@ -244,7 +244,7 @@ plRegistryPageNode* plResManager::FindSinglePage(const char* path) const PageMap::const_iterator it; for (it = fAllPages.begin(); it != fAllPages.end(); it++) { - if (hsStrCaseEQ((it->second)->GetPagePath(), path)) + if (strcmpi((it->second)->GetPagePath(), path) == 0) return it->second; } @@ -268,7 +268,7 @@ plDispatchBase *plResManager::Dispatch() } -void plResManager::LogReadTimes(hsBool logReadTimes) +void plResManager::LogReadTimes(bool logReadTimes) { fLogReadTimes = logReadTimes; if (fLogReadTimes) @@ -303,7 +303,7 @@ hsKeyedObject* plResManager::IGetSharedObject(plKeyImp* pKey) //// ReadObject ///////////////////////////////////////////////////////////// // Given a key, goes off and reads in the actual object from its source -hsBool plResManager::ReadObject(plKeyImp* key) +bool plResManager::ReadObject(plKeyImp* key) { // Read in the object. If while we are doing this something else requests a // load (through AddViaNotify or ReadKeyNotifyMe) we consider it a child load @@ -351,7 +351,7 @@ hsBool plResManager::ReadObject(plKeyImp* key) return ret; } -hsBool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream) +bool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream) { static uint64_t totalTime = 0; @@ -476,7 +476,7 @@ public: fResMgr->IterateAllPages(this); } - virtual hsBool EatPage(plRegistryPageNode* page) + virtual bool EatPage(plRegistryPageNode* page) { fResMgr->UnloadPageObjects(page, fHint); return true; @@ -495,7 +495,7 @@ static bool sFirstTime = true; #endif // Just the scene nodes (and objects referenced by the node... and so on) -void plResManager::IPageOutSceneNodes(hsBool forceAll) +void plResManager::IPageOutSceneNodes(bool forceAll) { plSynchEnabler ps(false); // disable dirty tracking while paging out @@ -626,14 +626,14 @@ void plResManager::GetLocationStrings(const plLocation& loc, char* ageBuffer, ch hsStrcpy(pageBuffer, info.GetPage()); } -hsBool plResManager::AddViaNotify(plRefMsg* msg, plRefFlags::Type flags) +bool plResManager::AddViaNotify(plRefMsg* msg, plRefFlags::Type flags) { hsAssert(msg && msg->GetRef() && msg->GetRef()->GetKey(), "Improperly filled out ref message"); plKey key = msg->GetRef()->GetKey(); // for linux build return AddViaNotify(key, msg, flags); } -hsBool plResManager::AddViaNotify(const plKey &key, plRefMsg* msg, plRefFlags::Type flags) +bool plResManager::AddViaNotify(const plKey &key, plRefMsg* msg, plRefFlags::Type flags) { hsAssert(key, "Can't add without a Key"); if (!key) @@ -654,7 +654,7 @@ hsBool plResManager::AddViaNotify(const plKey &key, plRefMsg* msg, plRefFlags::T return true; } -hsBool plResManager::SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags) +bool plResManager::SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags) { if (!ko) return false; @@ -674,7 +674,7 @@ hsBool plResManager::SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Ty // This doesn't mean you are guaranteed to have your ref at the return of SendRef, // because if it's not in memory, we don't wait around while we load it, we just // return false. -hsBool plResManager::SendRef(const plKey& key, plRefMsg* refMsg, plRefFlags::Type flags) +bool plResManager::SendRef(const plKey& key, plRefMsg* refMsg, plRefFlags::Type flags) { if (!key) { @@ -847,7 +847,7 @@ plKey plResManager::ReRegister(const plString& nm, const plUoid& oid) plKey plResManager::ReadKey(hsStream* s) { - hsBool nonNil = s->ReadBool(); + bool nonNil = s->ReadBool(); if (!nonNil) return nil; @@ -939,7 +939,7 @@ plKey plResManager::ICloneKey(const plUoid& objUoid, uint32_t playerID, uint32_t // When support for paging is added, key->UnRegister() should not clear its notify lists. // Return true if successful. // -hsBool plResManager::Unload(const plKey& objKey) +bool plResManager::Unload(const plKey& objKey) { if (objKey) { @@ -1034,7 +1034,7 @@ public: plResHolderIterator(const char* age, hsTArray& keys, plResManager* resMgr) : fAgeName(age), fKeys(keys), fResMgr(resMgr) {} - virtual hsBool EatPage(plRegistryPageNode* page) + virtual bool EatPage(plRegistryPageNode* page) { if (stricmp(page->GetPageInfo().GetAge(), fAgeName) == 0) { @@ -1137,7 +1137,7 @@ class plOurRefferAndFinder : public plRegistryKeyIterator plOurRefferAndFinder( hsTArray &refArray, uint16_t classToFind, plKey &foundKey ) : fRefArray( refArray ), fClassToFind( classToFind ), fFoundKey( foundKey ) { } - virtual hsBool EatKey( const plKey& key ) + virtual bool EatKey( const plKey& key ) { // This is cute. Thanks to our new plKey smart pointers, all we have to // do is append the key to our ref array. This automatically guarantees us @@ -1268,7 +1268,7 @@ public: } pMsg1->Send(fDestKey); } - virtual hsBool EatPage(plRegistryPageNode* page) + virtual bool EatPage(plRegistryPageNode* page) { if (stricmp(page->GetPageInfo().GetAge(), fAgeName) == 0) { @@ -1302,7 +1302,7 @@ void plResManager::PageInAge(const char *age) // Runs through all the pages and ensures they are all up-to-date in version // numbers and that no out-of-date objects exist in them -hsBool plResManager::VerifyPages() +bool plResManager::VerifyPages() { hsTArray invalidPages, newerPages; PageMap::iterator it = fAllPages.begin(); @@ -1415,7 +1415,7 @@ static void ICatPageNames(hsTArray& pages, char* buf, int b } } -hsBool plResManager::IDeleteBadPages(hsTArray& invalidPages, hsBool conflictingSeqNums) +bool plResManager::IDeleteBadPages(hsTArray& invalidPages, bool conflictingSeqNums) { #ifndef PLASMA_EXTERNAL_RELEASE if (!hsMessageBox_SuppressPrompts) @@ -1454,7 +1454,7 @@ hsBool plResManager::IDeleteBadPages(hsTArray& invalidPages // than the "current" one), warns the user about them but does nothing to // them. -hsBool plResManager::IWarnNewerPages(hsTArray &newerPages) +bool plResManager::IWarnNewerPages(hsTArray &newerPages) { #ifndef PLASMA_EXTERNAL_RELEASE if (!hsMessageBox_SuppressPrompts) @@ -1495,7 +1495,7 @@ public: void UnRef() { fRefArray.Reset(); } - virtual hsBool EatKey(const plKey& key) + virtual bool EatKey(const plKey& key) { // This is cute. Thanks to our new plKey smart pointers, all we have to // do is append the key to our ref array. This automatically guarantees us @@ -1608,7 +1608,7 @@ void plResManager::UnloadPageObjects(plRegistryPageNode* pageNode, uint16_t clas class plUnloadObjectsIterator : public plRegistryKeyIterator { public: - virtual hsBool EatKey(const plKey& key) + virtual bool EatKey(const plKey& key) { sIReportLeak((plKeyImp*)key, nil); return true; @@ -1651,8 +1651,8 @@ plRegistryPageNode* plResManager::FindPage(const char* age, const char* page) co for (it = fAllPages.begin(); it != fAllPages.end(); ++it) { const plPageInfo& info = (it->second)->GetPageInfo(); - if (hsStrCaseEQ(info.GetAge(), age) && - hsStrCaseEQ(info.GetPage(), page)) + if (strcmpi(info.GetAge(), age) == 0 && + strcmpi(info.GetPage(), page) == 0) return it->second; } @@ -1725,7 +1725,7 @@ protected: public: plKeyIterEater(plRegistryKeyIterator* iter) : fIter(iter) {} - virtual hsBool EatPage(plRegistryPageNode* keyNode) + virtual bool EatPage(plRegistryPageNode* keyNode) { return keyNode->IterateKeys(fIter); } @@ -1733,13 +1733,13 @@ public: //// IterateKeys ///////////////////////////////////////////////////////////// -hsBool plResManager::IterateKeys(plRegistryKeyIterator* iterator) +bool plResManager::IterateKeys(plRegistryKeyIterator* iterator) { plKeyIterEater myEater(iterator); return IteratePages(&myEater, nil); } -hsBool plResManager::IterateKeys(plRegistryKeyIterator* iterator, const plLocation& pageToRestrictTo) +bool plResManager::IterateKeys(plRegistryKeyIterator* iterator, const plLocation& pageToRestrictTo) { plRegistryPageNode* page = FindPage(pageToRestrictTo); if (page == nil) @@ -1755,7 +1755,7 @@ hsBool plResManager::IterateKeys(plRegistryKeyIterator* iterator, const plLocati //// IteratePages //////////////////////////////////////////////////////////// // Iterate through all LOADED pages -hsBool plResManager::IteratePages(plRegistryPageIterator* iterator, const char* ageToRestrictTo) +bool plResManager::IteratePages(plRegistryPageIterator* iterator, const char* ageToRestrictTo) { ILockPages(); @@ -1766,7 +1766,7 @@ hsBool plResManager::IteratePages(plRegistryPageIterator* iterator, const char* if (page->GetPageInfo().GetLocation() == plLocation::kGlobalFixedLoc) continue; - if (!ageToRestrictTo || hsStrCaseEQ(page->GetPageInfo().GetAge(), ageToRestrictTo)) + if (!ageToRestrictTo || strcmpi(page->GetPageInfo().GetAge(), ageToRestrictTo) == 0) { if (!iterator->EatPage(page)) { @@ -1784,7 +1784,7 @@ hsBool plResManager::IteratePages(plRegistryPageIterator* iterator, const char* //// IterateAllPages ///////////////////////////////////////////////////////// // Iterate through ALL pages -hsBool plResManager::IterateAllPages(plRegistryPageIterator* iterator) +bool plResManager::IterateAllPages(plRegistryPageIterator* iterator) { ILockPages(); diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.h b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.h index 84d9b433..9d77f4ec 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.h +++ b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.h @@ -78,7 +78,7 @@ public: // Load and Unload //--------------------------- virtual void Load (const plKey& objKey); // places on list to be loaded - virtual hsBool Unload(const plKey& objKey); // Unregisters (deletes) an object, Return true if successful + virtual bool Unload(const plKey& objKey); // Unregisters (deletes) an object, Return true if successful virtual plKey CloneKey(const plKey& objKey); //--------------------------- @@ -93,11 +93,11 @@ public: //--------------------------- // Establish reference linkage //--------------------------- - virtual hsBool AddViaNotify(const plKey& key, plRefMsg* msg, plRefFlags::Type flags); - virtual hsBool AddViaNotify(plRefMsg* msg, plRefFlags::Type flags); // msg->fRef->GetKey() == sentKey + virtual bool AddViaNotify(const plKey& key, plRefMsg* msg, plRefFlags::Type flags); + virtual bool AddViaNotify(plRefMsg* msg, plRefFlags::Type flags); // msg->fRef->GetKey() == sentKey - virtual hsBool SendRef(const plKey& key, plRefMsg* refMsg, plRefFlags::Type flags); - virtual hsBool SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags); + virtual bool SendRef(const plKey& key, plRefMsg* refMsg, plRefFlags::Type flags); + virtual bool SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags); //--------------------------- // Reding and Writing keys @@ -142,22 +142,22 @@ public: // read causes all the other objects to be read before it returns. In some // cases though (mostly just the texture file), this doesn't work. In that // case, we just want to force it to stay open until we're done reading the age. - void KeepPageOpen(const plLocation& page, hsBool keepOpen); + void KeepPageOpen(const plLocation& page, bool keepOpen); // We're on the way down, act accordingly. virtual void BeginShutdown(); // Determines whether the time to read each object is dumped to a log - void LogReadTimes(hsBool logReadTimes); + void LogReadTimes(bool logReadTimes); // All keys version - hsBool IterateKeys(plRegistryKeyIterator* iterator); + bool IterateKeys(plRegistryKeyIterator* iterator); // Single page version - hsBool IterateKeys(plRegistryKeyIterator* iterator, const plLocation& pageToRestrictTo); + bool IterateKeys(plRegistryKeyIterator* iterator, const plLocation& pageToRestrictTo); // Iterate through loaded pages - hsBool IteratePages(plRegistryPageIterator* iterator, const char* ageToRestrictTo = nil); + bool IteratePages(plRegistryPageIterator* iterator, const char* ageToRestrictTo = nil); // Iterate through ALL pages, loaded or not - hsBool IterateAllPages(plRegistryPageIterator* iterator); + bool IterateAllPages(plRegistryPageIterator* iterator); // Helpers for key iterators void LoadPageKeys(plRegistryPageNode* pageNode); @@ -167,7 +167,7 @@ public: plRegistryPageNode* FindPage(const char* age, const char* page) const; // Runs through all the pages and verifies that the data versions are good - hsBool VerifyPages(); + bool VerifyPages(); protected: friend class hsKeyedObject; @@ -175,8 +175,8 @@ protected: friend class plResManagerHelper; virtual plKey ReRegister(const plString& nm, const plUoid& uoid); - virtual hsBool ReadObject(plKeyImp* key); // plKeys call this when needed - virtual hsBool IReadObject(plKeyImp* pKey, hsStream *stream); + virtual bool ReadObject(plKeyImp* key); // plKeys call this when needed + virtual bool IReadObject(plKeyImp* pKey, hsStream *stream); plCreatable* IReadCreatable(hsStream* s) const; plKey ICloneKey(const plUoid& objUoid, uint32_t playerID, uint32_t cloneID); @@ -184,19 +184,19 @@ protected: virtual void IKeyReffed(plKeyImp* key); virtual void IKeyUnreffed(plKeyImp* key); - virtual hsBool IReset(); - virtual hsBool IInit(); + virtual bool IReset(); + virtual bool IInit(); virtual void IShutdown(); - void IPageOutSceneNodes(hsBool forceAll); + void IPageOutSceneNodes(bool forceAll); void IDropAllAgeKeys(); hsKeyedObject* IGetSharedObject(plKeyImp* pKey); - void IUnloadPageKeys(plRegistryPageNode* pageNode, hsBool dontClear = false); + void IUnloadPageKeys(plRegistryPageNode* pageNode, bool dontClear = false); - hsBool IDeleteBadPages(hsTArray& invalidPages, hsBool conflictingSeqNums); - hsBool IWarnNewerPages(hsTArray& newerPages); + bool IDeleteBadPages(hsTArray& invalidPages, bool conflictingSeqNums); + bool IWarnNewerPages(hsTArray& newerPages); void ILockPages(); void IUnlockPages(); @@ -208,11 +208,11 @@ protected: plRegistryPageNode* CreatePage(const plLocation& location, const char* age, const char* page); - hsBool fInited; - uint16_t fPageOutHint; + bool fInited; + uint16_t fPageOutHint; // True if we're reading in an object. We only read one object at a time - hsBool fReadingObject; + bool fReadingObject; std::vector fQueuedReads; std::string fDataPath; @@ -229,10 +229,10 @@ protected: plResManagerHelper *fMyHelper; - hsBool fLogReadTimes; + bool fLogReadTimes; - uint8_t fPageListLock; // Number of locks on the page lists. If it's greater than zero, they can't be modified - hsBool fPagesNeedCleanup; // True if something modified the page lists while they were locked. + uint8_t fPageListLock; // Number of locks on the page lists. If it's greater than zero, they can't be modified + bool fPagesNeedCleanup; // True if something modified the page lists while they were locked. typedef std::set PageSet; typedef std::map PageMap; diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.cpp index eb21d56f..74f592f2 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.cpp @@ -123,7 +123,7 @@ void plResManagerHelper::Init( void ) //// MsgReceive ////////////////////////////////////////////////////////////// -hsBool plResManagerHelper::MsgReceive( plMessage *msg ) +bool plResManagerHelper::MsgReceive( plMessage *msg ) { plResMgrHelperMsg *refferMsg = plResMgrHelperMsg::ConvertNoRef( msg ); if( refferMsg != nil ) @@ -215,7 +215,7 @@ class plResMgrDebugInterface : public plInputInterface plResMgrDebugInterface( plResManagerHelper * const mgr ) : fParent( mgr ) { SetEnabled( true ); } virtual uint32_t GetPriorityLevel( void ) const { return kGUISystemPriority + 10; } - virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ) + virtual bool InterpretInputEvent( plInputEventMsg *pMsg ) { plKeyEventMsg *pKeyMsg = plKeyEventMsg::ConvertNoRef( pMsg ); if( pKeyMsg != nil && pKeyMsg->GetKeyDown() ) @@ -269,14 +269,14 @@ class plResMgrDebugInterface : public plInputInterface } virtual uint32_t GetCurrentCursorID( void ) const { return 0; } - virtual hsBool HasInterestingCursorID( void ) const { return false; } + virtual bool HasInterestingCursorID( void ) const { return false; } }; #endif //// EnableDebugScreen /////////////////////////////////////////////////////// -void plResManagerHelper::EnableDebugScreen( hsBool enable ) +void plResManagerHelper::EnableDebugScreen( bool enable ) { #ifdef MCN_RESMGR_DEBUGGING if( enable ) @@ -338,7 +338,7 @@ class plDebugPrintIterator : public plRegistryPageIterator, plRegistryKeyIterato fAgeIndex = 0; } - virtual hsBool EatPage( plRegistryPageNode *page ) + virtual bool EatPage( plRegistryPageNode *page ) { if( fStep == 0 ) { @@ -469,7 +469,7 @@ class plDebugPrintIterator : public plRegistryPageIterator, plRegistryKeyIterato return true; } - virtual hsBool EatKey( const plKey& key ) + virtual bool EatKey( const plKey& key ) { if( key->ObjectIsLoaded() ) { @@ -483,7 +483,7 @@ class plDebugPrintIterator : public plRegistryPageIterator, plRegistryKeyIterato }; #endif -void plResManagerHelper::IUpdateDebugScreen( hsBool force ) +void plResManagerHelper::IUpdateDebugScreen( bool force ) { #ifdef MCN_RESMGR_DEBUGGING @@ -517,12 +517,12 @@ void plResManagerHelper::IUpdateDebugScreen( hsBool force ) #if 0 // FIXME - hsBool VerifyKeyUnloaded(const char* logFile, const plKey& key); + bool VerifyKeyUnloaded(const char* logFile, const plKey& key); // Verifies that a key which shouldn't be loaded isn't, and if it is tries to figure out why. void VerifyAgeUnloaded(const char* logFile, const char* age); // Helper for VerifyKeyUnloaded - hsBool IVerifyKeyUnloadedRecur(const char* logFile, const plKey& baseKey, const plKey& upKey, const char* baseAge); + bool IVerifyKeyUnloadedRecur(const char* logFile, const plKey& baseKey, const plKey& upKey, const char* baseAge); bool ILookForCyclesRecur(const char* logFile, const plKey& key, hsTArray& tree, int& cycleStart); bool plResManager::ILookForCyclesRecur(const char* logFile, const plKey& key, hsTArray& tree, int& cycleStart) @@ -640,7 +640,7 @@ bool plResManager::IVerifyKeyUnloadedRecur(const char* logFile, const plKey& bas return false; } -hsBool plResManager::VerifyKeyUnloaded(const char* logFile, const plKey& key) +bool plResManager::VerifyKeyUnloaded(const char* logFile, const plKey& key) { if( key->ObjectIsLoaded() ) { @@ -653,7 +653,7 @@ hsBool plResManager::VerifyKeyUnloaded(const char* logFile, const plKey& key) hsTArray tree; int cycleStart; - hsBool hasCycle = ILookForCyclesRecur(logFile, key, tree, cycleStart); + bool hasCycle = ILookForCyclesRecur(logFile, key, tree, cycleStart); if( hasCycle ) { plStatusLog::AddLineS(logFile, "\t%s [%s] held by dependency cycle", key->GetName(), plFactory::GetNameOfClass(key->GetUoid().GetClassType())); @@ -685,7 +685,7 @@ public: fRegistry = reg; fLogFile = logFile; } - virtual hsBool EatKey(const plKey& key) + virtual bool EatKey(const plKey& key) { fRegistry->VerifyKeyUnloaded(fLogFile, key); return true; @@ -702,7 +702,7 @@ public: plValidatePageIterator(const char* age, plRegistryKeyIterator* iter) : fAge(age), fIter(iter) {} - virtual hsBool EatPage( plRegistryPageNode *keyNode ) + virtual bool EatPage( plRegistryPageNode *keyNode ) { if( !stricmp(fAge, keyNode->GetPageInfo().GetAge()) ) return keyNode->IterateKeys( fIter ); @@ -712,7 +712,7 @@ public: void plResManager::VerifyAgeUnloaded(const char* logFile, const char* age) { - hsBool autoLog = false; + bool autoLog = false; char buff[256]; if( !logFile || !*logFile ) { diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.h b/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.h index 5b956ac2..05a1affa 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.h +++ b/Sources/Plasma/PubUtilLib/plResMgr/plResManagerHelper.h @@ -79,14 +79,14 @@ class plResManagerHelper : public hsKeyedObject plResManager *fResManager; static plResManagerHelper *fInstance; - hsBool fInShutdown; + bool fInShutdown; #ifdef MCN_RESMGR_DEBUGGING friend class plDebugPrintIterator; friend class plResMgrDebugInterface; plStatusLog *fDebugScreen; - hsBool fRefreshing, fCurrAgeExpanded; + bool fRefreshing, fCurrAgeExpanded; int fCurrAge; int fDebugDisplayType; @@ -100,7 +100,7 @@ class plResManagerHelper : public hsKeyedObject plResMgrDebugInterface *fDebugInput; #endif - void IUpdateDebugScreen( hsBool force = false ); + void IUpdateDebugScreen( bool force = false ); public: @@ -110,7 +110,7 @@ class plResManagerHelper : public hsKeyedObject CLASSNAME_REGISTER( plResManagerHelper ); GETINTERFACE_ANY( plResManagerHelper, hsKeyedObject ); - virtual hsBool MsgReceive( plMessage *msg ); + virtual bool MsgReceive( plMessage *msg ); virtual void Read( hsStream *s, hsResMgr *mgr ); virtual void Write( hsStream *s, hsResMgr *mgr ); @@ -120,11 +120,11 @@ class plResManagerHelper : public hsKeyedObject void LoadAndHoldPageKeys( plRegistryPageNode *page ); - void EnableDebugScreen( hsBool enable ); + void EnableDebugScreen( bool enable ); // Please let the res manager handle telling this. - void SetInShutdown(hsBool b) { fInShutdown = b; } - hsBool GetInShutdown() const { return fInShutdown; } + void SetInShutdown(bool b) { fInShutdown = b; } + bool GetInShutdown() const { return fInShutdown; } static plResManagerHelper *GetInstance( void ) { return fInstance; } }; diff --git a/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp b/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp index ca30812c..f08a95e6 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp @@ -251,7 +251,7 @@ bool plSDLParser::IParseVarDesc(const char* fileName, hsStream* stream, char tok hsAssert(curVar, xtl::format("Syntax problem with .sdl file, fileName=%s", fileName).c_str()); dbgStr += std::string(" ") + token; - hsBool read=stream->GetToken(token, kTokenLen); + bool read=stream->GetToken(token, kTokenLen); if (read) { std::string oldOptions=curVar->GetDisplayOptions(); @@ -274,7 +274,7 @@ bool plSDLParser::IParseVarDesc(const char* fileName, hsStream* stream, char tok hsAssert(curVar, xtl::format("Syntax problem with .sdl file, fileName=%s", fileName).c_str()); dbgStr += std::string(" ") + token; - hsBool read=stream->GetToken(token, kTokenLen); + bool read=stream->GetToken(token, kTokenLen); if (read) { dbgStr += std::string("=") + token; diff --git a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp index 899bf977..55e7a34f 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp @@ -1468,8 +1468,8 @@ bool plSimpleStateVariable::Set(const char* v, int idx) if (v && fVar.GetType()==plVarDescriptor::kString32) { - hsAssert(hsStrlen(v)<32, "string length overflow"); - hsStrncpy(fS32[idx], v, 32); + hsAssert(strlen(v)<32, "string length overflow"); + strncpy(fS32[idx], v, 32); IVarSet(); return true; } @@ -1848,7 +1848,7 @@ bool plSimpleStateVariable::IWriteData(hsStream* s, float timeConvert, int idx, break; case plVarDescriptor::kBool: for(i=0;iWritebool(fB[j+i]); + s->WriteBool(fB[j+i]); break; case plVarDescriptor::kKey: for(i=0;iReadbool(); + fB[j+i]=s->ReadBool(); break; case plVarDescriptor::kKey: for(i=0;i hsVector3(&p, &fVerts[fVerts.GetCount()-1]).MagnitudeSquared()); } + bool DegenerateVert(const hsPoint3& p) const { return fVerts.GetCount() && (kCullPolyDegen > hsVector3(&p, &fVerts[fVerts.GetCount()-1]).MagnitudeSquared()); } - hsBool Validate() const; // no-op, except for special debugging circumstances. + bool Validate() const; // no-op, except for special debugging circumstances. }; #endif // plCullPoly_inc diff --git a/Sources/Plasma/PubUtilLib/plScene/plOccTree.cpp b/Sources/Plasma/PubUtilLib/plScene/plOccTree.cpp index c499aa73..b5495e6e 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plOccTree.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plOccTree.cpp @@ -194,7 +194,7 @@ plOccNode* plOccTree::IAddPolyRecur(plOccNode* node, plOccPoly* poly) return node; } -hsBool plOccTree::BoundsVisible(const hsBounds3Ext& bnd) const +bool plOccTree::BoundsVisible(const hsBounds3Ext& bnd) const { if( !fRoot ) return true; @@ -203,21 +203,21 @@ hsBool plOccTree::BoundsVisible(const hsBounds3Ext& bnd) const } -hsBool plOccNode::IInChildBoundsVisible(const hsBounds3Ext& bnd) const +bool plOccNode::IInChildBoundsVisible(const hsBounds3Ext& bnd) const { return fInChild ? fInChild->IBoundsVisible(bnd) : false; } -hsBool plOccNode::IOutChildBoundsVisible(const hsBounds3Ext& bnd) const +bool plOccNode::IOutChildBoundsVisible(const hsBounds3Ext& bnd) const { return fOutChild ? fOutChild->IBoundsVisible(bnd) : true; } -hsBool plOccNode::IBoundsVisible(const hsBounds3Ext& bnd) const +bool plOccNode::IBoundsVisible(const hsBounds3Ext& bnd) const { hsPoint2 depth; bnd.TestPlane(fPlane.fNormal, depth); diff --git a/Sources/Plasma/PubUtilLib/plScene/plOccluder.cpp b/Sources/Plasma/PubUtilLib/plScene/plOccluder.cpp index 669e1362..4ea659fc 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plOccluder.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plOccluder.cpp @@ -69,7 +69,7 @@ plOccluder::~plOccluder() delete fProxyGen; } -hsBool plOccluder::MsgReceive(plMessage* msg) +bool plOccluder::MsgReceive(plMessage* msg) { plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg); if( refMsg ) diff --git a/Sources/Plasma/PubUtilLib/plScene/plOccluder.h b/Sources/Plasma/PubUtilLib/plScene/plOccluder.h index dc4e0efb..a09c21fd 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plOccluder.h +++ b/Sources/Plasma/PubUtilLib/plScene/plOccluder.h @@ -97,12 +97,12 @@ public: CLASSNAME_REGISTER( plOccluder ); GETINTERFACE_ANY( plOccluder, plObjInterface); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual float GetPriority() const { return fPriority; } - hsBool InVisSet(const hsBitVector& visSet) const { return fVisSet.Overlap(visSet); } - hsBool InVisNot(const hsBitVector& visNot) const { return fVisNot.Overlap(visNot); } + bool InVisSet(const hsBitVector& visSet) const { return fVisSet.Overlap(visSet); } + bool InVisNot(const hsBitVector& visNot) const { return fVisNot.Overlap(visNot); } virtual const hsBounds3Ext& GetWorldBounds() const { return fWorldBounds; } diff --git a/Sources/Plasma/PubUtilLib/plScene/plOccluderProxy.cpp b/Sources/Plasma/PubUtilLib/plScene/plOccluderProxy.cpp index 2b5332ba..24812f87 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plOccluderProxy.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plOccluderProxy.cpp @@ -57,7 +57,7 @@ plOccluderProxy::~plOccluderProxy() { } -hsBool plOccluderProxy::Init(plOccluder* occluder) +bool plOccluderProxy::Init(plOccluder* occluder) { plProxyGen::Init(occluder); diff --git a/Sources/Plasma/PubUtilLib/plScene/plOccluderProxy.h b/Sources/Plasma/PubUtilLib/plScene/plOccluderProxy.h index bf026ee8..4429e2f1 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plOccluderProxy.h +++ b/Sources/Plasma/PubUtilLib/plScene/plOccluderProxy.h @@ -61,7 +61,7 @@ public: plOccluderProxy(); virtual ~plOccluderProxy(); - hsBool Init(plOccluder* occluder); + bool Init(plOccluder* occluder); }; #endif // plOccluderProxy_inc diff --git a/Sources/Plasma/PubUtilLib/plScene/plPageTreeMgr.cpp b/Sources/Plasma/PubUtilLib/plScene/plPageTreeMgr.cpp index 737499c0..6e31267f 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plPageTreeMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plPageTreeMgr.cpp @@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com static hsTArray scratchList; -hsBool plPageTreeMgr::fDisableVisMgr = 0; +bool plPageTreeMgr::fDisableVisMgr = 0; plProfile_CreateTimer("Object Sort", "Draw", DrawObjSort); plProfile_CreateCounter("Objects Sorted", "Draw", DrawObjSorted); @@ -110,7 +110,7 @@ void plPageTreeMgr::ITrashSpaceTree() fSpaceTree = nil; } -hsBool plPageTreeMgr::Harvest(plVolumeIsect* isect, hsTArray& levList) +bool plPageTreeMgr::Harvest(plVolumeIsect* isect, hsTArray& levList) { levList.SetCount(0); if( !(GetSpaceTree() || IBuildSpaceTree()) ) @@ -235,7 +235,7 @@ int plPageTreeMgr::IRenderVisList(plPipeline* pipe, hsTArray& lev return numDrawn; } -hsBool plPageTreeMgr::ISortByLevel(plPipeline* pipe, hsTArray& drawList, hsTArray& sortedDrawList) +bool plPageTreeMgr::ISortByLevel(plPipeline* pipe, hsTArray& drawList, hsTArray& sortedDrawList) { sortedDrawList.SetCount(0); @@ -331,7 +331,7 @@ int plPageTreeMgr::IPrepForRenderSortingSpans(plPipeline* pipe, hsTArray& drawList, hsTArray& pairs) +bool plPageTreeMgr::IRenderSortingSpans(plPipeline* pipe, hsTArray& drawList, hsTArray& pairs) { if( !pairs.GetCount() ) @@ -472,7 +472,7 @@ hsBool plPageTreeMgr::IRenderSortingSpans(plPipeline* pipe, hsTArrayfNorm.InnerProduct(viewPos) + fCullPolys[i]->fDist <= 0; + bool backFace = fCullPolys[i]->fNorm.InnerProduct(viewPos) + fCullPolys[i]->fDist <= 0; if( backFace ) { if( !fCullPolys[i]->IsHole() && !fCullPolys[i]->IsTwoSided() ) @@ -613,7 +613,7 @@ void plPageTreeMgr::ISortCullPolys(plPipeline* pipe) } } -hsBool plPageTreeMgr::IGetCullPolys(plPipeline* pipe) +bool plPageTreeMgr::IGetCullPolys(plPipeline* pipe) { if( !fOccluders.GetCount() ) return false; @@ -673,7 +673,7 @@ hsBool plPageTreeMgr::IGetCullPolys(plPipeline* pipe) return fCullPolys.GetCount() > 0; } -hsBool plPageTreeMgr::IGetOcclusion(plPipeline* pipe, hsTArray& list) +bool plPageTreeMgr::IGetOcclusion(plPipeline* pipe, hsTArray& list) { plProfile_BeginTiming(DrawOccBuild); diff --git a/Sources/Plasma/PubUtilLib/plScene/plPageTreeMgr.h b/Sources/Plasma/PubUtilLib/plScene/plPageTreeMgr.h index a49f06ab..2c8775a3 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plPageTreeMgr.h +++ b/Sources/Plasma/PubUtilLib/plScene/plPageTreeMgr.h @@ -84,24 +84,24 @@ protected: plSpaceTree* fSpaceTree; plVisMgr* fVisMgr; - static hsBool fDisableVisMgr; + static bool fDisableVisMgr; hsTArray fOccluders; hsTArray fCullPolys; hsTArray fSortedCullPolys; void ITrashSpaceTree(); - hsBool IBuildSpaceTree(); - hsBool IRefreshTree(plPipeline* pipe); + bool IBuildSpaceTree(); + bool IRefreshTree(plPipeline* pipe); void ISortCullPolys(plPipeline* pipe); - hsBool IGetOcclusion(plPipeline* pipe, hsTArray& list); - hsBool IGetCullPolys(plPipeline* pipe); + bool IGetOcclusion(plPipeline* pipe, hsTArray& list); + bool IGetCullPolys(plPipeline* pipe); void IResetOcclusion(plPipeline* pipe); void IAddCullPolyList(const hsTArray& polyList); - hsBool ISortByLevel(plPipeline* pipe, hsTArray& drawList, hsTArray& sortedDrawList); + bool ISortByLevel(plPipeline* pipe, hsTArray& drawList, hsTArray& sortedDrawList); int IPrepForRenderSortingSpans(plPipeline* pipe, hsTArray& drawVis, int& iDrawStart); - hsBool IRenderSortingSpans(plPipeline* pipe, hsTArray& drawList, hsTArray& pairs); + bool IRenderSortingSpans(plPipeline* pipe, hsTArray& drawList, hsTArray& pairs); int IRenderVisList(plPipeline* pipe, hsTArray& visList); public: @@ -113,11 +113,11 @@ public: void AddNode(plSceneNode* node); void RemoveNode(plSceneNode* node); virtual void Reset(); // remove all nodes, nuke the space tree - virtual hsBool Empty() const { return !fNodes.GetCount(); } + virtual bool Empty() const { return !fNodes.GetCount(); } virtual int Render(plPipeline* pipe); - hsBool Harvest(plVolumeIsect* isect, hsTArray& levList); + bool Harvest(plVolumeIsect* isect, hsTArray& levList); void AddOccluderList(const hsTArray occList); @@ -126,8 +126,8 @@ public: void SetVisMgr(plVisMgr* visMgr) { fVisMgr = visMgr; } plVisMgr* GetVisMgr() const { return fVisMgr; } - static void EnableVisMgr(hsBool on) { fDisableVisMgr = !on; } - static hsBool VisMgrEnabled() { return !fDisableVisMgr; } + static void EnableVisMgr(bool on) { fDisableVisMgr = !on; } + static bool VisMgrEnabled() { return !fDisableVisMgr; } }; #endif // plPageTreeMgr_inc diff --git a/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.cpp b/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.cpp index 46ba42f1..7549ccc7 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.cpp @@ -130,7 +130,7 @@ void plPostEffectMod::IDestroyRenderRequest() fPageMgr = nil; } -void plPostEffectMod::IRegisterForRenderMsg(hsBool on) +void plPostEffectMod::IRegisterForRenderMsg(bool on) { if( on ) plgDispatch::Dispatch()->RegisterForExactType(plRenderMsg::Index(), GetKey()); @@ -138,7 +138,7 @@ void plPostEffectMod::IRegisterForRenderMsg(hsBool on) plgDispatch::Dispatch()->UnRegisterForExactType(plRenderMsg::Index(), GetKey()); } -void plPostEffectMod::ISetEnable(hsBool on) +void plPostEffectMod::ISetEnable(bool on) { if( on ) { @@ -152,12 +152,12 @@ void plPostEffectMod::ISetEnable(hsBool on) } } -hsBool plPostEffectMod::IIsEnabled() const +bool plPostEffectMod::IIsEnabled() const { return /*GetTarget() &&*/ !fPageMgr->Empty() && fState.IsBitSet(kEnabled); } -hsBool plPostEffectMod::IEval(double secs, float del, uint32_t dirty) +bool plPostEffectMod::IEval(double secs, float del, uint32_t dirty) { return false; } @@ -240,7 +240,7 @@ void plPostEffectMod::IRemoveFromPageMgr(plSceneNode* node) #include "plProfile.h" plProfile_CreateTimer("PostEffect", "RenderSetup", PostEffect); -hsBool plPostEffectMod::MsgReceive(plMessage* msg) +bool plPostEffectMod::MsgReceive(plMessage* msg) { plRenderMsg* rend = plRenderMsg::ConvertNoRef(msg); if( rend && IIsEnabled() ) diff --git a/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.h b/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.h index fb3f315e..a06cd0c1 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.h +++ b/Sources/Plasma/PubUtilLib/plScene/plPostEffectMod.h @@ -84,20 +84,20 @@ protected: hsMatrix44 fDefaultW2C, fDefaultC2W; - virtual hsBool IEval(double secs, float del, uint32_t dirty); // called only by owner object's Eval() + virtual bool IEval(double secs, float del, uint32_t dirty); // called only by owner object's Eval() void ISetupRenderRequest(); void IDestroyRenderRequest(); void IUpdateRenderRequest(); - void IRegisterForRenderMsg(hsBool on); + void IRegisterForRenderMsg(bool on); void ISubmitRequest(); void IAddToPageMgr(plSceneNode* node); void IRemoveFromPageMgr(plSceneNode* node); - void ISetEnable(hsBool on); - hsBool IIsEnabled() const; + void ISetEnable(bool on); + bool IIsEnabled() const; public: plPostEffectMod(); @@ -107,7 +107,7 @@ public: GETINTERFACE_ANY( plPostEffectMod, plSingleModifier ); - virtual hsBool MsgReceive(plMessage* pMsg); + virtual bool MsgReceive(plMessage* pMsg); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp b/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp index 44f785e2..8f2c55c1 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp @@ -98,7 +98,7 @@ void plRelevanceMgr::SetRegionVectors(const hsPoint3 &pos, hsBitVector ®ionsI regionsICareAbout.Clear(); regionsICareAbout.SetBit(0, true); // Always care about region zero, the special "No region" node - hsBool inAnyRegion = false; + bool inAnyRegion = false; int i; for (i = 0; i < fRegions.GetCount(); i++) @@ -129,7 +129,7 @@ uint32_t plRelevanceMgr::GetNumRegions() const } -hsBool plRelevanceMgr::MsgReceive(plMessage* msg) +bool plRelevanceMgr::MsgReceive(plMessage* msg) { plGenRefMsg *genMsg = plGenRefMsg::ConvertNoRef(msg); if (genMsg) @@ -161,7 +161,7 @@ uint32_t plRelevanceMgr::GetIndex(const plString ®ionName) return -1; } -void plRelevanceMgr::MarkRegion(uint32_t localIdx, uint32_t remoteIdx, hsBool doICare) +void plRelevanceMgr::MarkRegion(uint32_t localIdx, uint32_t remoteIdx, bool doICare) { if (localIdx == (uint32_t)-1 || remoteIdx == (uint32_t)-1) return; @@ -202,7 +202,7 @@ void plRelevanceMgr::ParseCsvInput(hsStream *s) char buff[kBufSize]; hsTArray regions; hsStringTokenizer toke; - hsBool firstLine = true; + bool firstLine = true; while (!s->AtEnd()) { diff --git a/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h b/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h index 25566b05..b509ce10 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h +++ b/Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h @@ -64,7 +64,7 @@ public: protected: hsTArray fRegions; - hsBool fEnabled; + bool fEnabled; void IAddRegion(plRelevanceRegion *); void IRemoveRegion(plRelevanceRegion *); @@ -75,13 +75,13 @@ public: CLASSNAME_REGISTER( plRelevanceMgr ); GETINTERFACE_ANY( plRelevanceMgr, hsKeyedObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); - hsBool GetEnabled() { return fEnabled; } - void SetEnabled(hsBool val) { fEnabled = val; } + bool GetEnabled() { return fEnabled; } + void SetEnabled(bool val) { fEnabled = val; } uint32_t GetIndex(const plString ®ionName); - void MarkRegion(uint32_t localIdx, uint32_t remoteIdx, hsBool doICare); + void MarkRegion(uint32_t localIdx, uint32_t remoteIdx, bool doICare); void SetRegionVectors(const hsPoint3 &pos, hsBitVector ®ionsImIn, hsBitVector ®ionsICareAbout); uint32_t GetNumRegions() const; // includes the secret 0 region in its count void ParseCsvInput(hsStream *s); diff --git a/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.cpp b/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.cpp index 72401654..5368b71d 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.cpp @@ -66,7 +66,7 @@ void plRelevanceRegion::Write(hsStream* s, hsResMgr* mgr) mgr->WriteKey(s, fRegion); } -hsBool plRelevanceRegion::MsgReceive(plMessage* msg) +bool plRelevanceRegion::MsgReceive(plMessage* msg) { plGenRefMsg *genMsg = plGenRefMsg::ConvertNoRef(msg); if (genMsg) diff --git a/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.h b/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.h index adbb1849..1a186a11 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.h +++ b/Sources/Plasma/PubUtilLib/plScene/plRelevanceRegion.h @@ -63,7 +63,7 @@ public: CLASSNAME_REGISTER( plRelevanceRegion ); GETINTERFACE_ANY( plRelevanceRegion, plObjInterface ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) {} virtual int32_t GetNumProperties() const { return 1; } diff --git a/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.cpp b/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.cpp index f99d5d53..aa040d96 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.cpp @@ -164,7 +164,7 @@ void plRenderRequest::SetVisForce(const hsBitVector& b) fVisForce = b; } -hsBool plRenderRequest::GetRenderCharacters() const +bool plRenderRequest::GetRenderCharacters() const { return fVisForce.IsBitSet(plVisMgr::kCharacter); } diff --git a/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.h b/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.h index 4d3c8724..bf0d637c 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.h +++ b/Sources/Plasma/PubUtilLib/plScene/plRenderRequest.h @@ -93,14 +93,14 @@ protected: hsBitVector fVisForce; uint32_t fUserData; - hsBool fIgnoreOccluders; + bool fIgnoreOccluders; public: plRenderRequest(); ~plRenderRequest(); - hsBool GetRenderSelect() const { return !fVisForce.Empty(); } - hsBool GetRenderCharacters() const; + bool GetRenderSelect() const { return !fVisForce.Empty(); } + bool GetRenderCharacters() const; void SetRenderState(uint32_t st) { fRenderState = st; } uint32_t GetRenderState() const { return fRenderState; } @@ -168,8 +168,8 @@ public: void SetCameraTransform(const hsMatrix44& w2c, const hsMatrix44& c2w) { fViewTransform.SetCameraTransform(w2c, c2w); } - void SetPerspective(hsBool on=true) { fViewTransform.SetPerspective(on); } - void SetOrthogonal(hsBool on=true) { fViewTransform.SetOrthogonal(on); } + void SetPerspective(bool on=true) { fViewTransform.SetPerspective(on); } + void SetOrthogonal(bool on=true) { fViewTransform.SetOrthogonal(on); } void SetHither(float f) { fViewTransform.SetHither(f); } void SetYon(float f) { fViewTransform.SetYon(f); } @@ -197,8 +197,8 @@ public: void SetUserData(uint32_t n) { fUserData = n; } uint32_t GetUserData() const { return fUserData; } - void SetIgnoreOccluders(hsBool b) { fIgnoreOccluders = b; } - hsBool GetIgnoreOccluders() { return fIgnoreOccluders; } + void SetIgnoreOccluders(bool b) { fIgnoreOccluders = b; } + bool GetIgnoreOccluders() { return fIgnoreOccluders; } // This function is called after the render request is processed by the client virtual void Render(plPipeline* pipe, plPageTreeMgr* pageMgr); diff --git a/Sources/Plasma/PubUtilLib/plScene/plSceneNode.cpp b/Sources/Plasma/PubUtilLib/plScene/plSceneNode.cpp index 56d10d7a..a196c1a0 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plSceneNode.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plSceneNode.cpp @@ -374,7 +374,7 @@ void plSceneNode::IRemoveGeneric(hsKeyedObject* k) fGenericPool.Remove(idx); } -hsBool plSceneNode::IOnRemove(plNodeRefMsg* refMsg) +bool plSceneNode::IOnRemove(plNodeRefMsg* refMsg) { switch( refMsg->fType ) @@ -407,7 +407,7 @@ hsBool plSceneNode::IOnRemove(plNodeRefMsg* refMsg) return true; } -hsBool plSceneNode::IOnAdd(plNodeRefMsg* refMsg) +bool plSceneNode::IOnAdd(plNodeRefMsg* refMsg) { int which = refMsg->fWhich; @@ -437,7 +437,7 @@ hsBool plSceneNode::IOnAdd(plNodeRefMsg* refMsg) return true; } -hsBool plSceneNode::MsgReceive(plMessage* msg) +bool plSceneNode::MsgReceive(plMessage* msg) { plNodeCleanupMsg *cleanMsg = plNodeCleanupMsg::ConvertNoRef( msg ); diff --git a/Sources/Plasma/PubUtilLib/plScene/plSceneNode.h b/Sources/Plasma/PubUtilLib/plScene/plSceneNode.h index c694c0de..36c8eda0 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plSceneNode.h +++ b/Sources/Plasma/PubUtilLib/plScene/plSceneNode.h @@ -72,7 +72,7 @@ public: }; protected: - hsBool fFilterGenerics; // Export only + bool fFilterGenerics; // Export only int16_t fDepth; @@ -110,8 +110,8 @@ protected: void ISetOccluder(plOccluder* o); void ISetGeneric(hsKeyedObject* k); - hsBool IOnRemove(plNodeRefMsg* refMsg); - hsBool IOnAdd(plNodeRefMsg* refMsg); + bool IOnRemove(plNodeRefMsg* refMsg); + bool IOnAdd(plNodeRefMsg* refMsg); // Export only: Clean up empty drawables void ICleanUp( void ); @@ -131,7 +131,7 @@ public: virtual void SubmitOccluders(plPageTreeMgr* pageMgr) const; - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); int16_t GetDepth() { return fDepth; } int16_t IncDepth() { return ++fDepth; } @@ -147,7 +147,7 @@ public: // Export only: Optimize all my stinkin' drawables virtual void OptimizeDrawables( void ); - void SetFilterGenericsOnly(hsBool b) { fFilterGenerics = b; } + void SetFilterGenericsOnly(bool b) { fFilterGenerics = b; } const hsTArray& GetDrawPool() const { return fDrawPool; } }; diff --git a/Sources/Plasma/PubUtilLib/plScene/plVisMgr.cpp b/Sources/Plasma/PubUtilLib/plScene/plVisMgr.cpp index d9bb3e01..99152791 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plVisMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plVisMgr.cpp @@ -59,7 +59,7 @@ plVisMgr::~plVisMgr() { } -hsBool plVisMgr::MsgReceive(plMessage* msg) +bool plVisMgr::MsgReceive(plMessage* msg) { return hsKeyedObject::MsgReceive(msg); @@ -76,7 +76,7 @@ void plVisMgr::Write(hsStream* s, hsResMgr* mgr) hsKeyedObject::Write(s, mgr); } -void plVisMgr::Register(plVisRegion* reg, hsBool bnot) +void plVisMgr::Register(plVisRegion* reg, bool bnot) { // This should happen pretty infrequently, or // I wouldn't be doing it so cloth-headed-ly. @@ -100,7 +100,7 @@ void plVisMgr::Register(plVisRegion* reg, hsBool bnot) hsAssert(false, "Infinite bitvector has all bits set?"); } -void plVisMgr::UnRegister(plVisRegion* reg, hsBool bnot) +void plVisMgr::UnRegister(plVisRegion* reg, bool bnot) { // Mark our index for recycling hsBitVector& indices= bnot ? fIdxNot : fIdxSet; @@ -173,27 +173,27 @@ void plVisMgr::DisableNormal() fOffBitNot.Set(fMaxNot); } -void plVisMgr::EnableVisSet(int idx, hsBool isNot) +void plVisMgr::EnableVisSet(int idx, bool isNot) { hsBitVector& offs = isNot ? fOffBitNot : fOffBitSet; offs.ClearBit(idx); } -void plVisMgr::EnableVisSets(const hsBitVector& enabled, hsBool isNot) +void plVisMgr::EnableVisSets(const hsBitVector& enabled, bool isNot) { hsBitVector& offs = isNot ? fOffBitNot : fOffBitSet; offs -= enabled; } -void plVisMgr::ForceVisSet(int idx, hsBool isNot) +void plVisMgr::ForceVisSet(int idx, bool isNot) { EnableVisSet(idx, isNot); hsBitVector& ons = isNot ? fOnBitNot : fOnBitSet; ons.SetBit(idx); } -void plVisMgr::ForceVisSets(const hsBitVector& enabled, hsBool isNot) +void plVisMgr::ForceVisSets(const hsBitVector& enabled, bool isNot) { EnableVisSets(enabled, isNot); hsBitVector& ons = isNot ? fOnBitNot : fOnBitSet; diff --git a/Sources/Plasma/PubUtilLib/plScene/plVisMgr.h b/Sources/Plasma/PubUtilLib/plScene/plVisMgr.h index 79991620..c5fd8f10 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plVisMgr.h +++ b/Sources/Plasma/PubUtilLib/plScene/plVisMgr.h @@ -93,13 +93,13 @@ public: CLASSNAME_REGISTER( plVisMgr ); GETINTERFACE_ANY( plVisMgr, hsKeyedObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - void Register(plVisRegion* reg, hsBool bnot); - void UnRegister(plVisRegion* reg, hsBool bnot); + void Register(plVisRegion* reg, bool bnot); + void UnRegister(plVisRegion* reg, bool bnot); void Eval(const hsPoint3& pos); @@ -115,13 +115,13 @@ public: // Enable drawing of selected sets. Either one index at a time or pass in a bitvector. // The regions are just enabled, they can still say no. - void EnableVisSet(int idx, hsBool isNot = false); - void EnableVisSets(const hsBitVector& enabled, hsBool isNot = false); + void EnableVisSet(int idx, bool isNot = false); + void EnableVisSets(const hsBitVector& enabled, bool isNot = false); // Make specified regions say yes, no matter where the camera is. // This will implicitly call EnableVisSet for you. - void ForceVisSet(int idx, hsBool isNot = false); - void ForceVisSets(const hsBitVector& enabled, hsBool isNot = false); + void ForceVisSet(int idx, bool isNot = false); + void ForceVisSets(const hsBitVector& enabled, bool isNot = false); }; class plGlobalVisMgr diff --git a/Sources/Plasma/PubUtilLib/plScene/plVisRegion.cpp b/Sources/Plasma/PubUtilLib/plScene/plVisRegion.cpp index 9384db6f..dfc1c07e 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plVisRegion.cpp +++ b/Sources/Plasma/PubUtilLib/plScene/plVisRegion.cpp @@ -67,7 +67,7 @@ plVisRegion::~plVisRegion() fMgr->UnRegister(this, GetProperty(kIsNot)); } -hsBool plVisRegion::Eval(const hsPoint3& pos) const +bool plVisRegion::Eval(const hsPoint3& pos) const { if( GetProperty(kDisable) ) return false; @@ -78,7 +78,7 @@ hsBool plVisRegion::Eval(const hsPoint3& pos) const return fRegion->IsInside(pos); } -hsBool plVisRegion::MsgReceive(plMessage* msg) +bool plVisRegion::MsgReceive(plMessage* msg) { plEnableMsg* enaMsg = plEnableMsg::ConvertNoRef(msg); if( enaMsg ) diff --git a/Sources/Plasma/PubUtilLib/plScene/plVisRegion.h b/Sources/Plasma/PubUtilLib/plScene/plVisRegion.h index 43e5a78a..5c66fa01 100644 --- a/Sources/Plasma/PubUtilLib/plScene/plVisRegion.h +++ b/Sources/Plasma/PubUtilLib/plScene/plVisRegion.h @@ -86,7 +86,7 @@ public: virtual int32_t GetNumProperties() const { return 3; } // This is stupid. - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // Set transform doesn't do anything, because the regions themselves are // object interfaces, so they'll move when their sceneobjects move. @@ -95,15 +95,15 @@ public: virtual void Read(hsStream* stream, hsResMgr* mgr); virtual void Write(hsStream* stream, hsResMgr* mgr); - hsBool Eval(const hsPoint3& pos) const; + bool Eval(const hsPoint3& pos) const; int32_t GetIndex() const { return fIndex; } - hsBool Registered() const { return GetIndex() > 0; } + bool Registered() const { return GetIndex() > 0; } - hsBool IsNot() const { return GetProperty(kIsNot); } - hsBool ReplaceNormal() const { return GetProperty(kReplaceNormal); } - hsBool DisableNormal() const { return GetProperty(kDisableNormal); } + bool IsNot() const { return GetProperty(kIsNot); } + bool ReplaceNormal() const { return GetProperty(kReplaceNormal); } + bool DisableNormal() const { return GetProperty(kDisableNormal); } }; #endif // plVisRegion_inc diff --git a/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp b/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp index 59785445..ae8b4dd1 100644 --- a/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp +++ b/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp @@ -104,7 +104,7 @@ public: virtual void StartProfile(const char* ageName); virtual void LinkToAllAges(); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; plAutoProfile* plAutoProfile::Instance() @@ -331,7 +331,7 @@ bool plAutoProfileImp::INextSpawnPoint() return true; } -hsBool plAutoProfileImp::MsgReceive(plMessage* msg) +bool plAutoProfileImp::MsgReceive(plMessage* msg) { plEvalMsg* evalMsg = plEvalMsg::ConvertNoRef(msg); if (evalMsg) diff --git a/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp b/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp index 484d7b0f..28922a0f 100644 --- a/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp +++ b/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp @@ -310,7 +310,7 @@ void plProfileManagerFull::Update() std::vector group; for (int i = 0; i < fVars.size(); i++) - if (hsStrEQ(fVars[i]->GetGroup(), groupName)) + if (strcmp(fVars[i]->GetGroup(), groupName) == 0) group.push_back(fVars[i]); int x = 10; @@ -405,7 +405,7 @@ void plProfileManagerFull::IPrintGroup(hsStream* s, const char* groupName, bool for (int i = 0; i < fVars.size(); i++) { plProfileVar* var = fVars[i]; - if (hsStrEQ(var->GetGroup(), groupName)) + if (strcmp(var->GetGroup(), groupName) == 0) { if (printTitle) sprintf(buf, "%s:%s", var->GetGroup(), var->GetName()); diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp index dd908352..00193189 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp +++ b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp @@ -279,7 +279,7 @@ void plStatusLogMgr::PrevStatusLog( void ) //// FindLog //////////////////////////////////////////////////////////////// -plStatusLog *plStatusLogMgr::FindLog( const char *filename, hsBool createIfNotFound ) +plStatusLog *plStatusLogMgr::FindLog( const char *filename, bool createIfNotFound ) { wchar_t* wFilename = hsStringToWString(filename); plStatusLog* ret = FindLog(wFilename, createIfNotFound); @@ -287,7 +287,7 @@ plStatusLog *plStatusLogMgr::FindLog( const char *filename, hsBool createIfNotFo return ret; } -plStatusLog *plStatusLogMgr::FindLog( const wchar_t *filename, hsBool createIfNotFound ) +plStatusLog *plStatusLogMgr::FindLog( const wchar_t *filename, bool createIfNotFound ) { plStatusLog *log = fDisplays; diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.h b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.h index 82b6ba6f..07b29815 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.h +++ b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.h @@ -235,8 +235,8 @@ class plStatusLogMgr void PrevStatusLog( void ); void SetCurrStatusLog( const char *logName ); void SetCurrStatusLog( const wchar_t *logName ); - plStatusLog *FindLog( const char *filename, hsBool createIfNotFound = true ); - plStatusLog *FindLog( const wchar_t *filename, hsBool createIfNotFound = true ); + plStatusLog *FindLog( const char *filename, bool createIfNotFound = true ); + plStatusLog *FindLog( const wchar_t *filename, bool createIfNotFound = true ); void SetDrawer( plStatusLogDrawerStub *drawer ) { fDrawer = drawer; } void SetBasePath( const char * path ); diff --git a/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp b/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp index f258df5b..cd2c6003 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp @@ -159,7 +159,7 @@ uint32_t hsGMaterial::AddLayerViaNotify(plLayerInterface* layer) return idx; } -void hsGMaterial::ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLay, hsBool piggyBack) +void hsGMaterial::ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLay, bool piggyBack) { hsTArray& layers = piggyBack ? fPiggyBacks : fLayers; int i; @@ -174,7 +174,7 @@ void hsGMaterial::ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLa SetLayer(newLay, i, piggyBack); } -void hsGMaterial::RemoveLayer(plLayerInterface* lay, hsBool piggyBack) +void hsGMaterial::RemoveLayer(plLayerInterface* lay, bool piggyBack) { hsTArray& layers = piggyBack ? fPiggyBacks : fLayers; int i; @@ -190,14 +190,14 @@ void hsGMaterial::RemoveLayer(plLayerInterface* lay, hsBool piggyBack) layers.Remove(i); } -void hsGMaterial::InsertLayer(plLayerInterface* layer, int32_t which, hsBool piggyBack) +void hsGMaterial::InsertLayer(plLayerInterface* layer, int32_t which, bool piggyBack) { hsTArray& layers = piggyBack ? fPiggyBacks : fLayers; hsAssert(which <= layers.GetCount(), "Material layers Exceeding test depth"); layers.InsertAtIndex(which, layer); } -void hsGMaterial::SetLayer(plLayerInterface* layer, int32_t which, hsBool insert, hsBool piggyBack) +void hsGMaterial::SetLayer(plLayerInterface* layer, int32_t which, bool insert, bool piggyBack) { if( insert ) { @@ -310,17 +310,17 @@ void hsGMaterial::Init() Reset(); } -hsBool hsGMaterial::MsgReceive(plMessage* msg) +bool hsGMaterial::MsgReceive(plMessage* msg) { plMatRefMsg* refMsg = plMatRefMsg::ConvertNoRef(msg); if( refMsg ) { int which = refMsg->fWhich; - hsBool piggyBack = 0 != (refMsg->fType & plMatRefMsg::kPiggyBack); + bool piggyBack = 0 != (refMsg->fType & plMatRefMsg::kPiggyBack); plLayerInterface* lay= plLayerInterface::ConvertNoRef(refMsg->GetRef()); if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest) ) { - hsBool insert = 0 != (refMsg->fType & plMatRefMsg::kInsert); + bool insert = 0 != (refMsg->fType & plMatRefMsg::kInsert); SetLayer(lay, which, insert, piggyBack ); diff --git a/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.h b/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.h index 0fc5b72f..d7dac549 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.h +++ b/Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.h @@ -93,10 +93,10 @@ protected: void IClearLayers(); uint32_t IMakeExtraLayer(); - void InsertLayer(plLayerInterface* lay, int32_t which = 0, hsBool piggyBack = false); - void SetLayer(plLayerInterface* lay, int32_t which = 0, hsBool insert=false, hsBool piggyBack=false); - void ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLay, hsBool piggyBack = false); - void RemoveLayer(plLayerInterface* oldLay, hsBool piggyBack = false); + void InsertLayer(plLayerInterface* lay, int32_t which = 0, bool piggyBack = false); + void SetLayer(plLayerInterface* lay, int32_t which = 0, bool insert=false, bool piggyBack=false); + void ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLay, bool piggyBack = false); + void RemoveLayer(plLayerInterface* oldLay, bool piggyBack = false); public: hsGMaterial(); ~hsGMaterial(); @@ -122,11 +122,11 @@ public: float GetLastUpdateTime() const { return fLastUpdateTime; } void SetLastUpdateTime(float f) { fLastUpdateTime = f; } - hsBool IShouldUpdate(float secs, uint32_t flags) { return GetLastUpdateTime() != secs || (flags & kUpdateAgain); } + bool IShouldUpdate(float secs, uint32_t flags) { return GetLastUpdateTime() != secs || (flags & kUpdateAgain); } - hsBool IsDynamic() const { return (fCompFlags & kCompDynamic); } - hsBool IsDecal() const { return (fCompFlags & kCompDecal); } - hsBool NeedsBlendChannel() { return (fCompFlags & kCompNeedsBlendChannel); } + bool IsDynamic() const { return (fCompFlags & kCompDynamic); } + bool IsDecal() const { return (fCompFlags & kCompDecal); } + bool NeedsBlendChannel() { return (fCompFlags & kCompNeedsBlendChannel); } virtual void Read(hsStream* s); virtual void Write(hsStream* s); @@ -140,7 +140,7 @@ public: CLASSNAME_REGISTER( hsGMaterial ); GETINTERFACE_ANY( hsGMaterial, hsKeyedObject ); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; #endif // hsGCompMatDefined diff --git a/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp b/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp index a87fb1c6..8a73529a 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp @@ -133,7 +133,7 @@ void plGrassShaderMod::RemoveTarget(plSceneObject *object) fTarget = nil; } -hsBool plGrassShaderMod::MsgReceive(plMessage *msg) +bool plGrassShaderMod::MsgReceive(plMessage *msg) { plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg); if (refMsg) @@ -211,7 +211,7 @@ void plGrassShaderMod::Read(hsStream *stream, hsResMgr *mgr) plgDispatch::Dispatch()->RegisterForExactType(plAgeLoadedMsg::Index(), GetKey()); } -hsBool plGrassShaderMod::IEval(double secs, float del, uint32_t dirty) +bool plGrassShaderMod::IEval(double secs, float del, uint32_t dirty) { if (fVShader) { diff --git a/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.h b/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.h index fda56818..5d38c8bb 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.h +++ b/Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.h @@ -78,7 +78,7 @@ public: virtual void AddTarget(plSceneObject *object); virtual void RemoveTarget(plSceneObject *object); - virtual hsBool MsgReceive(plMessage *msg); + virtual bool MsgReceive(plMessage *msg); virtual void Write(hsStream *stream, hsResMgr *mgr); virtual void Read(hsStream *stream, hsResMgr *mgr); @@ -99,7 +99,7 @@ public: plGrassWave fWaves[kNumWaves]; protected: - virtual hsBool IEval(double secs, float del, uint32_t dirty); + virtual bool IEval(double secs, float del, uint32_t dirty); virtual void IApplyDynamic() {}; // dummy function required by base class void ISetupShaders(); void IRefreshWaves(plShader *vShader); diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayer.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayer.cpp index 7e4e7d3e..9a32682f 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayer.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayer.cpp @@ -167,7 +167,7 @@ void plLayer::Write(hsStream* s, hsResMgr* mgr) fBumpEnvXfm->Write(s); } -hsBool plLayer::MsgReceive(plMessage* msg) +bool plLayer::MsgReceive(plMessage* msg) { plLayRefMsg* refMsg = plLayRefMsg::ConvertNoRef(msg); if( refMsg ) diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayer.h b/Sources/Plasma/PubUtilLib/plSurface/plLayer.h index 924c51ba..75188c97 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayer.h +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayer.h @@ -61,7 +61,7 @@ public: virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); // Flat layer specifics plLayer& InitToDefault(); diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.cpp index cbdba018..3af0080c 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.cpp @@ -208,7 +208,7 @@ void plLayerAnimationBase::IEvalConvertedTime(float secs, uint32_t passChans, ui fPassThruChannels = 0; // already handled, don't need to keep passing them through. } -hsBool plLayerAnimationBase::MsgReceive(plMessage* msg) +bool plLayerAnimationBase::MsgReceive(plMessage* msg) { return plLayerInterface::MsgReceive(msg); } @@ -367,7 +367,7 @@ uint32_t plLayerAnimation::Eval(double wSecs, uint32_t frame, uint32_t ignore) return dirty; } -hsBool plLayerAnimation::MsgReceive(plMessage* msg) +bool plLayerAnimation::MsgReceive(plMessage* msg) { // pass sdl msg to sdlMod plSDLModifierMsg* sdlMsg = plSDLModifierMsg::ConvertNoRef(msg); @@ -377,7 +377,7 @@ hsBool plLayerAnimation::MsgReceive(plMessage* msg) return true; // msg handled } - hsBool retVal = false; + bool retVal = false; plAnimCmdMsg* cmdMsg = plAnimCmdMsg::ConvertNoRef(msg); if( cmdMsg ) { @@ -538,7 +538,7 @@ uint32_t plLayerLinkAnimation::Eval(double wSecs, uint32_t frame, uint32_t ignor return dirty; } -void plLayerLinkAnimation::SetFadeFlag(uint8_t flag, hsBool val) +void plLayerLinkAnimation::SetFadeFlag(uint8_t flag, bool val) { if (val) fFadeFlags |= flag; @@ -554,7 +554,7 @@ void plLayerLinkAnimation::SetFadeFlag(uint8_t flag, hsBool val) fFadeFlagsDirty = true; } -hsBool plLayerLinkAnimation::MsgReceive( plMessage* pMsg ) +bool plLayerLinkAnimation::MsgReceive( plMessage* pMsg ) { plLinkEffectPrepBCMsg *bcpMsg = plLinkEffectPrepBCMsg::ConvertNoRef(pMsg); if (bcpMsg != nil) @@ -722,7 +722,7 @@ uint32_t plLayerSDLAnimation::Eval(double wSecs, uint32_t frame, uint32_t ignore return dirty; } -hsBool plLayerSDLAnimation::MsgReceive(plMessage* msg) +bool plLayerSDLAnimation::MsgReceive(plMessage* msg) { plSDLNotificationMsg* nMsg = plSDLNotificationMsg::ConvertNoRef(msg); if (nMsg) diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.h b/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.h index f789ea5a..28040ba1 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.h +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.h @@ -85,7 +85,7 @@ public: virtual plLayerInterface* Attach(plLayerInterface* prev); //virtual uint32_t Eval(double secs, uint32_t frame, uint32_t ignore) = 0; - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); @@ -129,7 +129,7 @@ public: virtual plLayerInterface* Attach(plLayerInterface* prev); virtual uint32_t Eval(double wSecs, uint32_t frame, uint32_t ignore); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); @@ -144,7 +144,7 @@ class plLayerLinkAnimation : public plLayerAnimation { protected: plKey fLinkKey; - hsBool fEnabled; + bool fEnabled; plEventCallbackMsg *fIFaceCallback; enum @@ -157,7 +157,7 @@ protected: }; uint8_t fFadeFlags; uint8_t fLastFadeFlag; - hsBool fFadeFlagsDirty; + bool fFadeFlagsDirty; public: plLayerLinkAnimation(); @@ -173,16 +173,16 @@ public: // NEVER! // If you think it should... talk to Bob. He will explain why it can't be, and beat you up. // If he can't remember, beat him up until he does (or ask Moose). - virtual hsBool DirtySynchState(const char* sdlName, uint32_t sendFlags) { return false; } // don't send link state + virtual bool DirtySynchState(const char* sdlName, uint32_t sendFlags) { return false; } // don't send link state virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); virtual uint32_t Eval(double wSecs, uint32_t frame, uint32_t ignore); - virtual hsBool MsgReceive(plMessage* pMsg); - void Enable(hsBool b) { fEnabled = b; } - void SetFadeFlag(uint8_t flag, hsBool val); + virtual bool MsgReceive(plMessage* pMsg); + void Enable(bool b) { fEnabled = b; } + void SetFadeFlag(uint8_t flag, bool val); - hsBool fLeavingAge; + bool fLeavingAge; }; class plLayerSDLAnimation : public plLayerAnimationBase @@ -200,7 +200,7 @@ public: virtual uint32_t Eval(double wSecs, uint32_t frame, uint32_t ignore); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.cpp index 3cc3f5e0..bcabde1d 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.cpp @@ -346,7 +346,7 @@ void plLayerInterface::Write(hsStream* s, hsResMgr* mgr) mgr->WriteKey(s, fUnderLay); } -hsBool plLayerInterface::MsgReceive(plMessage* msg) +bool plLayerInterface::MsgReceive(plMessage* msg) { plLayRefMsg* refMsg = plLayRefMsg::ConvertNoRef(msg); if( refMsg ) diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.h b/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.h index e82c634c..50a6c53e 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.h +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerInterface.h @@ -208,12 +208,12 @@ public: plLayerInterface* GetAttached(); void AttachViaNotify(plLayerInterface *prev); // Export only - hsBool OwnChannel(uint32_t which) const { return 0 != (fOwnedChannels & which); } + bool OwnChannel(uint32_t which) const { return 0 != (fOwnedChannels & which); } virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); }; diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp index e621a2f7..6e8ce132 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp @@ -148,7 +148,7 @@ uint32_t plLayerMultiply::Eval(double wSecs, uint32_t frame, uint32_t ignore) return dirtyChannels; } -hsBool plLayerMultiply::MsgReceive(plMessage* msg) +bool plLayerMultiply::MsgReceive(plMessage* msg) { return plLayerInterface::MsgReceive(msg); } diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.h b/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.h index 924b34bc..d4453fec 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.h +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.h @@ -58,7 +58,7 @@ public: virtual plLayerInterface* Attach(plLayerInterface* prev); virtual uint32_t Eval(double secs, uint32_t frame, uint32_t ignore); - virtual hsBool MsgReceive(plMessage* msg); + virtual bool MsgReceive(plMessage* msg); virtual void Read(hsStream* s, hsResMgr* mgr); virtual void Write(hsStream* s, hsResMgr* mgr); diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerOr.h b/Sources/Plasma/PubUtilLib/plSurface/plLayerOr.h index 9fa59b70..54a118ff 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerOr.h +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerOr.h @@ -50,7 +50,7 @@ class plLayerOr : public plLayerInterface { protected: hsGMatState fOringState; - hsBool fDirty; + bool fDirty; public: plLayerOr(); diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerShadowBase.h b/Sources/Plasma/PubUtilLib/plSurface/plLayerShadowBase.h index 3cd5dc2d..a8c41a5c 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerShadowBase.h +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerShadowBase.h @@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plLayerLightBase : public plLayerInterface { protected: - hsBool fDirty; + bool fDirty; public: plLayerLightBase(); @@ -69,7 +69,7 @@ public: class plLayerShadowBase : public plLayerInterface { protected: - hsBool fDirty; + bool fDirty; public: plLayerShadowBase(); diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerWrapper.h b/Sources/Plasma/PubUtilLib/plSurface/plLayerWrapper.h index 33f620a8..2346e54e 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerWrapper.h +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerWrapper.h @@ -65,7 +65,7 @@ public: return dirty; } - virtual hsBool MsgReceive(plMessage* msg) { return plLayerInterface::MsgReceive(msg); } + virtual bool MsgReceive(plMessage* msg) { return plLayerInterface::MsgReceive(msg); } }; #endif // plLayerWrapper_inc diff --git a/Sources/Plasma/PubUtilLib/plSurface/plShader.h b/Sources/Plasma/PubUtilLib/plSurface/plShader.h index 75bc1288..8980a4db 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plShader.h +++ b/Sources/Plasma/PubUtilLib/plSurface/plShader.h @@ -246,12 +246,12 @@ public: void SetDecl(const plShaderDecl* p); // will reference (pointer copy) void SetDecl(plShaderID::ID id); - hsBool IsValid() const { return !(fFlags & kInvalid); } + bool IsValid() const { return !(fFlags & kInvalid); } void Invalidate() const { fFlags |= kInvalid; } - hsBool IsPixelShader() const { return 0 != (fFlags & kIsPixel); } - hsBool IsVertexShader() const { return !IsPixelShader(); } - void SetIsPixelShader(hsBool on) { if(on)fFlags |= kIsPixel; else fFlags &= ~kIsPixel; } + bool IsPixelShader() const { return 0 != (fFlags & kIsPixel); } + bool IsVertexShader() const { return !IsPixelShader(); } + void SetIsPixelShader(bool on) { if(on)fFlags |= kIsPixel; else fFlags &= ~kIsPixel; } // These are only for use by the pipeline. hsGDeviceRef* GetDeviceRef() const { return fDeviceRef; } diff --git a/Sources/Plasma/PubUtilLib/plSurface/plShaderTable.h b/Sources/Plasma/PubUtilLib/plSurface/plShaderTable.h index bb0879a7..fabc368e 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plShaderTable.h +++ b/Sources/Plasma/PubUtilLib/plSurface/plShaderTable.h @@ -130,14 +130,14 @@ protected: plShaderTableInst(); - hsBool LoadFromFile() const { return 0 != (fFlags & kLoadFromFile); } - void SetLoadFromFile(hsBool on) { if(on) fFlags |= kLoadFromFile; else fFlags &= ~kLoadFromFile; } + bool LoadFromFile() const { return 0 != (fFlags & kLoadFromFile); } + void SetLoadFromFile(bool on) { if(on) fFlags |= kLoadFromFile; else fFlags &= ~kLoadFromFile; } const plShaderDecl* Decl(plShaderID::ID id) const { return fTable[id]; } void Register(const plShaderDecl* decl); - hsBool IsRegistered(plShaderID::ID id) const { return (id == 0) || ((id < plShaderID::kNumShaders) && fTable[id]); } + bool IsRegistered(plShaderID::ID id) const { return (id == 0) || ((id < plShaderID::kNumShaders) && fTable[id]); } public: virtual ~plShaderTableInst(); @@ -156,14 +156,14 @@ protected: public: - static hsBool LoadFromFile() { return Instance().LoadFromFile(); } - static void SetLoadFromFile(hsBool on) { Instance().SetLoadFromFile(on); } + static bool LoadFromFile() { return Instance().LoadFromFile(); } + static void SetLoadFromFile(bool on) { Instance().SetLoadFromFile(on); } static const plShaderDecl* Decl(plShaderID::ID id) { return Instance().Decl(id); } static void Register(const plShaderDecl* decl) { Instance().Register(decl); } - static hsBool IsRegistered(plShaderID::ID id) { return Instance().IsRegistered(id); } + static bool IsRegistered(plShaderID::ID id) { return Instance().IsRegistered(id); } }; class plShaderRegister diff --git a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp index c7d1a08e..78e913a0 100644 --- a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp +++ b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.cpp @@ -65,7 +65,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // #define MAGICWINDOWSOFFSET ((__int64)11644473600) // magic number, taken from Python Source // -hsBool plUnifiedTime::SetFromWinFileTime(const FILETIME ft) +bool plUnifiedTime::SetFromWinFileTime(const FILETIME ft) { // FILETIME resolution seems to be 0.01 sec @@ -87,7 +87,7 @@ hsBool plUnifiedTime::SetFromWinFileTime(const FILETIME ft) // // Sets the unified time to the current UTC time // -hsBool plUnifiedTime::SetToUTC() +bool plUnifiedTime::SetToUTC() { FILETIME ft; @@ -99,7 +99,7 @@ hsBool plUnifiedTime::SetToUTC() // // Sets the unified time to the current UTC time // -hsBool plUnifiedTime::SetToUTC() +bool plUnifiedTime::SetToUTC() { struct timeval tv; @@ -257,7 +257,7 @@ void plUnifiedTime::ToCurrentTime() SetToUTC(); } -hsBool plUnifiedTime::SetGMTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec) +bool plUnifiedTime::SetGMTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec) { if( !SetTime( year, month, day, hour, minute, second, usec, 0 ) ) return false; @@ -268,7 +268,7 @@ hsBool plUnifiedTime::SetGMTime(short year, short month, short day, short hour, return true; } -hsBool plUnifiedTime::SetTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec, int dst) +bool plUnifiedTime::SetTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec, int dst) { struct tm atm; atm.tm_sec = second; @@ -288,7 +288,7 @@ hsBool plUnifiedTime::SetTime(short year, short month, short day, short hour, sh return true; } -hsBool plUnifiedTime::GetTime(short &year, short &month, short &day, short &hour, short &minute, short &second) const +bool plUnifiedTime::GetTime(short &year, short &month, short &day, short &hour, short &minute, short &second) const { struct tm* time = IGetTime(&fSecs); if (!time) diff --git a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h index cec65e9b..a6c1e4da 100644 --- a/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h +++ b/Sources/Plasma/PubUtilLib/plUnifiedTime/plUnifiedTime.h @@ -111,7 +111,7 @@ public: time_t GetSecs() const { return fSecs; } uint32_t GetMicros() const { return fMicros; } double GetSecsDouble() const; // get the secs and micros as a double floating point value - hsBool GetTime(short &year, short &month, short &day, short &hour, short &minute, short &second) const; + bool GetTime(short &year, short &month, short &day, short &hour, short &minute, short &second) const; struct tm * GetTm(struct tm * ptm=nil) const; int GetYear() const; int GetMonth() const; @@ -127,14 +127,14 @@ public: void SetSecs(const time_t secs) { fSecs = secs; } void SetSecsDouble(double secs); void SetMicros(const uint32_t micros) { fMicros = micros; } - hsBool SetTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec=0, int dst=-1); - hsBool SetGMTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec=0); - hsBool SetToUTC(); + bool SetTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec=0, int dst=-1); + bool SetGMTime(short year, short month, short day, short hour, short minute, short second, unsigned long usec=0); + bool SetToUTC(); void ToCurrentTime(); void ToEpoch() { fSecs = 0; fMicros = 0;} void SetMode(Mode mode) { fMode=mode;} #if HS_BUILD_FOR_WIN32 - hsBool SetFromWinFileTime(const FILETIME ft); + bool SetFromWinFileTime(const FILETIME ft); #endif // query diff --git a/Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.cpp b/Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.cpp index 47d520aa..cff110d4 100644 --- a/Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.cpp +++ b/Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.cpp @@ -635,7 +635,7 @@ void VaultImageNode::SetImageData (const uint8_t buffer[], unsigned bytes) { #ifdef CLIENT void VaultImageNode::StuffImage (plMipmap * src, int dstType) { hsRAMStream ramStream; - hsBool compressSuccess = false; + bool compressSuccess = false; switch (dstType) { case kJPEG: diff --git a/Sources/Tools/MaxComponent/pfGUISkinComp.h b/Sources/Tools/MaxComponent/pfGUISkinComp.h index 69b22e5c..130e0fc1 100644 --- a/Sources/Tools/MaxComponent/pfGUISkinComp.h +++ b/Sources/Tools/MaxComponent/pfGUISkinComp.h @@ -56,12 +56,12 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); plLayerTex *GetSkinBitmap( void ); diff --git a/Sources/Tools/MaxComponent/plAGComponents.cpp b/Sources/Tools/MaxComponent/plAGComponents.cpp index 692ccbf4..f868f833 100644 --- a/Sources/Tools/MaxComponent/plAGComponents.cpp +++ b/Sources/Tools/MaxComponent/plAGComponents.cpp @@ -105,15 +105,15 @@ class plAnimAvatarComponent : public plComponent // static plAGAnimMgr *fManager; public: plAnimAvatarComponent(); - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode* node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode* node, plErrorMsg *pErrMsg); virtual plATCAnim * NewAnimation(const plString &name, double begin, double end); - hsBool ConvertNode(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool ConvertNodeSegmentBranch(plMaxNode *node, plAGAnim *mod, plErrorMsg *pErrMsg); - hsBool MakePersistent(plMaxNode *node, plAGAnim *anim, const plString &animName, plErrorMsg *pErrMsg); + bool ConvertNode(plMaxNode *node, plErrorMsg *pErrMsg); + bool ConvertNodeSegmentBranch(plMaxNode *node, plAGAnim *mod, plErrorMsg *pErrMsg); + bool MakePersistent(plMaxNode *node, plAGAnim *anim, const plString &animName, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } @@ -169,7 +169,7 @@ plAnimAvatarComponent::plAnimAvatarComponent() // Anim Avatar PRECONVERT // // -hsBool plAnimAvatarComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAnimAvatarComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { if(node->GetMaxNodeData()) { @@ -194,7 +194,7 @@ hsBool plAnimAvatarComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrM // for each node, search for segments to convert... // // -hsBool plAnimAvatarComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAnimAvatarComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { Interface *theInterface = node->GetInterface(); RemoveBiped(node, theInterface); @@ -212,7 +212,7 @@ hsBool plAnimAvatarComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // recurse on children // // -hsBool plAnimAvatarComponent::ConvertNode(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAnimAvatarComponent::ConvertNode(plMaxNode *node, plErrorMsg *pErrMsg) { plNotetrackAnim noteAnim(node, pErrMsg); // does this node have any segments specified? @@ -266,12 +266,12 @@ plATCAnim * plAnimAvatarComponent::NewAnimation(const plString &name, double beg // every node gets an animation channel for the time period in question // // -hsBool plAnimAvatarComponent::ConvertNodeSegmentBranch(plMaxNode *node, plAGAnim *mod, plErrorMsg *pErrMsg) +bool plAnimAvatarComponent::ConvertNodeSegmentBranch(plMaxNode *node, plAGAnim *mod, plErrorMsg *pErrMsg) { // Check for a suppression marker plNotetrackAnim noteAnim(node, pErrMsg); plAnimInfo info = noteAnim.GetAnimInfo(plString::Null); - hsBool suppressed = info.IsSuppressed(mod->GetName()); + bool suppressed = info.IsSuppressed(mod->GetName()); // Get the affine parts and the TM Controller plSceneObject *obj = node->GetSceneObject(); @@ -338,7 +338,7 @@ plKey FindSceneNode(plMaxNode *node) // Perform wizardry necessary to make the object save itself. // // -hsBool plAnimAvatarComponent::MakePersistent(plMaxNode *node, plAGAnim *anim, const plString &animName, plErrorMsg *pErrMsg) +bool plAnimAvatarComponent::MakePersistent(plMaxNode *node, plAGAnim *anim, const plString &animName, plErrorMsg *pErrMsg) { // new approach: add to the generic pool on the scene node plLocation nodeLoc = node->GetLocation(); @@ -380,7 +380,7 @@ public: }; plEmoteComponent(); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); virtual plATCAnim * NewAnimation(const plString &name, double begin, double end); protected: @@ -440,7 +440,7 @@ plEmoteComponent::plEmoteComponent() // Convert ------------------------------------------------------------ // -------- -hsBool plEmoteComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plEmoteComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { Interface *theInterface = node->GetInterface(); RemoveBiped(node, theInterface); diff --git a/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp b/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp index 6ab16de4..c1fe5739 100644 --- a/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp +++ b/Sources/Tools/MaxComponent/plActivatorBaseComponent.cpp @@ -81,14 +81,14 @@ void plActivatorBaseComponent::IGetReceivers(plMaxNode* node, hsTArray& r // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plActivatorBaseComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plActivatorBaseComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fLogicModKeys.clear(); fReceivers.clear(); return true; } -hsBool plActivatorBaseComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plActivatorBaseComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetForceLocal(true); @@ -105,7 +105,7 @@ hsBool plActivatorBaseComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg return true; } -hsBool plActivatorBaseComponent::DeInit( plMaxNode *node, plErrorMsg *pErrMsg ) +bool plActivatorBaseComponent::DeInit( plMaxNode *node, plErrorMsg *pErrMsg ) { fReceivers.clear(); fLogicModKeys.clear(); diff --git a/Sources/Tools/MaxComponent/plActivatorBaseComponent.h b/Sources/Tools/MaxComponent/plActivatorBaseComponent.h index 59fcd4e1..27943d72 100644 --- a/Sources/Tools/MaxComponent/plActivatorBaseComponent.h +++ b/Sources/Tools/MaxComponent/plActivatorBaseComponent.h @@ -68,9 +68,9 @@ protected: public: // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); const LogicKeys& GetLogicKeys() { return fLogicModKeys; } virtual plKey GetLogicKey(plMaxNode* node); diff --git a/Sources/Tools/MaxComponent/plActivatorComponent.cpp b/Sources/Tools/MaxComponent/plActivatorComponent.cpp index c307006f..7e095468 100644 --- a/Sources/Tools/MaxComponent/plActivatorComponent.cpp +++ b/Sources/Tools/MaxComponent/plActivatorComponent.cpp @@ -51,7 +51,7 @@ class plActiveComponent : public plComponent { public: plActiveComponent(); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; OBSOLETE_CLASS_DESC(plActiveComponent, gActiveDesc, "Activator", "Activator", COMP_TYPE_LOGIC, ACTIVATOR_CID) diff --git a/Sources/Tools/MaxComponent/plAnimCompProc.cpp b/Sources/Tools/MaxComponent/plAnimCompProc.cpp index c1e65fdc..6fd7cb31 100644 --- a/Sources/Tools/MaxComponent/plAnimCompProc.cpp +++ b/Sources/Tools/MaxComponent/plAnimCompProc.cpp @@ -412,7 +412,7 @@ protected: void ISetUserType(plMaxNode* node, const char* userType) { - if (hsStrEQ(userType, kUserTypeAll)) + if (strcmp(userType, kUserTypeAll) == 0) ISetNodeValue(nil); } diff --git a/Sources/Tools/MaxComponent/plAnimComponent.cpp b/Sources/Tools/MaxComponent/plAnimComponent.cpp index ab44d51a..b74bfff5 100644 --- a/Sources/Tools/MaxComponent/plAnimComponent.cpp +++ b/Sources/Tools/MaxComponent/plAnimComponent.cpp @@ -155,7 +155,7 @@ plAnimObjInterface *plAnimComponentBase::GetAnimInterface( INode *inode ) return nil; } -void plAnimComponentProc::EnableGlobal(HWND hWnd, hsBool enable) +void plAnimComponentProc::EnableGlobal(HWND hWnd, bool enable) { ComboBox_Enable(GetDlgItem(hWnd, IDC_ANIM_GLOBAL_LIST), enable); ComboBox_Enable(GetDlgItem(hWnd, IDC_ANIM_NAMES), !enable); @@ -402,7 +402,7 @@ public: CLASS_DESC(plAnimComponent, gAnimDesc, "Animation", "Animation", COMP_TYPE_MISC, ANIM_COMP_CID) CLASS_DESC(plAnimGroupedComponent, gAnimGroupedDesc, "Animation Grouped", "AnimGrouped", COMP_TYPE_MISC, ANIM_GROUP_COMP_CID) -hsBool plAnimComponentBase::IsAnimComponent(plComponentBase *comp) +bool plAnimComponentBase::IsAnimComponent(plComponentBase *comp) { return (comp->ClassID() == ANIM_COMP_CID || comp->ClassID() == ANIM_GROUP_COMP_CID); @@ -531,7 +531,7 @@ plKey plAnimComponent::GetModKey(plMaxNode *node) return nil; } -hsBool plAnimComponent::GetKeyList( INode *restrictedNode, hsTArray &outKeys ) +bool plAnimComponent::GetKeyList( INode *restrictedNode, hsTArray &outKeys ) { if( restrictedNode != nil ) { @@ -562,7 +562,7 @@ plKey plAnimGroupedComponent::GetModKey(plMaxNode *node) return nil; } -hsBool plAnimGroupedComponent::GetKeyList( INode *restrictedNode, hsTArray &outKeys ) +bool plAnimGroupedComponent::GetKeyList( INode *restrictedNode, hsTArray &outKeys ) { if( fForward ) { @@ -575,7 +575,7 @@ hsBool plAnimGroupedComponent::GetKeyList( INode *restrictedNode, hsTArrayAddViaNotify(forwardKey, refMsg, plRefFlags::kActiveRef); } - hsBool ret = plAnimComponentBase::PreConvert(node, pErrMsg); + bool ret = plAnimComponentBase::PreConvert(node, pErrMsg); plAGMasterMod *mod = fMods[node]; @@ -644,7 +644,7 @@ void SetPhysAnimRecurse(plMaxNode *node, plErrorMsg *pErrMsg) SetPhysAnimRecurse((plMaxNode *)node->GetChildNode(i), pErrMsg); } -hsBool plAnimComponentBase::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAnimComponentBase::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { if (node->IsTMAnimated()) { @@ -678,7 +678,7 @@ hsBool plAnimComponentBase::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg return true; } -hsBool plAnimComponentBase::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAnimComponentBase::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { // If this is the first time in the preconvert, reset the map if (fNeedReset) @@ -783,9 +783,9 @@ hsBool plAnimComponentBase::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) } -hsBool plAnimComponentBase::IAddTMToAnim(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg) +bool plAnimComponentBase::IAddTMToAnim(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg) { - hsBool result = false; + bool result = false; // Get the affine parts and the TM Controller plSceneObject *obj = node->GetSceneObject(); @@ -813,7 +813,7 @@ hsBool plAnimComponentBase::IAddTMToAnim(plMaxNode *node, plAGAnim *anim, plErro return result; } -hsBool plAnimComponentBase::IAddLightToAnim(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg) +bool plAnimComponentBase::IAddLightToAnim(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg) { if (!node->IsAnimatedLight()) return false; @@ -842,9 +842,9 @@ hsBool plAnimComponentBase::IAddLightToAnim(plMaxNode *node, plAGAnim *anim, plE return true; } -hsBool plAnimComponentBase::IConvertNodeSegmentBranch(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg) +bool plAnimComponentBase::IConvertNodeSegmentBranch(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg) { - hsBool madeAnim = false; + bool madeAnim = false; int i; if (IAddTMToAnim(node, anim, pErrMsg)) @@ -879,7 +879,7 @@ hsBool plAnimComponentBase::IConvertNodeSegmentBranch(plMaxNode *node, plAGAnim return madeAnim; } -hsBool plAnimComponentBase::IMakePersistent(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg) +bool plAnimComponentBase::IMakePersistent(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg) { // anims made by this component are private to the specific AGMasterMod, so we attach them there. plAGMasterMod *mod = plAGMasterMod::ConvertNoRef(fMods[node]); @@ -896,7 +896,7 @@ hsBool plAnimComponentBase::IMakePersistent(plMaxNode *node, plAGAnim *anim, plE } -hsBool plAnimComponentBase::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAnimComponentBase::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { fNeedReset = true; @@ -923,7 +923,7 @@ hsBool plAnimComponentBase::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plAnimComponentBase::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAnimComponentBase::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { fMods.clear(); fLightMods.clear(); @@ -963,12 +963,12 @@ protected: void ISetUserType(plMaxNode* node, const char* userType) { - if (hsStrEQ(userType, kUseParamBlockNodeString)) + if (strcmp(userType, kUseParamBlockNodeString) == 0) { ISetNodeValue(nil); fPB->SetValue(fTypeID, 0, plAnimObjInterface::kUseParamBlockNode); } - else if (hsStrEQ(userType, kUseOwnerNodeString)) + else if (strcmp(userType, kUseOwnerNodeString) == 0) { ISetNodeValue(nil); fPB->SetValue(fTypeID, 0, plAnimObjInterface::kUseOwnerNode); @@ -990,7 +990,7 @@ void plAnimComponentBase::PickTargetNode( IParamBlock2 *destPB, ParamID destP pick.DoPick(); } -plString plAnimComponentBase::GetIfaceSegmentName( hsBool allowNil ) +plString plAnimComponentBase::GetIfaceSegmentName( bool allowNil ) { plString name = GetAnimName(); if( allowNil || !name.IsNull() ) @@ -1206,7 +1206,7 @@ plAnimCompressComp::plAnimCompressComp() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plAnimCompressComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAnimCompressComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetAnimCompress(fCompPB->GetInt(ParamID(kAnimCompressLevel))); @@ -1219,7 +1219,7 @@ hsBool plAnimCompressComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plAnimCompressComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAnimCompressComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } \ No newline at end of file diff --git a/Sources/Tools/MaxComponent/plAnimComponent.h b/Sources/Tools/MaxComponent/plAnimComponent.h index 26f0d972..9a4a3489 100644 --- a/Sources/Tools/MaxComponent/plAnimComponent.h +++ b/Sources/Tools/MaxComponent/plAnimComponent.h @@ -109,14 +109,14 @@ public: plAnimComponentBase(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); virtual plKey GetModKey(plMaxNode *node)=0; plString GetAnimName(); - static hsBool IsAnimComponent(plComponentBase *comp); + static bool IsAnimComponent(plComponentBase *comp); std::map fAnims; @@ -131,14 +131,14 @@ public: // plAnimObjInterface functions virtual void PickTargetNode( IParamBlock2 *destPB, ParamID destParamID, ParamID typeID ); - virtual hsBool IsNodeRestricted( void ) { return true; } - virtual plString GetIfaceSegmentName( hsBool allowNil ); + virtual bool IsNodeRestricted( void ) { return true; } + virtual plString GetIfaceSegmentName( bool allowNil ); protected: - hsBool IAddTMToAnim(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg); - hsBool IAddLightToAnim(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg); - hsBool IConvertNodeSegmentBranch(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg); - hsBool IMakePersistent(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg); + bool IAddTMToAnim(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg); + bool IAddLightToAnim(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg); + bool IConvertNodeSegmentBranch(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg); + bool IMakePersistent(plMaxNode *node, plAGAnim *anim, plErrorMsg *pErrMsg); }; class plAnimComponent : public plAnimComponentBase @@ -146,7 +146,7 @@ class plAnimComponent : public plAnimComponentBase public: plAnimComponent(); plKey GetModKey(plMaxNode *node); - virtual hsBool GetKeyList( INode *restrictedNode, hsTArray &outKeys ); + virtual bool GetKeyList( INode *restrictedNode, hsTArray &outKeys ); }; class plAnimGroupedComponent : public plAnimComponentBase @@ -157,12 +157,12 @@ protected: public: plAnimGroupedComponent(); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); plKey GetModKey(plMaxNode *node); - virtual hsBool IsNodeRestricted( void ) { return false; } - virtual hsBool GetKeyList( INode *restrictedNode, hsTArray &outKeys ); + virtual bool IsNodeRestricted( void ) { return false; } + virtual bool GetKeyList( INode *restrictedNode, hsTArray &outKeys ); }; //// Dialog Proc For Anim Selection ///////////////////////////////////////////////////////////// @@ -210,7 +210,7 @@ protected: plComponentNoteTrackDlg fNoteTrackDlg; IParamBlock2 *fPB; - void EnableGlobal(HWND hWnd, hsBool enable); + void EnableGlobal(HWND hWnd, bool enable); public: static void FillAgeGlobalComboBox(HWND box, const char *varName); @@ -227,9 +227,9 @@ public: plAnimCompressComp(); void DeleteThis() { delete this; } - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - //virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + //virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { diff --git a/Sources/Tools/MaxComponent/plAnimEventComponent.cpp b/Sources/Tools/MaxComponent/plAnimEventComponent.cpp index 13c98e86..7901a948 100644 --- a/Sources/Tools/MaxComponent/plAnimEventComponent.cpp +++ b/Sources/Tools/MaxComponent/plAnimEventComponent.cpp @@ -122,7 +122,7 @@ plAnimEventComponent::plAnimEventComponent() : fCanExport(false) fClassDesc->MakeAutoParamBlocks(this); } -hsBool plAnimEventComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plAnimEventComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { plComponentBase* animComp; plMaxNode* animNode; @@ -142,7 +142,7 @@ hsBool plAnimEventComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMs return plActivatorBaseComponent::SetupProperties(node, pErrMsg); } -hsBool plAnimEventComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plAnimEventComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { if (!fCanExport) return false; @@ -167,7 +167,7 @@ plEventCallbackMsg* CreateCallbackMsg(plAnimCmdMsg* animMsg, plKey modKey) return eventMsg; } -hsBool plAnimEventComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAnimEventComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if (!fCanExport) return false; @@ -436,7 +436,7 @@ plMtlEventComponent::plMtlEventComponent() : fCanExport(false) fClassDesc->MakeAutoParamBlocks(this); } -hsBool plMtlEventComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plMtlEventComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { Mtl* mtl = fCompPB->GetMtl(kMtlMtl); @@ -456,7 +456,7 @@ hsBool plMtlEventComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg return plActivatorBaseComponent::SetupProperties(node, pErrMsg); } -hsBool plMtlEventComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plMtlEventComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { if (!fCanExport) return false; @@ -472,7 +472,7 @@ hsBool plMtlEventComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) // KLUDGE - The material animation key getter is here, so we have to include all this crap #include "plResponderMtl.h" -hsBool plMtlEventComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plMtlEventComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if (!fCanExport) return false; diff --git a/Sources/Tools/MaxComponent/plAnimEventComponent.h b/Sources/Tools/MaxComponent/plAnimEventComponent.h index 107c70e0..667aed69 100644 --- a/Sources/Tools/MaxComponent/plAnimEventComponent.h +++ b/Sources/Tools/MaxComponent/plAnimEventComponent.h @@ -55,9 +55,9 @@ protected: public: plAnimEventComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); }; class plMtlEventComponent : public plActivatorBaseComponent @@ -68,9 +68,9 @@ protected: public: plMtlEventComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); }; #endif // plAnimEventComponent_inc \ No newline at end of file diff --git a/Sources/Tools/MaxComponent/plAnimObjInterface.h b/Sources/Tools/MaxComponent/plAnimObjInterface.h index d6d76dad..e75c9b5b 100644 --- a/Sources/Tools/MaxComponent/plAnimObjInterface.h +++ b/Sources/Tools/MaxComponent/plAnimObjInterface.h @@ -60,7 +60,7 @@ class plAnimObjInterface // If the following function returns true, then it makes sense to restrict // the animation conversion to a specific node (i.e. PickTargetNode() makes // sense) - virtual hsBool IsNodeRestricted( void ) = 0; + virtual bool IsNodeRestricted( void ) = 0; // Allows the user to pick an INode that this animation is applied to // (ex. as a material or as a component) and stores it in the given ID @@ -76,14 +76,14 @@ class plAnimObjInterface }; // Given the optional INode to restrict to, return the list of keys to send messages to for conversion - virtual hsBool GetKeyList( INode *restrictedNode, hsTArray &outKeys ) = 0; + virtual bool GetKeyList( INode *restrictedNode, hsTArray &outKeys ) = 0; // Return the name of the segment/animation that this interface references. Pass "false" to get the // ENTIRE_ANIMATION_NAME string for entire animations, "true" for nil. - virtual plString GetIfaceSegmentName( hsBool allowNil ) = 0; + virtual plString GetIfaceSegmentName( bool allowNil ) = 0; // This animation would require (depending on the node restriction) a separate material (i.e. material anim) - virtual hsBool MightRequireSeparateMaterial( void ) { return false; } + virtual bool MightRequireSeparateMaterial( void ) { return false; } }; // Strings for above NodeTypes enums diff --git a/Sources/Tools/MaxComponent/plAudioComponents.cpp b/Sources/Tools/MaxComponent/plAudioComponents.cpp index eeae85c9..77ddf5c7 100644 --- a/Sources/Tools/MaxComponent/plAudioComponents.cpp +++ b/Sources/Tools/MaxComponent/plAudioComponents.cpp @@ -428,7 +428,7 @@ const char* plBaseSoundEmitterComponent::GetSoundFileName( plBaseSoundEmitterCom return nil; } -hsBool plBaseSoundEmitterComponent::DeInit( plMaxNode *node, plErrorMsg *pErrMsg ) +bool plBaseSoundEmitterComponent::DeInit( plMaxNode *node, plErrorMsg *pErrMsg ) { fCreateGrouped = false; fIndices.clear(); @@ -438,7 +438,7 @@ hsBool plBaseSoundEmitterComponent::DeInit( plMaxNode *node, plErrorMsg *pErrMsg // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plBaseSoundEmitterComponent::SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ) +bool plBaseSoundEmitterComponent::SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ) { IConvertOldVolume(); /* @@ -468,7 +468,7 @@ bool plBaseSoundEmitterComponent::IValidate(plMaxNode *node, plErrorMsg *pErrMsg return true; } -hsBool plBaseSoundEmitterComponent::PreConvert( plMaxNode *node, plErrorMsg *pErrMsg, Class_ID classToConvert ) +bool plBaseSoundEmitterComponent::PreConvert( plMaxNode *node, plErrorMsg *pErrMsg, Class_ID classToConvert ) { const char* dbgNodeName = node->GetName(); fValidNodes[node] = IValidate(node, pErrMsg); @@ -704,7 +704,7 @@ plSoundBuffer *plBaseSoundEmitterComponent::IGetSourceBuffer( const char *file // Returns true if found, false if not. #ifdef MAXASS_AVAILABLE -hsBool plBaseSoundEmitterComponent::LookupLatestAsset( const char *waveName, char *retPath, plErrorMsg *errMsg ) +bool plBaseSoundEmitterComponent::LookupLatestAsset( const char *waveName, char *retPath, plErrorMsg *errMsg ) { MaxAssInterface* assetMan = GetMaxAssInterface(); if( assetMan == nil ) @@ -802,7 +802,7 @@ float plBaseSoundEmitterComponent::GetSoundVolume( void ) const // Loads the given combo box with category selections and sets the ParamID for the category parameter. // Returns false if there are no categories to choose for this component -hsBool plBaseSoundEmitterComponent::UpdateCategories( HWND dialogBox, int &categoryID, ParamID ¶mID ) +bool plBaseSoundEmitterComponent::UpdateCategories( HWND dialogBox, int &categoryID, ParamID ¶mID ) { HWND comboBox = GetDlgItem( dialogBox, IDC_SND_CATEGORY ); char **cats; @@ -911,9 +911,9 @@ void plBaseSoundEmitterComponent::ISetBaseParameters( plSound *destSound, plE //// AddToAnim ////////////////////////////////////////////////////////////////////////////////// // Support for animated volumes -hsBool plBaseSoundEmitterComponent::AddToAnim( plAGAnim *anim, plMaxNode *node ) +bool plBaseSoundEmitterComponent::AddToAnim( plAGAnim *anim, plMaxNode *node ) { - hsBool result = false; + bool result = false; plController *ctl; hsControlConverter& cc = hsControlConverter::Instance(); @@ -1774,30 +1774,30 @@ public: // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool IsLocalOnly( void ) const { if( fCompPB->GetInt( (ParamID)kSndIsLocalOnly ) ) return true; else return false; } + virtual bool IsLocalOnly( void ) const { if( fCompPB->GetInt( (ParamID)kSndIsLocalOnly ) ) return true; else return false; } - virtual hsBool ConvertGrouped( plMaxNode *baseNode, hsTArray &groupArray, plErrorMsg *pErrMsg ); + virtual bool ConvertGrouped( plMaxNode *baseNode, hsTArray &groupArray, plErrorMsg *pErrMsg ); protected: bool IValidate(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool IAllowStereoFiles( void ) const { return false; } + virtual bool IAllowStereoFiles( void ) const { return false; } void ISetParameters( plWin32Sound *destSound, plErrorMsg *pErrMsg ); - virtual hsBool IGetCategoryList( char **&catList, int *&catKonstantList ); + virtual bool IGetCategoryList( char **&catList, int *&catKonstantList ); }; class plSoundComponentProc : public plAudioBaseComponentProc { - hsBool fHandleCategory; + bool fHandleCategory; int fCategoryCtrlID; ParamID fCategoryParamID; @@ -2083,7 +2083,7 @@ plSound3DEmitterComponent::~plSound3DEmitterComponent() //// IGetCategoryList /////////////////////////////////////////////////////////////////////////// // Returns a list of the categories and konstants supported for this type of sound -hsBool plSound3DEmitterComponent::IGetCategoryList( char **&catList, int *&catKonstantList ) +bool plSound3DEmitterComponent::IGetCategoryList( char **&catList, int *&catKonstantList ) { static char *cats[] = { "Background Music", "Ambience", "Sound FX", "GUI", "NPC Voice", "" }; static int catEnums[] = { plSound::kBackgroundMusic, plSound::kAmbience, plSound::kSoundFX, plSound::kGUISound, plSound::kNPCVoices }; @@ -2096,7 +2096,7 @@ hsBool plSound3DEmitterComponent::IGetCategoryList( char **&catList, int *&catK // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plSound3DEmitterComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plSound3DEmitterComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return plBaseSoundEmitterComponent::SetupProperties( pNode, pErrMsg ); } @@ -2106,7 +2106,7 @@ bool plSound3DEmitterComponent::IValidate(plMaxNode *node, plErrorMsg *pErrMsg) return plBaseSoundEmitterComponent::IValidate( node, pErrMsg ); } -hsBool plSound3DEmitterComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSound3DEmitterComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plBaseSoundEmitterComponent::PreConvert( node, pErrMsg, SOUND_3D_COMPONENT_ID ); } @@ -2166,7 +2166,7 @@ void plSound3DEmitterComponent::ISetParameters( plWin32Sound *destSound, plEr IGrabEAXParams( destSound, pErrMsg ); } -hsBool plSound3DEmitterComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSound3DEmitterComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if (!fValidNodes[node]) return false; @@ -2219,7 +2219,7 @@ hsBool plSound3DEmitterComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) } // Converts an array of components into a single grouped sound -hsBool plSound3DEmitterComponent::ConvertGrouped( plMaxNode *baseNode, hsTArray &groupArray, plErrorMsg *pErrMsg ) +bool plSound3DEmitterComponent::ConvertGrouped( plMaxNode *baseNode, hsTArray &groupArray, plErrorMsg *pErrMsg ) { plString keyName; @@ -2396,18 +2396,18 @@ public: // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool IsLocalOnly( void ) const { if( fCompPB->GetInt( (ParamID)kSndIsLocalOnly ) ) return true; else return false; } + virtual bool IsLocalOnly( void ) const { if( fCompPB->GetInt( (ParamID)kSndIsLocalOnly ) ) return true; else return false; } protected: virtual uint32_t ICalcSourceBufferFlags() const; bool IValidate(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool IGetCategoryList( char **&catList, int *&catKonstantList ); + virtual bool IGetCategoryList( char **&catList, int *&catKonstantList ); }; //Max desc stuff necessary below. @@ -2468,7 +2468,7 @@ plBackgroundMusicComponent::~plBackgroundMusicComponent() // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plBackgroundMusicComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plBackgroundMusicComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return plBaseSoundEmitterComponent::SetupProperties( pNode, pErrMsg ); } @@ -2487,12 +2487,12 @@ bool plBackgroundMusicComponent::IValidate(plMaxNode *node, plErrorMsg *pErrMsg) return plBaseSoundEmitterComponent::IValidate( node, pErrMsg ); } -hsBool plBackgroundMusicComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plBackgroundMusicComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plBaseSoundEmitterComponent::PreConvert( node, pErrMsg, BGND_MUSIC_COMPONENT_ID ); } -hsBool plBackgroundMusicComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plBackgroundMusicComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if (!fValidNodes[node]) return false; @@ -2546,7 +2546,7 @@ hsBool plBackgroundMusicComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) //// IGetCategoryList /////////////////////////////////////////////////////////////////////////// // Returns a list of the categories and konstants supported for this type of sound -hsBool plBackgroundMusicComponent::IGetCategoryList( char **&catList, int *&catKonstantList ) +bool plBackgroundMusicComponent::IGetCategoryList( char **&catList, int *&catKonstantList ) { static char *cats[] = { "Background Music", "Ambience", "Sound FX", "GUI", "NPC Voice", "" }; static int catEnums[] = { plSound::kBackgroundMusic, plSound::kAmbience, plSound::kSoundFX, plSound::kGUISound, plSound::kNPCVoices }; @@ -2571,10 +2571,10 @@ public: // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void UpdateSoundFileSelection( void ) { ; } @@ -2582,9 +2582,9 @@ protected: bool IValidate(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool IGetCategoryList( char **&catList, int *&catKonstantList ); + virtual bool IGetCategoryList( char **&catList, int *&catKonstantList ); - virtual hsBool IHasWaveformProps( void ) const { return false; } + virtual bool IHasWaveformProps( void ) const { return false; } }; //Max desc stuff necessary below. @@ -2618,7 +2618,7 @@ plGUISoundComponent::~plGUISoundComponent() //// IGetCategoryList /////////////////////////////////////////////////////////////////////////// // Returns a list of the categories and konstants supported for this type of sound -hsBool plGUISoundComponent::IGetCategoryList( char **&catList, int *&catKonstantList ) +bool plGUISoundComponent::IGetCategoryList( char **&catList, int *&catKonstantList ) { static char *cats[] = { "GUI", "" }; static int catEnums[] = { plSound::kGUISound }; @@ -2631,7 +2631,7 @@ hsBool plGUISoundComponent::IGetCategoryList( char **&catList, int *&catKonstan // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUISoundComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plGUISoundComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return plBaseSoundEmitterComponent::SetupProperties( pNode, pErrMsg ); } @@ -2641,12 +2641,12 @@ bool plGUISoundComponent::IValidate(plMaxNode *node, plErrorMsg *pErrMsg) return plBaseSoundEmitterComponent::IValidate( node, pErrMsg ); } -hsBool plGUISoundComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUISoundComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plBaseSoundEmitterComponent::PreConvert( node, pErrMsg, GUI_SOUND_COMPONENT_ID ); } -hsBool plGUISoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUISoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if (!fValidNodes[node]) return false; @@ -2738,10 +2738,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *errMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *errMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *errMsg); + bool Convert(plMaxNode *node, plErrorMsg *errMsg); const char *GetCustFileName( void ) const; void SetCustFile( const char *path ); @@ -2771,7 +2771,7 @@ class plEAXListenerDlgProc : public plSingleCompSelProc { protected: - hsBool IGetCustFileName( plEAXListenerComponent *listenerComp ) + bool IGetCustFileName( plEAXListenerComponent *listenerComp ) { TCHAR fileName[ MAX_PATH ], dirName[ MAX_PATH ]; @@ -2937,7 +2937,7 @@ plEAXListenerComponent::plEAXListenerComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plEAXListenerComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) +bool plEAXListenerComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) { if( !fCompPB->GetINode((ParamID)kRefSoftRegion) ) return true; @@ -3005,7 +3005,7 @@ hsBool plEAXListenerComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) return true; } -hsBool plEAXListenerComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) +bool plEAXListenerComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) { return true; @@ -3013,7 +3013,7 @@ hsBool plEAXListenerComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plEAXListenerComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) +bool plEAXListenerComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) { return true; @@ -3373,7 +3373,7 @@ void plRandomSoundComponent::RemoveSound(int index) fCompPB->SetValue(ParamID(kGroupTotals), 0, fCompPB->GetInt(ParamID(kGroupTotals), 0, group) - 1, group); } -hsBool plRandomSoundComponent::ICheckForSounds(plMaxNode* node) +bool plRandomSoundComponent::ICheckForSounds(plMaxNode* node) { if (!node->CanConvert()) return false; @@ -3390,7 +3390,7 @@ hsBool plRandomSoundComponent::ICheckForSounds(plMaxNode* node) return nSounds > 0; } -hsBool plRandomSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plRandomSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !ICheckForSounds(node) ) { @@ -3580,7 +3580,7 @@ hsBool plRandomSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plRandomSoundComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plRandomSoundComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { if (ICheckForSounds(pNode)) { @@ -3594,7 +3594,7 @@ hsBool plRandomSoundComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plRandomSoundComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plRandomSoundComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { fSoundMods.clear(); @@ -3655,9 +3655,9 @@ public: plPhysicsSndGroupComp(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum Refs { @@ -3682,7 +3682,7 @@ public: protected: - void IInitList( HWND hList, int currSel, hsBool allowAll ) + void IInitList( HWND hList, int currSel, bool allowAll ) { int i, toSet = -1; struct plSndGrp @@ -3929,7 +3929,7 @@ plPhysicsSndGroupComp::plPhysicsSndGroupComp() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plPhysicsSndGroupComp::Convert( plMaxNode *node, plErrorMsg *pErrMsg ) +bool plPhysicsSndGroupComp::Convert( plMaxNode *node, plErrorMsg *pErrMsg ) { plMaxNode *pNode; plKey RandSoundKey; @@ -4013,12 +4013,12 @@ hsBool plPhysicsSndGroupComp::Convert( plMaxNode *node, plErrorMsg *pErrMsg ) return true; } -hsBool plPhysicsSndGroupComp::PreConvert( plMaxNode *pNode, plErrorMsg *pErrMsg ) +bool plPhysicsSndGroupComp::PreConvert( plMaxNode *pNode, plErrorMsg *pErrMsg ) { return true; } -hsBool plPhysicsSndGroupComp::SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ) +bool plPhysicsSndGroupComp::SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ) { return true; } diff --git a/Sources/Tools/MaxComponent/plAudioComponents.h b/Sources/Tools/MaxComponent/plAudioComponents.h index beee84c4..43b7a3d7 100644 --- a/Sources/Tools/MaxComponent/plAudioComponents.h +++ b/Sources/Tools/MaxComponent/plAudioComponents.h @@ -93,14 +93,14 @@ class plBaseSoundEmitterComponent : public plComponent // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg, Class_ID classToConvert ); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) = 0; + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg, Class_ID classToConvert ); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) = 0; - hsBool DeInit( plMaxNode *node, plErrorMsg *pErrMsg ); + bool DeInit( plMaxNode *node, plErrorMsg *pErrMsg ); - virtual hsBool ConvertGrouped( plMaxNode *baseNode, hsTArray &groupArray, plErrorMsg *pErrMsg ) { return false; } + virtual bool ConvertGrouped( plMaxNode *baseNode, hsTArray &groupArray, plErrorMsg *pErrMsg ) { return false; } int GetSoundIdx(plMaxNode *node) { @@ -110,18 +110,18 @@ class plBaseSoundEmitterComponent : public plComponent } static plSoundBuffer *GetSourceBuffer( const char *fileName, plMaxNode *node, uint32_t srcBufferFlags ); - static hsBool LookupLatestAsset( const char *waveName, char *retPath, plErrorMsg *errMsg ); + static bool LookupLatestAsset( const char *waveName, char *retPath, plErrorMsg *errMsg ); virtual void UpdateSoundFileSelection( void ); // Loads the given combo box with category selections and sets the ParamID for the category parameter. // Returns false if there are no categories to choose for this component - virtual hsBool UpdateCategories( HWND dialogBox, int &categoryID, ParamID ¶mID ); + virtual bool UpdateCategories( HWND dialogBox, int &categoryID, ParamID ¶mID ); - virtual hsBool IsLocalOnly( void ) const { return true; } + virtual bool IsLocalOnly( void ) const { return true; } // Virtuals for handling animated volumes - virtual hsBool AddToAnim( plAGAnim *anim, plMaxNode *node ); + virtual bool AddToAnim( plAGAnim *anim, plMaxNode *node ); virtual bool AllowUnhide() { return fAllowUnhide; } // Flags this component to create a grouped sound instead of a normal sound @@ -135,14 +135,14 @@ class plBaseSoundEmitterComponent : public plComponent jvUniqueId fSoundAssetId; // used for the AssMan jvUniqueId fCoverSoundAssetID; #endif - hsBool fAssetsUpdated; + bool fAssetsUpdated; friend class plAudioBaseComponentProc; static uint32_t fWarningFlags; bool fAllowUnhide; - hsBool fCreateGrouped; + bool fCreateGrouped; enum Warnings { @@ -173,13 +173,13 @@ class plBaseSoundEmitterComponent : public plComponent plSoundBuffer *IProcessSourceBuffer( plMaxNode *maxNode, plErrorMsg *errMsg ); - virtual hsBool IAllowStereoFiles( void ) const { return true; } - virtual hsBool IAllowMonoFiles( void ) const { return true; } - virtual hsBool IHasWaveformProps( void ) const { return true; } + virtual bool IAllowStereoFiles( void ) const { return true; } + virtual bool IAllowMonoFiles( void ) const { return true; } + virtual bool IHasWaveformProps( void ) const { return true; } // Returns pointers to arrays defining the names and konstants for the supported categories // for this component. Name array should have an extra "" entry at the end. Returns false if none supported - virtual hsBool IGetCategoryList( char **&catList, int *&catKonstantList ) { return false; } + virtual bool IGetCategoryList( char **&catList, int *&catKonstantList ) { return false; } void ISetBaseParameters( plSound *destSound, plErrorMsg *pErrMsg ); }; @@ -189,7 +189,7 @@ class plRandomSoundMod; class plRandomSoundComponent : public plComponent { protected: - hsBool ICheckForSounds(plMaxNode* node); + bool ICheckForSounds(plMaxNode* node); public: std::map fSoundMods; @@ -199,10 +199,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); void RemoveSound(int index); void AddSelectedSound(); diff --git a/Sources/Tools/MaxComponent/plAutoComponent.cpp b/Sources/Tools/MaxComponent/plAutoComponent.cpp index 1768d139..a527092a 100644 --- a/Sources/Tools/MaxComponent/plAutoComponent.cpp +++ b/Sources/Tools/MaxComponent/plAutoComponent.cpp @@ -57,7 +57,7 @@ class plAutoComponent : public plComponent public: plAutoComponent(); - hsBool Convert(plMaxNode *node, plErrorMsg *msg); + bool Convert(plMaxNode *node, plErrorMsg *msg); }; AUTO_CLASS_DESC(plAutoComponent, gAutoDesc, "Auto", "Auto", "Test", Class_ID(0x21807fcf, 0x156e2218)) @@ -85,9 +85,9 @@ plAutoComponent::plAutoComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plAutoComponent::Convert(plMaxNode *node, plErrorMsg *msg) +bool plAutoComponent::Convert(plMaxNode *node, plErrorMsg *msg) { - hsBool c1 = gAutoUI->GetCheckBox(0, this); + bool c1 = gAutoUI->GetCheckBox(0, this); TSTR str = gAutoUI->GetEditBox(2, this); for (int i = 0; i < gAutoUI->Count(3, this); i++) diff --git a/Sources/Tools/MaxComponent/plAutoUIBase.cpp b/Sources/Tools/MaxComponent/plAutoUIBase.cpp index 56f707db..9c14e7e7 100644 --- a/Sources/Tools/MaxComponent/plAutoUIBase.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIBase.cpp @@ -125,7 +125,7 @@ char *plAutoUIBase::IMakeScriptName(const char *fullName) // Setup control // -void plAutoUIBase::AddCheckBox(int16_t id, const char *scriptName, const char *name, int vid, std::vector* vstates, hsBool def) +void plAutoUIBase::AddCheckBox(int16_t id, const char *scriptName, const char *name, int vid, std::vector* vstates, bool def) { char *scriptNameNew = scriptName ? hsStrcpy(scriptName) : IMakeScriptName(name); diff --git a/Sources/Tools/MaxComponent/plAutoUIBase.h b/Sources/Tools/MaxComponent/plAutoUIBase.h index 0d9e6d4c..a6f4831e 100644 --- a/Sources/Tools/MaxComponent/plAutoUIBase.h +++ b/Sources/Tools/MaxComponent/plAutoUIBase.h @@ -89,7 +89,7 @@ public: // can free the pointer after this function returns if it was allocated) // void AddCheckBox (int16_t id, const char *scriptName, const char *name, int vid, std::vector* vstates, - hsBool def=false); + bool def=false); void AddFloatSpinner(int16_t id, const char *scriptName, const char *name, int vid, std::vector* vstates, float def=0.f, float min=0.f, float max=1.f); void AddIntSpinner (int16_t id, const char *scriptName, const char *name, int vid, std::vector* vstates, diff --git a/Sources/Tools/MaxComponent/plAutoUIComp.cpp b/Sources/Tools/MaxComponent/plAutoUIComp.cpp index e61415f9..a58046bd 100644 --- a/Sources/Tools/MaxComponent/plAutoUIComp.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIComp.cpp @@ -60,7 +60,7 @@ plAutoUIComp::plAutoUIComp(plAutoUIClassDesc *cd) // Get value from control // -hsBool plAutoUIComp::GetCheckBox(int16_t id, plComponentBase *comp) +bool plAutoUIComp::GetCheckBox(int16_t id, plComponentBase *comp) { IParamBlock2 *pblock = comp->GetParamBlockByID(plComponentBase::kBlkComp); return pblock->GetInt(id); diff --git a/Sources/Tools/MaxComponent/plAutoUIComp.h b/Sources/Tools/MaxComponent/plAutoUIComp.h index 6672f330..c2553c4b 100644 --- a/Sources/Tools/MaxComponent/plAutoUIComp.h +++ b/Sources/Tools/MaxComponent/plAutoUIComp.h @@ -53,7 +53,7 @@ public: ///////////////////////////////////////////////////////////////////////////////////// // Get the value of a control. Pass in the id and your 'this' pointer. // - hsBool GetCheckBox(int16_t id, plComponentBase *comp); + bool GetCheckBox(int16_t id, plComponentBase *comp); float GetFloatSpinner(int16_t id, plComponentBase *comp); int GetIntSpinner(int16_t id, plComponentBase *comp); TSTR GetEditBox(int16_t id, plComponentBase *comp); diff --git a/Sources/Tools/MaxComponent/plAutoUIParams.cpp b/Sources/Tools/MaxComponent/plAutoUIParams.cpp index 963686ce..8ca427f2 100644 --- a/Sources/Tools/MaxComponent/plAutoUIParams.cpp +++ b/Sources/Tools/MaxComponent/plAutoUIParams.cpp @@ -193,7 +193,7 @@ bool plAutoUIParam::CheckVisibility(ParamID id, std::string state) } } -hsBool plAutoUIParam::GetBool(IParamBlock2 *pb) +bool plAutoUIParam::GetBool(IParamBlock2 *pb) { hsAssert(false, "Parameter is not a bool"); return false; @@ -256,7 +256,7 @@ bool plCheckBoxParam::IsMyMessage(UINT msg, WPARAM wParam, LPARAM lParam, IParam if ((HWND)lParam == fhCheck) { // Get the state - hsBool checked = (SendMessage(fhCheck, BM_GETCHECK, 0, 0) == BST_CHECKED); + bool checked = (SendMessage(fhCheck, BM_GETCHECK, 0, 0) == BST_CHECKED); // Set the state in the paramblock pb->SetValue(fID, 0, checked); return true; @@ -270,7 +270,7 @@ int plCheckBoxParam::GetParamType() { return kTypeBool; } -hsBool plCheckBoxParam::GetBool(IParamBlock2 *pb) +bool plCheckBoxParam::GetBool(IParamBlock2 *pb) { return pb->GetInt(fID); } diff --git a/Sources/Tools/MaxComponent/plAutoUIParams.h b/Sources/Tools/MaxComponent/plAutoUIParams.h index 8b0c3731..4c4c996c 100644 --- a/Sources/Tools/MaxComponent/plAutoUIParams.h +++ b/Sources/Tools/MaxComponent/plAutoUIParams.h @@ -108,7 +108,7 @@ public: bool CheckVisibility(ParamID id, std::string state); virtual int GetParamType(); - virtual hsBool GetBool(IParamBlock2 *pb); + virtual bool GetBool(IParamBlock2 *pb); virtual float GetFloat(IParamBlock2 *pb); virtual int GetInt(IParamBlock2 *pb); virtual const char* GetString(IParamBlock2 *pb); @@ -136,7 +136,7 @@ public: bool IsMyMessage(UINT msg, WPARAM wParam, LPARAM lParam, IParamBlock2 *pb); int GetParamType(); - hsBool GetBool(IParamBlock2 *pb); + bool GetBool(IParamBlock2 *pb); }; class plSpinnerParam : public plAutoUIParam diff --git a/Sources/Tools/MaxComponent/plAvatarComponent.cpp b/Sources/Tools/MaxComponent/plAvatarComponent.cpp index f1bfe28f..6ee021c5 100644 --- a/Sources/Tools/MaxComponent/plAvatarComponent.cpp +++ b/Sources/Tools/MaxComponent/plAvatarComponent.cpp @@ -145,7 +145,7 @@ void plArmatureComponent::ISetupAvatarRenderPropsRecurse(plMaxNode *node) //SETUPPROPERTIES // Tests if IPB2 pointers are healthy and sets up the MaxNode Data -hsBool plArmatureComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plArmatureComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { // Global issues node->SetMovable(true); @@ -213,7 +213,7 @@ void plArmatureComponent::ISetArmatureSORecurse(plMaxNode *node, plSceneObject * } -hsBool plArmatureComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plArmatureComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { // add audio interface and record/playback component pl2WayWinAudible* pAudible = new pl2WayWinAudible; @@ -239,7 +239,7 @@ hsBool plArmatureComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) // this is a little gross...the armature component shouldn't know that the subclasses // actually exist....it's a hard-to-detect implementation detail that breaks new subclasses.... -hsBool plArmatureComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) +bool plArmatureComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) { // plHKPhysical *physical = plHKPhysical::ConvertToPhysical(node->GetSceneObject()); // physical->SetProperty(plSimulationInterface::kUpright, true); @@ -285,7 +285,7 @@ hsBool plArmatureComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) } -hsBool plArmatureComponent::IVerifyUsedNode(INode* thisNode, plErrorMsg* pErrMsg, hsBool IsHull) +bool plArmatureComponent::IVerifyUsedNode(INode* thisNode, plErrorMsg* pErrMsg, bool IsHull) { if(thisNode != NULL) { @@ -332,9 +332,9 @@ void plArmatureComponent::IAttachShadowCastModifiersRecur(plMaxNode* node, plSha // float fMaxVel; // float fAccel; // float fTurnForce; -// hsBool fUseNewMovement; +// bool fUseNewMovement; // -// AvatarStats(float a, float b, float c, float d, hsBool newMove) +// AvatarStats(float a, float b, float c, float d, bool newMove) // : fFriction(a), fMaxVel(b), fAccel(c), fTurnForce(d), fUseNewMovement(newMove) {}; // AvatarStats() : fFriction(-1.0), fMaxVel(-1.0), fAccel(-1.0), fTurnForce(-1.0) {}; //}; @@ -566,7 +566,7 @@ void plAvatarComponent::ISetupClothes(plMaxNode *node, plArmatureMod *mod, plErr AddClothingToMod(node, mod, fCompPB->GetInt(kClothingGroup), nil, pErrMsg); } -hsBool plAvatarComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plAvatarComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetItinerant(true); @@ -660,8 +660,8 @@ class plCompoundCtrlComponent : public plComponent { public: plCompoundCtrlComponent(); - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode* node,plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode* node,plErrorMsg *pErrMsg); }; CLASS_DESC(plCompoundCtrlComponent, gCompoundCtrlCompDesc, "Compound Controller", "CompoundCtrl", COMP_TYPE_AVATAR, Class_ID(0x3f2a790f, 0x30354673)) @@ -672,7 +672,7 @@ plCompoundCtrlComponent::plCompoundCtrlComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plCompoundCtrlComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCompoundCtrlComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetMovable(true); node->SetForceLocal(true); @@ -680,7 +680,7 @@ hsBool plCompoundCtrlComponent::SetupProperties(plMaxNode *node, plErrorMsg *pEr return true; } -hsBool plCompoundCtrlComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) +bool plCompoundCtrlComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) { plString name = node->GetKey()->GetName(); @@ -1081,7 +1081,7 @@ void plLODAvatarComponent::IAttachModifiers( plMaxNode *node, plErrorMsg *pEr IAttachShadowCastToLODs(node); } -hsBool plLODAvatarComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plLODAvatarComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetItinerant(true); @@ -1112,9 +1112,9 @@ hsBool plLODAvatarComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMs return plArmatureComponent::SetupProperties(node, pErrMsg); } -hsBool plLODAvatarComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plLODAvatarComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { - hsBool result = plArmatureComponent::PreConvert(node, pErrMsg); + bool result = plArmatureComponent::PreConvert(node, pErrMsg); hsTArray mats; Mtl *mtl = fCompPB->GetMtl(kMaterial); @@ -1126,7 +1126,7 @@ hsBool plLODAvatarComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) return result; } -hsBool plLODAvatarComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plLODAvatarComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { plArmatureComponent::Convert(node, pErrMsg); diff --git a/Sources/Tools/MaxComponent/plAvatarComponent.h b/Sources/Tools/MaxComponent/plAvatarComponent.h index 5ec1e4d8..fba01d16 100644 --- a/Sources/Tools/MaxComponent/plAvatarComponent.h +++ b/Sources/Tools/MaxComponent/plAvatarComponent.h @@ -77,7 +77,7 @@ protected: plArmatureComponent() : fArmMod(nil) {} plArmatureMod* IGenerateMyArmMod(plHKPhysical* myHKPhys, plMaxNode* node); - hsBool IVerifyUsedNode(INode* thisNode, plErrorMsg *pErrMsg, hsBool isHull); + bool IVerifyUsedNode(INode* thisNode, plErrorMsg *pErrMsg, bool isHull); virtual void IAttachModifiers(plMaxNode *node, plErrorMsg *pErrMsg) = 0; virtual void ISetupClothes(plMaxNode *node, plArmatureMod *mod, plErrorMsg *pErrMsg) {} @@ -104,9 +104,9 @@ public: }; //static const char *BrainStrings[]; - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); void DeleteThis() { delete this; } }; @@ -152,9 +152,9 @@ public: }; virtual void ISetupClothes(plMaxNode *node, plArmatureMod *mod, plErrorMsg *pErrMsg); - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return (plArmatureComponent::PreConvert(node, pErrMsg)); } - hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return (plArmatureComponent::Convert(node, pErrMsg)); } + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return (plArmatureComponent::PreConvert(node, pErrMsg)); } + bool Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return (plArmatureComponent::Convert(node, pErrMsg)); } void DeleteThis() { delete this; } @@ -220,9 +220,9 @@ public: }; plLODAvatarComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); void DeleteThis() { delete this; } void RemoveBone(int index); diff --git a/Sources/Tools/MaxComponent/plBehavioralComponents.cpp b/Sources/Tools/MaxComponent/plBehavioralComponents.cpp index 5c174b21..4be090b9 100644 --- a/Sources/Tools/MaxComponent/plBehavioralComponents.cpp +++ b/Sources/Tools/MaxComponent/plBehavioralComponents.cpp @@ -134,7 +134,7 @@ plAvBehaviorSittingComponent::plAvBehaviorSittingComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plAvBehaviorSittingComponent::SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg) +bool plAvBehaviorSittingComponent::SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg) { plActivatorBaseComponent::SetupProperties(node, pErrMsg); @@ -144,7 +144,7 @@ hsBool plAvBehaviorSittingComponent::SetupProperties(plMaxNode* node, plErrorMsg return true; } -hsBool plAvBehaviorSittingComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plAvBehaviorSittingComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { plMaxNode *detectNode = (plMaxNode*)fCompPB->GetINode(kDetector); plComponentBase *detectComp = detectNode ? detectNode->ConvertToComponent() : nil; @@ -166,7 +166,7 @@ hsBool plAvBehaviorSittingComponent::PreConvert(plMaxNode* node, plErrorMsg* pEr return true; } -hsBool plAvBehaviorSittingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAvBehaviorSittingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plKey logicKey = fLogicModKeys[node]; if (logicKey) diff --git a/Sources/Tools/MaxComponent/plBehavioralComponents.h b/Sources/Tools/MaxComponent/plBehavioralComponents.h index c02cfa32..e91c0d76 100644 --- a/Sources/Tools/MaxComponent/plBehavioralComponents.h +++ b/Sources/Tools/MaxComponent/plBehavioralComponents.h @@ -63,9 +63,9 @@ public: }; plAvBehaviorSittingComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode* node, plErrorMsg* plErrorMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode* node, plErrorMsg* plErrorMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; #define BEHAVIORAL_SITTING_CID Class_ID(0x617e22cc, 0x31ef310d) diff --git a/Sources/Tools/MaxComponent/plBipedKiller.cpp b/Sources/Tools/MaxComponent/plBipedKiller.cpp index 375603a3..a746e286 100644 --- a/Sources/Tools/MaxComponent/plBipedKiller.cpp +++ b/Sources/Tools/MaxComponent/plBipedKiller.cpp @@ -489,8 +489,8 @@ void FreeMotionSamples(plSampleVec *samples) int LimitTransform(INode* node, Matrix3* nodeTM) { /* NOT sure if we want to support this functionality: probably eventually. - hsBool32 noRotX=false,noRotY=false,noRotZ=false; - hsBool32 noRot=gUserPropMgr.UserPropExists(node,"BEHNoRot") || MatWrite::HasToken(node->GetName(), "norot"); + bool32 noRotX=false,noRotY=false,noRotZ=false; + bool32 noRot=gUserPropMgr.UserPropExists(node,"BEHNoRot") || MatWrite::HasToken(node->GetName(), "norot"); if (!noRot) { noRotX=gUserPropMgr.UserPropExists(node,"BEHNoRotX") || MatWrite::HasToken(node->GetName(), "norotx"); @@ -498,8 +498,8 @@ int LimitTransform(INode* node, Matrix3* nodeTM) noRotZ=gUserPropMgr.UserPropExists(node,"BEHNoRotZ") || MatWrite::HasToken(node->GetName(), "norotz"); } - hsBool32 noTransX=false,noTransY=false,noTransZ=false; - hsBool32 noTrans=gUserPropMgr.UserPropExists(node,"BEHNoTrans") || MatWrite::HasToken(node->GetName(), "notrans"); + bool32 noTransX=false,noTransY=false,noTransZ=false; + bool32 noTrans=gUserPropMgr.UserPropExists(node,"BEHNoTrans") || MatWrite::HasToken(node->GetName(), "notrans"); if (!noTrans) { noTransX=gUserPropMgr.UserPropExists(node,"BEHNoTransX") || MatWrite::HasToken(node->GetName(), "notransx"); diff --git a/Sources/Tools/MaxComponent/plBlowComponent.cpp b/Sources/Tools/MaxComponent/plBlowComponent.cpp index fe5c7b86..a56d5827 100644 --- a/Sources/Tools/MaxComponent/plBlowComponent.cpp +++ b/Sources/Tools/MaxComponent/plBlowComponent.cpp @@ -113,7 +113,7 @@ plBlowComponent::plBlowComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plBlowComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plBlowComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetDrawable(false); node->SetForceLocal(true); @@ -121,12 +121,12 @@ hsBool plBlowComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plBlowComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plBlowComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plBlowComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plBlowComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plBlower* pMod = new plBlower; diff --git a/Sources/Tools/MaxComponent/plBlowComponent.h b/Sources/Tools/MaxComponent/plBlowComponent.h index aa9f45e8..c10a3d61 100644 --- a/Sources/Tools/MaxComponent/plBlowComponent.h +++ b/Sources/Tools/MaxComponent/plBlowComponent.h @@ -60,9 +60,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; diff --git a/Sources/Tools/MaxComponent/plCAnimParamBlock.h b/Sources/Tools/MaxComponent/plCAnimParamBlock.h index 7d5a7447..5ca2f833 100644 --- a/Sources/Tools/MaxComponent/plCAnimParamBlock.h +++ b/Sources/Tools/MaxComponent/plCAnimParamBlock.h @@ -61,6 +61,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plCAnimParamBlock_h #define _plCAnimParamBlock_h +#include "HeadSpin.h" #include "Max.h" #include "iparamb2.h" #include "iparamm2.h" diff --git a/Sources/Tools/MaxComponent/plCameraComponent.cpp b/Sources/Tools/MaxComponent/plCameraComponent.cpp index 648af983..4480ba18 100644 --- a/Sources/Tools/MaxComponent/plCameraComponent.cpp +++ b/Sources/Tools/MaxComponent/plCameraComponent.cpp @@ -159,17 +159,17 @@ plCameraCmdComponent::plCameraCmdComponent() // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plCameraCmdComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraCmdComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plCameraCmdComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraCmdComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plCameraCmdComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraCmdComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } diff --git a/Sources/Tools/MaxComponent/plCameraComponent.h b/Sources/Tools/MaxComponent/plCameraComponent.h index 360b0b5e..6f46e030 100644 --- a/Sources/Tools/MaxComponent/plCameraComponent.h +++ b/Sources/Tools/MaxComponent/plCameraComponent.h @@ -55,10 +55,10 @@ public: // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; diff --git a/Sources/Tools/MaxComponent/plCameraComponents.cpp b/Sources/Tools/MaxComponent/plCameraComponents.cpp index 3cfe1ff1..9e373567 100644 --- a/Sources/Tools/MaxComponent/plCameraComponents.cpp +++ b/Sources/Tools/MaxComponent/plCameraComponents.cpp @@ -122,9 +122,9 @@ struct PreTrans } plSceneObject* fTransTo; - hsBool fCutPos; - hsBool fCutPOA; - hsBool fIgnore; + bool fCutPos; + bool fCutPOA; + bool fIgnore; float fAccel; float fDecel; float fVelocity; @@ -202,18 +202,18 @@ plLimitPanComponent::plLimitPanComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plLimitPanComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrMsg) +bool plLimitPanComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrMsg) { return true; } -hsBool plLimitPanComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plLimitPanComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } -hsBool plLimitPanComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plLimitPanComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -283,18 +283,18 @@ plCameraZoomComponent::plCameraZoomComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plCameraZoomComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrMsg) +bool plCameraZoomComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrMsg) { return true; } -hsBool plCameraZoomComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plCameraZoomComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } -hsBool plCameraZoomComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraZoomComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -426,14 +426,14 @@ plTransOverrideComponent::plTransOverrideComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plTransOverrideComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrMsg) +bool plTransOverrideComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrMsg) { fTransKeys.clear(); return true; } -hsBool plTransOverrideComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plTransOverrideComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { // see if there is a camera specified INode* pCamNode = fCompPB->GetINode(kTransitionTo); @@ -477,12 +477,12 @@ hsBool plTransOverrideComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMs return true; } -hsBool plTransOverrideComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plTransOverrideComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plTransOverrideComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) +bool plTransOverrideComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { TransitionKeys::iterator i = fTransKeys.begin(); @@ -638,7 +638,7 @@ plPOAObjectComponent::plPOAObjectComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plPOAObjectComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrMsg) +bool plPOAObjectComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrMsg) { if (fCompPB->GetINode(kPOAObject)) { @@ -652,7 +652,7 @@ hsBool plPOAObjectComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrM return false; } -hsBool plPOAObjectComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPOAObjectComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } @@ -725,7 +725,7 @@ plMakeDefaultCamComponent::plMakeDefaultCamComponent() // -hsBool plCameraBaseComponent::IsValidNodeType(plMaxNode *pNode) +bool plCameraBaseComponent::IsValidNodeType(plMaxNode *pNode) { Object *obj = pNode->EvalWorldState(hsConverterUtils::Instance().GetTime(pNode->GetInterface())).obj; TimeValue Now = hsConverterUtils::Instance().GetTime(pNode->GetInterface()); @@ -735,10 +735,10 @@ hsBool plCameraBaseComponent::IsValidNodeType(plMaxNode *pNode) return false; } -hsBool plCameraBaseComponent::SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plCameraBaseComponent::SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg) { fModKeys.clear(); - hsBool ValidNode = IsValidNodeType(pNode); + bool ValidNode = IsValidNodeType(pNode); if(!ValidNode){ if(pErrMsg->Set(true, "Invalid Camera Object", "The camera %s is not a 'Max Target Camera type'. This camera will be disabled..\nKill the export?",((INode*)pNode)->GetName()).Ask()) pErrMsg->Set(true, "", ""); @@ -758,12 +758,12 @@ hsBool plCameraBaseComponent::SetupProperties(plMaxNode* pNode, plErrorMsg* pErr return true; } -hsBool plCameraBaseComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plCameraBaseComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) { return true; } -hsBool plCameraBaseComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraBaseComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { // check for overriden transitions and special animation commands int count = node->NumAttachedComponents(); @@ -968,13 +968,13 @@ plCameraModifier1* plCameraBaseComponent::ICreateFocalPointObject(plMaxNode* pNo } -hsBool plCameraBaseComponent::ISetPOA(plMaxNode* pNode, plCameraBrain1* pBrain, plErrorMsg* pErrMsg) +bool plCameraBaseComponent::ISetPOA(plMaxNode* pNode, plCameraBrain1* pBrain, plErrorMsg* pErrMsg) { // do we want a special POA for this brain - hsBool bResult = false; - hsBool bAvPOA = false; + bool bResult = false; + bool bAvPOA = false; plComponentBase* POAComp = 0; - hsBool bPOAObject = false; + bool bPOAObject = false; plComponentBase* objPOAComp = 0; for (uint32_t x = 0; x < pNode->NumAttachedComponents(); x++) @@ -1097,7 +1097,7 @@ plCamera1Component::plCamera1Component() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plCamera1Component::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plCamera1Component::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { plCameraModifier1* pMod = ICreateCameraModifier(pNode, pErrMsg); if (!pMod) @@ -1340,7 +1340,7 @@ plAutoCamComponent::plAutoCamComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plAutoCamComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plAutoCamComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { plCameraModifier1* pMod = ICreateCameraModifier(pNode, pErrMsg); @@ -1502,7 +1502,7 @@ plFPCamComponent::plFPCamComponent() } -hsBool plFPCamComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plFPCamComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { plCameraModifier1* pMod = ICreateCameraModifier(pNode, pErrMsg); @@ -1645,7 +1645,7 @@ plRailCameraComponent::plRailCameraComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plRailCameraComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plRailCameraComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg) { plRailCameraMod* lineMod = new plRailCameraMod; @@ -1719,7 +1719,7 @@ hsBool plRailCameraComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg return true; } -hsBool plRailCameraComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plRailCameraComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { if (!plCameraBaseComponent::SetupProperties(pNode, pErrMsg)) return false; @@ -1749,7 +1749,7 @@ hsBool plRailCameraComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pEr return true; } -hsBool plRailCameraComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plRailCameraComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) { plCameraModifier1* pMod = ICreateCameraModifier(pNode, pErrMsg); if (!pMod) @@ -1903,7 +1903,7 @@ plCircleCameraComponent::plCircleCameraComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plCircleCameraComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plCircleCameraComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) { plCameraModifier1* pMod = ICreateCameraModifier(pNode, pErrMsg); if (!pMod) @@ -2002,9 +2002,9 @@ public: plCameraDetectorComponent(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -2044,7 +2044,7 @@ plCameraDetectorComponent::plCameraDetectorComponent() } -hsBool plCameraDetectorComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plCameraDetectorComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetForceLocal(true); pNode->SetDrawable(false); @@ -2066,13 +2066,13 @@ hsBool plCameraDetectorComponent::SetupProperties(plMaxNode *pNode, plErrorMsg * } -hsBool plCameraDetectorComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraDetectorComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plCameraDetectorComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraDetectorComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plSceneObject *obj = node->GetSceneObject(); plLocation loc = node->GetLocation(); @@ -2294,7 +2294,7 @@ plFollowCamComponent::plFollowCamComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plFollowCamComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plFollowCamComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { plCameraModifier1* pMod = ICreateCameraModifier(pNode, pErrMsg); @@ -2413,13 +2413,13 @@ plCameraAnimCmdComponent::plCameraAnimCmdComponent() fIgnoreFOV = false; } -hsBool plCameraAnimCmdComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plCameraAnimCmdComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) { fIgnoreFOV = fCompPB->GetInt(kIgnoreFOV); return true; } -hsBool plCameraAnimCmdComponent::Convert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plCameraAnimCmdComponent::Convert(plMaxNode* pNode, plErrorMsg* pErrMsg) { plSceneObject* pObj = pNode->GetSceneObject(); const plCameraModifier1* pCamMod = nil; @@ -2451,10 +2451,10 @@ public: // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; OBSOLETE_CLASS_DESC(plCameraCmdComponent, gCameraCmdDesc, "(ex)Camera Command Region", "CameraCmdRegion", COMP_TYPE_MISC, CAMERACMD_CID) @@ -2554,17 +2554,17 @@ plCameraCmdComponent::plCameraCmdComponent() // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plCameraCmdComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraCmdComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plCameraCmdComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraCmdComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plCameraCmdComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraCmdComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } diff --git a/Sources/Tools/MaxComponent/plCameraComponents.h b/Sources/Tools/MaxComponent/plCameraComponents.h index f620ea0f..d30db373 100644 --- a/Sources/Tools/MaxComponent/plCameraComponents.h +++ b/Sources/Tools/MaxComponent/plCameraComponents.h @@ -73,9 +73,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; class plCameraZoomComponent : public plComponent @@ -85,9 +85,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; class plTransOverrideComponent : public plComponent @@ -97,10 +97,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); typedef std::map TransitionKeys; TransitionKeys fTransKeys; @@ -116,9 +116,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; @@ -129,9 +129,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } plKey GetObjectKey(); }; @@ -143,9 +143,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; class plCameraBaseComponent : public plComponent @@ -153,17 +153,17 @@ class plCameraBaseComponent : public plComponent public: plCameraBaseComponent(){;} - virtual hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); plCameraModifier1* ICreateCameraModifier(plMaxNode* pNode, plErrorMsg* pErrMsg); plCameraModifier1* ICreateFocalPointObject(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool IsValidNodeType(plMaxNode *pNode); + bool IsValidNodeType(plMaxNode *pNode); void ISetLimitPan(plMaxNode* pNode, plCameraBrain1* pBrain); void ISetLimitZoom(plMaxNode* pNode, plCameraBrain1* pBrain); void ISetIgnoreSubworld(plMaxNode* pNode, plCameraBrain1* pBrain); - hsBool ISetPOA(plMaxNode* pNode, plCameraBrain1* pBrain, plErrorMsg* pErrMsg); + bool ISetPOA(plMaxNode* pNode, plCameraBrain1* pBrain, plErrorMsg* pErrMsg); typedef std::map ModKeys; ModKeys fModKeys; @@ -174,7 +174,7 @@ class plCamera1Component : public plCameraBaseComponent { public: plCamera1Component(); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); }; class plCameraIgnoreSub : public plComponent @@ -183,9 +183,9 @@ public: plCameraIgnoreSub(); // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; @@ -193,43 +193,43 @@ class plAutoCamComponent : public plCameraBaseComponent { public: plAutoCamComponent(); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); }; class plFPCamComponent : public plCameraBaseComponent { public: plFPCamComponent(); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); }; class plRailCameraComponent : public plCameraBaseComponent { private: - hsBool fValid; + bool fValid; plRailCameraMod* fLineMod; - hsBool IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg); public: plRailCameraComponent(); - virtual hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); + virtual bool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); }; class plCircleCameraComponent : public plCameraBaseComponent { private: - hsBool fValid; + bool fValid; public: plCircleCameraComponent(); - virtual hsBool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); }; @@ -237,18 +237,18 @@ class plFollowCamComponent : public plCameraBaseComponent { public: plFollowCamComponent(); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); }; class plCameraAnimCmdComponent : public plComponent { - hsBool fIgnoreFOV; + bool fIgnoreFOV; public: plCameraAnimCmdComponent(); - virtual hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg){ return true; } - virtual hsBool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool IgnoreFOV() { return fIgnoreFOV; } + virtual bool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg){ return true; } + virtual bool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool IgnoreFOV() { return fIgnoreFOV; } }; #endif \ No newline at end of file diff --git a/Sources/Tools/MaxComponent/plClickDragComponent.cpp b/Sources/Tools/MaxComponent/plClickDragComponent.cpp index bda40ed3..aa82551b 100644 --- a/Sources/Tools/MaxComponent/plClickDragComponent.cpp +++ b/Sources/Tools/MaxComponent/plClickDragComponent.cpp @@ -283,7 +283,7 @@ void plClickDragComponent::CollectNonDrawables(INodeTab& nonDrawables) // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plClickDragComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClickDragComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { plActivatorBaseComponent::SetupProperties(node, pErrMsg); @@ -351,7 +351,7 @@ hsBool plClickDragComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMs return true; } -hsBool plClickDragComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClickDragComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { plActivatorBaseComponent::PreConvert(node, pErrMsg); plLogicModifier *logic = plLogicModifier::ConvertNoRef(fLogicModKeys[node]->GetObjectPtr()); @@ -373,7 +373,7 @@ hsBool plClickDragComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plLocation loc = node->GetLocation(); plSceneObject *obj = node->GetSceneObject(); @@ -406,7 +406,7 @@ hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) pAxis->SetNotificationKey(logicKey); uint32_t count = node->NumAttachedComponents(); - hsBool bHasAnim = false; + bool bHasAnim = false; plAnimComponentBase* pAnim = nil; for (i = 0; i < count; i++) @@ -485,7 +485,7 @@ hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // verify that there is a physical proxy attached to this scene object: uint32_t count = ((plMaxNodeBase*)pProxyNode)->NumAttachedComponents(); - hsBool bHasPhys = false; + bool bHasPhys = false; // for (uint32_t i = 0; i < count; i++) // { // plComponentBase *comp = ((plMaxNodeBase*)pProxyNode)->GetAttachedComponent(i); @@ -532,7 +532,7 @@ hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { // verify that there is a physical detector attached to this scene object: uint32_t count = ((plMaxNodeBase*)pProxyRegNode)->NumAttachedComponents(); - hsBool bHasPhys = false; + bool bHasPhys = false; // for (uint32_t i = 0; i < count; i++) // { // plComponentBase *comp = ((plMaxNodeBase*)pProxyRegNode)->GetAttachedComponent(i); @@ -611,7 +611,7 @@ hsBool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plClickDragComponent::DeInit( plMaxNode *node, plErrorMsg *pErrMsg ) +bool plClickDragComponent::DeInit( plMaxNode *node, plErrorMsg *pErrMsg ) { fAxisKeys.clear(); return plActivatorBaseComponent::DeInit( node, pErrMsg ); diff --git a/Sources/Tools/MaxComponent/plClickDragComponent.h b/Sources/Tools/MaxComponent/plClickDragComponent.h index 69f3ccd1..535f8728 100644 --- a/Sources/Tools/MaxComponent/plClickDragComponent.h +++ b/Sources/Tools/MaxComponent/plClickDragComponent.h @@ -56,11 +56,11 @@ public: // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool DeInit(plMaxNode *node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool DeInit(plMaxNode *node, plErrorMsg* pErrMsg); virtual plKey GetAxisKey(plMaxNode* node); const LogicKeys& GetAxisKeys(); diff --git a/Sources/Tools/MaxComponent/plClickableComponent.cpp b/Sources/Tools/MaxComponent/plClickableComponent.cpp index fe56a953..ffe179a0 100644 --- a/Sources/Tools/MaxComponent/plClickableComponent.cpp +++ b/Sources/Tools/MaxComponent/plClickableComponent.cpp @@ -181,7 +181,7 @@ void plClickableComponent::CollectNonDrawables(INodeTab& nonDrawables) } -hsBool plClickableComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plClickableComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { plActivatorBaseComponent::SetupProperties(node, pErrMsg); @@ -245,7 +245,7 @@ hsBool plClickableComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMs return true; } -hsBool plClickableComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClickableComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { plMaxNode *clickNode = node; @@ -275,7 +275,7 @@ hsBool plClickableComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) } -hsBool plClickableComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClickableComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { bool ignoreProxyRegion = (fCompPB->GetInt(kClickableIgnoreProxyRegion) != 0); @@ -396,9 +396,9 @@ public: plNoBlkClickableComponent(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -418,7 +418,7 @@ plNoBlkClickableComponent::plNoBlkClickableComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plNoBlkClickableComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plNoBlkClickableComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } diff --git a/Sources/Tools/MaxComponent/plClickableComponent.h b/Sources/Tools/MaxComponent/plClickableComponent.h index 22264723..254e5cf0 100644 --- a/Sources/Tools/MaxComponent/plClickableComponent.h +++ b/Sources/Tools/MaxComponent/plClickableComponent.h @@ -51,9 +51,9 @@ class plClickableComponent : public plActivatorBaseComponent public: plClickableComponent(); - hsBool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables); diff --git a/Sources/Tools/MaxComponent/plClimbComponent.cpp b/Sources/Tools/MaxComponent/plClimbComponent.cpp index d3c63a68..444ba4c8 100644 --- a/Sources/Tools/MaxComponent/plClimbComponent.cpp +++ b/Sources/Tools/MaxComponent/plClimbComponent.cpp @@ -166,12 +166,12 @@ plClimbTriggerComponent::plClimbTriggerComponent() extern const plArmatureMod * FindArmatureMod(const plSceneObject *obj); // CONVERT -hsBool plClimbTriggerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClimbTriggerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plClimbMsg::Command enterCommand; // when entering the region plClimbMsg::Command exitCommand; // run this command when exiting the region - hsBool enterStatus = false; - hsBool exitStatus = false; + bool enterStatus = false; + bool exitStatus = false; plClimbMsg::Direction direction; // direction is assumed the same for both enter and exit commands // i.e. enable up, disable up @@ -260,7 +260,7 @@ hsBool plClimbTriggerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plClimbTriggerComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClimbTriggerComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetForceLocal(true); node->SetDrawable(false); @@ -372,8 +372,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary below. @@ -396,7 +396,7 @@ plClimbBlockerComponent::plClimbBlockerComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plClimbBlockerComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) +bool plClimbBlockerComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) { node->SetDrawable(false); @@ -412,7 +412,7 @@ hsBool plClimbBlockerComponent::SetupProperties(plMaxNode *node, plErrorMsg *er return true; } -hsBool plClimbBlockerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClimbBlockerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } diff --git a/Sources/Tools/MaxComponent/plClimbComponent.h b/Sources/Tools/MaxComponent/plClimbComponent.h index afe9041a..9109e058 100644 --- a/Sources/Tools/MaxComponent/plClimbComponent.h +++ b/Sources/Tools/MaxComponent/plClimbComponent.h @@ -50,9 +50,9 @@ public: plClimbTriggerComponent(); virtual void DeleteThis() { delete this; } - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum // ParamBlock indices { diff --git a/Sources/Tools/MaxComponent/plClothingComponent.cpp b/Sources/Tools/MaxComponent/plClothingComponent.cpp index 0abb2053..c04ed8d1 100644 --- a/Sources/Tools/MaxComponent/plClothingComponent.cpp +++ b/Sources/Tools/MaxComponent/plClothingComponent.cpp @@ -152,7 +152,7 @@ plClothingComponent::plClothingComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plClothingComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plClothingComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { int i; for (i = 0; i < fCompPB->Count(kMeshNodeTab); i++) @@ -176,14 +176,14 @@ hsBool plClothingComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg return true; } -hsBool plClothingComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClothingComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetupBoneHierarchyPalette(); return true; } -hsBool plClothingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClothingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { int i, j; hsTArray spanArray; diff --git a/Sources/Tools/MaxComponent/plClothingComponent.h b/Sources/Tools/MaxComponent/plClothingComponent.h index d916d672..e656ec98 100644 --- a/Sources/Tools/MaxComponent/plClothingComponent.h +++ b/Sources/Tools/MaxComponent/plClothingComponent.h @@ -50,9 +50,9 @@ public: plClothingComponent(); virtual void DeleteThis() { delete this; } - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum // ParamBlock indices { diff --git a/Sources/Tools/MaxComponent/plClusterComponent.cpp b/Sources/Tools/MaxComponent/plClusterComponent.cpp index 5981210a..dd6d1022 100644 --- a/Sources/Tools/MaxComponent/plClusterComponent.cpp +++ b/Sources/Tools/MaxComponent/plClusterComponent.cpp @@ -183,7 +183,7 @@ ParamBlockDesc2 gClusterBk ); -hsBool plClusterComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClusterComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fSetupDone = false; fExported = false; @@ -221,7 +221,7 @@ static int CompTemplNodes(const void *elem1, const void *elem2) return 1; } -hsBool plClusterComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClusterComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !fSetupDone ) { @@ -329,7 +329,7 @@ hsBool plClusterComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plClusterComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plClusterComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !fExported && (fCompPB->GetInt(kAutoInstance)) ) { diff --git a/Sources/Tools/MaxComponent/plClusterComponent.h b/Sources/Tools/MaxComponent/plClusterComponent.h index 144605cf..962428fb 100644 --- a/Sources/Tools/MaxComponent/plClusterComponent.h +++ b/Sources/Tools/MaxComponent/plClusterComponent.h @@ -135,9 +135,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); int GetNumGroups() { if (fSetupDone) return fClusterGroups.size(); return 0; } plClusterGroup *GetGroup(int index) { if (fSetupDone) return fClusterGroups[index]; return nil; } diff --git a/Sources/Tools/MaxComponent/plComponent.h b/Sources/Tools/MaxComponent/plComponent.h index f3fc02cd..d6c8fd8f 100644 --- a/Sources/Tools/MaxComponent/plComponent.h +++ b/Sources/Tools/MaxComponent/plComponent.h @@ -66,7 +66,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ** ** Next create a derived class from the plComponent class with three public functions, ** being its constunctor, its custom destructor and the converter. Currently, we have the -** converter returning an hsBool to let you know how successful the conversion process has been +** converter returning an bool to let you know how successful the conversion process has been ** during export to the .prd format. ** ** After the class above has been declared, the param block stuff follows: @@ -250,13 +250,13 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) = 0; + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) = 0; // DeInit pass--free up any temp memory you might have allocated here - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; #endif diff --git a/Sources/Tools/MaxComponent/plComponentBase.cpp b/Sources/Tools/MaxComponent/plComponentBase.cpp index b5662291..0202b285 100644 --- a/Sources/Tools/MaxComponent/plComponentBase.cpp +++ b/Sources/Tools/MaxComponent/plComponentBase.cpp @@ -325,7 +325,7 @@ plMaxNodeBase *plComponentBase::GetINode() return nil; } -hsBool plComponentBase::IsExternal() +bool plComponentBase::IsExternal() { return CanConvertToType(EXT_COMPONENT_CLASSID); } diff --git a/Sources/Tools/MaxComponent/plComponentBase.h b/Sources/Tools/MaxComponent/plComponentBase.h index 817a51a9..45af7da1 100644 --- a/Sources/Tools/MaxComponent/plComponentBase.h +++ b/Sources/Tools/MaxComponent/plComponentBase.h @@ -42,6 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_COMPONENT_BASE_H #define PL_COMPONENT_BASE_H +#include "HeadSpin.h" #include "Max.h" #include "iparamb2.h" #include "iparamm2.h" @@ -125,7 +126,7 @@ public: // should not be overriden. virtual int GetMinCap() { return 0; } - hsBool IsExternal(); + bool IsExternal(); // Returns true if the msg that was just sent out was local or from something // this component ref's. Used by the SceneWatcher to determine if a component @@ -165,7 +166,7 @@ public: int NumSubs(); Animatable* SubAnim(int i); TSTR SubAnimName(int i); - virtual hsBool AddToAnim(plAGAnim *anim, plMaxNode *node) { return false; } + virtual bool AddToAnim(plAGAnim *anim, plMaxNode *node) { return false; } // plug-in mouse creation callback CreateMouseCallBack* GetCreateMouseCallBack(); @@ -231,7 +232,7 @@ public: ** ** Next create a derived class from the plComponent class with three public functions, ** being its constunctor, its custom destructor and the converter. Currently, we have the -** converter returning an hsBool to let you know how successful the conversion process has been +** converter returning an bool to let you know how successful the conversion process has been ** during export to the .prd format. ** ** After the class above has been declared, the param block stuff follows: diff --git a/Sources/Tools/MaxComponent/plComponentExt.h b/Sources/Tools/MaxComponent/plComponentExt.h index 626700b8..6acc3654 100644 --- a/Sources/Tools/MaxComponent/plComponentExt.h +++ b/Sources/Tools/MaxComponent/plComponentExt.h @@ -56,12 +56,12 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNodeBase *node, plComponentTools *tools, plErrorMsg *pErrMsg) { return true; } - virtual hsBool PreConvert(plMaxNodeBase *node, plComponentTools *tools, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNodeBase *node, plComponentTools *tools, plErrorMsg *pErrMsg) = 0; + virtual bool SetupProperties(plMaxNodeBase *node, plComponentTools *tools, plErrorMsg *pErrMsg) { return true; } + virtual bool PreConvert(plMaxNodeBase *node, plComponentTools *tools, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNodeBase *node, plComponentTools *tools, plErrorMsg *pErrMsg) = 0; // DeInit pass--free up any temp memory you might have allocated here - virtual hsBool DeInit(plMaxNodeBase *node, plComponentTools *tools, plErrorMsg *pErrMsg) { return true; } + virtual bool DeInit(plMaxNodeBase *node, plComponentTools *tools, plErrorMsg *pErrMsg) { return true; } }; #endif \ No newline at end of file diff --git a/Sources/Tools/MaxComponent/plComponentReg.h b/Sources/Tools/MaxComponent/plComponentReg.h index 8f1de5a8..ed2d4be3 100644 --- a/Sources/Tools/MaxComponent/plComponentReg.h +++ b/Sources/Tools/MaxComponent/plComponentReg.h @@ -115,7 +115,7 @@ TARG_BLOCK(classname, varname) // EXCEPT the CLASS_DESC line, then change CLASS_DESC to OBSOLETE_CLASS. This macro // will handle the rest for you! -mcn // -#define OBSOLETE_CLASS( classname, descname, strname, sn, type, classid ) class classname : public plComponent { public: classname##(); hsBool Convert( plMaxNode *n, plErrorMsg *e ) { return true; } }; \ +#define OBSOLETE_CLASS( classname, descname, strname, sn, type, classid ) class classname : public plComponent { public: classname##(); bool Convert( plMaxNode *n, plErrorMsg *e ) { return true; } }; \ OBSOLETE_CLASS_DESC( classname, descname, strname, sn, type, classid ) \ classname##::##classname() { fClassDesc = &##descname##; fClassDesc->MakeAutoParamBlocks(this); } \ ParamBlockDesc2 classname##blk ( plComponent::kBlkComp, _T("##descname##"), 0, &##descname##, P_AUTO_CONSTRUCT, plComponent::kRefComp, end ); diff --git a/Sources/Tools/MaxComponent/plDistribComponent.cpp b/Sources/Tools/MaxComponent/plDistribComponent.cpp index 28ad2bec..3103544f 100644 --- a/Sources/Tools/MaxComponent/plDistribComponent.cpp +++ b/Sources/Tools/MaxComponent/plDistribComponent.cpp @@ -873,7 +873,7 @@ plDistribComponent::plDistribComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plDistribComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plDistribComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { int numReps = fCompPB->Count(kTemplates); int i; diff --git a/Sources/Tools/MaxComponent/plDistribComponent.h b/Sources/Tools/MaxComponent/plDistribComponent.h index 7460c0dd..ed994375 100644 --- a/Sources/Tools/MaxComponent/plDistribComponent.h +++ b/Sources/Tools/MaxComponent/plDistribComponent.h @@ -183,9 +183,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; diff --git a/Sources/Tools/MaxComponent/plDistribComponent_old.cpp b/Sources/Tools/MaxComponent/plDistribComponent_old.cpp index d109a66e..f10d113e 100644 --- a/Sources/Tools/MaxComponent/plDistribComponent_old.cpp +++ b/Sources/Tools/MaxComponent/plDistribComponent_old.cpp @@ -541,7 +541,7 @@ plDistribComponent_old::plDistribComponent_old() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plDistribComponent_old::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plDistribComponent_old::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { int numReps = fCompPB->Count(kTemplates); int i; diff --git a/Sources/Tools/MaxComponent/plDistribComponent_old.h b/Sources/Tools/MaxComponent/plDistribComponent_old.h index 9e3e7e12..cc0445c1 100644 --- a/Sources/Tools/MaxComponent/plDistribComponent_old.h +++ b/Sources/Tools/MaxComponent/plDistribComponent_old.h @@ -150,9 +150,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; diff --git a/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp b/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp index 982207f1..b91d2b9e 100644 --- a/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp +++ b/Sources/Tools/MaxComponent/plExcludeRegionComponent.cpp @@ -106,7 +106,7 @@ plKey plExcludeRegionComponent::GetKey(plMaxNode *node) return nil; } -hsBool plExcludeRegionComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plExcludeRegionComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fXRegionKeys.clear(); @@ -166,7 +166,7 @@ hsBool plExcludeRegionComponent::SetupProperties(plMaxNode *node, plErrorMsg *pE return true; } -hsBool plExcludeRegionComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plExcludeRegionComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { if (!fIsValid) return false; @@ -184,7 +184,7 @@ hsBool plExcludeRegionComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg return true; } -hsBool plExcludeRegionComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plExcludeRegionComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if (!fIsValid) return false; @@ -217,7 +217,7 @@ hsBool plExcludeRegionComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plExcludeRegionComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) +bool plExcludeRegionComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { fXRegionKeys.clear(); diff --git a/Sources/Tools/MaxComponent/plExcludeRegionComponent.h b/Sources/Tools/MaxComponent/plExcludeRegionComponent.h index 57567fca..1b88c352 100644 --- a/Sources/Tools/MaxComponent/plExcludeRegionComponent.h +++ b/Sources/Tools/MaxComponent/plExcludeRegionComponent.h @@ -64,10 +64,10 @@ public: // Can't call until after PreConvert plKey GetKey(plMaxNode *node); - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; diff --git a/Sources/Tools/MaxComponent/plFlexibilityComponent.h b/Sources/Tools/MaxComponent/plFlexibilityComponent.h index 844c17bf..a6eaf486 100644 --- a/Sources/Tools/MaxComponent/plFlexibilityComponent.h +++ b/Sources/Tools/MaxComponent/plFlexibilityComponent.h @@ -62,9 +62,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; #endif // plFlexibilityComponent_inc diff --git a/Sources/Tools/MaxComponent/plFootPrintComponent.cpp b/Sources/Tools/MaxComponent/plFootPrintComponent.cpp index faefe544..5f791f3d 100644 --- a/Sources/Tools/MaxComponent/plFootPrintComponent.cpp +++ b/Sources/Tools/MaxComponent/plFootPrintComponent.cpp @@ -105,12 +105,12 @@ protected: bool fNotifiesSetup; - hsBool ISetupNotifies(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool ISetupDecalMgr(plMaxNode* node, plErrorMsg* pErrMsg, plDynaDecalMgr* decalMgr); - hsBool ICreateDecalMaterials(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool ISetupColorDecalMaterials(plMaxNode* node, plErrorMsg* pErrMsg); + bool ISetupNotifies(plMaxNode* node, plErrorMsg* pErrMsg); + bool ISetupDecalMgr(plMaxNode* node, plErrorMsg* pErrMsg, plDynaDecalMgr* decalMgr); + bool ICreateDecalMaterials(plMaxNode* node, plErrorMsg* pErrMsg); + bool ISetupColorDecalMaterials(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool ISetupParticles(plMaxNode* node, plErrorMsg* pErrMsg); + bool ISetupParticles(plMaxNode* node, plErrorMsg* pErrMsg); static plParticleComponent* IGetParticleComp(INode* node); @@ -145,10 +145,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); static plDynaDecalMgr* GetDecalMgr(INode* node); @@ -290,7 +290,7 @@ ParamBlockDesc2 gFootPrintBk end ); -hsBool plFootPrintComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plFootPrintComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { // If we don't have a valid layer, we're screwed. Throw up a warning // and shutdown. @@ -310,7 +310,7 @@ hsBool plFootPrintComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMs return true; } -hsBool plFootPrintComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plFootPrintComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -324,7 +324,7 @@ hsBool plFootPrintComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plFootPrintComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plFootPrintComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -338,7 +338,7 @@ hsBool plFootPrintComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plFootPrintComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) +bool plFootPrintComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { fDecalMgr = nil; return true; @@ -361,7 +361,7 @@ void plFootPrintComponent::IFakeParams() fCompPB->SetValue(kFadeOut, TimeValue(0), fCompPB->GetFloat(kLifeSpan) * 0.25f); } -hsBool plFootPrintComponent::ISetupDecalMgr(plMaxNode* node, plErrorMsg* pErrMsg, plDynaDecalMgr* decalMgr) +bool plFootPrintComponent::ISetupDecalMgr(plMaxNode* node, plErrorMsg* pErrMsg, plDynaDecalMgr* decalMgr) { IFakeParams(); @@ -407,7 +407,7 @@ hsBool plFootPrintComponent::ISetupDecalMgr(plMaxNode* node, plErrorMsg* pErrMsg return true; } -hsBool plFootPrintComponent::ISetupNotifies(plMaxNode* node, plErrorMsg* pErrMsg) +bool plFootPrintComponent::ISetupNotifies(plMaxNode* node, plErrorMsg* pErrMsg) { int num = fCompPB->Count(kNotifies); int i; @@ -425,7 +425,7 @@ hsBool plFootPrintComponent::ISetupNotifies(plMaxNode* node, plErrorMsg* pErrMsg return true; } -hsBool plFootPrintComponent::ISetupParticles(plMaxNode* node, plErrorMsg* pErrMsg) +bool plFootPrintComponent::ISetupParticles(plMaxNode* node, plErrorMsg* pErrMsg) { int num = fCompPB->Count(kParticles); if( !num ) @@ -463,7 +463,7 @@ hsBool plFootPrintComponent::ISetupParticles(plMaxNode* node, plErrorMsg* pErrMs return true; } -hsBool plFootPrintComponent::ICreateDecalMaterials(plMaxNode* node, plErrorMsg* pErrMsg) +bool plFootPrintComponent::ICreateDecalMaterials(plMaxNode* node, plErrorMsg* pErrMsg) { if( fCompPB->GetInt(kBlend) != kAlpha ) return ISetupColorDecalMaterials(node, pErrMsg); @@ -482,7 +482,7 @@ hsBool plFootPrintComponent::ICreateDecalMaterials(plMaxNode* node, plErrorMsg* return true; } -hsBool plFootPrintComponent::ISetupColorDecalMaterials(plMaxNode* node, plErrorMsg* pErrMsg) +bool plFootPrintComponent::ISetupColorDecalMaterials(plMaxNode* node, plErrorMsg* pErrMsg) { uint32_t blendFlags = 0; switch( fCompPB->GetInt(kBlend) ) @@ -572,9 +572,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -675,12 +675,12 @@ void plRippleComponent::IFakeParams() fCompPB->SetValue(kFadeOut, TimeValue(0), fCompPB->GetFloat(kLifeSpan) * 0.80f); } -hsBool plRippleComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRippleComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { return plFootPrintComponent::SetupProperties(node, pErrMsg); } -hsBool plRippleComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRippleComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -707,7 +707,7 @@ hsBool plRippleComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plRippleComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRippleComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -755,9 +755,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -850,12 +850,12 @@ ParamBlockDesc2 gPuddleBk end ); -hsBool plPuddleComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plPuddleComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { return plRippleComponent::SetupProperties(node, pErrMsg); } -hsBool plPuddleComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plPuddleComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -874,7 +874,7 @@ hsBool plPuddleComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plPuddleComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plPuddleComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -914,9 +914,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -1015,12 +1015,12 @@ void plBulletComponent::IFakeParams() plFootPrintComponent::IFakeParams(); } -hsBool plBulletComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plBulletComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { return plFootPrintComponent::SetupProperties(node, pErrMsg); } -hsBool plBulletComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plBulletComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -1035,7 +1035,7 @@ hsBool plBulletComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plBulletComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plBulletComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -1076,9 +1076,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -1178,12 +1178,12 @@ void plTorpedoComponent::IFakeParams() fCompPB->SetValue(kFadeOut, TimeValue(0), fCompPB->GetFloat(kLifeSpan) * 0.80f); } -hsBool plTorpedoComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plTorpedoComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { return plRippleComponent::SetupProperties(node, pErrMsg); } -hsBool plTorpedoComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plTorpedoComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -1206,7 +1206,7 @@ hsBool plTorpedoComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plTorpedoComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plTorpedoComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return plRippleComponent::Convert(node, pErrMsg); } @@ -1236,9 +1236,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -1338,12 +1338,12 @@ void plWakeComponent::IFakeParams() fCompPB->SetValue(kFadeOut, TimeValue(0), fCompPB->GetFloat(kLifeSpan) * 0.80f); } -hsBool plWakeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWakeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { return plFootPrintComponent::SetupProperties(node, pErrMsg); } -hsBool plWakeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWakeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -1362,7 +1362,7 @@ hsBool plWakeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plWakeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWakeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -1407,9 +1407,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -1475,17 +1475,17 @@ ParamBlockDesc2 gDirtyBk end ); -hsBool plDirtyComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plDirtyComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plDirtyComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plDirtyComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plDirtyComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plDirtyComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { // Check that this node has a physical interface, or all is for nought. // Should throw up a warning if it doesn't have one, seems an easy thing @@ -1558,9 +1558,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -1603,18 +1603,18 @@ ParamBlockDesc2 gPrintShapeBk end ); -hsBool plPrintShapeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plPrintShapeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetForceLocal(true); return true; } -hsBool plPrintShapeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plPrintShapeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plPrintShapeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plPrintShapeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { plSceneObject* obj = node->GetSceneObject(); if( !obj ) @@ -1671,9 +1671,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -1753,18 +1753,18 @@ ParamBlockDesc2 gActivePrintShapeBk end ); -hsBool plActivePrintShapeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plActivePrintShapeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetForceLocal(true); return true; } -hsBool plActivePrintShapeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plActivePrintShapeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plActivePrintShapeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plActivePrintShapeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { plSceneObject* obj = node->GetSceneObject(); if( !obj ) diff --git a/Sources/Tools/MaxComponent/plFootstepComponent.cpp b/Sources/Tools/MaxComponent/plFootstepComponent.cpp index 71ba371d..92c357e9 100644 --- a/Sources/Tools/MaxComponent/plFootstepComponent.cpp +++ b/Sources/Tools/MaxComponent/plFootstepComponent.cpp @@ -109,7 +109,7 @@ extern const plArmatureMod * FindArmatureMod(const plSceneObject *obj); return nil; }*/ -hsBool plFootstepSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plFootstepSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plGenRefMsg *msg; plArmatureEffectFootSound *effect = new plArmatureEffectFootSound(); diff --git a/Sources/Tools/MaxComponent/plFootstepComponent.h b/Sources/Tools/MaxComponent/plFootstepComponent.h index b0cdf582..343a8787 100644 --- a/Sources/Tools/MaxComponent/plFootstepComponent.h +++ b/Sources/Tools/MaxComponent/plFootstepComponent.h @@ -50,9 +50,9 @@ public: plFootstepSoundComponent(); virtual void DeleteThis() { delete this; } - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum // ParamBlock indices { diff --git a/Sources/Tools/MaxComponent/plGUIComponents.cpp b/Sources/Tools/MaxComponent/plGUIComponents.cpp index 49c764f3..a6797d8a 100644 --- a/Sources/Tools/MaxComponent/plGUIComponents.cpp +++ b/Sources/Tools/MaxComponent/plGUIComponents.cpp @@ -396,10 +396,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -596,18 +596,18 @@ plGUITagComponent::plGUITagComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUITagComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUITagComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plGUITagComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUITagComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plGUITagComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUITagComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -668,10 +668,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -970,18 +970,18 @@ plGUIColorSchemeComp::plGUIColorSchemeComp() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIColorSchemeComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIColorSchemeComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plGUIColorSchemeComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIColorSchemeComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plGUIColorSchemeComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIColorSchemeComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { pfGUIControlMod *ctrl = plGUIControlBase::GrabControlFromObject( node ); if( ctrl != nil ) @@ -1165,7 +1165,7 @@ ParamBlockDesc2 gGUIDialogBk end ); -plGUIDialogComponent::plGUIDialogComponent( hsBool dontInit ) +plGUIDialogComponent::plGUIDialogComponent( bool dontInit ) { if( !dontInit ) { @@ -1183,7 +1183,7 @@ pfGUIDialogMod *plGUIDialogComponent::IMakeDialog( void ) // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIDialogComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDialogComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { TimeValue timeVal( 0 ); Object* obj = node->EvalWorldState( timeVal ).obj; @@ -1248,7 +1248,7 @@ hsBool plGUIDialogComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrM return true; } -hsBool plGUIDialogComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDialogComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { TimeValue timeVal(0); @@ -1338,7 +1338,7 @@ hsBool plGUIDialogComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plGUIDialogComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDialogComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { TimeValue timeVal(0); Object* obj = node->EvalWorldState(timeVal).obj; @@ -1561,7 +1561,7 @@ pfGUIDialogMod *plGUIControlBase::IGetDialogMod( plMaxNode *node ) return nil; } -hsBool plGUIControlBase::SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ) +bool plGUIControlBase::SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ) { if( INeedsDynamicText() ) { @@ -1573,7 +1573,7 @@ hsBool plGUIControlBase::SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg return true; } -hsBool plGUIControlBase::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIControlBase::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { // Create a new control fControl = IGetNewControl(); @@ -1601,7 +1601,7 @@ hsBool plGUIControlBase::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plGUIControlBase::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIControlBase::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { // Error check--make sure we're in the same room as our parent (can get confusing with the wrong // parent-child relationships) @@ -1887,10 +1887,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -2096,7 +2096,7 @@ plGUIButtonComponent::plGUIButtonComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIButtonComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIButtonComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { if( fCompPB->GetInt( kRefAnimate ) ) { @@ -2133,12 +2133,12 @@ hsBool plGUIButtonComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrM return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIButtonComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIButtonComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUIButtonComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIButtonComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -2229,10 +2229,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -2342,7 +2342,7 @@ plGUICheckBoxComponent::plGUICheckBoxComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUICheckBoxComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUICheckBoxComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { if( fCompPB->GetInt( kRefAnimate ) ) { @@ -2363,12 +2363,12 @@ hsBool plGUICheckBoxComponent::SetupProperties(plMaxNode *node, plErrorMsg *pEr return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUICheckBoxComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUICheckBoxComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUICheckBoxComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUICheckBoxComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -2429,10 +2429,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -2485,18 +2485,18 @@ plGUIDraggableComponent::plGUIDraggableComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIDraggableComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDraggableComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetForceLocal( true ); return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIDraggableComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDraggableComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUIDraggableComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDraggableComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -2532,7 +2532,7 @@ protected: virtual pfGUIControlMod *IGetNewControl( void ) { return new pfGUIKnobCtrl; } virtual bool ICanHaveProxy( void ) { return true; } - hsBool IGrabAnimationRange( plMaxNode *node, plErrorMsg *pErrMsg, hsMatrix44 &startL2W, hsMatrix44 &endL2W ); + bool IGrabAnimationRange( plMaxNode *node, plErrorMsg *pErrMsg, hsMatrix44 &startL2W, hsMatrix44 &endL2W ); public: plGUIKnobCtrlComponent(); @@ -2540,10 +2540,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -2637,9 +2637,9 @@ plGUIKnobCtrlComponent::plGUIKnobCtrlComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plGUIKnobCtrlComponent::IGrabAnimationRange( plMaxNode *node, plErrorMsg *pErrMsg, hsMatrix44 &startL2W, hsMatrix44 &endL2W ) +bool plGUIKnobCtrlComponent::IGrabAnimationRange( plMaxNode *node, plErrorMsg *pErrMsg, hsMatrix44 &startL2W, hsMatrix44 &endL2W ) { - hsBool result = false; + bool result = false; // Get the affine parts and the TM Controller @@ -2666,7 +2666,7 @@ hsBool plGUIKnobCtrlComponent::IGrabAnimationRange( plMaxNode *node, plErrorMsg // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIKnobCtrlComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIKnobCtrlComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetForceLocal( true ); @@ -2686,7 +2686,7 @@ hsBool plGUIKnobCtrlComponent::SetupProperties(plMaxNode *node, plErrorMsg *pEr return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIKnobCtrlComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIKnobCtrlComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } @@ -2694,7 +2694,7 @@ hsBool plGUIKnobCtrlComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) // For hackery below (see warning below) #include "plAvatar/plAGMasterMod.h" -hsBool plGUIKnobCtrlComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIKnobCtrlComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -2787,10 +2787,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -2925,17 +2925,17 @@ plGUIListBoxComponent::plGUIListBoxComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIListBoxComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIListBoxComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIListBoxComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIListBoxComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUIListBoxComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIListBoxComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -3022,10 +3022,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -3260,17 +3260,17 @@ plGUITextBoxComponent::plGUITextBoxComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUITextBoxComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUITextBoxComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUITextBoxComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUITextBoxComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUITextBoxComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUITextBoxComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -3319,10 +3319,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -3365,17 +3365,17 @@ plGUIEditBoxComponent::plGUIEditBoxComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIEditBoxComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIEditBoxComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIEditBoxComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIEditBoxComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUIEditBoxComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIEditBoxComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -3413,10 +3413,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -3574,17 +3574,17 @@ plGUIUpDownPairComponent::plGUIUpDownPairComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIUpDownPairComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIUpDownPairComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIUpDownPairComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIUpDownPairComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUIUpDownPairComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIUpDownPairComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -3626,10 +3626,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -3664,18 +3664,18 @@ plGUIDragBarComponent::plGUIDragBarComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIDragBarComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDragBarComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetForceLocal( true ); return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIDragBarComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDragBarComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUIDragBarComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDragBarComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -3711,10 +3711,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -3867,18 +3867,18 @@ plGUIRadioGroupComponent::plGUIRadioGroupComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIRadioGroupComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIRadioGroupComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIRadioGroupComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIRadioGroupComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUIRadioGroupComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIRadioGroupComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -3925,10 +3925,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -4017,17 +4017,17 @@ plGUIDynDisplayComponent::plGUIDynDisplayComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIDynDisplayComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDynDisplayComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIDynDisplayComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDynDisplayComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUIDynDisplayComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIDynDisplayComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -4101,10 +4101,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -4163,17 +4163,17 @@ plGUIMultiLineEditComp::plGUIMultiLineEditComp() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIMultiLineEditComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIMultiLineEditComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIMultiLineEditComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIMultiLineEditComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUIMultiLineEditComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIMultiLineEditComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -4223,10 +4223,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -4388,7 +4388,7 @@ plGUIProgressCtrlComponent::plGUIProgressCtrlComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIProgressCtrlComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIProgressCtrlComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetForceLocal( true ); @@ -4408,7 +4408,7 @@ hsBool plGUIProgressCtrlComponent::SetupProperties(plMaxNode *node, plErrorMsg return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIProgressCtrlComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIProgressCtrlComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } @@ -4416,7 +4416,7 @@ hsBool plGUIProgressCtrlComponent::PreConvert(plMaxNode *node, plErrorMsg *pErr // For hackery below (see warning below) #include "plAvatar/plAGMasterMod.h" -hsBool plGUIProgressCtrlComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIProgressCtrlComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -4485,10 +4485,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum { @@ -4525,18 +4525,18 @@ plGUIClickMapComponent::plGUIClickMapComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIClickMapComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIClickMapComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetForceLocal( true ); return plGUIControlBase::SetupProperties( node, pErrMsg ); } -hsBool plGUIClickMapComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIClickMapComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return plGUIControlBase::PreConvert( node, pErrMsg ); } -hsBool plGUIClickMapComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIClickMapComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !plGUIControlBase::Convert( node, pErrMsg ) ) return false; @@ -4736,13 +4736,13 @@ plGUISkinComp::plGUISkinComp() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUISkinComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUISkinComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fConvertedSkin = nil; return true; } -hsBool plGUISkinComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUISkinComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { // Create and assign key here, so other components can grab the key later if( fConvertedSkin != nil ) @@ -4764,7 +4764,7 @@ hsBool plGUISkinComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plGUISkinComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUISkinComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { // Actually do the work of converting all the skin data if( fConvertedSkin == nil ) @@ -4800,7 +4800,7 @@ hsBool plGUISkinComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plGUISkinComp::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUISkinComp::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { fConvertedSkin = nil; return true; @@ -4916,18 +4916,18 @@ plKey plGUIMenuComponent::GetConvertedMenuKey( void ) const // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGUIMenuComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIMenuComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { // return plGUIDialogComponent::SetupProperties( node, pErrMsg ); fConvertedMenu = nil; return true; } -hsBool plGUIMenuComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIMenuComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { pfGUIPopUpMenu *menu = fConvertedMenu; -// hsBool b = plGUIDialogComponent::Convert( node, pErrMsg ); +// bool b = plGUIDialogComponent::Convert( node, pErrMsg ); // if( b ) { // pfGUIPopUpMenu *menu = pfGUIPopUpMenu::ConvertNoRef( fDialogMod ); @@ -5026,7 +5026,7 @@ hsBool plGUIMenuComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plGUIMenuComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIMenuComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { // Create and assign key here, so other components can grab the key later if( fConvertedMenu != nil ) @@ -5064,7 +5064,7 @@ hsBool plGUIMenuComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) // return plGUIDialogComponent::PreConvert( node, pErrMsg ); } -hsBool plGUIMenuComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGUIMenuComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { fConvertedMenu = nil; fConvertedNode = nil; diff --git a/Sources/Tools/MaxComponent/plGUIComponents.h b/Sources/Tools/MaxComponent/plGUIComponents.h index f30bcc0a..8ae78f44 100644 --- a/Sources/Tools/MaxComponent/plGUIComponents.h +++ b/Sources/Tools/MaxComponent/plGUIComponents.h @@ -72,19 +72,19 @@ class plGUIDialogComponent : public plComponent pfGUIDialogMod *fDialogMod; plKey fProcReceiver; // non-nil means to send out notifys as our proc - hsBool fSeqNumValidated; + bool fSeqNumValidated; virtual pfGUIDialogMod *IMakeDialog( void ); public: // I believe booleans should always default to false, hence why this is dontInit instead of init. uint8_t me. - plGUIDialogComponent( hsBool dontInit = false ); + plGUIDialogComponent( bool dontInit = false ); void DeleteThis() { delete this; } - hsBool SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ); - hsBool PreConvert( plMaxNode *pNode, plErrorMsg *pErrMsg ); - hsBool Convert( plMaxNode *node, plErrorMsg *pErrMsg ); - hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { fProcReceiver = nil; return true;} + bool SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ); + bool PreConvert( plMaxNode *pNode, plErrorMsg *pErrMsg ); + bool Convert( plMaxNode *node, plErrorMsg *pErrMsg ); + bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { fProcReceiver = nil; return true;} pfGUIDialogMod *GetModifier( void ) { return fDialogMod; } @@ -147,9 +147,9 @@ class plGUIControlBase : public plComponent plGUIControlBase() {} void DeleteThis() { delete this; } - hsBool SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables( INodeTab &nonDrawables ); @@ -207,10 +207,10 @@ class plGUIMenuComponent : public plGUIDialogComponent plGUIMenuComponent(); void DeleteThis() { delete this; } - virtual hsBool SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ); - virtual hsBool PreConvert( plMaxNode *pNode, plErrorMsg *pErrMsg ); - virtual hsBool Convert( plMaxNode *node, plErrorMsg *pErrMsg ); - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties( plMaxNode *pNode, plErrorMsg *pErrMsg ); + virtual bool PreConvert( plMaxNode *pNode, plErrorMsg *pErrMsg ); + virtual bool Convert( plMaxNode *node, plErrorMsg *pErrMsg ); + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); plKey GetConvertedMenuKey( void ) const; diff --git a/Sources/Tools/MaxComponent/plGrassComponent.cpp b/Sources/Tools/MaxComponent/plGrassComponent.cpp index bf398df3..a09b573a 100644 --- a/Sources/Tools/MaxComponent/plGrassComponent.cpp +++ b/Sources/Tools/MaxComponent/plGrassComponent.cpp @@ -234,7 +234,7 @@ plGrassComponent::plGrassComponent() : fShader(nil) fClassDesc->MakeAutoParamBlocks(this); } -hsBool plGrassComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGrassComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { fShader = new plGrassShaderMod(); @@ -261,7 +261,7 @@ hsBool plGrassComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plGrassComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGrassComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plObjRefMsg* refMsg = new plObjRefMsg(node->GetKey(), plRefMsg::kOnRequest, -1, plObjRefMsg::kModifier); hsgResMgr::ResMgr()->AddViaNotify(fShader->GetKey(), refMsg, plRefFlags::kActiveRef); @@ -273,7 +273,7 @@ hsBool plGrassComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return TRUE; } -hsBool plGrassComponent::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) +bool plGrassComponent::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) { if( fShader ) fShader->GetKey()->UnRefObject(); diff --git a/Sources/Tools/MaxComponent/plGrassComponent.h b/Sources/Tools/MaxComponent/plGrassComponent.h index 9b19b923..8aca217e 100644 --- a/Sources/Tools/MaxComponent/plGrassComponent.h +++ b/Sources/Tools/MaxComponent/plGrassComponent.h @@ -51,9 +51,9 @@ protected: public: plGrassComponent(); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool DeInit(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool DeInit(plMaxNode* node, plErrorMsg* pErrMsg); virtual void DeleteThis() { delete this; } // These only work after PreConvert pass diff --git a/Sources/Tools/MaxComponent/plIgnoreComponent.cpp b/Sources/Tools/MaxComponent/plIgnoreComponent.cpp index c5a539e4..6f7ca0c6 100644 --- a/Sources/Tools/MaxComponent/plIgnoreComponent.cpp +++ b/Sources/Tools/MaxComponent/plIgnoreComponent.cpp @@ -76,8 +76,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables); }; @@ -120,7 +120,7 @@ void plIgnoreComponent::CollectNonDrawables(INodeTab& nonDrawables) // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plIgnoreComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plIgnoreComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { if (fCompPB->GetInt(kIgnoreMeCheckBx)) pNode->SetCanConvert(false); @@ -128,7 +128,7 @@ hsBool plIgnoreComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg return true; } -hsBool plIgnoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plIgnoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -158,10 +158,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; @@ -277,8 +277,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary below. @@ -301,14 +301,14 @@ plBarneyComponent::plBarneyComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plBarneyComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plBarneyComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetCanConvert(false); pNode->SetIsBarney(true); return true; } -hsBool plBarneyComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plBarneyComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -339,8 +339,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; const Class_ID COMP_NOSHOW_CID(0x41cb2b85, 0x615932c6); @@ -380,7 +380,7 @@ plNoShowComponent::plNoShowComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plNoShowComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plNoShowComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { if( !fCompPB->GetInt(kShowable) ) { @@ -393,7 +393,7 @@ hsBool plNoShowComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg return true; } -hsBool plNoShowComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plNoShowComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plSceneObject* obj = node->GetSceneObject(); if( !obj ) diff --git a/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp b/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp index e3f8d1d5..aac5a9a7 100644 --- a/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp +++ b/Sources/Tools/MaxComponent/plImpactGadgetComponent.cpp @@ -137,7 +137,7 @@ OBSOLETE_CLASS(plImpactGadget, gImpactGadgetDesc, "Collision Sensor", "Collisio // fClassDesc->MakeAutoParamBlocks(this); // } // -// hsBool plImpactGadget::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +// bool plImpactGadget::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) // { // plActivatorBaseComponent::SetupProperties(node, pErrMsg); // @@ -147,7 +147,7 @@ OBSOLETE_CLASS(plImpactGadget, gImpactGadgetDesc, "Collision Sensor", "Collisio // return true; // } // -// hsBool plImpactGadget::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +// bool plImpactGadget::Convert(plMaxNode *node, plErrorMsg *pErrMsg) // { // plLocation loc = node->GetLocation(); // plSceneObject *obj = node->GetSceneObject(); diff --git a/Sources/Tools/MaxComponent/plImpactGadgetComponent.h b/Sources/Tools/MaxComponent/plImpactGadgetComponent.h index 05025141..1b30d0dc 100644 --- a/Sources/Tools/MaxComponent/plImpactGadgetComponent.h +++ b/Sources/Tools/MaxComponent/plImpactGadgetComponent.h @@ -51,8 +51,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // public: // plImpactGadget(); // -// hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); -// hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); +// bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); +// bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); // }; #endif // plImpactGadgetComponent_inc \ No newline at end of file diff --git a/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp b/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp index af18367c..0fce9fb8 100644 --- a/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp +++ b/Sources/Tools/MaxComponent/plInventoryObjComponent.cpp @@ -160,7 +160,7 @@ const plInventoryObjComponent::LogicKeys& plInventoryObjComponent::GetLogicKeys( // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plInventoryObjComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plInventoryObjComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fLogicModKeys.clear(); fReceivers.Reset(); @@ -180,7 +180,7 @@ plKey plInventoryObjComponent::GetLogicKey(plMaxNode* node) } -hsBool plInventoryObjComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plInventoryObjComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { plLocation loc = node->GetLocation(); plSceneObject *obj = node->GetSceneObject(); @@ -203,7 +203,7 @@ void plInventoryObjComponent::AddReceiverKey(plKey key, plMaxNode* node) fReceivers.Append(key); } -hsBool plInventoryObjComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plInventoryObjComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } diff --git a/Sources/Tools/MaxComponent/plInventoryObjComponent.h b/Sources/Tools/MaxComponent/plInventoryObjComponent.h index 7683bbaf..1638d068 100644 --- a/Sources/Tools/MaxComponent/plInventoryObjComponent.h +++ b/Sources/Tools/MaxComponent/plInventoryObjComponent.h @@ -62,10 +62,10 @@ class plMaxNode; member functions: - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void AddReceiverKey(plKey pKey); virtual plKey GetLogicKey(plMaxNode* node); @@ -100,7 +100,7 @@ public: // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - //! plInventoryObjComponent PreConvert, takes in two variables and return a hsBool. + //! plInventoryObjComponent PreConvert, takes in two variables and return a bool. /*! Calls the function MaybeMakeLocal() and Sets Drawable to false. @@ -108,14 +108,14 @@ public: \param node a plMaxNode ptr. \param pErrMsg a pErrMsg ptr. - \return A hsBool expressing the success of the operation. + \return A bool expressing the success of the operation. \sa DeleteThis(), plPhysicalCoreComponent(), Convert(), GetParamVals(), MaybeMakeLocal() and FixUpPhysical() */ - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void AddReceiverKey(plKey key, plMaxNode* node=nil); virtual plKey GetLogicKey(plMaxNode* node); diff --git a/Sources/Tools/MaxComponent/plLODFadeComponent.cpp b/Sources/Tools/MaxComponent/plLODFadeComponent.cpp index 9a4c01d0..eacdee65 100644 --- a/Sources/Tools/MaxComponent/plLODFadeComponent.cpp +++ b/Sources/Tools/MaxComponent/plLODFadeComponent.cpp @@ -131,7 +131,7 @@ void plLODFadeComponent::ISetToFadeBase(plMaxNode* node, plMaxNode* base, plErro base->SetNoDeferDraw(true); } -hsBool plLODFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plLODFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { if( fCompPB->GetInt(kHasBase) ) { @@ -160,12 +160,12 @@ hsBool plLODFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plLODFadeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plLODFadeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plLODFadeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plLODFadeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } @@ -200,9 +200,9 @@ ParamBlockDesc2 gBlendOntoBk end ); -hsBool plBlendOntoComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plBlendOntoComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { - hsBool someBase = false; + bool someBase = false; int numBase = fCompPB->Count(kBaseNodes); int i; for( i = 0; i < numBase; i++ ) @@ -227,12 +227,12 @@ hsBool plBlendOntoComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMs return true; } -hsBool plBlendOntoComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plBlendOntoComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plBlendOntoComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plBlendOntoComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } @@ -277,9 +277,9 @@ ParamBlockDesc2 gBlendOntoAdvBk end ); -hsBool plBlendOntoAdvComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plBlendOntoAdvComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { - hsBool someBase = false; + bool someBase = false; int numBase = fCompPB->Count(kBaseNodes); int i; for( i = 0; i < numBase; i++ ) @@ -305,12 +305,12 @@ hsBool plBlendOntoAdvComponent::SetupProperties(plMaxNode* node, plErrorMsg* pEr return true; } -hsBool plBlendOntoAdvComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plBlendOntoAdvComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plBlendOntoAdvComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plBlendOntoAdvComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } @@ -334,9 +334,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -351,18 +351,18 @@ ParamBlockDesc2 gB4AvBk end ); -hsBool plB4AvComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plB4AvComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetSortAsOpaque(true); return true; } -hsBool plB4AvComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plB4AvComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plB4AvComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plB4AvComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } @@ -428,7 +428,7 @@ ParamBlockDesc2 gDistFadeBk end ); -hsBool plDistFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plDistFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { // If we're turned off, just return. if( !fCompPB->GetInt(kFadeInActive) && !fCompPB->GetInt(kFadeOutActive) ) @@ -542,12 +542,12 @@ Box3 plDistFadeComponent::IFadeFromPair(Point3& mins, Point3& maxs) } -hsBool plDistFadeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plDistFadeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plDistFadeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plDistFadeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } @@ -577,9 +577,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -615,7 +615,7 @@ ParamBlockDesc2 gLOSFadeBk end ); -hsBool plLOSFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plLOSFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetForceMatShade(true); node->SetForceLocal(true); @@ -623,12 +623,12 @@ hsBool plLOSFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plLOSFadeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plLOSFadeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plLOSFadeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plLOSFadeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { plFadeOpacityMod* fade = new plFadeOpacityMod; @@ -671,9 +671,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -703,7 +703,7 @@ ParamBlockDesc2 gGZFadeBk end ); -hsBool plGZFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plGZFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { float opaq = fCompPB->GetFloat(kOpaque); float transp = fCompPB->GetFloat(kTransp); @@ -717,12 +717,12 @@ hsBool plGZFadeComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plGZFadeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plGZFadeComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plGZFadeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plGZFadeComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { plDistOpacityMod* fade = new plDistOpacityMod; @@ -763,9 +763,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -780,18 +780,18 @@ ParamBlockDesc2 gDynMatBk end ); -hsBool plDynMatComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plDynMatComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetForceMatShade(true); return true; } -hsBool plDynMatComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plDynMatComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plDynMatComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plDynMatComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } diff --git a/Sources/Tools/MaxComponent/plLODFadeComponent.h b/Sources/Tools/MaxComponent/plLODFadeComponent.h index 26df5bd7..5ebba3b8 100644 --- a/Sources/Tools/MaxComponent/plLODFadeComponent.h +++ b/Sources/Tools/MaxComponent/plLODFadeComponent.h @@ -73,9 +73,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; class plBlendOntoComponent : public plComponent @@ -93,9 +93,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; class plBlendOntoAdvComponent : public plComponent @@ -115,9 +115,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; class plDistFadeComponent : public plComponent @@ -143,9 +143,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; #endif // plLODFadeComponent_inc diff --git a/Sources/Tools/MaxComponent/plLightGrpComponent.cpp b/Sources/Tools/MaxComponent/plLightGrpComponent.cpp index 35fff7da..8f14823b 100644 --- a/Sources/Tools/MaxComponent/plLightGrpComponent.cpp +++ b/Sources/Tools/MaxComponent/plLightGrpComponent.cpp @@ -136,7 +136,7 @@ IOResult plLightGrpComponent::Load(ILoad* iLoad) return plComponent::Load(iLoad); } -hsBool plLightGrpComponent::IAddLightsToSpans(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plLightGrpComponent::IAddLightsToSpans(plMaxNode* pNode, plErrorMsg* pErrMsg) { int i; for( i = 0; i < fLightInfos.GetCount(); i++ ) @@ -161,7 +161,7 @@ hsBool plLightGrpComponent::IAddLightsToSpans(plMaxNode* pNode, plErrorMsg* pErr return true; } -hsBool plLightGrpComponent::ISendItOff(plLightInfo* liInfo, plDrawableSpans* drawable, uint32_t diIndex) +bool plLightGrpComponent::ISendItOff(plLightInfo* liInfo, plDrawableSpans* drawable, uint32_t diIndex) { plDISpanIndex spans = drawable->GetDISpans(diIndex); @@ -195,7 +195,7 @@ hsBool plLightGrpComponent::ISendItOff(plLightInfo* liInfo, plDrawableSpans* dra return true; } -hsBool plLightGrpComponent::IGetLightInfos() +bool plLightGrpComponent::IGetLightInfos() { if( !fLightInfos.GetCount() ) { @@ -239,7 +239,7 @@ plLightGrpComponent* plLightGrpComponent::GetComp(plMaxNode* node) return nil; } -hsBool plLightGrpComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plLightGrpComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { const char* dbgNodeName = node->GetName(); if( !fValid ) @@ -263,7 +263,7 @@ hsBool plLightGrpComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plLightGrpComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plLightGrpComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { fValid = false; fLightInfos.Reset(); @@ -299,7 +299,7 @@ hsBool plLightGrpComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrM return true; } -hsBool plLightGrpComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plLightGrpComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) { if( !fValid ) return true; diff --git a/Sources/Tools/MaxComponent/plLightGrpComponent.h b/Sources/Tools/MaxComponent/plLightGrpComponent.h index 598eb619..8dfe7a85 100644 --- a/Sources/Tools/MaxComponent/plLightGrpComponent.h +++ b/Sources/Tools/MaxComponent/plLightGrpComponent.h @@ -54,21 +54,21 @@ class plDrawableSpans; class plLightGrpComponent : public plComponent { private: - hsBool fValid; + bool fValid; hsTArray fLightNodes; hsTArray fLightInfos; - hsBool IAddLightsToSpans(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool ISendItOff(plLightInfo* liInfo, plDrawableSpans* drawable, uint32_t diIndex); - hsBool IGetLightInfos(); + bool IAddLightsToSpans(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool ISendItOff(plLightInfo* liInfo, plDrawableSpans* drawable, uint32_t diIndex); + bool IGetLightInfos(); public: plLightGrpComponent(); - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); const hsTArray& GetLightInfos(); diff --git a/Sources/Tools/MaxComponent/plLightMapComponent.cpp b/Sources/Tools/MaxComponent/plLightMapComponent.cpp index d1afa230..355f13bc 100644 --- a/Sources/Tools/MaxComponent/plLightMapComponent.cpp +++ b/Sources/Tools/MaxComponent/plLightMapComponent.cpp @@ -136,19 +136,19 @@ plLightMapComponent::plLightMapComponent() -hsBool plLightMapComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plLightMapComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plLightMapComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plLightMapComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fLightMapKey = nil; return true; } -hsBool plLightMapComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plLightMapComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } @@ -186,12 +186,12 @@ uint32_t plLightMapComponent::GetUVWSrc() const return fCompPB->GetInt(kMapChannel)-1; } -hsBool plLightMapComponent::GetCompress() const +bool plLightMapComponent::GetCompress() const { return fCompPB->GetInt(kCompress); } -hsBool plLightMapComponent::GetShared() const +bool plLightMapComponent::GetShared() const { return fCompPB->GetInt(kShared); } diff --git a/Sources/Tools/MaxComponent/plLightMapComponent.h b/Sources/Tools/MaxComponent/plLightMapComponent.h index c54f580c..ceae4165 100644 --- a/Sources/Tools/MaxComponent/plLightMapComponent.h +++ b/Sources/Tools/MaxComponent/plLightMapComponent.h @@ -59,9 +59,9 @@ protected: public: plLightMapComponent(); - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); void SetLightMapKey(const plKey& key) { fLightMapKey = key; } plKey GetLightMapKey() const { return fLightMapKey; } @@ -69,8 +69,8 @@ public: float GetScale() const; uint32_t GetUVWSrc() const; - hsBool GetCompress() const; - hsBool GetShared() const; + bool GetCompress() const; + bool GetShared() const; hsColorRGBA GetInitColor() const; }; diff --git a/Sources/Tools/MaxComponent/plLineFollowComp.cpp b/Sources/Tools/MaxComponent/plLineFollowComp.cpp index 59ec3a56..fe3b30d1 100644 --- a/Sources/Tools/MaxComponent/plLineFollowComp.cpp +++ b/Sources/Tools/MaxComponent/plLineFollowComp.cpp @@ -170,18 +170,18 @@ static plLineFollowComponentProc gLineFollowProc; class plLineFollowComponent : public plComponent { private: - hsBool fValid; + bool fValid; plLineFollowMod* fLineMod; - hsBool IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg); public: plLineFollowComponent(); - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + bool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); plLineFollowMod* GetLineMod(plErrorMsg* pErrMsg); }; @@ -272,7 +272,7 @@ plLineFollowComponent::plLineFollowComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plLineFollowComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plLineFollowComponent::IMakeLineMod(plMaxNode* pNode, plErrorMsg* pErrMsg) { plLineFollowMod::FollowMode mode = plLineFollowMod::FollowMode(fCompPB->GetInt(kFollowModeRadio)); @@ -385,7 +385,7 @@ plLineFollowMod* plLineFollowComponent::GetLineMod(plErrorMsg* pErrMsg) return fLineMod; } -hsBool plLineFollowComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plLineFollowComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -404,7 +404,7 @@ hsBool plLineFollowComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plLineFollowComponent::SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plLineFollowComponent::SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg) { fValid = false; fLineMod = nil; @@ -437,7 +437,7 @@ hsBool plLineFollowComponent::SetupProperties(plMaxNode* pNode, plErrorMsg* pEr return true; } -hsBool plLineFollowComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plLineFollowComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -493,11 +493,11 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg); + bool Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg); }; @@ -560,7 +560,7 @@ plStereizeComp::plStereizeComp() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plStereizeComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plStereizeComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetForceLocal(true); if( !node->GetParentNode()->IsRootNode() ) @@ -569,19 +569,19 @@ hsBool plStereizeComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plStereizeComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plStereizeComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plStereizeComp::Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg) +bool plStereizeComp::Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg) { pErrMsg->Set(true, node->GetName(), msg).CheckAndAsk(); pErrMsg->Set(false); return true; } -hsBool plStereizeComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plStereizeComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { plStereizer* stereo = new plStereizer; @@ -665,11 +665,11 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg); + bool Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg); }; @@ -783,7 +783,7 @@ plSwivelComp::plSwivelComp() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plSwivelComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plSwivelComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetForceLocal(true); node->SetMovable(true); @@ -791,19 +791,19 @@ hsBool plSwivelComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plSwivelComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plSwivelComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plSwivelComp::Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg) +bool plSwivelComp::Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg) { pErrMsg->Set(true, node->GetName(), msg).CheckAndAsk(); pErrMsg->Set(false); return true; } -hsBool plSwivelComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plSwivelComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { plViewFaceModifier* pMod = new plViewFaceModifier; pMod->SetOrigTransform(node->GetLocalToParent44(), node->GetParentToLocal44()); diff --git a/Sources/Tools/MaxComponent/plMiscComponents.cpp b/Sources/Tools/MaxComponent/plMiscComponents.cpp index 47adb01f..8ad72831 100644 --- a/Sources/Tools/MaxComponent/plMiscComponents.cpp +++ b/Sources/Tools/MaxComponent/plMiscComponents.cpp @@ -127,7 +127,7 @@ class plInterestingComponent : public plComponent { public: plInterestingComponent(); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary below. @@ -171,7 +171,7 @@ plInterestingComponent::plInterestingComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plInterestingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plInterestingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plInterestingModifier* pMod = new plInterestingModifier; @@ -380,7 +380,7 @@ plPageInfoComponent::plPageInfoComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plPageInfoComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPageInfoComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { // Another component already created a location, don't override it if (pNode->GetRoomKey()) @@ -523,7 +523,7 @@ hsBool plPageInfoComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMs return true; } -hsBool plPageInfoComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPageInfoComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { // Make sure we clear this flag so that the next time around it's clear fCompPB->SetValue( kRefVolatile_PageInfoUpdated, 0, (int)false ); @@ -532,7 +532,7 @@ hsBool plPageInfoComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plPageInfoComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPageInfoComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { plKey snKey = node->GetRoomKey(); plSceneObject *so = node->GetSceneObject(); @@ -877,7 +877,7 @@ class plRoomComponent : public plComponent public: plRoomComponent(); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary. @@ -924,7 +924,7 @@ plRoomComponent::plRoomComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plRoomComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plRoomComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -943,8 +943,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary below. @@ -1003,7 +1003,7 @@ plViewFacingComponent::plViewFacingComponent() fClassDesc->MakeAutoParamBlocks(this); } -static hsBool NodeHasTMAnimation(plMaxNode* node) +static bool NodeHasTMAnimation(plMaxNode* node) { if( node->GetUnBounded() ) return true; @@ -1018,7 +1018,7 @@ static hsBool NodeHasTMAnimation(plMaxNode* node) return node->GetTMController() && node->GetTMController()->IsAnimated(); } -static hsBool FindTMAnimatedChildrenRecur(plMaxNode* node) +static bool FindTMAnimatedChildrenRecur(plMaxNode* node) { if( !node->CanConvert() ) return false; @@ -1073,7 +1073,7 @@ static void FindRecursiveBounds(plMaxNode* node, hsBounds3Ext& bnd) return; } -static hsBool FindMaxBounds(plMaxNode* node, hsBounds3Ext& bnd) +static bool FindMaxBounds(plMaxNode* node, hsBounds3Ext& bnd) { bnd.MakeEmpty(); @@ -1106,7 +1106,7 @@ static hsBool FindMaxBounds(plMaxNode* node, hsBounds3Ext& bnd) return true; } -hsBool plViewFacingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plViewFacingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plViewFaceModifier* pMod = new plViewFaceModifier; @@ -1150,7 +1150,7 @@ hsBool plViewFacingComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plViewFacingComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plViewFacingComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetForceLocal(true); pNode->SetMovable(true); @@ -1176,8 +1176,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary below. @@ -1199,7 +1199,7 @@ plSpriteComponent::plSpriteComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plSpriteComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSpriteComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plViewFaceModifier* pMod = new plViewFaceModifier; @@ -1213,7 +1213,7 @@ hsBool plSpriteComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plSpriteComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plSpriteComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetForceLocal(true); pNode->SetMovable(true); @@ -1271,9 +1271,9 @@ class plOcclusionComponent : public plComponent public: plOcclusionComponent(); - virtual hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -1300,19 +1300,19 @@ plOcclusionComponent::plOcclusionComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plOcclusionComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plOcclusionComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plOcclusionComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plOcclusionComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { - hsBool twoSided = fCompPB->GetInt(kOccTwoSidedChekbox); - hsBool isHole = false; + bool twoSided = fCompPB->GetInt(kOccTwoSidedChekbox); + bool isHole = false; return node->ConvertToOccluder(pErrMsg, twoSided, isHole); } -hsBool plOcclusionComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plOcclusionComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetDrawable(false); return true; @@ -1327,7 +1327,7 @@ hsBool plOcclusionComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErr //Class that accesses the paramblock below. class plCamViewComponent : public plComponent { - hsBool fBogus; + bool fBogus; void IMakeEveryoneOpaqueRecur(plMaxNode* node); void IMakeEveryoneOpaque(plMaxNode* node); @@ -1336,10 +1336,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary below. @@ -1366,7 +1366,7 @@ plCamViewComponent::plCamViewComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plCamViewComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCamViewComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { TimeValue timeVal(0); @@ -1428,7 +1428,7 @@ hsBool plCamViewComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plCamViewComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCamViewComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { TimeValue timeVal(0); Object* obj = node->EvalWorldState(timeVal).obj; @@ -1475,7 +1475,7 @@ void plCamViewComponent::IMakeEveryoneOpaqueRecur(plMaxNode* node) // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plCamViewComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCamViewComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetForceLocal(true); return true; @@ -1564,16 +1564,16 @@ static plFollowComponentProc gFollowProc; class plFollowComponent : public plComponent { private: - hsBool fValid; + bool fValid; plFollowMod* IMakeFollowMod(plMaxNode* pNode, plErrorMsg* pErrMsg); public: plFollowComponent(); - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -1681,7 +1681,7 @@ plFollowMod* plFollowComponent::IMakeFollowMod(plMaxNode* pNode, plErrorMsg* pEr return follow; } -hsBool plFollowComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plFollowComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if( !fValid ) return true; @@ -1694,7 +1694,7 @@ hsBool plFollowComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plFollowComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plFollowComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { fValid = false; @@ -1711,7 +1711,7 @@ hsBool plFollowComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg return true; } -hsBool plFollowComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plFollowComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) { if( !fValid ) return true; @@ -1746,8 +1746,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary below. @@ -1770,7 +1770,7 @@ plUnleashComponent::plUnleashComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plUnleashComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plUnleashComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetRunTimeLight(true); @@ -1779,7 +1779,7 @@ hsBool plUnleashComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMs return true; } -hsBool plUnleashComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plUnleashComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -1798,8 +1798,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; //Max desc stuff necessary below. @@ -1822,7 +1822,7 @@ plForceRTLightComponent::plForceRTLightComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plForceRTLightComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plForceRTLightComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetRunTimeLight(true); pNode->SetNoPreShade(true); @@ -1851,8 +1851,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; static const int kDefMaxFaces(1000); @@ -1973,7 +1973,7 @@ plGeoDiceComponent::plGeoDiceComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plGeoDiceComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plGeoDiceComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { if( fCompPB->GetInt(kActive) ) { @@ -1995,11 +1995,11 @@ class plReferencePointComponent : public plComponent public: plReferencePointComponent(); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); }; CLASS_DESC(plReferencePointComponent, gReferencePointDesc, "Reference Point", "RefPoint", COMP_TYPE_MISC, Class_ID(0x3c9c6f71, 0x5774fc5)) @@ -2018,7 +2018,7 @@ plReferencePointComponent::plReferencePointComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plReferencePointComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plReferencePointComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { // all we need is a coordinate interface... pNode->SetForceLocal(true); @@ -2047,9 +2047,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* errMsg); - virtual hsBool Convert(plMaxNode* node, plErrorMsg* errMsg) { return true; } - virtual hsBool DeInit(plMaxNode* node, plErrorMsg* errMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* errMsg); + virtual bool Convert(plMaxNode* node, plErrorMsg* errMsg) { return true; } + virtual bool DeInit(plMaxNode* node, plErrorMsg* errMsg); }; CLASS_DESC(plNetSyncComponent, gNetSyncDesc, "Net Sync", "NetSync", COMP_TYPE_MISC, Class_ID(0x4d1b2d6f, 0x28fe08db)) @@ -2194,7 +2194,7 @@ plNetSyncComponent::plNetSyncComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plNetSyncComponent::SetupProperties(plMaxNode* node, plErrorMsg* errMsg) +bool plNetSyncComponent::SetupProperties(plMaxNode* node, plErrorMsg* errMsg) { // make all sdl types on this object Volatile bool override = (fCompPB->GetInt(kNetSyncOverride) != 0); @@ -2289,7 +2289,7 @@ void plNetSyncComponent::ISetMtl(hsGMaterial* mtl) } // We're cheating and using DeInit as an extra pass, since everything should be done at that point -hsBool plNetSyncComponent::DeInit(plMaxNode* node, plErrorMsg* errMsg) +bool plNetSyncComponent::DeInit(plMaxNode* node, plErrorMsg* errMsg) { plSceneObject* so = node->GetSceneObject(); if (!so) @@ -2531,13 +2531,13 @@ void pfImageLibComponent::SetCompress(int idx, bool compress) fCompPB->SetValue(kCompressImage, 0, compress, idx); } -hsBool pfImageLibComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool pfImageLibComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { Validate(); return true; } -hsBool pfImageLibComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool pfImageLibComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plImageLibMod *lib = new plImageLibMod; node->AddModifier( lib, IGetUniqueName(node) ); diff --git a/Sources/Tools/MaxComponent/plMiscComponents.h b/Sources/Tools/MaxComponent/plMiscComponents.h index d7d7ce97..44ddb189 100644 --- a/Sources/Tools/MaxComponent/plMiscComponents.h +++ b/Sources/Tools/MaxComponent/plMiscComponents.h @@ -72,8 +72,8 @@ namespace plPageInfoUtils class plPageInfoComponent : public plComponent { protected: - hsBool fSeqNumValidated; - hsBool fItinerant; + bool fSeqNumValidated; + bool fItinerant; static char fCurrExportedAge[ 256 ]; void IVerifyLatestAgeAsset( const char *ageName, const char *localPath, plErrorMsg *errMsg ); @@ -84,11 +84,11 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); const char *GetAgeName(); - hsBool GetItinerant() {return fItinerant; } + bool GetItinerant() {return fItinerant; } enum { @@ -113,8 +113,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); enum ParamIDs { diff --git a/Sources/Tools/MaxComponent/plMorphSeqComp.cpp b/Sources/Tools/MaxComponent/plMorphSeqComp.cpp index db817441..1cb9a637 100644 --- a/Sources/Tools/MaxComponent/plMorphSeqComp.cpp +++ b/Sources/Tools/MaxComponent/plMorphSeqComp.cpp @@ -79,11 +79,11 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool SetupLayer(plMorphArray& morphArr, plMaxNode* baseNode, hsTArray* baseSpans, plErrorMsg* pErrMsg); + bool SetupLayer(plMorphArray& morphArr, plMaxNode* baseNode, hsTArray* baseSpans, plErrorMsg* pErrMsg); }; CLASS_DESC(plMorphLayComp, gMorphLayCompDesc, "Morph Layer", "MorphLay", COMP_TYPE_AVATAR, MORPHLAY_COMP_CID) @@ -109,7 +109,7 @@ plMorphLayComp::plMorphLayComp() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plMorphLayComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plMorphLayComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { const int num = fCompPB->Count(kDeltas); int i; @@ -129,17 +129,17 @@ hsBool plMorphLayComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plMorphLayComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plMorphLayComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plMorphLayComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plMorphLayComp::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plMorphLayComp::SetupLayer(plMorphArray& morphArr, plMaxNode* baseNode, hsTArray* baseSpans, plErrorMsg* pErrMsg) +bool plMorphLayComp::SetupLayer(plMorphArray& morphArr, plMaxNode* baseNode, hsTArray* baseSpans, plErrorMsg* pErrMsg) { const int num = fCompPB->Count(kDeltas); int i; @@ -211,10 +211,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -275,7 +275,7 @@ ParamBlockDesc2 gMorphSeqBk end ); -hsBool plMorphSeqComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plMorphSeqComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { plMaxNode* baseNode = (plMaxNode*)fCompPB->GetINode(kBaseNode); if( !baseNode ) @@ -291,12 +291,12 @@ hsBool plMorphSeqComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plMorphSeqComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plMorphSeqComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plMorphSeqComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plMorphSeqComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { const char* dbgNodeName = node->GetName(); @@ -346,7 +346,7 @@ hsBool plMorphSeqComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plMorphSeqComp::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) +bool plMorphSeqComp::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } diff --git a/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp b/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp index 21f6761a..61624d5d 100644 --- a/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp +++ b/Sources/Tools/MaxComponent/plMultistageBehComponent.cpp @@ -98,9 +98,9 @@ public: plKey GetMultiStageBehKey(plMaxNode *node); - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void AddReceiverKey(plKey pKey, plMaxNode* node=nil); @@ -148,7 +148,7 @@ plMultistageBehComponent::~plMultistageBehComponent() } -hsBool plMultistageBehComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plMultistageBehComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetForceLocal(true); fReceivers.clear(); @@ -186,7 +186,7 @@ void plMultistageBehComponent::IGetReceivers(plMaxNode* node, std::vector // // PreConvert done below // -hsBool plMultistageBehComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plMultistageBehComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { //create the modifier here so that other components can find it plMultistageBehMod *mod = new plMultistageBehMod; @@ -196,7 +196,7 @@ hsBool plMultistageBehComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg return true; } -hsBool plMultistageBehComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plMultistageBehComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { // Create the stage vector plAnimStageVec* animStages = new plAnimStageVec; @@ -486,9 +486,9 @@ public: MaxStream(ILoad* iload) : fSave(nil), fLoad(iload) {} // Don't support any of this - virtual hsBool Open(const char *, const char * = "rb") { hsAssert(0, "Not supported"); return false; } - virtual hsBool Open(const wchar_t *, const wchar_t * = L"rb") { hsAssert(0, "Not supported"); return false; } - virtual hsBool Close() { hsAssert(0, "Not supported"); return false; } + virtual bool Open(const char *, const char * = "rb") { hsAssert(0, "Not supported"); return false; } + virtual bool Open(const wchar_t *, const wchar_t * = L"rb") { hsAssert(0, "Not supported"); return false; } + virtual bool Close() { hsAssert(0, "Not supported"); return false; } virtual void Skip(uint32_t deltaByteCount) { hsAssert(0, "Not supported"); } virtual void Rewind() { hsAssert(0, "Not supported"); } @@ -519,9 +519,9 @@ IOResult plMultistageBehComponent::Save(ISave* isave) isave->BeginChunk(kMultiStage); MaxStream multiChunk(isave); multiChunk.WriteLE32(3); - multiChunk.Writebool(fFreezePhys); - multiChunk.Writebool(fSmartSeek); - multiChunk.Writebool(fReverseFBOnRelease); + multiChunk.WriteBool(fFreezePhys); + multiChunk.WriteBool(fSmartSeek); + multiChunk.WriteBool(fReverseFBOnRelease); isave->EndChunk(); int numStages = fStages.size(); @@ -555,16 +555,16 @@ IOResult plMultistageBehComponent::Load(ILoad* iload) MaxStream multiChunk(iload); // all versions do this int version = multiChunk.ReadLE32(); - fFreezePhys = multiChunk.Readbool(); + fFreezePhys = multiChunk.ReadBool(); if(version > 1) // version 1 adds smart seek - fSmartSeek = multiChunk.Readbool(); + fSmartSeek = multiChunk.ReadBool(); else fSmartSeek = false; if(version > 2) - fReverseFBOnRelease = multiChunk.Readbool(); + fReverseFBOnRelease = multiChunk.ReadBool(); else fReverseFBOnRelease = false; } diff --git a/Sources/Tools/MaxComponent/plMultistageStage.cpp b/Sources/Tools/MaxComponent/plMultistageStage.cpp index d8cabea1..23693c79 100644 --- a/Sources/Tools/MaxComponent/plMultistageStage.cpp +++ b/Sources/Tools/MaxComponent/plMultistageStage.cpp @@ -48,39 +48,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAvatar/plAnimStage.h" -// We don't want to be subject to any changes to ReadSafeString, so we just keep -// our own version now. Unfortunately, some files were saved with a modified -// version of it, so we need to keep all the backwards compatability BS -char* MyReadSafeString(hsStream* s) -{ - char *name = nil; - uint16_t numChars = s->ReadLE16(); - - bool oldFormat = !(numChars & 0xf000); - if (oldFormat) - s->ReadLE16(); - - numChars &= ~0xf000; - hsAssert(numChars <= s->GetSizeLeft(), "Bad string"); - if (numChars > 0) - { - name = new char[numChars+1]; - s->Read(numChars, name); - name[numChars] = '\0'; - } - - return name; -} - -void MyWriteSafeString(hsStream* s, const char* str) -{ - int len = hsStrlen(str); - hsAssert(len<0xf000, "String too long"); - s->WriteLE16(len | 0xf000); - if (len > 0) - s->Write(len, str); -} - plBaseStage::plBaseStage() { fName = nil; @@ -139,15 +106,15 @@ void plBaseStage::SetName(const char* name) void plBaseStage::Read(hsStream *stream) { - int version = stream->ReadLE16(); + stream->ReadLE16(); delete [] fName; - fName = MyReadSafeString(stream); + fName = stream->ReadSafeString(); } void plBaseStage::Write(hsStream *stream) { stream->WriteLE16(1); - MyWriteSafeString(stream, fName); + stream->WriteSafeString(fName); } void plBaseStage::IBaseClone(plBaseStage* clone) @@ -189,21 +156,21 @@ void plStandardStage::Read(hsStream *stream) uint16_t version = stream->ReadLE16(); delete [] fAnimName; - fAnimName = MyReadSafeString(stream); + fAnimName = stream->ReadSafeString(); fNumLoops = stream->ReadLE32(); - fLoopForever = stream->Readbool(); + fLoopForever = stream->ReadBool(); fForward = stream->ReadByte(); fBackward = stream->ReadByte(); fStageAdvance = stream->ReadByte(); fStageRegress = stream->ReadByte(); fNotify = stream->ReadByte(); - fUseGlobalCoord = stream->Readbool(); + fUseGlobalCoord = stream->ReadBool(); if(version > 1) { // these guys were added in version 2 - fDoAdvanceTo = stream->Readbool(); + fDoAdvanceTo = stream->ReadBool(); fAdvanceTo = stream->ReadLE32(); - fDoRegressTo = stream->Readbool(); + fDoRegressTo = stream->ReadBool(); fRegressTo = stream->ReadLE32(); } } @@ -214,20 +181,20 @@ void plStandardStage::Write(hsStream *stream) stream->WriteLE16(2); - MyWriteSafeString(stream, fAnimName); + stream->WriteSafeString(fAnimName); stream->WriteLE32(fNumLoops); - stream->Writebool(fLoopForever); + stream->WriteBool(fLoopForever); stream->WriteByte(fForward); stream->WriteByte(fBackward); stream->WriteByte(fStageAdvance); stream->WriteByte(fStageRegress); stream->WriteByte(fNotify); - stream->Writebool(fUseGlobalCoord); + stream->WriteBool(fUseGlobalCoord); // these next 4 were added in version 2 - stream->Writebool(fDoAdvanceTo); + stream->WriteBool(fDoAdvanceTo); stream->WriteLE32(fAdvanceTo); - stream->Writebool(fDoRegressTo); + stream->WriteBool(fDoRegressTo); stream->WriteLE32(fRegressTo); } @@ -357,7 +324,7 @@ void plStandardStage::IGetAnimName() char buf[256]; edit->GetText(buf, sizeof(buf)); - if (!hsStrEQ(buf, fAnimName)) + if (strcmp(buf, fAnimName) != 0) { delete [] fAnimName; fAnimName = hsStrcpy(buf); diff --git a/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp b/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp index abfc2986..72b0c27e 100644 --- a/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp +++ b/Sources/Tools/MaxComponent/plNPCSpawnComp.cpp @@ -78,9 +78,9 @@ public: plKey GetNPCSpawnKey(plMaxNode *node); - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode* node,plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode* node,plErrorMsg *pErrMsg); private: // per-instance registry of all the modifiers that were created by this component @@ -157,7 +157,7 @@ bool plNPCSpawnComp::IIsValid() } // SETUPPROPERTIES -hsBool plNPCSpawnComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plNPCSpawnComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fMods.clear(); // clear out our cache of modifiers (used for interfacing to python & responder) @@ -178,7 +178,7 @@ hsBool plNPCSpawnComp::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) // PRECONVERT // We actually do the convert here so we're around for responder & python fixup -hsBool plNPCSpawnComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plNPCSpawnComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { if (IIsValid()) { @@ -200,7 +200,7 @@ hsBool plNPCSpawnComp::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) // CONVERT // We just attach to the scene object here. Not sure why we didn't do it at convert time; // I'm cribbing from Colin's modifications to the one shot component. -hsBool plNPCSpawnComp::Convert(plMaxNode* node, plErrorMsg *pErrMsg) +bool plNPCSpawnComp::Convert(plMaxNode* node, plErrorMsg *pErrMsg) { modmap::iterator i = fMods.find(node); diff --git a/Sources/Tools/MaxComponent/plNavigableComponents.cpp b/Sources/Tools/MaxComponent/plNavigableComponents.cpp index fbd57050..8fb21060 100644 --- a/Sources/Tools/MaxComponent/plNavigableComponents.cpp +++ b/Sources/Tools/MaxComponent/plNavigableComponents.cpp @@ -199,7 +199,7 @@ void plAvLadderComponent::CollectNonDrawables(INodeTab& nonDrawables) AddTargetsToList(nonDrawables); } -hsBool plAvLadderComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAvLadderComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fKeys.Reset(); @@ -251,7 +251,7 @@ hsBool plAvLadderComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg return true; } -hsBool plAvLadderComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAvLadderComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { plMaxNode *ladderNode = (plMaxNode*)fCompPB->GetINode(kLadderNode); if (!ladderNode) @@ -279,12 +279,12 @@ hsBool plAvLadderComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plAvLadderComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAvLadderComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plAvLadderComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) +bool plAvLadderComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { fKeys.Reset(); return true; diff --git a/Sources/Tools/MaxComponent/plNavigableComponents.h b/Sources/Tools/MaxComponent/plNavigableComponents.h index 171794cb..12b79ab5 100644 --- a/Sources/Tools/MaxComponent/plNavigableComponents.h +++ b/Sources/Tools/MaxComponent/plNavigableComponents.h @@ -61,10 +61,10 @@ protected: public: plAvLadderComponent(); - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); // Call after PreConvert const LadderModKeys& GetLadderModKeys() { return fKeys; } diff --git a/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp b/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp index 8fe16d8a..ab8de2a4 100644 --- a/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp +++ b/Sources/Tools/MaxComponent/plObjectFlockerComponent.cpp @@ -212,7 +212,7 @@ plObjectFlockerComponent::plObjectFlockerComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plObjectFlockerComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plObjectFlockerComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetDrawable(!fCompPB->GetInt(ParamID(kHideTarget))); node->SetForceLocal(true); @@ -224,7 +224,7 @@ hsBool plObjectFlockerComponent::SetupProperties(plMaxNode *node, plErrorMsg *pE return true; } -hsBool plObjectFlockerComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plObjectFlockerComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { if (fFlocker) delete fFlocker; @@ -269,14 +269,14 @@ hsBool plObjectFlockerComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg return true; } -hsBool plObjectFlockerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plObjectFlockerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { node->AddModifier(fFlocker, plString::Null); return true; } -hsBool plObjectFlockerComponent::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) +bool plObjectFlockerComponent::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) { if( fFlocker ) fFlocker->GetKey()->UnRefObject(); diff --git a/Sources/Tools/MaxComponent/plObjectFlockerComponent.h b/Sources/Tools/MaxComponent/plObjectFlockerComponent.h index c18a0497..91a18979 100644 --- a/Sources/Tools/MaxComponent/plObjectFlockerComponent.h +++ b/Sources/Tools/MaxComponent/plObjectFlockerComponent.h @@ -66,10 +66,10 @@ public: }; plObjectFlockerComponent(); - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool DeInit(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool DeInit(plMaxNode* node, plErrorMsg* pErrMsg); protected: pfObjectFlocker* fFlocker; diff --git a/Sources/Tools/MaxComponent/plOneShotComponent.cpp b/Sources/Tools/MaxComponent/plOneShotComponent.cpp index b6b5d842..7bd87c29 100644 --- a/Sources/Tools/MaxComponent/plOneShotComponent.cpp +++ b/Sources/Tools/MaxComponent/plOneShotComponent.cpp @@ -120,9 +120,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode* node,plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode* node,plErrorMsg *pErrMsg); plKey GetOneShotKey(plMaxNode *node); @@ -214,7 +214,7 @@ bool plOneShotComponent::IsValid() return (animName && *animName != '\0'); } -hsBool plOneShotComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plOneShotComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fMods.clear(); @@ -236,7 +236,7 @@ hsBool plOneShotComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) // // PreConvert done below // -hsBool plOneShotComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plOneShotComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { if (IsValid()) { @@ -251,16 +251,16 @@ hsBool plOneShotComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) // // Convert Done below // -hsBool plOneShotComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) +bool plOneShotComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg) { if (fMods.find(node) != fMods.end()) { const char *animName = fCompPB->GetStr(kAnimName); - hsBool drivable = fCompPB->GetInt(kControlSpeedBool); - hsBool reversable = fCompPB->GetInt(kPlayBackwardsBool); + bool drivable = fCompPB->GetInt(kControlSpeedBool); + bool reversable = fCompPB->GetInt(kPlayBackwardsBool); float seekDuration = fCompPB->GetFloat(kSeekTimeFloat); - hsBool smartSeek = fCompPB->GetInt(kSmartSeekBool); - hsBool noSeek = fCompPB->GetInt(kNoSeekBool); + bool smartSeek = fCompPB->GetInt(kSmartSeekBool); + bool noSeek = fCompPB->GetInt(kNoSeekBool); plOneShotMod *mod = fMods[node]; mod->Init(animName, drivable, reversable, seekDuration, smartSeek, noSeek); diff --git a/Sources/Tools/MaxComponent/plParticleComponents.cpp b/Sources/Tools/MaxComponent/plParticleComponents.cpp index 3bee66b9..1142151b 100644 --- a/Sources/Tools/MaxComponent/plParticleComponents.cpp +++ b/Sources/Tools/MaxComponent/plParticleComponents.cpp @@ -108,7 +108,7 @@ const char *plParticleCoreComponent::GenStrings[] = // line these up with the ge "One Per Vertex" }; -hsBool plParticleCoreComponent::IsParticleSystemComponent(plComponentBase *comp) +bool plParticleCoreComponent::IsParticleSystemComponent(plComponentBase *comp) { if (comp->ClassID() == PARTICLE_SYSTEM_COMPONENT_CLASS_ID) return true; @@ -116,7 +116,7 @@ hsBool plParticleCoreComponent::IsParticleSystemComponent(plComponentBase *comp) return false; } -hsBool plParticleCoreComponent::NodeHasSystem(plMaxNode *pNode) +bool plParticleCoreComponent::NodeHasSystem(plMaxNode *pNode) { int i; for (i = 0; i < pNode->NumAttachedComponents(); i++) @@ -127,7 +127,7 @@ hsBool plParticleCoreComponent::NodeHasSystem(plMaxNode *pNode) return false; } -hsBool plParticleCoreComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plParticleCoreComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { GetParamVals( pNode ); pNode->SetForceLocal(true); @@ -160,7 +160,7 @@ hsBool plParticleCoreComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg return true; } -hsBool plParticleCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plParticleCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { int32_t i, j, k; @@ -511,9 +511,9 @@ void plParticleCoreComponent::IHandleLights(plLightGrpComponent* liGrp, plPartic } } -hsBool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) +bool plParticleCoreComponent::AddToAnim(plAGAnim *anim, plMaxNode *node) { - hsBool result = false; + bool result = false; plController *ctl; hsControlConverter& cc = hsControlConverter::Instance(); @@ -659,7 +659,7 @@ public: void IValidateSpinners(TimeValue t, IParamBlock2 *pb, IParamMap2 *map, uint32_t id) { uint32_t minIndex, maxIndex; - hsBool adjustMin; + bool adjustMin; switch(id) { case IDC_COMP_PARTICLE_VELMIN: @@ -896,7 +896,7 @@ plParticleComponent::plParticleComponent() } // Gets values from the ParamBlock and passes them to the Convert -hsBool plParticleComponent::GetParamVals(plMaxNode *pNode) +bool plParticleComponent::GetParamVals(plMaxNode *pNode) { fUserInput.fGenType = fCompPB->GetInt(kGenType); fUserInput.fConeAngle = fCompPB->GetFloat(kConeAngle); @@ -924,7 +924,7 @@ hsBool plParticleComponent::GetParamVals(plMaxNode *pNode) // Particle Effects Base class // Make sure any new Effect you add is accounted for here, or it won't get converted. -hsBool plParticleEffectComponent::IsParticleEffectComponent(plComponentBase *comp) +bool plParticleEffectComponent::IsParticleEffectComponent(plComponentBase *comp) { if (comp->ClassID() == PARTICLE_FADE_COMPONENT_CLASS_ID || comp->ClassID() == PARTICLE_VOLUME_COMPONENT_CLASS_ID || @@ -936,15 +936,15 @@ hsBool plParticleEffectComponent::IsParticleEffectComponent(plComponentBase *com return false; } -hsBool plParticleEffectComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plParticleEffectComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fEffect = nil; return true; } -hsBool plParticleEffectComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plParticleEffectComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { - hsBool valid = plParticleCoreComponent::NodeHasSystem(node); + bool valid = plParticleCoreComponent::NodeHasSystem(node); if (!valid) { pErrMsg->Set(true, node->GetName(), "Node has a particle effect component, " @@ -1022,7 +1022,7 @@ void plParticleVolumeComponent::CollectNonDrawables(INodeTab& nonDrawables) nonDrawables.Append(1, &source); } -hsBool plParticleVolumeComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plParticleVolumeComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { if (!plParticleEffectComponent::PreConvert(pNode, pErrMsg)) return false; @@ -1425,7 +1425,7 @@ public: void IValidateSpinners(TimeValue t, IParamBlock2 *pb, IParamMap2 *map, uint32_t id) { uint32_t minIndex, maxIndex; - hsBool adjustMin; + bool adjustMin; switch(id) { case IDC_FLOCK_GOAL_DIST: diff --git a/Sources/Tools/MaxComponent/plParticleComponents.h b/Sources/Tools/MaxComponent/plParticleComponents.h index 8757b8fb..f81e5f88 100644 --- a/Sources/Tools/MaxComponent/plParticleComponents.h +++ b/Sources/Tools/MaxComponent/plParticleComponents.h @@ -79,7 +79,7 @@ public: uint32_t fYTiles; uint32_t fNormal; uint32_t fOrientation; - hsBool fImmortal; + bool fImmortal; ParticleStats() : fConeAngle(0.5), fVelocityMin(30.0), fVelocityMax(50.0), fLifeMin(5.0), fLifeMax(10.0), fPPS(20.0), fScaleMin(80), fScaleMax(120), fGravity(100), fDrag(0), fWindMult(1.f), fMassRange(0), fRotRange(0), @@ -122,12 +122,12 @@ public: }; virtual void DeleteThis() { delete this; } - static hsBool IsParticleSystemComponent(plComponentBase *comp); - static hsBool NodeHasSystem(plMaxNode *pNode); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool AddToAnim(plAGAnim *anim, plMaxNode *node); - virtual hsBool GetParamVals(plMaxNode *pNode) = 0; + static bool IsParticleSystemComponent(plComponentBase *comp); + static bool NodeHasSystem(plMaxNode *pNode); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool AddToAnim(plAGAnim *anim, plMaxNode *node); + virtual bool GetParamVals(plMaxNode *pNode) = 0; void SetParticleStats(plParticleMtl *mtl); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } @@ -150,7 +150,7 @@ public: static bool fAllowUnhide; plParticleComponent(); - hsBool GetParamVals(plMaxNode *pNode); + bool GetParamVals(plMaxNode *pNode); virtual bool AllowUnhide() { return fAllowUnhide; } @@ -172,12 +172,12 @@ public: plParticleEffectComponent() : fEffect(nil) {} virtual void DeleteThis() { delete this; } - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return TRUE; }; + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return TRUE; }; virtual void AddToParticleSystem(plParticleSystem *sys, plMaxNode *node) = 0; - static hsBool IsParticleEffectComponent(plComponentBase *comp); + static bool IsParticleEffectComponent(plComponentBase *comp); }; ////////////////////////////////////////////////////////////////////////////////////////// @@ -225,7 +225,7 @@ public: plParticleVolumeComponent(); virtual void DeleteThis() { delete this; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void AddToParticleSystem(plParticleSystem *sys, plMaxNode *node); void BuildVolume(plMaxNode *node); diff --git a/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp b/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp index 09ef493c..6ef45eb2 100644 --- a/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp +++ b/Sources/Tools/MaxComponent/plPhysConstraintComponents.cpp @@ -198,9 +198,9 @@ public: */ - hsBool GetParamVals(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool GetParamVals(plMaxNode *pNode, plErrorMsg *pErrMsg); - //! Detector PreConvert, takes in two variables and return a hsBool. + //! Detector PreConvert, takes in two variables and return a bool. /*! Calls the function MaybeMakeLocal() and Sets Drawable to false. @@ -208,14 +208,14 @@ public: \param node a plMaxNode ptr. \param pErrMsg a pErrMsg ptr. - \return A hsBool expressing the success of the operation. + \return A bool expressing the success of the operation. \sa DeleteThis(), plPhysicalCoreComponent(), Convert(), GetParamVals(), MaybeMakeLocal() and FixUpPhysical() */ - hsBool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode* node, plErrorMsg* plErrorMsg) { return true;} + bool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode* node, plErrorMsg* plErrorMsg) { return true;} - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; // @@ -334,7 +334,7 @@ plPhysHingeConstraintComponent::plPhysHingeConstraintComponent() // -hsBool plPhysHingeConstraintComponent::GetParamVals(plMaxNode *node,plErrorMsg *pErrMsg) +bool plPhysHingeConstraintComponent::GetParamVals(plMaxNode *node,plErrorMsg *pErrMsg) { return true; } @@ -346,7 +346,7 @@ hsBool plPhysHingeConstraintComponent::GetParamVals(plMaxNode *node,plErrorMsg * // -hsBool plPhysHingeConstraintComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPhysHingeConstraintComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { /* @@ -363,7 +363,7 @@ hsBool plPhysHingeConstraintComponent::SetupProperties(plMaxNode *pNode, plError */ /* - hsBool HasPhysFlag = false; + bool HasPhysFlag = false; for(int i = 0; i < pNode->NumAttachedComponents(); i++) { plComponentBase* thisComp = pNode->GetAttachedComponent(i); @@ -403,7 +403,7 @@ extern PlasmaToHavokQuat(Havok::Quaternion &a, hsQuat &b); -hsBool plPhysHingeConstraintComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPhysHingeConstraintComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plHingeConstraintMod* HMod = new plHingeConstraintMod; @@ -534,9 +534,9 @@ public: void SetDefaultTau(); void ValidateSections(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg* errMsg); - hsBool PreConvert(plMaxNode* node, plErrorMsg* errMsg); - hsBool Convert(plMaxNode* node, plErrorMsg* errMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg* errMsg); + bool PreConvert(plMaxNode* node, plErrorMsg* errMsg); + bool Convert(plMaxNode* node, plErrorMsg* errMsg); }; class plBridgeProc : public ParamMap2UserDlgProc @@ -640,7 +640,7 @@ void plPhysBridgeComponent::ValidateSections() } } -hsBool plPhysBridgeComponent::SetupProperties(plMaxNode* node, plErrorMsg* errMsg) +bool plPhysBridgeComponent::SetupProperties(plMaxNode* node, plErrorMsg* errMsg) { if (!fIsValidated) { @@ -668,14 +668,14 @@ hsBool plPhysBridgeComponent::SetupProperties(plMaxNode* node, plErrorMsg* errMs return true; } -hsBool plPhysBridgeComponent::PreConvert(plMaxNode* node, plErrorMsg* errMsg) +bool plPhysBridgeComponent::PreConvert(plMaxNode* node, plErrorMsg* errMsg) { fIsValidated = false; return true; } -hsBool plPhysBridgeComponent::Convert(plMaxNode* node, plErrorMsg* errMsg) +bool plPhysBridgeComponent::Convert(plMaxNode* node, plErrorMsg* errMsg) { plMaxNode* parent = nil; @@ -856,9 +856,9 @@ public: */ - hsBool GetParamVals(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool GetParamVals(plMaxNode *pNode, plErrorMsg *pErrMsg); - //! Detector PreConvert, takes in two variables and return a hsBool. + //! Detector PreConvert, takes in two variables and return a bool. /*! Calls the function MaybeMakeLocal() and Sets Drawable to false. @@ -866,14 +866,14 @@ public: \param node a plMaxNode ptr. \param pErrMsg a pErrMsg ptr. - \return A hsBool expressing the success of the operation. + \return A bool expressing the success of the operation. \sa DeleteThis(), plPhysicalCoreComponent(), Convert(), GetParamVals(), MaybeMakeLocal() and FixUpPhysical() */ - hsBool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode* node, plErrorMsg* plErrorMsg) { return true;} + bool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode* node, plErrorMsg* plErrorMsg) { return true;} - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -966,7 +966,7 @@ plStrongSpringConstraintComponent::plStrongSpringConstraintComponent() extern PlasmaToHavokQuat(Havok::Quaternion &a, hsQuat &b); -hsBool plStrongSpringConstraintComponent::GetParamVals(plMaxNode *node,plErrorMsg *pErrMsg) +bool plStrongSpringConstraintComponent::GetParamVals(plMaxNode *node,plErrorMsg *pErrMsg) { @@ -980,7 +980,7 @@ hsBool plStrongSpringConstraintComponent::GetParamVals(plMaxNode *node,plErrorMs // -hsBool plStrongSpringConstraintComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plStrongSpringConstraintComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { GetParamVals(pNode, pErrMsg); @@ -1040,7 +1040,7 @@ hsBool plStrongSpringConstraintComponent::SetupProperties(plMaxNode *pNode, plEr -hsBool plStrongSpringConstraintComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plStrongSpringConstraintComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plStrongSpringConstraintMod* HMod = new plStrongSpringConstraintMod; diff --git a/Sources/Tools/MaxComponent/plPhysicalComponents.cpp b/Sources/Tools/MaxComponent/plPhysicalComponents.cpp index b2a8b7ad..7ac147c2 100644 --- a/Sources/Tools/MaxComponent/plPhysicalComponents.cpp +++ b/Sources/Tools/MaxComponent/plPhysicalComponents.cpp @@ -84,14 +84,14 @@ void DummyCodeIncludeFuncPhys() // SetupProperties ----------------------------------------------------------------- // ---------------- -hsBool plPhysicCoreComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPhysicCoreComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } // PreConvert ---------------------------------------------------------------- // ----------- -hsBool plPhysicCoreComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPhysicCoreComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -109,7 +109,7 @@ void plPhysicCoreComponent::IFixBounds() // IGetProxy ---------------------------------------------------------------- // ---------- -hsBool plPhysicCoreComponent::IGetProxy(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPhysicCoreComponent::IGetProxy(plMaxNode *node, plErrorMsg *pErrMsg) { if (fCompPB->GetInt(kCustomBoundField)) { @@ -123,7 +123,7 @@ hsBool plPhysicCoreComponent::IGetProxy(plMaxNode *node, plErrorMsg *pErrMsg) // Convert ---------------------------------------------------------------- // -------- -hsBool plPhysicCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPhysicCoreComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -157,7 +157,7 @@ class plPhysDebugComponent : public plPhysicCoreComponent { public: plPhysDebugComponent(); - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables); }; @@ -303,7 +303,7 @@ void plPhysDebugComponent::CollectNonDrawables(INodeTab& nonDrawables) } -hsBool plPhysDebugComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) +bool plPhysDebugComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) { IFixBounds(); @@ -338,7 +338,7 @@ class plPhysTerrainComponent : public plPhysicCoreComponent { public: plPhysTerrainComponent(); - hsBool SetupProperties(plMaxNode* node,plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node,plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables); }; @@ -442,7 +442,7 @@ void ValidateGroups(IParamBlock2* pb, int memberID, int bounceID, plComponent* c } } -hsBool plPhysTerrainComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPhysTerrainComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { IFixBounds(); @@ -477,7 +477,7 @@ class plProxyTerrainComponent : public plPhysicCoreComponent { public: plProxyTerrainComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -546,7 +546,7 @@ plProxyTerrainComponent::plProxyTerrainComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plProxyTerrainComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) +bool plProxyTerrainComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) { IFixBounds(); node->SetDrawable(false); @@ -592,7 +592,7 @@ class plCameraBlockerComponent : public plPhysicCoreComponent public: plCameraBlockerComponent(); - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -631,7 +631,7 @@ plCameraBlockerComponent::plCameraBlockerComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plCameraBlockerComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plCameraBlockerComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { IFixBounds(); @@ -664,7 +664,7 @@ class plPhysSimpleComponent : public plPhysicCoreComponent { public: plPhysSimpleComponent(); - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables); }; @@ -771,7 +771,7 @@ void plPhysSimpleComponent::CollectNonDrawables(INodeTab& nonDrawables) } } -hsBool plPhysSimpleComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPhysSimpleComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { IFixBounds(); @@ -806,7 +806,7 @@ class plPhysBlockerComponent : public plPhysicCoreComponent { public: plPhysBlockerComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -871,7 +871,7 @@ plPhysBlockerComponent::plPhysBlockerComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plPhysBlockerComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPhysBlockerComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { IFixBounds(); @@ -905,7 +905,7 @@ class plPhysWalkableComponent : public plPhysicCoreComponent { public: plPhysWalkableComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -960,7 +960,7 @@ plPhysWalkableComponent::plPhysWalkableComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plPhysWalkableComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPhysWalkableComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { IFixBounds(); @@ -987,7 +987,7 @@ class plPhysClimbableComponent : public plPhysicCoreComponent { public: plPhysClimbableComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -1041,7 +1041,7 @@ plPhysClimbableComponent::plPhysClimbableComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plPhysClimbableComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPhysClimbableComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { IFixBounds(); @@ -1078,7 +1078,7 @@ public: void IValidateSpinners(TimeValue t, IParamBlock2 *pb, IParamMap2 *map, uint32_t id) { uint32_t minIndex, maxIndex; - hsBool adjustMin; + bool adjustMin; switch(id) { case IDC_SWIM_CURRENT_PULL_NEAR_DIST: @@ -1280,7 +1280,7 @@ plSwim2DComponent::plSwim2DComponent() // SetUpProperties ----------------------------------------------------------- // ---------------- -hsBool plSwim2DComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) +bool plSwim2DComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) { IFixBounds(); plPhysicalProps *physProps = nil; @@ -1310,7 +1310,7 @@ hsBool plSwim2DComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) return true; } -hsBool plSwim2DComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSwim2DComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { plSwimRegionInterface *swimInt = nil; int type = fCompPB->GetInt(ParamID(kSwimCurrentType)); @@ -1346,7 +1346,7 @@ hsBool plSwim2DComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) // Convert ------------------------------------------------------------ // -------- -hsBool plSwim2DComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSwim2DComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plMaxNode *detectorNode = (plMaxNode *)fCompPB->GetINode(kSwimDetectorNode); if (detectorNode && detectorNode->GetSceneObject()) @@ -1429,7 +1429,7 @@ class plPhysSwim3DComponent : public plPhysicCoreComponent { public: plPhysSwim3DComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -1483,7 +1483,7 @@ plPhysSwim3DComponent::plPhysSwim3DComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plPhysSwim3DComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPhysSwim3DComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { IFixBounds(); @@ -1585,8 +1585,8 @@ class plPhysSubWorldComponent : public plPhysicCoreComponent { public: plPhysSubWorldComponent(); - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); void IAddChildren(plMaxNode *node, plMaxNode* worldKey); }; @@ -1608,7 +1608,7 @@ plPhysSubWorldComponent::plPhysSubWorldComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plPhysSubWorldComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPhysSubWorldComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { IAddChildren(node, node); @@ -1618,7 +1618,7 @@ hsBool plPhysSubWorldComponent::SetupProperties(plMaxNode *node, plErrorMsg *pEr return true; } -hsBool plPhysSubWorldComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPhysSubWorldComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -1686,9 +1686,9 @@ class plSubworldDetectorComponent : public plPhysicCoreComponent public: plSubworldDetectorComponent(); - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -1737,7 +1737,7 @@ plSubworldDetectorComponent::plSubworldDetectorComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plSubworldDetectorComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plSubworldDetectorComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetForceLocal(true); pNode->SetDrawable(false); @@ -1755,12 +1755,12 @@ hsBool plSubworldDetectorComponent::SetupProperties(plMaxNode *pNode, plErrorMsg return true; } -hsBool plSubworldDetectorComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSubworldDetectorComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plSubworldDetectorComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSubworldDetectorComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plSceneObject *obj = node->GetSceneObject(); plLocation loc = node->GetLocation(); @@ -1824,9 +1824,9 @@ public: plPanicLinkDetectorComponent(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; @@ -1854,7 +1854,7 @@ plPanicLinkDetectorComponent::plPanicLinkDetectorComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plPanicLinkDetectorComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plPanicLinkDetectorComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetForceLocal(true); pNode->SetDrawable(false); @@ -1871,12 +1871,12 @@ hsBool plPanicLinkDetectorComponent::SetupProperties(plMaxNode *pNode, plErrorMs return true; } -hsBool plPanicLinkDetectorComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPanicLinkDetectorComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plPanicLinkDetectorComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPanicLinkDetectorComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plSceneObject *obj = node->GetSceneObject(); plLocation loc = node->GetLocation(); @@ -1904,8 +1904,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary below. @@ -1929,7 +1929,7 @@ plShootableComponent::plShootableComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plShootableComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) +bool plShootableComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMsg) { plPhysicalProps *props = node->GetPhysicalProps(); @@ -1944,7 +1944,7 @@ hsBool plShootableComponent::SetupProperties(plMaxNode *node, plErrorMsg *errMs return true; } -hsBool plShootableComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plShootableComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } @@ -1953,9 +1953,9 @@ class plRideAnimatedPhysicalComponent : public plPhysicCoreComponent public: plRideAnimatedPhysicalComponent(); void DeleteThis(){delete this;} - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void CollectNonDrawables(INodeTab& nonDrawables) { AddTargetsToList(nonDrawables); } }; CLASS_DESC(plRideAnimatedPhysicalComponent , gRideAnimatedPhysicalComponent, "RideAnimPhysReg", "RideAnimatedPhysicalRegion", COMP_TYPE_PHYSICAL, Class_ID(0xaf305963, 0x63a246df)); @@ -1978,7 +1978,7 @@ plRideAnimatedPhysicalComponent::plRideAnimatedPhysicalComponent() fClassDesc = &gRideAnimatedPhysicalComponent; fClassDesc->MakeAutoParamBlocks(this); } -hsBool plRideAnimatedPhysicalComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plRideAnimatedPhysicalComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetForceLocal(true); pNode->SetDrawable(false); @@ -1993,12 +1993,12 @@ hsBool plRideAnimatedPhysicalComponent::SetupProperties(plMaxNode *pNode, plErro physProps->SetBoundsType(fCompPB->GetInt(kBoundCondRadio), pNode, pErrMsg); return true; } -hsBool plRideAnimatedPhysicalComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plRideAnimatedPhysicalComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plRideAnimatedPhysicalComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plRideAnimatedPhysicalComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plSceneObject *obj = node->GetSceneObject(); plLocation loc = node->GetLocation(); diff --git a/Sources/Tools/MaxComponent/plPhysicalComponents.h b/Sources/Tools/MaxComponent/plPhysicalComponents.h index e3f8ded8..b760c517 100644 --- a/Sources/Tools/MaxComponent/plPhysicalComponents.h +++ b/Sources/Tools/MaxComponent/plPhysicalComponents.h @@ -162,16 +162,16 @@ public: virtual void DeleteThis() { delete this; } - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); int CanConvertToType(Class_ID obtype) { return (obtype == PHYSICS_BASE_CID) ? 1 : plComponent::CanConvertToType(obtype); } protected: void IFixBounds(); - hsBool IGetProxy(plMaxNode *node, plErrorMsg *pErrMsg); + bool IGetProxy(plMaxNode *node, plErrorMsg *pErrMsg); uint32_t IGetEventGroup(ParamID paramID); }; @@ -180,9 +180,9 @@ class plSwim2DComponent : public plPhysicCoreComponent { public: plSwim2DComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); std::map fSwimRegions; diff --git a/Sources/Tools/MaxComponent/plPickNodeBase.h b/Sources/Tools/MaxComponent/plPickNodeBase.h index c45bd707..46edc80c 100644 --- a/Sources/Tools/MaxComponent/plPickNodeBase.h +++ b/Sources/Tools/MaxComponent/plPickNodeBase.h @@ -42,6 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plPickNodeBase_h_inc #define plPickNodeBase_h_inc +#include "HeadSpin.h" #include "max.h" #include diff --git a/Sources/Tools/MaxComponent/plPythonFileComponent.cpp b/Sources/Tools/MaxComponent/plPythonFileComponent.cpp index f08f0457..6e9cb6f7 100644 --- a/Sources/Tools/MaxComponent/plPythonFileComponent.cpp +++ b/Sources/Tools/MaxComponent/plPythonFileComponent.cpp @@ -97,7 +97,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plCommonPythonLib : public plCommonObjLib { public: - virtual hsBool IsInteresting( const plKey &objectKey ) + virtual bool IsInteresting( const plKey &objectKey ) { if( objectKey->GetUoid().GetClassType() == plPythonFileMod::Index() ) return true; @@ -149,9 +149,9 @@ protected: public: plPythonFileComponent(); - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); virtual void AddReceiverKey(plKey key, plMaxNode* node=nil) { fOthersKeys.Append(key); } @@ -170,7 +170,7 @@ public: virtual PythonKeys& GetKeys() { return fModKeys; } - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg) + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { fModKeys.clear(); fOthersKeys.Reset(); @@ -241,7 +241,7 @@ plPythonFileComponent::plPythonFileComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plPythonFileComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPythonFileComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { if (fPythonError.length() > 0) { @@ -254,7 +254,7 @@ hsBool plPythonFileComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrM return true; } -hsBool plPythonFileComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPythonFileComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { IParamBlock2 *pb = (IParamBlock2*)fCompPB->GetReferenceTarget(kPythonFilePB); plAutoUIBlock *block = FindAutoUI(pb); @@ -407,7 +407,7 @@ hsBool plPythonFileComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) #include "pnKeyedObject/plKey.h" #include "plResponderComponent.h" -hsBool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { IParamBlock2 *pb = (IParamBlock2*)fCompPB->GetReferenceTarget(kPythonFilePB); plAutoUIBlock *block = FindAutoUI(pb); @@ -464,7 +464,7 @@ hsBool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) case plAutoUIParam::kTypeSceneObj: { int numKeys = param->GetCount(pb); - hsBool found_atleast_one_good_one = false; + bool found_atleast_one_good_one = false; for (int i = 0; i < numKeys; i++) { plKey skey = param->GetKey(pb, i); @@ -490,7 +490,7 @@ hsBool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) case plAutoUIParam::kTypeComponent: { int count = param->GetCount(pb); - hsBool found_atleast_one_good_one = false; + bool found_atleast_one_good_one = false; for (int i = 0; i < count; i++) { plComponentBase *comp = param->GetComponent(pb, i); diff --git a/Sources/Tools/MaxComponent/plRepComponent.cpp b/Sources/Tools/MaxComponent/plRepComponent.cpp index 255bbe9a..13df6ad7 100644 --- a/Sources/Tools/MaxComponent/plRepComponent.cpp +++ b/Sources/Tools/MaxComponent/plRepComponent.cpp @@ -86,10 +86,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); int GetQuality(); int GetCapability(); @@ -161,22 +161,22 @@ plRepresentComp::plRepresentComp() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plRepresentComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRepresentComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plRepresentComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRepresentComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plRepresentComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRepresentComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plRepresentComp::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRepresentComp::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } @@ -261,7 +261,7 @@ public: void IGetQC(int quals[], int caps[]); - hsBool ComputeAndValidate(plErrorMsg* pErrMsg, int quals[], int caps[], plLoadMask masks[]); + bool ComputeAndValidate(plErrorMsg* pErrMsg, int quals[], int caps[], plLoadMask masks[]); void CleanDeadNodes(); public: @@ -270,12 +270,12 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Validate(plErrorMsg* pErrMsg); + bool Validate(plErrorMsg* pErrMsg); }; void plRepGroupComp::CleanDeadNodes() @@ -400,7 +400,7 @@ void plRepGroupComp::IGetQC(int quals[], int caps[]) caps[i] = rep->GetCapability(); } } -hsBool plRepGroupComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRepGroupComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { const int numReps = fCompPB->Count(kReps); hsTArray quals(numReps); @@ -421,22 +421,22 @@ hsBool plRepGroupComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plRepGroupComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRepGroupComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plRepGroupComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRepGroupComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plRepGroupComp::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) +bool plRepGroupComp::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plRepGroupComp::ComputeAndValidate(plErrorMsg* pErrMsg, int quals[], int caps[], plLoadMask masks[]) +bool plRepGroupComp::ComputeAndValidate(plErrorMsg* pErrMsg, int quals[], int caps[], plLoadMask masks[]) { const int numReps = fCompPB->Count(kReps); uint32_t preVal = plLoadMask::ValidateReps(numReps, quals, caps); @@ -457,7 +457,7 @@ hsBool plRepGroupComp::ComputeAndValidate(plErrorMsg* pErrMsg, int quals[], int } } - hsBool val = plLoadMask::ComputeRepMasks(numReps, quals, caps, masks); + bool val = plLoadMask::ComputeRepMasks(numReps, quals, caps, masks); uint32_t postVal = plLoadMask::ValidateMasks(numReps, masks); @@ -480,7 +480,7 @@ hsBool plRepGroupComp::ComputeAndValidate(plErrorMsg* pErrMsg, int quals[], int return !(preVal || val || postVal); } -hsBool plRepGroupComp::Validate(plErrorMsg* pErrMsg) +bool plRepGroupComp::Validate(plErrorMsg* pErrMsg) { CleanDeadNodes(); diff --git a/Sources/Tools/MaxComponent/plResponderComponent.cpp b/Sources/Tools/MaxComponent/plResponderComponent.cpp index a6cabda4..60fb170d 100644 --- a/Sources/Tools/MaxComponent/plResponderComponent.cpp +++ b/Sources/Tools/MaxComponent/plResponderComponent.cpp @@ -314,7 +314,7 @@ plResponderComponent::plResponderComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plResponderComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plResponderComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { int numStates = fCompPB->Count(kResponderState); for (int i = 0; i < numStates; i++) @@ -332,7 +332,7 @@ hsBool plResponderComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMs return true; } -hsBool plResponderComponent::PreConvert(plMaxNode *node,plErrorMsg *pErrMsg) +bool plResponderComponent::PreConvert(plMaxNode *node,plErrorMsg *pErrMsg) { plSceneObject* rObj = node->GetSceneObject(); plLocation loc = node->GetLocation(); @@ -367,7 +367,7 @@ plResponderModifier* plResponderComponent::IGetResponderMod(plMaxNode* node) return plResponderModifier::ConvertNoRef(responderKey->GetObjectPtr()); } -hsBool plResponderComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plResponderComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { IFixOldPB(); @@ -410,7 +410,7 @@ hsBool plResponderComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plResponderComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) +bool plResponderComponent::DeInit(plMaxNode *node, plErrorMsg *pErrMsg) { fModKeys.clear(); return true; diff --git a/Sources/Tools/MaxComponent/plResponderComponentPriv.h b/Sources/Tools/MaxComponent/plResponderComponentPriv.h index 8f14921b..19f007c0 100644 --- a/Sources/Tools/MaxComponent/plResponderComponentPriv.h +++ b/Sources/Tools/MaxComponent/plResponderComponentPriv.h @@ -53,10 +53,10 @@ public: plResponderComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode *node,plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node,plErrorMsg *pErrMsg); - hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode *node,plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node,plErrorMsg *pErrMsg); + bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); // All classes derived from plResponderComponent can be picked from the activator component, // because they can convert to the responder type. diff --git a/Sources/Tools/MaxComponent/plResponderLink.cpp b/Sources/Tools/MaxComponent/plResponderLink.cpp index 4ca2db98..1c97d009 100644 --- a/Sources/Tools/MaxComponent/plResponderLink.cpp +++ b/Sources/Tools/MaxComponent/plResponderLink.cpp @@ -332,7 +332,7 @@ void plResponderLinkProc::ILoadAgeFilenamesCombo(HWND hWnd, IParamBlock2 *pb) int idx = SendMessage(hAge, CB_ADDSTRING, 0, (LPARAM)name); - if (hsStrEQ(name, savedName)) + if (strcmp(name, savedName) == 0) SendMessage(hAge, CB_SETCURSEL, idx, 0); } } @@ -369,7 +369,7 @@ void plResponderLinkProc::ILoadParentAgeFilenamesCombo(HWND hWnd, IParamBlock2 * int idx = SendMessage(hAge, CB_ADDSTRING, 0, (LPARAM)name); - if (hsStrEQ(name, savedName)) + if (strcmp(name, savedName) == 0) SendMessage(hAge, CB_SETCURSEL, idx, 0); } } @@ -1096,7 +1096,7 @@ plMessage *plResponderCmdCamTransition::CreateMsg(plMaxNode* node, plErrorMsg *p plMaxNode *pCamNode = (plMaxNode*)pb->GetINode(kCameraObj); if (!pCamNode) throw "No Camera Specified"; - hsBool fail = true; + bool fail = true; int count = pCamNode->NumAttachedComponents(); for (uint32_t x = 0; x < count; x++) { diff --git a/Sources/Tools/MaxComponent/plResponderMtl.cpp b/Sources/Tools/MaxComponent/plResponderMtl.cpp index 494d42e2..5c1e323b 100644 --- a/Sources/Tools/MaxComponent/plResponderMtl.cpp +++ b/Sources/Tools/MaxComponent/plResponderMtl.cpp @@ -607,12 +607,12 @@ protected: void ISetUserType(plMaxNode* node, const char* userType) { - if (hsStrEQ(userType, kUserTypeAll)) + if (strcmp(userType, kUserTypeAll) == 0) { ISetNodeValue(nil); fPB->SetValue(fTypeID, 0, kNodePB); } - else if (hsStrEQ(userType, kResponderNodeName)) + else if (strcmp(userType, kResponderNodeName) == 0) { ISetNodeValue(nil); fPB->SetValue(fTypeID, 0, kNodeResponder); diff --git a/Sources/Tools/MaxComponent/plSeekPoint.cpp b/Sources/Tools/MaxComponent/plSeekPoint.cpp index 47194a31..b61980be 100644 --- a/Sources/Tools/MaxComponent/plSeekPoint.cpp +++ b/Sources/Tools/MaxComponent/plSeekPoint.cpp @@ -78,9 +78,9 @@ public: plSeekPointComponent(); void DeleteThis() { delete this; } - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - //hsBool IsValidNodeType(plMaxNode *pNode); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + //bool IsValidNodeType(plMaxNode *pNode); }; //Max desc stuff necessary. @@ -103,7 +103,7 @@ plSeekPointComponent::plSeekPointComponent() } // CONVERT -hsBool plSeekPointComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSeekPointComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { const char *objName = node->GetName(); char *name = new char[strlen(objName) + 1]; @@ -116,13 +116,13 @@ hsBool plSeekPointComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) } // PRECONVERT -hsBool plSeekPointComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plSeekPointComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { pNode->SetForceLocal(true); return true; } -/*hsBool IsValidNodeType(plMaxNode *pNode) +/*bool IsValidNodeType(plMaxNode *pNode) { Object *obj = pNode->EvalWorldState(hsConverterUtils::Instance().GetTime(pNode->GetInterface())).obj; if(obj->SuperClassID() == CAMERA_CLASS_ID) diff --git a/Sources/Tools/MaxComponent/plShadowComponents.cpp b/Sources/Tools/MaxComponent/plShadowComponents.cpp index 4f41600f..58900ea6 100644 --- a/Sources/Tools/MaxComponent/plShadowComponents.cpp +++ b/Sources/Tools/MaxComponent/plShadowComponents.cpp @@ -196,7 +196,7 @@ plShadowCastComponent::plShadowCastComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plShadowCastComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plShadowCastComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plSceneObject* so = node->GetSceneObject(); if( !so ) @@ -225,18 +225,18 @@ hsBool plShadowCastComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plShadowCastComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plShadowCastComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { fCaster = nil; return true; } -hsBool plShadowCastComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plShadowCastComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) { return true; } -hsBool plShadowCastComponent::AddShadowCastModifier(plMaxNode* pNode, plShadowCaster* caster) +bool plShadowCastComponent::AddShadowCastModifier(plMaxNode* pNode, plShadowCaster* caster) { if( !pNode->CanConvert() ) return false; @@ -248,7 +248,7 @@ hsBool plShadowCastComponent::AddShadowCastModifier(plMaxNode* pNode, plShadowCa return plShadowCastComponent::AddShadowCastModifier(so, caster); } -hsBool plShadowCastComponent::AddShadowCastModifier(plSceneObject* so, plShadowCaster* caster) +bool plShadowCastComponent::AddShadowCastModifier(plSceneObject* so, plShadowCaster* caster) { // First off, ensure that we NEVER NEVER NEVER have more than one shadowcaster on an object. // That would be BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD. @@ -293,12 +293,12 @@ plShadowRcvComponent::plShadowRcvComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plShadowRcvComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plShadowRcvComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plShadowRcvComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plShadowRcvComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { if( fCompPB->GetInt(kForceRadio) == kForceOn ) { @@ -313,7 +313,7 @@ hsBool plShadowRcvComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErr return true; } -hsBool plShadowRcvComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plShadowRcvComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) { return true; } @@ -382,7 +382,7 @@ plShadowLightComponent::plShadowLightComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plShadowLightComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plShadowLightComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plSceneObject* so = node->GetSceneObject(); if( !so ) @@ -413,7 +413,7 @@ hsBool plShadowLightComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plShadowLightComponent::IAddDirectMaster(plMaxNode* node, plSceneObject* so) +bool plShadowLightComponent::IAddDirectMaster(plMaxNode* node, plSceneObject* so) { plDirectShadowMaster* directMaster = new plDirectShadowMaster; @@ -432,7 +432,7 @@ hsBool plShadowLightComponent::IAddDirectMaster(plMaxNode* node, plSceneObject* return true; } -hsBool plShadowLightComponent::IAddPointMaster(plMaxNode* node, plSceneObject* so) +bool plShadowLightComponent::IAddPointMaster(plMaxNode* node, plSceneObject* so) { plPointShadowMaster* pointMaster = new plPointShadowMaster; @@ -452,12 +452,12 @@ hsBool plShadowLightComponent::IAddPointMaster(plMaxNode* node, plSceneObject* s return true; } -hsBool plShadowLightComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plShadowLightComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } -hsBool plShadowLightComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) +bool plShadowLightComponent::PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg) { return true; } diff --git a/Sources/Tools/MaxComponent/plShadowComponents.h b/Sources/Tools/MaxComponent/plShadowComponents.h index a2aea65d..540aeb44 100644 --- a/Sources/Tools/MaxComponent/plShadowComponents.h +++ b/Sources/Tools/MaxComponent/plShadowComponents.h @@ -72,12 +72,12 @@ protected: public: plShadowCastComponent(); - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - static hsBool AddShadowCastModifier(plMaxNode* pNode, plShadowCaster* caster); - static hsBool AddShadowCastModifier(plSceneObject* so, plShadowCaster* caster); + static bool AddShadowCastModifier(plMaxNode* pNode, plShadowCaster* caster); + static bool AddShadowCastModifier(plSceneObject* so, plShadowCaster* caster); }; class plShadowRcvComponent : public plComponent @@ -95,9 +95,9 @@ enum public: plShadowRcvComponent(); - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; class plShadowLightComponent : public plComponent @@ -113,15 +113,15 @@ public: kQuality }; protected: - hsBool IAddDirectMaster(plMaxNode* node, plSceneObject* so); - hsBool IAddPointMaster(plMaxNode* node, plSceneObject* so); + bool IAddDirectMaster(plMaxNode* node, plSceneObject* so); + bool IAddPointMaster(plMaxNode* node, plSceneObject* so); public: plShadowLightComponent(); - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode* pNode, plErrorMsg* pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; diff --git a/Sources/Tools/MaxComponent/plSmoothComponent.cpp b/Sources/Tools/MaxComponent/plSmoothComponent.cpp index 88840ce7..d528f84c 100644 --- a/Sources/Tools/MaxComponent/plSmoothComponent.cpp +++ b/Sources/Tools/MaxComponent/plSmoothComponent.cpp @@ -87,11 +87,11 @@ public: kSmoothColor }; protected: - hsBool fDoneThis; - hsBool IDoSmooth(plErrorMsg* pErrMsg, hsTArray& spans); - hsBool IGetSpans(plErrorMsg* pErrMsg, hsTArray& spans); - hsBool IReShade(plErrorMsg* pErrMsg); - hsBool ISmoothAll(plErrorMsg* pErrMsg); + bool fDoneThis; + bool IDoSmooth(plErrorMsg* pErrMsg, hsTArray& spans); + bool IGetSpans(plErrorMsg* pErrMsg, hsTArray& spans); + bool IReShade(plErrorMsg* pErrMsg); + bool ISmoothAll(plErrorMsg* pErrMsg); public: plSmoothComponent(); void DeleteThis() { delete this; } @@ -99,9 +99,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary below. @@ -140,14 +140,14 @@ plSmoothComponent::plSmoothComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plSmoothComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSmoothComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { ISmoothAll(pErrMsg); return true; } -hsBool plSmoothComponent::ISmoothAll(plErrorMsg* pErrMsg) +bool plSmoothComponent::ISmoothAll(plErrorMsg* pErrMsg) { if( !fDoneThis ) { @@ -162,7 +162,7 @@ hsBool plSmoothComponent::ISmoothAll(plErrorMsg* pErrMsg) return true; } -hsBool plSmoothComponent::IGetSpans(plErrorMsg* pErrMsg, hsTArray& spans) +bool plSmoothComponent::IGetSpans(plErrorMsg* pErrMsg, hsTArray& spans) { spans.SetCount(0); @@ -202,7 +202,7 @@ hsBool plSmoothComponent::IGetSpans(plErrorMsg* pErrMsg, hsTArray& spans) +bool plSmoothComponent::IDoSmooth(plErrorMsg* pErrMsg, hsTArray& spans) { // if( spans.GetCount() > 1 ) { @@ -219,7 +219,7 @@ hsBool plSmoothComponent::IDoSmooth(plErrorMsg* pErrMsg, hsTArray& spans); - hsBool IGetSpans(plErrorMsg* pErrMsg, hsTArray& spans); - hsBool IReShade(plErrorMsg* pErrMsg); - hsBool ISmoothAll(plErrorMsg* pErrMsg); + bool fDoneThis; + bool IDoSmooth(plErrorMsg* pErrMsg, hsTArray& spans); + bool IGetSpans(plErrorMsg* pErrMsg, hsTArray& spans); + bool IReShade(plErrorMsg* pErrMsg); + bool ISmoothAll(plErrorMsg* pErrMsg); public: plSmoothAvComponent(); void DeleteThis() { delete this; } @@ -264,9 +264,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary below. @@ -307,14 +307,14 @@ plSmoothAvComponent::plSmoothAvComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plSmoothAvComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSmoothAvComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { ISmoothAll(pErrMsg); return true; } -hsBool plSmoothAvComponent::ISmoothAll(plErrorMsg* pErrMsg) +bool plSmoothAvComponent::ISmoothAll(plErrorMsg* pErrMsg) { if( !fDoneThis ) { @@ -329,7 +329,7 @@ hsBool plSmoothAvComponent::ISmoothAll(plErrorMsg* pErrMsg) return true; } -hsBool plSmoothAvComponent::IGetSpans(plErrorMsg* pErrMsg, hsTArray& spans) +bool plSmoothAvComponent::IGetSpans(plErrorMsg* pErrMsg, hsTArray& spans) { spans.SetCount(0); @@ -356,7 +356,7 @@ hsBool plSmoothAvComponent::IGetSpans(plErrorMsg* pErrMsg, hsTArray& spans) +bool plSmoothAvComponent::IDoSmooth(plErrorMsg* pErrMsg, hsTArray& spans) { if( spans.GetCount() > 1 ) { @@ -372,7 +372,7 @@ hsBool plSmoothAvComponent::IDoSmooth(plErrorMsg* pErrMsg, hsTArrayMakeAutoParamBlocks(this); } -hsBool plSmoothBaseComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSmoothBaseComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { node->SetDrawable(false); if (!node->GetSwappableGeom()) @@ -469,7 +469,7 @@ hsBool plSmoothBaseComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrM return true; } -hsBool plSmoothBaseComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSmoothBaseComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { GetSpans(pErrMsg); return true; @@ -565,14 +565,14 @@ public: kSmoothPos }; protected: - hsBool fDoneThis; + bool fDoneThis; hsTArray& IGetSrcSpans(plErrorMsg* pErrMsg); - hsBool IDoSmooth(plErrorMsg* pErrMsg, hsTArray& srcSpans, hsTArray& dstSpans); - hsBool IGetDstSpans(plErrorMsg* pErrMsg, hsTArray& spans); - hsBool IReShade(plErrorMsg* pErrMsg); - hsBool ISmoothAll(plErrorMsg* pErrMsg); + bool IDoSmooth(plErrorMsg* pErrMsg, hsTArray& srcSpans, hsTArray& dstSpans); + bool IGetDstSpans(plErrorMsg* pErrMsg, hsTArray& spans); + bool IReShade(plErrorMsg* pErrMsg); + bool ISmoothAll(plErrorMsg* pErrMsg); public: plSmoothSnapComponent(); void DeleteThis() { delete this; } @@ -580,9 +580,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { fDoneThis = false; return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; @@ -675,14 +675,14 @@ plSmoothSnapComponent::plSmoothSnapComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plSmoothSnapComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSmoothSnapComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { ISmoothAll(pErrMsg); return true; } -hsBool plSmoothSnapComponent::ISmoothAll(plErrorMsg* pErrMsg) +bool plSmoothSnapComponent::ISmoothAll(plErrorMsg* pErrMsg) { if( !fDoneThis ) { @@ -715,7 +715,7 @@ hsTArray& plSmoothSnapComponent::IGetSrcSpans(plErrorMs return baseComp->GetSpans(pErrMsg); } -hsBool plSmoothSnapComponent::IGetDstSpans(plErrorMsg* pErrMsg, hsTArray& spans) +bool plSmoothSnapComponent::IGetDstSpans(plErrorMsg* pErrMsg, hsTArray& spans) { hsTArray geoSpans; spans.SetCount(0); @@ -774,7 +774,7 @@ hsBool plSmoothSnapComponent::IGetDstSpans(plErrorMsg* pErrMsg, hsTArray& srcSpans, hsTArray& dstSpans) +bool plSmoothSnapComponent::IDoSmooth(plErrorMsg* pErrMsg, hsTArray& srcSpans, hsTArray& dstSpans) { if( srcSpans.GetCount() && dstSpans.GetCount() ) { @@ -790,7 +790,7 @@ hsBool plSmoothSnapComponent::IDoSmooth(plErrorMsg* pErrMsg, hsTArrayMakeAutoParamBlocks(this); } -hsBool plSoftVolComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) +bool plSoftVolComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) { if( !plSoftVolBaseComponent::SetupProperties(pNode, errMsg) ) return false; @@ -616,7 +616,7 @@ public: plSoftVolUnionComponent(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* errMsg); + bool SetupProperties(plMaxNode* pNode, plErrorMsg* errMsg); }; // When one of our parameters that is a ref changes, send out the component ref @@ -718,7 +718,7 @@ plSoftVolUnionComponent::plSoftVolUnionComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plSoftVolUnionComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) +bool plSoftVolUnionComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) { return plSoftVolBaseComponent::SetupProperties(pNode, errMsg); } @@ -777,7 +777,7 @@ public: plSoftVolIsectComponent(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* errMsg); + bool SetupProperties(plMaxNode* pNode, plErrorMsg* errMsg); }; // When one of our parameters that is a ref changes, send out the component ref @@ -879,7 +879,7 @@ plSoftVolIsectComponent::plSoftVolIsectComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plSoftVolIsectComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) +bool plSoftVolIsectComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) { return plSoftVolBaseComponent::SetupProperties(pNode, errMsg); } @@ -934,7 +934,7 @@ public: plSoftVolNegateComponent(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* errMsg); + bool SetupProperties(plMaxNode* pNode, plErrorMsg* errMsg); }; // When one of our parameters that is a ref changes, send out the component ref @@ -1006,7 +1006,7 @@ plSoftVolNegateComponent::plSoftVolNegateComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plSoftVolNegateComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) +bool plSoftVolNegateComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) { return plSoftVolBaseComponent::SetupProperties(pNode, errMsg); } @@ -1058,10 +1058,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *errMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *errMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *errMsg); + bool Convert(plMaxNode *node, plErrorMsg *errMsg); }; // When one of our parameters that is a ref changes, send out the component ref @@ -1108,7 +1108,7 @@ plLightRegionComponent::plLightRegionComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plLightRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) +bool plLightRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) { if( !fCompPB->GetINode(kSoftVolume) ) return true; @@ -1134,7 +1134,7 @@ hsBool plLightRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) return true; } -hsBool plLightRegionComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) +bool plLightRegionComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) { return true; @@ -1142,7 +1142,7 @@ hsBool plLightRegionComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plLightRegionComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) +bool plLightRegionComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) { return true; @@ -1302,8 +1302,8 @@ void plVisRegionComponent::ICheckVisRegion(const plLocation& loc) plKey key = hsgResMgr::ResMgr()->NewKey(plString::FromUtf8(GetINode()->GetName()), fVisReg, loc); - hsBool excludes = fCompPB->GetInt(kExcludes); - hsBool disableNormal = excludes ? false : fCompPB->GetInt(kDisableNormal); + bool excludes = fCompPB->GetInt(kExcludes); + bool disableNormal = excludes ? false : fCompPB->GetInt(kDisableNormal); fVisReg->SetProperty(plVisRegion::kIsNot, excludes); fVisReg->SetProperty(plVisRegion::kReplaceNormal, true); @@ -1314,18 +1314,18 @@ void plVisRegionComponent::ICheckVisRegion(const plLocation& loc) } } -hsBool plVisRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) +bool plVisRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) { const char* dbgNodeName = node->GetName(); plSceneObject* obj = node->GetSceneObject(); if( !obj ) return true; - hsBool excludes = fCompPB->GetInt(kExcludes); - hsBool disableNormal = excludes ? false : fCompPB->GetInt(kDisableNormal); - hsBool affectDraw = disableNormal ? true : fCompPB->GetInt(kAffectDraw); - hsBool affectOcc = disableNormal ? true : fCompPB->GetInt(kAffectOcc); - hsBool affectLight = disableNormal ? true : fCompPB->GetInt(kAffectLight); + bool excludes = fCompPB->GetInt(kExcludes); + bool disableNormal = excludes ? false : fCompPB->GetInt(kDisableNormal); + bool affectDraw = disableNormal ? true : fCompPB->GetInt(kAffectDraw); + bool affectOcc = disableNormal ? true : fCompPB->GetInt(kAffectOcc); + bool affectLight = disableNormal ? true : fCompPB->GetInt(kAffectLight); const plDrawInterface* di = affectDraw ? obj->GetDrawInterface() : nil; plOccluder* occ = affectOcc ? (plOccluder*)obj->GetGenericInterface(plOccluder::Index()) : nil; @@ -1358,7 +1358,7 @@ hsBool plVisRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) return true; } -hsBool plVisRegionComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) +bool plVisRegionComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) { fVisReg = nil; @@ -1367,7 +1367,7 @@ hsBool plVisRegionComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plVisRegionComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) +bool plVisRegionComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) { return true; @@ -1413,8 +1413,8 @@ public: plRelevanceRegionComponent(); void DeleteThis() { delete this; } - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *errMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *errMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *errMsg); + bool Convert(plMaxNode *node, plErrorMsg *errMsg); }; @@ -1444,7 +1444,7 @@ plRelevanceRegionComponent::plRelevanceRegionComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plRelevanceRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) +bool plRelevanceRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) { const char* dbgNodeName = node->GetName(); plSceneObject* obj = node->GetSceneObject(); @@ -1476,7 +1476,7 @@ hsBool plRelevanceRegionComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) return true; } -hsBool plRelevanceRegionComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) +bool plRelevanceRegionComponent::PreConvert(plMaxNode *pNode, plErrorMsg *errMsg) { fRegion = nil; @@ -1515,7 +1515,7 @@ plEffVisSetComponent::plEffVisSetComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plEffVisSetComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) +bool plEffVisSetComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) { const char* dbgNodeName = node->GetName(); plSceneObject* obj = node->GetSceneObject(); @@ -1549,7 +1549,7 @@ hsBool plEffVisSetComponent::Convert(plMaxNode *node, plErrorMsg *errMsg) // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plEffVisSetComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) +bool plEffVisSetComponent::SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg) { fVisReg = nil; diff --git a/Sources/Tools/MaxComponent/plSoftVolumeComponent.h b/Sources/Tools/MaxComponent/plSoftVolumeComponent.h index 5f283a10..a8276ea0 100644 --- a/Sources/Tools/MaxComponent/plSoftVolumeComponent.h +++ b/Sources/Tools/MaxComponent/plSoftVolumeComponent.h @@ -68,7 +68,7 @@ class plVisRegion; class plSoftVolBaseComponent : public plComponent { protected: - hsBool fValid; + bool fValid; plKey fSoftKey; void IAddSubVolume(plKey masterKey, plKey subKey); @@ -77,13 +77,13 @@ protected: virtual plKey ICreateSoftVolume() = 0; public: - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* errMsg); - hsBool PreConvert(plMaxNode* pNode, plErrorMsg* errMsg) { return true; } - hsBool Convert(plMaxNode *node, plErrorMsg *errMsg) { return true; } + bool SetupProperties(plMaxNode* pNode, plErrorMsg* errMsg); + bool PreConvert(plMaxNode* pNode, plErrorMsg* errMsg) { return true; } + bool Convert(plMaxNode *node, plErrorMsg *errMsg) { return true; } plKey GetSoftVolume(); - virtual hsBool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool DeInit(plMaxNode *node, plErrorMsg *pErrMsg); static plSoftVolBaseComponent* GetSoftComponent(INode* node); static plSoftVolBaseComponent* GetSoftComponent(plComponentBase *comp); @@ -130,10 +130,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg); + bool SetupProperties(plMaxNode *pNode, plErrorMsg *errMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *errMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *errMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *errMsg); + bool Convert(plMaxNode *node, plErrorMsg *errMsg); static void CollectRegions(plMaxNode* node, hsTArray& regions); }; @@ -150,8 +150,8 @@ public: plEffVisSetComponent(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode* pNode, plErrorMsg* errMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *errMsg); + bool SetupProperties(plMaxNode* pNode, plErrorMsg* errMsg); + bool Convert(plMaxNode *node, plErrorMsg *errMsg); plVisRegion* GetVisRegion(plMaxNode* node); diff --git a/Sources/Tools/MaxComponent/plTemplateComponent.cpp b/Sources/Tools/MaxComponent/plTemplateComponent.cpp index 396d1fba..2b33ebdd 100644 --- a/Sources/Tools/MaxComponent/plTemplateComponent.cpp +++ b/Sources/Tools/MaxComponent/plTemplateComponent.cpp @@ -75,8 +75,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; CLASS_DESC(plTemplateComponent, gTemplateDesc, "Template", "CloneTemplate", "Clone", Class_ID(0x6742590b, 0x14fd2135)) @@ -120,7 +120,7 @@ const char* plTemplateComponent::IGetAgeName(plMaxNode *node) // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plTemplateComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plTemplateComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { const char* ageName = IGetAgeName(node); if (!ageName) @@ -147,7 +147,7 @@ hsBool plTemplateComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg return true; } -hsBool plTemplateComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plTemplateComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if (node->GetSceneObject()) node->GetSceneObject()->SetSynchFlagsBit(plSynchedObject::kAllStateIsVolatile); @@ -175,8 +175,8 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; CLASS_DESC(plSpawnComponent, gSpawnDesc, "Instance", "CloneInst", "Clone", Class_ID(0x5702450d, 0x2c636131)) @@ -203,7 +203,7 @@ plSpawnComponent::plSpawnComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plSpawnComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSpawnComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { if (!GetPBString(fCompPB, kTemplateName)) { @@ -218,7 +218,7 @@ hsBool plSpawnComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plSpawnComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plSpawnComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { const char *templateName = GetPBString(fCompPB, kTemplateName); if (!templateName) diff --git a/Sources/Tools/MaxComponent/plTypesComponents.cpp b/Sources/Tools/MaxComponent/plTypesComponents.cpp index e44a5615..f17dd99c 100644 --- a/Sources/Tools/MaxComponent/plTypesComponents.cpp +++ b/Sources/Tools/MaxComponent/plTypesComponents.cpp @@ -83,10 +83,10 @@ class plStartingPointComponent : public plComponent public: plStartingPointComponent(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - //hsBool IsValidNodeType(plMaxNode *pNode); + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + //bool IsValidNodeType(plMaxNode *pNode); }; //Max desc stuff necessary. @@ -106,19 +106,19 @@ plStartingPointComponent::plStartingPointComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plStartingPointComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plStartingPointComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetForceLocal(true); return true; } -hsBool plStartingPointComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plStartingPointComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plSpawnModifier* pSpawn = new plSpawnModifier; node->AddModifier(pSpawn, IGetUniqueName(node)); return true; } -hsBool plStartingPointComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plStartingPointComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } @@ -139,9 +139,9 @@ protected: public: plVehicleComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; CLASS_DESC(plVehicleComponent, gVehicleDesc, "(ex)Vehicle", "Vehicle", COMP_TYPE_MISC, Class_ID(0x75903e2, 0x50ac210b)) @@ -290,7 +290,7 @@ bool plVehicleComponent::IIsValid() ); } -hsBool plVehicleComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plVehicleComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { return false; #if 0 @@ -325,7 +325,7 @@ hsBool plVehicleComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) #endif } -hsBool plVehicleComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plVehicleComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return false; #if 0 @@ -370,7 +370,7 @@ void GetSuspensionProps(plMaxNode* hardPoint, plMaxNode* wheel, hsPoint3& chassi #endif -hsBool plVehicleComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plVehicleComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return false; #if 0 @@ -424,9 +424,9 @@ class plMaintainersMarkerComponent : public plComponent public: plMaintainersMarkerComponent(); void DeleteThis() { delete this; } - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; //Max desc stuff necessary. @@ -452,12 +452,12 @@ plMaintainersMarkerComponent::plMaintainersMarkerComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plMaintainersMarkerComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plMaintainersMarkerComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetForceLocal(true); return true; } -hsBool plMaintainersMarkerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plMaintainersMarkerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plMaintainersMarkerModifier* pSpawn = new plMaintainersMarkerModifier; pSpawn->SetCalibrated(fCompPB->GetInt(kCalibrated)); @@ -465,7 +465,7 @@ hsBool plMaintainersMarkerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMs return true; } -hsBool plMaintainersMarkerComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plMaintainersMarkerComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } @@ -492,9 +492,9 @@ protected: public: plGameMarkerComponent(); - hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + bool PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); }; CLASS_DESC(plGameMarkerComponent, gGameMarkerDesc, "Game Marker", "GameMarker", COMP_TYPE_TYPE, Class_ID(0x4a15029a, 0x350f7258)) @@ -685,7 +685,7 @@ plGameMarkerComponent::plGameMarkerComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plGameMarkerComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plGameMarkerComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { plMaxNode* proxy = (plMaxNode*)fCompPB->GetINode(kMarkerPhys); proxy->SetCanConvert(false); @@ -705,7 +705,7 @@ hsBool plGameMarkerComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrM return true; } -hsBool plGameMarkerComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plGameMarkerComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } @@ -734,7 +734,7 @@ plKey plGameMarkerComponent::IGetAnimKey(int nodeID, int compID) return nil; } -hsBool plGameMarkerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plGameMarkerComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { plGameMarkerModifier* markerMod = new plGameMarkerModifier; @@ -770,13 +770,13 @@ class plCameraComponent : public plComponent public: plCameraComponent(); void DeleteThis() { delete this; } - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool IsValidNodeType(plMaxNode *pNode); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool IsValidNodeType(plMaxNode *pNode); // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); + virtual bool SetupProperties(plMaxNode *pNode, plErrorMsg *pErrMsg); }; @@ -821,24 +821,24 @@ plCameraComponent::plCameraComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plCameraComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrMsg) +bool plCameraComponent::SetupProperties(plMaxNode* pNode, plErrorMsg *pErrMsg) { return true; } -hsBool plCameraComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) +bool plCameraComponent::PreConvert(plMaxNode *pNode, plErrorMsg *pErrMsg) { return true; } -hsBool plCameraComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plCameraComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } -hsBool plCameraComponent::IsValidNodeType(plMaxNode *pNode) +bool plCameraComponent::IsValidNodeType(plMaxNode *pNode) { return false; } diff --git a/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp b/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp index c015e499..a4f60023 100644 --- a/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp +++ b/Sources/Tools/MaxComponent/plVolumeGadgetComponent.cpp @@ -282,7 +282,7 @@ void plVolumeGadgetComponent::CollectNonDrawables(INodeTab& nonDrawables) // Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plVolumeGadgetComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) +bool plVolumeGadgetComponent::SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg) { fLogicModKeys.clear(); @@ -320,7 +320,7 @@ hsBool plVolumeGadgetComponent::SetupProperties(plMaxNode *node, plErrorMsg *pEr return true; } -hsBool plVolumeGadgetComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plVolumeGadgetComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { plLocation loc = node->GetLocation(); plSceneObject *obj = node->GetSceneObject(); @@ -470,7 +470,7 @@ void plVolumeGadgetComponent::ICreateConditions(plMaxNode* node, plErrorMsg* err logic->SetLocalOnly(true); } -hsBool plVolumeGadgetComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) +bool plVolumeGadgetComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) { if (fCompPB->GetInt(kVolumeTriggerOnFacing)) ICreateConditions(node, pErrMsg, true); @@ -483,7 +483,7 @@ hsBool plVolumeGadgetComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) return true; } -hsBool plVolumeGadgetComponent::DeInit( plMaxNode *node, plErrorMsg *pErrMsg ) +bool plVolumeGadgetComponent::DeInit( plMaxNode *node, plErrorMsg *pErrMsg ) { fLogicModOutKeys.clear(); return plActivatorBaseComponent::DeInit( node, pErrMsg ); diff --git a/Sources/Tools/MaxComponent/plVolumeGadgetComponent.h b/Sources/Tools/MaxComponent/plVolumeGadgetComponent.h index 03bc2de4..9dd45a18 100644 --- a/Sources/Tools/MaxComponent/plVolumeGadgetComponent.h +++ b/Sources/Tools/MaxComponent/plVolumeGadgetComponent.h @@ -57,10 +57,10 @@ protected: public: plVolumeGadgetComponent(); - hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg); - hsBool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); - hsBool DeInit(plMaxNode *node, plErrorMsg* pErrMsg); + bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + bool Convert(plMaxNode *node, plErrorMsg *pErrMsg); + bool PreConvert(plMaxNode *node, plErrorMsg* pErrMsg); + bool DeInit(plMaxNode *node, plErrorMsg* pErrMsg); virtual bool HasLogicOut() { return true; } diff --git a/Sources/Tools/MaxComponent/plWaterComponent.cpp b/Sources/Tools/MaxComponent/plWaterComponent.cpp index 257d5654..f06780ed 100644 --- a/Sources/Tools/MaxComponent/plWaterComponent.cpp +++ b/Sources/Tools/MaxComponent/plWaterComponent.cpp @@ -467,7 +467,7 @@ plWaterComponent::plWaterComponent() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plWaterComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWaterComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetRunTimeLight(true); node->SetForceMaterialCopy(true); @@ -494,7 +494,7 @@ hsBool plWaterComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plWaterComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWaterComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fWaveSet ) IMakeWaveSet(node, pErrMsg); @@ -507,7 +507,7 @@ hsBool plWaterComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plWaterComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWaterComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fWaveSet ) return true; @@ -518,7 +518,7 @@ hsBool plWaterComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plWaterComponent::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWaterComponent::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) { if( fWaveSet ) fWaveSet->GetKey()->UnRefObject(); @@ -527,7 +527,7 @@ hsBool plWaterComponent::DeInit(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plWaterComponent::IReadRefObject(plMaxNodeBase* node, plFixedWaterState7& ws) +bool plWaterComponent::IReadRefObject(plMaxNodeBase* node, plFixedWaterState7& ws) { INode* ref = fCompPB->GetINode(kRefObject); if( !ref ) @@ -548,7 +548,7 @@ hsBool plWaterComponent::IReadRefObject(plMaxNodeBase* node, plFixedWaterState7& return true; } -hsBool plWaterComponent::IReadEnvObject(plMaxNode* node, plErrorMsg* pErrMsg, plFixedWaterState7& ws) +bool plWaterComponent::IReadEnvObject(plMaxNode* node, plErrorMsg* pErrMsg, plFixedWaterState7& ws) { INode* ref = fCompPB->GetINode(kEnvObject); if( !ref ) @@ -593,7 +593,7 @@ hsBool plWaterComponent::IReadEnvObject(plMaxNode* node, plErrorMsg* pErrMsg, pl return true; } -hsBool plWaterComponent::IGetRefObject(plMaxNode* node) +bool plWaterComponent::IGetRefObject(plMaxNode* node) { plMaxNode* ref = (plMaxNode*)fCompPB->GetINode(kRefObject); if( (ref != node) // We have an exterior reference node @@ -610,7 +610,7 @@ hsBool plWaterComponent::IGetRefObject(plMaxNode* node) return false; } -hsBool plWaterComponent::IMakeWaveSet(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWaterComponent::IMakeWaveSet(plMaxNode* node, plErrorMsg* pErrMsg) { // Go ahead and create the WaveSet modifier. There will be just // one created by this component, everyone has to share. @@ -856,7 +856,7 @@ plShoreComponent::plShoreComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plShoreComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plShoreComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetRunTimeLight(true); node->SetForceMaterialCopy(true); @@ -885,7 +885,7 @@ hsBool plShoreComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plShoreComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plShoreComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { pErrMsg->Set(!node->HasLoadMask(), node->GetName(), "PS shore has no representation component").CheckAndAsk(); pErrMsg->Set(false); @@ -894,7 +894,7 @@ hsBool plShoreComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plShoreComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plShoreComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { plWaveSetBase* waveSet = plWaterComponent::GetWaveSet(fCompPB->GetINode(kWaveSet, 0, 0)); if( waveSet ) @@ -1001,7 +1001,7 @@ plWDecalComponent::plWDecalComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plWDecalComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWDecalComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetRunTimeLight(true); node->SetForceMaterialCopy(true); @@ -1034,7 +1034,7 @@ hsBool plWDecalComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plWDecalComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWDecalComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { pErrMsg->Set(!node->HasLoadMask(), node->GetName(), "PS water decal has no representation component").CheckAndAsk(); pErrMsg->Set(false); @@ -1043,7 +1043,7 @@ hsBool plWDecalComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plWDecalComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plWDecalComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { plWaveSetBase* waveSet = plWaterComponent::GetWaveSet(fCompPB->GetINode(kWaveSet, 0, 0)); if( waveSet ) @@ -1222,7 +1222,7 @@ plEnvMapComponent::plEnvMapComponent() // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. -hsBool plEnvMapComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plEnvMapComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { fMap = nil; @@ -1231,13 +1231,13 @@ hsBool plEnvMapComponent::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plEnvMapComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plEnvMapComponent::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plEnvMapComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plEnvMapComponent::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { // If we make a handler that will update the EnvMap's position when this object // moves, we can put it's creation here. Otherwise, there's nought to do, since diff --git a/Sources/Tools/MaxComponent/plWaterComponent.h b/Sources/Tools/MaxComponent/plWaterComponent.h index 85b0a244..8daf52df 100644 --- a/Sources/Tools/MaxComponent/plWaterComponent.h +++ b/Sources/Tools/MaxComponent/plWaterComponent.h @@ -134,10 +134,10 @@ public: protected: plWaveSet7* fWaveSet; - hsBool IGetRefObject(plMaxNode* node); - hsBool IReadEnvObject(plMaxNode* node, plErrorMsg* pErrMsg, plFixedWaterState7& ws); - hsBool IReadRefObject(plMaxNodeBase* node, plFixedWaterState7& ws); - hsBool IMakeWaveSet(plMaxNode* node, plErrorMsg* pErrMsg); + bool IGetRefObject(plMaxNode* node); + bool IReadEnvObject(plMaxNode* node, plErrorMsg* pErrMsg, plFixedWaterState7& ws); + bool IReadRefObject(plMaxNodeBase* node, plFixedWaterState7& ws); + bool IMakeWaveSet(plMaxNode* node, plErrorMsg* pErrMsg); plWaveSetBase* IGetWaveSet() const { return (plWaveSetBase*)fWaveSet; } // fWaveSet set in SetupProperties pass. @@ -149,10 +149,10 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool DeInit(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool DeInit(plMaxNode* node, plErrorMsg* pErrMsg); virtual int GetMinCap() { return plQuality::kPS_1_1; } @@ -181,9 +181,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); virtual int GetMinCap() { return plQuality::kPS_1_1; } }; @@ -202,9 +202,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); virtual int GetMinCap() { return plQuality::kPS_1_1; } }; @@ -244,9 +244,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); plDynamicEnvMap* GetEnvMap(); plDynamicCamMap* GetCamMap(); diff --git a/Sources/Tools/MaxComponent/plXImposter.cpp b/Sources/Tools/MaxComponent/plXImposter.cpp index 7975cf18..dfb70f98 100644 --- a/Sources/Tools/MaxComponent/plXImposter.cpp +++ b/Sources/Tools/MaxComponent/plXImposter.cpp @@ -85,7 +85,7 @@ plXImposterComp::plXImposterComp() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plXImposterComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plXImposterComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetRadiateNorms(true); return true; @@ -103,9 +103,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; //Max desc stuff necessary below. @@ -126,7 +126,7 @@ plForceCTTComp::plForceCTTComp() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plForceCTTComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plForceCTTComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { node->SetForceVisLOS(true); return true; @@ -153,16 +153,16 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); - virtual hsBool Convert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool PreConvert(plMaxNode* node, plErrorMsg* pErrMsg); + virtual bool Convert(plMaxNode* node, plErrorMsg* pErrMsg); - hsBool SetMaxInherit(); - hsBool SetMaxInherit(plMaxNodeBase* targ); - hsBool KillMaxInherit(); - hsBool KillMaxInherit(plMaxNodeBase* targ); + bool SetMaxInherit(); + bool SetMaxInherit(plMaxNodeBase* targ); + bool KillMaxInherit(); + bool KillMaxInherit(plMaxNodeBase* targ); - hsBool Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg); + bool Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg); virtual void AddTarget(plMaxNodeBase *target); virtual void DeleteTarget(plMaxNodeBase *target); @@ -250,7 +250,7 @@ plFilterInheritComp::plFilterInheritComp() fClassDesc->MakeAutoParamBlocks(this); } -hsBool plFilterInheritComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) +bool plFilterInheritComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fCompPB->GetInt(kActive) ) return true; @@ -282,19 +282,19 @@ hsBool plFilterInheritComp::SetupProperties(plMaxNode* node, plErrorMsg* pErrMsg return true; } -hsBool plFilterInheritComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plFilterInheritComp::PreConvert(plMaxNode* node, plErrorMsg* pErrMsg) { return true; } -hsBool plFilterInheritComp::Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg) +bool plFilterInheritComp::Bail(plMaxNode* node, const char* msg, plErrorMsg* pErrMsg) { pErrMsg->Set(true, node->GetName(), msg).CheckAndAsk(); pErrMsg->Set(false); return true; } -hsBool plFilterInheritComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) +bool plFilterInheritComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) { if( !fCompPB->GetInt(kActive) ) return true; @@ -349,7 +349,7 @@ hsBool plFilterInheritComp::Convert(plMaxNode* node, plErrorMsg* pErrMsg) return true; } -hsBool plFilterInheritComp::SetMaxInherit(plMaxNodeBase* targ) +bool plFilterInheritComp::SetMaxInherit(plMaxNodeBase* targ) { if( !fCompPB->GetInt(kActive) ) return KillMaxInherit(targ); @@ -380,7 +380,7 @@ hsBool plFilterInheritComp::SetMaxInherit(plMaxNodeBase* targ) return true; } -hsBool plFilterInheritComp::SetMaxInherit() +bool plFilterInheritComp::SetMaxInherit() { if( !fCompPB->GetInt(kActive) ) return KillMaxInherit(); @@ -415,7 +415,7 @@ hsBool plFilterInheritComp::SetMaxInherit() return true; } -hsBool plFilterInheritComp::KillMaxInherit(plMaxNodeBase* targ) +bool plFilterInheritComp::KillMaxInherit(plMaxNodeBase* targ) { // Max documentation is a big fat liar DWORD mask = ~0; @@ -426,7 +426,7 @@ hsBool plFilterInheritComp::KillMaxInherit(plMaxNodeBase* targ) return true; } -hsBool plFilterInheritComp::KillMaxInherit() +bool plFilterInheritComp::KillMaxInherit() { int i; for( i = 0; i < NumTargets(); i++ ) diff --git a/Sources/Tools/MaxComponent/plXImposter.h b/Sources/Tools/MaxComponent/plXImposter.h index ff54d01a..19977cd0 100644 --- a/Sources/Tools/MaxComponent/plXImposter.h +++ b/Sources/Tools/MaxComponent/plXImposter.h @@ -58,9 +58,9 @@ public: // SetupProperties - Internal setup and write-only set properties on the MaxNode. No reading // of properties on the MaxNode, as it's still indeterminant. - virtual hsBool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); - virtual hsBool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } - virtual hsBool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool SetupProperties(plMaxNode *node, plErrorMsg *pErrMsg); + virtual bool PreConvert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } + virtual bool Convert(plMaxNode *node, plErrorMsg *pErrMsg) { return true; } }; #endif // plXImposter_inc diff --git a/Sources/Tools/MaxConvert/StringTokenizer.cpp b/Sources/Tools/MaxConvert/StringTokenizer.cpp index 8f1bf977..8b594d92 100644 --- a/Sources/Tools/MaxConvert/StringTokenizer.cpp +++ b/Sources/Tools/MaxConvert/StringTokenizer.cpp @@ -65,7 +65,7 @@ StringTokenizer::~StringTokenizer() { delete string; delete seps; } -hsBool StringTokenizer::hasMoreTokens() { +bool StringTokenizer::hasMoreTokens() { return (*tok != '\0'); }; char *StringTokenizer::next() { @@ -79,7 +79,7 @@ char *StringTokenizer::next() { while (*tok != '\0' && isSep(*tok)) tok++; return cur; }; -hsBool StringTokenizer::isSep(char c) { +bool StringTokenizer::isSep(char c) { if (!qAsTok || !inQuote) { for (int32_t i=0; iqAsTok = qAsTok; } diff --git a/Sources/Tools/MaxConvert/StringTokenizer.h b/Sources/Tools/MaxConvert/StringTokenizer.h index c1bbfd64..89136184 100644 --- a/Sources/Tools/MaxConvert/StringTokenizer.h +++ b/Sources/Tools/MaxConvert/StringTokenizer.h @@ -49,18 +49,18 @@ class StringTokenizer { private: char *seps; char *tok; - hsBool isSep(char c); + bool isSep(char c); int32_t numSeps; - hsBool qAsTok; - hsBool inQuote; + bool qAsTok; + bool inQuote; public: StringTokenizer(); StringTokenizer(const char *string, const char *seps); ~StringTokenizer(); char *next(); - hsBool hasMoreTokens(); + bool hasMoreTokens(); void reset(const char *string, const char *seps); - void ParseQuotes(hsBool qAsTok); + void ParseQuotes(bool qAsTok); char *string; }; diff --git a/Sources/Tools/MaxConvert/UserPropMgr.cpp b/Sources/Tools/MaxConvert/UserPropMgr.cpp index 12229a13..0012303e 100644 --- a/Sources/Tools/MaxConvert/UserPropMgr.cpp +++ b/Sources/Tools/MaxConvert/UserPropMgr.cpp @@ -866,7 +866,7 @@ uint32_t UserPropMgr::QuickPair::GetHash() const return h; } -hsBool UserPropMgr::QuickPair::GetVal(TSTR& value) +bool UserPropMgr::QuickPair::GetVal(TSTR& value) { if (fKey) { diff --git a/Sources/Tools/MaxConvert/UserPropMgr.h b/Sources/Tools/MaxConvert/UserPropMgr.h index d2dd9ee6..ef12db30 100644 --- a/Sources/Tools/MaxConvert/UserPropMgr.h +++ b/Sources/Tools/MaxConvert/UserPropMgr.h @@ -142,7 +142,7 @@ private: uint32_t GetHash() const; - hsBool GetVal(TSTR& value); + bool GetVal(TSTR& value); bool operator==(const QuickPair& other) const; }; diff --git a/Sources/Tools/MaxConvert/hsControlConverter.cpp b/Sources/Tools/MaxConvert/hsControlConverter.cpp index de4ee65e..fc2723d2 100644 --- a/Sources/Tools/MaxConvert/hsControlConverter.cpp +++ b/Sources/Tools/MaxConvert/hsControlConverter.cpp @@ -193,7 +193,7 @@ plController *hsControlConverter::ConvertTMAnim(plSceneObject *obj, plMaxNode *n return tmc; } -hsBool hsControlConverter::HasKeyTimes(Control* ctl) +bool hsControlConverter::HasKeyTimes(Control* ctl) { hsGuardBegin("hsControlConverter::HasKeyTimes"); @@ -388,7 +388,7 @@ plController* hsControlConverter::MakePosController(Control* control, plMaxNode* return hsCont; } - hsBool keep = false; + bool keep = false; for (int i=0; i<3; i++) { Control* sub = (Control*)control->SubAnim(i); @@ -433,7 +433,7 @@ plController *hsControlConverter::MakeScaleController(Control *control, plMaxNod return NULL; } -plController *hsControlConverter::MakeRotController(Control *control, plMaxNode *node, hsBool camRot /* = false */, +plController *hsControlConverter::MakeRotController(Control *control, plMaxNode *node, bool camRot /* = false */, float start /* = -1 */, float end /* = -1 */) { ISetSegRange(start, end); @@ -630,7 +630,7 @@ plCompoundController *hsControlConverter::MakeTransformController(Control *contr { hsTArray kfArray; IAddPartsKeys(control, &kfArray, node); - hsBool ignoreFOV = false; + bool ignoreFOV = false; for (int i = 0; i < node->NumAttachedComponents(); i++) { if (node->GetAttachedComponent(i)->ClassID() == ANIMCAM_CMD_CID) @@ -693,7 +693,7 @@ void hsControlConverter::IConvertSubTransform(Control *control, char *ctlName, p fErrorMsg->Set(); return; } - hsBool camRot = (ct == ctrlTypeRollAngle); + bool camRot = (ct == ctrlTypeRollAngle); tmc->SetRotController(MakeRotController(control, node, camRot, start, end)); } break; @@ -721,7 +721,7 @@ void hsControlConverter::IConvertSubTransform(Control *control, char *ctlName, p // // // -plLeafController* hsControlConverter::ICreateSimpleRotController(plMaxNode* node, Control* control, hsBool camRot) +plLeafController* hsControlConverter::ICreateSimpleRotController(plMaxNode* node, Control* control, bool camRot) { hsGuardBegin("hsControlConverter::ICreateSimpleRotController"); @@ -743,7 +743,7 @@ plLeafController* hsControlConverter::ICreateSimpleScaleController(plMaxNode* no // // // -plLeafController* hsControlConverter::ICreateQuatController(plMaxNode* node, Control* control, bool rotation, hsBool camRot) +plLeafController* hsControlConverter::ICreateQuatController(plMaxNode* node, Control* control, bool rotation, bool camRot) { hsGuardBegin("hsControlConverter::ICreateQuatController"); @@ -978,7 +978,7 @@ int hsControlConverter::IAddPartsKeys(Control* control, // Traverse all keys of controller // IKey* key=(IKey*)(new uint8_t [ikeys->GetKeySize()]); - hsBool mb=false; + bool mb=false; plMaxNode* xformParent = GetXformParent(node); for(i = startIdx; i <= endIdx; i++) { @@ -1243,7 +1243,7 @@ void hsControlConverter::IGetControlSampleTimes(Control* control, int iLo, int i // // Create an hsKeyFrame from a 3DSMax key // -int32_t hsControlConverter::ICreateHSInterpKey(Control* control, IKey* mKey, TimeValue keyTime, hsKeyFrame* baseKey, plMaxNode* node, hsBool rotQuat) +int32_t hsControlConverter::ICreateHSInterpKey(Control* control, IKey* mKey, TimeValue keyTime, hsKeyFrame* baseKey, plMaxNode* node, bool rotQuat) { hsGuardBegin("hsControlConverter::ICreateHSInterpKey"); @@ -1370,7 +1370,7 @@ int32_t hsControlConverter::ICreateHSInterpKey(Control* control, IKey* mKey, Tim hsGuardEnd; } -uint8_t hsControlConverter::GetKeyType(Control* control, hsBool rotQuat) +uint8_t hsControlConverter::GetKeyType(Control* control, bool rotQuat) { Class_ID cID = control->ClassID(); SClass_ID sID = control->SuperClassID(); @@ -1515,7 +1515,7 @@ plMaxNode* hsControlConverter::GetXformParent(plMaxNode* node) // ########################################################################### // Note that ForceWorldSpace Overrides ForceOrigin which Overrides ForceLocal // ########################################################################### -hsBool hsControlConverter::ForceWorldSpace(plMaxNode* node) +bool hsControlConverter::ForceWorldSpace(plMaxNode* node) { hsGuardBegin("hsControlConverter::ForceWorldSpace"); @@ -1527,7 +1527,7 @@ hsBool hsControlConverter::ForceWorldSpace(plMaxNode* node) // ########################################################################### // Note that ForceWorldSpace Overrides ForceOrigin which Overrides ForceLocal // ########################################################################### -hsBool hsControlConverter::ForceOrigin(plMaxNode* node) +bool hsControlConverter::ForceOrigin(plMaxNode* node) { hsGuardBegin("hsControlConverter::ForceOrigin"); @@ -1552,7 +1552,7 @@ hsBool hsControlConverter::ForceOrigin(plMaxNode* node) // This is significant because things that require ForceLocal because they are // animated or what-not, are still okay with ForceOrigin, but not v.v. // ########################################################################### -hsBool hsControlConverter::ForceLocal(plMaxNode* node) +bool hsControlConverter::ForceLocal(plMaxNode* node) { hsGuardBegin("hsControlConverter::ForceLocal"); @@ -1591,7 +1591,7 @@ hsBool hsControlConverter::ForceLocal(plMaxNode* node) } -hsBool hsControlConverter::IsAnimated(plMaxNode* node) +bool hsControlConverter::IsAnimated(plMaxNode* node) { hsGuardBegin("hsControlConverter::IsAnimated"); @@ -1600,7 +1600,7 @@ hsBool hsControlConverter::IsAnimated(plMaxNode* node) hsGuardEnd; } -hsBool hsControlConverter::OwnsMaterialCopy(plMaxNode* node) +bool hsControlConverter::OwnsMaterialCopy(plMaxNode* node) { hsGuardBegin("hsControlConverter::OwnsMaterialCopy"); @@ -1608,7 +1608,7 @@ hsBool hsControlConverter::OwnsMaterialCopy(plMaxNode* node) hsGuardEnd; } -hsBool hsControlConverter::HasFrameEvents(plMaxNode *node) +bool hsControlConverter::HasFrameEvents(plMaxNode *node) { hsGuardBegin("hsSceneConverter::HasFrameEvents"); @@ -1634,7 +1634,7 @@ hsBool hsControlConverter::HasFrameEvents(plMaxNode *node) hsGuardEnd; } -hsBool hsControlConverter::GetControllerByName(Animatable* anim, TSTR &name, Control* &ctl) +bool hsControlConverter::GetControllerByName(Animatable* anim, TSTR &name, Control* &ctl) { hsGuardBegin("hsControlConverter::GetControllerByName"); @@ -1911,7 +1911,7 @@ void hsControlConverter::Matrix3ToHsMatrix44(Matrix3* m3, hsMatrix44* hsM) // Moved here after hsMeshConverter was obliterated. Only used in this class // anyway... -hsBool hsControlConverter::IGetEditableMeshKeyTimes( plMaxNode *node, Tab × ) +bool hsControlConverter::IGetEditableMeshKeyTimes( plMaxNode *node, Tab × ) { hsGuardBegin( "hsControlConverter::GetEditableMeshKeyTimes" ); @@ -1939,7 +1939,7 @@ hsBool hsControlConverter::IGetEditableMeshKeyTimes( plMaxNode *node, Tab × ) +bool hsControlConverter::IGetGeomKeyTimes( plMaxNode *node, Tab × ) { hsGuardBegin( "hsControlConverter::GetGeomKeyTimes" ); @@ -2009,7 +2009,7 @@ void hsControlConverter::IGetGeomKeyTimesRecur( Animatable *anim, Tab &time); @@ -153,9 +153,9 @@ private: void ISetSegRange(float start, float end); void IConvertSubTransform(Control *control, char *ctlName, plMaxNode *node, plCompoundController *tmc, float start, float end); - plLeafController* ICreateSimpleRotController(plMaxNode* node, Control* control, hsBool camRot = false); + plLeafController* ICreateSimpleRotController(plMaxNode* node, Control* control, bool camRot = false); plLeafController* ICreateSimpleScaleController(plMaxNode* node, Control* control); - plLeafController* ICreateQuatController(plMaxNode* node, Control* control, bool rotation = true, hsBool camRot = false); + plLeafController* ICreateQuatController(plMaxNode* node, Control* control, bool rotation = true, bool camRot = false); plLeafController* ICreateScaleValueController(plMaxNode* node, Control* control); plLeafController* ICreateScalarController(plMaxNode* node, Control* control); plLeafController* ICreateSimplePosController(plMaxNode* node, Control* control); @@ -163,7 +163,7 @@ private: void IEnableEaseCurves(Animatable* control, bool enable); void IGetControlSampleTimes(Control* control, int iLo, int iHi, Tab& kTimes, float maxRads); int IAddPartsKeys(Control* control, hsTArray * kfArray, plMaxNode* node); - int32_t ICreateHSInterpKey(Control* control, IKey* mKey, TimeValue keyTime, hsKeyFrame* baseKey, plMaxNode* node=nil, hsBool rotQuat = false); + int32_t ICreateHSInterpKey(Control* control, IKey* mKey, TimeValue keyTime, hsKeyFrame* baseKey, plMaxNode* node=nil, bool rotQuat = false); int32_t IGetRangeCoverKeyIndices(char* nodeName, Control* cont, int32_t &start, int32_t &end); ControllerType IGetControlType(TSTR ctrlName); bool IIsKeyTimeInRange(TimeValue time); @@ -173,10 +173,10 @@ private: bool ISkinNode(plMaxNode* node); void ISetForceLocal(bool f) { fForceLocal=f; } - hsBool IGetEditableMeshKeyTimes( plMaxNode *node, Tab × ); - hsBool IGetGeomKeyTimes( plMaxNode *node, Tab × ); + bool IGetEditableMeshKeyTimes( plMaxNode *node, Tab × ); + bool IGetGeomKeyTimes( plMaxNode *node, Tab × ); void IGetGeomKeyTimesRecur( Animatable *anim, Tab × ); - hsBool IGetSubAnimByName( Animatable *anim, TSTR &name, Animatable *&subAnim ); + bool IGetSubAnimByName( Animatable *anim, TSTR &name, Animatable *&subAnim ); void IExportAnimatedCameraFOV(plMaxNode* node, hsTArray * kfArray); Interface* fInterface; @@ -190,9 +190,9 @@ private: int32_t fEndFrame; int32_t fNumFrames; float fAnimLength; - hsBool fWarned; + bool fWarned; - hsBool fForceLocal; + bool fForceLocal; TimeValue fSegStart; TimeValue fSegEnd; diff --git a/Sources/Tools/MaxConvert/hsConverterUtils.cpp b/Sources/Tools/MaxConvert/hsConverterUtils.cpp index 1e32c052..fba44a87 100644 --- a/Sources/Tools/MaxConvert/hsConverterUtils.cpp +++ b/Sources/Tools/MaxConvert/hsConverterUtils.cpp @@ -115,7 +115,7 @@ fWarned(0) { } -void hsConverterUtils::Init(hsBool save, plErrorMsg *msg) +void hsConverterUtils::Init(bool save, plErrorMsg *msg) { hsGuardBegin("hsConverterUtils::Init"); @@ -138,7 +138,7 @@ TimeValue hsConverterUtils::GetTime(Interface *gi) // return theSceneEnum->time; } -hsBool hsConverterUtils::IsEnvironHolder(INode *node) +bool hsConverterUtils::IsEnvironHolder(INode *node) { hsGuardBegin("hsConverterUtils::IsEnvironHolder"); @@ -146,7 +146,7 @@ hsBool hsConverterUtils::IsEnvironHolder(INode *node) hsGuardEnd; } -hsBool hsConverterUtils::AutoStartDynamics(INode *node) +bool hsConverterUtils::AutoStartDynamics(INode *node) { hsGuardBegin("hsConverterUtils::AutoStartDynamics"); @@ -154,7 +154,7 @@ hsBool hsConverterUtils::AutoStartDynamics(INode *node) hsGuardEnd; } -hsBool hsConverterUtils::RandomStartDynamics(INode *node) +bool hsConverterUtils::RandomStartDynamics(INode *node) { hsGuardBegin("hsConverterUtils::RandomStartDynamics"); @@ -192,7 +192,7 @@ void hsConverterUtils::StripOffPath(char* fileName) // // static // -hsBool hsConverterUtils::IsReservedKeyword(const char* nodeName) +bool hsConverterUtils::IsReservedKeyword(const char* nodeName) { hsGuardBegin("hsConverterUtils::IsReservedKeyword"); @@ -364,7 +364,7 @@ INode* hsConverterUtils::FindINodeFromKeyedObject(hsKeyedObject* obj) } // Uses MangleRef so all mangling happens in one place. Compares the name with a mangled version of it -hsBool hsConverterUtils::IsMangled(const char *name) +bool hsConverterUtils::IsMangled(const char *name) { hsGuardBegin("hsConverterUtils::IsMangled"); @@ -441,7 +441,7 @@ int32_t hsConverterUtils::FindNamedSelSetFromName(const char *name) hsGuardEnd; } -hsBool hsConverterUtils::IsInstanced(Object* maxObject) +bool hsConverterUtils::IsInstanced(Object* maxObject) { hsGuardBegin("hsConverterUtils::IsInstanced"); @@ -486,7 +486,7 @@ INode* hsConverterUtils::IGetINodeByNameRecur(INode* node, const char* wantName) // // Matches name against node's name, case-insensitive, // -INode* hsConverterUtils::GetINodeByName(const char* name, hsBool caseSensitive) +INode* hsConverterUtils::GetINodeByName(const char* name, bool caseSensitive) { hsGuardBegin("hsConverterUtils::GetINodeByName"); diff --git a/Sources/Tools/MaxConvert/hsConverterUtils.h b/Sources/Tools/MaxConvert/hsConverterUtils.h index a0110b6f..80246374 100644 --- a/Sources/Tools/MaxConvert/hsConverterUtils.h +++ b/Sources/Tools/MaxConvert/hsConverterUtils.h @@ -75,12 +75,12 @@ public: // MSDEV bug ~hsConverterUtils() {} public: static hsConverterUtils& Instance(); - static hsBool IsReservedKeyword(const char* nodeName); + static bool IsReservedKeyword(const char* nodeName); - void Init(hsBool save, plErrorMsg *msg); - hsBool IsEnvironHolder(INode *node); - hsBool AutoStartDynamics(INode *node); - hsBool RandomStartDynamics(INode *node); + void Init(bool save, plErrorMsg *msg); + bool IsEnvironHolder(INode *node); + bool AutoStartDynamics(INode *node); + bool RandomStartDynamics(INode *node); TimeValue GetTime(Interface *gi); void StripOffTail(char* path); void StripOffPath(char* fileName); @@ -94,15 +94,15 @@ public: char* MangleReference(char *mangName, INode *node, const char* defRoom="global"); char* MangleRefWithRoom(char *mangName, const char *nodeName, const char* roomName); char* UnMangleReference(char *dest, const char *name); - hsBool IsMangled(const char *name); + bool IsMangled(const char *name); int32_t FindNamedSelSetFromName(const char *name); char* StripMangledReference(char* dest, const char* name); - hsBool IsInstanced(Object* maxObject); + bool IsInstanced(Object* maxObject); void CreateNodeSearchCache(); void DestroyNodeSearchCache(); - INode* GetINodeByName(const char* name, hsBool caseSensitive=false); + INode* GetINodeByName(const char* name, bool caseSensitive=false); static const char fTagSeps[]; @@ -119,16 +119,16 @@ private: Interface *fInterface; plErrorMsg *fErrorMsg; - hsBool fSuppressMangling; + bool fSuppressMangling; uint32_t fWarned; - hsBool fSave; + bool fSave; struct CacheNode { private: INode* fNode; const char* fName; - hsBool fCaseSensitive; + bool fCaseSensitive; public: CacheNode(INode* node=nil) : fNode(node), fName(nil), fCaseSensitive(false) { } CacheNode(const char* name) : fName(name), fNode(nil), fCaseSensitive(false) { } @@ -137,8 +137,8 @@ private: INode* GetNode() { return fNode; } const char* GetName() const { return fNode ? fNode->GetName() : fName; } - void SetCaseSensitive(hsBool b) { fCaseSensitive = b; } - hsBool GetCaseSensitive() { return fCaseSensitive; } + void SetCaseSensitive(bool b) { fCaseSensitive = b; } + bool GetCaseSensitive() { return fCaseSensitive; } uint32_t GetHash() const; bool operator==(const CacheNode& other) const; diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp index dd06c718..27365129 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp @@ -195,7 +195,7 @@ hsMaterialConverter::~hsMaterialConverter() hsGuardEnd; } -void hsMaterialConverter::Init(hsBool save, plErrorMsg *msg) +void hsMaterialConverter::Init(bool save, plErrorMsg *msg) { hsGuardBegin("hsMaterialConverter::Init"); @@ -237,14 +237,14 @@ void hsMaterialConverter::FreeMaterialCache(const char* path) fDoneMaterials.Reset(); } -hsBool hsMaterialConverter::ForceNoUvsFlatten(plMaxNode* node) +bool hsMaterialConverter::ForceNoUvsFlatten(plMaxNode* node) { hsGuardBegin("hsMaterialConverter::ForceNoUvsFlatten"); return IsMultiMat(GetBaseMtl(node)); hsGuardEnd; } -hsBool hsMaterialConverter::PreserveUVOffset(Mtl* mtl) +bool hsMaterialConverter::PreserveUVOffset(Mtl* mtl) { hsGuardBegin("hsMaterialConverter::PreserveUVOffset"); @@ -289,7 +289,7 @@ void AttachLinkMtlAnims(plMaxNode *node, hsGMaterial *mat) const int numKeys = 2; float times[] = {0.f, 1.5f}; float values[numKeys] = {100.f, 0.f}; - hsBool leaving[] = {true, false}; + bool leaving[] = {true, false}; char *animName = "_link_anim"; int k; @@ -327,7 +327,7 @@ void AttachLinkMtlAnims(plMaxNode *node, hsGMaterial *mat) uint32_t hsMaterialConverter::ColorChannelsUseMask(plMaxNode* node, int iSubMtl) { uint32_t usedChan = 0; - hsBool deleteIt = false; + bool deleteIt = false; TriObject* triObj = node->GetTriObject(deleteIt); if( triObj ) @@ -570,7 +570,7 @@ uint32_t hsMaterialConverter::VertexChannelsRequestMask(plMaxNode* node, int iSu // // What kind of material am I?? // -hsBool hsMaterialConverter::IsMultiMat(Mtl *m) +bool hsMaterialConverter::IsMultiMat(Mtl *m) { hsGuardBegin("hsMaterialConverter::IsMultiMat"); @@ -583,7 +583,7 @@ hsBool hsMaterialConverter::IsMultiMat(Mtl *m) hsGuardEnd; } -hsBool hsMaterialConverter::IsHsMaxMat(Mtl *m) +bool hsMaterialConverter::IsHsMaxMat(Mtl *m) { hsGuardBegin("hsMaterialConverter::IsHsMaxMat"); @@ -596,7 +596,7 @@ hsBool hsMaterialConverter::IsHsMaxMat(Mtl *m) hsGuardEnd; } -hsBool hsMaterialConverter::IsMultipassMat(Mtl *m) +bool hsMaterialConverter::IsMultipassMat(Mtl *m) { hsGuardBegin("hsMaterialConverter::IsHsMaxMat"); @@ -609,7 +609,7 @@ hsBool hsMaterialConverter::IsMultipassMat(Mtl *m) hsGuardEnd; } -hsBool hsMaterialConverter::IsDecalMat(Mtl *m) +bool hsMaterialConverter::IsDecalMat(Mtl *m) { hsGuardBegin("hsMaterialConverter::IsDecalMat"); @@ -622,7 +622,7 @@ hsBool hsMaterialConverter::IsDecalMat(Mtl *m) hsGuardEnd; } -hsBool hsMaterialConverter::IsCompositeMat(Mtl *m) +bool hsMaterialConverter::IsCompositeMat(Mtl *m) { hsGuardBegin("hsMaterialConverter::IsCompositeMat"); @@ -635,7 +635,7 @@ hsBool hsMaterialConverter::IsCompositeMat(Mtl *m) hsGuardEnd; } -hsBool hsMaterialConverter::IsParticleMat(Mtl *m) +bool hsMaterialConverter::IsParticleMat(Mtl *m) { hsGuardBegin("hsMaterialConverter::IsParticleMat"); @@ -648,7 +648,7 @@ hsBool hsMaterialConverter::IsParticleMat(Mtl *m) hsGuardEnd; } -hsBool hsMaterialConverter::IsClothingMat(Mtl *m) +bool hsMaterialConverter::IsClothingMat(Mtl *m) { hsGuardBegin("hsMaterialConverter::IsClothingMat"); @@ -661,7 +661,7 @@ hsBool hsMaterialConverter::IsClothingMat(Mtl *m) hsGuardEnd; } -hsBool hsMaterialConverter::IsTwoSided(Mtl* m, int iSubMtl) +bool hsMaterialConverter::IsTwoSided(Mtl* m, int iSubMtl) { if( !m ) return false; @@ -669,28 +669,28 @@ hsBool hsMaterialConverter::IsTwoSided(Mtl* m, int iSubMtl) return 0 != (m->Requirements(iSubMtl) & MTLREQ_2SIDE); } -hsBool hsMaterialConverter::HasAnimatedTextures(Texmap* texMap) +bool hsMaterialConverter::HasAnimatedTextures(Texmap* texMap) { hsGuardBegin("hsMaterialConverter::HasAnimatedTextures"); return false; hsGuardEnd; } -hsBool hsMaterialConverter::IsAVILayer(Texmap* texMap) +bool hsMaterialConverter::IsAVILayer(Texmap* texMap) { hsGuardBegin("hsMaterialConverter::IsAVILayer"); return false; hsGuardEnd; } -hsBool hsMaterialConverter::IsQTLayer(Texmap* texMap) +bool hsMaterialConverter::IsQTLayer(Texmap* texMap) { hsGuardBegin("hsMaterialConverter::IsQTLayer"); return false; hsGuardEnd; } -hsBool hsMaterialConverter::IsBinkLayer(Texmap* texMap) +bool hsMaterialConverter::IsBinkLayer(Texmap* texMap) { hsGuardBegin("hsMaterialConverter::IsBinkLayer"); return false; @@ -754,9 +754,9 @@ hsMaterialConverter::CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, uint const char* dbgNodeName = node->GetName(); int numUVChannels = node->NumUVWChannels(); - hsBool makeAlphaLayer = node->AlphaHackLayersNeeded(multiIndex) > 0; + bool makeAlphaLayer = node->AlphaHackLayersNeeded(multiIndex) > 0; - hsBool enviro = fConverterUtils.IsEnvironHolder(node); + bool enviro = fConverterUtils.IsEnvironHolder(node); plString name; if (maxMaterial) @@ -765,7 +765,7 @@ hsMaterialConverter::CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, uint name = _TEMP_CONVERT_FROM_LITERAL("nil"); /// Get the material - hsBool isMultiMat = IsMultiMat( maxMaterial ); + bool isMultiMat = IsMultiMat( maxMaterial ); if (isMultiMat) { if (fErrorMsg->Set(!(fWarned & kWarnedSubMulti), node->GetName(), "Multi-material in CreateMaterialArray (Multi child of multi?) on mat %s. Using the first sub-material instead.", @@ -774,8 +774,8 @@ hsMaterialConverter::CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, uint maxMaterial = maxMaterial->GetSubMtl(0); } - hsBool isMultipassMat = IsMultipassMat( maxMaterial ); - hsBool isComposite = IsCompositeMat( maxMaterial ); + bool isMultipassMat = IsMultipassMat( maxMaterial ); + bool isComposite = IsCompositeMat( maxMaterial ); int i; int numMaterials = 1; @@ -1021,7 +1021,7 @@ hsGMaterial* hsMaterialConverter::AlphaHackVersion(plMaxNode* node, Mtl* mtl, in // (Though meshConverter should be calling CreateMaterialArray instead) // hsGMaterial *hsMaterialConverter::ICreateMaterial(Mtl *mtl, plMaxNode *node, const plString &name, int subIndex, - int numUVChannels, hsBool makeAlphaLayer) + int numUVChannels, bool makeAlphaLayer) { hsGuardBegin("hsMaterialConverter::ICreateMaterial"); @@ -1035,16 +1035,16 @@ hsGMaterial *hsMaterialConverter::ICreateMaterial(Mtl *mtl, plMaxNode *node, con } else { - hsBool forceCopy = hsControlConverter::Instance().OwnsMaterialCopy(node); + bool forceCopy = hsControlConverter::Instance().OwnsMaterialCopy(node); if( !forceCopy ) forceCopy = node->GetForceMaterialCopy(); if( !forceCopy ) forceCopy = IMustBeUniqueMaterial( mtl ); - hsBool runtimeLit = node->GetRunTimeLight(); + bool runtimeLit = node->GetRunTimeLight(); Mtl *bMtl = GetBaseMtl(node); - hsBool isMultiMat = IsMultiMat(bMtl);// || IsPortalMat(bMtl); + bool isMultiMat = IsMultiMat(bMtl);// || IsPortalMat(bMtl); hsGMaterial *mat; if (mtl) @@ -1205,9 +1205,9 @@ hsGMaterial *hsMaterialConverter::IProcessMaterial(Mtl *mtl, plMaxNode *node, co hsGuardEnd; } -hsBool hsMaterialConverter::IsMatchingDoneMaterial(DoneMaterialData *dmd, - Mtl *mtl, hsBool isMultiMat, uint32_t subMtlFlags, hsBool forceCopy, hsBool runtimeLit, - plMaxNode *node, int numUVChannels, hsBool makeAlphaLayer) +bool hsMaterialConverter::IsMatchingDoneMaterial(DoneMaterialData *dmd, + Mtl *mtl, bool isMultiMat, uint32_t subMtlFlags, bool forceCopy, bool runtimeLit, + plMaxNode *node, int numUVChannels, bool makeAlphaLayer) { if (!((dmd->fMaxMaterial == mtl) && (dmd->fSubMultiMat == isMultiMat) && @@ -1276,9 +1276,9 @@ hsBool hsMaterialConverter::IsMatchingDoneMaterial(DoneMaterialData *dmd, } -hsGMaterial* hsMaterialConverter::IInsertDoneMaterial(Mtl *mtl, hsGMaterial *hMat, plMaxNode *node, hsBool isMultiMat, - hsBool forceCopy, hsBool runtimeLit, uint32_t subMtlFlags, int numUVChannels, - hsBool makeAlphaLayer) +hsGMaterial* hsMaterialConverter::IInsertDoneMaterial(Mtl *mtl, hsGMaterial *hMat, plMaxNode *node, bool isMultiMat, + bool forceCopy, bool runtimeLit, uint32_t subMtlFlags, int numUVChannels, + bool makeAlphaLayer) { if( failedRT ) dupCuzRT++; @@ -1351,7 +1351,7 @@ hsGMaterial *hsMaterialConverter::IAddDefaultMaterial(plMaxNode *node) return hMat; } -plMipmap *hsMaterialConverter::IGetUVTransTexture(plMaxNode *node, hsBool useU /* = true */) +plMipmap *hsMaterialConverter::IGetUVTransTexture(plMaxNode *node, bool useU /* = true */) { plString texName = (useU ? _TEMP_CONVERT_FROM_LITERAL("ALPHA_BLEND_FILTER_U2ALPHA_TRANS_64x4") : _TEMP_CONVERT_FROM_LITERAL("ALPHA_BLEND_FILTER_V2ALPHA_TRANS_4x64") ); @@ -1431,7 +1431,7 @@ void hsMaterialConverter::IInsertSingleBlendLayer(plMipmap *texture, hsGMaterial } void hsMaterialConverter::IInsertAlphaBlendingLayers(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, int UVChan, - hsBool makeAlphaLayer) + bool makeAlphaLayer) { if ((mat->GetLayer( 0 )->GetState().fBlendFlags & hsGMatState::kBlendAlpha) == 0 || UVChan < 0 || !makeAlphaLayer) return; // Not blending... false alarm... my bad... enjoy the buffet! @@ -1457,7 +1457,7 @@ void hsMaterialConverter::IInsertAlphaBlendingLayers(Mtl *mtl, plMaxNode *node, } void hsMaterialConverter::IInsertMultipassBlendingLayers(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, int UVChan, - hsBool makeAlphaLayer) + bool makeAlphaLayer) { if (UVChan < 0 || !makeAlphaLayer) return; // Not blending, no layers to insert. @@ -1499,7 +1499,7 @@ void hsMaterialConverter::IInsertMultipassBlendingLayers(Mtl *mtl, plMaxNode *no } void hsMaterialConverter::IInsertCompBlendingLayers(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, int subMtlFlags, - int UVChan, hsBool makeAlphaLayer) + int UVChan, bool makeAlphaLayer) { if (mat == nil) return; @@ -1517,8 +1517,8 @@ void hsMaterialConverter::IInsertCompBlendingLayers(Mtl *mtl, plMaxNode *node, h IParamBlock2 *pb = mtl->GetParamBlockByID(plCompositeMtl::kBlkPasses); int currLayerNum = 0; int bitmask; - hsBool firstUsedLayer = true; - hsBool canWriteAlpha = ((plCompositeMtl *)mtl)->CanWriteAlpha() >= 0; + bool firstUsedLayer = true; + bool canWriteAlpha = ((plCompositeMtl *)mtl)->CanWriteAlpha() >= 0; plMipmap *currTexture; for (i = 0, bitmask = 0x1; i < mtl->NumSubMtls(); i++, bitmask <<= 1) { @@ -1577,15 +1577,15 @@ hsGMaterial *hsMaterialConverter::IProcessCompositeMtl(Mtl *mtl, plMaxNode *node hsgResMgr::ResMgr()->NewKey(plString::Format("%s_%d", name.c_str(), subMtlFlags), mat, node->GetLocation()); int multiIndex = IFindSubIndex(node, mtl); - hsBool needAlphaHack = node->AlphaHackLayersNeeded(multiIndex) > 0; - hsBool canWriteAlpha = ((plCompositeMtl *)mtl)->CanWriteAlpha() >= 0; + bool needAlphaHack = node->AlphaHackLayersNeeded(multiIndex) > 0; + bool canWriteAlpha = ((plCompositeMtl *)mtl)->CanWriteAlpha() >= 0; int bitMask = 1; int i; for (i = 0; i < mtl->NumSubMtls(); i++) { Mtl *subMtl = nil; - hsBool usingSubMtl = (i == 0 || pb->GetInt(kCompOn, 0, i - 1)); + bool usingSubMtl = (i == 0 || pb->GetInt(kCompOn, 0, i - 1)); if ((bitMask & subMtlFlags) != 0 && usingSubMtl) { plString pref = plString::Format("%s_%d", mat->GetKey()->GetName().c_str(), i); @@ -1598,7 +1598,7 @@ hsGMaterial *hsMaterialConverter::IProcessCompositeMtl(Mtl *mtl, plMaxNode *node layerCounts[i] = mat->GetNumLayers(); if (i > 0 && mat->GetNumLayers() > 0) { - hsBool materialIsBad = false; + bool materialIsBad = false; int j; if (usingSubMtl) { @@ -1607,7 +1607,7 @@ hsGMaterial *hsMaterialConverter::IProcessCompositeMtl(Mtl *mtl, plMaxNode *node uint32_t blendFlags = mat->GetLayer(j)->GetBlendFlags(); if ((blendFlags & hsGMatState::kBlendMask) != hsGMatState::kBlendAlpha) { - hsBool ignore = fErrorMsg->Set(!(fWarned & kWarnedCompMtlBadBlend), node->GetName(), + bool ignore = fErrorMsg->Set(!(fWarned & kWarnedCompMtlBadBlend), node->GetName(), "For composite materials, all multi-layered submaterials (except the base)" " must choose 'alpha' for 'output blending'. %s, which is a sub-material" " of %s, doesn't and will not be included in the composite material.", @@ -1621,7 +1621,7 @@ hsGMaterial *hsMaterialConverter::IProcessCompositeMtl(Mtl *mtl, plMaxNode *node if ((needAlphaHack || !canWriteAlpha) && ((blendFlags & hsGMatState::kBlendAlphaMult) || (blendFlags & hsGMatState::kBlendAlphaAdd))) { - hsBool ignore = fErrorMsg->Set(!(fWarned & kWarnedCompMtlBadBlend), node->GetName(), + bool ignore = fErrorMsg->Set(!(fWarned & kWarnedCompMtlBadBlend), node->GetName(), "Composite material %s has a submaterial, %s, that requires too many textures in a single pass " "(for blending effects). To cut this down, try some of the following:\n" "1. Make sure all multi-layered submaterials (except the base)" @@ -1763,7 +1763,7 @@ hsGMaterial *hsMaterialConverter::IProcessParticleMtl(Mtl *mtl, plMaxNode *node, uint32_t zFlags = 0; zFlags |= hsGMatState::kZNoZWrite; - hsBool preserveUVOffset = false;//PreserveUVOffset(mtl); + bool preserveUVOffset = false;//PreserveUVOffset(mtl); // // Process base layer @@ -1908,7 +1908,7 @@ void IProcessMtlAnimEase(plPassMtlBase *mtl, plAnimTimeConvert &tc) } } /* -hsBool hsMaterialConverter::CheckValidityOfSDLVarAnim(plPassMtlBase *mtl, char *varName, plMaxNode *node) +bool hsMaterialConverter::CheckValidityOfSDLVarAnim(plPassMtlBase *mtl, char *varName, plMaxNode *node) { plStateDescriptor *sd = nil; char *ageName; @@ -2232,7 +2232,7 @@ plLayerInterface* IProcessAnimation(plPassMtlBase *mtl, plMaxNode *node, const p } -hsBool hsMaterialConverter::IHasSubMtl(Mtl* base, Mtl* sub) +bool hsMaterialConverter::IHasSubMtl(Mtl* base, Mtl* sub) { if( !(base && sub) ) return false; @@ -2270,7 +2270,7 @@ int hsMaterialConverter::IFindSubIndex(plMaxNode* node, Mtl* mtl) // // Now handles both plPassMtl and plDecalMtl which derive from plPassMtlBase -hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, const plString& name) +bool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, const plString& name) { hsGuardBegin("hsMaterialConverter::IProcessPlasmaMaterial"); @@ -2289,7 +2289,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs } int multiIndex = IFindSubIndex(node, mtl); - hsBool needAlphaHack = node->AlphaHackLayersNeeded(multiIndex) > 0; + bool needAlphaHack = node->AlphaHackLayersNeeded(multiIndex) > 0; plPassMtlBase *passBase = (plPassMtlBase *)mtl; // @@ -2414,7 +2414,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs | hsGMatState::kShadeSpecularColor); } - hsBool preserveUVOffset = PreserveUVOffset(mtl); + bool preserveUVOffset = PreserveUVOffset(mtl); // // Process base layer @@ -2558,7 +2558,7 @@ hsBool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hs if( IsBumpLayer(texMap) || IsBumpMtl( mtl ) ) hLay->SetMiscFlags(hLay->GetMiscFlags() | hsGMatState::kMiscBumpLayer); - hsBool canFunk = !needAlphaHack; + bool canFunk = !needAlphaHack; // Base layer fixups // Yet another attempt to protect the artists from themselves. Setting the // alpha combine to mult or add, when the output blend is opaque is at best meaningless @@ -2639,7 +2639,7 @@ void hsMaterialConverter::IAddLayerToMaterial(hsGMaterial *mat, plLayerInterface // *ALSO* be unique. So this function will tell us whether we have to make // a unique material. -hsBool hsMaterialConverter::IMustBeUniqueMaterial( Mtl *mtl ) +bool hsMaterialConverter::IMustBeUniqueMaterial( Mtl *mtl ) { hsGuardBegin( "hsMaterialConverter::IMustBeUniqueMaterial" ); @@ -2683,7 +2683,7 @@ hsBool hsMaterialConverter::IMustBeUniqueMaterial( Mtl *mtl ) //// IMustBeUniqueLayer /////////////////////////////////////////////////////// // Check for a single layer (see IMustBeUniqueMaterial()) -hsBool hsMaterialConverter::IMustBeUniqueLayer( Texmap *layer ) +bool hsMaterialConverter::IMustBeUniqueLayer( Texmap *layer ) { plPlasmaMAXLayer *plasmaLayer = plPlasmaMAXLayer::GetPlasmaMAXLayer( layer ); if( plasmaLayer != nil ) @@ -2692,7 +2692,7 @@ hsBool hsMaterialConverter::IMustBeUniqueLayer( Texmap *layer ) return false; } -hsBool hsMaterialConverter::IUVGenHasDynamicScale(plMaxNode* node, StdUVGen *uvGen) +bool hsMaterialConverter::IUVGenHasDynamicScale(plMaxNode* node, StdUVGen *uvGen) { hsGuardBegin("hsMaterialConverter::IUVGenHasDynamicScale"); @@ -3039,7 +3039,7 @@ uint32_t hsMaterialConverter::IGetFunkyType(Texmap* texMap) return kFunkyNone; } -hsBool hsMaterialConverter::IHasFunkyOpacity(plMaxNode* node, Texmap* texMap) +bool hsMaterialConverter::IHasFunkyOpacity(plMaxNode* node, Texmap* texMap) { float tr0, cp0, cp1, tr1; return IGetOpacityRanges(node, texMap, tr0, cp0, cp1, tr1) != kFunkyNone; @@ -3260,7 +3260,7 @@ void hsMaterialConverter::IAppendWetLayer(plMaxNode* node, hsGMaterial* mat) } -hsBool hsMaterialConverter::HasVisDists(plMaxNode* node, int iSubMtl, float& minDist, float& maxDist) +bool hsMaterialConverter::HasVisDists(plMaxNode* node, int iSubMtl, float& minDist, float& maxDist) { const char* dbgNodeName = node->GetName(); const char* dbgMatName = node->GetMtl() ? node->GetMtl()->GetName() : "Dunno"; @@ -3293,7 +3293,7 @@ hsBool hsMaterialConverter::HasVisDists(plMaxNode* node, int iSubMtl, float& min return HasVisDists(node, mtl, minDist, maxDist); } -hsBool hsMaterialConverter::HasVisDists(plMaxNode* node, Mtl* mtl, float& minDist, float& maxDist) +bool hsMaterialConverter::HasVisDists(plMaxNode* node, Mtl* mtl, float& minDist, float& maxDist) { const char* dbgNodeName = node->GetName(); const char* dbgMatName = node->GetMtl() ? node->GetMtl()->GetName() : "Dunno"; @@ -3318,8 +3318,8 @@ hsBool hsMaterialConverter::HasVisDists(plMaxNode* node, Mtl* mtl, float& minDis if( IsHsMaxMat(mtl) ) { - hsBool baseFunky = false; - hsBool topFunky = true; + bool baseFunky = false; + bool topFunky = true; plPassMtl* passMtl = (plPassMtl*)mtl; float tr0, op0, op1, tr1; uint32_t funkyType = IGetOpacityRanges(node, mtl->GetSubTexmap(0), tr0, op0, op1, tr1); @@ -3384,7 +3384,7 @@ hsBool hsMaterialConverter::HasVisDists(plMaxNode* node, Mtl* mtl, float& minDis } -hsBool hsMaterialConverter::IsBumpLayer(Texmap* texMap) +bool hsMaterialConverter::IsBumpLayer(Texmap* texMap) { if( texMap && (texMap->ClassID() == LAYER_TEX_CLASS_ID) @@ -3395,7 +3395,7 @@ hsBool hsMaterialConverter::IsBumpLayer(Texmap* texMap) return false; } -hsBool hsMaterialConverter::IsBumpMtl(Mtl* mtl) +bool hsMaterialConverter::IsBumpMtl(Mtl* mtl) { if( mtl == nil ) return false; // Well, gee, I guess it can't be a bumpmap then... @@ -3408,7 +3408,7 @@ hsBool hsMaterialConverter::IsBumpMtl(Mtl* mtl) return false; } -hsBool hsMaterialConverter::HasBumpLayer(plMaxNode* node, Mtl* mtl) +bool hsMaterialConverter::HasBumpLayer(plMaxNode* node, Mtl* mtl) { if( !mtl ) return false; @@ -3773,7 +3773,7 @@ void hsMaterialConverter::IInsertBumpLayers(plMaxNode* node, hsGMaterial* mat, i { // First let's monkey with the incoming layer, just to confuse things. // This doesn't actually do anything useful, it's just to spite anyone trying to read this code. - hsBool isAdd = 0 != (mat->GetLayer(bumpLayerIdx)->GetBlendFlags() & hsGMatState::kBlendAdd); + bool isAdd = 0 != (mat->GetLayer(bumpLayerIdx)->GetBlendFlags() & hsGMatState::kBlendAdd); plLayer* bumpLay = plLayer::ConvertNoRef(mat->GetLayer(bumpLayerIdx)->BottomOfStack()); if( bumpLay ) bumpLay->SetBlendFlags( @@ -3879,7 +3879,7 @@ Texmap *hsMaterialConverter::GetUVChannelBase(plMaxNode *node, Mtl* mtl, int whi hsGuardEnd; } -hsBool hsMaterialConverter::ClearDoneMaterials(plMaxNode* node) +bool hsMaterialConverter::ClearDoneMaterials(plMaxNode* node) { hsGuardBegin("hsMaterialConverter::ClearDoneMaterials"); @@ -3888,7 +3888,7 @@ hsBool hsMaterialConverter::ClearDoneMaterials(plMaxNode* node) if (isMultiMat) { - hsBool retVal = false; + bool retVal = false; int32_t i; for (i = 0; i < mtl->NumSubMtls(); i++) { @@ -3905,11 +3905,11 @@ hsBool hsMaterialConverter::ClearDoneMaterials(plMaxNode* node) hsGuardEnd; } -hsBool hsMaterialConverter::IClearDoneMaterial(Mtl* mtl, plMaxNode* node) +bool hsMaterialConverter::IClearDoneMaterial(Mtl* mtl, plMaxNode* node) { hsGuardBegin("hsMaterialConverter::IClearDoneMaterial"); - hsBool doneSomething = false; + bool doneSomething = false; if (fLastMaterial.fMaxMaterial == mtl) { fLastMaterial.fHsMaterial = nil; @@ -4058,7 +4058,7 @@ void hsMaterialConverter::IBuildSphereMap(Bitmap *bitmap[6], Bitmap *bm) hsGuardEnd; } -hsBool hsMaterialConverter::ITextureTransformIsAnimated(Texmap *texmap) +bool hsMaterialConverter::ITextureTransformIsAnimated(Texmap *texmap) { hsGuardBegin("hsMaterialConverter::IProcessAnimMaterial"); @@ -4096,7 +4096,7 @@ hsBool hsMaterialConverter::ITextureTransformIsAnimated(Texmap *texmap) hsGuardEnd; } -hsBool hsMaterialConverter::IHasAnimatedControllers(Animatable* anim) +bool hsMaterialConverter::IHasAnimatedControllers(Animatable* anim) { hsGuardBegin("hsMaterialConverter::IHasAnimatedControllers"); @@ -4123,7 +4123,7 @@ hsBool hsMaterialConverter::IHasAnimatedControllers(Animatable* anim) } -hsBool hsMaterialConverter::IIsAnimatedTexmap(Texmap* texmap) +bool hsMaterialConverter::IIsAnimatedTexmap(Texmap* texmap) { hsGuardBegin("hsMaterialConverter::IIsAnimatedTexmap"); @@ -4150,7 +4150,7 @@ hsBool hsMaterialConverter::IIsAnimatedTexmap(Texmap* texmap) // // returns true if this material is animated // -hsBool hsMaterialConverter::IsAnimatedMaterial(Mtl* mtl) +bool hsMaterialConverter::IsAnimatedMaterial(Mtl* mtl) { hsGuardBegin("hsMaterialConverter::IsAnimatedMaterial"); @@ -4195,7 +4195,7 @@ void hsMaterialConverter::GetUsedMaterials(plMaxNode* node, hsBitVector& used) return; } - hsBool deleteIt = false; + bool deleteIt = false; TriObject* triObj = node->GetTriObject(deleteIt); if( triObj ) { @@ -4219,7 +4219,7 @@ void hsMaterialConverter::GetUsedMaterials(plMaxNode* node, hsBitVector& used) // a lighting model... // UPDATE 8.26 mcn - Now checks for opacity controllers as well -hsBool hsMaterialConverter::HasMaterialDiffuseOrOpacityAnimation(plMaxNode* node, Mtl* mtl) +bool hsMaterialConverter::HasMaterialDiffuseOrOpacityAnimation(plMaxNode* node, Mtl* mtl) { hsGuardBegin( "hsMaterialConverter::HasMaterialDiffuseOrOpacityAnimation" ); @@ -4332,7 +4332,7 @@ hsBool hsMaterialConverter::HasMaterialDiffuseOrOpacityAnimation(plMaxNode* nod // Returns true if the any of the layers of any of the submaterials or // the main material are emissive. -hsBool hsMaterialConverter::HasEmissiveLayer(plMaxNode* node, Mtl* mtl) +bool hsMaterialConverter::HasEmissiveLayer(plMaxNode* node, Mtl* mtl) { hsGuardBegin( "hsMaterialConverter::HasEmissiveLayer" ); @@ -4390,7 +4390,7 @@ hsBool hsMaterialConverter::HasEmissiveLayer(plMaxNode* node, Mtl* mtl) // // returns true if the material onthis node is animated // -hsBool hsMaterialConverter::HasAnimatedMaterial(plMaxNode* node) +bool hsMaterialConverter::HasAnimatedMaterial(plMaxNode* node) { hsGuardBegin("hsMaterialConverter::HasAnimatedMaterial"); @@ -4982,7 +4982,7 @@ void hsMaterialConverter::IPrintDoneMat(hsStream* stream, const char* prefix, Do } } -hsBool hsMaterialConverter::IEquivalent(DoneMaterialData* one, DoneMaterialData* two) +bool hsMaterialConverter::IEquivalent(DoneMaterialData* one, DoneMaterialData* two) { if( one->fOwnedCopy || two->fOwnedCopy ) return false; @@ -5020,7 +5020,7 @@ void hsMaterialConverter::IPrintDoneMaterials(const char* path, hsTArray *CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, uint32_t multiIndex); // true if last material creation changed MAX time, invalidating current mesh - hsBool ChangedTimes() { return fChangedTimes; } + bool ChangedTimes() { return fChangedTimes; } Texmap *GetUVChannelBase(plMaxNode *node, Mtl* mtl, int which); - hsBool ClearDoneMaterials(plMaxNode* node); + bool ClearDoneMaterials(plMaxNode* node); int GetMaterialArray(Mtl *mtl, plMaxNode* node, hsTArray& out, uint32_t multiIndex = 0 ); int GetMaterialArray(Mtl *mtl, hsTArray& out, uint32_t multiIndex = 0); @@ -233,12 +233,12 @@ enum { hsGMaterial *fHsMaterial; Mtl *fMaxMaterial; plMaxNode *fNode; - hsBool fSubMultiMat; - hsBool fOwnedCopy; - hsBool fRuntimeLit; + bool fSubMultiMat; + bool fOwnedCopy; + bool fRuntimeLit; uint32_t fSubMtlFlags; int fNumUVChannels; - hsBool fMakeAlphaLayer; + bool fMakeAlphaLayer; }; private: @@ -259,41 +259,41 @@ private: }; DoneMaterialData* IFindDoneMaterial(DoneMaterialData& done); - hsBool IClearDoneMaterial(Mtl* mtl, plMaxNode* node); + bool IClearDoneMaterial(Mtl* mtl, plMaxNode* node); hsGMaterial *IAddDefaultMaterial(plMaxNode *node); - plMipmap *IGetUVTransTexture(plMaxNode *node, hsBool useU = true); + plMipmap *IGetUVTransTexture(plMaxNode *node, bool useU = true); void IInsertSingleBlendLayer(plMipmap *texture, hsGMaterial *mat, plMaxNode *node, int layerIdx, int UVChan); - hsGMaterial *ICreateMaterial(Mtl *mtl, plMaxNode *node, const plString &name, int subIndex, int numUVChannels, hsBool makeAlphaLayer); + hsGMaterial *ICreateMaterial(Mtl *mtl, plMaxNode *node, const plString &name, int subIndex, int numUVChannels, bool makeAlphaLayer); hsGMaterial *IProcessMaterial(Mtl *mtl, plMaxNode *node, const plString &name, int UVChan, int subMtlFlags = 0); // ... calls one of: hsGMaterial *IProcessMultipassMtl(Mtl *mtl, plMaxNode *node, const plString &name, int UVChan); hsGMaterial *IProcessCompositeMtl(Mtl *mtl, plMaxNode *node, const plString &name, int UVChan, int subMtlFlags); hsGMaterial *IProcessParticleMtl(Mtl *mtl, plMaxNode *node, const plString &name); - hsBool IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, const plString& namePrefix); + bool IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, const plString& namePrefix); - hsGMaterial* IInsertDoneMaterial(Mtl *mtl, hsGMaterial *hMat, plMaxNode *node, hsBool isMultiMat, - hsBool forceCopy, hsBool runtimeLit, uint32_t subMtlFlags, int numUVChannels, hsBool makeAlphaLayer); + hsGMaterial* IInsertDoneMaterial(Mtl *mtl, hsGMaterial *hMat, plMaxNode *node, bool isMultiMat, + bool forceCopy, bool runtimeLit, uint32_t subMtlFlags, int numUVChannels, bool makeAlphaLayer); void IInsertBumpLayers(plMaxNode* node, hsGMaterial* mat, int bumpLayerIdx); void IInsertBumpLayers(plMaxNode* node, hsGMaterial* mat); plLayer* IMakeBumpLayer(plMaxNode* node, const plString& nameBase, hsGMaterial* mat, uint32_t miscFlag); plMipmap* IGetBumpLutTexture(plMaxNode* node); - hsBool IHasSubMtl(Mtl* base, Mtl* sub); + bool IHasSubMtl(Mtl* base, Mtl* sub); int IFindSubIndex(plMaxNode* node, Mtl* mtl); // NOTE: each insert function potentially modifies the layers, // so make sure you own the material copy before calling these void IInsertAlphaBlendingLayers(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, int UVChan, - hsBool makeAlphaLayer); + bool makeAlphaLayer); void IInsertMultipassBlendingLayers(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, int UVChan, - hsBool makeAlphaLayer); + bool makeAlphaLayer); void IInsertCompBlendingLayers(Mtl *mtl, plMaxNode *node, hsGMaterial *mat, int subMtlFlags, - int UVChan, hsBool makeAlphaLayer); + int UVChan, bool makeAlphaLayer); void IAddLayerToMaterial(hsGMaterial *mat, plLayerInterface *layer); @@ -303,7 +303,7 @@ private: void IInitAttrLayer(hsGLayer* hLay, Mtl *mtl, Texmap* layer, plMaxNode* node); #endif // ... and so forth - hsBool IUVGenHasDynamicScale(plMaxNode* node, StdUVGen *uvGen); + bool IUVGenHasDynamicScale(plMaxNode* node, StdUVGen *uvGen); void IScaleLayerOpacity(plLayer* hLay, float scale); hsGMaterial *ICheckForProjectedTexture(plMaxNode *node); @@ -314,9 +314,9 @@ private: #if 0 // DEFER_ANIM_MAT void IProcessAnimMaterial(BitmapTex *bitmapTex, hsGAnimLayer* at, uint32_t texFlags, uint32_t procFlags); #endif // DEFER_ANIM_MAT - static hsBool ITextureTransformIsAnimated(Texmap *texmap); - static hsBool IHasAnimatedControllers(Animatable* anim); - static hsBool IIsAnimatedTexmap(Texmap* texmap); + static bool ITextureTransformIsAnimated(Texmap *texmap); + static bool IHasAnimatedControllers(Animatable* anim); + static bool IIsAnimatedTexmap(Texmap* texmap); static uint32_t ICheckPoints(const Point3& p0, const Point3& p1, const Point3& p2, const Point3& p3, int chan, @@ -328,17 +328,17 @@ private: void IAppendWetLayer(plMaxNode* node, hsGMaterial* mat); static plBitmap* IGetFunkyRamp(plMaxNode* node, uint32_t funkyType); static void IAppendFunkyLayer(plMaxNode* node, Texmap* texMap, hsGMaterial* mat); - static hsBool IHasFunkyOpacity(plMaxNode* node, Texmap* texMap); + static bool IHasFunkyOpacity(plMaxNode* node, Texmap* texMap); static uint32_t IGetFunkyType(Texmap* texMap); static uint32_t IGetOpacityRanges(plMaxNode* node, Texmap* texMap, float& tr0, float& op0, float& op1, float& tr1); Interface *fInterface; hsConverterUtils& fConverterUtils; - hsBool fSave; + bool fSave; plErrorMsg *fErrorMsg; int32_t fSubIndex; - hsBool fChangedTimes; + bool fChangedTimes; char *fNodeName; uint32_t fWarned; @@ -347,12 +347,12 @@ private: DoneMaterialData fLastMaterial; hsTArray fDoneMaterials; - hsBool IsMatchingDoneMaterial(DoneMaterialData *dmd, - Mtl *mtl, hsBool isMultiMat, uint32_t subMtlFlags, hsBool forceCopy, hsBool runtimeLit, - plMaxNode *node, int numUVChannels, hsBool makeAlphaLayer); + bool IsMatchingDoneMaterial(DoneMaterialData *dmd, + Mtl *mtl, bool isMultiMat, uint32_t subMtlFlags, bool forceCopy, bool runtimeLit, + plMaxNode *node, int numUVChannels, bool makeAlphaLayer); void ISortDoneMaterials(hsTArray& doneMats); - hsBool IEquivalent(DoneMaterialData* one, DoneMaterialData* two); + bool IEquivalent(DoneMaterialData* one, DoneMaterialData* two); void IPrintDoneMat(hsStream* stream, const char* prefix, DoneMaterialData* doneMat); void IPrintDoneMaterials(const char* path, hsTArray& doneMats); void IGenMaterialReport(const char* path); @@ -361,7 +361,7 @@ public: // Apologies all around, but I need this list for dumping some export warnings. mf const hsTArray& DoneMaterials() { return fDoneMaterials; } - //hsBool CheckValidityOfSDLVarAnim(plPassMtlBase *mtl, char *varName, plMaxNode *node); + //bool CheckValidityOfSDLVarAnim(plPassMtlBase *mtl, char *varName, plMaxNode *node); }; extern hsMaterialConverter gMaterialConverter; diff --git a/Sources/Tools/MaxConvert/hsVertexShader.cpp b/Sources/Tools/MaxConvert/hsVertexShader.cpp index df3dc9a7..b382df85 100644 --- a/Sources/Tools/MaxConvert/hsVertexShader.cpp +++ b/Sources/Tools/MaxConvert/hsVertexShader.cpp @@ -173,7 +173,7 @@ void hsVertexShader::IShadeSpan( plGeometrySpan *span, INode* node ) hsColorRGBA preDiffuse, rtDiffuse, matAmbient; hsBitVector dirtyVector; int i; - hsBool translucent, shadeIt, addingIt; + bool translucent, shadeIt, addingIt; plLayerInterface *layer = nil; @@ -355,7 +355,7 @@ void hsVertexShader::IShadeSpan( plGeometrySpan *span, INode* node ) // We do the mat modulation outside of this function, so we // just gotta make sure the two arrays get the right values. -void hsVertexShader::IShadeVertices( plGeometrySpan *span, hsBitVector *dirtyVector, INode* node, hsBool translucent ) +void hsVertexShader::IShadeVertices( plGeometrySpan *span, hsBitVector *dirtyVector, INode* node, bool translucent ) { hsGuardBegin( "hsVertexShader::IShadeVertices" ); @@ -407,7 +407,7 @@ void hsVertexShader::IShadeVertices( plGeometrySpan *span, hsBitVector *dirtyVec hsGuardEnd; } -void hsVertexShader::INativeShadeVtx(hsColorRGBA& shade, plMaxLightContext& ctx, const plTmpVertex3& vtx, hsBool translucent) +void hsVertexShader::INativeShadeVtx(hsColorRGBA& shade, plMaxLightContext& ctx, const plTmpVertex3& vtx, bool translucent) { ctx.SetPoint(vtx.fLocalPos, vtx.fNormal); @@ -427,7 +427,7 @@ void hsVertexShader::INativeShadeVtx(hsColorRGBA& shade, plMaxLightContext& ctx, } } -void hsVertexShader::INativeShadowVtx(hsColorRGBA& shade, plMaxLightContext& ctx, const plTmpVertex3& vtx, hsBool translucent) +void hsVertexShader::INativeShadowVtx(hsColorRGBA& shade, plMaxLightContext& ctx, const plTmpVertex3& vtx, bool translucent) { ctx.SetPoint(vtx.fLocalPos, vtx.fNormal); @@ -437,7 +437,7 @@ void hsVertexShader::INativeShadowVtx(hsColorRGBA& shade, plMaxLightContext& ctx shade.b += color.b; } -hsBool hsVertexShader::IsTranslucent( hsGMaterial *material ) +bool hsVertexShader::IsTranslucent( hsGMaterial *material ) { hsGuardBegin("hsVertexShader::IsTranslucent"); diff --git a/Sources/Tools/MaxConvert/hsVertexShader.h b/Sources/Tools/MaxConvert/hsVertexShader.h index dfd27ff0..4c051a44 100644 --- a/Sources/Tools/MaxConvert/hsVertexShader.h +++ b/Sources/Tools/MaxConvert/hsVertexShader.h @@ -74,15 +74,15 @@ private: hsVector3 fNormal; }; - hsBool ILightIncludesNode(LightObject* light, INode* node); + bool ILightIncludesNode(LightObject* light, INode* node); - void INativeShadeVtx(hsColorRGBA& shade, plMaxLightContext& ctx, const plTmpVertex3& vtx, hsBool translucent); - void INativeShadowVtx(hsColorRGBA& shade, plMaxLightContext& ctx, const plTmpVertex3& vtx, hsBool translucent); + void INativeShadeVtx(hsColorRGBA& shade, plMaxLightContext& ctx, const plTmpVertex3& vtx, bool translucent); + void INativeShadowVtx(hsColorRGBA& shade, plMaxLightContext& ctx, const plTmpVertex3& vtx, bool translucent); - hsBool IsTranslucent( hsGMaterial *material ); + bool IsTranslucent( hsGMaterial *material ); void IShadeSpan( plGeometrySpan *span, INode* node ); - void IShadeVertices( plGeometrySpan *span, hsBitVector *dirtyVector, INode* node, hsBool translucent ); + void IShadeVertices( plGeometrySpan *span, hsBitVector *dirtyVector, INode* node, bool translucent ); private: Interface *fInterface; diff --git a/Sources/Tools/MaxConvert/plBitmapCreator.cpp b/Sources/Tools/MaxConvert/plBitmapCreator.cpp index 5429f715..63373c81 100644 --- a/Sources/Tools/MaxConvert/plBitmapCreator.cpp +++ b/Sources/Tools/MaxConvert/plBitmapCreator.cpp @@ -72,7 +72,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plCommonBitmapLib : public plCommonObjLib { public: - virtual hsBool IsInteresting( const plKey &objectKey ) + virtual bool IsInteresting( const plKey &objectKey ) { if( objectKey->GetUoid().GetClassType() == plCubicEnvironmap::Index() || objectKey->GetUoid().GetClassType() == plMipmap::Index() ) @@ -100,7 +100,7 @@ plBitmapCreator &plBitmapCreator::Instance() return fInstance; } -void plBitmapCreator::Init( hsBool save, plErrorMsg *msg ) +void plBitmapCreator::Init( bool save, plErrorMsg *msg ) { fErrorMsg = msg; } @@ -143,7 +143,7 @@ plMipmap *plBitmapCreator::ICreateBitmap(plBitmapData *bd) } #endif - hsBool notMipped = (bd->texFlags & plMipmap::kForceOneMipLevel) != 0; + bool notMipped = (bd->texFlags & plMipmap::kForceOneMipLevel) != 0; float sigma = bd->sig; // Load the bitmap @@ -663,7 +663,7 @@ plBitmap *plBitmapCreator::ICreateTexture( plBitmapData *bd, const plLocation &l //// IAddBitmap /////////////////////////////////////////////////////////////// -void plBitmapCreator::IAddBitmap( plBitmap *bitmap, hsBool dontRef ) +void plBitmapCreator::IAddBitmap( plBitmap *bitmap, bool dontRef ) { sCommonBitmapLib.AddObject( bitmap ); } diff --git a/Sources/Tools/MaxConvert/plBitmapCreator.h b/Sources/Tools/MaxConvert/plBitmapCreator.h index 9b2c2a86..00b3fa0a 100644 --- a/Sources/Tools/MaxConvert/plBitmapCreator.h +++ b/Sources/Tools/MaxConvert/plBitmapCreator.h @@ -68,8 +68,8 @@ public: float detailMax; float detailMin; float sig; - hsBool isStaticCubicEnvMap; - hsBool invertAlpha; + bool isStaticCubicEnvMap; + bool invertAlpha; const char *faceNames[ 6 ]; uint32_t maxDimension; uint8_t clampFlags; @@ -102,7 +102,7 @@ class plBitmapCreator plBitmap *CreateTexture( plBitmapData *bd, const plLocation &loc, int clipID = -1 ); plMipmap *CreateBlankMipmap( uint32_t width, uint32_t height, unsigned config, uint8_t numLevels, const plString &keyName, const plLocation &keyLocation ); - void Init( hsBool save, plErrorMsg *msg ); + void Init( bool save, plErrorMsg *msg ); void DeInit( void ); void CleanUpMaps( void ); @@ -125,5 +125,5 @@ class plBitmapCreator int ICopyBitmap( Bitmap *bm, plMipmap &hBitmap ); int IInvertAlpha( plMipmap &hBitmap ); - void IAddBitmap( plBitmap *bitmap, hsBool dontRef = false ); + void IAddBitmap( plBitmap *bitmap, bool dontRef = false ); }; diff --git a/Sources/Tools/MaxConvert/plClusterUtil.cpp b/Sources/Tools/MaxConvert/plClusterUtil.cpp index 08a56434..b5516805 100644 --- a/Sources/Tools/MaxConvert/plClusterUtil.cpp +++ b/Sources/Tools/MaxConvert/plClusterUtil.cpp @@ -428,7 +428,7 @@ static int cmp(const void *elem1, const void *elem2) } -hsBool plClusterUtil::ISplitCluster(plSpanTemplateB* templ, plL2WTab& src, plL2WTab& lo, plL2WTab& hi) +bool plClusterUtil::ISplitCluster(plSpanTemplateB* templ, plL2WTab& src, plL2WTab& lo, plL2WTab& hi) { // Tried this, seems to work pretty well, but a more even grid is probably wiser at // this point. @@ -526,8 +526,8 @@ inline float inlGetAlpha(uint32_t* color) plSpanEncoding plClusterUtil::ISelectEncoding(plPoint3TabTab& delPosTab, plColorTabTab& colorsTab) { - hsBool hasColor = false; - hsBool hasAlpha = false; + bool hasColor = false; + bool hasAlpha = false; float maxLenSq = 0; float maxX = 0; float maxY = 0; @@ -734,8 +734,8 @@ void plClusterUtil::IDelPosAndColor(plSpanTemplateB* templ, plPoint3TabTab& delPos, plColorTabTab& colors) { - hsBool doDef = def != nil; - hsBool doCol = shade != nil; + bool doDef = def != nil; + bool doCol = shade != nil; // For each inst int i; for( i = 0; i < insts.Count(); i++ ) diff --git a/Sources/Tools/MaxConvert/plClusterUtil.h b/Sources/Tools/MaxConvert/plClusterUtil.h index ef86ff12..249737a5 100644 --- a/Sources/Tools/MaxConvert/plClusterUtil.h +++ b/Sources/Tools/MaxConvert/plClusterUtil.h @@ -61,7 +61,7 @@ public: // Begin returns true if it's actually planning to do anything. // If it returns false, End will still get called, but GetDel probably won't. - virtual hsBool Begin(INode* templNode, const hsBounds3Ext& wBnd) { return false; } + virtual bool Begin(INode* templNode, const hsBounds3Ext& wBnd) { return false; } virtual void End() {} hsVector3 GetDel(const hsPoint3& p) { return GetDel(Point3(p.fX, p.fY, p.fZ)); } @@ -71,7 +71,7 @@ public: class plShadeVert { public: - virtual hsBool Begin(INode* templNode, const hsBounds3Ext& wBnd) { return false; } + virtual bool Begin(INode* templNode, const hsBounds3Ext& wBnd) { return false; } virtual void End() {} Color GetShade(const hsPoint3& p, const hsVector3& n) { return GetShade(Point3(p.fX, p.fY, p.fZ), Point3(n.fX, n.fY, n.fZ)); } @@ -119,7 +119,7 @@ protected: void IFreeClustersRecur(plL2WTabTab& dst) const; void IFindClustersRecur(plSpanTemplateB* templ, plL2WTab& src, plL2WTabTab& dst); - hsBool ISplitCluster(plSpanTemplateB* templ, plL2WTab& src, plL2WTab& lo, plL2WTab& hi); + bool ISplitCluster(plSpanTemplateB* templ, plL2WTab& src, plL2WTab& lo, plL2WTab& hi); int ISelectAxis(const plL2WTab& src) const; Box3 IBound(const plL2WTab& src) const; Point3 ILength(const plL2WTab& src) const; diff --git a/Sources/Tools/MaxConvert/plConvert.cpp b/Sources/Tools/MaxConvert/plConvert.cpp index 8a41bf9e..dbefec88 100644 --- a/Sources/Tools/MaxConvert/plConvert.cpp +++ b/Sources/Tools/MaxConvert/plConvert.cpp @@ -96,12 +96,12 @@ plConvert& plConvert::Instance() return theInstance; } -hsBool plConvert::IOK() +bool plConvert::IOK() { return (!fQuit && !fpErrorMsg->IsBogus() ) ? true: false; } -hsBool plConvert::Convert() +bool plConvert::Convert() { #ifndef HS_NO_TRY try @@ -119,7 +119,7 @@ hsBool plConvert::Convert() IFindDuplicateNames(); plExportProgressBar bar; - hsBool retVal = true; // sometime, we might look at this + bool retVal = true; // sometime, we might look at this if( !IAutoClusterRecur(pNode) ) { @@ -267,7 +267,7 @@ hsBool plConvert::Convert() //#include "MaxMain/plMaxNodeData.h" //#include -hsBool ConvertList(hsTArray& nodes, PMaxNodeFunc p, plErrorMsg *errMsg, plConvertSettings *settings) +bool ConvertList(hsTArray& nodes, PMaxNodeFunc p, plErrorMsg *errMsg, plConvertSettings *settings) { for (int i = 0; i < nodes.Count(); i++) { @@ -280,7 +280,7 @@ hsBool ConvertList(hsTArray& nodes, PMaxNodeFunc p, plErrorMsg *errM return true; } -hsBool plConvert::Convert(hsTArray& nodes) +bool plConvert::Convert(hsTArray& nodes) { #ifndef HS_NO_TRY try @@ -288,7 +288,7 @@ hsBool plConvert::Convert(hsTArray& nodes) { fSettings->fReconvert = true; - hsBool retVal = true; + bool retVal = true; if (IOK()) retVal = ConvertList(nodes, &plMaxNode::ClearData, fpErrorMsg, fSettings); @@ -352,7 +352,7 @@ hsBool plConvert::Convert(hsTArray& nodes) #endif } -hsBool plConvert::Init(Interface *ip, plErrorMsg* msg, plConvertSettings *settings) +bool plConvert::Init(Interface *ip, plErrorMsg* msg, plConvertSettings *settings) { fInterface = ip; fpErrorMsg = msg; @@ -404,7 +404,7 @@ void plConvert::AddMessageToQueue(plMessage* msg) fMsgQueue.Append(msg); } -void plConvert::SendEnvironmentMessage(plMaxNode* pNode, plMaxNode* efxRegion, plMessage* msg, hsBool ignorePhysicals ) +void plConvert::SendEnvironmentMessage(plMaxNode* pNode, plMaxNode* efxRegion, plMessage* msg, bool ignorePhysicals ) { for (int i = 0; i < pNode->NumberOfChildren(); i++) SendEnvironmentMessage((plMaxNode *)pNode->GetChildNode(i), efxRegion, msg, ignorePhysicals ); diff --git a/Sources/Tools/MaxConvert/plConvert.h b/Sources/Tools/MaxConvert/plConvert.h index c0d04a11..1aa35d6c 100644 --- a/Sources/Tools/MaxConvert/plConvert.h +++ b/Sources/Tools/MaxConvert/plConvert.h @@ -74,17 +74,17 @@ public: class plConvert { protected: - hsBool fQuit; + bool fQuit; plErrorMsg* fpErrorMsg; Interface* fInterface; plConvertSettings* fSettings; hsTArray fMsgQueue; plConvert(); - hsBool IMakeSceneObject(INode* node); + bool IMakeSceneObject(INode* node); plKey IGetRoomKey(INode* node); plKey INewRoom(INode* node, char roomName[]); - hsBool IOK(); + bool IOK(); public: static plConvert& Instance(); @@ -103,14 +103,14 @@ public: }; // Init the converter. Only good for one call of Convert. - hsBool Init(Interface *ip, plErrorMsg* msg, plConvertSettings *settings); + bool Init(Interface *ip, plErrorMsg* msg, plConvertSettings *settings); void DeInit(); - hsBool Convert(); - hsBool Convert(hsTArray& nodes); // Convert a set of nodes (for SceneViewer update) + bool Convert(); + bool Convert(hsTArray& nodes); // Convert a set of nodes (for SceneViewer update) plMaxNode* GetRootNode(); - void SendEnvironmentMessage(plMaxNode* pNode, plMaxNode* efxRegion, plMessage* msg, hsBool ignorePhysicals = false); // iterates through scene to find nodes contained by the efxRegion + void SendEnvironmentMessage(plMaxNode* pNode, plMaxNode* efxRegion, plMessage* msg, bool ignorePhysicals = false); // iterates through scene to find nodes contained by the efxRegion void AddMessageToQueue(plMessage* msg); // Because components don't get the convert settings (too much work to retrofit all of them) diff --git a/Sources/Tools/MaxConvert/plDistributor.cpp b/Sources/Tools/MaxConvert/plDistributor.cpp index 47e17aff..a4b2a29b 100644 --- a/Sources/Tools/MaxConvert/plDistributor.cpp +++ b/Sources/Tools/MaxConvert/plDistributor.cpp @@ -392,7 +392,7 @@ Box3 plDistributor::ISetupGrid(const Point3& p0, const Point3& p1, const Point3& return box; } -hsBool plDistributor::IFailsProbBitmap(int iFace, const Point3& bary) const +bool plDistributor::IFailsProbBitmap(int iFace, const Point3& bary) const { // If we don't have a probability map, or we don't have // valid coordinates into it, just return false. That is, @@ -536,7 +536,7 @@ Point3 plDistributor::IGetSurfaceNormal(int iFace, const Point3& bary) const return FNormalize(faceNorm); } -hsBool plDistributor::IFailsAngProb(int iFace, const Point3& bary) const +bool plDistributor::IFailsAngProb(int iFace, const Point3& bary) const { if( fAngProbLo == fAngProbHi ) return false; @@ -568,7 +568,7 @@ hsBool plDistributor::IFailsAngProb(int iFace, const Point3& bary) const } -hsBool plDistributor::IFailsAltProb(int iFace, const Point3& bary) const +bool plDistributor::IFailsAltProb(int iFace, const Point3& bary) const { if( fAltProbLo == fAltProbHi ) return false; @@ -602,7 +602,7 @@ hsBool plDistributor::IFailsAltProb(int iFace, const Point3& bary) const // If |projGridPt - GridPt| < gridCubeRadius // and probBitmap->GetPixel(src->UVW(bary)) < RandomZeroToOne() // Also a generic random factor. -hsBool plDistributor::IProbablyDoIt(int iFace, Point3& del, const Point3& bary) const +bool plDistributor::IProbablyDoIt(int iFace, Point3& del, const Point3& bary) const { if( fRand.RandZeroToOne() >= fOverallProb ) { diff --git a/Sources/Tools/MaxConvert/plDistributor.h b/Sources/Tools/MaxConvert/plDistributor.h index 3e6d3da7..2f365654 100644 --- a/Sources/Tools/MaxConvert/plDistributor.h +++ b/Sources/Tools/MaxConvert/plDistributor.h @@ -267,10 +267,10 @@ protected: Matrix3 IInvOTM(int iRepNode) const; Matrix3 IGenerateTransform(int iRepNode, int iFace, const Point3& pt, const Point3& bary) const; - hsBool IProbablyDoIt(int iFace, Point3& del, const Point3& bary) const; - hsBool IFailsAltProb(int iFace, const Point3& bary) const; - hsBool IFailsAngProb(int iFace, const Point3& bary) const; - hsBool IFailsProbBitmap(int iFace, const Point3& bary) const; + bool IProbablyDoIt(int iFace, Point3& del, const Point3& bary) const; + bool IFailsAltProb(int iFace, const Point3& bary) const; + bool IFailsAngProb(int iFace, const Point3& bary) const; + bool IFailsProbBitmap(int iFace, const Point3& bary) const; Box3 ISetupGrid(const Point3& p0, const Point3& p1, const Point3& p2) const; Point3& IPerturbPoint(Point3& pt) const; int ISelectRepNode() const; diff --git a/Sources/Tools/MaxConvert/plLayerConverter.cpp b/Sources/Tools/MaxConvert/plLayerConverter.cpp index 3144d2c2..c6e3ddef 100644 --- a/Sources/Tools/MaxConvert/plLayerConverter.cpp +++ b/Sources/Tools/MaxConvert/plLayerConverter.cpp @@ -59,6 +59,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com /////////////////////////////////////////////////////////////////////////////// +#include "HeadSpin.h" #include "Max.h" #include "stdmat.h" #include "istdplug.h" @@ -158,7 +159,7 @@ plLayerConverter &plLayerConverter::Instance( void ) hsGuardEnd; } -void plLayerConverter::Init( hsBool save, plErrorMsg *msg ) +void plLayerConverter::Init( bool save, plErrorMsg *msg ) { fSaving = save; fErrorMsg = msg; @@ -198,8 +199,8 @@ void plLayerConverter::UnmuteWarnings( void ) plLayerInterface *plLayerConverter::ConvertTexmap( Texmap *texmap, plMaxNode *maxNode, - uint32_t blendFlags, hsBool preserveUVOffset, - hsBool upperLayer ) + uint32_t blendFlags, bool preserveUVOffset, + bool upperLayer ) { hsGuardBegin( "plLayerConverter::ConvertTexmap" ); @@ -276,7 +277,7 @@ void plLayerConverter::IRegisterConversion( plPlasmaMAXLayer *origLayer, plLa plLayerInterface *plLayerConverter::IConvertLayerTex( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, - hsBool preserveUVOffset, hsBool upperLayer ) + bool preserveUVOffset, bool upperLayer ) { hsGuardBegin( "plLayerConverter::IConvertLayerTex" ); @@ -412,7 +413,7 @@ plLayerInterface *plLayerConverter::IConvertLayerTex( plPlasmaMAXLayer *layer plLayerInterface *plLayerConverter::IConvertStaticEnvLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, - hsBool preserveUVOffset, hsBool upperLayer ) + bool preserveUVOffset, bool upperLayer ) { hsGuardBegin( "plLayerConverter::IConvertStaticEnvLayer" ); @@ -522,7 +523,7 @@ plLayerInterface *plLayerConverter::IConvertStaticEnvLayer( plPlasmaMAXLayer plLayerInterface *plLayerConverter::IConvertDynamicEnvLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, - hsBool preserveUVOffset, hsBool upperLayer ) + bool preserveUVOffset, bool upperLayer ) { hsGuardBegin( "plLayerConverter::IConvertDynamicEnvLayer" ); @@ -589,7 +590,7 @@ plLayerInterface *plLayerConverter::IConvertDynamicEnvLayer( plPlasmaMAXLayer plLayerInterface *plLayerConverter::IConvertCameraLayer(plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, - hsBool preserveUVOffset, hsBool upperLayer) + bool preserveUVOffset, bool upperLayer) { hsGuardBegin( "plLayerConverter::IConvertCameraLayer" ); @@ -658,7 +659,7 @@ plLayerInterface *plLayerConverter::IConvertCameraLayer(plPlasmaMAXLayer *lay plLayerInterface *plLayerConverter::IConvertDynamicTextLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, - hsBool preserveUVOffset, hsBool upperLayer ) + bool preserveUVOffset, bool upperLayer ) { hsGuardBegin( "plLayerConverter::IConvertDynamicTextLayer" ); @@ -895,7 +896,7 @@ plLayer* plLayerConverter::ICreateAttenuationLayer(const plString& name, plMaxNo plLayerInterface* plLayerConverter::IConvertAngleAttenLayer(plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, - hsBool preserveUVOffset, hsBool upperLayer) + bool preserveUVOffset, bool upperLayer) { hsGuardBegin( "plPlasmaMAXLayer::IConvertAngleAttenLayer" ); if( !upperLayer ) @@ -924,7 +925,7 @@ plLayerInterface* plLayerConverter::IConvertAngleAttenLayer(plPlasmaMAXLayer *la } //// ICreateLayer ///////////////////////////////////////////////////////////// -plLayer *plLayerConverter::ICreateLayer( const plString &name, hsBool upperLayer, plLocation &loc ) +plLayer *plLayerConverter::ICreateLayer( const plString &name, bool upperLayer, plLocation &loc ) { hsGuardBegin( "plPlasmaMAXLayer::ICreateLayer" ); @@ -941,7 +942,7 @@ plLayer *plLayerConverter::ICreateLayer( const plString &name, hsBool upperL //// IProcessUVGen //////////////////////////////////////////////////////////// void plLayerConverter::IProcessUVGen( plPlasmaMAXLayer *srcLayer, plLayer *destLayer, - plBitmapData *bitmapData, hsBool preserveUVOffset ) + plBitmapData *bitmapData, bool preserveUVOffset ) { hsGuardBegin( "plPlasmaMAXLayer::IProcessUVGen" ); @@ -989,7 +990,7 @@ void plLayerConverter::IProcessUVGen( plPlasmaMAXLayer *srcLayer, plLayer *de //// ICreateDynTextMap //////////////////////////////////////////////////////// plDynamicTextMap *plLayerConverter::ICreateDynTextMap( const plString &layerName, uint32_t width, uint32_t height, - hsBool includeAlphaChannel, plMaxNode *node ) + bool includeAlphaChannel, plMaxNode *node ) { hsGuardBegin( "plPlasmaMAXLayer::ICreateDynTextMap" ); @@ -1051,7 +1052,7 @@ plBitmap *plLayerConverter::CreateSimpleTexture(const char *fileName, const plLo // Create a texture and assign it to the layer given. Returns the layer again, // or nil if there was an error and it got deleted. -plLayer *plLayerConverter::IAssignTexture( plBitmapData *bd, plMaxNode *maxNode, plLayer *destLayer, hsBool upperLayer, int clipID ) +plLayer *plLayerConverter::IAssignTexture( plBitmapData *bd, plMaxNode *maxNode, plLayer *destLayer, bool upperLayer, int clipID ) { plBitmap *texture = plBitmapCreator::Instance().CreateTexture( bd, maxNode->GetLocation(), clipID ); if( texture == nil ) diff --git a/Sources/Tools/MaxConvert/plLayerConverter.h b/Sources/Tools/MaxConvert/plLayerConverter.h index 1782b6d7..764ff346 100644 --- a/Sources/Tools/MaxConvert/plLayerConverter.h +++ b/Sources/Tools/MaxConvert/plLayerConverter.h @@ -89,11 +89,11 @@ class plLayerConverter ~plLayerConverter(); static plLayerConverter &Instance( void ); - void Init( hsBool save, plErrorMsg *msg ); + void Init( bool save, plErrorMsg *msg ); void DeInit( void ); plLayerInterface *ConvertTexmap( Texmap *texmap, plMaxNode *maxNode, - uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer ); + uint32_t blendFlags, bool preserveUVOffset, bool upperLayer ); plBitmap *CreateSimpleTexture(const char *fileName, const plLocation &loc, uint32_t clipID = 0, uint32_t texFlags = 0, bool useJPEG = false); void MuteWarnings( void ); @@ -103,7 +103,7 @@ class plLayerConverter plErrorMsg *fErrorMsg; uint32_t fWarned, fSavedWarned; - hsBool fSaving; + bool fSaving; Interface *fInterface; hsConverterUtils &fConverterUtils; @@ -113,23 +113,23 @@ class plLayerConverter hsTArray fConvertedLayers; - plLayer *ICreateLayer( const plString &name, hsBool upperLayer, plLocation &loc ); - void IProcessUVGen( plPlasmaMAXLayer *srcLayer, plLayer *destLayer, plBitmapData *bitmapData, hsBool preserveUVOffset ); - plDynamicTextMap *ICreateDynTextMap( const plString &layerName, uint32_t width, uint32_t height, hsBool includeAlpha, plMaxNode *node ); + plLayer *ICreateLayer( const plString &name, bool upperLayer, plLocation &loc ); + void IProcessUVGen( plPlasmaMAXLayer *srcLayer, plLayer *destLayer, plBitmapData *bitmapData, bool preserveUVOffset ); + plDynamicTextMap *ICreateDynTextMap( const plString &layerName, uint32_t width, uint32_t height, bool includeAlpha, plMaxNode *node ); - plLayer *IAssignTexture( plBitmapData *bd, plMaxNode *maxNode, plLayer *destLayer, hsBool upperLayer, int clipID = -1 ); + plLayer *IAssignTexture( plBitmapData *bd, plMaxNode *maxNode, plLayer *destLayer, bool upperLayer, int clipID = -1 ); plCubicRenderTarget *IMakeCubicRenderTarget( const plString &name, plMaxNode *maxNode, plMaxNode *anchor ); // Add your function to process your layer type here - plLayerInterface *IConvertLayerTex( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer ); - plLayerInterface *IConvertStaticEnvLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer ); - plLayerInterface *IConvertDynamicEnvLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer ); - plLayerInterface *IConvertCameraLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer ); - plLayerInterface *IConvertDynamicTextLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer ); + plLayerInterface *IConvertLayerTex( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, bool preserveUVOffset, bool upperLayer ); + plLayerInterface *IConvertStaticEnvLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, bool preserveUVOffset, bool upperLayer ); + plLayerInterface *IConvertDynamicEnvLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, bool preserveUVOffset, bool upperLayer ); + plLayerInterface *IConvertCameraLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, bool preserveUVOffset, bool upperLayer ); + plLayerInterface *IConvertDynamicTextLayer( plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, bool preserveUVOffset, bool upperLayer ); plBitmap* IGetAttenRamp( plMaxNode *maxNode, BOOL isAdd, int loClamp, int hiClamp); plLayer* ICreateAttenuationLayer(const plString& name, plMaxNode *maxNode, int uvwSrc, float tr0, float op0, float tr1, float op1, int loClamp, int hiClamp); - plLayerInterface* IConvertAngleAttenLayer(plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, hsBool preserveUVOffset, hsBool upperLayer); + plLayerInterface* IConvertAngleAttenLayer(plPlasmaMAXLayer *layer, plMaxNode *maxNode, uint32_t blendFlags, bool preserveUVOffset, bool upperLayer); void IRegisterConversion( plPlasmaMAXLayer *origLayer, plLayerInterface *convertedLayer ); diff --git a/Sources/Tools/MaxConvert/plLightMapGen.cpp b/Sources/Tools/MaxConvert/plLightMapGen.cpp index ce96089a..fad508ac 100644 --- a/Sources/Tools/MaxConvert/plLightMapGen.cpp +++ b/Sources/Tools/MaxConvert/plLightMapGen.cpp @@ -110,7 +110,7 @@ class LMGScanlineData public: LMGScanlineData() : fEmpty(true) {} - hsBool fEmpty; + bool fEmpty; LMGScanPoint fNear; LMGScanPoint fFar; }; @@ -164,7 +164,7 @@ plLightMapGen::~plLightMapGen() // MakeRenderInstances, since those are the guys that will // cast shadows. Modify which lights contribute by changing // the criteria in IFindLightsRecur. -hsBool plLightMapGen::Open(Interface* ip, TimeValue t, bool forceRegen) +bool plLightMapGen::Open(Interface* ip, TimeValue t, bool forceRegen) { if( !fInterface && ip ) { @@ -257,7 +257,7 @@ hsBool plLightMapGen::Open(Interface* ip, TimeValue t, bool forceRegen) return fAllLights.GetCount() > 0; } -hsBool plLightMapGen::Close() +bool plLightMapGen::Close() { // HACK to get rid of keys held by the lightmap components, because // we can't delete the bitmaps in ICompressLightMaps unless these @@ -335,7 +335,7 @@ void DumpMipmap(plMipmap* mipmap, const char* prefix) } #endif // MIPMAP_LOG -hsBool plLightMapGen::ICompressLightMaps() +bool plLightMapGen::ICompressLightMaps() { int i; for( i = 0; i < fPreppedMipmaps.GetCount(); i++ ) @@ -391,7 +391,7 @@ hsBool plLightMapGen::ICompressLightMaps() return true; } -hsBool plLightMapGen::MakeMaps(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray &spans, plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plLightMapGen::MakeMaps(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray &spans, plErrorMsg *pErrMsg, plConvertSettings *settings) { const char* dbgNodeName = node->GetName(); @@ -447,9 +447,9 @@ hsBool plLightMapGen::MakeMaps(plMaxNode* node, const hsMatrix44& l2w, const hsM // The next couple of functions don't do anything interesting except // get us down to the face level where we can work. -hsBool plLightMapGen::IShadeGeometrySpans(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray &spans) +bool plLightMapGen::IShadeGeometrySpans(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray &spans) { - hsBool retVal = false; + bool retVal = false; int i; for( i = 0; i < spans.GetCount(); i++ ) { @@ -458,12 +458,12 @@ hsBool plLightMapGen::IShadeGeometrySpans(plMaxNode* node, const hsMatrix44& l2w return retVal; } -hsBool plLightMapGen::IsFresh(plBitmap* map) const +bool plLightMapGen::IsFresh(plBitmap* map) const { return fRecalcLightMaps || fNewMaps.Find(map) != fNewMaps.kMissingIndex; } -hsBool plLightMapGen::IShadeSpan(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, plGeometrySpan& span) +bool plLightMapGen::IShadeSpan(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, plGeometrySpan& span) { // This will look for a suitable lightmap layer and return that. If there // isn't one already, it will set one up for us. @@ -476,7 +476,7 @@ hsBool plLightMapGen::IShadeSpan(plMaxNode* node, const hsMatrix44& l2w, const h if( !(span.fProps & plGeometrySpan::kDiffuseFoldedIn) ) { - hsBool foldin = 0 != (span.fProps & plGeometrySpan::kLiteVtxNonPreshaded); + bool foldin = 0 != (span.fProps & plGeometrySpan::kLiteVtxNonPreshaded); float opacity = 1.f; hsColorRGBA dif = hsColorRGBA().Set(1.f, 1.f, 1.f, 1.f); if( foldin ) @@ -547,7 +547,7 @@ hsBool plLightMapGen::IShadeSpan(plMaxNode* node, const hsMatrix44& l2w, const h plMipmap* accum = IMakeAccumBitmap(lay); - hsBool retVal = false; + bool retVal = false; int nFaces = span.fNumIndices / 3; for( i = 0; i < nFaces; i++ ) { @@ -574,7 +574,7 @@ plMipmap* plLightMapGen::IMakeAccumBitmap(plLayerInterface* lay) const return bitmap; } -hsBool plLightMapGen::IAddToLightMap(plLayerInterface* lay, plMipmap* src) const +bool plLightMapGen::IAddToLightMap(plLayerInterface* lay, plMipmap* src) const { plMipmap* dst = plMipmap::ConvertNoRef( lay->GetTexture() );//->GetBitmap(); hsAssert( dst != nil, "nil mipmap in IAddToLightMap()" ); @@ -632,7 +632,7 @@ hsBool plLightMapGen::IAddToLightMap(plLayerInterface* lay, plMipmap* src) const return true; } -hsBool plLightMapGen::IShadeFace(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, plGeometrySpan& span, int iFace, plMipmap* bitmap) +bool plLightMapGen::IShadeFace(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, plGeometrySpan& span, int iFace, plMipmap* bitmap) { // Okay, here's where the metal hits the road, whatever that means. // We're going to get our bitmap, and step along the face texel by texel, @@ -693,7 +693,7 @@ hsBool plLightMapGen::IShadeFace(plMaxNode* node, const hsMatrix44& l2w, const h return IShadeVerts(ctx, amb, pt, norm, uv, bitmap); } -hsBool plLightMapGen::IShadeVerts(plMaxLightContext& ctx, const Color& amb, const hsPoint3 pt[3], const hsVector3 norm[3], const hsPoint3 uv[3], plMipmap* bitmap) +bool plLightMapGen::IShadeVerts(plMaxLightContext& ctx, const Color& amb, const hsPoint3 pt[3], const hsVector3 norm[3], const hsPoint3 uv[3], plMipmap* bitmap) { int width = bitmap->GetWidth(); int height = bitmap->GetHeight(); @@ -794,7 +794,7 @@ hsBool plLightMapGen::IShadeVerts(plMaxLightContext& ctx, const Color& amb, cons return true; } -hsBool plLightMapGen::IGetLight(INode* node) +bool plLightMapGen::IGetLight(INode* node) { if( node->UserPropExists("RunTimeLight") ) return false; @@ -821,7 +821,7 @@ hsBool plLightMapGen::IGetLight(INode* node) return false; } -hsBool plLightMapGen::Update(TimeValue t) +bool plLightMapGen::Update(TimeValue t) { fTime = t; @@ -833,7 +833,7 @@ hsBool plLightMapGen::Update(TimeValue t) return fAllLights.GetCount() != 0; } -hsBool plLightMapGen::IFindLightsRecur(INode* node) +bool plLightMapGen::IFindLightsRecur(INode* node) { IGetLight(node); @@ -844,7 +844,7 @@ hsBool plLightMapGen::IFindLightsRecur(INode* node) return fAllLights.GetCount() > 0; } -hsBool plLightMapGen::InitNode(INode* node, hsBool softShadow) +bool plLightMapGen::InitNode(INode* node, bool softShadow) { fActiveLights.SetCount(0); @@ -864,7 +864,7 @@ hsBool plLightMapGen::InitNode(INode* node, hsBool softShadow) return fActiveLights.GetCount() > 0; } -hsBool plLightMapGen::DeInitNode() +bool plLightMapGen::DeInitNode() { IReleaseActiveLights(); @@ -917,7 +917,7 @@ hsBounds3Ext plLightMapGen::IGetBoundsLightSpace(INode* node, INode* liNode) return bnd; } -hsBool plLightMapGen::IDirAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node) +bool plLightMapGen::IDirAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node) { hsBounds3Ext bnd = IGetBoundsLightSpace(node, liInfo->fLiNode); @@ -954,7 +954,7 @@ hsBool plLightMapGen::IDirAffectsNode(plLightMapInfo* liInfo, LightObject* liObj return true; } -hsBool plLightMapGen::ISpotAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node) +bool plLightMapGen::ISpotAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node) { hsBounds3Ext bnd = IGetBoundsLightSpace(node, liInfo->fLiNode); @@ -1007,7 +1007,7 @@ hsBool plLightMapGen::ISpotAffectsNode(plLightMapInfo* liInfo, LightObject* liOb return true; } -hsBool plLightMapGen::IOmniAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node) +bool plLightMapGen::IOmniAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node) { LightState ls; liObj->EvalLightState(TimeValue(0), FOREVER, &ls); @@ -1034,7 +1034,7 @@ hsBool plLightMapGen::IOmniAffectsNode(plLightMapInfo* liInfo, LightObject* liOb return true; } -hsBool plLightMapGen::ILightAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node) +bool plLightMapGen::ILightAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node) { const char* liName = liInfo->fLiNode->GetName(); const char* nodeName = node->GetName(); @@ -1042,14 +1042,14 @@ hsBool plLightMapGen::ILightAffectsNode(plLightMapInfo* liInfo, LightObject* liO LightState ls; liObj->EvalLightState(TimeValue(0), FOREVER, &ls); - hsBool excluded = false; + bool excluded = false; if( !liObj->GetUseLight() ) { excluded = true; } if( !excluded && liObj->GetExclList() && liObj->GetExclList()->TestFlag(NT_AFFECT_ILLUM) ) { - hsBool inExc = -1 != liObj->GetExclList()->FindNode(node); + bool inExc = -1 != liObj->GetExclList()->FindNode(node); if( (!inExc) ^ (!liObj->GetExclList()->TestFlag(NT_INCLUDE)) ) excluded = true; } @@ -1071,7 +1071,7 @@ hsBool plLightMapGen::ILightAffectsNode(plLightMapInfo* liInfo, LightObject* liO return false; } -hsBool plLightMapGen::IPrepLight(plLightMapInfo* liInfo, INode* node) +bool plLightMapGen::IPrepLight(plLightMapInfo* liInfo, INode* node) { const char* liName = liInfo->fLiNode->GetName(); const char* nodeName = node->GetName(); @@ -1082,7 +1082,7 @@ hsBool plLightMapGen::IPrepLight(plLightMapInfo* liInfo, INode* node) // redundant check, if it doesn't have a light object it shouldn't be in the list if( liObj ) { - hsBool affectsNode = ILightAffectsNode(liInfo, liObj, node); + bool affectsNode = ILightAffectsNode(liInfo, liObj, node); if( affectsNode ) { @@ -1136,7 +1136,7 @@ hsBool plLightMapGen::IPrepLight(plLightMapInfo* liInfo, INode* node) return true; } -hsBool plLightMapGen::IFindActiveLights(plMaxNode* node) +bool plLightMapGen::IFindActiveLights(plMaxNode* node) { fActiveLights.SetCount(0); int i; @@ -1148,7 +1148,7 @@ hsBool plLightMapGen::IFindActiveLights(plMaxNode* node) return fActiveLights.GetCount() > 0; } -hsBool plLightMapGen::IReleaseAllLights() +bool plLightMapGen::IReleaseAllLights() { int i; for( i = 0; i < fAllLights.GetCount(); i++ ) @@ -1178,14 +1178,14 @@ hsBool plLightMapGen::IReleaseAllLights() return true; } -hsBool plLightMapGen::IReleaseActiveLights() +bool plLightMapGen::IReleaseActiveLights() { fActiveLights.SetCount(0); return true; } -hsBool plLightMapGen::IWantsMaps(plMaxNode* node) +bool plLightMapGen::IWantsMaps(plMaxNode* node) { if( !(node->CanConvert() && node->GetDrawable()) ) return false; @@ -1193,7 +1193,7 @@ hsBool plLightMapGen::IWantsMaps(plMaxNode* node) return nil != node->GetLightMapComponent(); } -hsBool plLightMapGen::IValidateUVWSrc(hsTArray& spans) const +bool plLightMapGen::IValidateUVWSrc(hsTArray& spans) const { int i; for( i = 0; i < spans.GetCount(); i++ ) @@ -1270,7 +1270,7 @@ plLayerInterface* plLightMapGen::IMakeLightMapLayer(plMaxNode* node, plGeometryS } hsGMaterial* objMat = nil; - hsBool sharemaps = node->GetLightMapComponent()->GetShared(); + bool sharemaps = node->GetLightMapComponent()->GetShared(); if( sharemaps ) { objMat = mat; @@ -1461,7 +1461,7 @@ uint32_t plLightMapGen::IShadePoint(plMaxLightContext& ctx, const Color& amb, co return retVal; } -hsBool plLightMapGen::ISelectBitmapDimension(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray& spans) +bool plLightMapGen::ISelectBitmapDimension(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray& spans) { float duDr = 0; float dvDr = 0; diff --git a/Sources/Tools/MaxConvert/plLightMapGen.h b/Sources/Tools/MaxConvert/plLightMapGen.h index 4d30b8c8..0fe3bf90 100644 --- a/Sources/Tools/MaxConvert/plLightMapGen.h +++ b/Sources/Tools/MaxConvert/plLightMapGen.h @@ -72,7 +72,7 @@ public: int fResetShadowType; float fResetMapRange; float fMapRange; - hsBool fNewRender; + bool fNewRender; }; class plLightMapGen @@ -110,25 +110,25 @@ protected: std::vector fSharedComponents; // HACK so we can get rid of key refs before deleting bitmaps hsBounds3Ext IGetBoundsLightSpace(INode* node, INode* liNode); - hsBool IDirAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node); - hsBool ISpotAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node); - hsBool IOmniAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node); - hsBool ILightAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node); - - hsBool IPrepLight(plLightMapInfo* liInfo, INode* node); - hsBool IGetLight(INode* node); - hsBool IFindLightsRecur(INode* node); - hsBool IFindActiveLights(plMaxNode* node); - hsBool IReleaseActiveLights(); - hsBool IReleaseAllLights(); + bool IDirAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node); + bool ISpotAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node); + bool IOmniAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node); + bool ILightAffectsNode(plLightMapInfo* liInfo, LightObject* liObj, INode* node); + + bool IPrepLight(plLightMapInfo* liInfo, INode* node); + bool IGetLight(INode* node); + bool IFindLightsRecur(INode* node); + bool IFindActiveLights(plMaxNode* node); + bool IReleaseActiveLights(); + bool IReleaseAllLights(); int IPowerOfTwo(int sz) const; - hsBool ISelectBitmapDimension(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray &spans); - hsBool ICompressLightMaps(); + bool ISelectBitmapDimension(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray &spans); + bool ICompressLightMaps(); - hsBool IsFresh(plBitmap* map) const; + bool IsFresh(plBitmap* map) const; - hsBool IAddToLightMap(plLayerInterface* lay, plMipmap* src) const; + bool IAddToLightMap(plLayerInterface* lay, plMipmap* src) const; plMipmap* IMakeAccumBitmap(plLayerInterface* lay) const; void IInitBitmapColor(plMipmap* bitmap, const hsColorRGBA& col) const; plLayerInterface* IGetLightMapLayer(plMaxNode* node, plGeometrySpan& span); @@ -136,13 +136,13 @@ protected: int IGetUVWSrc() const { return fUVWSrc; } uint32_t IShadePoint(plMaxLightContext& ctx, const Color& amb, const hsPoint3& p, const hsVector3& n); - hsBool IShadeVerts(plMaxLightContext& ctx, const Color& amb, const hsPoint3 pt[3], const hsVector3 norm[3], const hsPoint3 uv[3], plMipmap* bitmap); - hsBool IShadeFace(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, plGeometrySpan& span, int iFace, plMipmap* bitmap); - hsBool IShadeSpan(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, plGeometrySpan& spans); - hsBool IShadeGeometrySpans(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray &spans); + bool IShadeVerts(plMaxLightContext& ctx, const Color& amb, const hsPoint3 pt[3], const hsVector3 norm[3], const hsPoint3 uv[3], plMipmap* bitmap); + bool IShadeFace(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, plGeometrySpan& span, int iFace, plMipmap* bitmap); + bool IShadeSpan(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, plGeometrySpan& spans); + bool IShadeGeometrySpans(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray &spans); - hsBool IWantsMaps(plMaxNode* node); - hsBool IValidateUVWSrc(hsTArray &spans) const; + bool IWantsMaps(plMaxNode* node); + bool IValidateUVWSrc(hsTArray &spans) const; public: plLightMapGen(); @@ -152,9 +152,9 @@ public: void SetRGC(RenderGlobalContext* rgc); // Don't call this ever ever ever #endif // MF_NEW_RGC - hsBool Open(Interface* ip, TimeValue t, bool forceRegen=true); - hsBool InitNode(INode* node, hsBool softShadow=true); // unnecessary when using MakeMaps() - hsBool Update(TimeValue t); + bool Open(Interface* ip, TimeValue t, bool forceRegen=true); + bool InitNode(INode* node, bool softShadow=true); // unnecessary when using MakeMaps() + bool Update(TimeValue t); void SetUVWSrc(int i) { fUVWSrc = i; } int GetUVWSrc() const { return fUVWSrc; } @@ -174,15 +174,15 @@ public: // a light (or any other node) while the shader is Open. For your // own safety and the safety of your fellow passengers, don't // return control to the user until the system is Closed. - hsBool MakeMaps(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray& spans, plErrorMsg *pErrMsg, plConvertSettings *settings); + bool MakeMaps(plMaxNode* node, const hsMatrix44& l2w, const hsMatrix44& w2l, hsTArray& spans, plErrorMsg *pErrMsg, plConvertSettings *settings); Color ShadowPoint(plMaxLightContext& ctx); Color ShadePoint(plMaxLightContext& ctx); // ctx already contains pos & norm Color ShadePoint(plMaxLightContext& ctx, const Point3& p, const Point3& n); Color ShadePoint(plMaxLightContext& ctx, const hsPoint3& p, const hsVector3& n); - hsBool DeInitNode(); - hsBool Close(); + bool DeInitNode(); + bool Close(); static plLightMapGen& Instance(); }; diff --git a/Sources/Tools/MaxConvert/plMeshConverter.cpp b/Sources/Tools/MaxConvert/plMeshConverter.cpp index 730db4a8..97e6811d 100644 --- a/Sources/Tools/MaxConvert/plMeshConverter.cpp +++ b/Sources/Tools/MaxConvert/plMeshConverter.cpp @@ -89,14 +89,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com //// Static Members ////////////////////////////////////////////////////////// -hsBool plMeshConverter::fWarnBadNormals = true; +bool plMeshConverter::fWarnBadNormals = true; char plMeshConverter::fWarnBadNormalsMsg[] = "Bad normal autogeneration - please deliver Max file to QA"; -hsBool plMeshConverter::fWarnBadUVs = true; +bool plMeshConverter::fWarnBadUVs = true; char plMeshConverter::fWarnBadUVsMsg[] = "The object \"%s\" does not have enough valid UVW mapping channels \ for the material(s) applied to it. This might produce unwanted rendering artifacts at runtime"; -hsBool plMeshConverter::fWarnSuspiciousUVs = true; +bool plMeshConverter::fWarnSuspiciousUVs = true; char plMeshConverter::fWarnSuspiciousUVsMsg[] = "The object \"%s\" has suspicious UVW coordinates on it. \ You should apply an Unwrap UVW modifier to it."; @@ -133,7 +133,7 @@ class plMAXVertexAccNode plMAXVertexAccNode( const hsPoint3 *point, const hsVector3 *normal, const hsColorRGBA& color, const hsColorRGBA& illum, int numChannels, const hsPoint3 *uvs, uint32_t index ); - hsBool IsEqual( const hsVector3 *normal, const hsColorRGBA& color, const hsColorRGBA& illum, const hsPoint3 *uvs ); + bool IsEqual( const hsVector3 *normal, const hsColorRGBA& color, const hsColorRGBA& illum, const hsPoint3 *uvs ); }; typedef plMAXVertexAccNode *plMAXVertexAccNodePtr; @@ -267,7 +267,7 @@ plMeshConverter::~plMeshConverter() //// Init and DeInit ///////////////////////////////////////////////////////// -void plMeshConverter::Init( hsBool save, plErrorMsg *msg ) +void plMeshConverter::Init( bool save, plErrorMsg *msg ) { hsGuardBegin( "plMeshConverter::Init" ); @@ -284,7 +284,7 @@ void plMeshConverter::Init( hsBool save, plErrorMsg *msg ) hsGuardEnd; } -void plMeshConverter::DeInit( hsBool deInitLongRecur ) +void plMeshConverter::DeInit( bool deInitLongRecur ) { hsGuardBegin( "plMeshConverter::DeInit" ); @@ -348,7 +348,7 @@ plConvexVolume *plMeshConverter::CreateConvexVolume(plMaxNode *node) Mesh *mesh; int32_t numFaces, i, j, numVerts; hsMatrix44 l2wMatrix, vert2LMatrix, vertInvTransMatrix, tempMatrix; - hsBool flipOrder, checkForOverflow = false; + bool flipOrder, checkForOverflow = false; /// Get da mesh mesh = IGetNodeMesh( node ); @@ -514,7 +514,7 @@ bool plMeshConverter::IValidateUVs(plMaxNode* node) // Main function. Takes a maxNode's object and creates geometrySpans from it // suitable for drawing as ice. -hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray &spanArray, bool doPreshading ) +bool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray &spanArray, bool doPreshading ) { hsGuardBegin( "plMeshConverter::CreateSpans" ); @@ -524,13 +524,13 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArrayVtxAlphaNotAvailable(); + bool makeAlphaLayer = node->VtxAlphaNotAvailable(); ISkinContextData *skinData; @@ -562,7 +562,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArrayGetSmoothAll(); + const bool smoothAll = node->GetSmoothAll(); includesComp = false; if (isMultiMat) @@ -640,7 +640,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArraynumCVerts > 0) { @@ -806,7 +806,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArraySet(true, "Skinning Error", "Invalid point count on ISkin data on node %s", dbgNodeName ).Show(); fErrorMsg->Set(); - throw (hsBool)false; + throw (bool)false; //hsAssert( skinData->GetNumPoints() == numVerts, "Invalid point count on ISkin data" ); } @@ -826,7 +826,7 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArraySet(true, "Skinning Error", "Invalid skin (no bones) on node %s", dbgNodeName ).Show(); fErrorMsg->Set(); - throw (hsBool)false; + throw (bool)false; } @@ -1262,14 +1262,14 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArray= plGBufferGroup::kMaxNumVertsPerBuffer ) @@ -1299,9 +1299,9 @@ hsBool plMeshConverter::CreateSpans( plMaxNode *node, hsTArrayGetWaterDecEnv(); + bool needsGradientUvs = hsMaterialConverter::Instance().HasBumpLayer(node, mainMtl) || node->GetWaterDecEnv(); if( needsGradientUvs ) { @@ -1739,7 +1739,7 @@ void plMeshConverter::ISmoothUVGradients(plMaxNode* node, Mesh* mesh, } } - hsBool isMultiMat = hsMaterialConverter::Instance().IsMultiMat(mainMtl); + bool isMultiMat = hsMaterialConverter::Instance().IsMultiMat(mainMtl); int i; for( i = 0; i < mesh->getNumFaces(); i++ ) { @@ -1843,7 +1843,7 @@ Point3 plMeshConverter::IGetUvGradient(plMaxNode* node, Matrix3 v2l = node->GetVertToLocal(); - hsBool flipOrder = v2l.Parity(); + bool flipOrder = v2l.Parity(); int vtxIdx = 0; int vtxNext = flipOrder ? 2 : 1; int vtxLast = flipOrder ? 1 : 2; @@ -2008,7 +2008,7 @@ plMAXVertexAccNode::plMAXVertexAccNode( const hsPoint3 *point, const hsVector3 * //// IsEqual ///////////////////////////////////////////////////////////////// // Determines whether the node matches the values given. -hsBool plMAXVertexAccNode::IsEqual( const hsVector3 *normal, const hsColorRGBA& color, const hsColorRGBA& illum, const hsPoint3 *uvs ) +bool plMAXVertexAccNode::IsEqual( const hsVector3 *normal, const hsColorRGBA& color, const hsColorRGBA& illum, const hsPoint3 *uvs ) { int i; diff --git a/Sources/Tools/MaxConvert/plMeshConverter.h b/Sources/Tools/MaxConvert/plMeshConverter.h index 7403ac1b..befc8128 100644 --- a/Sources/Tools/MaxConvert/plMeshConverter.h +++ b/Sources/Tools/MaxConvert/plMeshConverter.h @@ -82,11 +82,11 @@ class plMeshConverter private: plMeshConverter(); - static hsBool fWarnBadNormals; + static bool fWarnBadNormals; static char fWarnBadNormalsMsg[]; - static hsBool fWarnBadUVs; + static bool fWarnBadUVs; static char fWarnBadUVsMsg[]; - static hsBool fWarnSuspiciousUVs; + static bool fWarnSuspiciousUVs; static char fWarnSuspiciousUVsMsg[]; static char fTooManyVertsMsg[]; static char fTooManyFacesMsg[]; @@ -95,13 +95,13 @@ public: ~plMeshConverter(); static plMeshConverter& Instance(); - void Init( hsBool save, plErrorMsg *msg ); - void DeInit( hsBool deInitLongRecur = true ); + void Init( bool save, plErrorMsg *msg ); + void DeInit( bool deInitLongRecur = true ); void StuffPositionsAndNormals(plMaxNode *node, hsTArray *pos, hsTArray *normals); plConvexVolume *CreateConvexVolume( plMaxNode *node ); // doPreshading - If true, do crappy flat shading now (since we won't do any shading later) - hsBool CreateSpans( plMaxNode *node, hsTArray &spanArray, bool doPreshading ); + bool CreateSpans( plMaxNode *node, hsTArray &spanArray, bool doPreshading ); private: bool IValidateUVs(plMaxNode* node); @@ -134,7 +134,7 @@ private: Interface *fInterface; hsConverterUtils& fConverterUtils; plErrorMsg *fErrorMsg; - hsBool fIsInitialized; + bool fIsInitialized; // Non-nil if we converted the MAX object and have to delete it when we're done TriObject *fTriObjToDelete; diff --git a/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp b/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp index f1bb13be..25a3caa4 100644 --- a/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp +++ b/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp @@ -114,13 +114,13 @@ void plRenderGlobalContext::MakeRenderInstances(plMaxNode* root, TimeValue t) fInstList[i].SetNext(&fInstList[i+1]); } -void plRenderGlobalContext::IMakeRenderInstances(plMaxNode* node, TimeValue t, hsBool isBarney) +void plRenderGlobalContext::IMakeRenderInstances(plMaxNode* node, TimeValue t, bool isBarney) { const char* dbgNodeName = node->GetName(); if( !isBarney ) isBarney = node->GetIsBarney(); - hsBool doMe = isBarney || (node->CanConvert() && node->GetDrawable()); + bool doMe = isBarney || (node->CanConvert() && node->GetDrawable()); if( !doMe ) return; diff --git a/Sources/Tools/MaxConvert/plRenderGlobalContext.h b/Sources/Tools/MaxConvert/plRenderGlobalContext.h index b057e677..29ec9912 100644 --- a/Sources/Tools/MaxConvert/plRenderGlobalContext.h +++ b/Sources/Tools/MaxConvert/plRenderGlobalContext.h @@ -53,7 +53,7 @@ protected: hsTArray fInstList; - void IMakeRenderInstances(plMaxNode* node, TimeValue t, hsBool isBarney); + void IMakeRenderInstances(plMaxNode* node, TimeValue t, bool isBarney); public: plRenderGlobalContext(Interface* ip, TimeValue t); diff --git a/Sources/Tools/MaxExport/SimpleExport.cpp b/Sources/Tools/MaxExport/SimpleExport.cpp index 15d3c0a4..54a29075 100644 --- a/Sources/Tools/MaxExport/SimpleExport.cpp +++ b/Sources/Tools/MaxExport/SimpleExport.cpp @@ -216,7 +216,7 @@ protected: public: plTextureLoggerCBack(plTextureExportLog* teLog) { fTELog = teLog; } - virtual hsBool EatKey(const plKey& key) + virtual bool EatKey(const plKey& key) { plBitmap* bmap = plBitmap::ConvertNoRef(key->ObjectIsLoaded()); if (bmap != nil) @@ -229,7 +229,7 @@ public: class plOptimizeIterator : public plRegistryKeyIterator { public: - virtual hsBool EatKey(const plKey& key) + virtual bool EatKey(const plKey& key) { if (key->GetUoid().GetClassType() == plSceneNode::Index()) { @@ -341,7 +341,7 @@ int HSExport2::DoExport(const TCHAR *name,ExpInterface *ei,Interface *gi, BOOL s plPythonFileMod::SetAtConvertTime(); // Convert!!! - hsBool convertOK = plConvert::Instance().Convert(); + bool convertOK = plConvert::Instance().Convert(); // Free the material cache. This will delete unused materials. hsMaterialConverter::Instance().FreeMaterialCache(out_path); diff --git a/Sources/Tools/MaxExport/SimpleExport.h b/Sources/Tools/MaxExport/SimpleExport.h index 71681bcb..95f3a3d9 100644 --- a/Sources/Tools/MaxExport/SimpleExport.h +++ b/Sources/Tools/MaxExport/SimpleExport.h @@ -79,7 +79,7 @@ public: const char* GetName() { return fName; } private: - static hsBool IProgressCallback(float percent); + static bool IProgressCallback(float percent); static DWORD WINAPI IProgressDummyFunc(LPVOID arg); char fName[128]; diff --git a/Sources/Tools/MaxExport/plErrorMsg.cpp b/Sources/Tools/MaxExport/plErrorMsg.cpp index c4e1fc55..71bc5494 100644 --- a/Sources/Tools/MaxExport/plErrorMsg.cpp +++ b/Sources/Tools/MaxExport/plErrorMsg.cpp @@ -66,37 +66,37 @@ plErrorMsg::plErrorMsg(const char* label, const char* msg) Set(label, msg); } -plErrorMsg::plErrorMsg(hsBool bogus) +plErrorMsg::plErrorMsg(bool bogus) { Set(bogus); } -plErrorMsg::plErrorMsg(hsBool bogus, const char* label, const char* msg) +plErrorMsg::plErrorMsg(bool bogus, const char* label, const char* msg) { Set(bogus, label, msg); } -plErrorMsg::plErrorMsg(hsBool bogus, const char* label, const char* format, const char* str) +plErrorMsg::plErrorMsg(bool bogus, const char* label, const char* format, const char* str) { Set(bogus, label, format, str); } -plErrorMsg::plErrorMsg(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2) +plErrorMsg::plErrorMsg(bool bogus, const char* label, const char* format, const char* str1, const char* str2) { Set(bogus, label, format, str1, str2); } -plErrorMsg::plErrorMsg(hsBool bogus, const char* label, const char* format, int n) +plErrorMsg::plErrorMsg(bool bogus, const char* label, const char* format, int n) { Set(bogus, label, format, n); } -plErrorMsg::plErrorMsg(hsBool bogus, const char* label, const char* format, int n, int m) +plErrorMsg::plErrorMsg(bool bogus, const char* label, const char* format, int n, int m) { Set(bogus, label, format, n, m); } -plErrorMsg::plErrorMsg(hsBool bogus, const char* label, const char* format, float f) +plErrorMsg::plErrorMsg(bool bogus, const char* label, const char* format, float f) { Set(bogus, label, format, f); } @@ -120,7 +120,7 @@ plErrorMsg &plErrorMsg::Set(const char* label, const char* msg) return *this; } -plErrorMsg &plErrorMsg::Set(hsBool bogus) +plErrorMsg &plErrorMsg::Set(bool bogus) { fBogus = bogus; fLabel[0] = 0; @@ -129,7 +129,7 @@ plErrorMsg &plErrorMsg::Set(hsBool bogus) return *this; } -plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* msg) +plErrorMsg &plErrorMsg::Set(bool bogus, const char* label, const char* msg) { if( fBogus = bogus ) { @@ -149,7 +149,7 @@ plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* msg) return *this; } -plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* format, const char* str) +plErrorMsg &plErrorMsg::Set(bool bogus, const char* label, const char* format, const char* str) { if( fBogus = bogus ) { @@ -164,7 +164,7 @@ plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* format, return *this; } -plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2) +plErrorMsg &plErrorMsg::Set(bool bogus, const char* label, const char* format, const char* str1, const char* str2) { if( fBogus = bogus ) { @@ -179,7 +179,7 @@ plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* format, return *this; } -plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* format, int n) +plErrorMsg &plErrorMsg::Set(bool bogus, const char* label, const char* format, int n) { if( fBogus = bogus ) { @@ -194,7 +194,7 @@ plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* format, return *this; } -plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* format, int n, int m) +plErrorMsg &plErrorMsg::Set(bool bogus, const char* label, const char* format, int n, int m) { if( fBogus = bogus ) { @@ -209,7 +209,7 @@ plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* format, return *this; } -plErrorMsg &plErrorMsg::Set(hsBool bogus, const char* label, const char* format, float f) +plErrorMsg &plErrorMsg::Set(bool bogus, const char* label, const char* format, float f) { if( fBogus = bogus ) { diff --git a/Sources/Tools/MaxExport/plErrorMsg.h b/Sources/Tools/MaxExport/plErrorMsg.h index 943f4b9c..5737866a 100644 --- a/Sources/Tools/MaxExport/plErrorMsg.h +++ b/Sources/Tools/MaxExport/plErrorMsg.h @@ -52,56 +52,56 @@ public: static plErrorMsg *GetNull(); plErrorMsg(const char* label, const char* msg); - plErrorMsg(hsBool bogus = false); - plErrorMsg(hsBool bogus, const char* label, const char* msg); - plErrorMsg(hsBool bogus, const char* label, const char* format, const char* str); - plErrorMsg(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2); - plErrorMsg(hsBool bogus, const char* label, const char* format, int n); - plErrorMsg(hsBool bogus, const char* label, const char* format, int n, int m); - plErrorMsg(hsBool bogus, const char* label, const char* format, float f); + plErrorMsg(bool bogus = false); + plErrorMsg(bool bogus, const char* label, const char* msg); + plErrorMsg(bool bogus, const char* label, const char* format, const char* str); + plErrorMsg(bool bogus, const char* label, const char* format, const char* str1, const char* str2); + plErrorMsg(bool bogus, const char* label, const char* format, int n); + plErrorMsg(bool bogus, const char* label, const char* format, int n, int m); + plErrorMsg(bool bogus, const char* label, const char* format, float f); virtual ~plErrorMsg() { } plErrorMsg &Set(const char* label, const char* msg); - plErrorMsg &Set(hsBool bogus = false); - plErrorMsg &Set(hsBool bogus, const char* label, const char* msg); - plErrorMsg &Set(hsBool bogus, const char* label, const char* format, const char* str); - plErrorMsg &Set(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2); - plErrorMsg &Set(hsBool bogus, const char* label, const char* format, int n); - plErrorMsg &Set(hsBool bogus, const char* label, const char* format, int n, int m); - plErrorMsg &Set(hsBool bogus, const char* label, const char* format, float f); - - hsBool IsBogus() { return GetBogus(); } + plErrorMsg &Set(bool bogus = false); + plErrorMsg &Set(bool bogus, const char* label, const char* msg); + plErrorMsg &Set(bool bogus, const char* label, const char* format, const char* str); + plErrorMsg &Set(bool bogus, const char* label, const char* format, const char* str1, const char* str2); + plErrorMsg &Set(bool bogus, const char* label, const char* format, int n); + plErrorMsg &Set(bool bogus, const char* label, const char* format, int n, int m); + plErrorMsg &Set(bool bogus, const char* label, const char* format, float f); + + bool IsBogus() { return GetBogus(); } // Ask - If condition is true and user says yes to displayed query, return true, else false - virtual hsBool Ask() { return false; } + virtual bool Ask() { return false; } // CheckAndAsk - If condition is true and user says YES, throw self. Only asks if condition is true. // Returns true if condition is true but user says no, else false. - virtual hsBool CheckAndAsk() { return false; } + virtual bool CheckAndAsk() { return false; } // CheckAskOrCancel - If condition is true ( if YES, throw, else if NO return 0, else (CANCEL) return 1 - virtual hsBool CheckAskOrCancel() { return false; } + virtual bool CheckAskOrCancel() { return false; } // Show - If condition is true, displays message, returns true - virtual hsBool Show() { return false; } + virtual bool Show() { return false; } // CheckAndShow - If condition is true, shows message box then throws self, else return false - virtual hsBool CheckAndShow() { return false; } + virtual bool CheckAndShow() { return false; } // Check - If condition was true, throws self, else return false - virtual hsBool Check() { return false; } + virtual bool Check() { return false; } // Quit - If condition, quietly just throw with no message virtual void Quit() { } protected: - void SetBogus(hsBool b) { fBogus = b; } + void SetBogus(bool b) { fBogus = b; } - hsBool GetBogus() { return fBogus; } + bool GetBogus() { return fBogus; } char *GetLabel() { if (!fBogus) *fLabel = 0; return fLabel; } char *GetMsg() { if (!fBogus) *fMsg = 0; return fMsg; } private: - hsBool fBogus; + bool fBogus; char fLabel[256]; char fMsg[PL_ERR_MSG_MAX_MSG]; diff --git a/Sources/Tools/MaxExport/plExportErrorMsg.cpp b/Sources/Tools/MaxExport/plExportErrorMsg.cpp index 0c6ac71a..ebf008de 100644 --- a/Sources/Tools/MaxExport/plExportErrorMsg.cpp +++ b/Sources/Tools/MaxExport/plExportErrorMsg.cpp @@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com -hsBool plExportErrorMsg::Show() +bool plExportErrorMsg::Show() { // If bogus, and we have something to show, show it if( GetBogus() && (GetMsg()[0] != 0 || GetLabel()[0] != 0)) @@ -57,7 +57,7 @@ hsBool plExportErrorMsg::Show() } return GetBogus(); } -hsBool plExportErrorMsg::Ask() +bool plExportErrorMsg::Ask() { if( GetBogus() ) { @@ -66,7 +66,7 @@ hsBool plExportErrorMsg::Ask() return false; } -hsBool plExportErrorMsg::CheckAndAsk() +bool plExportErrorMsg::CheckAndAsk() { if( GetBogus() ) { @@ -80,7 +80,7 @@ hsBool plExportErrorMsg::CheckAndAsk() return GetBogus(); } -hsBool plExportErrorMsg::CheckAskOrCancel() +bool plExportErrorMsg::CheckAskOrCancel() { if( GetBogus() ) { @@ -97,7 +97,7 @@ hsBool plExportErrorMsg::CheckAskOrCancel() return false; } -hsBool plExportErrorMsg::CheckAndShow() +bool plExportErrorMsg::CheckAndShow() { if ( GetBogus() ) { @@ -108,7 +108,7 @@ hsBool plExportErrorMsg::CheckAndShow() return GetBogus(); } -hsBool plExportErrorMsg::Check() +bool plExportErrorMsg::Check() { if( GetBogus() ) { diff --git a/Sources/Tools/MaxExport/plExportErrorMsg.h b/Sources/Tools/MaxExport/plExportErrorMsg.h index 85b3f67d..f97d812a 100644 --- a/Sources/Tools/MaxExport/plExportErrorMsg.h +++ b/Sources/Tools/MaxExport/plExportErrorMsg.h @@ -54,26 +54,26 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class plExportErrorMsg : public plErrorMsg { public: plExportErrorMsg(const char* label, const char* msg) : plErrorMsg(label, msg) { } - plExportErrorMsg(hsBool bogus = false) : plErrorMsg(bogus) { } - plExportErrorMsg(hsBool bogus, const char* label, const char* msg) + plExportErrorMsg(bool bogus = false) : plErrorMsg(bogus) { } + plExportErrorMsg(bool bogus, const char* label, const char* msg) : plErrorMsg(bogus, label, msg) { } - plExportErrorMsg(hsBool bogus, const char* label, const char* format, const char* str) + plExportErrorMsg(bool bogus, const char* label, const char* format, const char* str) : plErrorMsg(bogus, label, format, str) { } - plExportErrorMsg(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2) + plExportErrorMsg(bool bogus, const char* label, const char* format, const char* str1, const char* str2) : plErrorMsg(bogus, label, format, str1, str2) { } - plExportErrorMsg(hsBool bogus, const char* label, const char* format, int n) + plExportErrorMsg(bool bogus, const char* label, const char* format, int n) : plErrorMsg(bogus, label, format, n) { } - plExportErrorMsg(hsBool bogus, const char* label, const char* format, int n, int m) + plExportErrorMsg(bool bogus, const char* label, const char* format, int n, int m) : plErrorMsg(bogus, label, format, n, m) { } - plExportErrorMsg(hsBool bogus, const char* label, const char* format, float f) + plExportErrorMsg(bool bogus, const char* label, const char* format, float f) : plErrorMsg(bogus, label, format, f) { } - virtual hsBool Ask(); // if b is true and user says yes to displayed query, return true, else false - virtual hsBool CheckAndAsk(); // if b is true and user says YES, throw self. only asks if b is true. returns true if b is true but user says no, else false - virtual hsBool CheckAskOrCancel(); // if b is true ( if YES, throw, else if NO return 0, else (CANCEL) return 1 - virtual hsBool Show(); // if b is true, displays message, returns true - virtual hsBool Check(); // if b was true, throws self, else return false - virtual hsBool CheckAndShow(); // if b was true, shows message box then throws self, else return false + virtual bool Ask(); // if b is true and user says yes to displayed query, return true, else false + virtual bool CheckAndAsk(); // if b is true and user says YES, throw self. only asks if b is true. returns true if b is true but user says no, else false + virtual bool CheckAskOrCancel(); // if b is true ( if YES, throw, else if NO return 0, else (CANCEL) return 1 + virtual bool Show(); // if b is true, displays message, returns true + virtual bool Check(); // if b was true, throws self, else return false + virtual bool CheckAndShow(); // if b was true, shows message box then throws self, else return false virtual void Quit(); // if b, quietly just throw with no message private: @@ -84,18 +84,18 @@ private: class plExportErrorMsg : public plErrorMsg { public: plExportErrorMsg(const char* label, const char* msg) : plErrorMsg() { } - plExportErrorMsg(hsBool bogus = false) : plErrorMsg() { } - plExportErrorMsg(hsBool bogus, const char* label, const char* msg) + plExportErrorMsg(bool bogus = false) : plErrorMsg() { } + plExportErrorMsg(bool bogus, const char* label, const char* msg) : plErrorMsg() { } - plExportErrorMsg(hsBool bogus, const char* label, const char* format, const char* str) + plExportErrorMsg(bool bogus, const char* label, const char* format, const char* str) : plErrorMsg() { } - plExportErrorMsg(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2) + plExportErrorMsg(bool bogus, const char* label, const char* format, const char* str1, const char* str2) : plErrorMsg() { } - plExportErrorMsg(hsBool bogus, const char* label, const char* format, int n) + plExportErrorMsg(bool bogus, const char* label, const char* format, int n) : plErrorMsg() { } - plExportErrorMsg(hsBool bogus, const char* label, const char* format, int n, int m) + plExportErrorMsg(bool bogus, const char* label, const char* format, int n, int m) : plErrorMsg() { } - plExportErrorMsg(hsBool bogus, const char* label, const char* format, float f) + plExportErrorMsg(bool bogus, const char* label, const char* format, float f) : plErrorMsg() { } }; #endif // PL_NULL_ERRMSG @@ -107,20 +107,20 @@ public: class plExportErrorDbg : public plExportErrorMsg { public: plExportErrorDbg(const char* label, const char* msg) : plExportErrorMsg() { } - plExportErrorDbg(hsBool bogus = false) : plExportErrorMsg() { } - plExportErrorDbg(hsBool bogus, const char* label, const char* msg) : plExportErrorMsg() { } - plExportErrorDbg(hsBool bogus, const char* label, const char* format, const char* str) : plExportErrorMsg() { } - plExportErrorDbg(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2) : plExportErrorMsg() { } - plExportErrorDbg(hsBool bogus, const char* label, const char* format, int n) : plExportErrorMsg() { } - plExportErrorDbg(hsBool bogus, const char* label, const char* format, int n, int m) : plExportErrorMsg() { } - plExportErrorDbg(hsBool bogus, const char* label, const char* format, float f) : plExportErrorMsg() { } - - hsBool Ask() { return false; } - hsBool CheckAndAsk() { return false; } - hsBool CheckAskOrCancel(); - hsBool Show() { return false; } - hsBool Check() { return false; } - hsBool CheckAndShow() { return false; } + plExportErrorDbg(bool bogus = false) : plExportErrorMsg() { } + plExportErrorDbg(bool bogus, const char* label, const char* msg) : plExportErrorMsg() { } + plExportErrorDbg(bool bogus, const char* label, const char* format, const char* str) : plExportErrorMsg() { } + plExportErrorDbg(bool bogus, const char* label, const char* format, const char* str1, const char* str2) : plExportErrorMsg() { } + plExportErrorDbg(bool bogus, const char* label, const char* format, int n) : plExportErrorMsg() { } + plExportErrorDbg(bool bogus, const char* label, const char* format, int n, int m) : plExportErrorMsg() { } + plExportErrorDbg(bool bogus, const char* label, const char* format, float f) : plExportErrorMsg() { } + + bool Ask() { return false; } + bool CheckAndAsk() { return false; } + bool CheckAskOrCancel(); + bool Show() { return false; } + bool Check() { return false; } + bool CheckAndShow() { return false; } void Quit() { } }; @@ -129,18 +129,18 @@ public: class plExportErrorDbg : public plExportErrorMsg { public: plExportErrorDbg(const char* label, const char* msg) : plExportErrorMsg(label, msg) { } - plExportErrorDbg(hsBool bogus = true) : plExportErrorMsg(bogus) { } - plExportErrorDbg(hsBool bogus, const char* label, const char* msg) + plExportErrorDbg(bool bogus = true) : plExportErrorMsg(bogus) { } + plExportErrorDbg(bool bogus, const char* label, const char* msg) : plExportErrorMsg(bogus, label, msg) { } - plExportErrorDbg(hsBool bogus, const char* label, const char* format, const char* str) + plExportErrorDbg(bool bogus, const char* label, const char* format, const char* str) : plExportErrorMsg(bogus, label, format, str) { } - plExportErrorDbg(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2) + plExportErrorDbg(bool bogus, const char* label, const char* format, const char* str1, const char* str2) : plExportErrorMsg(bogus, label, format, str1, str2) { } - plExportErrorDbg(hsBool bogus, const char* label, const char* format, int n) + plExportErrorDbg(bool bogus, const char* label, const char* format, int n) : plExportErrorMsg(bogus, label, format, n) { } - plExportErrorDbg(hsBool bogus, const char* label, const char* format, int n, int m) + plExportErrorDbg(bool bogus, const char* label, const char* format, int n, int m) : plExportErrorMsg(bogus, label, format, n, m) { } - plExportErrorDbg(hsBool bogus, const char* label, const char* format, float f) + plExportErrorDbg(bool bogus, const char* label, const char* format, float f) : plExportErrorMsg(bogus, label, format, f) { } }; diff --git a/Sources/Tools/MaxExport/plExportLogErrorMsg.cpp b/Sources/Tools/MaxExport/plExportLogErrorMsg.cpp index 76b8275c..0d44cff9 100644 --- a/Sources/Tools/MaxExport/plExportLogErrorMsg.cpp +++ b/Sources/Tools/MaxExport/plExportLogErrorMsg.cpp @@ -81,7 +81,7 @@ plExportLogErrorMsg::~plExportLogErrorMsg() } -hsBool plExportLogErrorMsg::Show() +bool plExportLogErrorMsg::Show() { if( GetBogus() ) { @@ -89,7 +89,7 @@ hsBool plExportLogErrorMsg::Show() } return GetBogus(); } -hsBool plExportLogErrorMsg::Ask() +bool plExportLogErrorMsg::Ask() { if( GetBogus() ) { @@ -98,7 +98,7 @@ hsBool plExportLogErrorMsg::Ask() return false; } -hsBool plExportLogErrorMsg::CheckAndAsk() +bool plExportLogErrorMsg::CheckAndAsk() { if( GetBogus() ) { @@ -108,7 +108,7 @@ hsBool plExportLogErrorMsg::CheckAndAsk() return GetBogus(); } -hsBool plExportLogErrorMsg::CheckAskOrCancel() +bool plExportLogErrorMsg::CheckAskOrCancel() { if( GetBogus() ) { @@ -117,7 +117,7 @@ hsBool plExportLogErrorMsg::CheckAskOrCancel() return false; } -hsBool plExportLogErrorMsg::CheckAndShow() +bool plExportLogErrorMsg::CheckAndShow() { if ( GetBogus() ) { @@ -129,7 +129,7 @@ hsBool plExportLogErrorMsg::CheckAndShow() } -hsBool plExportLogErrorMsg::Check() +bool plExportLogErrorMsg::Check() { if( GetBogus() ) { diff --git a/Sources/Tools/MaxExport/plExportLogErrorMsg.h b/Sources/Tools/MaxExport/plExportLogErrorMsg.h index f65c9224..33a7df74 100644 --- a/Sources/Tools/MaxExport/plExportLogErrorMsg.h +++ b/Sources/Tools/MaxExport/plExportLogErrorMsg.h @@ -62,34 +62,34 @@ class plExportLogErrorMsg : public plErrorMsg { public: plExportLogErrorMsg(const char* efile, const char* label, const char* msg) : plErrorMsg(label, msg) { strncpy(fErrfile_name,efile,ERROR_LOGFILE_NAME_LEN-1); fErrfile=nil; } - plExportLogErrorMsg(const char* efile, hsBool bogus = false) : plErrorMsg(bogus) + plExportLogErrorMsg(const char* efile, bool bogus = false) : plErrorMsg(bogus) { strncpy(fErrfile_name,efile,ERROR_LOGFILE_NAME_LEN-1); fErrfile=nil; } - plExportLogErrorMsg(const char* efile, hsBool bogus, const char* label, const char* msg) + plExportLogErrorMsg(const char* efile, bool bogus, const char* label, const char* msg) : plErrorMsg(bogus, label, msg) { strncpy(fErrfile_name,efile,ERROR_LOGFILE_NAME_LEN-1); fErrfile=nil; } - plExportLogErrorMsg(const char* efile, hsBool bogus, const char* label, const char* format, const char* str) + plExportLogErrorMsg(const char* efile, bool bogus, const char* label, const char* format, const char* str) : plErrorMsg(bogus, label, format, str) { strncpy(fErrfile_name,efile,ERROR_LOGFILE_NAME_LEN-1); fErrfile=nil; } - plExportLogErrorMsg(const char* efile, hsBool bogus, const char* label, const char* format, const char* str1, const char* str2) + plExportLogErrorMsg(const char* efile, bool bogus, const char* label, const char* format, const char* str1, const char* str2) : plErrorMsg(bogus, label, format, str1, str2) { strncpy(fErrfile_name,efile,ERROR_LOGFILE_NAME_LEN-1); fErrfile=nil; } - plExportLogErrorMsg(const char* efile, hsBool bogus, const char* label, const char* format, int n) + plExportLogErrorMsg(const char* efile, bool bogus, const char* label, const char* format, int n) : plErrorMsg(bogus, label, format, n) { strncpy(fErrfile_name,efile,ERROR_LOGFILE_NAME_LEN-1); fErrfile=nil; } - plExportLogErrorMsg(const char* efile, hsBool bogus, const char* label, const char* format, int n, int m) + plExportLogErrorMsg(const char* efile, bool bogus, const char* label, const char* format, int n, int m) : plErrorMsg(bogus, label, format, n, m) { strncpy(fErrfile_name,efile,ERROR_LOGFILE_NAME_LEN-1); fErrfile=nil; } - plExportLogErrorMsg(const char* efile, hsBool bogus, const char* label, const char* format, float f) + plExportLogErrorMsg(const char* efile, bool bogus, const char* label, const char* format, float f) : plErrorMsg(bogus, label, format, f) { strncpy(fErrfile_name,efile,ERROR_LOGFILE_NAME_LEN-1); fErrfile=nil; } ~plExportLogErrorMsg(); - virtual hsBool Ask(); // if b is true and user says yes to displayed query, return true, else false - virtual hsBool CheckAndAsk(); // if b is true and user says YES, throw self. only asks if b is true. returns true if b is true but user says no, else false - virtual hsBool CheckAskOrCancel(); // if b is true ( if YES, throw, else if NO return 0, else (CANCEL) return 1 - virtual hsBool Show(); // if b is true, displays message, returns true - virtual hsBool Check(); // if b was true, throws self, else return false - virtual hsBool CheckAndShow(); // if b was true, shows message box then throws self, else return false + virtual bool Ask(); // if b is true and user says yes to displayed query, return true, else false + virtual bool CheckAndAsk(); // if b is true and user says YES, throw self. only asks if b is true. returns true if b is true but user says no, else false + virtual bool CheckAskOrCancel(); // if b is true ( if YES, throw, else if NO return 0, else (CANCEL) return 1 + virtual bool Show(); // if b is true, displays message, returns true + virtual bool Check(); // if b was true, throws self, else return false + virtual bool CheckAndShow(); // if b was true, shows message box then throws self, else return false virtual void Quit(); // if b, quietly just throw with no message protected: @@ -107,18 +107,18 @@ private: class plExportLogErrorMsg : public plErrorMsg { public: plExportLogErrorMsg(const char* label, const char* msg) : plErrorMsg() { } - plExportLogErrorMsg(hsBool bogus = false) : plErrorMsg() { } - plExportLogErrorMsg(hsBool bogus, const char* label, const char* msg) + plExportLogErrorMsg(bool bogus = false) : plErrorMsg() { } + plExportLogErrorMsg(bool bogus, const char* label, const char* msg) : plErrorMsg() { } - plExportLogErrorMsg(hsBool bogus, const char* label, const char* format, const char* str) + plExportLogErrorMsg(bool bogus, const char* label, const char* format, const char* str) : plErrorMsg() { } - plExportLogErrorMsg(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2) + plExportLogErrorMsg(bool bogus, const char* label, const char* format, const char* str1, const char* str2) : plErrorMsg() { } - plExportLogErrorMsg(hsBool bogus, const char* label, const char* format, int n) + plExportLogErrorMsg(bool bogus, const char* label, const char* format, int n) : plErrorMsg() { } - plExportLogErrorMsg(hsBool bogus, const char* label, const char* format, int n, int m) + plExportLogErrorMsg(bool bogus, const char* label, const char* format, int n, int m) : plErrorMsg() { } - plExportLogErrorMsg(hsBool bogus, const char* label, const char* format, float f) + plExportLogErrorMsg(bool bogus, const char* label, const char* format, float f) : plErrorMsg() { } }; #endif // PL_NULL_ERRMSG @@ -130,20 +130,20 @@ public: class plExportLogErrorDbg : public plExportLogErrorMsg { public: plExportLogErrorDbg(const char* label, const char* msg) : plExportLogErrorMsg("") { } - plExportLogErrorDbg(hsBool bogus = false) : plExportLogErrorMsg("") { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* msg) : plExportLogErrorMsg("") { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* format, const char* str) : plExportLogErrorMsg("") { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2) : plExportLogErrorMsg("") { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* format, int n) : plExportLogErrorMsg("") { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* format, int n, int m) : plExportLogErrorMsg("") { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* format, float f) : plExportLogErrorMsg("") { } - - hsBool Ask() { return false; } - hsBool CheckAndAsk() { return false; } - hsBool CheckAskOrCancel(); - hsBool Show() { return false; } - hsBool Check() { return false; } - hsBool CheckAndShow() { return false; } + plExportLogErrorDbg(bool bogus = false) : plExportLogErrorMsg("") { } + plExportLogErrorDbg(bool bogus, const char* label, const char* msg) : plExportLogErrorMsg("") { } + plExportLogErrorDbg(bool bogus, const char* label, const char* format, const char* str) : plExportLogErrorMsg("") { } + plExportLogErrorDbg(bool bogus, const char* label, const char* format, const char* str1, const char* str2) : plExportLogErrorMsg("") { } + plExportLogErrorDbg(bool bogus, const char* label, const char* format, int n) : plExportLogErrorMsg("") { } + plExportLogErrorDbg(bool bogus, const char* label, const char* format, int n, int m) : plExportLogErrorMsg("") { } + plExportLogErrorDbg(bool bogus, const char* label, const char* format, float f) : plExportLogErrorMsg("") { } + + bool Ask() { return false; } + bool CheckAndAsk() { return false; } + bool CheckAskOrCancel(); + bool Show() { return false; } + bool Check() { return false; } + bool CheckAndShow() { return false; } void Quit() { } }; @@ -152,18 +152,18 @@ public: class plExportLogErrorDbg : public plExportLogErrorMsg { public: plExportLogErrorDbg(const char* label, const char* msg) : plExportLogErrorMsg("",label, msg) { } - plExportLogErrorDbg(hsBool bogus = true) : plExportLogErrorMsg("",bogus) { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* msg) + plExportLogErrorDbg(bool bogus = true) : plExportLogErrorMsg("",bogus) { } + plExportLogErrorDbg(bool bogus, const char* label, const char* msg) : plExportLogErrorMsg("",bogus, label, msg) { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* format, const char* str) + plExportLogErrorDbg(bool bogus, const char* label, const char* format, const char* str) : plExportLogErrorMsg("",bogus, label, format, str) { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* format, const char* str1, const char* str2) + plExportLogErrorDbg(bool bogus, const char* label, const char* format, const char* str1, const char* str2) : plExportLogErrorMsg("",bogus, label, format, str1, str2) { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* format, int n) + plExportLogErrorDbg(bool bogus, const char* label, const char* format, int n) : plExportLogErrorMsg("",bogus, label, format, n) { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* format, int n, int m) + plExportLogErrorDbg(bool bogus, const char* label, const char* format, int n, int m) : plExportLogErrorMsg("",bogus, label, format, n, m) { } - plExportLogErrorDbg(hsBool bogus, const char* label, const char* format, float f) + plExportLogErrorDbg(bool bogus, const char* label, const char* format, float f) : plExportLogErrorMsg("",bogus, label, format, f) { } }; diff --git a/Sources/Tools/MaxExport/plProgressBar.h b/Sources/Tools/MaxExport/plProgressBar.h index 4af5f047..954aec65 100644 --- a/Sources/Tools/MaxExport/plProgressBar.h +++ b/Sources/Tools/MaxExport/plProgressBar.h @@ -63,7 +63,7 @@ public: hsAssert(min <= max, "Min and max out of order."); } - virtual hsBool32 Update(float fraction) = 0; + virtual bool32 Update(float fraction) = 0; float GetTotalFraction(float f) const { return fMin + f * (fMax - fMin); } diff --git a/Sources/Tools/MaxMain/plAgeDescInterface.cpp b/Sources/Tools/MaxMain/plAgeDescInterface.cpp index df59b1f0..b06f1a1c 100644 --- a/Sources/Tools/MaxMain/plAgeDescInterface.cpp +++ b/Sources/Tools/MaxMain/plAgeDescInterface.cpp @@ -621,7 +621,7 @@ void plAgeDescInterface::IInvalidateCheckOutIndicator( void ) RedrawWindow( fhDlg, &r, nil, RDW_INVALIDATE | RDW_ERASE ); } -hsBool plAgeDescInterface::IMakeSureCheckedIn( void ) +bool plAgeDescInterface::IMakeSureCheckedIn( void ) { #ifdef MAXASS_AVAILABLE int result; @@ -1120,7 +1120,7 @@ uint32_t plAgeDescInterface::IGetFreePageSeqSuffix( HWND pageCombo ) return searchSeq; } -void plAgeDescInterface::ISaveCurAge( const char *path, hsBool checkSeqNum ) +void plAgeDescInterface::ISaveCurAge( const char *path, bool checkSeqNum ) { hsUNIXStream s; if( !s.Open( path, "wt" ) ) @@ -1200,7 +1200,7 @@ void plAgeDescInterface::ICheckSequenceNumber( plAgeDescription &aged ) } } -void plAgeDescInterface::ILoadAge( const char *path, hsBool checkSeqNum ) +void plAgeDescInterface::ILoadAge( const char *path, bool checkSeqNum ) { ISetControlDefaults(); @@ -1282,7 +1282,7 @@ void plAgeDescInterface::ILoadAge( const char *path, hsBool checkSeqNum ) } } -uint32_t plAgeDescInterface::IGetNextFreeSequencePrefix( hsBool getReservedPrefix ) +uint32_t plAgeDescInterface::IGetNextFreeSequencePrefix( bool getReservedPrefix ) { int32_t searchSeq = getReservedPrefix ? -1 : 1; hsTArray ageList; diff --git a/Sources/Tools/MaxMain/plAgeDescInterface.h b/Sources/Tools/MaxMain/plAgeDescInterface.h index a7507a4e..6d1e12ed 100644 --- a/Sources/Tools/MaxMain/plAgeDescInterface.h +++ b/Sources/Tools/MaxMain/plAgeDescInterface.h @@ -109,8 +109,8 @@ protected: // Save the settings for the last age and load the settings for the currently one void IUpdateCurAge(); - void ISaveCurAge( const char *path, hsBool checkSeqNum = false ); - void ILoadAge( const char *path, hsBool checkSeqNum = false ); + void ISaveCurAge( const char *path, bool checkSeqNum = false ); + void ILoadAge( const char *path, bool checkSeqNum = false ); static bool IGetLocalAgePath(char *path); @@ -122,13 +122,13 @@ protected: void INewPage(); - uint32_t IGetNextFreeSequencePrefix( hsBool getReservedPrefix ); + uint32_t IGetNextFreeSequencePrefix( bool getReservedPrefix ); uint32_t IGetFreePageSeqSuffix( HWND pageCombo ); void ICheckOutCurrentAge( void ); void ICheckInCurrentAge( void ); void IUndoCheckOutCurrentAge( void ); - hsBool IMakeSureCheckedIn( void ); + bool IMakeSureCheckedIn( void ); plAgeFile* IGetCurrentAge( void ); diff --git a/Sources/Tools/MaxMain/plCommonObjLib.cpp b/Sources/Tools/MaxMain/plCommonObjLib.cpp index 8f359bbf..92ca4b5d 100644 --- a/Sources/Tools/MaxMain/plCommonObjLib.cpp +++ b/Sources/Tools/MaxMain/plCommonObjLib.cpp @@ -75,7 +75,7 @@ class plCommonObjLibList fRefCount++; } - hsBool Remove( plCommonObjLib *lib ) + bool Remove( plCommonObjLib *lib ) { int idx = fLibs.Find( lib ); if( idx != fLibs.kMissingIndex ) @@ -175,7 +175,7 @@ void plCommonObjLib::AddObject( hsKeyedObject *object ) // this function call, the key should no longer exist in the registry and be // free to use elsewhere. -hsBool plCommonObjLib::RemoveObjectAndKey( plKey &key ) +bool plCommonObjLib::RemoveObjectAndKey( plKey &key ) { if (!key) { diff --git a/Sources/Tools/MaxMain/plCommonObjLib.h b/Sources/Tools/MaxMain/plCommonObjLib.h index 24f55cd6..3fdad631 100644 --- a/Sources/Tools/MaxMain/plCommonObjLib.h +++ b/Sources/Tools/MaxMain/plCommonObjLib.h @@ -89,12 +89,12 @@ class plCommonObjLib /// Base utility functions void AddObject( hsKeyedObject *object ); - hsBool RemoveObjectAndKey( plKey &key ); + bool RemoveObjectAndKey( plKey &key ); hsKeyedObject *FindObject( const plString &name, uint16_t classType = (uint16_t)-1 ); void ClearObjectList( void ); /// THIS IS YOUR VIRTUAL HERE. Override this to define which objects you collect - virtual hsBool IsInteresting( const plKey &objectKey ) { return false; } + virtual bool IsInteresting( const plKey &objectKey ) { return false; } /// Static functions for use only by the export resManager diff --git a/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp b/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp index 7e5d3442..72191d0d 100644 --- a/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp +++ b/Sources/Tools/MaxMain/plMaxMeshExtractor.cpp @@ -206,7 +206,7 @@ bool plMaxMeshExtractor::Extract(plMaxMeshExtractor::NeutralMesh& mesh, plMaxNod // // Create the arrays of verts and faces // - hsBool isDummy = (node->EvalWorldState(0).obj->ClassID() == Class_ID(DUMMY_CLASS_ID,0)); + bool isDummy = (node->EvalWorldState(0).obj->ClassID() == Class_ID(DUMMY_CLASS_ID,0)); if (isDummy) { hsMatrix44 w2l = masterNode->GetWorldToLocal44(); diff --git a/Sources/Tools/MaxMain/plMaxNode.cpp b/Sources/Tools/MaxMain/plMaxNode.cpp index 644e2b67..090c892c 100644 --- a/Sources/Tools/MaxMain/plMaxNode.cpp +++ b/Sources/Tools/MaxMain/plMaxNode.cpp @@ -144,7 +144,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com extern UserPropMgr gUserPropMgr; -hsBool ThreePlaneIntersect(const hsVector3& norm0, const hsPoint3& point0, +bool ThreePlaneIntersect(const hsVector3& norm0, const hsPoint3& point0, const hsVector3& norm1, const hsPoint3& point1, const hsVector3& norm2, const hsPoint3& point2, hsPoint3& loc); @@ -235,7 +235,7 @@ void plMaxBoneMap::SortBones() int i,j; for (i = 0; i < fNumBones; i++) { - hsBool swap = false; + bool swap = false; for (j = i + 1; j < fNumBones; j++) { if (strcmp(tempBones[i]->GetName(), tempBones[j]->GetName()) > 0) @@ -267,7 +267,7 @@ plKey plMaxNode::AddModifier(plModifier *pMod, const plString& name) return modKey; } -hsBool plMaxNode::DoRecur(PMaxNodeFunc pDoFunction,plErrorMsg *pErrMsg, plConvertSettings *settings,plExportProgressBar*bar) +bool plMaxNode::DoRecur(PMaxNodeFunc pDoFunction,plErrorMsg *pErrMsg, plConvertSettings *settings,plExportProgressBar*bar) { #ifdef HS_DEBUGGING const char *tmpName = GetName(); @@ -297,7 +297,7 @@ hsBool plMaxNode::DoRecur(PMaxNodeFunc pDoFunction,plErrorMsg *pErrMsg, plConver // This is the same as DoRecur except that it ignores the canconvert field. We // need this for things like clearing the old data, where we need to ignore the old value. -hsBool plMaxNode::DoAllRecur(PMaxNodeFunc pDoFunction,plErrorMsg *pErrMsg, plConvertSettings *settings,plExportProgressBar*bar) +bool plMaxNode::DoAllRecur(PMaxNodeFunc pDoFunction,plErrorMsg *pErrMsg, plConvertSettings *settings,plExportProgressBar*bar) { #ifdef HS_DEBUGGING const char *tmpName = GetName(); @@ -321,7 +321,7 @@ hsBool plMaxNode::DoAllRecur(PMaxNodeFunc pDoFunction,plErrorMsg *pErrMsg, plCon return true; } -hsBool plMaxNode::ConvertValidate(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::ConvertValidate(plErrorMsg *pErrMsg, plConvertSettings *settings) { TimeValue t = hsConverterUtils::Instance().GetTime(GetInterface()); Object *obj = EvalWorldState( t ).obj; @@ -330,7 +330,7 @@ hsBool plMaxNode::ConvertValidate(plErrorMsg *pErrMsg, plConvertSettings *settin // Always want to recalculate if this object can convert at this point. // In general there won't be any cached flag anyway, but in the SceneViewer // there can be if we're reconverting. - hsBool canConvert = CanConvert(true); + bool canConvert = CanConvert(true); plMaxNodeData thisNodeData; // Extra data stored for each node @@ -403,7 +403,7 @@ hsBool plMaxNode::ConvertValidate(plErrorMsg *pErrMsg, plConvertSettings *settin return canConvert; } -hsBool plMaxNode::ClearMaxNodeData(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::ClearMaxNodeData(plErrorMsg *pErrMsg, plConvertSettings *settings) { // The right place to delete the boneMap is really in ~plMaxNodeData, but that class // is only allowed to know about stuff in nucleusLib. @@ -511,7 +511,7 @@ void plMaxNode::CheckSynchOptions(plSynchedObject* so) } } -hsBool plMaxNode::MakeSceneObject(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::MakeSceneObject(plErrorMsg *pErrMsg, plConvertSettings *settings) { const char* dbgName = GetName(); if (!CanConvert()) @@ -551,7 +551,7 @@ hsBool plMaxNode::MakeSceneObject(plErrorMsg *pErrMsg, plConvertSettings *settin return true; } -hsBool plMaxNode::PrepareSkin(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::PrepareSkin(plErrorMsg *pErrMsg, plConvertSettings *settings) { if( !IFindBones(pErrMsg, settings) ) return false; @@ -569,7 +569,7 @@ hsBool plMaxNode::PrepareSkin(plErrorMsg *pErrMsg, plConvertSettings *settings) return true; } -hsBool plMaxNode::IFindBones(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::IFindBones(plErrorMsg *pErrMsg, plConvertSettings *settings) { if( !CanConvert() ) return false; @@ -621,7 +621,7 @@ hsBool plMaxNode::IFindBones(plErrorMsg *pErrMsg, plConvertSettings *settings) #include "plPhysX/plSimulationMgr.h" #include "hsSTLStream.h" -hsBool plMaxNode::MakePhysical(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::MakePhysical(plErrorMsg *pErrMsg, plConvertSettings *settings) { const char* dbgNodeName = GetName(); @@ -872,14 +872,14 @@ hsBool plMaxNode::MakePhysical(plErrorMsg *pErrMsg, plConvertSettings *settings) return true; } -hsBool plMaxNode::MakeController(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::MakeController(plErrorMsg *pErrMsg, plConvertSettings *settings) { if (!CanConvert()) return false; - hsBool forceLocal = hsControlConverter::Instance().ForceLocal(this); + bool forceLocal = hsControlConverter::Instance().ForceLocal(this); // Rember the force Local setting - hsBool CurrForceLocal = GetForceLocal(); // dont want to clobber it with false if componentPass made it true + bool CurrForceLocal = GetForceLocal(); // dont want to clobber it with false if componentPass made it true forceLocal = (CurrForceLocal || forceLocal) ? true : false; // if it was set before, or is true now, make it true... SetForceLocal(forceLocal); @@ -891,16 +891,16 @@ hsBool plMaxNode::MakeController(plErrorMsg *pErrMsg, plConvertSettings *setting return true; } -hsBool plMaxNode::MakeCoordinateInterface(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::MakeCoordinateInterface(plErrorMsg *pErrMsg, plConvertSettings *settings) { const char* dbgNodeName = GetName(); if (!CanConvert()) return false; plCoordinateInterface* ci = nil; - hsBool forceLocal = GetForceLocal(); + bool forceLocal = GetForceLocal(); - hsBool needCI = (!GetParentNode()->IsRootNode()) + bool needCI = (!GetParentNode()->IsRootNode()) || NumberOfChildren() || forceLocal; // If we have a transform, set up a coordinateinterface @@ -923,7 +923,7 @@ hsBool plMaxNode::MakeCoordinateInterface(plErrorMsg *pErrMsg, plConvertSettings plKey pCiKey = hsgResMgr::ResMgr()->NewKey(pName, ci,nodeLoc, GetLoadMask()); ci->SetLocalToParent(loc2Par, par2Loc); - hsBool usesPhysics = GetPhysicalProps()->IsUsed(); + bool usesPhysics = GetPhysicalProps()->IsUsed(); ci->SetProperty(plCoordinateInterface::kCanEverDelayTransform, !usesPhysics); ci->SetProperty(plCoordinateInterface::kDelayedTransformEval, !usesPhysics); @@ -932,15 +932,15 @@ hsBool plMaxNode::MakeCoordinateInterface(plErrorMsg *pErrMsg, plConvertSettings return true; } -hsBool plMaxNode::MakeModifiers(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::MakeModifiers(plErrorMsg *pErrMsg, plConvertSettings *settings) { if (!CanConvert()) return false; - hsBool forceLocal = GetForceLocal(); + bool forceLocal = GetForceLocal(); const char *dbgNodeName = GetName(); - hsBool addMods = (!GetParentNode()->IsRootNode()) + bool addMods = (!GetParentNode()->IsRootNode()) || forceLocal; if (addMods) @@ -997,7 +997,7 @@ hsBool plMaxNode::MakeModifiers(plErrorMsg *pErrMsg, plConvertSettings *settings } -hsBool plMaxNode::MakeParentOrRoomConnection(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::MakeParentOrRoomConnection(plErrorMsg *pErrMsg, plConvertSettings *settings) { if (!CanConvert()) return false; @@ -1020,7 +1020,7 @@ hsBool plMaxNode::MakeParentOrRoomConnection(plErrorMsg *pErrMsg, plConvertSetti return true; } -void plMaxNode::IWipeBranchDrawable(hsBool b) +void plMaxNode::IWipeBranchDrawable(bool b) { SetDrawable(b); for (int i = 0; i < NumberOfChildren(); i++) @@ -1037,7 +1037,7 @@ void plMaxNode::IWipeBranchDrawable(hsBool b) // 9.25.2001 mcn - Made public so components can figure out if this node is // meshable. -hsBool plMaxNode::CanMakeMesh( Object *obj, plErrorMsg *pErrMsg, plConvertSettings *settings ) +bool plMaxNode::CanMakeMesh( Object *obj, plErrorMsg *pErrMsg, plConvertSettings *settings ) { if( obj == nil ) return false; @@ -1071,7 +1071,7 @@ void ITestAdjacencyRecur(const hsTArray* vertList, int iVert, hsBitVector& } } -hsBool ITestAdjacency(const hsTArray* vertList, int numVerts) +bool ITestAdjacency(const hsTArray* vertList, int numVerts) { hsBitVector adjVerts; ITestAdjacencyRecur(vertList, 0, adjVerts); @@ -1097,8 +1097,8 @@ int IsGeoSpanConvexExhaust(const plGeometrySpan* span) uint8_t* vertData = span->fVertexData; int numVerts = span->fNumVerts; - hsBool someIn = false; - hsBool someOut = false; + bool someIn = false; + bool someOut = false; int i; for( i = 0; i < numFaces; i++ ) @@ -1218,8 +1218,8 @@ int IsGeoSpanConvex(plMaxNode* node, const plGeometrySpan* span) idx += 3; } - hsBool someIn = false; - hsBool someOut = false; + bool someIn = false; + bool someOut = false; int i; for( i = 0; i < numVerts; i++ ) { @@ -1270,13 +1270,13 @@ plDrawInterface* plMaxNode::GetDrawInterface() return di; } -hsBool plMaxNode::MakeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::MakeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) { hsTArray spanArray; plDrawInterface *newDI = nil; - hsBool gotMade = false; - hsBool haveAddedToSceneNode = false; + bool gotMade = false; + bool haveAddedToSceneNode = false; hsGMesh *myMesh = nil; uint32_t i, triMeshIndex = (uint32_t)-1; const char *dbgNodeName = GetName(); @@ -1340,7 +1340,7 @@ hsBool plMaxNode::MakeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) // isn't already. So it needs to be before we make the mesh (and material). // (Really, whatever makes it movable should do so then, but that has the potential // to break other stuff, which I don't want to do 2 weeks before we ship). - hsBool movable = IsMovable(); + bool movable = IsMovable(); if( !gotMade ) { @@ -1372,8 +1372,8 @@ hsBool plMaxNode::MakeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) spanArray[ i ]->fProps |= shadeFlags; } - hsBool DecalMat = false; - hsBool NonDecalMat = false; + bool DecalMat = false; + bool NonDecalMat = false; for (i = 0; i < spanArray.GetCount(); i++) { @@ -1397,10 +1397,10 @@ hsBool plMaxNode::MakeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) return false; } - hsBool isDecal = IsLegalDecal(false); // Don't complain about the parent + bool isDecal = IsLegalDecal(false); // Don't complain about the parent /// Get some stuff - hsBool forceLocal = GetForceLocal(); + bool forceLocal = GetForceLocal(); hsMatrix44 l2w = GetLocalToWorld44(); hsMatrix44 w2l = GetWorldToLocal44(); @@ -1536,7 +1536,7 @@ void plMaxNode::IAssignSpansToDrawables( hsTArray &spanArra { if( spanArray[ i ]->fProps & plGeometrySpan::kRequiresBlending ) { - hsBool needFaceSort = !GetNoFaceSort() && !IsGeoSpanConvex(this, spanArray[i]); + bool needFaceSort = !GetNoFaceSort() && !IsGeoSpanConvex(this, spanArray[i]); if( needFaceSort ) { sCount++; @@ -1789,7 +1789,7 @@ void plMaxNode::ISetupBones(plDrawableSpans *drawable, hsTArray &spanArray, +bool plMaxNode::IMakeInstanceSpans( plMaxNode *node, hsTArray &spanArray, plErrorMsg *pErrMsg, plConvertSettings *settings ) { uint8_t iDraw; @@ -1804,7 +1804,7 @@ hsBool plMaxNode::IMakeInstanceSpans( plMaxNode *node, hsTArray &nodes, hsBool beMoreAccurate ) +uint32_t plMaxNode::IBuildInstanceList( Object *obj, TimeValue t, hsTArray &nodes, bool beMoreAccurate ) { Object *thisObj = EvalWorldState( t ).obj; DependentIterator di( obj ); @@ -1952,7 +1952,7 @@ uint32_t plMaxNode::IBuildInstanceList( Object *obj, TimeValue t, hsTArrayGetMtl(); if( mtl != otherMtl ) @@ -1986,7 +1986,7 @@ hsBool plMaxNode::IMaterialsMatch( plMaxNode *otherNode, hsBool beMoreAccurate return true; } -hsBool plMaxNode::ShadeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::ShadeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) { const char* dbgNodeName = GetName(); @@ -2043,13 +2043,13 @@ hsBool plMaxNode::ShadeMesh(plErrorMsg *pErrMsg, plConvertSettings *settings) return true; } -hsBool plMaxNode::MakeOccluder(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::MakeOccluder(plErrorMsg *pErrMsg, plConvertSettings *settings) { if( !UserPropExists("Occluder") ) return true; - hsBool twoSided = UserPropExists("OccTwoSided"); - hsBool isHole = UserPropExists("OccHole"); + bool twoSided = UserPropExists("OccTwoSided"); + bool isHole = UserPropExists("OccHole"); return ConvertToOccluder(pErrMsg, twoSided, isHole); } @@ -2077,7 +2077,7 @@ static void IRemoveCollinearPoints(hsTArray& facePts) } } -hsBool plMaxNode::ConvertToOccluder(plErrorMsg* pErrMsg, hsBool twoSided, hsBool isHole) +bool plMaxNode::ConvertToOccluder(plErrorMsg* pErrMsg, bool twoSided, bool isHole) { if( !CanConvert() ) return false; @@ -2085,7 +2085,7 @@ hsBool plMaxNode::ConvertToOccluder(plErrorMsg* pErrMsg, hsBool twoSided, hsBool /// Get some stuff plLocation nodeLoc = GetLocation(); - hsBool moving = IsMovable(); + bool moving = IsMovable(); if( moving ) moving++; @@ -2272,7 +2272,7 @@ hsBool plMaxNode::ConvertToOccluder(plErrorMsg* pErrMsg, hsBool twoSided, hsBool return true; } -hsBool plMaxNode::MakeLight(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::MakeLight(plErrorMsg *pErrMsg, plConvertSettings *settings) { if (!CanConvert()) @@ -2283,7 +2283,7 @@ hsBool plMaxNode::MakeLight(plErrorMsg *pErrMsg, plConvertSettings *settings) /// Get some stuff plLocation nodeLoc = GetLocation(); - hsBool forceLocal = GetForceLocal(); + bool forceLocal = GetForceLocal(); hsMatrix44 l2w = GetLocalToWorld44(); hsMatrix44 w2l = GetWorldToLocal44(); @@ -2398,7 +2398,7 @@ void plMaxNode::IGetLightAttenuation(plOmniLightInfo* liInfo, LightObject* light } -hsBool plMaxNode::IGetRTLightAttenValues(IParamBlock2* ProperPB, float& attenConst, float& attenLinear, float& attenQuadratic, float &attenCutoff ) +bool plMaxNode::IGetRTLightAttenValues(IParamBlock2* ProperPB, float& attenConst, float& attenLinear, float& attenQuadratic, float &attenCutoff ) { TimeValue timeVal = hsConverterUtils::Instance().GetTime(GetInterface()); @@ -2774,9 +2774,9 @@ plLightInfo *plMaxNode::IMakeRTProjDirectional( plErrorMsg *pErrMsg, plConvertSe return light; } -hsBool plMaxNode::IGetProjection(plLightInfo* li, plErrorMsg* pErrMsg) +bool plMaxNode::IGetProjection(plLightInfo* li, plErrorMsg* pErrMsg) { - hsBool persp = false; + bool persp = false; TimeValue timeVal = hsConverterUtils::Instance().GetTime(GetInterface()); Object *obj = EvalWorldState(timeVal).obj; LightObject *light = (LightObject*)obj->ConvertToType(timeVal, RTSPOT_LIGHT_CLASSID); @@ -2790,7 +2790,7 @@ hsBool plMaxNode::IGetProjection(plLightInfo* li, plErrorMsg* pErrMsg) if( !light ) return false; - hsBool retVal = false; + bool retVal = false; Texmap* projMap = light->GetProjMap(); if( !projMap ) return false; @@ -2897,7 +2897,7 @@ hsBool plMaxNode::IGetProjection(plLightInfo* li, plErrorMsg* pErrMsg) return retVal; } /* -hsBool plMaxNode::IAttachRTLightModifier(plLightModifier* liMod) +bool plMaxNode::IAttachRTLightModifier(plLightModifier* liMod) { if( liMod->HasAnima() ) { @@ -3006,7 +3006,7 @@ void plMaxNode::GetRTLightAttenAnim(IParamBlock2* ProperPB, plAGAnim *anim) } else { - hsBool distSq = ProperPB->GetInt(plRTLightBase::kAttenTypeRadio, TimeValue(0)); + bool distSq = ProperPB->GetInt(plRTLightBase::kAttenTypeRadio, TimeValue(0)); int i; for( i = 0; i < subCtl->GetNumKeys(); i++ ) @@ -3280,7 +3280,7 @@ plLightMapComponent* plMaxNode::GetLightMapComponent() return nil; } -plDrawableCriteria plMaxNode::GetDrawableCriteria(hsBool needBlending, hsBool needSorting) +plDrawableCriteria plMaxNode::GetDrawableCriteria(bool needBlending, bool needSorting) { plRenderLevel level = needBlending ? GetRenderLevel(needBlending) : plRenderLevel::OpaqueRenderLevel(); @@ -3313,7 +3313,7 @@ plDrawableCriteria plMaxNode::GetDrawableCriteria(hsBool needBlending, hsBool ne // Gets the required drawableSpans from a sceneNode. Creates a new one // if it can't find one. -plDrawableSpans *plMaxNode::IGetSceneNodeSpans( plSceneNode *node, hsBool needBlending, hsBool needSorting ) +plDrawableSpans *plMaxNode::IGetSceneNodeSpans( plSceneNode *node, bool needBlending, bool needSorting ) { plDrawableSpans *spans; @@ -3372,14 +3372,14 @@ plDrawableSpans *plMaxNode::IGetSceneNodeSpans( plSceneNode *node, hsBool needBl return spans; } -hsBool plMaxNode::SetupPropertiesPass(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::SetupPropertiesPass(plErrorMsg *pErrMsg, plConvertSettings *settings) { // TEMP if (IsComponent()) return false; // End TEMP - hsBool ret = true; + bool ret = true; uint32_t count = NumAttachedComponents(); @@ -3447,14 +3447,14 @@ hsBool plMaxNode::SetupPropertiesPass(plErrorMsg *pErrMsg, plConvertSettings *se return ret; } -hsBool plMaxNode::FirstComponentPass(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::FirstComponentPass(plErrorMsg *pErrMsg, plConvertSettings *settings) { // TEMP if (IsComponent()) return false; // End TEMP - hsBool ret = true; + bool ret = true; if (!CanConvert()) return ret; @@ -3482,14 +3482,14 @@ hsBool plMaxNode::FirstComponentPass(plErrorMsg *pErrMsg, plConvertSettings *set return ret; } -hsBool plMaxNode::ConvertComponents(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::ConvertComponents(plErrorMsg *pErrMsg, plConvertSettings *settings) { // TEMP if (IsComponent()) return false; // End TEMP - hsBool ret = true; + bool ret = true; char *dbgNodeName = GetName(); if (!CanConvert()) @@ -3519,14 +3519,14 @@ hsBool plMaxNode::ConvertComponents(plErrorMsg *pErrMsg, plConvertSettings *sett return ret; } -hsBool plMaxNode::DeInitComponents(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::DeInitComponents(plErrorMsg *pErrMsg, plConvertSettings *settings) { // TEMP if (IsComponent()) return false; // End TEMP - hsBool ret = true; + bool ret = true; char *dbgNodeName = GetName(); if (!CanConvert()) @@ -3588,7 +3588,7 @@ hsBool plMaxNode::DeInitComponents(plErrorMsg *pErrMsg, plConvertSettings *setti return ret; } -hsBool plMaxNode::ClearData(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::ClearData(plErrorMsg *pErrMsg, plConvertSettings *settings) { RemoveAppDataChunk(PLASMA_MAX_CLASSID, GUP_CLASS_ID, kPlasmaAgeChunk); RemoveAppDataChunk(PLASMA_MAX_CLASSID, GUP_CLASS_ID, kPlasmaDistChunk); @@ -3658,7 +3658,7 @@ void plMaxNode::SetupBonesAliasesRecur(const char *rootName) char* start=strstr(propsBuf, "BoneName="); if (!start) start=strstr(propsBuf, "bonename="); - const int len = hsStrlen("BoneName="); + const int len = strlen("BoneName="); if(start && UserPropExists("BoneName")) { start+=len; @@ -3704,7 +3704,7 @@ void plMaxNode::SetupBonesAliasesRecur(const char *rootName) ((plMaxNode*)GetChildNode(j))->SetupBonesAliasesRecur(rootName); } -void plMaxNode::SetDISceneNodeSpans( plDrawInterface *di, hsBool needBlending ) +void plMaxNode::SetDISceneNodeSpans( plDrawInterface *di, bool needBlending ) { // This poorly named function is currently only used by ParticleComponent. // di->GetNumDrawables() will always be zero. In general, particles only @@ -3819,7 +3819,7 @@ void plMaxNode::SetupBoneHierarchyPalette(plMaxBoneMap *bones /* = nil */) bones->SortBones(); } -hsBool plMaxNode::IsLegalDecal(hsBool checkParent /* = true */) +bool plMaxNode::IsLegalDecal(bool checkParent /* = true */) { Mtl *mtl = GetMtl(); if (mtl == nil || GetParticleRelated()) @@ -3841,7 +3841,7 @@ hsBool plMaxNode::IsLegalDecal(hsBool checkParent /* = true */) int plMaxNode::NumUVWChannels() { - hsBool deleteIt; + bool deleteIt; TriObject* triObj = GetTriObject(deleteIt); if( triObj ) @@ -3968,7 +3968,7 @@ int plMaxNode::AlphaHackLayersNeeded(int iSubMtl) } // Will our lighting pay attention to vertex alpha values? -hsBool plMaxNode::VtxAlphaNotAvailable() +bool plMaxNode::VtxAlphaNotAvailable() { if( NonVtxPreshaded() || GetParticleRelated()) return false; @@ -3976,7 +3976,7 @@ hsBool plMaxNode::VtxAlphaNotAvailable() return true; } -hsBool plMaxNode::NonVtxPreshaded() +bool plMaxNode::NonVtxPreshaded() { if( GetForceMatShade() ) return false; @@ -3991,7 +3991,7 @@ hsBool plMaxNode::NonVtxPreshaded() return( GetLightMapComponent() != nil ); } -TriObject* plMaxNode::GetTriObject(hsBool& deleteIt) +TriObject* plMaxNode::GetTriObject(bool& deleteIt) { // Get da object Object *obj = EvalWorldState(TimeValue(0)).obj; @@ -4026,7 +4026,7 @@ uint32_t plMaxNode::GetNextSoundIdx( void ) // Fun temp hack function to tell if a maxNode is physical. Useful after // preConvert (checks for a physical on the simInterface) -hsBool plMaxNode::IsPhysical( void ) +bool plMaxNode::IsPhysical( void ) { if( GetSceneObject() && GetSceneObject()->GetSimulationInterface() && GetSceneObject()->GetSimulationInterface()->GetPhysical() ) @@ -4072,9 +4072,9 @@ const char *plMaxNode::GetAgeName() // need a message sent to them) is a huge pain and very ugly. This will capture anything // important in a single list. -hsBool plMaxNode::MakeIfaceReferences(plErrorMsg *pErrMsg, plConvertSettings *settings) +bool plMaxNode::MakeIfaceReferences(plErrorMsg *pErrMsg, plConvertSettings *settings) { - hsBool ret = true; + bool ret = true; char *dbgNodeName = GetName(); if (!CanConvert()) diff --git a/Sources/Tools/MaxMain/plMaxNode.h b/Sources/Tools/MaxMain/plMaxNode.h index 052e2225..877fd5ad 100644 --- a/Sources/Tools/MaxMain/plMaxNode.h +++ b/Sources/Tools/MaxMain/plMaxNode.h @@ -81,7 +81,7 @@ class plPageInfoComponent; class plMaxBoneMap; class plSynchedObject; -typedef hsBool (plMaxNode:: *PMaxNodeFunc) (plErrorMsg *, plConvertSettings *); // Function pointer to a plMaxNode member funtion +typedef bool (plMaxNode:: *PMaxNodeFunc) (plErrorMsg *, plConvertSettings *); // Function pointer to a plMaxNode member funtion class plMaxNodeTab : public Tab { @@ -102,47 +102,47 @@ class plMaxNodeTab : public Tab class plMaxNode : public plMaxNodeBase { public: - hsBool DoRecur(PMaxNodeFunc p,plErrorMsg *, plConvertSettings *, plExportProgressBar*); - hsBool DoAllRecur(PMaxNodeFunc p,plErrorMsg *, plConvertSettings *, plExportProgressBar*); + bool DoRecur(PMaxNodeFunc p,plErrorMsg *, plConvertSettings *, plExportProgressBar*); + bool DoAllRecur(PMaxNodeFunc p,plErrorMsg *, plConvertSettings *, plExportProgressBar*); // DoRecur takes one of the following functions - hsBool ConvertValidate (plErrorMsg *, plConvertSettings *); - hsBool SetupPropertiesPass (plErrorMsg *, plConvertSettings *); - hsBool MakeSceneObject (plErrorMsg *, plConvertSettings *); - hsBool PrepareSkin (plErrorMsg *, plConvertSettings *); - hsBool MakePhysical (plErrorMsg *, plConvertSettings *); - hsBool FirstComponentPass (plErrorMsg *, plConvertSettings *); - hsBool MakeController (plErrorMsg *, plConvertSettings *); - hsBool MakeCoordinateInterface (plErrorMsg *, plConvertSettings *); - hsBool MakeModifiers (plErrorMsg *, plConvertSettings *); - hsBool MakeParentOrRoomConnection (plErrorMsg *, plConvertSettings *); - hsBool MakeMesh (plErrorMsg *, plConvertSettings *); - hsBool MakeLight (plErrorMsg *, plConvertSettings *); - hsBool MakeOccluder (plErrorMsg *, plConvertSettings *); - hsBool ConvertComponents (plErrorMsg *, plConvertSettings *); - hsBool ClearData (plErrorMsg *, plConvertSettings *); - hsBool ShadeMesh (plErrorMsg *, plConvertSettings *); - hsBool MakeIfaceReferences (plErrorMsg *, plConvertSettings *); - hsBool ClearMaxNodeData (plErrorMsg *, plConvertSettings *); - hsBool DeInitComponents (plErrorMsg *, plConvertSettings *); + bool ConvertValidate (plErrorMsg *, plConvertSettings *); + bool SetupPropertiesPass (plErrorMsg *, plConvertSettings *); + bool MakeSceneObject (plErrorMsg *, plConvertSettings *); + bool PrepareSkin (plErrorMsg *, plConvertSettings *); + bool MakePhysical (plErrorMsg *, plConvertSettings *); + bool FirstComponentPass (plErrorMsg *, plConvertSettings *); + bool MakeController (plErrorMsg *, plConvertSettings *); + bool MakeCoordinateInterface (plErrorMsg *, plConvertSettings *); + bool MakeModifiers (plErrorMsg *, plConvertSettings *); + bool MakeParentOrRoomConnection (plErrorMsg *, plConvertSettings *); + bool MakeMesh (plErrorMsg *, plConvertSettings *); + bool MakeLight (plErrorMsg *, plConvertSettings *); + bool MakeOccluder (plErrorMsg *, plConvertSettings *); + bool ConvertComponents (plErrorMsg *, plConvertSettings *); + bool ClearData (plErrorMsg *, plConvertSettings *); + bool ShadeMesh (plErrorMsg *, plConvertSettings *); + bool MakeIfaceReferences (plErrorMsg *, plConvertSettings *); + bool ClearMaxNodeData (plErrorMsg *, plConvertSettings *); + bool DeInitComponents (plErrorMsg *, plConvertSettings *); // Does specified function for all components attached to this node enum { kSetupProperties, kPreConvert, kConvert }; - hsBool DoComponents(int convertType, plErrorMsg *, plConvertSettings *); + bool DoComponents(int convertType, plErrorMsg *, plConvertSettings *); plKey AddModifier(plModifier *pMod, const plString& name); - hsBool ConvertToOccluder (plErrorMsg* pErrMsg, hsBool twoSided, hsBool isHole); + bool ConvertToOccluder (plErrorMsg* pErrMsg, bool twoSided, bool isHole); - plDrawableCriteria GetDrawableCriteria(hsBool needBlending, hsBool needSorting); + plDrawableCriteria GetDrawableCriteria(bool needBlending, bool needSorting); Point3 GetFlexibility(); // returns Point3(flexibility, interRand, intraRand). plXImposterComp* GetXImposterComp(); int AlphaHackLayersNeeded(int iSubMtl); int NumUVWChannels(); - hsBool VtxAlphaNotAvailable(); - hsBool NonVtxPreshaded(); - TriObject* GetTriObject(hsBool& deleteIt); + bool VtxAlphaNotAvailable(); + bool NonVtxPreshaded(); + TriObject* GetTriObject(bool& deleteIt); plAGModifier* HasAGMod(); plAGMasterMod* GetAGMasterMod(); @@ -152,9 +152,9 @@ public: void SetupBonesAliasesRecur(const char *rootName); void SetupBoneHierarchyPalette(plMaxBoneMap *bones = nil); - void SetDISceneNodeSpans( plDrawInterface *di, hsBool needBlending ); + void SetDISceneNodeSpans( plDrawInterface *di, bool needBlending ); - hsBool IsLegalDecal(hsBool checkParent = true); + bool IsLegalDecal(bool checkParent = true); bool IsAnimatedLight(); @@ -170,9 +170,9 @@ public: // indices to sound objects attached to the node uint32_t GetNextSoundIdx( void ); - hsBool IsPhysical( void ); + bool IsPhysical( void ); - hsBool CanMakeMesh( Object *obj, plErrorMsg *pErrMsg, plConvertSettings *settings ); + bool CanMakeMesh( Object *obj, plErrorMsg *pErrMsg, plConvertSettings *settings ); plDrawInterface* GetDrawInterface(); // Returns nil if there isn't a sceneobject and a drawinterface. // Only call during convert @@ -187,12 +187,12 @@ public: protected: INode *GetRootNode() { return GetInterface()->GetRootNode(); } - plDrawableSpans *IGetSceneNodeSpans( plSceneNode *node, hsBool needBlending, hsBool needSorting=true ); + plDrawableSpans *IGetSceneNodeSpans( plSceneNode *node, bool needBlending, bool needSorting=true ); plLightInfo* IMakeDirectional(plErrorMsg* pErrMsg, plConvertSettings* settings); plLightInfo* IMakeOmni(plErrorMsg* pErrMsg, plConvertSettings* settings); plLightInfo* IMakeSpot(plErrorMsg* pErrMsg, plConvertSettings* settings); - hsBool IGetProjection(plLightInfo* li, plErrorMsg* pErrMsg); + bool IGetProjection(plLightInfo* li, plErrorMsg* pErrMsg); plLightInfo* IMakeRTDirectional(plErrorMsg* pErrMsg, plConvertSettings* settings); plLightInfo* IMakeRTOmni(plErrorMsg* pErrMsg, plConvertSettings* settings); plLightInfo* IMakeRTSpot(plErrorMsg* pErrMsg, plConvertSettings* settings); @@ -206,9 +206,9 @@ protected: void IGetRTLightColors(plLightInfo* liInfo, IParamBlock2* ProperPB); void IGetRTLightAttenuation(plOmniLightInfo* liInfo, IParamBlock2* ProperPB); // RunTime Light animation builders - hsBool IGetRTLightAttenValues(IParamBlock2* ProperPB, float& attenConst, float& attenLinear, float& attenQuadratic,float &attenCutoff); + bool IGetRTLightAttenValues(IParamBlock2* ProperPB, float& attenConst, float& attenLinear, float& attenQuadratic,float &attenCutoff); void IAdjustRTColorByIntensity(plController* ctl, IParamBlock2* ProperPB); - hsBool IAttachRTLightModifier(plLightModifier* liMod); + bool IAttachRTLightModifier(plLightModifier* liMod); plLightInfo* IMakeLight(plErrorMsg *pErrMsg, plConvertSettings *settings); @@ -221,14 +221,14 @@ protected: void ISetupBones( plDrawableSpans *drawable, hsTArray &spanArray, hsMatrix44 &l2w, hsMatrix44 &w2l, plErrorMsg *pErrMsg, plConvertSettings *settings ); - hsBool IFindBones(plErrorMsg *pErrMsg, plConvertSettings *settings); + bool IFindBones(plErrorMsg *pErrMsg, plConvertSettings *settings); - void IWipeBranchDrawable(hsBool b); + void IWipeBranchDrawable(bool b); - uint32_t IBuildInstanceList( Object *obj, TimeValue t, hsTArray &nodes, hsBool beMoreAccurate = false ); - hsBool IMakeInstanceSpans( plMaxNode *node, hsTArray &spanArray, + uint32_t IBuildInstanceList( Object *obj, TimeValue t, hsTArray &nodes, bool beMoreAccurate = false ); + bool IMakeInstanceSpans( plMaxNode *node, hsTArray &spanArray, plErrorMsg *pErrMsg, plConvertSettings *settings ); - hsBool IMaterialsMatch( plMaxNode *otherNode, hsBool beMoreAccurate ); + bool IMaterialsMatch( plMaxNode *otherNode, bool beMoreAccurate ); int IGetCachedAlphaHackValue( int iSubMtl ); void ISetCachedAlphaHackValue( int iSubMtl, int value ); diff --git a/Sources/Tools/MaxMain/plMaxNodeBase.cpp b/Sources/Tools/MaxMain/plMaxNodeBase.cpp index ac8e7bc9..e238f832 100644 --- a/Sources/Tools/MaxMain/plMaxNodeBase.cpp +++ b/Sources/Tools/MaxMain/plMaxNodeBase.cpp @@ -125,60 +125,60 @@ plMaxNodeData *plMaxNodeBase::GetMaxNodeData() plKey plMaxNodeBase::GetKey() { GetMD; return (pMD) ? pMD->GetKey() : nil; } plSceneObject* plMaxNodeBase::GetSceneObject() { GetMD; return (pMD) ? pMD->GetSceneObject() : nil;} -hsBool plMaxNodeBase::GetForceLocal() { GetMD; return (pMD) ? pMD->GetForceLocal() : nil; } -hsBool plMaxNodeBase::GetReverseSort() { GetMD; return (pMD) ? pMD->GetReverseSort() : nil;} -hsBool plMaxNodeBase::GetSortAsOpaque() { GetMD; return (pMD) ? pMD->GetSortAsOpaque() : nil;} -hsBool plMaxNodeBase::GetVS() { GetMD; return (pMD) ? pMD->GetVS() : nil;} -hsBool plMaxNodeBase::GetHasWaterHeight() { GetMD; return (pMD) ? pMD->GetHasWaterHeight() : nil; } -float plMaxNodeBase::GetWaterHeight() { GetMD; return (pMD) ? pMD->GetWaterHeight() : nil; } -hsBool plMaxNodeBase::GetSmoothAll() { GetMD; return (pMD) ? pMD->GetSmoothAll() : nil;} -hsBool plMaxNodeBase::GetForceSortable() { GetMD; return (pMD) ? pMD->GetForceSortable() : nil;} -hsBool plMaxNodeBase::GetConcave() { GetMD; return (pMD) ? pMD->GetConcave() : nil;} -hsBool plMaxNodeBase::GetCalcEdgeLens() { GetMD; return (pMD) ? pMD->GetCalcEdgeLens() : nil;} -hsBool plMaxNodeBase::GetRunTimeLight() { GetMD; return (pMD) ? pMD->GetRunTimeLight() : nil;} -hsBool plMaxNodeBase::GetForceMatShade() { GetMD; return (pMD) ? pMD->GetForceMatShade() : nil;} -hsBool plMaxNodeBase::GetForceVisLOS() { GetMD; return (pMD) ? pMD->GetForceVisLOS() : nil;} -hsBool plMaxNodeBase::GetEnviron() { GetMD; return (pMD) ? pMD->GetEnviron() : nil;} -hsBool plMaxNodeBase::GetEnvironOnly() { GetMD; return (pMD) ? pMD->GetEnvironOnly() : nil;} -hsBool plMaxNodeBase::GetWaterDecEnv() { GetMD; return (pMD) ? pMD->GetWaterDecEnv() : nil; } -hsBool plMaxNodeBase::GetNoPreShade() { GetMD; return (pMD) ? pMD->GetNoPreShade() && !pMD->GetForcePreShade() : nil;} -hsBool plMaxNodeBase::GetForcePreShade() { GetMD; return (pMD) ? pMD->GetForcePreShade() : nil;} +bool plMaxNodeBase::GetForceLocal() { GetMD; return (pMD) ? pMD->GetForceLocal() : nil; } +bool plMaxNodeBase::GetReverseSort() { GetMD; return (pMD) ? pMD->GetReverseSort() : nil;} +bool plMaxNodeBase::GetSortAsOpaque() { GetMD; return (pMD) ? pMD->GetSortAsOpaque() : nil;} +bool plMaxNodeBase::GetVS() { GetMD; return (pMD) ? pMD->GetVS() : nil;} +bool plMaxNodeBase::GetHasWaterHeight() { GetMD; return (pMD) ? pMD->GetHasWaterHeight() : nil; } +float plMaxNodeBase::GetWaterHeight() { GetMD; return (pMD) ? pMD->GetWaterHeight() : nil; } +bool plMaxNodeBase::GetSmoothAll() { GetMD; return (pMD) ? pMD->GetSmoothAll() : nil;} +bool plMaxNodeBase::GetForceSortable() { GetMD; return (pMD) ? pMD->GetForceSortable() : nil;} +bool plMaxNodeBase::GetConcave() { GetMD; return (pMD) ? pMD->GetConcave() : nil;} +bool plMaxNodeBase::GetCalcEdgeLens() { GetMD; return (pMD) ? pMD->GetCalcEdgeLens() : nil;} +bool plMaxNodeBase::GetRunTimeLight() { GetMD; return (pMD) ? pMD->GetRunTimeLight() : nil;} +bool plMaxNodeBase::GetForceMatShade() { GetMD; return (pMD) ? pMD->GetForceMatShade() : nil;} +bool plMaxNodeBase::GetForceVisLOS() { GetMD; return (pMD) ? pMD->GetForceVisLOS() : nil;} +bool plMaxNodeBase::GetEnviron() { GetMD; return (pMD) ? pMD->GetEnviron() : nil;} +bool plMaxNodeBase::GetEnvironOnly() { GetMD; return (pMD) ? pMD->GetEnvironOnly() : nil;} +bool plMaxNodeBase::GetWaterDecEnv() { GetMD; return (pMD) ? pMD->GetWaterDecEnv() : nil; } +bool plMaxNodeBase::GetNoPreShade() { GetMD; return (pMD) ? pMD->GetNoPreShade() && !pMD->GetForcePreShade() : nil;} +bool plMaxNodeBase::GetForcePreShade() { GetMD; return (pMD) ? pMD->GetForcePreShade() : nil;} plKey plMaxNodeBase::GetRoomKey() { GetMD; return (pMD) ? pMD->GetRoomKey() : nil; } -hsBool plMaxNodeBase::GetDrawable() { GetMD; return (pMD) ? pMD->GetDrawable() : nil; } -hsBool plMaxNodeBase::GetPhysical() { GetMD; return (pMD) ? pMD->GetPhysical() : nil; } -hsBool plMaxNodeBase::GetItinerant() { GetMD; return (pMD) ? pMD->GetItinerant() : nil; } -hsBool plMaxNodeBase::GetUnBounded() { GetMD; return (pMD) ? pMD->GetUnBounded() : nil; } -hsBool plMaxNodeBase::GetDisableNormal() { GetMD; return (pMD) ? pMD->GetDisableNormal() : nil; } -uint32_t plMaxNodeBase::GetDecalLevel() { GetMD; return (pMD) ? pMD->GetDecalLevel() : nil; } -hsBool plMaxNodeBase::GetMovable() { GetMD; return (pMD) ? pMD->GetMovable() : nil; } -hsBool plMaxNodeBase::GetIsBarney() { GetMD; return (pMD) ? pMD->GetIsBarney() : nil; } -hsBool plMaxNodeBase::GetForceShadow() { GetMD; return (pMD) ? pMD->GetForceShadow() : nil; } -hsBool plMaxNodeBase::GetAlphaTestHigh() { GetMD; return (pMD) ? pMD->GetAlphaTestHigh() : nil; } -hsBool plMaxNodeBase::GetFilterInherit() { GetMD; return (pMD) ? pMD->GetFilterInherit() : nil; } -hsBool plMaxNodeBase::GetNoShadow() { GetMD; return (pMD) ? pMD->GetNoShadow() : nil; } -hsBool plMaxNodeBase::GetNoSpanSort() { GetMD; return (pMD) ? pMD->GetNoSpanSort() : nil; } -hsBool plMaxNodeBase::GetNoSpanReSort() { GetMD; return (pMD) ? pMD->GetNoSpanReSort() : nil; } -hsBool plMaxNodeBase::GetNoFaceSort() { GetMD; return (pMD) ? pMD->GetNoFaceSort() : nil; } -hsBool plMaxNodeBase::GetNoDeferDraw() { GetMD; return (pMD) ? pMD->GetNoDeferDraw() : nil; } -hsBool plMaxNodeBase::GetBlendToFB() { GetMD; return (pMD) ? pMD->GetBlendToFB() : nil; } -hsBool plMaxNodeBase::GetForceMaterialCopy() { GetMD; return (pMD) ? pMD->GetForceMaterialCopy() : nil; } -hsBool plMaxNodeBase::GetInstanced() { GetMD; return (pMD) ? pMD->GetInstanced() : nil; } -hsBool plMaxNodeBase::GetParticleRelated() { GetMD; return (pMD) ? pMD->GetParticleRelated() : nil; } -uint32_t plMaxNodeBase::GetSoundIdxCounter() { GetMD; return (pMD) ? pMD->GetSoundIdxCounter() : 0; } +bool plMaxNodeBase::GetDrawable() { GetMD; return (pMD) ? pMD->GetDrawable() : nil; } +bool plMaxNodeBase::GetPhysical() { GetMD; return (pMD) ? pMD->GetPhysical() : nil; } +bool plMaxNodeBase::GetItinerant() { GetMD; return (pMD) ? pMD->GetItinerant() : nil; } +bool plMaxNodeBase::GetUnBounded() { GetMD; return (pMD) ? pMD->GetUnBounded() : nil; } +bool plMaxNodeBase::GetDisableNormal() { GetMD; return (pMD) ? pMD->GetDisableNormal() : nil; } +uint32_t plMaxNodeBase::GetDecalLevel() { GetMD; return (pMD) ? pMD->GetDecalLevel() : nil; } +bool plMaxNodeBase::GetMovable() { GetMD; return (pMD) ? pMD->GetMovable() : nil; } +bool plMaxNodeBase::GetIsBarney() { GetMD; return (pMD) ? pMD->GetIsBarney() : nil; } +bool plMaxNodeBase::GetForceShadow() { GetMD; return (pMD) ? pMD->GetForceShadow() : nil; } +bool plMaxNodeBase::GetAlphaTestHigh() { GetMD; return (pMD) ? pMD->GetAlphaTestHigh() : nil; } +bool plMaxNodeBase::GetFilterInherit() { GetMD; return (pMD) ? pMD->GetFilterInherit() : nil; } +bool plMaxNodeBase::GetNoShadow() { GetMD; return (pMD) ? pMD->GetNoShadow() : nil; } +bool plMaxNodeBase::GetNoSpanSort() { GetMD; return (pMD) ? pMD->GetNoSpanSort() : nil; } +bool plMaxNodeBase::GetNoSpanReSort() { GetMD; return (pMD) ? pMD->GetNoSpanReSort() : nil; } +bool plMaxNodeBase::GetNoFaceSort() { GetMD; return (pMD) ? pMD->GetNoFaceSort() : nil; } +bool plMaxNodeBase::GetNoDeferDraw() { GetMD; return (pMD) ? pMD->GetNoDeferDraw() : nil; } +bool plMaxNodeBase::GetBlendToFB() { GetMD; return (pMD) ? pMD->GetBlendToFB() : nil; } +bool plMaxNodeBase::GetForceMaterialCopy() { GetMD; return (pMD) ? pMD->GetForceMaterialCopy() : nil; } +bool plMaxNodeBase::GetInstanced() { GetMD; return (pMD) ? pMD->GetInstanced() : nil; } +bool plMaxNodeBase::GetParticleRelated() { GetMD; return (pMD) ? pMD->GetParticleRelated() : nil; } +uint32_t plMaxNodeBase::GetSoundIdxCounter() { GetMD; return (pMD) ? pMD->GetSoundIdxCounter() : 0; } plSceneObject* plMaxNodeBase::GetAvatarSO() { GetMD; return (pMD) ? pMD->GetAvatarSO() : nil; } BOOL plMaxNodeBase::HasFade() { GetMD; return (pMD) ? pMD->HasFade() : false; } Box3 plMaxNodeBase::GetFade() { GetMD; return (pMD) ? pMD->GetFade() : Box3(Point3(0,0,0), Point3(0,0,0)); } -hsBool plMaxNodeBase::GetDup2Sided() { GetMD; return (pMD) ? pMD->GetDup2Sided() : false;} -hsBool plMaxNodeBase::GetRadiateNorms() { GetMD; return (pMD) ? pMD->GetRadiateNorms() : false;} +bool plMaxNodeBase::GetDup2Sided() { GetMD; return (pMD) ? pMD->GetDup2Sided() : false;} +bool plMaxNodeBase::GetRadiateNorms() { GetMD; return (pMD) ? pMD->GetRadiateNorms() : false;} BOOL plMaxNodeBase::HasNormalChan() { GetMD; return (pMD) ? pMD->HasNormalChan() : false; } int plMaxNodeBase::GetNormalChan() { GetMD; return (pMD) ? pMD->GetNormalChan() : 0; } -hsBool plMaxNodeBase::GetIsGUI() { GetMD; return (pMD) ? pMD->GetIsGUI() : false; } +bool plMaxNodeBase::GetIsGUI() { GetMD; return (pMD) ? pMD->GetIsGUI() : false; } plSharedMesh* plMaxNodeBase::GetSwappableGeom() { GetMD; return (pMD) ? pMD->GetSwappableGeom() : nil; } -uint32_t plMaxNodeBase::GetSwappableGeomTarget() { GetMD; return (pMD) ? pMD->GetSwappableGeomTarget() : -1; } +uint32_t plMaxNodeBase::GetSwappableGeomTarget() { GetMD; return (pMD) ? pMD->GetSwappableGeomTarget() : -1; } plMaxBoneMap* plMaxNodeBase::GetBoneMap() { GetMD; return (pMD) ? pMD->GetBoneMap() : nil; } -hsBool plMaxNodeBase::GetOverrideHighLevelSDL() { GetMD; return (pMD) ? pMD->GetOverrideHighLevelSDL() : false; } -uint8_t plMaxNodeBase::GetAnimCompress() { GetMD; return (pMD) ? pMD->GetAnimCompress() : false; } -float plMaxNodeBase::GetKeyReduceThreshold() { GetMD; return (pMD) ? pMD->GetKeyReduceThreshold() : 0; } +bool plMaxNodeBase::GetOverrideHighLevelSDL() { GetMD; return (pMD) ? pMD->GetOverrideHighLevelSDL() : false; } +uint8_t plMaxNodeBase::GetAnimCompress() { GetMD; return (pMD) ? pMD->GetAnimCompress() : false; } +float plMaxNodeBase::GetKeyReduceThreshold() { GetMD; return (pMD) ? pMD->GetKeyReduceThreshold() : 0; } int plMaxNodeBase::NumRenderDependencies() { GetMD; return (pMD) ? pMD->NumRenderDependencies() : 0; } plMaxNodeBase* plMaxNodeBase::GetRenderDependency(int i) { GetMD; return (pMD) ? pMD->GetRenderDependency(i) : nil; } @@ -189,58 +189,58 @@ plMaxNodeBase* plMaxNodeBase::GetBone(int i) { GetMD; ret //------------------------------ // Set Data from MaxNodeData //------------------------------ -void plMaxNodeBase::SetCanConvert(hsBool b) { GetMD; pMD->SetCanConvert(b); } +void plMaxNodeBase::SetCanConvert(bool b) { GetMD; pMD->SetCanConvert(b); } void plMaxNodeBase::SetMesh(hsGMesh *p) { GetMD; pMD->SetMesh(p); } void plMaxNodeBase::SetRoomKey(plKey p) { GetMD; pMD->SetRoomKey(p); } -void plMaxNodeBase::SetDrawable(hsBool b) { GetMD; pMD->SetDrawable(b); } -void plMaxNodeBase::SetPhysical(hsBool b) { GetMD; pMD->SetPhysical(b); } -//void plMaxNodeBase::SetItinerant(hsBool b); -void plMaxNodeBase::SetUnBounded(hsBool b) { GetMD; pMD->SetUnBounded(b); } -void plMaxNodeBase::SetDisableNormal(hsBool b) { GetMD; pMD->SetDisableNormal(b); } +void plMaxNodeBase::SetDrawable(bool b) { GetMD; pMD->SetDrawable(b); } +void plMaxNodeBase::SetPhysical(bool b) { GetMD; pMD->SetPhysical(b); } +//void plMaxNodeBase::SetItinerant(bool b); +void plMaxNodeBase::SetUnBounded(bool b) { GetMD; pMD->SetUnBounded(b); } +void plMaxNodeBase::SetDisableNormal(bool b) { GetMD; pMD->SetDisableNormal(b); } void plMaxNodeBase::SetDecalLevel(uint32_t i) { GetMD; pMD->SetDecalLevel(i); } -void plMaxNodeBase::SetMovable(hsBool b) { GetMD; pMD->SetMovable(b); pMD->SetRunTimeLight(b); pMD->SetNoPreShade(b); } -void plMaxNodeBase::SetReverseSort(hsBool b) { GetMD; pMD->SetReverseSort(b); } -void plMaxNodeBase::SetSortAsOpaque(hsBool b) { GetMD; pMD->SetSortAsOpaque(b); } -void plMaxNodeBase::SetVS(hsBool b) { GetMD; pMD->SetVS(b); } -void plMaxNodeBase::SetHasWaterHeight(hsBool b) { GetMD; pMD->SetHasWaterHeight(b); } +void plMaxNodeBase::SetMovable(bool b) { GetMD; pMD->SetMovable(b); pMD->SetRunTimeLight(b); pMD->SetNoPreShade(b); } +void plMaxNodeBase::SetReverseSort(bool b) { GetMD; pMD->SetReverseSort(b); } +void plMaxNodeBase::SetSortAsOpaque(bool b) { GetMD; pMD->SetSortAsOpaque(b); } +void plMaxNodeBase::SetVS(bool b) { GetMD; pMD->SetVS(b); } +void plMaxNodeBase::SetHasWaterHeight(bool b) { GetMD; pMD->SetHasWaterHeight(b); } void plMaxNodeBase::SetWaterHeight(float h) { GetMD; pMD->SetWaterHeight(h); } -void plMaxNodeBase::SetSmoothAll(hsBool b) { GetMD; pMD->SetSmoothAll(b); } -void plMaxNodeBase::SetForceSortable(hsBool b) { GetMD; pMD->SetForceSortable(b); } -void plMaxNodeBase::SetConcave(hsBool b) { GetMD; pMD->SetConcave(b); } -void plMaxNodeBase::SetCalcEdgeLens(hsBool b) { GetMD; pMD->SetCalcEdgeLens(b); } -void plMaxNodeBase::SetRunTimeLight(hsBool b) { GetMD; pMD->SetRunTimeLight(b); } -void plMaxNodeBase::SetForceMatShade(hsBool b) { GetMD; pMD->SetForceMatShade(b); } -void plMaxNodeBase::SetForceVisLOS(hsBool b) { GetMD; pMD->SetForceVisLOS(b); } -void plMaxNodeBase::SetEnviron(hsBool b) { GetMD; pMD->SetEnviron(b); } -void plMaxNodeBase::SetEnvironOnly(hsBool b) { GetMD; pMD->SetEnvironOnly(b); } -void plMaxNodeBase::SetWaterDecEnv(hsBool b) { GetMD; pMD->SetWaterDecEnv(b); } -void plMaxNodeBase::SetNoPreShade(hsBool b) { GetMD; pMD->SetNoPreShade(b); } -void plMaxNodeBase::SetForcePreShade(hsBool b) { GetMD; pMD->SetForcePreShade(b); } -void plMaxNodeBase::SetForceLocal(hsBool b) { GetMD; pMD->SetForceLocal(b); } -void plMaxNodeBase::SetIsBarney(hsBool b) { GetMD; pMD->SetIsBarney(b); } -void plMaxNodeBase::SetForceShadow(hsBool b) { GetMD; pMD->SetForceShadow(b); } -void plMaxNodeBase::SetAlphaTestHigh(hsBool b) { GetMD; pMD->SetAlphaTestHigh(b); } -void plMaxNodeBase::SetFilterInherit(hsBool b) { GetMD; pMD->SetFilterInherit(b); } -void plMaxNodeBase::SetNoShadow(hsBool b) { GetMD; pMD->SetNoShadow(b); } -void plMaxNodeBase::SetNoSpanSort(hsBool b) { GetMD; pMD->SetNoSpanSort(b); } -void plMaxNodeBase::SetNoSpanReSort(hsBool b) { GetMD; pMD->SetNoSpanReSort(b); } -void plMaxNodeBase::SetNoFaceSort(hsBool b) { GetMD; pMD->SetNoFaceSort(b); } -void plMaxNodeBase::SetNoDeferDraw(hsBool b) { GetMD; pMD->SetNoDeferDraw(b); } -void plMaxNodeBase::SetBlendToFB(hsBool b) { GetMD; pMD->SetBlendToFB(b); } -void plMaxNodeBase::SetForceMaterialCopy(hsBool b) { GetMD; pMD->SetForceMaterialCopy(b); } -void plMaxNodeBase::SetInstanced(hsBool b) { GetMD; pMD->SetInstanced(b); } -void plMaxNodeBase::SetParticleRelated(hsBool b) { GetMD; pMD->SetParticleRelated(b); } +void plMaxNodeBase::SetSmoothAll(bool b) { GetMD; pMD->SetSmoothAll(b); } +void plMaxNodeBase::SetForceSortable(bool b) { GetMD; pMD->SetForceSortable(b); } +void plMaxNodeBase::SetConcave(bool b) { GetMD; pMD->SetConcave(b); } +void plMaxNodeBase::SetCalcEdgeLens(bool b) { GetMD; pMD->SetCalcEdgeLens(b); } +void plMaxNodeBase::SetRunTimeLight(bool b) { GetMD; pMD->SetRunTimeLight(b); } +void plMaxNodeBase::SetForceMatShade(bool b) { GetMD; pMD->SetForceMatShade(b); } +void plMaxNodeBase::SetForceVisLOS(bool b) { GetMD; pMD->SetForceVisLOS(b); } +void plMaxNodeBase::SetEnviron(bool b) { GetMD; pMD->SetEnviron(b); } +void plMaxNodeBase::SetEnvironOnly(bool b) { GetMD; pMD->SetEnvironOnly(b); } +void plMaxNodeBase::SetWaterDecEnv(bool b) { GetMD; pMD->SetWaterDecEnv(b); } +void plMaxNodeBase::SetNoPreShade(bool b) { GetMD; pMD->SetNoPreShade(b); } +void plMaxNodeBase::SetForcePreShade(bool b) { GetMD; pMD->SetForcePreShade(b); } +void plMaxNodeBase::SetForceLocal(bool b) { GetMD; pMD->SetForceLocal(b); } +void plMaxNodeBase::SetIsBarney(bool b) { GetMD; pMD->SetIsBarney(b); } +void plMaxNodeBase::SetForceShadow(bool b) { GetMD; pMD->SetForceShadow(b); } +void plMaxNodeBase::SetAlphaTestHigh(bool b) { GetMD; pMD->SetAlphaTestHigh(b); } +void plMaxNodeBase::SetFilterInherit(bool b) { GetMD; pMD->SetFilterInherit(b); } +void plMaxNodeBase::SetNoShadow(bool b) { GetMD; pMD->SetNoShadow(b); } +void plMaxNodeBase::SetNoSpanSort(bool b) { GetMD; pMD->SetNoSpanSort(b); } +void plMaxNodeBase::SetNoSpanReSort(bool b) { GetMD; pMD->SetNoSpanReSort(b); } +void plMaxNodeBase::SetNoFaceSort(bool b) { GetMD; pMD->SetNoFaceSort(b); } +void plMaxNodeBase::SetNoDeferDraw(bool b) { GetMD; pMD->SetNoDeferDraw(b); } +void plMaxNodeBase::SetBlendToFB(bool b) { GetMD; pMD->SetBlendToFB(b); } +void plMaxNodeBase::SetForceMaterialCopy(bool b) { GetMD; pMD->SetForceMaterialCopy(b); } +void plMaxNodeBase::SetInstanced(bool b) { GetMD; pMD->SetInstanced(b); } +void plMaxNodeBase::SetParticleRelated(bool b) { GetMD; pMD->SetParticleRelated(b); } void plMaxNodeBase::SetSoundIdxCounter(uint32_t ctr) { GetMD; pMD->SetSoundIdxCounter(ctr); } void plMaxNodeBase::SetAvatarSO(plSceneObject *so) { GetMD; pMD->SetAvatarSO(so); } void plMaxNodeBase::SetFade(const Box3& b) { GetMD; pMD->SetFade(b); } -void plMaxNodeBase::SetDup2Sided(hsBool b) { GetMD; pMD->SetDup2Sided(b); } -void plMaxNodeBase::SetRadiateNorms(hsBool b) { GetMD; pMD->SetRadiateNorms(b); } +void plMaxNodeBase::SetDup2Sided(bool b) { GetMD; pMD->SetDup2Sided(b); } +void plMaxNodeBase::SetRadiateNorms(bool b) { GetMD; pMD->SetRadiateNorms(b); } void plMaxNodeBase::SetNormalChan(int n) { GetMD; pMD->SetNormalChan(n); } -void plMaxNodeBase::SetIsGUI(hsBool b) { GetMD; pMD->SetIsGUI(b); } +void plMaxNodeBase::SetIsGUI(bool b) { GetMD; pMD->SetIsGUI(b); } void plMaxNodeBase::SetSwappableGeom(plSharedMesh *sm) { GetMD; pMD->SetSwappableGeom(sm); } void plMaxNodeBase::SetSwappableGeomTarget(uint32_t id) { GetMD; pMD->SetSwappableGeomTarget(id); } void plMaxNodeBase::SetBoneMap(plMaxBoneMap *bones) { GetMD; pMD->SetBoneMap(bones); } -void plMaxNodeBase::SetOverrideHighLevelSDL(hsBool b) { GetMD; pMD->SetOverrideHighLevelSDL(b); } +void plMaxNodeBase::SetOverrideHighLevelSDL(bool b) { GetMD; pMD->SetOverrideHighLevelSDL(b); } void plMaxNodeBase::SetAnimCompress(uint8_t v) { GetMD; pMD->SetAnimCompress(v); } void plMaxNodeBase::SetKeyReduceThreshold(float v) { GetMD; pMD->SetKeyReduceThreshold(v); } void plMaxNodeBase::ClearRenderDependencies() { GetMD; pMD->ClearRenderDependencies(); } @@ -258,13 +258,13 @@ plLocation plMaxNodeBase::GetLocation() return loc; } -hsBool plMaxNodeBase::GetDirty(uint8_t i) +bool plMaxNodeBase::GetDirty(uint8_t i) { uint8_t *dirty = IGetSceneViewerChunk(); return *dirty & i; } -void plMaxNodeBase::SetDirty(uint8_t i, hsBool b) +void plMaxNodeBase::SetDirty(uint8_t i, bool b) { uint8_t *dirty = IGetSceneViewerChunk(); @@ -274,7 +274,7 @@ void plMaxNodeBase::SetDirty(uint8_t i, hsBool b) *dirty &= ~i; } -hsBool plMaxNodeBase::HasLoadMask() +bool plMaxNodeBase::HasLoadMask() { GetMD; return pMD->HasLoadMask(); @@ -292,7 +292,7 @@ void plMaxNodeBase::AddLoadMask(const plLoadMask& m) pMD->AddLoadMask(m); } -hsBool plMaxNodeBase::RenderDependsOn(plMaxNodeBase* m) +bool plMaxNodeBase::RenderDependsOn(plMaxNodeBase* m) { if( m == this ) return true; @@ -306,7 +306,7 @@ hsBool plMaxNodeBase::RenderDependsOn(plMaxNodeBase* m) return false; } -hsBool plMaxNodeBase::AddRenderDependency(plMaxNodeBase* m) +bool plMaxNodeBase::AddRenderDependency(plMaxNodeBase* m) { if( m->RenderDependsOn(this) ) return false; @@ -334,7 +334,7 @@ uint8_t *plMaxNodeBase::IGetSceneViewerChunk() return SVChunk; } -hsBool plMaxNodeBase::CanConvert(bool recalculate) +bool plMaxNodeBase::CanConvert(bool recalculate) { // Try and find a cached return value plMaxNodeData *md = GetMaxNodeData(); @@ -365,17 +365,17 @@ hsBool plMaxNodeBase::CanConvert(bool recalculate) return false; } -hsBool plMaxNodeBase::IsTMAnimated() +bool plMaxNodeBase::IsTMAnimated() { Control* tmControl = GetTMController(); return (tmControl && tmControl->IsAnimated()); } //// IsTMAnimatedRecur - test recursively up the chain /////////////////////////////////////////////////////////////// -hsBool plMaxNodeBase::IsTMAnimatedRecur() +bool plMaxNodeBase::IsTMAnimatedRecur() { const char* dbgNodeName = GetName(); - hsBool shouldBe = false; + bool shouldBe = false; if( !CanConvert() ) return false; @@ -387,10 +387,10 @@ hsBool plMaxNodeBase::IsTMAnimatedRecur() //// IsMovable /////////////////////////////////////////////////////////////// // Returns whether this node is "animated" (i.e. could move at runtime) -hsBool plMaxNodeBase::IsMovable() +bool plMaxNodeBase::IsMovable() { const char* dbgNodeName = GetName(); - hsBool shouldBe = false; + bool shouldBe = false; if( !CanConvert() ) @@ -419,7 +419,7 @@ hsBool plMaxNodeBase::IsMovable() } // Recursively set so we don't have to recursively check. -void plMaxNodeBase::SetItinerant(hsBool b) +void plMaxNodeBase::SetItinerant(bool b) { const char* dbgNodeName = GetName(); @@ -495,7 +495,7 @@ bool plMaxNodeBase::IsXRef() return false; } -hsBool plMaxNodeBase::IsComponent(Object *obj) +bool plMaxNodeBase::IsComponent(Object *obj) { if (!obj) obj = GetObjectRef(); @@ -506,7 +506,7 @@ hsBool plMaxNodeBase::IsComponent(Object *obj) return false; } -hsBool plMaxNodeBase::IsExternComponent(Object *obj) +bool plMaxNodeBase::IsExternComponent(Object *obj) { if (!obj) obj = GetObjectRef(); @@ -623,7 +623,7 @@ plComponentBase *plMaxNodeBase::IRefMakerToComponent(ReferenceMaker *maker, bool return nil; } -hsBool plMaxNodeBase::IRenderLevelSet(hsBool forBlend) +bool plMaxNodeBase::IRenderLevelSet(bool forBlend) { plMaxNodeData* md = GetMaxNodeData(); if( md ) @@ -631,7 +631,7 @@ hsBool plMaxNodeBase::IRenderLevelSet(hsBool forBlend) return false; } -void plMaxNodeBase::ISetRenderLevel(const plRenderLevel& l, hsBool forBlend) +void plMaxNodeBase::ISetRenderLevel(const plRenderLevel& l, bool forBlend) { plMaxNodeData* md = GetMaxNodeData(); if( md ) @@ -643,7 +643,7 @@ void plMaxNodeBase::ISetRenderLevel(const plRenderLevel& l, hsBool forBlend) } } -const plRenderLevel& plMaxNodeBase::IGetRenderLevel(hsBool forBlend) +const plRenderLevel& plMaxNodeBase::IGetRenderLevel(bool forBlend) { plMaxNodeData* md = GetMaxNodeData(); if( !md ) @@ -654,7 +654,7 @@ const plRenderLevel& plMaxNodeBase::IGetRenderLevel(hsBool forBlend) return forBlend ? md->GetBlendLevel() : md->GetOpaqueLevel(); } -uint32_t plMaxNodeBase::IGetMajorRenderLevel(hsBool forBlend) +uint32_t plMaxNodeBase::IGetMajorRenderLevel(bool forBlend) { if( GetBlendToFB() ) return plRenderLevel::kFBMajorLevel; @@ -685,7 +685,7 @@ uint32_t plMaxNodeBase::IGetMajorRenderLevel(hsBool forBlend) return iMaxDep; } -uint32_t plMaxNodeBase::IGetMinorRenderLevel(hsBool forBlend) +uint32_t plMaxNodeBase::IGetMinorRenderLevel(bool forBlend) { if( GetAvatarSO() ) return plRenderLevel::kAvatarRendMinorLevel; @@ -714,7 +714,7 @@ uint32_t plMaxNodeBase::IGetMinorRenderLevel(hsBool forBlend) return iMaxDep + 4; } -plRenderLevel plMaxNodeBase::ICalcRenderLevel(hsBool forBlend) +plRenderLevel plMaxNodeBase::ICalcRenderLevel(bool forBlend) { if( GetBlendToFB() ) return plRenderLevel::kFBMajorLevel; @@ -753,7 +753,7 @@ plRenderLevel plMaxNodeBase::ICalcRenderLevel(hsBool forBlend) return maxLevel; } -const plRenderLevel& plMaxNodeBase::GetRenderLevel(hsBool forBlend) +const plRenderLevel& plMaxNodeBase::GetRenderLevel(bool forBlend) { if( !CanConvert() ) { @@ -805,7 +805,7 @@ void plMaxNodeBase::SetGeoDice(BOOL on, int maxFaces, float maxSize, int minFace } } -hsBool plMaxNodeBase::Contains(const Point3& worldPt) +bool plMaxNodeBase::Contains(const Point3& worldPt) { TimeValue currTime = 0;//hsConverterUtils::Instance().GetTime(GetInterface()); Object *obj = EvalWorldState(currTime).obj; @@ -837,7 +837,7 @@ hsBool plMaxNodeBase::Contains(const Point3& worldPt) return false; } - hsBool retVal = true; + bool retVal = true; int i; for( i = 0; i < mesh.getNumFaces(); i++ ) { @@ -866,7 +866,7 @@ hsBool plMaxNodeBase::Contains(const Point3& worldPt) return false; } -hsBool plMaxNodeBase::Contains(const Box3& bnd, const Matrix3& l2w) +bool plMaxNodeBase::Contains(const Box3& bnd, const Matrix3& l2w) { int i; for( i = 0; i < 8; i++ ) diff --git a/Sources/Tools/MaxMain/plMaxNodeBase.h b/Sources/Tools/MaxMain/plMaxNodeBase.h index 277b0546..2cb04a7b 100644 --- a/Sources/Tools/MaxMain/plMaxNodeBase.h +++ b/Sources/Tools/MaxMain/plMaxNodeBase.h @@ -86,65 +86,65 @@ public: // Get Data from MaxNodeData //------------------------------ // If recalculate is true the cached value is ignored. (Useful in the SceneViewer) - hsBool CanConvert(bool recalculate=false); + bool CanConvert(bool recalculate=false); plLocation GetLocation(); plKey GetKey(); plSceneObject* GetSceneObject(); - hsBool GetForceLocal(); - hsBool GetReverseSort(); - hsBool GetSortAsOpaque(); - hsBool GetRunTimeLight(); - hsBool GetForceMatShade(); - hsBool GetForceVisLOS(); - hsBool GetEnviron(); - hsBool GetEnvironOnly(); - hsBool GetWaterDecEnv(); - hsBool GetVS(); - hsBool GetHasWaterHeight(); - float GetWaterHeight(); - hsBool GetSmoothAll(); - hsBool GetForceSortable(); - hsBool GetConcave(); - hsBool GetCalcEdgeLens(); - hsBool GetNoPreShade(); - hsBool GetForcePreShade(); + bool GetForceLocal(); + bool GetReverseSort(); + bool GetSortAsOpaque(); + bool GetRunTimeLight(); + bool GetForceMatShade(); + bool GetForceVisLOS(); + bool GetEnviron(); + bool GetEnvironOnly(); + bool GetWaterDecEnv(); + bool GetVS(); + bool GetHasWaterHeight(); + float GetWaterHeight(); + bool GetSmoothAll(); + bool GetForceSortable(); + bool GetConcave(); + bool GetCalcEdgeLens(); + bool GetNoPreShade(); + bool GetForcePreShade(); plKey GetRoomKey(); - hsBool GetDrawable(); - hsBool GetPhysical(); - hsBool GetItinerant(); - hsBool GetUnBounded(); - hsBool GetDisableNormal(); - uint32_t GetDecalLevel(); - hsBool GetMovable(); - hsBool GetNoShadow(); - hsBool GetForceShadow(); - hsBool GetAlphaTestHigh(); - hsBool GetFilterInherit(); - hsBool GetIsBarney(); - hsBool GetNoSpanSort(); - hsBool GetNoSpanReSort(); - hsBool GetNoFaceSort(); - hsBool GetNoDeferDraw(); - hsBool GetBlendToFB(); - hsBool GetForceMaterialCopy(); - hsBool GetInstanced(); - hsBool GetParticleRelated(); - uint32_t GetSoundIdxCounter(); + bool GetDrawable(); + bool GetPhysical(); + bool GetItinerant(); + bool GetUnBounded(); + bool GetDisableNormal(); + uint32_t GetDecalLevel(); + bool GetMovable(); + bool GetNoShadow(); + bool GetForceShadow(); + bool GetAlphaTestHigh(); + bool GetFilterInherit(); + bool GetIsBarney(); + bool GetNoSpanSort(); + bool GetNoSpanReSort(); + bool GetNoFaceSort(); + bool GetNoDeferDraw(); + bool GetBlendToFB(); + bool GetForceMaterialCopy(); + bool GetInstanced(); + bool GetParticleRelated(); + uint32_t GetSoundIdxCounter(); plSceneObject* GetAvatarSO(); BOOL HasFade(); Box3 GetFade(); - hsBool GetDup2Sided(); - hsBool GetRadiateNorms(); + bool GetDup2Sided(); + bool GetRadiateNorms(); BOOL HasNormalChan(); int GetNormalChan(); BOOL GetGeoDice(int& maxFaces, float& maxSize, int& minFaces); - hsBool GetIsGUI(); + bool GetIsGUI(); plSharedMesh* GetSwappableGeom(); - uint32_t GetSwappableGeomTarget(); + uint32_t GetSwappableGeomTarget(); plMaxBoneMap* GetBoneMap(); - hsBool GetOverrideHighLevelSDL(); - uint8_t GetAnimCompress(); - float GetKeyReduceThreshold(); + bool GetOverrideHighLevelSDL(); + uint8_t GetAnimCompress(); + float GetKeyReduceThreshold(); int NumRenderDependencies(); plMaxNodeBase* GetRenderDependency(int i); @@ -154,63 +154,63 @@ public: //------------------------------ // Set Data from MaxNodeData //------------------------------ - void SetCanConvert(hsBool b); + void SetCanConvert(bool b); void SetMesh(hsGMesh *p); void SetRoomKey(plKey p); - void SetDrawable(hsBool b); - void SetPhysical(hsBool b); - void SetItinerant(hsBool b); - void SetUnBounded(hsBool b); - void SetDisableNormal(hsBool b); + void SetDrawable(bool b); + void SetPhysical(bool b); + void SetItinerant(bool b); + void SetUnBounded(bool b); + void SetDisableNormal(bool b); void SetDecalLevel(uint32_t i); - void SetMovable(hsBool b); - void SetNoPreShade(hsBool b); - void SetForcePreShade(hsBool b); - void SetReverseSort(hsBool b); - void SetSortAsOpaque(hsBool b); - void SetVS(hsBool b); - void SetHasWaterHeight(hsBool b); + void SetMovable(bool b); + void SetNoPreShade(bool b); + void SetForcePreShade(bool b); + void SetReverseSort(bool b); + void SetSortAsOpaque(bool b); + void SetVS(bool b); + void SetHasWaterHeight(bool b); void SetWaterHeight(float h); - void SetSmoothAll(hsBool b); - void SetForceSortable(hsBool b); - void SetConcave(hsBool b); - void SetCalcEdgeLens(hsBool b); - void SetRunTimeLight(hsBool b); - void SetForceMatShade(hsBool b); - void SetForceVisLOS(hsBool b); - void SetEnviron(hsBool b); - void SetEnvironOnly(hsBool b); - void SetWaterDecEnv(hsBool b); - void SetForceLocal(hsBool b); - void SetIsBarney(hsBool b); - void SetForceShadow(hsBool b); - void SetAlphaTestHigh(hsBool b); - void SetFilterInherit(hsBool b); - void SetNoShadow(hsBool b); - void SetNoSpanSort(hsBool b); - void SetNoSpanReSort(hsBool b); - void SetNoFaceSort(hsBool b); - void SetNoDeferDraw(hsBool b); - void SetBlendToFB(hsBool b); - void SetForceMaterialCopy(hsBool b); - void SetInstanced(hsBool b); - void SetParticleRelated(hsBool b); + void SetSmoothAll(bool b); + void SetForceSortable(bool b); + void SetConcave(bool b); + void SetCalcEdgeLens(bool b); + void SetRunTimeLight(bool b); + void SetForceMatShade(bool b); + void SetForceVisLOS(bool b); + void SetEnviron(bool b); + void SetEnvironOnly(bool b); + void SetWaterDecEnv(bool b); + void SetForceLocal(bool b); + void SetIsBarney(bool b); + void SetForceShadow(bool b); + void SetAlphaTestHigh(bool b); + void SetFilterInherit(bool b); + void SetNoShadow(bool b); + void SetNoSpanSort(bool b); + void SetNoSpanReSort(bool b); + void SetNoFaceSort(bool b); + void SetNoDeferDraw(bool b); + void SetBlendToFB(bool b); + void SetForceMaterialCopy(bool b); + void SetInstanced(bool b); + void SetParticleRelated(bool b); void SetSoundIdxCounter(uint32_t ctr); void SetAvatarSO(plSceneObject *so); void SetFade(const Box3& b); - void SetDup2Sided(hsBool b); - void SetRadiateNorms(hsBool b); + void SetDup2Sided(bool b); + void SetRadiateNorms(bool b); void SetNormalChan(int n); void SetGeoDice(BOOL on, int maxFaces, float maxSize, int minFaces); - void SetIsGUI(hsBool b); + void SetIsGUI(bool b); void SetSwappableGeom(plSharedMesh *sm); void SetSwappableGeomTarget(uint32_t id); void SetBoneMap(plMaxBoneMap *bones); - void SetOverrideHighLevelSDL(hsBool b); + void SetOverrideHighLevelSDL(bool b); void SetAnimCompress(uint8_t v); void SetKeyReduceThreshold(float v); - hsBool AddRenderDependency(plMaxNodeBase* m); - hsBool RenderDependsOn(plMaxNodeBase* m); + bool AddRenderDependency(plMaxNodeBase* m); + bool RenderDependsOn(plMaxNodeBase* m); void ClearRenderDependencies(); void AddBone(plMaxNodeBase* m); @@ -218,28 +218,28 @@ public: // Dirty flags for SceneWatcher use enum { kGeomDirty = 0x1, kMatDirty = 0x2, kAllDirty = 0xFF }; - hsBool GetDirty(uint8_t i); - void SetDirty(uint8_t i, hsBool b); + bool GetDirty(uint8_t i); + void SetDirty(uint8_t i, bool b); plKey GetParentKey() { plMaxNodeBase *pPar = (plMaxNodeBase*)GetParentNode(); hsAssert(pPar, "No Parent"); return pPar->GetKey(); } ISkin* FindSkinModifier(); // Returns the object's skin modifier if it has one, else nil - const plRenderLevel& GetRenderLevel(hsBool forBlend); + const plRenderLevel& GetRenderLevel(bool forBlend); - hsBool HasLoadMask(); + bool HasLoadMask(); plLoadMask GetLoadMask(); void AddLoadMask(const plLoadMask& m); - hsBool IsTMAnimated(); - hsBool IsTMAnimatedRecur(); - hsBool IsMovable(); // Checks to see whether this node will ever move in the scene + bool IsTMAnimated(); + bool IsTMAnimatedRecur(); + bool IsMovable(); // Checks to see whether this node will ever move in the scene bool IsXRef(); // Returns true if object is an XRef or part of an XRef'd scene //---------- // Component //---------- - hsBool IsComponent(Object *obj=nil); // Object pointer is only necessary for internal use, - hsBool IsExternComponent(Object *obj=nil); + bool IsComponent(Object *obj=nil); // Object pointer is only necessary for internal use, + bool IsExternComponent(Object *obj=nil); plComponentBase *ConvertToComponent(); // Returns nil if node is not a component @@ -251,10 +251,10 @@ public: uint32_t NumAttachedComponents(bool all=false); plComponentBase *GetAttachedComponent(uint32_t i, bool all=false); - hsBool Contains(const Point3& worldPt); // is the world space point inside my (CONVEX) geometry or dummy box? - hsBool Contains(const Box3& bnd, const Matrix3& l2w); // is the box contained entirely inside my (CONVEX) geometry or dummy box? - float BoxVolume(const Box3& bnd, const Matrix3& l2w); - float RegionPriority(); // returns a dominance factor. If a point is in more than one environmental + bool Contains(const Point3& worldPt); // is the world space point inside my (CONVEX) geometry or dummy box? + bool Contains(const Box3& bnd, const Matrix3& l2w); // is the box contained entirely inside my (CONVEX) geometry or dummy box? + float BoxVolume(const Box3& bnd, const Matrix3& l2w); + float RegionPriority(); // returns a dominance factor. If a point is in more than one environmental // region, the region with highest priority wins. Interface *GetInterface() { return ::GetCOREInterface(); } @@ -303,13 +303,13 @@ protected: // Attempts to convert a RefMaker pointer to a component. Returns nil if it is not a component. plComponentBase *IRefMakerToComponent(ReferenceMaker *maker, bool all); - uint32_t IGetMajorRenderLevel(hsBool forBlend); - uint32_t IGetMinorRenderLevel(hsBool forBlend); + uint32_t IGetMajorRenderLevel(bool forBlend); + uint32_t IGetMinorRenderLevel(bool forBlend); - hsBool IRenderLevelSet(hsBool forBlend); - void ISetRenderLevel(const plRenderLevel& l, hsBool forBlend); - const plRenderLevel& IGetRenderLevel(hsBool forBlend); - plRenderLevel ICalcRenderLevel(hsBool forBlend); + bool IRenderLevelSet(bool forBlend); + void ISetRenderLevel(const plRenderLevel& l, bool forBlend); + const plRenderLevel& IGetRenderLevel(bool forBlend); + plRenderLevel ICalcRenderLevel(bool forBlend); }; #endif //plMaxNodeBase_inc diff --git a/Sources/Tools/MaxMain/plMaxNodeData.h b/Sources/Tools/MaxMain/plMaxNodeData.h index 8bef51d8..a9920892 100644 --- a/Sources/Tools/MaxMain/plMaxNodeData.h +++ b/Sources/Tools/MaxMain/plMaxNodeData.h @@ -154,8 +154,8 @@ public: } void DeInit() { delete fBitVector; fBitVector = nil; } - hsBool CanBF(DatBit bitChoice) { return fBitVector->IsBitSet(bitChoice); } - void SetBF(hsBool b, DatBit bitChoice) { fBitVector->SetBit(bitChoice, b); } + bool CanBF(DatBit bitChoice) { return fBitVector->IsBitSet(bitChoice); } + void SetBF(bool b, DatBit bitChoice) { fBitVector->SetBit(bitChoice, b); } }; @@ -219,133 +219,133 @@ public: plSceneObject * GetSceneObject() { return fpSO; } void SetSceneObject(plSceneObject *p) { fpSO = p; } - hsBool CanConvert() { return MaxDatBF.CanBF(MaxDatBF.kCanConvert); } - void SetCanConvert(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kCanConvert); } + bool CanConvert() { return MaxDatBF.CanBF(MaxDatBF.kCanConvert); } + void SetCanConvert(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kCanConvert); } - hsBool GetForceLocal() { return MaxDatBF.CanBF(MaxDatBF.kForceLocal); } - void SetForceLocal(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceLocal); } + bool GetForceLocal() { return MaxDatBF.CanBF(MaxDatBF.kForceLocal); } + void SetForceLocal(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceLocal); } void * GetMesh() { return fpMesh; } // void pointer for header simplicity void SetMesh(hsGMesh *p) { fpMesh = p; } - hsBool GetDrawable() {return MaxDatBF.CanBF(MaxDatBF.kDrawable); } - void SetDrawable(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kDrawable); } + bool GetDrawable() {return MaxDatBF.CanBF(MaxDatBF.kDrawable); } + void SetDrawable(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kDrawable); } - hsBool GetPhysical() {return MaxDatBF.CanBF(MaxDatBF.kPhysical); } - void SetPhysical(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kPhysical); } + bool GetPhysical() {return MaxDatBF.CanBF(MaxDatBF.kPhysical); } + void SetPhysical(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kPhysical); } - hsBool GetRunTimeLight() {return MaxDatBF.CanBF(MaxDatBF.kRunTimeLight); } - void SetRunTimeLight(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kRunTimeLight); } + bool GetRunTimeLight() {return MaxDatBF.CanBF(MaxDatBF.kRunTimeLight); } + void SetRunTimeLight(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kRunTimeLight); } - hsBool GetForceMatShade() {return MaxDatBF.CanBF(MaxDatBF.kForceMatShade); } - void SetForceMatShade(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceMatShade); } + bool GetForceMatShade() {return MaxDatBF.CanBF(MaxDatBF.kForceMatShade); } + void SetForceMatShade(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceMatShade); } - hsBool GetForceVisLOS() {return MaxDatBF.CanBF(MaxDatBF.kForceVisLOS); } - void SetForceVisLOS(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceVisLOS); } + bool GetForceVisLOS() {return MaxDatBF.CanBF(MaxDatBF.kForceVisLOS); } + void SetForceVisLOS(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceVisLOS); } - hsBool GetEnviron() {return MaxDatBF.CanBF(MaxDatBF.kEnviron); } - void SetEnviron(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kEnviron); } + bool GetEnviron() {return MaxDatBF.CanBF(MaxDatBF.kEnviron); } + void SetEnviron(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kEnviron); } - hsBool GetEnvironOnly() {return MaxDatBF.CanBF(MaxDatBF.kEnvironOnly); } - void SetEnvironOnly(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kEnvironOnly); } + bool GetEnvironOnly() {return MaxDatBF.CanBF(MaxDatBF.kEnvironOnly); } + void SetEnvironOnly(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kEnvironOnly); } - hsBool GetWaterDecEnv() { return MaxDatBF.CanBF(MaxDatBF.kWaterDecEnv); } - void SetWaterDecEnv(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kWaterDecEnv); } + bool GetWaterDecEnv() { return MaxDatBF.CanBF(MaxDatBF.kWaterDecEnv); } + void SetWaterDecEnv(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kWaterDecEnv); } - hsBool GetItinerant() {return MaxDatBF.CanBF(MaxDatBF.kItinerant); } - void SetItinerant(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kItinerant); } + bool GetItinerant() {return MaxDatBF.CanBF(MaxDatBF.kItinerant); } + void SetItinerant(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kItinerant); } - hsBool GetUnBounded() {return MaxDatBF.CanBF(MaxDatBF.kUnBounded); } - void SetUnBounded(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kUnBounded); } + bool GetUnBounded() {return MaxDatBF.CanBF(MaxDatBF.kUnBounded); } + void SetUnBounded(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kUnBounded); } - hsBool GetDisableNormal() {return MaxDatBF.CanBF(MaxDatBF.kDisableNormal); } - void SetDisableNormal(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kDisableNormal); } + bool GetDisableNormal() {return MaxDatBF.CanBF(MaxDatBF.kDisableNormal); } + void SetDisableNormal(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kDisableNormal); } - hsBool GetMovable() {return MaxDatBF.CanBF(MaxDatBF.kMovable); } - void SetMovable(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kMovable); } + bool GetMovable() {return MaxDatBF.CanBF(MaxDatBF.kMovable); } + void SetMovable(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kMovable); } - hsBool GetNoPreShade() {return MaxDatBF.CanBF(MaxDatBF.kNoPreShade); } - void SetNoPreShade(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoPreShade); } + bool GetNoPreShade() {return MaxDatBF.CanBF(MaxDatBF.kNoPreShade); } + void SetNoPreShade(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoPreShade); } - hsBool GetForcePreShade() {return MaxDatBF.CanBF(MaxDatBF.kForcePreShade); } - void SetForcePreShade(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kForcePreShade); } + bool GetForcePreShade() {return MaxDatBF.CanBF(MaxDatBF.kForcePreShade); } + void SetForcePreShade(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kForcePreShade); } - hsBool GetNoShadow() {return MaxDatBF.CanBF(MaxDatBF.kNoShadow); } - void SetNoShadow(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoShadow); } + bool GetNoShadow() {return MaxDatBF.CanBF(MaxDatBF.kNoShadow); } + void SetNoShadow(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoShadow); } - hsBool GetForceShadow() {return MaxDatBF.CanBF(MaxDatBF.kForceShadow); } - void SetForceShadow(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceShadow); } + bool GetForceShadow() {return MaxDatBF.CanBF(MaxDatBF.kForceShadow); } + void SetForceShadow(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceShadow); } - hsBool GetAlphaTestHigh() {return MaxDatBF.CanBF(MaxDatBF.kAlphaTestHigh); } - void SetAlphaTestHigh(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kAlphaTestHigh); } + bool GetAlphaTestHigh() {return MaxDatBF.CanBF(MaxDatBF.kAlphaTestHigh); } + void SetAlphaTestHigh(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kAlphaTestHigh); } - hsBool GetFilterInherit() {return MaxDatBF.CanBF(MaxDatBF.kFilterInherit); } - void SetFilterInherit(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kFilterInherit); } + bool GetFilterInherit() {return MaxDatBF.CanBF(MaxDatBF.kFilterInherit); } + void SetFilterInherit(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kFilterInherit); } - hsBool GetIsBarney() {return MaxDatBF.CanBF(MaxDatBF.kIsBarney); } - void SetIsBarney(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kIsBarney); } + bool GetIsBarney() {return MaxDatBF.CanBF(MaxDatBF.kIsBarney); } + void SetIsBarney(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kIsBarney); } - hsBool GetNoSpanSort() {return MaxDatBF.CanBF(MaxDatBF.kNoSpanSort); } - void SetNoSpanSort(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoSpanSort); } + bool GetNoSpanSort() {return MaxDatBF.CanBF(MaxDatBF.kNoSpanSort); } + void SetNoSpanSort(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoSpanSort); } - hsBool GetNoSpanReSort() {return MaxDatBF.CanBF(MaxDatBF.kNoSpanReSort); } - void SetNoSpanReSort(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoSpanReSort); } + bool GetNoSpanReSort() {return MaxDatBF.CanBF(MaxDatBF.kNoSpanReSort); } + void SetNoSpanReSort(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoSpanReSort); } - hsBool GetNoFaceSort() {return MaxDatBF.CanBF(MaxDatBF.kNoFaceSort); } - void SetNoFaceSort(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoFaceSort); } + bool GetNoFaceSort() {return MaxDatBF.CanBF(MaxDatBF.kNoFaceSort); } + void SetNoFaceSort(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoFaceSort); } - hsBool GetReverseSort() {return MaxDatBF.CanBF(MaxDatBF.kReverseSort); } - void SetReverseSort(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kReverseSort); } + bool GetReverseSort() {return MaxDatBF.CanBF(MaxDatBF.kReverseSort); } + void SetReverseSort(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kReverseSort); } - hsBool GetSortAsOpaque() {return MaxDatBF.CanBF(MaxDatBF.kSortAsOpaque); } - void SetSortAsOpaque(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kSortAsOpaque); } + bool GetSortAsOpaque() {return MaxDatBF.CanBF(MaxDatBF.kSortAsOpaque); } + void SetSortAsOpaque(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kSortAsOpaque); } - hsBool GetVS() {return MaxDatBF.CanBF(MaxDatBF.kVS); } - void SetVS(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kVS); } + bool GetVS() {return MaxDatBF.CanBF(MaxDatBF.kVS); } + void SetVS(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kVS); } - hsBool GetHasWaterHeight() { return MaxDatBF.CanBF(MaxDatBF.kWaterHeight); } - void SetHasWaterHeight(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kWaterHeight); } + bool GetHasWaterHeight() { return MaxDatBF.CanBF(MaxDatBF.kWaterHeight); } + void SetHasWaterHeight(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kWaterHeight); } float GetWaterHeight() { return fWaterHeight; } void SetWaterHeight(float f) { SetHasWaterHeight(true); fWaterHeight = f; } - hsBool GetSmoothAll() {return MaxDatBF.CanBF(MaxDatBF.kSmoothAll); } - void SetSmoothAll(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kSmoothAll); } + bool GetSmoothAll() {return MaxDatBF.CanBF(MaxDatBF.kSmoothAll); } + void SetSmoothAll(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kSmoothAll); } - hsBool GetForceSortable() {return MaxDatBF.CanBF(MaxDatBF.kForceSortable); } - void SetForceSortable(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceSortable); } + bool GetForceSortable() {return MaxDatBF.CanBF(MaxDatBF.kForceSortable); } + void SetForceSortable(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceSortable); } - hsBool GetConcave() {return MaxDatBF.CanBF(MaxDatBF.kConcave); } - void SetConcave(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kConcave); } + bool GetConcave() {return MaxDatBF.CanBF(MaxDatBF.kConcave); } + void SetConcave(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kConcave); } - hsBool GetCalcEdgeLens() {return MaxDatBF.CanBF(MaxDatBF.kCalcEdgeLens); } - void SetCalcEdgeLens(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kCalcEdgeLens); } + bool GetCalcEdgeLens() {return MaxDatBF.CanBF(MaxDatBF.kCalcEdgeLens); } + void SetCalcEdgeLens(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kCalcEdgeLens); } - hsBool GetNoDeferDraw() {return MaxDatBF.CanBF(MaxDatBF.kNoDeferDraw); } - void SetNoDeferDraw(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoDeferDraw); } + bool GetNoDeferDraw() {return MaxDatBF.CanBF(MaxDatBF.kNoDeferDraw); } + void SetNoDeferDraw(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kNoDeferDraw); } - hsBool GetBlendToFB() {return MaxDatBF.CanBF(MaxDatBF.kBlendToFB); } - void SetBlendToFB(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kBlendToFB); } + bool GetBlendToFB() {return MaxDatBF.CanBF(MaxDatBF.kBlendToFB); } + void SetBlendToFB(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kBlendToFB); } - hsBool GetForceMaterialCopy() {return MaxDatBF.CanBF(MaxDatBF.kForceMatCopy); } - void SetForceMaterialCopy(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceMatCopy); } + bool GetForceMaterialCopy() {return MaxDatBF.CanBF(MaxDatBF.kForceMatCopy); } + void SetForceMaterialCopy(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kForceMatCopy); } - hsBool GetInstanced() {return MaxDatBF.CanBF(MaxDatBF.kIsInstanced); } - void SetInstanced(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kIsInstanced); } + bool GetInstanced() {return MaxDatBF.CanBF(MaxDatBF.kIsInstanced); } + void SetInstanced(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kIsInstanced); } - hsBool GetParticleRelated() {return MaxDatBF.CanBF(MaxDatBF.kParticleRelated); } - void SetParticleRelated(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kParticleRelated); } + bool GetParticleRelated() {return MaxDatBF.CanBF(MaxDatBF.kParticleRelated); } + void SetParticleRelated(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kParticleRelated); } - hsBool GetDup2Sided() {return MaxDatBF.CanBF(MaxDatBF.kDup2Sided); } - void SetDup2Sided(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kDup2Sided); } + bool GetDup2Sided() {return MaxDatBF.CanBF(MaxDatBF.kDup2Sided); } + void SetDup2Sided(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kDup2Sided); } - hsBool GetRadiateNorms() {return MaxDatBF.CanBF(MaxDatBF.kRadiateNorms); } - void SetRadiateNorms(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kRadiateNorms); } + bool GetRadiateNorms() {return MaxDatBF.CanBF(MaxDatBF.kRadiateNorms); } + void SetRadiateNorms(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kRadiateNorms); } - hsBool GetGeoDice() {return MaxDatBF.CanBF(MaxDatBF.kGeoDice); } - void SetGeoDice(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kGeoDice); } + bool GetGeoDice() {return MaxDatBF.CanBF(MaxDatBF.kGeoDice); } + void SetGeoDice(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kGeoDice); } - hsBool GetIsGUI() {return MaxDatBF.CanBF(MaxDatBF.kIsGUI); } - void SetIsGUI(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kIsGUI); } + bool GetIsGUI() {return MaxDatBF.CanBF(MaxDatBF.kIsGUI); } + void SetIsGUI(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kIsGUI); } plSharedMesh* GetSwappableGeom() { return fSwapMesh;} void SetSwappableGeom(plSharedMesh *sm) { fSwapMesh = sm; } @@ -387,22 +387,22 @@ public: void AddBone(plMaxNodeBase* m) { fBones.Append(1, &m); } void ClearBones() { fBones.ZeroCount(); } - hsBool HasFade() { return MaxDatBF.CanBF(MaxDatBF.kHasFade); } + bool HasFade() { return MaxDatBF.CanBF(MaxDatBF.kHasFade); } void SetFade(const Box3& b) { MaxDatBF.SetBF((b.Min()[2] != 0)||(b.Max()[2] != 0), MaxDatBF.kHasFade); fFade = b; } Box3 GetFade() { return fFade; } - hsBool HasLoadMask() { return MaxDatBF.CanBF(MaxDatBF.kHasLoadMask); } + bool HasLoadMask() { return MaxDatBF.CanBF(MaxDatBF.kHasLoadMask); } plLoadMask GetLoadMask() { return HasLoadMask() ? fLoadMask : plLoadMask::kAlways; } void AddLoadMask(const plLoadMask& m) { if( !HasLoadMask() ) { fLoadMask = m; MaxDatBF.SetBF(true, MaxDatBF.kHasLoadMask); }else{ fLoadMask |= m; } } - hsBool HasNormalChan() { return fNormalChan > 0; } + bool HasNormalChan() { return fNormalChan > 0; } void SetNormalChan(int n) { fNormalChan = n; } int GetNormalChan() { return fNormalChan; } - hsBool BlendLevelSet() { return MaxDatBF.CanBF(MaxDatBF.kBLevelSet); } + bool BlendLevelSet() { return MaxDatBF.CanBF(MaxDatBF.kBLevelSet); } void SetBlendLevel(const plRenderLevel& l) { fBlendLevel = l; MaxDatBF.SetBF(true, MaxDatBF.kBLevelSet); } const plRenderLevel& GetBlendLevel() { return fBlendLevel; } - hsBool OpaqueLevelSet() { return MaxDatBF.CanBF(MaxDatBF.kOLevelSet); } + bool OpaqueLevelSet() { return MaxDatBF.CanBF(MaxDatBF.kOLevelSet); } void SetOpaqueLevel(const plRenderLevel& l) { fOpaqueLevel = l; MaxDatBF.SetBF(true, MaxDatBF.kOLevelSet); } const plRenderLevel& GetOpaqueLevel() { return fOpaqueLevel; } @@ -410,8 +410,8 @@ public: hsTArray *GetAlphaHackLayersCache( void ) { return fCachedAlphaHackLayerCounts; } void SetAlphaHackLayersCache( hsTArray *cache ) { fCachedAlphaHackLayerCounts = cache; } - hsBool GetOverrideHighLevelSDL() { return MaxDatBF.CanBF(MaxDatBF.kOverrideHighLevelSDL); } - void SetOverrideHighLevelSDL(hsBool b) { MaxDatBF.SetBF(b, MaxDatBF.kOverrideHighLevelSDL); } + bool GetOverrideHighLevelSDL() { return MaxDatBF.CanBF(MaxDatBF.kOverrideHighLevelSDL); } + void SetOverrideHighLevelSDL(bool b) { MaxDatBF.SetBF(b, MaxDatBF.kOverrideHighLevelSDL); } uint8_t GetAnimCompress() { return fAnimCompression; } void SetAnimCompress(uint8_t v) { fAnimCompression = v; } float GetKeyReduceThreshold() { return fKeyReduceThreshold; } diff --git a/Sources/Tools/MaxMain/plPhysXCooking.cpp b/Sources/Tools/MaxMain/plPhysXCooking.cpp index 4796d09e..94f0aa3d 100644 --- a/Sources/Tools/MaxMain/plPhysXCooking.cpp +++ b/Sources/Tools/MaxMain/plPhysXCooking.cpp @@ -57,12 +57,12 @@ bool plPhysXCooking::fSkipErrors = false; NxUtilLib* plPhysXCooking::fUtilLib =nil; //assumes that the Vectors are normalized -hsBool ThreePlaneIntersect(const NxVec3& norm0, const NxVec3& point0, +bool ThreePlaneIntersect(const NxVec3& norm0, const NxVec3& point0, const NxVec3& norm1, const NxVec3& point1, const NxVec3& norm2, const NxVec3& point2, NxVec3& loc) { //need to make sure these planes aren't parallel - hsBool suc=0; + bool suc=0; NxVec3 cross=norm1.cross( norm2); float denom=norm0.dot(cross); if(abs(denom)<0.0001) return 0;//basically paralell @@ -320,7 +320,7 @@ void ReadBoxFromHull(hsStream* stream, NxBoxShapeDesc& box) // box.localPose.setRowMajor44(&mat.fMap[0][0]); } */ -hsBool ProjectPointOnToPlane(const hsVector3& planeNormal,float& d0, +bool ProjectPointOnToPlane(const hsVector3& planeNormal,float& d0, const hsVector3 pointToProject, hsPoint3& res) { @@ -376,7 +376,7 @@ void plPhysXCooking::PCA(const NxVec3* points,int numPoints, NxMat33& out) } hsVectorStream* plPhysXCooking::IMakePolytope(const plMaxMeshExtractor::NeutralMesh& inMesh) { - hsBool success=0; + bool success=0; std::vector outCloud; hsPoint3 offset; int numPlanes=26; diff --git a/Sources/Tools/MaxMain/plPluginResManager.cpp b/Sources/Tools/MaxMain/plPluginResManager.cpp index e004920c..2db1630e 100644 --- a/Sources/Tools/MaxMain/plPluginResManager.cpp +++ b/Sources/Tools/MaxMain/plPluginResManager.cpp @@ -57,7 +57,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plCommonObjLib.h" #include "MaxComponent/plMiscComponents.h" -plKey plPluginResManager::NameToLoc(const char* age, const char* page, int32_t sequenceNumber, hsBool itinerant) +plKey plPluginResManager::NameToLoc(const char* age, const char* page, int32_t sequenceNumber, bool itinerant) { // Hack for now--always prefer paging out sceneNodes first fPageOutHint = plSceneNode::Index(); @@ -109,7 +109,7 @@ plKey plPluginResManager::NameToLoc(const char* age, const char* page, int32_t s // seqNumber, returns the page for that combo (either by preloading it or // by creating it). -plRegistryPageNode* plPluginResManager::INameToPage(const char* age, const char* page, int32_t sequenceNumber, hsBool itinerant) +plRegistryPageNode* plPluginResManager::INameToPage(const char* age, const char* page, int32_t sequenceNumber, bool itinerant) { // Find the location first, to see if it already exists plRegistryPageNode* pageNode = FindPage(age, page); @@ -154,7 +154,7 @@ class plCommonKeyDistributor : public plRegistryKeyIterator public: plCommonKeyDistributor(plPluginResManager* mgr) : fMgr(mgr) {} - virtual hsBool EatKey(const plKey& key) + virtual bool EatKey(const plKey& key) { uint32_t count = plCommonObjLib::GetNumLibs(); @@ -195,7 +195,7 @@ void plPluginResManager::IPreLoadTextures(plRegistryPageNode* pageNode, int32_t bool common = false; for (int i = 0; i < plAgeDescription::kNumCommonPages; i++) { - if (hsStrCaseEQ(plAgeDescription::GetCommonPage(i), pageNode->GetPageInfo().GetPage())) + if (strcmpi(plAgeDescription::GetCommonPage(i), pageNode->GetPageInfo().GetPage()) == 0) { common = true; break; @@ -216,7 +216,7 @@ void plPluginResManager::IPreLoadTextures(plRegistryPageNode* pageNode, int32_t class plEmptyIterator : public plRegistryKeyIterator { public: - virtual hsBool EatKey(const plKey& key) { return true; } + virtual bool EatKey(const plKey& key) { return true; } } empty; pageNode->IterateKeys(&empty); @@ -304,12 +304,12 @@ class plSeqNumberFinder : public plRegistryPageIterator { protected: int32_t& fSeqNum; - hsBool fWillBeReserved; + bool fWillBeReserved; public: - plSeqNumberFinder(int32_t& seqNum, hsBool willBeReserved) : fSeqNum(seqNum), fWillBeReserved(willBeReserved) {} + plSeqNumberFinder(int32_t& seqNum, bool willBeReserved) : fSeqNum(seqNum), fWillBeReserved(willBeReserved) {} - virtual hsBool EatPage(plRegistryPageNode* page) + virtual bool EatPage(plRegistryPageNode* page) { if (fSeqNum <= page->GetPageInfo().GetLocation().GetSequenceNumber() && fWillBeReserved == page->GetPageInfo().GetLocation().IsReserved()) @@ -319,15 +319,15 @@ public: }; -plLocation plPluginResManager::ICreateLocation(const char* age, const char* page, hsBool itinerant) +plLocation plPluginResManager::ICreateLocation(const char* age, const char* page, bool itinerant) { int32_t seqNum = VerifySeqNumber(0, age, page); return ICreateLocation(age, page, seqNum, itinerant); } -plLocation plPluginResManager::ICreateLocation(const char* age, const char* page, int32_t seqNum, hsBool itinerant) +plLocation plPluginResManager::ICreateLocation(const char* age, const char* page, int32_t seqNum, bool itinerant) { - hsBool willBeReserved = hsStrCaseEQ(age, "global"); + bool willBeReserved = strcmpi(age, "global") == 0; int32_t oldNum = seqNum; seqNum = VerifySeqNumber(seqNum, age, page); @@ -351,7 +351,7 @@ plLocation plPluginResManager::ICreateLocation(const char* age, const char* page // Flag common pages for (int i = 0; i < plAgeDescription::kNumCommonPages; i++) { - if (hsStrEQ(plAgeDescription::GetCommonPage(i), page)) + if (strcmp(plAgeDescription::GetCommonPage(i), page) == 0) { newLoc.SetFlags(plLocation::kBuiltIn); break; @@ -381,7 +381,7 @@ class plWritePageIterator : public plRegistryPageIterator { public: plWritePageIterator() {} - virtual hsBool EatPage(plRegistryPageNode *page) + virtual bool EatPage(plRegistryPageNode *page) { if (page->GetPageInfo().GetLocation() != plLocation::kGlobalFixedLoc) page->Write(); @@ -428,7 +428,7 @@ void plPluginResManager::AddLooseEnd(plKey key) // Verifies that the given sequence number belongs to the given string combo and ONLY that combo. Returns a new, unique sequenceNumber if not int32_t plPluginResManager::VerifySeqNumber(int32_t sequenceNumber, const char* age, const char* page) { - hsBool negated = false, willBeReserved = hsStrCaseEQ(age, "global"); + bool negated = false, willBeReserved = strcmpi(age, "global") == 0; if (sequenceNumber < 0) { sequenceNumber = -sequenceNumber; diff --git a/Sources/Tools/MaxMain/plPluginResManager.h b/Sources/Tools/MaxMain/plPluginResManager.h index 45733ea6..d295e872 100644 --- a/Sources/Tools/MaxMain/plPluginResManager.h +++ b/Sources/Tools/MaxMain/plPluginResManager.h @@ -60,7 +60,7 @@ public: //------------------------ // Given a page string combo, returns the key of the sceneNode for that page. If the page does not exist, it creates one. - plKey NameToLoc(const char* age, const char* page, int32_t sequenceNumber, hsBool itinerant = false); + plKey NameToLoc(const char* age, const char* page, int32_t sequenceNumber, bool itinerant = false); // Verifies that the given sequence number belongs to the given string combo and ONLY that combo. Returns a new, unique sequenceNumber if not int32_t VerifySeqNumber(int32_t sequenceNumber, const char* age, const char* page); @@ -96,10 +96,10 @@ public: void EndExport(); protected: - plLocation ICreateLocation(const char* age, const char* page, hsBool itinerant); - plLocation ICreateLocation(const char* age, const char* page, int32_t seqNum, hsBool itinerant); + plLocation ICreateLocation(const char* age, const char* page, bool itinerant); + plLocation ICreateLocation(const char* age, const char* page, int32_t seqNum, bool itinerant); - plRegistryPageNode* INameToPage(const char* age, const char* page, int32_t sequenceNumber, hsBool itinerant = false); + plRegistryPageNode* INameToPage(const char* age, const char* page, int32_t sequenceNumber, bool itinerant = false); void IPreLoadTextures(plRegistryPageNode* pageNode, int32_t origSeqNumber); diff --git a/Sources/Tools/MaxMain/plPythonMgr.cpp b/Sources/Tools/MaxMain/plPythonMgr.cpp index 73fbd78f..24d82ce6 100644 --- a/Sources/Tools/MaxMain/plPythonMgr.cpp +++ b/Sources/Tools/MaxMain/plPythonMgr.cpp @@ -444,7 +444,7 @@ bool plPythonMgr::IQueryPythonFile(char *fileName) void plPythonMgr::IAddBool(plAutoUIBlock *autoUI, PyObject *tuple, char *paramName, int id, int vid, std::vector* vstates) { - hsBool def = false; + int def = 0; IGetTupleInt(tuple, 3, def); autoUI->AddCheckBox(id, nil, paramName, vid, vstates, def); diff --git a/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h b/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h index d7161242..f5c62d6c 100644 --- a/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h +++ b/Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.h @@ -139,7 +139,7 @@ protected: plLayerTex* fTex; - virtual hsBool IHasAttenuation( void ) { return false; } + virtual bool IHasAttenuation( void ) { return false; } virtual void IBuildMeshes( BOOL isNew ) {} void BuildStaticMeshes(); diff --git a/Sources/Tools/MaxPlasmaLights/plRealTimeLights.h b/Sources/Tools/MaxPlasmaLights/plRealTimeLights.h index ad56eb24..45956e8c 100644 --- a/Sources/Tools/MaxPlasmaLights/plRealTimeLights.h +++ b/Sources/Tools/MaxPlasmaLights/plRealTimeLights.h @@ -88,7 +88,7 @@ class plRTOmniLight : public plRTLightBase protected: virtual void IBuildMeshes( BOOL isNew ); - virtual hsBool IHasAttenuation( void ) { return true; } + virtual bool IHasAttenuation( void ) { return true; } }; class plRTOmniLightDesc : public ClassDesc2 @@ -143,7 +143,7 @@ class plRTSpotLight : public plRTLightBase protected: virtual void IBuildMeshes( BOOL isNew ); - virtual hsBool IHasAttenuation( void ) { return true; } + virtual bool IHasAttenuation( void ) { return true; } }; class plRTSpotLightDesc : public ClassDesc2 diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp index 4ce8390d..9ce6812d 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plMAXCameraLayer.cpp @@ -78,7 +78,7 @@ public: HWND cbox; cbox = GetDlgItem(hWnd, IDC_CAM_LAYER_UV_SRC); SendMessage(cbox, CB_SETCURSEL, pb->GetInt(plMAXCameraLayer::kUVSource), 0); - hsBool reflect = (pb->GetInt(ParamID(plMAXCameraLayer::kExplicitCam)) == 0); + bool reflect = (pb->GetInt(ParamID(plMAXCameraLayer::kExplicitCam)) == 0); EnableWindow(GetDlgItem(hWnd, IDC_CAM_LAYER_UV_SRC), !reflect); } diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp index 92e1a412..df5405c7 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.cpp @@ -138,7 +138,7 @@ class plLayerTargetContainer : public hsKeyedObject public: hsTArray fLayers; - virtual hsBool MsgReceive( plMessage *msg ) + virtual bool MsgReceive( plMessage *msg ) { plGenRefMsg *ref = plGenRefMsg::ConvertNoRef( msg ); if( ref != nil ) @@ -380,7 +380,7 @@ void plPlasmaMAXLayer::RefreshBitmaps() // Returns the filename of the ith bitmap. Makes sure we have the latest // version from assetMan as well, if applicable. -hsBool plPlasmaMAXLayer::GetBitmapFileName( char *destFilename, int maxLength, int index /* = 0 */ ) +bool plPlasmaMAXLayer::GetBitmapFileName( char *destFilename, int maxLength, int index /* = 0 */ ) { #ifdef MAXASS_AVAILABLE jvUniqueId targetAssetId; diff --git a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h index f2f354ad..b2f6a565 100644 --- a/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h +++ b/Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h @@ -151,7 +151,7 @@ class plPlasmaMAXLayer : public Texmap // the latest version from AssetMan) void RefreshBitmaps(); - hsBool GetBitmapFileName( char *destFilename, int maxLength, int index = 0 ); + bool GetBitmapFileName( char *destFilename, int maxLength, int index = 0 ); // Virtual function called by plBMSampler to get various things while sampling the layer's image virtual bool GetSamplerInfo( plBMSamplerData *samplerData ) { return false; } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthConvert.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthConvert.cpp index f97ef900..ef3c2ef8 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthConvert.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthConvert.cpp @@ -239,7 +239,7 @@ void plAnimStealthNode::StuffToTimeConvert( plAnimTimeConvert &convert, float //// plAnimObjInterface Functions //////////////////////////////////////////// -hsBool plAnimStealthNode::GetKeyList( INode *restrictedNode, hsTArray &outKeys ) +bool plAnimStealthNode::GetKeyList( INode *restrictedNode, hsTArray &outKeys ) { if( !fPreppedForConvert ) { @@ -255,7 +255,7 @@ hsBool plAnimStealthNode::GetKeyList( INode *restrictedNode, hsTArray &o //// SetupProperties ///////////////////////////////////////////////////////// -hsBool plAnimStealthNode::SetupProperties( plMaxNode *node, plErrorMsg *pErrMsg ) +bool plAnimStealthNode::SetupProperties( plMaxNode *node, plErrorMsg *pErrMsg ) { fPreppedForConvert = true; plPassMtlBase *parent = GetParentMtl(); @@ -268,7 +268,7 @@ hsBool plAnimStealthNode::SetupProperties( plMaxNode *node, plErrorMsg *pErrMsg //// ConvertDeInit /////////////////////////////////////////////////////////// -hsBool plAnimStealthNode::ConvertDeInit( plMaxNode *node, plErrorMsg *pErrMsg ) +bool plAnimStealthNode::ConvertDeInit( plMaxNode *node, plErrorMsg *pErrMsg ) { fPreppedForConvert = false; if( fCachedSegMap != nil ) diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp index 9b34aca8..c49bbfaf 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp @@ -422,7 +422,7 @@ class plGetRefs : public DependentEnumProc } }; -hsBool plAnimStealthNode::IsParentUsedInScene( void ) +bool plAnimStealthNode::IsParentUsedInScene( void ) { if( GetParentMtl() == nil ) return false; @@ -849,12 +849,12 @@ protected: void ISetUserType(plMaxNode* node, const char* userType) { - if( hsStrEQ( userType, kUseParamBlockNodeString ) ) + if( strcmp( userType, kUseParamBlockNodeString ) == 0 ) { ISetNodeValue(nil); fPB->SetValue(fTypeID, 0, plAnimObjInterface::kUseParamBlockNode); } - else if( hsStrEQ(userType, kUseOwnerNodeString ) ) + else if( strcmp(userType, kUseOwnerNodeString ) == 0 ) { ISetNodeValue(nil); fPB->SetValue(fTypeID, 0, plAnimObjInterface::kUseOwnerNode); @@ -878,7 +878,7 @@ void plAnimStealthNode::PickTargetNode( IParamBlock2 *destPB, ParamID destPar pick.DoPick(); } -plString plAnimStealthNode::GetIfaceSegmentName( hsBool allowNil ) +plString plAnimStealthNode::GetIfaceSegmentName( bool allowNil ) { // When sending messages to material animations, they're already addressed for the right // layer, no need for a segment name diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.h b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.h index 55825cde..d6991acb 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.h @@ -85,7 +85,7 @@ protected: static ParamBlockDesc2 sAnimStealthPB; - hsBool fPreppedForConvert; + bool fPreppedForConvert; SegmentMap *fCachedSegMap; SegmentSpec *IGetSegmentSpec( void ) const; @@ -227,17 +227,17 @@ public: // plAnimObjInterface functions virtual void PickTargetNode( IParamBlock2 *destPB, ParamID destParamID, ParamID typeID ); - virtual hsBool IsNodeRestricted( void ) { return true; } - virtual plString GetIfaceSegmentName( hsBool allowNil ); - virtual hsBool GetKeyList( INode *restrictedNode, hsTArray &outKeys ); - virtual hsBool MightRequireSeparateMaterial( void ) { return true; } + virtual bool IsNodeRestricted( void ) { return true; } + virtual plString GetIfaceSegmentName( bool allowNil ); + virtual bool GetKeyList( INode *restrictedNode, hsTArray &outKeys ); + virtual bool MightRequireSeparateMaterial( void ) { return true; } // Convert time, called on the setupProps pass for each material applied to a node in the scene - virtual hsBool SetupProperties( plMaxNode *node, plErrorMsg *pErrMsg ); - virtual hsBool ConvertDeInit( plMaxNode *node, plErrorMsg *pErrMsg ); + virtual bool SetupProperties( plMaxNode *node, plErrorMsg *pErrMsg ); + virtual bool ConvertDeInit( plMaxNode *node, plErrorMsg *pErrMsg ); // Returns true if the parent material is applied to any node in the scene, false otherwise - hsBool IsParentUsedInScene( void ); + bool IsParentUsedInScene( void ); }; //// Accessor for Parent's ParamBlock //////////////////////////////////////// diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.h b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.h index 3c8e77b3..89f14dc0 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtl.h @@ -42,6 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef PL_CLOTHINGMTL_H #define PL_CLOTHINGMTL_H +#include "HeadSpin.h" #include "Max.h" #include "iparamb2.h" #include "../resource.h" @@ -139,7 +140,7 @@ public: Texmap *GetThumbnail() { return fBasicPB->GetTexmap(ParamID(kThumbnail)); } const char *GetDescription() { return fBasicPB->GetStr(ParamID(kDescription)); } const char *GetCustomText() { return fBasicPB->GetStr(ParamID(kCustomTextSpecs)); } - hsBool GetDefault() { return fBasicPB->GetInt(ParamID(kDefault)) != 0; } + bool GetDefault() { return fBasicPB->GetInt(ParamID(kDefault)) != 0; } Color GetDefaultTint1() { return fBasicPB->GetColor(plClothingMtl::kDefaultTint1); } Color GetDefaultTint2() { return fBasicPB->GetColor(plClothingMtl::kDefaultTint2); } const char *GetForcedAccessoryName() { return fBasicPB->GetStr(ParamID(kForcedAcc)); } diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h index 404fbe7a..10023c0f 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plClothingMtlPBDec.h @@ -314,7 +314,7 @@ public: if (selectedNewBitmap) { // Check if it's ok, and undo if not. - hsBool choiceOk = true; + bool choiceOk = true; pbbm = layer->GetPBBitmap(); if (pbbm != nil) diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.cpp index deb666c7..a0cefab5 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.cpp @@ -193,7 +193,7 @@ void plPassAnimDlgProc::SegmentListChanged( void ) ILoadNames( fCurrParamMap->GetParamBlock() ); } -void plPassAnimDlgProc::IUpdateSegmentSel( IParamMap2 *thisMap, hsBool clear ) +void plPassAnimDlgProc::IUpdateSegmentSel( IParamMap2 *thisMap, bool clear ) { plAnimStealthNode *newStealth; HWND hAnims = GetDlgItem( fhWnd, IDC_NAMES ); @@ -300,7 +300,7 @@ void plPassAnimDlgProc::ILoadNames(IParamBlock2 *pb ) fInitingNames = false; } -void plPassAnimDlgProc::IEnableGlobal(HWND hWnd, hsBool enable) +void plPassAnimDlgProc::IEnableGlobal(HWND hWnd, bool enable) { Edit_Enable(GetDlgItem(hWnd, IDC_MTL_GLOBAL_NAME), enable); ComboBox_Enable(GetDlgItem(hWnd, IDC_NAMES), !enable); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.h b/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.h index 3f478f3b..241c66ec 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassAnimDlgProc.h @@ -87,12 +87,12 @@ class plPassAnimDlgProc : public ParamMap2UserDlgProc, public plMtlChangeCallbac protected: // Set all the controls to their stored value void IInitControls(Animatable *anim, IParamBlock2 *pb); - void IEnableGlobal(HWND hWnd, hsBool enable); + void IEnableGlobal(HWND hWnd, bool enable); void ILoadNames( IParamBlock2 *pb ); void IExposeStealthNode( HelperObject *stealth, IParamMap2 *thisMap ); - void IUpdateSegmentSel( IParamMap2 *thisMap, hsBool clear = false ); + void IUpdateSegmentSel( IParamMap2 *thisMap, bool clear = false ); void IEnableEaseStopPoints( IParamMap2 *pm, bool enable ); }; diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp index 4e505df3..06c0b3c0 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp @@ -165,7 +165,7 @@ plAnimStealthNode *plPassMtlBase::GetStealth( int index ) return IGetStealth( index, false ); } -int plPassMtlBase::IGetNumStealths( hsBool update ) +int plPassMtlBase::IGetNumStealths( bool update ) { if( update ) IUpdateAnimNodes(); @@ -173,7 +173,7 @@ int plPassMtlBase::IGetNumStealths( hsBool update ) return fAnimPB->Count( (ParamID)kPBAnimStealthNodes ); } -plAnimStealthNode *plPassMtlBase::IGetStealth( int index, hsBool update ) +plAnimStealthNode *plPassMtlBase::IGetStealth( int index, bool update ) { if( update ) IUpdateAnimNodes(); @@ -645,9 +645,9 @@ plPassMtlBase *plPassMtlBase::ConvertToPassMtl( Mtl *mtl ) //// SetupProperties ///////////////////////////////////////////////////////// -hsBool plPassMtlBase::SetupProperties( plMaxNode *node, plErrorMsg *pErrMsg ) +bool plPassMtlBase::SetupProperties( plMaxNode *node, plErrorMsg *pErrMsg ) { - hsBool ret = true; + bool ret = true; // Call SetupProperties on all our animStealths if we have any int i, count = IGetNumStealths(); @@ -662,9 +662,9 @@ hsBool plPassMtlBase::SetupProperties( plMaxNode *node, plErrorMsg *pErrMsg ) //// ConvertDeInit /////////////////////////////////////////////////////////// -hsBool plPassMtlBase::ConvertDeInit( plMaxNode *node, plErrorMsg *pErrMsg ) +bool plPassMtlBase::ConvertDeInit( plMaxNode *node, plErrorMsg *pErrMsg ) { - hsBool ret = true; + bool ret = true; // Call ConvertDeInit on all our animStealths if we have any int i, count = IGetNumStealths(); diff --git a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h index 1bf3ab65..a0ec2bb6 100644 --- a/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h +++ b/Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.h @@ -74,19 +74,19 @@ protected: Interval fIValid; - hsBool fLoading; + bool fLoading; hsTArray fNotetracks; - hsBool fStealthsChanged; + bool fStealthsChanged; hsTArray fChangeCallbacks; void IUpdateAnimNodes( void ); plAnimStealthNode *IFindStealth( const plString &animName ); plAnimStealthNode *IVerifyStealthPresent( const plString &animName ); - int IGetNumStealths( hsBool update = true ); - plAnimStealthNode *IGetStealth( int index, hsBool update = true ); + int IGetNumStealths( bool update = true ); + plAnimStealthNode *IGetStealth( int index, bool update = true ); void ICloneBase( plPassMtlBase *target, RemapDir &remap ); virtual void ICloneRefs( plPassMtlBase *target, RemapDir &remap ) = 0; @@ -111,7 +111,7 @@ public: //kRefAnim, kRefNotetracks = 4 // MUST BE THE LAST REF ID SPECIFIED }; - void SetLoadingFlag( hsBool f ) { fLoading = f; } + void SetLoadingFlag( bool f ) { fLoading = f; } void PostLoadAnimPBFixup( void ); void RegisterChangeCallback( plMtlChangeCallback *callback ); @@ -134,8 +134,8 @@ public: RefResult NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message ); // Convert time, called on the setupProps pass for each material applied to a node in the scene - virtual hsBool SetupProperties( plMaxNode *node, plErrorMsg *pErrMsg ); - virtual hsBool ConvertDeInit( plMaxNode *node, plErrorMsg *pErrMsg ); + virtual bool SetupProperties( plMaxNode *node, plErrorMsg *pErrMsg ); + virtual bool ConvertDeInit( plMaxNode *node, plErrorMsg *pErrMsg ); int GetNumStealths( void ); plAnimStealthNode *GetStealth( int index ); diff --git a/Sources/Tools/MaxSceneViewer/SceneSync.cpp b/Sources/Tools/MaxSceneViewer/SceneSync.cpp index a6894ac6..9a82e2d5 100644 --- a/Sources/Tools/MaxSceneViewer/SceneSync.cpp +++ b/Sources/Tools/MaxSceneViewer/SceneSync.cpp @@ -564,7 +564,7 @@ bool SceneSync::Update() plConvertSettings settings; settings.fSceneViewer = true; plConvert::Instance().Init(GetCOREInterface(), &msg, &settings); - hsBool ret = plConvert::Instance().Convert(nodes); + bool ret = plConvert::Instance().Convert(nodes); // REMOVE/FIX (COLIN) hsMaterialConverter::Instance().FreeMaterialCache(nil); diff --git a/Sources/Tools/MaxSceneViewer/plKeyRefSort.h b/Sources/Tools/MaxSceneViewer/plKeyRefSort.h index a5a068bb..9c4cd1af 100644 --- a/Sources/Tools/MaxSceneViewer/plKeyRefSort.h +++ b/Sources/Tools/MaxSceneViewer/plKeyRefSort.h @@ -57,7 +57,7 @@ protected: int fNumRefs; KeyRefs() : fKey(nil), fNumRefs(-1) {} KeyRefs(plKey key, int numRefs) : fKey(key), fNumRefs(numRefs) {} - hsBool operator== (const plKey key) + bool operator== (const plKey key) { return (fKey == key); } diff --git a/Sources/Tools/MaxSceneViewer/plPluginClient.cpp b/Sources/Tools/MaxSceneViewer/plPluginClient.cpp index bb948cb7..05990068 100644 --- a/Sources/Tools/MaxSceneViewer/plPluginClient.cpp +++ b/Sources/Tools/MaxSceneViewer/plPluginClient.cpp @@ -214,7 +214,7 @@ void plUpdatableClient::IGetUpdate() } } -hsBool plUpdatableClient::Init() +bool plUpdatableClient::Init() { if (plClient::Init()) { @@ -227,7 +227,7 @@ hsBool plUpdatableClient::Init() return false; } -hsBool plUpdatableClient::MainLoop() +bool plUpdatableClient::MainLoop() { IGetUpdate(); @@ -242,7 +242,7 @@ hsBool plUpdatableClient::MainLoop() #include -hsBool plUpdatableClient::Shutdown() +bool plUpdatableClient::Shutdown() { if (fDirty && fDataPath) { diff --git a/Sources/Tools/MaxSceneViewer/plPluginClient.h b/Sources/Tools/MaxSceneViewer/plPluginClient.h index e2897783..93d651f1 100644 --- a/Sources/Tools/MaxSceneViewer/plPluginClient.h +++ b/Sources/Tools/MaxSceneViewer/plPluginClient.h @@ -69,9 +69,9 @@ public: virtual hsG3DDeviceModeRecord ILoadDevMode(const char* devModeFile); - virtual hsBool Init(); - virtual hsBool MainLoop(); - virtual hsBool Shutdown(); + virtual bool Init(); + virtual bool MainLoop(); + virtual bool Shutdown(); void InitUpdate(const char *semaphoreName, const char *pipeName, const char *dir); diff --git a/Sources/Tools/plFontConverter/hsCodecManagerStub.cpp b/Sources/Tools/plFontConverter/hsCodecManagerStub.cpp index e515eec9..9362d260 100644 --- a/Sources/Tools/plFontConverter/hsCodecManagerStub.cpp +++ b/Sources/Tools/plFontConverter/hsCodecManagerStub.cpp @@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com hsCodecManager& hsCodecManager::Instance() { static hsCodecManager the_instance; - static hsBool initialized = false; + static bool initialized = false; if (!initialized) { @@ -71,12 +71,12 @@ plMipmap *hsCodecManager::CreateUncompressedMipmap(plMipmap *compressed, uint8_t } -hsBool hsCodecManager::ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ) +bool hsCodecManager::ColorizeCompMipmap( plMipmap *bMap, const uint8_t *colorMask ) { return false; } -hsBool hsCodecManager::Register(hsCodec *codec, uint32_t compressionFormat, hsScalar priority) +bool hsCodecManager::Register(hsCodec *codec, uint32_t compressionFormat, hsScalar priority) { return true; } diff --git a/Sources/Tools/plFontConverter/plFontFreeType.cpp b/Sources/Tools/plFontConverter/plFontFreeType.cpp index c6f7cb40..55663118 100644 --- a/Sources/Tools/plFontConverter/plFontFreeType.cpp +++ b/Sources/Tools/plFontConverter/plFontFreeType.cpp @@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com -hsBool plFontFreeType::ImportFreeType( const char *fontPath, Options *options, plBDFConvertCallback *callback ) +bool plFontFreeType::ImportFreeType( const char *fontPath, Options *options, plBDFConvertCallback *callback ) { FT_Library ftLibrary; @@ -106,7 +106,7 @@ hsBool plFontFreeType::ImportFreeType( const char *fontPath, Options *options, FT_Vector ftAdvances[ kMaxGlyphs ]; FT_BBox ftGlyphBox, ftFontBox; FT_UInt previous = 0; - hsBool useKerning = false; + bool useKerning = false; if( options->fUseKerning ) diff --git a/Sources/Tools/plFontConverter/plFontFreeType.h b/Sources/Tools/plFontConverter/plFontFreeType.h index 1ca5af25..06a4c4ff 100644 --- a/Sources/Tools/plFontConverter/plFontFreeType.h +++ b/Sources/Tools/plFontConverter/plFontFreeType.h @@ -56,7 +56,7 @@ class plFontFreeType : public plFont struct Options { uint8_t fSize; - hsBool fUseKerning; + bool fUseKerning; uint8_t fBitDepth; uint32_t fScreenRes; uint32_t fMaxCharLimit; @@ -64,5 +64,5 @@ class plFontFreeType : public plFont Options() { fSize = 12; fUseKerning = false; fBitDepth = 1; fScreenRes = 96; fMaxCharLimit = 255; } }; - hsBool ImportFreeType( const char *fontPath, Options *options, plBDFConvertCallback *callback ); + bool ImportFreeType( const char *fontPath, Options *options, plBDFConvertCallback *callback ); }; \ No newline at end of file diff --git a/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp b/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp index 1db259e5..b71a514a 100644 --- a/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp +++ b/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp @@ -274,7 +274,7 @@ void RegisterFileTypes( HWND mainWnd ) // Check our file extensions char prpAssoc[ 512 ]; - hsBool needToRegister = true; + bool needToRegister = true; if( plWinRegistryTools::GetCurrentFileExtensionAssociation( ".prp", prpAssoc, sizeof( prpAssoc ) ) ) { if( strcmp( prpAssoc, "PlasmaPackFile" ) == 0 ) diff --git a/Sources/Tools/plResBrowser/plResTreeView.cpp b/Sources/Tools/plResBrowser/plResTreeView.cpp index 0c9ef72d..0bf6322b 100644 --- a/Sources/Tools/plResBrowser/plResTreeView.cpp +++ b/Sources/Tools/plResBrowser/plResTreeView.cpp @@ -137,7 +137,7 @@ class plResDlgLoader : public plRegistryPageIterator, public plRegistryKeyIterat ((plResManager *)hsgResMgr::ResMgr())->IterateAllPages( this ); } - virtual hsBool EatPage( plRegistryPageNode *page ) + virtual bool EatPage( plRegistryPageNode *page ) { char str[ 512 ]; @@ -153,7 +153,7 @@ class plResDlgLoader : public plRegistryPageIterator, public plRegistryKeyIterat return true; } - virtual hsBool EatKey( const plKey& key ) + virtual bool EatKey( const plKey& key ) { if( fCurrType != key->GetUoid().GetClassType() ) { @@ -366,7 +366,7 @@ void plResTreeView::VerifyCurrentPage( HWND treeCtrl ) void plResTreeView::UpdateInfoDlg( HWND treeCtrl ) { - hsBool showAsHex = (hsBool)IsDlgButtonChecked( fInfoDlg, IDC_SHOWASHEX ); + bool showAsHex = (bool)IsDlgButtonChecked( fInfoDlg, IDC_SHOWASHEX ); SetDlgItemText( fInfoDlg, IDC_NAME, "" ); SetDlgItemText( fInfoDlg, IDC_CLASS, "" ); diff --git a/Sources/Tools/plResBrowser/plWinRegistryTools.cpp b/Sources/Tools/plResBrowser/plWinRegistryTools.cpp index 2b2ad5b4..ef51b9c8 100644 --- a/Sources/Tools/plResBrowser/plWinRegistryTools.cpp +++ b/Sources/Tools/plResBrowser/plWinRegistryTools.cpp @@ -61,7 +61,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // Sets the given registry key to the given string value. If valueName = nil, // sets the (default) value -static hsBool ISetRegKey( const char *keyName, const char *value, const char *valueName = nil ) +static bool ISetRegKey( const char *keyName, const char *value, const char *valueName = nil ) { HKEY regKey; DWORD result; @@ -107,7 +107,7 @@ static hsBool ISetRegKey( const char *keyName, const char *value, const char * // |--- command (value = command line) // -hsBool plWinRegistryTools::AssociateFileType( const char *fileTypeID, const char *fileTypeName, const char *appPath, int iconIndex ) +bool plWinRegistryTools::AssociateFileType( const char *fileTypeID, const char *fileTypeName, const char *appPath, int iconIndex ) { char keyName[ 512 ], keyValue[ 512 ]; @@ -147,7 +147,7 @@ hsBool plWinRegistryTools::AssociateFileType( const char *fileTypeID, const cha // where fileExtension includes the leading . and fileTypeID is the same // typeID registered with the above function -hsBool plWinRegistryTools::AssociateFileExtension( const char *fileExtension, const char *fileTypeID ) +bool plWinRegistryTools::AssociateFileExtension( const char *fileExtension, const char *fileTypeID ) { return ISetRegKey( fileExtension, fileTypeID ); } @@ -156,7 +156,7 @@ hsBool plWinRegistryTools::AssociateFileExtension( const char *fileExtension, c // Obtains the current fileTypeID associated with the given file extension, // or a null string if it isn't yet associated. -hsBool plWinRegistryTools::GetCurrentFileExtensionAssociation( const char *extension, char *buffer, int bufferLen ) +bool plWinRegistryTools::GetCurrentFileExtensionAssociation( const char *extension, char *buffer, int bufferLen ) { long dataLen; diff --git a/Sources/Tools/plResBrowser/plWinRegistryTools.h b/Sources/Tools/plResBrowser/plWinRegistryTools.h index 62f945a6..faa77949 100644 --- a/Sources/Tools/plResBrowser/plWinRegistryTools.h +++ b/Sources/Tools/plResBrowser/plWinRegistryTools.h @@ -56,13 +56,13 @@ class plWinRegistryTools public: // Associates a given file type in the Win32 registry with the given application. Also assigns a default icon if iconIndex != -1 - static hsBool AssociateFileType( const char *fileTypeID, const char *fileTypeName, const char *appPath, int iconIndex = -1 ); + static bool AssociateFileType( const char *fileTypeID, const char *fileTypeName, const char *appPath, int iconIndex = -1 ); // Assigns a given file extension to a previously registered Win32 file type (using the above function) - static hsBool AssociateFileExtension( const char *fileExtension, const char *fileTypeID ); + static bool AssociateFileExtension( const char *fileExtension, const char *fileTypeID ); // Obtains the current fileTypeID associated with the given file extension, or a null string if it isn't yet associated - static hsBool GetCurrentFileExtensionAssociation( const char *extension, char *buffer, int bufferLen ); + static bool GetCurrentFileExtensionAssociation( const char *extension, char *buffer, int bufferLen ); }; #endif //_plWinRegistryTools_h \ No newline at end of file