Skip to content

Commit 4295a54

Browse files
committed
Merge remote-tracking branch 'q4a/linux' into xd_dev
2 parents b3507ae + e51ed07 commit 4295a54

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+212
-142
lines changed

Externals/cximage/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ include_directories(
4040
add_library(cximage STATIC ${SOURCES} ${HEADERS})
4141

4242
set_target_properties(cximage PROPERTIES PREFIX "")
43-
target_link_libraries(cximage)
43+
target_link_libraries(cximage jpeg)
4444
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
4545

Externals/cximage/ximacfg.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
#include <cstddef>
55
#endif
66

7+
#include "Common/Common.hpp"
78
extern "C" void* cxalloc(size_t size);
89
extern "C" void cxfree(void* ptr);
910
extern "C" void* cxrealloc(void* ptr, size_t size);
1011

1112
#ifdef CXIMAGE_AS_SHARED_LIBRARY //must be defined in Release_Shared configuration
12-
13-
#include "Common/Common.hpp"
1413
// XXX: dirty hack.
1514
#undef max
1615
#undef min

Externals/cximage/ximajpg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#undef XMD_H
1717

1818
#include "ximaiter.h"
19-
19+
#include "ximacfg.h"
2020
#include <setjmp.h>
2121

2222
struct jpg_error_mgr {

src/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
add_subdirectory(utils)
22
add_subdirectory(Layers)
33
add_subdirectory(xr_3da)
4-
#add_subdirectory(xrMisc)
54
add_subdirectory(xrAICore)
65
add_subdirectory(xrUICore)
76
add_subdirectory(xrCDB)

src/Common/PlatformLinux.inl

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,31 @@ inline void _splitpath (
105105
strcpy(drive, "");
106106

107107
if(dir) {
108-
strcpy(dir, dirname(tmp));
108+
char tmp_dir[PATH_MAX] = {0};
109+
strcpy(tmp_dir, tmp); // W/A for fname broking
110+
strcpy(dir, dirname(tmp_dir)); // This eval modify dirname argument!!!
109111
if (dir[0] && dir[strlen(dir) - 1] != '/')
110112
strcat(dir, "/");
111113
}
112114

113115
if(fname)
116+
{
114117
strcpy(fname, basename(tmp));
118+
char *pos = strrchr(fname, '.');
119+
if(pos != NULL)
120+
*pos = 0;
121+
}
122+
123+
if(ext)
124+
{
125+
char tmp_ext[NAME_MAX] = { 0 };
126+
strcpy(tmp_ext, basename(tmp));
127+
char *pos = strrchr(fname, '.');
128+
if(pos != NULL)
129+
strcpy(ext, pos + 1);
130+
else
131+
strcpy(ext, "");
132+
}
115133
}
116134

117135
#include <iostream>

src/Layers/xrRender/FSkinned.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ BOOL CSkeletonX_ext::_PickBone(IKinematics::pick_result& r, float dist, const Fv
11231123
default: NODEFAULT;
11241124
}
11251125
CHK_DX(V->p_rm_Indices->Unlock());
1126-
#endif USE_DX10
1126+
#endif // USE_DX10
11271127

11281128
return result;
11291129
}

src/Layers/xrRenderGL/glSH_Texture.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
#include "../../xrEngine/Render.h"
88
#endif
99

10+
#ifdef WINDOWS // TODO
1011
#include "../../xrEngine/tntQAVI.h"
12+
#endif
1113
#include "../../xrEngine/xrTheora_Surface.h"
1214

1315
#define PRIORITY_HIGH 12
@@ -106,6 +108,7 @@ void CTexture::apply_avi(u32 dwStage)
106108
CHK_GL(glActiveTexture(GL_TEXTURE0 + dwStage));
107109
CHK_GL(glBindTexture(desc, pSurface));
108110

111+
#ifdef WINDOWS // TODO
109112
if (pAVI->NeedUpdate())
110113
{
111114
// AVI
@@ -114,6 +117,7 @@ void CTexture::apply_avi(u32 dwStage)
114117
CHK_GL(glTexSubImage2D(desc, 0, 0, 0, m_width, m_height,
115118
GL_RGBA, GL_UNSIGNED_BYTE, ptr));
116119
}
120+
#endif
117121
};
118122

