SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
FPX.h
Go to the documentation of this file.
1
// ReSharper disable CppRedundantQualifier
2
3
#pragma once
4
5
#include "
VPK.h
"
6
7
namespace
vpkpp
{
8
9
constexpr
uint32_t
FPX_SIGNATURE
= 0x3241ff33;
10
constexpr
std::string_view
FPX_DIR_SUFFIX
=
"_fdr"
;
11
constexpr
std::string_view
FPX_EXTENSION
=
".fpx"
;
12
13
class
FPX
:
public
VPK
{
14
public
:
16
static
std::unique_ptr<PackFile>
create
(
const
std::string& path);
17
19
[[nodiscard]]
static
std::unique_ptr<PackFile>
open
(
const
std::string& path,
const
EntryCallback
& callback =
nullptr
);
20
21
protected
:
22
using
VPK::VPK;
23
24
[[nodiscard]]
static
std::unique_ptr<PackFile>
openInternal
(
const
std::string& path,
const
EntryCallback
& callback =
nullptr
);
25
26
private
:
27
using
VPK::generateKeyPairFiles
;
28
using
VPK::sign
;
29
using
VPK::getVersion
;
30
using
VPK::setVersion
;
31
32
VPKPP_REGISTER_PACKFILE_OPEN
(
FPX_EXTENSION
, &
FPX::open
);
33
};
34
35
}
// namespace vpkpp
VPKPP_REGISTER_PACKFILE_OPEN
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
Definition
PackFile.h:254
VPK.h
vpkpp::FPX
Definition
FPX.h:13
vpkpp::FPX::openInternal
static std::unique_ptr< PackFile > openInternal(const std::string &path, const EntryCallback &callback=nullptr)
Definition
FPX.cpp:43
vpkpp::FPX::open
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open an FPX file.
Definition
FPX.cpp:25
vpkpp::FPX::create
static std::unique_ptr< PackFile > create(const std::string &path)
Create a new directory FPX file - should end in "_dir.fpx"! This is not enforced but STRONGLY recomme...
Definition
FPX.cpp:10
vpkpp::PackFile::EntryCallback
EntryCallbackBase< void > EntryCallback
Definition
PackFile.h:38
vpkpp::VPK
Definition
VPK.h:26
vpkpp::VPK::getVersion
uint32_t getVersion() const
Returns 1 for v1, 2 for v2.
Definition
VPK.cpp:894
vpkpp::VPK::generateKeyPairFiles
static bool generateKeyPairFiles(const std::string &name)
Generate keypair files, which can be used to sign a VPK Input is a truncated file path,...
Definition
VPK.cpp:811
vpkpp::VPK::setVersion
void setVersion(uint32_t version)
Change the version of the VPK. Valid values are 1 and 2.
Definition
VPK.cpp:898
vpkpp::VPK::sign
bool sign(const std::string &filename_)
Sign the VPK with the given private key KeyValues file. (See below comment).
Definition
VPK.cpp:842
vpkpp
Definition
Attribute.h:5
vpkpp::FPX_SIGNATURE
constexpr uint32_t FPX_SIGNATURE
Definition
FPX.h:9
vpkpp::FPX_DIR_SUFFIX
constexpr std::string_view FPX_DIR_SUFFIX
Definition
FPX.h:10
vpkpp::FPX_EXTENSION
constexpr std::string_view FPX_EXTENSION
Definition
FPX.h:11
include
vpkpp
format
FPX.h
Generated on
for SourcePP by
1.17.0