From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.Client/TextureMap.h | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Minecraft.Client/TextureMap.h (limited to 'Minecraft.Client/TextureMap.h') diff --git a/Minecraft.Client/TextureMap.h b/Minecraft.Client/TextureMap.h new file mode 100644 index 00000000..2984e532 --- /dev/null +++ b/Minecraft.Client/TextureMap.h @@ -0,0 +1,46 @@ +#pragma once +using namespace std; + +#include "..\Minecraft.World\IconRegister.h" + +class StitchedTexture; +class Texture; +class BufferedImage; + +class TextureMap : 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 stringStitchedTextureMap; + stringStitchedTextureMap texturesByName; // = new HashMap(); + BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB); + StitchedTexture *missingPosition; + Texture *stitchResult; + vector animatedTextures; // = new ArrayList(); + + stringStitchedTextureMap texturesToRegister; // = new HashMap(); + +public: + TextureMap(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(); +}; \ No newline at end of file -- cgit v1.2.3