119123
void CTexture::apply_seq(u32 dwStage)
@@ -212,6 +216,7 @@ void CTexture::Load()
212216
}
213217
else if (FS.exist(fn, "$game_textures$", *cName, ".avi"))
214218
{
219+
#ifdef WINDOWS // TODO
215220
// AVI
216221
pAVI = new CAviPlayerCustom();
217222

@@ -244,6 +249,7 @@ void CTexture::Load()
244249
pSurface = 0;
245250
}
246251
}
252+
#endif
247253
}
248254
else if (FS.exist(fn, "$game_textures$", *cName, ".seq"))
249255
{

src/Layers/xrRenderPC_GL/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRen
4040
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrRender/r__pixel_calculator.h")
4141

4242
add_definitions(-DXRLCUTIL_EXPORTS -D_USRDLL -DXRRENDER_GL_EXPORTS -DUSE_OGL -DNO_XR_VDECLARATOR)
43+
4344
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})
4445

4546
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
46-
target_link_libraries(${PROJECT_NAME} xrCore xrCDB xrEngine xrParticles xrScriptEngine xrAPI GLEW luabind ${LUA_LIBRARIES})
47+
target_link_libraries(${PROJECT_NAME} xrCore xrCDB xrEngine xrParticles xrScriptEngine xrAPI GL GLEW luabind ${LUA_LIBRARIES})
4748
xr_install(${PROJECT_NAME})
4849

src/Layers/xrRenderPC_GL/gl_R_render.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ void CRender::Render()
471471
Target->mark_msaa_edges();
472472
}
473473

474-
// TODO: DX10: Implement DX10 rain.
474+
#ifdef WINDOWS// TODO: DX10: Implement DX10 rain.
475475
if (ps_r2_ls_flags.test(R3FLAG_DYN_WET_SURF))
476476
{
477477
PIX_EVENT(DEFER_RAIN);
@@ -493,6 +493,7 @@ void CRender::Render()
493493
}
494494
Target->accum_direct_blend();
495495
}
496+
#endif
496497

497498
{
498499
PIX_EVENT(DEFER_SELF_ILLUM);

src/xrCore/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ execute_process(COMMAND git rev-parse --abbrev-ref HEAD
3939

4040
message( "branch: " ${GIT_BRANCH} )
4141

42-
add_definitions(-DXRCORE_EXPORTS -DGIT_INFO_CURRENT_COMMIT="${GIT_SHA1}" -DGIT_INFO_CURRENT_BRANCH="${GIT_BRANCH}")
42+
add_definitions(-DXRCORE_EXPORTS -DGIT_INFO_CURRENT_COMMIT=${GIT_SHA1} -DGIT_INFO_CURRENT_BRANCH=${GIT_BRANCH})
4343
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})
4444

4545
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h")
4646
cotire(${PROJECT_NAME})
4747

4848
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
4949

50-
target_link_libraries(${PROJECT_NAME} xrMiscMath ${SDL_LIBRARIES} ${LZO_LIBRARIES} ${CRYPTO++_LIBRARIES} ${PUGIXML_LIBRARY} ${TBB_LIBRARIES})
50+
target_link_libraries(${PROJECT_NAME} xrMiscMath dl pthread ${SDL_LIBRARIES} ${LZO_LIBRARIES} ${CRYPTO++_LIBRARIES} ${PUGIXML_LIBRARY} ${TBB_LIBRARIES})
5151
xr_install(${PROJECT_NAME})

0 commit comments

Comments
 (0)