diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 3f477d9c4..004dee0db 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -125,6 +125,12 @@ IF(WITH_STATIC) # libxml2 could need winsock2 library SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC) 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) IF(WITH_STLPORT) diff --git a/code/CMakeModules/FindIconv.cmake b/code/CMakeModules/FindIconv.cmake new file mode 100644 index 000000000..5e9e48250 --- /dev/null +++ b/code/CMakeModules/FindIconv.cmake @@ -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 + 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) diff --git a/code/nel/src/3d/mesh_mrm_skinned.cpp b/code/nel/src/3d/mesh_mrm_skinned.cpp index 8b7f1fa63..f1c49bd56 100644 --- a/code/nel/src/3d/mesh_mrm_skinned.cpp +++ b/code/nel/src/3d/mesh_mrm_skinned.cpp @@ -1867,7 +1867,7 @@ void CMeshMRMSkinnedGeom::updateRawSkinNormal(bool enabled, CMeshMRMSkinnedInst CIndexBufferReadWrite ibaWrite; skinLod.RdrPass[i].lock (ibaWrite); #ifndef NL_SKINNED_MESH_MRM_INDEX16 - nlassert(ibaWrite.getFormat() == CIndexBuffer::Indices32) + nlassert(ibaWrite.getFormat() == CIndexBuffer::Indices32); uint32 *dstTriPtr= (uint32 *) ibaWrite.getPtr(); uint32 numIndices= lod.RdrPass[i].PBlock.size(); for(uint j=0;jgetWindowProc(); + + // 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); } } @@ -156,10 +159,12 @@ bool CGraphicsViewport::macEvent(EventHandlerCallRef caller, EventRef event) if (driver) { 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; } @@ -175,10 +180,13 @@ bool CGraphicsViewport::x11Event(XEvent *event) if (driver) { 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; } #endif diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.cpp index f794e0b73..7349a8465 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.cpp @@ -81,6 +81,7 @@ QWidget *VegetableSettingsPage::createPage(QWidget *parent) connect(m_ui.coarseToolButton, SIGNAL(clicked()), this, SLOT(setCoarseMeshTexture())); connect(m_ui.addZoneToolButton, SIGNAL(clicked()), this, SLOT(addZone())); connect(m_ui.removeZoneToolButton, SIGNAL(clicked()), this, SLOT(removeZone())); + connect(m_ui.clearButton, SIGNAL(clicked()), m_ui.zonesListWidget, SLOT(clear())); return m_page; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.ui index 0d4a41cf2..13deb2d4e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.ui @@ -181,6 +181,17 @@ + + + + + + + + :/icons/ic_nel_reset_all.png:/icons/ic_nel_reset_all.png + + + diff --git a/code/ryzom/common/src/game_share/mirror_prop_value.h b/code/ryzom/common/src/game_share/mirror_prop_value.h index 553c73b96..08e96761d 100644 --- a/code/ryzom/common/src/game_share/mirror_prop_value.h +++ b/code/ryzom/common/src/game_share/mirror_prop_value.h @@ -1022,14 +1022,14 @@ struct _CMirrorPropValueListIterator CMirrorPropValueList *_ParentList; TSharedListRow _Index; - typedef T value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - // typedef typename std::forward_iterator_tag iterator_category; + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + // typedef typename std::forward_iterator_tag iterator_category; }; @@ -1050,15 +1050,14 @@ struct _CCMirrorPropValueListIterator CMirrorPropValueList *_ParentList; TSharedListRow _Index; - typedef T value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - // typedef typename std::forward_iterator_tag iterator_category; - + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + // typedef typename std::forward_iterator_tag iterator_category; }; @@ -1232,7 +1231,7 @@ class CMirrorPropValueList { public: - typedef CPropLocationUnpacked CPropLocationClass; + typedef CPropLocationUnpacked CPropLocationClass; typedef uint32 size_type; typedef _CMirrorPropValueListIterator iterator; diff --git a/code/ryzom/server/src/ai_service/commands.cpp b/code/ryzom/server/src/ai_service/commands.cpp index f3317e68f..49b5af2a8 100644 --- a/code/ryzom/server/src/ai_service/commands.cpp +++ b/code/ryzom/server/src/ai_service/commands.cpp @@ -2437,7 +2437,7 @@ NLMISC_COMMAND(setGrpTimers,"set the timer values for a given group"," < void cbTick(); 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) return false; diff --git a/code/ryzom/tools/leveldesign/CMakeLists.txt b/code/ryzom/tools/leveldesign/CMakeLists.txt index bcd1ed9a6..be22df62c 100644 --- a/code/ryzom/tools/leveldesign/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/CMakeLists.txt @@ -3,6 +3,7 @@ ADD_SUBDIRECTORY(prim_export) ADD_SUBDIRECTORY(uni_conv) ADD_SUBDIRECTORY(csv_transform) ADD_SUBDIRECTORY(icon_search) +ADD_SUBDIRECTORY(mission_compiler_lib) ADD_SUBDIRECTORY(mp_generator) ADD_SUBDIRECTORY(named_items_2_csv) @@ -11,6 +12,10 @@ IF(WIN32) ADD_SUBDIRECTORY(world_editor) ENDIF(WIN32) +IF(WITH_MFC) + ADD_SUBDIRECTORY(mission_compiler_fe) +ENDIF(WITH_MFC) + IF(WITH_QT) ADD_SUBDIRECTORY(georges_editor_qt) ENDIF(WITH_QT) @@ -24,8 +29,6 @@ ENDIF(WITH_QT) #icon_search #install #master -#mission_compiler_fe -#mission_compiler_lib #mission_simulator # #primitive_id_assignator diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/CMakeLists.txt b/code/ryzom/tools/leveldesign/mission_compiler_fe/CMakeLists.txt new file mode 100644 index 000000000..572060089 --- /dev/null +++ b/code/ryzom/tools/leveldesign/mission_compiler_fe/CMakeLists.txt @@ -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) diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/CMakeLists.txt b/code/ryzom/tools/leveldesign/mission_compiler_lib/CMakeLists.txt new file mode 100644 index 000000000..c2dd48d41 --- /dev/null +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/CMakeLists.txt @@ -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)