From d40e7a5ca5aca658c4aaeaddd4911d51e4f2f1f8 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 31 Dec 2012 17:33:52 -0800 Subject: [PATCH] Move file stuff back to plFile for gcc. --- Sources/Plasma/Apps/plClient/plClient.cpp | 4 +- Sources/Plasma/Apps/plClient/winmain.cpp | 2 +- Sources/Plasma/Apps/plFileEncrypt/main.cpp | 2 +- Sources/Plasma/Apps/plFileSecure/main.cpp | 4 +- Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp | 4 +- Sources/Plasma/Apps/plPageOptimizer/main.cpp | 12 +- .../Apps/plPageOptimizer/pfAllCreatables.cpp | 26 +- .../Apps/plPageOptimizer/plPageOptimizer.cpp | 44 +- .../Apps/plPageOptimizer/plPageOptimizer.h | 6 +- Sources/Plasma/Apps/plPythonPack/main.cpp | 2 +- Sources/Plasma/Apps/plUruLauncher/Pch.h | 2 +- Sources/Plasma/CoreLib/CMakeLists.txt | 7 - Sources/Plasma/CoreLib/hsFiles_Mac.cpp | 409 ------------------ Sources/Plasma/CoreLib/hsFiles_PS2.cpp | 84 ---- .../pfConsole/pfConsoleCommands.cpp | 2 +- .../pfConsole/pfConsoleCommandsNet.cpp | 2 +- .../FeatureLib/pfCrashHandler/plCrashSrv.cpp | 2 +- .../pfLocalizationDataMgr.cpp | 2 +- .../FeatureLib/pfPython/plPythonPack.cpp | 2 +- .../pfSecurePreloader/pfSecurePreloader.cpp | 2 +- .../plAgeDescription/plAgeDescription.cpp | 2 +- .../plAgeDescription/plAgeManifest.cpp | 4 +- .../PubUtilLib/plAgeLoader/plResPatcher.cpp | 2 +- .../plAudio/plWin32StreamingSound.cpp | 2 +- .../plAudioCore/plAudioFileReader.cpp | 4 +- .../PubUtilLib/plAudioCore/plSoundBuffer.cpp | 4 +- .../Plasma/PubUtilLib/plFile/CMakeLists.txt | 12 + .../plFile}/hsFiles.cpp | 0 .../{CoreLib => PubUtilLib/plFile}/hsFiles.h | 0 .../plFile}/hsFiles_Unix.cpp | 0 .../plFile}/hsFiles_Win.cpp | 0 .../plFile}/plFileUtils.cpp | 2 +- .../plFile}/plFileUtils.h | 0 .../PubUtilLib/plGImage/plFontCache.cpp | 2 +- .../PubUtilLib/plGImage/plWinFontCache.cpp | 2 +- .../plNetClient/plNetLinkingMgr.cpp | 2 +- .../plNetClientRecorder.cpp | 2 +- .../PubUtilLib/plResMgr/plLocalization.cpp | 2 +- .../PubUtilLib/plResMgr/plRegistryNode.cpp | 2 +- .../PubUtilLib/plResMgr/plResManager.cpp | 4 +- .../Plasma/PubUtilLib/plSDL/plSDLParser.cpp | 2 +- .../PubUtilLib/plStatGather/plAutoProfile.cpp | 2 +- .../plStatGather/plProfileManagerFull.cpp | 2 +- .../PubUtilLib/plStatusLog/plStatusLog.cpp | 4 +- Sources/Tools/MaxComponent/Pch.h | 4 +- .../Tools/MaxComponent/plAudioComponents.cpp | 2 +- .../Tools/MaxComponent/plGUIComponents.cpp | 2 +- .../Tools/MaxComponent/plMiscComponents.cpp | 4 +- .../Tools/MaxComponent/plResponderLink.cpp | 2 +- .../Tools/MaxConvert/hsMaterialConverter.cpp | 2 +- Sources/Tools/MaxExport/Pch.h | 2 +- Sources/Tools/MaxExport/SimpleExport.cpp | 2 +- Sources/Tools/MaxExport/plExportDlg.cpp | 2 +- Sources/Tools/MaxMain/Pch.h | 4 +- Sources/Tools/MaxMain/main.cpp | 2 +- Sources/Tools/MaxMain/plAgeDescInterface.cpp | 2 +- Sources/Tools/MaxMain/plPythonMgr.cpp | 2 +- .../plResBrowser/plResBrowserWndProc.cpp | 2 +- 58 files changed, 112 insertions(+), 600 deletions(-) delete mode 100644 Sources/Plasma/CoreLib/hsFiles_Mac.cpp delete mode 100644 Sources/Plasma/CoreLib/hsFiles_PS2.cpp rename Sources/Plasma/{CoreLib => PubUtilLib/plFile}/hsFiles.cpp (100%) rename Sources/Plasma/{CoreLib => PubUtilLib/plFile}/hsFiles.h (100%) rename Sources/Plasma/{CoreLib => PubUtilLib/plFile}/hsFiles_Unix.cpp (100%) rename Sources/Plasma/{CoreLib => PubUtilLib/plFile}/hsFiles_Win.cpp (100%) rename Sources/Plasma/{CoreLib => PubUtilLib/plFile}/plFileUtils.cpp (99%) rename Sources/Plasma/{CoreLib => PubUtilLib/plFile}/plFileUtils.h (100%) diff --git a/Sources/Plasma/Apps/plClient/plClient.cpp b/Sources/Plasma/Apps/plClient/plClient.cpp index cae37365..05c2b428 100644 --- a/Sources/Plasma/Apps/plClient/plClient.cpp +++ b/Sources/Plasma/Apps/plClient/plClient.cpp @@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsTimer.h" #include "plPipeline/hsG3DDeviceSelector.h" #include "plFile/plEncryptedStream.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "plInputCore/plInputManager.h" #include "plInputCore/plInputInterfaceMgr.h" #include "plInputCore/plInputDevice.h" @@ -84,7 +84,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pfConsole/pfConsoleDirSrc.h" #include "plScene/plPageTreeMgr.h" #include "plScene/plVisMgr.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "pfKI/pfKI.h" diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index 4d086bfe..99eaa05a 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -75,7 +75,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plStatusLog/plStatusLog.h" #include "pnProduct/pnProduct.h" #include "plNetGameLib/plNetGameLib.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "plPhysX/plSimulationMgr.h" diff --git a/Sources/Plasma/Apps/plFileEncrypt/main.cpp b/Sources/Plasma/Apps/plFileEncrypt/main.cpp index b1002da2..2a52b1b1 100644 --- a/Sources/Plasma/Apps/plFileEncrypt/main.cpp +++ b/Sources/Plasma/Apps/plFileEncrypt/main.cpp @@ -39,7 +39,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "plFile/plEncryptedStream.h" #include "pnProduct/pnProduct.h" diff --git a/Sources/Plasma/Apps/plFileSecure/main.cpp b/Sources/Plasma/Apps/plFileSecure/main.cpp index 5b8bd6be..b6b0b833 100644 --- a/Sources/Plasma/Apps/plFileSecure/main.cpp +++ b/Sources/Plasma/Apps/plFileSecure/main.cpp @@ -39,8 +39,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "hsFiles.h" -#include "plFileUtils.h" +#include "plFile/hsFiles.h" +#include "plFile/plFileUtils.h" #include "plFile/plSecureStream.h" #include "pnProduct/pnProduct.h" diff --git a/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp b/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp index 1337d955..0ec17dc2 100644 --- a/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp +++ b/Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp @@ -41,8 +41,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "hsTimer.h" -#include "hsFiles.h" -#include "plFileUtils.h" +#include "plFile/hsFiles.h" +#include "plFile/plFileUtils.h" #include "plResMgr/plResManager.h" #include "plResMgr/plResMgrSettings.h" diff --git a/Sources/Plasma/Apps/plPageOptimizer/main.cpp b/Sources/Plasma/Apps/plPageOptimizer/main.cpp index e3967ce4..b120a02c 100644 --- a/Sources/Plasma/Apps/plPageOptimizer/main.cpp +++ b/Sources/Plasma/Apps/plPageOptimizer/main.cpp @@ -39,14 +39,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "../plResMgr/plResManager.h" -#include "../pfPython/plPythonFileMod.h" -#include "../plGImage/plFontCache.h" -#include "../plPhysX/plSimulationMgr.h" -#include "../plAvatar/plAvatarMgr.h" +#include "plResMgr/plResManager.h" +#include "pfPython/plPythonFileMod.h" +#include "plGImage/plFontCache.h" +#include "plPhysX/plSimulationMgr.h" +#include "plAvatar/plAvatarMgr.h" #include "plPageOptimizer.h" -#include "../plFile/plFileUtils.h" +#include "plFile/plFileUtils.h" int main(int argc, char* argv[]) { diff --git a/Sources/Plasma/Apps/plPageOptimizer/pfAllCreatables.cpp b/Sources/Plasma/Apps/plPageOptimizer/pfAllCreatables.cpp index e3e744ea..f382a95c 100644 --- a/Sources/Plasma/Apps/plPageOptimizer/pfAllCreatables.cpp +++ b/Sources/Plasma/Apps/plPageOptimizer/pfAllCreatables.cpp @@ -39,16 +39,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "../pfCharacter/pfCharacterCreatable.h" -#include "../pfCamera/pfCameraCreatable.h" -#include "../pfAnimation/pfAnimationCreatable.h" -#include "../pfConditional/plConditionalObjectCreatable.h" -//#include "../pfConsole/pfConsoleCreatable.h" -#include "../pfSurface/pfSurfaceCreatable.h" -#include "../pfMessage/pfMessageCreatable.h" -#include "../pfAudio/pfAudioCreatable.h" -#include "../pfPython/pfPythonCreatable.h" -#include "../pfGameGUIMgr/pfGameGUIMgrCreatable.h" -#include "../pfCCR/plCCRCreatable.h" -#include "../pfJournalBook/pfJournalBookCreatable.h" -#include "../pfGameMgr/pfGameMgrCreatables.h" +#include "pfCharacter/pfCharacterCreatable.h" +#include "pfCamera/pfCameraCreatable.h" +#include "pfAnimation/pfAnimationCreatable.h" +#include "pfConditional/plConditionalObjectCreatable.h" +//#include "pfConsole/pfConsoleCreatable.h" +#include "pfSurface/pfSurfaceCreatable.h" +#include "pfMessage/pfMessageCreatable.h" +#include "pfAudio/pfAudioCreatable.h" +#include "pfPython/pfPythonCreatable.h" +#include "pfGameGUIMgr/pfGameGUIMgrCreatable.h" +#include "pfCCR/plCCRCreatable.h" +#include "pfJournalBook/pfJournalBookCreatable.h" +#include "pfGameMgr/pfGameMgrCreatables.h" diff --git a/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.cpp b/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.cpp index 39dd3f70..908107d3 100644 --- a/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.cpp +++ b/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.cpp @@ -41,16 +41,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plPageOptimizer.h" -#include "../pnKeyedObject/plUoid.h" -#include "../plResMgr/plResManager.h" -#include "../plResMgr/plRegistryHelpers.h" -#include "../plResMgr/plKeyFinder.h" -#include "../plResMgr/plRegistryNode.h" +#include "pnKeyedObject/plUoid.h" +#include "plResMgr/plResManager.h" +#include "plResMgr/plRegistryHelpers.h" +#include "plResMgr/plKeyFinder.h" +#include "plResMgr/plRegistryNode.h" -#include "../pnFactory/plFactory.h" -#include "../pnKeyedObject/plKeyImp.h" +#include "pnFactory/plFactory.h" +#include "pnKeyedObject/plKeyImp.h" -#include "../plFile/plFileUtils.h" +#include "plFile/plFileUtils.h" #include "hsStream.h" plPageOptimizer* plPageOptimizer::fInstance = nil; @@ -163,7 +163,7 @@ void plPageOptimizer::Optimize() void plPageOptimizer::KeyedObjectProc(plKey key) { - const char* keyName = key->GetName(); + plString keyName = key->GetName(); const char* className = plFactory::GetNameOfClass(key->GetUoid().GetClassType()); // For now, ignore any key that isn't in the location we're looking at. That means stuff like textures. @@ -176,7 +176,7 @@ void plPageOptimizer::KeyedObjectProc(plKey key) KeySet::iterator it = loadedKeys.lower_bound(key); if (it != loadedKeys.end() && *it == key) { - printf("Keyed object %s(%s) loaded more than once\n", keyName, className); + printf("Keyed object %s(%s) loaded more than once\n", keyName.c_str(), className); } else { @@ -247,35 +247,35 @@ void plPageOptimizer::IRewritePage() uint32_t oldKeyStart = pageInfo.GetIndexStart(); oldPage.SetPosition(oldKeyStart); - uint32_t numTypes = oldPage.ReadSwap32(); - newPage.WriteSwap32(numTypes); + uint32_t numTypes = oldPage.ReadLE32(); + newPage.WriteLE32(numTypes); for (uint32_t i = 0; i < numTypes; i++) { - uint16_t classType = oldPage.ReadSwap16(); - uint32_t len = oldPage.ReadSwap32(); + uint16_t classType = oldPage.ReadLE16(); + uint32_t len = oldPage.ReadLE32(); uint8_t flags = oldPage.ReadByte(); - uint32_t numKeys = oldPage.ReadSwap32(); + uint32_t numKeys = oldPage.ReadLE32(); - newPage.WriteSwap16(classType); - newPage.WriteSwap32(len); + newPage.WriteLE16(classType); + newPage.WriteLE32(len); newPage.WriteByte(flags); - newPage.WriteSwap32(numKeys); + newPage.WriteLE32(numKeys); for (uint32_t j = 0; j < numKeys; j++) { plUoid uoid; uoid.Read(&oldPage); - uint32_t startPos = oldPage.ReadSwap32(); - uint32_t dataLen = oldPage.ReadSwap32(); + uint32_t startPos = oldPage.ReadLE32(); + uint32_t dataLen = oldPage.ReadLE32(); // Get the new start pos plKeyImp* key = (plKeyImp*)fResMgr->FindKey(uoid); startPos = key->GetStartPos(); uoid.Write(&newPage); - newPage.WriteSwap32(startPos); - newPage.WriteSwap32(dataLen); + newPage.WriteLE32(startPos); + newPage.WriteLE32(dataLen); } } diff --git a/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.h b/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.h index 69bf573c..56877c38 100644 --- a/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.h +++ b/Sources/Plasma/Apps/plPageOptimizer/plPageOptimizer.h @@ -42,8 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plPageOptimizer_h_inc #define plPageOptimizer_h_inc -#include "../pnKeyedObject/plKey.h" -#include "../pnKeyedObject/plUoid.h" +#include "pnKeyedObject/plKey.h" +#include "pnKeyedObject/plUoid.h" #include #include @@ -83,4 +83,4 @@ public: void Optimize(); }; -#endif // plPageOptimizer_h_inc \ No newline at end of file +#endif // plPageOptimizer_h_inc diff --git a/Sources/Plasma/Apps/plPythonPack/main.cpp b/Sources/Plasma/Apps/plPythonPack/main.cpp index 7179049c..e2df0ca2 100644 --- a/Sources/Plasma/Apps/plPythonPack/main.cpp +++ b/Sources/Plasma/Apps/plPythonPack/main.cpp @@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "PythonInterface.h" #include "hsStream.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include #include diff --git a/Sources/Plasma/Apps/plUruLauncher/Pch.h b/Sources/Plasma/Apps/plUruLauncher/Pch.h index 2849277a..d0d5a373 100644 --- a/Sources/Plasma/Apps/plUruLauncher/Pch.h +++ b/Sources/Plasma/Apps/plUruLauncher/Pch.h @@ -63,7 +63,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnNetCli/pnNetCli.h" #include "plNetGameLib/plNetGameLib.h" #include "pnEncryption/plChecksum.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "plCompression/plZlibStream.h" #include "plClientPatcher/UruPlayer.h" diff --git a/Sources/Plasma/CoreLib/CMakeLists.txt b/Sources/Plasma/CoreLib/CMakeLists.txt index da1fe03f..9d91b8b3 100644 --- a/Sources/Plasma/CoreLib/CMakeLists.txt +++ b/Sources/Plasma/CoreLib/CMakeLists.txt @@ -1,4 +1,3 @@ -include_directories(../PubUtilLib/plUnifiedTime) # EVIL: For plFileUtils.cpp add_definitions(-D_LIB) if(NOT WCHAR_BYTES) @@ -20,7 +19,6 @@ set(CoreLib_SOURCES hsCritSect.cpp hsExceptionStack.cpp hsFastMath.cpp - hsFiles.cpp hsGeometry3.cpp hsMatrix33.cpp hsMatrix44.cpp @@ -36,7 +34,6 @@ set(CoreLib_SOURCES hsThread.cpp hsWide.cpp pcSmallRect.cpp - plFileUtils.cpp plGeneric.cpp plLoadMask.cpp plString.cpp @@ -46,13 +43,11 @@ set(CoreLib_SOURCES if(WIN32 AND NOT CYGWIN) set(CoreLib_SOURCES ${CoreLib_SOURCES} hsThread_Win.cpp - hsFiles_Win.cpp ) endif(WIN32 AND NOT CYGWIN) if(UNIX) set(CoreLib_SOURCES ${CoreLib_SOURCES} hsThread_Unix.cpp - hsFiles_Unix.cpp ) endif(UNIX) @@ -66,7 +61,6 @@ set(CoreLib_HEADERS hsCritSect.h hsExceptions.h hsFastMath.h - hsFiles.h hsGeometry3.h hsHashTable.h hsMatrix44.h @@ -85,7 +79,6 @@ set(CoreLib_HEADERS hsWide.h hsWindows.h pcSmallRect.h - plFileUtils.h plGeneric.h plLoadMask.h plQuality.h diff --git a/Sources/Plasma/CoreLib/hsFiles_Mac.cpp b/Sources/Plasma/CoreLib/hsFiles_Mac.cpp deleted file mode 100644 index 60144081..00000000 --- a/Sources/Plasma/CoreLib/hsFiles_Mac.cpp +++ /dev/null @@ -1,409 +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 "hsFiles.h" -#include "hsUtils.h" -#include "hsMemory.h" - -#if HS_BUILD_FOR_MAC - -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -hsMacFile::hsMacFile() : fFlags(kRefNum_Dirty) -{ - fSpec.name[0] = 0; -} - -hsMacFile::hsMacFile(const char pathAndName[]) : hsFile(pathAndName), fFlags(kRefNum_Dirty) -{ - this->SetSpecFromName(); -} - -hsMacFile::hsMacFile(const FSSpec* spec) : fFlags(kRefNum_Dirty) -{ - this->SetSpec(spec); -} - -hsMacFile::~hsMacFile() -{ - this->Close(); -} - -void hsMacFile::SetSpec(const FSSpec* spec) -{ - if (spec) - fSpec = *spec; - else - fSpec.name[0] = 0; - fFlags |= kPathName_Dirty; -} - -void hsMacFile::SetSpecFromName() -{ - Str255 pstr; - - if (fPathAndName == nil) - fSpec.name[0] = 0; - else - { hsC2PString(fPathAndName, pstr); - ::FSMakeFSSpec(0, 0, pstr, &fSpec); - } -} - -void hsMacFile::SetNameFromSpec() -{ - CInfoPBRec pb; - Str255 dirNameP; - char dirName[256], temp[256]; - int err; - - hsP2CString(fSpec.name, temp); - - pb.dirInfo.ioNamePtr = dirNameP; - pb.dirInfo.ioVRefNum = fSpec.vRefNum; - pb.dirInfo.ioDrParID = fSpec.parID; - pb.dirInfo.ioFDirIndex = -1; - - do { - pb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID; - err = PBGetCatInfoSync(&pb); - hsThrowIfOSErr(err); - - hsP2CString(dirNameP, dirName); - strcat(dirName,":"); - strcat(dirName, temp); - strcpy(temp, dirName); - } while( pb.dirInfo.ioDrDirID != fsRtDirID); - - hsAssert(fPathAndName == nil, "pathname should be nil"); - fPathAndName = hsStrcpy(temp); -} - -bool hsMacFile::Create(OSType creator, OSType fileType, ScriptCode scriptCode) -{ - this->Close(); - - OSErr err; - - (void)::FSpDelete(&fSpec); - err = ::FSpCreate(&fSpec, creator, fileType, scriptCode); - hsIfDebugMessage(err != 0, "FSpCreate failed", err); - - return err == 0; -} - -#define kFileNotFound_Err -43 - -bool hsMacFile::OpenDataFork(Sint8_t perm, int16_t* refnum) -{ - this->Close(); - - OSErr err; - - err = ::FSpOpenDF(&fSpec, perm, &fRefNum); - if (err == kFileNotFound_Err && (perm & fsWrPerm) && (perm & fsRdPerm) == 0) - { if (this->Create('HdSp', '????')) - err = ::FSpOpenDF(&fSpec, perm, &fRefNum); - } - - if (err == 0) - { fFlags &= ~kRefNum_Dirty; - if (refnum) - *refnum = fRefNum; - return true; - } - return false; -} - -const char* hsMacFile::GetPathAndName() -{ - if (fFlags & kPathName_Dirty) - { this->SetNameFromSpec(); - fFlags &= ~kPathName_Dirty; - } - return fPathAndName; -} - -void hsMacFile::SetPathAndName(const char pathAndName[]) -{ - this->hsFile::SetPathAndName(pathAndName); - this->SetSpecFromName(); -} - -hsStream* hsMacFile::OpenStream(const char mode[], bool throwIfFailure) -{ - hsThrowIfNilParam(mode); - - short refnum; - Sint8_t perm = 0; - - if (::strchr(mode, 'r')) - perm |= fsRdPerm; - if (::strchr(mode, 'w')) - perm |= fsWrPerm; - - if (this->OpenDataFork(perm, &refnum)) - { hsFileStream* stream = new hsFileStream; - stream->SetFileRef(refnum); - return stream; - } - - hsThrowIfTrue(throwIfFailure); - return nil; -} - -void hsMacFile::Close() -{ - if (fFlags & kRefNum_Dirty) - { OSErr err = ::FSClose(fRefNum); - hsIfDebugMessage(err != 0, "FSClose failed", err); - fFlags &= ~kRefNum_Dirty; - } - this->hsFile::Close(); -} - -/////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////// - -struct hsFolderIterator_Data { - FSSpec fSpec; - OSType fFileType; - OSType fCreator; - char fCName[_MAX_PATH]; - int16_t fCurrIndex; - bool fValid; -}; - -hsFolderIterator::hsFolderIterator(const char path[]) -{ - fData = new hsFolderIterator_Data; - - fData->fCurrIndex = 0; - fData->fValid = false; -#if HS_BUILD_FOR_WIN32 - this->SetPath(path); -#else - this->SetMacFolder(path); -#endif -} - -hsFolderIterator::hsFolderIterator(const struct FSSpec* spec) // Alt Constructor - pass in FSSpec from OpenDlg() -{ - fData = new hsFolderIterator_Data; - - fData->fCurrIndex = 0; - fData->fValid = false; - - SetMacFolder(spec->vRefNum, spec->parID); -} - -hsFolderIterator::~hsFolderIterator() -{ - delete fData; -} - -void hsFolderIterator::SetPath(const char path[]) -{ - fPath[0] = 0; - fData->fValid = false; - fData->fCurrIndex = 0; - - if (path) - { - ::strcpy(fPath, path); - } -} - -/////////////////////////////////////////////////////////////////////////// - -void hsFolderIterator::SetMacFolder(OSType folderType) -{ - fData->fCurrIndex = 0; - fData->fValid = ::FindFolder(kOnSystemDisk, folderType, false, - &fData->fSpec.vRefNum, &fData->fSpec.parID) == 0; - this->Reset(); -} - -void hsFolderIterator::SetMacFolder(int16_t vRefNum, int32_t dirID) -{ - fData->fSpec.vRefNum = vRefNum; - fData->fSpec.parID = dirID; - fData->fCurrIndex = 0; - fData->fValid = true; - this->Reset(); -} - -void hsFolderIterator::SetMacFolder(const char path[]) -{ - char tmp[255]; - FSSpec fileSpec; - OSErr err; - - hsCPathToMacPath(&tmp[1], (char*)path); - tmp[0] = hsStrlen(&tmp[1]); - SetPath((char*)&tmp[1]); - - err = FSMakeFSSpec(0, 0, (const unsigned char*)tmp, &fileSpec); - if(err == fnfErr) - { - HSDebugProc("XCmd directory does not exist."); - return; - } - hsAssert(err == noErr, "Error making file spec."); - - // by now we should have the file spec for the given - // directory, however, the DirID is the PARENT directory, - // not the child directory. The following steps should - // give us the items we want. - - CInfoPBRec pb; - pb.hFileInfo.ioVRefNum = fileSpec.vRefNum; - pb.hFileInfo.ioNamePtr = (StringPtr)fileSpec.name; // The name of the child directory. - pb.hFileInfo.ioDirID = fileSpec.parID; // The ID of the parent directory. - pb.hFileInfo.ioFDirIndex = 0; - pb.hFileInfo.ioCompletion = 0; - - err = ::PBGetCatInfoSync(&pb); - hsAssert(err == noErr, "PBGetCatInfoSync() failure."); - - fData->fSpec.vRefNum = fileSpec.vRefNum; // Volume reference - fData->fSpec.parID = pb.dirInfo.ioDrDirID; // child directory ID (Finally!) - fData->fCurrIndex = 0; - fData->fValid = true; - - this->Reset(); -} - -/////////////////////////////////////////////////////////////////////////// - -void hsFolderIterator::Reset() -{ - if (fData->fValid) - fData->fCurrIndex = 1; -#ifdef HS_DEBUGGING - else - hsAssert(fData->fCurrIndex == 0, "bad currindex"); -#endif -} - -bool hsFolderIterator::NextFile() -{ - if (fData->fCurrIndex == 0) - return false; - - CInfoPBRec pb; - - do { - pb.hFileInfo.ioVRefNum = fData->fSpec.vRefNum; - pb.hFileInfo.ioNamePtr = (StringPtr)fData->fSpec.name; - pb.hFileInfo.ioDirID = fData->fSpec.parID; - pb.hFileInfo.ioFDirIndex = fData->fCurrIndex++; - - OSErr err = ::PBGetCatInfoSync(&pb); - if (err) - { - fData->fCurrIndex = 0; - return false; - } - } while (pb.hFileInfo.ioFlAttrib & ioDirMask); - - fData->fFileType = pb.hFileInfo.ioFlFndrInfo.fdType; - fData->fCreator = pb.hFileInfo.ioFlFndrInfo.fdCreator; - return true; -} - -const char* hsFolderIterator::GetFileName() const -{ - if (fData->fCurrIndex == 0) - throw "end of folder"; - - // Copy our filename (in pascal format) into a cstring and then return - HSMemory::BlockMove(&fData->fSpec.name[1], fData->fCName, fData->fSpec.name[0]); - fData->fCName[fData->fSpec.name[0]] = 0; - return fData->fCName; -} - -//////////////////////////////////////////////////////////////////////////// - -bool hsFolderIterator::NextMacFile(OSType targetFileType, OSType targetCreator) -{ - for (;;) - { if (this->NextFile() == false) - return false; - if ((targetFileType == 0 || targetFileType == this->GetMacFileType()) && - (targetCreator == 0 || targetCreator == this->GetMacCreator())) - return true; - } -} - -const FSSpec* hsFolderIterator::GetMacSpec() const -{ - if (fData->fCurrIndex == 0) - throw "end of folder"; - return &fData->fSpec; -} - - -OSType hsFolderIterator::GetMacFileType() const -{ - if (fData->fCurrIndex == 0) - throw "end of folder"; - return fData->fFileType; -} - -OSType hsFolderIterator::GetMacCreator() const -{ - if (fData->fCurrIndex == 0) - throw "end of folder"; - return fData->fCreator; -} - -bool hsFolderIterator::IsDirectory( void ) const -{ - hsAssert( false, "hsFolderIterator::IsDirectory() not defined on this platform!!!" ); - return false; -} - -#endif // HS_BUILD_FOR_MAC diff --git a/Sources/Plasma/CoreLib/hsFiles_PS2.cpp b/Sources/Plasma/CoreLib/hsFiles_PS2.cpp deleted file mode 100644 index 6268a617..00000000 --- a/Sources/Plasma/CoreLib/hsFiles_PS2.cpp +++ /dev/null @@ -1,84 +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 "hsFiles.h" - -#if HS_BUILD_FOR_PS2 - - - -hsFolderIterator::hsFolderIterator(const char path[]) -{ - hsAssert(0,"No folder Interator defined for PS2 -- yet"); -} - -hsFolderIterator::~hsFolderIterator() -{ - -} - -void hsFolderIterator::SetPath(const char path[]) -{ -} - - - -/////////////////////////////////////////////////////////////////////////////// - -void hsFolderIterator::Reset() -{ -} - -bool hsFolderIterator::NextFile() -{ -} - -const char* hsFolderIterator::GetFileName() const -{ -} - -bool hsFolderIterator::IsDirectory( void ) const -{ - hsAssert( false, "hsFolderIterator::IsDirectory() not defined on this platform!!!" ); - return false; -} - -#endif // HS_BUILD_FOR_PS2 diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp index 90f0ad79..31f17977 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp @@ -155,7 +155,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plUnifiedTime/plUnifiedTime.h" //end for agedefn test -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "pnSceneObject/plAudioInterface.h" #include "plStatusLog/plStatusLog.h" diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp index 590dcf66..b8e31b75 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp @@ -84,7 +84,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plUnifiedTime/plUnifiedTime.h" //end for agedefn test -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "plStatusLog/plStatusLog.h" diff --git a/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashSrv.cpp b/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashSrv.cpp index 22fc9430..5d5926e2 100644 --- a/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashSrv.cpp +++ b/Sources/Plasma/FeatureLib/pfCrashHandler/plCrashSrv.cpp @@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plCrashSrv.h" #include "plCrash_Private.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "pnProduct/pnProduct.h" #ifdef HS_BUILD_FOR_WIN32 diff --git a/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.cpp b/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.cpp index 1952ee3b..d961d12c 100644 --- a/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.cpp @@ -51,7 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plResMgr/plLocalization.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "plFile/plEncryptedStream.h" #include "plStatusLog/plStatusLog.h" diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp b/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp index e6a4a253..b23d3483 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp @@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plPythonPack.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "plFile/plSecureStream.h" #include "plFile/plStreamSource.h" diff --git a/Sources/Plasma/FeatureLib/pfSecurePreloader/pfSecurePreloader.cpp b/Sources/Plasma/FeatureLib/pfSecurePreloader/pfSecurePreloader.cpp index 0c264fb7..33f0405a 100644 --- a/Sources/Plasma/FeatureLib/pfSecurePreloader/pfSecurePreloader.cpp +++ b/Sources/Plasma/FeatureLib/pfSecurePreloader/pfSecurePreloader.cpp @@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plgDispatch.h" #include "plCompression/plZlibStream.h" #include "pnEncryption/plChecksum.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "plFile/plSecureStream.h" #include "plFile/plStreamSource.h" #include "plMessage/plNetCommMsgs.h" diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp index 4d026bfc..e7ae52e6 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp @@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAgeDescription.h" #include "hsStlUtils.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "plFile/plInitFileReader.h" #include "plFile/plEncryptedStream.h" #include "hsStringTokenizer.h" diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp index 57a19f34..62309f9e 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeManifest.cpp @@ -51,8 +51,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAgeManifest.h" -#include "hsFiles.h" -#include "plFileUtils.h" +#include "plFile/hsFiles.h" +#include "plFile/plFileUtils.h" #include "plFile/plInitFileReader.h" #include "hsStringTokenizer.h" diff --git a/Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp b/Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp index 752ea1be..ed421c79 100644 --- a/Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp @@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAgeLoader/plAgeLoader.h" #include "plCompression/plZlibStream.h" #include "pnEncryption/plChecksum.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "plMessage/plResPatcherMsg.h" #include "pnNetBase/pnNbError.h" #include "plNetGameLib/plNetGameLib.h" diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp index b9d3253c..43034cd8 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp @@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsGeometry3.h" #include "plgDispatch.h" #include "plProfile.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "plWin32Sound.h" #include "plWin32StreamingSound.h" diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp index 50049644..d175f66c 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plAudioFileReader.cpp @@ -55,8 +55,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAudioCore.h" //#include "hsTimer.h" -#include "hsFiles.h" -#include "plFileUtils.h" +#include "plFile/hsFiles.h" +#include "plFile/plFileUtils.h" #include "plUnifiedTime/plUnifiedTime.h" #include "plBufferedFileReader.h" #include "plCachedFileReader.h" diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp index dd902a33..6b37058d 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp +++ b/Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp @@ -49,8 +49,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plgDispatch.h" #include "hsResMgr.h" #include "pnMessage/plRefMsg.h" -#include "plFileUtils.h" -#include "hsFiles.h" +#include "plFile/plFileUtils.h" +#include "plFile/hsFiles.h" #include "plUnifiedTime/plUnifiedTime.h" #include "plStatusLog/plStatusLog.h" #include "hsTimer.h" diff --git a/Sources/Plasma/PubUtilLib/plFile/CMakeLists.txt b/Sources/Plasma/PubUtilLib/plFile/CMakeLists.txt index 05a735af..8498ca5e 100644 --- a/Sources/Plasma/PubUtilLib/plFile/CMakeLists.txt +++ b/Sources/Plasma/PubUtilLib/plFile/CMakeLists.txt @@ -5,16 +5,28 @@ include_directories("../../PubUtilLib") include_directories(${ZLIB_INCLUDE_DIR}) set(plFile_SOURCES + hsFiles.cpp plBrowseFolder.cpp plEncryptedStream.cpp + plFileUtils.cpp plInitFileReader.cpp plSecureStream.cpp plStreamSource.cpp ) +if(WIN32 AND NOT CYGWIN) + set(plFile_SOURCES ${plFile_SOURCES} hsFiles_Win.cpp) +endif(WIN32 AND NOT CYGWIN) + +if(UNIX) + set(plFile_SOURCES ${plFile_SOURCES} hsFiles_Unix.cpp) +endif(UNIX) + set(plFile_HEADERS + hsFiles.h plBrowseFolder.h plEncryptedStream.h + plFileUtils.h plInitFileReader.h plSecureStream.h plStreamSource.h diff --git a/Sources/Plasma/CoreLib/hsFiles.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp similarity index 100% rename from Sources/Plasma/CoreLib/hsFiles.cpp rename to Sources/Plasma/PubUtilLib/plFile/hsFiles.cpp diff --git a/Sources/Plasma/CoreLib/hsFiles.h b/Sources/Plasma/PubUtilLib/plFile/hsFiles.h similarity index 100% rename from Sources/Plasma/CoreLib/hsFiles.h rename to Sources/Plasma/PubUtilLib/plFile/hsFiles.h diff --git a/Sources/Plasma/CoreLib/hsFiles_Unix.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp similarity index 100% rename from Sources/Plasma/CoreLib/hsFiles_Unix.cpp rename to Sources/Plasma/PubUtilLib/plFile/hsFiles_Unix.cpp diff --git a/Sources/Plasma/CoreLib/hsFiles_Win.cpp b/Sources/Plasma/PubUtilLib/plFile/hsFiles_Win.cpp similarity index 100% rename from Sources/Plasma/CoreLib/hsFiles_Win.cpp rename to Sources/Plasma/PubUtilLib/plFile/hsFiles_Win.cpp diff --git a/Sources/Plasma/CoreLib/plFileUtils.cpp b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp similarity index 99% rename from Sources/Plasma/CoreLib/plFileUtils.cpp rename to Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp index be270dd8..d582f345 100644 --- a/Sources/Plasma/CoreLib/plFileUtils.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp @@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsStringTokenizer.h" -#include "plUnifiedTime.h" +#include "plUnifiedTime/plUnifiedTime.h" #include #include diff --git a/Sources/Plasma/CoreLib/plFileUtils.h b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.h similarity index 100% rename from Sources/Plasma/CoreLib/plFileUtils.h rename to Sources/Plasma/PubUtilLib/plFile/plFileUtils.h diff --git a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp index ebbf6558..069ba79c 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plFontCache.cpp @@ -57,7 +57,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plFont.h" #include "plStatusLog/plStatusLog.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "pnMessage/plRefMsg.h" #include "hsResMgr.h" diff --git a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp index 16e959a8..968a40c1 100644 --- a/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp +++ b/Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp @@ -63,7 +63,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plWinFontCache.h" #include "plStatusLog/plStatusLog.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "plGImage/plDynSurfaceWriter.h" #if HS_BUILD_FOR_WIN32 diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp index 16ef0804..8ee10b3a 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp @@ -63,7 +63,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plNetMessage/plNetMessage.h" #include "plAvatar/plAvatarMgr.h" #include "plAvatar/plArmatureMod.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" /***************************************************************************** diff --git a/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientRecorder.cpp b/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientRecorder.cpp index 67d68dad..dc43052d 100644 --- a/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientRecorder.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClientRecorder/plNetClientRecorder.cpp @@ -56,7 +56,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plMessage/plAgeLoadedMsg.h" #include "plStatusLog/plStatusLog.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" plNetClientRecorder::plNetClientRecorder(TimeWrapper* timeWrapper) : fTimeWrapper(timeWrapper) diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp index 46afb922..1ff2851c 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp @@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" #include "plLocalization.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" plLocalization::Language plLocalization::fLanguage = plLocalization::kEnglish; diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp index c1c173f6..31f70703 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp @@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnKeyedObject/plKeyImp.h" #include "plStatusLog/plStatusLog.h" #include "pnFactory/plFactory.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "hsStlUtils.h" #include "plVersion.h" diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp index f97756a4..f1b0826d 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp @@ -60,8 +60,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnMessage/plObjRefMsg.h" #include "plMessage/plAgeLoadedMsg.h" #include "pnMessage/plClientMsg.h" -#include "hsFiles.h" -#include "plFileUtils.h" +#include "plFile/hsFiles.h" +#include "plFile/plFileUtils.h" #include "pnFactory/plCreator.h" #include "pnNetCommon/plSynchedObject.h" #include "pnNetCommon/plNetApp.h" diff --git a/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp b/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp index 8c6ba150..bebd5b1d 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plSDLParser.cpp @@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "hsStlUtils.h" #include "plSDL.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "plFile/plStreamSource.h" #include "pnNetCommon/pnNetCommon.h" #include "pnNetCommon/plNetApp.h" diff --git a/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp b/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp index 27866480..b3a34bb3 100644 --- a/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp +++ b/Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp @@ -57,7 +57,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnMessage/plClientMsg.h" #include "plAgeLoader/plAgeLoader.h" #include "plProfileManagerFull.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "plPipeline/plDebugText.h" #include "pnMessage/plTimeMsg.h" diff --git a/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp b/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp index 8a5a23b8..232ba1e9 100644 --- a/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp +++ b/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp @@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsStream.h" #include "pnUtils/pnUtils.h" #include "plUnifiedTime/plUnifiedTime.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" plProfileManagerFull::plProfileManagerFull() : fVars(plProfileManager::Instance().fVars), diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp index 583c9f18..5ce12594 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp +++ b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp @@ -61,10 +61,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsTemplates.h" #include "hsTimer.h" #include "hsStlUtils.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "plStatusLog.h" #include "hsStlUtils.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "plUnifiedTime/plUnifiedTime.h" #include "pnProduct/pnProduct.h" diff --git a/Sources/Tools/MaxComponent/Pch.h b/Sources/Tools/MaxComponent/Pch.h index c22008d9..b8ce38be 100644 --- a/Sources/Tools/MaxComponent/Pch.h +++ b/Sources/Tools/MaxComponent/Pch.h @@ -60,8 +60,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAudible.h" #include "plCreatableIndex.h" #include "plgDispatch.h" -#include "plFileUtils.h" -#include "hsFiles.h" +#include "plFile/plFileUtils.h" +#include "plFile/hsFiles.h" #include "hsGeometry3.h" #include "plLoadMask.h" #include "hsMatrix44.h" diff --git a/Sources/Tools/MaxComponent/plAudioComponents.cpp b/Sources/Tools/MaxComponent/plAudioComponents.cpp index fa5326ec..d19866a7 100644 --- a/Sources/Tools/MaxComponent/plAudioComponents.cpp +++ b/Sources/Tools/MaxComponent/plAudioComponents.cpp @@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "plgDispatch.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "plAnimComponent.h" #include "plAudioComponents.h" diff --git a/Sources/Tools/MaxComponent/plGUIComponents.cpp b/Sources/Tools/MaxComponent/plGUIComponents.cpp index d536c633..e02ab0f3 100644 --- a/Sources/Tools/MaxComponent/plGUIComponents.cpp +++ b/Sources/Tools/MaxComponent/plGUIComponents.cpp @@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "plgDispatch.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "hsTemplates.h" #include "plComponent.h" diff --git a/Sources/Tools/MaxComponent/plMiscComponents.cpp b/Sources/Tools/MaxComponent/plMiscComponents.cpp index 5e29a478..56aa71f8 100644 --- a/Sources/Tools/MaxComponent/plMiscComponents.cpp +++ b/Sources/Tools/MaxComponent/plMiscComponents.cpp @@ -43,8 +43,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "plCreatableIndex.h" #include "plgDispatch.h" -#include "plFileUtils.h" -#include "hsFiles.h" +#include "plFile/plFileUtils.h" +#include "plFile/hsFiles.h" #include "plComponentReg.h" #include "plMiscComponents.h" diff --git a/Sources/Tools/MaxComponent/plResponderLink.cpp b/Sources/Tools/MaxComponent/plResponderLink.cpp index f6f1b6e0..902664a6 100644 --- a/Sources/Tools/MaxComponent/plResponderLink.cpp +++ b/Sources/Tools/MaxComponent/plResponderLink.cpp @@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "hsResMgr.h" #include "plComponentBase.h" diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp index 028cd132..d0b4a8a9 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp @@ -71,7 +71,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plSurface/hsGMaterial.h" #include "pnSceneObject/plSceneObject.h" #include "UserPropMgr.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "hsConverterUtils.h" #include "hsControlConverter.h" diff --git a/Sources/Tools/MaxExport/Pch.h b/Sources/Tools/MaxExport/Pch.h index 79dfc98e..bf4e9505 100644 --- a/Sources/Tools/MaxExport/Pch.h +++ b/Sources/Tools/MaxExport/Pch.h @@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "hsExceptionStack.h" #include "hsExceptions.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "hsStlSortUtils.h" #include "hsStream.h" diff --git a/Sources/Tools/MaxExport/SimpleExport.cpp b/Sources/Tools/MaxExport/SimpleExport.cpp index f7ed661f..5e3a6256 100644 --- a/Sources/Tools/MaxExport/SimpleExport.cpp +++ b/Sources/Tools/MaxExport/SimpleExport.cpp @@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "hsExceptionStack.h" -#include "plFileUtils.h" +#include "plFile/plFileUtils.h" #include "hsStream.h" #include diff --git a/Sources/Tools/MaxExport/plExportDlg.cpp b/Sources/Tools/MaxExport/plExportDlg.cpp index 56d27036..0ebd9cb4 100644 --- a/Sources/Tools/MaxExport/plExportDlg.cpp +++ b/Sources/Tools/MaxExport/plExportDlg.cpp @@ -327,7 +327,7 @@ void plExportDlgImp::IExportCurrentFile(const char* exportPath) GetCOREInterface()->ExportToFile(exportPath); } -#include "hsFiles.h" +#include "plFile/hsFiles.h" void plExportDlgImp::IDoExport() { diff --git a/Sources/Tools/MaxMain/Pch.h b/Sources/Tools/MaxMain/Pch.h index b11de810..a22f5224 100644 --- a/Sources/Tools/MaxMain/Pch.h +++ b/Sources/Tools/MaxMain/Pch.h @@ -61,7 +61,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsColorRGBA.h" #include "plgDispatch.h" #include "hsFastMath.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "hsGeometry3.h" #include "pnKeyedObject/plKey.h" #include "plLoadMask.h" @@ -108,4 +108,4 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // Python #include -#endif // _MaxMain_Pch_inc_ \ No newline at end of file +#endif // _MaxMain_Pch_inc_ diff --git a/Sources/Tools/MaxMain/main.cpp b/Sources/Tools/MaxMain/main.cpp index c5ebc3b9..25c2a4ba 100644 --- a/Sources/Tools/MaxMain/main.cpp +++ b/Sources/Tools/MaxMain/main.cpp @@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "hsTemplates.h" #include "MaxComponent/plComponentMgr.h" diff --git a/Sources/Tools/MaxMain/plAgeDescInterface.cpp b/Sources/Tools/MaxMain/plAgeDescInterface.cpp index 54fd40d8..dc3c1688 100644 --- a/Sources/Tools/MaxMain/plAgeDescInterface.cpp +++ b/Sources/Tools/MaxMain/plAgeDescInterface.cpp @@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "hsStream.h" #include "hsTemplates.h" #include "hsWindows.h" diff --git a/Sources/Tools/MaxMain/plPythonMgr.cpp b/Sources/Tools/MaxMain/plPythonMgr.cpp index aeb2c4c0..69207869 100644 --- a/Sources/Tools/MaxMain/plPythonMgr.cpp +++ b/Sources/Tools/MaxMain/plPythonMgr.cpp @@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "HeadSpin.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #include "plgDispatch.h" #include "hsWindows.h" diff --git a/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp b/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp index 93a22d28..223121f4 100644 --- a/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp +++ b/Sources/Tools/plResBrowser/plResBrowserWndProc.cpp @@ -53,7 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plResMgr/plResManager.h" #include "plResMgr/plResMgrSettings.h" #include "plWinRegistryTools.h" -#include "hsFiles.h" +#include "plFile/hsFiles.h" #define IDC_REGTREEVIEW 1000