diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.Client/AbstractTexturePack.cpp | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
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 <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.Client/AbstractTexturePack.cpp')
| -rw-r--r-- | Minecraft.Client/AbstractTexturePack.cpp | 41 |
1 files changed, 26 insertions, 15 deletions
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()) { |
