From d4a6dd94ceeb46a2301d9f70d186dd33214a7ef4 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Mon, 13 May 2013 19:26:53 +0100 Subject: [PATCH] Removed support for Nehrim entirely to get a level platform for more general TC support. --- src/game.cpp | 21 ++------------------- src/game.h | 2 +- src/globals.h | 1 - src/gui/ids.h | 1 - src/gui/main.cpp | 14 -------------- src/gui/settings.cpp | 27 ++++++--------------------- src/gui/settings.h | 1 - 7 files changed, 9 insertions(+), 58 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index e7d626b3..5ecd19d3 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -47,8 +47,6 @@ namespace boss { vector detected; if (Game(GAME_TES4, false).IsInstalled()) //Look for Oblivion. detected.push_back(GAME_TES4); - if (Game(GAME_NEHRIM, false).IsInstalled()) //Look for Nehrim. - detected.push_back(GAME_NEHRIM); if (Game(GAME_TES5, false).IsInstalled()) //Look for Skyrim. detected.push_back(GAME_TES5); if (Game(GAME_FO3, false).IsInstalled()) //Look for Fallout 3. @@ -71,13 +69,6 @@ namespace boss { bossFolderName = "Oblivion"; masterFile = "Oblivion.esm"; libespmGame = "Oblivion"; - } else if (Id() == GAME_NEHRIM) { - name = "Nehrim - At Fate's Edge"; - registryKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Nehrim - At Fate's Edge_is1"; - registrySubKey = "InstallLocation"; - bossFolderName = "Nehrim"; - masterFile = "Nehrim.esm"; - libespmGame = "Oblivion"; } else if (Id() == GAME_TES5) { name = "TES V: Skyrim"; registryKey = "Software\\Bethesda Softworks\\Skyrim"; @@ -165,11 +156,7 @@ namespace boss { int ret; if (Id() == GAME_TES4) ret = lo_create_handle(&gh, LIBLO_GAME_TES4, gamePath.string().c_str()); - else if (Id() == GAME_NEHRIM) { - ret = lo_create_handle(&gh, LIBLO_GAME_TES4, gamePath.string().c_str()); - if (ret == LIBLO_OK) - ret = lo_set_game_master(gh, masterFile.c_str()); - } else if (Id() == GAME_TES5) + else if (Id() == GAME_TES5) ret = lo_create_handle(&gh, LIBLO_GAME_TES5, gamePath.string().c_str()); else if (Id() == GAME_FO3) ret = lo_create_handle(&gh, LIBLO_GAME_FO3, gamePath.string().c_str()); @@ -211,11 +198,7 @@ namespace boss { int ret; if (Id() == GAME_TES4) ret = lo_create_handle(&gh, LIBLO_GAME_TES4, gamePath.string().c_str()); - else if (Id() == GAME_NEHRIM) { - ret = lo_create_handle(&gh, LIBLO_GAME_TES4, gamePath.string().c_str()); - if (ret == LIBLO_OK) - ret = lo_set_game_master(gh, masterFile.c_str()); - } else if (Id() == GAME_TES5) + else if (Id() == GAME_TES5) ret = lo_create_handle(&gh, LIBLO_GAME_TES5, gamePath.string().c_str()); else if (Id() == GAME_FO3) ret = lo_create_handle(&gh, LIBLO_GAME_FO3, gamePath.string().c_str()); diff --git a/src/game.h b/src/game.h index 70d4b802..42aa0743 100644 --- a/src/game.h +++ b/src/game.h @@ -45,7 +45,7 @@ namespace boss { class Game { public: Game(); //Sets game to BOSS_GAME_AUTODETECT, with all other vars being empty. - Game(const unsigned int gameCode, const bool pathInit = true); //Empty path means constructor will detect its location. If noPathInit is true, then the game's BOSS subfolder will not be created. + Game(const unsigned int gameCode, const bool pathInit = true); bool IsInstalled() const; bool IsInstalledLocally() const; diff --git a/src/globals.h b/src/globals.h index c68ee5cc..4e6f2ad4 100644 --- a/src/globals.h +++ b/src/globals.h @@ -33,7 +33,6 @@ namespace boss { const unsigned int GAME_TES5 = 2; const unsigned int GAME_FO3 = 3; const unsigned int GAME_FONV = 4; - const unsigned int GAME_NEHRIM = 5; //Version numbers. const unsigned int VERSION_MAJOR = 3; diff --git a/src/gui/ids.h b/src/gui/ids.h index de9201e1..9c676a27 100644 --- a/src/gui/ids.h +++ b/src/gui/ids.h @@ -42,7 +42,6 @@ enum { OPTION_SortPlugins, MENU_ShowSettings, MENU_Oblivion, - MENU_Nehrim, MENU_Skyrim, MENU_Fallout3, MENU_FalloutNewVegas, diff --git a/src/gui/main.cpp b/src/gui/main.cpp index fce553a0..829d9ce9 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -60,7 +60,6 @@ BEGIN_EVENT_TABLE ( Launcher, wxFrame ) EVT_MENU ( wxID_ABOUT, Launcher::OnAbout ) EVT_MENU ( MENU_ShowSettings, Launcher::OnOpenSettings ) EVT_MENU ( MENU_Oblivion, Launcher::OnGameChange ) - EVT_MENU ( MENU_Nehrim, Launcher::OnGameChange ) EVT_MENU ( MENU_Skyrim, Launcher::OnGameChange ) EVT_MENU ( MENU_Fallout3, Launcher::OnGameChange ) EVT_MENU ( MENU_FalloutNewVegas, Launcher::OnGameChange ) @@ -176,9 +175,6 @@ bool BossGUI::OnInit() { if (target == "oblivion" && _detectedGames[i] == GAME_TES4) { targetGame = GAME_TES4; break; - } else if (target == "nehrim" && _detectedGames[i] == GAME_NEHRIM) { - targetGame = GAME_NEHRIM; - break; } else if (target == "skyrim" && _detectedGames[i] == GAME_TES5) { targetGame = GAME_TES5; break; @@ -243,7 +239,6 @@ Launcher::Launcher(const wxChar *title, YAML::Node& settings, Game& game, const MenuBar->Append(EditMenu, translate("&Edit")); //Game menu GameMenu->AppendRadioItem(MENU_Oblivion, wxT("&Oblivion"), translate("Switch to running BOSS for Oblivion.")); - GameMenu->AppendRadioItem(MENU_Nehrim, wxT("&Nehrim"), translate("Switch to running BOSS for Nehrim.")); GameMenu->AppendRadioItem(MENU_Skyrim, wxT("&Skyrim"), translate("Switch to running BOSS for Skyrim.")); GameMenu->AppendRadioItem(MENU_Fallout3, wxT("&Fallout 3"), translate("Switch to running BOSS for Fallout 3.")); GameMenu->AppendRadioItem(MENU_FalloutNewVegas, wxT("&Fallout: New Vegas"), translate("Switch to running BOSS for Fallout: New Vegas.")); @@ -265,8 +260,6 @@ Launcher::Launcher(const wxChar *title, YAML::Node& settings, Game& game, const if (_game.Id() == GAME_TES4) GameMenu->FindItem(MENU_Oblivion)->Check(); - else if (_game.Id() == GAME_NEHRIM) - GameMenu->FindItem(MENU_Nehrim)->Check(); else if (_game.Id() == GAME_TES5) GameMenu->FindItem(MENU_Skyrim)->Check(); else if (_game.Id() == GAME_FO3) @@ -279,15 +272,12 @@ Launcher::Launcher(const wxChar *title, YAML::Node& settings, Game& game, const //Disable the menu items for the undetected games. GameMenu->FindItem(MENU_Oblivion)->Enable(false); - GameMenu->FindItem(MENU_Nehrim)->Enable(false); GameMenu->FindItem(MENU_Skyrim)->Enable(false); GameMenu->FindItem(MENU_Fallout3)->Enable(false); GameMenu->FindItem(MENU_FalloutNewVegas)->Enable(false); for (size_t i=0; i < _detectedGames.size(); i++) { if (_detectedGames[i] == GAME_TES4) GameMenu->FindItem(MENU_Oblivion)->Enable(); - else if (_detectedGames[i] == GAME_NEHRIM) - GameMenu->FindItem(MENU_Nehrim)->Enable(); else if (_detectedGames[i] == GAME_TES5) GameMenu->FindItem(MENU_Skyrim)->Enable(); else if (_detectedGames[i] == GAME_FO3) @@ -675,10 +665,6 @@ void Launcher::OnGameChange(wxCommandEvent& event) { _game = Game(GAME_TES4); _settings["Last Game"] = "oblivion"; break; - case MENU_Nehrim: - _game = Game(GAME_NEHRIM); - _settings["Last Game"] = "nehrim"; - break; case MENU_Skyrim: _game = Game(GAME_TES5); _settings["Last Game"] = "skyrim"; diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index c8dbbac0..65062938 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -44,7 +44,6 @@ SettingsFrame::SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node wxString Game[] = { translate("Autodetect"), wxT("Oblivion"), - wxT("Nehrim"), wxT("Skyrim"), wxT("Fallout 3"), wxT("Fallout: New Vegas"), @@ -59,12 +58,11 @@ SettingsFrame::SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node }; //Initialise controls. - GameChoice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 6, Game); + GameChoice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 5, Game); LanguageChoice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 1, Language); DebugVerbosityChoice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 4, DebugVerbosity); OblivionURL = new wxTextCtrl(this, wxID_ANY); - NehrimURL = new wxTextCtrl(this, wxID_ANY); SkyrimURL = new wxTextCtrl(this, wxID_ANY); FO3URL = new wxTextCtrl(this, wxID_ANY); FONVURL = new wxTextCtrl(this, wxID_ANY); @@ -101,9 +99,6 @@ SettingsFrame::SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node GridSizer->Add(new wxStaticText(this, wxID_ANY, translate("Oblivion Masterlist URL:")), leftItem); GridSizer->Add(OblivionURL, rightItem); - GridSizer->Add(new wxStaticText(this, wxID_ANY, translate("Nehrim Masterlist URL:")), leftItem); - GridSizer->Add(NehrimURL, rightItem); - GridSizer->Add(new wxStaticText(this, wxID_ANY, translate("Skyrim Masterlist URL:")), leftItem); GridSizer->Add(SkyrimURL, rightItem); @@ -157,14 +152,12 @@ void SettingsFrame::SetDefaultValues() { GameChoice->SetSelection(0); else if (game == "oblivion") GameChoice->SetSelection(1); - else if (game == "nehrim") - GameChoice->SetSelection(2); else if (game == "skyrim") - GameChoice->SetSelection(3); + GameChoice->SetSelection(2); else if (game == "fallout3") - GameChoice->SetSelection(4); + GameChoice->SetSelection(3); else if (game == "falloutnv") - GameChoice->SetSelection(5); + GameChoice->SetSelection(4); } if (_settings["Debug Verbosity"]) { @@ -188,9 +181,6 @@ void SettingsFrame::SetDefaultValues() { if (urls["Oblivion"]) OblivionURL->SetValue(FromUTF8(urls["Oblivion"].as())); - if (urls["Nehrim"]) - NehrimURL->SetValue(FromUTF8(urls["Nehrim"].as())); - if (urls["Skyrim"]) SkyrimURL->SetValue(FromUTF8(urls["Skyrim"].as())); @@ -213,15 +203,12 @@ void SettingsFrame::OnQuit(wxCommandEvent& event) { _settings["Game"] = "oblivion"; break; case 2: - _settings["Game"] = "nehrim"; - break; - case 3: _settings["Game"] = "skyrim"; break; - case 4: + case 3: _settings["Game"] = "fallout3"; break; - case 5: + case 4: _settings["Game"] = "falloutnv"; break; } @@ -240,8 +227,6 @@ void SettingsFrame::OnQuit(wxCommandEvent& event) { _settings["Masterlist URLs"]["Oblivion"] = string(OblivionURL->GetValue().ToUTF8()); - _settings["Masterlist URLs"]["Nehrim"] = string(NehrimURL->GetValue().ToUTF8()); - _settings["Masterlist URLs"]["Skyrim"] = string(SkyrimURL->GetValue().ToUTF8()); _settings["Masterlist URLs"]["Fallout 3"] = string(FO3URL->GetValue().ToUTF8()); diff --git a/src/gui/settings.h b/src/gui/settings.h index 89cb34fb..a12c3699 100644 --- a/src/gui/settings.h +++ b/src/gui/settings.h @@ -41,7 +41,6 @@ private: wxCheckBox *UpdateMasterlistBox; wxCheckBox *reportViewBox; wxTextCtrl *OblivionURL; - wxTextCtrl *NehrimURL; wxTextCtrl *SkyrimURL; wxTextCtrl *FO3URL; wxTextCtrl *FONVURL;