iw4x-client/iw4/Components/FastFiles.hpp

49 lines
859 B
C++
Raw Normal View History

2015-12-23 21:26:46 -05:00
namespace Components
{
class FastFiles : public Component
{
public:
2015-12-28 19:45:04 -05:00
class Offset
{
public:
union
{
struct
{
uint32_t pointer : 28;
int stream : 4;
};
uint32_t fullValue;
void* fullPointer;
};
uint32_t GetDecrementedPointer()
{
Offset offset = *this;
offset.fullValue--;
return offset.pointer;
};
int GetDecrementedStream()
{
Offset offset = *this;
offset.fullValue--;
return offset.stream;
};
};
2015-12-23 21:26:46 -05:00
FastFiles();
~FastFiles();
const char* GetName() { return "FastFiles"; };
static void AddZonePath(std::string path);
2015-12-25 20:51:58 -05:00
static std::string Current();
2015-12-23 21:26:46 -05:00
private:
static std::vector<std::string> ZonePaths;
static const char* GetZoneLocation(const char* file);
static void LoadDLCUIZones(Game::XZoneInfo *zoneInfo, unsigned int zoneCount, int sync);
};
}