-
Notifications
You must be signed in to change notification settings - Fork 0
/
Minecraft.cpp
80 lines (64 loc) · 2.32 KB
/
Minecraft.cpp
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#include "Minecraft.h"
using namespace Sparrow;
using namespace Sparrow::utils;
Sparrow::MinecraftVersion::MinecraftVersion(void)
{
}
Sparrow::MinecraftVersion::MinecraftVersion(const QString& version, const enum versionType& type, const fileInfo& assetIndex, const QString& assetVersion, const fileInfo& clientJar, const QVector<fileInfo>& libs, const QString& mainClass) : version(version), type(type), assetIndex(assetIndex), assetVersion(assetVersion), clientJar(clientJar), libs(libs), mainClass(mainClass)
{
}
bool MinecraftVersion::operator<(const MinecraftVersion& b) {
return this->version < b.version;
}
bool Sparrow::MinecraftVersion::operator<(const QString& b)
{
return this->version < b;
}
bool Sparrow::MinecraftVersion::operator==(const MinecraftVersion& b)
{
return this->version == b.version;
}
bool Sparrow::MinecraftVersion::operator==(const QString& b)
{
return this->version == b;
}
bool Sparrow::MinecraftVersion::operator>(const MinecraftVersion& b)
{
return this->version > b.version;
}
bool Sparrow::MinecraftVersion::operator>(const QString& b)
{
return this->version > b;
}
bool Sparrow::MinecraftVersion::operator<=(const MinecraftVersion& b)
{
return this->version < b.version || this->version == b.version;
}
bool Sparrow::MinecraftVersion::operator<=(const QString& b)
{
return this->version < b|| this->version == b;
}
bool Sparrow::MinecraftVersion::operator>=(const MinecraftVersion& b)
{
return this->version > b.version || this->version == b.version;
}
bool Sparrow::MinecraftVersion::operator>=(const QString& b)
{
return this->version > b || this->version == b;
}
Sparrow::MinecraftDirectory::MinecraftDirectory(void)
{
}
Sparrow::MinecraftDirectory::MinecraftDirectory(const QString& rootDir)
{
this->rootDir = QDir(rootDir);
this->assetsDir = QDir(rootDir + "/assets");
this->crash_reportsDir = QDir(rootDir + "/crash-reports");
this->librariesDir = QDir(rootDir + "/libraries");
this->resourcepacksDir = QDir(rootDir + "/resourcepacks");
this->savesDir = QDir(rootDir + "/saves");
this->versionsDir = QDir(rootDir + "/versionsDir");
}
Sparrow::Minecraft::Minecraft(const MinecraftVersion& version, const MinecraftDirectory& root, const QDir& path, const QString& clientJarFile, const QString& jsonFile) : version(version), root(root), path(path), clientJarFile(clientJarFile), jsonFile(jsonFile)
{
}