aboutsummaryrefslogtreecommitdiff
path: root/libs/game_gamebryo/src/gamebryo/gamebryoscriptextender.cpp
blob: e3f709a694a34ac070f3f55d5e794a29e68e6477 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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());
}