aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/LevelSummary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.World/LevelSummary.cpp')
-rw-r--r--Minecraft.World/LevelSummary.cpp69
1 files changed, 69 insertions, 0 deletions
diff --git a/Minecraft.World/LevelSummary.cpp b/Minecraft.World/LevelSummary.cpp
new file mode 100644
index 00000000..d8e7ddee
--- /dev/null
+++ b/Minecraft.World/LevelSummary.cpp
@@ -0,0 +1,69 @@
+#include "stdafx.h"
+#include "LevelSummary.h"
+
+LevelSummary::LevelSummary(const wstring& levelId, const wstring& levelName, __int64 lastPlayed, __int64 sizeOnDisk, GameType *gameMode, bool requiresConversion, bool hardcore, bool hasCheats) :
+ levelId( levelId ),
+ levelName( levelName ),
+ lastPlayed( lastPlayed ),
+ sizeOnDisk( sizeOnDisk ),
+ gameMode( gameMode ),
+ requiresConversion( requiresConversion ),
+ hardcore( hardcore ),
+ _hasCheats( hasCheats )
+{
+}
+
+wstring LevelSummary::getLevelId()
+{
+ return levelId;
+}
+
+wstring LevelSummary::getLevelName()
+{
+ return levelName;
+}
+
+__int64 LevelSummary::getSizeOnDisk()
+{
+ return sizeOnDisk;
+}
+
+bool LevelSummary::isRequiresConversion()
+{
+ return requiresConversion;
+}
+
+__int64 LevelSummary::getLastPlayed()
+{
+ return lastPlayed;
+}
+
+int LevelSummary::compareTo(LevelSummary *rhs)
+{
+ if (lastPlayed < rhs->lastPlayed)
+ {
+ return 1;
+ }
+ if (lastPlayed > rhs->lastPlayed)
+ {
+ return -1;
+ }
+
+ // TODO 4J Jev, used to be compareTo in java, is this right?
+ return levelId.compare(rhs->levelId);
+}
+
+GameType *LevelSummary::getGameMode()
+{
+ return gameMode;
+}
+
+bool LevelSummary::isHardcore()
+{
+ return hardcore;
+}
+
+bool LevelSummary::hasCheats()
+{
+ return _hasCheats;
+} \ No newline at end of file