aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Durango/Leaderboards/DurangoStatsDebugger.h
blob: f2ac0383aed5b59437b3da13b0c8ae0db72dc6a9 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#pragma once

#include "stdafx.h"

namespace P = Platform;
namespace PC = Platform::Collections;
namespace WF = Windows::Foundation;
namespace WFC = Windows::Foundation::Collections;
namespace MXSL = Microsoft::Xbox::Services::Leaderboard;

class StatParam
{
private:
	wstring m_base;
	int m_numArgs;
	
	vector<int> m_args;

public:
	StatParam(const wstring &base);

	void addArgs(int v1, ...);

	vector<wstring> *getStats();

};


class DurangoStatsDebugger
{
protected:
	static DurangoStatsDebugger *instance;

	enum 
	{
		ioid_Arrow = 10,

		ioid_Spiderjocky = 49,
		ioid_Creeper = 50,
		ioid_Skeleton,
		ioid_Spider,
		ioid_Giant,
		ioid_Zombie,
		ioid_Slime,
		ioid_Ghast,
		ioid_PigZombie,
		ioid_Enderman,
		ioid_CaveSpider,
		ioid_Silverfish,
		ioid_Blaze,
		ioid_LavaSlime,
		ioid_EnderDragon,

		ioid_Pig  = 90,
		ioid_Sheep,
		ioid_Cow,
		ioid_Chicken,
		ioid_Squid,
		ioid_Wolf,
		ioid_MushroomCow,
		ioid_SnowMan,
		ioid_Ozelot,
		ioid_VillagerGolem,
	};

	DurangoStatsDebugger();

	vector<StatParam *> m_stats;

	vector<wstring> *getStats();

public:
	static DurangoStatsDebugger *Initialize();

	static void PrintStats(int iPad);

private:
	vector<wstring> m_printQueue;

	void retrieveStats(int iPad);

	typedef struct 
	{
		int			m_iPad;
		wstring		m_statName;
		wstring		m_score;
	} StatResult;

	CRITICAL_SECTION m_retrievedStatsLock;

	vector<StatResult> m_retrievedStats;

	void addRetrievedStat(StatResult result);
};