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

@@ -434,7 +434,7 @@ bool GameRuleManager::readRuleFile(
default:
app.DebugPrintf("De-compressing game rules.");
#ifndef _CONTENT_PACKAGE
#if !defined(_CONTENT_PACKAGE)
assert(compressionType == APPROPRIATE_COMPRESSION_TYPE);
#endif
// 4J-JEV: DecompressLZXRLE uses the correct platform specific
@@ -627,46 +627,12 @@ void GameRuleManager::processSchematicsLighting(LevelChunk* levelChunk) {
}
void GameRuleManager::loadDefaultGameRules() {
#if 0
#ifdef _TU_BUILD
std::wstring fileRoot = L"UPDATE:\\res\\GameRules\\Tutorial.pck";
#else
std::wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\Tutorial.pck";
#endif
File packedTutorialFile(fileRoot);
if (loadGameRulesPack(&packedTutorialFile)) {
m_levelGenerators.getLevelGenerators()->at(0)->setWorldName(
app.GetString(IDS_PLAY_TUTORIAL));
// m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(L"Tutorial");
m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(
app.GetString(IDS_TUTORIALSAVENAME));
}
#ifndef _CONTENT_PACKAGE
// 4J Stu - Remove these just now
// File testRulesPath(L"GAME:\\GameRules");
// std::vector<File *> *packFiles = testRulesPath.listFiles();
// for(AUTO_VAR(it,packFiles->begin()); it != packFiles->end(); ++it)
//{
// loadGameRulesPack(*it);
// }
// delete packFiles;
#endif
#else // 0
#ifndef __linux__
#ifdef _WINDOWS64
#if !defined(__linux__)
#if defined(_WINDOWS64)
File packedTutorialFile(L"Windows64Media\\Tutorial\\Tutorial.pck");
if (!packedTutorialFile.exists())
packedTutorialFile = File(L"Windows64\\Tutorial\\Tutorial.pck");
#elif 0
File packedTutorialFile(L"/app0/orbis/Tutorial/Tutorial.pck");
#elif 0
File packedTutorialFile(L"PSVita/Tutorial/Tutorial.pck");
#elif 0
File packedTutorialFile(L"PS3/Tutorial/Tutorial.pck");
#else
File packedTutorialFile(L"Tutorial\\Tutorial.pck");
#endif
@@ -677,7 +643,7 @@ void GameRuleManager::loadDefaultGameRules() {
m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(
app.GetString(IDS_TUTORIALSAVENAME));
}
#else // 4jcraft, TODO this is using old pre-TU19 logic for loading the tutorial, modify to use the above ifdefs
#else
std::wstring fpTutorial = L"Tutorial.pck";
if(app.getArchiveFileSize(fpTutorial) >= 0)
{
@@ -692,7 +658,6 @@ void GameRuleManager::loadDefaultGameRules() {
else delete pack;
}
#endif
#endif
}
bool GameRuleManager::loadGameRulesPack(File* path) {