mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-05-25 20:24:42 +00:00
Trial code is almost cleaned. Consoles are now unused. stdafx unbloat for Minecraft.Client
62 lines
1.3 KiB
C++
62 lines
1.3 KiB
C++
#include "DefaultTexturePack.h"
|
|
#include "Textures.h"
|
|
|
|
DefaultTexturePack::DefaultTexturePack() : AbstractTexturePack(0, nullptr, L"Minecraft", nullptr)
|
|
{
|
|
// 4J Stu - These calls need to be in the most derived version of the class
|
|
loadIcon();
|
|
loadName(); // 4J-PB - added so the PS3 can have localised texture names'
|
|
loadDescription();
|
|
loadColourTable();
|
|
}
|
|
|
|
void DefaultTexturePack::loadIcon()
|
|
{
|
|
if(app.hasArchiveFile(L"Graphics\\TexturePackIcon.png"))
|
|
{
|
|
byteArray ba = app.getArchiveFile(L"Graphics\\TexturePackIcon.png");
|
|
m_iconData = ba.data;
|
|
m_iconSize = ba.length;
|
|
}
|
|
}
|
|
|
|
void DefaultTexturePack::loadDescription()
|
|
{
|
|
desc1 = L"LOCALISE ME: The default look of Minecraft";
|
|
}
|
|
void DefaultTexturePack::loadName()
|
|
{
|
|
texname = L"Minecraft";
|
|
}
|
|
|
|
bool DefaultTexturePack::hasFile(const wstring &name)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool DefaultTexturePack::isTerrainUpdateCompatible()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
InputStream *DefaultTexturePack::getResourceImplementation(const wstring &name)// throws FileNotFoundException
|
|
{
|
|
wstring wDrive = L"Assets/Textures/res";
|
|
|
|
InputStream* resource = InputStream::getResourceAsStream(wDrive + name);
|
|
|
|
return resource;
|
|
}
|
|
|
|
void DefaultTexturePack::loadUI()
|
|
{
|
|
loadDefaultUI();
|
|
|
|
AbstractTexturePack::loadUI();
|
|
}
|
|
|
|
void DefaultTexturePack::unloadUI()
|
|
{
|
|
AbstractTexturePack::unloadUI();
|
|
}
|