From 5f284aa872b0fcecd7ec50759ed4c10672289dda Mon Sep 17 00:00:00 2001 From: Soggy_Pancake <54160598+Soggy-Pancake@users.noreply.github.com> Date: Sat, 14 Mar 2026 13:51:42 -0700 Subject: [PATCH] New custom icon macros so the item icon name is used instead of needing to update 2 hardcoded strings --- Minecraft.Client/PreStitchedTextureMap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Minecraft.Client/PreStitchedTextureMap.cpp b/Minecraft.Client/PreStitchedTextureMap.cpp index 4a5aad7fe..a719ed19e 100644 --- a/Minecraft.Client/PreStitchedTextureMap.cpp +++ b/Minecraft.Client/PreStitchedTextureMap.cpp @@ -311,6 +311,8 @@ Icon *PreStitchedTextureMap::getMissingIcon() } #define ADD_ICON(row, column, name) (texturesByName[name] = new SimpleIcon(name,name,horizRatio*column,vertRatio*row,horizRatio*(column+1),vertRatio*(row+1))); +#define ADD_OBJ_ICON(row, column, tile) (texturesByName[tile->getIconName()] = new SimpleIcon(tile->getIconName(),tile->getIconName(),horizRatio*column,vertRatio*row,horizRatio*(column+1),vertRatio*(row+1))); +#define ADD_COL_TILE_ICON(row, column, tile, id) (texturesByName[((ColoredTile*)tile)->getColoredIconName(DyePowderItem::id)] = new SimpleIcon(((ColoredTile*)tile)->getColoredIconName(DyePowderItem::id),((ColoredTile*)tile)->getColoredIconName(DyePowderItem::id),horizRatio*column,vertRatio*row,horizRatio*(column+1),vertRatio*(row+1))); #define ADD_ICON_WITH_NAME(row, column, name, filename) (texturesByName[name] = new SimpleIcon(name,filename,horizRatio*column,vertRatio*row,horizRatio*(column+1),vertRatio*(row+1))); #define ADD_ICON_SIZE(row, column, name, height, width) (texturesByName[name] = new SimpleIcon(name,name,horizRatio*column,vertRatio*row,horizRatio*(column+width),vertRatio*(row+height)));