diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/PreStitchedTextureMap.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.Client/PreStitchedTextureMap.h')
| -rw-r--r-- | Minecraft.Client/PreStitchedTextureMap.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Minecraft.Client/PreStitchedTextureMap.h b/Minecraft.Client/PreStitchedTextureMap.h new file mode 100644 index 00000000..40a755f8 --- /dev/null +++ b/Minecraft.Client/PreStitchedTextureMap.h @@ -0,0 +1,51 @@ +#pragma once +using namespace std; + +#include "..\Minecraft.World\IconRegister.h" + +class Icon; +class StitchedTexture; +class Texture; +class BufferedImage; + +// 4J Added this class to stop having to do texture stitching at runtime +class PreStitchedTextureMap : public IconRegister +{ +public: + static const wstring NAME_MISSING_TEXTURE; + +private: + const int iconType; + + const wstring name; + const wstring path; + const wstring extension; + + bool m_mipMap; + + typedef unordered_map<wstring, Icon *> stringIconMap; + stringIconMap texturesByName; // = new HashMap<String, StitchedTexture>(); + BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB); + StitchedTexture *missingPosition; + Texture *stitchResult; + vector<StitchedTexture *> animatedTextures; // = new ArrayList<StitchedTexture>(); + + vector<pair<wstring, wstring> > texturesToAnimate; + + void loadUVs(); +public: + PreStitchedTextureMap(int type, const wstring &name, const wstring &path, BufferedImage *missingTexture, bool mipMap = false); + + void stitch(); + StitchedTexture *getTexture(const wstring &name); + void cycleAnimationFrames(); + Texture *getStitchedTexture(); + + // 4J Stu - register is a reserved keyword in C++ + Icon *registerIcon(const wstring &name); + + int getIconType(); + Icon *getMissingIcon(); + + int getFlags() const; +};
\ No newline at end of file |
