mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 09:58:46 +00:00
merge
This commit is contained in:
commit
824243a7af
13 changed files with 182 additions and 27 deletions
|
@ -125,6 +125,12 @@ IF(WITH_STATIC)
|
||||||
# libxml2 could need winsock2 library
|
# libxml2 could need winsock2 library
|
||||||
SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
|
SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
|
||||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB})
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB})
|
||||||
|
|
||||||
|
# on Mac OS X libxml2 requieres iconv
|
||||||
|
IF(APPLE)
|
||||||
|
FIND_PACKAGE(Iconv REQUIRED)
|
||||||
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES})
|
||||||
|
ENDIF(APPLE)
|
||||||
ENDIF(WITH_STATIC)
|
ENDIF(WITH_STATIC)
|
||||||
|
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
|
|
83
code/CMakeModules/FindIconv.cmake
Normal file
83
code/CMakeModules/FindIconv.cmake
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
# - Try to find Iconv on Mac OS X
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# ICONV_FOUND - system has Iconv
|
||||||
|
# ICONV_INCLUDE_DIR - the Iconv include directory
|
||||||
|
# ICONV_LIBRARIES - Link these to use Iconv
|
||||||
|
# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const
|
||||||
|
#
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
|
||||||
|
IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
|
# Already in cache, be silent
|
||||||
|
SET(ICONV_FIND_QUIETLY TRUE)
|
||||||
|
ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
FIND_PATH(ICONV_INCLUDE_DIR iconv.h
|
||||||
|
PATHS
|
||||||
|
/opt/local/include/
|
||||||
|
NO_CMAKE_SYSTEM_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c
|
||||||
|
PATHS
|
||||||
|
/opt/local/lib/
|
||||||
|
NO_CMAKE_SYSTEM_PATH
|
||||||
|
)
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
FIND_PATH(ICONV_INCLUDE_DIR iconv.h PATHS /opt/local/include /sw/include)
|
||||||
|
|
||||||
|
string(REGEX REPLACE "(.*)/include/?" "\\1" ICONV_INCLUDE_BASE_DIR "${ICONV_INCLUDE_DIR}")
|
||||||
|
|
||||||
|
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS "${ICONV_INCLUDE_BASE_DIR}/lib" PATHS /opt/local/lib)
|
||||||
|
|
||||||
|
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
|
SET(ICONV_FOUND TRUE)
|
||||||
|
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
||||||
|
IF(ICONV_FOUND)
|
||||||
|
check_c_compiler_flag("-Werror" ICONV_HAVE_WERROR)
|
||||||
|
set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}")
|
||||||
|
if(ICONV_HAVE_WERROR)
|
||||||
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||||
|
endif(ICONV_HAVE_WERROR)
|
||||||
|
check_c_source_compiles("
|
||||||
|
#include <iconv.h>
|
||||||
|
int main(){
|
||||||
|
iconv_t conv = 0;
|
||||||
|
const char* in = 0;
|
||||||
|
size_t ilen = 0;
|
||||||
|
char* out = 0;
|
||||||
|
size_t olen = 0;
|
||||||
|
iconv(conv, &in, &ilen, &out, &olen);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
" ICONV_SECOND_ARGUMENT_IS_CONST )
|
||||||
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}")
|
||||||
|
ENDIF(ICONV_FOUND)
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
|
IF(ICONV_FOUND)
|
||||||
|
IF(NOT ICONV_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
|
||||||
|
ENDIF(NOT ICONV_FIND_QUIETLY)
|
||||||
|
ELSE(ICONV_FOUND)
|
||||||
|
IF(Iconv_FIND_REQUIRED)
|
||||||
|
MESSAGE(FATAL_ERROR "Could not find Iconv")
|
||||||
|
ENDIF(Iconv_FIND_REQUIRED)
|
||||||
|
ENDIF(ICONV_FOUND)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(
|
||||||
|
ICONV_INCLUDE_DIR
|
||||||
|
ICONV_LIBRARIES
|
||||||
|
ICONV_SECOND_ARGUMENT_IS_CONST
|
||||||
|
)
|
||||||
|
ENDIF(APPLE)
|
|
@ -1867,7 +1867,7 @@ void CMeshMRMSkinnedGeom::updateRawSkinNormal(bool enabled, CMeshMRMSkinnedInst
|
||||||
CIndexBufferReadWrite ibaWrite;
|
CIndexBufferReadWrite ibaWrite;
|
||||||
skinLod.RdrPass[i].lock (ibaWrite);
|
skinLod.RdrPass[i].lock (ibaWrite);
|
||||||
#ifndef NL_SKINNED_MESH_MRM_INDEX16
|
#ifndef NL_SKINNED_MESH_MRM_INDEX16
|
||||||
nlassert(ibaWrite.getFormat() == CIndexBuffer::Indices32)
|
nlassert(ibaWrite.getFormat() == CIndexBuffer::Indices32);
|
||||||
uint32 *dstTriPtr= (uint32 *) ibaWrite.getPtr();
|
uint32 *dstTriPtr= (uint32 *) ibaWrite.getPtr();
|
||||||
uint32 numIndices= lod.RdrPass[i].PBlock.size();
|
uint32 numIndices= lod.RdrPass[i].PBlock.size();
|
||||||
for(uint j=0;j<numIndices;j++, srcTriPtr++, dstTriPtr++)
|
for(uint j=0;j<numIndices;j++, srcTriPtr++, dstTriPtr++)
|
||||||
|
|
|
@ -2083,8 +2083,9 @@ static void DuplicatePrimitiveBlock(const CIndexBuffer &srcBlock, CIndexBuffer &
|
||||||
CIndexBufferReadWrite ibaWrite;
|
CIndexBufferReadWrite ibaWrite;
|
||||||
destBlock.lock (ibaWrite);
|
destBlock.lock (ibaWrite);
|
||||||
|
|
||||||
|
#ifdef NL_FORCE_INDEX_BUFFER_16
|
||||||
nlassert(destBlock.getFormat() == CIndexBuffer::Indices16);
|
nlassert(destBlock.getFormat() == CIndexBuffer::Indices16);
|
||||||
|
#endif
|
||||||
|
|
||||||
// TMP TMP TMP
|
// TMP TMP TMP
|
||||||
if (ibaRead.getFormat() == CIndexBuffer::Indices16)
|
if (ibaRead.getFormat() == CIndexBuffer::Indices16)
|
||||||
|
|
|
@ -151,9 +151,9 @@ void CPluginManager::readPluginPaths()
|
||||||
{
|
{
|
||||||
const QDir dir(searchPaths.takeFirst());
|
const QDir dir(searchPaths.takeFirst());
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("*.dll"), QDir::Files);
|
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("ovqt_plugin_*.dll"), QDir::Files);
|
||||||
#else
|
#else
|
||||||
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("*.so"), QDir::Files);
|
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("libovqt_plugin_*.so"), QDir::Files);
|
||||||
#endif
|
#endif
|
||||||
Q_FOREACH (const QFileInfo &file, files)
|
Q_FOREACH (const QFileInfo &file, files)
|
||||||
pluginsList << file.absoluteFilePath();
|
pluginsList << file.absoluteFilePath();
|
||||||
|
|
|
@ -134,6 +134,9 @@ bool CGraphicsViewport::winEvent(MSG *message, long *result)
|
||||||
if (driver)
|
if (driver)
|
||||||
{
|
{
|
||||||
winProc proc = (winProc)driver->getWindowProc();
|
winProc proc = (winProc)driver->getWindowProc();
|
||||||
|
|
||||||
|
// TODO: shouldn't it return false like the others?
|
||||||
|
// see macEvent() and x11Event() below
|
||||||
return proc(driver, message->hwnd, message->message, message->wParam, message->lParam);
|
return proc(driver, message->hwnd, message->message, message->wParam, message->lParam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,10 +159,12 @@ bool CGraphicsViewport::macEvent(EventHandlerCallRef caller, EventRef event)
|
||||||
if (driver)
|
if (driver)
|
||||||
{
|
{
|
||||||
cocoaProc proc = (cocoaProc)driver->getWindowProc();
|
cocoaProc proc = (cocoaProc)driver->getWindowProc();
|
||||||
return proc(driver, event);
|
proc(driver, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return false to let Qt handle the event as well,
|
||||||
|
// else the widget would never get focus
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,10 +180,13 @@ bool CGraphicsViewport::x11Event(XEvent *event)
|
||||||
if (driver)
|
if (driver)
|
||||||
{
|
{
|
||||||
x11Proc proc = (x11Proc)driver->getWindowProc();
|
x11Proc proc = (x11Proc)driver->getWindowProc();
|
||||||
return proc(driver, event);
|
proc(driver, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return false to let Qt handle the event as well,
|
||||||
|
// else the widget would never get focus
|
||||||
|
// TODO: test me please, i have no linux at hand (rti)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -81,6 +81,7 @@ QWidget *VegetableSettingsPage::createPage(QWidget *parent)
|
||||||
connect(m_ui.coarseToolButton, SIGNAL(clicked()), this, SLOT(setCoarseMeshTexture()));
|
connect(m_ui.coarseToolButton, SIGNAL(clicked()), this, SLOT(setCoarseMeshTexture()));
|
||||||
connect(m_ui.addZoneToolButton, SIGNAL(clicked()), this, SLOT(addZone()));
|
connect(m_ui.addZoneToolButton, SIGNAL(clicked()), this, SLOT(addZone()));
|
||||||
connect(m_ui.removeZoneToolButton, SIGNAL(clicked()), this, SLOT(removeZone()));
|
connect(m_ui.removeZoneToolButton, SIGNAL(clicked()), this, SLOT(removeZone()));
|
||||||
|
connect(m_ui.clearButton, SIGNAL(clicked()), m_ui.zonesListWidget, SLOT(clear()));
|
||||||
|
|
||||||
return m_page;
|
return m_page;
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,6 +181,17 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="clearButton">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="object_viewer.qrc">
|
||||||
|
<normaloff>:/icons/ic_nel_reset_all.png</normaloff>:/icons/ic_nel_reset_all.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="4">
|
<item row="5" column="0" colspan="4">
|
||||||
|
|
|
@ -1022,14 +1022,14 @@ struct _CMirrorPropValueListIterator
|
||||||
CMirrorPropValueList<T,CPLC> *_ParentList;
|
CMirrorPropValueList<T,CPLC> *_ParentList;
|
||||||
TSharedListRow _Index;
|
TSharedListRow _Index;
|
||||||
|
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
typedef value_type* pointer;
|
typedef value_type* pointer;
|
||||||
typedef const value_type* const_pointer;
|
typedef const value_type* const_pointer;
|
||||||
typedef value_type& reference;
|
typedef value_type& reference;
|
||||||
typedef const value_type& const_reference;
|
typedef const value_type& const_reference;
|
||||||
typedef size_t size_type;
|
typedef size_t size_type;
|
||||||
typedef ptrdiff_t difference_type;
|
typedef ptrdiff_t difference_type;
|
||||||
// typedef typename std::forward_iterator_tag iterator_category;
|
// typedef typename std::forward_iterator_tag iterator_category;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1050,15 +1050,14 @@ struct _CCMirrorPropValueListIterator
|
||||||
CMirrorPropValueList<T,CPLC> *_ParentList;
|
CMirrorPropValueList<T,CPLC> *_ParentList;
|
||||||
TSharedListRow _Index;
|
TSharedListRow _Index;
|
||||||
|
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
typedef value_type* pointer;
|
typedef value_type* pointer;
|
||||||
typedef const value_type* const_pointer;
|
typedef const value_type* const_pointer;
|
||||||
typedef value_type& reference;
|
typedef value_type& reference;
|
||||||
typedef const value_type& const_reference;
|
typedef const value_type& const_reference;
|
||||||
typedef size_t size_type;
|
typedef size_t size_type;
|
||||||
typedef ptrdiff_t difference_type;
|
typedef ptrdiff_t difference_type;
|
||||||
// typedef typename std::forward_iterator_tag iterator_category;
|
// typedef typename std::forward_iterator_tag iterator_category;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1232,7 +1231,7 @@ class CMirrorPropValueList<NLMISC::CEntityId,CPropLocationUnpacked>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef CPropLocationUnpacked CPropLocationClass;
|
typedef CPropLocationUnpacked CPropLocationClass;
|
||||||
|
|
||||||
typedef uint32 size_type;
|
typedef uint32 size_type;
|
||||||
typedef _CMirrorPropValueListIterator<NLMISC::CEntityId,CPropLocationClass> iterator;
|
typedef _CMirrorPropValueListIterator<NLMISC::CEntityId,CPropLocationClass> iterator;
|
||||||
|
|
|
@ -2437,7 +2437,7 @@ NLMISC_COMMAND(setGrpTimers,"set the timer values for a given group","<grp id> <
|
||||||
void cbTick();
|
void cbTick();
|
||||||
extern uint ForceTicks;
|
extern uint ForceTicks;
|
||||||
|
|
||||||
NLMISC_COMMAND(updateAI,"call CAIS::update() (simulate a tick off-line)","")
|
NLMISC_COMMAND(updateAI,"call CAIS::update() (simulate a tick off-line)","[tick]")
|
||||||
{
|
{
|
||||||
if(args.size() >1)
|
if(args.size() >1)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -3,6 +3,7 @@ ADD_SUBDIRECTORY(prim_export)
|
||||||
ADD_SUBDIRECTORY(uni_conv)
|
ADD_SUBDIRECTORY(uni_conv)
|
||||||
ADD_SUBDIRECTORY(csv_transform)
|
ADD_SUBDIRECTORY(csv_transform)
|
||||||
ADD_SUBDIRECTORY(icon_search)
|
ADD_SUBDIRECTORY(icon_search)
|
||||||
|
ADD_SUBDIRECTORY(mission_compiler_lib)
|
||||||
ADD_SUBDIRECTORY(mp_generator)
|
ADD_SUBDIRECTORY(mp_generator)
|
||||||
ADD_SUBDIRECTORY(named_items_2_csv)
|
ADD_SUBDIRECTORY(named_items_2_csv)
|
||||||
|
|
||||||
|
@ -11,6 +12,10 @@ IF(WIN32)
|
||||||
ADD_SUBDIRECTORY(world_editor)
|
ADD_SUBDIRECTORY(world_editor)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
IF(WITH_MFC)
|
||||||
|
ADD_SUBDIRECTORY(mission_compiler_fe)
|
||||||
|
ENDIF(WITH_MFC)
|
||||||
|
|
||||||
IF(WITH_QT)
|
IF(WITH_QT)
|
||||||
ADD_SUBDIRECTORY(georges_editor_qt)
|
ADD_SUBDIRECTORY(georges_editor_qt)
|
||||||
ENDIF(WITH_QT)
|
ENDIF(WITH_QT)
|
||||||
|
@ -24,8 +29,6 @@ ENDIF(WITH_QT)
|
||||||
#icon_search
|
#icon_search
|
||||||
#install
|
#install
|
||||||
#master
|
#master
|
||||||
#mission_compiler_fe
|
|
||||||
#mission_compiler_lib
|
|
||||||
#mission_simulator
|
#mission_simulator
|
||||||
#
|
#
|
||||||
#primitive_id_assignator
|
#primitive_id_assignator
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
FILE(GLOB SRC *.cpp *.h)
|
||||||
|
|
||||||
|
ADD_DEFINITIONS(${MFC_DEFINITIONS})
|
||||||
|
SET(CMAKE_MFC_FLAG 2)
|
||||||
|
ADD_EXECUTABLE(ryzom_mission_compiler_fe WIN32 ${SRC} mission_compiler_fe.rc)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(ryzom_mission_compiler_fe nelmisc nelligo ryzom_mission_compiler_lib)
|
||||||
|
|
||||||
|
NL_DEFAULT_PROPS(ryzom_mission_compiler_fe "Ryzom, Tools, Misc: Mission Compiler Frontend")
|
||||||
|
NL_ADD_RUNTIME_FLAGS(ryzom_mission_compiler_fe)
|
||||||
|
|
||||||
|
IF(WITH_PCH)
|
||||||
|
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_mission_compiler_fe ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp)
|
||||||
|
ENDIF(WITH_PCH)
|
||||||
|
|
||||||
|
INSTALL(TARGETS ryzom_mission_compiler_fe RUNTIME DESTINATION bin COMPONENT tools)
|
|
@ -0,0 +1,27 @@
|
||||||
|
FILE(GLOB LIBSRC mission_compiler.cpp
|
||||||
|
mission_compiler.h
|
||||||
|
step.h
|
||||||
|
step_content.cpp
|
||||||
|
steps.cpp
|
||||||
|
variables.cpp)
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(${NEL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
NL_TARGET_LIB(ryzom_mission_compiler_lib ${LIBSRC})
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(ryzom_mission_compiler_lib nelmisc nelligo)
|
||||||
|
NL_DEFAULT_PROPS(ryzom_mission_compiler_lib "Ryzom, Library: Mission Compiler")
|
||||||
|
NL_ADD_RUNTIME_FLAGS(ryzom_mission_compiler_lib)
|
||||||
|
NL_ADD_LIB_SUFFIX(ryzom_mission_compiler_lib)
|
||||||
|
|
||||||
|
INSTALL(TARGETS ryzom_mission_compiler_lib LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||||
|
|
||||||
|
FILE(GLOB EXESRC main.cpp)
|
||||||
|
|
||||||
|
ADD_EXECUTABLE(ryzom_mission_compiler ${EXESRC})
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(ryzom_mission_compiler ryzom_mission_compiler_lib)
|
||||||
|
NL_DEFAULT_PROPS(ryzom_mission_compiler "Ryzom, Tools, Misc: Mission Compiler")
|
||||||
|
NL_ADD_RUNTIME_FLAGS(ryzom_mission_compiler)
|
||||||
|
|
||||||
|
INSTALL(TARGETS ryzom_mission_compiler RUNTIME DESTINATION bin COMPONENT tools)
|
Loading…
Reference in a new issue