mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
give more local functions internal linkage
This commit is contained in:
committed by
majcosta
parent
af4eeb09f4
commit
4be9b106f4
+9
-11
@@ -354,8 +354,7 @@ bool Loc::ExportStrings()
|
|||||||
#include <vfs/Core/vfs_file_raii.h>
|
#include <vfs/Core/vfs_file_raii.h>
|
||||||
#include "Encrypted File.h"
|
#include "Encrypted File.h"
|
||||||
|
|
||||||
namespace Loc
|
namespace {
|
||||||
{
|
|
||||||
wchar_t ToPolish(wchar_t siChar)
|
wchar_t ToPolish(wchar_t siChar)
|
||||||
{
|
{
|
||||||
switch( siChar )
|
switch( siChar )
|
||||||
@@ -472,6 +471,7 @@ namespace Loc
|
|||||||
}
|
}
|
||||||
return siChar;
|
return siChar;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Translate(vfs::String::char_t* str, int len, i18n::Lang lang)
|
bool Translate(vfs::String::char_t* str, int len, i18n::Lang lang)
|
||||||
{
|
{
|
||||||
switch (lang) {
|
switch (lang) {
|
||||||
@@ -498,9 +498,7 @@ namespace Loc
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}; // namespace Loc
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
void ExportMercBio()
|
void ExportMercBio()
|
||||||
{
|
{
|
||||||
#define SIZE_MERC_BIO_INFO 400 * 2
|
#define SIZE_MERC_BIO_INFO 400 * 2
|
||||||
@@ -519,12 +517,12 @@ void ExportMercBio()
|
|||||||
//
|
//
|
||||||
file.read((vfs::Byte*)pInfoString, SIZE_MERC_BIO_INFO);
|
file.read((vfs::Byte*)pInfoString, SIZE_MERC_BIO_INFO);
|
||||||
DecodeString(pInfoString,SIZE_MERC_BIO_INFO);
|
DecodeString(pInfoString,SIZE_MERC_BIO_INFO);
|
||||||
Loc::Translate(pInfoString, SIZE_MERC_BIO_INFO, g_lang);
|
Translate(pInfoString, SIZE_MERC_BIO_INFO, g_lang);
|
||||||
props.setStringProperty(L"Bio", vfs::toString<wchar_t>(i), pInfoString);
|
props.setStringProperty(L"Bio", vfs::toString<wchar_t>(i), pInfoString);
|
||||||
|
|
||||||
file.read((vfs::Byte*)pAddInfo, SIZE_MERC_ADDITIONAL_INFO);
|
file.read((vfs::Byte*)pAddInfo, SIZE_MERC_ADDITIONAL_INFO);
|
||||||
DecodeString(pAddInfo, SIZE_MERC_ADDITIONAL_INFO);
|
DecodeString(pAddInfo, SIZE_MERC_ADDITIONAL_INFO);
|
||||||
Loc::Translate(pAddInfo, SIZE_MERC_ADDITIONAL_INFO, g_lang);
|
Translate(pAddInfo, SIZE_MERC_ADDITIONAL_INFO, g_lang);
|
||||||
props.setStringProperty(L"Add", vfs::toString<wchar_t>(i), pAddInfo);
|
props.setStringProperty(L"Add", vfs::toString<wchar_t>(i), pAddInfo);
|
||||||
}
|
}
|
||||||
props.writeToXMLFile(L"Localization/AimBiographies.xml", vfs::PropertyContainer::TagMap());
|
props.writeToXMLFile(L"Localization/AimBiographies.xml", vfs::PropertyContainer::TagMap());
|
||||||
@@ -544,7 +542,7 @@ void ExportAIMHistory()
|
|||||||
//
|
//
|
||||||
file.read((vfs::Byte*)pHistLine, AIM_HISTORY_LINE_SIZE);
|
file.read((vfs::Byte*)pHistLine, AIM_HISTORY_LINE_SIZE);
|
||||||
DecodeString(pHistLine,AIM_HISTORY_LINE_SIZE);
|
DecodeString(pHistLine,AIM_HISTORY_LINE_SIZE);
|
||||||
Loc::Translate(pHistLine, AIM_HISTORY_LINE_SIZE, g_lang);
|
Translate(pHistLine, AIM_HISTORY_LINE_SIZE, g_lang);
|
||||||
props.setStringProperty(L"Line", vfs::toString<wchar_t>(i), pHistLine);
|
props.setStringProperty(L"Line", vfs::toString<wchar_t>(i), pHistLine);
|
||||||
}
|
}
|
||||||
props.writeToXMLFile(L"Localization/AimHistory.xml", vfs::PropertyContainer::TagMap());
|
props.writeToXMLFile(L"Localization/AimHistory.xml", vfs::PropertyContainer::TagMap());
|
||||||
@@ -565,7 +563,7 @@ void ExportAIMPolicy()
|
|||||||
//
|
//
|
||||||
file.read((vfs::Byte*)pPolLine, AIM_HISTORY_LINE_SIZE);
|
file.read((vfs::Byte*)pPolLine, AIM_HISTORY_LINE_SIZE);
|
||||||
DecodeString(pPolLine,AIM_HISTORY_LINE_SIZE);
|
DecodeString(pPolLine,AIM_HISTORY_LINE_SIZE);
|
||||||
Loc::Translate(pPolLine, AIM_HISTORY_LINE_SIZE, g_lang);
|
Translate(pPolLine, AIM_HISTORY_LINE_SIZE, g_lang);
|
||||||
props.setStringProperty(L"Line", vfs::toString<wchar_t>(i), pPolLine);
|
props.setStringProperty(L"Line", vfs::toString<wchar_t>(i), pPolLine);
|
||||||
}
|
}
|
||||||
props.writeToXMLFile(L"Localization/AimPolicy.xml", vfs::PropertyContainer::TagMap());
|
props.writeToXMLFile(L"Localization/AimPolicy.xml", vfs::PropertyContainer::TagMap());
|
||||||
@@ -585,7 +583,7 @@ void ExportAlumniName()
|
|||||||
//
|
//
|
||||||
file.read((vfs::Byte*)pAlumniName, AIM_ALUMNI_NAME_SIZE);
|
file.read((vfs::Byte*)pAlumniName, AIM_ALUMNI_NAME_SIZE);
|
||||||
DecodeString(pAlumniName,AIM_ALUMNI_NAME_SIZE);
|
DecodeString(pAlumniName,AIM_ALUMNI_NAME_SIZE);
|
||||||
Loc::Translate(pAlumniName, AIM_ALUMNI_NAME_SIZE, g_lang);
|
Translate(pAlumniName, AIM_ALUMNI_NAME_SIZE, g_lang);
|
||||||
props.setStringProperty(L"Line", vfs::toString<wchar_t>(i), pAlumniName);
|
props.setStringProperty(L"Line", vfs::toString<wchar_t>(i), pAlumniName);
|
||||||
}
|
}
|
||||||
props.writeToXMLFile(L"Localization/AlumniName.xml", vfs::PropertyContainer::TagMap());
|
props.writeToXMLFile(L"Localization/AlumniName.xml", vfs::PropertyContainer::TagMap());
|
||||||
@@ -615,7 +613,7 @@ void ExportDialogues()
|
|||||||
if(file.read((vfs::Byte*)pDiagLine, DIALOGUESIZE) > 0)
|
if(file.read((vfs::Byte*)pDiagLine, DIALOGUESIZE) > 0)
|
||||||
{
|
{
|
||||||
DecodeString(pDiagLine,DIALOGUESIZE);
|
DecodeString(pDiagLine,DIALOGUESIZE);
|
||||||
Loc::Translate(pDiagLine, DIALOGUESIZE, g_lang);
|
Translate(pDiagLine, DIALOGUESIZE, g_lang);
|
||||||
if(wcslen(pDiagLine))
|
if(wcslen(pDiagLine))
|
||||||
{
|
{
|
||||||
props.setStringProperty(vfs::toString<wchar_t>(id),vfs::toString<wchar_t>(i), pDiagLine);
|
props.setStringProperty(vfs::toString<wchar_t>(id),vfs::toString<wchar_t>(i), pDiagLine);
|
||||||
@@ -662,7 +660,7 @@ void ExportNPCDialogues()
|
|||||||
if(file.read((vfs::Byte*)pDiagLine, SIZE) > 0)
|
if(file.read((vfs::Byte*)pDiagLine, SIZE) > 0)
|
||||||
{
|
{
|
||||||
DecodeString(pDiagLine,SIZE);
|
DecodeString(pDiagLine,SIZE);
|
||||||
Loc::Translate(pDiagLine, SIZE, g_lang);
|
Translate(pDiagLine, SIZE, g_lang);
|
||||||
if(wcslen(pDiagLine))
|
if(wcslen(pDiagLine))
|
||||||
{
|
{
|
||||||
props.setStringProperty(id,vfs::toString<wchar_t>(i), pDiagLine);
|
props.setStringProperty(id,vfs::toString<wchar_t>(i), pDiagLine);
|
||||||
|
|||||||
Reference in New Issue
Block a user