diff --git a/cmake/utils.cmake b/cmake/utils.cmake index b9b35d2aa76..c380e23740f 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -5,7 +5,7 @@ macro(add_dir DIRS) file( GLOB ${dir}__INCLUDES_H ${dir} ${dir}/*.h) file( GLOB ${dir}__INCLUDES_HPP ${dir} ${dir}/*.hpp) list( APPEND ${PROJECT_NAME}__INCLUDES ${${dir}__INCLUDES_H} ${${dir}__INCLUDES_HPP} ) - file( GLOB ${dir}__SOURCES_CPP ${dir} ${dir}/*.cpp) + file( GLOB ${dir}__SOURCES_CPP ${dir} ${dir}/*.cpp ${dir}/*.cxx) file( GLOB ${dir}__SOURCES_C ${dir} ${dir}/*.c) list( APPEND ${PROJECT_NAME}__SOURCES ${${dir}__SOURCES_C} ${${dir}__SOURCES_CPP} ) endforeach() diff --git a/res/fsgame.ltx b/res/fsgame.ltx index 4082c5030bd..560f9988ca9 100644 --- a/res/fsgame.ltx +++ b/res/fsgame.ltx @@ -4,7 +4,7 @@ $arch_dir$ = false| false| $fs_root$ $game_arch_mp$ = false| false| $fs_root$| mp\ $arch_dir_levels$ = false| false| $fs_root$| levels\ $arch_dir_resources$ = false| false| $fs_root$| resources\ -$arch_dir_localization$ = false| false| $fs_root$| localization\ +$arch_dir_localization$ = false| false| $fs_root$| Localization\ $arch_dir_patches$ = false| true| $fs_root$| patches\ $game_data$ = false| true| $fs_root$| gamedata\ $game_ai$ = true| false| $game_data$| ai\ diff --git a/src/Layers/xrRender/dxUIRender.cpp b/src/Layers/xrRender/dxUIRender.cpp index 26d07cc3b6d..413d18e4ac9 100644 --- a/src/Layers/xrRender/dxUIRender.cpp +++ b/src/Layers/xrRender/dxUIRender.cpp @@ -160,7 +160,7 @@ LPCSTR dxUIRender::UpdateShaderName(LPCSTR tex_name, LPCSTR sh_name) u32 v_need = CAP_VERSION(2, 0); // strstr(Core.Params,"-ps_movie") && if ((v_dev >= v_need) && FS.exist(buff, "$game_textures$", tex_name, ".ogm")) - return "hud" DELIMITER "movie"; + return "hud\\movie"; else return sh_name; } diff --git a/src/xrAICore/CMakeLists.txt b/src/xrAICore/CMakeLists.txt index 01c1f3d90ad..e0e10952682 100644 --- a/src/xrAICore/CMakeLists.txt +++ b/src/xrAICore/CMakeLists.txt @@ -23,7 +23,7 @@ include_directories( # endif() #endforeach() -add_definitions(-DXRAICORE_EXPORTS) +add_definitions(-DXRAICORE_EXPORTS -D_SECURE_SCL=0) add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES}) set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "pch.hpp") diff --git a/src/xrAICore/Navigation/graph_engine.h b/src/xrAICore/Navigation/graph_engine.h index 262fee08917..b9c30aaa39e 100644 --- a/src/xrAICore/Navigation/graph_engine.h +++ b/src/xrAICore/Navigation/graph_engine.h @@ -13,12 +13,12 @@ #include "xrAICore/Navigation/vertex_manager_fixed.h" #include "xrAICore/Navigation/vertex_allocator_fixed.h" #include "xrAICore/Navigation/data_storage_bucket_list.h" +#include "xrAICore/Navigation/PathManagers/path_manager.h" +#include "xrAICore/Navigation/graph_engine_space.h" #ifndef AI_COMPILER #include "xrAICore/Navigation/vertex_manager_hash_fixed.h" #include "xrAICore/Navigation/data_storage_binary_heap.h" #endif -#include "xrAICore/Navigation/PathManagers/path_manager.h" -#include "xrAICore/Navigation/graph_engine_space.h" #include "xrEngine/profiler.h" #include "xrAICore/Components/problem_solver.h" #include "xrAICore/Components/operator_condition.h" diff --git a/src/xrAICore/Navigation/vertex_manager_hash_fixed_inline.h b/src/xrAICore/Navigation/vertex_manager_hash_fixed_inline.h index 6f524262656..11c8af82984 100644 --- a/src/xrAICore/Navigation/vertex_manager_hash_fixed_inline.h +++ b/src/xrAICore/Navigation/vertex_manager_hash_fixed_inline.h @@ -8,6 +8,12 @@ #pragma once +namespace hash_fixed_vertex_manager +{ +extern u32 to_u32(const GraphEngineSpace::CWorldState& other); +extern u32 to_u32(const shared_str& other); +} + #define TEMPLATE_SPECIALIZATION \ template \ template @@ -67,11 +73,7 @@ inline bool CHashFixedVertexManager::is_opened(const Vertex& vertex) const { ret TEMPLATE_SPECIALIZATION inline u32 CHashFixedVertexManager::hash_index(const Index& vertex_id) const { -#ifdef LINUX // FIXME!! - return 0; -#else return hash_fixed_vertex_manager::to_u32(vertex_id) % HashSize; -#endif } TEMPLATE_SPECIALIZATION diff --git a/src/xrGame/HUDCrosshair.cpp b/src/xrGame/HUDCrosshair.cpp index 7286d62621d..500fbe03675 100644 --- a/src/xrGame/HUDCrosshair.cpp +++ b/src/xrGame/HUDCrosshair.cpp @@ -9,7 +9,7 @@ CHUDCrosshair::CHUDCrosshair() { - hShader->create("hud" DELIMITER "crosshair"); + hShader->create("hud\\crosshair"); radius = 0; } diff --git a/src/xrGame/ik/limb.cpp b/src/xrGame/ik/limb.cpp index c2041ebf530..03f1e7d41cf 100644 --- a/src/xrGame/ik/limb.cpp +++ b/src/xrGame/ik/limb.cpp @@ -33,6 +33,10 @@ #include "StdAfx.h" #include "limb.h" +#ifdef LINUX +#undef roundup // defined in +#endif + enum { SolvePosOnly = 1, diff --git a/src/xrUICore/Static/UILanimController.h b/src/xrUICore/Static/UILanimController.h index 78b9f16300c..637cb094fc4 100644 --- a/src/xrUICore/Static/UILanimController.h +++ b/src/xrUICore/Static/UILanimController.h @@ -20,6 +20,7 @@ struct XRUICORE_API color_animation Flags8 m_lanimFlags; }; +// Unused struct xform_animation : public color_animation { xform_animation(); diff --git a/src/xrUICore/XML/UITextureMaster.cpp b/src/xrUICore/XML/UITextureMaster.cpp index 837cef0635e..6d3cd97dae3 100644 --- a/src/xrUICore/XML/UITextureMaster.cpp +++ b/src/xrUICore/XML/UITextureMaster.cpp @@ -13,8 +13,9 @@ #include "uiabstract.h" #include "xrUIXmlParser.h" #include "Include/xrRender/UIShader.h" +#include "xrCore/Threading/Lock.hpp" +#include "xrCore/Threading/ScopeLock.hpp" #include -#include xr_map CUITextureMaster::m_textures; xr_map CUITextureMaster::m_shaders; @@ -55,10 +56,8 @@ void CUITextureMaster::ParseShTexInfo(pcstr path, pcstr xml_file) /* avo: fix issue when values were not updated (silently skipped) when same key is encountered more than once. This is how std::map is designed. /* Also used more efficient C++11 std::map::emplace method instead of outdated std::pair::make_pair */ /* XXX: avo: note that xxx.insert(mk_pair(v1,v2)) pattern is used extensively throughout solution so there is a good potential for other bug fixes/improvements */ -#ifdef LINUX - static std::mutex new_texture_mutex; - std::scoped_lock new_texture_lock (new_texture_mutex); -#endif + static Lock new_texture_lock; + ScopeLock new_texture_guard(&new_texture_lock); if (m_textures.find(id) == m_textures.end()) m_textures.emplace(id, info); else