Skip to content

Commit

Permalink
Added xrUICore project. Some ui files moved to xrUICore
Browse files Browse the repository at this point in the history
  • Loading branch information
qweasdd136963 authored and Xottab-DUTY committed Sep 10, 2018
1 parent b77d0a1 commit 94acc9a
Show file tree
Hide file tree
Showing 457 changed files with 4,850 additions and 4,313 deletions.
7 changes: 7 additions & 0 deletions res/gamedata/configs/localization.ltx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[string_table]
language = rus
font_prefix = ;_west ;_cent

[Languages]
eng
rus
6 changes: 6 additions & 0 deletions src/Common/CommonImportExport.inl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
#define XRSOUND_API XR_IMPORT
#endif

#ifdef XRUICORE_EXPORTS
#define XRUICORE_API XR_EXPORT
#else
#define XRUICORE_API XR_IMPORT
#endif

#ifndef ENGINE_API
#ifndef NO_ENGINE_API
#ifdef ENGINE_BUILD
Expand Down
2 changes: 2 additions & 0 deletions src/Include/xrAPI/xrAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class CRender;
class CScriptEngine;
class AISpaceBase;
class ISoundManager;
class ui_core;

class XRAPI_API EngineGlobalEnvironment
{
Expand All @@ -27,6 +28,7 @@ class XRAPI_API EngineGlobalEnvironment
CScriptEngine* ScriptEngine;
AISpaceBase* AISpace;
ISoundManager* Sound;
ui_core* UI;

bool isEditor;
bool isDedicatedServer;
Expand Down
14 changes: 14 additions & 0 deletions src/engine.sln
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrECore", "editors\xrECore\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrEditor", "editors\xrEditor\xrEditor.vcxproj", "{BE4B23E7-2CA8-4607-A473-116C4242F23D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrUICore", "xrUICore\xrUICore.vcxproj", "{37B3642C-B706-4C93-BC54-BADADC8FC9B1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand Down Expand Up @@ -1125,6 +1127,18 @@ Global
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Release|x64.Build.0 = Release|x64
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Release|x86.ActiveCfg = Release|Win32
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Release|x86.Build.0 = Release|Win32
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Debug|x64.ActiveCfg = Debug|x64
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Debug|x64.Build.0 = Debug|x64
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Debug|x86.ActiveCfg = Debug|Win32
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Debug|x86.Build.0 = Debug|Win32
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Mixed|x64.ActiveCfg = Mixed|x64
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Mixed|x64.Build.0 = Mixed|x64
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Mixed|x86.ActiveCfg = Mixed|Win32
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Mixed|x86.Build.0 = Mixed|Win32
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Release|x64.ActiveCfg = Release|x64
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Release|x64.Build.0 = Release|x64
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Release|x86.ActiveCfg = Release|Win32
{37B3642C-B706-4C93-BC54-BADADC8FC9B1}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
52 changes: 1 addition & 51 deletions src/utils/xrSE_Factory/xrUIXmlParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,59 +14,9 @@ shared_str CUIXml::correct_file_name(pcstr path, pcstr fn)
return fn;
}

//#define LOG_ALL_XMLS
#ifdef LOG_ALL_XMLS
int ListXmlCount = 0;
struct DBGList_
{
int num;
bool closed;
};
xr_vector<DBGList_> dbg_list_xmls;
void dump_list_xmls()
{
Msg("------Total xmls %d", dbg_list_xmls.size());
xr_vector<DBGList_>::iterator _it = dbg_list_xmls.begin();
for (; _it != dbg_list_xmls.end(); ++_it)
if (!(*_it).closed)
Msg("--leak detected ---- xml = %d", (*_it).num);
}
#else
void dump_list_xmls() {}
#endif

CUIXml::CUIXml()
{
#ifdef LOG_ALL_XMLS
ListXmlCount++;
m_dbg_id = ListXmlCount;
dbg_list_xmls.push_back(DBGList_());
dbg_list_xmls.back().num = m_dbg_id;
dbg_list_xmls.back().closed = false;
#endif
}

CUIXml::~CUIXml()
{
#ifdef LOG_ALL_XMLS
xr_vector<DBGList_>::iterator _it = dbg_list_xmls.begin();
bool bOK = false;
for (; _it != dbg_list_xmls.end(); ++_it)
{
if ((*_it).num == m_dbg_id && !(*_it).closed)
{
bOK = true;
(*_it).closed = true;
dbg_list_xmls.erase(_it);
break;
}
if ((*_it).num == m_dbg_id && (*_it).closed)
{
Msg("--XML [%d] already deleted", m_dbg_id);
bOK = true;
}
}
if (!bOK)
Msg("CUIXml::~CUIXml.[%d] cannot find xml in list", m_dbg_id);
#endif
}
{}
4 changes: 4 additions & 0 deletions src/xrEngine/StringTable/IStringTable.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "stdafx.h"
#include "IStringTable.h"

IStringTable* gStringTable = nullptr;
18 changes: 18 additions & 0 deletions src/xrEngine/StringTable/IStringTable.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//////////////////////////////////////////////////////////////////////////
// string_table.h: таблица строк, используемых в игре
//////////////////////////////////////////////////////////////////////////

#pragma once
#include "xrEngine/StringTable/IStringTableDefs.h"
#include "xrCommon/xr_map.h"

class IStringTable
{
public:
virtual ~IStringTable() {};

virtual STRING_VALUE translate(const STRING_ID& str_id) const = 0;
virtual void rescan() = 0;
};

extern ENGINE_API IStringTable* gStringTable;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
#include "xrCore/xrstring.h"

typedef shared_str STRING_ID;
//. typedef int STRING_INDEX;
typedef shared_str STRING_VALUE;

//. #define NO_STRING STRING_INDEX(-1)
5 changes: 5 additions & 0 deletions src/xrEngine/xrEngine.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@
<ClInclude Include="Stats.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="std_classes.h" />
<ClInclude Include="StringTable\IStringTable.h" />
<ClInclude Include="StringTable\IStringTableDefs.h" />
<ClInclude Include="Text_Console.h" />
<ClInclude Include="thunderbolt.h" />
<ClInclude Include="tntQAVI.h" />
Expand All @@ -278,6 +280,7 @@
<ClInclude Include="xr_collide_form.h" />
<ClInclude Include="xr_efflensflare.h" />
<ClInclude Include="xr_input.h" />
<ClInclude Include="xr_input_xinput.h" />
<ClInclude Include="XR_IOConsole.h" />
<ClInclude Include="xr_ioc_cmd.h" />
<ClInclude Include="xr_object.h" />
Expand Down Expand Up @@ -372,6 +375,7 @@
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="StringTable\IStringTable.cpp" />
<ClCompile Include="Text_Console.cpp" />
<ClCompile Include="Text_Console_WndProc.cpp" />
<ClCompile Include="thunderbolt.cpp" />
Expand All @@ -385,6 +389,7 @@
<ClCompile Include="xr_collide_form.cpp" />
<ClCompile Include="xr_efflensflare.cpp" />
<ClCompile Include="xr_input.cpp" />
<ClCompile Include="xr_input_xinput.cpp" />
<ClCompile Include="XR_IOConsole.cpp" />
<ClCompile Include="XR_IOConsole_callback.cpp" />
<ClCompile Include="XR_IOConsole_control.cpp" />
Expand Down
18 changes: 18 additions & 0 deletions src/xrEngine/xrEngine.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@
<Filter Include="Rendering Device">
<UniqueIdentifier>{e4d34774-3a5b-468f-9400-12c702636fa1}</UniqueIdentifier>
</Filter>
<Filter Include="Game API\StringTable">
<UniqueIdentifier>{948b4643-0f42-4027-ac44-dbe3702887f4}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="defines.h">
Expand Down Expand Up @@ -564,6 +567,15 @@
<ClInclude Include="Stats.h">
<Filter>Rendering Device</Filter>
</ClInclude>
<ClInclude Include="xr_input_xinput.h">
<Filter>Interfaces\Input</Filter>
</ClInclude>
<ClInclude Include="StringTable\IStringTable.h">
<Filter>Game API\StringTable</Filter>
</ClInclude>
<ClInclude Include="StringTable\IStringTableDefs.h">
<Filter>Game API\StringTable</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="defines.cpp">
Expand Down Expand Up @@ -881,6 +893,12 @@
<ClCompile Include="Stats.cpp">
<Filter>Rendering Device</Filter>
</ClCompile>
<ClCompile Include="xr_input_xinput.cpp">
<Filter>Interfaces\Input</Filter>
</ClCompile>
<ClCompile Include="StringTable\IStringTable.cpp">
<Filter>Game API\StringTable</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="ClientServer.txt" />
Expand Down
Loading

0 comments on commit 94acc9a

Please sign in to comment.