Files
GabsPuNs-Project_Zenith_Main/Minecraft.Client/FolderTexturePack.cpp
GabsPuNs f87525a519 New File System and Cleanup some code Part 1
Trial code is almost cleaned.
Consoles are now unused.
stdafx unbloat for Minecraft.Client
2026-05-24 15:30:31 -04:00

48 lines
1.1 KiB
C++

#include "FolderTexturePack.h"
FolderTexturePack::FolderTexturePack(DWORD id, const wstring &name, File *folder, TexturePack *fallback) : AbstractTexturePack(id, folder, name, fallback)
{
// 4J Stu - These calls need to be in the most derived version of the class
loadIcon();
loadName();
loadDescription();
bUILoaded = false;
}
InputStream *FolderTexturePack::getResourceImplementation(const wstring &name) //throws IOException
{
// Make the content package point to to the UPDATE: drive is needed
wstring wDrive = L"Assets/DummyTexturePack/res";
InputStream *resource = InputStream::getResourceAsStream(wDrive + name);
//return stream;
return resource;
}
bool FolderTexturePack::hasFile(const wstring &name)
{
File file = File( getPath() + name);
return file.exists() && file.isFile();
}
bool FolderTexturePack::isTerrainUpdateCompatible()
{
return true;
}
wstring FolderTexturePack::getPath(bool bTitleUpdateTexture /*= false*/,const char *pchBDPatchFilename)
{
wstring wDrive = L"Assets/Textures/" + file->getPath() + L"/";
return wDrive;
}
void FolderTexturePack::loadUI()
{
}
void FolderTexturePack::unloadUI()
{
}