mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 18:59:09 +00:00
Move file stuff back to plFile for gcc.
This commit is contained in:
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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[])
|
||||
{
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 <vector>
|
||||
#include <set>
|
||||
|
||||
@ -83,4 +83,4 @@ public:
|
||||
void Optimize();
|
||||
};
|
||||
|
||||
#endif // plPageOptimizer_h_inc
|
||||
#endif // plPageOptimizer_h_inc
|
||||
|
@ -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 <vector>
|
||||
#include <string>
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user