From b3feddfef372618c8a9d7a0abcaf18cfad866c18 Mon Sep 17 00:00:00 2001 From: daoge <3523206925@qq.com> Date: Tue, 3 Mar 2026 03:04:10 +0800 Subject: feat: TU19 (Dec 2014) Features & Content (#155) * try to resolve merge conflict * feat: TU19 (Dec 2014) Features & Content (#32) * December 2014 files * Working release build * Fix compilation issues * Add sound to Windows64Media * Add DLC content and force Tutorial DLC * Revert "Add DLC content and force Tutorial DLC" This reverts commit 97a43994725008e35fceb984d5549df9c8cea470. * Disable broken light packing * Disable breakpoint during DLC texture map load Allows DLC loading but the DLC textures are still broken * Fix post build not working * ... * fix vs2022 build * fix cmake build --------- Co-authored-by: Loki --- Minecraft.Client/AbstractTexturePack.cpp | 41 ++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 15 deletions(-) (limited to 'Minecraft.Client/AbstractTexturePack.cpp') diff --git a/Minecraft.Client/AbstractTexturePack.cpp b/Minecraft.Client/AbstractTexturePack.cpp index a4eb7f01..80799a4c 100644 --- a/Minecraft.Client/AbstractTexturePack.cpp +++ b/Minecraft.Client/AbstractTexturePack.cpp @@ -187,30 +187,34 @@ wstring AbstractTexturePack::getAnimationString(const wstring &textureName, cons wstring animationDefinitionFile = textureName + L".txt"; bool requiresFallback = !hasFile(L"\\" + textureName + L".png", false); + + wstring result = L""; InputStream *fileStream = getResource(L"\\" + path + animationDefinitionFile, requiresFallback); - //Minecraft::getInstance()->getLogger().info("Found animation info for: " + animationDefinitionFile); + if(fileStream) + { + //Minecraft::getInstance()->getLogger().info("Found animation info for: " + animationDefinitionFile); #ifndef _CONTENT_PACKAGE - wprintf(L"Found animation info for: %ls\n", animationDefinitionFile.c_str() ); + app.DebugPrintf("Found animation info for: %ls\n", animationDefinitionFile.c_str() ); #endif - InputStreamReader isr(fileStream); - BufferedReader br(&isr); - - wstring result = L""; + InputStreamReader isr(fileStream); + BufferedReader br(&isr); - wstring line = br.readLine(); - while (!line.empty()) - { - line = trimString(line); - if (line.length() > 0) + + wstring line = br.readLine(); + while (!line.empty()) { - result.append(L","); - result.append(line); + line = trimString(line); + if (line.length() > 0) + { + result.append(L","); + result.append(line); + } + line = br.readLine(); } - line = br.readLine(); + delete fileStream; } - delete fileStream; return result; } @@ -253,7 +257,14 @@ void AbstractTexturePack::loadColourTable() void AbstractTexturePack::loadDefaultColourTable() { // Load the file +#ifdef __PS3__ + // need to check if it's a BD build, so pass in the name + File coloursFile(AbstractTexturePack::getPath(true,app.GetBootedFromDiscPatch()?"colours.col":NULL).append(L"res/colours.col")); + +#else File coloursFile(AbstractTexturePack::getPath(true).append(L"res/colours.col")); +#endif + if(coloursFile.exists()) { -- cgit v1.2.3