aboutsummaryrefslogtreecommitdiff
path: root/libs/game_gamebryo/src/gamebryo/gamebryoscriptextender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/game_gamebryo/src/gamebryo/gamebryoscriptextender.cpp')
-rw-r--r--libs/game_gamebryo/src/gamebryo/gamebryoscriptextender.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/libs/game_gamebryo/src/gamebryo/gamebryoscriptextender.cpp b/libs/game_gamebryo/src/gamebryo/gamebryoscriptextender.cpp
new file mode 100644
index 0000000..e3f709a
--- /dev/null
+++ b/libs/game_gamebryo/src/gamebryo/gamebryoscriptextender.cpp
@@ -0,0 +1,46 @@
+#include "gamebryoscriptextender.h"
+
+#include "gamegamebryo.h"
+
+#include "utility.h"
+
+#include <QDir>
+#include <QString>
+
+GamebryoScriptExtender::GamebryoScriptExtender(const GameGamebryo* game) : m_Game(game)
+{}
+
+GamebryoScriptExtender::~GamebryoScriptExtender() {}
+
+QString GamebryoScriptExtender::loaderName() const
+{
+ return BinaryName();
+}
+
+QString GamebryoScriptExtender::loaderPath() const
+{
+ return m_Game->gameDirectory().absoluteFilePath(loaderName());
+}
+
+QString GamebryoScriptExtender::savegameExtension() const
+{
+ return m_Game->savegameSEExtension();
+}
+
+bool GamebryoScriptExtender::isInstalled() const
+{
+ // A note: It is possibly also OK if xxse_steam_loader.dll exists, but it's
+ // not clear why that would exist and the exe not if you'd installed it per
+ // instructions, and it'd mess up NCC installs a treat.
+ return m_Game->gameDirectory().exists(loaderName());
+}
+
+QString GamebryoScriptExtender::getExtenderVersion() const
+{
+ return MOBase::getFileVersion(m_Game->gameDirectory().absoluteFilePath(loaderName()));
+}
+
+WORD GamebryoScriptExtender::getArch() const
+{
+ return m_Game->getArch(loaderName());
+}