--HG--
branch : compatibility-develop
This commit is contained in:
ulukyn@gmail.com 2016-12-13 21:16:30 +01:00
commit 68e6dbaf9a
1236 changed files with 18143 additions and 11629 deletions

View file

@ -8,3 +8,6 @@ e3fe4855f22c3e75722e015dc33c091c340b3ad7 ryzomcore/v0.11.1
9e583b717fd63be0be9fd60b99087abf1691ea49 ryzomcore/v0.11.2
bfe5628e14a024ba7ea32e4b326ae433a07856b9 ryzomcore/v0.11.3
9a6120735daa97c96ac5d85ca35c7f21f607bd87 ryzomcore/v0.12.0
3e17907af67e8d66d80e6b714707bbf912607f2a ryzom-patch-3.0.0
153e0b605c9e0c83ba05b6428c62838b49cc84b2 ryzom-patch-3.0.1
9d41f2994d44b9aad92b83f945f114e4b6bed44a ryzom-patch-3.0.2

View file

@ -36,7 +36,7 @@ IF(COMMAND cmake_policy)
IF(POLICY CMP0020)
CMAKE_POLICY(SET CMP0020 NEW)
ENDIF()
ENDIF(COMMAND cmake_policy)
ENDIF()
INCLUDE(nel)
INCLUDE(ConfigureChecks)
@ -64,7 +64,7 @@ SET(YEAR "2004-${CURRENT_YEAR}")
SET(AUTHOR "Winch Gate and The Ryzom Core Community")
SET(RYZOM_VERSION_MAJOR 3)
SET(RYZOM_VERSION_MINOR 0)
SET(RYZOM_VERSION_MINOR 1)
SET(RYZOM_VERSION_PATCH 0)
#-----------------------------------------------------------------------------
@ -75,15 +75,15 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# DLL should be in the same directory as EXE under Windows
IF(WIN32)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
ELSE(WIN32)
ELSE()
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
ENDIF(WIN32)
ENDIF()
IF(WIN32)
IF(WITH_MFC)
FIND_PACKAGE(MFC QUIET)
ENDIF(WITH_MFC)
ENDIF(WIN32)
ENDIF()
ENDIF()
#-----------------------------------------------------------------------------
# Set default config options
@ -97,8 +97,6 @@ NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS()
NL_SETUP_PREFIX_PATHS()
RYZOM_SETUP_PREFIX_PATHS()
NL_CONFIGURE_CHECKS()
NL_SETUP_BUILD()
NL_SETUP_BUILD_FLAGS()
@ -112,8 +110,8 @@ IF(WIN32)
IF(WITH_MFC)
FIND_PACKAGE(CustomMFC REQUIRED)
ENDIF(WITH_MFC)
ENDIF(WIN32)
ENDIF()
ENDIF()
FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(LibXml2 REQUIRED)
@ -122,15 +120,25 @@ FIND_PACKAGE(OpenSSL REQUIRED)
FIND_PACKAGE(GIF)
FIND_PACKAGE(Jpeg)
IF(WITH_LIBOVR)
FIND_PACKAGE(LibOVR)
ENDIF()
IF(WITH_LIBVR)
FIND_PACKAGE(LibVR)
ENDIF()
NL_CONFIGURE_CHECKS()
IF(WITH_STATIC_LIBXML2)
SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
ENDIF(WITH_STATIC_LIBXML2)
ENDIF()
IF(WITH_LIBXML2_ICONV)
FIND_PACKAGE(Iconv REQUIRED)
INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES})
ENDIF(WITH_LIBXML2_ICONV)
ENDIF()
IF(WITH_STATIC)
# libxml2 could need winsock2 library
@ -145,20 +153,20 @@ IF(WITH_STATIC)
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
ENDIF()
ENDIF()
ENDIF(WITH_STATIC)
ENDIF()
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
IF(FINAL_VERSION)
ADD_DEFINITIONS(-DFINAL_VERSION=1)
ENDIF(FINAL_VERSION)
ENDIF()
IF(WITH_SSE2)
ADD_DEFINITIONS(-DNL_HAS_SSE2)
IF(WITH_SSE3)
ADD_DEFINITIONS(-DNL_HAS_SSE3)
ENDIF(WITH_SSE3)
ENDIF(WITH_SSE2)
ENDIF()
ENDIF()
IF(APPLE_CERTIFICATE)
# Find codesign_allocate
@ -304,7 +312,7 @@ IF(WITH_QT5)
ADD_QT_LIBRARY(XcbQpa)
ADD_QT_LIBRARY(PlatformSupport)
SET(QT_LIBRARIES ${QT_LIBRARIES} -lX11-xcb -lXi -lSM -lICE -lxcb -lGL)
SET(QT_LIBRARIES ${QT_LIBRARIES} -lX11-xcb -lXi -lSM -lICE -lxcb -lGL -lxcb-glx)
IF(EXISTS "${QT_LIBRARY_DIR}/libxcb-static.a")
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_LIBRARY_DIR}/libxcb-static.a")
ENDIF()
@ -399,16 +407,16 @@ IF(WITH_QT)
# Use Qt 4
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED)
ENDIF(WITH_QT)
ENDIF()
IF(WITH_ASSIMP)
FIND_PACKAGE(assimp REQUIRED)
ENDIF(WITH_ASSIMP)
ENDIF()
IF(WITH_NEL)
IF(WITH_NEL_TESTS)
FIND_PACKAGE(CppTest)
ENDIF(WITH_NEL_TESTS)
ENDIF()
IF(WITH_GUI)
FIND_PACKAGE(Luabind REQUIRED)
@ -446,19 +454,19 @@ IF(WITH_NEL)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include)
ADD_SUBDIRECTORY(nel)
ENDIF(WITH_NEL)
ENDIF()
IF(WITH_RYZOM)
ADD_SUBDIRECTORY(ryzom)
ENDIF(WITH_RYZOM)
ENDIF()
IF(WITH_NELNS)
ADD_SUBDIRECTORY(nelns)
ENDIF(WITH_NELNS)
ENDIF()
IF(WITH_SNOWBALLS)
ADD_SUBDIRECTORY(snowballs2)
ENDIF(WITH_SNOWBALLS)
ENDIF()
IF(WITH_TOOLS)
ADD_SUBDIRECTORY(tool)
@ -466,22 +474,22 @@ ENDIF()
IF(WITH_STUDIO)
ADD_SUBDIRECTORY(studio)
ENDIF(WITH_STUDIO)
ENDIF()
# To build the documention, you will have to enable it
# and then do the equivalent of "make DoxygenDoc".
IF(BUILD_DOCUMENTATION)
IF(DOT)
SET(HAVE_DOT YES)
ELSE(DOT)
ELSE()
SET(HAVE_DOT NO)
ENDIF(DOT)
ENDIF()
# This processes our Doxyfile.in and substitutes paths to generate
# a final Doxyfile
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doc/Doxyfile.cmake.in ${CMAKE_BINARY_DIR}/doc/Doxyfile)
ADD_CUSTOM_TARGET(DoxygenDoc ${DOXYGEN} ${CMAKE_BINARY_DIR}/doc/Doxyfile)
ENDIF(BUILD_DOCUMENTATION)
ENDIF()
IF(WITH_NEL_TESTS)
ENABLE_TESTING()
@ -491,8 +499,8 @@ IF(WITH_NEL_TESTS)
SET(SVNCOMMAND svn)
SET(SVNSOURCEDIR http://dev.ryzom.com/svn/trunk/nel)
SET(GENERATELOGS svn2cl)
ENDIF(BUILD_DASHBOARD)
ENDIF(WITH_NEL_TESTS)
ENDIF()
ENDIF()
# packaging information
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ryzom Core MMORPG Framework")
@ -524,10 +532,10 @@ IF(WIN32)
#SET(CPACK_GENERATOR "NSIS")
SET(CPACK_GENERATOR "NSIS;ZIP")
SET(CPACK_SOURCE_GENERATOR "ZIP")
ELSE(WIN32)
ELSE()
SET(CPACK_GENERATOR "TGZ")
SET(CPACK_SOURCE_GENERATOR "TGZ")
ENDIF(WIN32)
ENDIF()
set(CPACK_SOURCE_IGNORE_FILES
"~$"
"\\\\.cvsignore$"
@ -545,8 +553,8 @@ IF(WIN32)
"${QT_LIBRARY_DIR}/../bin/QtXmld4.dll"
"${QT_LIBRARY_DIR}/../bin/QtCored4.dll"
DESTINATION ${NL_BIN_PREFIX})
ENDIF(WITH_QT)
ELSE(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
ENDIF()
ELSE()
IF(WITH_QT)
INCLUDE(${QT_USE_FILE})
INSTALL(FILES
@ -554,8 +562,8 @@ IF(WIN32)
"${QT_LIBRARY_DIR}/../bin/QtXml4.dll"
"${QT_LIBRARY_DIR}/../bin/QtCore4.dll"
DESTINATION ${NL_BIN_PREFIX})
ENDIF(WITH_QT)
ENDIF(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
ENDIF()
ENDIF()
# Install CEGUI and its dependencies.
IF(WITH_NEL_CEGUI)
@ -565,14 +573,14 @@ IF(WIN32)
INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIFalagardWRBase.dll" DESTINATION ${NL_BIN_PREFIX})
INSTALL(FILES "${CEGUI_LIB_DIR}/Devil.dll" DESTINATION ${NL_BIN_PREFIX})
INSTALL(FILES "${CEGUI_LIB_DIR}/ILU.dll" DESTINATION ${NL_BIN_PREFIX})
ENDIF(WITH_NEL_CEGUI)
ENDIF()
# Only the tools require MFC.
IF(WITH_TOOLS)
SET(CMAKE_INSTALL_MFC_LIBRARIES TRUE)
ENDIF(WITH_TOOLS)
ENDIF()
#INCLUDE(InstallRequiredSystemLibraries)
ENDIF(WIN32)
ENDIF()
INCLUDE(CPack)
@ -582,4 +590,4 @@ INCLUDE(CMakePackaging.txt)
#INCLUDE(UseDebian)
#IF(DEBIAN_FOUND)
# ADD_DEBIAN_TARGETS(nel)
#ENDIF(DEBIAN_FOUND)
#ENDIF()

View file

@ -24,8 +24,8 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND)
IF(NOT NM_SYMBOL MATCHES ${SYMBOL})
SET(${SYMBOL_FOUND} FALSE)
# MESSAGE(STATUS "Defined symbol ${SYMBOL} detected in ${${MYLIBRARY}}")
ENDIF(NOT NM_SYMBOL MATCHES ${SYMBOL})
ENDIF(CMAKE_NM)
ENDIF()
ENDIF()
ELSEIF(UNIX)
SET(CMAKE_OBJDUMP objdump)
IF(CMAKE_OBJDUMP)
@ -35,11 +35,11 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND)
IF(NOT OBJDUMP_SYMBOL MATCHES "UND")
#MESSAGE(STATUS "${${MYLIBRARY}} does not use symbol ${SYMBOL}")
SET(${SYMBOL_FOUND} FALSE)
ELSE(NOT OBJDUMP_SYMBOL MATCHES "UND")
ELSE()
#MESSAGE(STATUS "${${MYLIBRARY}} uses symbol ${SYMBOL}")
ENDIF(NOT OBJDUMP_SYMBOL MATCHES "UND")
ENDIF(CMAKE_OBJDUMP)
ENDIF(WIN32)
ENDIF()
ENDIF()
ENDIF()
ENDMACRO(CHECK_UNDEFINED_SYMBOL)
# CHECK_LINKED_LIBRARY
@ -66,8 +66,8 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
IF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
SET(${LIBRARY_FOUND} TRUE)
# MESSAGE(STATUS "Library ${LIBNAME} already linked to ${${MYLIBRARY}}")
ENDIF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
ENDIF(CMAKE_OTOOL)
ENDIF()
ENDIF()
ELSEIF(UNIX)
SET(CMAKE_OBJDUMP objdump)
IF(CMAKE_OBJDUMP)
@ -79,11 +79,11 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
IF(OBJDUMP_LIBRARY MATCHES "NEEDED")
#MESSAGE(STATUS "${${MYLIBRARY}} references to ${LIBNAME}.")
SET(${LIBRARY_FOUND} TRUE)
ELSE(OBJDUMP_LIBRARY MATCHES "NEEDED")
ELSE()
#MESSAGE(STATUS "${${MYLIBRARY}} does not reference to ${LIBNAME}!")
ENDIF(OBJDUMP_LIBRARY MATCHES "NEEDED")
ENDIF(CMAKE_OBJDUMP)
ENDIF(WIN32)
ENDIF()
ENDIF()
ENDIF()
ENDMACRO(CHECK_LINKED_LIBRARY)
MACRO(CHECK_DEPENDS MYLIBRARY OTHERLIBRARY SYMBOL MUSTLINK)
@ -91,13 +91,13 @@ MACRO(CHECK_DEPENDS MYLIBRARY OTHERLIBRARY SYMBOL MUSTLINK)
IF(SYMBOL_FOUND)
CHECK_LINKED_LIBRARY(MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
ENDIF(SYMBOL_FOUND)
ENDIF()
IF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
SET(${MUSTLINK} YES)
ELSE(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
ELSE()
SET(${MUSTLINK} NO)
ENDIF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
ENDIF()
ENDMACRO(CHECK_DEPENDS)
# LINK_DEPENDS
@ -116,23 +116,23 @@ MACRO(LINK_DEPENDS LIBRARIES MYLIBRARY OTHERLIBRARY SYMBOL)
IF(WIN32 OR WITH_STATIC)
# In static, we link all libraries because it will keep only used symbols
SET(MUST_LINK TRUE)
ELSE(WIN32 OR WITH_STATIC)
ELSE()
CHECK_UNDEFINED_SYMBOL(${MYLIBRARY} ${SYMBOL} SYMBOL_FOUND)
IF(SYMBOL_FOUND)
CHECK_LINKED_LIBRARY(${MYLIBRARY} ${OTHERLIBRARY} LIBRARY_FOUND)
ENDIF(SYMBOL_FOUND)
ENDIF()
IF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
MESSAGE(STATUS "Underlinking found: ${${MYLIBRARY}} needs ${${OTHERLIBRARY}} but is not linked to, manually linking...")
SET(MUST_LINK TRUE)
ENDIF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
ENDIF(WIN32 OR WITH_STATIC)
ENDIF(${MYLIBRARY} AND ${OTHERLIBRARY} AND NOT ${OTHERLIBRARY}_LINKED)
ENDIF()
ENDIF()
ENDIF()
IF(MUST_LINK)
MESSAGE(STATUS "Linking with ${${OTHERLIBRARY}}")
SET(${LIBRARIES} ${${LIBRARIES}} ${${OTHERLIBRARY}})
SET(${OTHERLIBRARY}_LINKED TRUE)
ENDIF(MUST_LINK)
ENDIF()
ENDMACRO(LINK_DEPENDS)

View file

@ -40,7 +40,8 @@ MACRO(NL_CONFIGURE_CHECKS)
SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}.${REVISION}")
SET(NL_VERSION_RC "${NL_VERSION_MAJOR},${NL_VERSION_MINOR},${NL_VERSION_PATCH},${REVISION}")
SET(RYZOM_VERSION "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}.${REVISION}")
SET(RYZOM_VERSION_SHORT "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}")
SET(RYZOM_VERSION "${RYZOM_VERSION_SHORT}.${REVISION}")
SET(RYZOM_VERSION_RC "${RYZOM_VERSION_MAJOR},${RYZOM_VERSION_MINOR},${RYZOM_VERSION_PATCH},${REVISION}")
NOW(BUILD_DATE)

View file

@ -18,6 +18,7 @@ FIND_PATH(MAXSDK_DIR
PATHS
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2017 SDK/maxsdk"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk"
@ -36,12 +37,12 @@ FIND_PATH(MAXSDK_CS_INCLUDE_DIR bipexp.h
)
IF(TARGET_X64)
SET(MAXSDK_LIBRARY_DIRS ${MAXSDK_DIR}/x64/lib)
SET(MAXSDK_LIBRARY_DIRS ${MAXSDK_DIR}/x64/lib ${MAXSDK_DIR}/lib/x64/Release)
ELSE()
SET(MAXSDK_LIBRARY_DIRS ${MAXSDK_DIR}/lib)
ENDIF()
MACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME)
MACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_LIBRARY(${MYLIBRARY}
NAMES ${MYLIBRARYNAME}
HINTS
@ -73,10 +74,28 @@ if(MAXSDK_FOUND)
${MAXSDK_MAXUTIL_LIBRARY}
${MAXSDK_MAXSCRIPT_LIBRARY}
${MAXSDK_PARAMBLK2_LIBRARY}
${MAXSDK_BMM_LIBRARY} )
${MAXSDK_BMM_LIBRARY})
else(MAXSDK_FOUND)
# parse maxversion.h to determine SDK version
IF(EXISTS "${MAXSDK_DIR}/include/maxversion.h")
FILE(STRINGS "${MAXSDK_DIR}/include/maxversion.h" LINES REGEX "#define MAX_PRODUCT_YEAR_NUMBER ([0-9]+)")
STRING(REGEX REPLACE ".+MAX_PRODUCT_YEAR_NUMBER ([0-9]+)" "\\1" MAXSDK_VERSION "${LINES}")
UNSET(LINES)
ELSE()
SET(MAXSDK_VERSION "Unknown")
ENDIF()
MESSAGE(STATUS "Found 3dsmax version ${MAXSDK_VERSION} in ${MAXSDK_DIR}")
# 3ds Max 2013 and later are always Unicode
IF(MAXSDK_VERSION VERSION_GREATER 2012)
SET(MAXSDK_DEFINITIONS -DUNICODE -D_UNICODE)
ELSE()
SET(MAXSDK_DEFINITIONS)
ENDIF()
ELSE()
set(MAXSDK_LIBRARIES)
endif(MAXSDK_FOUND)
ENDIF()
mark_as_advanced(MAXSDK_INCLUDE_DIR MAXSDK_LIBRARY)

View file

@ -7,7 +7,7 @@
IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
# in cache already
SET(CEGUI_FIND_QUIETLY TRUE)
ENDIF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
ENDIF()
FIND_PATH(CEGUI_INCLUDE_DIRS
@ -45,9 +45,9 @@ IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
SET(CEGUI_INCLUDE_DIRS "${CEGUI_INCLUDE_DIRS}/CEGUI")
IF(NOT CEGUI_FIND_QUIETLY)
MESSAGE(STATUS "Found CEGUI: ${CEGUI_LIBRARY}")
ENDIF(NOT CEGUI_FIND_QUIETLY)
ELSE(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
ENDIF()
ELSE()
IF(NOT CEGUI_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find CEGUI!")
ENDIF(NOT CEGUI_FIND_QUIETLY)
ENDIF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
ENDIF()
ENDIF()

View file

@ -10,7 +10,7 @@
IF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
# in cache already
SET(CPPTEST_FIND_QUIETLY TRUE)
ENDIF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
ENDIF()
FIND_PATH(CPPTEST_INCLUDE_DIR
cpptest.h
@ -30,7 +30,7 @@ SET(LIBRARY_NAME_DEBUG cpptestd)
IF(WITH_STLPORT)
SET(LIBRARY_NAME_RELEASE cpptest_stlport ${LIBRARY_NAME_RELEASE})
SET(LIBRARY_NAME_DEBUG cpptest_stlportd ${LIBRARY_NAME_DEBUG})
ENDIF(WITH_STLPORT)
ENDIF()
FIND_LIBRARY(CPPTEST_LIBRARY_RELEASE
${LIBRARY_NAME_RELEASE}
@ -67,18 +67,18 @@ IF(CPPTEST_INCLUDE_DIR)
SET(CPPTEST_LIBRARIES "optimized;${CPPTEST_LIBRARY_RELEASE}")
IF(CPPTEST_LIBRARY_DEBUG)
SET(CPPTEST_LIBRARIES "${CPPTEST_LIBRARIES};debug;${CPPTEST_LIBRARY_DEBUG}")
ENDIF(CPPTEST_LIBRARY_DEBUG)
ENDIF(CPPTEST_LIBRARY_RELEASE)
ENDIF(CPPTEST_INCLUDE_DIR)
ENDIF()
ENDIF()
ENDIF()
IF(CPPTEST_FOUND)
IF(NOT CPPTEST_FIND_QUIETLY)
MESSAGE(STATUS "Found CppTest: ${CPPTEST_LIBRARIES}")
ENDIF(NOT CPPTEST_FIND_QUIETLY)
ELSE(CPPTEST_FOUND)
ENDIF()
ELSE()
IF(NOT CPPTEST_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find CppTest!")
ENDIF(NOT CPPTEST_FIND_QUIETLY)
ENDIF(CPPTEST_FOUND)
ENDIF()
ENDIF()
MARK_AS_ADVANCED(CPPTEST_LIBRARY_RELEASE CPPTEST_LIBRARY_DEBUG)

View file

@ -6,20 +6,20 @@
IF(CustomMFC_FIND_REQUIRED)
SET(MFC_FIND_REQUIRED TRUE)
ENDIF(CustomMFC_FIND_REQUIRED)
ENDIF()
IF(NOT MFC_DIR)
# If MFC have been found, remember their directory
IF(VC_DIR)
SET(MFC_STANDARD_DIR "${VC_DIR}/atlmfc")
ENDIF(VC_DIR)
ENDIF()
FIND_PATH(MFC_DIR
include/afxwin.h
HINTS
${MFC_STANDARD_DIR}
)
ENDIF(NOT MFC_DIR)
ENDIF()
# Display an error message if MFC are not found, MFC_FOUND is updated
# User will be able to update MFC_DIR to the correct directory
@ -33,15 +33,15 @@ IF(MFC_FOUND)
# Using 32 or 64 bits libraries
IF(TARGET_X64)
SET(MFC_LIBRARY_DIR "${MFC_DIR}/lib/amd64")
ELSE(TARGET_X64)
ELSE()
SET(MFC_LIBRARY_DIR "${MFC_DIR}/lib")
ENDIF(TARGET_X64)
ENDIF()
# Add MFC libraries directory to default library path
LINK_DIRECTORIES(${MFC_LIBRARY_DIR})
# Set definitions for using MFC in DLL
SET(MFC_DEFINITIONS -D_AFXDLL)
SET(MFC_DEFINITIONS -D_AFXDLL -DUNICODE -D_UNICODE)
# Set CMake flag to use MFC DLL
SET(CMAKE_MFC_FLAG 2)

View file

@ -8,7 +8,7 @@
if(DSOUND_INCLUDE_DIR)
# Already in cache, be silent
set(DSOUND_FIND_QUIETLY TRUE)
endif(DSOUND_INCLUDE_DIR)
ENDIF()
find_path(DSOUND_INCLUDE_DIR dsound.h
"$ENV{DXSDK_DIR}"
@ -29,8 +29,8 @@ find_package_handle_standard_args(DSOUND DEFAULT_MSG
if(DSOUND_FOUND)
set(DSOUND_LIBRARIES ${DSOUND_LIBRARY})
else(DSOUND_FOUND)
ELSE()
set(DSOUND_LIBRARIES)
endif(DSOUND_FOUND)
ENDIF()
mark_as_advanced(DSOUND_INCLUDE_DIR DSOUND_LIBRARY)

View file

@ -8,7 +8,7 @@
IF(DXSDK_DIR)
# Already in cache, be silent
SET(DXSDK_FIND_QUIETLY TRUE)
ENDIF(DXSDK_DIR)
ENDIF()
FIND_PATH(DXSDK_DIR
"Include/dxsdkver.h"

View file

@ -7,7 +7,7 @@
IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
# in cache already
SET(EFXUTIL_FIND_QUIETLY TRUE)
ENDIF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
ENDIF()
FIND_PATH(EFXUTIL_INCLUDE_DIR
@ -42,9 +42,9 @@ IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
SET(EFXUTIL_FOUND "YES")
IF(NOT EFXUTIL_FIND_QUIETLY)
MESSAGE(STATUS "Found EFX-Util: ${EFXUTIL_LIBRARY}")
ENDIF(NOT EFXUTIL_FIND_QUIETLY)
ELSE(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
ENDIF()
ELSE()
IF(NOT EFXUTIL_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find EFX-Util!")
ENDIF(NOT EFXUTIL_FIND_QUIETLY)
ENDIF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
ENDIF()
ENDIF()

View file

@ -16,7 +16,7 @@ IF(WITH_STLPORT)
SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external_stlport ${CMAKE_CURRENT_SOURCE_DIR}/../external_stlport ${EXTERNAL_TEMP_PATH})
SET(EXTERNAL_TEMP_FILE "include/stlport/string")
SET(EXTERNAL_NAME "external with STLport")
ENDIF(WITH_STLPORT)
ENDIF()
FIND_PATH(EXTERNAL_PATH
${EXTERNAL_TEMP_FILE}

View file

@ -7,7 +7,7 @@
IF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
# in cache already
SET(FMOD_FIND_QUIETLY TRUE)
ENDIF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
ENDIF()
FIND_PATH(FMOD_INCLUDE_DIR
@ -25,9 +25,9 @@ FIND_PATH(FMOD_INCLUDE_DIR
IF(TARGET_X64)
SET(FMOD_LIBRARY_NAMES fmod64 fmod)
ELSE(TARGET_X64)
ELSE()
SET(FMOD_LIBRARY_NAMES fmodvc fmod)
ENDIF(TARGET_X64)
ENDIF()
FIND_LIBRARY(FMOD_LIBRARY
NAMES
@ -49,9 +49,9 @@ IF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
SET(FMOD_FOUND "YES")
IF(NOT FMOD_FIND_QUIETLY)
MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARY}")
ENDIF(NOT FMOD_FIND_QUIETLY)
ELSE(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
ENDIF()
ELSE()
IF(NOT FMOD_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find FMOD!")
ENDIF(NOT FMOD_FIND_QUIETLY)
ENDIF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
ENDIF()
ENDIF()

View file

@ -7,7 +7,7 @@
IF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
# in cache already
SET(Freetype_FIND_QUIETLY TRUE)
ENDIF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
ENDIF()
FIND_PATH(FREETYPE_INCLUDE_DIRS
freetype
@ -24,7 +24,7 @@ FIND_PATH(FREETYPE_INCLUDE_DIRS
IF(NOT FREETYPE_INCLUDE_DIRS)
SET(FREETYPE_INCLUDE_DIRS "")
ENDIF(NOT FREETYPE_INCLUDE_DIRS)
ENDIF()
# ft2build.h does not reside in the freetype include dir
FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR
@ -42,7 +42,7 @@ FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR
# combine both include directories into one variable
IF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_ADDITIONAL_INCLUDE_DIR})
ENDIF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
ENDIF()
FIND_LIBRARY(FREETYPE_LIBRARY_RELEASE
NAMES freetype libfreetype freetype219 freetype246
@ -89,8 +89,8 @@ IF(FREETYPE_INCLUDE_DIRS)
# Case where Freetype is compiled from sources (debug version is compiled by default)
SET(FREETYPE_FOUND ON)
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY_DEBUG})
ENDIF(FREETYPE_LIBRARY_RELEASE AND FREETYPE_LIBRARY_DEBUG)
ENDIF(FREETYPE_INCLUDE_DIRS)
ENDIF()
ENDIF()
IF(FREETYPE_FOUND)
IF(WITH_STATIC_EXTERNAL AND APPLE)
@ -98,13 +98,13 @@ IF(FREETYPE_FOUND)
IF(BZIP2_FOUND)
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR})
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARIES} ${BZIP2_LIBRARIES})
ENDIF(BZIP2_FOUND)
ENDIF(WITH_STATIC_EXTERNAL AND APPLE)
ENDIF()
ENDIF()
IF(NOT Freetype_FIND_QUIETLY)
MESSAGE(STATUS "Found FreeType: ${FREETYPE_LIBRARIES}")
ENDIF(NOT Freetype_FIND_QUIETLY)
ELSE(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
ENDIF()
ELSE()
IF(NOT Freetype_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find FreeType!")
ENDIF(NOT Freetype_FIND_QUIETLY)
ENDIF(FREETYPE_FOUND)
ENDIF()
ENDIF()

View file

@ -20,7 +20,7 @@ FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c PATHS /opt/local)
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
SET(ICONV_FOUND TRUE)
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
ENDIF()
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
@ -29,7 +29,7 @@ IF(ICONV_FOUND)
set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}")
if(ICONV_HAVE_WERROR)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
endif(ICONV_HAVE_WERROR)
ENDIF()
check_c_source_compiles("
#include <iconv.h>
int main(){
@ -43,19 +43,19 @@ IF(ICONV_FOUND)
}
" ICONV_SECOND_ARGUMENT_IS_CONST )
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}")
ENDIF(ICONV_FOUND)
ENDIF()
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)
ENDIF()
ELSE()
IF(Iconv_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Iconv")
ENDIF(Iconv_FIND_REQUIRED)
ENDIF(ICONV_FOUND)
ENDIF()
ENDIF()
MARK_AS_ADVANCED(
ICONV_INCLUDE_DIR

View file

@ -7,7 +7,7 @@
IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
# in cache already
SET(JPEG_FIND_QUIETLY TRUE)
ENDIF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
ENDIF()
FIND_PATH(JPEG_INCLUDE_DIR
@ -42,9 +42,9 @@ IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
SET(JPEG_FOUND "YES")
IF(NOT JPEG_FIND_QUIETLY)
MESSAGE(STATUS "Found Jpeg: ${JPEG_LIBRARY}")
ENDIF(NOT JPEG_FIND_QUIETLY)
ELSE(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
ENDIF()
ELSE()
IF(NOT JPEG_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Jpeg!")
ENDIF(NOT JPEG_FIND_QUIETLY)
ENDIF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
ENDIF()
ENDIF()

View file

@ -7,10 +7,11 @@
IF(LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIR)
# in cache already
SET(LIBOVR_FIND_QUIETLY TRUE)
ENDIF(LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIR)
ENDIF()
FIND_PATH(LIBOVR_INCLUDE_DIR
OVR.h
NAMES
OVR.h OVR_CAPI.h
PATHS
$ENV{LIBOVR_DIR}/Include
/usr/local/include
@ -24,18 +25,18 @@ FIND_PATH(LIBOVR_INCLUDE_DIR
IF(UNIX)
IF(TARGET_X64)
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Linux/Release/x86_64")
ELSE(TARGET_X64)
ELSE()
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Linux/Release/i386")
ENDIF(TARGET_X64)
ENDIF()
ELSEIF(APPLE)
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/MacOS/Release")
ELSEIF(WIN32)
IF(TARGET_X64)
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/x64")
ELSE(TARGET_X64)
ELSE()
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Win32")
ENDIF(TARGET_X64)
ENDIF(UNIX)
ENDIF()
ENDIF()
FIND_LIBRARY(LIBOVR_LIBRARY
NAMES ovr libovr
@ -55,17 +56,17 @@ FIND_LIBRARY(LIBOVR_LIBRARY
IF(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
IF(NOT LIBOVR_FIND_QUIETLY)
MESSAGE(STATUS "Found LibOVR: ${LIBOVR_LIBRARY}")
ENDIF(NOT LIBOVR_FIND_QUIETLY)
ENDIF()
SET(LIBOVR_FOUND "YES")
SET(LIBOVR_DEFINITIONS "-DHAVE_LIBOVR")
SET(NL_STEREO_AVAILABLE ON)
IF(UNIX)
SET(LIBOVR_LIBRARIES ${LIBOVR_LIBRARY} X11 Xinerama udev pthread)
ELSE(UNIX)
ELSE()
SET(LIBOVR_LIBRARIES ${LIBOVR_LIBRARY})
ENDIF(UNIX)
ELSE(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
ENDIF()
ELSE()
IF(NOT LIBOVR_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find LibOVR!")
ENDIF(NOT LIBOVR_FIND_QUIETLY)
ENDIF(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
ENDIF()
ENDIF()

View file

@ -7,7 +7,7 @@
IF(LIBVR_LIBRARIES AND LIBVR_INCLUDE_DIR)
# in cache already
SET(LIBVR_FIND_QUIETLY TRUE)
ENDIF(LIBVR_LIBRARIES AND LIBVR_INCLUDE_DIR)
ENDIF()
FIND_PATH(LIBVR_INCLUDE_DIR hmd.h
PATH_SUFFIXES include/LibVR
@ -22,12 +22,12 @@ FIND_LIBRARY(LIBVR_LIBRARY
IF(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
IF(NOT LIBVR_FIND_QUIETLY)
MESSAGE(STATUS "Found LibVR: ${LIBVR_LIBRARY}")
ENDIF(NOT LIBVR_FIND_QUIETLY)
ENDIF()
SET(LIBVR_FOUND "YES")
SET(LIBVR_DEFINITIONS "-DHAVE_LIBVR")
SET(NL_STEREO_AVAILABLE ON)
ELSE(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
ELSE()
IF(NOT LIBVR_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find LibVR!")
ENDIF(NOT LIBVR_FIND_QUIETLY)
ENDIF(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
ENDIF()
ENDIF()

View file

@ -143,7 +143,7 @@ ENDIF()
IF(WITH_STLPORT)
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport)
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlportd)
ENDIF(WITH_STLPORT)
ENDIF()
# generic libraries names
LIST(APPEND LIBRARY_NAME_RELEASE luabind libluabind)
@ -194,7 +194,7 @@ IF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
# Case where Luabind is compiled from sources (debug version is compiled by default)
SET(LUABIND_FOUND TRUE)
SET(LUABIND_LIBRARIES ${LUABIND_LIBRARY_DEBUG})
ENDIF(LUABIND_LIBRARY_RELEASE AND LUABIND_LIBRARY_DEBUG)
ENDIF()
ENDIF()
IF(LUABIND_FOUND)
@ -209,11 +209,11 @@ IF(LUABIND_FOUND)
IF(NOT Luabind_FIND_QUIETLY)
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
ENDIF(NOT Luabind_FIND_QUIETLY)
ENDIF()
ELSE()
IF(NOT Luabind_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Luabind!")
ENDIF()
ENDIF(LUABIND_FOUND)
ENDIF()
MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG Boost_LIB_DIAGNOSTIC_DEFINITIONS)

View file

@ -7,7 +7,7 @@
IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
# in cache already
SET(OGG_FIND_QUIETLY TRUE)
ENDIF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
ENDIF()
FIND_PATH(OGG_INCLUDE_DIR
@ -41,9 +41,9 @@ IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
SET(OGG_FOUND "YES")
IF(NOT OGG_FIND_QUIETLY)
MESSAGE(STATUS "Found Ogg: ${OGG_LIBRARY}")
ENDIF(NOT OGG_FIND_QUIETLY)
ELSE(OGG_LIBRARY AND OGG_INCLUDE_DIR)
ENDIF()
ELSE()
IF(NOT OGG_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Ogg!")
ENDIF(NOT OGG_FIND_QUIETLY)
ENDIF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
ENDIF()
ENDIF()

View file

@ -43,7 +43,7 @@ IF(OPENGLES_GLES_LIBRARY)
IF(OPENGLES_EGL_LIBRARY)
SET(OPENGLES_EGL_FOUND "YES")
SET(OPENGLES_LIBRARIES ${OPENGLES_EGL_LIBRARY} ${OPENGLES_LIBRARIES})
ELSE(OPENGLES_EGL_LIBRARY)
ELSE()
SET(OPENGLES_EGL_FOUND "NO")
ENDIF(OPENGLES_EGL_LIBRARY)
ENDIF(OPENGLES_GLES_LIBRARY)
ENDIF()
ENDIF()

View file

@ -9,7 +9,7 @@
IF(STLPORT_LIBRARIES AND STLPORT_INCLUDE_DIR)
# in cache already
SET(STLPORT_FIND_QUIETLY TRUE)
ENDIF(STLPORT_LIBRARIES AND STLPORT_INCLUDE_DIR)
ENDIF()
FIND_PATH(STLPORT_INCLUDE_DIR
iostream
@ -74,18 +74,18 @@ IF(STLPORT_INCLUDE_DIR)
SET(STLPORT_LIBRARIES ${STLPORT_LIBRARY_RELEASE})
IF(STLPORT_LIBRARY_DEBUG)
SET(STLPORT_LIBRARIES optimized ${STLPORT_LIBRARIES} debug ${STLPORT_LIBRARY_DEBUG})
ENDIF(STLPORT_LIBRARY_DEBUG)
ENDIF(STLPORT_LIBRARY_RELEASE)
ENDIF(STLPORT_INCLUDE_DIR)
ENDIF()
ENDIF()
ENDIF()
IF(STLPORT_FOUND)
IF(NOT STLPORT_FIND_QUIETLY)
MESSAGE(STATUS "Found STLport: ${STLPORT_LIBRARIES}")
ENDIF(NOT STLPORT_FIND_QUIETLY)
ELSE(STLPORT_FOUND)
ENDIF()
ELSE()
IF(NOT STLPORT_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find STLport!")
ENDIF(NOT STLPORT_FIND_QUIETLY)
ENDIF(STLPORT_FOUND)
ENDIF()
ENDIF()
MARK_AS_ADVANCED(STLPORT_LIBRARY_RELEASE STLPORT_LIBRARY_DEBUG)

View file

@ -10,7 +10,7 @@
IF(SQUISH_LIBRARIES AND SQUISH_INCLUDE_DIR)
# in cache already
SET(SQUISH_FIND_QUIETLY TRUE)
ENDIF(SQUISH_LIBRARIES AND SQUISH_INCLUDE_DIR)
ENDIF()
FIND_PATH(SQUISH_INCLUDE_DIR
squish.h
@ -58,26 +58,26 @@ IF(SQUISH_INCLUDE_DIR)
SET(SQUISH_LIBRARIES "optimized;${SQUISH_LIBRARY_RELEASE}")
IF(SQUISH_LIBRARY_DEBUG)
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_DEBUG}")
ELSE(SQUISH_LIBRARY_DEBUG)
ELSE()
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_RELEASE}")
MESSAGE("Debug Squish NOT found, using the release version!")
ENDIF(SQUISH_LIBRARY_DEBUG)
ENDIF(SQUISH_LIBRARY_RELEASE)
ENDIF(SQUISH_INCLUDE_DIR)
ENDIF()
ENDIF()
ENDIF()
IF(SQUISH_FOUND)
IF(NOT SQUISH_FIND_QUIETLY)
MESSAGE(STATUS "Found Squish: ${SQUISH_LIBRARIES}")
ENDIF(NOT SQUISH_FIND_QUIETLY)
ENDIF()
FILE(STRINGS ${SQUISH_INCLUDE_DIR}/squish.h METRIC REGEX "metric = 0")
IF(METRIC)
SET(SQUISH_COMPRESS_HAS_METRIC ON)
SET(SQUISH_DEFINITIONS -DSQUISH_COMPRESS_HAS_METRIC)
ENDIF(METRIC)
ELSE(SQUISH_FOUND)
ENDIF()
ELSE()
IF(NOT SQUISH_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Squish!")
ENDIF(NOT SQUISH_FIND_QUIETLY)
ENDIF(SQUISH_FOUND)
ENDIF()
ENDIF()
MARK_AS_ADVANCED(SQUISH_LIBRARY_RELEASE SQUISH_LIBRARY_DEBUG)

View file

@ -7,7 +7,7 @@
IF(VORBIS_LIBRARY AND VORBIS_INCLUDE_DIR)
# in cache already
SET(VORBIS_FIND_QUIETLY TRUE)
ENDIF(VORBIS_LIBRARY AND VORBIS_INCLUDE_DIR)
ENDIF()
FIND_PATH(VORBIS_INCLUDE_DIR
@ -57,9 +57,9 @@ IF(VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBIS_INCLUDE_DIR)
SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
IF(NOT VORBIS_FIND_QUIETLY)
MESSAGE(STATUS "Found Vorbis: ${VORBIS_LIBRARY}")
ENDIF(NOT VORBIS_FIND_QUIETLY)
ELSE(VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBIS_INCLUDE_DIR)
ENDIF()
ELSE()
IF(NOT VORBIS_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Vorbis!")
ENDIF(NOT VORBIS_FIND_QUIETLY)
ENDIF(VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBIS_INCLUDE_DIR)
ENDIF()
ENDIF()

View file

@ -255,8 +255,19 @@ MACRO(USE_CURRENT_WINSDK)
SET(WINSDK_VERSION "6.0A")
ENDIF()
ELSEIF(MSVC80)
IF(NOT MSVC_EXPRESS)
# TODO: fix this version
SET(WINSDK_MSVC80_COMPATIBLES "7.1" "7.1A" "7.0" "7.0A" "6.1" "6.0" "6.0A" "5.2A")
# look for each Windows SDK supported by VC++ 2005 (7.1 is the latest)
FOREACH(_VERSION ${WINSDK_DETECTED_VERSIONS})
# look if this version of Windows SDK is installed
LIST(FIND WINSDK_MSVC80_COMPATIBLES ${_VERSION} _FOUND)
IF(NOT _FOUND EQUAL -1)
SET(WINSDK_VERSION "${_VERSION}")
BREAK()
ENDIF()
ENDFOREACH()
IF(NOT MSVC_EXPRESS AND NOT WINSDK_VERSION)
SET(WINSDK_VERSION "5.2A")
ENDIF()
ELSE()
@ -441,8 +452,8 @@ IF(WINSDK_INCLUDE_DIR)
SET(CMAKE_LIBRARY_PATH ${WINSDK_LIBRARY_DIR} ${CMAKE_LIBRARY_PATH})
# Fix for using Windows SDK 7.1 with Visual C++ 2012
IF(WINSDK_VERSION STREQUAL "7.1" AND MSVC11)
# Fix for using Windows SDK 7.1 with Visual C++ 2012, 2013 and 2015
IF(WINSDK_VERSION STREQUAL "7.1" AND (MSVC11 OR MSVC12 OR MSVC14))
ADD_DEFINITIONS(-D_USING_V110_SDK71_)
ENDIF()
ELSE()

View file

@ -7,7 +7,7 @@
IF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
# in cache already
SET(XF86VidMode_FIND_QUIETLY TRUE)
ENDIF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
ENDIF()
FIND_PATH(XF86VidMode_INCLUDE_DIR
@ -37,10 +37,10 @@ IF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
SET(XF86VidMode_DEFINITIONS -DXF86VIDMODE)
IF(NOT XF86VidMode_FIND_QUIETLY)
MESSAGE(STATUS "Found XF86VidMode: ${XF86VidMode_LIBRARY}")
ENDIF(NOT XF86VidMode_FIND_QUIETLY)
ELSE(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
ENDIF()
ELSE()
IF(NOT XF86VidMode_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find XF86VidMode!")
ENDIF(NOT XF86VidMode_FIND_QUIETLY)
ENDIF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
ENDIF()
ENDIF()

View file

@ -27,23 +27,45 @@ ELSE()
ENDIF()
ENDIF()
MACRO(APPEND_DEFINITION _NAME _VAL)
IF(CMAKE_VERSION VERSION_LESS "2.8.12")
# don't support logical expressions, append definition
LIST(APPEND ${_NAME} "-D${_VAL}")
ELSE()
# support logical expressions, use them
LIST(APPEND ${_NAME} "$<$<BOOL:${_VAL}>:-D$<JOIN:${_VAL},-D>>")
ENDIF()
ENDMACRO()
# Set PCH_FLAGS for common flags, PCH_ARCH_XXX_FLAGS for specific archs flags and PCH_ARCHS for archs
MACRO(PCH_SET_COMPILE_FLAGS _target)
SET(PCH_FLAGS)
SET(PCH_ARCHS)
SET(_FLAGS)
LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS})
# C++ flags
SET(_FLAG ${CMAKE_CXX_FLAGS})
SEPARATE_ARGUMENTS(_FLAG)
LIST(APPEND _FLAGS ${_FLAG})
# C++ config flags
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD)
LIST(APPEND _FLAGS " ${CMAKE_CXX_FLAGS_${_UPPER_BUILD}}")
SET(_FLAG ${CMAKE_CXX_FLAGS_${_UPPER_BUILD}})
SEPARATE_ARGUMENTS(_FLAG)
LIST(APPEND _FLAGS ${_FLAG})
GET_TARGET_PROPERTY(_targetType ${_target} TYPE)
SET(_USE_PIC OFF)
IF(${_targetType} STREQUAL "SHARED_LIBRARY" OR ${_targetType} STREQUAL "MODULE_LIBRARY")
LIST(APPEND _FLAGS " ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
SET(_FLAG ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
SEPARATE_ARGUMENTS(_FLAG)
LIST(APPEND _FLAGS ${_FLAG})
ELSE()
GET_TARGET_PROPERTY(_pic ${_target} POSITION_INDEPENDENT_CODE)
IF(_pic)
@ -53,67 +75,71 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES)
FOREACH(item ${DIRINC})
LIST(APPEND _FLAGS " -I\"${item}\"")
LIST(APPEND _FLAGS -I"${item}")
ENDFOREACH()
# NOTE: As cmake files (eg FindQT4) may now use generator expressions around their defines that evaluate
# to an empty string, wrap all "items" in an expression that outputs a -D IFF the generated
# expression is not empty.
# Required for CMake 2.6
SET(GLOBAL_DEFINITIONS)
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS)
IF(DEFINITIONS)
FOREACH(item ${DEFINITIONS})
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
ENDFOREACH()
ENDIF()
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS_${_UPPER_BUILD})
IF(DEFINITIONS)
FOREACH(item ${DEFINITIONS})
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
ENDFOREACH()
ENDIF()
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
IF(DEFINITIONS)
FOREACH(item ${DEFINITIONS})
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
ENDFOREACH()
ENDIF()
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS_${_UPPER_BUILD})
IF(DEFINITIONS)
FOREACH(item ${DEFINITIONS})
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
ENDFOREACH()
ENDIF()
GET_TARGET_PROPERTY(oldProps ${_target} COMPILE_FLAGS)
IF(oldProps)
LIST(APPEND _FLAGS " ${oldProps}")
LIST(APPEND _FLAGS ${oldProps})
ENDIF()
GET_TARGET_PROPERTY(oldPropsBuild ${_target} COMPILE_FLAGS_${_UPPER_BUILD})
IF(oldPropsBuild)
LIST(APPEND _FLAGS " ${oldPropsBuild}")
LIST(APPEND _FLAGS ${oldPropsBuild})
ENDIF()
GET_TARGET_PROPERTY(DIRINC ${_target} INCLUDE_DIRECTORIES)
IF(DIRINC)
FOREACH(item ${DIRINC})
LIST(APPEND _FLAGS " -I\"${item}\"")
LIST(APPEND _FLAGS -I"${item}")
ENDFOREACH()
ENDIF()
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS)
IF(DEFINITIONS)
FOREACH(item ${DEFINITIONS})
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
ENDFOREACH()
ENDIF()
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS_${_UPPER_BUILD})
IF(DEFINITIONS)
FOREACH(item ${DEFINITIONS})
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
ENDFOREACH()
ENDIF()
@ -126,7 +152,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
IF(_DIRS)
FOREACH(item ${_DIRS})
LIST(APPEND GLOBAL_DEFINITIONS " -I\"${item}\"")
LIST(APPEND GLOBAL_DEFINITIONS -I"${item}")
ENDFOREACH()
ENDIF()
@ -135,10 +161,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
IF(_DEFINITIONS)
FOREACH(item ${_DEFINITIONS})
# don't use dynamic expressions
IF(NOT item MATCHES "\\$<")
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
ENDIF()
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
ENDFOREACH()
ENDIF()
ENDIF()
@ -149,7 +172,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
IF(GLOBAL_DEFINITIONS MATCHES "QT_CORE_LIB")
# Hack to define missing QT_NO_DEBUG with Qt 5.2
IF(_UPPER_BUILD STREQUAL "RELEASE")
LIST(APPEND GLOBAL_DEFINITIONS " -DQT_NO_DEBUG")
LIST(APPEND GLOBAL_DEFINITIONS "-DQT_NO_DEBUG")
ENDIF()
# Qt5_POSITION_INDEPENDENT_CODE should be true if Qt was compiled with PIC
@ -158,28 +181,39 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
ENDIF()
IF(_USE_PIC)
LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIC}")
LIST(APPEND _FLAGS ${CMAKE_CXX_COMPILE_OPTIONS_PIC})
ENDIF()
ENDIF()
LIST(APPEND _FLAGS " ${GLOBAL_DEFINITIONS}")
IF(CMAKE_VERSION VERSION_LESS "3.3.0")
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
GET_DIRECTORY_PROPERTY(_directory_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
LIST(APPEND _FLAGS " ${_directory_flags}")
LIST(APPEND _FLAGS " ${_directory_definitions}")
GET_DIRECTORY_PROPERTY(_DIRECTORY_FLAGS DEFINITIONS)
IF(_DIRECTORY_FLAGS)
SEPARATE_ARGUMENTS(_DIRECTORY_FLAGS)
FOREACH(item ${_DIRECTORY_FLAGS})
LIST(APPEND _FLAGS "${item}")
ENDFOREACH()
ENDIF()
GET_DIRECTORY_PROPERTY(_DIRECTORY_DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
IF(_DIRECTORY_DEFINITIONS)
SEPARATE_ARGUMENTS(_DIRECTORY_DEFINITIONS)
FOREACH(item ${_DIRECTORY_DEFINITIONS})
LIST(APPEND _FLAGS "${item}")
ENDFOREACH()
ENDIF()
ENDIF()
# Format definitions
IF(MSVC)
# Fix path with space
SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}")
ELSE()
STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS})
SEPARATE_ARGUMENTS(_FLAGS)
ENDIF()
# Already in list form and items may contain non-leading spaces that should not be split on
LIST(INSERT _FLAGS 0 "${GLOBAL_DEFINITIONS}")
IF(CLANG)
# Determining all architectures and get common flags
SET(_ARCH_NEXT)
@ -236,6 +270,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
ENDIF()
IF(PCH_FLAGS)
LIST(REMOVE_ITEM PCH_FLAGS "")
LIST(REMOVE_DUPLICATES PCH_FLAGS)
ENDIF()
ENDMACRO()
@ -247,16 +282,16 @@ MACRO(GET_PDB_FILENAME _out_filename _target)
SET(_targetOutput ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
ELSEIF(${_targetType} STREQUAL STATIC_LIBRARY)
SET(_targetOutput ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
ELSE(${_targetType} STREQUAL EXECUTABLE)
ELSE()
SET(_targetOutput ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
ENDIF(${_targetType} STREQUAL EXECUTABLE)
ENDIF()
# determine target postfix
STRING(TOUPPER "${CMAKE_BUILD_TYPE}_POSTFIX" _postfix_var_name)
GET_TARGET_PROPERTY(_targetPostfix ${_target} ${_postfix_var_name})
IF(${_targetPostfix} MATCHES NOTFOUND)
SET(_targetPostfix "")
ENDIF(${_targetPostfix} MATCHES NOTFOUND)
ENDIF()
SET(${_out_filename} "${_targetOutput}/${_target}${_targetPostfix}.pdb")
ENDMACRO(GET_PDB_FILENAME)
@ -270,8 +305,9 @@ MACRO(PCH_SET_COMPILE_COMMAND _inputcpp _compile_FLAGS)
ENDIF()
IF(MSVC)
GET_PDB_FILENAME(PDB_FILE ${_PCH_current_target})
SET(PCH_COMMAND ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} /Yc /Fp"${PCH_OUTPUT}" ${_inputcpp} /Fd"${PDB_FILE}" /c /Fo"${PCH_OUTPUT}.obj")
GET_PDB_FILENAME(_PDB_FILE ${_PCH_current_target})
SET(PCH_COMMAND ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} /Yc /Fp"${PCH_OUTPUT}" ${_inputcpp} /Fd"${_PDB_FILE}" /c /Fo"${PCH_OUTPUT}.obj")
# Ninja PCH Support
# http://public.kitware.com/pipermail/cmake-developers/2012-March/003653.html
SET_SOURCE_FILES_PROPERTIES(${_inputcpp} PROPERTIES OBJECT_OUTPUTS "${PCH_OUTPUT}.obj")

File diff suppressed because it is too large Load diff

View file

@ -2,23 +2,23 @@ PROJECT(NeL CXX C)
IF(WITH_STATIC_DRIVERS)
ADD_DEFINITIONS(-DNL_STATIC)
ENDIF(WITH_STATIC_DRIVERS)
ENDIF()
IF(WIN32)
# On Win32 we can also build the MAX plugins.
IF(WITH_NEL_MAXPLUGIN)
FIND_PACKAGE(3dsMaxSDK)
ENDIF(WITH_NEL_MAXPLUGIN)
ENDIF(WIN32)
ENDIF()
ENDIF()
IF(WITH_3D)
FIND_PACKAGE(FreeType)
IF(WITH_NEL_CEGUI)
FIND_PACKAGE(CEGUI)
ENDIF(WITH_NEL_CEGUI)
ENDIF()
ENDIF(WITH_3D)
ENDIF()
IF(WITH_SOUND)
FIND_PACKAGE(Ogg)
@ -26,24 +26,16 @@ IF(WITH_SOUND)
IF(WITH_DRIVER_OPENAL)
FIND_PACKAGE(OpenAL)
ENDIF(WITH_DRIVER_OPENAL)
ENDIF()
IF(WITH_DRIVER_FMOD)
FIND_PACKAGE(FMOD)
ENDIF(WITH_DRIVER_FMOD)
ENDIF(WITH_SOUND)
ENDIF()
ENDIF()
IF(WITH_GTK)
FIND_PACKAGE(GTK2)
ENDIF(WITH_GTK)
IF(WITH_LIBOVR)
FIND_PACKAGE(LibOVR)
ENDIF(WITH_LIBOVR)
IF(WITH_LIBVR)
FIND_PACKAGE(LibVR)
ENDIF(WITH_LIBVR)
ENDIF()
IF(WITH_INSTALL_LIBRARIES)
IF(UNIX)
@ -61,7 +53,7 @@ IF(WITH_INSTALL_LIBRARIES)
CONFIGURE_FILE(nel-config.in ${CMAKE_CURRENT_BINARY_DIR}/nel-config)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nel-config DESTINATION ${NL_BIN_PREFIX})
ENDIF(UNIX)
ENDIF()
ADD_SUBDIRECTORY(include)
ENDIF()

View file

@ -19,6 +19,8 @@
#include "nel/misc/types_nl.h"
#include "nel/misc/bit_set.h"
#include "nel/misc/smart_ptr.h"
#include <string>
#include <vector>
#include <map>

View file

@ -21,13 +21,17 @@
#include "nel/misc/types_nl.h"
#include "nel/misc/smart_ptr.h"
#include "nel/3d/animatable.h"
#include "nel/3d/track.h"
#include <map>
namespace NL3D
{
class CScene;
// ***************************************************************************
/**
* An animated lightmap

View file

@ -93,7 +93,7 @@ public:
uint addAnimation (const char* fileName, const char* animName, bool displayMissingFileWarning = true)
{
// Allocate an animation
std::auto_ptr<CAnimation> anim (new CAnimation);
CUniquePtr<CAnimation> anim (new CAnimation);
// Read it
NLMISC::CIFile file;
@ -130,7 +130,7 @@ public:
virtual uint addSkeletonWeight (const char* fileName, const char* skelName)
{
// Allocate an animation
std::auto_ptr<CSkeletonWeight> skeletonWeight (new CSkeletonWeight);
CUniquePtr<CSkeletonWeight> skeletonWeight (new CSkeletonWeight);
// Read it
NLMISC::CIFile file;

View file

@ -88,7 +88,7 @@ private:
public:
std::string MeshName;
public:
CMeshLoad (const std::string &meshName, IShape **ppShp, IDriver *pDriver, const CVector &position, uint selectedTexture);
CMeshLoad (const std::string &meshName, IShape **ppShp, IDriver *pDriver, const NLMISC::CVector &position, uint selectedTexture);
void run (void);
void getName (std::string &result) const;
};
@ -122,7 +122,7 @@ private:
CTextureFile *TextureFile;
bool *Signal;
public:
CTextureLoad(CTextureFile *textureFile, bool *psgn, const CVector &position)
CTextureLoad(CTextureFile *textureFile, bool *psgn, const NLMISC::CVector &position)
: TextureFile(textureFile), Signal(psgn)
{
Position = position;

View file

@ -152,7 +152,7 @@ private:
struct CTextureLodToSort
{
CTextureLod *Lod;
CVector Position;
NLMISC::CVector Position;
bool operator<(const CTextureLodToSort &other) const
{
return Lod->Weight<other.Lod->Weight;

View file

@ -20,6 +20,7 @@
#include "nel/misc/types_nl.h"
#include "nel/misc/vector.h"
#include "nel/misc/plane.h"
#include "nel/misc/aabbox.h"
namespace NL3D {
@ -39,16 +40,16 @@ public:
/** build the camera collision as a cone or a cylinder
*/
void build(const CVector &start, const CVector &end, float radius, bool cone);
void build(const NLMISC::CVector &start, const NLMISC::CVector &end, float radius, bool cone);
/** build the camera collision as a simple ray
*/
void buildRay(const CVector &start, const CVector &end);
void buildRay(const NLMISC::CVector &start, const NLMISC::CVector &end);
/** compute the intersection of the Camera Volume against the triangle, and minimize
* minDist (actual square of distance) with min sqr distance of the poly.
*/
void minimizeDistanceAgainstTri(const CVector &p0, const CVector &p1, const CVector &p2, float &sqrMinDist);
void minimizeDistanceAgainstTri(const NLMISC::CVector &p0, const NLMISC::CVector &p1, const NLMISC::CVector &p2, float &sqrMinDist);
/** Compute into this the camera collision 'other' mul by 'matrix'
* NB: for cone Radius, suppose uniform scale, else will have strange result (a uniform scale is deduced)
@ -69,9 +70,9 @@ private:
enum {MaxNPlanes=6};
// The start of the camera raycast
CVector _Start;
NLMISC::CVector _Start;
// The end of the camera raycast
CVector _End;
NLMISC::CVector _End;
// The radius (at end only if cone)
float _Radius;
// cone or cylinder?
@ -83,8 +84,8 @@ private:
NLMISC::CAABBox _BBox;
// Temp Data for minimizeDistanceAgainstTri
CVector _ArrayIn[3+MaxNPlanes];
CVector _ArrayOut[3+MaxNPlanes];
NLMISC::CVector _ArrayIn[3+MaxNPlanes];
NLMISC::CVector _ArrayOut[3+MaxNPlanes];
// The pyramid representing the camera collision volume. Nb: local to start for precision problems
NLMISC::CPlane _Pyramid[MaxNPlanes];
@ -97,10 +98,10 @@ private:
float _MaxRadiusProj;
float _OODeltaRadiusProj;
float _RayLen;
CVector _RayNorm;
NLMISC::CVector _RayNorm;
// simpler method for simple ray
void intersectRay(const CVector &p0, const CVector &p1, const CVector &p2, float &sqrMinDist);
void intersectRay(const NLMISC::CVector &p0, const NLMISC::CVector &p1, const NLMISC::CVector &p2, float &sqrMinDist);
};

View file

@ -22,6 +22,7 @@ namespace NL3D
class UDriver;
class UCamera;
class CCloudScape;
class CScene;
/// implementation of UWaterInstance methods
class CCloudScapeUser : public UCloudScape

View file

@ -84,7 +84,7 @@ public:
void setTextureFile (const char* file);
/**
* Add a coarse mesh in the manager. If an error occured, it returns CantAddCoarseMesh.
* Add a coarse mesh in the manager. If an error occurred, it returns CantAddCoarseMesh.
* \param vBuffer the VertexBuffer pre-transformed / Colored. Size MUST be numVertices*NL3D_COARSEMESH_VERTEX_FORMAT_MGR
* \param indexBuffer containing triangles that will be inserted.
* \return false if the mesh can't be added to this pass BECAUSE OF TOO MANY VERTICES or TOO MANY PRIMITIVES reason

View file

@ -48,7 +48,7 @@ public:
static void releaseInstance();
/// convert a HLS (0..255) to a RGBA.
CRGBA convert(uint H, uint L, uint S);
NLMISC::CRGBA convert(uint H, uint L, uint S);
/// convert a RGBA bitmap into another RGBA, with HLS decal (0..255, -255..+255, -255..+255).
void convertRGBABitmap(NLMISC::CBitmap &dst, const NLMISC::CBitmap &src, uint8 dh, sint dl, sint ds);
@ -75,7 +75,7 @@ private:
uint8 H,L,S,A;
};
CRGBA _HueTable[HueTableSize];
NLMISC::CRGBA _HueTable[HueTableSize];
CHLSA _Color16ToHLS[65536];
/// Constructor

View file

@ -27,7 +27,8 @@
#ifndef NL3D_GPU_PROGRAM_PARAMS_H
#define NL3D_GPU_PROGRAM_PARAMS_H
#include <nel/misc/types_nl.h>
#include "nel/misc/types_nl.h"
// STL includes
#include <map>
@ -167,7 +168,7 @@ private:
std::map<std::string, size_t> m_MapName; // map from name to offset
size_t m_First;
size_t m_Last;
static const size_t s_End = -1;
static const size_t s_End;
}; /* class CGPUProgramParams */

View file

@ -26,6 +26,7 @@
namespace NL3D
{
class CInstanceGroup;
// ***************************************************************************
/**
@ -106,14 +107,14 @@ public:
public:
/// Debug: build a colored Grid mesh of SunContribution.
void buildSunDebugMesh(CMesh::CMeshBuild &meshBuild, CMeshBase::CMeshBaseBuild &meshBaseBuild, const CVector &deltaPos=CVector::Null);
void buildSunDebugMesh(CMesh::CMeshBuild &meshBuild, CMeshBase::CMeshBaseBuild &meshBaseBuild, const NLMISC::CVector &deltaPos= NLMISC::CVector::Null);
/// Debug: build a colored Grid mesh of PointLight. R= pointLight1 id. G= PointLight2 id. B= The multiplier used to show Ids.
void buildPLDebugMesh(CMesh::CMeshBuild &meshBuild, CMeshBase::CMeshBaseBuild &meshBaseBuild, const CVector &deltaPos, const CInstanceGroup &igOut);
void buildPLDebugMesh(CMesh::CMeshBuild &meshBuild, CMeshBase::CMeshBaseBuild &meshBaseBuild, const NLMISC::CVector &deltaPos, const CInstanceGroup &igOut);
private:
void addDebugMeshFaces(CMesh::CMeshBuild &meshBuild, CSurface &surface, uint vId0,
const std::vector<CRGBA> &colors);
const std::vector<NLMISC::CRGBA> &colors);
};

View file

@ -716,7 +716,7 @@ private:
bool _RefineMode;
float _FarTransition;
uint _TileMaxSubdivision;
// For VertexProgram. true if change has occured in threshold since the last render().
// For VertexProgram. true if change has occurred in threshold since the last render().
float _VPThresholdChange;
/// \name VertexBuffer mgt.

View file

@ -692,7 +692,7 @@ private:
{
NLMISC::CMatrix TexMat[IDRV_MAT_MAXTEXTURES];
};
std::auto_ptr<CUserTexMat> _TexUserMat; // user texture matrix
CUniquePtr<CUserTexMat> _TexUserMat; // user texture matrix
public:
// Private. For Driver only.

View file

@ -47,7 +47,7 @@ public:
float a31, a32, a33, a34;
// Copy from a matrix.
void set(const CMatrix &mat)
void set(const NLMISC::CMatrix &mat)
{
const float *m =mat.get();
a11= m[0]; a12= m[4]; a13= m[8] ; a14= m[12];
@ -57,14 +57,14 @@ public:
// mulSetvector. NB: in should be different as v!! (else don't work).
void mulSetVector(const CVector &in, CVector &out)
void mulSetVector(const NLMISC::CVector &in, NLMISC::CVector &out)
{
out.x= (a11*in.x + a12*in.y + a13*in.z);
out.y= (a21*in.x + a22*in.y + a23*in.z);
out.z= (a31*in.x + a32*in.y + a33*in.z);
}
// mulSetpoint. NB: in should be different as v!! (else don't work).
void mulSetPoint(const CVector &in, CVector &out)
void mulSetPoint(const NLMISC::CVector &in, NLMISC::CVector &out)
{
out.x= (a11*in.x + a12*in.y + a13*in.z + a14);
out.y= (a21*in.x + a22*in.y + a23*in.z + a24);
@ -73,14 +73,14 @@ public:
// mulSetvector. NB: in should be different as v!! (else don't work).
void mulSetVector(const CVector &in, float scale, CVector &out)
void mulSetVector(const NLMISC::CVector &in, float scale, NLMISC::CVector &out)
{
out.x= (a11*in.x + a12*in.y + a13*in.z) * scale;
out.y= (a21*in.x + a22*in.y + a23*in.z) * scale;
out.z= (a31*in.x + a32*in.y + a33*in.z) * scale;
}
// mulSetpoint. NB: in should be different as v!! (else don't work).
void mulSetPoint(const CVector &in, float scale, CVector &out)
void mulSetPoint(const NLMISC::CVector &in, float scale, NLMISC::CVector &out)
{
out.x= (a11*in.x + a12*in.y + a13*in.z + a14) * scale;
out.y= (a21*in.x + a22*in.y + a23*in.z + a24) * scale;
@ -89,14 +89,14 @@ public:
// mulAddvector. NB: in should be different as v!! (else don't work).
void mulAddVector(const CVector &in, float scale, CVector &out)
void mulAddVector(const NLMISC::CVector &in, float scale, NLMISC::CVector &out)
{
out.x+= (a11*in.x + a12*in.y + a13*in.z) * scale;
out.y+= (a21*in.x + a22*in.y + a23*in.z) * scale;
out.z+= (a31*in.x + a32*in.y + a33*in.z) * scale;
}
// mulAddpoint. NB: in should be different as v!! (else don't work).
void mulAddPoint(const CVector &in, float scale, CVector &out)
void mulAddPoint(const NLMISC::CVector &in, float scale, NLMISC::CVector &out)
{
out.x+= (a11*in.x + a12*in.y + a13*in.z + a14) * scale;
out.y+= (a21*in.x + a22*in.y + a23*in.z + a24) * scale;

View file

@ -124,7 +124,7 @@ private:
double _LastSceneTime;
// maximum amplitude vector for each level. Stored in mesh because same for all instances.
CVector _MaxDeltaPos[HrcDepth];
NLMISC::CVector _MaxDeltaPos[HrcDepth];
float _MaxVertexMove;
// MBR Cache

View file

@ -87,7 +87,7 @@ private:
{
public:
CParticleSystemModel *Model;
CMatrix OldAncestorMatOrRelPos; // last matrix of ancestor skeleton or relative matrix of ps to its ancestor (see flag below)
NLMISC::CMatrix OldAncestorMatOrRelPos; // last matrix of ancestor skeleton or relative matrix of ps to its ancestor (see flag below)
bool IsRelMatrix; // gives usage of the field OldAncestorMatOrRelPos
bool HasAncestorSkeleton; // has the system an ancestor skeleton ?
public:

View file

@ -92,9 +92,9 @@ public:
void setWorldMatrix (const NLMISC::CMatrix &WM);
void setName (std::string &name) { _Name = name; }
void setName (const std::string &name) { _Name = name; }
std::string getName () { return _Name; }
std::string getName () const { return _Name; }
void open (bool opened) { _Opened = opened; }
bool isOpened () { return _Opened; }

View file

@ -282,7 +282,7 @@ inline float CPSAttribMakerBinOp<float>::getMaxValue(void) const
template <class T>
inline CPSAttribMakerBinOp<T>::CPSAttribMakerBinOp(const CPSAttribMakerBinOp &other) : CPSAttribMaker<T>(other) // parent copy ctor
{
std::auto_ptr<CPSAttribMaker<T> > a0(NLMISC::safe_cast<CPSAttribMaker<T> *>(other._Arg[0]->clone()))
CUniquePtr<CPSAttribMaker<T> > a0(NLMISC::safe_cast<CPSAttribMaker<T> *>(other._Arg[0]->clone()))
, a1(NLMISC::safe_cast<CPSAttribMaker<T> *>(other._Arg[1]->clone()));
this->_Op = other._Op;
this->_Size = other._Size;

View file

@ -1463,7 +1463,7 @@ public:
CPSAttribMakerMemoryBase(const CPSAttribMakerMemoryBase &src) : CPSAttribMaker<T>(src) // parent copy ctor
{
nlassert(src._Scheme);
std::auto_ptr<CPSAttribMaker<T> > s(NLMISC::safe_cast<CPSAttribMaker<T> *>(src._Scheme->clone()));
CUniquePtr<CPSAttribMaker<T> > s(NLMISC::safe_cast<CPSAttribMaker<T> *>(src._Scheme->clone()));
this->_T = src._T;
this->_DefaultValue = src._DefaultValue;
this->_Scheme = s.release();

View file

@ -24,6 +24,8 @@
#include "nel/misc/rgba.h"
#include "nel/misc/traits_nl.h"
#include <iterator>
namespace NL3D {
/*
@ -480,7 +482,11 @@ void CPSValueGradientFunc<T>::setValuesUnpacked(const T *valueTab, uint32 numVal
_MaxValue = _MinValue = valueTab[0];
_NbValues = (numValues - 1) * nbStages;
_Tab.resize(_NbValues + 1);
#ifdef NL_COMP_VC14
std::copy(valueTab, valueTab + _NbValues + 1, stdext::make_checked_array_iterator(&_Tab[0], _Tab.size()));
#else
std::copy(valueTab, valueTab + _NbValues + 1, &_Tab[0]);
#endif
}

View file

@ -336,7 +336,7 @@ protected:
* should not be called directly. Call CPSLocated::resize instead
*/
virtual void resize(uint32 size);
virtual void bounceOccured(uint32 index, TAnimationTime timeToNextSimStep);
virtual void bounceOccurred(uint32 index, TAnimationTime timeToNextSimStep);
void updateMaxCountVect();

View file

@ -66,14 +66,14 @@ class CParticleSystem;
/// This structure helps to perform the collision step, by telling which collisionner is the nearest if there are several candidate
/// a distance of -1 indicates that no collisions occured
/// a distance of -1 indicates that no collisions occurred
struct CPSCollisionInfo
{
CPSCollisionInfo *Next;
float Dist; // Distance to the nearest collider, or -1 if not collision occured
float Dist; // Distance to the nearest collider, or -1 if not collision occurred
NLMISC::CVector NewPos;
NLMISC::CVector NewSpeed; // The speed of particle after a collision occured. After the updated of collision it is swapped with the post-collision speed
CPSZone *CollisionZone; // The zone on which the bounce occured, can be useful to check the behaviour in case of collision
NLMISC::CVector NewSpeed; // The speed of particle after a collision occurred. After the updated of collision it is swapped with the post-collision speed
CPSZone *CollisionZone; // The zone on which the bounce occurred, can be useful to check the behaviour in case of collision
uint32 Index;
CPSCollisionInfo()
{
@ -906,10 +906,10 @@ protected:
*/
virtual void resize(uint32 size) = 0;
/** a bounce occured, so some action could be done. The default behaviour does nothing
/** a bounce occurred, so some action could be done. The default behaviour does nothing
* \param index the index of the element that bounced
*/
virtual void bounceOccured(uint32 /* index */, TAnimationTime /* timeToNextsimStep */) {}
virtual void bounceOccurred(uint32 /* index */, TAnimationTime /* timeToNextsimStep */) {}
/** show an drawing to represent the object, and in red if it is selected
* \param tab : a table of 2 * nbSeg vector. only the x and y coordinates are used

View file

@ -590,7 +590,7 @@ protected:
void serial(NLMISC::IStream &f) throw(NLMISC::EStream);
};
typedef std::auto_ptr<CGlobalTexAnims> PGlobalTexAnims;
typedef CUniquePtr<CGlobalTexAnims> PGlobalTexAnims;
PGlobalTexAnims _GlobalTexAnims;
float _GlobalAnimDate;

View file

@ -120,7 +120,7 @@ protected:
/**
* This set speed of a located so that it looks like bouncing on a surface
* \param locatedIndex the index
* \param bouncePoint the position where the collision occured
* \param bouncePoint the position where the collision occurred
* \param surfNormal the normal of the surface at the collision point (this must be a unit vector)
* \elasticity 1 = full bounce, 0 = no bounce (contact)
* \ellapsedTime the time ellapsed

View file

@ -654,7 +654,7 @@ template<class T> typename CQuadGrid<T>::CIterator CQuadGrid<T>::erase(typename
if(!ptr->Selected)
next= NULL;
// delete the object.
_NodeBlockMemory.free(ptr);
_NodeBlockMemory.freeBlock(ptr);
return CIterator((CNode*)next);

View file

@ -53,7 +53,7 @@ public:
public:
// Simple Definition of a mesh used to test against Ray
std::vector<CVector> Vertices;
std::vector<NLMISC::CVector> Vertices;
std::vector<uint32> Triangles;
/// Empty?

View file

@ -28,6 +28,8 @@
#include "nel/3d/shadow_map_manager.h"
#include "nel/3d/u_scene.h"
#include "nel/3d/vertex_program.h"
#include "nel/3d/transform.h"
#include <vector>

View file

@ -22,7 +22,7 @@
#include "nel/misc/smart_ptr.h"
#include "nel/misc/vector.h"
#include "nel/misc/aabbox.h"
#include "nel/misc/class_id.h"
#include "nel/3d/texture.h"
#include "nel/3d/shape.h"

View file

@ -51,7 +51,7 @@ public:
* The usage of this matrix is for UV projection: XYZ= WorldProjectionMatrix * UVW.
* NB: Vj (ie for W) is mapped such that Vp means NearClip of the shadow and Vp+Vj means FarClip of the shadow
*/
CMatrix LocalProjectionMatrix;
NLMISC::CMatrix LocalProjectionMatrix;
/** Computed at shadow casting time. They are clipping planes used to clip receivers (mirror of the OBB).
* Receivers may use them to clip sub received parts (as they which)
@ -63,7 +63,7 @@ public:
/** Computed at shadow casting time. This is the LocalPos Bouding Box containing the shadow (AxisAligned).
* \see generateClipInfoFromMatrix()
*/
CAABBox LocalBoundingBox;
NLMISC::CAABBox LocalBoundingBox;
// Filled by ShadowMapManager. This is the Last Frame Id we had update the texture.
@ -114,13 +114,13 @@ public:
* driver->setupModelMatrix(localPosMatrix);
* Then render his mesh.
*/
void buildCasterCameraMatrix(const CVector &lightDir, const CMatrix &localPosMatrix, const CAABBox &bbShape, CMatrix &cameraMatrix);
void buildCasterCameraMatrix(const NLMISC::CVector &lightDir, const NLMISC::CMatrix &localPosMatrix, const NLMISC::CAABBox &bbShape, NLMISC::CMatrix &cameraMatrix);
/** From the Camera matrix computed with buildCasterCameraMatrix, compute the LocalProjectionMatrix, which modify the
* J axis according to backPoint and Shadow Depth.
* NB: automatically calls the buildClipInfoFromMatrix() method
*/
void buildProjectionInfos(const CMatrix &cameraMatrix, const CVector &backPoint, float shadowMaxDepth);
void buildProjectionInfos(const NLMISC::CMatrix &cameraMatrix, const NLMISC::CVector &backPoint, float shadowMaxDepth);
/** The ShadowMap Caster can call this method after setting LocalProjectionMatrix. It computes auto the
* LocalClipPlanes and LocalBoundingBox from it. NB: don't use it if you use buildProjectionInfos().
@ -158,13 +158,13 @@ class CShadowMapProjector
{
public:
CShadowMapProjector();
void setWorldSpaceTextMat(const CMatrix &ws);
void applyToMaterial(const CMatrix &receiverWorldMatrix, CMaterial &material);
void setWorldSpaceTextMat(const NLMISC::CMatrix &ws);
void applyToMaterial(const NLMISC::CMatrix &receiverWorldMatrix, CMaterial &material);
private:
CMatrix _WsTextMat;
CMatrix _XYZToUWVMatrix;
CMatrix _XYZToWUVMatrix;
NLMISC::CMatrix _WsTextMat;
NLMISC::CMatrix _XYZToUWVMatrix;
NLMISC::CMatrix _XYZToWUVMatrix;
};

View file

@ -29,7 +29,8 @@
namespace NL3D {
class CTransform;
class CTransform;
class CScene;
// ***************************************************************************

View file

@ -33,9 +33,9 @@ namespace NL3D
class CShadowVertex
{
public:
CVector Vertex;
uint32 MatrixId;
void serial(NLMISC::IStream &f)
NLMISC::CVector Vertex;
uint32 MatrixId;
void serial(NLMISC::IStream &f)
{
(void)f.serialVersion(0);
@ -82,7 +82,7 @@ public:
* if don't intersect, dist2D="nearest distance to the ray", and distZ=0
* \param computeDist2D if false and don't intersect, then return dist2D=FLT_MAX, and distZ=0
*/
bool getRayIntersection(const CMatrix &toRaySpace, class CSkeletonModel &skeleton,
bool getRayIntersection(const NLMISC::CMatrix &toRaySpace, class CSkeletonModel &skeleton,
const std::vector<uint32> &matrixInfluences, float &dist2D, float &distZ, bool computeDist2D);
private:

View file

@ -54,7 +54,7 @@ public:
virtual NLMISC::CQuat getOrientation() const = 0;
/// Set the GUI reference
virtual void setInterfaceMatrix(const NL3D::CMatrix &matrix) = 0;
virtual void setInterfaceMatrix(const NLMISC::CMatrix &matrix) = 0;
/// Get GUI center (1 = width, 1 = height, 0 = center)
virtual void getInterface2DShift(uint cid, float &x, float &y, float distance) const = 0;

View file

@ -44,16 +44,16 @@ public:
public:
/// Target controled or direction controled. Default to DirectionMode
TMode Mode;
TMode Mode;
/// \name Target and Direction specific
// @{
/// For TargetMode, the world Position of the target.
CVector WorldTarget;
NLMISC::CVector WorldTarget;
/// For TargetMode only, the Pos of eyes relative to the bone controlled. Default to (0,0,0)
CVector EyePos;
NLMISC::CVector EyePos;
/// For DirectionMode, the WorldRotation to apply to the bone. NB: modified in execute() if TargetMode
CQuat CurrentWorldDirection;
NLMISC::CQuat CurrentWorldDirection;
// @}
/// \name Common
@ -61,13 +61,13 @@ public:
/** This enable or disable the ctrl. When disabled or enabled, the ctrl ensure
* that the movement does not "pop", respecting MaxAngularVelocity. Default to true.
*/
bool Enabled;
bool Enabled;
/// This give The World Orientation when the Mesh is in bind Pos (default to "LookBack").
CQuat DefaultWorldDirection;
NLMISC::CQuat DefaultWorldDirection;
/// The Maximum angle of rotation that can be performed between the Default Direction and Current Direction. Default to Pi/3
float MaxAngle;
float MaxAngle;
/// The Maximum Angular Velocity the ctrl can perform. Default to 2*Pi per second.
float MaxAngularVelocity;
float MaxAngularVelocity;
// @}
@ -77,19 +77,19 @@ public:
virtual ~CTargetAnimCtrl();
/// Called at compute() time.
virtual void execute(CSkeletonModel *model, CBone *bone);
virtual void execute(CSkeletonModel *model, CBone *bone);
private:
/// The last rotation computed (in LocalSkeleton Space). Used to smooth transition
CQuat _LastLSRotation;
NLMISC::CQuat _LastLSRotation;
/// This tells that a Enable/Disable transition is in progress.
bool _LastEnabled;
bool _EnableToDisableTransition;
bool _LastEnabled;
bool _EnableToDisableTransition;
CQuat getCurrentLSRotationFromBone(CSkeletonModel *model, CBone *bone);
NLMISC::CQuat getCurrentLSRotationFromBone(CSkeletonModel *model, CBone *bone);
};

View file

@ -54,16 +54,16 @@ public:
bool isSharingEnabled() const { return !_DisableSharing; }
// set the ambiant/ diffuse color to be added to the embossed texture
void setAmbient(CRGBA ambient) { _Ambient = ambient; touch(); }
void setDiffuse(CRGBA diffuse) { _Diffuse = diffuse; touch(); }
void setAmbient(NLMISC::CRGBA ambient) { _Ambient = ambient; touch(); }
void setDiffuse(NLMISC::CRGBA diffuse) { _Diffuse = diffuse; touch(); }
// Set the direction of light (usually should be normalized). The bitmap is in the x,y plane
void setLightDir(const NLMISC::CVector &lightDir) { _LightDir = lightDir; touch(); }
// set a factor for the slope
void setSlopeFactor(float factor) { _SlopeFactor = factor; touch(); }
//
CRGBA getAmbient() const { return _Ambient; }
CRGBA getDiffuse() const { return _Diffuse; }
const CVector &getLightDir() const { return _LightDir; }
NLMISC::CRGBA getAmbient() const { return _Ambient; }
NLMISC::CRGBA getDiffuse() const { return _Diffuse; }
const NLMISC::CVector &getLightDir() const { return _LightDir; }
float getSlopeFactor() const { return _SlopeFactor; }
@ -75,8 +75,8 @@ protected:
// inherited from ITexture. Generate this bumpmap pixels
virtual void doGenerate(bool async = false);
NLMISC::CSmartPtr<ITexture> _HeightMap;
CRGBA _Ambient;
CRGBA _Diffuse;
NLMISC::CRGBA _Ambient;
NLMISC::CRGBA _Diffuse;
NLMISC::CVector _LightDir;
bool _DisableSharing;
float _SlopeFactor;

View file

@ -61,6 +61,10 @@ public:
sint32 Top; // Distance between origin and top of the texture
sint32 Left; // Distance between origin and left of the texture
sint32 AdvX; // Advance to the next caracter
SLetterInfo():Char(0), FontGenerator(NULL), Size(0), Embolden(false), Oblique(false), Next(NULL), Prev(NULL), Cat(0), CharWidth(0), CharHeight(0), GlyphIndex(0), Top(0), Left(0), AdvX(0)
{
}
};
struct SLetterKey
@ -74,6 +78,10 @@ public:
uint32 getVal();
//bool operator < (const SLetterKey&k) const;
//bool operator == (const SLetterKey&k) const;
SLetterKey():Char(0), FontGenerator(NULL), Size(0), Embolden(false), Oblique(false)
{
}
};
public:

View file

@ -140,7 +140,7 @@ public:
private:
void clearTile (CTile::TBitmap type);
void free ()
void freeBlock ()
{
nlassert ((_Flags&=NL3D_CTILE_FREE_FLAG)==0);
_Flags|=NL3D_CTILE_FREE_FLAG;
@ -320,7 +320,7 @@ public:
// For edition: change the tileVegetableDesc. NB: only the TileVegetableDescFileName is serialised.
void setTileVegetableDesc (const CTileVegetableDesc &tvd);
/** try to load the vegetable tile desc associated with the fileName (nlinfo() if can't)
* lookup into CPath. no-op if string=="".
* lookup into CPath. no-op if string empty
*/
void loadTileVegetableDesc();

View file

@ -32,6 +32,7 @@ using NLMISC::CQuat;
class ILogicInfo;
class CCluster;
class ITransformable;
// ***************************************************************************
/**

View file

@ -48,7 +48,7 @@ public:
/// PointLights. Used at CVegetableManager::updateLighting() to get current colors of pointLights.
CPointLightNamed *PointLight[MaxNumLight];
/// Direction of the light. the direction to the instance should be precomputed.
CVector Direction[MaxNumLight];
NLMISC::CVector Direction[MaxNumLight];
/// Factor to be multiplied by color of the light. Actually it is the attenuation factor.
uint PointLightFactor[MaxNumLight];

View file

@ -69,7 +69,7 @@ public:
bool allocate(uint numVertices, uint &indexStart);
/// free a subset of the VB. nlstop if subset not found...
void free(uint indexStart);
void freeBlock(uint indexStart);
// @}

View file

@ -21,6 +21,7 @@
//
#include "nel/3d/texture_cube.h"
#include "nel/3d/texture_blank.h"
#include "nel/3d/animation_time.h"
namespace NL3D

View file

@ -79,7 +79,7 @@ public:
/** Set the userPos (relative to the height map coordinates). This is needed because a height map can't be used with large surface (such as a sea).
* As a consequence, the height map is only valid below the user (e.g from user.x - 0.5 * size to user.x + 0.5 *size).
* When setPos is called, and if a move has occured, new area of the height field are set to 0
* When setPos is called, and if a move has occurred, new area of the height field are set to 0
* The pos set will be taken in account when buffers have been swapped (e.g when the propagation time as ellapsed)
*/
void setUserPos(sint x, sint y);

View file

@ -2,36 +2,36 @@ SUBDIRS(misc)
IF(WITH_3D)
SUBDIRS(3d)
ENDIF(WITH_3D)
ENDIF()
IF(WITH_GUI)
ADD_SUBDIRECTORY(gui)
ENDIF(WITH_GUI)
ENDIF()
IF(WITH_GEORGES)
SUBDIRS(georges)
ENDIF(WITH_GEORGES)
ENDIF()
IF(WITH_LIGO)
SUBDIRS(ligo)
ENDIF(WITH_LIGO)
ENDIF()
IF(WITH_LOGIC)
SUBDIRS(logic)
ENDIF(WITH_LOGIC)
ENDIF()
IF(WITH_NET)
SUBDIRS(net)
ENDIF(WITH_NET)
ENDIF()
IF(WITH_SOUND)
SUBDIRS(sound)
ENDIF(WITH_SOUND)
ENDIF()
IF(WITH_PACS)
SUBDIRS(pacs)
ENDIF(WITH_PACS)
ENDIF()
IF(WITH_NEL_CEGUI)
SUBDIRS(cegui)
ENDIF(WITH_NEL_CEGUI)
ENDIF()

View file

@ -72,8 +72,8 @@ namespace NLGUI
bool link( NLMISC::CCDBNodeBranch *dbNode, const std::string &leafId, NLMISC::CCDBNodeLeaf *defaultLeaf = NULL );
/// float operations
void setDouble (double value) {setSInt64((sint64&) value);}
double getDouble () const {sint64 i = getSInt64(); return (double &) i; }
void setDouble(double value);
double getDouble() const;
void readDouble (const char* value, const std::string& id);
/// sint32 operations

View file

@ -90,7 +90,7 @@ namespace NLGUI
virtual std::string luaWhat() const throw() {return NLMISC::toString("LUAError: %s", what());}
};
// A parse error occured
// A parse error occurred
class ELuaParseError : public ELuaError
{
public:
@ -117,7 +117,7 @@ namespace NLGUI
std::string _Reason;
};
// A execution error occured
// A execution error occurred
class ELuaExecuteError : public ELuaError
{
public:
@ -128,7 +128,7 @@ namespace NLGUI
virtual std::string luaWhat() const throw() {return NLMISC::toString("ELuaExecuteError: %s", what());}
};
// A bad cast occured when using lua_checkcast
// A bad cast occurred when using lua_checkcast
class ELuaBadCast : public ELuaError
{
public:

View file

@ -502,7 +502,7 @@ namespace NLGUI
const CEventDescriptorKey& getLastKeyEvent() const{ return lastKeyEvent; }
IParser* getParser() const{ return parser; }
IParser* getParser() const{ return _Parser; }
/// Retrieves the Id of the currently selected widgets
void getEditorSelection( std::vector< std::string > &selection );
@ -536,7 +536,7 @@ namespace NLGUI
CWidgetManager();
~CWidgetManager();
IParser *parser;
IParser *_Parser;
static CWidgetManager *instance;
std::vector< SMasterGroup > _MasterGroups;

View file

@ -49,13 +49,13 @@ public:
* This file will try to open the file ligo class description file (XML) using the LigoClass as file name.
* It will try first to load directly the file and then to lookup the file in NLMISC::CPath.
*/
bool readConfigFile (const char *fileName, bool parsePrimitiveComboContent);
bool readConfigFile (const std::string &fileName, bool parsePrimitiveComboContent);
/**
* This file will read the file ligo class description file (XML) using the LigoClass as file name.
* It will try first to load directly the file and then to lookup the file in NLMISC::CPath.
*/
bool readPrimitiveClass (const char *fileName, bool parsePrimitiveComboContent);
bool readPrimitiveClass (const std::string &fileName, bool parsePrimitiveComboContent);
bool reloadIndexFile(const std::string &indexFileName = std::string());
@ -100,14 +100,14 @@ public:
/// Build a standard human readable alias string
std::string aliasToString(uint32 fullAlias);
/// Read a standard human readable alias string
uint32 aliasFromString(std::string fullAlias);
uint32 aliasFromString(const std::string &fullAlias);
// Get a primitive class
const CPrimitiveClass *getPrimitiveClass (const NLLIGO::IPrimitive &primitive) const;
// Get a primitive class
const CPrimitiveClass *getPrimitiveClass (const char *className) const;
const CPrimitiveClass *getPrimitiveClass (const std::string &className) const;
// Get the primitive color
NLMISC::CRGBA getPrimitiveColor (const NLLIGO::IPrimitive &primitive);
@ -134,10 +134,10 @@ public:
bool canBeRoot (const NLLIGO::IPrimitive &primitive);
// Read a property from an XML file
bool getPropertyString (std::string &result, const char *filename, xmlNodePtr xmlNode, const char *propName);
bool getPropertyString (std::string &result, const std::string &filename, xmlNodePtr xmlNode, const std::string &propName);
// Output error message
void syntaxError (const char *filename, xmlNodePtr xmlNode, const char *format, ...);
void syntaxError (const std::string &filename, xmlNodePtr xmlNode, const char *format, ...);
virtual void errorMessage (const char *format, ... );
// Access to the config string
@ -157,7 +157,7 @@ public:
private:
// Init primitive class manager
bool initPrimitiveClass (const char *filename);
bool initPrimitiveClass (const std::string &ilename);
// The primitive class manager
std::map<std::string, CPrimitiveClass> _PrimitiveClasses;

View file

@ -18,7 +18,7 @@
#define NL_MATERIAL_LIGO_H
#include "nel/misc/types_nl.h"
#include "zone_template.h"
#include "nel/ligo/zone_template.h"
// NeL include
//#include "3d/zone.h"

View file

@ -83,9 +83,8 @@ class CPropertyString : public IProperty
{
public:
CPropertyString () {}
CPropertyString (const char *str);
CPropertyString (const std::string &str);
CPropertyString (const char *str, bool _default);
CPropertyString (const std::string &str, bool _default);
virtual ~CPropertyString () {}
std::string String;
@ -287,42 +286,42 @@ public:
* If the property already exist, the method does nothing and returns false.
* The pointer will be deleted by the primitive using the ::delete operator.
**/
bool addPropertyByName (const char *property_name, IProperty *result);
bool addPropertyByName (const std::string &property_name, IProperty *result);
/**
* Get a property with its name
**/
bool getPropertyByName (const char *property_name, const IProperty *&result) const;
bool getPropertyByName (const std::string &property_name, const IProperty *&result) const;
/**
* Get a property with its name
**/
bool getPropertyByName (const char *property_name, IProperty *&result) const;
bool getPropertyByName (const std::string &property_name, IProperty *&result) const;
/**
* Get a string property with its name. Return false if the property is not found or is not a string property.
**/
bool getPropertyByName (const char *property_name, std::string *&result) const;
bool getPropertyByName (const std::string &property_name, std::string *&result) const;
/**
* Get a string array property with its name. Return false if the property is not found or is not a string array property.
**/
bool getPropertyByName (const char *property_name, std::vector<std::string> *&result) const;
bool getPropertyByName (const std::string &property_name, std::vector<std::string> *&result) const;
/**
* Get a string property with its name. Return false if the property is not found or is not a string property.
**/
bool getPropertyByName (const char *property_name, std::string &result) const;
bool getPropertyByName (const std::string &property_name, std::string &result) const;
/**
* Get a string array property with its name. Return false if the property is not found or is not a string array property.
**/
bool getPropertyByName (const char *property_name, const std::vector<std::string> *&result) const;
bool getPropertyByName (const std::string &property_name, const std::vector<std::string> *&result) const;
/**
* Get a color property with its name. Return false if the property is not found or is not a string array property.
**/
bool getPropertyByName (const char *property_name, NLMISC::CRGBA &result) const;
bool getPropertyByName (const std::string &property_name, NLMISC::CRGBA &result) const;
/**
* Remove a property
@ -333,7 +332,7 @@ public:
/**
* Remove a property by its name
**/
bool removePropertyByName (const char *property_name);
bool removePropertyByName (const std::string &property_name);
/**
* Remove all the properties
@ -347,10 +346,10 @@ public:
void initDefaultValues (CLigoConfig &config);
// Read the primitive, calls initDefaultValue (CLigoConfig &config)
virtual bool read (xmlNodePtr xmlNode, const char *filename, uint version, CLigoConfig &config);
virtual bool read (xmlNodePtr xmlNode, const std::string &property_name, uint version, CLigoConfig &config);
// Write the primitive
virtual void write (xmlNodePtr xmlNode, const char *filename) const;
virtual void write (xmlNodePtr xmlNode, const std::string &property_name) const;
// Get the vertices
virtual uint getNumVector () const = 0;
@ -435,7 +434,7 @@ protected:
virtual CPrimVector *getPrimVector ();
// Read the primitive
virtual bool read (xmlNodePtr xmlNode, const char *filename, uint version, CLigoConfig &config);
virtual bool read (xmlNodePtr xmlNode, const std::string &filename, uint version, CLigoConfig &config);
// \name From IPrimitive
virtual IPrimitive *copy () const;
@ -474,10 +473,10 @@ protected:
virtual CPrimVector *getPrimVector ();
// Read the primitive
virtual bool read (xmlNodePtr xmlNode, const char *filename, uint version, CLigoConfig &config);
virtual bool read (xmlNodePtr xmlNode, const std::string &filename, uint version, CLigoConfig &config);
// Write the primitive
virtual void write (xmlNodePtr xmlNode, const char *filename) const;
virtual void write (xmlNodePtr xmlNode, const std::string &filename) const;
// \name From IPrimitive
virtual IPrimitive *copy () const;
@ -509,10 +508,10 @@ protected:
virtual CPrimVector *getPrimVector ();
// Read the primitive
virtual bool read (xmlNodePtr xmlNode, const char *filename, uint version, CLigoConfig &config);
virtual bool read (xmlNodePtr xmlNode, const std::string &filename, uint version, CLigoConfig &config);
// Write the primitive
virtual void write (xmlNodePtr xmlNode, const char *filename) const;
virtual void write (xmlNodePtr xmlNode, const std::string &filename) const;
// \name From IPrimitive
virtual IPrimitive *copy () const;
@ -568,10 +567,10 @@ protected:
virtual CPrimVector *getPrimVector ();
// Read the primitive
virtual bool read (xmlNodePtr xmlNode, const char *filename, uint version, CLigoConfig &config);
virtual bool read (xmlNodePtr xmlNode, const std::string &filename, uint version, CLigoConfig &config);
// Write the primitive
virtual void write (xmlNodePtr xmlNode, const char *filename) const;
virtual void write (xmlNodePtr xmlNode, const std::string &filename) const;
// \name From IPrimitive
virtual IPrimitive *copy () const;
@ -632,9 +631,9 @@ public:
uint32 getFullAlias() const;
// Read the primitive
virtual bool read (xmlNodePtr xmlNode, const char *filename, uint version, CLigoConfig &config);
virtual bool read (xmlNodePtr xmlNode, const std::string &filename, uint version, CLigoConfig &config);
// Write the primitive
virtual void write (xmlNodePtr xmlNode, const char *filename) const;
virtual void write (xmlNodePtr xmlNode, const std::string &filename) const;
// Create a copy of this primitive
virtual IPrimitive *copy () const;
// serial for binary save
@ -686,13 +685,13 @@ public:
void convert (const CPrimRegion &region);
// Read the primitive
bool read (xmlNodePtr xmlNode, const char *filename, CLigoConfig &config);
bool read (xmlNodePtr xmlNode, const std::string &filename, CLigoConfig &config);
// Write the primitive
void write (xmlDocPtr xmlNode, const char *filename) const;
void write (xmlDocPtr xmlNode, const std::string &filename) const;
// Write the primitive
void write (xmlNodePtr root, const char *filename) const;
void write (xmlNodePtr root, const std::string &filename) const;
// serial the primitive. Used for binary files.
void serial(NLMISC::IStream &f);

View file

@ -108,6 +108,7 @@ namespace NLMISC
{
public:
CApplicationContext();
virtual ~CApplicationContext();
virtual void *getSingletonPointer(const std::string &singletonName);
virtual void setSingletonPointer(const std::string &singletonName, void *ptr);

View file

@ -112,7 +112,8 @@ public:
// A BNP structure
struct BNP
{
BNP() : FileNames(NULL), ThreadFileId(0), CacheFileOnOpen(false), AlwaysOpened(false), InternalUse(false), OffsetFromBeginning(0) { }
BNP();
~BNP();
// FileName of the BNP. important to open it in getFile() (for other threads or if not always opened).
std::string BigFileName;
@ -163,6 +164,7 @@ private:
{
public:
CThreadFileArray();
~CThreadFileArray();
// Allocate a FileId for a BNP.
uint32 allocate();

View file

@ -375,6 +375,12 @@ public:
void makeOpaque();
/**
* Make fully transparent pixels (alpha 0) black.
*/
void makeTransparentPixelsBlack();
/**
* Return if the bitmap has uniform alpha values for all pixels.
* \param alpha return the uniform value if return is true
@ -609,7 +615,7 @@ public:
/**
* Extended version of blit. The destinaion of the blit is 'this' bitmap
* Source and dest rect are clamped as necessary.
* For now, only RGBA is uspported (an asertion occurs otherwise)
* For now, only RGBA is supported (an asertion occurs otherwise)
* mipmap are not updated.
* IMPORTANT : copy to self is not handled correctly
*/

View file

@ -132,7 +132,7 @@ public:
}
/// delete an element allocated with this manager. dtor is called. NULL is tested.
void free(T* ptr)
void freeBlock(T* ptr)
{
if(!ptr)
return;

View file

@ -40,20 +40,20 @@ public:
/// Return the value of the property.
inline sint64 getValue64() { return _Property; }
inline sint64 getValue64() const { return _Property; }
/// Set the value of the property (set '_Changed' flag with 'true').
void setValue64 (sint64 prop);
inline sint32 getValue32() { return *((sint32*)&_Property); }
inline sint32 getValue32() const { return (sint32)(_Property & 0xffffffff); }
void setValue32 (sint32 prop);
inline sint16 getValue16() { return *((sint16*)&_Property); }
inline sint16 getValue16() const { return (sint16)(_Property & 0xffff); }
void setValue16 (sint16 prop);
inline sint8 getValue8() { return *((sint8*)&_Property); }
inline sint8 getValue8() const { return (sint8)(_Property & 0xff); }
void setValue8 (sint8 prop);
inline bool getValueBool() { return (_Property!=(sint64)0 ); }
inline bool getValueBool() const { return (_Property!=(sint64)0 ); }
void setValueBool (bool prop);
inline CRGBA getValueRGBA()
inline CRGBA getValueRGBA() const
{
CRGBA col;
col.R = (uint8)(_Property&0xff);
@ -65,11 +65,11 @@ public:
void setValueRGBA (const CRGBA &color);
/// Return the value of the property before the database change
inline sint64 getOldValue64() { return _oldProperty; }
inline sint32 getOldValue32() { return *((sint32*)&_oldProperty); }
inline sint16 getOldValue16() { return *((sint16*)&_oldProperty); }
inline sint8 getOldValue8() { return *((sint8*)&_oldProperty); }
inline bool getOldValueBool() { return (_oldProperty!=(sint64)0 ); }
inline sint64 getOldValue64() const { return _oldProperty; }
inline sint32 getOldValue32() const { return (sint32)(_oldProperty & 0xffffffff); }
inline sint16 getOldValue16() const { return (sint16)(_oldProperty & 0xffff); }
inline sint8 getOldValue8() const { return (sint8)(_oldProperty & 0xff); }
inline bool getOldValueBool() const { return (_oldProperty!=(sint64)0 ); }
/// Return the type of the property.

View file

@ -201,7 +201,9 @@ namespace NLMISC
*/
void sleep(uint milliseconds);
/** Release internal instance.
*/
static void releaseInstance();
};

View file

@ -286,6 +286,15 @@ inline sint nlstricmp(const char *lhs, const std::string &rhs) { return stricmp(
#define wideToUtf8(str) (ucstring((ucchar*)str).toUtf8())
#define utf8ToWide(str) ((wchar_t*)ucstring::makeFromUtf8(str).c_str())
// macros helper to convert UTF-8 std::string and TCHAR*
#ifdef _UNICODE
#define tStrToUtf8(str) (ucstring((ucchar*)(LPCWSTR)str).toUtf8())
#define utf8ToTStr(str) ((wchar_t*)ucstring::makeFromUtf8(str).c_str())
#else
#define tStrToUtf8(str) (std::string((LPCSTR)str))
#define utf8ToTStr(str) (str.c_str())
#endif
// wrapper for fopen to be able to open files with an UTF-8 filename
FILE* nlfopen(const std::string &filename, const std::string &mode);
@ -469,6 +478,22 @@ template <class T> void explode (const T &src, const T &sep, std::vector<T> &res
while(pos != std::string::npos);
}
/** Join a string (or ucstring) from a vector of strings with *sep* as separator. If sep can be more than 1 char, in this case,
* we find the entire sep to separator (it s not a set of possible separator)
*/
template <class T, class U> void join(const std::vector<T>& strings, const U& separator, T &res)
{
res.clear();
for (uint i = 0, len = strings.size(); i<len; ++i)
{
// add in separators before all but the first string
if (!res.empty()) res += separator;
// append next string
res += strings[i];
}
}
/* All the code above is used to add our types (uint8, ...) in the stringstream (used by the toString() function).
* So we can use stringstream operator << and >> with all NeL simple types (except for ucchar and ucstring)
@ -665,10 +690,10 @@ inline int nlisprint(int c)
#endif
// Open an url in a browser
bool openURL (const char *url);
bool openURL (const std::string &url);
// Open a document
bool openDoc (const char *document);
bool openDoc (const std::string &document);
// AntiBug method that return an epsilon if x==0, else x
inline float favoid0(float x)

View file

@ -55,7 +55,7 @@ public:
// allocated a block of n bytes
void *alloc(uint numBytes);
// deallocate a block
void free(void *block, uint numBytes);
void freeBlock(void *block, uint numBytes);
// compute the total number of bytes allocated since init
// NB : freed block are not subtracted from that total !!
uint getNumAllocatedBytes() const { return _NumAllocatedBytes; }

View file

@ -151,8 +151,8 @@ void setCrashAlreadyReported(bool state);
* Note 2 : To show a warning under GCC, use #warning "Your warning here",
* see nel/net/net_manager.h for an example on how to use these correctly.
*/
#define NL_LOC_MSG __FILE__"("NL_MACRO_TO_STR(__LINE__)") : Message: "
#define NL_LOC_WRN __FILE__"("NL_MACRO_TO_STR(__LINE__)") : Warning Msg: "
#define NL_LOC_MSG __FILE__ "(" NL_MACRO_TO_STR(__LINE__) ") : Message: "
#define NL_LOC_WRN __FILE__ "(" NL_MACRO_TO_STR(__LINE__) ") : Warning Msg: "
/**

View file

@ -21,7 +21,7 @@
namespace STRING_MANAGER
{
const ucstring nl("\r\n");
const ucstring nl("\n");
struct TStringInfo

View file

@ -45,7 +45,7 @@ public:
/// alloc a block
void *alloc();
/// destroy and dealloc a block
void free(void *block);
void freeBlock(void *block);
//
uint getNumBytesPerBlock() const { return _NumBytesPerBlock; }
uint getNumBlockPerChunk() const { return _NumBlockPerChunk; }

View file

@ -65,7 +65,7 @@ public:
*/
void *allocate(uint size);
/// free a block allocated with alloate(). no-op if NULL. nlstop() if don't find this block.
void free(void *ptr);
void freeBlock(void *ptr);
// *********************

View file

@ -144,12 +144,10 @@ public:
* 16 bits encoding can be recognized by the official header :
* FF, FE, witch can be reversed if the data are MSB first.
*
* Optionally, you can force the reader to consider the file as
* UTF-8 encoded.
* Optionally, you can ask the reader to interpret #include commands.
*/
static void readTextFile(const std::string &filename,
ucstring &result, bool forceUtf8 = false,
ucstring &result,
bool fileLookup = true,
bool preprocess = false,
TLineFormat lineFmt = LINE_FMT_NO_CARE,
@ -162,11 +160,8 @@ public:
* EF,BB, BF.
* 16 bits encoding can be recognized by the official header :
* FF, FE, witch can be reversed if the data are MSB first.
*
* Optionally, you can force the reader to consider the file as
* UTF-8 encoded.
*/
static void readTextBuffer(uint8 *buffer, uint size, ucstring &result, bool forceUtf8 = false);
static void readTextBuffer(uint8 *buffer, uint size, ucstring &result);
/** Remove any C style comment from the passed string.
*/
@ -262,7 +257,7 @@ private:
/// The internal read function, it does the real job of readTextFile
static void _readTextFile(const std::string &filename,
ucstring &result, bool forceUtf8,
ucstring &result,
bool fileLookup,
bool preprocess,
TLineFormat lineFmt,

View file

@ -120,11 +120,11 @@ public:
/** Get the first child node pointer named childName. NULL if no node named childName.
*/
static xmlNodePtr getFirstChildNode (xmlNodePtr parent, const char *childName);
static xmlNodePtr getFirstChildNode (xmlNodePtr parent, const std::string &childName);
/** Get the next child node pointer name childName, brother of previous. NULL if no node named childName.
*/
static xmlNodePtr getNextChildNode (xmlNodePtr last, const char *childName);
static xmlNodePtr getNextChildNode (xmlNodePtr last, const std::string &childName);
/** Get the first child node pointer of type. NULL if no node of type.
*/
@ -136,7 +136,7 @@ public:
/** Count number of sub node named with a given name for a given node.
*/
static uint countChildren (xmlNodePtr node, const char *childName);
static uint countChildren (xmlNodePtr node, const std::string &childName);
/** Count number of sub node of type for a given node.
*/
@ -147,22 +147,22 @@ public:
*
* Returns true and the result if the property has been found, else false.
*/
static bool getPropertyString (std::string &result, xmlNodePtr node, const char *property);
static bool getPropertyString (std::string &result, xmlNodePtr node, const std::string &property);
/**
* Read an integer property - if the property is not found the default value is returned
*/
static int getIntProperty(xmlNodePtr node, const char *property, int defaultValue);
static int getIntProperty(xmlNodePtr node, const std::string &property, int defaultValue);
/**
* Read a floating point property - if the property is not found the default value is returned
*/
static double getFloatProperty(xmlNodePtr node, const char *property, float defaultValue);
static double getFloatProperty(xmlNodePtr node, const std::string &property, float defaultValue);
/**
* Read a string property - if the property is not found the default value is returned
*/
static std::string getStringProperty(xmlNodePtr node, const char *property, const std::string& defaultValue);
static std::string getStringProperty(xmlNodePtr node, const std::string &property, const std::string& defaultValue);
/**
* Read the content of the node as a string
@ -171,6 +171,11 @@ public:
*/
static bool getContentString (std::string &result, xmlNodePtr node);
/**
* Release meory used by libxml2, to only call before exit.
*/
static void releaseLibXml();
private:
/// From IStream
@ -193,12 +198,12 @@ private:
virtual void serialBuffer(uint8 *buf, uint len);
virtual void serialBit(bool &bit);
virtual bool xmlPushBeginInternal (const char *nodeName);
virtual bool xmlPushBeginInternal (const std::string &nodeName);
virtual bool xmlPushEndInternal ();
virtual bool xmlPopInternal ();
virtual bool xmlSetAttribInternal (const char *attribName);
virtual bool xmlSetAttribInternal (const std::string &attribName);
virtual bool xmlBreakLineInternal ();
virtual bool xmlCommentInternal (const char *comment);
virtual bool xmlCommentInternal (const std::string &comment);
// Internal functions
void serialSeparatedBufferIn ( std::string &value, bool checkSeparator = true );

View file

@ -46,7 +46,7 @@ public:
double getSamplingPeriod() const { return _SamplingPeriod; }
// Reset smoother. The next returned position will be the exact position of mouse (no smoothing with previous position is done)
void reset();
// \return trueif no sampling has occured since last resetor construction
// \return trueif no sampling has occurred since last resetor construction
bool isReseted() const { return !_Init; }
// Sample pos, and return smoothed position
CVector2f samplePos(const CVector2f &wantedPos, double date);

View file

@ -95,7 +95,7 @@ public:
* \param version is the version to write in the XML header. Default is 1.0.
* \return true if initialisation is successful, false if the stream passed is not an output stream.
*/
bool init (IStream *stream, const char *version="1.0");
bool init (IStream *stream, const std::string &version = "1.0");
/** Return the error string.
* if not empty, something wrong appends
@ -120,7 +120,7 @@ public:
/** Return true if the string is valid to be stored in a XML property without modification.
*/
static bool isStringValidForProperties (const char *str);
static bool isStringValidForProperties (const std::string &str);
private:
@ -144,15 +144,15 @@ private:
virtual void serialBuffer(uint8 *buf, uint len);
virtual void serialBit(bool &bit);
virtual bool xmlPushBeginInternal (const char *nodeName);
virtual bool xmlPushBeginInternal (const std::string &nodeName);
virtual bool xmlPushEndInternal ();
virtual bool xmlPopInternal ();
virtual bool xmlSetAttribInternal (const char *attribName);
virtual bool xmlSetAttribInternal (const std::string &attribName);
virtual bool xmlBreakLineInternal ();
virtual bool xmlCommentInternal (const char *comment);
virtual bool xmlCommentInternal (const std::string &comment);
// Internal functions
void serialSeparatedBufferOut( const char *value );
void serialSeparatedBufferOut( const std::string &value );
inline void flushContentString ();
// Push mode

View file

@ -49,7 +49,7 @@ public:
*/
void *alloc(uint size);
// free an object that has previously been allocated with alloc. size should be remembered by the caller.
void free(void *);
void freeBlock(void *);
// get the number of allocated objects
uint getNumAllocatedBlocks() const;
# ifdef NL_DEBUG
@ -82,7 +82,11 @@ private:
// NL_USES_DEFAULT_ARENA_OBJECT_ALLOCATOR // for fast alloc
# define NL_USES_DEFAULT_ARENA_OBJECT_ALLOCATOR \
void *operator new(size_t size) { return NLMISC::CObjectArenaAllocator::getDefaultAllocator().alloc((uint) size); }\
void operator delete(void *block) { NLMISC::CObjectArenaAllocator::getDefaultAllocator().free(block); }
void *operator new(size_t size, int _BlockUse, char const* _FileName, int _LineNumber) { return NLMISC::CObjectArenaAllocator::getDefaultAllocator().alloc((uint) size); }\
void *operator new(size_t size, char const* _FileName, int _LineNumber) { return NLMISC::CObjectArenaAllocator::getDefaultAllocator().alloc((uint) size); }\
void operator delete(void *block) { NLMISC::CObjectArenaAllocator::getDefaultAllocator().freeBlock(block); }\
void operator delete(void *block, int _BlockUse, char const* _FileName, int _LineNumber) { NLMISC::CObjectArenaAllocator::getDefaultAllocator().freeBlock(block); } \
void operator delete(void *block, char const* _FileName, int _LineNumber) { NLMISC::CObjectArenaAllocator::getDefaultAllocator().freeBlock(block); }
}

View file

@ -209,7 +209,7 @@ public:
* \param relativePath is the path to make relative to basePath.
* return true if relativePath as been done relative to basePath, false is relativePath has not been changed.
*/
bool makePathRelative (const char *basePath, std::string &relativePath);
bool makePathRelative (const std::string &basePath, std::string &relativePath);
/** If File in this list is added more than one in an addSearchPath, it doesn't launch a warning.
*/
@ -505,7 +505,7 @@ public:
* \param relativePath is the path to make relative to basePath.
* return true if relativePath as been done relative to basePath, false is relativePath has not been changed.
*/
static bool makePathRelative (const char *basePath, std::string &relativePath);
static bool makePathRelative(const std::string &basePath, std::string &relativePath);
/** Make path absolute
* \param relativePath - The relative path

View file

@ -90,7 +90,7 @@ public:
/*
* Free all the elements allocated since last free(). Memory is kept for next allocations.
*/
void free ()
void freeBlock ()
{
typename std::list< std::vector<T> >::iterator ite=_BlockList.begin();
while (ite!=_BlockList.end())

Some files were not shown because too many files have changed in this diff Show more