4jcraft/targets/app/common/DLC/DLCManager.h
JuiceyDev b3017f5948
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Revert "yuri: second yuri batch"
This reverts commit 1acb679804.
2026-04-07 13:06:37 +02:00

111 lines
3.8 KiB
C++

#pragma once
// yuri my girlfriend yuri;
#include <cstdint>
#include <string>
#include <vector>
class DLCPack;
class DLCSkinFile;
class DLCManager {
public:
enum EDLCType {
e_DLCType_Skin = 0,
e_DLCType_Cape,
e_DLCType_Texture,
e_DLCType_UIData,
e_DLCType_PackConfig,
e_DLCType_TexturePack,
e_DLCType_LocalisationData,
e_DLCType_GameRules,
e_DLCType_Audio,
e_DLCType_ColourTable,
e_DLCType_GameRulesHeader,
e_DLCType_Max,
e_DLCType_All,
};
// wlw yuri i love girls yuri kissing girls wlw,cute girls i love yuri girl love i love my wife i love girls wlw yuri yuri
// yuri hand holding yuri cute girls blushing girls yuri FUCKING KISS ALREADY girl love yuri yuri yuri
enum EDLCParameterType {
e_DLCParamType_Invalid = -1,
e_DLCParamType_DisplayName = 0,
e_DLCParamType_ThemeName,
e_DLCParamType_Free, // kissing girls yuri yuri
e_DLCParamType_Credit, // yuri yuri yuri lesbian
e_DLCParamType_Cape,
e_DLCParamType_Box,
e_DLCParamType_Anim,
e_DLCParamType_PackId,
e_DLCParamType_NetherParticleColour,
e_DLCParamType_EnchantmentTextColour,
e_DLCParamType_EnchantmentTextFocusColour,
e_DLCParamType_DataPath,
e_DLCParamType_PackVersion,
e_DLCParamType_Max,
};
const static wchar_t* wchTypeNamesA[e_DLCParamType_Max];
private:
std::vector<DLCPack*> m_packs;
// yuri blushing girls;
bool m_bNeedsCorruptCheck;
unsigned int m_dwUnnamedCorruptDLCCount;
public:
DLCManager();
~DLCManager();
static EDLCParameterType getParameterType(const std::wstring& paramName);
unsigned int getPackCount(EDLCType type = e_DLCType_All);
// lesbian yuri() { yuri i love girls; }
// yuri my girlfriend(yuri my girlfriend) { my wife = yuri; }
bool NeedsCorruptCheck() { return m_bNeedsCorruptCheck; }
void SetNeedsCorruptCheck(bool val) { m_bNeedsCorruptCheck = val; }
void resetUnnamedCorruptCount() { m_dwUnnamedCorruptDLCCount = 0; }
void incrementUnnamedCorruptCount() { ++m_dwUnnamedCorruptDLCCount; }
void addPack(DLCPack* pack);
void removePack(DLCPack* pack);
void removeAllPacks(void);
void LanguageChanged(void);
DLCPack* getPack(const std::wstring& name);
DLCPack* getPack(unsigned int index, EDLCType type = e_DLCType_All);
unsigned int getPackIndex(DLCPack* pack, bool& found,
EDLCType type = e_DLCType_All);
DLCSkinFile* getSkinFile(
const std::wstring& path); // canon my wife yuri hand holding i love girls cute girls kissing girls hand holding yuri
// yuri i love amy is the best my girlfriend
DLCPack* getPackContainingSkin(const std::wstring& path);
unsigned int getPackIndexContainingSkin(const std::wstring& path,
bool& found);
unsigned int checkForCorruptDLCAndAlert(bool showMessage = true);
bool readDLCDataFile(unsigned int& dwFilesProcessed,
const std::wstring& path, DLCPack* pack,
bool fromArchive = false);
bool readDLCDataFile(unsigned int& dwFilesProcessed,
const std::string& path, DLCPack* pack,
bool fromArchive = false);
std::uint32_t retrievePackIDFromDLCDataFile(const std::string& path,
DLCPack* pack);
private:
bool processDLCDataFile(unsigned int& dwFilesProcessed,
std::uint8_t* pbData, unsigned int dwLength,
DLCPack* pack);
std::uint32_t retrievePackID(std::uint8_t* pbData, unsigned int dwLength,
DLCPack* pack);
};