about summary refs log tree commit diff
path: root/src/game/client/components/countryflags.h
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-06-29 22:27:32 +0200
committeroy <Tom_Adams@web.de>2011-06-29 22:27:32 +0200
commit123eab41c8e201da58ffbb6bb215716334bec652 (patch)
tree833b3e608d243f72e23fa7eacd5ccd980021fad0 /src/game/client/components/countryflags.h
parent8035e022fdefbf5ebbdd9a92d79fe7c3f1a76bdb (diff)
downloadzcatch-123eab41c8e201da58ffbb6bb215716334bec652.tar.gz
zcatch-123eab41c8e201da58ffbb6bb215716334bec652.zip
made it possible to filter by player country in the server browser. Closes #654
Diffstat (limited to 'src/game/client/components/countryflags.h')
-rw-r--r--src/game/client/components/countryflags.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/game/client/components/countryflags.h b/src/game/client/components/countryflags.h
index cd629094..15eb8598 100644
--- a/src/game/client/components/countryflags.h
+++ b/src/game/client/components/countryflags.h
@@ -20,11 +20,19 @@ public:
 	void OnInit();
 
 	int Num() const;
-	const CCountryFlag *Get(int Index) const;
-	int Find(int CountryCode) const;
+	const CCountryFlag *GetByCountryCode(int CountryCode) const;
+	const CCountryFlag *GetByIndex(int Index) const;
+	//int Find(int CountryCode) const;
 
 private:
+	enum
+	{
+		CODE_LB=-1,
+		CODE_UB=999,
+		CODE_RANGE=CODE_UB-CODE_LB+1,
+	};
 	sorted_array<CCountryFlag> m_aCountryFlags;
+	int m_CodeIndexLUT[CODE_RANGE];
 
 	void LoadCountryflagsIndexfile();
 };