cleanup: flatten dead branches in common app and ui code

This commit is contained in:
MatthewBeshay
2026-03-26 20:18:29 +11:00
parent 1fecbf297a
commit f19563bbd7
154 changed files with 297 additions and 15903 deletions

View File

@@ -157,7 +157,7 @@ GameRuleDefinition* LevelGenerationOptions::addChild(
rule = new StartFeature();
m_features.push_back((StartFeature*)rule);
} else {
#ifndef _CONTENT_PACKAGE
#if !defined(_CONTENT_PACKAGE)
wprintf(
L"LevelGenerationOptions: Attempted to add invalid child rule - "
L"%d\n",
@@ -357,7 +357,7 @@ ConsoleSchematicFile* LevelGenerationOptions::loadSchematicFile(
// If we have already loaded this, just return
AUTO_VAR(it, m_schematics.find(filename));
if (it != m_schematics.end()) {
#ifndef _CONTENT_PACKAGE
#if !defined(_CONTENT_PACKAGE)
wprintf(L"We have already loaded schematic file %ls\n",
filename.c_str());
#endif
@@ -468,17 +468,10 @@ void LevelGenerationOptions::loadBaseSaveData() {
mountIndex = m_parentDLCPack->GetDLCMountIndex();
if (mountIndex > -1) {
#if 0
if (StorageManager.MountInstalledDLC(
ProfileManager.GetPrimaryPad(), mountIndex,
&LevelGenerationOptions::packMounted, this,
L"WPACK") != ERROR_IO_PENDING)
#else
if (StorageManager.MountInstalledDLC(
ProfileManager.GetPrimaryPad(), mountIndex,
&LevelGenerationOptions::packMounted, this,
"WPACK") != ERROR_IO_PENDING)
#endif
{
// corrupt DLC
setLoadedData();
@@ -519,7 +512,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr,
dlcFile->getGrfPath(), true,
L"WPACK:"));
if (grf.exists()) {
#ifdef _UNICODE
#if defined(_UNICODE)
std::wstring path = grf.getPath();
const WCHAR* pchFilename = path.c_str();
HANDLE fileHandle = CreateFile(
@@ -577,7 +570,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr,
File save(app.getFilePath(lgo->m_parentDLCPack->GetPackID(),
lgo->getBaseSavePath(), true, L"WPACK:"));
if (save.exists()) {
#ifdef _UNICODE
#if defined(_UNICODE)
std::wstring path = save.getPath();
const WCHAR* pchFilename = path.c_str();
HANDLE fileHandle = CreateFile(
@@ -624,11 +617,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr,
}
}
}
#if 0
DWORD result = StorageManager.UnmountInstalledDLC(L"WPACK");
#else
DWORD result = StorageManager.UnmountInstalledDLC("WPACK");
#endif
}
lgo->setLoadedData();