mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 09:58:46 +00:00
Merge with default
This commit is contained in:
parent
d39c6b8e1b
commit
b6ca251a8d
142 changed files with 2631 additions and 2236 deletions
|
@ -134,7 +134,7 @@ IF(FINAL_VERSION)
|
|||
ENDIF(FINAL_VERSION)
|
||||
|
||||
IF(WITH_QT)
|
||||
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml REQUIRED)
|
||||
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED)
|
||||
ENDIF(WITH_QT)
|
||||
|
||||
IF(WITH_NEL)
|
||||
|
@ -144,11 +144,6 @@ IF(WITH_NEL)
|
|||
|
||||
IF(WITH_GUI)
|
||||
FIND_PACKAGE(Libwww REQUIRED)
|
||||
IF(WITH_LUA51)
|
||||
FIND_PACKAGE(Lua51 REQUIRED)
|
||||
ELSE(WITH_LUA51)
|
||||
FIND_PACKAGE(Lua50 REQUIRED)
|
||||
ENDIF(WITH_LUA51)
|
||||
FIND_PACKAGE(Luabind REQUIRED)
|
||||
FIND_PACKAGE(CURL REQUIRED)
|
||||
|
||||
|
|
81
code/CMakeModules/FindLua52.cmake
Normal file
81
code/CMakeModules/FindLua52.cmake
Normal file
|
@ -0,0 +1,81 @@
|
|||
# Locate Lua library
|
||||
# This module defines
|
||||
# LUA52_FOUND, if false, do not try to link to Lua
|
||||
# LUA_LIBRARIES
|
||||
# LUA_INCLUDE_DIR, where to find lua.h
|
||||
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include "lua.h"
|
||||
# and not
|
||||
# #include <lua/lua.h>
|
||||
# This is because, the lua location is not standardized and may exist
|
||||
# in locations other than lua/
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
find_path(LUA_INCLUDE_DIR lua.h
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES include/lua52 include/lua5.2 include/lua-5.2 include/lua include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
find_library(LUA_LIBRARY
|
||||
NAMES lua52 lua5.2 lua-5.2 lua
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
if(LUA_LIBRARY)
|
||||
# include the math library for Unix
|
||||
if(UNIX AND NOT APPLE AND NOT BEOS)
|
||||
find_library(LUA_MATH_LIBRARY m)
|
||||
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
# For Windows and Mac, don't need to explicitly include the math library
|
||||
else()
|
||||
set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
|
||||
file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
|
||||
|
||||
string(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
|
||||
unset(lua_version_str)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua52
|
||||
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
|
||||
VERSION_VAR LUA_VERSION_STRING)
|
||||
|
||||
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
|
||||
|
|
@ -4,6 +4,48 @@
|
|||
# LUABIND_FOUND, if false, do not try to link to LUABIND
|
||||
# LUABIND_INCLUDE_DIR, where to find headers.
|
||||
|
||||
MACRO(FIND_CORRECT_LUA_VERSION)
|
||||
# Check Lua version linked to Luabind under Linux
|
||||
IF(LUABIND_LIBRARY_RELEASE MATCHES "\\.so")
|
||||
INCLUDE(CheckDepends)
|
||||
|
||||
SET(LUA52_LIBRARY "liblua5.2")
|
||||
CHECK_LINKED_LIBRARY(LUABIND_LIBRARY_RELEASE LUA52_LIBRARY LUALIB_FOUND)
|
||||
|
||||
IF(LUALIB_FOUND)
|
||||
MESSAGE(STATUS "Luabind is using Lua 5.2")
|
||||
FIND_PACKAGE(Lua52 REQUIRED)
|
||||
ELSE(LUALIB_FOUND)
|
||||
SET(LUA51_LIBRARY "liblua5.1")
|
||||
CHECK_LINKED_LIBRARY(LUABIND_LIBRARY_RELEASE LUA51_LIBRARY LUALIB_FOUND)
|
||||
|
||||
IF(LUALIB_FOUND)
|
||||
MESSAGE(STATUS "Luabind is using Lua 5.1")
|
||||
FIND_PACKAGE(Lua51 REQUIRED)
|
||||
ELSE(LUALIB_FOUND)
|
||||
SET(LUA50_LIBRARY "liblua5.0")
|
||||
CHECK_LINKED_LIBRARY(LUABIND_LIBRARY_RELEASE LUA50_LIBRARY LUALIB_FOUND)
|
||||
|
||||
IF(LUALIB_FOUND)
|
||||
MESSAGE(STATUS "Luabind is using Lua 5.0")
|
||||
FIND_PACKAGE(Lua50 REQUIRED)
|
||||
ELSE(LUALIB_FOUND)
|
||||
MESSAGE(FATAL_ERROR "Can't determine Lua version used by Luabind")
|
||||
ENDIF(LUALIB_FOUND)
|
||||
ENDIF(LUALIB_FOUND)
|
||||
ENDIF(LUALIB_FOUND)
|
||||
ELSE(LUABIND_LIBRARY_RELEASE MATCHES "\\.so")
|
||||
# TODO: find a way to detect Lua version
|
||||
IF(WITH_LUA52)
|
||||
FIND_PACKAGE(Lua52 REQUIRED)
|
||||
ELSEIF(WITH_LUA51)
|
||||
FIND_PACKAGE(Lua51 REQUIRED)
|
||||
ELSE(WITH_LUA52)
|
||||
FIND_PACKAGE(Lua50 REQUIRED)
|
||||
ENDIF(WITH_LUA52)
|
||||
ENDIF(LUABIND_LIBRARY_RELEASE MATCHES "\\.so")
|
||||
ENDMACRO(FIND_CORRECT_LUA_VERSION)
|
||||
|
||||
IF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
||||
# in cache already
|
||||
SET(Luabind_FIND_QUIETLY TRUE)
|
||||
|
@ -84,6 +126,9 @@ IF(LUABIND_FOUND)
|
|||
IF(LUABIND_VERSION_FILE)
|
||||
SET(LUABIND_DEFINITIONS "-DHAVE_LUABIND_VERSION")
|
||||
ENDIF(LUABIND_VERSION_FILE)
|
||||
|
||||
FIND_CORRECT_LUA_VERSION()
|
||||
|
||||
IF(NOT Luabind_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
|
||||
ENDIF(NOT Luabind_FIND_QUIETLY)
|
||||
|
|
|
@ -19,8 +19,13 @@ MACRO(DETECT_VC_VERSION_HELPER _ROOT _VERSION)
|
|||
|
||||
IF(VC${_VERSION}_DIR AND NOT VC${_VERSION}_DIR STREQUAL "/registry")
|
||||
SET(VC${_VERSION}_FOUND ON)
|
||||
DETECT_EXPRESS_VERSION(${_VERSION})
|
||||
IF(NOT MSVC_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Visual C++ ${_VERSION} in ${VC${_VERSION}_DIR}")
|
||||
SET(_VERSION_STR ${_VERSION})
|
||||
IF(MSVC_EXPRESS)
|
||||
SET(_VERSION_STR "${_VERSION_STR} Express")
|
||||
ENDIF(MSVC_EXPRESS)
|
||||
MESSAGE(STATUS "Found Visual C++ ${_VERSION_STR} in ${VC${_VERSION}_DIR}")
|
||||
ENDIF(NOT MSVC_FIND_QUIETLY)
|
||||
ELSEIF(VC${_VERSION}_DIR AND NOT VC${_VERSION}_DIR STREQUAL "/registry")
|
||||
SET(VC${_VERSION}_FOUND OFF)
|
||||
|
@ -36,13 +41,28 @@ MACRO(DETECT_VC_VERSION _VERSION)
|
|||
DETECT_VC_VERSION_HELPER("HKEY_LOCAL_MACHINE" ${_VERSION})
|
||||
ENDIF(NOT VC${_VERSION}_FOUND)
|
||||
|
||||
IF(NOT VC${_VERSION}_FOUND)
|
||||
IF(VC${_VERSION}_FOUND)
|
||||
SET(VC_FOUND ON)
|
||||
SET(VC_DIR "${VC${_VERSION}_DIR}")
|
||||
ENDIF(NOT VC${_VERSION}_FOUND)
|
||||
ENDIF(VC${_VERSION}_FOUND)
|
||||
ENDMACRO(DETECT_VC_VERSION)
|
||||
|
||||
IF(MSVC11)
|
||||
MACRO(DETECT_EXPRESS_VERSION _VERSION)
|
||||
GET_FILENAME_COMPONENT(MSVC_EXPRESS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\${_VERSION}\\Setup\\VC;ProductDir]" ABSOLUTE)
|
||||
|
||||
IF(MSVC_EXPRESS AND NOT MSVC_EXPRESS STREQUAL "/registry")
|
||||
SET(MSVC_EXPRESS ON)
|
||||
ENDIF(MSVC_EXPRESS AND NOT MSVC_EXPRESS STREQUAL "/registry")
|
||||
ENDMACRO(DETECT_EXPRESS_VERSION)
|
||||
|
||||
IF(MSVC12)
|
||||
DETECT_VC_VERSION("12.0")
|
||||
|
||||
IF(NOT MSVC12_REDIST_DIR)
|
||||
# If you have VC++ 2013 Express, put x64/Microsoft.VC120.CRT/*.dll in ${EXTERNAL_PATH}/redist
|
||||
SET(MSVC12_REDIST_DIR "${EXTERNAL_PATH}/redist")
|
||||
ENDIF(NOT MSVC11_REDIST_DIR)
|
||||
ELSEIF(MSVC11)
|
||||
DETECT_VC_VERSION("11.0")
|
||||
|
||||
IF(NOT MSVC11_REDIST_DIR)
|
||||
|
@ -60,7 +80,7 @@ ELSEIF(MSVC90)
|
|||
DETECT_VC_VERSION("9.0")
|
||||
ELSEIF(MSVC80)
|
||||
DETECT_VC_VERSION("8.0")
|
||||
ENDIF(MSVC11)
|
||||
ENDIF(MSVC12)
|
||||
|
||||
# If you plan to use VC++ compilers with WINE, set VC_DIR environment variable
|
||||
IF(NOT VC_DIR)
|
||||
|
|
|
@ -11,6 +11,7 @@ IF(WINSDK_FOUND)
|
|||
RETURN()
|
||||
ENDIF(WINSDK_FOUND)
|
||||
|
||||
# Values can be CURRENT or any existing versions 7.1, 8.0A, etc...
|
||||
SET(WINSDK_VERSION "CURRENT" CACHE STRING "Windows SDK version to prefer")
|
||||
|
||||
MACRO(DETECT_WINSDK_VERSION_HELPER _ROOT _VERSION)
|
||||
|
@ -22,7 +23,7 @@ MACRO(DETECT_WINSDK_VERSION_HELPER _ROOT _VERSION)
|
|||
IF(NOT WindowsSDK_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Windows SDK ${_VERSION} in ${WINSDK${_VERSION}_DIR}")
|
||||
ENDIF(NOT WindowsSDK_FIND_QUIETLY)
|
||||
ELSEIF(WINSDK${_VERSION}_DIR AND NOT WINSDK${_VERSION}_DIR STREQUAL "/registry")
|
||||
ELSE(WINSDK${_VERSION}_DIR AND NOT WINSDK${_VERSION}_DIR STREQUAL "/registry")
|
||||
SET(WINSDK${_VERSION}_DIR "")
|
||||
ENDIF(WINSDK${_VERSION}_DIR AND NOT WINSDK${_VERSION}_DIR STREQUAL "/registry")
|
||||
ENDMACRO(DETECT_WINSDK_VERSION_HELPER)
|
||||
|
@ -36,11 +37,16 @@ MACRO(DETECT_WINSDK_VERSION _VERSION)
|
|||
ENDIF(NOT WINSDK${_VERSION}_FOUND)
|
||||
ENDMACRO(DETECT_WINSDK_VERSION)
|
||||
|
||||
SET(WINSDK_VERSIONS "8.0" "8.0A" "7.1" "7.0A" "6.1" "6.0" "6.0A")
|
||||
SET(WINSDK_VERSIONS "8.0" "8.0A" "7.1" "7.1A" "7.0" "7.0A" "6.1" "6.0" "6.0A")
|
||||
SET(WINSDK_DETECTED_VERSIONS)
|
||||
|
||||
# Search all supported Windows SDKs
|
||||
FOREACH(_VERSION ${WINSDK_VERSIONS})
|
||||
DETECT_WINSDK_VERSION(${_VERSION})
|
||||
|
||||
IF(WINSDK${_VERSION}_FOUND)
|
||||
LIST(APPEND WINSDK_DETECTED_VERSIONS ${_VERSION})
|
||||
ENDIF(WINSDK${_VERSION}_FOUND)
|
||||
ENDFOREACH(_VERSION)
|
||||
|
||||
SET(WINSDK_SUFFIX)
|
||||
|
@ -54,51 +60,186 @@ ELSEIF(TARGET_X86)
|
|||
SET(WINSDK8_SUFFIX "x86")
|
||||
ENDIF(TARGET_ARM)
|
||||
|
||||
GET_FILENAME_COMPONENT(WINSDKCURRENT_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentVersion]" NAME)
|
||||
SET(WINSDKCURRENT_VERSION_INCLUDE $ENV{INCLUDE})
|
||||
|
||||
IF(WINSDKCURRENT_VERSION AND NOT WINSDKCURRENT_VERSION STREQUAL "/registry")
|
||||
IF(NOT WindowsSDK_FIND_QUIETLY)
|
||||
# MESSAGE(STATUS "Current version is ${WINSDKCURRENT_VERSION}")
|
||||
ENDIF(NOT WindowsSDK_FIND_QUIETLY)
|
||||
ENDIF(WINSDKCURRENT_VERSION AND NOT WINSDKCURRENT_VERSION STREQUAL "/registry")
|
||||
IF(WINSDKCURRENT_VERSION_INCLUDE)
|
||||
FILE(TO_CMAKE_PATH "${WINSDKCURRENT_VERSION_INCLUDE}" WINSDKCURRENT_VERSION_INCLUDE)
|
||||
ENDIF(WINSDKCURRENT_VERSION_INCLUDE)
|
||||
|
||||
SET(WINSDKENV_DIR $ENV{WINSDK_DIR})
|
||||
|
||||
MACRO(FIND_WINSDK_VERSION_HEADERS)
|
||||
IF(WINSDK_DIR AND NOT WINSDK_VERSION)
|
||||
# Search version in headers
|
||||
IF(EXISTS ${WINSDK_DIR}/include/Msi.h)
|
||||
SET(_MSI_FILE ${WINSDK_DIR}/include/Msi.h)
|
||||
ENDIF(EXISTS ${WINSDK_DIR}/include/Msi.h)
|
||||
|
||||
IF(_MSI_FILE)
|
||||
# Look for Windows SDK 8.0
|
||||
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN8")
|
||||
|
||||
IF(_CONTENT)
|
||||
SET(WINSDK_VERSION "8.0")
|
||||
ENDIF(_CONTENT)
|
||||
|
||||
IF(NOT WINSDK_VERSION)
|
||||
# Look for Windows SDK 7.0
|
||||
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN7")
|
||||
|
||||
IF(_CONTENT)
|
||||
IF(EXISTS ${WINSDK_DIR}/include/winsdkver.h)
|
||||
SET(_WINSDKVER_FILE ${WINSDK_DIR}/include/winsdkver.h)
|
||||
ELSEIF(EXISTS ${WINSDK_DIR}/include/WinSDKVer.h)
|
||||
SET(_WINSDKVER_FILE ${WINSDK_DIR}/include/WinSDKVer.h)
|
||||
ENDIF(EXISTS ${WINSDK_DIR}/include/winsdkver.h)
|
||||
|
||||
IF(_WINSDKVER_FILE)
|
||||
# Load WinSDKVer.h content
|
||||
FILE(STRINGS ${_WINSDKVER_FILE} _CONTENT REGEX "^#define NTDDI_MAXVER")
|
||||
|
||||
# Get NTDDI_MAXVER value
|
||||
STRING(REGEX REPLACE "^.*0x([0-9A-Fa-f]+).*$" "\\1" _WINSDKVER "${_CONTENT}")
|
||||
|
||||
# In Windows SDK 7.1, NTDDI_MAXVER is wrong
|
||||
IF(_WINSDKVER STREQUAL "06010000")
|
||||
SET(WINSDK_VERSION "7.1")
|
||||
ELSEIF(_WINSDKVER STREQUAL "0601")
|
||||
SET(WINSDK_VERSION "7.0A")
|
||||
ELSE(_WINSDKVER STREQUAL "06010000")
|
||||
MESSAGE(FATAL_ERROR "Can't determine Windows SDK version with NTDDI_MAXVER 0x${_WINSDKVER}")
|
||||
ENDIF(_WINSDKVER STREQUAL "06010000")
|
||||
ELSE(_WINSDKVER_FILE)
|
||||
SET(WINSDK_VERSION "7.0")
|
||||
ENDIF(_WINSDKVER_FILE)
|
||||
ENDIF(_CONTENT)
|
||||
ENDIF(NOT WINSDK_VERSION)
|
||||
|
||||
IF(NOT WINSDK_VERSION)
|
||||
# Look for Windows SDK 6.0
|
||||
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_VISTA")
|
||||
|
||||
IF(_CONTENT)
|
||||
SET(WINSDK_VERSION "6.0")
|
||||
ENDIF(_CONTENT)
|
||||
ENDIF(NOT WINSDK_VERSION)
|
||||
|
||||
IF(NOT WINSDK_VERSION)
|
||||
# Look for Windows SDK 5.2
|
||||
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WS03SP1")
|
||||
|
||||
IF(_CONTENT)
|
||||
SET(WINSDK_VERSION "5.2")
|
||||
ENDIF(_CONTENT)
|
||||
ENDIF(NOT WINSDK_VERSION)
|
||||
|
||||
IF(NOT WINSDK_VERSION)
|
||||
# Look for Windows SDK 5.1
|
||||
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WINXP")
|
||||
|
||||
IF(_CONTENT)
|
||||
SET(WINSDK_VERSION "5.1")
|
||||
ENDIF(_CONTENT)
|
||||
ENDIF(NOT WINSDK_VERSION)
|
||||
|
||||
IF(NOT WINSDK_VERSION)
|
||||
# Look for Windows SDK 5.0
|
||||
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN2K")
|
||||
|
||||
IF(_CONTENT)
|
||||
SET(WINSDK_VERSION "5.0")
|
||||
ENDIF(_CONTENT)
|
||||
ENDIF(NOT WINSDK_VERSION)
|
||||
ELSE(_MSI_FILE)
|
||||
MESSAGE(FATAL_ERROR "Unable to find Msi.h in ${WINSDK_DIR}")
|
||||
ENDIF(_MSI_FILE)
|
||||
ENDIF(WINSDK_DIR AND NOT WINSDK_VERSION)
|
||||
ENDMACRO(FIND_WINSDK_VERSION_HEADERS)
|
||||
|
||||
MACRO(USE_CURRENT_WINSDK)
|
||||
IF(WINSDKENV_DIR)
|
||||
SET(WINSDK_DIR "")
|
||||
SET(WINSDK_VERSION "")
|
||||
SET(WINSDK_VERSION_FULL "")
|
||||
|
||||
# Use WINSDK environment variable
|
||||
IF(WINSDKENV_DIR AND EXISTS ${WINSDKENV_DIR}/include/Windows.h)
|
||||
SET(WINSDK_DIR ${WINSDKENV_DIR})
|
||||
FOREACH(_VERSION ${WINSDK_VERSIONS})
|
||||
IF(WINSDK_DIR STREQUAL WINSDK${_VERSION}_DIR)
|
||||
SET(WINSDK_VERSION ${_VERSION})
|
||||
SET(WINSDK_VERSION_FULL "${WINSDK${_VERSION}_VERSION_FULL}")
|
||||
ENDIF(WINSDKENV_DIR AND EXISTS ${WINSDKENV_DIR}/include/Windows.h)
|
||||
|
||||
# Use INCLUDE environment variable
|
||||
IF(NOT WINSDK_DIR AND WINSDKCURRENT_VERSION_INCLUDE)
|
||||
FOREACH(_INCLUDE ${WINSDKCURRENT_VERSION_INCLUDE})
|
||||
FILE(TO_CMAKE_PATH ${_INCLUDE} _INCLUDE)
|
||||
|
||||
# Look for Windows.h because there are several paths
|
||||
IF(EXISTS ${_INCLUDE}/Windows.h)
|
||||
STRING(REGEX REPLACE "/(include|INCLUDE|Include)" "" WINSDK_DIR ${_INCLUDE})
|
||||
MESSAGE(STATUS "Found Windows SDK environment variable in ${WINSDK_DIR}")
|
||||
BREAK()
|
||||
ENDIF(WINSDK_DIR STREQUAL WINSDK${_VERSION}_DIR)
|
||||
ENDIF(EXISTS ${_INCLUDE}/Windows.h)
|
||||
ENDFOREACH(_INCLUDE)
|
||||
ENDIF(NOT WINSDK_DIR AND WINSDKCURRENT_VERSION_INCLUDE)
|
||||
|
||||
IF(WINSDK_DIR)
|
||||
# Compare WINSDK_DIR with registered Windows SDKs
|
||||
FOREACH(_VERSION ${WINSDK_DETECTED_VERSIONS})
|
||||
IF(WINSDK_DIR STREQUAL "${WINSDK${_VERSION}_DIR}")
|
||||
SET(WINSDK_VERSION ${_VERSION})
|
||||
SET(WINSDK_VERSION_FULL "${WINSDK${WINSDK_VERSION}_VERSION_FULL}")
|
||||
BREAK()
|
||||
ENDIF(WINSDK_DIR STREQUAL "${WINSDK${_VERSION}_DIR}")
|
||||
ENDFOREACH(_VERSION)
|
||||
ELSE(WINSDKENV_DIR)
|
||||
# Windows SDK 7.0A doesn't provide 64bits compilers, use SDK 7.1 for 64 bits
|
||||
IF(WINSDKCURRENT_VERSION STREQUAL WINSDK7.0A_VERSION_FULL)
|
||||
IF(TARGET_X64)
|
||||
SET(WINSDK_VERSION "7.1")
|
||||
SET(WINSDK_VERSION_FULL ${WINSDK7.1_VERSION_FULL})
|
||||
SET(WINSDK_DIR ${WINSDK7.1_DIR})
|
||||
ELSE(TARGET_X64)
|
||||
|
||||
FIND_WINSDK_VERSION_HEADERS()
|
||||
ENDIF(WINSDK_DIR)
|
||||
|
||||
IF(NOT WINSDK_DIR)
|
||||
# Use Windows SDK versions installed with VC++ when possible
|
||||
IF(MSVC12)
|
||||
SET(WINSDK_VERSION "8.1A")
|
||||
ELSEIF(MSVC11)
|
||||
SET(WINSDK_VERSION "8.0A")
|
||||
ELSEIF(MSVC10)
|
||||
IF(NOT TARGET_X64 OR NOT MSVC_EXPRESS)
|
||||
SET(WINSDK_VERSION "7.0A")
|
||||
SET(WINSDK_VERSION_FULL ${WINSDK7.0A_VERSION_FULL})
|
||||
SET(WINSDK_DIR ${WINSDK7.0A_DIR})
|
||||
ENDIF(TARGET_X64)
|
||||
ELSE(WINSDKCURRENT_VERSION STREQUAL WINSDK7.0A_VERSION_FULL)
|
||||
FOREACH(_VERSION ${WINSDK_VERSIONS})
|
||||
IF(WINSDKCURRENT_VERSION STREQUAL WINSDK${_VERSION}_VERSION)
|
||||
SET(WINSDK_VERSION ${_VERSION})
|
||||
SET(WINSDK_VERSION_FULL "${WINSDK${_VERSION}_VERSION_FULL}")
|
||||
SET(WINSDK_DIR "${WINSDK${_VERSION}_DIR}")
|
||||
ENDIF(NOT TARGET_X64 OR NOT MSVC_EXPRESS)
|
||||
ELSEIF(MSVC90)
|
||||
IF(NOT MSVC_EXPRESS)
|
||||
SET(WINSDK_VERSION "6.0A")
|
||||
ENDIF(NOT MSVC_EXPRESS)
|
||||
ELSEIF(MSVC80)
|
||||
IF(NOT MSVC_EXPRESS)
|
||||
# TODO: fix this version
|
||||
SET(WINSDK_VERSION "5.2A")
|
||||
ENDIF(NOT MSVC_EXPRESS)
|
||||
ELSE(MSVC12)
|
||||
MESSAGE(FATAL_ERROR "Your compiler is either too old or too recent, please update this CMake module.")
|
||||
ENDIF(MSVC12)
|
||||
|
||||
# Use installed Windows SDK
|
||||
IF(NOT WINSDK_VERSION)
|
||||
IF(WINSDK7.1_FOUND)
|
||||
SET(WINSDK_VERSION "7.1")
|
||||
ELSEIF(WINSDK7.0_FOUND)
|
||||
SET(WINSDK_VERSION "7.0")
|
||||
ELSEIF(WINSDK6.1_FOUND)
|
||||
SET(WINSDK_VERSION "6.1")
|
||||
ELSEIF(WINSDK6.0_FOUND)
|
||||
SET(WINSDK_VERSION "6.0")
|
||||
ELSE(WINSDK7.1_FOUND)
|
||||
MESSAGE(FATAL_ERROR "You have no compatible Windows SDK installed.")
|
||||
ENDIF(WINSDK7.1_FOUND)
|
||||
ENDIF(NOT WINSDK_VERSION)
|
||||
|
||||
# Look for correct registered Windows SDK version
|
||||
FOREACH(_VERSION ${WINSDK_DETECTED_VERSIONS})
|
||||
IF(WINSDK_VERSION STREQUAL _VERSION)
|
||||
SET(WINSDK_VERSION_FULL "${WINSDK${WINSDK_VERSION}_VERSION_FULL}")
|
||||
SET(WINSDK_DIR "${WINSDK${WINSDK_VERSION}_DIR}")
|
||||
BREAK()
|
||||
ENDIF(WINSDKCURRENT_VERSION STREQUAL WINSDK${_VERSION}_VERSION)
|
||||
ENDIF(WINSDK_VERSION STREQUAL _VERSION)
|
||||
ENDFOREACH(_VERSION)
|
||||
ENDIF(WINSDKCURRENT_VERSION STREQUAL WINSDK7.0A_VERSION_FULL)
|
||||
ENDIF(WINSDKENV_DIR)
|
||||
ENDIF(NOT WINSDK_DIR)
|
||||
ENDMACRO(USE_CURRENT_WINSDK)
|
||||
|
||||
IF(WINSDK_VERSION STREQUAL "CURRENT")
|
||||
|
|
|
@ -276,12 +276,19 @@ MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName)
|
|||
|
||||
# NMAKE-VS2012 Error LNK2011 (NMAKE-VS2010 do not complain)
|
||||
# we need to link the pch.obj file, see http://msdn.microsoft.com/en-us/library/3ay26wa2(v=vs.110).aspx
|
||||
GET_TARGET_PROPERTY(DEPS ${_targetName} LINK_LIBRARIES)
|
||||
if (NOT DEPS)
|
||||
set (DEPS)
|
||||
endif ()
|
||||
list (INSERT DEPS 0 "${PCH_OUTPUT}.obj")
|
||||
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES LINK_LIBRARIES "${DEPS}")
|
||||
GET_TARGET_PROPERTY(_STATIC_LIBRARY_FLAGS ${_targetName} STATIC_LIBRARY_FLAGS)
|
||||
IF(NOT _STATIC_LIBRARY_FLAGS)
|
||||
SET(_STATIC_LIBRARY_FLAGS)
|
||||
ENDIF(NOT _STATIC_LIBRARY_FLAGS)
|
||||
SET(_STATIC_LIBRARY_FLAGS "${PCH_OUTPUT}.obj ${_STATIC_LIBRARY_FLAGS}")
|
||||
|
||||
GET_TARGET_PROPERTY(_LINK_FLAGS ${_targetName} LINK_FLAGS)
|
||||
IF(NOT _LINK_FLAGS)
|
||||
SET(_LINK_FLAGS)
|
||||
ENDIF(NOT _LINK_FLAGS)
|
||||
SET(_LINK_FLAGS "${PCH_OUTPUT}.obj ${_LINK_FLAGS}")
|
||||
|
||||
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES STATIC_LIBRARY_FLAGS ${_STATIC_LIBRARY_FLAGS} LINK_FLAGS ${_LINK_FLAGS})
|
||||
ELSE(MSVC)
|
||||
# for use with distcc and gcc >4.0.1 if preprocessed files are accessible
|
||||
# on all remote machines set
|
||||
|
@ -369,17 +376,6 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _inputh _inputcpp)
|
|||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PCH_OUTPUTS}")
|
||||
ENDMACRO(ADD_PRECOMPILED_HEADER)
|
||||
|
||||
# Macro to move PCH creation file to the front of files list
|
||||
# or remove .cpp from library/executable to avoid warning
|
||||
MACRO(FIX_PRECOMPILED_HEADER _files _pch)
|
||||
# Remove .cpp creating PCH from the list
|
||||
LIST(REMOVE_ITEM ${_files} ${_pch})
|
||||
IF(MSVC)
|
||||
# Prepend .cpp creating PCH to the list
|
||||
LIST(INSERT ${_files} 0 ${_pch})
|
||||
ENDIF(MSVC)
|
||||
ENDMACRO(FIX_PRECOMPILED_HEADER)
|
||||
|
||||
MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp)
|
||||
IF(NOT PCHSupport_FOUND)
|
||||
MESSAGE(STATUS "PCH disabled because compiler doesn't support them")
|
||||
|
@ -391,10 +387,6 @@ MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp)
|
|||
# 2 => setting PCH for XCode project, works for XCode projects
|
||||
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
SET(PCH_METHOD 1)
|
||||
ELSEIF(CMAKE_GENERATOR MATCHES "NMake Makefiles" AND MFC_FOUND AND CMAKE_MFC_FLAG)
|
||||
# To fix a bug with MFC
|
||||
# Don't forget to use FIX_PRECOMPILED_HEADER before creating the target
|
||||
# SET(PCH_METHOD 1)
|
||||
ELSEIF(CMAKE_GENERATOR MATCHES "Xcode")
|
||||
SET(PCH_METHOD 2)
|
||||
ELSE(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
|
|
|
@ -345,7 +345,8 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
|||
###
|
||||
# Optional support
|
||||
###
|
||||
OPTION(WITH_LUA51 "Build Ryzom Core using Lua51" ON )
|
||||
OPTION(WITH_LUA51 "Build Ryzom Core using Lua 5.1" ON )
|
||||
OPTION(WITH_LUA52 "Build Ryzom Core using Lua 5.2" OFF)
|
||||
ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
||||
|
||||
MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS)
|
||||
|
|
|
@ -109,7 +109,7 @@ struct TLoadFormDicoEntry
|
|||
}
|
||||
};
|
||||
*/
|
||||
const uint32 PACKED_SHEET_HEADER = 'PKSH';
|
||||
const uint32 PACKED_SHEET_HEADER = NELID("PKSH");
|
||||
const uint32 PACKED_SHEET_VERSION = 5;
|
||||
// This Version may be used if you want to use the serialVersion() system in loadForm()
|
||||
const uint32 PACKED_SHEET_VERSION_COMPATIBLE = 0;
|
||||
|
|
|
@ -53,6 +53,13 @@ class CMemStream;
|
|||
# endif
|
||||
# define NLMISC_BSWAP64(src) (src) = (((src)>>56)&0xFF) | ((((src)>>48)&0xFF)<<8) | ((((src)>>40)&0xFF)<<16) | ((((src)>>32)&0xFF)<<24) | ((((src)>>24)&0xFF)<<32) | ((((src)>>16)&0xFF)<<40) | ((((src)>>8)&0xFF)<<48) | (((src)&0xFF)<<56)
|
||||
|
||||
// convert a 4 characters string to uint32
|
||||
#ifdef NL_LITTLE_ENDIAN
|
||||
# define NELID(x) (uint32((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | (x[3])))
|
||||
#else
|
||||
# define NELID(x) (uint32((x[3] << 24) | (x[2] << 16) | (x[1] << 8) | (x[0])))
|
||||
#endif
|
||||
|
||||
// ======================================================================================================
|
||||
/**
|
||||
* Stream Exception.
|
||||
|
|
|
@ -89,8 +89,8 @@ void CAnimation::serial (NLMISC::IStream& f)
|
|||
nlassert(_IdByChannelId.empty());
|
||||
|
||||
// Serial a header
|
||||
f.serialCheck ((uint32)'_LEN');
|
||||
f.serialCheck ((uint32)'MINA');
|
||||
f.serialCheck (NELID("_LEN"));
|
||||
f.serialCheck (NELID("MINA"));
|
||||
|
||||
// Serial a version
|
||||
sint version=f.serialVersion (2);
|
||||
|
|
|
@ -185,9 +185,9 @@ void CAnimationSet::serial (NLMISC::IStream& f)
|
|||
nlassert(!_AnimHeaderOptimisation);
|
||||
|
||||
// Serial an header
|
||||
f.serialCheck ((uint32)'_LEN');
|
||||
f.serialCheck ((uint32)'MINA');
|
||||
f.serialCheck ((uint32)'TES_');
|
||||
f.serialCheck (NELID("_LEN"));
|
||||
f.serialCheck (NELID("MINA"));
|
||||
f.serialCheck (NELID("TES_"));
|
||||
|
||||
// Serial a version
|
||||
uint ver= f.serialVersion (1);
|
||||
|
|
|
@ -1406,6 +1406,7 @@ void CDriverGL::setupFog(float start, float end, CRGBA color)
|
|||
|
||||
glFogfv(GL_FOG_COLOR, _CurrentFogColor);
|
||||
|
||||
#ifndef USE_OPENGLES
|
||||
/** Special : with vertex program, using the extension EXT_vertex_shader, fog is emulated using 1 more constant to scale result to [0, 1]
|
||||
*/
|
||||
if (_Extensions.EXTVertexShader && !_Extensions.NVVertexProgram && !_Extensions.ARBVertexProgram)
|
||||
|
@ -1425,6 +1426,8 @@ void CDriverGL::setupFog(float start, float end, CRGBA color)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
_FogStart = start;
|
||||
_FogEnd = end;
|
||||
}
|
||||
|
|
|
@ -1502,7 +1502,7 @@ CTextureCube *CDriverGL::getSpecularCubeMap(uint exp)
|
|||
{
|
||||
1.f, 4.f, 8.f, 24.f, 48.f, 128.f, 256.f, 511.f
|
||||
};
|
||||
const uint numCubeMap = sizeof(expToCubeMap) / sizeof(float);
|
||||
const uint numCubeMap = sizeof(cubeMapExp) / sizeof(float);
|
||||
static bool tableBuilt = false;
|
||||
|
||||
if (!tableBuilt)
|
||||
|
|
|
@ -54,6 +54,8 @@ namespace NLDRIVERGL {
|
|||
CPixelProgamDrvInfosGL::CPixelProgamDrvInfosGL (CDriverGL *drv, ItGPUPrgDrvInfoPtrList it) : IProgramDrvInfos (drv, it)
|
||||
{
|
||||
H_AUTO_OGL(CPixelProgamDrvInfosGL_CPixelProgamDrvInfosGL)
|
||||
|
||||
#ifndef USE_OPENGLES
|
||||
// Extension must exist
|
||||
nlassert(drv->_Extensions.ARBFragmentProgram);
|
||||
|
||||
|
@ -61,6 +63,7 @@ CPixelProgamDrvInfosGL::CPixelProgamDrvInfosGL (CDriverGL *drv, ItGPUPrgDrvInfoP
|
|||
{
|
||||
nglGenProgramsARB(1, &ID);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -96,6 +99,7 @@ bool CDriverGL::activePixelProgram(CPixelProgram *program)
|
|||
|
||||
bool CDriverGL::compilePixelProgram(NL3D::CPixelProgram *program)
|
||||
{
|
||||
#ifndef USE_OPENGLES
|
||||
// Program setuped ?
|
||||
if (program->m_DrvInfo == NULL)
|
||||
{
|
||||
|
@ -121,6 +125,9 @@ bool CDriverGL::compilePixelProgram(NL3D::CPixelProgram *program)
|
|||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -129,6 +136,7 @@ bool CDriverGL::activeARBPixelProgram(CPixelProgram *program)
|
|||
{
|
||||
H_AUTO_OGL(CDriverGL_activeARBPixelProgram)
|
||||
|
||||
#ifndef USE_OPENGLES
|
||||
// Setup or unsetup ?
|
||||
if (program)
|
||||
{
|
||||
|
@ -151,14 +159,18 @@ bool CDriverGL::activeARBPixelProgram(CPixelProgram *program)
|
|||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
bool CDriverGL::setupPixelProgram(CPixelProgram *program, GLuint id/*, bool &specularWritten*/)
|
||||
{
|
||||
H_AUTO_OGL(CDriverGL_setupARBPixelProgram)
|
||||
H_AUTO_OGL(CDriverGL_setupARBPixelProgram);
|
||||
|
||||
#ifndef USE_OPENGLES
|
||||
CPixelProgamDrvInfosGL *drvInfo = static_cast<CPixelProgamDrvInfosGL *>((IProgramDrvInfos *)program->m_DrvInfo);
|
||||
|
||||
// Find a supported pixel program profile
|
||||
|
@ -227,6 +239,9 @@ bool CDriverGL::setupPixelProgram(CPixelProgram *program, GLuint id/*, bool &spe
|
|||
program->buildInfo(source);
|
||||
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef NL_STATIC
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <X11/Xatom.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/XKBlib.h>
|
||||
#include "nel/misc/debug.h"
|
||||
|
||||
|
||||
|
@ -566,7 +567,7 @@ bool CUnixEventEmitter::processMessage (XEvent &event, CEventServer *server)
|
|||
}
|
||||
else
|
||||
{
|
||||
k = XKeycodeToKeysym(_dpy, keyCode, 0);
|
||||
k = XkbKeycodeToKeysym(_dpy, keyCode, 0, 0);
|
||||
}
|
||||
|
||||
// send CEventKeyDown event only if keyCode is defined
|
||||
|
|
|
@ -264,9 +264,9 @@ void CLodCharacterShapeBuild::compile(const std::vector<bool> &triangleSelection
|
|||
void CLodCharacterShapeBuild::serial(NLMISC::IStream &f)
|
||||
{
|
||||
// NEL_CLODBULD
|
||||
f.serialCheck((uint32)'_LEN');
|
||||
f.serialCheck((uint32)'DOLC');
|
||||
f.serialCheck((uint32)'DLUB');
|
||||
f.serialCheck(NELID("_LEN"));
|
||||
f.serialCheck(NELID("DOLC"));
|
||||
f.serialCheck(NELID("DLUB"));
|
||||
|
||||
/*
|
||||
Version 1:
|
||||
|
@ -525,9 +525,9 @@ void CLodCharacterShape::CBoneInfluence::serial(NLMISC::IStream &f)
|
|||
void CLodCharacterShape::serial(NLMISC::IStream &f)
|
||||
{
|
||||
// NEL_CLODSHAP
|
||||
f.serialCheck((uint32)'_LEN');
|
||||
f.serialCheck((uint32)'DOLC');
|
||||
f.serialCheck((uint32)'PAHS');
|
||||
f.serialCheck(NELID("_LEN"));
|
||||
f.serialCheck(NELID("DOLC"));
|
||||
f.serialCheck(NELID("PAHS"));
|
||||
|
||||
/*
|
||||
Version 1:
|
||||
|
|
|
@ -152,7 +152,7 @@ void CPackedWorld::getZones(std::vector<TPackedZoneBaseSPtr> &zones)
|
|||
void CPackedWorld::serialZoneNames(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
f.serialVersion(1);
|
||||
f.serialCheck((uint32) 'OWPA');
|
||||
f.serialCheck(NELID("OWPA"));
|
||||
f.serialCont(ZoneNames);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ CPSLocated::CPSLocated() : /*_MaxNumFaces(0),*/
|
|||
_ParametricMotion(false),
|
||||
_TriggerOnDeath(false),
|
||||
_LastForever(true),
|
||||
_TriggerID((uint32) 'NONE'),
|
||||
_TriggerID(NELID("NONE")),
|
||||
_NonIntegrableForceNbRefs(0),
|
||||
_NumIntegrableForceWithDifferentBasis(0)
|
||||
{
|
||||
|
|
|
@ -405,7 +405,7 @@ void CInstanceGroup::serial (NLMISC::IStream& f)
|
|||
* ***********************************************/
|
||||
|
||||
// Serial a header
|
||||
f.serialCheck ((uint32)'TPRG');
|
||||
f.serialCheck (NELID("TPRG"));
|
||||
|
||||
/*
|
||||
Version 5:
|
||||
|
|
|
@ -116,7 +116,7 @@ IShape* CShapeStream::getShapePointer () const
|
|||
void CShapeStream::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
// First, serial an header or checking if it is correct
|
||||
f.serialCheck ((uint32)'PAHS');
|
||||
f.serialCheck (NELID("PAHS"));
|
||||
|
||||
// Then, serial the shape
|
||||
f.serialPolyPtr (_Shape);
|
||||
|
|
|
@ -60,7 +60,7 @@ void CSkeletonWeight::build (const TNodeArray& array)
|
|||
void CSkeletonWeight::serial (NLMISC::IStream& f)
|
||||
{
|
||||
// Serial a header
|
||||
f.serialCheck ((uint32)'TWKS');
|
||||
f.serialCheck (NELID("TWKS"));
|
||||
|
||||
// Serial a version number
|
||||
(void)f.serialVersion (0);
|
||||
|
|
|
@ -104,8 +104,8 @@ const sint CTileFarBank::_Version=0x0;
|
|||
void CTileFarBank::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
// Write/Check "FAR_BANK" in header of the stream
|
||||
f.serialCheck ((uint32)'_RAF');
|
||||
f.serialCheck ((uint32)'KNAB');
|
||||
f.serialCheck (NELID("_RAF"));
|
||||
f.serialCheck (NELID("KNAB"));
|
||||
|
||||
// Serial version
|
||||
(void)f.serialVersion(_Version);
|
||||
|
|
|
@ -192,10 +192,10 @@ void CVegetableShape::serial(NLMISC::IStream &f)
|
|||
- BestSidedPreComputeLighting
|
||||
*/
|
||||
sint ver= f.serialVersion(1);
|
||||
f.serialCheck((uint32)'_LEN');
|
||||
f.serialCheck((uint32)'GEV_');
|
||||
f.serialCheck((uint32)'BATE');
|
||||
f.serialCheck((uint32)'__EL');
|
||||
f.serialCheck(NELID("_LEN"));
|
||||
f.serialCheck(NELID("GEV_"));
|
||||
f.serialCheck(NELID("BATE"));
|
||||
f.serialCheck(NELID("__EL"));
|
||||
|
||||
f.serial(Lighted);
|
||||
f.serial(DoubleSided);
|
||||
|
|
|
@ -885,7 +885,7 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput
|
|||
}
|
||||
|
||||
// it is not allowed to write to an adress register except for ARL
|
||||
if (instrStr != 'ARL ')
|
||||
if (instrStr != NELID("ARL"))
|
||||
{
|
||||
if (instr.Dest.Type == CVPOperand::AddressRegister)
|
||||
{
|
||||
|
|
|
@ -458,7 +458,7 @@ void CZone::serial(NLMISC::IStream &f)
|
|||
throw EOlderStream(f);
|
||||
}
|
||||
|
||||
f.serialCheck((uint32)'ENOZ');
|
||||
f.serialCheck(NELID("ENOZ"));
|
||||
|
||||
f.xmlSerial (ZoneId, "ZONE_ID");
|
||||
f.xmlSerial (ZoneBB, "BB");
|
||||
|
|
|
@ -6,26 +6,15 @@ SOURCE_GROUP("src" FILES ${SRC})
|
|||
|
||||
NL_TARGET_LIB(nelgui ${SRC} ${HEADERS})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR})
|
||||
|
||||
TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${LIBXML2_LIBRARIES} ${LIBWWW_LIBRARIES} ${CURL_LIBRARIES})
|
||||
SET_TARGET_PROPERTIES(nelgui PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
NL_DEFAULT_PROPS(nelgui "NeL, Library: NeL GUI")
|
||||
NL_ADD_RUNTIME_FLAGS(nelgui)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR})
|
||||
|
||||
NL_ADD_LIB_SUFFIX(nelgui)
|
||||
|
||||
#MESSAGE( "libww libs: ${LIBWWW_LIBRARIES}" )
|
||||
|
||||
TARGET_LINK_LIBRARIES( nelgui
|
||||
nelmisc
|
||||
nel3d
|
||||
${LUA_LIBRARIES}
|
||||
${LUABIND_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${LIBWWW_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${CURL_DEFINITIONS} ${LUABIND_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
|
@ -33,5 +22,5 @@ IF(WITH_PCH)
|
|||
ENDIF(WITH_PCH)
|
||||
|
||||
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
||||
INSTALL(TARGETS nelgui LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
INSTALL(TARGETS nelgui LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries)
|
||||
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
||||
|
|
|
@ -549,27 +549,27 @@ namespace NLGUI
|
|||
if( editorMode )
|
||||
{
|
||||
prop = (char*) xmlGetProp( cur, BAD_CAST "onover" );
|
||||
if( prop != NULL )
|
||||
if (prop)
|
||||
mapAHString( "onover", std::string( (const char*)prop ) );
|
||||
|
||||
prop = (char*) xmlGetProp( cur, BAD_CAST "onclick_l" );
|
||||
if( prop != NULL )
|
||||
if (prop)
|
||||
mapAHString( "onclick_l", std::string( (const char*)prop ) );
|
||||
|
||||
prop = (char*) xmlGetProp( cur, BAD_CAST "ondblclick_l" );
|
||||
if( prop != NULL )
|
||||
if (prop)
|
||||
mapAHString( "ondblclick_l", std::string( (const char*)prop ) );
|
||||
|
||||
prop = (char*) xmlGetProp( cur, BAD_CAST "onclick_r" );
|
||||
if( prop != NULL )
|
||||
if (prop)
|
||||
mapAHString( "onclick_r", std::string( (const char*)prop ) );
|
||||
|
||||
prop = (char*) xmlGetProp( cur, BAD_CAST "onlongclick_l" );
|
||||
if( prop != NULL )
|
||||
if (prop)
|
||||
mapAHString( "onlongclick_l", std::string( (const char*)prop ) );
|
||||
|
||||
prop = (char*) xmlGetProp( cur, BAD_CAST "onclock_tick" );
|
||||
if( prop != NULL )
|
||||
if (prop)
|
||||
mapAHString( "onclock_tick", std::string( (const char*)prop ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -2233,35 +2233,35 @@ namespace NLGUI
|
|||
if( editorMode )
|
||||
{
|
||||
ptr = xmlGetProp( cur, BAD_CAST "on_open" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_open", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = xmlGetProp( cur, BAD_CAST "on_close" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_close", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = xmlGetProp( cur, BAD_CAST "on_close_button" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_close_button", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = xmlGetProp( cur, BAD_CAST "on_move" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_move", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = xmlGetProp( cur, BAD_CAST "on_deactive_check" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_deactive_check", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = xmlGetProp( cur, BAD_CAST "on_resize" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_resize", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = xmlGetProp( cur, BAD_CAST "on_alpha_settings_changed" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_alpha_settings_changed", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = xmlGetProp( cur, BAD_CAST "on_begin_move" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_begin_move", std::string( (const char*)ptr ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -540,7 +540,7 @@ namespace NLGUI
|
|||
if( editorMode )
|
||||
{
|
||||
prop = (char*) xmlGetProp( cur, BAD_CAST "onenter" );
|
||||
if( prop != NULL )
|
||||
if (prop)
|
||||
mapAHString( "onenter", std::string( (const char*)prop ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -244,29 +244,29 @@ namespace NLGUI
|
|||
// read modal option
|
||||
CXMLAutoPtr prop;
|
||||
prop = xmlGetProp (cur, (xmlChar*)"mouse_pos");
|
||||
if ( prop ) SpawnOnMousePos= convertBool(prop);
|
||||
if (prop) SpawnOnMousePos= convertBool(prop);
|
||||
prop = xmlGetProp (cur, (xmlChar*)"exit_click_out");
|
||||
if ( prop ) ExitClickOut= convertBool(prop);
|
||||
if (prop) ExitClickOut= convertBool(prop);
|
||||
prop = xmlGetProp (cur, (xmlChar*)"exit_click_l");
|
||||
if ( prop ) ExitClickL= convertBool(prop);
|
||||
if (prop) ExitClickL= convertBool(prop);
|
||||
prop = xmlGetProp (cur, (xmlChar*)"exit_click_r");
|
||||
if ( prop ) ExitClickR= convertBool(prop);
|
||||
if (prop) ExitClickR= convertBool(prop);
|
||||
prop = xmlGetProp (cur, (xmlChar*)"exit_click_b");
|
||||
if ( prop ) ExitClickR= ExitClickL= convertBool(prop);
|
||||
if (prop) ExitClickR= ExitClickL= convertBool(prop);
|
||||
prop = xmlGetProp (cur, (xmlChar*)"force_inside_screen");
|
||||
if ( prop ) ForceInsideScreen= convertBool(prop);
|
||||
if (prop) ForceInsideScreen= convertBool(prop);
|
||||
prop = xmlGetProp (cur, (xmlChar*)"category");
|
||||
if ( prop ) Category= (const char *) prop;
|
||||
if (prop) Category= (const char *) prop;
|
||||
prop = xmlGetProp (cur, (xmlChar*)"onclick_out");
|
||||
if ( prop ) OnClickOut = (const char *) prop;
|
||||
if (prop) OnClickOut = (const char *) prop;
|
||||
prop = xmlGetProp (cur, (xmlChar*)"onclick_out_params");
|
||||
if ( prop ) OnClickOutParams = (const char *) prop;
|
||||
if (prop) OnClickOutParams = (const char *) prop;
|
||||
prop = xmlGetProp (cur, (xmlChar*)"onpostclick_out");
|
||||
if ( prop ) OnPostClickOut = (const char *) prop;
|
||||
if (prop) OnPostClickOut = (const char *) prop;
|
||||
prop = xmlGetProp (cur, (xmlChar*)"onpostclick_out_params");
|
||||
if ( prop ) OnPostClickOutParams = (const char *) prop;
|
||||
if (prop) OnPostClickOutParams = (const char *) prop;
|
||||
prop = xmlGetProp (cur, (xmlChar*)"exit_key_pushed");
|
||||
if ( prop ) ExitKeyPushed= convertBool(prop);
|
||||
if (prop) ExitKeyPushed= convertBool(prop);
|
||||
|
||||
// Force parent hotspot for spawn on mouse
|
||||
if(SpawnOnMousePos)
|
||||
|
|
|
@ -119,11 +119,11 @@ namespace NLGUI
|
|||
if( editorMode )
|
||||
{
|
||||
CXMLAutoPtr ptr( (char*) xmlGetProp( cur, BAD_CAST "on_wheel_up" ) );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_wheel_up", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = (char*) xmlGetProp( cur, BAD_CAST "on_wheel_down" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_wheel_down", std::string( (const char*)ptr ) );
|
||||
|
||||
}
|
||||
|
|
|
@ -349,27 +349,27 @@ namespace NLGUI
|
|||
if( editorMode )
|
||||
{
|
||||
ptr = (char*) xmlGetProp( cur, BAD_CAST "on_active" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_active", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = (char*) xmlGetProp( cur, BAD_CAST "on_deactive" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_deactive", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = (char*) xmlGetProp( cur, BAD_CAST "group_onclick_r" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "group_onclick_r", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = (char*) xmlGetProp( cur, BAD_CAST "group_onclick_l" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "group_onclick_l", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = (char*) xmlGetProp( cur, BAD_CAST "on_enter" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_enter", std::string( (const char*)ptr ) );
|
||||
|
||||
ptr = (char*) xmlGetProp( cur, BAD_CAST "on_escape" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
mapAHString( "on_escape", std::string( (const char*)ptr ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#ifdef LUA_NEVRAX_VERSION
|
||||
#include "lua_ide_dll_nevrax/include/lua_ide_dll/ide_interface.h" // external debugger
|
||||
#endif
|
||||
const uint32 UI_CACHE_SERIAL_CHECK = (uint32) 'IUG_';
|
||||
const uint32 UI_CACHE_SERIAL_CHECK = NELID("IUG_");
|
||||
|
||||
using namespace NLMISC;
|
||||
using namespace std;
|
||||
|
@ -1001,7 +1001,7 @@ namespace NLGUI
|
|||
|
||||
ptr = (char*) xmlGetProp (cur, (xmlChar*)"target");
|
||||
std::string target;
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
{
|
||||
target = std::string( (const char*)ptr );
|
||||
if( !editorMode )
|
||||
|
@ -1136,17 +1136,17 @@ namespace NLGUI
|
|||
VariableData data;
|
||||
|
||||
ptr = xmlGetProp( cur, BAD_CAST "entry" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
data.entry = std::string( (const char*)ptr );
|
||||
|
||||
data.type = type;
|
||||
|
||||
ptr = xmlGetProp( cur, BAD_CAST "value" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
data.value = std::string( (const char*)ptr );
|
||||
|
||||
ptr = xmlGetProp( cur, BAD_CAST "size" );
|
||||
if( ptr != NULL )
|
||||
if( ptr )
|
||||
fromString( std::string( (const char*)ptr ), data.size );
|
||||
|
||||
variableCache[ data.entry ] = data;
|
||||
|
|
|
@ -80,7 +80,7 @@ void CMaterial::serial (NLMISC::IStream &s)
|
|||
s.xmlPush ("LIGO_MATERIAL");
|
||||
|
||||
// Serial the header
|
||||
s.serialCheck ((uint32)'TMOL');
|
||||
s.serialCheck (NELID("TMOL"));
|
||||
|
||||
// Serial the version
|
||||
/*sint ver =*/ s.serialVersion (0);
|
||||
|
|
|
@ -199,7 +199,7 @@ void CTransition::serial (NLMISC::IStream &s)
|
|||
s.xmlPush ("LIGO_TRANSITION");
|
||||
|
||||
// Serial the header
|
||||
s.serialCheck ((uint32)'STGL');
|
||||
s.serialCheck (NELID("STGL"));
|
||||
|
||||
// Serial the version
|
||||
/*sint ver =*/ s.serialVersion (0);
|
||||
|
|
|
@ -153,7 +153,7 @@ void CZoneRegion::serial (NLMISC::IStream &f)
|
|||
f.xmlPush ("LAND");
|
||||
|
||||
sint32 version = f.serialVersion (1);
|
||||
f.serialCheck ((uint32)'DNAL');
|
||||
f.serialCheck (NELID("DNAL"));
|
||||
|
||||
f.xmlSerial (_MinX, "MIN_X");
|
||||
f.xmlSerial (_MinY, "MIN_Y");
|
||||
|
|
|
@ -231,7 +231,14 @@ string CSystemInfo::getOS()
|
|||
}
|
||||
else if ( osvi.dwMajorVersion == 6 )
|
||||
{
|
||||
if ( osvi.dwMinorVersion == 1 )
|
||||
if ( osvi.dwMinorVersion == 2 )
|
||||
{
|
||||
if( osvi.wProductType == VER_NT_WORKSTATION )
|
||||
OSString += " Windows 8";
|
||||
else
|
||||
OSString += " Windows Server 2012";
|
||||
}
|
||||
else if ( osvi.dwMinorVersion == 1 )
|
||||
{
|
||||
if( osvi.wProductType == VER_NT_WORKSTATION )
|
||||
OSString += " Windows 7";
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "stdpacs.h"
|
||||
#include "nel/misc/i_xml.h"
|
||||
#include "nel/misc/stream.h"
|
||||
#include "nel/pacs/primitive_block.h"
|
||||
|
||||
|
||||
|
@ -85,7 +86,7 @@ void CPrimitiveBlock::serial (NLMISC::IStream &s)
|
|||
s.xmlPush ("PRIMITIVE_BLOCK");
|
||||
|
||||
// Serial checks
|
||||
s.serialCheck ((uint32)'KBRP');
|
||||
s.serialCheck (NELID("KBRP"));
|
||||
|
||||
// Serial the version
|
||||
(void)s.serialVersion (0);
|
||||
|
|
|
@ -1711,8 +1711,8 @@ void CObjectViewer::serial (NLMISC::IStream& f)
|
|||
{
|
||||
// version 4: include particle workspace infos
|
||||
// serial "OBJV_CFG"
|
||||
f.serialCheck ((uint32)'VJBO');
|
||||
f.serialCheck ((uint32)'GFC_');
|
||||
f.serialCheck (NELID("VJBO"));
|
||||
f.serialCheck (NELID("GFC_"));
|
||||
|
||||
// serial the version
|
||||
int ver=f.serialVersion (4);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${LIBXML2_INCLUDE_DIR}
|
||||
${QT_INCLUDES})
|
||||
${QT_INCLUDES}
|
||||
${LUA_INCLUDE_DIR})
|
||||
|
||||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
|
@ -71,6 +72,7 @@ TARGET_LINK_LIBRARIES(
|
|||
nelgui
|
||||
${QT_LIBRARIES}
|
||||
${QT_QTOPENGL_LIBRARY}
|
||||
${LIBXML2_LIBRARIES}
|
||||
qt_property_browser
|
||||
)
|
||||
|
||||
|
|
|
@ -253,10 +253,7 @@
|
|||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>horizontalLayoutWidget</zorder>
|
||||
<zorder>dataDirLabel</zorder>
|
||||
<zorder>horizontalLayoutWidget</zorder>
|
||||
<zorder></zorder>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -50,8 +50,8 @@ void CSchemeManager::getSchemes(const std::string &type, std::vector<TSchemeInfo
|
|||
void CSchemeManager::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
|
||||
f.serialCheck((uint32) '_GNM');
|
||||
f.serialCheck((uint32) 'MHCS');
|
||||
f.serialCheck(NELID("_GNM"));
|
||||
f.serialCheck(NELID("MHCS"));
|
||||
f.serialVersion(1);
|
||||
if (!f.isReading())
|
||||
{
|
||||
|
|
|
@ -42,15 +42,15 @@ static void compressMipMap(uint8 *pixSrc, sint width, sint height, vector<uint8
|
|||
case DXT1:
|
||||
case DXT1A:
|
||||
flags |= squish::kDxt1;
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D','X', 'T', '1');
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D', 'X', 'T', '1');
|
||||
break;
|
||||
case DXT3:
|
||||
flags |= squish::kDxt3;
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D','X', 'T', '3');
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D', 'X', 'T', '3');
|
||||
break;
|
||||
case DXT5:
|
||||
flags |= squish::kDxt5;
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D','X', 'T', '5');
|
||||
dest.ddpf.dwFourCC = MAKEFOURCC('D', 'X', 'T', '5');
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ private:
|
|||
/// Serializes
|
||||
void serial(NLMISC::IStream &f)
|
||||
{
|
||||
f.serialCheck((uint32)('PCHK'));
|
||||
f.serialCheck(NELID("PCHK"));
|
||||
f.serialVersion(0);
|
||||
|
||||
if (f.isReading())
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
FIND_PACKAGE(MySQL)
|
||||
FIND_PACKAGE(CURL)
|
||||
|
||||
IF(WITH_NELNS_SERVER)
|
||||
ADD_SUBDIRECTORY(admin_executor_service)
|
||||
|
|
|
@ -10,7 +10,7 @@ TARGET_LINK_LIBRARIES(nel_launcher_ext2
|
|||
nelnet
|
||||
nelmisc
|
||||
${ZLIB_LIBRARY}
|
||||
${CURL_LIBRARY})
|
||||
${CURL_LIBRARIES})
|
||||
|
||||
NL_DEFAULT_PROPS(nel_launcher_ext2 "NeLNS, Launcher: NeL Launcher Ext2")
|
||||
NL_ADD_RUNTIME_FLAGS(nel_launcher_ext2)
|
||||
|
|
|
@ -24,15 +24,9 @@ IF(WITH_RYZOM_TOOLS)
|
|||
ADD_SUBDIRECTORY(tools)
|
||||
ENDIF(WITH_RYZOM_TOOLS)
|
||||
|
||||
IF(WITH_RYZOM_SERVER)
|
||||
|
||||
FIND_PACKAGE(MySQL REQUIRED)
|
||||
ADD_SUBDIRECTORY(server)
|
||||
|
||||
ELSEIF(WITH_RYZOM_TOOLS)
|
||||
|
||||
IF(WITH_RYZOM_SERVER OR WITH_RYZOM_TOOLS)
|
||||
# Need servershare for build packed collision tool
|
||||
# Need aishare for build wmap tool
|
||||
FIND_PACKAGE(MySQL REQUIRED)
|
||||
ADD_SUBDIRECTORY(server)
|
||||
|
||||
ENDIF(WITH_RYZOM_SERVER)
|
||||
ENDIF(WITH_RYZOM_SERVER OR WITH_RYZOM_TOOLS)
|
||||
|
|
|
@ -488,7 +488,7 @@ void CCharacterCL::stopAttachedFXForCurrrentAnim(bool stopLoopingFX)
|
|||
{
|
||||
if(!(*tmpItAttached)->FX.empty())
|
||||
{
|
||||
if (!(*tmpItAttached)->FX.removeByID('STOP') && !(*tmpItAttached)->FX.removeByID('main'))
|
||||
if (!(*tmpItAttached)->FX.removeByID(NELID("STOP")) && !(*tmpItAttached)->FX.removeByID(NELID("main")))
|
||||
{
|
||||
(*tmpItAttached)->FX.activateEmitters(false);
|
||||
}
|
||||
|
@ -9373,7 +9373,7 @@ void CCharacterCL::CWornItem::enableAdvantageFX(NL3D::UInstance parent)
|
|||
if (!enabled)
|
||||
{
|
||||
// well, it is unlikely that player will loses its ability to master an item after he gained it, but manage the case anyway.
|
||||
if (!AdvantageFX.removeByID('STOP') && !AdvantageFX.removeByID('main'))
|
||||
if (!AdvantageFX.removeByID(NELID("STOP")) && !AdvantageFX.removeByID(NELID("main")))
|
||||
{
|
||||
AdvantageFX.activateEmitters(false);
|
||||
}
|
||||
|
|
|
@ -263,7 +263,7 @@ CFxCL::~CFxCL()
|
|||
// Stop emitters
|
||||
UParticleSystemInstance fxInst;
|
||||
fxInst.cast (_Instance);
|
||||
if (!fxInst.removeByID( 'STOP' ) && !fxInst.removeByID( 'main' ) )
|
||||
if (!fxInst.removeByID(NELID("STOP")) && !fxInst.removeByID(NELID("main")))
|
||||
{
|
||||
fxInst.activateEmitters( false );
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ protected:
|
|||
float TimeOut;
|
||||
bool TestNoMoreParticles;
|
||||
public:
|
||||
CFX2Remove(NL3D::UParticleSystemInstance instance=NL3D::UParticleSystemInstance(), float timeOut = NULL, bool testNoMoreParticles = false)
|
||||
CFX2Remove(NL3D::UParticleSystemInstance instance=NL3D::UParticleSystemInstance(), float timeOut = 0.f, bool testNoMoreParticles = false)
|
||||
{
|
||||
Instance = instance;
|
||||
TimeOut = timeOut;
|
||||
|
|
|
@ -47,8 +47,8 @@ void CHairSet::init (NLMISC::IProgressCallback &progress)
|
|||
const CItemSheet *item = SheetMngr.getItem(SLOTTYPE::HEAD_SLOT, k);
|
||||
if( (item) && (!item->getShape().empty()) )
|
||||
{
|
||||
std::string itemName = item->getShape();
|
||||
itemName = NLMISC::strlwr(itemName);
|
||||
std::string itemName = NLMISC::toLower(item->getShape());
|
||||
|
||||
if (item->getShape().find("cheveux", 0) != std::string::npos)
|
||||
{
|
||||
// get race
|
||||
|
|
|
@ -64,7 +64,7 @@ bool CPositionState::getPos(sint32 &px, sint32 &py)
|
|||
// ***************************************************************************
|
||||
void CPositionState::serialNodeLeaf(NLMISC::IStream &f, CCDBNodeLeaf *&dbNode)
|
||||
{
|
||||
f.serialCheck((uint32) 'NL__');
|
||||
f.serialCheck(NELID("NL__"));
|
||||
f.serialVersion(0);
|
||||
std::string dbPath;
|
||||
if (f.isReading())
|
||||
|
@ -85,18 +85,18 @@ void CPositionState::serialNodeLeaf(NLMISC::IStream &f, CCDBNodeLeaf *&dbNode)
|
|||
}
|
||||
f.serial(dbPath);
|
||||
}
|
||||
f.serialCheck((uint32) 'END_');
|
||||
f.serialCheck(NELID("END_"));
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
void CUIDEntityPositionState::serial(NLMISC::IStream &f)
|
||||
{
|
||||
f.serialCheck((uint32) 'UIDE');
|
||||
f.serialCheck(NELID("UIDE"));
|
||||
f.serialVersion(0);
|
||||
serialNodeLeaf(f, _DBPos);
|
||||
serialNodeLeaf(f, _Uid);
|
||||
f.serialCheck((uint32) '_END');
|
||||
f.serialCheck(NELID("_END"));
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -241,11 +241,11 @@ bool CAnimalPositionState::getPos(sint32 &px, sint32 &py)
|
|||
// ***************************************************************************
|
||||
void CAnimalPositionState::serial(NLMISC::IStream &f)
|
||||
{
|
||||
f.serialCheck((uint32) 'APS_');
|
||||
f.serialCheck(NELID("APS_"));
|
||||
f.serialVersion(0);
|
||||
CUIDEntityPositionState::serial(f);
|
||||
serialNodeLeaf(f, _Status);
|
||||
f.serialCheck((uint32) 'END_');
|
||||
f.serialCheck(NELID("END_"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -257,7 +257,7 @@ void CAnimalPositionState::serial(NLMISC::IStream &f)
|
|||
// ***************************************************************************
|
||||
CEntityCL *CNamedEntityPositionState::getEntity()
|
||||
{
|
||||
if (!dbOk()) return false;
|
||||
if (!dbOk()) return NULL;
|
||||
return EntitiesMngr.getEntityByName(_Name->getValue32());
|
||||
}
|
||||
|
||||
|
@ -299,11 +299,11 @@ bool CDialogEntityPositionState::getDbPos(sint32 &px, sint32 &py)
|
|||
// ***************************************************************************
|
||||
void CNamedEntityPositionState::serial(NLMISC::IStream &f)
|
||||
{
|
||||
f.serialCheck((uint32) 'NEPS');
|
||||
f.serialCheck(NELID("NEPS"));
|
||||
f.serialVersion(0);
|
||||
serialNodeLeaf(f, _Name);
|
||||
serialNodeLeaf(f, _X);
|
||||
serialNodeLeaf(f, _Y);
|
||||
f.serialCheck((uint32) 'END_');
|
||||
f.serialCheck(NELID("END_"));
|
||||
}
|
||||
|
||||
|
|
|
@ -591,7 +591,7 @@ bool CDBCtrlSheet::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|||
return false;
|
||||
|
||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"dragable" );
|
||||
if( prop != NULL )
|
||||
if (prop)
|
||||
setDraggable( CInterfaceElement::convertBool(prop) );
|
||||
else
|
||||
setDraggable( false );
|
||||
|
|
|
@ -110,7 +110,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
|
||||
// value
|
||||
prop = xmlGetProp (cur, (xmlChar*)"value");
|
||||
if ( prop )
|
||||
if (prop)
|
||||
{
|
||||
// get a branch in the database.
|
||||
CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop);
|
||||
|
|
|
@ -94,7 +94,7 @@ bool CDBGroupListSheetText::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
|
||||
// value
|
||||
prop = xmlGetProp (cur, (xmlChar*)"value");
|
||||
if ( prop )
|
||||
if (prop)
|
||||
{
|
||||
// get a branch in the database.
|
||||
CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
void CFilteredChatSummary::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
sint ver= f.serialVersion(2);
|
||||
f.serialCheck((uint32) 'USHC');
|
||||
f.serialCheck(NELID("USHC"));
|
||||
f.serial(SrcGuild);
|
||||
f.serial(SrcTeam);
|
||||
f.serial(SrcAroundMe);
|
||||
|
@ -42,7 +42,7 @@ void CFilteredChatSummary::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
void CFilteredDynChatSummary::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
sint ver = f.serialVersion(0);
|
||||
f.serialCheck((uint32) 'USHC');
|
||||
f.serialCheck(NELID("USHC"));
|
||||
if (ver >= 0)
|
||||
{
|
||||
for (uint8 i = 0; i < CChatGroup::MaxDynChanPerPlayer; i++)
|
||||
|
|
|
@ -68,7 +68,7 @@ void CCompassTarget::serial(NLMISC::IStream &f)
|
|||
return;
|
||||
}
|
||||
}
|
||||
f.serialCheck((uint32) 'CTAR');
|
||||
f.serialCheck(NELID("CTAR"));
|
||||
f.serialVersion(0);
|
||||
f.serial(Pos);
|
||||
// for the name, try to save a string identifier if possible, because language may be changed between
|
||||
|
@ -95,7 +95,7 @@ void CCompassTarget::serial(NLMISC::IStream &f)
|
|||
_PositionState = NULL;
|
||||
}
|
||||
}
|
||||
f.serialCheck((uint32) '_END');
|
||||
f.serialCheck(NELID("_END"));
|
||||
// if language has been modified, then we are not able to display correctly the name, so just
|
||||
// reset the compass to north to avoid incoherency
|
||||
if (f.isReading())
|
||||
|
@ -811,18 +811,19 @@ void CGroupCompasMenu::setActive (bool state)
|
|||
uint nbUserLandMarks = std::min( uint(currCont->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks() );
|
||||
|
||||
// Sort the landmarks
|
||||
std::sort(currCont->UserLandMarks.begin(), currCont->UserLandMarks.end(), UserLandMarksSortPredicate);
|
||||
std::vector<CUserLandMark> sortedLandmarks(currCont->UserLandMarks);
|
||||
std::sort(sortedLandmarks.begin(), sortedLandmarks.end(), UserLandMarksSortPredicate);
|
||||
|
||||
for(k = 0; k < nbUserLandMarks; ++k)
|
||||
{
|
||||
if (currCont->UserLandMarks[k].Type < CUserLandMark::UserLandMarkTypeCount)
|
||||
if (sortedLandmarks[k].Type < CUserLandMark::UserLandMarkTypeCount)
|
||||
{
|
||||
CCompassTarget ct;
|
||||
ct.setType(CCompassTarget::UserLandMark);
|
||||
ct.Pos = currCont->UserLandMarks[k].Pos;
|
||||
ct.Name = currCont->UserLandMarks[k].Title;
|
||||
ct.Pos = sortedLandmarks[k].Pos;
|
||||
ct.Name = sortedLandmarks[k].Title;
|
||||
Targets.push_back(ct);
|
||||
landMarkSubMenus[currCont->UserLandMarks[k].Type]->addLine(ct.Name, "set_compas", toString("compass=%s|id=%d|menu=%s", _TargetCompass.c_str(), (int) Targets.size() - 1, _Id.c_str()));
|
||||
landMarkSubMenus[sortedLandmarks[k].Type]->addLine(ct.Name, "set_compas", toString("compass=%s|id=%d|menu=%s", _TargetCompass.c_str(), (int) Targets.size() - 1, _Id.c_str()));
|
||||
selectable= true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1663,7 +1663,7 @@ bool CInterfaceManager::loadConfig (const string &filename)
|
|||
// serial user chats info (serial it before position of windows so that they can be updated properly)
|
||||
if (ver >= 1)
|
||||
{
|
||||
f.serialCheck(uint32('_ICU'));
|
||||
f.serialCheck(NELID("_ICU"));
|
||||
if (!PeopleInterraction.loadUserChatsInfos(f))
|
||||
{
|
||||
nlwarning("Bad user chat saving");
|
||||
|
@ -1671,7 +1671,7 @@ bool CInterfaceManager::loadConfig (const string &filename)
|
|||
}
|
||||
|
||||
// header
|
||||
f.serialCheck(uint32('GFCI'));
|
||||
f.serialCheck(NELID("GFCI"));
|
||||
f.serial(nNbMode);
|
||||
f.serial(_CurrentMode);
|
||||
if(ver>=10)
|
||||
|
@ -1897,7 +1897,7 @@ bool CInterfaceManager::saveConfig (const string &filename)
|
|||
f.serialVersion(ICFG_STREAM_VERSION);
|
||||
|
||||
// serial user chats info (serial it before position of windows so that they can be updated properly)
|
||||
f.serialCheck(uint32('_ICU'));
|
||||
f.serialCheck(NELID("_ICU"));
|
||||
if (!PeopleInterraction.saveUserChatsInfos(f))
|
||||
{
|
||||
nlwarning("Config saving failed");
|
||||
|
@ -1907,7 +1907,7 @@ bool CInterfaceManager::saveConfig (const string &filename)
|
|||
}
|
||||
|
||||
// header
|
||||
f.serialCheck(uint32('GFCI'));
|
||||
f.serialCheck(NELID("GFCI"));
|
||||
f.serial(i);
|
||||
f.serial(_CurrentMode);
|
||||
f.serial(_LastInGameScreenW);
|
||||
|
|
|
@ -1695,14 +1695,14 @@ bool CPeopleInterraction::saveUserChatsInfos(NLMISC::IStream &f)
|
|||
try
|
||||
{
|
||||
sint ver= f.serialVersion(USER_CHATS_INFO_VERSION);
|
||||
f.serialCheck((uint32) 'TAHC');
|
||||
f.serialCheck(NELID("TAHC"));
|
||||
//saveFilteredChat(f, MainChat);
|
||||
saveFilteredChat(f, ChatGroup);
|
||||
for(uint k = 0; k < MaxNumUserChats; ++k)
|
||||
{
|
||||
saveFilteredChat(f, UserChat[k]);
|
||||
}
|
||||
f.serialCheck((uint32) 'TAHC');
|
||||
f.serialCheck(NELID("TAHC"));
|
||||
if (ver>=1)
|
||||
{
|
||||
CChatGroupWindow *pCGW = PeopleInterraction.getChatGroupWindow();
|
||||
|
@ -1732,7 +1732,7 @@ bool CPeopleInterraction::saveUserDynChatsInfos(NLMISC::IStream &f)
|
|||
try
|
||||
{
|
||||
sint ver = f.serialVersion(USER_DYN_CHATS_INFO_VERSION);
|
||||
f.serialCheck((uint32) 'OMGY');
|
||||
f.serialCheck(NELID("OMGY"));
|
||||
if (ver >= 1)
|
||||
{
|
||||
saveFilteredDynChat(f, TheUserChat);
|
||||
|
@ -1755,7 +1755,7 @@ bool CPeopleInterraction::loadUserChatsInfos(NLMISC::IStream &f)
|
|||
{
|
||||
bool present;
|
||||
sint ver = f.serialVersion(USER_CHATS_INFO_VERSION);
|
||||
f.serialCheck((uint32) 'TAHC');
|
||||
f.serialCheck(NELID("TAHC"));
|
||||
f.serial(present);
|
||||
if (!present)
|
||||
{
|
||||
|
@ -1777,7 +1777,7 @@ bool CPeopleInterraction::loadUserChatsInfos(NLMISC::IStream &f)
|
|||
setupUserChatFromSummary(fcs, UserChat[k]);
|
||||
}
|
||||
}
|
||||
f.serialCheck((uint32) 'TAHC');
|
||||
f.serialCheck(NELID("TAHC"));
|
||||
if (ver>=1)
|
||||
{
|
||||
// CChatGroupWindow *pCGW = PeopleInterraction.getChatGroupWindow();
|
||||
|
@ -1819,7 +1819,7 @@ bool CPeopleInterraction::loadUserDynChatsInfos(NLMISC::IStream &f)
|
|||
{
|
||||
bool present;
|
||||
sint ver = f.serialVersion(USER_DYN_CHATS_INFO_VERSION);
|
||||
f.serialCheck((uint32) 'OMGY');
|
||||
f.serialCheck(NELID("OMGY"));
|
||||
f.serial(present);
|
||||
if (!present)
|
||||
{
|
||||
|
|
|
@ -1943,16 +1943,21 @@ class CAHInitResLod : public IActionHandler
|
|||
|
||||
VideoModes.clear();
|
||||
StringModeList.clear();
|
||||
StringModeList.push_back("uiConfigWindowed");
|
||||
|
||||
CurrentMode = getRyzomModes(VideoModes, StringModeList);
|
||||
|
||||
// getRyzomModes() expects empty list, so we need to insert 'Windowed' after mode list is filled
|
||||
StringModeList.insert(StringModeList.begin(), "uiConfigWindowed");
|
||||
|
||||
// If the client is in windowed mode, still in windowed mode and do not change anything
|
||||
if (ClientCfg.Windowed)
|
||||
CurrentMode = 0;
|
||||
// If we have not found the mode so it can be an error or machine change, so propose the first available
|
||||
else if (CurrentMode == -1)
|
||||
CurrentMode = 1;
|
||||
// We inserted 'Windowed' as first mode, so index needs to move too
|
||||
else
|
||||
++CurrentMode;
|
||||
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:res_value"));
|
||||
|
@ -2111,7 +2116,12 @@ class CAHUninitResLod : public IActionHandler
|
|||
//nlinfo("CAHUninitResLod called");
|
||||
|
||||
// If the mode requested is a windowed mode do nothnig
|
||||
if (CurrentMode != 0)
|
||||
if (CurrentMode == 0)
|
||||
{
|
||||
ClientCfg.Windowed = true;
|
||||
ClientCfg.writeBool("FullScreen", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ClientCfg.Windowed = false;
|
||||
// Get W, H
|
||||
|
@ -2125,6 +2135,10 @@ class CAHUninitResLod : public IActionHandler
|
|||
}
|
||||
ClientCfg.Width = w;
|
||||
ClientCfg.Height = h;
|
||||
|
||||
ClientCfg.writeBool("FullScreen", true);
|
||||
ClientCfg.writeInt("Width", w);
|
||||
ClientCfg.writeInt("Height", h);
|
||||
}
|
||||
|
||||
if (CurrentPreset != 4) // CInterfaceDDX::CustomPreset
|
||||
|
|
|
@ -648,7 +648,7 @@ void CProjectileManager::CProjectile::shutDown(CCharacterCL *target)
|
|||
target->buildAlignMatrix(userMatrix);
|
||||
FX[k].forceSetUserMatrix(userMatrix);
|
||||
}
|
||||
if (!FX[k].removeByID('STOP') && !FX[k].removeByID('main'))
|
||||
if (!FX[k].removeByID(NELID("STOP")) && !FX[k].removeByID(NELID("main")))
|
||||
{
|
||||
FX[k].activateEmitters(false);
|
||||
//nlwarning("Projectile with a particle system that has no 'STOP' emitter");
|
||||
|
|
|
@ -429,7 +429,7 @@ CPackedWorld *CIslandCollision::reloadPackedIsland(const CScenarioEntryPoints::C
|
|||
try
|
||||
{
|
||||
CIFile f(CPath::lookup(islandDesc.Island + ".island_hm"));
|
||||
f.serialCheck((uint32) 'MHSI');
|
||||
f.serialCheck(NELID("MHSI"));
|
||||
f.serial(_HeightMap);
|
||||
}
|
||||
catch(const Exception &e)
|
||||
|
|
|
@ -468,8 +468,6 @@ void releaseOutGame()
|
|||
// flush the server string cache
|
||||
STRING_MANAGER::CStringManagerClient::instance()->flushStringCache();
|
||||
|
||||
ClientCfg.release ();
|
||||
|
||||
// Disconnect the client from the server.
|
||||
NetMngr.disconnect();
|
||||
|
||||
|
|
|
@ -341,8 +341,8 @@ private:
|
|||
|
||||
void serial(NLMISC::IStream &f)
|
||||
{
|
||||
f.serialCheck((uint32)'_RTS');
|
||||
f.serialCheck((uint32)'KCAP');
|
||||
f.serialCheck(NELID("_RTS"));
|
||||
f.serialCheck(NELID("KCAP"));
|
||||
f.serialVersion(0);
|
||||
f.serial(PackedVersion);
|
||||
f.serial(LanguageCode);
|
||||
|
|
|
@ -544,7 +544,7 @@ void CTimedFXManager::CManagedFX::shutDown(NL3D::UScene *scene, CFXManager &fxMa
|
|||
// fx isn't spwaned, so must tell fx to stop its emitters
|
||||
if (Instance.isSystemPresent() && Instance.isValid())
|
||||
{
|
||||
if (!Instance.removeByID('main') && !Instance.removeByID('STOP'))
|
||||
if (!Instance.removeByID(NELID("main")) && !Instance.removeByID(NELID("STOP")))
|
||||
{
|
||||
// if a specific emitter has not be tagged, just stop all emitters if there's no better solution
|
||||
Instance.activateEmitters(false);
|
||||
|
|
|
@ -325,9 +325,11 @@ static _TOKENS_CLASSNAME _TOKENS_OBJNAME;
|
|||
|
||||
#else
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
#pragma message( " ")
|
||||
#pragma message( "NON-OPTIMISED: Persistent data class " NL_MACRO_TO_STR(PERSISTENT_CLASS) " not using a token family")
|
||||
#pragma message( " ")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ void CSecurityCheckForFastDisconnection::forwardSecurityCode(NLMISC::IStream& ms
|
|||
}
|
||||
|
||||
//
|
||||
CSecurityCode CSecurityCheckForFastDisconnection::encode(char *passPhrase)
|
||||
CSecurityCode CSecurityCheckForFastDisconnection::encode(const char *passPhrase)
|
||||
{
|
||||
if (!passPhrase)
|
||||
throw Exception("Null passPhrase");
|
||||
|
@ -56,7 +56,7 @@ CSecurityCode CSecurityCheckForFastDisconnection::encode(char *passPhrase)
|
|||
}
|
||||
|
||||
//
|
||||
void CSecurityCheckForFastDisconnection::check(char *passPhrase)
|
||||
void CSecurityCheckForFastDisconnection::check(const char *passPhrase)
|
||||
{
|
||||
if (SecurityCode != encode(passPhrase))
|
||||
throw Exception("Check not passed");
|
||||
|
|
|
@ -61,9 +61,9 @@ public:
|
|||
/// Set cookie
|
||||
void setCookie(const NLNET::CLoginCookie& cookie) { Block.Cookie.set(cookie.getUserAddr(), cookie.getUserKey(), cookie.getUserId()); } // don't use the default generated bitwise assignment operator, because of padding junk that would be copied
|
||||
/// Return the security code
|
||||
CSecurityCode encode(char *passPhrase);
|
||||
CSecurityCode encode(const char *passPhrase);
|
||||
/// Check the security code
|
||||
void check(char *passPhrase);
|
||||
void check(const char *passPhrase);
|
||||
|
||||
/// Read some data from stream
|
||||
void receiveSecurityCode(NLMISC::IStream& msgin);
|
||||
|
|
|
@ -2277,7 +2277,7 @@ public:
|
|||
sint32 xmax = (sint32) max.x();
|
||||
sint32 ymin = (sint32) (sint16) min.y();
|
||||
sint32 ymax = (sint32) (sint16) max.y();
|
||||
output.serialCheck((uint32) 'OBSI');
|
||||
output.serialCheck(NELID("OBSI"));
|
||||
output.serial(xmin);
|
||||
output.serial(xmax);
|
||||
output.serial(ymin);
|
||||
|
|
|
@ -1700,7 +1700,7 @@ NLMISC_COMMAND(scriptHex,"execute a hex-encoded script for a group in the given
|
|||
return true;
|
||||
}
|
||||
|
||||
static char* hexEncoderTcl =
|
||||
static const char* hexEncoderTcl =
|
||||
"proc copy_encoded {} {"
|
||||
" # Get the args from the text fields"
|
||||
" set group [ .group.name get 1.0 end ]"
|
||||
|
|
|
@ -553,7 +553,7 @@ void CWorldMap::clear()
|
|||
|
||||
void CWorldMap::serial(NLMISC::IStream &f)
|
||||
{
|
||||
f.serialCheck((uint32)'WMAP');
|
||||
f.serialCheck(NELID("WMAP"));
|
||||
|
||||
// Version
|
||||
// 0: initial version
|
||||
|
|
|
@ -1633,18 +1633,27 @@ CTopology::CTopology()
|
|||
{
|
||||
}
|
||||
|
||||
// convert a 2 characters string to uint16
|
||||
#ifdef NL_LITTLE_ENDIAN
|
||||
# define NELID16(x) (uint16((x[0] << 8) | (x[1])))
|
||||
#else
|
||||
# define NELID16(x) (uint16((x[1] << 8) | (x[0])))
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
inline
|
||||
void CTopology::serial(NLMISC::IStream& f)
|
||||
{
|
||||
|
||||
uint version = 0;
|
||||
|
||||
uint16 check = (uint16)'Tp';
|
||||
uint16 check = NELID16("Tp");
|
||||
f.serial(check);
|
||||
|
||||
if (check != (uint16)'TP')
|
||||
if (check != NELID16("TP"))
|
||||
{
|
||||
nlassert(check == (uint16)'Tp');
|
||||
nlassert(check == NELID16("Tp"));
|
||||
version = f.serialVersion(3);
|
||||
}
|
||||
|
||||
|
@ -2285,7 +2294,7 @@ sint CWhiteCell::getHeight(CWorldPosition const& wpos) const
|
|||
inline
|
||||
void CWhiteCell::serial(NLMISC::IStream& f)
|
||||
{
|
||||
f.serialCheck((uint16)'WC');
|
||||
f.serialCheck(NELID16("WC"));
|
||||
if (f.isReading())
|
||||
_HeightMap = I16x16Layer::load(f);
|
||||
else
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
namespace EGSPD
|
||||
{
|
||||
|
||||
static const struct { char* Name; CFameTrend::TFameTrend Value; } TFameTrendConvert[] =
|
||||
static const struct { const char* Name; CFameTrend::TFameTrend Value; } TFameTrendConvert[] =
|
||||
{
|
||||
{ "FameUpward", CFameTrend::FameUpward },
|
||||
{ "FameDownward", CFameTrend::FameDownward },
|
||||
|
|
|
@ -494,7 +494,7 @@ bool CGuildMemberModule::canAffectGrade(EGSPD::CGuildGrade::TGuildGrade)const
|
|||
CMissionGuild * CGuildMemberModule::pickMission( TAIAlias alias )
|
||||
{
|
||||
/// todo guild mission
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
@ -1270,7 +1270,7 @@ bool forageTestDoExtract(
|
|||
testSource->extractMaterial( req, abs, ForageQualityCeilingFactor.get(), ForageQualitySlowFactor.get(), res, successFactor, 0, row, propDrop );
|
||||
fprintf( f, "%g;%g;%g;%g;%g;%g;%g;%g;%g;%u;%u;\n",
|
||||
res[CHarvestSource::A], res[CHarvestSource::Q],
|
||||
testSource->getD(), testSource->getE(), 0 /*testSource->getC()*/,
|
||||
testSource->getD(), testSource->getE(), 0.f /*testSource->getC()*/,
|
||||
reqS, reqA, reqQ,
|
||||
testSource->quantity(), testSource->getImpactScheme()*5, 127 );
|
||||
if ( (!eventD) && (testSource->getD() > 127) )
|
||||
|
|
|
@ -29,10 +29,7 @@ CCombatAction * CCombatAIActionFactory::buildAiAction(const CStaticAiAction *aiA
|
|||
nlassert(phrase);
|
||||
#endif
|
||||
const AI_ACTION::TAiActionType actionType = aiAction->getType();
|
||||
if (actionType != AI_ACTION::Melee && actionType != AI_ACTION::Range)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (actionType != AI_ACTION::Melee && actionType != AI_ACTION::Range) return NULL;
|
||||
|
||||
AI_ACTION::TAiEffectType effectType = aiAction->getData().Combat.EffectFamily;
|
||||
|
||||
|
|
|
@ -1936,7 +1936,7 @@ void CDepositMapsBatchTask::run()
|
|||
CSString res;
|
||||
disp.write( res );
|
||||
res = res.replace( "\n", "<BR>\n" );
|
||||
fprintf( outputF, res.c_str() );
|
||||
fprintf( outputF, "%s", res.c_str() );
|
||||
|
||||
// Close files
|
||||
fclose( inputF );
|
||||
|
|
|
@ -22,13 +22,17 @@ class CEntityState;
|
|||
class COfflineEntityState;
|
||||
class CCharacterRespawnPoints;
|
||||
class CFarPosition;
|
||||
class NLNET::CMessage;
|
||||
class CModuleParent;
|
||||
|
||||
namespace NLNET
|
||||
{
|
||||
class CMessage;
|
||||
}
|
||||
|
||||
namespace R2
|
||||
{
|
||||
struct TUserRole;
|
||||
};
|
||||
}
|
||||
|
||||
class CRingRewardPoints;
|
||||
|
||||
|
|
|
@ -349,13 +349,13 @@ static std::string getActiveOutputPath()
|
|||
if (TheCharScanScriptFile==NULL)
|
||||
{
|
||||
nlwarning("There is no active script file right now from which to extract output directory");
|
||||
return false;
|
||||
return "";
|
||||
}
|
||||
bool isOK=true;
|
||||
|
||||
// write the current script file to a tmp file
|
||||
isOK=TheCharScanScriptFile->writeToFile(TmpScriptFileName);
|
||||
if (!isOK) return false;
|
||||
if (!isOK) return "";
|
||||
|
||||
// create a new script object and assign the tmp file to it
|
||||
CCharScanScript script;
|
||||
|
|
|
@ -336,7 +336,7 @@ void cbImpulsionFilter( CMessage& msgin, const string &serviceName, TServiceId s
|
|||
} // impulsionFilter //
|
||||
|
||||
|
||||
static char*DebugChatModeName[] =
|
||||
static const char* DebugChatModeName[] =
|
||||
{
|
||||
"say",
|
||||
"shout",
|
||||
|
|
|
@ -42,7 +42,7 @@ extern CVariable<bool> VerboseStringManager;
|
|||
#define LOG if (!VerboseStringManager) {} else nlinfo
|
||||
|
||||
|
||||
char *OperatorNames[] =
|
||||
const char *OperatorNames[] =
|
||||
{
|
||||
"equal",
|
||||
"notEqual",
|
||||
|
|
|
@ -521,9 +521,7 @@ public:
|
|||
BsiGlobal);
|
||||
saveFile.FileName = threadResult.OutputFilename;
|
||||
|
||||
char *newLine="\n";
|
||||
|
||||
|
||||
const char *newLine="\n";
|
||||
|
||||
list<string>::const_iterator first(threadResult.Lines->begin()), last(threadResult.Lines->end());
|
||||
for (uint32 localCounter = 0; first != last; ++first, ++localCounter)
|
||||
|
|
|
@ -259,7 +259,7 @@ bool CDBDeltaFile::preload()
|
|||
*/
|
||||
bool CDBDeltaFile::serialHeader()
|
||||
{
|
||||
serialCheck((uint32)'DbDt');
|
||||
serialCheck(NELID("DbDt"));
|
||||
uint version = serialVersion(0);
|
||||
|
||||
if (isReading())
|
||||
|
@ -280,7 +280,7 @@ bool CDBDeltaFile::serialHeader()
|
|||
serial(_Header);
|
||||
}
|
||||
|
||||
serialCheck((uint32)'Data');
|
||||
serialCheck(NELID("Data"));
|
||||
|
||||
_DataStart = ftell(_File);
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ private:
|
|||
|
||||
void serial(NLMISC::IStream& s)
|
||||
{
|
||||
s.serialCheck((uint32)'DHdr');
|
||||
s.serialCheck(NELID("DHdr"));
|
||||
uint version = s.serialVersion(0);
|
||||
|
||||
s.serial(RowSize);
|
||||
|
|
|
@ -483,7 +483,7 @@ bool CDBReferenceFile::read(uint32 index, uint8* rowdata)
|
|||
*/
|
||||
bool CDBReferenceFile::serialHeader()
|
||||
{
|
||||
serialCheck((uint32)'DbRf');
|
||||
serialCheck(NELID("DbRf"));
|
||||
uint version = serialVersion(0);
|
||||
|
||||
if (isReading())
|
||||
|
@ -504,7 +504,7 @@ bool CDBReferenceFile::serialHeader()
|
|||
serial(_Header);
|
||||
}
|
||||
|
||||
serialCheck((uint32)'Data');
|
||||
serialCheck(NELID("Data"));
|
||||
|
||||
_DataStart = ftell(_File);
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ private:
|
|||
|
||||
void serial(NLMISC::IStream& s)
|
||||
{
|
||||
s.serialCheck((uint32)'RHdr');
|
||||
s.serialCheck(NELID("RHdr"));
|
||||
uint version = s.serialVersion(0);
|
||||
|
||||
s.serial(BaseIndex);
|
||||
|
|
|
@ -1436,7 +1436,7 @@ inline uint32 CDbMessage::getMessageHeaderSize()
|
|||
*/
|
||||
inline void CUpdateLog::serial(NLMISC::IStream& f)
|
||||
{
|
||||
f.serialCheck((uint32)'ULOG');
|
||||
f.serialCheck(NELID("ULOG"));
|
||||
|
||||
uint version = f.serialVersion(1);
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ void CDatabaseState::serial(NLMISC::IStream& s)
|
|||
{
|
||||
s.xmlPush("database_state");
|
||||
|
||||
s.serialCheck((uint32)'DBST');
|
||||
s.serialCheck(NELID("DBST"));
|
||||
uint version = s.serialVersion(0);
|
||||
|
||||
s.xmlPush("name");
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
{
|
||||
s.xmlPush("reference");
|
||||
|
||||
s.serialCheck((uint32)'RIDX');
|
||||
s.serialCheck(NELID("RIDX"));
|
||||
uint version = s.serialVersion(0);
|
||||
|
||||
s.xmlPush("database");
|
||||
|
|
|
@ -73,7 +73,7 @@ void CPDStringMapper::setMapping(const std::string& str, uint32 id)
|
|||
*/
|
||||
void CPDStringMapper::serial(NLMISC::IStream& f)
|
||||
{
|
||||
f.serialCheck((uint32)'PDSM');
|
||||
f.serialCheck(NELID("PDSM"));
|
||||
|
||||
uint version = f.serialVersion(0);
|
||||
|
||||
|
|
|
@ -714,7 +714,7 @@ public:
|
|||
|
||||
void serial(NLMISC::IStream& f)
|
||||
{
|
||||
f.serialCheck((uint32)'IALC');
|
||||
f.serialCheck(NELID("IALC"));
|
||||
f.serialVersion(0);
|
||||
|
||||
f.serial(_NextIndex);
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
FILE* fileHandle= fopen(DailyActivityLogFileName,"ab");
|
||||
nlassert(fileHandle!=NULL);
|
||||
fprintf(fileHandle,"%02u/%02u/%u CDailyTaskScheduler: Started: %02u:%02u, Finished: %02u:%02u, Executed %u commands Started %u Jobs\n",
|
||||
ptm->tm_mday, ptm->tm_mon+1, ptm->tm_year+1900, startTime/3600%24, startTime/60%60, endTime/3600%24, endTime/60%60, commandsVar==NULL?0:commandsVar->size(), jobsRemaining );
|
||||
ptm->tm_mday, ptm->tm_mon+1, ptm->tm_year+1900, (uint)startTime/3600%24, (uint)startTime/60%60, (uint)endTime/3600%24, (uint)endTime/60%60, commandsVar==NULL?0:commandsVar->size(), jobsRemaining );
|
||||
nlinfo("JobManager state: %s",CJobManager::getInstance()->getStatus().c_str());
|
||||
fclose(fileHandle);
|
||||
}
|
||||
|
|
|
@ -518,13 +518,13 @@ static std::string getActiveOutputPath()
|
|||
if (TheCharScanScriptFile==NULL)
|
||||
{
|
||||
nlwarning("There is no active script file right now from which to extract output directory");
|
||||
return false;
|
||||
return "";
|
||||
}
|
||||
bool isOK=true;
|
||||
|
||||
// write the current script file to a tmp file
|
||||
isOK=TheCharScanScriptFile->writeToFile(TmpScriptFileName);
|
||||
if (!isOK) return false;
|
||||
if (!isOK) return "";
|
||||
|
||||
// create a new script object and assign the tmp file to it
|
||||
CCharScanScriptFile script;
|
||||
|
|
|
@ -176,7 +176,7 @@ CTimestamp CDbManager::_LastUpdateTime;
|
|||
*/
|
||||
CDatabase* CDbManager::createDatabase(TDatabaseId id, CLog* log)
|
||||
{
|
||||
CHECK_DB_MGR_INIT(createDatabase, false);
|
||||
CHECK_DB_MGR_INIT(createDatabase, NULL);
|
||||
|
||||
// check db doesn't exist yet
|
||||
CDatabase* db = getDatabase(id);
|
||||
|
@ -229,7 +229,7 @@ bool CDbManager::deleteDatabase(TDatabaseId id, CLog* log)
|
|||
*/
|
||||
CDatabase* CDbManager::loadDatabase(TDatabaseId id, const string& description, CLog* log)
|
||||
{
|
||||
CHECK_DB_MGR_INIT(loadDatabase, false);
|
||||
CHECK_DB_MGR_INIT(loadDatabase, NULL);
|
||||
|
||||
nlinfo("CDbManager::loadDatabase(): load/setup database '%d'", id);
|
||||
|
||||
|
|
|
@ -1195,7 +1195,7 @@ CDatabase* CDatabase::adapt(const string& description)
|
|||
if (!buildReference())
|
||||
{
|
||||
PDS_WARNING("adapt(): failed to buildReference()");
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ string CType::getIndexName(TEnumValue value, bool verbose) const
|
|||
if (!isIndex())
|
||||
{
|
||||
PDS_WARNING("getIndexName(): type is not an index");
|
||||
return false;
|
||||
return "";
|
||||
}
|
||||
|
||||
if (isEnum())
|
||||
|
|
|
@ -114,7 +114,7 @@ void CLightIGLoader::loadIG(const string &filename)
|
|||
|
||||
|
||||
// Serial a header
|
||||
_File.serialCheck ((uint32)'TPRG');
|
||||
_File.serialCheck (NELID("TPRG"));
|
||||
|
||||
// Serial a version number
|
||||
sint version = _File.serialVersion (5);
|
||||
|
|
|
@ -1187,9 +1187,14 @@ bool CNameManager::loadForbiddenNames()
|
|||
while (true)
|
||||
{
|
||||
char str[512];
|
||||
fgets(str, 511, fp);
|
||||
char *fgres = fgets(str, 511, fp);
|
||||
if(feof(fp))
|
||||
break;
|
||||
if (fgres == NULL)
|
||||
{
|
||||
nlwarning("NAMEMGR: Error reading file");
|
||||
break;
|
||||
}
|
||||
if (strlen(str) > 0)
|
||||
{
|
||||
str[strlen(str)-1] = '\0';
|
||||
|
|
|
@ -208,7 +208,7 @@ namespace RSMGR
|
|||
public:
|
||||
CRingSessionManager()
|
||||
: _DontUsePerm(false),
|
||||
_CharSync(false)
|
||||
_CharSync(NULL)
|
||||
{
|
||||
CRingSessionManagerSkel::init(this);
|
||||
CWelcomeServiceClientSkel::init(this);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${QT_INCLUDES} )
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${NEL_INCLUDE_DIR} ${QT_INCLUDES})
|
||||
INCLUDE( ${QT_USE_FILE} )
|
||||
|
||||
FILE( GLOB SRC *.cpp *.h )
|
||||
|
||||
|
@ -36,9 +35,6 @@ SET( CLIENT_CONFIG_TRANS
|
|||
|
||||
CONFIGURE_FILE( translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY )
|
||||
SET( CLIENT_CONFIG_RCS resources.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc )
|
||||
SET( QT_USE_QTGUI TRUE )
|
||||
SET( QT_USE_QTOPENGL TRUE )
|
||||
SET( QT_USE_QTCORE TRUE )
|
||||
QT4_ADD_TRANSLATION( CLIENT_CONFIG_QM ${CLIENT_CONFIG_TRANS} )
|
||||
QT4_ADD_RESOURCES( CLIENT_CONFIG_RC_SRCS ${CLIENT_CONFIG_RCS} )
|
||||
QT4_WRAP_CPP( CLIENT_CONFIG_MOC_SRC ${CLIENT_CONFIG_HDR} )
|
||||
|
@ -52,6 +48,11 @@ ADD_EXECUTABLE( ryzom_configuration_qt WIN32 MACOSX_BUNDLE ${SRC} ${CLIENT_CONFI
|
|||
NL_DEFAULT_PROPS( ryzom_configuration_qt "Ryzom, Tools: Ryzom Configuration Qt" )
|
||||
NL_ADD_RUNTIME_FLAGS( ryzom_configuration_qt )
|
||||
NL_ADD_LIB_SUFFIX( ryzom_configuration_qt )
|
||||
TARGET_LINK_LIBRARIES( ryzom_configuration_qt nelmisc nel3d ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${OPENGL_gl_LIBRARY} )
|
||||
INSTALL( TARGETS ryzom_configuration_qt RUNTIME DESTINATION games COMPONENT client BUNDLE DESTINATION /Applications )
|
||||
TARGET_LINK_LIBRARIES( ryzom_configuration_qt nelmisc nel3d ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_configuration_qt ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
INSTALL(TARGETS ryzom_configuration_qt RUNTIME DESTINATION games COMPONENT client BUNDLE DESTINATION /Applications)
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue