diff options
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/fallout3info.cpp | 5 | ||||
| -rw-r--r-- | src/shared/fallout3info.h | 2 | ||||
| -rw-r--r-- | src/shared/falloutnvinfo.cpp | 5 | ||||
| -rw-r--r-- | src/shared/falloutnvinfo.h | 2 | ||||
| -rw-r--r-- | src/shared/gameinfo.cpp | 13 | ||||
| -rw-r--r-- | src/shared/gameinfo.h | 20 | ||||
| -rw-r--r-- | src/shared/oblivioninfo.cpp | 9 | ||||
| -rw-r--r-- | src/shared/oblivioninfo.h | 2 | ||||
| -rw-r--r-- | src/shared/skyriminfo.cpp | 5 | ||||
| -rw-r--r-- | src/shared/skyriminfo.h | 2 |
10 files changed, 6 insertions, 59 deletions
diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 008a046c..797d68ec 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -63,11 +63,6 @@ std::wstring Fallout3Info::getRegPathStatic() }
-std::vector<std::wstring> Fallout3Info::getSavegameAttachmentExtensions() const
-{
- return std::vector<std::wstring>();
-}
-
std::vector<std::wstring> Fallout3Info::getIniFileNames() const
{
return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini");
diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 21356924..5cf98e3b 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -37,8 +37,6 @@ public: static std::wstring getRegPathStatic();
virtual std::wstring getRegPath() const { return getRegPathStatic(); }
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const;
-
// file name of this games ini (no path)
virtual std::vector<std::wstring> getIniFileNames() const;
diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index 80d2fba5..6347224d 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -63,11 +63,6 @@ std::wstring FalloutNVInfo::getRegPathStatic() }
}
-std::vector<std::wstring> FalloutNVInfo::getSavegameAttachmentExtensions() const
-{
- return std::vector<std::wstring>();
-}
-
std::vector<std::wstring> FalloutNVInfo::getIniFileNames() const
{
return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini");
diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 4bffff3f..04c13c7d 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -38,8 +38,6 @@ public: static std::wstring getRegPathStatic();
virtual std::wstring getRegPath() const { return getRegPathStatic(); }
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const;
-
// file name of this games ini (no path)
virtual std::vector<std::wstring> getIniFileNames() const;
diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index e77b9d17..5c13a520 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -134,19 +134,6 @@ std::wstring GameInfo::getGameDirectory() const return m_GameDirectory;
}
-std::wstring GameInfo::getLocalAppFolder() const
-{
- wchar_t localAppFolder[MAX_PATH];
- memset(localAppFolder, '\0', MAX_PATH * sizeof(wchar_t));
-
- if (::SHGetFolderPathW(nullptr, CSIDL_LOCAL_APPDATA, nullptr, SHGFP_TYPE_CURRENT, localAppFolder) == S_OK) {
- return localAppFolder;
- } else {
- // fallback: try the registry
- return getSpecialPath(L"Local AppData");
- }
-}
-
std::wstring GameInfo::getSpecialPath(LPCWSTR name) const
{
HKEY key;
diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index a5c615cf..7bc86d3a 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -42,20 +42,16 @@ public: virtual ~GameInfo() {}
- //**USED IN HOOKDLL and savegame code
- static GameInfo& instance();
-
- //**Used only in savegame which needs refactoring a lot.
- // get a list of file extensions for additional files belonging to a save game
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const = 0;
+ //**USED IN HOOKDLL and at startup to set up for hookdll to work
+ // initialise with the path to the mo directory (needs to be where hook.dll is stored). This
+ // needs to be called before the instance can be retrieved
+ static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L"");
//**USED ONLY IN HOOKDLL
- virtual std::wstring getGameDirectory() const;
+ static GameInfo& instance();
//**USED ONLY IN HOOKDLL
- // initialise with the path to the mo directory (needs to be where hook.dll is stored). This
- // needs to be called before the instance can be retrieved
- static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L"");
+ virtual std::wstring getGameDirectory() const;
//**USED ONLY IN HOOKDLL
virtual std::wstring getRegPath() const = 0;
@@ -74,12 +70,8 @@ protected: GameInfo(const std::wstring &gameDirectory);
- std::wstring getLocalAppFolder() const;
- const std::wstring &getMyGamesDirectory() const { return m_MyGamesDirectory; }
void identifyMyGamesDirectory(const std::wstring &file);
- bool isValidModURL(int modID, const std::wstring &url, const std::wstring &alt) const;
-
private:
static bool identifyGame(const std::wstring &searchPath);
diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index 8f1f1843..b50f1daa 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -63,15 +63,6 @@ std::wstring OblivionInfo::getRegPathStatic() }
}
-
-
-
-std::vector<std::wstring> OblivionInfo::getSavegameAttachmentExtensions() const
-{
- return boost::assign::list_of(L"obse");
-}
-
-
std::vector<std::wstring> OblivionInfo::getIniFileNames() const
{
return boost::assign::list_of(L"oblivion.ini")(L"oblivionprefs.ini");
diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index fc949f4b..bf0b2707 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -36,8 +36,6 @@ public: static std::wstring getRegPathStatic();
virtual std::wstring getRegPath() const { return getRegPathStatic(); }
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const;
-
// file name of this games ini (no path)
virtual std::vector<std::wstring> getIniFileNames() const;
diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index d255e60f..9662e66d 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -73,11 +73,6 @@ std::wstring SkyrimInfo::getRegPathStatic() }
}
-std::vector<std::wstring> SkyrimInfo::getSavegameAttachmentExtensions() const
-{
- return boost::assign::list_of(L"skse");
-}
-
std::vector<std::wstring> SkyrimInfo::getIniFileNames() const
{
return boost::assign::list_of(L"skyrim.ini")(L"skyrimprefs.ini");
diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index ac979d20..bd329403 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -38,8 +38,6 @@ public: static std::wstring getRegPathStatic();
virtual std::wstring getRegPath() const { return getRegPathStatic(); }
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const;
-
// file name of this games ini (no path)
virtual std::vector<std::wstring> getIniFileNames() const;
|
