fix: put jui-specific texture usage behind ifdefs

This commit is contained in:
Sally Knight 2026-03-25 23:38:09 +03:00 committed by Tropical
parent 65ff6a97f0
commit 08a87c432a
4 changed files with 30 additions and 27 deletions

View file

@ -33,24 +33,12 @@ C4JRender::eTextureFormat Textures::TEXTURE_FORMAT =
int Textures::preLoadedIdx[TN_COUNT];
const wchar_t* Textures::preLoaded[TN_COUNT] = {
L"%blur%misc/pumpkinblur",
L"%blur%/misc/vignette", // Not currently used
L"%clamp%misc/shadow",
L"/achievement/bg", // Not currently used
L"art/kz",
L"environment/clouds",
L"environment/rain",
L"environment/snow",
L"gui/gui",
L"gui/background",
L"gui/inventory",
L"gui/container",
L"gui/crafting",
L"gui/furnace",
L"gui/creative_inventory/tabs",
L"gui/creative_inventory/tab_items",
L"gui/creative_inventory/tab_inventory",
L"gui/creative_inventory/tab_item_search",
L"title/mclogo",
L"gui/icons",
L"item/arrows",
L"item/boat",
@ -175,8 +163,20 @@ const wchar_t* Textures::preLoaded[TN_COUNT] = {
L"item/trapped",
L"item/trapped_double",
// 4jcraft: 1.6.4 java UI
// 4jcraft: java UI specific
#ifdef ENABLE_JAVA_GUIS
L"%blur%/misc/vignette",
L"/achievement/bg",
L"gui/background",
L"gui/inventory",
L"gui/container",
L"gui/crafting",
L"gui/furnace",
L"gui/creative_inventory/tabs",
L"gui/creative_inventory/tab_items",
L"gui/creative_inventory/tab_inventory",
L"gui/creative_inventory/tab_item_search",
L"title/mclogo",
L"gui/horse",
L"title/bg/panorama",
#endif

View file

@ -16,24 +16,12 @@ class ResourceLocation;
typedef enum _TEXTURE_NAME {
TN__BLUR__MISC_PUMPKINBLUR,
TN__BLUR__MISC_VIGNETTE, // Not currently used
TN__CLAMP__MISC_SHADOW,
TN_ACHIEVEMENT_BG, // Not currently used
TN_ART_KZ,
TN_ENVIRONMENT_CLOUDS,
TN_ENVIRONMENT_RAIN,
TN_ENVIRONMENT_SNOW,
TN_GUI_GUI,
TN_GUI_BACKGROUND,
TN_GUI_INVENTORY,
TN_GUI_CONTAINER,
TN_GUI_CRAFTING,
TN_GUI_FURNACE,
TN_GUI_CREATIVE_TABS,
TN_GUI_CREATIVE_TAB_ITEMS,
TN_GUI_CREATIVE_TAB_INVENTORY,
TN_GUI_CREATIVE_TAB_ITEM_SEARCH,
TN_TITLE_MCLOGO,
TN_GUI_ICONS,
TN_ITEM_ARROWS,
TN_ITEM_BOAT,
@ -157,8 +145,20 @@ typedef enum _TEXTURE_NAME {
TN_TILE_TRAP_CHEST,
TN_TILE_LARGE_TRAP_CHEST,
// 4jcraft: 1.6.4 java UI
// 4jcraft: java UI specific
#ifdef ENABLE_JAVA_GUIS
TN__BLUR__MISC_VIGNETTE,
TN_ACHIEVEMENT_BG,
TN_GUI_BACKGROUND,
TN_GUI_INVENTORY,
TN_GUI_CONTAINER,
TN_GUI_CRAFTING,
TN_GUI_FURNACE,
TN_GUI_CREATIVE_TABS,
TN_GUI_CREATIVE_TAB_ITEMS,
TN_GUI_CREATIVE_TAB_INVENTORY,
TN_GUI_CREATIVE_TAB_ITEM_SEARCH,
TN_TITLE_MCLOGO,
TN_GUI_HORSE,
TN_TITLE_BG_PANORAMA,
#endif

View file

@ -8,8 +8,9 @@
#include "../../../Minecraft.World/Containers/HorseInventoryMenu.h"
// 4jcraft: referenced from MCP 8.11 (JE 1.6.4) and the existing InventoryScreen
#ifdef ENABLE_JAVA_GUIS
ResourceLocation GUI_HORSE_LOCATION = ResourceLocation(TN_GUI_HORSE);
#endif
HorseInventoryScreen::HorseInventoryScreen(
std::shared_ptr<Inventory> inventory,

View file

@ -158,6 +158,7 @@ void TitleScreen::buttonClicked(Button* button) {
// uses the TU panorama instead of JE panorama and as such a different rendering
// method
void TitleScreen::renderPanorama() {
#ifdef ENABLE_JAVA_GUIS
Tesselator* t = Tesselator::getInstance();
glMatrixMode(GL_PROJECTION);
@ -217,6 +218,7 @@ void TitleScreen::renderPanorama() {
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
#endif
}
void TitleScreen::render(int xm, int ym, float a) {