refactor: unglob std::wstring

This commit is contained in:
Tropical
2026-03-06 11:50:22 -06:00
parent 41db813a6d
commit cdc08700e4
581 changed files with 2156 additions and 2154 deletions

View File

@@ -4,7 +4,7 @@
#include "../../../Minecraft.World/IO/Streams/InputOutputStream.h"
#include "../../../Minecraft.World/Util/StringHelpers.h"
AbstractTexturePack::AbstractTexturePack(DWORD id, File *file, const wstring &name, TexturePack *fallback) : id(id), name(name)
AbstractTexturePack::AbstractTexturePack(DWORD id, File *file, const std::wstring &name, TexturePack *fallback) : id(id), name(name)
{
// 4J init
textureId = -1;
@@ -25,7 +25,7 @@ AbstractTexturePack::AbstractTexturePack(DWORD id, File *file, const wstring &na
//loadDescription();
}
wstring AbstractTexturePack::trim(wstring line)
std::wstring AbstractTexturePack::trim(std::wstring line)
{
if (!line.empty() && line.length() > 34)
{
@@ -101,7 +101,7 @@ void AbstractTexturePack::loadName()
{
}
InputStream *AbstractTexturePack::getResource(const wstring &name, bool allowFallback) //throws IOException
InputStream *AbstractTexturePack::getResource(const std::wstring &name, bool allowFallback) //throws IOException
{
app.DebugPrintf("texture - %ls\n",name.c_str());
InputStream *is = getResourceImplementation(name);
@@ -114,7 +114,7 @@ InputStream *AbstractTexturePack::getResource(const wstring &name, bool allowFal
}
// 4J Currently removed due to override in TexturePack class
//InputStream *AbstractTexturePack::getResource(const wstring &name) //throws IOException
//InputStream *AbstractTexturePack::getResource(const std::wstring &name) //throws IOException
//{
// return getResource(name, true);
//}
@@ -145,7 +145,7 @@ void AbstractTexturePack::load(Textures *textures)
}
}
bool AbstractTexturePack::hasFile(const wstring &name, bool allowFallback)
bool AbstractTexturePack::hasFile(const std::wstring &name, bool allowFallback)
{
bool hasFile = this->hasFile(name);
@@ -157,34 +157,34 @@ DWORD AbstractTexturePack::getId()
return id;
}
wstring AbstractTexturePack::getName()
std::wstring AbstractTexturePack::getName()
{
return texname;
}
wstring AbstractTexturePack::getWorldName()
std::wstring AbstractTexturePack::getWorldName()
{
return m_wsWorldName;
}
wstring AbstractTexturePack::getDesc1()
std::wstring AbstractTexturePack::getDesc1()
{
return desc1;
}
wstring AbstractTexturePack::getDesc2()
std::wstring AbstractTexturePack::getDesc2()
{
return desc2;
}
wstring AbstractTexturePack::getAnimationString(const wstring &textureName, const wstring &path, bool allowFallback)
std::wstring AbstractTexturePack::getAnimationString(const std::wstring &textureName, const std::wstring &path, bool allowFallback)
{
return getAnimationString(textureName, path);
}
wstring AbstractTexturePack::getAnimationString(const wstring &textureName, const wstring &path)
std::wstring AbstractTexturePack::getAnimationString(const std::wstring &textureName, const std::wstring &path)
{
wstring animationDefinitionFile = textureName + L".txt";
std::wstring animationDefinitionFile = textureName + L".txt";
bool requiresFallback = !hasFile(L"\\" + textureName + L".png", false);
@@ -197,9 +197,9 @@ wstring AbstractTexturePack::getAnimationString(const wstring &textureName, cons
InputStreamReader isr(fileStream);
BufferedReader br(&isr);
wstring result = L"";
std::wstring result = L"";
wstring line = br.readLine();
std::wstring line = br.readLine();
while (!line.empty())
{
line = trimString(line);
@@ -215,7 +215,7 @@ wstring AbstractTexturePack::getAnimationString(const wstring &textureName, cons
return result;
}
BufferedImage *AbstractTexturePack::getImageResource(const wstring& File, bool filenameHasExtension /*= false*/, bool bTitleUpdateTexture /*=false*/, const wstring &drive /*=L""*/)
BufferedImage *AbstractTexturePack::getImageResource(const std::wstring& File, bool filenameHasExtension /*= false*/, bool bTitleUpdateTexture /*=false*/, const std::wstring &drive /*=L""*/)
{
const char *pchTexture=wstringtofilename(File);
app.DebugPrintf("AbstractTexturePack::getImageResource - %s, drive is %s\n",pchTexture, wstringtofilename(drive));
@@ -361,7 +361,7 @@ void AbstractTexturePack::unloadUI()
// Do nothing
}
wstring AbstractTexturePack::getXuiRootPath()
std::wstring AbstractTexturePack::getXuiRootPath()
{
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);