mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
************************************************************
* Merged Source Code from Development Trunk: Revision 4063 * ************************************************************ - Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - This will be the Source for the Beta 2011 Test git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#include "ImportStrings.h"
|
||||
#include "LocalizedStrings.h"
|
||||
#include "Language Defines.h"
|
||||
|
||||
#include <vfs/Tools/vfs_tools.h>
|
||||
#include <vfs/Core/vfs.h>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
void Loc::ImportStrings()
|
||||
{
|
||||
Loc::AssociateWithFile(Loc::AIM_BIOGRAPHY, L"Localization/AimBiographies.xml");
|
||||
Loc::AssociateWithFile(Loc::AIM_HISTORY, L"Localization/AimHistory.xml");
|
||||
Loc::AssociateWithFile(Loc::AIM_POLICY, L"Localization/AimPolicy.xml");
|
||||
Loc::AssociateWithFile(Loc::GAME_STRINGS, L"Localization/GameStrings.xml");
|
||||
|
||||
vfs::String bio, add, bio2;
|
||||
Loc::GetString(Loc::AIM_BIOGRAPHY,L"Bio",L"0",add);
|
||||
Loc::GetString(Loc::AIM_BIOGRAPHY,L"Add",L"10",bio);
|
||||
Loc::GetString(Loc::AIM_BIOGRAPHY,L"Bio",23,bio2);
|
||||
|
||||
for(int i=0; i<200; ++i)
|
||||
{
|
||||
std::wstringstream wss;
|
||||
for(int exp=2; exp>=0; --exp)
|
||||
{
|
||||
int t = (int)std::pow((double)10,(double)exp);
|
||||
wss << (i % (t*10)) / t;
|
||||
}
|
||||
vfs::String s = wss.str() + L".EDT.xml";
|
||||
vfs::Path filename(L"Localization/Dialogue");
|
||||
filename += vfs::Path(s);
|
||||
if(getVFS()->fileExists(filename))
|
||||
{
|
||||
Loc::AssociateWithFile(Loc::DIALOGUE,filename,vfs::toString<wchar_t>(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user