merge while working on rebase root source dir
This commit is contained in:
commit
c3e4ffbe26
340 changed files with 12461 additions and 3053 deletions
|
@ -45,6 +45,7 @@ default_c
|
|||
*_debug
|
||||
core
|
||||
*.pc
|
||||
*.gch
|
||||
|
||||
# Mac OS X compile
|
||||
*.dylib
|
||||
|
@ -133,12 +134,14 @@ moc_*.cpp
|
|||
*.moc
|
||||
|
||||
# Misc garbage
|
||||
*.rej
|
||||
*.orig
|
||||
*.cachefile
|
||||
*.cache
|
||||
*.patch
|
||||
*.7z
|
||||
external
|
||||
.svn
|
||||
|
||||
# build
|
||||
code/nel/build/*
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# * NL_SHARE_PREFIX (default: $CMAKE_INSTALL_PREFIX/share)
|
||||
# * NL_BIN_PREFIX (default: $CMAKE_INSTALL_PREFIX/bin)
|
||||
# * NL_SBIN_PREFIX (default: $CMAKE_INSTALL_PREFIX/sbin)
|
||||
# * NL_LIB_PREFIX (default: $CMAKE_INSTALL_PREFIX/lib)
|
||||
# * NL_DRIVER_PREFIX (default: $CMAKE_INSTALL_PREFIX/lib (windows) or $CMAKE_INSTALL_PREFIX/lib/nel)
|
||||
# * Enable building of documentation: add -DBUILD_DOCUMENTATION:BOOL=ON - new make target: DoxygenDoc
|
||||
# * Updating version: update header (above) but also update NL_VERSION below.
|
||||
# * To build binary archive, use the 'package' target.
|
||||
|
@ -38,10 +40,23 @@ INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
|
|||
CHECK_OUT_OF_SOURCE()
|
||||
|
||||
IF(WIN32)
|
||||
SET(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/include;${CMAKE_INCLUDE_PATH}")
|
||||
IF(NOT EXTERNAL_PATH)
|
||||
SET(EXTERNAL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty" CACHE PATH "3rd party libraries root path.")
|
||||
ENDIF(NOT EXTERNAL_PATH)
|
||||
|
||||
IF(NOT EXTERNAL_INCLUDE_PATH)
|
||||
SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include" CACHE PATH "3rd party libraries include path.")
|
||||
ENDIF(NOT EXTERNAL_INCLUDE_PATH)
|
||||
|
||||
IF(NOT EXTERNAL_LIBRARY_PATH)
|
||||
SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib" CACHE PATH "3rd party libraries lib path.")
|
||||
ENDIF(NOT EXTERNAL_LIBRARY_PATH)
|
||||
|
||||
SET(CMAKE_INCLUDE_PATH "${EXTERNAL_INCLUDE_PATH};${CMAKE_INCLUDE_PATH}")
|
||||
# Stupid hack for FindOpenAL.cmake
|
||||
SET(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty;${CMAKE_INCLUDE_PATH}")
|
||||
SET(CMAKE_LIBRARY_PATH "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/lib;${CMAKE_LIBRARY_PATH}")
|
||||
SET(CMAKE_INCLUDE_PATH "${EXTERNAL_PATH};${CMAKE_INCLUDE_PATH}")
|
||||
SET(CMAKE_LIBRARY_PATH "${EXTERNAL_LIBRARY_PATH};${CMAKE_LIBRARY_PATH}")
|
||||
|
||||
IF(NOT DEFINED ENV{QTDIR})
|
||||
SET(ENV{QTDIR} "c:/qt/4.5.0")
|
||||
ENDIF(NOT DEFINED ENV{QTDIR})
|
||||
|
@ -82,6 +97,10 @@ FIND_PACKAGE(Jpeg)
|
|||
|
||||
NL_SETUP_BUILD()
|
||||
|
||||
IF(WITH_MFC)
|
||||
FIND_PACKAGE(MFC)
|
||||
ENDIF(WITH_MFC)
|
||||
|
||||
NL_SETUP_BUILD_FLAGS()
|
||||
|
||||
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
|
||||
|
@ -93,6 +112,8 @@ ENDIF(FINAL_VERSION)
|
|||
IF(WITH_QT)
|
||||
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml REQUIRED)
|
||||
ENDIF(WITH_QT)
|
||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||
|
||||
|
||||
IF(WITH_NEL)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include)
|
||||
|
|
|
@ -44,5 +44,6 @@ MACRO(NL_CONFIGURE_CHECKS)
|
|||
CHECK_FUNCTION_EXISTS("stat64" HAVE_STAT64)
|
||||
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||
ENDMACRO(NL_CONFIGURE_CHECKS)
|
||||
|
|
55
code/CMakeModules/FindLuabind.cmake
Normal file
55
code/CMakeModules/FindLuabind.cmake
Normal file
|
@ -0,0 +1,55 @@
|
|||
# - Locate Luabind library
|
||||
# This module defines
|
||||
# LUABIND_LIBRARY, the library to link against
|
||||
# LUABIND_FOUND, if false, do not try to link to LUABIND
|
||||
# LUABIND_INCLUDE_DIR, where to find headers.
|
||||
|
||||
|
||||
IF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
|
||||
# in cache already
|
||||
SET(LUABIND_FIND_QUIETLY TRUE)
|
||||
ENDIF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
|
||||
|
||||
|
||||
|
||||
|
||||
FIND_PATH(LUABIND_INCLUDE_DIR
|
||||
luabind.hpp
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
PATH_SUFFIXES luabind
|
||||
)
|
||||
|
||||
|
||||
FIND_LIBRARY(LUABIND_LIBRARY
|
||||
NAMES luabind libluabind luabind_d libluabind_d libluabindd
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
|
||||
IF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
|
||||
SET(LUABIND_FOUND "YES")
|
||||
IF(NOT LUABIND_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARY}")
|
||||
ENDIF(NOT LUABIND_FIND_QUIETLY)
|
||||
ELSE(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
|
||||
IF(NOT LUABIND_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find Luabind!")
|
||||
ENDIF(NOT LUABIND_FIND_QUIETLY)
|
||||
ENDIF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
|
|
@ -32,6 +32,8 @@ FIND_LIBRARY(STLPORT_LIBRARY_DEBUG
|
|||
stlportstld_x
|
||||
stlportstld_x.5.2
|
||||
stlportd
|
||||
stlportd_statix
|
||||
stlportd_static
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
|
@ -51,6 +53,8 @@ FIND_LIBRARY(STLPORT_LIBRARY_RELEASE
|
|||
stlport
|
||||
stlport_x
|
||||
stlport_x.5.2
|
||||
stlport_statix
|
||||
stlport_static
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
|
|
|
@ -27,7 +27,7 @@ MACRO(NL_TARGET_DRIVER name)
|
|||
IF(WITH_STATIC_DRIVERS)
|
||||
ADD_LIBRARY(${name} STATIC ${ARGN})
|
||||
ELSE(WITH_STATIC_DRIVERS)
|
||||
ADD_LIBRARY(${name} SHARED ${ARGN})
|
||||
ADD_LIBRARY(${name} MODULE ${ARGN})
|
||||
ENDIF(WITH_STATIC_DRIVERS)
|
||||
ENDMACRO(NL_TARGET_DRIVER)
|
||||
|
||||
|
@ -38,15 +38,18 @@ ENDMACRO(NL_TARGET_DRIVER)
|
|||
###
|
||||
MACRO(NL_DEFAULT_PROPS name label)
|
||||
GET_TARGET_PROPERTY(type ${name} TYPE)
|
||||
IF((${type} STREQUAL SHARED_LIBRARY) OR (${type} STREQUAL MODULE_LIBRARY))
|
||||
# Set versions only if target is a shared library or a module
|
||||
SET(versions VERSION ${NL_VERSION} SOVERSION ${NL_VERSION_MAJOR})
|
||||
ENDIF((${type} STREQUAL SHARED_LIBRARY) OR (${type} STREQUAL MODULE_LIBRARY))
|
||||
SET_TARGET_PROPERTIES(${name} PROPERTIES
|
||||
${versions}
|
||||
PROJECT_LABEL ${label})
|
||||
IF(${type} STREQUAL SHARED_LIBRARY)
|
||||
# Set versions only if target is a shared library
|
||||
SET_TARGET_PROPERTIES(${name} PROPERTIES
|
||||
VERSION ${NL_VERSION} SOVERSION ${NL_VERSION_MAJOR}
|
||||
PROJECT_LABEL ${label})
|
||||
ELSE(${type} STREQUAL SHARED_LIBRARY)
|
||||
SET_TARGET_PROPERTIES(${name} PROPERTIES
|
||||
PROJECT_LABEL ${label})
|
||||
ENDIF(${type} STREQUAL SHARED_LIBRARY)
|
||||
ENDMACRO(NL_DEFAULT_PROPS)
|
||||
|
||||
|
||||
###
|
||||
# Adds the target suffix on Windows.
|
||||
# Argument: name - the library's target name.
|
||||
|
@ -75,17 +78,17 @@ ENDMACRO(NL_ADD_RUNTIME_FLAGS)
|
|||
MACRO(NL_ADD_STATIC_VID_DRIVERS name)
|
||||
IF(WITH_STATIC_DRIVERS)
|
||||
IF(WIN32)
|
||||
IF(WITH_DRIVER_DIRECT3D)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_direct3d_win)
|
||||
IF(WITH_DRIVER_DIRECT3D)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_direct3d_win)
|
||||
ENDIF(WITH_DRIVER_DIRECT3D)
|
||||
|
||||
IF(WITH_DRIVER_DSOUND)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound)
|
||||
ENDIF(WITH_DRIVER_DSOUND)
|
||||
|
||||
IF(WITH_DRIVER_XAUDIO2)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2)
|
||||
ENDIF(WITH_DRIVER_XAUDIO2)
|
||||
|
||||
IF(WITH_DRIVER_DSOUND)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound)
|
||||
ENDIF(WITH_DRIVER_DSOUND)
|
||||
|
||||
IF(WITH_DRIVER_XAUDIO2)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2)
|
||||
ENDIF(WITH_DRIVER_XAUDIO2)
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(WITH_DRIVER_OPENAL)
|
||||
|
@ -98,9 +101,9 @@ MACRO(NL_ADD_STATIC_VID_DRIVERS name)
|
|||
|
||||
IF(WITH_DRIVER_OPENGL)
|
||||
IF(WIN32)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl_win)
|
||||
ELSE(WIN32)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl_win)
|
||||
ELSE(WIN32)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl)
|
||||
ENDIF(WIN32)
|
||||
ENDIF(WITH_DRIVER_OPENGL)
|
||||
ENDIF(WITH_STATIC_DRIVERS)
|
||||
|
@ -109,13 +112,13 @@ ENDMACRO(NL_ADD_STATIC_VID_DRIVERS)
|
|||
MACRO(NL_ADD_STATIC_SND_DRIVERS name)
|
||||
IF(WITH_STATIC_DRIVERS)
|
||||
IF(WIN32)
|
||||
IF(WITH_DRIVER_DSOUND)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound)
|
||||
ENDIF(WITH_DRIVER_DSOUND)
|
||||
|
||||
IF(WITH_DRIVER_XAUDIO2)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2)
|
||||
ENDIF(WITH_DRIVER_XAUDIO2)
|
||||
IF(WITH_DRIVER_DSOUND)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound)
|
||||
ENDIF(WITH_DRIVER_DSOUND)
|
||||
|
||||
IF(WITH_DRIVER_XAUDIO2)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2)
|
||||
ENDIF(WITH_DRIVER_XAUDIO2)
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(WITH_DRIVER_OPENAL)
|
||||
|
@ -209,7 +212,7 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
|||
OPTION(WITH_NEL_MAXPLUGIN "Build NeL 3dsMax Plugin" OFF)
|
||||
OPTION(WITH_NEL_SAMPLES "Build NeL Samples" ON )
|
||||
OPTION(WITH_NEL_TESTS "Build NeL Unit Tests" ON )
|
||||
|
||||
OPTION(WITH_MFC "With MFC Support" ON )
|
||||
ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
||||
|
||||
MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
||||
|
@ -248,12 +251,25 @@ MACRO(NL_SETUP_BUILD)
|
|||
ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
|
||||
IF(WIN32)
|
||||
SET(NL_DEBUG_CFLAGS "/EHa /Ob1 /Zi")
|
||||
SET(NL_RELEASE_CFLAGS "/EHa /Zi /Ox /Ob2 /Oi /Ot /Oy /GT /GF /GS-")
|
||||
SET(NL_RELEASEDEBUG_CFLAGS "/EHa /DNL_RELEASE_DEBUG /Zi /Ob2 /GF")
|
||||
# don't use a /O[012x] flag if you want custom optimizations
|
||||
SET(SPEED_OPTIMIZATIONS "/Ob2 /Oi /Ot /Oy /GT /GF /GS-")
|
||||
SET(SIZE_OPTIMIZATIONS "/O1")
|
||||
# without inlining it's unusable, use custom optimizations again
|
||||
SET(MIN_OPTIMIZATIONS "/Ob1")
|
||||
|
||||
SET(CMAKE_C_FLAGS_DEBUG "/MDd /Zi /RTC1 /D_DEBUG ${MIN_OPTIMIZATIONS}")
|
||||
SET(CMAKE_C_FLAGS_RELEASE "/MD /Zi /D NDEBUG ${SPEED_OPTIMIZATIONS}")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/MD /Zi /D NDEBUG ${SPEED_OPTIMIZATIONS}")
|
||||
SET(CMAKE_C_FLAGS_MINSIZEREL "/MD /D NDEBUG ${SIZE_OPTIMIZATIONS}")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO})
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_MINSIZEREL})
|
||||
|
||||
SET(NL_DEBUG_CFLAGS "/EHa /Zi")
|
||||
SET(NL_RELEASE_CFLAGS "/EHa /Zi")
|
||||
SET(NL_DEBUG_LINK_FLAGS "/NODEFAULTLIB:msvcrt")
|
||||
SET(NL_RELEASE_LINK_FLAGS "/OPT:REF /OPT:ICF")
|
||||
SET(NL_RELEASEDEBUG_LINK_FLAGS "/OPT:REF /OPT:ICF")
|
||||
ELSE(WIN32)
|
||||
SET(PLATFORM_CFLAGS "-ftemplate-depth-24 -D_REENTRANT -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-long-long -Wno-unused")
|
||||
IF(WITH_COVERAGE)
|
||||
|
@ -265,7 +281,6 @@ MACRO(NL_SETUP_BUILD)
|
|||
ENDIF(NOT APPLE)
|
||||
SET(NL_DEBUG_CFLAGS "-DNL_DEBUG -g")
|
||||
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -O6 -g")
|
||||
SET(NL_RELEASEDEBUG_CFLAGS "-DNL_RELEASE_DEBUG -g -finline-functions -O3 ")
|
||||
SET(NL_NONE_CFLAGS "-DNL_RELEASE -g -finline-functions -O2 ")
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
@ -308,14 +323,14 @@ MACRO(NL_SETUP_BUILD_FLAGS)
|
|||
SET(CMAKE_LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE} ${NL_RELEASE_LINK_FLAGS} ${PLATFORM_LINKFLAGS} ")
|
||||
|
||||
## RelWithDebInfo
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_LINK_FLAGS_RELWITHDEBINFO "${CMAKE_LINK_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_LINK_FLAGS} ${PLATFORM_LINKFLAGS} ")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_LINK_FLAGS_RELWITHDEBINFO "${CMAKE_LINK_FLAGS_RELWITHDEBINFO} ${NL_RELEASE_LINK_FLAGS} ${PLATFORM_LINKFLAGS} ")
|
||||
|
||||
## MinSizeRel
|
||||
SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_LINK_FLAGS_MINSIZEREL "${CMAKE_LINK_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_LINK_CFLAGS} ${PLATFORM_LINKFLAGS} ")
|
||||
SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_LINK_FLAGS_MINSIZEREL "${CMAKE_LINK_FLAGS_MINSIZEREL} ${NL_RELEASE_LINK_CFLAGS} ${PLATFORM_LINKFLAGS} ")
|
||||
ENDMACRO(NL_SETUP_BUILD_FLAGS)
|
||||
|
||||
MACRO(NL_SETUP_PREFIX_PATHS)
|
||||
|
@ -331,28 +346,46 @@ MACRO(NL_SETUP_PREFIX_PATHS)
|
|||
## Allow override of install_prefix/share path.
|
||||
IF(NOT NL_SHARE_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(NL_SHARE_PREFIX "../share/nel" CACHE PATH "Installation path for data.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_SHARE_PREFIX "${CMAKE_INSTALL_PREFIX}/share/nel" CACHE PATH "Installation path for data.")
|
||||
ENDIF(WIN32)
|
||||
SET(NL_SHARE_PREFIX "../share/nel" CACHE PATH "Installation path for data.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_SHARE_PREFIX "${CMAKE_INSTALL_PREFIX}/share/nel" CACHE PATH "Installation path for data.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT NL_SHARE_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/sbin path.
|
||||
IF(NOT NL_SBIN_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(NL_SBIN_PREFIX "../sbin" CACHE PATH "Installation path for admin tools and services.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_SBIN_PREFIX "${CMAKE_INSTALL_PREFIX}/sbin" CACHE PATH "Installation path for admin tools and services.")
|
||||
ENDIF(WIN32)
|
||||
IF(WIN32)
|
||||
SET(NL_SBIN_PREFIX "../sbin" CACHE PATH "Installation path for admin tools and services.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_SBIN_PREFIX "${CMAKE_INSTALL_PREFIX}/sbin" CACHE PATH "Installation path for admin tools and services.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT NL_SBIN_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/bin path.
|
||||
IF(NOT NL_BIN_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(NL_BIN_PREFIX "../bin" CACHE PATH "Installation path for tools and applications.")
|
||||
SET(NL_BIN_PREFIX "../bin" CACHE PATH "Installation path for tools and applications.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_BIN_PREFIX "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation path for tools and applications.")
|
||||
SET(NL_BIN_PREFIX "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation path for tools and applications.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT NL_BIN_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/lib path.
|
||||
IF(NOT NL_LIB_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(NL_LIB_PREFIX "../lib" CACHE PATH "Installation path for libraries.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_LIB_PREFIX "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation path for libraries.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT NL_LIB_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/lib path.
|
||||
IF(NOT NL_DRIVER_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(NL_DRIVER_PREFIX "../lib" CACHE PATH "Installation path for drivers.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_DRIVER_PREFIX "${CMAKE_INSTALL_PREFIX}/lib/nel" CACHE PATH "Installation path for drivers.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT NL_DRIVER_PREFIX)
|
||||
|
||||
ENDMACRO(NL_SETUP_PREFIX_PATHS)
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
# * NL_LIB_PREFIX (default: $CMAKE_INSTALL_PREFIX/lib)
|
||||
# * NL_DRIVER_PREFIX (default: $CMAKE_INSTALL_PREFIX/lib (windows) or $CMAKE_INSTALL_PREFIX/lib/nel)
|
||||
SET(EXTERNAL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../3rdParty" CACHE PATH "3rd party libraries root path.")
|
||||
ENDIF(NOT EXTERNAL_PATH)
|
||||
|
||||
IF(NOT EXTERNAL_INCLUDE_PATH)
|
||||
SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include" CACHE PATH "3rd party libraries include path.")
|
||||
ENDIF(NOT EXTERNAL_INCLUDE_PATH)
|
||||
|
||||
IF(NOT EXTERNAL_LIBRARY_PATH)
|
||||
SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib" CACHE PATH "3rd party libraries lib path.")
|
||||
ENDIF(NOT EXTERNAL_LIBRARY_PATH)
|
||||
|
||||
SET(CMAKE_INCLUDE_PATH "${EXTERNAL_INCLUDE_PATH};${CMAKE_INCLUDE_PATH}")
|
||||
|
||||
PROJECT(NeL CXX C)
|
||||
|
||||
IF(WITH_STATIC_DRIVERS)
|
||||
|
@ -55,6 +70,10 @@ IF(WITH_SOUND)
|
|||
ENDIF(WITH_DRIVER_FMOD)
|
||||
ENDIF(WITH_SOUND)
|
||||
|
||||
IF(WITH_MFC)
|
||||
FIND_PACKAGE(MFC)
|
||||
ENDIF(WITH_MFC)
|
||||
|
||||
IF(WITH_GTK)
|
||||
FIND_PACKAGE(GTK2)
|
||||
ENDIF(WITH_GTK)
|
||||
|
@ -95,6 +114,11 @@ IF(WIN32)
|
|||
ENDIF(WIN32)
|
||||
|
||||
ADD_SUBDIRECTORY(include)
|
||||
# config.h configuration and use by projects
|
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
|
||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
|
||||
IF(WITH_NEL_SAMPLES)
|
||||
|
@ -102,8 +126,6 @@ IF(WITH_NEL_SAMPLES)
|
|||
ENDIF(WITH_NEL_SAMPLES)
|
||||
|
||||
IF(WITH_NEL_TOOLS)
|
||||
IF(WIN32)
|
||||
FIND_PACKAGE(S3TC)
|
||||
ENDIF(WIN32)
|
||||
FIND_PACKAGE(Squish)
|
||||
ADD_SUBDIRECTORY(tools)
|
||||
ENDIF(WITH_NEL_TOOLS)
|
43
code/nel/config.h.cmake
Normal file
43
code/nel/config.h.cmake
Normal file
|
@ -0,0 +1,43 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#cmakedefine HAVE_DL_H 1
|
||||
#cmakedefine HAVE_EXECINFO_H 1
|
||||
#cmakedefine HAVE_ICONV 1
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
#cmakedefine HAVE_LANGINFO_CODESET 1
|
||||
#cmakedefine HAVE_LIMITS_H 1
|
||||
#cmakedefine HAVE_MALLOC_H 1
|
||||
#cmakedefine HAVE_PAM_MISC_H 1
|
||||
#cmakedefine HAVE_PAM_PAM_APPL_H 1
|
||||
#cmakedefine HAVE_PTHREAD 1
|
||||
#cmakedefine HAVE_SECURITY_PAM_APPL_H 1
|
||||
#cmakedefine HAVE_SECURITY_PAM_MISC_H 1
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
#cmakedefine HAVE_SYS_MOUNT_H 1
|
||||
#cmakedefine HAVE_SYS_PARAM_H 1
|
||||
#cmakedefine HAVE_SYS_STATVFS_H 1
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
#cmakedefine HAVE_UNISTD_H 1
|
||||
#cmakedefine HAVE_UTIME_H 1
|
||||
#cmakedefine HAVE_WCHAR_H 1
|
||||
|
||||
#cmakedefine HAVE_BACKTRACE 1
|
||||
#cmakedefine HAVE_INET_NTOA 1
|
||||
#cmakedefine HAVE_INET_NTOP 1
|
||||
#cmakedefine HAVE_INET_PTON 1
|
||||
#cmakedefine HAVE_STRERROR 1
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
#cmakedefine HAVE_STRPTIME 1
|
||||
#cmakedefine HAVE_STRTOK_R 1
|
||||
#cmakedefine HAVE_STRTOULL 1
|
||||
#cmakedefine HAVE_STATVFS 1
|
||||
#cmakedefine HAVE_STAT64 1
|
||||
|
||||
#cmakedefine NL_BIN_PREFIX "${NL_BIN_PREFIX}"
|
||||
#cmakedefine NL_ETC_PREFIX "${NL_ETC_PREFIX}"
|
||||
#cmakedefine NL_SHARE_PREFIX "${NL_SHARE_PREFIX}"
|
||||
#cmakedefine NL_LIB_PREFIX "${NL_LIB_PREFIX}"
|
||||
#cmakedefine NL_DRIVER_PREFIX "${NL_DRIVER_PREFIX}"
|
||||
|
||||
#endif // CONFIG_H
|
|
@ -143,6 +143,9 @@ protected:
|
|||
/// Constructor with ip address, port=0
|
||||
CInetAddress( const in_addr *ip, const char *hostname = 0);
|
||||
|
||||
/// Update _HostName from _SockAddr
|
||||
void updateHostName();
|
||||
|
||||
private:
|
||||
|
||||
// Called in all constructors. Calls CBaseSocket::init().
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
ADD_EXECUTABLE(nl_sample_cegui ${SRC})
|
||||
ADD_EXECUTABLE(nl_sample_cegui WIN32 ${SRC})
|
||||
|
||||
ADD_DEFINITIONS(-DCEGUI_DATA_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_cegui/datafiles/\\"")
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CEGUI_INCLUDE_DIRS})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_cegui ${LIBXML2_LIBRARIES} ${CEGUI_LIBRARY} ${PLATFORM_LINKFLAGS} nelmisc nel3d)
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(nl_sample_cegui PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
|
||||
PROJECT_LABEL "NeL, Samples, 3D: NeL CEGUI Demo")
|
||||
ENDIF(WIN32)
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
INCLUDE_DIRECTORIES(${CEGUI_INCLUDE_DIRS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(nl_sample_cegui ${CEGUI_LIBRARY} ${PLATFORM_LINKFLAGS} nelmisc nel3d)
|
||||
NL_DEFAULT_PROPS(nl_sample_cegui "NeL, Samples, 3D: NeL CEGUI Demo")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_cegui)
|
||||
|
||||
INSTALL(TARGETS nl_sample_cegui RUNTIME DESTINATION bin COMPONENT samples3d)
|
||||
INSTALL(DIRECTORY datafiles/
|
||||
|
|
|
@ -4,34 +4,31 @@ ADD_EXECUTABLE(nl_sample_clusterview WIN32 ${SRC})
|
|||
|
||||
ADD_DEFINITIONS(-DCV_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_clusterview/\\"")
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_clusterview ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nel3d)
|
||||
TARGET_LINK_LIBRARIES(nl_sample_clusterview ${PLATFORM_LINKFLAGS} nelmisc nel3d)
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_clusterview)
|
||||
NL_DEFAULT_PROPS(nl_sample_clusterview "NeL, Samples, 3D: Cluster Viewer")
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_clusterview RUNTIME DESTINATION bin COMPONENT samples3d)
|
||||
INSTALL(FILES main.cvs readme.txt DESTINATION share/nel/nl_sample_clusterview COMPONENT samples3d)
|
||||
INSTALL(DIRECTORY groups/
|
||||
INSTALL(DIRECTORY groups/
|
||||
DESTINATION share/nel/nl_sample_clusterview/groups
|
||||
COMPONENT samples3d
|
||||
PATTERN "CVS" EXCLUDE
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "Makefile*" EXCLUDE)
|
||||
INSTALL(DIRECTORY fonts/
|
||||
INSTALL(DIRECTORY fonts/
|
||||
DESTINATION share/nel/nl_sample_clusterview/fonts
|
||||
COMPONENT samples3d
|
||||
PATTERN "CVS" EXCLUDE
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "Makefile*" EXCLUDE)
|
||||
INSTALL(DIRECTORY max/
|
||||
INSTALL(DIRECTORY max/
|
||||
DESTINATION share/nel/nl_sample_clusterview/max
|
||||
COMPONENT samples3d
|
||||
PATTERN "CVS" EXCLUDE
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "Makefile*" EXCLUDE)
|
||||
INSTALL(DIRECTORY shapes/
|
||||
INSTALL(DIRECTORY shapes/
|
||||
DESTINATION share/nel/nl_sample_clusterview/shapes
|
||||
COMPONENT samples3d
|
||||
PATTERN "CVS" EXCLUDE
|
||||
|
|
|
@ -4,12 +4,9 @@ ADD_EXECUTABLE(nl_sample_font WIN32 ${SRC})
|
|||
|
||||
ADD_DEFINITIONS(-DFONT_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_font/\\"")
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_font ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nel3d)
|
||||
TARGET_LINK_LIBRARIES(nl_sample_font ${PLATFORM_LINKFLAGS} nelmisc nel3d)
|
||||
NL_DEFAULT_PROPS(nl_sample_font "NeL, Samples, 3D: Font")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_font)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_font RUNTIME DESTINATION bin COMPONENT samples3d)
|
||||
INSTALL(FILES beteckna.ttf DESTINATION share/nel/nl_sample_font COMPONENT samples3d)
|
||||
|
|
|
@ -17,12 +17,15 @@ SET( QT_USE_QTOPENGL TRUE)
|
|||
QT4_WRAP_CPP( QTNEL_MOC_SRCS ${QTNEL_HDR})
|
||||
|
||||
#ADD_EXECUTABLE(qtnel ${TILE_EDIT_SRC} ${TILE_EDIT_MOC_SRCS} ${TILE_EDIT_RC_SRCS} ${TILE_EDIT_UI_HDRS})
|
||||
ADD_EXECUTABLE(qtnel ${QTNEL_SRC} ${QTNEL_MOC_SRCS} ${QTNEL_HDR})
|
||||
ADD_EXECUTABLE(qtnel WIN32 ${QTNEL_SRC} ${QTNEL_MOC_SRCS} ${QTNEL_HDR})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${QT_INCLUDES})
|
||||
TARGET_LINK_LIBRARIES(qtnel ${LIBXML2_LIBRARIES} ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${PLATFORM_LINKFLAGS} nelmisc nel3d)
|
||||
SET_TARGET_PROPERTIES(qtnel PROPERTIES PROJECT_LABEL "Samples, 3D: Qt Viewer Widget")
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${QT_DEFINITIONS})
|
||||
INCLUDE_DIRECTORIES(${QT_INCLUDES})
|
||||
|
||||
TARGET_LINK_LIBRARIES(qtnel ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${PLATFORM_LINKFLAGS} nelmisc nel3d)
|
||||
NL_DEFAULT_PROPS(qtnel "Samples, 3D: Qt Viewer Widget")
|
||||
NL_ADD_RUNTIME_FLAGS(qtnel)
|
||||
|
||||
ADD_DEFINITIONS(${QT_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS qtnel RUNTIME DESTINATION bin COMPONENT samples3d)
|
||||
|
||||
|
|
|
@ -2,17 +2,8 @@ FILE(GLOB SRC *.cpp)
|
|||
|
||||
ADD_EXECUTABLE(nl_sample_shapeview WIN32 ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_shapeview ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nel3d)
|
||||
NL_DEFAULT_PROPS(nl_sample_shapeview "NeL, Samples, 3D: Font")
|
||||
TARGET_LINK_LIBRARIES(nl_sample_shapeview ${PLATFORM_LINKFLAGS} nelmisc nel3d)
|
||||
NL_DEFAULT_PROPS(nl_sample_shapeview "NeL, Samples, 3D: Shape Viewer")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_shapeview)
|
||||
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(nl_sample_shapeview PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
PROJECT_LABEL "NeL, Samples, 3D: Shape Viewer")
|
||||
ENDIF(WIN32)
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_shapeview RUNTIME DESTINATION bin COMPONENT samples3d)
|
||||
|
|
|
@ -4,13 +4,10 @@ ADD_EXECUTABLE(nl_sample_georges ${SRC})
|
|||
|
||||
ADD_DEFINITIONS(-DGF_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_georges/\\"")
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_georges ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelgeorges nelmisc)
|
||||
TARGET_LINK_LIBRARIES(nl_sample_georges ${PLATFORM_LINKFLAGS} nelgeorges nelmisc)
|
||||
NL_DEFAULT_PROPS(nl_sample_georges "NeL, Samples: Georges")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_georges)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_georges RUNTIME DESTINATION bin COMPONENT samplesgeorges)
|
||||
INSTALL(FILES boolean.typ coolfilesinfo.dfn default.sample_config int.typ positiondata.dfn sample_config.dfn string.typ sheet_id.bin
|
||||
DESTINATION share/nel/nl_sample_georges/ COMPONENT samplesgeorges)
|
||||
|
|
|
@ -2,11 +2,8 @@ FILE(GLOB SRC *.cpp)
|
|||
|
||||
ADD_EXECUTABLE(nl_sample_debug ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_debug ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
|
||||
TARGET_LINK_LIBRARIES(nl_sample_debug ${PLATFORM_LINKFLAGS} nelmisc)
|
||||
NL_DEFAULT_PROPS(nl_sample_debug "NeL, Samples, Misc: Debugging")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_debug)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_debug RUNTIME DESTINATION bin COMPONENT samplesmisc)
|
||||
|
|
|
@ -4,12 +4,9 @@ ADD_EXECUTABLE(nl_sample_i18n ${SRC})
|
|||
|
||||
ADD_DEFINITIONS(-DNL_LANG_DATA="\\"${NL_SHARE_PREFIX}/nl_sample_i18n/\\"")
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_i18n ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
|
||||
TARGET_LINK_LIBRARIES(nl_sample_i18n ${PLATFORM_LINKFLAGS} nelmisc)
|
||||
NL_DEFAULT_PROPS(nl_sample_i18n "NeL, Samples, Misc: I18N")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_i18n)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_i18n RUNTIME DESTINATION bin COMPONENT samplesmisc)
|
||||
INSTALL(FILES de.uxt en.uxt fr.uxt DESTINATION share/nel/nl_sample_i18n COMPONENT samplesmisc)
|
||||
|
|
|
@ -2,11 +2,8 @@ FILE(GLOB SRC *.cpp)
|
|||
|
||||
ADD_EXECUTABLE(nl_sample_log ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_log ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
|
||||
TARGET_LINK_LIBRARIES(nl_sample_log ${PLATFORM_LINKFLAGS} nelmisc)
|
||||
NL_DEFAULT_PROPS(nl_sample_log "NeL, Samples, Misc: Logging")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_log)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_log RUNTIME DESTINATION bin COMPONENT samplesmisc)
|
||||
|
|
|
@ -2,11 +2,8 @@ FILE(GLOB SRC *.cpp)
|
|||
|
||||
ADD_EXECUTABLE(nl_sample_strings ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_strings ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
|
||||
TARGET_LINK_LIBRARIES(nl_sample_strings ${PLATFORM_LINKFLAGS} nelmisc)
|
||||
NL_DEFAULT_PROPS(nl_sample_strings "NeL, Samples, Misc: Strings")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_strings)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_strings RUNTIME DESTINATION bin COMPONENT samplesmisc)
|
||||
|
|
|
@ -2,10 +2,8 @@ FILE(GLOB SRC *.cpp)
|
|||
|
||||
ADD_EXECUTABLE(nl_sample_types_check ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_types_check ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
|
||||
TARGET_LINK_LIBRARIES(nl_sample_types_check ${PLATFORM_LINKFLAGS} nelmisc)
|
||||
NL_DEFAULT_PROPS(nl_sample_types_check "Samples, MISC: Types check sample")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_types_check)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_types_check RUNTIME DESTINATION bin COMPONENT samplesmisc)
|
||||
|
|
|
@ -1,28 +1,16 @@
|
|||
|
||||
|
||||
ADD_EXECUTABLE(nl_sample_chatclient client.cpp kbhit.cpp kbhit.h)
|
||||
|
||||
ADD_EXECUTABLE(nl_sample_chatserver server.cpp)
|
||||
ADD_EXECUTABLE(nl_sample_chatserver WIN32 server.cpp)
|
||||
|
||||
ADD_DEFINITIONS(-DCHAT_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_chat/\\"")
|
||||
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_chatclient ${PLATFORM_LINKFLAGS} nelmisc nelnet)
|
||||
NL_DEFAULT_PROPS(nl_sample_chatclient "Samples, Net, Chat: Chat Client")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_chatclient)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nl_sample_chatserver ${PLATFORM_LINKFLAGS} nelmisc nelnet)
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(nl_sample_chatclient PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
|
||||
PROJECT_LABEL "NeL, Samples, Net, Chat: Chat Client")
|
||||
SET_TARGET_PROPERTIES(nl_sample_chatserver PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
|
||||
PROJECT_LABEL "NeL, Samples, Net, Chat: Chat Server")
|
||||
ENDIF(WIN32)
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
NL_DEFAULT_PROPS(nl_sample_chatserver "NeL, Samples, Net, Chat: Chat Server")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_chatserver)
|
||||
|
||||
INSTALL(TARGETS nl_sample_chatclient nl_sample_chatserver RUNTIME DESTINATION bin COMPONENT samplesnet)
|
||||
INSTALL(FILES chat_service.cfg client.cfg DESTINATION share/nel/nl_sample_chat COMPONENT samplesnet)
|
||||
|
|
|
@ -1,25 +1,16 @@
|
|||
ADD_EXECUTABLE(nl_sample_ct_ai_service ai_service.cpp)
|
||||
ADD_EXECUTABLE(nl_sample_ct_ai_service WIN32 ai_service.cpp)
|
||||
|
||||
ADD_EXECUTABLE(nl_sample_ct_gd_service gd_service.cpp)
|
||||
ADD_EXECUTABLE(nl_sample_ct_gd_service WIN32 gd_service.cpp)
|
||||
|
||||
ADD_DEFINITIONS(-DNL_CT_CFG="\\"${NL_SHARE_PREFIX}/nl_sample_class_transport/\\"")
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_ct_ai_service ${PLATFORM_LINKFLAGS} nelmisc nelnet)
|
||||
NL_DEFAULT_PROPS(nl_sample_ct_ai_service "NeL, Samples, Net, Class Transport: AI Service")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_ct_ai_service)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nl_sample_ct_gd_service ${PLATFORM_LINKFLAGS} nelmisc nelnet)
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(nl_sample_ct_ai_service PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
|
||||
PROJECT_LABEL "NeL, Samples, Net, Class Transport: AI Service")
|
||||
SET_TARGET_PROPERTIES(nl_sample_ct_gd_service PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
|
||||
PROJECT_LABEL "NeL, Samples, Net, Class Transport: GD Service")
|
||||
ENDIF(WIN32)
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
NL_DEFAULT_PROPS(nl_sample_ct_gd_service "NeL, Samples, Net, Class Transport: GD Service")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_ct_gd_service)
|
||||
|
||||
INSTALL(TARGETS nl_sample_ct_ai_service nl_sample_ct_gd_service RUNTIME DESTINATION bin COMPONENT samplesnet)
|
||||
INSTALL(FILES ai_service.cfg gd_service.cfg DESTINATION share/nel/nl_sample_class_transport COMPONENT samplesnet)
|
||||
|
|
|
@ -1,24 +1,16 @@
|
|||
ADD_EXECUTABLE(nl_sample_ls_client client.cpp)
|
||||
|
||||
ADD_EXECUTABLE(nl_sample_ls_fes frontend_service.cpp)
|
||||
ADD_EXECUTABLE(nl_sample_ls_fes WIN32 frontend_service.cpp)
|
||||
|
||||
ADD_DEFINITIONS(-DNL_LS_CFG="\\"${NL_SHARE_PREFIX}/nl_sample_login_system/\\"")
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_ls_client ${PLATFORM_LINKFLAGS} nelmisc nelnet)
|
||||
NL_DEFAULT_PROPS(nl_sample_ls_client "NeL, Samples, Net, Login Service: LS Client")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_ls_client)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nl_sample_ls_fes ${PLATFORM_LINKFLAGS} nelmisc nelnet)
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(nl_sample_ls_client PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
PROJECT_LABEL "NeL, Samples, Net, Login Service: LS Client")
|
||||
SET_TARGET_PROPERTIES(nl_sample_ls_fes PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
|
||||
PROJECT_LABEL "NeL, Samples, Net, Login Service: LS Frontend")
|
||||
ENDIF(WIN32)
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
NL_DEFAULT_PROPS(nl_sample_ls_fes "NeL, Samples, Net, Login Service: LS Frontend")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_ls_fes)
|
||||
|
||||
INSTALL(TARGETS nl_sample_ls_client nl_sample_ls_fes RUNTIME DESTINATION bin COMPONENT samplesnet)
|
||||
INSTALL(FILES frontend_service.cfg client.cfg DESTINATION share/nel/nl_sample_login_system COMPONENT samplesnet)
|
||||
|
|
|
@ -95,7 +95,7 @@ int main (int argc, char **argv)
|
|||
Password = fgets(buf, 256, stdin);
|
||||
}
|
||||
// crypt with md5 the password
|
||||
CHashKeyMD5 hk = getMD5((uint8*)Password.c_str(), Password.size());
|
||||
CHashKeyMD5 hk = getMD5((uint8*)Password.c_str(), (uint32)Password.size());
|
||||
string CPassword = hk.toString();
|
||||
nlinfo("The crypted password is %s", CPassword.c_str());
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ IF(WITH_3D)
|
|||
ADD_DEFINITIONS(-DUSE_3D)
|
||||
ENDIF(WITH_3D)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_udpclient ${PLATFORM_LINKFLAGS} nelmisc nelnet nel3d)
|
||||
TARGET_LINK_LIBRARIES(nl_sample_udpserver ${PLATFORM_LINKFLAGS} nelmisc nelnet)
|
||||
NL_DEFAULT_PROPS(nl_sample_udpclient "NeL, Samples, Net, UDP: UDP Client")
|
||||
|
@ -18,8 +17,6 @@ NL_DEFAULT_PROPS(nl_sample_udpserver "NeL, Samples, Net, UDP: UDP Server")
|
|||
NL_ADD_RUNTIME_FLAGS(nl_sample_udpclient)
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_udpserver)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_udpclient nl_sample_udpserver RUNTIME DESTINATION bin COMPONENT samplesnet)
|
||||
INSTALL(FILES bench_service.cfg client.cfg readme.txt DESTINATION share/nel/nl_sample_udp COMPONENT samplesnet)
|
||||
|
||||
|
|
|
@ -213,8 +213,8 @@ void cbInfo (CMessage &msgin, TSockId from, CCallbackNetBase &netbase)
|
|||
|
||||
#ifdef USE_3D
|
||||
string token = "MeanPongTime ";
|
||||
uint pos=line.find (token);
|
||||
uint pos2=line.find (" ", pos+token.size());
|
||||
string::size_type pos=line.find (token);
|
||||
string::size_type pos2=line.find (" ", pos+token.size());
|
||||
uint32 val = atoi(line.substr (pos+token.size(), pos2-pos-token.size()).c_str());
|
||||
LagGraph.addOneValue ((float)val);
|
||||
#endif
|
||||
|
@ -309,7 +309,7 @@ int main( int argc, char **argv )
|
|||
UTextContext *TextContext= Driver->createTextContext(CPath::lookup("n019003l.pfb"));
|
||||
TextContext->setFontSize(18);
|
||||
|
||||
Camera.setPerspective(80*Pi/180, 1.33, 0.15, 1000);
|
||||
Camera.setPerspective(80*(float)Pi/180, 1.33f, 0.15f, 1000);
|
||||
|
||||
CEvent3dMouseListener MouseListener;
|
||||
MouseListener.addToServer(Driver->EventServer);
|
||||
|
|
|
@ -81,7 +81,7 @@ void CGraph::render (NL3D::UDriver *Driver, NL3D::UTextContext *TextContext)
|
|||
|
||||
CVertexBuffer vbuffer;
|
||||
vbuffer.setVertexFormat (CVertexBuffer::PositionFlag);
|
||||
vbuffer.setNumVertices (Values.size() * 2);
|
||||
vbuffer.setNumVertices ((uint32)Values.size() * 2);
|
||||
|
||||
float pos = X+Width-1;
|
||||
uint i = 0;
|
||||
|
|
|
@ -53,7 +53,7 @@ struct TReceivedMessage
|
|||
void vectorToAddress();
|
||||
|
||||
/// Set "disconnection" message for the current AddrFrom
|
||||
void setTypeEvent( TEventType t ) { *_Data.begin() = t; }
|
||||
void setTypeEvent( TEventType t ) { *_Data.begin() = (uint8)t; }
|
||||
|
||||
void setDate() { *(sint64*)&(*(_Data.begin()+1)) = NLMISC::CTime::getLocalTime(); }
|
||||
|
||||
|
@ -69,7 +69,7 @@ struct TReceivedMessage
|
|||
const uint8 *userDataR() const { return &*_Data.begin() + MsgHeaderSize; }
|
||||
|
||||
/// Return the size of user data
|
||||
uint32 userSize() { return _Data.size() - MsgHeaderSize; }
|
||||
uint32 userSize() { return (uint32)_Data.size() - MsgHeaderSize; }
|
||||
|
||||
/// Return the data vector (event type header byte + user data)
|
||||
vector<uint8>& data() { return _Data; }
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
ADD_EXECUTABLE(nl_sample_pacs ${SRC})
|
||||
ADD_EXECUTABLE(nl_sample_pacs WIN32 ${SRC})
|
||||
|
||||
ADD_DEFINITIONS(-DNL_PACS_DATA="\\"${NL_SHARE_PREFIX}/nl_sample_pacs/\\"")
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_pacs ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nelpacs nel3d)
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(nl_sample_pacs PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
|
||||
ENDIF(WIN32)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nl_sample_pacs ${PLATFORM_LINKFLAGS} nelmisc nelpacs nel3d)
|
||||
NL_DEFAULT_PROPS(nl_sample_pacs "NeL, Samples: PACS")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_pacs)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_pacs RUNTIME DESTINATION bin COMPONENT samplespacs)
|
||||
INSTALL(FILES readme.txt DESTINATION share/nel/nl_sample_pacs COMPONENT samplespacs)
|
||||
INSTALL(DIRECTORY shapes/
|
||||
INSTALL(DIRECTORY shapes/
|
||||
DESTINATION share/nel/nl_sample_pacs/shapes
|
||||
COMPONENT samplespacs
|
||||
PATTERN "CVS" EXCLUDE
|
||||
|
|
|
@ -264,7 +264,7 @@ int main ()
|
|||
}
|
||||
|
||||
// Keyboard
|
||||
if (arrayObj.size())
|
||||
if (!arrayObj.empty())
|
||||
{
|
||||
// Manipulate selected primitive
|
||||
keyboard (pDriver, deltaTime, *(arrayObj[selected]));
|
||||
|
@ -273,7 +273,8 @@ int main ()
|
|||
if (pDriver->AsyncListener.isKeyDown (KeyDELETE))
|
||||
{
|
||||
// remove all but one
|
||||
if (arrayObj.size() > 1) {
|
||||
if (arrayObj.size() > 1)
|
||||
{
|
||||
arrayObj[arrayObj.size()-1]->remove (*container, *pScene);
|
||||
arrayObj.resize (arrayObj.size()-1);
|
||||
}
|
||||
|
@ -281,7 +282,7 @@ int main ()
|
|||
|
||||
// Check selected
|
||||
if (selected>=arrayObj.size())
|
||||
selected=arrayObj.size()-1;
|
||||
selected=(uint)arrayObj.size()-1;
|
||||
//if (selected<0)
|
||||
// selected=0;
|
||||
|
||||
|
@ -312,8 +313,7 @@ int main ()
|
|||
clearColor=CRGBA::Black;
|
||||
|
||||
// Setup view matrix
|
||||
int size=arrayObj.size();
|
||||
if (size)
|
||||
if (!arrayObj.empty())
|
||||
{
|
||||
// Setup hotspot for the 3d listener
|
||||
plistener->setHotSpot (arrayObj[selected]->getPos());
|
||||
|
|
|
@ -2,18 +2,16 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
|
||||
ADD_EXECUTABLE(nl_sample_sound_sources ${SRC})
|
||||
|
||||
ADD_DEFINITIONS(-DNL_SOUND_DATA="\\"${NL_SHARE_PREFIX}/nl_sample_sound/\\"")
|
||||
ADD_DEFINITIONS(-DNL_SOUND_DATA="\\"${NL_SHARE_PREFIX}/nl_sample_sound/\\"" ${LIBXML2_DEFINITIONS})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nl_sample_sound_sources ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nelsound nelsnd_lowlevel)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nl_sample_sound_sources ${PLATFORM_LINKFLAGS} nelmisc nelsound)
|
||||
NL_DEFAULT_PROPS(nl_sample_sound_sources "NeL, Samples: Sound System")
|
||||
NL_ADD_RUNTIME_FLAGS(nl_sample_sound_sources)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS nl_sample_sound_sources RUNTIME DESTINATION bin COMPONENT samplessound)
|
||||
INSTALL(DIRECTORY data/
|
||||
INSTALL(DIRECTORY data/
|
||||
DESTINATION share/nel/nl_sample_sound/data
|
||||
COMPONENT samplespacs
|
||||
PATTERN "CVS" EXCLUDE
|
||||
|
|
|
@ -62,7 +62,7 @@ void Init()
|
|||
AudioMixer->setSamplePath("data/samplebank");
|
||||
// Packed sheet option, this mean we want packed sheet generated in 'data' folder
|
||||
AudioMixer->setPackedSheetOption("data", true);
|
||||
|
||||
|
||||
printf("Select NLSOUND Driver:\n");
|
||||
printf(" [1] FMod\n");
|
||||
printf(" [2] OpenAl\n");
|
||||
|
@ -71,7 +71,7 @@ void Init()
|
|||
printf("> ");
|
||||
int selection = getchar();
|
||||
printf("\n");
|
||||
|
||||
|
||||
// init with 32 tracks, EAX enabled, no ADPCM, and activate automatic sample bank loading
|
||||
AudioMixer->init(32, true, false, NULL, true, (UAudioMixer::TDriver)(selection - '0')/*UAudioMixer::DriverFMod*/);
|
||||
|
||||
|
@ -143,7 +143,7 @@ void OnMove( const CVector& listenerpos )
|
|||
* Note: The NeL vector coordinate system is described as follows:
|
||||
* \verbatim
|
||||
* (top)
|
||||
* z
|
||||
* z
|
||||
* | y (front)
|
||||
* | /
|
||||
* -----x (right)
|
||||
|
@ -151,7 +151,7 @@ void OnMove( const CVector& listenerpos )
|
|||
*/
|
||||
int main()
|
||||
{
|
||||
new CApplicationContext(); // crash at end if on stack ...
|
||||
CApplicationContext *appContext = new CApplicationContext(); // crash at end if on stack ...
|
||||
|
||||
// Initialization
|
||||
Init();
|
||||
|
@ -208,4 +208,8 @@ int main()
|
|||
|
||||
delete src1; delete src2;
|
||||
delete AudioMixer;
|
||||
|
||||
delete appContext;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -664,10 +664,13 @@ SOURCE_GROUP(Shadows FILES
|
|||
|
||||
NL_TARGET_LIB(nel3d ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${JPEG_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel3d nelmisc ${FREETYPE_LIBRARY} ${JPEG_LIBRARY})
|
||||
NL_DEFAULT_PROPS(nel3d "NeL, Library: 3D")
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(nel3d nelmisc ${FREETYPE_LIBRARY})
|
||||
SET_TARGET_PROPERTIES(nel3d PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
NL_DEFAULT_PROPS(nel3d "NeL, Library: NeL 3D")
|
||||
NL_ADD_STATIC_VID_DRIVERS(nel3d)
|
||||
|
||||
NL_ADD_LIB_SUFFIX(nel3d)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
|
|
@ -2,9 +2,9 @@ FILE(GLOB SRC *.cpp *.h *.def)
|
|||
|
||||
NL_TARGET_DRIVER(nel_drv_direct3d_win ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INC} ${DXSDK_INCLUDE_DIR})
|
||||
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d ${LIBXML2_LIBRARIES} ${FREETYPE_LIB} ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
||||
|
||||
NL_DEFAULT_PROPS(nel_drv_direct3d_win "NeL, Driver, Video: Direct3D")
|
||||
NL_ADD_RUNTIME_FLAGS(nel_drv_direct3d_win)
|
||||
|
@ -12,13 +12,11 @@ NL_ADD_LIB_SUFFIX(nel_drv_direct3d_win)
|
|||
|
||||
ADD_DEFINITIONS(/Ddriver_direct3d_EXPORTS)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_direct3d_win ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.h ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
|
||||
INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
|
||||
IF(WITH_MAXPLUGIN)
|
||||
INSTALL(TARGETS nel_drv_direct3d_win RUNTIME DESTINATION maxplugin COMPONENT drivers3d)
|
||||
ENDIF(WITH_MAXPLUGIN)
|
||||
|
|
|
@ -12,8 +12,9 @@ ENDIF(WIN32)
|
|||
|
||||
NL_TARGET_DRIVER(${NLDRV_OGL_LIB} ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} nel3d nelmisc ${OPENGL_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} nel3d nelmisc ${OPENGL_gl_LIBRARY})
|
||||
NL_DEFAULT_PROPS(${NLDRV_OGL_LIB} "NeL, Driver, Video: OpenGL")
|
||||
NL_ADD_LIB_SUFFIX(${NLDRV_OGL_LIB})
|
||||
NL_ADD_RUNTIME_FLAGS(${NLDRV_OGL_LIB})
|
||||
|
@ -27,7 +28,7 @@ ELSE(WIN32)
|
|||
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${CARBON})
|
||||
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${COCOA})
|
||||
ELSE(APPLE)
|
||||
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_LIBRARIES})
|
||||
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_LIB})
|
||||
IF(XF86VidMode_FOUND)
|
||||
INCLUDE_DIRECTORIES(${XF86VidMode_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(${XF86VidMode_DEFINITIONS})
|
||||
|
@ -41,13 +42,11 @@ ELSE(WIN32)
|
|||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(NOT APPLE AND WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_OGL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.cpp)
|
||||
ENDIF(NOT APPLE AND WITH_PCH)
|
||||
|
||||
INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
|
||||
INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
|
||||
IF(WITH_MAXPLUGIN)
|
||||
INSTALL(TARGETS ${NLDRV_OGL_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d)
|
||||
ENDIF(WITH_MAXPLUGIN)
|
||||
|
|
|
@ -56,9 +56,13 @@ namespace NL3D
|
|||
bool GlWndProc(CDriverGL *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
H_AUTO_OGL(GlWndProc)
|
||||
|
||||
if (!driver)
|
||||
return false;
|
||||
|
||||
if(message == WM_SIZE)
|
||||
{
|
||||
if (driver != NULL)
|
||||
if (!driver->_FullScreen)
|
||||
{
|
||||
RECT rect;
|
||||
GetClientRect (driver->_win, &rect);
|
||||
|
@ -70,7 +74,7 @@ bool GlWndProc(CDriverGL *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM
|
|||
}
|
||||
else if(message == WM_MOVE)
|
||||
{
|
||||
if (driver != NULL)
|
||||
if (!driver->_FullScreen)
|
||||
{
|
||||
RECT rect;
|
||||
GetWindowRect (hWnd, &rect);
|
||||
|
@ -113,14 +117,37 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
|
|||
trapMessage = GlWndProc (pDriver, hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
// we don't want Windows to erase background
|
||||
if (message == WM_ERASEBKGND)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (message == WM_SYSCOMMAND)
|
||||
{
|
||||
switch (wParam)
|
||||
{
|
||||
#ifdef NL_DISABLE_MENU
|
||||
// disable menu (F10, ALT and ALT+SPACE key doesn't freeze or open the menu)
|
||||
if(message == WM_SYSCOMMAND && wParam == SC_KEYMENU)
|
||||
return 0;
|
||||
// disable menu (F10, ALT and ALT+SPACE key doesn't freeze or open the menu)
|
||||
case SC_KEYMENU:
|
||||
#endif // NL_DISABLE_MENU
|
||||
|
||||
// Screensaver Trying To Start?
|
||||
case SC_SCREENSAVE:
|
||||
|
||||
// Monitor Trying To Enter Powersave?
|
||||
case SC_MONITORPOWER:
|
||||
|
||||
// Prevent From Happening
|
||||
return 0;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// disable menu (default ALT-F4 behavior is disabled)
|
||||
if(message == WM_CLOSE)
|
||||
if (message == WM_CLOSE)
|
||||
{
|
||||
if(pDriver && pDriver->ExitFunc)
|
||||
{
|
||||
|
@ -219,21 +246,6 @@ bool GlWndProc(CDriverGL *driver, XEvent &e)
|
|||
}
|
||||
|
||||
return true;
|
||||
|
||||
/*
|
||||
else if (message == WM_ACTIVATE)
|
||||
{
|
||||
WORD fActive = LOWORD(wParam);
|
||||
if (fActive == WA_INACTIVE)
|
||||
{
|
||||
driver->_WndActive = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
driver->_WndActive = true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
#endif // NL_OS_UNIX
|
||||
|
@ -1442,6 +1454,9 @@ bool CDriverGL::setWindowStyle(EWindowStyle windowStyle)
|
|||
if (_win == EmptyWindow || !_DestroyWindow)
|
||||
return true;
|
||||
|
||||
if (getWindowStyle() == windowStyle)
|
||||
return true;
|
||||
|
||||
#if defined(NL_OS_WINDOWS)
|
||||
|
||||
// get current style
|
||||
|
@ -1493,24 +1508,48 @@ bool CDriverGL::setWindowStyle(EWindowStyle windowStyle)
|
|||
|
||||
#elif defined(NL_OS_UNIX)
|
||||
|
||||
// Toggle fullscreen
|
||||
XEvent xev;
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.serial = 0;
|
||||
xev.xclient.send_event = True;
|
||||
xev.xclient.display = _dpy;
|
||||
xev.xclient.window = _win;
|
||||
xev.xclient.message_type = XInternAtom(_dpy, "_NET_WM_STATE", False);
|
||||
xev.xclient.format = 32;
|
||||
xev.xclient.data.l[0] = windowStyle == EWSFullscreen ? _NET_WM_STATE_ADD:_NET_WM_STATE_REMOVE;
|
||||
xev.xclient.data.l[1] = XInternAtom(_dpy, "_NET_WM_STATE_FULLSCREEN", False);
|
||||
xev.xclient.data.l[2] = 0;
|
||||
xev.xclient.data.l[3] = 1; // 1 for Application, 2 for Page or Taskbar, 0 for old source
|
||||
xev.xclient.data.l[4] = 0;
|
||||
if (!XSendEvent(_dpy, DefaultRootWindow(_dpy), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev))
|
||||
XWindowAttributes attr;
|
||||
XGetWindowAttributes(_dpy, _win, &attr);
|
||||
|
||||
// if window is mapped use events else properties
|
||||
if (attr.map_state != IsUnmapped)
|
||||
{
|
||||
nlwarning("3D: Failed to toggle to fullscreen");
|
||||
return false;
|
||||
// Toggle fullscreen
|
||||
XEvent xev;
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.serial = 0;
|
||||
xev.xclient.send_event = True;
|
||||
xev.xclient.display = _dpy;
|
||||
xev.xclient.window = _win;
|
||||
xev.xclient.message_type = XInternAtom(_dpy, "_NET_WM_STATE", False);
|
||||
xev.xclient.format = 32;
|
||||
xev.xclient.data.l[0] = windowStyle == EWSFullscreen ? _NET_WM_STATE_ADD:_NET_WM_STATE_REMOVE;
|
||||
xev.xclient.data.l[1] = XInternAtom(_dpy, "_NET_WM_STATE_FULLSCREEN", False);
|
||||
xev.xclient.data.l[2] = 0;
|
||||
xev.xclient.data.l[3] = 1; // 1 for Application, 2 for Page or Taskbar, 0 for old source
|
||||
xev.xclient.data.l[4] = 0;
|
||||
if (!XSendEvent(_dpy, DefaultRootWindow(_dpy), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev))
|
||||
{
|
||||
nlwarning("3D: Failed to toggle to fullscreen");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Atom _NET_WM_STATE = XInternAtom(_dpy, "_NET_WM_STATE", False);
|
||||
|
||||
if (windowStyle == EWSFullscreen)
|
||||
{
|
||||
Atom _NET_WM_STATE_FULLSCREEN = XInternAtom(_dpy, "_NET_WM_STATE_FULLSCREEN", False);
|
||||
|
||||
// set state property to fullscreen
|
||||
XChangeProperty(_dpy, _win, _NET_WM_STATE, XA_ATOM, 32, PropModeReplace, (const unsigned char*)&_NET_WM_STATE_FULLSCREEN, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// delete state property
|
||||
XDeleteProperty(_dpy, _win, _NET_WM_STATE);
|
||||
}
|
||||
}
|
||||
|
||||
// show window (hack to avoid black window bug)
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#include "nel/3d/vertex_buffer.h"
|
||||
#include "nel/3d/index_buffer.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
# define NOMINMAX
|
||||
|
@ -75,6 +78,10 @@ IDriver *CDRU::createGlDriver() throw (EDru)
|
|||
// hInst=LoadLibrary(NL3D_GL_DLL_NAME);
|
||||
CLibrary driverLib;
|
||||
|
||||
#if defined(NL_OS_UNIX) && defined(NL_DRIVER_PREFIX)
|
||||
driverLib.addLibPath(NL_DRIVER_PREFIX);
|
||||
#endif
|
||||
|
||||
// if (!hInst)
|
||||
if (!driverLib.loadLibrary(NL3D_GL_DLL_NAME, true, true, false))
|
||||
{
|
||||
|
|
|
@ -1671,14 +1671,19 @@ void CPatch::getCurrentTileTLIColors(uint ts, uint tt, NLMISC::CRGBA corners[4]
|
|||
CRGBA tbMiddle;
|
||||
// left.
|
||||
tbEdges[0].avg2RGBOnly(tbCorners[0], tbCorners[2]);
|
||||
tbEdges[0].A = 255;
|
||||
// bottom
|
||||
tbEdges[1].avg2RGBOnly(tbCorners[2], tbCorners[3]);
|
||||
tbEdges[1].A = 255;
|
||||
// right
|
||||
tbEdges[2].avg2RGBOnly(tbCorners[1], tbCorners[3]);
|
||||
tbEdges[2].A = 255;
|
||||
// up
|
||||
tbEdges[3].avg2RGBOnly(tbCorners[0], tbCorners[1]);
|
||||
tbEdges[3].A = 255;
|
||||
// middle.
|
||||
tbMiddle.avg2RGBOnly(tbEdges[0], tbEdges[2]);
|
||||
tbMiddle.A = 255;
|
||||
|
||||
// just copy result according to tile pos in tessBlock.
|
||||
if(tlt==0)
|
||||
|
|
|
@ -106,8 +106,8 @@ void CPatchUVLocator::build(const CPatch *patchCenter, sint edgeCenter, CPatch::
|
|||
// Find the position.
|
||||
//=============================
|
||||
// Find the uv coord at start of the edge, for 2 patchs.
|
||||
CVector2f uvCenter;
|
||||
CVector2f uvNeighbor;
|
||||
CVector2f uvCenter(0.f, 0.f);
|
||||
CVector2f uvNeighbor(0.f, 0.f);
|
||||
float decal;
|
||||
|
||||
// find the uv at start of edgeCenter, + decal due to bind 1/X.
|
||||
|
|
|
@ -1121,6 +1121,8 @@ void CVegetableManager::addInstance(CVegetableInstanceGroup *ig,
|
|||
CVegetableLightEx &vegetLex= ig->VegetableLightEx;
|
||||
// Color of pointLights modulated by diffuse.
|
||||
CRGBA diffusePL[2];
|
||||
diffusePL[0] = CRGBA::Black;
|
||||
diffusePL[1] = CRGBA::Black;
|
||||
if(vegetLex.NumLights>=1)
|
||||
{
|
||||
diffusePL[0].modulateFromColorRGBOnly(diffuseRGBA, vegetLex.Color[0]);
|
||||
|
@ -2491,6 +2493,8 @@ uint CVegetableManager::updateInstanceLighting(CVegetableInstanceGroup *ig, uin
|
|||
CVegetableLightEx &vegetLex= ig->VegetableLightEx;
|
||||
// Color of pointLights modulated by diffuse.
|
||||
CRGBA diffusePL[2];
|
||||
diffusePL[0] = CRGBA::Black;
|
||||
diffusePL[1] = CRGBA::Black;
|
||||
if(vegetLex.NumLights>=1)
|
||||
{
|
||||
diffusePL[0].modulateFromColorRGBOnly(vegetLI.MatDiffuse, vegetLex.Color[0]);
|
||||
|
|
|
@ -1732,8 +1732,8 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshGeom &mes
|
|||
CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2]));
|
||||
|
||||
// UV
|
||||
float u[3];
|
||||
float v[3];
|
||||
float u[3] = { 0.f };
|
||||
float v[3] = { 0.f };
|
||||
for (uint i=0; i<3; i++)
|
||||
{
|
||||
// Get UV coordinates
|
||||
|
@ -1764,8 +1764,8 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshGeom &mes
|
|||
CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2]));
|
||||
|
||||
// UV
|
||||
float u[3];
|
||||
float v[3];
|
||||
float u[3] = { 0.f };
|
||||
float v[3] = { 0.f };
|
||||
for (uint i=0; i<3; i++)
|
||||
{
|
||||
// Get UV coordinates
|
||||
|
@ -1898,8 +1898,8 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshMRMGeom &
|
|||
CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2]));
|
||||
|
||||
// UV
|
||||
float u[3];
|
||||
float v[3];
|
||||
float u[3] = { 0.f };
|
||||
float v[3] = { 0.f };
|
||||
for (uint i=0; i<3; i++)
|
||||
{
|
||||
// Get UV coordinates
|
||||
|
|
|
@ -7,8 +7,10 @@ SOURCE_GROUP(headers FILES ${PRIV_H} ${PUB_H})
|
|||
NL_TARGET_LIB(nelgeorges ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nelgeorges nelmisc)
|
||||
NL_DEFAULT_PROPS(nelgeorges "NeL, Library: Georges")
|
||||
|
||||
TARGET_LINK_LIBRARIES(nelgeorges ${LIBXML2_LIBRARIES} nelmisc)
|
||||
SET_TARGET_PROPERTIES(nelgeorges PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
NL_DEFAULT_PROPS(nelgeorges "NeL, Library: NeL Georges")
|
||||
|
||||
NL_ADD_LIB_SUFFIX(nelgeorges)
|
||||
|
||||
|
|
|
@ -3,12 +3,18 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
NL_TARGET_LIB(nelligo ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(nelligo ${LIBXML2_LIBRARIES} nelmisc)
|
||||
NL_DEFAULT_PROPS(nelligo "NeL, Library: Ligo")
|
||||
SET_TARGET_PROPERTIES(nelligo PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
NL_DEFAULT_PROPS(nelligo "NeL, Library: NeL Ligo")
|
||||
|
||||
NL_ADD_LIB_SUFFIX(nelligo)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelligo ${CMAKE_CURRENT_SOURCE_DIR}/stdligo.h ${CMAKE_CURRENT_SOURCE_DIR}/stdligo.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
NL_GEN_PC(nel-ligo.pc)
|
||||
INSTALL(TARGETS nelligo LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
#include "nel/ligo/ligo_config.h"
|
||||
|
||||
#include "nel/ligo/primitive.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
#include "ligo_error.h"
|
||||
|
||||
namespace NLLIGO
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
#include "ligo_material.h"
|
||||
|
||||
// Ligo include
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/ligo/primitive.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
#include "nel/ligo/primitive_class.h"
|
||||
#include "nel/ligo/primitive.h"
|
||||
#include "nel/ligo/ligo_config.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
#include "nel/ligo/primitive_configuration.h"
|
||||
#include "nel/ligo/ligo_config.h"
|
||||
#include "nel/ligo/primitive.h"
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "stdligo.h"
|
||||
#include "nel/ligo/primitive_utils.h"
|
||||
|
||||
|
||||
|
|
24
code/nel/src/ligo/stdligo.cpp
Normal file
24
code/nel/src/ligo/stdligo.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
|
||||
|
||||
// leave not static else this workaround don't work
|
||||
void dummyToAvoidStupidCompilerWarning_std_ligo_cpp()
|
||||
{
|
||||
}
|
||||
|
63
code/nel/src/ligo/stdligo.h
Normal file
63
code/nel/src/ligo/stdligo.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <csignal>
|
||||
#include <cstdarg>
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <deque>
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <typeinfo>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <cstdlib>
|
||||
|
||||
// Include from libxml2
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#include "nel/misc/debug.h"
|
||||
#include "nel/misc/common.h"
|
||||
#include "nel/misc/fast_mem.h"
|
||||
#include "nel/misc/system_info.h"
|
||||
#include "nel/misc/mem_displayer.h"
|
||||
#include "nel/misc/matrix.h"
|
||||
#include "nel/misc/stream.h"
|
||||
#include "nel/misc/path.h"
|
||||
#include "nel/misc/string_common.h"
|
||||
#include "nel/misc/config_file.h"
|
||||
#include "nel/misc/i_xml.h"
|
||||
#include "nel/misc/o_xml.h"
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/vector.h"
|
||||
#include "nel/misc/rgba.h"
|
||||
#include "nel/misc/file.h"
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
#include "transition.h"
|
||||
|
||||
// Ligo include
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "stdligo.h"
|
||||
|
||||
#include "zone_bank.h"
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
// Ligo include
|
||||
#include "zone_edge.h"
|
||||
#include "nel/ligo/ligo_config.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
#include "zone_region.h"
|
||||
|
||||
using namespace NLMISC;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdligo.h"
|
||||
#include "zone_template.h"
|
||||
#include "ligo_error.h"
|
||||
#include "nel/ligo/ligo_config.h"
|
||||
|
|
|
@ -3,8 +3,10 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
NL_TARGET_LIB(nellogic ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(nellogic ${LIBXML2_LIBRARIES} nelmisc nelnet)
|
||||
NL_DEFAULT_PROPS(nellogic "NeL, Library: Logic")
|
||||
SET_TARGET_PROPERTIES(nellogic PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
NL_DEFAULT_PROPS(nellogic "NeL, Library: NeL Logic")
|
||||
|
||||
NL_ADD_LIB_SUFFIX(nellogic)
|
||||
|
||||
|
|
|
@ -22,8 +22,10 @@ IF(WIN32)
|
|||
ENDIF(WIN32)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nelmisc ${LIBXML2_LIBRARIES} ${PNG_LIBRARIES} ${WINSOCK2_LIB})
|
||||
NL_DEFAULT_PROPS(nelmisc "NeL, Library: Misc")
|
||||
SET_TARGET_PROPERTIES(nelmisc PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
NL_DEFAULT_PROPS(nelmisc "NeL, Library: NeL Misc")
|
||||
|
||||
NL_ADD_LIB_SUFFIX(nelmisc)
|
||||
|
||||
|
|
|
@ -67,9 +67,6 @@ void *nlGetSymbolAddress(NL_LIB_HANDLE libHandle, const std::string &procName)
|
|||
#ifdef NL_OS_WINDOWS
|
||||
const string nlLibPrefix; // empty
|
||||
const string nlLibExt(".dll");
|
||||
#elif defined(NL_OS_MAC)
|
||||
const string nlLibPrefix("lib");
|
||||
const string nlLibExt(".dylib");
|
||||
#elif defined(NL_OS_UNIX)
|
||||
const string nlLibPrefix("lib");
|
||||
const string nlLibExt(".so");
|
||||
|
|
|
@ -305,6 +305,8 @@ bool CWinEventEmitter::processMessage (HWND hWnd, uint32 msg, WPARAM wParam, LPA
|
|||
case WM_INPUTLANGCHANGE:
|
||||
if ( _IMEEventsEnabled )
|
||||
{
|
||||
// wParam = Specifies the character set of the new locale.
|
||||
// lParam = Input locale identifier.
|
||||
server->postEvent( new CEventIME( msg, (uint32)wParam, (uint32)lParam, this ) );
|
||||
return true; // trap message
|
||||
}
|
||||
|
|
|
@ -11,15 +11,12 @@ IF(WITH_GTK)
|
|||
ENDIF(GTK2_FOUND)
|
||||
ENDIF(WITH_GTK)
|
||||
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nelnet ${LIBXML2_LIBRARIES} nelmisc)
|
||||
TARGET_LINK_LIBRARIES(nelnet nelmisc)
|
||||
SET_TARGET_PROPERTIES(nelnet PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
NL_DEFAULT_PROPS(nelnet "NeL, Library: Net")
|
||||
|
||||
NL_ADD_LIB_SUFFIX(nelnet)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelnet ${CMAKE_CURRENT_SOURCE_DIR}/stdnet.h ${CMAKE_CURRENT_SOURCE_DIR}/stdnet.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#ifdef NL_OS_WINDOWS
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
// for Windows 2000 compatibility
|
||||
# include <wspiapi.h>
|
||||
#elif defined NL_OS_UNIX
|
||||
# include <unistd.h>
|
||||
# include <sys/socket.h>
|
||||
|
@ -40,6 +42,9 @@
|
|||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
||||
#ifndef NI_MAXHOST
|
||||
# define NI_MAXHOST 1025
|
||||
#endif
|
||||
|
||||
namespace NLNET
|
||||
{
|
||||
|
@ -74,20 +79,32 @@ CInetAddress::CInetAddress( const in_addr *ip, const char *hostname )
|
|||
}
|
||||
else
|
||||
{
|
||||
hostent *phostent = gethostbyaddr( (char*)&ip->s_addr, 4, AF_INET );
|
||||
if ( phostent == NULL )
|
||||
{
|
||||
_HostName = ipAddress();
|
||||
}
|
||||
else
|
||||
{
|
||||
_HostName = string( phostent->h_name );
|
||||
}
|
||||
updateHostName();
|
||||
}
|
||||
_Valid = true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Update _HostName from _SockAddr current value
|
||||
*/
|
||||
void CInetAddress::updateHostName()
|
||||
{
|
||||
char host[NI_MAXHOST];
|
||||
|
||||
sint status = getnameinfo((struct sockaddr *) _SockAddr, sizeof (struct sockaddr), host, NI_MAXHOST, NULL, 0, NI_NUMERICSERV);
|
||||
|
||||
if ( status )
|
||||
{
|
||||
_HostName = ipAddress();
|
||||
}
|
||||
else
|
||||
{
|
||||
_HostName = string( host );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Alternate constructor (calls setByName())
|
||||
*/
|
||||
|
@ -148,16 +165,6 @@ bool operator==( const CInetAddress& a1, const CInetAddress& a2 )
|
|||
*/
|
||||
bool operator<( const CInetAddress& a1, const CInetAddress& a2 )
|
||||
{
|
||||
#ifdef NL_OS_WINDOWS
|
||||
if ( a1._SockAddr->sin_addr.S_un.S_addr == a2._SockAddr->sin_addr.S_un.S_addr )
|
||||
{
|
||||
return ( a1.port() < a2.port() );
|
||||
}
|
||||
else
|
||||
{
|
||||
return ( a1._SockAddr->sin_addr.S_un.S_addr < a2._SockAddr->sin_addr.S_un.S_addr );
|
||||
}
|
||||
#elif defined NL_OS_UNIX
|
||||
if ( a1._SockAddr->sin_addr.s_addr == a2._SockAddr->sin_addr.s_addr )
|
||||
{
|
||||
return ( a1.port() < a2.port() );
|
||||
|
@ -166,7 +173,6 @@ bool operator<( const CInetAddress& a1, const CInetAddress& a2 )
|
|||
{
|
||||
return ( a1._SockAddr->sin_addr.s_addr < a2._SockAddr->sin_addr.s_addr );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -223,26 +229,59 @@ CInetAddress& CInetAddress::setByName( const std::string& hostName )
|
|||
{
|
||||
// Try to convert directly for addresses such as a.b.c.d
|
||||
in_addr iaddr;
|
||||
#ifdef NL_OS_WINDOWS
|
||||
iaddr.S_un.S_addr = inet_addr( hostName.c_str() );
|
||||
if ( iaddr.S_un.S_addr == INADDR_NONE )
|
||||
#elif defined NL_OS_UNIX
|
||||
iaddr.s_addr = inet_addr( hostName.c_str() );
|
||||
if ( iaddr.s_addr == INADDR_NONE )
|
||||
#endif
|
||||
{
|
||||
|
||||
// Otherwise use the traditional DNS look-up
|
||||
hostent *phostent = gethostbyname( hostName.c_str() );
|
||||
if ( phostent == NULL )
|
||||
struct addrinfo hints;
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC; // AF_INET or AF_INET6 to force version
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
struct addrinfo *res = NULL;
|
||||
sint status = getaddrinfo(hostName.c_str(), NULL, &hints, &res);
|
||||
|
||||
if (status)
|
||||
{
|
||||
_Valid = false;
|
||||
LNETL0_DEBUG( "LNETL0: Network error: resolution of hostname '%s' failed", hostName.c_str() );
|
||||
LNETL0_DEBUG( "LNETL0: Network error: resolution of hostname '%s' failed: %s", hostName.c_str(), gai_strerror(status) );
|
||||
// return *this;
|
||||
throw ESocket( (string("Hostname resolution failed for ")+hostName).c_str() );
|
||||
}
|
||||
_HostName = string( phostent->h_name );
|
||||
memcpy( &_SockAddr->sin_addr, phostent->h_addr, sizeof(in_addr) );
|
||||
|
||||
struct addrinfo *p = res;
|
||||
|
||||
// process all addresses
|
||||
while (p != NULL)
|
||||
{
|
||||
// check address family
|
||||
if (p->ai_family == AF_INET)
|
||||
{
|
||||
// ipv4
|
||||
struct sockaddr_in *ipv4 = (struct sockaddr_in *)p->ai_addr;
|
||||
|
||||
// convert the IP to a string
|
||||
_HostName = string(inet_ntoa(ipv4->sin_addr));
|
||||
memcpy( &_SockAddr->sin_addr, &ipv4->sin_addr, sizeof(in_addr) );
|
||||
}
|
||||
else if (p->ai_family == AF_INET6)
|
||||
{
|
||||
// ipv6
|
||||
// TODO: modify class to be able to handle IPv6
|
||||
|
||||
// struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)p->ai_addr;
|
||||
|
||||
// convert the IP to a string
|
||||
// inet_ntop(p->ai_family, addr, ipstr, sizeof(ipstr));
|
||||
// memcpy( &_SockAddr->sin_addr, &ipv6->sin_addr, sizeof(in_addr) );
|
||||
}
|
||||
|
||||
// process next address
|
||||
p = p->ai_next;
|
||||
}
|
||||
|
||||
// free the linked list
|
||||
freeaddrinfo(res);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -275,15 +314,7 @@ void CInetAddress::setSockAddr( const sockaddr_in* saddr )
|
|||
// Warning: when it can't find it, it take more than 4 seconds
|
||||
if ( CInetAddress::RetrieveNames )
|
||||
{
|
||||
hostent *phostent = gethostbyaddr( (char*)&saddr->sin_addr.s_addr, 4, AF_INET );
|
||||
if ( phostent == NULL )
|
||||
{
|
||||
_HostName = ipAddress();
|
||||
}
|
||||
else
|
||||
{
|
||||
_HostName = string( phostent->h_name );
|
||||
}
|
||||
updateHostName();
|
||||
}
|
||||
_Valid = true;
|
||||
}
|
||||
|
@ -476,20 +507,52 @@ std::vector<CInetAddress> CInetAddress::localAddresses()
|
|||
// 2. Get address list
|
||||
vector<CInetAddress> vect;
|
||||
|
||||
uint i = 0;
|
||||
for(;;)
|
||||
struct addrinfo hints;
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC; // AF_INET or AF_INET6 to force version
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
struct addrinfo *res = NULL;
|
||||
sint status = getaddrinfo(localhost, NULL, &hints, &res);
|
||||
|
||||
if (status)
|
||||
{
|
||||
hostent *phostent = gethostbyname( localhost );
|
||||
if ( phostent == NULL ) // will come here if the local hostname (/etc/hostname in Linux) is not the real name
|
||||
throw ESocket( (string("Hostname resolution failed for ")+string(localhost)).c_str() );
|
||||
|
||||
if (phostent->h_addr_list[i] == 0)
|
||||
break;
|
||||
|
||||
vect.push_back( CInetAddress( (const in_addr*)(phostent->h_addr_list[i]), localhost ) );
|
||||
i++;
|
||||
// will come here if the local hostname (/etc/hostname in Linux) is not the real name
|
||||
throw ESocket( (string("Hostname resolution failed for ")+string(localhost)).c_str() );
|
||||
}
|
||||
|
||||
struct addrinfo *p = res;
|
||||
|
||||
// process all addresses
|
||||
while (p != NULL)
|
||||
{
|
||||
// check address family
|
||||
if (p->ai_family == AF_INET)
|
||||
{
|
||||
// ipv4
|
||||
struct sockaddr_in *ipv4 = (struct sockaddr_in *)p->ai_addr;
|
||||
|
||||
vect.push_back( CInetAddress( &ipv4->sin_addr, localhost ) );
|
||||
}
|
||||
else if (p->ai_family == AF_INET6)
|
||||
{
|
||||
// ipv6
|
||||
// TODO: modify class to be able to handle IPv6
|
||||
|
||||
// struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)p->ai_addr;
|
||||
|
||||
// convert the IP to a string
|
||||
// inet_ntop(p->ai_family, addr, ipstr, sizeof(ipstr));
|
||||
// memcpy( &_SockAddr->sin_addr, &ipv6->sin_addr, sizeof(in_addr) );
|
||||
}
|
||||
|
||||
// process next address
|
||||
p = p->ai_next;
|
||||
}
|
||||
|
||||
// free the linked list
|
||||
freeaddrinfo(res);
|
||||
|
||||
if(vect.empty())
|
||||
{
|
||||
throw ESocket( (string("No network card detected for ")+string(localhost)).c_str() );
|
||||
|
|
|
@ -3,12 +3,15 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
NL_TARGET_LIB(nelpacs ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nelpacs ${LIBXML2_LIBRARIES} nelmisc)
|
||||
NL_DEFAULT_PROPS(nelpacs "NeL, Library: PACS")
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(nelpacs nelmisc)
|
||||
SET_TARGET_PROPERTIES(nelpacs PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
NL_DEFAULT_PROPS(nelpacs "NeL, Library: NeL PACS")
|
||||
|
||||
NL_ADD_LIB_SUFFIX(nelpacs)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelpacs ${CMAKE_CURRENT_SOURCE_DIR}/stdpacs.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpacs.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
|
|
@ -3,13 +3,15 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
NL_TARGET_LIB(nelsound ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nelsound ${LIBXML2_LIBRARIES} nelmisc nelligo nelgeorges nel3d nelsnd_lowlevel)
|
||||
NL_DEFAULT_PROPS(nelsound "NeL, Library: Sound")
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
TARGET_LINK_LIBRARIES(nelsound ${LIBXML2_LIBRARIES} nelmisc nelligo nelgeorges nel3d nelsnd_lowlevel)
|
||||
SET_TARGET_PROPERTIES(nelsound PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
NL_DEFAULT_PROPS(nelsound "NeL, Library: NeL Sound")
|
||||
|
||||
NL_ADD_LIB_SUFFIX(nelsound)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelsound ${CMAKE_CURRENT_SOURCE_DIR}/stdsound.h ${CMAKE_CURRENT_SOURCE_DIR}/stdsound.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
|
|
@ -493,6 +493,9 @@ void CClusteredSound::soundTraverse(const std::vector<CCluster *> &clusters, CSo
|
|||
CSoundTravContext &travContext = curClusters.back().second;
|
||||
|
||||
CClusterSoundStatus css;
|
||||
css.DistFactor = 0.0f;
|
||||
css.Position = CVector::Null;
|
||||
css.PosAlpha = 0.0f;
|
||||
css.Gain = travContext.Gain;
|
||||
css.Dist = travContext.Dist;
|
||||
css.Direction = travContext.Direction;
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
nl_target_lib(nelsnd_lowlevel ${SRC})
|
||||
NL_TARGET_LIB(nelsnd_lowlevel ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(nelsnd_lowlevel nelmisc ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY} ${OGG_LIBRARY})
|
||||
nl_default_props(nelsnd_lowlevel "NeL, Library: Sound Lowlevel")
|
||||
SET_TARGET_PROPERTIES(nelsnd_lowlevel PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
NL_DEFAULT_PROPS(nelsnd_lowlevel "NeL, Library: Sound Lowlevel")
|
||||
NL_ADD_STATIC_VID_DRIVERS(nelsnd_lowlevel)
|
||||
nl_add_lib_suffix(nelsnd_lowlevel)
|
||||
|
||||
NL_ADD_LIB_SUFFIX(nelsnd_lowlevel)
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelsnd_lowlevel ${CMAKE_CURRENT_SOURCE_DIR}/stdsound_lowlevel.h ${CMAKE_CURRENT_SOURCE_DIR}/stdsound_lowlevel.cpp)
|
||||
|
|
|
@ -2,20 +2,18 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
|
||||
NL_TARGET_DRIVER(nel_drv_dsound ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${DXSDK_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_dsound ${LIBXML2_LIBRARIES} nelsnd_lowlevel ${DXSDK_DSOUND_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
||||
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_dsound nelmisc nelsnd_lowlevel ${DXSDK_DSOUND_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
||||
|
||||
NL_DEFAULT_PROPS(nel_drv_dsound "NeL, Driver, Sound: DirectSound")
|
||||
NL_ADD_LIB_SUFFIX(nel_drv_dsound)
|
||||
NL_ADD_RUNTIME_FLAGS(nel_drv_dsound)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_dsound ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.h ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
INSTALL(TARGETS nel_drv_dsound RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||
INSTALL(TARGETS nel_drv_dsound RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||
IF(WITH_MAXPLUGIN)
|
||||
INSTALL(TARGETS nel_drv_dsound RUNTIME DESTINATION maxplugin COMPONENT driverssound)
|
||||
ENDIF(WITH_MAXPLUGIN)
|
||||
|
|
|
@ -2,20 +2,18 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
|
||||
NL_TARGET_DRIVER(nel_drv_fmod ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FMOD_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_fmod ${LIBXML2_LIBRARIES} ${FMOD_LIBRARY} nelsnd_lowlevel)
|
||||
INCLUDE_DIRECTORIES(${FMOD_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_fmod ${FMOD_LIBRARY} nelmisc nelsnd_lowlevel)
|
||||
|
||||
NL_DEFAULT_PROPS(nel_drv_fmod "NeL, Driver, Sound: FMOD")
|
||||
NL_ADD_LIB_SUFFIX(nel_drv_fmod)
|
||||
NL_ADD_RUNTIME_FLAGS(nel_drv_fmod)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_fmod ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.h ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
INSTALL(TARGETS nel_drv_fmod RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||
INSTALL(TARGETS nel_drv_fmod RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||
IF(WITH_MAXPLUGIN)
|
||||
INSTALL(TARGETS nel_drv_fmod RUNTIME DESTINATION maxplugin COMPONENT driverssound)
|
||||
ENDIF(WITH_MAXPLUGIN)
|
||||
|
|
|
@ -37,7 +37,7 @@ IF(WITH_PCH)
|
|||
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_openal ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
INSTALL(TARGETS nel_drv_openal RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||
INSTALL(TARGETS nel_drv_openal RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||
IF(WITH_MAXPLUGIN)
|
||||
INSTALL(TARGETS nel_drv_openal RUNTIME DESTINATION maxplugin COMPONENT driverssound)
|
||||
ENDIF(WITH_MAXPLUGIN)
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
|
||||
#include "nel/sound/driver/sound_driver.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
# define NOMINMAX
|
||||
# include <windows.h>
|
||||
|
@ -201,6 +205,11 @@ ISoundDriver *ISoundDriver::createDriver(IStringMapperProvider *stringMapper, TD
|
|||
}
|
||||
|
||||
CLibrary driverLib;
|
||||
|
||||
#if defined(NL_OS_UNIX) && defined(NL_DRIVER_PREFIX)
|
||||
driverLib.addLibPath(NL_DRIVER_PREFIX);
|
||||
#endif
|
||||
|
||||
// Load it (adding standard nel pre/suffix, looking in library path and not taking ownership)
|
||||
if (!driverLib.loadLibrary(dllName, true, true, false))
|
||||
{
|
||||
|
|
|
@ -28,20 +28,18 @@ SOURCE_GROUP(efx FILES
|
|||
|
||||
NL_TARGET_DRIVER(nel_drv_xaudio2 ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${DXSDK_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_xaudio2 ${LIBXML2_LIBRARIES} nelsnd_lowlevel ${DXSDK_XAUDIO_LIBRARY} ${DXSDK_GUID_LIBRARY} ${VORBIS_LIBRARIES} ${OGG_LIBRARY})
|
||||
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_xaudio2 nelmisc nelsnd_lowlevel ${DXSDK_XAUDIO_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
||||
|
||||
NL_DEFAULT_PROPS(nel_drv_xaudio2 "NeL, Driver, Sound: XAudio2")
|
||||
NL_ADD_LIB_SUFFIX(nel_drv_xaudio2)
|
||||
NL_ADD_RUNTIME_FLAGS(nel_drv_xaudio2)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_xaudio2 ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.h ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
INSTALL(TARGETS nel_drv_xaudio2 RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||
INSTALL(TARGETS nel_drv_xaudio2 RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||
IF(WITH_MAXPLUGIN)
|
||||
INSTALL(TARGETS nel_drv_xaudio2 RUNTIME DESTINATION maxplugin COMPONENT driverssound)
|
||||
ENDIF(WITH_MAXPLUGIN)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
SUBDIRS( build_coarse_mesh
|
||||
SUBDIRS(
|
||||
build_coarse_mesh
|
||||
build_far_bank
|
||||
build_smallbank
|
||||
ig_lighter
|
||||
|
@ -22,29 +23,35 @@ SUBDIRS( build_coarse_mesh
|
|||
zone_check_bind
|
||||
zone_dump
|
||||
zviewer)
|
||||
IF(WIN32)
|
||||
ADD_SUBDIRECTORY(object_viewer)
|
||||
ADD_SUBDIRECTORY(object_viewer_exe)
|
||||
ADD_SUBDIRECTORY(panoply_maker)
|
||||
ADD_SUBDIRECTORY(tile_edit)
|
||||
|
||||
IF(WIN32)
|
||||
ADD_SUBDIRECTORY(ig_elevation)
|
||||
ADD_SUBDIRECTORY(lightmap_optimizer)
|
||||
|
||||
IF(MFC_FOUND)
|
||||
ADD_SUBDIRECTORY(object_viewer)
|
||||
ADD_SUBDIRECTORY(object_viewer_exe)
|
||||
ADD_SUBDIRECTORY(tile_edit)
|
||||
ENDIF(MFC_FOUND)
|
||||
|
||||
IF(WITH_MAXPLUGIN)
|
||||
IF(MAXSDK_FOUND)
|
||||
ADD_SUBDIRECTORY(plugin_max)
|
||||
ADD_SUBDIRECTORY(ligo)
|
||||
ENDIF(MAXSDK_FOUND)
|
||||
ENDIF(WITH_MAXPLUGIN)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(WITH_QT)
|
||||
ADD_SUBDIRECTORY(tile_edit_qt)
|
||||
ENDIF(WITH_QT)
|
||||
|
||||
IF(WITH_MAXPLUGIN)
|
||||
IF(MAXSDK_FOUND)
|
||||
ADD_SUBDIRECTORY(plugin_max)
|
||||
ADD_SUBDIRECTORY(ligo)
|
||||
ENDIF(MAXSDK_FOUND)
|
||||
ENDIF(WITH_MAXPLUGIN)
|
||||
IF(SQUISH_FOUND)
|
||||
ADD_SUBDIRECTORY(panoply_maker)
|
||||
ADD_SUBDIRECTORY(tga_2_dds)
|
||||
ADD_SUBDIRECTORY(hls_bank_maker)
|
||||
ENDIF(SQUISH_FOUND)
|
||||
|
||||
# These use WIndows-specific things that need to be fixed.
|
||||
#ig_elevation
|
||||
#lightmap_optimizer
|
||||
#object_viewer_exe
|
||||
#hls_bank_maker
|
||||
#s3tc_compressor_lib
|
||||
#tga_2_dds
|
||||
#plugin_max
|
||||
#crash_log_analyser
|
||||
#shapes_exporter
|
||||
|
|
|
@ -366,9 +366,20 @@ int main(int nNbArg, char **ppArgs)
|
|||
fmtName += ".tga";
|
||||
if (outTga.open(fmtName))
|
||||
{
|
||||
GlobalTexture.writeTGA (outTga, 32);
|
||||
std::string ext;
|
||||
if (toLower(fmtName).find(".png") != string::npos)
|
||||
{
|
||||
ext = "png";
|
||||
GlobalTexture.writePNG (outTga, 32);
|
||||
}
|
||||
else
|
||||
{
|
||||
ext = "tga";
|
||||
GlobalTexture.writeTGA (outTga, 32);
|
||||
}
|
||||
|
||||
outTga.close();
|
||||
outString (string("Writing tga file : ") + fmtName + "\n");
|
||||
outString (toString("Writing %s file : %s\n", ext.c_str(), fmtName.c_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
11
code/nel/tools/3d/hls_bank_maker/CMakeLists.txt
Normal file
11
code/nel/tools/3d/hls_bank_maker/CMakeLists.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
FILE(GLOB SRC *.cpp *.h ../panoply_maker/hls_bank_texture_info.cpp ../panoply_maker/hls_bank_texture_info.h ../s3tc_compressor_lib/*.cpp ../s3tc_compressor_lib/*.h)
|
||||
|
||||
ADD_EXECUTABLE(hls_bank_maker ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${SQUISH_INCLUDE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(hls_bank_maker ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARY} nelmisc nel3d)
|
||||
NL_DEFAULT_PROPS(hls_bank_maker "Tools, 3D: hls_bank_maker")
|
||||
NL_ADD_RUNTIME_FLAGS(hls_bank_maker)
|
||||
|
||||
INSTALL(TARGETS hls_bank_maker RUNTIME DESTINATION bin COMPONENT tools3d)
|
|
@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
|
||||
ADD_EXECUTABLE(ig_add ${SRC})
|
||||
|
||||
TARGET_LINK_LIBRARIES(ig_add ${PLATFORM_LINKFLAGS} nel3d)
|
||||
TARGET_LINK_LIBRARIES(ig_add ${PLATFORM_LINKFLAGS} nel3d nelmisc)
|
||||
NL_DEFAULT_PROPS(ig_add "NeL, Tools, 3D: ig_add")
|
||||
NL_ADD_RUNTIME_FLAGS(ig_add)
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
DECORATE_NEL_LIB("nel3d")
|
||||
SET(NL3D_LIB ${LIBNAME})
|
||||
|
||||
ADD_EXECUTABLE(ig_elevation ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(ig_elevation ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} ${NL3D_LIB})
|
||||
|
||||
TARGET_LINK_LIBRARIES(ig_elevation ${PLATFORM_LINKFLAGS} nelmisc nel3d nelligo)
|
||||
NL_DEFAULT_PROPS(ig_elevation "Tools, 3D: ig_elevation")
|
||||
NL_ADD_RUNTIME_FLAGS(ig_elevation)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS ig_elevation RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d)
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
DECORATE_NEL_LIB("nelmisc")
|
||||
SET(NLMISC_LIB ${LIBNAME})
|
||||
|
||||
ADD_EXECUTABLE(lightmap_optimizer ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(lightmap_optimizer ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} ${NLMISC_LIB})
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
TARGET_LINK_LIBRARIES(lightmap_optimizer ${PLATFORM_LINKFLAGS} nel3d nelmisc)
|
||||
NL_DEFAULT_PROPS(lightmap_optimizer "Tools, 3D: lightmap_optimizer")
|
||||
NL_ADD_RUNTIME_FLAGS(lightmap_optimizer)
|
||||
|
||||
INSTALL(TARGETS lightmap_optimizer RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d)
|
||||
|
|
|
@ -3,8 +3,8 @@ FILE(GLOB SRC *.cpp *.h ../../ig_lighter_lib/*.cpp ../../ig_lighter_lib/*.h)
|
|||
ADD_LIBRARY(ligoscape_utility SHARED ligoscape_utility.rc ${SRC} ligoscape_utility.def)
|
||||
|
||||
INCLUDE_DIRECTORIES(${MAXSDK_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(ligoscape_utility
|
||||
${LIBXML2_LIBRARIES}
|
||||
nelmisc
|
||||
nelligo
|
||||
nel3d
|
||||
|
@ -15,15 +15,11 @@ TARGET_LINK_LIBRARIES(ligoscape_utility
|
|||
nel_3dsmax_shared
|
||||
comctl32)
|
||||
|
||||
SET_TARGET_PROPERTIES(ligoscape_utility PROPERTIES
|
||||
VERSION ${NL_VERSION}
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
SUFFIX ".dlx"
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r"
|
||||
PROJECT_LABEL "MAX Plugin: Ligoscape Utility")
|
||||
|
||||
SET_TARGET_PROPERTIES(ligoscape_utility PROPERTIES SUFFIX ".dlx")
|
||||
NL_DEFAULT_PROPS(ligoscape_utility "MAX Plugin: Ligoscape Utility")
|
||||
NL_ADD_RUNTIME_FLAGS(ligoscape_utility)
|
||||
NL_ADD_LIB_SUFFIX(ligoscape_utility)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
INSTALL(TARGETS ligoscape_utility RUNTIME DESTINATION maxplugin/plugins LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#ifndef __PLUGIN_MAX__H
|
||||
#define __PLUGIN_MAX__H
|
||||
|
||||
#include <assert.h>
|
||||
#include "Max.h"
|
||||
#include <Max.h>
|
||||
#include <istdplug.h>
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
// From MAXSDK
|
||||
#include <MaxScrpt/maxscrpt.h>
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
#define EXPORT_GET_ALLOCATOR
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
// Various MAX and MXS includes
|
||||
#include <MaxScrpt/MAXScrpt.h>
|
||||
#include <MaxScrpt/3dmath.h>
|
||||
|
|
|
@ -10,21 +10,17 @@ SET(CMAKE_MFC_FLAG 2)
|
|||
ADD_LIBRARY(object_viewer_dll SHARED ${SRC} object_viewer.rc)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(object_viewer_dll
|
||||
${LIBXML2_LIBRARIES}
|
||||
nelmisc
|
||||
nel3d
|
||||
nelsound
|
||||
nelsnd_lowlevel
|
||||
Version.lib)
|
||||
|
||||
SET_TARGET_PROPERTIES(object_viewer_dll PROPERTIES
|
||||
VERSION ${NL_VERSION}
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r"
|
||||
PROJECT_LABEL "NeL, Tools, 3D: Object Viewer DLL")
|
||||
NL_DEFAULT_PROPS(object_viewer_dll "NeL, Tools, 3D: Object Viewer DLL")
|
||||
NL_ADD_RUNTIME_FLAGS(object_viewer_dll)
|
||||
NL_ADD_LIB_SUFFIX(object_viewer_dll)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DOBJECT_VIEWER_LIB_EXPORTS)
|
||||
|
||||
|
|
|
@ -5,21 +5,16 @@ ADD_DEFINITIONS(-D_AFXDLL)
|
|||
SET(CMAKE_MFC_FLAG 2)
|
||||
ADD_EXECUTABLE(object_viewer WIN32 ${SRC} object_viewer_exe.rc)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES( object_viewer
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PLATFORM_LINKFLAGS}
|
||||
nelmisc
|
||||
nel3d
|
||||
nelsound
|
||||
nelsnd_lowlevel
|
||||
object_viewer_dll)
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
SET_TARGET_PROPERTIES(object_viewer PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
PROJECT_LABEL "NeL, Tools, 3D: Object Viewer")
|
||||
NL_DEFAULT_PROPS(object_viewer "NeL, Tools, 3D: Object Viewer")
|
||||
NL_ADD_RUNTIME_FLAGS(object_viewer)
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(object_viewer ${CMAKE_CURRENT_SOURCE_DIR}/std_afx.h ${CMAKE_CURRENT_SOURCE_DIR}/std_afx.cpp)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
#include <windows.h>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
|
|
@ -26,27 +26,4 @@
|
|||
|
||||
#define NOMINMAX
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
|
||||
#ifndef _AFX_NO_OLE_SUPPORT
|
||||
#include <afxole.h> // MFC OLE classes
|
||||
#include <afxodlgs.h> // MFC OLE dialog classes
|
||||
#include <afxdisp.h> // MFC Automation classes
|
||||
#endif // _AFX_NO_OLE_SUPPORT
|
||||
|
||||
|
||||
#ifndef _AFX_NO_DB_SUPPORT
|
||||
#include <afxdb.h> // MFC ODBC database classes
|
||||
#endif // _AFX_NO_DB_SUPPORT
|
||||
|
||||
#ifndef _AFX_NO_DAO_SUPPORT
|
||||
#include <afxdao.h> // MFC DAO database classes
|
||||
#endif // _AFX_NO_DAO_SUPPORT
|
||||
|
||||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
#endif
|
||||
|
|
|
@ -2,16 +2,10 @@ FILE(GLOB SRC *.cpp *.h ../s3tc_compressor_lib/*.h ../s3tc_compressor_lib/*.cpp)
|
|||
|
||||
ADD_EXECUTABLE(panoply_maker ${SRC})
|
||||
|
||||
FIND_PACKAGE(Squish REQUIRED)
|
||||
INCLUDE_DIRECTORIES(${SQUISH_INCLUDE_DIR})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${SQUISH_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(panoply_maker ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARY} nelmisc nel3d)
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(panoply_maker PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
PROJECT_LABEL "NeL, Tools, 3D: panoply_maker")
|
||||
ENDIF(WIN32)
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
TARGET_LINK_LIBRARIES(panoply_maker ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARY} nelmisc nel3d)
|
||||
NL_DEFAULT_PROPS(panoply_maker "NeL, Tools, 3D: panoply_maker")
|
||||
NL_ADD_RUNTIME_FLAGS(panoply_maker)
|
||||
|
||||
INSTALL(TARGETS panoply_maker RUNTIME DESTINATION bin COMPONENT tools3d)
|
||||
INSTALL(TARGETS panoply_maker RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d)
|
||||
|
|
|
@ -2,9 +2,8 @@ FILE(GLOB SRC *.cpp *.h *.def)
|
|||
|
||||
ADD_LIBRARY(nel_3dsmax_shared SHARED ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MAXSDK_INCLUDE_DIR})
|
||||
INCLUDE_DIRECTORIES(${MAXSDK_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_3dsmax_shared
|
||||
${LIBXML2_LIBRARIES}
|
||||
nelmisc
|
||||
nel3d
|
||||
nel_mesh_lib
|
||||
|
@ -12,15 +11,12 @@ TARGET_LINK_LIBRARIES(nel_3dsmax_shared
|
|||
${MAXSDK_LIBRARIES}
|
||||
Version.lib)
|
||||
|
||||
SET_TARGET_PROPERTIES(nel_3dsmax_shared PROPERTIES
|
||||
VERSION ${NL_VERSION}
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r"
|
||||
PROJECT_LABEL "MAX Plugin: NeL 3DSMAX Shared")
|
||||
NL_DEFAULT_PROPS(nel_3dsmax_shared "MAX Plugin: NeL 3DSMAX Shared")
|
||||
NL_ADD_RUNTIME_FLAGS(nel_3dsmax_shared)
|
||||
NL_ADD_LIB_SUFFIX(nel_3dsmax_shared)
|
||||
SET_TARGET_PROPERTIES(nel_export PROPERTIES SUFFIX ".dlx")
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DNEL_3DSMAX_SHARED_EXPORTS)
|
||||
ADD_DEFINITIONS(-DNEL_3DSMAX_SHARED_EXPORTS)
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nel_3dsmax_shared ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp)
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
// Insert your headers here
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <assert.h>
|
||||
#include <max.h>
|
||||
#include <iparamb2.h>
|
||||
#include <istdplug.h>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "..\nel_patch_lib\rpo.h"
|
||||
#include "../nel_patch_lib/rpo.h"
|
||||
#include "nel_3dsmax_shared.h"
|
||||
#include "nel/misc/app_context.h"
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/last_lightmap.cpp
|
|||
ADD_LIBRARY(nel_export SHARED ${SRC} nel_export.rc)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MAXSDK_INCLUDE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(nel_export
|
||||
${LIBXML2_LIBRARIES}
|
||||
nelmisc
|
||||
nelpacs
|
||||
nel3d
|
||||
|
@ -19,15 +19,11 @@ TARGET_LINK_LIBRARIES(nel_export
|
|||
${MAXSDK_LIBRARIES}
|
||||
Version.lib
|
||||
comctl32.lib)
|
||||
|
||||
SET_TARGET_PROPERTIES(nel_export PROPERTIES
|
||||
VERSION ${NL_VERSION}
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r"
|
||||
SUFFIX ".dlu"
|
||||
PROJECT_LABEL "MAX Plugin: NeL Export")
|
||||
|
||||
NL_DEFAULT_PROPS(nel_export "MAX Plugin: NeL Export")
|
||||
NL_ADD_RUNTIME_FLAGS(nel_export)
|
||||
NL_ADD_LIB_SUFFIX(nel_export)
|
||||
SET_TARGET_PROPERTIES(nel_export PROPERTIES SUFFIX ".dlu")
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ void *CNelExportClassDesc::Create(BOOL loading)
|
|||
}
|
||||
|
||||
|
||||
int CALLBACK OptionsDialogCallback (
|
||||
INT_PTR CALLBACK OptionsDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
|
@ -217,7 +217,7 @@ int CALLBACK OptionsDialogCallback (
|
|||
}
|
||||
|
||||
extern HINSTANCE hInstance;
|
||||
static BOOL CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// Set locale to english
|
||||
setlocale (LC_NUMERIC, "English");
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "std_afx.h"
|
||||
#include "nel_export.h"
|
||||
#include "nel/misc/file.h"
|
||||
#include "nel/misc/path.h"
|
||||
#include "nel/3d/shape.h"
|
||||
#include "nel/3d/animation.h"
|
||||
#include "nel/3d/skeleton_shape.h"
|
||||
|
@ -34,94 +35,133 @@ using namespace NLMISC;
|
|||
bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time)
|
||||
{
|
||||
// Result to return
|
||||
bool bRet=false;
|
||||
|
||||
// Eval the object a time
|
||||
ObjectState os = node.EvalWorldState(time);
|
||||
|
||||
// Object exist ?
|
||||
if (os.obj)
|
||||
bool bRet = false;
|
||||
char tempName[L_tmpnam];
|
||||
tmpnam(tempName);
|
||||
|
||||
try
|
||||
{
|
||||
// Skeleton shape
|
||||
CSkeletonShape *skeletonShape=NULL;
|
||||
TInodePtrInt *mapIdPtr=NULL;
|
||||
TInodePtrInt mapId;
|
||||
// Eval the object a time
|
||||
ObjectState os = node.EvalWorldState(time);
|
||||
|
||||
// If model skinned ?
|
||||
if (CExportNel::isSkin (node))
|
||||
// Object exist ?
|
||||
if (os.obj)
|
||||
{
|
||||
// Create a skeleton
|
||||
INode *skeletonRoot=CExportNel::getSkeletonRootBone (node);
|
||||
// Skeleton shape
|
||||
CSmartPtr<CSkeletonShape> skeletonShape = NULL;
|
||||
TInodePtrInt *mapIdPtr=NULL;
|
||||
TInodePtrInt mapId;
|
||||
|
||||
// Skeleton exist ?
|
||||
if (skeletonRoot)
|
||||
// If model skinned ?
|
||||
if (CExportNel::isSkin (node))
|
||||
{
|
||||
// Build a skeleton
|
||||
skeletonShape=new CSkeletonShape();
|
||||
// Create a skeleton
|
||||
INode *skeletonRoot = CExportNel::getSkeletonRootBone(node);
|
||||
|
||||
// Add skeleton bind pos info
|
||||
CExportNel::mapBoneBindPos boneBindPos;
|
||||
CExportNel::addSkeletonBindPos (node, boneBindPos);
|
||||
// Skeleton exist ?
|
||||
if (skeletonRoot)
|
||||
{
|
||||
// Build a skeleton
|
||||
skeletonShape = new CSkeletonShape();
|
||||
|
||||
// Build the skeleton based on the bind pos information
|
||||
_ExportNel->buildSkeletonShape (*skeletonShape, *skeletonRoot, &boneBindPos, mapId, time);
|
||||
// Add skeleton bind pos info
|
||||
CExportNel::mapBoneBindPos boneBindPos;
|
||||
CExportNel::addSkeletonBindPos (node, boneBindPos);
|
||||
|
||||
// Set the pointer to not NULL
|
||||
mapIdPtr=&mapId;
|
||||
// Build the skeleton based on the bind pos information
|
||||
_ExportNel->buildSkeletonShape(*skeletonShape.getPtr(), *skeletonRoot, &boneBindPos, mapId, time);
|
||||
|
||||
// Erase the skeleton
|
||||
if (skeletonShape)
|
||||
delete skeletonShape;
|
||||
// Set the pointer to not NULL
|
||||
mapIdPtr=&mapId;
|
||||
|
||||
// Erase the skeleton
|
||||
skeletonShape = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DWORD t = timeGetTime();
|
||||
if (InfoLog)
|
||||
InfoLog->display("Beg buildShape %s \n", node.GetName());
|
||||
// Export in mesh format
|
||||
IShape* pShape=_ExportNel->buildShape (node, time, mapIdPtr, true);
|
||||
if (InfoLog)
|
||||
InfoLog->display("End buildShape in %d ms \n", timeGetTime()-t);
|
||||
|
||||
// Conversion success ?
|
||||
if (pShape)
|
||||
{
|
||||
// Open a file
|
||||
COFile file;
|
||||
if (file.open (sPath))
|
||||
|
||||
DWORD t = timeGetTime();
|
||||
if (InfoLog)
|
||||
InfoLog->display("Beg buildShape %s \n", node.GetName());
|
||||
// Export in mesh format
|
||||
CSmartPtr<IShape> pShape = _ExportNel->buildShape(node, time, mapIdPtr, true);
|
||||
if (InfoLog)
|
||||
InfoLog->display("End buildShape in %d ms \n", timeGetTime()-t);
|
||||
|
||||
// Conversion success ?
|
||||
if (pShape.getPtr())
|
||||
{
|
||||
// Open a file
|
||||
COFile file;
|
||||
if (file.open(tempName))
|
||||
{
|
||||
try
|
||||
{
|
||||
// Create a streamable shape
|
||||
CShapeStream shapeStream(pShape);
|
||||
|
||||
// Serial the shape
|
||||
shapeStream.serial(file);
|
||||
|
||||
// All is good
|
||||
bRet = true;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
nlwarning("Shape serialization failed!");
|
||||
try
|
||||
{
|
||||
file.close();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
||||
}
|
||||
remove(tempName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nlwarning("Failed to create file %s", tempName);
|
||||
}
|
||||
|
||||
// Delete the pointer
|
||||
nldebug ("Delete the pointer");
|
||||
try
|
||||
{
|
||||
// Create a streamable shape
|
||||
CShapeStream shapeStream (pShape);
|
||||
|
||||
// Serial the shape
|
||||
shapeStream.serial (file);
|
||||
|
||||
// All is good
|
||||
bRet=true;
|
||||
bool tempBRet = bRet;
|
||||
bRet = false;
|
||||
pShape = NULL;
|
||||
bRet = tempBRet;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
nlwarning("Shape serialization failed!");
|
||||
file.close();
|
||||
remove(sPath);
|
||||
nlwarning("Failed to delete pShape pointer! Something might be wrong.");
|
||||
remove(tempName);
|
||||
bRet = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the pointer
|
||||
nldebug ("Delete the pointer");
|
||||
try
|
||||
{
|
||||
// memory leak, fixme
|
||||
// delete pShape;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
nlwarning("Failed to delete pShape pointer! Something might be wrong.");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
nlwarning("Fatal exception at CNelExport::exportMesh.");
|
||||
bRet = false;
|
||||
}
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
try
|
||||
{
|
||||
remove(sPath);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
||||
}
|
||||
CFile::moveFile(sPath, tempName);
|
||||
nlinfo("MOVE %s -> %s", tempName, sPath);
|
||||
}
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
|
|
@ -309,22 +309,22 @@ public:
|
|||
HWND SubVPDlg[VP_COUNT];
|
||||
};
|
||||
|
||||
int CALLBACK MRMDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK AccelDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK InstanceDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK LightmapDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK Lightmap2DialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK VegetableDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK VertexProgramDialogCallBack (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK MiscDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
int CALLBACK AnimationDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK MRMDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK AccelDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK InstanceDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK LightmapDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK Lightmap2DialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK VegetableDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK VertexProgramDialogCallBack (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK MiscDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK AnimationDialogCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
const char *SubText[TAB_COUNT] = {"LOD & MRM", "Accelerator", "Instance", "Lighting", "LMC", "Vegetable", "VertexProgram", "Misc", "Animation"};
|
||||
const int SubTab[TAB_COUNT] = {IDD_LOD, IDD_ACCEL, IDD_INSTANCE, IDD_LIGHTMAP, IDD_LIGHTMAP2, IDD_VEGETABLE, IDD_VERTEX_PROGRAM, IDD_MISC, IDD_ANIM};
|
||||
DLGPROC SubProc[TAB_COUNT] = {MRMDialogCallback, AccelDialogCallback, InstanceDialogCallback, LightmapDialogCallback, Lightmap2DialogCallback, VegetableDialogCallback, VertexProgramDialogCallBack, MiscDialogCallback, AnimationDialogCallback};
|
||||
|
||||
// VertexPrograms.
|
||||
int CALLBACK VPWindTreeCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK VPWindTreeCallback (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
const int SubVPTab[VP_COUNT] = {IDD_VP_WINDTREE};
|
||||
DLGPROC SubVPProc[VP_COUNT] = {VPWindTreeCallback};
|
||||
|
||||
|
@ -417,7 +417,7 @@ void VegetableStateChanged (HWND hwndDlg)
|
|||
|
||||
void AccelStateChanged (HWND hwndDlg)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
bool cluster = (currentParam->AcceleratorType&NEL3D_APPDATA_ACCEL_TYPE) == NEL3D_APPDATA_ACCEL_CLUSTER;
|
||||
bool portal = (currentParam->AcceleratorType&NEL3D_APPDATA_ACCEL_TYPE) == NEL3D_APPDATA_ACCEL_PORTAL;
|
||||
|
@ -464,22 +464,22 @@ void exploreNode(INode *node)
|
|||
}
|
||||
|
||||
|
||||
int CALLBACK AccelDialogCallback (
|
||||
INT_PTR CALLBACK AccelDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// Fill the known sound groups by parsing the max node tree.
|
||||
{
|
||||
|
@ -635,22 +635,22 @@ int CALLBACK AccelDialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK MRMDialogCallback (
|
||||
INT_PTR CALLBACK MRMDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// Window text
|
||||
std::string winName=(*(currentParam->ListNode->begin()))->GetName();
|
||||
|
@ -903,22 +903,22 @@ int CALLBACK MRMDialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK InstanceDialogCallback (
|
||||
INT_PTR CALLBACK InstanceDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
SetWindowText (GetDlgItem (hwndDlg, IDC_EDIT_INSTANCE_GROUP_SHAPE), currentParam->InstanceShape.c_str());
|
||||
SetWindowText (GetDlgItem (hwndDlg, IDC_EDIT_INSTANCE_NAME), currentParam->InstanceName.c_str());
|
||||
|
@ -1019,22 +1019,22 @@ int CALLBACK InstanceDialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK LightmapDialogCallback (
|
||||
INT_PTR CALLBACK LightmapDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
SetWindowText (GetDlgItem (hwndDlg, IDC_EDIT_LUMELSIZEMUL), currentParam->LumelSizeMul.c_str());
|
||||
SetWindowText (GetDlgItem (hwndDlg, IDC_EDIT_SOFTSHADOW_RADIUS), currentParam->SoftShadowRadius.c_str());
|
||||
|
@ -1298,14 +1298,14 @@ struct CLMCParamFrom
|
|||
};
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK LMCCopyFromDialogCallback(
|
||||
INT_PTR CALLBACK LMCCopyFromDialogCallback(
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLMCParamFrom *lmcParam=(CLMCParamFrom *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLMCParamFrom *lmcParam=(CLMCParamFrom *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
uint i;
|
||||
|
||||
switch (uMsg)
|
||||
|
@ -1313,8 +1313,8 @@ int CALLBACK LMCCopyFromDialogCallback(
|
|||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
lmcParam=(CLMCParamFrom *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
lmcParam=(CLMCParamFrom *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// init the colors
|
||||
nlctassert(CLodDialogBoxParam::NumLightGroup==3);
|
||||
|
@ -1519,22 +1519,22 @@ void lmcCopyFrom(CLodDialogBoxParam *currentParam, HWND parentDlg)
|
|||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK Lightmap2DialogCallback (
|
||||
INT_PTR CALLBACK Lightmap2DialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// retrieve the color choosing Ctrl
|
||||
nlctassert(CLodDialogBoxParam::NumLightGroup==3);
|
||||
|
@ -1642,22 +1642,22 @@ int CALLBACK Lightmap2DialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK VegetableDialogCallback (
|
||||
INT_PTR CALLBACK VegetableDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_VEGETABLE), BM_SETCHECK, currentParam->Vegetable, 0);
|
||||
|
||||
|
@ -1762,22 +1762,22 @@ int CALLBACK VegetableDialogCallback (
|
|||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK VertexProgramDialogCallBack (
|
||||
INT_PTR CALLBACK VertexProgramDialogCallBack (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// test wether v.p are bypassed for that object (this may happen when a v.p is needed by a material of this mesh)
|
||||
if (!currentParam->VertexProgramBypassed)
|
||||
|
@ -2028,22 +2028,22 @@ static void updateVPWTStaticForControl(HWND hwndDlg, HWND ctrlWnd, CVPWindTreeAp
|
|||
}
|
||||
|
||||
|
||||
int CALLBACK VPWindTreeCallback (
|
||||
INT_PTR CALLBACK VPWindTreeCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// Init controls
|
||||
CVPWindTreeAppData &vpwt= currentParam->VertexProgramWindTree;
|
||||
|
@ -2266,22 +2266,22 @@ int CALLBACK VPWindTreeCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK MiscDialogCallback (
|
||||
INT_PTR CALLBACK MiscDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_FLOATING_OBJECT), BM_SETCHECK, currentParam->FloatingObject, 0);
|
||||
|
||||
// Ligoscape
|
||||
|
@ -2399,22 +2399,22 @@ int CALLBACK MiscDialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK AnimationDialogCallback (
|
||||
INT_PTR CALLBACK AnimationDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_EXPORT_NOTE_TRACK), BM_SETCHECK, currentParam->ExportNoteTrack, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_EXPORT_SSS_TRACK), BM_SETCHECK, currentParam->ExportSSSTrack, 0);
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_EXPORT_ANIMATED_MATERIALS), BM_SETCHECK, currentParam->ExportAnimatedMaterials, 0);
|
||||
|
@ -2468,22 +2468,22 @@ int CALLBACK AnimationDialogCallback (
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
int CALLBACK LodDialogCallback (
|
||||
INT_PTR CALLBACK LodDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
LPARAM lParam // second message parameter
|
||||
)
|
||||
{
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
CLodDialogBoxParam *currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Param pointers
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLong(hwndDlg, GWL_USERDATA);
|
||||
LONG_PTR res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
currentParam=(CLodDialogBoxParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|
||||
|
||||
// Window text
|
||||
std::string winName=(*(currentParam->ListNode->begin()))->GetName();
|
||||
|
@ -2602,7 +2602,7 @@ void CNelExport::OnNodeProperties (const std::set<INode*> &listNode)
|
|||
{
|
||||
|
||||
// Get
|
||||
uint nNumSelNode=listNode.size();
|
||||
uint nNumSelNode=(uint)listNode.size();
|
||||
|
||||
if (nNumSelNode)
|
||||
{
|
||||
|
@ -3220,7 +3220,7 @@ void CNelExport::OnNodeProperties (const std::set<INode*> &listNode)
|
|||
if (param.ListActived)
|
||||
{
|
||||
// Write size of the list
|
||||
uint sizeList=std::min (param.ListLodName.size(), (uint)NEL3D_APPDATA_LOD_NAME_COUNT_MAX);
|
||||
uint sizeList=std::min ((uint)param.ListLodName.size(), (uint)NEL3D_APPDATA_LOD_NAME_COUNT_MAX);
|
||||
CExportNel::setScriptAppData (node, NEL3D_APPDATA_LOD_NAME_COUNT, (int)sizeList);
|
||||
|
||||
// Write the strings
|
||||
|
|
|
@ -26,7 +26,7 @@ using namespace NLMISC;
|
|||
// -----------------------------------------------------------------------------------------------
|
||||
// Window dialog callback
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
int CALLBACK CalculatingDialogCallback (
|
||||
INT_PTR CALLBACK CalculatingDialogCallback (
|
||||
HWND hwndDlg, // handle to dialog box
|
||||
UINT uMsg, // message
|
||||
WPARAM wParam, // first message parameter
|
||||
|
@ -34,14 +34,14 @@ int CALLBACK CalculatingDialogCallback (
|
|||
)
|
||||
{
|
||||
double TimeCurrent = CTime::ticksToSecond( CTime::getPerformanceTime() );
|
||||
CProgressBar *pClass = (CProgressBar*)GetWindowLong (hwndDlg, GWL_USERDATA);
|
||||
CProgressBar *pClass = (CProgressBar*)GetWindowLongPtr (hwndDlg, GWLP_USERDATA);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
LONG res = SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam);
|
||||
pClass = (CProgressBar*)GetWindowLong (hwndDlg, GWL_USERDATA);
|
||||
LONG res = SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
pClass = (CProgressBar*)GetWindowLongPtr (hwndDlg, GWLP_USERDATA);
|
||||
|
||||
CenterWindow( hwndDlg, theCNelExport._Ip->GetMAXHWnd() );
|
||||
ShowWindow( hwndDlg, SW_SHOWNORMAL );
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <assert.h>
|
||||
#include <windows.h>
|
||||
#include <locale.h>
|
||||
#include <windowsx.h>
|
||||
|
|
|
@ -2,18 +2,11 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
|
||||
ADD_LIBRARY(nel_mesh_lib STATIC ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MAXSDK_INCLUDE_DIR} ${MAXSDK_CS_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_mesh_lib ${LIBXML2_LIBRARIES} nelmisc)
|
||||
SET_TARGET_PROPERTIES(nel_mesh_lib PROPERTIES
|
||||
VERSION ${NL_VERSION}
|
||||
SOVERSION ${NL_VERSION_MAJOR}
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r"
|
||||
PROJECT_LABEL "MAX Plugin: NeL Mesh Library")
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
INCLUDE_DIRECTORIES(${MAXSDK_INCLUDE_DIR} ${MAXSDK_CS_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_mesh_lib nelmisc)
|
||||
NL_DEFAULT_PROPS(nel_mesh_lib "MAX Plugin: NeL Mesh Library")
|
||||
NL_ADD_RUNTIME_FLAGS(nel_mesh_lib)
|
||||
NL_ADD_LIB_SUFFIX(nel_mesh_lib)
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nel_mesh_lib ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp)
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
//#include "nel/misc/types_nl.h"
|
||||
// Max SDK includes
|
||||
//#define NOMINMAX
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <max.h>
|
||||
#include <stdmat.h>
|
||||
|
|
|
@ -77,7 +77,8 @@ SLightBuild::SLightBuild()
|
|||
bool SLightBuild::canConvertFromMaxLight (INode *node, TimeValue tvTime)
|
||||
{
|
||||
// Get a pointer on the object's node
|
||||
Object *obj = node->EvalWorldState(tvTime).obj;
|
||||
ObjectState os = node->EvalWorldState(tvTime);
|
||||
Object *obj = os.obj;
|
||||
|
||||
// Check if there is an object
|
||||
if (!obj)
|
||||
|
@ -98,7 +99,7 @@ bool SLightBuild::canConvertFromMaxLight (INode *node, TimeValue tvTime)
|
|||
return false;
|
||||
|
||||
if( deleteIt )
|
||||
maxLight->DeleteMe();
|
||||
maxLight->MaybeAutoDelete();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -107,7 +108,8 @@ bool SLightBuild::canConvertFromMaxLight (INode *node, TimeValue tvTime)
|
|||
void SLightBuild::convertFromMaxLight (INode *node,TimeValue tvTime)
|
||||
{
|
||||
// Get a pointer on the object's node
|
||||
Object *obj = node->EvalWorldState(tvTime).obj;
|
||||
ObjectState os = node->EvalWorldState(tvTime);
|
||||
Object *obj = os.obj;
|
||||
|
||||
// Check if there is an object
|
||||
if (!obj) return;
|
||||
|
@ -295,7 +297,7 @@ void SLightBuild::convertFromMaxLight (INode *node,TimeValue tvTime)
|
|||
this->rSoftShadowConeLength = (float)atof(sTmp.c_str());
|
||||
|
||||
if( deleteIt )
|
||||
maxLight->DeleteMe();
|
||||
maxLight->MaybeAutoDelete();
|
||||
}
|
||||
|
||||
// ***********************************************************************************************
|
||||
|
@ -2401,7 +2403,10 @@ bool CExportNel::calculateLM( CMesh::CMeshBuild *pZeMeshBuild, CMeshBase::CMeshB
|
|||
TempPlanes[nPlaneNb]->copyFirstLayerTo(*AllPlanes[AllPlanesPrevSize+nPlaneNb],(uint8)nLight);
|
||||
|
||||
for( nPlaneNb = 0; nPlaneNb < (sint)FaceGroupByPlane.size(); ++nPlaneNb )
|
||||
{
|
||||
delete TempPlanes[nPlaneNb];
|
||||
TempPlanes[nPlaneNb] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Next group of face with the same smooth group and the same material
|
||||
|
@ -2497,6 +2502,7 @@ bool CExportNel::calculateLM( CMesh::CMeshBuild *pZeMeshBuild, CMeshBase::CMeshB
|
|||
MoveFaceUV1( AllPlanes[i]->faces.begin(), AllPlanes[i]->faces.size(),
|
||||
AllPlanes[i]->x, AllPlanes[i]->y );
|
||||
delete AllPlanes[i];
|
||||
AllPlanes[i] = NULL;
|
||||
}
|
||||
|
||||
// Save the lightmap
|
||||
|
|
|
@ -264,6 +264,7 @@ void CExportNel::addParticleSystemTracks(CAnimation& animation, INode& node, con
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -281,6 +282,7 @@ void CExportNel::addParticleSystemTracks(CAnimation& animation, INode& node, con
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -325,6 +327,7 @@ void CExportNel::addNodeTracks (CAnimation& animation, INode& node, const char*
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -348,6 +351,7 @@ void CExportNel::addNodeTracks (CAnimation& animation, INode& node, const char*
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -371,6 +375,7 @@ void CExportNel::addNodeTracks (CAnimation& animation, INode& node, const char*
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -389,6 +394,7 @@ void CExportNel::addNodeTracks (CAnimation& animation, INode& node, const char*
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -413,6 +419,7 @@ void CExportNel::addNodeTracks (CAnimation& animation, INode& node, const char*
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -443,6 +450,7 @@ void CExportNel::addNodeTracks (CAnimation& animation, INode& node, const char*
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -541,7 +549,8 @@ void CExportNel::addLightTracks (NL3D::CAnimation& animation, INode& node, const
|
|||
{
|
||||
CExportDesc desc;
|
||||
|
||||
Object *obj = node.EvalWorldState(0).obj;
|
||||
ObjectState os = node.EvalWorldState(0);
|
||||
Object *obj = os.obj;
|
||||
|
||||
// Check if there is an object
|
||||
if (!obj)
|
||||
|
@ -567,6 +576,7 @@ void CExportNel::addLightTracks (NL3D::CAnimation& animation, INode& node, const
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -609,6 +619,7 @@ void CExportNel::addMorphTracks (NL3D::CAnimation& animation, INode& node, const
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -639,6 +650,7 @@ void CExportNel::addObjTracks (CAnimation& animation, Object& obj, const char* p
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -681,6 +693,7 @@ void CExportNel::addMtlTracks (CAnimation& animation, Mtl& mtl, const char* pare
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -705,6 +718,7 @@ void CExportNel::addMtlTracks (CAnimation& animation, Mtl& mtl, const char* pare
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -731,6 +745,7 @@ void CExportNel::addMtlTracks (CAnimation& animation, Mtl& mtl, const char* pare
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -755,6 +770,7 @@ void CExportNel::addMtlTracks (CAnimation& animation, Mtl& mtl, const char* pare
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -779,6 +795,7 @@ void CExportNel::addMtlTracks (CAnimation& animation, Mtl& mtl, const char* pare
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -862,6 +879,7 @@ void CExportNel::addTexTracks (CAnimation& animation, Texmap& tex, uint stage, c
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -884,6 +902,7 @@ void CExportNel::addTexTracks (CAnimation& animation, Texmap& tex, uint stage, c
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -906,6 +925,7 @@ void CExportNel::addTexTracks (CAnimation& animation, Texmap& tex, uint stage, c
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -928,6 +948,7 @@ void CExportNel::addTexTracks (CAnimation& animation, Texmap& tex, uint stage, c
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -950,6 +971,7 @@ void CExportNel::addTexTracks (CAnimation& animation, Texmap& tex, uint stage, c
|
|||
if (animation.getTrackByName (name.c_str()))
|
||||
{
|
||||
delete pTrack;
|
||||
pTrack = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2319,7 +2341,7 @@ void CSSSBuild::compile(NL3D::CAnimation &dest, const char* sBaseName)
|
|||
{
|
||||
// no keys added
|
||||
delete finalTrack;
|
||||
finalTrack= NULL;
|
||||
finalTrack = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue