mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
remove lying, outdated or superfluous comments
no more guards, no more cpp files included
This commit is contained in:
committed by
majcosta
parent
fd2c74727e
commit
00a805cc39
@@ -1,10 +1,4 @@
|
|||||||
// All eight languages' string tables in one translation unit (docs/plans/
|
#include "Text.h"
|
||||||
// language-design.md): each base + Ja2.5-carryover text file is included inside its
|
|
||||||
// own per-language namespace, the game-facing table symbols are the pointer globals
|
|
||||||
// below (statically bound to the build default), and BindLanguageStrings rebinds all
|
|
||||||
// of them to the language resolved at startup from the LANGUAGE ini key.
|
|
||||||
|
|
||||||
#include "Text.h"
|
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "Scheduling.h"
|
#include "Scheduling.h"
|
||||||
#include "EditorMercs.h"
|
#include "EditorMercs.h"
|
||||||
@@ -14,11 +8,6 @@
|
|||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
// Recipe R1 (docs/plans/language-design.md): the loose _<LANG>Text.cpp files are still
|
|
||||||
// compiled standalone until Cn+2, and #include the headers declaring the now-pointer
|
|
||||||
// externs themselves; this guard keeps their array definitions out of those standalone
|
|
||||||
// TUs (which would collide with the pointer extern) while still compiling them here.
|
|
||||||
|
|
||||||
namespace lang_en {
|
namespace lang_en {
|
||||||
#include "_EnglishText.cpp"
|
#include "_EnglishText.cpp"
|
||||||
#include "_Ja25EnglishText.cpp"
|
#include "_Ja25EnglishText.cpp"
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
#include "DEBUG.H"
|
#include "DEBUG.H"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
// Cn+4 retired the per-exe ENGLISH/GERMAN/... compile definitions along with the CMake
|
|
||||||
// language axis, so the build default is now a fixed constant; the ini key (below)
|
|
||||||
// overrides it at runtime via g_lang/BindLanguageStrings.
|
|
||||||
constexpr i18n::Lang kBuildDefaultLang = i18n::Lang::en;
|
constexpr i18n::Lang kBuildDefaultLang = i18n::Lang::en;
|
||||||
|
|
||||||
auto RowsForLang(i18n::Lang lang) -> int {
|
auto RowsForLang(i18n::Lang lang) -> int {
|
||||||
@@ -12,10 +9,6 @@ auto RowsForLang(i18n::Lang lang) -> int {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* g_lang used to be a compile-time const picked by the ENGLISH/GERMAN/...
|
|
||||||
* define; it is now a runtime value that starts at the build's default and
|
|
||||||
* can be overridden at startup from the [Ja2 Settings] LANGUAGE ini key (see
|
|
||||||
* SetLanguageFromName / sgp.cpp GetRuntimeSettings). */
|
|
||||||
i18n::Lang g_lang = kBuildDefaultLang;
|
i18n::Lang g_lang = kBuildDefaultLang;
|
||||||
|
|
||||||
int MAX_MESSAGES_ON_MAP_BOTTOM = RowsForLang(g_lang);
|
int MAX_MESSAGES_ON_MAP_BOTTOM = RowsForLang(g_lang);
|
||||||
|
|||||||
Reference in New Issue
Block a user