mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-04 15:15:11 +00:00
cleanup: flatten dead branches in client render texture and runtime code
This commit is contained in:
@@ -13,26 +13,11 @@ DefaultTexturePack::DefaultTexturePack()
|
||||
}
|
||||
|
||||
void DefaultTexturePack::loadIcon() {
|
||||
#if 0
|
||||
// 4J Stu - Temporary only
|
||||
constexpr int LOCATOR_SIZE =
|
||||
256; // Use this to allocate space to hold a ResourceLocator string
|
||||
WCHAR szResourceLocator[LOCATOR_SIZE];
|
||||
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
swprintf(szResourceLocator, LOCATOR_SIZE, L"section://%X,%ls#%ls",
|
||||
c_ModuleHandle, L"media", L"media/Graphics/TexturePackIcon.png");
|
||||
|
||||
unsigned int size = 0;
|
||||
HRESULT hr = XuiResourceLoadAllNoLoc(szResourceLocator, &m_iconData, &size);
|
||||
m_iconSize = size;
|
||||
#else
|
||||
if (app.hasArchiveFile(L"Graphics\\TexturePackIcon.png")) {
|
||||
byteArray ba = app.getArchiveFile(L"Graphics\\TexturePackIcon.png");
|
||||
m_iconData = ba.data;
|
||||
m_iconSize = static_cast<std::uint32_t>(ba.length);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void DefaultTexturePack::loadDescription() {
|
||||
@@ -52,48 +37,8 @@ InputStream* DefaultTexturePack::getResourceImplementation(
|
||||
{
|
||||
std::wstring wDrive = L"";
|
||||
// Make the content package point to to the UPDATE: drive is needed
|
||||
#if 0
|
||||
#ifdef _TU_BUILD
|
||||
wDrive = L"UPDATE:\\res";
|
||||
#else
|
||||
|
||||
wDrive = L"GAME:\\res\\TitleUpdate\\res";
|
||||
#endif
|
||||
#elif 0
|
||||
|
||||
char* pchUsrDir;
|
||||
if (app.GetBootedFromDiscPatch()) {
|
||||
const char* pchTextureName = wstringtofilename(name);
|
||||
pchUsrDir = app.GetBDUsrDirPath(pchTextureName);
|
||||
app.DebugPrintf(
|
||||
"DefaultTexturePack::getResourceImplementation - texture %s - "
|
||||
"Drive - %s\n",
|
||||
pchTextureName, pchUsrDir);
|
||||
} else {
|
||||
const char* pchTextureName = wstringtofilename(name);
|
||||
pchUsrDir = getUsrDirPath();
|
||||
app.DebugPrintf(
|
||||
"DefaultTexturePack::getResourceImplementation - texture %s - "
|
||||
"Drive - %s\n",
|
||||
pchTextureName, pchUsrDir);
|
||||
}
|
||||
|
||||
std::wstring wstr(pchUsrDir, pchUsrDir + strlen(pchUsrDir));
|
||||
|
||||
wDrive = wstr + L"\\Common\\res\\TitleUpdate\\res";
|
||||
#elif 0
|
||||
|
||||
/*
|
||||
char *pchUsrDir=getUsrDirPath();
|
||||
std::wstring wstr (pchUsrDir, pchUsrDir+strlen(pchUsrDir));
|
||||
|
||||
wDrive = wstr + L"Common\\res\\TitleUpdate\\res";
|
||||
*/
|
||||
wDrive = L"Common\\res\\TitleUpdate\\res";
|
||||
#else
|
||||
wDrive = L"Common\\res\\TitleUpdate\\res";
|
||||
|
||||
#endif
|
||||
InputStream* resource = InputStream::getResourceAsStream(wDrive + name);
|
||||
// InputStream *stream =
|
||||
// DefaultTexturePack::class->getResourceAsStream(name); if (stream == NULL)
|
||||
@@ -112,13 +57,5 @@ void DefaultTexturePack::loadUI() {
|
||||
}
|
||||
|
||||
void DefaultTexturePack::unloadUI() {
|
||||
#if 0
|
||||
// Unload skin
|
||||
XuiFreeVisuals(L"TexturePack");
|
||||
XuiFreeVisuals(L"");
|
||||
CXuiSceneBase::GetInstance()->SetVisualPrefix(L"");
|
||||
CXuiSceneBase::GetInstance()->SkinChanged(
|
||||
CXuiSceneBase::GetInstance()->m_hObj);
|
||||
#endif
|
||||
AbstractTexturePack::unloadUI();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user