#include <BSP.h>
|
| BSP (std::string path_, bool loadPatchFiles=true) |
|
| operator bool () const |
|
uint32_t | getVersion () const |
|
void | setVersion (uint32_t version) |
|
uint32_t | getMapRevision () const |
|
void | setMapRevision (uint32_t mapRevision) |
|
bool | isL4D2 () const |
|
void | setL4D2 (bool isL4D2) |
|
bool | isConsole () const |
|
void | setConsole (bool isConsole) |
|
bool | hasLump (BSPLump lumpIndex) const |
|
bool | isLumpCompressed (BSPLump lumpIndex) const |
|
uint32_t | getLumpVersion (BSPLump lumpIndex) const |
|
std::optional< std::vector< std::byte > > | getLumpData (BSPLump lumpIndex, bool noDecompression=false) const |
|
template<BSPLump Lump> |
auto | getLumpData () const |
|
bool | setLump (BSPLump lumpIndex, uint32_t version, std::span< const std::byte > data, uint8_t compressLevel=0) |
| BSP::setGameLump should be used for writing game lumps as they need special handling.
|
|
bool | setLump (uint32_t version, std::span< const BSPEntityKeyValues > data, uint8_t compressLevel=0) |
|
bool | isGameLumpCompressed (BSPGameLump::Signature signature) const |
|
uint16_t | getGameLumpVersion (BSPGameLump::Signature signature) |
|
std::optional< std::vector< std::byte > > | getGameLumpData (BSPGameLump::Signature signature) const |
|
bool | setGameLump (BSPGameLump::Signature signature, uint16_t version, std::span< const std::byte > data, uint8_t compressLevel=0) |
|
void | resetLump (BSPLump lumpIndex) |
| Reset changes made to a lump before they're written to disk.
|
|
void | reset () |
| Resets ALL in-memory modifications (version, all lumps including game lumps, map revision)
|
|
void | createLumpPatchFile (BSPLump lumpIndex) const |
|
bool | setLumpFromPatchFile (const std::string &lumpFilePath) |
|
bool | bake (std::string_view outputPath="") |
|
|
static BSP | create (std::string path, uint32_t version=21, uint32_t mapRevision=0) |
|
Definition at line 124 of file BSP.h.
◆ BSP()
BSP::BSP |
( |
std::string |
path_, |
|
|
bool |
loadPatchFiles = true |
|
) |
| |
|
explicit |
◆ bake()
bool BSP::bake |
( |
std::string_view |
outputPath = "" | ) |
|
◆ create()
BSP BSP::create |
( |
std::string |
path, |
|
|
uint32_t |
version = 21 , |
|
|
uint32_t |
mapRevision = 0 |
|
) |
| |
|
static |
◆ createLumpPatchFile()
void BSP::createLumpPatchFile |
( |
BSPLump |
lumpIndex | ) |
const |
◆ getGameLumpData()
◆ getGameLumpVersion()
◆ getLumpData() [1/2]
auto bsppp::BSP::getLumpData |
( |
| ) |
const |
|
inline |
◆ getLumpData() [2/2]
std::optional< std::vector< std::byte > > BSP::getLumpData |
( |
BSPLump |
lumpIndex, |
|
|
bool |
noDecompression = false |
|
) |
| const |
◆ getLumpVersion()
uint32_t BSP::getLumpVersion |
( |
BSPLump |
lumpIndex | ) |
const |
◆ getMapRevision()
uint32_t BSP::getMapRevision |
( |
| ) |
const |
◆ getVersion()
uint32_t BSP::getVersion |
( |
| ) |
const |
◆ hasLump()
bool BSP::hasLump |
( |
BSPLump |
lumpIndex | ) |
const |
◆ isConsole()
bool BSP::isConsole |
( |
| ) |
const |
◆ isGameLumpCompressed()
◆ isL4D2()
bool BSP::isL4D2 |
( |
| ) |
const |
◆ isLumpCompressed()
bool BSP::isLumpCompressed |
( |
BSPLump |
lumpIndex | ) |
const |
◆ operator bool()
BSP::operator bool |
( |
| ) |
const |
|
explicit |
◆ parseBrushModels()
◆ parseEdges()
std::vector< BSPEdge > BSP::parseEdges |
( |
| ) |
const |
|
protected |
◆ parseEntities()
◆ parseFaces()
std::vector< BSPFace > BSP::parseFaces |
( |
| ) |
const |
|
protected |
◆ parseGameLumps()
std::vector< BSPGameLump > BSP::parseGameLumps |
( |
bool |
decompress | ) |
const |
|
protected |
◆ parseNodes()
std::vector< BSPNode > BSP::parseNodes |
( |
| ) |
const |
|
protected |
◆ parseOriginalFaces()
std::vector< BSPFace > BSP::parseOriginalFaces |
( |
| ) |
const |
|
protected |
◆ parsePlanes()
std::vector< BSPPlane > BSP::parsePlanes |
( |
| ) |
const |
|
protected |
◆ parseSurfEdges()
std::vector< BSPSurfEdge > BSP::parseSurfEdges |
( |
| ) |
const |
|
protected |
◆ parseTextureData()
◆ parseTextureInfo()
◆ parseVertices()
std::vector< BSPVertex > BSP::parseVertices |
( |
| ) |
const |
|
protected |
◆ readHeader()
◆ reset()
Resets ALL in-memory modifications (version, all lumps including game lumps, map revision)
Definition at line 294 of file BSP.cpp.
◆ resetLump()
void BSP::resetLump |
( |
BSPLump |
lumpIndex | ) |
|
Reset changes made to a lump before they're written to disk.
Definition at line 276 of file BSP.cpp.
◆ setConsole()
void BSP::setConsole |
( |
bool |
isConsole | ) |
|
◆ setGameLump()
bool BSP::setGameLump |
( |
BSPGameLump::Signature |
signature, |
|
|
uint16_t |
version, |
|
|
std::span< const std::byte > |
data, |
|
|
uint8_t |
compressLevel = 0 |
|
) |
| |
◆ setL4D2()
void BSP::setL4D2 |
( |
bool |
isL4D2 | ) |
|
◆ setLump() [1/2]
bool BSP::setLump |
( |
BSPLump |
lumpIndex, |
|
|
uint32_t |
version, |
|
|
std::span< const std::byte > |
data, |
|
|
uint8_t |
compressLevel = 0 |
|
) |
| |
BSP::setGameLump should be used for writing game lumps as they need special handling.
Paklump can be written here but compression is unsupported, prefer using bsppp::PakLump or your favorite zip library instead. Valid compressLevel range is 0 to 9, 0 is considered off, 9 the slowest and most compressiest
Definition at line 176 of file BSP.cpp.
◆ setLump() [2/2]
bool BSP::setLump |
( |
uint32_t |
version, |
|
|
std::span< const BSPEntityKeyValues > |
data, |
|
|
uint8_t |
compressLevel = 0 |
|
) |
| |
◆ setLumpFromPatchFile()
bool BSP::setLumpFromPatchFile |
( |
const std::string & |
lumpFilePath | ) |
|
◆ setMapRevision()
void BSP::setMapRevision |
( |
uint32_t |
mapRevision | ) |
|
◆ setVersion()
void BSP::setVersion |
( |
uint32_t |
version | ) |
|
◆ console
bool bsppp::BSP::console = false |
|
protected |
◆ header
Header bsppp::BSP::header {} |
|
protected |
◆ l4d2
bool bsppp::BSP::l4d2 = false |
|
protected |
◆ path
std::string bsppp::BSP::path |
|
protected |
◆ stagedGameLumps
◆ stagedLumps
std::unordered_map<uint32_t, std::pair<Lump, std::vector<std::byte> > > bsppp::BSP::stagedLumps |
|
protected |
◆ stagedMapRevision
uint32_t bsppp::BSP::stagedMapRevision {} |
|
protected |
◆ stagedVersion
uint32_t bsppp::BSP::stagedVersion {} |
|
protected |
The documentation for this class was generated from the following files: