OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
win_localization.h
1/*
2===========================================================================
3Copyright (C) 2025 the OpenMoHAA team
4
5This file is part of OpenMoHAA source code.
6
7OpenMoHAA source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12OpenMoHAA source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OpenMoHAA source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23// localization.h : Localization for different languages
24// TODO
25
26#pragma once
27
28#include "q_shared.h"
29#include "qcommon.h"
30#include "../qcommon/localization.h"
31
32#ifdef __cplusplus
33# include "str.h"
34# include "container.h"
35
36typedef struct {
37 str m_refName;
38 str m_locName;
39 intptr_t m_r1_rep;
40 intptr_t m_r2_rep;
41 intptr_t m_r3_rep;
42 intptr_t m_l1_rep;
43 intptr_t m_l2_rep;
44 intptr_t m_l3_rep;
45} loc_entry_t;
46
47class cLocalization
48{
49 Container<loc_entry_t> m_entries;
50 Container<str> missing;
51
52public:
53 cLocalization();
54
55 const char *ConvertString(const char *var);
56
57private:
58 void LoadFile(const char *name);
59 void GenerateMissing(const char *file_name);
60};
61#endif
Definition str.h:77