MinecraftConsoles/Minecraft.Client/TextureMap.h
Riley M. c0da06e4ee
major: Switch to forward slashes(+more) to fix compilation on Linux (#1403)
Notably also adds some metadata files for NixOS 

* add support for linux clang cross compiles

* add linux clang instructions

* un-capitalize Mob.horse.*

* update the description in flake.nix

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-04-14 16:47:37 -05:00

46 lines
1.2 KiB
C++

#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<wstring, StitchedTexture *> stringStitchedTextureMap;
stringStitchedTextureMap 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>();
stringStitchedTextureMap texturesToRegister; // = new HashMap<String, StitchedTexture>();
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();
};