Files
MinecraftConsoles/Minecraft.Client/TexturePack.h
ModMaker101 a9be52c41a Project modernization (#630)
* Fixed boats falling and a TP glitch #266

* Replaced every C-style cast with C++ ones

* Replaced every C-style cast with C++ ones

* Fixed boats falling and a TP glitch #266

* Updated NULL to nullptr and fixing some type issues

* Modernized and fixed a few bugs

- Replaced most instances of `NULL` with `nullptr`.
- Replaced most `shared_ptr(new ...)` with `make_shared`.
- Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.

* Fixing more conflicts

* Replace int loops with size_t and start work on overrides
2026-03-08 09:56:03 +07:00

60 lines
2.0 KiB
C++

#pragma once
using namespace std;
#include "Common\App_enums.h"
class InputStream;
class Minecraft;
class ArchiveFile;
class TexturePack
{
public:
TexturePack() { m_bHasAudio=false;}
virtual bool hasData() = 0;
virtual bool hasAudio() { return m_bHasAudio;}
virtual void setHasAudio(bool bVal) {m_bHasAudio=bVal;}
virtual bool isLoadingData() = 0;
virtual void loadData() {}
virtual void unload(Textures *textures) = 0;
virtual void load(Textures *textures) = 0;
virtual InputStream *getResource(const wstring &name, bool allowFallback) = 0;// throws IOException;
//virtual InputStream *getResource(const wstring &name) = 0;// throws IOException;
virtual DWORD getId() = 0;
virtual wstring getName() = 0;
virtual wstring getDesc1() = 0;
virtual wstring getDesc2() = 0;
virtual bool hasFile(const wstring &name, bool allowFallback) = 0;
virtual bool isTerrainUpdateCompatible() = 0;
virtual wstring getResource(const wstring& name) // 4J - changed to just return a name rather than an input stream
{
/* 4J - TODO
return TexturePack.class.getResourceAsStream(name);
*/
return name;
}
virtual DLCPack * getDLCPack() { return nullptr;}
// 4J Added
virtual wstring getPath(bool bTitleUpdateTexture = false, const char *pchBDPatchFilename=nullptr);
virtual wstring getAnimationString(const wstring &textureName, const wstring &path, bool allowFallback) = 0;
virtual BufferedImage *getImageResource(const wstring& File, bool filenameHasExtension = false, bool bTitleUpdateTexture=false, const wstring &drive =L"") = 0;
virtual void loadColourTable() = 0;
virtual void loadUI() = 0;
virtual void unloadUI() = 0;
virtual wstring getXuiRootPath() = 0;
virtual PBYTE getPackIcon(DWORD &dwImageBytes) = 0;
virtual PBYTE getPackComparison(DWORD &dwImageBytes) = 0;
virtual unsigned int getDLCParentPackId() = 0;
virtual unsigned char getDLCSubPackId() = 0;
virtual ColourTable *getColourTable() = 0;
virtual ArchiveFile *getArchiveFile() = 0;
private:
bool m_bHasAudio;
};