aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/StringTable.h
blob: 2353f81baaa34c5b7eb46682f54b3ff72c74577f (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
#pragma once

using namespace std;

#if defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__
#define LOCALE_COUNT 21
#elif defined _XBOX_ONE
#define LOCALE_COUNT 19
#else
#define LOCALE_COUNT 11
#endif

class StringTable
{
private:
	bool isStatic;

	unordered_map<wstring, wstring> m_stringsMap;
	vector<wstring> m_stringsVec;

	byteArray src;

public:

// 	enum eLocale
// 	{
// 		eLocale_Default=0,
// 		eLocale_American,
// 		eLocale_Japanese,
// 		eLocale_German,
// 		eLocale_French,
// 		eLocale_Spanish,
// 		eLocale_Italian,
// 		eLocale_Korean,
// 		eLocale_TradChinese,
// 		eLocale_Portuguese,
// 		eLocale_Brazilian,
// #if defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__
// 		eLocale_Russian,
// 		eLocale_Dutch,
// 		eLocale_Finish,
// 		eLocale_Swedish,
// 		eLocale_Danish,
// 		eLocale_Norwegian,
// 		eLocale_Polish,
// 		eLocale_Turkish,
// 		eLocale_LatinAmericanSpanish,
// 		eLocale_Greek,
// #elif defined _XBOX_ONE || defined _XBOX
// 		eLocale_British,
// 		eLocale_Irish,
// 		eLocale_Australian,
// 		eLocale_NewZealand,
// 		eLocale_Canadian,
// 		eLocale_Mexican,
// 		eLocale_FrenchCanadian,
// 		eLocale_Austrian,
// #endif
// 	};

	StringTable(void);
	StringTable(PBYTE pbData, DWORD dwSize);
	~StringTable(void);
	void ReloadStringTable();

	void getData(PBYTE *ppbData, UINT *pdwSize);

	LPCWSTR getString(const wstring &id);
	LPCWSTR getString(int id);

	//static LPCWSTR m_wchLocaleCode[LOCALE_COUNT];



private:
	//wstring getLangId(DWORD dwLanguage=0);
	void ProcessStringTableData(void);

};