AMFP Enhanced
C++ reference: the code this unofficial fork added
Loading...
Searching...
No Matches
LuxPreload.h File Reference

what to preload while playing. More...

#include <string>
#include <vector>

Go to the source code of this file.

Functions

std::string LuxPreloadLower (std::string s)
std::string LuxPreloadMapName (const std::string &asPath)
 "E:/svn/maps/02_Mansion_02" -> "02_mansion_02.map"
void LuxPreloadAddUnique (std::vector< std::string > &avList, const std::string &asX)
std::vector< std::string > LuxPreloadNextMaps (const std::string &asScript, const std::string &asMapXml, const std::string &asCurrentMap)
 Maps reachable from here: the script's ChangeMap("...") calls and level doors' MapFile values.
std::vector< std::string > LuxPreloadIndexFolders (const std::string &asMapXml)
 Folders of the files a map uses (its FileIndex: static objects, entities, decals), in order.
bool LuxPreloadWanted (const std::string &asFile)
 Files worth warming in those folders (models, materials, textures, entity and animation data).

Detailed Description

what to preload while playing.

A low-priority thread reads the next map's files into the OS file cache (LuxPreloader.cpp), so the first visit loads from memory, not disk. Pure parsing, unit tested in tests/cpp/test_preload.cpp.

Definition in file LuxPreload.h.

Function Documentation

◆ LuxPreloadLower()

std::string LuxPreloadLower ( std::string s)
inline

Definition at line 12 of file LuxPreload.h.

◆ LuxPreloadMapName()

std::string LuxPreloadMapName ( const std::string & asPath)
inline

"E:/svn/maps/02_Mansion_02" -> "02_mansion_02.map"

Definition at line 19 of file LuxPreload.h.

◆ LuxPreloadAddUnique()

void LuxPreloadAddUnique ( std::vector< std::string > & avList,
const std::string & asX )
inline

Definition at line 28 of file LuxPreload.h.

◆ LuxPreloadNextMaps()

std::vector< std::string > LuxPreloadNextMaps ( const std::string & asScript,
const std::string & asMapXml,
const std::string & asCurrentMap )
inline

Maps reachable from here: the script's ChangeMap("...") calls and level doors' MapFile values.

Definition at line 35 of file LuxPreload.h.

◆ LuxPreloadIndexFolders()

std::vector< std::string > LuxPreloadIndexFolders ( const std::string & asMapXml)
inline

Folders of the files a map uses (its FileIndex: static objects, entities, decals), in order.

Definition at line 57 of file LuxPreload.h.

◆ LuxPreloadWanted()

bool LuxPreloadWanted ( const std::string & asFile)
inline

Files worth warming in those folders (models, materials, textures, entity and animation data).

Definition at line 78 of file LuxPreload.h.