Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
[submodule "Externals/sse2rvv"]
path = Externals/sse2rvv
url = https://github.com/pattonkan/sse2rvv.git
[submodule "Externals/freetype"]
path = Externals/freetype
url = https://github.com/ChugunovRoman/freetype.git
9 changes: 9 additions & 0 deletions Externals/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ add_compile_options(${XRAY_DISABLE_WARNINGS})
add_subdirectory(GameSpy)
add_subdirectory(imgui-proj)

# FreeType: disable optional dependencies to minimize build complexity
set(FT_DISABLE_ZLIB ON CACHE BOOL "" FORCE)
set(FT_DISABLE_BZIP2 ON CACHE BOOL "" FORCE)
set(FT_DISABLE_PNG ON CACHE BOOL "" FORCE)
set(FT_DISABLE_HARFBUZZ ON CACHE BOOL "" FORCE)
set(FT_DISABLE_BROTLI ON CACHE BOOL "" FORCE)

add_subdirectory(freetype)

if (NOT TARGET xrLuabind)
message(FATAL_ERROR
"You probably have downloaded OpenXRay sources as ZIP archive, you can't do that. Use git to clone the repository.\n"
Expand Down
1 change: 1 addition & 0 deletions Externals/freetype
Submodule freetype added at f025a8
80 changes: 80 additions & 0 deletions Externals/freetype.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="..\src\xray_project_configurations.props" />
</ImportGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}</ProjectGuid>
<RootNamespace>freetype</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<ImportGroup Label="PropertySheets">
<Import Project="..\src\xray_project_configuration.props" />
</ImportGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\src\xray.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>FT2_BUILD_LIBRARY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<AdditionalIncludeDirectories>$(xrExternals)freetype\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="freetype\src\autofit\autofit.c" />
<ClCompile Include="freetype\src\base\ftbase.c" />
<ClCompile Include="freetype\src\base\ftbbox.c" />
<ClCompile Include="freetype\src\base\ftbdf.c" />
<ClCompile Include="freetype\src\base\ftbitmap.c" />
<ClCompile Include="freetype\src\base\ftcid.c" />
<ClCompile Include="freetype\src\base\ftfstype.c" />
<ClCompile Include="freetype\src\base\ftgasp.c" />
<ClCompile Include="freetype\src\base\ftglyph.c" />
<ClCompile Include="freetype\src\base\ftgxval.c" />
<ClCompile Include="freetype\src\base\ftinit.c" />
<ClCompile Include="freetype\src\base\ftmm.c" />
<ClCompile Include="freetype\src\base\ftotval.c" />
<ClCompile Include="freetype\src\base\ftpatent.c" />
<ClCompile Include="freetype\src\base\ftpfr.c" />
<ClCompile Include="freetype\src\base\ftstroke.c" />
<ClCompile Include="freetype\src\base\ftsynth.c" />
<ClCompile Include="freetype\src\base\fttype1.c" />
<ClCompile Include="freetype\src\base\ftwinfnt.c" />
<ClCompile Include="freetype\src\bdf\bdf.c" />
<ClCompile Include="freetype\src\cache\ftcache.c" />
<ClCompile Include="freetype\src\cff\cff.c" />
<ClCompile Include="freetype\src\cid\type1cid.c" />
<ClCompile Include="freetype\src\gzip\ftgzip.c" />
<ClCompile Include="freetype\src\hvf\hvf.c" />
<ClCompile Include="freetype\src\lzw\ftlzw.c" />
<ClCompile Include="freetype\src\pcf\pcf.c" />
<ClCompile Include="freetype\src\pfr\pfr.c" />
<ClCompile Include="freetype\src\psaux\psaux.c" />
<ClCompile Include="freetype\src\pshinter\pshinter.c" />
<ClCompile Include="freetype\src\psnames\psmodule.c" />
<ClCompile Include="freetype\src\raster\raster.c" />
<ClCompile Include="freetype\src\sfnt\sfnt.c" />
<ClCompile Include="freetype\src\smooth\smooth.c" />
<ClCompile Include="freetype\src\sdf\sdf.c" />
<ClCompile Include="freetype\src\svg\svg.c" />
<ClCompile Include="freetype\src\truetype\truetype.c" />
<ClCompile Include="freetype\src\type1\type1.c" />
<ClCompile Include="freetype\src\type42\type42.c" />
<ClCompile Include="freetype\src\winfonts\winfnt.c" />
<ClCompile Include="freetype\builds\windows\ftdebug.c" />
<ClCompile Include="freetype\builds\windows\ftsystem.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
208 changes: 208 additions & 0 deletions Externals/freetype.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="src">
<UniqueIdentifier>{f2a4c9c1-3f5b-4a7e-9c8d-1e2f3a4b5c6d}</UniqueIdentifier>
</Filter>
<Filter Include="src\autofit">
<UniqueIdentifier>{a1b2c3d4-e5f6-7890-abcd-ef1234567890}</UniqueIdentifier>
</Filter>
<Filter Include="src\base">
<UniqueIdentifier>{b2c3d4e5-f6a7-8901-bcde-f23456789012}</UniqueIdentifier>
</Filter>
<Filter Include="src\bdf">
<UniqueIdentifier>{c1d2e3f4-a5b6-7890-cdef-1234567890ab}</UniqueIdentifier>
</Filter>
<Filter Include="src\cache">
<UniqueIdentifier>{d2e3f4a5-b6c7-8901-defa-2345678901bc}</UniqueIdentifier>
</Filter>
<Filter Include="src\cff">
<UniqueIdentifier>{c3d4e5f6-a7b8-9012-cdef-345678901234}</UniqueIdentifier>
</Filter>
<Filter Include="src\cid">
<UniqueIdentifier>{e3f4a5b6-c7d8-9012-fabc-3456789012cd}</UniqueIdentifier>
</Filter>
<Filter Include="src\gzip">
<UniqueIdentifier>{f4a5b6c7-d8e9-0123-abcd-4567890123de}</UniqueIdentifier>
</Filter>
<Filter Include="src\hvf">
<UniqueIdentifier>{a5b6c7d8-e9f0-1234-bcde-5678901234ef}</UniqueIdentifier>
</Filter>
<Filter Include="src\lzw">
<UniqueIdentifier>{b6c7d8e9-f0a1-2345-cdef-6789012345f0}</UniqueIdentifier>
</Filter>
<Filter Include="src\pcf">
<UniqueIdentifier>{c7d8e9f0-a1b2-3456-defa-789012345601}</UniqueIdentifier>
</Filter>
<Filter Include="src\pfr">
<UniqueIdentifier>{d8e9f0a1-b2c3-4567-efab-890123456712}</UniqueIdentifier>
</Filter>
<Filter Include="src\psaux">
<UniqueIdentifier>{d4e5f6a7-b8c9-0123-defa-456789012345}</UniqueIdentifier>
</Filter>
<Filter Include="src\pshinter">
<UniqueIdentifier>{e5f6a7b8-c9d0-1234-efab-567890123456}</UniqueIdentifier>
</Filter>
<Filter Include="src\psnames">
<UniqueIdentifier>{f6a7b8c9-d0e1-2345-fabc-678901234567}</UniqueIdentifier>
</Filter>
<Filter Include="src\raster">
<UniqueIdentifier>{a7b8c9d0-e1f2-3456-abcd-789012345678}</UniqueIdentifier>
</Filter>
<Filter Include="src\sdf">
<UniqueIdentifier>{e9f0a1b2-c3d4-5678-0123-901234567823}</UniqueIdentifier>
</Filter>
<Filter Include="src\sfnt">
<UniqueIdentifier>{b8c9d0e1-f2a3-4567-bcde-890123456789}</UniqueIdentifier>
</Filter>
<Filter Include="src\smooth">
<UniqueIdentifier>{c9d0e1f2-a3b4-5678-cdef-901234567890}</UniqueIdentifier>
</Filter>
<Filter Include="src\svg">
<UniqueIdentifier>{f0a1b2c3-d4e5-6789-1234-012345678934}</UniqueIdentifier>
</Filter>
<Filter Include="src\truetype">
<UniqueIdentifier>{d0e1f2a3-b4c5-6789-defa-012345678901}</UniqueIdentifier>
</Filter>
<Filter Include="src\type1">
<UniqueIdentifier>{e1f2a3b4-c5d6-7890-efab-123456789012}</UniqueIdentifier>
</Filter>
<Filter Include="src\type42">
<UniqueIdentifier>{f2a3b4c5-d6e7-8901-fabc-234567890123}</UniqueIdentifier>
</Filter>
<Filter Include="src\winfonts">
<UniqueIdentifier>{a3b4c5d6-e7f8-9012-abcd-345678901234}</UniqueIdentifier>
</Filter>
<Filter Include="builds\windows">
<UniqueIdentifier>{b4c5d6e7-f8a9-0123-bcde-456789012345}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="freetype\src\autofit\autofit.c">
<Filter>src\autofit</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftbase.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftbbox.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftbdf.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftbitmap.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftcid.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftfstype.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftgasp.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftglyph.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftgxval.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftinit.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftmm.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftotval.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftpatent.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftpfr.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftstroke.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftsynth.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\fttype1.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\base\ftwinfnt.c">
<Filter>src\base</Filter>
</ClCompile>
<ClCompile Include="freetype\src\bdf\bdf.c">
<Filter>src\bdf</Filter>
</ClCompile>
<ClCompile Include="freetype\src\cache\ftcache.c">
<Filter>src\cache</Filter>
</ClCompile>
<ClCompile Include="freetype\src\cff\cff.c">
<Filter>src\cff</Filter>
</ClCompile>
<ClCompile Include="freetype\src\cid\type1cid.c">
<Filter>src\cid</Filter>
</ClCompile>
<ClCompile Include="freetype\src\gzip\ftgzip.c">
<Filter>src\gzip</Filter>
</ClCompile>
<ClCompile Include="freetype\src\hvf\hvf.c">
<Filter>src\hvf</Filter>
</ClCompile>
<ClCompile Include="freetype\src\lzw\ftlzw.c">
<Filter>src\lzw</Filter>
</ClCompile>
<ClCompile Include="freetype\src\pcf\pcf.c">
<Filter>src\pcf</Filter>
</ClCompile>
<ClCompile Include="freetype\src\pfr\pfr.c">
<Filter>src\pfr</Filter>
</ClCompile>
<ClCompile Include="freetype\src\psaux\psaux.c">
<Filter>src\psaux</Filter>
</ClCompile>
<ClCompile Include="freetype\src\pshinter\pshinter.c">
<Filter>src\pshinter</Filter>
</ClCompile>
<ClCompile Include="freetype\src\psnames\psmodule.c">
<Filter>src\psnames</Filter>
</ClCompile>
<ClCompile Include="freetype\src\raster\raster.c">
<Filter>src\raster</Filter>
</ClCompile>
<ClCompile Include="freetype\src\sfnt\sfnt.c">
<Filter>src\sfnt</Filter>
</ClCompile>
<ClCompile Include="freetype\src\smooth\smooth.c">
<Filter>src\smooth</Filter>
</ClCompile>
<ClCompile Include="freetype\src\sdf\sdf.c">
<Filter>src\sdf</Filter>
</ClCompile>
<ClCompile Include="freetype\src\svg\svg.c">
<Filter>src\svg</Filter>
</ClCompile>
<ClCompile Include="freetype\src\truetype\truetype.c">
<Filter>src\truetype</Filter>
</ClCompile>
<ClCompile Include="freetype\src\type1\type1.c">
<Filter>src\type1</Filter>
</ClCompile>
<ClCompile Include="freetype\src\type42\type42.c">
<Filter>src\type42</Filter>
</ClCompile>
<ClCompile Include="freetype\src\winfonts\winfnt.c">
<Filter>src\winfonts</Filter>
</ClCompile>
<ClCompile Include="freetype\builds\windows\ftdebug.c">
<Filter>builds\windows</Filter>
</ClCompile>
<ClCompile Include="freetype\builds\windows\ftsystem.c">
<Filter>builds\windows</Filter>
</ClCompile>
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion res/fsgame.ltx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ $game_textures$ = true| true| $game_data$| textures\
$game_config$ = true| false| $game_data$| configs\
$game_weathers$ = true| false| $game_config$| environment\weathers
$game_weather_effects$ = true| false| $game_config$| environment\weather_effects
$game_fonts$ = true| false| $game_data$| fonts\
$textures$ = true| true| $game_data$| textures\
$level$ = false| false| $game_levels$
$game_scripts$ = true| false| $game_data$| scripts\| *.script| Game script files
$logs$ = true| false| $app_data_root$| logs\
$screenshots$ = true| false| $app_data_root$| screenshots\
$game_saves$ = true| false| $app_data_root$| savedgames\
$downloads$ = false| false| $app_data_root$
$downloads$ = false| false| $app_data_root$
Binary file added res/gamedata/fonts/DroidSans.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/editors/RobotoMono.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/ARIALN.TTF
Binary file not shown.
Binary file added res/gamedata/fonts/eng/ARIALNB.TTF
Binary file not shown.
Binary file added res/gamedata/fonts/eng/ARIALNBI.TTF
Binary file not shown.
Binary file added res/gamedata/fonts/eng/ARIALNI.TTF
Binary file not shown.
Binary file added res/gamedata/fonts/eng/Graffiti1CTT.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/Letterica.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/Roboto.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/RobotoMono-Bold.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/RobotoMono-Light.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/RobotoMono-Medium.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/RobotoMono.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/arial.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/arialbd.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/arialbi.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/ariali.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/ariblk.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/consola.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/consolab.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/consolai.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/consolaz.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/default.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/eng/robotocondensed.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/ARIALN.TTF
Binary file not shown.
Binary file added res/gamedata/fonts/rus/ARIALNB.TTF
Binary file not shown.
Binary file added res/gamedata/fonts/rus/ARIALNBI.TTF
Binary file not shown.
Binary file added res/gamedata/fonts/rus/ARIALNI.TTF
Binary file not shown.
Binary file added res/gamedata/fonts/rus/Graffiti1CTT.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/Letterica.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/Roboto.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/RobotoMono-Bold.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/RobotoMono-Light.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/RobotoMono-Medium.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/RobotoMono.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/arial.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/arialbd.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/arialbi.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/ariali.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/ariblk.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/consola.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/consolab.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/consolai.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/consolaz.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/default.ttf
Binary file not shown.
Binary file added res/gamedata/fonts/rus/robotocondensed.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions src/Common/FSMacros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define _game_meshes_ "$game_meshes$"
#define _game_shaders_ "$game_shaders$"
#define _game_config_ "$game_config$"
#define _game_fonts_ "$game_fonts$"

// editor path definition
#define _server_root_ "$server_root$"
Expand Down
1 change: 1 addition & 0 deletions src/Include/xrRender/FontRender.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class IFontRender
virtual ~IFontRender() {}
virtual void Initialize(cpcstr cShader, cpcstr cTexture) = 0;
virtual void OnRender(CGameFont& owner) = 0;
virtual void CreateFontAtlas(u32 width, u32 height, const char* name, void* bitmap) {}
};

#endif // FontRender_included
Loading
Loading