about summary refs log tree commit diff
path: root/src/game/localization.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/localization.hpp')
-rw-r--r--src/game/localization.hpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/game/localization.hpp b/src/game/localization.hpp
deleted file mode 100644
index 3f79d687..00000000
--- a/src/game/localization.hpp
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <base/tl/string.hpp>
-#include <base/tl/sorted_array.hpp>
-
-class LOCALIZATIONDATABASE
-{
-	class STRING
-	{
-	public:
-		unsigned hash;
-		
-		// TODO: do this as an const char * and put everything on a incremental heap
-		string replacement;
-
-		bool operator <(const STRING &other) const { return hash < other.hash; }
-		bool operator <=(const STRING &other) const { return hash <= other.hash; }
-		bool operator ==(const STRING &other) const { return hash == other.hash; }
-	};
-
-	sorted_array<STRING> strings;
-	int current_version;
-	
-public:
-	LOCALIZATIONDATABASE();
-
-	bool load(const char *filename);
-
-	int version() { return current_version; }
-	
-	void add_string(const char *org_str, const char *new_str);
-	const char *find_string(unsigned hash);
-};
-
-extern LOCALIZATIONDATABASE localization;
-
-class LOC_CONSTSTRING
-{
-	const char *default_str;
-	const char *current_str;
-	unsigned hash;
-	int version;
-public:
-	LOC_CONSTSTRING(const char *str);
-	void reload();
-	
-	inline operator const char *()
-	{
-		if(version != localization.version())
-			reload();
-		return current_str;
-	}
-};
-
-
-extern const char *localize(const char *str);