Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
105 lines
3.0 KiB
C++
105 lines
3.0 KiB
C++
//===========================================================================//
|
|
// File: filestrmmgr.hpp //
|
|
// Project: MUNGA Brick: Resource Manager //
|
|
// Contents: Implementation Details of resource management //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1996, Virtual World Entertainment, Inc. //
|
|
// PROPRIETARY AND CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#pragma once
|
|
|
|
#include "Stuff.hpp"
|
|
#include "FileStream.hpp"
|
|
|
|
namespace Stuff {
|
|
|
|
//##########################################################################
|
|
//####################### FileDependencies ###########################
|
|
//##########################################################################
|
|
|
|
class FileDependencies:
|
|
public Stuff::Plug
|
|
{
|
|
public:
|
|
FileDependencies();
|
|
FileDependencies(const FileDependencies &dependencies):
|
|
Plug(DefaultData)
|
|
{
|
|
Check_Object(this); Check_Object(&dependencies);
|
|
*this = dependencies;
|
|
}
|
|
~FileDependencies();
|
|
|
|
FileDependencies&
|
|
operator=(const FileDependencies &dependencies);
|
|
|
|
void
|
|
AddDependency(FileStream *stream);
|
|
void
|
|
AddDependency(const char* filename);
|
|
void
|
|
AddDependencies(const FileDependencies* dependencies);
|
|
void
|
|
AddDependencies(MemoryStream *dependencies);
|
|
|
|
DynamicMemoryStream
|
|
m_fileNameStream;
|
|
};
|
|
|
|
//##########################################################################
|
|
//####################### FileStreamManager ##########################
|
|
//##########################################################################
|
|
|
|
class FileStreamManager
|
|
#if defined(_ARMOR)
|
|
: public Stuff::Signature
|
|
#endif
|
|
{
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Constructor, destructor, and testing
|
|
//
|
|
public:
|
|
FileStreamManager();
|
|
~FileStreamManager();
|
|
|
|
void
|
|
TestInstance()
|
|
{}
|
|
static void
|
|
TestClass();
|
|
|
|
static FileStreamManager
|
|
*Instance;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Utility functions
|
|
//
|
|
public:
|
|
void
|
|
CleanUpAfterCompares();
|
|
|
|
bool
|
|
CompareModificationDate(
|
|
const MString &file_name,
|
|
__int64 time_stamp
|
|
);
|
|
void
|
|
PurgeFileCompareCache();
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Private data
|
|
//
|
|
protected:
|
|
typedef Stuff::PlugOf<__int64>
|
|
FileStatPlug;
|
|
Stuff::TreeOf<FileStatPlug*, Stuff::MString>
|
|
compareCache;
|
|
};
|
|
|
|
}
|