-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ForcesArchive direct loading/extraction
No non-direct loading/extraction, generation, or HedgeArcPack support yet. Those will all come soon. This commit also slightly optimizes LWArchive stuff
- Loading branch information
1 parent
818b0ca
commit 16a24c0
Showing
7 changed files
with
562 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#pragma once | ||
#include "PACx.h" | ||
#include "HedgeLib/Blob.h" | ||
|
||
namespace hl | ||
{ | ||
class Archive; | ||
struct ForcesArchive | ||
{ | ||
PACxV3Header Header; | ||
|
||
// Each node in here contains another array of nodes, this time containing PACxV3DataEntries. | ||
PACxV3NodeTree TypeTree; | ||
}; | ||
|
||
// TODO | ||
|
||
//HL_API void DAddForcesArchive(const Blob& blob, Archive& arc); | ||
inline Blob DLoadForcesArchive(const char* filePath) | ||
{ | ||
// Included for completeness | ||
return DPACxLoadV3(filePath); | ||
} | ||
|
||
/*HL_API std::size_t DForcesArchiveGetFileCount(const Blob& blob, | ||
bool includeProxies = true);*/ | ||
|
||
HL_API std::unique_ptr<const char*[]> DForcesArchiveGetSplitPtrs( | ||
const Blob& blob, std::size_t& splitCount); | ||
|
||
HL_API void DExtractForcesArchive(const Blob& blob, const char* dir); | ||
|
||
//HL_API void SaveForcesArchive(const Archive& arc, | ||
// const char* filePath, bool bigEndian, | ||
// std::uint32_t splitLimit = HL_PACX_DEFAULT_SPLIT_LIMIT); | ||
|
||
#ifdef _WIN32 | ||
inline Blob DLoadForcesArchive(const nchar* filePath) | ||
{ | ||
// Included for completeness | ||
return DPACxLoadV3(filePath); | ||
} | ||
|
||
HL_API void DExtractForcesArchive(const Blob& blob, const nchar* dir); | ||
|
||
//HL_API void SaveForcesArchive(const Archive& arc, | ||
// const nchar* filePath, bool bigEndian, | ||
// std::uint32_t splitLimit = HL_PACX_DEFAULT_SPLIT_LIMIT); | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.