aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/LevelSummary.cpp
blob: d8e7ddee7e347776ccb49291227b43277be22543 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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;
}