mirror of
https://github.com/gwdevhub/gMod.git
synced 2026-07-24 12:06:45 +00:00
some code changes
This commit is contained in:
+11
-12
@@ -5,21 +5,20 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <ranges>
|
||||
#include <streambuf>
|
||||
#include <libzippp.h>
|
||||
|
||||
struct TpfEntry {
|
||||
std::string Name;
|
||||
std::string Entry; // Assuming ZipEntry is a string in your original code
|
||||
uint32_t CrcHash;
|
||||
void* Data;
|
||||
unsigned long long Size;
|
||||
std::string name;
|
||||
std::string entry; // Assuming ZipEntry is a string in your original code
|
||||
uint32_t crc_hash;
|
||||
void* data;
|
||||
unsigned long long size;
|
||||
};
|
||||
|
||||
class gMod_FileLoader {
|
||||
std::string _fileName;
|
||||
std::ifstream _stream;
|
||||
const std::vector<uint8_t> _tpfPassword{
|
||||
std::string file_name;
|
||||
std::ifstream stream;
|
||||
static constexpr std::vector<uint8_t> TPF_PASSWORD{
|
||||
0x73, 0x2A, 0x63, 0x7D, 0x5F, 0x0A, 0xA6, 0xBD,
|
||||
0x7D, 0x65, 0x7E, 0x67, 0x61, 0x2A, 0x7F, 0x7F,
|
||||
0x74, 0x61, 0x67, 0x5B, 0x60, 0x70, 0x45, 0x74,
|
||||
@@ -27,9 +26,9 @@ class gMod_FileLoader {
|
||||
0x77, 0x6E, 0x46, 0x47, 0x77, 0x49, 0x0C, 0x4B,
|
||||
0x46, 0x6F
|
||||
};
|
||||
const std::string encodedPassword = std::string(_tpfPassword.begin(), _tpfPassword.end());
|
||||
std::vector<TpfEntry> entryCache;
|
||||
bool loaded;
|
||||
static constexpr std::string ENCODED_PASSWORD = std::string(TPF_PASSWORD.begin(), TPF_PASSWORD.end());
|
||||
std::vector<TpfEntry> entry_cache{};
|
||||
bool loaded = false;
|
||||
|
||||
public:
|
||||
gMod_FileLoader(const std::string& fileName);
|
||||
|
||||
Reference in New Issue
Block a user